@carbon/charts 0.48.3 → 0.49.2

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 (78) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/build/demo/data/CHART_TYPES.d.ts +5 -0
  3. package/build/demo/data/alluvial.d.ts +45 -0
  4. package/build/demo/data/index.d.ts +1 -0
  5. package/build/src/charts/alluvial.d.ts +6 -0
  6. package/build/src/charts/index.d.ts +1 -0
  7. package/build/src/components/graphs/alluvial.d.ts +13 -0
  8. package/build/src/components/index.d.ts +1 -0
  9. package/build/src/configuration-non-customizable.d.ts +10 -0
  10. package/build/src/configuration.d.ts +2 -1
  11. package/build/src/interfaces/charts.d.ts +23 -0
  12. package/build/src/interfaces/events.d.ts +13 -0
  13. package/bundle.js +1 -1
  14. package/charts/alluvial.d.ts +6 -0
  15. package/charts/alluvial.js +44 -0
  16. package/charts/alluvial.js.map +1 -0
  17. package/charts/index.d.ts +1 -0
  18. package/charts/index.js +1 -0
  19. package/charts/index.js.map +1 -1
  20. package/components/essentials/legend.js +5 -4
  21. package/components/essentials/legend.js.map +1 -1
  22. package/components/graphs/alluvial.d.ts +13 -0
  23. package/components/graphs/alluvial.js +453 -0
  24. package/components/graphs/alluvial.js.map +1 -0
  25. package/components/graphs/bar-stacked.js +4 -4
  26. package/components/graphs/bar-stacked.js.map +1 -1
  27. package/components/index.d.ts +1 -0
  28. package/components/index.js +1 -0
  29. package/components/index.js.map +1 -1
  30. package/configuration-non-customizable.d.ts +10 -0
  31. package/configuration-non-customizable.js +10 -0
  32. package/configuration-non-customizable.js.map +1 -1
  33. package/configuration.d.ts +2 -1
  34. package/configuration.js +11 -0
  35. package/configuration.js.map +1 -1
  36. package/demo/data/CHART_TYPES.d.ts +5 -0
  37. package/demo/data/CHART_TYPES.js +5 -0
  38. package/demo/data/CHART_TYPES.js.map +1 -1
  39. package/demo/data/alluvial.d.ts +45 -0
  40. package/demo/data/alluvial.js +130 -0
  41. package/demo/data/alluvial.js.map +1 -0
  42. package/demo/data/bundle.js +1 -1
  43. package/demo/data/index.d.ts +1 -0
  44. package/demo/data/index.js +41 -18
  45. package/demo/data/index.js.map +1 -1
  46. package/demo/styles.css +42 -0
  47. package/demo/styles.css.map +1 -1
  48. package/demo/styles.min.css +1 -1
  49. package/demo/styles.min.css.map +1 -1
  50. package/demo/tsconfig.tsbuildinfo +18 -4
  51. package/interfaces/charts.d.ts +23 -0
  52. package/interfaces/charts.js.map +1 -1
  53. package/interfaces/events.d.ts +13 -0
  54. package/interfaces/events.js +14 -0
  55. package/interfaces/events.js.map +1 -1
  56. package/model/model.js +3 -1
  57. package/model/model.js.map +1 -1
  58. package/package.json +2 -1
  59. package/styles/components/_legend.scss +5 -0
  60. package/styles/graphs/_alluvial.scss +30 -0
  61. package/styles/graphs/index.scss +1 -0
  62. package/styles-g10.css +11 -0
  63. package/styles-g10.css.map +1 -1
  64. package/styles-g10.min.css +1 -1
  65. package/styles-g10.min.css.map +1 -1
  66. package/styles-g100.css +12 -0
  67. package/styles-g100.css.map +1 -1
  68. package/styles-g100.min.css +1 -1
  69. package/styles-g100.min.css.map +1 -1
  70. package/styles-g90.css +12 -0
  71. package/styles-g90.css.map +1 -1
  72. package/styles-g90.min.css +1 -1
  73. package/styles-g90.min.css.map +1 -1
  74. package/styles.css +11 -0
  75. package/styles.css.map +1 -1
  76. package/styles.min.css +1 -1
  77. package/styles.min.css.map +1 -1
  78. package/tsconfig.tsbuildinfo +64 -17
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=function(t,n){return(e=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,n)};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o,a,s,u,l,c,h,d,f,p,g,v,m,y,b,_,x,w,O,E,T,S,M,C=function(){return(C=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function A(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}function P(){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",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout"}(i||(i={})),function(t){t.SHOW="show-modal",t.HIDE="hide-modal"}(o||(o={})),function(t){t.UPDATE="model-update"}(a||(a={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu"}(s||(s={})),function(t){t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end"}(u||(u={})),function(t){t.CHANGE="zoom-domain-change"}(l||(l={})),function(t){t.CANVAS_ZOOM_IN="canvas-zoom-in",t.CANVAS_ZOOM_OUT="canvas-zoom-out"}(c||(c={})),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"}(h||(h={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(d||(d={})),function(t){t.WORD_MOUSEOVER="wordcloud-word-mouseover",t.WORD_MOUSEMOVE="wordcloud-word-mousemove",t.WORD_CLICK="wordcloud-word-click",t.WORD_MOUSEOUT="wordcloud-word-mouseout"}(f||(f={})),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"}(p||(p={})),function(t){t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout"}(g||(g={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(v||(v={})),function(t){t.BOX_MOUSEOVER="box-mouseover",t.BOX_MOUSEMOVE="box-mousemove",t.BOX_CLICK="box-click",t.BOX_MOUSEOUT="box-mouseout",t.OUTLIER_MOUSEOVER="outlier-mouseover",t.OUTLIER_MOUSEMOVE="outlier-mousemove",t.OUTLIER_CLICK="outlier-click",t.OUTLIER_MOUSEOUT="outlier-mouseout"}(m||(m={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(y||(y={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(b||(b={})),function(t){t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout"}(_||(_={})),function(t){t.NODE_MOUSEOVER="tree-node-mouseover",t.NODE_CLICK="tree-node-click",t.NODE_MOUSEOUT="tree-node-mouseout"}(x||(x={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(w||(w={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(O||(O={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(E||(E={})),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"}(T||(T={})),function(t){t.CIRCLE_MOUSEOVER="circle-leaf-mouseover",t.CIRCLE_CLICK="circle-leaf-click",t.CIRCLE_MOUSEOUT="circle-leaf-mouseout",t.CIRCLE_MOUSEMOVE="circle-leaf-mousemove"}(S||(S={})),function(t){t.METER_MOUSEOVER="meter-mouseover",t.METER_CLICK="meter-click",t.METER_MOUSEOUT="meter-mouseout",t.METER_MOUSEMOVE="meter-mousemove"}(M||(M={}));var L,D,k,R,I,N,B,V,U,G,H,z,j,F,W,q,Y,Z,X,K,Q,$,J,tt,et,nt,rt,it=Object.freeze({__proto__:null,get Chart(){return i},get Modal(){return o},get Model(){return a},get Toolbar(){return s},get ZoomBar(){return u},get ZoomDomain(){return l},get CanvasZoom(){return c},get Axis(){return h},get Area(){return d},get WordCloud(){return f},get Pie(){return p},get Gauge(){return g},get Bar(){return v},get Boxplot(){return m},get Scatter(){return y},get Line(){return b},get Radar(){return _},get Tree(){return x},get Treemap(){return w},get Tooltip(){return O},get Threshold(){return E},get Legend(){return T},get CirclePack(){return S},get Meter(){return M}});!function(t){t.HTML="html",t.SVG="svg"}(L||(L={})),function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(D||(D={})),function(t){t.BACKGROUND="background",t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(k||(k={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(R||(R={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(I||(I={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(N||(N={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(B||(B={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio"}(V||(V={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(U||(U={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(G||(G={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(H||(H={})),function(t){t.TREE="tree",t.DENDROGRAM="dendrogram"}(z||(z={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(j||(j={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(F||(F={})),function(t){t.CENTER="center"}(W||(W={})),function(t){t.LEFT="left",t.RIGHT="right"}(q||(q={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(Y||(Y={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(Z||(Z={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(X||(X={})),function(t){t.SEMI="semi",t.FULL="full"}(K||(K={})),function(t){t.UP="up",t.DOWN="down"}(Q||(Q={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}($||($={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(J||(J={})),function(t){t.SCATTER="scatter",t.LINE="line",t.SIMPLE_BAR="simple-bar",t.STACKED_BAR="stacked-bar",t.GROUPED_BAR="grouped-bar",t.AREA="area",t.STACKED_AREA="stacked-area"}(tt||(tt={})),function(t){t.EXPORT_CSV="Export as CSV",t.EXPORT_PNG="Export as PNG",t.EXPORT_JPG="Export as JPG",t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom",t.MAKE_FULLSCREEN="Make fullscreen",t.SHOW_AS_DATATABLE="Show as data-table"}(et||(et={})),function(t){t.LEFT="left",t.RIGHT="right"}(nt||(nt={})),function(t){t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom"}(rt||(rt={}));var ot=Object.freeze({__proto__:null,get Roles(){return r},Events:it,get RenderTypes(){return L},get ChartTheme(){return D},get ColorClassNameTypes(){return k},get AxisPositions(){return R},get ZoomBarTypes(){return I},get TruncationTypes(){return N},get CartesianOrientations(){return B},get ScaleTypes(){return V},get LegendPositions(){return U},get Alignments(){return G},get LegendOrientations(){return H},get TreeTypes(){return z},get LayoutDirection(){return j},get LayoutGrowth(){return F},get LayoutAlignItems(){return W},get CalloutDirections(){return q},get Skeletons(){return Y},get TextAnchor(){return Z},get DominantBaseline(){return X},get GaugeTypes(){return K},get ArrowDirections(){return Q},get Statuses(){return $},get TickRotations(){return J},get ChartTypes(){return tt},get ToolbarControlTypes(){return et},get AxisTitleOrientations(){return nt},get LegendItemType(){return rt}});const at=t=>+t;function st(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var ut,lt={opacity:{unselected:.05,selected:.4}},ct={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1},ht={duration:1e3,ease:st,zoomLevel:3},dt={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},ft={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},pt={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},gt={defaultBins:10},vt={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"}},mt={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},yt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36},height:{default:8,proportional:16},dividerWidth:2},bt={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}},_t={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},xt={default:{size:24}},wt={horizontalOffset:10},Ot={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}},Et={height:(ut={},ut[I.GRAPH_VIEW]=32,ut[I.SLIDER_VIEW]=10,ut),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Tt=[{type:rt.RADIUS,name:"Radius"},{type:rt.AREA,name:"Poor area"},{type:rt.AREA,name:"Satisfactory area"},{type:rt.AREA,name:"Great area"},{type:rt.QUARTILE,name:"Quartiles"}],St="object"==typeof global&&global&&global.Object===Object&&global,Mt="object"==typeof self&&self&&self.Object===Object&&self,Ct=St||Mt||Function("return this")(),At=Ct.Symbol,Pt=Object.prototype,Lt=Pt.hasOwnProperty,Dt=Pt.toString,kt=At?At.toStringTag:void 0;var Rt=Object.prototype.toString;var It=At?At.toStringTag:void 0;function Nt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":It&&It in Object(t)?function(t){var e=Lt.call(t,kt),n=t[kt];try{t[kt]=void 0;var r=!0}catch(t){}var i=Dt.call(t);return r&&(e?t[kt]=n:delete t[kt]),i}(t):function(t){return Rt.call(t)}(t)}function Bt(t){return null!=t&&"object"==typeof t}function Vt(t){return"symbol"==typeof t||Bt(t)&&"[object Symbol]"==Nt(t)}function Ut(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var Gt=Array.isArray,Ht=At?At.prototype:void 0,zt=Ht?Ht.toString:void 0;function jt(t){if("string"==typeof t)return t;if(Gt(t))return Ut(t,jt)+"";if(Vt(t))return zt?zt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var Ft=/\s/;var Wt=/^\s+/;function qt(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&Ft.test(t.charAt(e)););return e}(t)+1).replace(Wt,""):t}function Yt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var Zt=/^[-+]0x[0-9a-f]+$/i,Xt=/^0b[01]+$/i,Kt=/^0o[0-7]+$/i,Qt=parseInt;function $t(t){if("number"==typeof t)return t;if(Vt(t))return NaN;if(Yt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Yt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=qt(t);var n=Xt.test(t);return n||Kt.test(t)?Qt(t.slice(2),n?2:8):Zt.test(t)?NaN:+t}function Jt(t){return t}function te(t){if(!Yt(t))return!1;var e=Nt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var ee,ne=Ct["__core-js_shared__"],re=(ee=/[^.]+$/.exec(ne&&ne.keys&&ne.keys.IE_PROTO||""))?"Symbol(src)_1."+ee:"";var ie=Function.prototype.toString;function oe(t){if(null!=t){try{return ie.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var ae=/^\[object .+?Constructor\]$/,se=Function.prototype,ue=Object.prototype,le=se.toString,ce=ue.hasOwnProperty,he=RegExp("^"+le.call(ce).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function de(t){return!(!Yt(t)||(e=t,re&&re in e))&&(te(t)?he:ae).test(oe(t));var e}function fe(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return de(n)?n:void 0}var pe=fe(Ct,"WeakMap"),ge=Object.create,ve=function(){function t(){}return function(e){if(!Yt(e))return{};if(ge)return ge(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function me(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 ye(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var be=Date.now;var _e=function(){try{var t=fe(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),xe=function(t){var e=0,n=0;return function(){var r=be(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(_e?function(t,e){return _e(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:Jt);function we(t){return t!=t}function Oe(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,we,n)}(t,e,0)>-1}var Ee=/^(?:0|[1-9]\d*)$/;function Te(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ee.test(t))&&t>-1&&t%1==0&&t<e}function Se(t,e,n){"__proto__"==e&&_e?_e(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Me(t,e){return t===e||t!=t&&e!=e}var Ce=Object.prototype.hasOwnProperty;function Ae(t,e,n){var r=t[e];Ce.call(t,e)&&Me(r,n)&&(void 0!==n||e in t)||Se(t,e,n)}function Pe(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?Se(n,s,u):Ae(n,s,u)}return n}var Le=Math.max;function De(t,e){return xe(function(t,e,n){return e=Le(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Le(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),me(t,this,s)}}(t,e,Jt),t+"")}function ke(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Re(t){return null!=t&&ke(t.length)&&!te(t)}function Ie(t,e,n){if(!Yt(n))return!1;var r=typeof e;return!!("number"==r?Re(n)&&Te(e,n.length):"string"==r&&e in n)&&Me(n[e],t)}var Ne=Object.prototype;function Be(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ne)}function Ve(t){return Bt(t)&&"[object Arguments]"==Nt(t)}var Ue=Object.prototype,Ge=Ue.hasOwnProperty,He=Ue.propertyIsEnumerable,ze=Ve(function(){return arguments}())?Ve:function(t){return Bt(t)&&Ge.call(t,"callee")&&!He.call(t,"callee")};var je="object"==typeof t&&t&&!t.nodeType&&t,Fe=je&&"object"==typeof module&&module&&!module.nodeType&&module,We=Fe&&Fe.exports===je?Ct.Buffer:void 0,qe=(We?We.isBuffer:void 0)||function(){return!1},Ye={};function Ze(t){return function(e){return t(e)}}Ye["[object Float32Array]"]=Ye["[object Float64Array]"]=Ye["[object Int8Array]"]=Ye["[object Int16Array]"]=Ye["[object Int32Array]"]=Ye["[object Uint8Array]"]=Ye["[object Uint8ClampedArray]"]=Ye["[object Uint16Array]"]=Ye["[object Uint32Array]"]=!0,Ye["[object Arguments]"]=Ye["[object Array]"]=Ye["[object ArrayBuffer]"]=Ye["[object Boolean]"]=Ye["[object DataView]"]=Ye["[object Date]"]=Ye["[object Error]"]=Ye["[object Function]"]=Ye["[object Map]"]=Ye["[object Number]"]=Ye["[object Object]"]=Ye["[object RegExp]"]=Ye["[object Set]"]=Ye["[object String]"]=Ye["[object WeakMap]"]=!1;var Xe="object"==typeof t&&t&&!t.nodeType&&t,Ke=Xe&&"object"==typeof module&&module&&!module.nodeType&&module,Qe=Ke&&Ke.exports===Xe&&St.process,$e=function(){try{var t=Ke&&Ke.require&&Ke.require("util").types;return t||Qe&&Qe.binding&&Qe.binding("util")}catch(t){}}(),Je=$e&&$e.isTypedArray,tn=Je?Ze(Je):function(t){return Bt(t)&&ke(t.length)&&!!Ye[Nt(t)]},en=Object.prototype.hasOwnProperty;function nn(t,e){var n=Gt(t),r=!n&&ze(t),i=!n&&!r&&qe(t),o=!n&&!r&&!i&&tn(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&&!en.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Te(l,u))||s.push(l);return s}function rn(t,e){return function(n){return t(e(n))}}var on=rn(Object.keys,Object),an=Object.prototype.hasOwnProperty;function sn(t){if(!Be(t))return on(t);var e=[];for(var n in Object(t))an.call(t,n)&&"constructor"!=n&&e.push(n);return e}function un(t){return Re(t)?nn(t):sn(t)}var ln=Object.prototype.hasOwnProperty;function cn(t){if(!Yt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Be(t),n=[];for(var r in t)("constructor"!=r||!e&&ln.call(t,r))&&n.push(r);return n}function hn(t){return Re(t)?nn(t,!0):cn(t)}var dn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,fn=/^\w*$/;function pn(t,e){if(Gt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Vt(t))||(fn.test(t)||!dn.test(t)||null!=e&&t in Object(e))}var gn=fe(Object,"create");var vn=Object.prototype.hasOwnProperty;var mn=Object.prototype.hasOwnProperty;function yn(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 bn(t,e){for(var n=t.length;n--;)if(Me(t[n][0],e))return n;return-1}yn.prototype.clear=function(){this.__data__=gn?gn(null):{},this.size=0},yn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},yn.prototype.get=function(t){var e=this.__data__;if(gn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return vn.call(e,t)?e[t]:void 0},yn.prototype.has=function(t){var e=this.__data__;return gn?void 0!==e[t]:mn.call(e,t)},yn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=gn&&void 0===e?"__lodash_hash_undefined__":e,this};var _n=Array.prototype.splice;function xn(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])}}xn.prototype.clear=function(){this.__data__=[],this.size=0},xn.prototype.delete=function(t){var e=this.__data__,n=bn(e,t);return!(n<0)&&(n==e.length-1?e.pop():_n.call(e,n,1),--this.size,!0)},xn.prototype.get=function(t){var e=this.__data__,n=bn(e,t);return n<0?void 0:e[n][1]},xn.prototype.has=function(t){return bn(this.__data__,t)>-1},xn.prototype.set=function(t,e){var n=this.__data__,r=bn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var wn=fe(Ct,"Map");function On(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function En(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])}}En.prototype.clear=function(){this.size=0,this.__data__={hash:new yn,map:new(wn||xn),string:new yn}},En.prototype.delete=function(t){var e=On(this,t).delete(t);return this.size-=e?1:0,e},En.prototype.get=function(t){return On(this,t).get(t)},En.prototype.has=function(t){return On(this,t).has(t)},En.prototype.set=function(t,e){var n=On(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Tn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Tn.Cache||En),n}Tn.Cache=En;var Sn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Mn=/\\(\\)?/g,Cn=function(t){var e=Tn(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Sn,(function(t,n,r,i){e.push(r?i.replace(Mn,"$1"):n||t)})),e}));function An(t){return null==t?"":jt(t)}function Pn(t,e){return Gt(t)?t:pn(t,e)?[t]:Cn(An(t))}function Ln(t){if("string"==typeof t||Vt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Dn(t,e){for(var n=0,r=(e=Pn(e,t)).length;null!=t&&n<r;)t=t[Ln(e[n++])];return n&&n==r?t:void 0}function kn(t,e,n){var r=null==t?void 0:Dn(t,e);return void 0===r?n:r}function Rn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var In=At?At.isConcatSpreadable:void 0;function Nn(t){return Gt(t)||ze(t)||!!(In&&t&&t[In])}function Bn(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Nn),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Bn(s,e-1,n,r,i):Rn(i,s):r||(i[i.length]=s)}return i}function Vn(t){return(null==t?0:t.length)?Bn(t,1):[]}var Un=rn(Object.getPrototypeOf,Object),Gn=Function.prototype,Hn=Object.prototype,zn=Gn.toString,jn=Hn.hasOwnProperty,Fn=zn.call(Object);function Wn(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}(t,e,n)}var qn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Yn(t){return qn.test(t)}var Zn="[\\ud800-\\udfff]",Xn="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Kn="\\ud83c[\\udffb-\\udfff]",Qn="[^\\ud800-\\udfff]",$n="(?:\\ud83c[\\udde6-\\uddff]){2}",Jn="[\\ud800-\\udbff][\\udc00-\\udfff]",tr="(?:"+Xn+"|"+Kn+")"+"?",er="[\\ufe0e\\ufe0f]?"+tr+("(?:\\u200d(?:"+[Qn,$n,Jn].join("|")+")[\\ufe0e\\ufe0f]?"+tr+")*"),nr="(?:"+[Qn+Xn+"?",Xn,$n,Jn,Zn].join("|")+")",rr=RegExp(Kn+"(?="+Kn+")|"+nr+er,"g");function ir(t){return Yn(t)?function(t){return t.match(rr)||[]}(t):function(t){return t.split("")}(t)}var or,ar=(or="toUpperCase",function(t){var e=Yn(t=An(t))?ir(t):void 0,n=e?e[0]:t.charAt(0),r=e?Wn(e,1).join(""):t.slice(1);return n[or]()+r});var sr=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ur=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,lr=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var cr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var hr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var dr="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fr="["+dr+"]",pr="\\d+",gr="[\\u2700-\\u27bf]",vr="[a-z\\xdf-\\xf6\\xf8-\\xff]",mr="[^\\ud800-\\udfff"+dr+pr+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",yr="(?:\\ud83c[\\udde6-\\uddff]){2}",br="[\\ud800-\\udbff][\\udc00-\\udfff]",_r="[A-Z\\xc0-\\xd6\\xd8-\\xde]",xr="(?:"+vr+"|"+mr+")",wr="(?:"+_r+"|"+mr+")",Or="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Er="[\\ufe0e\\ufe0f]?"+Or+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",yr,br].join("|")+")[\\ufe0e\\ufe0f]?"+Or+")*"),Tr="(?:"+[gr,yr,br].join("|")+")"+Er,Sr=RegExp([_r+"?"+vr+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[fr,_r,"$"].join("|")+")",wr+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[fr,_r+xr,"$"].join("|")+")",_r+"?"+xr+"+(?:['’](?:d|ll|m|re|s|t|ve))?",_r+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",pr,Tr].join("|"),"g");function Mr(t,e,n){return t=An(t),void 0===(e=n?void 0:e)?function(t){return hr.test(t)}(t)?function(t){return t.match(Sr)||[]}(t):function(t){return t.match(cr)||[]}(t):t.match(e)||[]}var Cr=RegExp("['’]","g");function Ar(t){return function(e){return function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}(Mr(function(t){return(t=An(t))&&t.replace(ur,sr).replace(lr,"")}(e).replace(Cr,"")),t,"")}}var Pr=Ar((function(t,e,n){return e=e.toLowerCase(),t+(n?ar(An(e).toLowerCase()):e)}));function Lr(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=$t(n))==n?n:0),void 0!==e&&(e=(e=$t(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}($t(t),e,n)}function Dr(t){var e=this.__data__=new xn(t);this.size=e.size}Dr.prototype.clear=function(){this.__data__=new xn,this.size=0},Dr.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Dr.prototype.get=function(t){return this.__data__.get(t)},Dr.prototype.has=function(t){return this.__data__.has(t)},Dr.prototype.set=function(t,e){var n=this.__data__;if(n instanceof xn){var r=n.__data__;if(!wn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new En(r)}return n.set(t,e),this.size=n.size,this};var kr="object"==typeof t&&t&&!t.nodeType&&t,Rr=kr&&"object"==typeof module&&module&&!module.nodeType&&module,Ir=Rr&&Rr.exports===kr?Ct.Buffer:void 0,Nr=Ir?Ir.allocUnsafe:void 0;function Br(t,e){if(e)return t.slice();var n=t.length,r=Nr?Nr(n):new t.constructor(n);return t.copy(r),r}function Vr(){return[]}var Ur=Object.prototype.propertyIsEnumerable,Gr=Object.getOwnPropertySymbols,Hr=Gr?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}(Gr(t),(function(e){return Ur.call(t,e)})))}:Vr;var zr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Rn(e,Hr(t)),t=Un(t);return e}:Vr;function jr(t,e,n){var r=e(t);return Gt(t)?r:Rn(r,n(t))}function Fr(t){return jr(t,un,Hr)}function Wr(t){return jr(t,hn,zr)}var qr=fe(Ct,"DataView"),Yr=fe(Ct,"Promise"),Zr=fe(Ct,"Set"),Xr=oe(qr),Kr=oe(wn),Qr=oe(Yr),$r=oe(Zr),Jr=oe(pe),ti=Nt;(qr&&"[object DataView]"!=ti(new qr(new ArrayBuffer(1)))||wn&&"[object Map]"!=ti(new wn)||Yr&&"[object Promise]"!=ti(Yr.resolve())||Zr&&"[object Set]"!=ti(new Zr)||pe&&"[object WeakMap]"!=ti(new pe))&&(ti=function(t){var e=Nt(t),n="[object Object]"==e?t.constructor:void 0,r=n?oe(n):"";if(r)switch(r){case Xr:return"[object DataView]";case Kr:return"[object Map]";case Qr:return"[object Promise]";case $r:return"[object Set]";case Jr:return"[object WeakMap]"}return e});var ei=ti,ni=Object.prototype.hasOwnProperty;var ri=Ct.Uint8Array;function ii(t){var e=new t.constructor(t.byteLength);return new ri(e).set(new ri(t)),e}var oi=/\w*$/;var ai=At?At.prototype:void 0,si=ai?ai.valueOf:void 0;function ui(t,e){var n=e?ii(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function li(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return ii(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?ii(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 ui(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,oi.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,si?Object(si.call(r)):{}}}function ci(t){return"function"!=typeof t.constructor||Be(t)?{}:ve(Un(t))}var hi=$e&&$e.isMap,di=hi?Ze(hi):function(t){return Bt(t)&&"[object Map]"==ei(t)};var fi=$e&&$e.isSet,pi=fi?Ze(fi):function(t){return Bt(t)&&"[object Set]"==ei(t)},gi={};function vi(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(!Yt(t))return t;var c=Gt(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ni.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return ye(t,a)}else{var h=ei(t),d="[object Function]"==h||"[object GeneratorFunction]"==h;if(qe(t))return Br(t,s);if("[object Object]"==h||"[object Arguments]"==h||d&&!i){if(a=u||d?{}:ci(t),!s)return u?function(t,e){return Pe(t,zr(t),e)}(t,function(t,e){return t&&Pe(e,hn(e),t)}(a,t)):function(t,e){return Pe(t,Hr(t),e)}(t,function(t,e){return t&&Pe(e,un(e),t)}(a,t))}else{if(!gi[h])return i?t:{};a=li(t,h,s)}}o||(o=new Dr);var f=o.get(t);if(f)return f;o.set(t,a),pi(t)?t.forEach((function(r){a.add(vi(r,e,n,r,t,o))})):di(t)&&t.forEach((function(r,i){a.set(i,vi(r,e,n,i,t,o))}));var p=c?void 0:(l?u?Wr:Fr:u?hn:un)(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(p||t,(function(r,i){p&&(r=t[i=r]),Ae(a,i,vi(r,e,n,i,t,o))})),a}gi["[object Arguments]"]=gi["[object Array]"]=gi["[object ArrayBuffer]"]=gi["[object DataView]"]=gi["[object Boolean]"]=gi["[object Date]"]=gi["[object Float32Array]"]=gi["[object Float64Array]"]=gi["[object Int8Array]"]=gi["[object Int16Array]"]=gi["[object Int32Array]"]=gi["[object Map]"]=gi["[object Number]"]=gi["[object Object]"]=gi["[object RegExp]"]=gi["[object Set]"]=gi["[object String]"]=gi["[object Symbol]"]=gi["[object Uint8Array]"]=gi["[object Uint8ClampedArray]"]=gi["[object Uint16Array]"]=gi["[object Uint32Array]"]=!0,gi["[object Error]"]=gi["[object Function]"]=gi["[object WeakMap]"]=!1;function mi(t){return vi(t,5)}function yi(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new En;++e<n;)this.add(t[e])}function bi(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function _i(t,e){return t.has(e)}yi.prototype.add=yi.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},yi.prototype.has=function(t){return this.__data__.has(t)};function xi(t,e,n,r,i,o){var a=1&n,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var h=-1,d=!0,f=2&n?new yi:void 0;for(o.set(t,e),o.set(e,t);++h<s;){var p=t[h],g=e[h];if(r)var v=a?r(g,p,h,e,t,o):r(p,g,h,t,e,o);if(void 0!==v){if(v)continue;d=!1;break}if(f){if(!bi(e,(function(t,e){if(!_i(f,e)&&(p===t||i(p,t,n,r,o)))return f.push(e)}))){d=!1;break}}else if(p!==g&&!i(p,g,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function wi(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Oi(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Ei=At?At.prototype:void 0,Ti=Ei?Ei.valueOf:void 0;var Si=Object.prototype.hasOwnProperty;var Mi=Object.prototype.hasOwnProperty;function Ci(t,e,n,r,i,o){var a=Gt(t),s=Gt(e),u=a?"[object Array]":ei(t),l=s?"[object Array]":ei(e),c="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),d=u==l;if(d&&qe(t)){if(!qe(e))return!1;a=!0,c=!1}if(d&&!c)return o||(o=new Dr),a||tn(t)?xi(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ri(t),new ri(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Me(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=wi;case"[object Set]":var u=1&r;if(s||(s=Oi),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=xi(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(Ti)return Ti.call(t)==Ti.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var f=c&&Mi.call(t,"__wrapped__"),p=h&&Mi.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,v=p?e.value():e;return o||(o=new Dr),i(g,v,n,r,o)}}return!!d&&(o||(o=new Dr),function(t,e,n,r,i,o){var a=1&n,s=Fr(t),u=s.length;if(u!=Fr(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:Si.call(e,c)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=a;++l<u;){var g=t[c=s[l]],v=e[c];if(r)var m=a?r(v,g,c,e,t,o):r(g,v,c,t,e,o);if(!(void 0===m?g===v||i(g,v,n,r,o):m)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var y=t.constructor,b=e.constructor;y!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function Ai(t,e,n,r,i){return t===e||(null==t||null==e||!Bt(t)&&!Bt(e)?t!=t&&e!=e:Ci(t,e,n,r,Ai,i))}function Pi(t){return t==t&&!Yt(t)}function Li(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Di(t){var e=function(t){for(var e=un(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Pi(i)]}return e}(t);return 1==e.length&&e[0][2]?Li(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=n[i])[0],l=t[u],c=s[1];if(a&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new Dr;if(r)var d=r(l,c,u,t,e,h);if(!(void 0===d?Ai(c,l,3,r,h):d))return!1}}return!0}(n,t,e)}}function ki(t,e){return null!=t&&e in Object(t)}function Ri(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Pn(e,t)).length,o=!1;++r<i;){var a=Ln(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&ke(i)&&Te(a,i)&&(Gt(t)||ze(t))}(t,e,ki)}function Ii(t){return pn(t)?(e=Ln(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Dn(e,t)}}(t);var e}function Ni(t){return"function"==typeof t?t:null==t?Jt:"object"==typeof t?Gt(t)?function(t,e){return pn(t)&&Pi(e)?Li(Ln(t),e):function(n){var r=kn(n,t);return void 0===r&&r===e?Ri(n,t):Ai(e,r,3)}}(t[0],t[1]):Di(t):Ii(t)}function Bi(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}var Vi,Ui=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Vi?a:++r];if(!1===e(i[s],s,i))break}return t};var Gi=function(t,e){return function(n,r){if(null==n)return n;if(!Re(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&Ui(t,e,un)}));function Hi(t,e,n,r){return Gi(t,(function(t,i,o){e(r,t,n(t),o)})),r}var zi=function(){return Ct.Date.now()},ji=Math.max,Fi=Math.min;function Wi(t,e,n){var r,i,o,a,s,u,l=0,c=!1,h=!1,d=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(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?f(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=zi();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Fi(n,o-(t-l)):n}(t))}function m(t){return s=void 0,d&&r?f(t):(r=i=void 0,a)}function y(){var t=zi(),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),f(u)}return void 0===s&&(s=setTimeout(v,e)),a}return e=$t(e)||0,Yt(n)&&(c=!!n.leading,o=(h="maxWait"in n)?ji($t(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),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(zi())},y}function qi(t,e,n){(void 0===n||Me(t[e],n))&&(void 0!==n||e in t)||Se(t,e,n)}function Yi(t){return Bt(t)&&Re(t)}function Zi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Xi(t,e,n,r,i,o,a){var s=Zi(t,n),u=Zi(e,n),l=a.get(u);if(l)qi(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,d=void 0===h;if(d){var f=Gt(u),p=!f&&qe(u),g=!f&&!p&&tn(u);h=u,f||p||g?Gt(s)?h=s:Yi(s)?h=ye(s):p?(d=!1,h=Br(u,!0)):g?(d=!1,h=ui(u,!0)):h=[]:function(t){if(!Bt(t)||"[object Object]"!=Nt(t))return!1;var e=Un(t);if(null===e)return!0;var n=jn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&zn.call(n)==Fn}(u)||ze(u)?(h=s,ze(s)?h=Pe(c=s,hn(c)):Yt(s)&&!te(s)||(h=ci(u))):d=!1}d&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),qi(t,n,h)}}function Ki(t,e,n,r,i){t!==e&&Ui(e,(function(o,a){if(i||(i=new Dr),Yt(o))Xi(t,e,a,n,Ki,r,i);else{var s=r?r(Zi(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),qi(t,a,s)}}),hn)}function Qi(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function $i(t,e){var n=-1,r=Re(t)?Array(t.length):[];return Gi(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Ji(t,e){return Bn(function(t,e){return(Gt(t)?Ut:$i)(t,Ni(e))}(t,e),1/0)}function to(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}var eo,no,ro=Object.prototype.hasOwnProperty,io=(eo=function(t,e,n){ro.call(t,n)?t[n].push(e):Se(t,n,[e])},function(t,e){var n=Gt(t)?Bi:Hi,r=no?no():{};return n(t,eo,Ni(e),r)}),oo=Object.prototype.hasOwnProperty;function ao(t){if(null==t)return!0;if(Re(t)&&(Gt(t)||"string"==typeof t||"function"==typeof t.splice||qe(t)||tn(t)||ze(t)))return!t.length;var e=ei(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(Be(t))return!sn(t).length;for(var n in t)if(oo.call(t,n))return!1;return!0}function so(t,e){return Ai(t,e)}var uo,lo=Ar((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),co=(uo=function(t,e,n){Ki(t,e,n)},De((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=uo.length>3&&"function"==typeof i?(r--,i):void 0,o&&Ie(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&uo(t,a,n,i)}return t})));function ho(t,e){var n;return Gi(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function fo(t,e,n){var r=Gt(t)?bi:ho;return n&&Ie(t,e,n)&&(e=void 0),r(t,Ni(e))}var po=Zr&&1/Oi(new Zr([,-0]))[1]==1/0?function(t){return new Zr(t)}:function(){};function go(t,e,n){var r=-1,i=Oe,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Qi;else if(o>=200){var l=e?null:po(t);if(l)return Oi(l);a=!1,i=_i,u=new yi}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 d=u.length;d--;)if(u[d]===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}var vo=De((function(t){var e=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}(t);return Yi(e)&&(e=void 0),go(Bn(t,1,Yi,!0),Ni(e))}));function mo(t){return t&&t.length?go(t):[]}var yo="http://www.w3.org/1999/xhtml",bo={svg:"http://www.w3.org/2000/svg",xhtml:yo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function _o(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),bo.hasOwnProperty(e)?{space:bo[e],local:t}:t}function xo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===yo&&e.documentElement.namespaceURI===yo?e.createElement(t):e.createElementNS(n,t)}}function wo(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Oo(t){var e=_o(t);return(e.local?wo:xo)(e)}function Eo(){}function To(t){return null==t?Eo:function(){return this.querySelector(t)}}function So(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Mo(){return[]}function Co(t){return null==t?Mo:function(){return this.querySelectorAll(t)}}function Ao(t){return function(){return this.matches(t)}}function Po(t){return function(e){return e.matches(t)}}var Lo=Array.prototype.find;function Do(){return this.firstElementChild}var ko=Array.prototype.filter;function Ro(){return Array.from(this.children)}function Io(t){return new Array(t.length)}function No(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Bo(t){return function(){return t}}function Vo(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 No(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function Uo(t,e,n,r,i,o,a){var s,u,l,c=new Map,h=e.length,d=o.length,f=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(f[s]=l=a.call(u,u.__data__,s,e)+"",c.has(l)?i[s]=u:c.set(l,u));for(s=0;s<d;++s)l=a.call(t,o[s],s,o)+"",(u=c.get(l))?(r[s]=u,u.__data__=o[s],c.delete(l)):n[s]=new No(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c.get(f[s])===u&&(i[s]=u)}function Go(t){return t.__data__}function Ho(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function zo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function jo(t){return function(){this.removeAttribute(t)}}function Fo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Wo(t,e){return function(){this.setAttribute(t,e)}}function qo(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Yo(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Zo(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 Xo(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ko(t){return function(){this.style.removeProperty(t)}}function Qo(t,e,n){return function(){this.style.setProperty(t,e,n)}}function $o(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Jo(t,e){return t.style.getPropertyValue(e)||Xo(t).getComputedStyle(t,null).getPropertyValue(e)}function ta(t){return function(){delete this[t]}}function ea(t,e){return function(){this[t]=e}}function na(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function ra(t){return t.trim().split(/^|\s+/)}function ia(t){return t.classList||new oa(t)}function oa(t){this._node=t,this._names=ra(t.getAttribute("class")||"")}function aa(t,e){for(var n=ia(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function sa(t,e){for(var n=ia(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ua(t){return function(){aa(this,t)}}function la(t){return function(){sa(this,t)}}function ca(t,e){return function(){(e.apply(this,arguments)?aa:sa)(this,t)}}function ha(){this.textContent=""}function da(t){return function(){this.textContent=t}}function fa(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function pa(){this.innerHTML=""}function ga(t){return function(){this.innerHTML=t}}function va(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function ma(){this.nextSibling&&this.parentNode.appendChild(this)}function ya(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ba(){return null}function _a(){var t=this.parentNode;t&&t.removeChild(this)}function xa(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function wa(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Oa(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 Ea(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.options);++i?e.length=i:delete this.__on}}}function Ta(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function Sa(t,e,n){var r=Xo(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 Ma(t,e){return function(){return Sa(this,t,e)}}function Ca(t,e){return function(){return Sa(this,t,e.apply(this,arguments))}}No.prototype={constructor:No,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)}},oa.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 Aa,Pa=[null];function La(t,e){this._groups=t,this._parents=e}function Da(){return new La([[document.documentElement]],Pa)}function ka(t){return"string"==typeof t?new La([[document.querySelector(t)]],[document.documentElement]):new La([[t]],Pa)}function Ra(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function Ia(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Na(t,e){return t(e={exports:{}},e.exports),e.exports}La.prototype=Da.prototype={constructor:La,select:function(t){"function"!=typeof t&&(t=To(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 La(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return So(t.apply(this,arguments))}}(t):Co(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 La(r,i)},selectChild:function(t){return this.select(null==t?Do:function(t){return function(){return Lo.call(this.children,t)}}("function"==typeof t?t:Po(t)))},selectChildren:function(t){return this.selectAll(null==t?Ro:function(t){return function(){return ko.call(this.children,t)}}("function"==typeof t?t:Po(t)))},filter:function(t){"function"!=typeof t&&(t=Ao(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 La(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Go);var n=e?Uo:Vo,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Bo(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],d=h.length,f=Ho(t.call(c,c&&c.__data__,l,r)),p=f.length,g=s[l]=new Array(p),v=a[l]=new Array(p),m=u[l]=new Array(d);n(c,h,g,v,m,f,e);for(var y,b,_=0,x=0;_<p;++_)if(y=g[_]){for(_>=x&&(x=_+1);!(b=v[x])&&++x<p;);y._next=b||null}}return(a=new La(a,r))._enter=s,a._exit=u,a},enter:function(){return new La(this._enter||this._groups.map(Io),this._parents)},exit:function(){return new La(this._exit||this._groups.map(Io),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l,c=n[u],h=r[u],d=c.length,f=s[u]=new Array(d),p=0;p<d;++p)(l=c[p]||h[p])&&(f[p]=l);for(;u<i;++u)s[u]=n[u];return new La(s,this._parents)},selection:function(){return this},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=zo);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 La(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},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(){let t=0;for(const e of this)++t;return 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=_o(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?Fo:jo:"function"==typeof e?n.local?Zo:Yo:n.local?qo:Wo)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ko:"function"==typeof e?$o:Qo)(t,e,null==n?"":n)):Jo(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?ta:"function"==typeof e?na:ea)(t,e)):this.node()[t]},classed:function(t,e){var n=ra(t+"");if(arguments.length<2){for(var r=ia(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?ca:e?ua:la)(n,e))},text:function(t){return arguments.length?this.each(null==t?ha:("function"==typeof t?fa:da)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?pa:("function"==typeof t?va:ga)(t)):this.node().innerHTML},raise:function(){return this.each(ma)},lower:function(){return this.each(ya)},append:function(t){var e="function"==typeof t?t:Oo(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:Oo(t),r=null==e?ba:"function"==typeof e?e:To(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(_a)},clone:function(t){return this.select(t?wa:xa)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Oa(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Ta:Ea,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?Ca:Ma)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}},function(t){function e(e,n){var r=t.getProperty(e,"legend","additionalItems"),i=t.getProperty(n,"legend","additionalItems");if(r&&i){var o=i.map((function(t){return t.type})),a=r.map((function(t){return t.type})),s=Tt.filter((function(t){return a.includes(t.type)&&!o.includes(t.type)}));e.legend.additionalItems=s,n.legend.additionalItems=t.unionBy(s,i,"name")}}t.debounce=Wi,t.clone=mi,t.merge=co,t.unionBy=vo,t.removeArrayDuplicates=mo,t.clamp=Lr,t.flatten=Vn,t.groupBy=io,t.camelCase=Pr,t.isEmpty=ao,t.isEqual=so,t.flatMapDeep=Ji,t.kebabCase=lo,t.fromPairs=to,t.some=fo,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,o=arguments;i.mousePosition=Ra(o[0],n),clearTimeout(r),r=setTimeout((function(){t.apply(i,o)}),e)}},t.mergeDefaultChartOptions=function(n,r){var i,o,a=t.clone(n),s=Object.keys(r.axes||{});for(var u in(null===(o=null===(i=r)||void 0===i?void 0:i.toolbar)||void 0===o?void 0:o.controls)&&delete a.toolbar.controls,0===s.length&&delete a.axes,a.axes)if(s.includes(u)){var l=r.axes[u];(l.primary||l.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/docs-tutorials--tabular-data-format");var c=l.mapsTo;if(null==c){var h=l.scaleType;null==h?l.mapsTo="value":h===V.TIME?l.mapsTo="date":h===V.LABELS&&(l.mapsTo="key")}}else delete a.axes[u];return e(a,r),t.merge(a,r)},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){if(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;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.formatWidthHeightValues=function(t){var e=t.toString();return e.match(/[a-z]/i)?e:e+"px"},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e,n){void 0===n&&(n="value");var r=t/e.reduce((function(t,e){return t+e[n]}),0)*100;return r%1!=0?parseFloat(r.toFixed(1)):r},t.truncateLabel=function(t,e,n){return n>t.length?t:e===N.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===N.FRONT_LINE?"..."+t.substr(-n):e===N.END_LINE?t.substr(0,n)+"...":void 0},t.updateLegendAdditionalItems=e,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===B.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},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===B.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(Aa||(Aa={}));var Ba=Na((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}));Ia(Ba);var Va=Na((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}));Ia(Va);var Ua=Na((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Va)&&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}));Ia(Ua);var Ga=Na((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}));Ia(Ga);var Ha=Na((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}));Ia(Ha);var za=Na((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ha)&&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}));Ia(za);var ja=Na((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}));Ia(ja);var Fa=Na((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}));Ia(Fa);var Wa=Na((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(ja),r=i(Fa);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}));Ia(Wa);var qa=Ia(Na((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Ba),r=s(Ua),i=s(Ga),o=s(za),a=s(Wa);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}))),Ya={type:N.END_LINE,threshold:16,numCharacter:14},Za={enabled:!0,position:U.BOTTOM,clickable:!0,truncation:Ya,alignment:G.LEFT,order:null,additionalItems:[]},Xa={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},Ka={enabled:!0},Qa={enabled:!0,showTotal:!0,truncation:Ya,groupLabel:"Group"},$a={top:{visible:!0,includeZero:!0,truncation:Ya},bottom:{visible:!0,includeZero:!0,truncation:Ya},left:{visible:!0,includeZero:!0,truncation:Ya},right:{visible:!0,includeZero:!0,truncation:Ya}},Ja={addSpaceOnEdges:1,showDayName:!1,localeObject:qa,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"}}},ts="undefined"!=typeof document&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),es={width:null,height:null,resizable:!0,tooltip:Qa,legend:Za,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:P([{type:et.SHOW_AS_DATATABLE}],ts?[{type:et.MAKE_FULLSCREEN}]:[],[{type:et.EXPORT_CSV},{type:et.EXPORT_PNG},{type:et.EXPORT_JPG}])}},ns=Aa.merge({},es,{axes:$a,timeScale:Ja,grid:Xa,ruler:Ka,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:I.GRAPH_VIEW}}}),rs=Aa.merge({},ns,{bars:{maxWidth:16},timeScale:Aa.merge(Ja,{addSpaceOnEdges:1})}),is=Aa.merge({},rs,{}),os=Aa.merge({},rs,{}),as=Aa.merge({},rs,{bars:Aa.merge({},rs.bars,{dividerSize:1.5})}),ss=Aa.merge({},rs,{}),us=Aa.merge({},ns,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),ls=us,cs=Aa.merge({},us,{points:{radius:3,filled:!1,enabled:!0}}),hs=Aa.merge({},cs,{timeScale:Aa.merge(Ja,{addSpaceOnEdges:0})}),ds=hs,fs=Aa.merge({},ns,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:rt.RADIUS,name:"Radius"}]}}),ps=Aa.merge({},ns,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:rt.AREA,name:"Poor area"},{type:rt.AREA,name:"Satisfactory area"},{type:rt.AREA,name:"Great area"},{type:rt.QUARTILE,name:"Quartiles"}]}}),gs=Aa.merge({},rs,{bars:{dividerSize:1.5},timeScale:Aa.merge(Ja,{addSpaceOnEdges:0})}),vs=Aa.merge({},es,{tooltip:Aa.merge({},Qa,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:function(t,e){var n=Math.min(t.width,t.height);return[20*n/400,75*n/400]},wordMapsTo:"word"}}),ms=Aa.merge({},es,{pie:{labels:{formatter:null,enabled:!0},alignment:G.LEFT,sortFunction:null,valueMapsTo:"value"}}),ys=Aa.merge({},es,{legend:{enabled:!1},gauge:{type:K.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:function(t){return t/8},valueFontSize:function(t){return t/2.5},numberFormatter:function(t){return t.toFixed(2)%1!=0?t.toFixed(2).toLocaleString():t.toFixed().toLocaleString()},alignment:G.LEFT}}),bs=Aa.merge({},ms,{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()}},alignment:G.LEFT}}),_s=Aa.merge({},es,{legend:{enabled:!1,clickable:!1},meter:{proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),xs={chart:es,axisChart:ns,simpleBarChart:is,groupedBarChart:os,stackedBarChart:as,boxplotChart:ss,bubbleChart:fs,bulletChart:ps,histogramChart:gs,lineChart:cs,areaChart:hs,stackedAreaChart:ds,scatterChart:us,lollipopChart:ls,pieChart:ms,donutChart:bs,meterChart:_s,proportionalMeterChart:Aa.merge({},_s,{legend:{enabled:!0}}),radarChart:Aa.merge({},es,{radar:{axes:{angle:"key",value:"value"},alignment:G.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:ys,comboChart:Aa.merge({},rs,{comboChartTypes:[]}),treeChart:Aa.merge({tree:{type:z.TREE}},es,{}),treemapChart:Aa.merge({},es,{data:Aa.merge(es.data,{groupMapsTo:"name"})}),circlePackChart:Aa.merge({},es,dt,{data:Aa.merge(es.data,{groupMapsTo:"name"})}),wordCloudChart:vs},ws=Object.freeze({__proto__:null,grid:Xa,ruler:Ka,baseTooltip:Qa,timeScale:Ja,options:xs,area:lt,axis:ct,canvasZoomSettings:ht,circlePack:dt,color:ft,boxplot:pt,histogram:gt,legend:vt,lines:mt,meter:yt,pie:bt,radar:_t,spacers:xt,tooltips:wt,transitions:Ot,toolbar:{buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},zoomBar:Et,defaultLegendAdditionalItems:Tt});function Os(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Es(t){let e=t,n=t;function r(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const o=r+i>>>1;n(t[o],e)<0?r=o+1:i=o}return r}return 1===t.length&&(e=(e,n)=>t(e)-n,n=function(t){return(e,n)=>Os(t(e),n)}(t)),{left:r,center:function(t,n,i,o){null==i&&(i=0),null==o&&(o=t.length);const a=r(t,n,i,o-1);return a>i&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const o=r+i>>>1;n(t[o],e)>0?i=o:r=o+1}return r}}}const Ts=Es(Os).right;Es((function(t){return null===t?NaN:+t})).center;function Ss(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Ms extends Map{constructor(t,e=As){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Cs(this,t))}has(t){return super.has(Cs(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);t.has(r)&&(n=t.get(n),t.delete(r));return n}(this,t))}}function Cs({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function As(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Ps(t){return t}var Ls=Array.prototype.slice;function Ds(t){return function(){return t}}var ks=Math.sqrt(50),Rs=Math.sqrt(10),Is=Math.sqrt(2);function Ns(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=Bs(t,e,n))||!isFinite(a))return[];if(a>0){let n=Math.round(t/a),r=Math.round(e/a);for(n*a<t&&++n,r*a>e&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)*a}else{a=-a;let n=Math.round(t*a),r=Math.round(e*a);for(n/a<t&&++n,r/a>e&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)/a}return r&&o.reverse(),o}function Bs(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>=ks?10:o>=Rs?5:o>=Is?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=ks?10:o>=Rs?5:o>=Is?2:1)}function Vs(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>=ks?i*=10:o>=Rs?i*=5:o>=Is&&(i*=2),e<t?-i:i}function Us(t){return Math.ceil(Math.log(function(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}(t))/Math.LN2)+1}function Gs(){var t=Ps,e=Ss,n=Us;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a=r.length,s=new Array(a);for(i=0;i<a;++i)s[i]=t(r[i],i,r);var u=e(s),l=u[0],c=u[1],h=n(s,l,c);if(!Array.isArray(h)){const t=c,n=+h;if(e===Ss&&([l,c]=function(t,e,n){let r;for(;;){const i=Bs(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(l,c,n)),(h=Ns(l,c,n))[h.length-1]>=c)if(t>=c&&e===Ss){const t=Bs(l,c,n);isFinite(t)&&(t>0?c=(Math.floor(c/t)+1)*t:t<0&&(c=(Math.ceil(c*-t)+1)/-t))}else h.pop()}for(var d=h.length;h[0]<=l;)h.shift(),--d;for(;h[d-1]>c;)h.pop(),--d;var f,p=new Array(d+1);for(i=0;i<=d;++i)(f=p[i]=[]).x0=i>0?h[i-1]:l,f.x1=i<d?h[i]:c;for(i=0;i<a;++i)null!=(o=s[i])&&l<=o&&o<=c&&p[Ts(h,o,0,d)].push(r[i]);return p}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:Ds(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:Ds([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Ds(Ls.call(t)):Ds(t),r):n},r}function Hs(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function zs(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function js(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Fs(t,e,n){if(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n))).length){if((e=+e)<=0||r<2)return zs(t);if(e>=1)return Hs(t);var r,i=(r-1)*e,o=Math.floor(i),a=Hs(function t(e,n,r=0,i=e.length-1,o=Os){for(;i>r;){if(i-r>600){const a=i-r+1,s=n-r+1,u=Math.log(a),l=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1);t(e,n,Math.max(r,Math.floor(n-s*l/a+c)),Math.min(i,Math.floor(n+(a-s)*l/a+c)),o)}const a=e[n];let s=r,u=i;for(js(e,r,n),o(e[i],a)>0&&js(e,r,i);s<u;){for(js(e,s,u),++s,--u;o(e[s],a)<0;)++s;for(;o(e[u],a)>0;)--u}0===o(e[r],a)?js(e,r,u):(++u,js(e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}return e}(t,o).subarray(0,o+1));return a+(zs(t.subarray(o+1))-a)*(i-o)}}function Ws(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}function qs(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Ys(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const Zs=Symbol("implicit");function Xs(){var t=new Ms,e=[],n=[],r=Zs;function i(i){let o=t.get(i);if(void 0===o){if(r!==Zs)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Ms;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Xs(e,n).unknown(r)},Ys.apply(i,arguments),i}function Ks(){var t,e,n=Xs().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,u=0,l=0,c=.5;function h(){var n=r().length,h=a<o,d=h?a:o,f=h?o:a;t=(f-d)/Math.max(1,n-u+2*l),s&&(t=Math.floor(t)),d+=(f-d-t*(n-u))*c,e=t*(1-u),s&&(d=Math.round(d),e=Math.round(e));var p=Ws(n).map((function(e){return d+t*e}));return i(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),h()):r()},n.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,h()):[o,a]},n.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,s=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,h()):s},n.padding=function(t){return arguments.length?(u=Math.min(1,l=+t),h()):u},n.paddingInner=function(t){return arguments.length?(u=Math.min(1,t),h()):u},n.paddingOuter=function(t){return arguments.length?(l=+t,h()):l},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),h()):c},n.copy=function(){return Ks(r(),[o,a]).round(s).paddingInner(u).paddingOuter(l).align(c)},Ys.apply(h(),arguments)}function Qs(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function $s(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Js(){}var tu="\\s*([+-]?\\d+)\\s*",eu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",nu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ru=/^#([0-9a-f]{3,8})$/,iu=new RegExp("^rgb\\("+[tu,tu,tu]+"\\)$"),ou=new RegExp("^rgb\\("+[nu,nu,nu]+"\\)$"),au=new RegExp("^rgba\\("+[tu,tu,tu,eu]+"\\)$"),su=new RegExp("^rgba\\("+[nu,nu,nu,eu]+"\\)$"),uu=new RegExp("^hsl\\("+[eu,nu,nu]+"\\)$"),lu=new RegExp("^hsla\\("+[eu,nu,nu,eu]+"\\)$"),cu={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 hu(){return this.rgb().formatHex()}function du(){return this.rgb().formatRgb()}function fu(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ru.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?pu(e):3===n?new yu(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?gu(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?gu(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=iu.exec(t))?new yu(e[1],e[2],e[3],1):(e=ou.exec(t))?new yu(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=au.exec(t))?gu(e[1],e[2],e[3],e[4]):(e=su.exec(t))?gu(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=uu.exec(t))?wu(e[1],e[2]/100,e[3]/100,1):(e=lu.exec(t))?wu(e[1],e[2]/100,e[3]/100,e[4]):cu.hasOwnProperty(t)?pu(cu[t]):"transparent"===t?new yu(NaN,NaN,NaN,0):null}function pu(t){return new yu(t>>16&255,t>>8&255,255&t,1)}function gu(t,e,n,r){return r<=0&&(t=e=n=NaN),new yu(t,e,n,r)}function vu(t){return t instanceof Js||(t=fu(t)),t?new yu((t=t.rgb()).r,t.g,t.b,t.opacity):new yu}function mu(t,e,n,r){return 1===arguments.length?vu(t):new yu(t,e,n,null==r?1:r)}function yu(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function bu(){return"#"+xu(this.r)+xu(this.g)+xu(this.b)}function _u(){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 xu(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function wu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Tu(t,e,n,r)}function Ou(t){if(t instanceof Tu)return new Tu(t.h,t.s,t.l,t.opacity);if(t instanceof Js||(t=fu(t)),!t)return new Tu;if(t instanceof Tu)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 Tu(a,s,u,t.opacity)}function Eu(t,e,n,r){return 1===arguments.length?Ou(t):new Tu(t,e,n,null==r?1:r)}function Tu(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Su(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}Qs(Js,fu,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:hu,formatHex:hu,formatHsl:function(){return Ou(this).formatHsl()},formatRgb:du,toString:du}),Qs(yu,mu,$s(Js,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new yu(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new yu(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:bu,formatHex:bu,formatRgb:_u,toString:_u})),Qs(Tu,Eu,$s(Js,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Tu(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Tu(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 yu(Su(t>=240?t-240:t+120,i,r),Su(t,i,r),Su(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 Mu=t=>()=>t;function Cu(t){return 1==(t=+t)?Au: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):Mu(isNaN(e)?n:e)}}function Au(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Mu(isNaN(t)?e:t)}var Pu=function t(e){var n=Cu(e);function r(t,e){var r=n((t=mu(t)).r,(e=mu(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=Au(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 Lu(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 Du(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]=Uu(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 ku(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Ru(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Iu(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]=Uu(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Nu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Bu=new RegExp(Nu.source,"g");function Vu(t,e){var n,r,i,o=Nu.lastIndex=Bu.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Nu.exec(t))&&(r=Bu.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:Ru(n,r)})),o=Bu.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 Uu(t,e){var n,r=typeof e;return null==e||"boolean"===r?Mu(e):("number"===r?Ru:"string"===r?(n=fu(e))?(e=n,Pu):Vu:e instanceof fu?Pu:e instanceof Date?ku:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Lu:Array.isArray(e)?Du:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Iu:Ru)(t,e)}function Gu(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Hu,zu=180/Math.PI,ju={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fu(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)*zu,skewX:Math.atan(u)*zu,scaleX:a,scaleY:s}}function Wu(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:Ru(t,i)},{i:u-2,x:Ru(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:Ru(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:Ru(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:Ru(t,n)},{i:s-2,x:Ru(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 qu=Wu((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?ju:Fu(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Yu=Wu((function(t){return null==t?ju:(Hu||(Hu=document.createElementNS("http://www.w3.org/2000/svg","g")),Hu.setAttribute("transform",t),(t=Hu.transform.baseVal.consolidate())?Fu((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):ju)}),", ",")",")");function Zu(t){return+t}var Xu=[0,1];function Ku(t){return t}function Qu(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function $u(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Qu(i,r),o=n(a,o)):(r=Qu(r,i),o=n(o,a)),function(t){return o(r(t))}}function Ju(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]=Qu(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Ts(t,e,1,r)-1;return o[n](i[n](e))}}function tl(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function el(){var t,e,n,r,i,o,a=Xu,s=Xu,u=Uu,l=Ku;function c(){var t,e,n,u=Math.min(a.length,s.length);return l!==Ku&&(t=a[0],e=a[u-1],t>e&&(n=t,t=e,e=n),l=function(n){return Math.max(t,Math.min(e,n))}),r=u>2?Ju:$u,i=o=null,h}function h(e){return null==e||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),Ru)))(n)))},h.domain=function(t){return arguments.length?(a=Array.from(t,Zu),c()):a.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),u=Gu,c()},h.clamp=function(t){return arguments.length?(l=!!t||Ku,c()):l!==Ku},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 nl(){return el()(Ku,Ku)}function rl(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 il(t){return(t=rl(Math.abs(t)))?t[1]:NaN}var ol,al=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function sl(t){if(!(e=al.exec(t)))throw new Error("invalid format: "+t);var e;return new ul({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 ul(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 ll(t,e){var n=rl(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")}sl.prototype=ul.prototype,ul.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 cl={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>ll(100*t,e),r:ll,s:function(t,e){var n=rl(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ol=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")+rl(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function hl(t){return t}var dl,fl,pl,gl=Array.prototype.map,vl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ml(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?hl:(e=gl.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?hl:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(gl.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=sl(t)).fill,n=t.align,h=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,v=t.precision,m=t.trim,y=t.type;"n"===y?(g=!0,y="g"):cl[y]||(void 0===v&&(v=12),m=!0,y="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var b="$"===d?i:"#"===d&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===d?o:/[%p]/.test(y)?u:"",x=cl[y],w=/[defgprs%]/.test(y);function O(t){var i,o,u,d=b,O=_;if("c"===y)O=x(t)+O,t="";else{var E=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:x(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)),E&&0==+t&&"+"!==h&&(E=!1),d=(E?"("===h?h:l:"-"===h||"("===h?"":h)+d,O=("s"===y?vl[8+ol/3]:"")+O+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){O=(46===u?a+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!f&&(t=r(t,1/0));var T=d.length+t.length+O.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&f&&(t=r(S+t,S.length?p-O.length:1/0),S=""),n){case"<":t=d+t+O+S;break;case"=":t=d+S+t+O;break;case"^":t=S.slice(0,T=S.length>>1)+d+t+O+S.slice(T);break;default:t=S+d+t+O}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)),O.toString=function(){return t+""},O}return{format:h,formatPrefix:function(t,e){var n=h(((t=sl(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(il(e)/3))),i=Math.pow(10,-r),o=vl[8+r/3];return function(t){return n(i*t)+o}}}}function yl(t,e,n,r){var i,o=Vs(t,e,n);switch((r=sl(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(il(e)/3)))-il(Math.abs(t)))}(o,a))||(r.precision=i),pl(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,il(e)-il(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,-il(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return fl(r)}function bl(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ns(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return yl(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),a=0,s=o.length-1,u=o[a],l=o[s],c=10;for(l<u&&(i=u,u=l,l=i,i=a,a=s,s=i);c-- >0;){if((i=Bs(u,l,n))===r)return o[a]=u,o[s]=l,e(o);if(i>0)u=Math.floor(u/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function _l(){var t=nl();return t.copy=function(){return tl(t,_l())},Ys.apply(t,arguments),bl(t)}function xl(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 wl(t){return Math.log(t)}function Ol(t){return Math.exp(t)}function El(t){return-Math.log(-t)}function Tl(t){return-Math.exp(-t)}function Sl(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ml(t){return function(e){return-t(-e)}}function Cl(t){var e,n,r=t(wl,Ol),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?Sl:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=Ml(e),n=Ml(n),t(El,Tl)):t(wl,Ol),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)&&(d=s,s=u,u=d);var l,c,h,d=e(s),f=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&f-d<p){if(d=Math.floor(d),f=Math.ceil(f),s>0){for(;d<=f;++d)for(c=1,l=n(d);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;d<=f;++d)for(c=o-1,l=n(d);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}2*g.length<p&&(g=Ns(s,u,p))}else g=Ns(d,f,Math.min(f-d,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===o?".0e":","),"function"!=typeof i&&(i=fl(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(xl(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}dl=ml({thousands:",",grouping:[3],currency:["$",""]}),fl=dl.format,pl=dl.formatPrefix;var Al=new Date,Pl=new Date;function Ll(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 Ll((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 Al.setTime(+e),Pl.setTime(+r),t(Al),t(Pl),Math.floor(n(Al,Pl))},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 Dl=Ll((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Dl.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Ll((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Dl:null};var kl=Ll((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()})),Rl=Ll((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()})),Il=Ll((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()})),Nl=Ll(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1);function Bl(t){return Ll((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 Vl=Bl(0),Ul=Bl(1),Gl=(Bl(2),Bl(3),Bl(4)),Hl=(Bl(5),Bl(6),Ll((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()}))),zl=Ll((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()}));zl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ll((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 jl=Ll((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 Fl(t){return Ll((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 Wl=Fl(0),ql=Fl(1),Yl=(Fl(2),Fl(3),Fl(4)),Zl=(Fl(5),Fl(6),Ll((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()})));Zl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Ll((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};const[Xl,Kl]=function(t,e,n,r,i,o){const a=[[kl,1,1e3],[kl,5,5e3],[kl,15,15e3],[kl,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 s(e,n,r){const i=Math.abs(n-e)/r,o=Es(([,,t])=>t).right(a,i);if(o===a.length)return t.every(Vs(e/31536e6,n/31536e6,r));if(0===o)return Dl.every(Math.max(Vs(e,n,r),1));const[s,u]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(u)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),o=i?i.range(t,+e+1):[];return r?o.reverse():o},s]}(zl,Hl,Vl,Nl,Il,Rl);function Ql(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 $l(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 Jl(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var tc,ec,nc={"-":"",_:" ",0:"0"},rc=/^\s*\d+/,ic=/^%/,oc=/[\\^$*+?|[\]().{}]/g;function ac(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 sc(t){return t.replace(oc,"\\$&")}function uc(t){return new RegExp("^(?:"+t.map(sc).join("|")+")","i")}function lc(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function cc(t,e,n){var r=rc.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function hc(t,e,n){var r=rc.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function dc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function fc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function pc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function gc(t,e,n){var r=rc.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function vc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mc(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 yc(t,e,n){var r=rc.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function bc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function _c(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function xc(t,e,n){var r=rc.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function wc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Oc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ec(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Tc(t,e,n){var r=rc.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Sc(t,e,n){var r=rc.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Mc(t,e,n){var r=ic.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Cc(t,e,n){var r=rc.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ac(t,e,n){var r=rc.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Pc(t,e){return ac(t.getDate(),e,2)}function Lc(t,e){return ac(t.getHours(),e,2)}function Dc(t,e){return ac(t.getHours()%12||12,e,2)}function kc(t,e){return ac(1+Nl.count(zl(t),t),e,3)}function Rc(t,e){return ac(t.getMilliseconds(),e,3)}function Ic(t,e){return Rc(t,e)+"000"}function Nc(t,e){return ac(t.getMonth()+1,e,2)}function Bc(t,e){return ac(t.getMinutes(),e,2)}function Vc(t,e){return ac(t.getSeconds(),e,2)}function Uc(t){var e=t.getDay();return 0===e?7:e}function Gc(t,e){return ac(Vl.count(zl(t)-1,t),e,2)}function Hc(t){var e=t.getDay();return e>=4||0===e?Gl(t):Gl.ceil(t)}function zc(t,e){return t=Hc(t),ac(Gl.count(zl(t),t)+(4===zl(t).getDay()),e,2)}function jc(t){return t.getDay()}function Fc(t,e){return ac(Ul.count(zl(t)-1,t),e,2)}function Wc(t,e){return ac(t.getFullYear()%100,e,2)}function qc(t,e){return ac((t=Hc(t)).getFullYear()%100,e,2)}function Yc(t,e){return ac(t.getFullYear()%1e4,e,4)}function Zc(t,e){var n=t.getDay();return ac((t=n>=4||0===n?Gl(t):Gl.ceil(t)).getFullYear()%1e4,e,4)}function Xc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ac(e/60|0,"0",2)+ac(e%60,"0",2)}function Kc(t,e){return ac(t.getUTCDate(),e,2)}function Qc(t,e){return ac(t.getUTCHours(),e,2)}function $c(t,e){return ac(t.getUTCHours()%12||12,e,2)}function Jc(t,e){return ac(1+jl.count(Zl(t),t),e,3)}function th(t,e){return ac(t.getUTCMilliseconds(),e,3)}function eh(t,e){return th(t,e)+"000"}function nh(t,e){return ac(t.getUTCMonth()+1,e,2)}function rh(t,e){return ac(t.getUTCMinutes(),e,2)}function ih(t,e){return ac(t.getUTCSeconds(),e,2)}function oh(t){var e=t.getUTCDay();return 0===e?7:e}function ah(t,e){return ac(Wl.count(Zl(t)-1,t),e,2)}function sh(t){var e=t.getUTCDay();return e>=4||0===e?Yl(t):Yl.ceil(t)}function uh(t,e){return t=sh(t),ac(Yl.count(Zl(t),t)+(4===Zl(t).getUTCDay()),e,2)}function lh(t){return t.getUTCDay()}function ch(t,e){return ac(ql.count(Zl(t)-1,t),e,2)}function hh(t,e){return ac(t.getUTCFullYear()%100,e,2)}function dh(t,e){return ac((t=sh(t)).getUTCFullYear()%100,e,2)}function fh(t,e){return ac(t.getUTCFullYear()%1e4,e,4)}function ph(t,e){var n=t.getUTCDay();return ac((t=n>=4||0===n?Yl(t):Yl.ceil(t)).getUTCFullYear()%1e4,e,4)}function gh(){return"+0000"}function vh(){return"%"}function mh(t){return+t}function yh(t){return Math.floor(+t/1e3)}function bh(t){return new Date(t)}function _h(t){return t instanceof Date?+t:+new Date(+t)}function xh(t,e,n,r,i,o,a,s,u,l){var c=nl(),h=c.invert,d=c.domain,f=l(".%L"),p=l(":%S"),g=l("%I:%M"),v=l("%I %p"),m=l("%a %d"),y=l("%b %d"),b=l("%B"),_=l("%Y");function x(t){return(u(t)<t?f:s(t)<t?p:a(t)<t?g:o(t)<t?v:r(t)<t?i(t)<t?m:y:n(t)<t?b:_)(t)}return c.invert=function(t){return new Date(h(t))},c.domain=function(t){return arguments.length?d(Array.from(t,_h)):d().map(bh)},c.ticks=function(e){var n=d();return t(n[0],n[n.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?x:l(e)},c.nice=function(t){var n=d();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?d(xl(n,t)):c},c.copy=function(){return tl(c,xh(t,e,n,r,i,o,a,s,u,l))},c}function wh(){return Ys.apply(xh(Xl,Kl,zl,Hl,Vl,Nl,Il,Rl,kl,ec).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}!function(t){tc=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=uc(i),c=lc(i),h=uc(o),d=lc(o),f=uc(a),p=lc(a),g=uc(s),v=lc(s),m=uc(u),y=lc(u),b={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:Pc,e:Pc,f:Ic,g:qc,G:Zc,H:Lc,I:Dc,j:kc,L:Rc,m:Nc,M:Bc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:mh,s:yh,S:Vc,u:Uc,U:Gc,V:zc,w:jc,W:Fc,x:null,X:null,y:Wc,Y:Yc,Z:Xc,"%":vh},_={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:Kc,e:Kc,f:eh,g:dh,G:ph,H:Qc,I:$c,j:Jc,L:th,m:nh,M:rh,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:mh,s:yh,S:ih,u:oh,U:ah,V:uh,w:lh,W:ch,x:null,X:null,y:hh,Y:fh,Z:gh,"%":vh},x={a:function(t,e,n){var r=f.exec(e.slice(n));return r?(t.w=p.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=d.get(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.get(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.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:_c,e:_c,f:Sc,g:vc,G:gc,H:wc,I:wc,j:xc,L:Tc,m:bc,M:Oc,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:yc,Q:Cc,s:Ac,S:Ec,u:hc,U:dc,V:fc,w:cc,W:pc,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:vc,Y:gc,Z:mc,"%":Mc};function w(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=nc[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 O(t,e){return function(n){var r,i,o=Jl(1900,void 0,1);if(E(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=$l(Jl(o.y,0,1))).getUTCDay(),r=i>4||0===i?ql.ceil(r):ql(r),r=jl.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Ql(Jl(o.y,0,1))).getDay(),r=i>4||0===i?Ul.ceil(r):Ul(r),r=Nl.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?$l(Jl(o.y,0,1)).getUTCDay():Ql(Jl(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,$l(o)):Ql(o)}}function E(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=x[i in nc?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=O(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}})}(t),ec=tc.format,tc.parse,tc.utcFormat,tc.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"]});const Oh=Math.PI,Eh=2*Oh,Th=Eh-1e-6;function Sh(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Mh(){return new Sh}function Ch(t){return function(){return t}}Sh.prototype=Mh.prototype={constructor:Sh,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 d=n-o,f=r-a,p=s*s+u*u,g=d*d+f*f,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((Oh-Math.acos((p+h-g)/(2*v*m)))/2),b=y/m,_=y/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*l)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*d>l*f)+","+(this._x1=t+_*s)+","+(this._y1=e+_*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%Eh+Eh),h>Th?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>=Oh)+","+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 Ah=Math.abs,Ph=Math.atan2,Lh=Math.cos,Dh=Math.max,kh=Math.min,Rh=Math.sin,Ih=Math.sqrt,Nh=Math.PI,Bh=Nh/2,Vh=2*Nh;function Uh(t){return t>1?0:t<-1?Nh:Math.acos(t)}function Gh(t){return t>=1?Bh:t<=-1?-Bh:Math.asin(t)}function Hh(t){return t.innerRadius}function zh(t){return t.outerRadius}function jh(t){return t.startAngle}function Fh(t){return t.endAngle}function Wh(t){return t&&t.padAngle}function qh(t,e,n,r,i,o,a,s){var u=n-t,l=r-e,c=a-i,h=s-o,d=h*u-c*l;if(!(d*d<1e-12))return[t+(d=(c*(e-o)-h*(t-i))/d)*u,e+d*l]}function Yh(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/Ih(s*s+u*u),c=l*u,h=-l*s,d=t+c,f=e+h,p=n+c,g=r+h,v=(d+p)/2,m=(f+g)/2,y=p-d,b=g-f,_=y*y+b*b,x=i-o,w=d*g-p*f,O=(b<0?-1:1)*Ih(Dh(0,x*x*_-w*w)),E=(w*b-y*O)/_,T=(-w*y-b*O)/_,S=(w*b+y*O)/_,M=(-w*y+b*O)/_,C=E-v,A=T-m,P=S-v,L=M-m;return C*C+A*A>P*P+L*L&&(E=S,T=M),{cx:E,cy:T,x01:-c,y01:-h,x11:E*(i/x-1),y11:T*(i/x-1)}}function Zh(){var t=Hh,e=zh,n=Ch(0),r=null,i=jh,o=Fh,a=Wh,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),d=i.apply(this,arguments)-Bh,f=o.apply(this,arguments)-Bh,p=Ah(f-d),g=f>d;if(s||(s=u=Mh()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>Vh-1e-12)s.moveTo(h*Lh(d),h*Rh(d)),s.arc(0,0,h,d,f,!g),c>1e-12&&(s.moveTo(c*Lh(f),c*Rh(f)),s.arc(0,0,c,f,d,g));else{var v,m,y=d,b=f,_=d,x=f,w=p,O=p,E=a.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):Ih(c*c+h*h)),S=kh(Ah(h-c)/2,+n.apply(this,arguments)),M=S,C=S;if(T>1e-12){var A=Gh(T/c*Rh(E)),P=Gh(T/h*Rh(E));(w-=2*A)>1e-12?(_+=A*=g?1:-1,x-=A):(w=0,_=x=(d+f)/2),(O-=2*P)>1e-12?(y+=P*=g?1:-1,b-=P):(O=0,y=b=(d+f)/2)}var L=h*Lh(y),D=h*Rh(y),k=c*Lh(x),R=c*Rh(x);if(S>1e-12){var I,N=h*Lh(b),B=h*Rh(b),V=c*Lh(_),U=c*Rh(_);if(p<Nh&&(I=qh(L,D,V,U,N,B,k,R))){var G=L-I[0],H=D-I[1],z=N-I[0],j=B-I[1],F=1/Rh(Uh((G*z+H*j)/(Ih(G*G+H*H)*Ih(z*z+j*j)))/2),W=Ih(I[0]*I[0]+I[1]*I[1]);M=kh(S,(c-W)/(F-1)),C=kh(S,(h-W)/(F+1))}}O>1e-12?C>1e-12?(v=Yh(V,U,L,D,h,C,g),m=Yh(N,B,k,R,h,C,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),C<S?s.arc(v.cx,v.cy,C,Ph(v.y01,v.x01),Ph(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,C,Ph(v.y01,v.x01),Ph(v.y11,v.x11),!g),s.arc(0,0,h,Ph(v.cy+v.y11,v.cx+v.x11),Ph(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,C,Ph(m.y11,m.x11),Ph(m.y01,m.x01),!g))):(s.moveTo(L,D),s.arc(0,0,h,y,b,!g)):s.moveTo(L,D),c>1e-12&&w>1e-12?M>1e-12?(v=Yh(k,R,N,B,c,-M,g),m=Yh(L,D,V,U,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,Ph(v.y01,v.x01),Ph(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,Ph(v.y01,v.x01),Ph(v.y11,v.x11),!g),s.arc(0,0,c,Ph(v.cy+v.y11,v.cx+v.x11),Ph(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,Ph(m.y11,m.x11),Ph(m.y01,m.x01),!g))):s.arc(0,0,c,x,_,g):s.lineTo(k,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-Nh/2;return[Lh(r)*n,Rh(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Ch(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Ch(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Ch(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ch(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ch(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ch(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Ch(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}var Xh=Array.prototype.slice;function Kh(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Qh(t){this._context=t}function $h(t){return new Qh(t)}function Jh(t){return t[0]}function td(t){return t[1]}function ed(t,e){var n=Ch(!0),r=null,i=$h,o=null;function a(a){var s,u,l,c=(a=Kh(a)).length,h=!1;for(null==r&&(o=i(l=Mh())),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 t="function"==typeof t?t:void 0===t?Jh:Ch(t),e="function"==typeof e?e:void 0===e?td:Ch(e),a.x=function(e){return arguments.length?(t="function"==typeof e?e:Ch(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Ch(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Ch(!!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}function nd(t,e,n){var r=null,i=Ch(!0),o=null,a=$h,s=null;function u(u){var l,c,h,d,f,p=(u=Kh(u)).length,g=!1,v=new Array(p),m=new Array(p);for(null==o&&(s=a(f=Mh())),l=0;l<=p;++l){if(!(l<p&&i(d=u[l],l,u))===g)if(g=!g)c=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=c;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[l]=+t(d,l,u),m[l]=+e(d,l,u),s.point(r?+r(d,l,u):v[l],n?+n(d,l,u):m[l]))}if(f)return s=null,f+""||null}function l(){return ed().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?Jh:Ch(+t),e="function"==typeof e?e:Ch(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?td:Ch(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:Ch(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Ch(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Ch(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:Ch(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:Ch(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Ch(+t),u):n},u.lineX0=u.lineY0=function(){return l().x(t).y(e)},u.lineY1=function(){return l().x(t).y(n)},u.lineX1=function(){return l().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:Ch(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u}function rd(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function id(t){return t}Qh.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 od=sd($h);function ad(t){this._curve=t}function sd(t){function e(e){return new ad(t(e))}return e._curve=t,e}function ud(){return t=ed().curve(od),e=t.curve,t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(sd(t)):e()._curve},t;var t,e}function ld(t){return t.source}function cd(t){return t.target}function hd(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function dd(){return function(t){var e=ld,n=cd,r=Jh,i=td,o=null;function a(){var a,s=Xh.call(arguments),u=e.apply(this,s),l=n.apply(this,s);if(o||(o=a=Mh()),t(o,+r.apply(this,(s[0]=u,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:Ch(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:Ch(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}(hd)}function fd(){}function pd(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 gd(t){this._context=t}function vd(t){return new gd(t)}function md(t){this._context=t}function yd(t){return new md(t)}function bd(t){this._context=t}function _d(t){return new bd(t)}function xd(t,e){this._basis=new gd(t),this._beta=e}ad.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},gd.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:pd(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:pd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},md.prototype={areaStart:fd,areaEnd:fd,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:pd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},bd.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:pd(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},xd.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 wd=function t(e){function n(t){return 1===e?new gd(t):new xd(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Od(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 Ed(t,e){this._context=t,this._k=(1-e)/6}Ed.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:Od(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:Od(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 Td=function t(e){function n(t){return new Ed(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Sd(t,e){this._context=t,this._k=(1-e)/6}Sd.prototype={areaStart:fd,areaEnd:fd,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:Od(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 Md=function t(e){function n(t){return new Sd(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Cd(t,e){this._context=t,this._k=(1-e)/6}Cd.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:Od(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 Ad=function t(e){function n(t){return new Cd(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Pd(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 Ld(t,e){this._context=t,this._alpha=e}Ld.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:Pd(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 Dd=function t(e){function n(t){return e?new Ld(t,e):new Ed(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function kd(t,e){this._context=t,this._alpha=e}kd.prototype={areaStart:fd,areaEnd:fd,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:Pd(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 Rd=function t(e){function n(t){return e?new kd(t,e):new Sd(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Id(t,e){this._context=t,this._alpha=e}Id.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:Pd(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 Nd=function t(e){function n(t){return e?new Id(t,e):new Cd(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Bd(t){this._context=t}function Vd(t){return new Bd(t)}function Ud(t){return t<0?-1:1}function Gd(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(Ud(o)+Ud(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Hd(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function zd(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 jd(t){this._context=t}function Fd(t){this._context=new Wd(t)}function Wd(t){this._context=t}function qd(t){return new jd(t)}function Yd(t){return new Fd(t)}function Zd(t){this._context=t}function Xd(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 Kd(t){return new Zd(t)}function Qd(t,e){this._context=t,this._t=e}function $d(t){return new Qd(t,.5)}function Jd(t){return new Qd(t,0)}function tf(t){return new Qd(t,1)}function ef(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 nf(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function rf(t,e){return t[e]}function of(t){const e=[];return e.key=t,e}function af(){var t=Ch([]),e=nf,n=ef,r=rf;function i(i){var o,a,s=Array.from(t.apply(this,arguments),of),u=s.length,l=-1;for(const t of i)for(o=0,++l;o<u;++o)(s[o][l]=[0,+r(t,s[o].key,l,i)]).data=t;for(o=0,a=Kh(e(s));o<u;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Ch(Array.from(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Ch(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?nf:"function"==typeof t?t:Ch(Array.from(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?ef:t,i):n},i}function sf(t,e){if((s=t.length)>0)for(var n,r,i,o,a,s,u=0,l=t[e[0]].length;u<l;++u)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][u])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}Bd.prototype={areaStart:fd,areaEnd:fd,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))}},jd.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:zd(this,this._t0,Hd(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,zd(this,Hd(this,n=Gd(this,t,e)),n);break;default:zd(this,this._t0,n=Gd(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Fd.prototype=Object.create(jd.prototype)).point=function(t,e){jd.prototype.point.call(this,e,t)},Wd.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)}},Zd.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=Xd(t),i=Xd(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)}},Qd.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 uf=function(){function t(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}return t.prototype.getAllDataFromDomain=function(t){if(!this.getData())return null;var e=this.getOptions(),n=this.getData(),r=this.getDataGroups(),i=Aa.getProperty(e,"data").groupMapsTo,o=Aa.getProperty(e,"axes");return t&&(n=n.filter((function(e){return t.includes(e.group)}))),o&&Object.keys(o).forEach((function(t){var e=o[t].mapsTo,r=o[t].scaleType;if(r!==V.LINEAR&&r!==V.LOG||(n=n.map((function(t){var n;return C(C({},t),((n={})[e]=null===t[e]?t[e]:Number(t[e]),n))}))),e&&o[t].domain)if(r===V.LABELS)n=n.filter((function(n){return o[t].domain.includes(n[e])}));else{var i=o[t].domain,a=i[0],s=i[1];n=n.filter((function(t){return!(e in t)||t[e]>=a&&t[e]<=s}))}})),n.filter((function(t){return r.find((function(e){return e.name===t[i]}))}))},t.prototype.getDisplayData=function(t){if(!this.get("data"))return null;var e=vt.items.status.ACTIVE,n=this.getDataGroups(t),r=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain(t).filter((function(t){return n.find((function(n){return n.name===t[r]&&n.status===e}))}))},t.prototype.getData=function(){return this.get("data")},t.prototype.isDataEmpty=function(){return!this.getData().length},t.prototype.setData=function(t){var e=this.sanitize(Aa.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(t){return Aa.getProperty(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter((function(e){return t.includes(e.name)})):this.get("dataGroups")},t.prototype.getActiveDataGroups=function(t){var e=vt.items.status.ACTIVE;return this.getDataGroups(t).filter((function(t){return t.status===e}))},t.prototype.getDataGroupNames=function(t){return this.getDataGroups(t).map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(t){return this.getActiveDataGroups(t).map((function(t){return t.name}))},t.prototype.aggregateBinDataByGroup=function(t){return Aa.groupBy(t,"group")},t.prototype.getBinConfigurations=function(){var t=this,e=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),o=n.axes[r],a=n.data.groupMapsTo,s=o.bins,u=void 0===s?gt.defaultBins:s,l=Array.isArray(u),c=Gs().value((function(t){return t[i]})).thresholds(u)(e);if(l)c[c.length-1].x1=u[u.length-1];else{var h=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+h}var d=l?[u[0],u[u.length-1]]:[c[0].x0,c[c.length-1].x1],f=Array.from(new Set(e.map((function(t){return t[a]})))),p=[];return c.forEach((function(e){var n=e.x0+"-"+e.x1,r=t.aggregateBinDataByGroup(e);f.forEach((function(t){p.push({group:t,key:n,value:r[t]||0,bin:e.x0})}))})),{bins:c,binsDomain:d}},t.prototype.getBinnedStackedData=function(){var t=this.getOptions().data.groupMapsTo,e=this.getActiveDataGroupNames(),n=this.getBinConfigurations().bins,r=this.getDataValuesGroupedByKeys({bins:n});return af().keys(e)(r).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.getGroupedData=function(t){var e=this.getDisplayData(t),n={},r=this.getOptions().data.groupMapsTo;return e.map((function(t){var e=t[r];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]})),Object.keys(n).map((function(t){return{name:t,data:n[t]}}))},t.prototype.getStackKeys=function(t){var e,n=this,r=t.bins,i=void 0===r?null:r,o=t.groups,a=void 0===o?null:o,s=this.getOptions(),u=this.getDisplayData(a);e=i?i.map((function(t){return t.x0+"-"+t.x1})):Aa.removeArrayDuplicates(u.map((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]})));var l=this.services.cartesianScales.domainAxisPosition,c=s.axes[l].scaleType;return c===V.TIME?e.sort((function(t,e){return new Date(t)-new Date(e)})):c!==V.LOG&&c!==V.LINEAR||e.sort((function(t,e){return t-e})),e},t.prototype.getDataValuesGroupedByKeys=function(t){var e=this,n=t.bins,r=void 0===n?null:n,i=t.groups,o=void 0===i?null:i,a=this.getOptions().data.groupMapsTo,s=this.getDisplayData(o),u=this.getDataGroupNames(),l=this.getStackKeys({bins:r,groups:o});return r?l.map((function(t){var e=t.split("-"),n=e[0],i=e[1],o={x0:n,x1:i},s=r.find((function(t){return t.x0.toString()===n.toString()}));return u.forEach((function(t){o[t]=s.filter((function(e){return e[a]===t})).length})),o})):l.map((function(t){var n={sharedStackKey:t};return u.forEach((function(r){var i=s.find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[a]===r&&n.hasOwnProperty(i)&&n[i].toString()===t})),o=e.services.cartesianScales.getRangeIdentifier(n);n[r]=i?i[o]:null})),n}))},t.prototype.getStackedData=function(t){var e=t.percentage,n=void 0!==e&&e,r=t.groups,i=void 0===r?null:r,o=t.divergent,a=void 0!==o&&o,s=this.getOptions().data.groupMapsTo,u=this.getDataGroupNames(i),l=this.getDataValuesGroupedByKeys({groups:i});if(n){var c=Aa.fromPairs(l.map((function(t){return[t.sharedStackKey,0]})));l.forEach((function(t){u.forEach((function(e){c[t.sharedStackKey]+=t[e]}))})),l.forEach((function(t){u.forEach((function(e){c[t.sharedStackKey]?t[e]=t[e]/c[t.sharedStackKey]*100:t[e]=0}))}))}return(a?af().offset(sf):af()).keys(u)(l).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(n){var r=t[n];return r[s]=u[e],r}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){this.state=Object.assign({},this.state,t);var n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){var e=this.getOptions();Aa.updateLegendAdditionalItems(e,t),this.set({options:Aa.merge(e,t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(it.Model.UPDATE,{animate:t}))},t.prototype.toggleDataLabel=function(t){var e=vt.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}));var u=i.filter((function(t){return t.status===n})),l=this.getOptions(),c=i.some((function(t){return t.status===r}));l.data.selectedGroups=c?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(it.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},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=Aa.getProperty(this.colorScale,t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=Aa.getProperty(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.isUserProvidedColorScaleValid=function(){var t=Aa.getProperty(this.getOptions(),"color","scale"),e=this.getDataGroups();return null!=t&&0!=Object.keys(t).length&&e.some((function(e){return Object.keys(t).includes(e.name)}))},t.prototype.getColorClassName=function(t){var e=this.colorClassNames(t.dataGroupName),n=t.originalClassName;return t.classNameTypes.forEach((function(r){return n=t.originalClassName?n+" "+r+"-"+e:r+"-"+e})),n},t.prototype.getStatus=function(){return null},t.prototype.getAllDataGroupsNames=function(){return this.allDataGroups},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/docs-tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){t.data.forEach((function(n,i){var o,a=Aa.getProperty(t,"label");if(null===a){var s=Aa.getProperty(r,i);o=s||"Ungrouped"}else o=a;var u={group:o,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return t=this.getTabularData(t)},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=vt.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=Aa.removeArrayDuplicates(t.map((function(t){return t[e]})));o.data.selectedGroups.length&&(o.data.selectedGroups.every((function(t){return a.includes(t)}))||(o.data.selectedGroups=[]));var s=function(t){return!o.data.selectedGroups.length||o.data.selectedGroups.includes(t)?r:i};return a.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setCustomColorScale=function(){var t=this;if(this.isUserProvidedColorScaleValid()){var e=this.getOptions(),n=Aa.getProperty(e,"color","scale");Object.keys(n).forEach((function(e){t.allDataGroups.includes(e)||console.warn('"'+e+'" does not exist in data groups.')})),this.allDataGroups.filter((function(t){return n[t]})).forEach((function(e){return t.colorScale[e]=n[e]}))}},t.prototype.setColorClassNames=function(){var t=Aa.getProperty(this.getOptions(),"color","pairing"),e=Aa.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=Aa.getProperty(t,"option"),r=e>5?14:e;n=n<=ft.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.colorClassNames=Xs().range(i).domain(this.allDataGroups)},t}(),lf=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}(),cf={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 ",selectorFocusable:"\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex], *[contenteditable=true]\n "},hf=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}()}(),df="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,ff="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),pf="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(ff):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},gf=["top","right","bottom","left","width","height","size","weight"],vf="undefined"!=typeof MutationObserver,mf=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(){pf(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)};mf.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},mf.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},mf.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},mf.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},mf.prototype.connect_=function(){df&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),vf?(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)},mf.prototype.disconnect_=function(){df&&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)},mf.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),gf.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},mf.getInstance=function(){return this.instance_||(this.instance_=new mf),this.instance_},mf.instance_=null;var yf=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},bf=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||ff},_f=Sf(0,0,0,0);function xf(t){return parseFloat(t)||0}function wf(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+xf(t["border-"+n+"-width"])}),0)}function Of(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return _f;var r=bf(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]=xf(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=xf(r.width),u=xf(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=wf(r,"left","right")+o),Math.round(u+a)!==n&&(u-=wf(r,"top","bottom")+a)),!function(t){return t===bf(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 Sf(i.left,i.top,s,u)}var Ef="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof bf(t).SVGGraphicsElement}:function(t){return t instanceof bf(t).SVGElement&&"function"==typeof t.getBBox};function Tf(t){return df?Ef(t)?function(t){var e=t.getBBox();return Sf(0,0,e.width,e.height)}(t):Of(t):_f}function Sf(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Mf=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Sf(0,0,0,0),this.target=t};Mf.prototype.isActive=function(){var t=Tf(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Mf.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Cf=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 yf(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);yf(this,{target:t,contentRect:n})},Af=function(t,e,n){if(this.activeObservations_=[],this.observations_=new hf,"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};Af.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 bf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Mf(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Af.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 bf(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))}},Af.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Af.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Af.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Cf(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Af.prototype.clearActive=function(){this.activeObservations_.splice(0)},Af.prototype.hasActive=function(){return this.activeObservations_.length>0};var Pf="undefined"!=typeof WeakMap?new WeakMap:new hf,Lf=function(t){if(!(this instanceof Lf))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=mf.getInstance(),n=new Af(t,e,this);Pf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Lf.prototype[t]=function(){return(e=Pf.get(this))[t].apply(e,arguments);var e}}));var Df=void 0!==ff.ResizeObserver?ff.ResizeObserver:Lf,kf=Na((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){s.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4!==r.readyState)return;if(200!==r.status)return void(n?e(n):o("cannot fetch resource: "+t+", status: "+r.status));var i=new FileReader;i.onloadend=function(){var t=i.result.split(/,/)[1];e(t)},i.readAsDataURL(r.response)},r.ontimeout=function(){n?e(n):o("timeout of 30000ms occured while fetching resource: "+t)},r.responseType="blob",r.timeout=3e4,r.open("GET",t,!0),r.send(),s.impl.options.imagePlaceholder){var i=s.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(n=i[1])}function o(t){console.error(t),e("")}}))},uid:function(){var t=0;return function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+t++}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,o){return function(){return!e(t)}()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return i(e,t,n,o)}))})),r}))},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),i=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function e(i){return i instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(n.asArray(i.childNodes).map((function(t){return e(t)})))})):Promise.resolve(i)},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:u,toPng:function(t,e){return l(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return l(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return l(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return l(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:i,images:o,util:n,inliner:r,options:{}}};function u(t,e){return function(t){void 0===t.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return function t(e,r,i){return i||!r||r(e)?Promise.resolve(e).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(t){return o(e,t,r)})).then((function(t){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(i).then(o).then(a).then((function(){return e})):e;function r(){var r,i;r=window.getComputedStyle(t),i=e.style,r.cssText?i.cssText=r.cssText:function(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}(r,i)}function i(){[":before",":after"].forEach((function(r){!function(r){var i=window.getComputedStyle(t,r),o=i.getPropertyValue("content");if(""===o||"none"===o)return;var a=n.uid();e.className=e.className+" "+a;var s=document.createElement("style");s.appendChild(function(t,e,r){var i="."+t+":"+e,o=r.cssText?function(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}(r):function(t){return n.asArray(t).map((function(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")})).join("; ")+";"}(r);return document.createTextNode(i+"{"+o+"}")}(a,r,i)),e.appendChild(s)}(r)}))}function o(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function a(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(e,t)})):Promise.resolve();function o(e,r,i){var o=e.childNodes;return 0===o.length?Promise.resolve(r):a(r,n.asArray(o),i).then((function(){return r}));function a(e,n,r){var i=Promise.resolve();return n.forEach((function(n){i=i.then((function(){return t(n,r)})).then((function(t){t&&e.appendChild(t)}))})),i}}}(t,e.filter,!0)})).then(c).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function l(t,e){return u(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var i=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var i=r.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function c(t){return i.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function h(t){return o.inlineAll(t).then((function(){return t}))}t.exports=s}()})),Rf=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.getHTMLElementSize=function(t){return{width:t.clientWidth,height:t.clientHeight}},e.getSVGElementSize=function(t,e){t.attr||(t=ka(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:Aa.getProperty(t.node(),"width","baseVal","value"),height:Aa.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=t.select(""+e);if(n.empty()){var r=e.split("#"),i=void 0,o=void 0;return 2===r.length?(i=r[0],o=(r=r[1].split("."))[0]):i=(r=e.split("."))[0],t.append(i).attr("id",o).attr("class",r.slice(1).join(" "))}return n},e.prototype.init=function(){this.styleHolderElement(),this.addMainContainer(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()},e.prototype.addMainContainer=function(){var t=this.model.getOptions(),e=Aa.getProperty(t,"style","prefix"),n=ka(this.getHolder()).append("div").classed(cf.prefix+"--"+e+"--chart-wrapper",!0).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();ka(this.getHolder()).classed(cf.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.exportToJPG=function(){var t=this,e=this.getHolder(),n=ka(e);n.classed("filled",!0),kf.toJpeg(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(e).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("bx--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.jpg"),n.classed("filled",!1)}))},e.prototype.exportToPNG=function(){var t=this,e=this.getHolder(),n=ka(e);n.classed("filled",!0),kf.toPng(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(e).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("bx--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.png"),n.classed("filled",!1)})).catch((function(t){console.error("oops, something went wrong!",t)}))},e.prototype.toggleFullscreen=function(){var t=this.getHolder();ka(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},e.prototype.handleFullscreenChange=function(){var t=this;document.addEventListener("fullscreenchange",(function(){var e=ka(t.getHolder()),n=e.classed("fullscreen");e.classed("fullscreen",!n)}))},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=ka(t.mainContainer).select("g.DONT_STYLE_ME_css_styles_verifier").node(),n=getComputedStyle(e);"hidden"===n.getPropertyValue("overflow")&&"0"===n.getPropertyValue("opacity")||console.error("Missing CSS styles for Carbon Charts. Please read the Carbon Charts getting started guide.")}))},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(ka(this.mainContainer),{useBBox:!0}).height,n=ka(this.mainContainer).attr("class"),r=ka(this.mainContainer).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(ka(t),{useBBox:!0}).height)})),i<=t?ka(this.mainContainer).attr("height",i):ka(this.mainContainer).attr("height","100%")}},e.prototype.getMainContainer=function(){return this.mainContainer},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&ka(e).on("mouseover",(function(){t.services.events.dispatchEvent(it.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(it.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=Aa.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(it.Chart.RESIZE))}),12.5);new Df(i).observe(e)}},e}(lf),If=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(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}(lf),Nf=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype.downloadCSV=function(t,e,n){var r=document.createElement("a");if("text/csv;encoding:utf-8",navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:"text/csv;encoding:utf-8"}),e);else if(URL&&"download"in r){var i=URL.createObjectURL(new Blob([t],{type:"text/csv;encoding:utf-8"}));r.href=i,r.setAttribute("download",e),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i)}else location.href="data:application/octet-stream,"+encodeURIComponent(t)},e.prototype.downloadImage=function(t,e){var n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e}(lf),Bf={value:()=>{}};function Vf(){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 Uf(r)}function Uf(t){this._=t}function Gf(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 Hf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function zf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Bf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Uf.prototype=Vf.prototype={constructor:Uf,on:function(t,e){var n,r=this._,i=Gf(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]=zf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=zf(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Hf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Uf(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 jf,Ff,Wf=0,qf=0,Yf=0,Zf=0,Xf=0,Kf=0,Qf="object"==typeof performance&&performance.now?performance:Date,$f="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Jf(){return Xf||($f(tp),Xf=Qf.now()+Kf)}function tp(){Xf=0}function ep(){this._call=this._time=this._next=null}function np(t,e,n){var r=new ep;return r.restart(t,e,n),r}function rp(){Xf=(Zf=Qf.now())+Kf,Wf=qf=0;try{!function(){Jf(),++Wf;for(var t,e=jf;e;)(t=Xf-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Wf}()}finally{Wf=0,function(){var t,e,n=jf,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:jf=e);Ff=t,op(r)}(),Xf=0}}function ip(){var t=Qf.now(),e=t-Zf;e>1e3&&(Kf-=e,Zf=t)}function op(t){Wf||(qf&&(qf=clearTimeout(qf)),t-Xf>24?(t<1/0&&(qf=setTimeout(rp,t-Qf.now()-Kf)),Yf&&(Yf=clearInterval(Yf))):(Yf||(Zf=Qf.now(),Yf=setInterval(ip,1e3)),Wf=1,$f(rp)))}function ap(t,e,n){var r=new ep;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}ep.prototype=np.prototype={constructor:ep,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Jf():+n)+(null==e?0:+e),this._next||Ff===this||(Ff?Ff._next=this:jf=this,Ff=this),this._call=t,this._time=n,op()},stop:function(){this._call&&(this._call=null,this._time=1/0,op())}};var sp=Vf("start","end","cancel","interrupt"),up=[];function lp(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,d;if(1!==n.state)return s();for(l in i)if((d=i[l]).name===n.name){if(3===d.state)return ap(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete i[l]):+l<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete i[l])}if(ap((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)(d=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=d);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=np((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:sp,tween:up,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function cp(t,e){var n=dp(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function hp(t,e){var n=dp(t,e);if(n.state>3)throw new Error("too late; already running");return n}function dp(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function fp(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}}function pp(t,e){var n,r;return function(){var i=hp(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 gp(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=hp(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 vp(t,e,n){var r=t._id;return t.each((function(){var t=hp(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return dp(t,r).value[e]}}function mp(t,e){var n;return("number"==typeof e?Ru:e instanceof fu?Pu:(n=fu(e))?(e=n,Pu):Vu)(t,e)}function yp(t){return function(){this.removeAttribute(t)}}function bp(t){return function(){this.removeAttributeNS(t.space,t.local)}}function _p(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 xp(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 wp(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 Op(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 Ep(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Tp(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Sp(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Tp(t,i)),n}return i._value=e,i}function Mp(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Ep(t,i)),n}return i._value=e,i}function Cp(t,e){return function(){cp(this,t).delay=+e.apply(this,arguments)}}function Ap(t,e){return e=+e,function(){cp(this,t).delay=e}}function Pp(t,e){return function(){hp(this,t).duration=+e.apply(this,arguments)}}function Lp(t,e){return e=+e,function(){hp(this,t).duration=e}}function Dp(t,e){if("function"!=typeof e)throw new Error;return function(){hp(this,t).ease=e}}function kp(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)?cp:hp;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Rp=Da.prototype.constructor;function Ip(t){return function(){this.style.removeProperty(t)}}function Np(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Bp(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Np(t,o,n)),r}return o._value=e,o}function Vp(t){return function(e){this.textContent=t.call(this,e)}}function Up(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Vp(r)),e}return r._value=t,r}var Gp=0;function Hp(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function zp(t){return Da().transition(t)}function jp(){return++Gp}var Fp=Da.prototype;Hp.prototype=zp.prototype={constructor:Hp,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=To(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),d=0;d<c;++d)(s=l[d])&&(u=t.call(s,s.__data__,d,l))&&("__data__"in s&&(u.__data__=s.__data__),h[d]=u,lp(h[d],e,n,d,h,dp(s,n)));return new Hp(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Co(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 d,f=t.call(u,u.__data__,h,l),p=dp(u,n),g=0,v=f.length;g<v;++g)(d=f[g])&&lp(d,e,n,g,f,p);o.push(f),a.push(u)}return new Hp(o,a,e,n)},selectChild:Fp.selectChild,selectChildren:Fp.selectChildren,filter:function(t){"function"!=typeof t&&(t=Ao(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 Hp(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,d=a[s]=new Array(h),f=0;f<h;++f)(u=l[f]||c[f])&&(d[f]=u);for(;s<r;++s)a[s]=e[s];return new Hp(a,this._parents,this._name,this._id)},selection:function(){return new Rp(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=jp(),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=dp(a,e);lp(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Hp(r,this._parents,t,n)},call:Fp.call,nodes:Fp.nodes,node:Fp.node,size:Fp.size,empty:Fp.empty,each:Fp.each,on:function(t,e){var n=this._id;return arguments.length<2?dp(this.node(),n).on.on(t):this.each(kp(n,t,e))},attr:function(t,e){var n=_o(t),r="transform"===n?Yu:mp;return this.attrTween(t,"function"==typeof e?(n.local?Op:wp)(n,r,vp(this,"attr."+t,e)):null==e?(n.local?bp:yp)(n):(n.local?xp:_p)(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=_o(t);return this.tween(n,(r.local?Sp:Mp)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?qu:mp;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Jo(this,t),a=(this.style.removeProperty(t),Jo(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Ip(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Jo(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Jo(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,vp(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=hp(this,t),l=u.on,c=null==u.value[a]?o||(o=Ip(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=Jo(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,Bp(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}}(vp(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,Up(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=dp(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?pp:gp)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Cp:Ap)(e,t)):dp(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Pp:Lp)(e,t)):dp(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Dp(e,t)):dp(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;hp(this,t).ease=n}}(this._id,t))},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=hp(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})),0===i&&o()}))},[Symbol.iterator]:Fp[Symbol.iterator]};var Wp={time:null,delay:0,duration:250,ease:st};function qp(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Da.prototype.interrupt=function(t){return this.each((function(){fp(this,t)}))},Da.prototype.transition=function(t){var e,n;t instanceof Hp?(e=t._id,t=t._name):(e=jp(),(n=Wp).time=Jf(),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])&&lp(a,t,e,l,s,n||qp(a,e));return new Hp(r,this._parents,t,e)};var Yp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return n(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener(it.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=zp(t).duration(Aa.getProperty(Ot,t,"duration")||Ot.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=zp(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.setupTransition=function(t){var e=this,n=t.transition,r=t.name,i=t.animate;return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),!0!==i?n.duration(0):n.duration(Aa.getProperty(Ot,r,"duration")||Ot.default.duration)},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(lf),Zp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.appendOrUpdateLinearGradient=function(t){var e=t.svg.select("defs linearGradient#"+t.id);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").remove(),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(function(t){return t.offset})).style("stop-color",(function(t){return t.color})).style("stop-opacity",(function(t){return t.opacity}))},e.getOffsetRatio=function(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"},e.getStops=function(t,n){var r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r},e}(lf);function Xp(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 Kp(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 Qp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t),r=Kp(e);return n.setDate(n.getDate()+r),n}function $p(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t).getTime(),r=Kp(e);return new Date(n+r)}function Jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return $p(t,36e5*n)}function tg(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function eg(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Xp(t);return e.setHours(0,0,0,0),e}function ng(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=eg(t),r=eg(e),i=n.getTime()-tg(n),o=r.getTime()-tg(r);return Math.round((i-o)/864e5)}function rg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return $p(t,6e4*n)}function ig(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Xp(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 og(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t),r=Kp(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=ig(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function ag(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return $p(t,1e3*n)}function sg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return og(t,12*n)}function ug(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t),r=Xp(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function lg(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Xp(t);return!isNaN(e)}function cg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t),r=Xp(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function hg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t),r=Xp(e);return n.getFullYear()-r.getFullYear()}function dg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t),r=Xp(e);return n.getTime()-r.getTime()}function fg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=dg(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function pg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=dg(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var gg={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 vg(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var mg={date:vg({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:vg({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:vg({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},yg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function bg(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 _g(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 xg,wg={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof gg[t]?gg[t]:1===e?gg[t].one:gg[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:mg,formatRelative:function(t,e,n,r){return yg[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:bg({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:bg({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:bg({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:bg({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:bg({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:(xg={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(xg.matchPattern);if(!i)return null;var o=i[0],a=n.match(xg.parsePattern);if(!a)return null;var s=xg.valueCallback?xg.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:_g({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:_g({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:_g({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:_g({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:_g({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 Og(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return $p(t,-n)}function Eg(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Tg=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Eg("yy"===e?r%100:r,e.length)},Sg=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Eg(n+1,2)},Mg=function(t,e){return Eg(t.getUTCDate(),e.length)},Cg=function(t,e){return Eg(t.getUTCHours()%12||12,e.length)},Ag=function(t,e){return Eg(t.getUTCHours(),e.length)},Pg=function(t,e){return Eg(t.getUTCMinutes(),e.length)},Lg=function(t,e){return Eg(t.getUTCSeconds(),e.length)},Dg=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Eg(Math.floor(r*Math.pow(10,n-3)),e.length)};function kg(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=Xp(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 Rg(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Xp(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=kg(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=kg(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Ig(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Rg(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=kg(n);return r}function Ng(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:Kp(i),a=null==n.weekStartsOn?o:Kp(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Xp(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 Bg(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Xp(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:Kp(a),u=null==i.firstWeekContainsDate?s:Kp(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=Ng(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var d=Ng(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=d.getTime()?r:r-1}function Vg(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:Kp(i),a=null==n.firstWeekContainsDate?o:Kp(n.firstWeekContainsDate),s=Bg(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=Ng(u,e);return l}var Ug="midnight",Gg="noon",Hg="morning",zg="afternoon",jg="evening",Fg="night",Wg={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 Tg(t,e)},Y:function(t,e,n,r){var i=Bg(t,r),o=i>0?i:1-i;return"YY"===e?Eg(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Eg(o,e.length)},R:function(t,e){return Eg(Rg(t),e.length)},u:function(t,e){return Eg(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 Eg(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 Eg(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 Sg(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 Eg(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=Xp(t),r=Ng(n,e).getTime()-Vg(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Eg(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=Xp(t),n=kg(e).getTime()-Ig(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Eg(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Mg(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=Xp(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"}):Eg(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 Eg(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 Eg(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 Eg(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?Gg:0===i?Ug: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?jg:i>=12?zg:i>=4?Hg:Fg,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 Cg(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Ag(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Eg(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Eg(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Pg(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Lg(t,e)},S:function(t,e){return Dg(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Yg(i);case"XXXX":case"XX":return Zg(i);case"XXXXX":case"XXX":default:return Zg(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Yg(i);case"xxxx":case"xx":return Zg(i);case"xxxxx":case"xxx":default:return Zg(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+qg(i,":");case"OOOO":default:return"GMT"+Zg(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+qg(i,":");case"zzzz":default:return"GMT"+Zg(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Eg(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Eg((r._originalDate||t).getTime(),e.length)}};function qg(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+Eg(o,2)}function Yg(t,e){return t%60==0?(t>0?"-":"+")+Eg(Math.abs(t)/60,2):Zg(t,e)}function Zg(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Eg(Math.floor(i/60),2)+n+Eg(i%60,2)}function Xg(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 Kg(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 Qg={p:Kg,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return Xg(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}}",Xg(i,e)).replace("{{time}}",Kg(o,e))}},$g=["D","DD"],Jg=["YY","YYYY"];function tv(t){return-1!==$g.indexOf(t)}function ev(t){return-1!==Jg.indexOf(t)}function nv(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 rv=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,iv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,ov=/^'([^]*?)'?$/,av=/''/g,sv=/[a-zA-Z]/;function uv(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||wg,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:Kp(a),u=null==i.firstWeekContainsDate?s:Kp(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:Kp(l),h=null==i.weekStartsOn?c:Kp(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 d=Xp(t);if(!lg(d))throw new RangeError("Invalid time value");var f=tg(d),p=Og(d,f),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:d},v=r.match(iv).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Qg[e])(t,o.formatLong,g):t})).join("").match(rv).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return lv(t);var n=Wg[e];if(n)return!i.useAdditionalWeekYearTokens&&ev(t)&&nv(t),!i.useAdditionalDayOfYearTokens&&tv(t)&&nv(t),n(p,t,o.localize,g);if(e.match(sv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function lv(t){return t.match(ov)[1].replace(av,"'")}function cv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return Qp(t,-n)}function hv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return Jp(t,-n)}function dv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return rg(t,-n)}function fv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return og(t,-n)}function pv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return ag(t,-n)}function gv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kp(e);return sg(t,-n)}var vv=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 n(e,t),e.prototype.getDomainAxisPosition=function(t){var e,n=(void 0===t?{}:t).datum,r=void 0===n?null:n;if(this.dualAxes&&r){var i=this.model.getOptions(),o=i.data.groupMapsTo,a=Aa.getProperty(i,"axes",this.secondaryDomainAxisPosition),s=r[o];if((null===(e=a)||void 0===e?void 0:e.correspondingDatasets)&&a.correspondingDatasets.includes(s))return this.secondaryDomainAxisPosition}return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(t){var e,n=void 0===t?{}:t,r=n.datum,i=void 0===r?null:r,o=n.groups,a=void 0===o?null:o;if(this.dualAxes){var s=this.model.getOptions(),u=s.data.groupMapsTo,l=Aa.getProperty(s,"axes",this.secondaryRangeAxisPosition),c=void 0;if(null!==i?c=i[u]:a&&a.length>0&&(c=a[0]),(null===(e=l)||void 0===e?void 0:e.correspondingDatasets)&&l.correspondingDatasets.includes(c))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return Aa.getProperty(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.getScaleLabel=function(t){var e=this.getAxisOptions(t).title;return e||(t===R.BOTTOM||t===R.TOP?"x-value":"y-value")},e.prototype.getDomainLabel=function(){return this.getScaleLabel(this.getDomainAxisPosition())},e.prototype.getRangeLabel=function(){return this.getScaleLabel(this.getRangeAxisPosition())},e.prototype.update=function(t){var e=this;this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(R).map((function(t){return R[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==R.LEFT&&this.rangeAxisPosition!==R.RIGHT||this.domainAxisPosition!==R.BOTTOM&&this.domainAxisPosition!==R.TOP?this.orientation=B.HORIZONTAL:this.orientation=B.VERTICAL},e.prototype.isDualAxes=function(){return this.dualAxes},e.prototype.determineAxisDuality=function(){var t,e,n,r,i=this.model.getOptions(),o=Aa.getProperty(i,"axes");((null===(t=o[R.LEFT])||void 0===t?void 0:t.correspondingDatasets)&&o[R.RIGHT]||(null===(e=o[R.RIGHT])||void 0===e?void 0:e.correspondingDatasets)&&o[R.LEFT]||(null===(n=o[R.TOP])||void 0===n?void 0:n.correspondingDatasets)&&o[R.BOTTOM]||(null===(r=o[R.BOTTOM])||void 0===r?void 0:r.correspondingDatasets)&&o[R.TOP])&&(this.dualAxes=!0)},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.getDomainAxisScaleType=function(){var t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getRangeAxisScaleType=function(){var t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(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=[R.BOTTOM,R.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[R.LEFT,R.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,r,i){var o,a=this.model.getOptions(),s=Aa.getProperty(a,"axes")[n].mapsTo,u=null!==Aa.getProperty(r,s)?r[s]:r;switch(e){case V.LABELS:o=t(u)+t.step()/2;break;case V.TIME:o=t(new Date(u));break;default:o=t(u)}return o},e.prototype.getBoundedScaledValues=function(t,e){var n=this.model.getOptions().bounds,r=this.scales[this.rangeAxisPosition],i=this.model.getOptions(),o=Aa.getProperty(i,"axes")[this.rangeAxisPosition].mapsTo,a=void 0!==t[o]?t[o]:t;return[r(null!==Aa.getProperty(t,n.upperBoundMapsTo)?t[n.upperBoundMapsTo]:a),r(null!==Aa.getProperty(t,n.lowerBoundMapsTo)?t[n.lowerBoundMapsTo]:a)]},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){var n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getRangeValue=function(t,e){var n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(t){var e=this.model.getOptions();return Aa.getProperty(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")},e.prototype.getRangeIdentifier=function(t){var e=this.model.getOptions();return Aa.getProperty(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions(),r=Aa.getProperty(n,"axes",t);return r.scaleType===V.TIME?function(t,e){var n=new Date(t[0]),r=new Date(t[1]);if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t),r=Xp(e),i=ug(n,r),o=Math.abs(hg(n,r));n.setFullYear(n.getFullYear()-i*o);var a=ug(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[gv(n,e),sg(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t),r=Xp(e),i=ug(n,r),o=Math.abs(cg(n,r));n.setMonth(n.getMonth()-i*o);var a=ug(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[fv(n,e),og(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Xp(t),r=Xp(e),i=ug(n,r),o=Math.abs(ng(n,r));n.setDate(n.getDate()-i*o);var a=ug(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[cv(n,e),Qp(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=dg(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[hv(n,e),Jp(r,e)];if(fg(r,n)>30)return[dv(n,30*e),rg(r,30*e)];if(fg(r,n)>1)return[dv(n,e),rg(r,e)];if(pg(r,n)>15)return[pv(n,15*e),ag(r,15*e)];if(pg(r,n)>1)return[pv(n,e),ag(r,e)];return[n,r]}(e,Aa.getProperty(n,"timeScale","addSpaceOnEdges")):function(t,e,n){var r=t[0],i=t[1],o=(i-r)*e,a=i<=0&&i+o>0?0:i+o,s=r>=0&&r-o<0?0:r-o;if(n===V.LOG&&s<=0){if(r<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=r}return[s,a]}(e,ct.paddingRatio,r.scaleType)},e.prototype.findVerticalAxesPositions=function(){var t=this.model.getOptions(),e=Aa.getProperty(t,"axes"),n=this.isDualAxes();return null===Aa.getProperty(e,R.LEFT)&&null!==Aa.getProperty(e,R.RIGHT)||!0===Aa.getProperty(e,R.RIGHT,"main")||n&&Aa.getProperty(e,R.LEFT,"correspondingDatasets")?{primary:R.RIGHT,secondary:R.LEFT}:{primary:R.LEFT,secondary:R.RIGHT}},e.prototype.findHorizontalAxesPositions=function(){var t=this.model.getOptions(),e=Aa.getProperty(t,"axes"),n=this.isDualAxes();return null===Aa.getProperty(e,R.BOTTOM)&&null!==Aa.getProperty(e,R.TOP)||!0===Aa.getProperty(e,R.TOP,"main")||n&&Aa.getProperty(e,R.BOTTOM,"correspondingDatasets")?{primary:R.TOP,secondary:R.BOTTOM}:{primary:R.BOTTOM,secondary:R.TOP}},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=Aa.getProperty(n,"axes",t.primary),i=Aa.getProperty(n,"axes",e.primary),o=r.scaleType||V.LINEAR,a=i.scaleType||V.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary,(a!==V.LABELS&&a!==V.TIME&&o===V.LABELS||o===V.TIME)&&(s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=Aa.getProperty(e,"axes",t),r=Aa.getProperty(e,"bounds"),i=n.includeZero,o=Aa.getProperty(n,"scaleType")||V.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned)return[0,Hs(a=this.model.getBinConfigurations().bins,(function(t){return t.length}))];if(n.limitDomainToBins){var a=this.model.getBinConfigurations().bins,s=this.model.getStackKeys({bins:a});return[s[0].split("-")[0],s[s.length-1].split("-")[1]]}var u,l,c=this.model.getDisplayData(),h=n.extendLinearDomainBy,d=n.mapsTo,f=n.percentage,p=n.thresholds,g=ct.ratio,v=g.reference,m=g.compareTo;if(n.domain)return o===V.LABELS?n.domain:(o===V.TIME&&(n.domain=n.domain.map((function(t){return void 0===t.getTime?new Date(t):t}))),this.extendsDomain(t,n.domain));if(f)return[0,100];if(n&&o===V.LABELS)return Aa.removeArrayDuplicates(c.map((function(t){return t[d]})));var y=this.model.getDataGroupNames();if(o===V.LABELS_RATIO)return c.map((function(t){return t[v]+"/"+t[m]}));if(o===V.TIME)l=c.map((function(t){return+new Date(t[d])}));else if(r&&e.axes)l=[],c.forEach((function(t){l.push(t[d]),t[r.upperBoundMapsTo]&&l.push(t[r.upperBoundMapsTo]),t[r.lowerBoundMapsTo]&&l.push(t[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&y&&t===this.getRangeAxisPosition()){var b=e.data.groupMapsTo,_=this.model.getDataValuesGroupedByKeys({groups:y}),x=c.filter((function(t){return!y.includes(t[b])})),w=[];_.forEach((function(t){t.sharedStackKey;var e=A(t,["sharedStackKey"]),n=0,r=0;Object.values(e).forEach((function(t){t<0?r+=t:n+=t})),w.push([r,n])})),l=P(Aa.flatten(w),x.map((function(t){return t[d]})))}else l=[],c.forEach((function(t){var e=t[d];Array.isArray(e)&&2===e.length?(l.push(e[0]),l.push(e[1])):(h&&l.push(Math.max(t[d],t[h])),l.push(e))}));return o!==V.TIME&&o!==V.LOG&&i&&l.push(0),p&&p.length>0&&p.forEach((function(t){var e=Aa.getProperty(t,"value");null!==e&&l.push(e)})),u=Ss(l),u=this.extendsDomain(t,u)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=Aa.getProperty(e,"axes",t);if(!n)return null;var r,i=Aa.getProperty(n,"scaleType")||V.LINEAR;return this.scaleTypes[t]=i,(r=i===V.TIME?wh():i===V.LOG?function t(){var e=Cl(el()).domain([1,10]);return e.copy=function(){return tl(e,t()).base(e.base())},Ys.apply(e,arguments),e}().base(n.base||10):i===V.LABELS||i===V.LABELS_RATIO?Ks():_l()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=Aa.getProperty(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!n)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==V.TIME||"string"!=typeof i.value&&void 0!==i.value.getTime||(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}},e.prototype.getHighestRangeThreshold=function(){var t=Aa.getProperty(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!t)return null;var e=this.getRangeScale(),n=t.sort((function(t,e){return e.value-t.value}))[0];return{threshold:n,scaleValue:e(n.value)}},e}(lf);var mv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:$h,curveLinearClosed:Vd,curveBasis:vd,curveBasisClosed:yd,curveBasisOpen:_d,curveBundle:wd,curveCardinal:Td,curveCardinalClosed:Md,curveCardinalOpen:Ad,curveCatmullRom:Dd,curveCatmullRomClosed:Rd,curveCatmullRomOpen:Nd,curveMonotoneX:qd,curveMonotoneY:Yd,curveNatural:Kd,curveStep:$d,curveStepAfter:tf,curveStepBefore:Jd},e}return n(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}(lf),yv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isZoomBarEnabled=function(){if(!this.services.cartesianScales)return!1;if(!Aa.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=Aa.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===R.BOTTOM&&e===V.TIME},e.prototype.getZoomBarData=function(){var t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()},e.prototype.getDefaultZoomBarDomain=function(t){var e=t||this.services.zoom.getZoomBarData(),n=this.services.cartesianScales,r=n.getMainXAxisPosition(),i=n.getDomainIdentifier();return n.extendsDomain(r,Ss(e,(function(t){return t[i]})))},e.prototype.handleDomainChange=function(t,e){void 0===e&&(e={dispatchEvent:!0}),this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&this.services.events.dispatchEvent(it.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return Aa.getProperty(this.model.getOptions(),"zoomBar","zoomRatio")},e.prototype.filterDataForRangeAxis=function(t,e){var n=this.model.get("zoomDomain"),r=Object.assign({stacked:!1},e),i=Aa.getProperty(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&i&&n){var o=r.stacked?"sharedStackKey":this.services.cartesianScales.getDomainIdentifier(),a=t.filter((function(t){return new Date(t[o])>=n[0]&&new Date(t[o])<=n[1]}));if(a.length>0)return a}return t},e.prototype.zoomIn=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=Et.handleWidth,r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());var i=r(e[0]),o=r(e[1]);if(!(o-i<n+1)){var a=r.range(),s=o-i,u=Math.min((a[1]-a[0])/2*(t/2),s/2),l=i+u,c=o-u;l>=c&&(l=i+s/2-n/2,c=o-s/2+n/2);var h=[r.invert(l),r.invert(c)];e[0].valueOf()===h[0].valueOf()&&e[1].valueOf()===h[1].valueOf()||this.handleDomainChange(h)}},e.prototype.zoomOut=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());var r=n(e[0]),i=n(e[1]),o=n.range(),a=(o[1]-o[0])/2*(t/2),s=Math.max(r-a,o[0]),u=Math.min(i+a,o[1]),l=[n.invert(s),n.invert(u)];e[0].valueOf()===l[0].valueOf()&&e[1].valueOf()===l[1].valueOf()||this.handleDomainChange(l)},e.prototype.resetZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();t[0].valueOf()===e[0].valueOf()&&t[1].valueOf()===e[1].valueOf()||this.handleDomainChange(e)},e.prototype.isMinZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<Aa.getProperty(this.model.getOptions(),"zoomBar","minZoomRatio")},e.prototype.isMaxZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())},e.prototype.isEmptyState=function(){return 0===this.getZoomBarData().length},e.prototype.isZoomBarLoading=function(t){return Aa.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return Aa.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(lf),bv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.zoomIn=function(t,e,n){var r,i,o,a=n||ht;t&&(r=t.x,i=t.y,o=2);var s=Rf.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0}),u=s.width,l=s.height;e.transition().duration(a.duration).ease(a.ease).attr("transform","translate("+u/2+", "+l/2+") scale("+o+") translate("+-r+","+-i+")"),this.services.events.dispatchEvent(it.CanvasZoom.CANVAS_ZOOM_IN,{element:ka(t)})},e.prototype.zoomOut=function(t,e){var n=e||ht;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(it.CanvasZoom.CANVAS_ZOOM_OUT)},e}(lf),_v=function(){function t(t,e,n){if(this.renderType=L.HTML,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){var r=Aa.getProperty(this.model.getOptions(),"style","prefix");this.id=r+"--"+this.configs.id}this.parent||this.setParent(ka(this.services.domUtils.getMainContainer()))}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=Aa.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(cf.prefix+"--"+n+"--"+this.type,!0).attr("id",this.id),e&&e.classed(cf.prefix+"--"+n+"--"+this.type,!1).attr("id",this.id)}},t.prototype.getParent=function(){return this.parent},t.prototype.getComponentContainer=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=Aa.getProperty(this.model.getOptions(),"style","prefix"),n=this.id?"#"+this.id:"",r=Rf.appendOrSelect(this.parent,(this.renderType===L.SVG?"svg":"div")+n+"."+cf.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var i=this.model.get("chartClipId");if(i){var o=ka("#"+i).select("rect");0!==o.size()&&parseFloat(o.attr("height"))>0&&r.attr("clip-path","url(#"+i+")")}}return r.attr("width","100%").attr("height","100%")}return this.parent},t.prototype.getOptions=function(){return this.configs.options?Aa.merge({},this.model.getOptions(),this.configs.options):this.model.getOptions()},t}(),xv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e.renderType=L.HTML,e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getOptions(),n=Aa.getProperty(e,"legend"),i=Aa.getProperty(n,"alignment"),o=Aa.getProperty(e,"legend","orientation"),a=this.model.getDataGroups(),s=vt.items.status.DISABLED,u=a.some((function(t){return t.status===s})),l=Aa.getProperty(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===G.CENTER).classed(o,!0).classed("has-deactivated-items",u).attr("role",r.GROUP).attr("data-name","legend-items");l&&(a=this.sortDataGroups(a,l));var h=c.selectAll("div.legend-item").data(a,(function(t){return t.name})),d=h.enter().append("div").attr("class","legend-item");d.merge(c.selectAll("div.legend-item")).classed("active",(function(t,e){return t.status===vt.items.status.ACTIVE}));var f=Aa.getProperty(this.getOptions(),"legend","clickable");c.classed("clickable",f&&a.length>1);var p=vt.checkbox.radius,g=d.append("div").classed("checkbox",!0);g.merge(h.select("div.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",f?0:-1).attr("aria-label",(function(t){return t.name})).attr("aria-checked",(function(t){return t.status===vt.items.status.ACTIVE})).attr("width",2*p).attr("height",2*p).attr("rx",1).attr("ry",1).attr("class",(function(e,n){return t.model.getColorClassName({classNameTypes:[k.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"})})).style("background",(function(e){return e.status===vt.items.status.ACTIVE?t.model.getFillColor(e.name)||t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===vt.items.status.ACTIVE}));g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("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");var v=d.append("p").merge(h.select("p"));this.truncateLegendText(v);var m=Aa.getProperty(e,"legend","additionalItems");if(m&&a.length){var y=this,b=c.selectAll("div.additional-item").data(m);b.exit().remove();var _,x=b.enter().append("div").merge(b).classed("legend-item",!0).classed("additional",!0);x.selectAll("*").remove();var w=1;x.append("svg").classed("icon",!0).each((function(t,e){var n=ka(this);_&&_==t.type?w++:(_=t.type,w=1),y.addAdditionalItem(n,t,w)}));var O=x.append("p").merge(x.select("p"));this.truncateLegendText(O)}h.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),f&&d.size()>1&&this.addEventListeners()},e.prototype.sortDataGroups=function(t,e){if(t.sort((function(t,n){return e.indexOf(t.name)-e.indexOf(n.name)})),e.length<t.length){var n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t},e.prototype.addAdditionalItem=function(t,e,n){var i=vt.area,o=i.width,a=i.height;if(e.type===rt.RADIUS?t.style("width",a+"px").style("height",a+"px"):t.style("width",o+"px").style("height",a+"px"),e.type===rt.RADIUS){var s=vt.radius,u=s.iconData,l=s.fill,c=s.stroke;t.attr("fill","none").selectAll("circle").data(u).enter().append("circle").classed("radius",!0).attr("role",r.IMG).attr("aria-label","radius").attr("cx",(function(t){return t.cx})).attr("cy",(function(t){return t.cy})).attr("r",(function(t){return t.r})).style("fill",e.fill?e.fill:l).style("stroke",e.stroke?e.stroke:c)}else if(e.type===rt.LINE){var h=vt.line;t.select("line.line").empty()&&t.append("line").classed("line-"+n,!0).attr("role",r.IMG).attr("aria-label","line").attr("x1",0).attr("y1",h.yPosition).attr("x2",o).attr("y2",h.yPosition).style("stroke",e.stroke?e.stroke:h.stroke).style("stroke-width",h.strokeWidth)}else if(e.type===rt.AREA)t.select("rect.area").empty()&&t.append("rect").classed("area-"+n,!0).attr("role",r.IMG).attr("aria-label","area").attr("width",o).attr("height",a).style("fill",n>3&&!e.fill?vt.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===rt.SIZE){var d=vt.size;u=d.iconData,l=d.fill,c=d.stroke;t.attr("fill","none").attr("role",r.IMG).attr("aria-label","size").selectAll("rect").data(u).enter().append("rect").classed("size",!0).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return 0})).style("fill",e.fill?e.fill:l).style("stroke",e.stroke?e.stroke:c).style("stroke-width",1)}else if(e.type===rt.QUARTILE){u=vt.quartile.iconData;t.selectAll("rect").attr("role",r.IMG).attr("aria-label","quartile").data(u).enter().append("rect").attr("class",(function(t,e){return"quartile-"+(0===e?"wrapper":"line")})).attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height}))}else if(e.type===rt.ZOOM){var f=Aa.getProperty(ws,"legend","zoom"),p=(u=f.iconData,f.color),g=t.attr("role",r.IMG).attr("aria-label","zoom").selectAll("g.icon").data(u).enter();g.append("g").attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",(function(t){return e.color?e.color:p})),g.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",(function(t){return e.color?e.color:p}))}},e.prototype.truncateLegendText=function(t){var e=Aa.getProperty(this.getOptions(),"legend","truncation"),n=Aa.getProperty(e,"type"),r=Aa.getProperty(e,"threshold"),i=Aa.getProperty(e,"numCharacter");n!==N.NONE?t.html((function(t){return t.name.length>r?Aa.truncateLabel(t.name,n,i):t.name})):t.html((function(t){return t.name}))},e.prototype.addEventListeners=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=Aa.getProperty(n,"legend"),i=Aa.getProperty(r,"truncation","threshold");e.selectAll("div.legend-item").on("mouseover",(function(e){t.services.events.dispatchEvent(it.Legend.ITEM_HOVER,{hoveredElement:ka(this)});var n=ka(this);n.select("div.checkbox").classed("hovered",!0);var r=n.datum();r.name.length>i&&t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})})).on("mousemove",(function(e){t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(){t.services.events.dispatchEvent(it.Legend.ITEM_CLICK,{clickedElement:ka(this)});var e=ka(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=ka(this);e.select("div.checkbox").classed("hovered",!1),t.services.events.dispatchEvent(it.Tooltip.HIDE),t.services.events.dispatchEvent(it.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e,n){!e.key||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t.model.toggleDataLabel(n.name))})),e.selectAll("g.additional-item").on("mouseover",(function(e){var n=ka(this),r=n.datum();r.name.length>i&&t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})}))},e}(_v);function wv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ov(t){return function(t){if(Array.isArray(t))return Ev(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Ev(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ev(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ev(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Tv(t){return t.reduce((function(t,e){return Array.isArray(e)?t.push.apply(t,Ov(Tv(e))):t.push(e),t}),[])}function Sv(t){return(Sv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Av(t,e){return(Av=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Pv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=kv(t);if(e){var i=kv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Lv(this,n)}}function Lv(t,e){return!e||"object"!==Sv(e)&&"function"!=typeof e?Dv(t):e}function Dv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function kv(t){return(kv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Rv(t){return(Rv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Iv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Nv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Bv(t,e,n){return(Bv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Hv(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function Vv(t,e){return(Vv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Uv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Hv(t);if(e){var i=Hv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Gv(this,n)}}function Gv(t,e){return!e||"object"!==Rv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Hv(t){return(Hv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function zv(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.addEventListener.apply(t,n),{release:function(){return t.removeEventListener.apply(t,n),null}}}function jv(t){return(jv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Fv(t){return function(t){if(Array.isArray(t))return Wv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Wv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Wv(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Wv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function qv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Zv(t,e){return(Zv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Xv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Qv(t);if(e){var i=Qv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Kv(this,n)}}function Kv(t,e){return!e||"object"!==jv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Qv(t){return(Qv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function $v(t,e){var n=t.target,r=t.currentTarget;if("function"==typeof n.matches){if(n.matches(e))return n;if(n.matches("".concat(e," *"))){var i=n.closest(e);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function Jv(t){if(!t||"function"==typeof t)return{launchingElement:null,launchingEvent:null};var e=t.delegateTarget||t.currentTarget||t,n=t.currentTarget&&t;if(e&&!e.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:e,launchingEvent:n}}function tm(t){return(tm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function em(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function rm(t,e){return(rm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function im(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=am(t);if(e){var i=am(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return om(this,n)}}function om(t,e){return!e||"object"!==tm(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function am(t){return(am=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function sm(t){return(sm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function um(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function lm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function cm(t,e){return(cm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function hm(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=fm(t);if(e){var i=fm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return dm(this,n)}}function dm(t,e){return!e||"object"!==sm(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function fm(t){return(fm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function pm(t){return(pm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function gm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function vm(t,e){return(vm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function mm(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=bm(t);if(e){var i=bm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ym(this,n)}}function ym(t,e){return!e||"object"!==pm(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function bm(t){return(bm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var _m,xm,wm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&vm(t,e)}(o,t);var e,n,r,i=mm(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e))._handleFocusinListener=void 0,n._handleKeydownListener=void 0,n._handleFocusin=function(t){var e=n.element.querySelector(n.options.selectorModalContainer)||n.element;n.element.classList.contains(n.options.classVisible)&&!e.contains(t.target)&&n.options.selectorsFloatingMenus.every((function(e){return!$v(t,e)}))&&n.element.querySelector(cf.selectorTabbable).focus()},n._hookCloseActions(),n}return e=o,r=[{key:"options",get:function(){var t=cf.prefix;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(t,"--overflow-menu-options"),".".concat(t,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(t,"--modal-container"),classVisible:"is-visible",classBody:"".concat(t,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}],(n=[{key:"createdByLauncher",value:function(t){this.show(t)}},{key:"shouldStateBeChanged",value:function(t){return"shown"===t?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(t,e,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===t){var o="onfocusin"in this.element.ownerDocument.defaultView,a=o?"focusin":"focus";this._handleFocusinListener=this.manage(zv(this.element.ownerDocument,a,this._handleFocusin,!o))}"hidden"===t?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===t&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(zv(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===t&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(cf.selectorTabbable)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var t=this;this.manage(zv(this.element,"click",(function(e){var n=$v(e,t.options.selectorModalClose);n&&(e.delegateTarget=n),(n||e.target===t.element)&&t.hide(e)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(zv(this.element.ownerDocument.body,"keydown",(function(e){27===e.which&&t.shouldStateBeChanged("hidden")&&(e.stopPropagation(),t.hide(e))})))}}])&&gm(e.prototype,n),r&&gm(e,r),o.components=new WeakMap,o}(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Tv(e).reduce((function(t,e){return e(t)}),function(){return function t(){wv(this,t)}}())}((function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Av(t,e)}(o,t);var e,n,r,i=Pv(o);function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Mv(this,o),(e=i.call(this,t,n)).children=[],!t||t.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return e.element=t,e.options=Object.assign(Object.create(e.constructor.options),n),e.constructor.components.set(e.element,Dv(e)),e}return e=o,r=[{key:"create",value:function(t,e){return this.components.get(t)||new this(t,e)}}],(n=[{key:"release",value:function(){for(var t=this.children.pop();t;t=this.children.pop())t.release();return this.constructor.components.delete(this.element),null}}])&&Cv(e.prototype,n),r&&Cv(e,r),o}(t)}),(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&cm(t,e)}(o,t);var e,n,r,i=hm(o);function o(){return um(this,o),i.apply(this,arguments)}return e=o,r=[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!e||e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(e.nodeType!==Node.ELEMENT_NODE||!e.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return zv(e,i,(function(e){var i=$v(e,"[".concat(r.attribInitTarget,"]"));if(i){e.delegateTarget=i;var o=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(o.length>1)throw new Error("Target widget must be unique.");if(1===o.length){"A"===i.tagName&&e.preventDefault();var a=t.create(o[0],n);"function"==typeof a.createdByLauncher&&a.createdByLauncher(e)}}}))}));return{release:function(){for(var t=i.pop();t;t=i.pop())t.release()}}}return this.create(e,n),""}}],(n=null)&&lm(e.prototype,n),r&&lm(e,r),o.forLazyInit=!0,o}(t)}),[function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Zv(t,e)}(o,t);var e,n,r,i=Xv(o);function o(){return qv(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"_changeState",value:function(){throw new Error("_changeState() should be overriden to perform actual change in state.")}},{key:"changeState",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,o=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,a="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,o)){var s={group:o&&o.group,state:i},u=[s.group,i].filter(Boolean).join("-").split("-").map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""),l=new CustomEvent(this.options["eventBefore".concat(u)],{bubbles:!0,cancelable:!0,detail:o}),c=o&&o.delegatorNode||this.element,h=!c.dispatchEvent(l);if(h){if(a){var d=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));d.canceled=!0,a(d)}}else{var f=[i,o].filter(Boolean);this._changeState.apply(this,Fv(f).concat([function(){c.dispatchEvent(new CustomEvent(t.options["eventAfter".concat(u)],{bubbles:!0,cancelable:!0,detail:o})),a&&a()}]))}}else a&&a(null,!0)}}])&&Yv(e.prototype,n),r&&Yv(e,r),o}(t)},function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&rm(t,e)}(o,t);var e,n,r,i=im(o);function o(){return em(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"show",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("shown",Jv(t),e)}},{key:"hide",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("hidden",Jv(t),e)}}])&&nm(e.prototype,n),r&&nm(e,r),o}(t)}],(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Vv(t,e)}(o,t);var e,n,r,i=Uv(o);function o(){var t;Iv(this,o);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).handles=new Set,t}return e=o,(n=[{key:"manage",value:function(t){return this.handles.add(t),t}},{key:"unmanage",value:function(t){return this.handles.delete(t),t}},{key:"release",value:function(){var t=this;return this.handles.forEach((function(e){e.release(),t.handles.delete(e)})),Bv(Hv(o.prototype),"release",this).call(this)}}])&&Nv(e.prototype,n),r&&Nv(e,r),o}(t)}))),Om=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="modal",i.isEventListenerAdded=!1,i.handleShowModal=function(){i.modal.html(i.getModalHTML()),i.modal.select("div.bx--modal-footer button.bx--btn").on("click",(function(){return i.model.exportToCSV()})),wm.create(i.modal.node()).show()},i.handleHideModal=function(){},i.init(),i}return n(e,t),e.prototype.addEventListeners=function(){this.services.events.addEventListener(it.Modal.SHOW,this.handleShowModal),this.services.events.addEventListener(it.Modal.HIDE,this.handleHideModal)},e.prototype.removeEventListeners=function(){this.services.events.removeEventListener(it.Modal.SHOW,this.handleShowModal),this.services.events.removeEventListener(it.Modal.HIDE,this.handleHideModal)},e.prototype.getModalHTML=function(){var t=this.model.getOptions(),e=Aa.getProperty(t,"style","prefix"),n=this.model.getTabularDataArray();return'\n\t\t<div class="bx--modal-container">\n\t\t\t<div class="bx--modal-header">\n\t\t\t\t<p class="bx--modal-header__label bx--type-delta">Tabular representation</p>\n\t\t\t\t<p class="bx--modal-header__heading bx--type-beta">'+t.title+'</p>\n\t\t\t\t<button class="bx--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="bx--modal-close__icon">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class="bx--modal-content"><table class="bx--data-table bx--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t'+kn(n,0).map((function(t){return'<th scope="col">\n\t\t\t\t\t\t\t\t<div class="bx--table-header-label">'+t+"</div>\n\t\t\t\t\t\t\t</th>"})).join("")+"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>"+n.slice(1).map((function(t){return"\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t"+t.map((function(t){return"<td>"+t+"</td>"})).join("")+"\n\t\t\t\t\t\t\t</tr>"})).join("")+'\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class="bx--modal-footer">\n\t\t\t <div class="'+cf.prefix+"--"+e+'-modal-footer-spacer"></div>\n\t\t\t <button class="bx--btn bx--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>'},e.prototype.render=function(){var t=this.model.getOptions();if(!this.isEventListenerAdded){var e=ka(this.services.domUtils.getHolder()),n=Aa.getProperty(t,"style","prefix");this.modal=Rf.appendOrSelect(e,"div."+cf.prefix+"--"+n+"--modal"),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","bx--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-5ppouesvfhc-label").attr("aria-describedby","modal-5ppouesvfhc-heading").attr("tabindex",-1)}},e.prototype.destroy=function(){this.removeEventListeners(),this.isEventListenerAdded=!1},e}(_v);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(xm||(xm={}));var Em=((_m={})[xm.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)}},_m[xm.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)}},_m[xm.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)}},_m[xm.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)}},_m),Tm="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Sm=function(){function t(t){void 0===t&&(t={}),this.positions=Em,this.positions=Object.assign({},Em,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:Tm.innerHeight-Tm.scrollY,height:Tm.innerWidth-Tm.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}(),Mm=(new Sm,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function Cm(t,e,n,r,i){var o=0===e,a=2===Number(uv(new Date(t),"c")),s=1===Number(uv(new Date(t),"q")),u=0!==e?n[e-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||Dm(t)||km(t,u)||Rm(t);case"daily":return i?o||a||Rm(t):o||km(t,u)||Rm(t);case"monthly":return o||Rm(t);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(r+" is not a valid time interval.")}}function Am(t,e,n,r,i){var o=i.showDayName,a="daily"===r&&o?"weekly":r,s=new Date(t),u=Aa.getProperty(i,"timeIntervalFormats")[a],l=Aa.getProperty(u,"primary"),c=Aa.getProperty(u,"secondary");return uv(s,Cm(t,e,n,r,o)?l:c,{locale:i.localeObject})}function Pm(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Lm(t){return 1===t.length?"15seconds":function(t){var e=Mm.reduce((function(e,n,r){n[0];var i=n[1],o=Mm[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Mm[e][0]}(zs(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function Dm(t){var e=Pm(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function km(t,e){return Pm(t).M!==Pm(e).M}function Rm(t){var e=Pm(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 Im=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="threshold",r.renderType=L.SVG,r.positionService=new Sm,r}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=Aa.getProperty(this.getOptions(),"axes"),r=[];Object.keys(n).forEach((function(t){if(Object.values(R).includes(t)){var e=n[t];e.thresholds&&e.thresholds.length>0&&r.push({axisPosition:t,thresholds:e.thresholds})}}));var i=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(r,(function(t){return t.axisPosition}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").merge(i);o.attr("class",(function(t){return"axis-thresholds "+t.axisPosition}));var a=o.selectAll("g.threshold-group").data((function(t){return t.thresholds.map((function(e){return e.axisPosition=t.axisPosition,e}))}));a.exit().attr("opacity",0).remove();var s=a.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(a).attr("class","threshold-group");var u=this;o.each((function(e){var n=e.axisPosition,r=u.services.cartesianScales.getScaleByPosition(n),i=u.services.cartesianScales.getScaleTypeByPosition(n),o=u.services.cartesianScales.getMainXScale(),a=u.services.cartesianScales.getMainYScale(),s=i===V.LABELS,l=o.range(),c=l[0],h=l[1],d=a.range(),f=d[0],p=d[1],g=u.services.cartesianScales,v=g.getOrientation(),m=Aa.flipDomainAndRangeBasedOnOrientation((function(t){return g.getDomainValue(t)}),(function(t){return g.getRangeValue(t)}),v),y=m[0],b=m[1],_=ka(this);n===R.TOP||n===R.BOTTOM?(_.selectAll("line.threshold-line").transition().call((function(e){return u.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("y1",p).attr("y2",f).attr("x1",(function(t){var e=t.value;return y(e)+(s?r.step()/2:0)})).attr("x2",(function(t){var e=t.value;return y(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),_.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(function(t){var e=t.value;return-y(e)})).attr("width",Math.abs(f-p)).classed("rotate",!0)):(_.selectAll("line.threshold-line").transition().call((function(e){return u.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("x1",c).attr("x2",h).attr("y1",(function(t){var e=t.value;return b(e)+(s?r.step()/2:0)})).attr("y2",(function(t){var e=t.value;return b(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),_.selectAll("rect.threshold-hoverable-area").attr("x",c).attr("y",(function(t){var e=t.value;return b(e)})).attr("width",Math.abs(h-c)).classed("rotate",!1))})),this.services.events.addEventListener(it.Threshold.SHOW,(function(t){e.setThresholdLabelPosition(t.detail),e.label.classed("hidden",!1)})),this.services.events.addEventListener(it.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(t){var e=t.value,n=t.axisPosition,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===V.TIME){var i=[R.LEFT,R.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=Aa.getProperty(r,"timeScale"),l=Lm(s.ticks());return Am(e,0,s.ticks(),l,u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=ka(this.services.domUtils.getHolder()),e=Aa.getProperty(this.getOptions(),"style","prefix");this.label=Rf.appendOrSelect(t,"div."+cf.prefix+"--"+e+"--threshold--label").classed("hidden",!0)},e.prototype.setThresholdLabelPosition=function(t){var e=t.event,n=t.datum,r=this.services.domUtils.getHolder(),i=Ra(e,r),o=n.valueFormatter?n.valueFormatter(n.value):this.getFormattedValue(n);this.label.html((n.label||"Threshold")+": "+o).style("background-color",n.fillColor);var a=this.label.node(),s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},a,[xm.RIGHT,xm.LEFT,xm.TOP,xm.BOTTOM],(function(){return{width:r.offsetWidth,height:r.offsetHeight}})),u=this.positionService.findPositionAt({left:i[0],top:i[1]},a,s);this.positionService.setElement(a,u)},e.prototype.addEventListeners=function(){var t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(e){ka(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(it.Threshold.SHOW,{event:e,hoveredElement:ka(this),datum:ka(this).datum()})})).on("mouseout",(function(e){ka(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(it.Threshold.HIDE,{event:e,hoveredElement:ka(this),datum:ka(this).datum()})}))},e}(_v),Nm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e.renderType=L.HTML,e}return n(e,t),e.prototype.render=function(){var t=this.getComponentContainer(),e=Aa.getProperty(this.getOptions(),"title"),n=t.selectAll("p.title").data([e]);if(n.enter().append("p").classed("title",!0).merge(n).attr("x",0).attr("y","1em").html((function(t){return t})),n.node()&&n.node().offsetWidth<n.node().scrollWidth){var r=this;n.on("mouseover",(function(t){r.services.events.dispatchEvent(it.Tooltip.SHOW,{event:t,hoveredElement:n,content:n.text()})})).on("mousemove",(function(t){r.services.events.dispatchEvent(it.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){r.services.events.dispatchEvent(it.Tooltip.HIDE)}))}n.exit().remove()},e.prototype.truncateTitle=function(t,e){if(!(e<=0)){var n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");var r=Rf.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),o=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,o-1)).append("tspan").text("...");var a=this;t.on("mouseover",(function(e){a.services.events.dispatchEvent(it.Tooltip.SHOW,{event:e,hoveredElement:t,content:n})})).on("mousemove",(function(t){a.services.events.dispatchEvent(it.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){a.services.events.dispatchEvent(it.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return Rf.getSVGElementSize(this.parent.node(),{useAttr:!0}).width},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}(_v),Bm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e.renderType=L.SVG,e}return n(e,t),e.prototype.render=function(){var t=Aa.getProperty(this.model.getDisplayData(),0),e=this.getOptions(),n=this.getComponentContainer(),r=e.data.groupMapsTo;if(Aa.getProperty(e,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{var i=n.selectAll("text.meter-title").data([t[r]]);i.enter().append("text").classed("meter-title",!0).merge(i).attr("x",0).attr("y","1em").text((function(t){return t})),i.exit().remove(),this.appendPercentage(),this.displayStatus()}var o=this.getMaxTitleWidth(),a=Rf.appendOrSelect(n,"text.meter-title");o>0&&a.node().getComputedTextLength()>o&&this.truncateTitle(a,o)},e.prototype.displayBreakdownTitle=function(){var t,e=this.getComponentContainer(),n=this.getOptions(),r=this.model.getMaximumDomain(this.model.getDisplayData()),i=Aa.getProperty(n,"meter","proportional","total"),o=Aa.getProperty(n,"meter","proportional","unit")?Aa.getProperty(n,"meter","proportional","unit"):"";if(r===i)t=null;else{var a=null!==i?i-r:r,s=Aa.getProperty(n,"meter","proportional","breakdownFormatter");t=null!==s?s({datasetsTotal:r,total:i}):r+" "+o+" used ("+a+" "+o+" available)"}var u=e.selectAll("text.proportional-meter-title").data([t]);u.enter().append("text").classed("proportional-meter-title",!0).merge(u).attr("x",0).attr("y","1em").text((function(t){return t})),u.exit().remove();var l=this.getMaxTitleWidth(),c=Rf.appendOrSelect(e,"text.proportional-meter-title");l>0&&c.node().getComputedTextLength()>l&&this.truncateTitle(c,l)},e.prototype.displayTotal=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=Aa.getProperty(e,"meter","proportional","total"),r=n?Aa.getProperty(e,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),i=Aa.getProperty(e,"meter","proportional","unit")?Aa.getProperty(e,"meter","proportional","unit"):"",o=Aa.getProperty(e,"meter","proportional","totalFormatter"),a=null!==o?o(r):n+" "+i+" total",s=Rf.getSVGElementSize(this.services.domUtils.getMainContainer(),{useAttr:!0}),u=s.width?s.width:this.parent.node().getAttribute("width"),l=t.selectAll("text.proportional-meter-total").data([a]);l.enter().append("text").classed("proportional-meter-total",!0).merge(l).attr("x",u).attr("y","1em").attr("text-anchor","end").text((function(t){return t})),l.exit().remove()},e.prototype.displayStatus=function(){var t=this.getComponentContainer(),e=Rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=e.width?e.width:0,r=this.model.getStatus(),i=yt.status.indicatorSize/2,o=Rf.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),a=r?[r]:[],s=o.selectAll("circle.status").data(a);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var u=o.selectAll("path.innerFill").data(a);u.enter().append("path").merge(u).attr("d",this.getStatusIconPathString(r)).attr("transform","translate(-"+i+", 0)").attr("class","innerFill"),u.exit().remove(),s.exit().remove()},e.prototype.appendPercentage=function(){var t=Aa.getProperty(this.model.getDisplayData(),0,"value"),e=this.getComponentContainer(),n=Rf.appendOrSelect(e,"text.meter-title"),r=!0===Aa.getProperty(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),o=yt.statusBar.paddingRight;i.enter().append("text").classed("percent-value",!0).merge(i).text((function(t){return t+"%"})).attr("x",+n.attr("x")+n.node().getComputedTextLength()+o).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=Rf.appendOrSelect(this.parent,"tspan"),i=yt.statusBar.paddingRight,o=Math.ceil(r.node().getComputedTextLength());Rf.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+o+i)},e.prototype.getMaxTitleWidth=function(){var t=Rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),e=Aa.getProperty(this.getOptions(),"meter","proportional"),n=t.width?t.width:this.parent.node().getAttribute("width");if(null!==e){var r=Rf.appendOrSelect(this.parent,"text.proportional-meter-total").node();return n-Rf.getSVGElementSize(r,{useBBox:!0}).width-yt.total.paddingLeft}var i=Rf.appendOrSelect(this.parent,"text.percent-value"),o=yt.statusBar.paddingRight,a=i.node().getComputedTextLength(),s=Rf.appendOrSelect(this.parent,"g.status-indicator").node();return n-a-o-(Rf.getSVGElementSize(s,{useBBox:!0}).width+yt.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case $.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case $.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case $.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}},e}(Nm),Vm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.renderType=L.HTML,i.isEventListenerAdded=!1,i.positionService=new Sm,i.handleShowTooltip=function(t){var e=t.detail.data||t.detail.items,n=i.getTooltipHTML(t),r=Rf.appendOrSelect(i.tooltip,"div.content-box");if(Aa.getProperty(i.getOptions(),"tooltip","customHTML"))if(t.detail.content){var o='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";r.html(o)}else r.html(i.model.getOptions().tooltip.customHTML(e,n));else r.html(n);i.positionTooltip(t),i.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},i.handleHideTooltip=function(){i.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},i.init(),i}return n(e,t),e.prototype.addTooltipEventListener=function(){var t=this;this.services.events.addEventListener(it.Tooltip.MOVE,(function(e){!1===t.tooltip.classed("hidden")&&t.positionTooltip(e)})),this.services.events.addEventListener(it.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(it.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(it.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(it.Tooltip.MOVE,null),this.services.events.removeEventListener(it.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(it.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(it.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this,n=this.getOptions(),r=Aa.getProperty(n,"tooltip","truncation","type"),i=Aa.getProperty(n,"tooltip","truncation","threshold"),o=Aa.getProperty(n,"tooltip","truncation","numCharacter");return r!==N.NONE?t.map((function(t){var n=t.labelIcon?12:0;return t.value=t.value?e.valueFormatter(t.value,t.label):t.value,t.label&&t.label.length+n>i&&(t.label=Aa.truncateLabel(t.label,r,o)),t.value&&t.value.length>i&&(t.value=Aa.truncateLabel(t.value,r,o)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";else{var n=this.getItems(t);e="<ul class='multi-tooltip'>"+this.formatItems(n).map((function(t){return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.class?'<a class="tooltip-color '+t.class+'"></a>':"")+"\n\t\t\t\t\t\t\t\t"+(t.color?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t\t\t<p>'+(t.label||"")+"</p>\n\t\t\t\t\t\t\t\t"+(t.labelIcon?'<span class="label-icon"/>'+t.labelIcon+"</span>":"")+"\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t"+(void 0===t.value||null===t.value?"":'<p class="value"/>'+t.value+"</p>")+"\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>"})).join("")+"</ul>"}return e},e.prototype.valueFormatter=function(t,e){var n=this.getOptions(),r=Aa.getProperty(n,"tooltip","valueFormatter");return r?r(t,e):"function"==typeof t.getTime?uv(t,"MMM d, yyyy"):t.toLocaleString()},e.prototype.render=function(){var t=this.getOptions(),e=Aa.getProperty(t,"tooltip","enabled");if(e){var n=ka(this.services.domUtils.getHolder()),r=Aa.getProperty(t,"style","prefix");this.tooltip=Rf.appendOrSelect(n,"div."+cf.prefix+"--"+r+"--tooltip"),this.tooltip.style("max-width",null),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!e&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=this.getOptions(),o=Aa.getProperty(i,"zoomBar","top","enabled"),a=Aa.getProperty(t,"detail","mousePosition");if(a){var s=Aa.getProperty(i,"zoomBar","top","type"),u=Et.height[s];o&&(a[1]+=u+Et.spacerHeight)}else a=Ra(Aa.getProperty(t,"detail","event"),n);var l,c=n.offsetWidth,h=n.offsetHeight;l=a[0]/c>.9?xm.LEFT:a[0]/c<.1?xm.RIGHT:this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[xm.RIGHT,xm.LEFT,xm.TOP,xm.BOTTOM],(function(){return{width:c,height:h}}));var d=wt.horizontalOffset;l===xm.LEFT&&(d*=-1),e=this.positionService.findPositionAt({left:a[0]+d,top:a[1]},r,l),this.positionService.setElement(r,e)},e}(_v),Um=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getItems=function(t){var e=this;if(t.detail.items)return t.detail.items;var n=t.detail.data;if(!n.length||!n[0])return[];var r,i=this.getOptions(),o=this.services.cartesianScales,a=o.getDomainIdentifier(),s=i.data.groupMapsTo,u=o.getDomainLabel(),l=o.getRangeLabel(),c=n[0][a];if(1===n.length){var h=n[0],d=o.getRangeIdentifier(h),f=h[d];r=P([{label:u,value:c}],Array.isArray(f)&&2===f.length?[{label:"Start",value:f[0]},{label:"End",value:f[1]}]:[{label:l,value:h[d]}]),t.detail.additionalItems&&t.detail.additionalItems.forEach((function(t){return r.push({label:t.label,value:t.value})})),r.push({label:i.tooltip.groupLabel,value:h[s],color:this.model.getFillColor(h[s]),class:this.model.getColorClassName({classNameTypes:[k.TOOLTIP],dataGroupName:h[s]})})}else if(n.length>1){if(r=(r=[{label:u,value:c}]).concat(n.map((function(t){return{label:t[s],value:t[o.getRangeIdentifier(t)],color:e.model.getFillColor(t[s]),class:e.model.getColorClassName({classNameTypes:[k.TOOLTIP],dataGroupName:t[s]})}})).sort((function(t,e){return e.value-t.value}))),!o.isDualAxes()&&!0===Aa.getProperty(i,"tooltip","showTotal")){var p=o.getRangeIdentifier();r.push({label:kn(i,"tooltip.totalLabel")||"Total",value:n.reduce((function(t,e){return t+e[p]}),0),bold:!0})}}return r},e}(Vm),Gm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",i.renderType=L.SVG,i.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),i.init(),i}return n(e,t),e.prototype.init=function(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})},e.prototype.render=function(t){this.createClipPath()},e.prototype.createClipPath=function(){var t=this.parent,e=this.services.cartesianScales,n=e.getMainXScale(),r=e.getMainYScale(),i=n.range(),o=i[0],a=i[1],s=r.range(),u=s[0],l=s[1];this.chartClipPath=Rf.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=Rf.appendOrSelect(this.chartClipPath,"rect."+this.type);c.attr("x",o).attr("y",l).attr("width",a-o).attr("height",u-l),this.chartClipPath.merge(c).lower()},e}(_v),Hm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="canvas-chart-clip",e.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.createClipPath=function(){var t=this.parent,e=Rf.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;this.chartClipPath=Rf.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var i=Rf.appendOrSelect(this.chartClipPath,"rect."+this.type);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()},e}(Gm),zm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="highlight",r.renderType=L.SVG,r.positionService=new Sm,r.highlightStrokeWidth=1,r}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!1);var e=Aa.getProperty(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((function(t){if(Object.values(R).includes(t)){var r=e[t];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:t,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));var r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(function(t){return t.axisPosition}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").merge(r);i.attr("class",(function(t){return"axis-highlight "+t.axisPosition}));var o=i.selectAll("g.highlight-group").data((function(t){return t.highlight.map((function(e){return e.axisPosition=t.axisPosition,e.highlightStartMapsTo=t.highlightStartMapsTo,e.labelMapsTo=t.labelMapsTo,e.color=t.color,e.highlightEndMapsTo=t.highlightEndMapsTo,e}))}));o.exit().attr("opacity",0).remove();var a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");var s=this;i.each((function(e){var n=e.axisPosition,r=s.services.cartesianScales.getMainXScale(),i=s.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],u=o[1],l=i.range(),c=l[0],h=l[1],d=s.services.cartesianScales,f=d.getOrientation(),p=Aa.flipDomainAndRangeBasedOnOrientation((function(t){return d.getDomainValue(t)}),(function(t){return d.getRangeValue(t)}),f),g=p[0],v=p[1],m=ka(this);n===R.TOP||n===R.BOTTOM?m.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("y",Math.max(h+s.highlightStrokeWidth,0)).attr("height",Math.max(c-2*s.highlightStrokeWidth,0)).attr("x",(function(t){var e=t.highlightStartMapsTo,n=A(t,["highlightStartMapsTo"]);return g(n[e])})).attr("width",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=A(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(g(r[n])-g(r[e]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=A(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=A(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})):m.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("x",a).attr("width",Math.max(u-a,0)).attr("y",(function(t){var e=t.highlightEndMapsTo,n=A(t,["highlightEndMapsTo"]);return v(n[e])})).attr("height",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=A(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(v(r[e])-v(r[n]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=A(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=A(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null}))}))},e}(_v),jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e.renderType=L.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t.name!==n.datum().name?lt.opacity.unselected:lt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",lt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),r=[0,0],i=this.services.cartesianScales,o=i.getOrientation(),a=nd().curve(this.services.curves.getD3Curve()).defined((function(t,e){var n=t[i.getRangeIdentifier()];return null!=n})),s=this.model.getGroupedData(this.configs.groups),u=Aa.getProperty(this.getOptions(),"bounds"),l=u&&s&&1===s.length;!l&&u&&console.warn("Bounds can only be shown when having 1 single datagroup, you've supplied "+s.length);var c=function(t,e){return l?i.getBoundedScaledValues(t,e)[0]:i.getRangeValue(0)},h=function(t,e){return l?i.getBoundedScaledValues(t,e)[1]:i.getRangeValue(t,e)};o===B.VERTICAL?(r=this.services.cartesianScales.getMainYScale().domain(),a.x((function(t,e){return i.getDomainValue(t,e)})).y0((function(t,e){return c(t,e)})).y1((function(t,e){return h(t,e)}))):(r=this.services.cartesianScales.getMainXScale().domain(),a.x0((function(t,e){return c(t,e)})).x1((function(t,e){return h(t,e)})).y((function(t,e){return i.getDomainValue(t,e)})));var d=Aa.getProperty(this.getOptions(),"color","gradient","enabled"),f=s&&1===s.length&&d;s.length>1&&d&&console.error("Gradients can only be enabled when having 1 single dataset");var p=n.selectAll("path.area").data(s,(function(t){return t.name})),g=ka(this.services.domUtils.getMainContainer());if(p.exit().attr("opacity",0).remove(),s.length){if(f){var v=g.select("path."+this.model.getColorClassName({classNameTypes:[k.STROKE],dataGroupName:s[0].name})).node(),m=void 0;if(v)m=getComputedStyle(v,null).getPropertyValue("stroke");else{var y=Aa.getProperty(this.model.getOptions(),"color","scale");if(null!==y)m=y[Object.keys(y)[0]]}Zp.appendOrUpdateLinearGradient({svg:this.parent,id:s[0].name.replace(" ","")+"_"+this.gradient_id,x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:Zp.getStops(r,m)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));var b=this,_=p.enter().append("path");f?_.merge(p).style("fill",(function(t){return"url(#"+t.name.replace(" ","")+"_"+e.gradient_id+")"})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return a(e)})):(_.attr("opacity",0).merge(p).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL,k.STROKE],dataGroupName:t.name,originalClassName:"area"})})).style("fill",(function(t){return b.model.getFillColor(t.name)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",l?1:lt.opacity.selected).attr("d",(function(t){var e=t.data;return a(e)})),l&&_.attr("fill-opacity",lt.opacity.selected).style("stroke",(function(t){return b.model.getStrokeColor(t.name)})).style("stroke-dasharray","2, 2").attr("stroke-width","0.7px"))}},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(_v),Fm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.renderType=L.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return Aa.getProperty(t,0,r)!==n.datum().name?lt.opacity.unselected:lt.opacity.selected}))},e.handleLegendMouseOut=function(){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",lt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this,o=this.getOptions(),a=o.data.groupMapsTo,s=Object.keys(o.axes).some((function(t){return o.axes[t].percentage})),u=this.model.getStackedData({percentage:s,groups:this.configs.groups}),l=Aa.getProperty(u,0,0),c=this.services.cartesianScales.getDomainAxisPosition({firstDatum:l}),h=this.services.cartesianScales.getRangeAxisPosition({firstDatum:l}),d=this.services.cartesianScales.getScaleByPosition(h),f=n.selectAll("path.area").data(u,(function(t){return Aa.getProperty(t,0,a)}));this.areaGenerator=nd().x((function(t,n){return e.services.cartesianScales.getValueThroughAxisPosition(c,t.data.sharedStackKey,n)})).y0((function(t){return d(t[0])})).y1((function(t){return d(t[1])})).curve(this.services.curves.getD3Curve()),f.exit().attr("opacity",0).remove(),f.enter().append("path").attr("opacity",0).merge(f).data(u,(function(t){return Aa.getProperty(t,0,a)})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:Aa.getProperty(t,0,a),originalClassName:"area"})})).style("fill",(function(t){return i.model.getFillColor(Aa.getProperty(t,0,a))})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",lt.opacity.selected).attr("d",this.areaGenerator)},e}(_v),Wm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.getOptions();if(e.bars.width)return e.bars.width;var n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=Rf.getSVGElementSize(this.parent,{useAttrs:!0}).width;return r.step?Math.min(e.bars.maxWidth,r.step()/2):Math.min(e.bars.maxWidth,.25*i/n)},e.prototype.isOutsideZoomedDomain=function(t,e){if(this.model.getDisplayData().length<=1)return!1;var n=this.model.get("zoomDomain");if(void 0!==n){var r=this.services.cartesianScales.getDomainScale();return t<r(n[0])||e>r(n[1])}return!1},e}(_v),qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.renderType=L.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getOptions().data.groupMapsTo,i=this.getComponentContainer({withinChartClip:!0}),o=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),s=i.selectAll("path.bar").data(o,(function(t){return t[n]}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t[n],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r,i,o=e.services.cartesianScales.getRangeIdentifier(),s=e.getBarWidth(),u=t[o],l=e.services.cartesianScales.getDomainValue(t,n)-s/2,c=l+s;if(Array.isArray(u)&&2===u.length)r=e.services.cartesianScales.getRangeValue(u[0]),i=e.services.cartesianScales.getRangeValue(u[1],n);else{var h=e.services.cartesianScales.getRangeScale().domain()[0];r=e.services.cartesianScales.getRangeValue(Math.max(0,h)),i=e.services.cartesianScales.getRangeValue(t,n)}var d=Math.abs(i-r);if(0!==d&&d<2&&(i=u>0&&a===B.VERTICAL||u<0&&a===B.HORIZONTAL?r-2:r+2),!e.isOutsideZoomedDomain(l,c))return Aa.generateSVGPathString({x0:l,x1:c,y0:r,y1:i},a)})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=ka(this);r.classed("hovered",!0),r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(it.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(it.Bar.BAR_MOUSEMOVE,{event:e,element:ka(this),datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Bar.BAR_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(e,n){var r=ka(this);r.classed("hovered",!1),r.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(it.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wm),Ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.renderType=L.SVG,e.padding=5,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(this.configs.groups),i=this.getOptions().data.groupMapsTo;this.setGroupScale();var o=this.getComponentContainer({withinChartClip:!0}),a=Aa.removeArrayDuplicates(n.map((function(t){var n=e.services.cartesianScales.getDomainIdentifier(t);return t[n]&&"function"==typeof t[n].toString?t[n].toString():t[n]}))),s=o.selectAll("g.bars").data(a,(function(t){return t}));s.exit().attr("opacity",0).remove();var u=s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(s);u.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-group-update-enter",animate:t})})).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===B.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"}));var l=u.selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}),(function(t){return t[i]}));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t){var n=e.groupScale(t[i]),r=n,o=n+e.getBarWidth(),a=e.services.cartesianScales.getRangeAxisPosition({datum:t}),s=e.services.cartesianScales.getValueThroughAxisPosition(a,0),u=e.services.cartesianScales.getRangeValue(t);if(!e.isOutsideZoomedDomain(r,o))return Aa.generateSVGPathString({x0:r,x1:o,y0:s,y1:u},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=ka(this);r.classed("hovered",!0),r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(it.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.Bar.BAR_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Bar.BAR_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(e,n){var r=ka(this);r.classed("hovered",!1),r.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(it.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this;return this.model.getDisplayData(this.configs.groups).filter((function(n){return n[e.services.cartesianScales.getDomainIdentifier(n)]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getGroupedData(this.configs.groups);if(1===t.length)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t.length-1)},e.prototype.getBarWidth=function(){var t=this.getOptions(),e=Aa.getProperty(t,"bars","width"),n=Aa.getProperty(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;var r=this.model.getGroupedData(this.configs.groups).length,i=this.getTotalGroupPadding(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},e.prototype.setGroupScale=function(){var t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=Ks().domain(t).rangeRound([0,this.getGroupWidth()])},e}(Wm),Zm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.renderType=L.SVG,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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),s=this.model.getActiveDataGroupNames(),u=n.selectAll("g.bars").data(a,(function(t){return Aa.getProperty(t,0,o)}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars");var l=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t[o],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[o])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,o=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-o/2,u=a+o,l=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(a,u)){if(Math.abs(c-l)>0&&Math.abs(c-l)>i.bars.dividerSize){var h=t[0]<0&&t[1]<=0;h&&s.length>1?e.services.cartesianScales.getOrientation()===B.VERTICAL?c+=0===t[1]?2:1:c-=(t[1],1):h||(e.services.cartesianScales.getOrientation()===B.VERTICAL?c+=1:c-=1)}return Aa.generateSVGPathString({x0:a,x1:u,y0:l,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n,r){var i,o=ka(this);o.classed("hovered",!0),o.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")),e.services.events.dispatchEvent(it.Bar.BAR_MOUSEOVER,{event:n,element:o,datum:r});var a=e.model.getDisplayData(e.configs.groups).find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[e.services.cartesianScales.getRangeIdentifier(n)]===r.data[r.group]&&n[i].toString()===r.data.sharedStackKey&&n[t]===r.group}));if(void 0===a){var s=e.services.cartesianScales.getDomainIdentifier(),u=e.services.cartesianScales.getRangeIdentifier();(i={})[s]=r.data.sharedStackKey,i[u]=r.data[r.group],i[t]=r.group,a=i}e.services.events.dispatchEvent(it.Tooltip.SHOW,{event:n,hoveredElement:o,data:[a]})})).on("mousemove",(function(t,n){var r=ka(this);e.services.events.dispatchEvent(it.Bar.BAR_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(it.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(it.Bar.BAR_CLICK,{event:t,element:ka(this),datum:n})})).on("mouseout",(function(t,n){var r=ka(this);r.classed("hovered",!1),e.services.events.dispatchEvent(it.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wm),Xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="boxplot",e.renderType=L.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions().data.groupMapsTo,o=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),u=a.range(),l=u[0],c=u[1],h=s.range(),d=c-l,f=h[0]-h[1];if(0!==d){var p=this.services.cartesianScales,g=p.getOrientation(),v=g===B.VERTICAL,m=Aa.flipDomainAndRangeBasedOnOrientation((function(t,n){return e.services.cartesianScales.getDomainValue(t,n)}),(function(t,n){return e.services.cartesianScales.getRangeValue(t,n)}),g),y=m[0],b=m[1],_=Math.floor((v?d:f)/o.length),x=Math.min(_/2,16),w=this.model.getBoxplotData(),O=n.selectAll(".box-group").data(w);O.exit().remove();var E=O.enter().append("g").attr("class","box-group"),T=O.merge(E);E.append("path").merge(O.select("path.vertical-line.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[k.STROKE],originalClassName:"vertical-line start"})})).attr("stroke-width",pt.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalstartline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.quartiles.q_25);return Aa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.vertical-line.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[k.STROKE],originalClassName:"vertical-line end"})})).attr("stroke-width",pt.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalendline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.quartiles.q_75);return Aa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.box")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[k.FILL,k.STROKE],originalClassName:"box"})})).attr("fill-opacity",pt.box.opacity.default).attr("stroke-width",pt.strokeWidth.default).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","box").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-quartiles",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(Math[v?"max":"min"](t.quartiles.q_75,t.quartiles.q_25)),o=r+Math.abs(p.getRangeValue(t.quartiles.q_75)-p.getRangeValue(t.quartiles.q_25));return Aa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.max);return Aa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.whisker.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[k.STROKE],originalClassName:"whisker start"})})).attr("stroke-width",pt.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-startingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/4,n=e+x/2,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.min);return Aa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.median")).attr("fill","none").attr("class",(function(){return e.model.getColorClassName({classNameTypes:[k.STROKE],originalClassName:"median"})})).attr("stroke-width",2).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-median",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(t.quartiles.q_50),o=r;return Aa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.whisker.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[k.STROKE],originalClassName:"whisker end"})})).attr("stroke-width",pt.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-endingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/4,n=e+x/2,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.whiskers.max);return Aa.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)}));var S=T.selectAll("circle.outlier").data((function(t){return t.outliers.map((function(e){var n;return(n={min:t.whiskers.min,max:t.whiskers.max})[i]=t[i],n.value=e,n}))}));S.exit().remove();var M=S.enter().append("circle");S.merge(M).attr("r",pt.circle.radius).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[k.FILL,k.STROKE],originalClassName:"outlier"})})).attr("fill-opacity",pt.circle.opacity.default).attr("cx",y).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-circles",animate:t})})).attr("cy",b),this.addBoxEventListeners(),this.addCircleEventListeners()}},e.prototype.addBoxEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo;this.parent.selectAll("path.highlight-area").on("mouseover",(function(r,i){var o=ka(this);ka(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",pt.box.opacity.hovered),t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:e.tooltip.groupLabel,value:i[n],class:t.model.getColorClassName({classNameTypes:[k.TOOLTIP]})},{label:"Minimum",value:i.whiskers.min},{label:"Q1",value:i.quartiles.q_25},{label:"Median",value:i.quartiles.q_50},{label:"Q3",value:i.quartiles.q_75},{label:"Maximum",value:i.whiskers.max},{label:"IQR",value:i.quartiles.q_75-i.quartiles.q_25}]}),t.services.events.dispatchEvent(it.Boxplot.BOX_MOUSEOVER,{event:r,element:o,datum:i})})).on("mousemove",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.Boxplot.BOX_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Boxplot.BOX_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(e,n){var r=ka(this);ka(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",pt.box.opacity.default),t.services.events.dispatchEvent(it.Boxplot.BOX_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.addCircleEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",(function(i,o){var a=ka(this);a.classed("hovered",!0).attr("fill-opacity",pt.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel,value:o[n],class:t.model.getColorClassName({classNameTypes:[k.TOOLTIP]})},{label:"Outlier",value:o[r]}]}),t.services.events.dispatchEvent(it.Boxplot.OUTLIER_MOUSEOVER,{event:i,element:a,datum:o})})).on("mousemove",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.Boxplot.OUTLIER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Boxplot.OUTLIER_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(e,n){var r=ka(this);r.classed("hovered",!1).attr("fill-opacity",pt.circle.opacity.default),t.services.events.dispatchEvent(it.Boxplot.OUTLIER_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:r})}))},e}(_v),Km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.renderType=L.SVG,e.handleChartHolderOnHover=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-hover-scatter")).attr("opacity",1)},e.handleChartHolderOnMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-mouseout-scatter")).attr("opacity",0)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(it.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(it.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(t),n=this.model.get("zoomDomain");return void 0!==n?t.filter((function(t){return t[e].getTime()>=n[0].getTime()&&t[e].getTime()<=n[1].getTime()})):t},e.prototype.getScatterData=function(){var t,e=this,n=this.getOptions();if(this.configs.stacked){var r=Object.keys(n.axes).some((function(t){return n.axes[t].percentage}));t=this.model.getStackedData({groups:this.configs.groups,percentage:r})}else t=this.model.getDisplayData(this.configs.groups).filter((function(t){var n=e.services.cartesianScales.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}));return this.filterBasedOnZoomDomain(t)},e.prototype.render=function(t){if(Aa.getProperty(this.getOptions(),"points","enabled")||Aa.getProperty(this.getOptions(),"bubble","enabled")){var e=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales.getDomainIdentifier(),i=e.selectAll("circle.dot").data(this.getScatterData(),(function(t){return t[n]+"-"+t[r]}));i.exit().attr("opacity",0).remove();var o=i.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(i);this.styleCircles(o,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){var n=this;if(!this.configs.handleThresholds)return!1;var r=this.services.cartesianScales.getOrientation(),i=Aa.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=Aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)}),(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)}),r),u=s[0],l=s[1],c=u(t,e),h=l(t,e);return a&&o?h<=a.scaleValue&&c>=o.scaleValue:a?h<=a.scaleValue:o?c>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.points,a=o.filled,s=o.fillOpacity,u=this.services,l=u.cartesianScales,c=(u.transitions,i.data.groupMapsTo),h=Aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),d=h[0],f=h[1],p=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=l.getDomainIdentifier(t),r=n.model.getIsFilled(t[c],t[e],t,a)?[k.FILL,k.STROKE]:[k.STROKE];return n.model.getColorClassName({classNameTypes:r,dataGroupName:t[c],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){var e=l.getDomainIdentifier(t);return n.model.getIsFilled(t[c],t[e],t,a)})).classed("unfilled",(function(t){var e=l.getDomainIdentifier(t);return!n.model.getIsFilled(t[c],t[e],t,a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"scatter-update-enter",animate:e})})).attr("cx",d).attr("cy",f).attr("r",i.points.radius).style("fill",(function(t){var e=l.getDomainIdentifier(t);if(n.model.getIsFilled(t[c],t[e],t,a))return n.model.getFillColor(t[c],t[e],t)})).style("stroke",(function(t){var e=l.getDomainIdentifier(t);return n.model.getStrokeColor(t[c],t[e],t)})).attr("fill-opacity",a?s:1).attr("opacity",p?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[l.getRangeIdentifier(t)]})),this.addEventListeners()},e.prototype.getTooltipAdditionalItems=function(t){return null},e.prototype.addEventListeners=function(){var t=this,e=t.getOptions().data.groupMapsTo;this.parent.selectAll("circle").on("mouseover",(function(n,r){var i=ka(this);i.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:n[e],originalClassName:i.attr("class")})})).style("fill",(function(n){var r=t.services.cartesianScales.getDomainIdentifier(n);return t.model.getFillColor(n[e],n[r],n)})).classed("unfilled",!1),t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r],additionalItems:t.getTooltipAdditionalItems(r)}),t.services.events.dispatchEvent(it.Scatter.SCATTER_MOUSEOVER,{event:n,element:i,datum:r})})).on("mousemove",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.Scatter.SCATTER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Scatter.SCATTER_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(n,r){var i=ka(this);if(i.classed("hovered",!1),!t.configs.filled){var o=t.getOptions().points.filled,a=t.services.cartesianScales.getDomainIdentifier(r),s=t.model.getIsFilled(r[e],r[a],r,o);i.classed("unfilled",!s).style("fill",(function(n){return s||o?t.model.getFillColor(n[e],n[a],n):null}))}t.services.events.dispatchEvent(it.Scatter.SCATTER_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:i})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(it.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(it.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(_v),Qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e.renderType=L.SVG,e}return n(e,t),e.prototype.getRadiusScale=function(t){var e=this.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=Rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,s=a?Ss(i):[1,1];return _l().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales,l=Aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return u.getDomainValue(t,e)}),(function(t,e){return u.getRangeValue(t,e)}),u.getOrientation()),c=l[0],h=l[1];t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"bubble-update-enter",animate:e})})).attr("cx",c).attr("cy",h).attr("r",(function(t){return a(t[o]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[k.FILL,k.STROKE],dataGroupName:t[s],originalClassName:"dot"})})).style("fill",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getFillColor(t[s],t[e],t)})).style("stroke",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getStrokeColor(t[s],t[e],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)},e.prototype.getTooltipAdditionalItems=function(t){var e=Aa.getProperty(this.getOptions(),"bubble");return[{label:Aa.getProperty(e,"radiusLabel"),value:t[Aa.getProperty(e,"radiusMapsTo")]}]},e}(Km),$m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e.renderType=L.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e,n=this,i=this.getOptions().data.groupMapsTo,o=this.getComponentContainer({withinChartClip:!0}),a=this.model.getDisplayData(this.configs.groups),s=this.services.cartesianScales.getRangeScale(),u=this.services.cartesianScales.getRangeIdentifier(),l=s.range(),c=l[0],h=l[1],d=s.domain(),f=(d[0],d[1]);!function(){var e=[];a.forEach((function(t){t.ranges?t.ranges.forEach((function(n,r){null!=n&&n<f&&e.push({datum:t,value:n,order:r+1})})):e.push({datum:t,order:1})}));var r=Rf.appendOrSelect(o,"g.range-boxes").selectAll("path.range-box").data(e,(function(t){return t[i]+"-"+t.order}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"range-box order-"+t.order})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-range-box-update-enter",animate:t})})).attr("d",(function(t,e){var r,i,o,a;return 1===t.order?(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=h-2,a=c+1):(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=n.services.cartesianScales.getRangeValue(t.value,e),a=h),Aa.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),(e=Rf.appendOrSelect(o,"g.bars").selectAll("path.bar").data(a,(function(t){return t[i]}))).exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("bar",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-bar-update-enter",animate:t})})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return n.model.getFillColor(t[i])})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-4,i=r+8,o=n.services.cartesianScales.getRangeValue(0)+1,a=n.services.cartesianScales.getRangeValue(t,e);return Aa.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),function(){var e=Rf.appendOrSelect(o,"g.markers").selectAll("path.marker").data(a.filter((function(t){return null!==Aa.getProperty(t,"marker")})),(function(t){return t[i]}));e.exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("marker",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-marker-update-enter",animate:t})})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-12,i=r+24,o=n.services.cartesianScales.getRangeValue(t.marker,e),a=o;return Aa.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),function(){var e=[];a.filter((function(t){return null!==Aa.getProperty(t,"marker")})).forEach((function(t){var n=t.marker,r=t[u];e=e.concat([{datum:t,value:.25*n,barValue:r},{datum:t,value:.5*n,barValue:r},{datum:t,value:.75*n,barValue:r}])}));var r=Rf.appendOrSelect(o,"g.quartiles").selectAll("path.quartile").data(e,(function(t){return t[i]}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"quartile "+(t.value<=t.barValue?"over-bar":"")})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-quartile-update-enter",animate:t})})).attr("d",(function(t,e){var r=t.datum,i=t.value,o=4;r.ranges&&-1!==r.ranges.indexOf(i)&&(o=8);var a=n.services.cartesianScales.getDomainValue(r,e)-o/2,s=a+o,u=n.services.cartesianScales.getRangeValue(i,e),l=u;return Aa.generateSVGPathString({x0:a,x1:s,y0:u,y1:l},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),this.addEventListeners()},e.prototype.getMatchingRangeIndexForDatapoint=function(t){for(var e=t.ranges.length-1;e>0;e--){var n=t.ranges[e];if(t.value>=n)return e}return 0},e.prototype.addEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("path.bar").on("mouseover",(function(i,o){var a=ka(this);a.classed("hovered",!0),a.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(it.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:o});var s=Aa.getProperty(e,"bullet","performanceAreaTitles"),u=t.getMatchingRangeIndexForDatapoint(o);t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel||"Group",value:o[n],class:t.model.getColorClassName({classNameTypes:[k.TOOLTIP],dataGroupName:o[n]})},{label:"Value",value:o[r]},{label:"Target",value:o.marker},{label:"Percentage",value:Math.floor(o[r]/o.marker*100)+"%"},{label:"Performance",value:s[u]}]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(it.Bar.BAR_MOUSEMOVE,{event:e,element:ka(this),datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Bar.BAR_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(e,n){var r=ka(this);r.classed("hovered",!1),r.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(it.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(_v),Jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e.renderType=L.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),i=this.model.getOptions(),o=i.groupIdentifier,a=i.data.groupMapsTo,s=this.model.getBinnedStackedData(),u=this.services.cartesianScales.getMainXScale(),l=n.selectAll("g.bars").data(s,(function(t){return kn(t,"0."+a)}));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",r.GROUP);var c=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}));c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(o,(function(t,e){return e})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"histogram-bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t[a],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=kn(t,"data");if(r){var o=u(r.x1)-u(r.x0)-1,a=e.services.cartesianScales.getDomainValue(r.x0,n),s=a+o,l=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-l)>0&&Math.abs(c-l)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===B.VERTICAL?c+=1:c-=1),Aa.generateSVGPathString({x0:a,x1:s,y0:l,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions(),e=t.data.groupMapsTo,n=this;this.parent.selectAll("path.bar").on("mouseover",(function(r,i){var o=ka(this);o.classed("hovered",!0),o.transition(n.services.transitions.getTransition("graph_element_mouseover_fill_update"));var a=parseFloat(kn(i,"data.x0")),s=parseFloat(kn(i,"data.x1")),u=n.services.cartesianScales.getRangeAxisPosition(),l=n.services.cartesianScales.getScaleLabel(u);n.services.events.dispatchEvent(it.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:kn(t,"bins.rangeLabel")||"Range",value:a+" – "+s},{label:t.tooltip.groupLabel||"Group",value:i[e],class:n.model.getColorClassName({classNameTypes:[k.TOOLTIP],dataGroupName:i[e]})},{label:l,value:kn(i,"data."+i[e])}]})})).on("mousemove",(function(t,e){n.services.events.dispatchEvent(it.Tooltip.MOVE,{event:t})})).on("mouseout",(function(t,e){ka(this).classed("hovered",!1),n.services.events.dispatchEvent(it.Tooltip.HIDE)}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(_v),ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.renderType=L.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?mt.opacity.unselected:mt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",mt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this.services,o=i.cartesianScales,a=i.curves,s=Aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],l=s[1],c=this.getOptions(),h=ed().x(u).y(l).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier(t)];return null!=n})),d=[];if(this.configs.stacked){var f=Object.keys(c.axes).some((function(t){return c.axes[t].percentage})),p=c.data.groupMapsTo;d=this.model.getStackedData({groups:this.configs.groups,percentage:f}).map((function(t){var n=e.services.cartesianScales.getDomainIdentifier(t),r=e.services.cartesianScales.getRangeIdentifier(t);return{name:Aa.getProperty(t,0,p),data:t.map((function(t){var e;return(e={})[n]=t.data.sharedStackKey,e[p]=t[p],e[r]=t[1],e})),hidden:!Aa.some(t,(function(t){return t[0]!==t[1]}))}}))}else d=this.model.getGroupedData(this.configs.groups);var g=n.selectAll("path.line").data(d,(function(t){return t.name}));g.exit().attr("opacity",0).remove(),g.enter().append("path").classed("line",!0).attr("opacity",0).merge(g).data(d,(function(t){return t.name})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.STROKE],dataGroupName:t.name,originalClassName:"line"})})).style("stroke",(function(t){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.data.map((function(t){return t[e.services.cartesianScales.getRangeIdentifier(t)]})).join(",")})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"line-update-enter",animate:t})})).attr("opacity",(function(t){return t.hidden?0:1})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(_v),ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="lollipop",e.renderType=L.SVG,e.handleScatterOnHover=function(t){var n=t.detail,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").attr("stroke-width",(function(t){return t[r]!==n.datum[r]?mt.weight.unselected:mt.weight.selected}))},e.handleScatterOnMouseOut=function(t){e.parent.selectAll("line.line").attr("stroke-width",mt.weight.unselected)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t[r]!==n.datum().name?mt.opacity.unselected:mt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("line.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",mt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,o=this.services.cartesianScales,a=o.getMainXScale(),s=o.getMainYScale(),u=o.getDomainIdentifier(),l=o.getOrientation(),c=Aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),l),h=c[0],d=c[1],f=n.selectAll("line.line").data(this.getScatterData(),(function(t){return t[i]+"-"+t[u]}));f.exit().attr("opacity",0).remove();var p=f.enter().append("line").attr("opacity",0).merge(f).classed("line",!0).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.STROKE],dataGroupName:t[i],originalClassName:"line"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"lollipop-line-update-enter",animate:t})})).style("stroke",(function(t){return e.model.getFillColor(t[i],t[u],t)})).attr("opacity",1);l===B.HORIZONTAL?p.attr("y1",d).attr("y2",d).attr("x1",a.range()[0]).attr("x2",(function(t,e){return h(t,e)-r.points.radius})):p.attr("x1",h).attr("x2",h).attr("y1",s.range()[0]).attr("y2",(function(t,e){return d(t,e)+r.points.radius})),this.addScatterPointEventListeners()},e.prototype.addScatterPointEventListeners=function(){this.services.events.addEventListener(it.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(it.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(it.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(it.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e}(Km),ny=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e.renderType=L.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this;if(Aa.getProperty(this.getOptions(),"points","enabled")){var n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),s=this.model.getStackedData({groups:this.configs.groups,percentage:a}),u=n.selectAll("g.dots").data(s,(function(t){return Aa.getProperty(t,0,o)}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(u).selectAll("circle.dot").data((function(t){return t}));l.exit().attr("opacity",0).remove();var c=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).datum((function(t){var n,r=t[o],i=e.services.cartesianScales.getDomainIdentifier(t),a=e.services.cartesianScales.getRangeIdentifier(t);return(n={})[o]=r,n[i]=t.data.sharedStackKey,n[a]=t[1],n}));this.styleCircles(c,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.getOptions(),i=r.data.groupMapsTo,o=Object.keys(r.axes).some((function(t){return r.axes[t].percentage})),a=this.model.getStackedData({groups:this.configs.groups,percentage:o}),s=[];return a.forEach((function(r,a){r.forEach((function(r,u){var l,c=r[i],h=r.data.sharedStackKey,d=r.data[c],f=r[1],p=n.services.cartesianScales.getDomainIdentifier(r),g=n.services.cartesianScales.getRangeIdentifier(r);null!=d&&t===n.services.cartesianScales.getDomainValue(h)&&e===n.services.cartesianScales.getRangeValue(f)&&(o&&(d=n.model.getStackedData({groups:n.configs.groups})[a][u].data[c]),null!==d&&s.push(((l={})[i]=c,l[p]=h,l[g]=d,l)))}))})),this.model.getDisplayData(this.configs.groups).filter((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t),r=n.services.cartesianScales.getRangeIdentifier(t);return void 0!==s.find((function(n){return n[i]==t[i]&&n[e]==t[e]&&n[r]==t[r]}))}))},e}(Km);function ry(t,e){var n=this,r=Uu(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.renderType=L.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return bt.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getComponentContainer(),o=this.getOptions(),a=o.data.groupMapsTo,s=o.pie.valueMapsTo,u=this.model.getDisplayData().filter((function(t){return t[s]>0})),l=this.computeRadius();this.arc=Zh().innerRadius(this.getInnerRadius()).outerRadius(l),this.hoverArc=Zh().innerRadius(this.getInnerRadius()).outerRadius(l+bt.hoverArc.outerRadiusOffset);var c=function(){var t=id,e=rd,n=null,r=Ch(0),i=Ch(Vh),o=Ch(0);function a(a){var s,u,l,c,h,d=(a=Kh(a)).length,f=0,p=new Array(d),g=new Array(d),v=+r.apply(this,arguments),m=Math.min(Vh,Math.max(-Vh,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/d,o.apply(this,arguments)),b=y*(m<0?-1:1);for(s=0;s<d;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(f+=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=f?(m-d*b)/f:0;s<d;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+b,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:Ch(+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:Ch(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Ch(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Ch(+t),a):o},a}().value((function(t){return t[s]})).sort(Aa.getProperty(o,"pie","sortFunction")).padAngle(bt.padAngle)(u),h=Rf.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(c,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("slice",!0).attr("opacity",0).merge(h).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t.data[a],originalClassName:"slice"})})).style("fill",(function(t){return n.model.getFillColor(t.data[a])})).attr("d",this.arc).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"pie_slice_enter_update",animate:t})})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t[s]+", "+Aa.convertValueToPercentage(t.data[s],u,s)+"%"})).attrTween("d",(function(t){return ry.bind(this)(t,n.arc)}));var d=o.pie.labels.enabled,f=d?c.filter((function(t){return t.data[s]>0})):[],p=Rf.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(f,(function(t){return t.data[a]}));p.exit().attr("opacity",0).remove();var g=p.enter().append("text").classed("pie-label",!0),v=[];g.merge(p).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):Aa.convertValueToPercentage(t.data[s],u,s)+"%"})).datum((function(t){var e=l+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=f.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<bt.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+bt.callout.offsetX+bt.callout.textMargin+t.textOffsetX,o=t.yPosition-bt.callout.offsetY,t.direction=q.RIGHT,v.push(t)):(i=t.xPosition-bt.callout.offsetX-t.textOffsetX-bt.callout.textMargin,o=t.yPosition-bt.callout.offsetY,t.direction=q.LEFT,v.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(v);var m=Aa.getProperty(o,"donut")?"donut":"pie",y=Aa.getProperty(o,m,"alignment"),b=Rf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,_=d?bt.yOffset:0,x=l+(d?bt.xOffset:0);y===G.CENTER?x=b/2:y===G.RIGHT&&(x=b-l-bt.xOffset);var w=l+_;v.length>0&&(w+=bt.yOffsetCallout),i.attr("x",x+7).attr("y",w),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=Rf.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",r.GROUP).attr("data-name","callouts"),n=e.selectAll("g.callout").data(t);n.exit().remove();var i=n.enter().append("g").classed("callout",!0).attr("role",r.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");i.merge(n).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===q.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+bt.callout.offsetX,y:n-bt.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-bt.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-bt.callout.offsetX,y:n-bt.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+bt.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return ka(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})),i.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return ka(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}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e,n){var r=ka(this);r.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(it.Pie.SLICE_MOUSEOVER,{event:e,element:ka(this),datum:n});var i=t.getOptions().data.groupMapsTo,o=t.getOptions().pie.valueMapsTo;t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{label:n.data[i],value:n.data[o]}]})})).on("mousemove",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.Pie.SLICE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Pie.SLICE_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(e,n){var r=ka(this);r.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(it.Pie.SLICE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.computeRadius=function(){var t=Rf.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height,r=this.getOptions(),i=Math.min(e,n)/2;return r.pie.labels.enabled?i+bt.radiusOffset:i},e}(_v),oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e.renderType=L.SVG,e}return n(e,t),e.prototype.getValue=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"value"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getValueRatio=function(){return Aa.clamp(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.getOptions();return Aa.getProperty(t,"gauge","type")===K.FULL?1:.5},e.prototype.getArcSize=function(){return this.getArcRatio()*Math.PI*2},e.prototype.getStartAngle=function(){var t=this.getArcSize();return t===2*Math.PI?0:-t/2},e.prototype.getArrow=function(t){var e=this.getOptions();switch(Aa.getProperty(e,"gauge","deltaArrow","direction")){case Q.UP:return"4,10 8,6 12,10";case Q.DOWN:return"12,6 8,10 4,6";default:return t>0?"4,10 8,6 12,10":"12,6 8,10 4,6"}},e.prototype.render=function(t){var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),i=this.getOptions(),o=this.getValue(),a=this.getValueRatio(),s=this.getArcSize(),u=this.getStartAngle(),l=u+a*s,c=u+s,h=this.computeRadius(),d=this.getInnerRadius();this.backgroundArc=Zh().innerRadius(d).outerRadius(h).startAngle(l).endAngle(c),this.arc=Zh().innerRadius(d).outerRadius(h).startAngle(u).endAngle(l),Rf.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var f=n.selectAll("path.arc-foreground").data([o]);f.enter().append("path").merge(f).attr("class",this.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",(function(t){return Aa.getProperty(e.getOptions(),"color","scale","value")})).attr("d",this.arc).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),this.drawValueNumber(),this.drawDelta(),f.exit().remove();var p=Aa.getProperty(i,"gauge","alignment"),g=Rf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,v=h;p===G.CENTER?v=g/2:p===G.RIGHT&&(v=g-h),n.attr("x",v).attr("y",h),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=Aa.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=Aa.getProperty(e,"gauge","valueFontSize"),s=Aa.getProperty(e,"gauge","deltaFontSize"),u=Aa.getProperty(e,"gauge","numberSpacing"),l=Aa.getProperty(e,"gauge","showPercentageSymbol"),c=0;n!==K.FULL||i?n===K.SEMI&&i&&(c=-(s(o)+u)):c=s(o);var h=Rf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),d=a(o),f=Rf.appendOrSelect(h,"g.gauge-value-number"),p=Aa.getProperty(e,"gauge","numberFormatter"),g=f.selectAll("text.gauge-value-number").data([r]);g.enter().append("text").attr("class","gauge-value-number").merge(g).style("font-size",d+"px").attr("text-anchor","middle").text((function(t){return p(t)}));var v=Rf.getSVGElementSize(Rf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width,m=d/2,y=l?"%":"",b=Rf.appendOrSelect(f,"text.gauge-value-symbol").style("font-size",m+"px").attr("x",v/2).text(y),_=Rf.getSVGElementSize(b,{useBBox:!0}),x=_.width,w=_.height;b.attr("y","-"+w/2+"px"),f.attr("transform","translate(-"+x/2+", 0)")},e.prototype.drawDelta=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=this.getDelta(),i=this.computeRadius(),o=r?Aa.getProperty(n,"gauge","deltaFontSize"):function(){return 0},a=r?Aa.getProperty(n,"gauge","numberFormatter"):function(){return null},s=Aa.getProperty(n,"gauge","deltaArrow","size"),u=Aa.getProperty(n,"gauge","numberSpacing"),l=Aa.getProperty(n,"gauge","showPercentageSymbol"),c=Rf.appendOrSelect(e,"g.gauge-numbers"),h=Rf.appendOrSelect(c,"g.gauge-delta").attr("transform","translate(0, "+(o(i)+u)+")"),d=Rf.appendOrSelect(h,"text.gauge-delta-number"),f=l?"%":"";d.data(null===r?[]:[r]),d.enter().append("text").classed("gauge-delta-number",!0).merge(d).attr("text-anchor","middle").style("font-size",o(i)+"px").text((function(t){return""+a(t)+f}));var p=Rf.getSVGElementSize(Rf.appendOrSelect(e,".gauge-delta-number"),{useBBox:!0}).width,g=Aa.getProperty(n,"gauge","deltaArrow","enabled"),v=h.selectAll("svg.gauge-delta-arrow").data(null!==r&&g?[r]:[]);v.enter().append("svg").merge(v).attr("class","gauge-delta-arrow").attr("x",-s(i)-p/2).attr("y",-s(i)/2-.35*o(i)).attr("width",s(i)).attr("height",s(i)).attr("viewBox","0 0 16 16").each((function(){var e=ka(this);Rf.appendOrSelect(e,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var i=Aa.getProperty(n,"gauge","status");Rf.appendOrSelect(e,"polygon.gauge-delta-arrow").attr("class",null!==i?"gauge-delta-arrow status--"+i:"").attr("points",t.getArrow(r))})),v.exit().remove(),d.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-Aa.getProperty(this.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e,n){t.services.events.dispatchEvent(it.Gauge.ARC_MOUSEOVER,{event:e,element:ka(this),datum:n})})).on("mousemove",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.Gauge.ARC_MOUSEMOVE,{event:e,element:r,datum:n})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Gauge.ARC_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.Gauge.ARC_MOUSEOUT,{event:e,element:r,datum:n})}))},e.prototype.computeRadius=function(){var t=this.getOptions(),e=Aa.getProperty(t,"gauge","type"),n=Rf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===K.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(_v),ay=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e.renderType=L.SVG,e}return n(e,t),e.prototype.render=function(e){var n=this;void 0===e&&(e=!0),t.prototype.render.call(this,e);var r=this;if(this.model.isDataEmpty())this.getComponentContainer().select("g.center").remove();else{var i=Rf.appendOrSelect(this.getComponentContainer(),"g.center"),o=this.getOptions(),a=this.computeRadius(),s=Aa.getProperty(o,"donut","center","label");Rf.appendOrSelect(i,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",(function(){return null===s||""===s?"central":"initial"})).style("font-size",(function(){return o.donut.center.numberFontSize(a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"donut-figure-enter-update",animate:e})})).tween("text",(function(){return r.centerNumberTween(ka(this))})),null!==s&&""!==s&&Rf.appendOrSelect(i,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return o.donut.center.titleFontSize(a)})).attr("y",o.donut.center.titleYPosition(a)).text(s)}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.getOptions(),n=Aa.getProperty(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,n){return t+n[e.pie.valueMapsTo]}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?Gu:Ru)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(iy),sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton",e}return n(e,t),e.prototype.render=function(){var t=Aa.getProperty(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===Y.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===Y.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===Y.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==Y.DONUT)throw new Error('"'+this.configs.skeleton+'" is not a valid Skeleton type.');this.renderDonutSkeleton(t)}},e.prototype.renderGridSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.renderVertOrHorizSkeleton=function(t){var e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===B.VERTICAL&&this.drawYGrid(t),e===B.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")},e.prototype.renderPieSkeleton=function(t){var e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.renderDonutSkeleton=function(t){var e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.setScales=function(){var t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=_l().domain([0,1]).range(t),this.yScale=_l().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=Rf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;this.backdrop=Rf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",r).attr("height",i);var o=Rf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var a=this.xScale.range(),s=a[0],u=(a[1],this.yScale.range()),l=(u[0],u[1]);this.backdrop.merge(o).attr("x",s).attr("y",l),o.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("width"),n=Aa.getProperty(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((function(t){return t*e})),i=Rf.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2","100%"),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=Aa.getProperty(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=Rf.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=Rf.getSVGElementSize(r,{useAttrs:!0}),o=i.width,a=i.height,s=Rf.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=0===e?"pie":"donut",l=Aa.getProperty(this.getOptions(),u,"alignment");Rf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none");var c=Zh().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(bt.radiusOffset),d=t+(Math.min(o,a)-2*t)/2,f=Rf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+h+", "+d+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n),p=t+bt.xOffset;l===G.CENTER?p=o/2:l===G.RIGHT&&(p=o-t-bt.xOffset);var g=t+bt.yOffset;f.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=Rf.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+bt.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=Rf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=Rf.appendOrSelect(e,"defs").lower(),o=Rf.appendOrSelect(i,"linearGradient").attr("id",t).attr("x1",0-3*.2*n).attr("x2",r).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)");o.html('\n\t\t\t<stop class="stop-bg-shimmer" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="stop-bg-shimmer" offset="0.4"></stop>\n\t\t'),function t(){o.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(at).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(_v),uy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton-lines",e}return n(e,t),e.prototype.render=function(){var e=Aa.getProperty(this.getOptions(),"data","loading"),n=!(Aa.getProperty(this.getOptions(),"grid","x","enabled")||Aa.getProperty(this.getOptions(),"grid","y","enabled")||Aa.getProperty(this.getOptions(),"axes","bottom","visible")||Aa.getProperty(this.getOptions(),"axes","left","visible"));e&&!n?t.prototype.renderGridSkeleton.call(this,e):e&&n?this.renderSparklineSkeleton(e):this.removeSkeleton()},e.prototype.renderSparklineSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.drawSparkline=function(t){var e=this.backdrop.attr("width"),n=Rf.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",e).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),n.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.updateBackdropStyle=function(){var t=this.parent;this.backdrop=Rf.appendOrSelect(t,"svg.chart-skeleton.DAII");var e=Rf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");e.classed("shimmer-effect-lines",!1),e.classed("shimmer-effect-sparkline",!0)},e}(sy);function ly(t,e){return t.parent===e.parent?1:2}function cy(t,e){return t+e.x}function hy(t,e){return Math.max(t,e.y)}function dy(){var t=ly,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(cy,0)/t.length}(n),e.y=function(t){return 1+t.reduce(hy,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=s.x-t(s,u)/2,c=u.x+t(u,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-l)/(c-l)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function fy(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 py(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=vy)):void 0===e&&(e=gy);for(var n,r,i,o,a,s=new by(t),u=[s];n=u.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)u.push(r=i[o]=new by(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(yy)}function gy(t){return t.children}function vy(t){return Array.isArray(t)?t[1]:null}function my(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function yy(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function by(t){this.data=t,this.depth=this.height=0,this.parent=null}function _y(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Array.from(t))).length,o=[];r<i;)e=t[r],n&&Oy(n,e)?++r:(n=Ty(o=xy(o,e)),r=0);return n}function xy(t,e){var n,r;if(Ey(e,t))return[e];for(n=0;n<t.length;++n)if(wy(e,t[n])&&Ey(Sy(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(wy(Sy(t[n],t[r]),e)&&wy(Sy(t[n],e),t[r])&&wy(Sy(t[r],e),t[n])&&Ey(My(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function wy(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Oy(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Ey(t,e){for(var n=0;n<e.length;++n)if(!Oy(t,e[n]))return!1;return!0}function Ty(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return Sy(t[0],t[1]);case 3:return My(t[0],t[1],t[2])}var e}function Sy(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,l=a-r,c=s-i,h=Math.sqrt(u*u+l*l);return{x:(n+o+u/h*c)/2,y:(r+a+l/h*c)/2,r:(h+i+s)/2}}function My(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,h=n.r,d=r-a,f=r-l,p=i-s,g=i-c,v=u-o,m=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+u*u,_=y-l*l-c*c+h*h,x=f*p-d*g,w=(p*_-g*b)/(2*x)-r,O=(g*v-p*m)/x,E=(f*b-d*_)/(2*x)-i,T=(d*m-f*v)/x,S=O*O+T*T-1,M=2*(o+w*O+E*T),C=w*w+E*E-o*o,A=-(S?(M+Math.sqrt(M*M-4*S*C))/(2*S):C/M);return{x:r+w+O*A,y:i+E+T*A,r:A}}function Cy(t,e,n){var r,i,o,a,s=t.x-e.x,u=t.y-e.y,l=s*s+u*u;l?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(l+a-i)/(2*l),o=Math.sqrt(Math.max(0,a/l-r*r)),n.x=t.x-r*s-o*u,n.y=t.y-r*u+o*s):(r=(l+i-a)/(2*l),o=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-o*u,n.y=e.y+r*u+o*s)):(n.x=e.x+n.r,n.y=e.y)}function Ay(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Py(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Ly(t){this._=t,this.next=null,this.previous=null}function Dy(t){if(!(i=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var e,n,r,i,o,a,s,u,l,c,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;Cy(n,e,r=t[2]),e=new Ly(e),n=new Ly(n),r=new Ly(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){Cy(e._,n._,r=t[s]),r=new Ly(r),u=n.next,l=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(Ay(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}c+=u._.r,u=u.next}else{if(Ay(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(u!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=Py(e);(r=r.next)!==n;)(a=Py(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=_y(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function ky(t){return null==t?null:Ry(t)}function Ry(t){if("function"!=typeof t)throw new Error;return t}function Iy(){return 0}function Ny(t){return function(){return t}}function By(t){return Math.sqrt(t.value)}function Vy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Uy(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=Dy(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function Gy(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Hy(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 zy(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 jy(t,e){return t.parent===e.parent?1:2}function Fy(t){var e=t.children;return e?e[0]:t.t}function Wy(t){var e=t.children;return e?e[e.length-1]:t.t}function qy(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Yy(t,e,n){return t.a.parent===e.parent?t.a:n}function Zy(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function Xy(){var t=jy,e=1,n=1,r=null;function i(i){var u=function(t){for(var e,n,r,i,o,a=new Zy(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new Zy(r[i],i)),n.parent=e;return(a.parent=new Zy(null,0)).children=[a],a}(i);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),r)i.eachBefore(s);else{var l=i,c=i,h=i;i.eachBefore((function(t){t.x<l.x&&(l=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)}));var d=l===c?1:t(l,c)/2,f=d-l.x,p=e/(c.x+d+f),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+f)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,u=o.parent.children[0],l=o.m,c=a.m,h=s.m,d=u.m;s=Wy(s),o=Fy(o),s&&o;)u=Fy(u),(a=Wy(a)).a=e,(i=s.z+h-o.z-l+t(s._,o._))>0&&(qy(Yy(s,e,r),e,i),l+=i,c+=i),h+=s.m,l+=o.m,d+=u.m,c+=a.m;s&&!Wy(a)&&(a.t=s,a.m+=h-c),o&&!Fy(u)&&(u.t=o,u.m+=l-d,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Ky(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}by.prototype=py.prototype={constructor:by,count:function(){return this.eachAfter(fy)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],s=[],u=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)t.call(e,o,++u,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(e,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},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(){return Array.from(this)},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 py(this).eachBefore(my)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n])}while(o.length)}},Zy.prototype=Object.create(by.prototype);var Qy=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,d,f,p,g,v,m=[],y=e.children,b=0,_=0,x=y.length,w=e.value;b<x;){u=i-n,l=o-r;do{c=y[_++].value}while(!c&&_<x);for(h=d=c,v=c*c*(g=Math.max(l/u,u/l)/(w*t)),p=Math.max(d/v,v/h);_<x;++_){if(c+=s=y[_].value,s<h&&(h=s),s>d&&(d=s),v=c*c*g,(f=Math.max(d/v,v/h))>p){c-=s;break}p=f}m.push(a={value:c,dice:u<l,children:y.slice(b,_)}),a.dice?zy(a,n,r,i,w?r+=l*c/w:o):Ky(a,n,r,w?n+=u*c/w:i,o),w-=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);var $y=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tree",e.renderType=L.SVG,e}return n(e,t),e.prototype.getLongestLabel=function(t){var e=this,n="";return t.forEach((function(t){var r=t.children?e.getLongestLabel(t.children):"";(r.length>n.length||t.name.length>n.length)&&(n=r.length>t.name.length?r:t.name)})),n},e.prototype.getMockLabelWidth=function(t,e){var n=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(e),r=Rf.getSVGElementSize(n.node(),{useBBox:!0}).width;return n.remove(),r},e.prototype.render=function(t){var e=this,n=this.getComponentContainer();n.html("");var r=Rf.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getOptions(),s=this.model.getDisplayData(),u=Aa.getProperty(a,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,u),c=this.getLongestLabel(s),h=this.getMockLabelWidth(n,c),d=0,f=l>0?l+6:24,p=py({name:u,children:s}),g=i/6,v=function(t){var r=p.descendants().reverse(),o=p.links(),a=p,s=p;p.eachBefore((function(t){t.x<a.x&&(a=t),t.x>s.x&&(s=t)}));var u=s.x-a.x,l=n.transition().call((function(t){return e.services.transitions.setupTransition({transition:t,name:"tree-update-viewbox",animate:!0})})).attr("viewBox",[-f,a.x,i,u]),c=w.selectAll("g").data(r,(function(t){return t.id})),h=e,d=c.enter().append("g").attr("transform",(function(){return"translate("+t.y0+","+t.x0+")"})).attr("class",(function(t){return 0!==t.depth&&t.children&&t.children.length>0?"clickable":null})).on("mouseover",(function(t,e){h.services.events.dispatchEvent(it.Tree.NODE_MOUSEOVER,{event:t,element:ka(this),datum:e})})).on("click",(function(t,e){0!==e.depth&&(e.children=e.children?null:e._children,v(e)),h.services.events.dispatchEvent(it.Tree.NODE_CLICK,{event:t,element:ka(this),datum:e})})).on("mouseout",(function(t,e){h.services.events.dispatchEvent(it.Tree.NODE_MOUSEOUT,{event:t,element:ka(this),datum:e})}));d.append("circle").attr("r",2.5).attr("class",(function(t){return t._children?"parent":"child"})).attr("stroke-width",10),d.append("text").attr("dy","0.31em").attr("x",(function(t){return t._children?-6:6})).attr("text-anchor",(function(t){return t._children?"end":"start"})).text((function(t){return t.data.name})).clone(!0).attr("class","text-stroke").lower(),c.merge(d).transition(l).attr("transform",(function(t){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",1).attr("stroke-opacity",1),c.exit().transition(l).remove().attr("transform",(function(){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",0).attr("stroke-opacity",0);var g=x.selectAll("path").data(o,(function(t){return t.target.id})),m=g.enter().append("path").attr("d",(function(e){var n={x:t.x0,y:t.y0};return _({source:n,target:n})}));g.merge(m).transition(l).attr("d",_),g.exit().transition(l).remove().attr("d",(function(){var e={x:t.x,y:t.y};return _({source:e,target:e})})),p.eachBefore((function(t){t.x0=t.x,t.y0=t.y}))},m=p.descendants(),y=m[m.length-1].depth,b=Aa.getProperty(a,"tree","type")===z.DENDROGRAM?dy().size([o,i-h-6*y-l]):Xy().nodeSize([10,g]).size([o,i-h-6*y-l]),_=dd().x((function(t){return t.y})).y((function(t){return t.x}));p.x0=g/2,p.y0=0,p.descendants().forEach((function(t,e){t.id=e,t._children=t.children})),b(p),n.attr("viewBox",[-f,-d,i,10]).style("user-select","none");var x=n.append("g").attr("class","links"),w=n.append("g").attr("class","nodes");v(p)}},e}(_v),Jy={black:{100:"#000000"},blue:{10:"#edf5ff",20:"#d0e2ff",30:"#a6c8ff",40:"#78a9ff",50:"#4589ff",60:"#0f62fe",70:"#0043ce",80:"#002d9c",90:"#001d6c",100:"#001141"},coolGray:{10:"#f2f4f8",20:"#dde1e6",30:"#c1c7cd",40:"#a2a9b0",50:"#878d96",60:"#697077",70:"#4d5358",80:"#343a3f",90:"#21272a",100:"#121619"},cyan:{10:"#e5f6ff",20:"#bae6ff",30:"#82cfff",40:"#33b1ff",50:"#1192e8",60:"#0072c3",70:"#00539a",80:"#003a6d",90:"#012749",100:"#061727"},gray:{10:"#f4f4f4",20:"#e0e0e0",30:"#c6c6c6",40:"#a8a8a8",50:"#8d8d8d",60:"#6f6f6f",70:"#525252",80:"#393939",90:"#262626",100:"#161616"},green:{10:"#defbe6",20:"#a7f0ba",30:"#6fdc8c",40:"#42be65",50:"#24a148",60:"#198038",70:"#0e6027",80:"#044317",90:"#022d0d",100:"#071908"},magenta:{10:"#fff0f7",20:"#ffd6e8",30:"#ffafd2",40:"#ff7eb6",50:"#ee5396",60:"#d02670",70:"#9f1853",80:"#740937",90:"#510224",100:"#2a0a18"},orange:{10:"#fff2e8",20:"#ffd9be",30:"#ffb784",40:"#ff832b",50:"#eb6200",60:"#ba4e00",70:"#8a3800",80:"#5e2900",90:"#3e1a00",100:"#231000"},purple:{10:"#f6f2ff",20:"#e8daff",30:"#d4bbff",40:"#be95ff",50:"#a56eff",60:"#8a3ffc",70:"#6929c4",80:"#491d8b",90:"#31135e",100:"#1c0f30"},red:{10:"#fff1f1",20:"#ffd7d9",30:"#ffb3b8",40:"#ff8389",50:"#fa4d56",60:"#da1e28",70:"#a2191f",80:"#750e13",90:"#520408",100:"#2d0709"},teal:{10:"#d9fbfb",20:"#9ef0f0",30:"#3ddbd9",40:"#08bdba",50:"#009d9a",60:"#007d79",70:"#005d5d",80:"#004144",90:"#022b30",100:"#081a1c"},warmGray:{10:"#f7f3f2",20:"#e5e0df",30:"#cac5c4",40:"#ada8a8",50:"#8f8b8b",60:"#726e6e",70:"#565151",80:"#3c3838",90:"#272525",100:"#171414"},white:{0:"#ffffff"},yellow:{10:"#fcf4d6",20:"#fddc69",30:"#f1c21b",40:"#d2a106",50:"#b28600",60:"#8e6a00",70:"#684e00",80:"#483700",90:"#302400",100:"#1c1500"}},tb=function(){var t,e=ka(this.parentNode).select("rect.leaf"),n=fu(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(Jy);e<n.length;e++)for(var r=n[e],i=Jy[r],o=0,a=Object.keys(i);o<a.length;o++){var s=a[o];if(i[s]===t)return s}return null}(n?n.hex():null)),null==t){var r=Eu(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},eb=0,nb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e.renderType=L.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("legend-hover-treemap")).attr("opacity",(function(t){return t.parent.data.name===n.datum().name?1:.3}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("legend-mouseout-treemap")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),r=this.model.getData(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=Aa.getProperty(window,"location"),s=Rf.getSVGElementSize(n,{useAttrs:!0}),u=s.width,l=s.height,c=py({name:o.title||"Treemap",children:i}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),h=(qs(r,(function(t){return qs(t.children,(function(t){return t.value}))})),function(){var t=Qy,e=!1,n=1,r=1,i=[0],o=Iy,a=Iy,s=Iy,u=Iy,l=Iy;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Hy),t}function h(e){var n=i[e.depth],r=e.x0+n,c=e.y0+n,h=e.x1-n,d=e.y1-n;h<r&&(r=h=(r+h)/2),d<c&&(c=d=(c+d)/2),e.x0=r,e.y0=c,e.x1=h,e.y1=d,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),(d-=u(e)-n)<c&&(c=d=(c+d)/2),t(e,r,c,h,d))}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=Ry(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:Ny(+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:Ny(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Ny(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Ny(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:Ny(+t),c):l},c}().size([u,l]).paddingInner(1).paddingOuter(0).round(!0)(c)),d=(this.services.transitions,n.selectAll("g[data-name='leaf']").data(h.leaves(),(function(t){return t.data.name})));d.exit().attr("opacity",0).remove();var f=d.enter().append("g").attr("data-name","leaf").attr("data-uid",(function(){return eb++})).merge(d);f.attr("data-name","leaf").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-group-update",animate:t})})).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"}));var p=f.selectAll("rect.leaf").data((function(t){return[t]}));p.exit().attr("width",0).attr("height",0).remove(),p.enter().append("rect").classed("leaf",!0).merge(p).attr("width",0).attr("height",0).attr("id",(function(){var t=ka(this.parentNode).attr("data-uid");return o.style.prefix+"-leaf-"+t})).attr("class",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t.data.name,originalClassName:"leaf"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-leaf-update-enter",animate:t})})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).style("fill",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getFillColor(t.data.name)})),f.selectAll("clipPath").data((function(t){return!0!==t.data.showLabel?[]:[1]}),(function(t){return t})).join((function(t){t.append("clipPath").attr("id",(function(){var t=ka(this.parentNode).attr("data-uid");return o.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=ka(this.parentNode.parentNode).attr("data-uid"),e=o.style.prefix+"-leaf-"+t;return new URL("#"+e,a)+""}))}),(function(t){return null}),(function(t){return t.remove()})),f.selectAll("text").data((function(t){if(!0!==t.data.showLabel)return[];for(var n=t;n.depth>1;)n=n.parent;var r=Eu(e.model.getFillColor(n.data.name));return[{text:t.data.name,color:r.l<.5?"white":"black"}]}),(function(t){return t})).join((function(t){var e=t.append("text").text((function(t){return t.text})).style("fill",tb).attr("x",7).attr("y",18);a&&e.attr("clip-path",(function(){var t=ka(this.parentNode).attr("data-uid"),e=o.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,a)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",tb)}),(function(t){return t.remove()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(e,n){for(var r=ka(this),i=getComputedStyle(this,null).getPropertyValue("fill"),o=n;o.depth>1;)o=o.parent;r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).style("fill",(function(e){var n=t.model.getFillColor(e.parent.data.name);return n&&(i=n),fu(i).darker(.7).toString()})),t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{color:i,label:o.data.name,bold:!0},{label:n.data.name,value:n.data.value}]}),t.services.events.dispatchEvent(it.Treemap.LEAF_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.Treemap.LEAF_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Treemap.LEAF_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(e,n){var r=ka(this);r.classed("hovered",!1);for(var i=n;i.depth>1;)i=i.parent;r.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).style("fill",(function(e){return t.model.getFillColor(e.parent.data.name)})),t.services.events.dispatchEvent(it.Treemap.LEAF_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:r})}))},e}(_v);function rb(t){var e,n=(ob(t)%(e=360)+e)%e;return ib(n,[0,10])||ib(n,[350,0])?{textAnchor:Z.START,dominantBaseline:X.MIDDLE}:ib(n,[10,80])?{textAnchor:Z.START,dominantBaseline:X.HANGING}:ib(n,[80,100])?{textAnchor:Z.MIDDLE,dominantBaseline:X.HANGING}:ib(n,[100,170])?{textAnchor:Z.END,dominantBaseline:X.HANGING}:ib(n,[170,190])?{textAnchor:Z.END,dominantBaseline:X.MIDDLE}:ib(n,[190,260])?{textAnchor:Z.END,dominantBaseline:X.BASELINE}:ib(n,[260,280])?{textAnchor:Z.MIDDLE,dominantBaseline:X.BASELINE}:{textAnchor:Z.START,dominantBaseline:X.BASELINE}}function ib(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function ob(t){return t*(180/Math.PI)}function ab(t,e,n){return void 0===n&&(n={x:0,y:0}),{x:e*Math.cos(t)+n.x,y:e*Math.sin(t)+n.y}}var sb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.renderType=L.SVG,e.getLabelDimensions=function(t){var n=Rf.appendOrSelect(e.getComponentContainer(),"g.tmp-tick"),r=Rf.appendOrSelect(n,"text").text(t),i=Rf.getSVGElementSize(r.node(),{useBBox:!0}),o=i.width,a=i.height;return n.remove(),{width:o,height:a}},e.normalizeFlatData=function(t){var n=e.getOptions(),r=Aa.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Aa.getProperty(n,"data","groupMapsTo"),s=Aa.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[a]=e,n[o]=null,n}))})));return Aa.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.getOptions(),r=Aa.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=Aa.getProperty(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[a]=n,e[i]=t,e[o]=null,e}));return{name:n,data:Aa.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?_t.opacity.unselected:_t.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?_t.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",_t.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),i=Rf.getSVGElementSize(n,{useAttrs:!0}),o=i.width,a=i.height,s=this.model.getData(),u=this.model.getGroupedData(),l=this.getOptions(),c=Aa.getProperty(l,"radar","axes"),h=c.angle,d=c.value,f=Aa.getProperty(l,"data","groupMapsTo"),p=_t.xLabelPadding,g=_t.yLabelPadding,v=_t.yTicksNumber,m=_t.minRange,y=_t.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[f]})))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+g),_=(Math.min(o,a)-b)/2;if(!(_<=0)){var x=Ks().domain(this.fullDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),w=zs(this.fullDataNormalized.map((function(t){return t[d]}))),O=_l().domain([w>=0?0:w,Hs(this.fullDataNormalized.map((function(t){return t[d]})))]).range([m,_]).nice(v),E=O.ticks(v),T=function(t){return e.model.getFillColor(t)},S=ud().angle((function(t){return x(t[h])+Math.PI/2})).radius((function(t){return O(t[d])})).curve(Vd),M={x:Hs(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=x(t),_*Math.sin(n-Math.PI/2))})))+p,y:a/2},C=Rf.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(E,(function(t){return t})),A=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[h]=e,n[d]=t,n}))};C.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+M.x+", "+M.y+")").attr("fill","none").call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return S(A(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_update",t)).attr("opacity",1).attr("transform","translate("+M.x+", "+M.y+")").attr("d",(function(t){return S(A(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_exit",t)).attr("d",(function(t){return S(A(t))})).attr("opacity",0).remove()}))})),Rf.appendOrSelect(n,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+Aa.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return ab(x(t),0,M).x})).attr("y1",(function(t){return ab(x(t),0,M).y})).attr("x2",(function(t){return ab(x(t),0,M).x})).attr("y2",(function(t){return ab(x(t),0,M).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return ab(x(t),O.range()[0],M).x})).attr("y1",(function(t){return ab(x(t),O.range()[0],M).y})).attr("x2",(function(t){return ab(x(t),O.range()[1],M).x})).attr("y2",(function(t){return ab(x(t),O.range()[1],M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_update",t)).attr("opacity",1).attr("x1",(function(t){return ab(x(t),O.range()[0],M).x})).attr("y1",(function(t){return ab(x(t),O.range()[0],M).y})).attr("x2",(function(t){return ab(x(t),O.range()[1],M).x})).attr("y2",(function(t){return ab(x(t),O.range()[1],M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),Rf.appendOrSelect(n,"g.x-labels").attr("role",r.GROUP).selectAll("text").data(this.uniqueKeys).join((function(n){return n.append("text").text((function(t){return t})).attr("opacity",0).attr("x",(function(t){return ab(x(t),O.range()[1]+p,M).x})).attr("y",(function(t){return ab(x(t),O.range()[1]+p,M).y})).style("text-anchor",(function(t){return rb(x(t)).textAnchor})).style("dominant-baseline",(function(t){return rb(x(t)).dominantBaseline})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_update",t)).attr("opacity",1).attr("x",(function(t){return ab(x(t),O.range()[1]+p,M).x})).attr("y",(function(t){return ab(x(t),O.range()[1]+p,M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),Rf.appendOrSelect(n,"g.blobs").attr("role",r.GROUP).selectAll("path").data(this.groupedDataNormalized,(function(t){return t.name})).join((function(n){return n.append("path").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL,k.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform",t?function(){return"translate("+M.x+", "+M.y+") scale("+(1+.35*Math.random())+")"}:"translate("+M.x+", "+M.y+")").style("fill",(function(t){return T(t.name)})).style("fill-opacity",_t.opacity.selected).style("stroke",(function(t){return T(t.name)})).call((function(n){var r=n.transition(e.services.transitions.getTransition("radar_blobs_enter",t));t&&r.delay((function(){return 30*Math.random()})).attr("transform","translate("+M.x+", "+M.y+")"),r.attr("opacity",1).attr("d",(function(t){return S(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL,k.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).style("fill",(function(t){return T(t.name)})).style("stroke",(function(t){return T(t.name)})),n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+M.x+", "+M.y+")").attr("d",(function(t){return S(t.data)}))}))}),(function(n){return n.call((function(n){var r=n.transition(e.services.transitions.getTransition("radar_blobs_exit",t));t&&r.delay((function(){return 30*Math.random()})).attr("transform",(function(){return"translate("+M.x+", "+M.y+") scale("+(1+.35*Math.random())+")"})),r.attr("opacity",0).remove()}))})),Rf.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.fullDataNormalized.filter((function(t){return null!==Aa.getProperty(t,d)}))).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t[f],originalClassName:Aa.kebabCase(t[h])})})).attr("cx",(function(t){return ab(x(t[h]),O(t[d]),M).x})).attr("cy",(function(t){return ab(x(t[h]),O(t[d]),M).y})).attr("r",0).attr("opacity",0).style("fill",(function(t){return T(t[f])})),Rf.appendOrSelect(n,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("x",M.x).attr("y",M.y-y/2).attr("width",O.range()[1]).attr("height",y).style("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+ob(x(t))+", "+M.x+", "+M.y+")"})),Rf.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(Ss(E)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return ab(-Math.PI/2,O(t),M).x+g})).attr("y",(function(t){return ab(-Math.PI/2,O(t),M).y})).style("text-anchor","start").style("dominant-baseline","middle").call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_update",t)).text((function(t){return t})).attr("opacity",1).attr("x",(function(t){return ab(-Math.PI/2,O(t),M).x+g})).attr("y",(function(t){return ab(-Math.PI/2,O(t),M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))}));var P=Aa.getProperty(l,"radar","alignment"),L=this.getAlignmentXOffset(P,n,this.getParent());n.attr("x",L),this.addEventListeners()}},e.prototype.getAlignmentXOffset=function(t,e,n){var r=Rf.getSVGElementSize(e,{useBBox:!0}),i=Rf.getSVGElementSize(n,{useAttr:!0}).width,o=0;return t===G.CENTER?o=Math.floor((i-r.width)/2):t===G.RIGHT&&(o=i-r.width),o},e.prototype.destroy=function(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=Aa.getProperty(this.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n,r){var i=ka(this);t.services.events.dispatchEvent(it.Radar.X_AXIS_MOUSEOVER,{event:n,element:i,datum:r});var o=t.parent.select(".x-axes .x-axis-"+Aa.kebabCase(r)),a=t.parent.selectAll(".dots circle."+Aa.kebabCase(r));o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",_t.dotsRadius);var s=t.fullDataNormalized.filter((function(t){return t[e]===r})),u=t.getOptions(),l=u.data.groupMapsTo,c=Aa.getProperty(u,"radar","axes","value");t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:n,hoveredElement:i,items:s.filter((function(t){return"number"==typeof t[c]})).map((function(e){return{label:e[l],value:e[c],color:t.model.getFillColor(e[l]),class:t.model.getColorClassName({classNameTypes:[k.TOOLTIP],dataGroupName:e[l]})}}))})})).on("mousemove",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.Radar.X_AXIS_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(it.Radar.X_AXIS_CLICK,{event:e,element:ka(this),datum:n})})).on("mouseout",(function(e,n){var r=ka(this),i=t.parent.select(".x-axes .x-axis-"+Aa.kebabCase(n)),o=t.parent.selectAll(".dots circle."+Aa.kebabCase(n));i.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(it.Radar.X_AXIS_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.HIDE)}))},e}(_v),ub=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle-pack",e.renderType=L.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.node").transition(e.services.transitions.getTransition("legend-hover-circlepack")).attr("opacity",(function(t){return t.data.dataGroupName===n.datum().name?1:dt.circles.fillOpacity}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.node").transition(e.services.transitions.getTransition("legend-mouseout-circlepack")).attr("opacity",1)},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),r=Rf.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getDisplayData(),s=this.model.hasParentNode(),u=this.model.getHierarchyLevel(),l=this.getOptions(),c=Aa.getProperty(l,"canvasZoom","enabled");s&&Aa.getProperty(a,0,"children")&&(a=Aa.getProperty(a,0,"children"));var h=py({children:a}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),d=function(){var t=null,e=1,n=1,r=Iy;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Vy(t)).eachAfter(Uy(r,.5)).eachBefore(Gy(1)):i.eachBefore(Vy(By)).eachAfter(Uy(Iy,1)).eachAfter(Uy(r,i.r/Math.min(e,n))).eachBefore(Gy(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=ky(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Ny(+t),i):r},i}().size([i,o]).padding((function(t){return t.depth>=1?dt.padding.children+3:dt.padding.mainGroup+3}))(h).descendants().splice(1).filter((function(t){return t.depth<=u})),f=n.selectAll("circle.node").data(d);f.exit().attr("width",0).attr("height",0).remove();var p=f.enter().append("circle").classed("node",!0);p.merge(f).attr("class",(function(t){var n=c&&3===u?e.getZoomClass(t):"";return e.model.getColorClassName({classNameTypes:[k.FILL,k.STROKE],dataGroupName:t.data.dataGroupName,originalClassName:t.children?"node "+n:"node node-leaf "+n})})).style("fill",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})).transition(this.services.transitions.getTransition("circlepack-leaf-update-enter",t)).attr("r",(function(t){return t.r})).attr("opacity",1).attr("fill-opacity",dt.circles.fillOpacity),!0===c&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,p,ht),this.setBackgroundListeners()),s||this.addLegendListeners(),this.addEventListeners()}},e.prototype.unhighlightChildren=function(t){var e=this,n=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return n.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)}))},e.prototype.highlightChildren=function(t){var e=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return e.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",dt.circles.hover.stroke)},e.prototype.getZoomClass=function(t){return 3===this.model.getHierarchyLevel()&&this.focal&&(t.data===this.focal.data||this.focal.children.some((function(e){return e.data===t.data})))?"focal":"non-focal"},e.prototype.addLegendListeners=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.removeBackgroundListeners=function(){ka(this.services.domUtils.getMainContainer()).on("click",(function(){return null}))},e.prototype.setBackgroundListeners=function(){var t=ka(this.services.domUtils.getMainContainer()),e=this,n=this.parent.selectAll("circle.node"),r=Aa.getProperty(ws,"canvasZoomSettings");t.on("click",(function(){e.focal=null,e.model.updateHierarchyLevel(2),t.classed("zoomed-in",!1),e.services.canvasZoom.zoomOut(n,r)}))},e.prototype.getZoomIcon=function(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">\n\t\t\t<polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>\n\t\t\t<path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>\n\t\t</svg>'},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle.node").on("mouseover",(function(e,n){var r=ka(this);r.classed("hovered",!0);var i=t.model.getHierarchyLevel(),o=i>2&&!r.classed("focal"),a=Aa.getProperty(t.model.getOptions(),"canvasZoom","enabled"),s=!1;if(!o){var u=[],l=[],c=null;if(n.children)n.depth>1&&a&&(s=!0,r.classed("clickable",!0)),u=n.children.map((function(e){if(null!==e)return"number"==typeof e.data.value?{label:e.data.name,value:e.data.value}:{label:e.data.name,labelIcon:a&&i<=2?t.getZoomIcon():null,value:e.value}})),l=[{label:kn(t.model.getOptions(),"tooltip.totalLabel")||"Total",value:n.value,bold:!0}],t.highlightChildren(n.children);else c=n.value;var h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(it.Tooltip.SHOW,{event:e,hoveredElement:r,items:P([{color:h,label:n.data.name,labelIcon:s&&a&&i<=2?t.getZoomIcon():null,value:c}],u,l)})}t.services.events.dispatchEvent(it.CirclePack.CIRCLE_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=ka(this);t.services.events.dispatchEvent(it.CirclePack.CIRCLE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.MOVE,{event:e})})).on("mouseout",(function(e,n){var r=ka(this);r.classed("hovered",!1),n.children&&t.unhighlightChildren(n.children),t.services.events.dispatchEvent(it.CirclePack.CIRCLE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:r})})).on("click",(function(e,n){var r=ka(this),i=r.classed("non-focal");if(Aa.getProperty(t.getOptions(),"canvasZoom","enabled")&&t.model.getHierarchyLevel()>2){var o=t.parent.selectAll("circle.node");ka(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,ht)}else if(2===n.depth&&n.children&&!i){o=t.parent.selectAll("circle.node");ka(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=n,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(n,o,ht),e.stopPropagation()}t.services.events.dispatchEvent(it.CirclePack.CIRCLE_CLICK,{event:e,element:r,datum:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);var t=this.services.events;t.removeEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()},e}(_v),lb={value:function(){}};function cb(){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 hb(r)}function hb(t){this._=t}function db(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 fb(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function pb(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=lb,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}hb.prototype=cb.prototype={constructor:hb,on:function(t,e){var n,r=this._,i=db(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]=pb(r[n],t.name,e);else if(null==e)for(n in r)r[n]=pb(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=fb(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new hb(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 gb=Object.freeze({__proto__:null,dispatch:cb}).dispatch,vb=Math.PI/180,mb=function(){var t=[256,256],e=yb,n=bb,r=xb,i=_b,o=_b,a=wb,s=Ob,u=Mb,l=[],c=1/0,h=gb("word","end"),d=null,f=Math.random,p={},g=Cb;function v(e,n,r){t[0],t[1];for(var i,o,a,s,l,c=n.x,h=n.y,d=Math.sqrt(t[0]*t[0]+t[1]*t[1]),p=u(t),g=f()<.5?1:-1,v=-g;(i=p(v+=g))&&(o=~~i[0],a=~~i[1],!(Math.min(Math.abs(o),Math.abs(a))>=d));)if(n.x=c+o,n.y=h+a,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1]||r&&Tb(n,e,t[0])||r&&(l=r,!((s=n).x+s.x1>l[0].x&&s.x+s.x0<l[1].x&&s.y+s.y1>l[0].y&&s.y+s.y0<l[1].y)))){for(var m,y=n.sprite,b=n.width>>5,_=t[0]>>5,x=n.x-(b<<4),w=127&x,O=32-w,E=n.y1-n.y0,T=(n.y+n.y0)*_+(x>>5),S=0;S<E;S++){m=0;for(var M=0;M<=b;M++)e[T+M]|=m<<O|(M<b?(m=y[S*b+M])>>>w:0);T+=_}return delete n.sprite,!0}return!1}return p.canvas=function(t){return arguments.length?(g=Ab(t),p):g},p.start=function(){var u=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;var n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(g()),m=function(t){var e=[],n=-1;for(;++n<t;)e[n]=0;return e}((t[0]>>5)*t[1]),y=null,b=l.length,_=-1,x=[],w=l.map((function(t,u){return t.text=e.call(this,t,u),t.font=n.call(this,t,u),t.style=i.call(this,t,u),t.weight=o.call(this,t,u),t.rotate=a.call(this,t,u),t.size=~~r.call(this,t,u),t.padding=s.call(this,t,u),t})).sort((function(t,e){return e.size-t.size}));return d&&clearInterval(d),d=setInterval(O,0),O(),p;function O(){for(var e=Date.now();Date.now()-e<c&&++_<b&&d;){var n=w[_];n.x=t[0]*(f()+.5)>>1,n.y=t[1]*(f()+.5)>>1,Eb(u,n,w,_),n.hasText&&v(m,n,y)&&(x.push(n),h.call("word",p,n),y?Sb(y,n):y=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=t[0]>>1,n.y-=t[1]>>1)}_>=b&&(p.stop(),h.call("end",p,x,y))}},p.stop=function(){return d&&(clearInterval(d),d=null),p},p.timeInterval=function(t){return arguments.length?(c=null==t?1/0:t,p):c},p.words=function(t){return arguments.length?(l=t,p):l},p.size=function(e){return arguments.length?(t=[+e[0],+e[1]],p):t},p.font=function(t){return arguments.length?(n=Ab(t),p):n},p.fontStyle=function(t){return arguments.length?(i=Ab(t),p):i},p.fontWeight=function(t){return arguments.length?(o=Ab(t),p):o},p.rotate=function(t){return arguments.length?(a=Ab(t),p):a},p.text=function(t){return arguments.length?(e=Ab(t),p):e},p.spiral=function(t){return arguments.length?(u=Pb[t]||t,p):u},p.fontSize=function(t){return arguments.length?(r=Ab(t),p):r},p.padding=function(t){return arguments.length?(s=Ab(t),p):s},p.random=function(t){return arguments.length?(f=t,p):f},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p};function yb(t){return t.text}function bb(){return"serif"}function _b(){return"normal"}function xb(t){return Math.sqrt(t.value)}function wb(){return 30*(~~(6*Math.random())-3)}function Ob(){return 1}function Eb(t,e,n,r){if(!e.sprite){var i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);var a=0,s=0,u=0,l=n.length;for(--r;++r<l;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;var c=i.measureText(e.text+"m").width*o,h=e.size<<1;if(e.rotate){var d=Math.sin(e.rotate*vb),f=Math.cos(e.rotate*vb),p=c*f,g=c*d,v=h*f,m=h*d;c=Math.max(Math.abs(p+m),Math.abs(p-m))+31>>5<<5,h=~~Math.max(Math.abs(g+v),Math.abs(g-v))}else c=c+31>>5<<5;if(h>u&&(u=h),a+c>=2048&&(a=0,s+=u,u=0),s+h>=2048)break;i.translate((a+(c>>1))/o,(s+(h>>1))/o),e.rotate&&i.rotate(e.rotate*vb),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=c,e.height=h,e.xoff=a,e.yoff=s,e.x1=c>>1,e.y1=h>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=c}for(var y=i.getImageData(0,0,2048/o,2048/o).data,b=[];--r>=0;)if((e=n[r]).hasText){for(var _=(c=e.width)>>5,x=(h=e.y1-e.y0,0);x<h*_;x++)b[x]=0;if(null==(a=e.xoff))return;s=e.yoff;for(var w=0,O=-1,E=0;E<h;E++){for(x=0;x<c;x++){var T=_*E+(x>>5),S=y[2048*(s+E)+(a+x)<<2]?1<<31-x%32:0;b[T]|=S,w|=S}w?O=E:(e.y0++,h--,E--,s++)}e.y1=e.y0+O,e.sprite=b.slice(0,(e.y1-e.y0)*_)}}}function Tb(t,e,n){n>>=5;for(var r,i=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,u=32-s,l=t.y1-t.y0,c=(t.y+t.y0)*n+(a>>5),h=0;h<l;h++){r=0;for(var d=0;d<=o;d++)if((r<<u|(d<o?(r=i[h*o+d])>>>s:0))&e[c+d])return!0;c+=n}return!1}function Sb(t,e){var n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function Mb(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Cb(){return document.createElement("canvas")}function Ab(t){return"function"==typeof t?t:function(){return t}}var Pb={archimedean:Mb,rectangular:function(t){var e=4*t[0]/t[1],n=0,r=0;return function(t){var i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}},Lb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="wordcloud",e.renderType=L.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("text.word").transition(e.services.transitions.getTransition("legend-hover-wordcloud")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("text.word").transition(e.services.transitions.getTransition("legend-mouseout-wordcloud")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(it.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(it.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.model.getDisplayData(),i=this.getFontSizeScale(r),o=this.getOptions(),a=o.wordCloud,s=a.fontSizeMapsTo,u=a.wordMapsTo,l=o.data.groupMapsTo,c=Rf.getSVGElementSize(n,{useAttrs:!0}),h=c.width,d=c.height;if(0!==h&&0!==d){var f=mb().size([h,d]).words(r.map((function(t){var e;return(e={})[l]=t[l],e.text=t[u],e.size=t[s],e.value=t[s],e}))).padding(5).rotate(0).fontSize((function(t){return i(t.size)})).on("end",(function(r){var i=Rf.appendOrSelect(n,"g.words");i.attr("transform","translate("+f.size()[0]/2+", "+f.size()[1]/2+")");var o=i.selectAll("text").data(r,(function(t){return t[l]+"-"+t.text}));o.exit().attr("opacity",0).remove(),o.enter().append("text").attr("opacity",0).merge(o).style("font-size",(function(t){return t.size+"px"})).text((function(t){return t.text})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t[l],originalClassName:"word "+(t.size>32?"light":"")})})).style("fill",(function(t){return e.model.getFillColor(t[l],t.text,t)})).attr("text-anchor","middle").transition(e.services.transitions.getTransition("wordcloud-text-update-enter",t)).attr("transform",(function(t){return"translate("+t.x+", "+t.y+")"})).attr("opacity",1)}));f.start(),this.addEventListeners()}},e.prototype.getFontSizeScale=function(t){var e=this.getOptions(),n=e.wordCloud.fontSizeMapsTo,r=t.map((function(t){return t[n]})).filter((function(t){return t})),i=Rf.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=r.length>0,a=o?Ss(r):[1,1];return _l().domain(a).range(o?e.wordCloud.fontSizeRange(i,t):[4,4])},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=Aa.debounce((function(t){var e=r.parent.selectAll("text.word").transition(r.services.transitions.getTransition("wordcloud-word-mouse-highlight"));null===t?e.attr("opacity",1):e.attr("opacity",(function(){return t===this?1:.3}))}),6),r=this;this.parent.selectAll("text.word").on("mouseover",(function(i,o){n(this),r.services.events.dispatchEvent(it.WordCloud.WORD_MOUSEOVER,{event:i,element:ka(this),datum:o}),r.services.events.dispatchEvent(it.Tooltip.SHOW,{event:i,hoveredElement:this,items:[{label:t.tooltip.wordLabel,value:o.text},{label:t.tooltip.valueLabel,value:o.value},{label:t.tooltip.groupLabel,value:o[e],class:r.model.getColorClassName({classNameTypes:[k.TOOLTIP],dataGroupName:o[e]})}]})})).on("mousemove",(function(t,e){var n=ka(this);r.services.events.dispatchEvent(it.WordCloud.WORD_MOUSEMOVE,{element:n,datum:e}),r.services.events.dispatchEvent(it.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){r.services.events.dispatchEvent(it.WordCloud.WORD_CLICK,{event:t,element:ka(this),datum:e})})).on("mouseout",(function(t,e){var i=ka(this);n(null),r.services.events.dispatchEvent(it.WordCloud.WORD_MOUSEOUT,{event:t,element:i,datum:e}),r.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:i})}))},e}(_v),Db=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getComponentContainer().style("width",(this.configs.size||xt.default.size)+"px").style("height",(this.configs.size||xt.default.size)+"px").attr("opacity",0)},e}(_v),kb=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.init(),a}return n(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("div.layout-child-"+this._instanceID).filter((function(t){var e=Aa.getProperty(t,"growth");return e===F.PREFERRED||e===F.FIXED})).each((function(t){e+=t.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("div.layout-child-"+this._instanceID).filter((function(t){return Aa.getProperty(t,"growth")===F.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Rf.getHTMLElementSize(n.node()),i=r.width,o=r.height,a=this.configs.direction===j.ROW||this.configs.direction===j.ROW_REVERSE,s=Aa.getProperty(this.model.getOptions(),"style","prefix"),u=n.classed(cf.prefix+"--"+s+"--layout-row",this.configs.direction===j.ROW).classed(cf.prefix+"--"+s+"--layout-row-reverse",this.configs.direction===j.ROW_REVERSE).classed(cf.prefix+"--"+s+"--layout-column",this.configs.direction===j.COLUMN).classed(cf.prefix+"--"+s+"--layout-column-reverse",this.configs.direction===j.COLUMN_REVERSE).classed(cf.prefix+"--"+s+"--layout-alignitems-center",this.configs.alignItems===W.CENTER).selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));u.enter().append("div").merge(n.selectAll("div.layout-child-"+this._instanceID)).attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.id})).each((function(e){var n=this;e.components.forEach((function(r){var i=ka(n),o=Aa.getProperty(e,"renderType")===L.SVG;r.setParent(o?Rf.appendOrSelect(i,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):i);var a=Aa.getProperty(e,"growth");a!==F.PREFERRED&&a!==F.FIXED||r.render(t)}))})),n.selectAll("div.layout-child-"+this._instanceID).style("height",null).style("width",null).each((function(t){var e=Aa.getProperty(t,"growth"),n=Aa.getProperty(t,"renderType")===L.SVG?Rf.getSVGElementSize(ka(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Rf.getHTMLElementSize(this);if(e===F.PREFERRED){var r=a?n.width:n.height,s=a?i:o;t.size=r/s*100}})),u.exit().remove(),this.children.filter((function(t){return Aa.getProperty(t,"growth")===F.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()}));var l=n.selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));a?l.style("width",(function(t){return t.size/100*i+"px"})).style("height","100%"):l.style("height",(function(t){return t.size/100*o+"px"})).style("width","100%"),l.each((function(e,n){e.components.forEach((function(n){Aa.getProperty(e,"growth")===F.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}(_v);function Rb(t){return t}function Ib(t){return"translate("+t+",0)"}function Nb(t){return"translate(0,"+t+")"}function Bb(t){return e=>+t(e)}function Vb(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function Ub(){return!this.__axis}function Gb(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",h=1===t||3===t?Ib:Nb;function d(d){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):Rb:i,g=Math.max(o,0)+s,v=e.range(),m=+v[0]+u,y=+v[v.length-1]+u,b=(e.bandwidth?Vb:Bb)(e.copy(),u),_=d.selection?d.selection():d,x=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(f,e).order(),O=w.exit(),E=w.enter().append("g").attr("class","tick"),T=w.select("line"),S=w.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(E),T=T.merge(E.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),S=S.merge(E.append("text").attr("fill","currentColor").attr(c,l*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==_&&(x=x.transition(d),w=w.transition(d),T=T.transition(d),S=S.transition(d),O=O.transition(d).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=b(t))?h(t+u):this.getAttribute("transform")})),E.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:b(t))+u)}))),O.remove(),x.attr("d",4===t||2===t?a?"M"+l*a+","+m+"H"+u+"V"+y+"H"+l*a:"M"+u+","+m+"V"+y:a?"M"+m+","+l*a+"V"+u+"H"+y+"V"+l*a:"M"+m+","+u+"H"+y),w.attr("opacity",1).attr("transform",(function(t){return h(b(t)+u)})),T.attr(c+"2",l*o),S.attr(c,l*g).text(p),_.filter(Ub).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=b}))}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),d):r&&r.slice()},d.tickFormat=function(t){return arguments.length?(i=t,d):i},d.tickSize=function(t){return arguments.length?(o=a=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(a=+t,d):a},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(u=+t,d):u},d}function Hb(t){return Gb(1,t)}function zb(t){return Gb(2,t)}function jb(t){return Gb(3,t)}function Fb(t){return Gb(4,t)}var Wb=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",i.renderType=L.SVG,r&&(i.configs=r),i.margins=i.configs.margins,i}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i,o=this.configs.position,a=this.getOptions(),s=Aa.getProperty(a,"axes",o,"visible"),u=this.getComponentContainer(),l=Rf.getSVGElementSize(u,{useAttrs:!0}),c=l.width,h=l.height,d=Rf.appendOrSelect(u,"g.axis."+o);o===R.BOTTOM||o===R.TOP?(n=this.configs.axes[R.LEFT]?this.margins.left:0,i=this.configs.axes[R.RIGHT]?c-this.margins.right:c):(n=h-this.margins.bottom,i=this.margins.top);var f,p=this.services.cartesianScales.getScaleByPosition(o);switch(this.scaleType===V.LABELS||this.scaleType===V.LABELS_RATIO?p.rangeRound([n,i]):p.range([n,i]),o){case R.LEFT:f=Fb;break;case R.BOTTOM:f=jb;break;case R.RIGHT:f=zb;break;case R.TOP:f=Hb}d.attr("aria-label",o+" axis");var g=!d.select("g.ticks").empty(),v=Rf.appendOrSelect(d,"g.ticks");g||(v.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),v.attr("aria-label",o+" ticks"));var m=Rf.appendOrSelect(d,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+o+" ticks"),y=Aa.getProperty(a,"axes",o),b=this.scaleType===V.TIME||y.scaleType===V.TIME,_=o===R.LEFT||o===R.RIGHT,x=this.model.get("zoomDomain");if(x&&b&&!_&&p.domain(x),s){var w=Aa.getProperty(y,"scaleType"),O=Aa.getProperty(a,"data","loading"),E=Aa.getProperty(y,"ticks","number"),T=Aa.getProperty(y,"ticks","values"),S=Aa.getProperty(y,"truncation","type"),M=Aa.getProperty(y,"truncation","threshold"),C=Aa.getProperty(y,"truncation","numCharacter"),A=null!==E,P=Aa.getProperty(a,"timeScale"),L=Rf.appendOrSelect(m,"g.tick"),D=Rf.appendOrSelect(L,"text").text("0"),k=Rf.getSVGElementSize(D.node(),{useBBox:!0}).height;L.remove();var I,B=this.scaleType||y.scaleType||V.LINEAR,U=f(p).tickSizeOuter(0);if(p.ticks){var G=void 0;if(A?G=E:(G=ct.ticks.number,_&&(G=this.getNumberOfFittingTicks(h,k,ct.ticks.verticalSpaceRatio))),1===p.ticks().length&&0===p.ticks()[0]&&(G=0),U.ticks(G),b)if(p.ticks(G).length){var H=Aa.getProperty(a,"timeScale","addSpaceOnEdges"),z=Aa.getProperty(a,"axes",o,"domain"),j=void 0,F=p.copy();H&&!z&&F.nice(G),j=F.ticks(G),H&&j.length>2&&!z&&(j.splice(j.length-1,1),j.splice(0,1)),U.tickValues(j)}else U.tickValues([])}var W=Aa.getProperty(y,"ticks","formatter");if(b){var q=Lm(U.tickValues());I=null===W?function(t,e){return Am(t,e,U.tickValues(),q,P)}:function(t,e){var n=Am(t,e,U.tickValues(),q,P);return W(t,e,n)}}else null===W?B===V.LINEAR&&(I=function(t){return t.toLocaleString()}):I=W;U.tickFormat(I);var Y,Z=this.services.cartesianScales.getScaleByPosition(o).domain(),X=Z[0],K=Z[1];if(T){if(b)T.forEach((function(t,e){void 0===t.getTime&&(T[e]=new Date(t))})),Y=T.filter((function(t){var e=t.getTime();return e>=new Date(X).getTime()&&e<=new Date(K).getTime()}));else if(w===V.LABELS){var Q=this.services.cartesianScales.getScaleByPosition(o).domain();Y=T.filter((function(t){return Q.includes(t)}))}else Y=T.filter((function(t){return t>=X&&t<=K}));U.tickValues(Y)}switch(o){case R.LEFT:v.attr("transform","translate("+this.margins.left+", 0)");break;case R.BOTTOM:v.attr("transform","translate(0, "+(h-this.margins.bottom)+")");break;case R.RIGHT:v.attr("transform","translate("+(c-this.margins.right)+", 0)");break;case R.TOP:v.attr("transform","translate(0, "+this.margins.top+")")}var $=this.model.isDataEmpty();if(y.title){var tt=Rf.appendOrSelect(d,"text.axis-title").html($||O?"":y.title),et=Aa.getProperty(y,"titleOrientation");switch(o){case R.LEFT:et===nt.RIGHT?tt.attr("transform","rotate(90)").attr("y",0).attr("x",p.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):tt.attr("transform","rotate(-90)").attr("y",0).attr("x",-p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case R.BOTTOM:tt.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+(h+4)+")").style("text-anchor","middle");break;case R.RIGHT:et===nt.LEFT?tt.attr("transform","rotate(-90)").attr("y",c).attr("x",-p.range()[0]/2).style("text-anchor","middle"):tt.attr("transform","rotate(90)").attr("y",-c).attr("x",p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case R.TOP:var rt=Rf.getSVGElementSize(tt,{useBBox:!0}).height;tt.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+rt/2+")").style("text-anchor","middle")}}if(b){var it=Lm(U.tickValues()),ot=P.showDayName,at=v;t&&(v=v.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})}))),v=v.call(U),at.selectAll(".tick").data(U.tickValues(),p).order().select("text").style("font-weight",(function(t,e){return Cm(t,e,U.tickValues(),it,ot)?"bold":"normal"}))}else v=t&&g?v.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})})).call(U):v.call(U);if(m.call(U),o===R.BOTTOM||o===R.TOP){var st=!1,ut=Aa.getProperty(y,"ticks","rotation");if(ut===J.ALWAYS)st=!0;else if(ut===J.NEVER)st=!1;else if(!ut||ut===J.AUTO)if(p.step){var lt=m.selectAll("g.tick text").nodes();st=lt.some((function(t){return Rf.getSVGElementSize(t,{useBBox:!0}).width>=p.step()}))}else{st=!1;var ht,dt=m.append("text").text("A").node().getBBox().width;m.selectAll("g.tick").each((function(){var t=ka(this),e=parseFloat(Aa.getProperty(Aa.getTranslationValues(this),"tx"));null!==e&&ht+t.text().length*dt*.8>=e&&(st=!0),ht=e}))}st?(A||(U.ticks(this.getNumberOfFittingTicks(c,k,ct.ticks.horizontalSpaceRatio)),m.call(U),v.call(U)),d.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",o===R.TOP?"start":"end")):d.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(O?d.attr("opacity",0):d.attr("opacity",1),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),m.selectAll("g.tick").attr("aria-label",(function(t){return t})),S!==N.NONE&&w===V.LABELS&&!T){var ft=this.services.cartesianScales.getScaleDomain(o);if(ft.length>0){var pt=u.select("g.axis."+o+" g.ticks g.tick").html();d.selectAll("g.ticks g.tick").html(pt),d.selectAll("g.tick text").data(ft).text((function(t){return t.length>M?Aa.truncateLabel(t,S,C):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(ft).text((function(t){return t.length>M?Aa.truncateLabel(t,S,C):t})),d.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),d.selectAll("g.tick text").data(ft)}}this.addEventListeners()}else v.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=Rf.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=Aa.getProperty(r,"axes",e),o=Aa.getProperty(i,"scaleType"),a=Aa.getProperty(i,"truncation","threshold"),s=(this.scaleType===V.TIME||(i.scaleType,V.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t,e){s.services.events.dispatchEvent(it.Axis.LABEL_MOUSEOVER,{event:t,element:ka(this),datum:e}),o===V.LABELS&&e.length>a&&s.services.events.dispatchEvent(it.Tooltip.SHOW,{event:t,hoveredElement:ka(this),content:e})})).on("mousemove",(function(t,e){s.services.events.dispatchEvent(it.Axis.LABEL_MOUSEMOVE,{event:t,element:ka(this),datum:e}),o===V.LABELS&&e.length>a&&s.services.events.dispatchEvent(it.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){s.services.events.dispatchEvent(it.Axis.LABEL_CLICK,{event:t,element:ka(this),datum:e})})).on("mouseout",(function(t,e){s.services.events.dispatchEvent(it.Axis.LABEL_MOUSEOUT,{event:t,element:ka(this),datum:e}),o===V.LABELS&&s.services.events.dispatchEvent(it.Tooltip.HIDE)}))},e.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" g.ticks.invisible")},e.prototype.getTitleRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" text.axis-title")},e.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return Aa.clamp(r,2,ct.ticks.number)},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;Rf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(_v),qb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.renderType=L.SVG,e.children={},e.thresholds=[],e.margins={top:0,right:0,bottom:0,left:0},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(R),i=Aa.getProperty(this.getOptions(),"axes");r.forEach((function(t){i[R[t]]&&(n[R[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=R[t];if(e.configs.axes[n]&&!e.children[n]){var r=new Wb(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=Rf.getSVGElementSize(a,{useBBox:!0}),u=s.width,l=s.height;switch(r.getTitleRef().empty()?n=0:(n=Rf.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i!==R.LEFT&&i!==R.RIGHT||(n+=5)),i){case R.TOP:o.top=l+n;break;case R.BOTTOM:o.bottom=l+n;break;case R.LEFT:o.left=u+n;break;case R.RIGHT:o.right=u+n}})),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(it.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(_v);const Yb={capture:!0,passive:!1};function Zb(t){t.preventDefault(),t.stopImmediatePropagation()}function Xb(t){var e=t.document.documentElement,n=ka(t).on("dragstart.drag",Zb,Yb);"onselectstart"in e?n.on("selectstart.drag",Zb,Yb):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Kb(t,e){var n=t.document.documentElement,r=ka(t).on("dragstart.drag",null);e&&(r.on("click.drag",Zb,Yb),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Qb=t=>()=>t;function $b(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function Jb(t){t.stopImmediatePropagation()}function t_(t){t.preventDefault(),t.stopImmediatePropagation()}var e_={name:"drag"},n_={name:"space"},r_={name:"handle"},i_={name:"center"};const{abs:o_,max:a_,min:s_}=Math;function u_(t){return[+t[0],+t[1]]}function l_(t){return[u_(t[0]),u_(t[1])]}var c_={name:"x",handles:["w","e"].map(m_),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},h_={name:"y",handles:["n","s"].map(m_),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},d_={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},f_={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},p_={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},g_={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},v_={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function m_(t){return{type:t}}function y_(t){return!t.ctrlKey&&!t.button}function b_(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function __(){return navigator.maxTouchPoints||"ontouchstart"in this}function x_(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function w_(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function O_(){return function(t){var e,n=b_,r=y_,i=__,o=!0,a=Vf("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([m_("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",d_.overlay).merge(n).each((function(){var t=x_(this).extent;ka(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([m_("selection")]).enter().append("rect").attr("class","selection").attr("cursor",d_.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return d_[t.type]})),e.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(i).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function l(){var t=ka(this),e=x_(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,a,s,u,h,d,f,p,g,v,m,y=this,b=n.target.__data__.type,_="selection"===(o&&n.metaKey?b="overlay":b)?e_:o&&n.altKey?i_:r_,x=t===h_?null:g_[b],w=t===c_?null:v_[b],O=x_(y),E=O.extent,T=O.selection,S=E[0][0],M=E[0][1],C=E[1][0],A=E[1][1],P=0,L=0,D=x&&w&&o&&n.shiftKey,k=Array.from(n.touches||[n],t=>{const e=t.identifier;return(t=Ra(t,y)).point0=t.slice(),t.identifier=e,t});fp(y);var R=c(y,arguments,!0).beforestart();if("overlay"===b){T&&(g=!0);const e=[k[0],k[1]||k[0]];O.selection=T=[[i=t===h_?S:s_(e[0][0],e[1][0]),s=t===c_?M:s_(e[0][1],e[1][1])],[h=t===h_?C:a_(e[0][0],e[1][0]),f=t===c_?A:a_(e[0][1],e[1][1])]],k.length>1&&U(n)}else i=T[0][0],s=T[0][1],h=T[1][0],f=T[1][1];a=i,u=s,d=h,p=f;var I=ka(y).attr("pointer-events","none"),N=I.selectAll(".overlay").attr("cursor",d_[b]);if(n.touches)R.moved=V,R.ended=G;else{var B=ka(n.view).on("mousemove.brush",V,!0).on("mouseup.brush",G,!0);o&&B.on("keydown.brush",H,!0).on("keyup.brush",z,!0),Xb(n.view)}l.call(y),R.start(n,_.name)}function V(t){for(const e of t.changedTouches||[t])for(const t of k)t.identifier===e.identifier&&(t.cur=Ra(e,y));if(D&&!v&&!m&&1===k.length){const t=k[0];o_(t.cur[0]-t[0])>o_(t.cur[1]-t[1])?m=!0:v=!0}for(const t of k)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,t_(t),U(t)}function U(t){const e=k[0],n=e.point0;var r;switch(P=e[0]-n[0],L=e[1]-n[1],_){case n_:case e_:x&&(P=a_(S-i,s_(C-h,P)),a=i+P,d=h+P),w&&(L=a_(M-s,s_(A-f,L)),u=s+L,p=f+L);break;case r_:k[1]?(x&&(a=a_(S,s_(C,k[0][0])),d=a_(S,s_(C,k[1][0])),x=1),w&&(u=a_(M,s_(A,k[0][1])),p=a_(M,s_(A,k[1][1])),w=1)):(x<0?(P=a_(S-i,s_(C-i,P)),a=i+P,d=h):x>0&&(P=a_(S-h,s_(C-h,P)),a=i,d=h+P),w<0?(L=a_(M-s,s_(A-s,L)),u=s+L,p=f):w>0&&(L=a_(M-f,s_(A-f,L)),u=s,p=f+L));break;case i_:x&&(a=a_(S,s_(C,i-P*x)),d=a_(S,s_(C,h+P*x))),w&&(u=a_(M,s_(A,s-L*w)),p=a_(M,s_(A,f+L*w)))}d<a&&(x*=-1,r=i,i=h,h=r,r=a,a=d,d=r,b in f_&&N.attr("cursor",d_[b=f_[b]])),p<u&&(w*=-1,r=s,s=f,f=r,r=u,u=p,p=r,b in p_&&N.attr("cursor",d_[b=p_[b]])),O.selection&&(T=O.selection),v&&(a=T[0][0],d=T[1][0]),m&&(u=T[0][1],p=T[1][1]),T[0][0]===a&&T[0][1]===u&&T[1][0]===d&&T[1][1]===p||(O.selection=[[a,u],[d,p]],l.call(y),R.brush(t,_.name))}function G(t){if(Jb(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Kb(t.view,g),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);I.attr("pointer-events","all"),N.attr("cursor",d_.overlay),O.selection&&(T=O.selection),w_(T)&&(O.selection=null,l.call(y)),R.end(t,_.name)}function H(t){switch(t.keyCode){case 16:D=x&&w;break;case 18:_===r_&&(x&&(h=d-P*x,i=a+P*x),w&&(f=p-L*w,s=u+L*w),_=i_,U(t));break;case 32:_!==r_&&_!==i_||(x<0?h=d-P:x>0&&(i=a-P),w<0?f=p-L:w>0&&(s=u-L),_=n_,N.attr("cursor",d_.selection),U(t));break;default:return}t_(t)}function z(t){switch(t.keyCode){case 16:D&&(v=m=D=!1,U(t));break;case 18:_===i_&&(x<0?h=d:x>0&&(i=a),w<0?f=p:w>0&&(s=u),_=r_,U(t));break;case 32:_===n_&&(t.altKey?(x&&(h=d-P*x,i=a+P*x),w&&(f=p-L*w,s=u+L*w),_=i_):(x<0?h=d:x>0&&(i=a),w<0?f=p:w>0&&(s=u),_=r_),N.attr("cursor",d_[b]),U(t));break;default:return}t_(t)}}function f(t){c(this,arguments).moved(t)}function p(t){c(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=l_(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n,r){e.tween?e.on("start.brush",(function(t){c(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){c(this,arguments).end(t)})).tween("brush",(function(){var e=this,r=e.__brush,i=c(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Uu(o,a);function u(t){r.selection=1===t&&null===a?null:s(t),l.call(e),i.brush()}return null!==o&&null!==a?u:u(1)})):e.each((function(){var e=this,i=arguments,o=e.__brush,a=t.input("function"==typeof n?n.apply(e,i):n,o.extent),s=c(e,i).beforestart();fp(e),o.selection=null===a?null:a,l.call(e),s.start(r).brush(r).end(r)}))},u.clear=function(t,e){u.move(t,null,e)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=ka(this.that).datum();a.call(e,this.that,new $b(e,{sourceEvent:n,target:u,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:Qb(l_(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:Qb(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Qb(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(o=!!t,u):o},u.on=function(){var t=a.on.apply(a,arguments);return t===a?u:t},u}(c_)}var E_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",e.renderType=L.SVG,e.selectionSelector="rect.selection",e.frontSelectionSelector="rect.frontSelection",e}return n(e,t),e.prototype.render=function(t){var n=this,r=this.parent,i=this.getComponentContainer(),o=Rf.appendOrSelect(r,"svg.chart-grid-backdrop"),a=Rf.appendOrSelect(o,"g."+this.type),s=Rf.appendOrSelect(a,this.selectionSelector),u=Rf.getSVGElementSize(o,{useAttrs:!0}),l=u.width,c=u.height,h=this.services.cartesianScales,d=h.getMainXScaleType(),f=h.getMainXScale(),p=f.range(),g=p[0];p[1];i.attr("transform","translate("+g+",0)");var v=Rf.appendOrSelect(i,this.frontSelectionSelector);if(f&&d===V.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain())&&this.model.set({zoomDomain:m},{animate:!1});var y=function(t,e){var r=wh().range([0,l]).domain(m),i=[r.invert(t),r.invert(e)];i[0].valueOf()===i[1].valueOf()&&(i=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===i[0].valueOf()&&m[1].valueOf()===i[1].valueOf()||n.services.zoom.handleDomainChange(i)},b=O_().extent([[0,0],[l-1,c]]).on("start brush end",(function(t){var n=t.selection;null!==n&&n[0]!==n[1]&&(v.attr("x",parseFloat(s.attr("x"))+parseFloat(o.attr("x"))).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),function(t){for(var n=t[1]-t[0],r="0,"+n.toString(),i=Math.floor(c/e.DASH_LENGTH),o=i*e.DASH_LENGTH,a=0;a<i;a++)r+=","+e.DASH_LENGTH;r+=","+(c-o),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+c.toString(),v.attr("stroke-dasharray",r)}(n))})).on("end.brushed",(function(t){var e=t.selection;null!==e&&(y(e[0],e[1]),a.call(b.move,null),v.style("display","none"))}));a.call(b);var _=this.services.zoom.getZoomRatio();o.on("click",(function(t){if(t.shiftKey){var e=this.services.domUtils.getHolder(),n=Ra(a.node(),e)[0],r=n-l*_/2;r<0&&(r=0);var i=n+l*_/2;i>l&&(i=l),y(r,i)}}))}},e.DASH_LENGTH=4,e}(_v),T_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e.renderType=L.SVG,e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=Aa.getProperty(this.getOptions(),"grid","x","enabled"),n=Aa.getProperty(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(Rf.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(Rf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("height"),i=jb(this.services.cartesianScales.getMainXScale()).tickSizeInner(-r).tickSizeOuter(0);if(Aa.getProperty(this.getOptions(),"grid","x","alignWithAxisTicks")){var o=this.services.cartesianScales.getDomainAxisPosition(),a=Aa.getProperty(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=Aa.getProperty(this.getOptions(),"grid","x","numberOfTicks");i.ticks(s)}var u=n.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+r+")");t?u.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):u.call(i),this.cleanGrid(u)},e.prototype.drawYGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("width"),i=Fb(this.services.cartesianScales.getMainYScale()).tickSizeInner(-r).tickSizeOuter(0);if(Aa.getProperty(this.getOptions(),"grid","y","alignWithAxisTicks")){var o=this.services.cartesianScales.getRangeAxisPosition(),a=Aa.getProperty(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=Aa.getProperty(this.getOptions(),"grid","y","numberOfTicks");i.ticks(s)}var u=n.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");t?u.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):u.call(i),this.cleanGrid(u)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(Aa.getTranslationValues(t).tx)-Number(Aa.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+Aa.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=+Aa.getTranslationValues(s).tx-+Aa.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=Rf.getSVGElementSize(u).width-+Aa.getTranslationValues(a).tx}else o=+Aa.getTranslationValues(s).tx;return o*this.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=Aa.getProperty(this.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=Aa.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(t,e){var n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],s=o[1],u=i.range(),l=u[0],c=u[1];this.backdrop=Rf.appendOrSelect(n,"svg.chart-grid-backdrop");var h=Rf.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",a).attr("y",c).attr("width",Math.abs(s-a)).attr("height",Math.abs(l-c)).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){t.selectAll("text").remove(),t.select(".domain").remove()},e}(_v);var S_,M_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.renderType=L.SVG,e.isXGridEnabled=Aa.getProperty(e.getOptions(),"grid","x","enabled"),e.isYGridEnabled=Aa.getProperty(e.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=Aa.getProperty(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()},e.prototype.removeBackdropEventListeners=function(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)},e.prototype.formatTooltipData=function(t){return t},e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.services.cartesianScales.getOrientation(),s=this.model.getDisplayData(),u=this.services.cartesianScales.getRangeScale().range(),l=u[0],c=u[1],h=a===B.HORIZONTAL?i:r,d=Rf.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),f=Rf.appendOrSelect(d,"line.ruler-line"),p=o.selectAll("[role=graphics-symbol]"),g=s.map((function(t){return{domainValue:n.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,h)}));if(this.pointsWithinLine&&g.length===this.pointsWithinLine.length&&g.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=g,this.services.events.dispatchEvent(it.Tooltip.MOVE,{mousePosition:[r,i]});this.pointsWithinLine=g;var v=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(h-e.domainValue),i=Math.abs(h-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(v.length>0){var m=v.map((function(t){return t.originalData})).filter((function(t){var e=t[n.services.cartesianScales.getRangeIdentifier(t)];return null!=e})),y=v.map((function(t){return t.domainValue})),b=p.filter((function(t){var e=n.services.cartesianScales.getDomainValue(t);return y.includes(e)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Aa.isEqual(this.elementsToHighlight,b)&&this.hideRuler(),b.dispatch("mouseover"),this.elementsToHighlight=b,this.services.events.dispatchEvent(it.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:f,data:this.formatTooltipData(m)}),d.attr("opacity",1);var _=v[0];"horizontal"===a?f.attr("x1",c).attr("x2",l).attr("y1",_.domainValue).attr("y2",_.domainValue):f.attr("y1",c).attr("y2",l).attr("x1",_.domainValue).attr("x2",_.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=Rf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(it.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.services.domUtils.getHolder(),n=this.model.getDisplayData(),r=function(e){var n=Ra(e,t.parent.node());t.showRuler(e,n)};if(n.length>100){var i=n.length%50*12.5;r=Aa.debounceWithD3MousePosition((function(e){var n=this.mousePosition;t.showRuler(e,n)}),i,e)}this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent;this.backdrop=Rf.appendOrSelect(t,"svg.chart-grid-backdrop")},e}(_v),C_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler-binned",e.renderType=L.SVG,e}return n(e,t),e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.model.getOptions(),s=this.services.cartesianScales.getOrientation(),u=this.services.cartesianScales.getRangeScale().range(),l=u[0],c=u[1],h=this.services.cartesianScales.getDomainScale(),d=h.invert(s===B.VERTICAL?r:i),f=Rf.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),p=Rf.appendOrSelect(f,"line.ruler-line"),g=o.selectAll("[role=graphics-symbol]").filter((function(t){if(parseFloat(kn(t,"data.x0"))<=d&&parseFloat(kn(t,"data.x1"))>=d)return!0}));if(g.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!Aa.isEqual(this.elementsToHighlight,g)&&this.hideRuler(),g.dispatch("mouseover"),this.elementsToHighlight=g;var v=ka(g.nodes()[0]).datum(),m=parseFloat(kn(v,"data.x0")),y=parseFloat(kn(v,"data.x1")),b=this.model.getActiveDataGroupNames(),_=b.reverse().map((function(t){return{label:"Group",value:kn(v,"data."+t),class:n.model.getColorClassName({classNameTypes:[k.TOOLTIP],dataGroupName:t})}})).filter((function(t){return 0!==t.value}));if(_.length>0){this.services.events.dispatchEvent(it.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:p,items:P([{label:kn(a,"bins.rangeLabel")||"Range",value:m+" – "+y}],_,!0===Aa.getProperty(a,"tooltip","showTotal")?[{label:kn(a,"tooltip.totalLabel")||"Total",value:b.reduce((function(t,e){return t+parseFloat(kn(v,"data."+e))}),0)}]:[])}),f.attr("opacity",1);var x=h((m+y)/2);"horizontal"===s?p.attr("x1",c).attr("x2",l).attr("y1",x).attr("y2",x):p.attr("y1",c).attr("y2",l).attr("x1",x).attr("x2",x)}else this.hideRuler()}else this.hideRuler()},e}(M_),A_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e}(M_),P_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.renderType=L.HTML,e}return n(e,t),e.prototype.init=function(){var t=this,e=function(){return t.updateOverflowMenu(!1)};this.services.events.addEventListener(it.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(it.Toolbar.HIDE_OVERFLOW_MENU,(function(){document.body.removeEventListener("click",e)}))},e.prototype.render=function(t){var e=this.getComponentContainer();this.overflowMenu||(this.overflowMenu=e.append("div").attr("class","bx--overflow-menu-options bx--overflow-menu--flip").attr("tabindex",-1).attr("role","menu").html("<ul></ul>"));var n=this.getControlConfigs(),r=n.buttonList;n.overflowMenuItemList&&r.push(this.getOverflowButtonConfig());var i=e.selectAll("div.toolbar-control").data(r,(function(t){return t.id}));i.exit().remove();i.enter().append("div").attr("class","toolbar-control bx--overflow-menu").merge(i).classed("disabled",(function(t){return!!t.shouldBeDisabled&&t.shouldBeDisabled()})).html((function(t){return'\n\t\t\t<button\n\t\t\t\tclass="bx--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="'+t.id+'">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" style="will-change: transform; width: '+(void 0!==t.iconWidth?t.iconWidth:"20px")+"; height: "+(void 0!==t.iconWidth?t.iconHeight:"20px")+'" xmlns="http://www.w3.org/2000/svg" class="bx--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t'+t.iconSVGContent+"\n\t\t\t\t</svg>\n\t\t\t</button>"})).each((function(t){ka(this).select("button").on("click",t.clickFunction).on("keyup",(function(e){(e.key&&"Enter"===e.key||" "===e.key)&&(e.preventDefault(),t.clickFunction())}))}));this.overflowButton=this.getComponentContainer().select("button.bx--overflow-menu__trigger#toolbar-overflow-menu")},e.prototype.renderOverflowMenu=function(){var t=this.getControlConfigs().overflowMenuItemList,e=this.overflowMenu.select("ul").selectAll("li.bx--overflow-menu-options__option").data(t,(function(t){return Aa.getProperty(t,"id")}));e.exit().remove();var n=e.enter().append("li").attr("id",(function(t){return t.id})).attr("class","bx--overflow-menu-options__option");n.append("button").attr("class","bx--overflow-menu-options__btn").attr("role","menuitem"),n.merge(e).classed("bx--overflow-menu-options__option--disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-disabled",(function(t){return t.shouldBeDisabled()})).selectAll("button").text((function(t){return t.text}))},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.classed("is-open")},e.prototype.updateOverflowMenu=function(t){this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),ka(this.overflowButton.node().parentNode).classed("bx--overflow-menu--open",t)),t?this.services.events.dispatchEvent(it.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(it.Toolbar.HIDE_OVERFLOW_MENU)},e.prototype.focusOnPreviousEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=ka("#"+e[n].id+" button").node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=ka("#"+e[n].id+" button").node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var e=this;this.getOverflowMenuItems().forEach((function(n,r){var i=ka("#"+n.id);null!==i&&(i.on("click",(function(){n.clickFunction(),e.updateOverflowMenu(!1)})),i.on("keyup",(function(){"Enter"===t.key?n.clickFunction():"ArrowUp"===t.key?e.focusOnPreviousEnabledMenuItem(r):"ArrowDown"===t.key&&e.focusOnNextEnabledMenuItem(r)})))})),e.focusOnNextEnabledMenuItem(-1)}t.stopImmediatePropagation()},e.prototype.getControlConfigs=function(){var t=this,e=Aa.getProperty(this.getOptions(),"toolbar","numberOfIcons"),n=Aa.getProperty(this.getOptions(),"toolbar","controls"),r=[],i=[];return n.forEach((function(e){var n=t.getControlConfigByType(e.type);n&&(n.text=e.text?e.text:e.type,-1!==n.id.indexOf("toolbar-export")?i.push(n):r.push(n))})),r.length<=e&&0===i.length?{buttonList:r}:{buttonList:r.splice(0,e-1),overflowMenuItemList:r.concat(i)}},e.prototype.getOverflowMenuItems=function(){var t=this.getControlConfigs().overflowMenuItemList;return t||[]},e.prototype.getOverflowButtonConfig=function(){var t=this;return{id:"toolbar-overflow-menu",shouldBeDisabled:function(){return!1},iconSVGContent:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="24" r="2"></circle>',clickFunction:function(e){return t.toggleOverflowMenu(e)}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState();switch(t){case et.ZOOM_IN:r&&(e={id:"toolbar-zoomIn",shouldBeDisabled:function(){return n.services.zoom.isMinZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomIn()}});break;case et.ZOOM_OUT:r&&(e={id:"toolbar-zoomOut",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomOut()}});break;case et.RESET_ZOOM:r&&(e={id:"toolbar-resetZoom",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.resetZoomDomain()}});break;case et.MAKE_FULLSCREEN:e={id:"toolbar-makefullscreen",iconSVGContent:this.getControlIconByType(t),iconWidth:"15px",iconHight:"15px",shouldBeDisabled:function(){return!1},clickFunction:function(){n.services.domUtils.toggleFullscreen()}};break;case et.SHOW_AS_DATATABLE:e={id:"toolbar-showasdatatable",iconSVGContent:this.getControlIconByType(t),shouldBeDisabled:!1,clickFunction:function(){return n.services.events.dispatchEvent(it.Modal.SHOW)}};break;case et.EXPORT_CSV:e={id:"toolbar-export-CSV",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.model.exportToCSV()}};break;case et.EXPORT_PNG:e={id:"toolbar-export-PNG",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.domUtils.exportToPNG()}};break;case et.EXPORT_JPG:e={id:"toolbar-export-JPG",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.domUtils.exportToJPG()}};break;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case et.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case et.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case et.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case et.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case et.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case et.EXPORT_CSV:case et.EXPORT_JPG:case et.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}},e}(_v),L_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e.renderType=L.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),r=this.services.cartesianScales.getScaleByPosition(n),i=r.domain(),o=i[0],a=i[1],s=o>0&&a<0||o<0&&a>0,u=this.getComponentContainer();if(s){var l=this.services.cartesianScales.getDomainScale().range(),c=l[0],h=l[1],d=+r(0)+.5;d||(d=r.range()[0]);var f=Aa.flipSVGCoordinatesBasedOnOrientation({x0:c,x1:h,y0:d,y1:d},this.services.cartesianScales.getOrientation());Rf.appendOrSelect(u,"line.domain").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"zero-line-update",animate:t})})).attr("y1",f.y0).attr("y2",f.y1).attr("x1",f.x0).attr("x2",f.x1)}else u.selectAll("line.domain").remove()},e}(_v),D_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.renderType=L.SVG,e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=O_(),e.highlightStrokeWidth=1,e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(it.ZoomBar.UPDATE,this.render.bind(this));var t=Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),r=this.services.zoom.isZoomBarLoading(R.TOP),i=this.services.zoom.isZoomBarLocked(R.TOP),o=Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"type"),a=Aa.getProperty(this.getOptions(),"axes",R.BOTTOM,"highlights"),s=Et.height[o],u=Rf.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(0!==u){var l=0,c=this.model.get("axesMargins");c&&c.left&&(l=c.left);var h=Rf.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",s).attr("opacity",1);Rf.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",s).attr("width","100%").attr("height",Et.spacerHeight).attr("opacity",1).attr("fill","none");if(o===I.GRAPH_VIEW?Rf.appendOrSelect(h,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",u-l).attr("height","100%").classed("zoom-bg-skeleton",r):o===I.SLIDER_VIEW&&Rf.appendOrSelect(h,"rect.zoom-slider-bg").attr("x",l).attr("y",s/2-1).attr("width",u-l).attr("height",2).classed("zoom-slider-bg-skeleton",r),r)this.renderSkeleton(h,l,u);else{var d=this.services.cartesianScales,f=d.getMainXScale(),p=d.getMainYScale(),g=d.getMainXScaleType();if(f&&g===V.TIME){var v=this.services.zoom.getZoomBarData();if(Aa.isEmpty(v)||1===v.length)return;this.xScale=f.copy(),this.yScale=p.copy();var m=this.services.zoom.getDefaultZoomBarDomain(v);v=this.compensateDataForDefaultDomain(v,m);var y=this.model.get("initialZoomDomain"),b=Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"initialZoomDomain");b&&b[0]&&b[1]&&(b[0]=new Date(b[0]),b[1]=new Date(b[1])),!b||y&&y[0].valueOf()===b[0].valueOf()&&y[1].valueOf()===b[1].valueOf()?null===b&&null!=y&&this.model.set({initialZoomDomain:null,zoomDomain:Aa.merge([],m)},{skipUpdate:!0}):this.model.set({initialZoomDomain:Aa.merge([],b),zoomDomain:b?Aa.merge([],b):m},{skipUpdate:!0}),this.xScale.range([l,u]).domain(m),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,s-6]).domain(Ss(v,(function(t){return t.value})));var _=this.model.get("zoomDomain");if(o===I.GRAPH_VIEW&&(this.renderZoomBarArea(h,"path.zoom-graph-area-unselected",v,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(h,"path.zoom-graph-area",v,this.clipId),this.renderZoomBarBaseline(h,l,u),a)){var x=a.highlightStartMapsTo,w=a.highlightEndMapsTo,O=a.color,E=a.labelMapsTo;a.data.forEach((function(t,n){Rf.appendOrSelect(h,"rect.highlight-"+n).attr("height",s-2*e.highlightStrokeWidth).attr("y",e.highlightStrokeWidth).attr("x",e.xScale(t[x])).attr("width",e.xScale(t[w])-e.xScale(t[x])).style("fill",O&&O.scale[t[E]]?O.scale[t[E]]:null).style("fill-opacity",.1).style("stroke",O&&O.scale[t[E]]?O.scale[t[E]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(_,l,u);var T=Rf.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===_);else if(_[0].valueOf()===_[1].valueOf())T.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range(),this.xScale.domain());else{var S=_.map((function(t){return e.xScale(t)}));S[1]-S[0]<this.MIN_SELECTION_DIFF||(T.call(this.brush.move,S),this.updateBrushHandle(this.getComponentContainer(),S,_))}i&&(this.brush.filter((function(){return!1})),T.selectAll("rect").attr("cursor","auto"))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"type"),o=Et.height[i];this.brush.extent([[e,0],[n,o]]).on("start brush end",null).on("start brush end",(function(e){var n=e.selection;null===n?r.handleBrushedEvent(e,t,r.xScale,r.xScale.range()):n[0]===n[1]||r.handleBrushedEvent(e,t,r.xScale,n)}))},e.prototype.handleBrushedEvent=function(t,e,n,r){var i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r,i),null!=t.sourceEvent&&("mousemove"===t.sourceEvent.type||"mouseup"===t.sourceEvent.type||"mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type||"touchmove"===t.sourceEvent.type||"touchend"===t.sourceEvent.type)){void 0!==e&&e[0]===i[0]&&e[1]===i[1]||this.services.zoom.handleDomainChange(i,{dispatchEvent:!1});var o=void 0;"start"===t.type?o=it.ZoomBar.SELECTION_START:"brush"===t.type?o=it.ZoomBar.SELECTION_IN_PROGRESS:"end"===t.type&&(o=it.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(it.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(o,{selection:r,newDomain:i})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=Et.handleWidth,o=Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"type"),a=Et.height[o],s=-i/2,u=Et.handleBarWidth,l=o===I.GRAPH_VIEW?Et.handleBarHeight:6,c=-u/2,h=(a-l)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,r.maxSelectionRange[1]-i):void 0})).attr("y",0).attr("width",i).attr("height",a).attr("cursor","ew-resize").style("display",null);var d=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);d.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),d.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,r.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,r.maxSelectionRange[1]+s+c):void 0})).attr("y",h).attr("width",u).attr("height",l).attr("cursor","ew-resize"),o===I.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],a)},e.prototype.updateSliderSelectedArea=function(t){var e=Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"type"),n=Et.height[e],r=(Rf.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getComponentContainer().select("svg.zoom-container");Rf.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)},e.prototype.renderZoomBarArea=function(t,e,n,r){var i=this.services.cartesianScales,o=i.getMainXAxisPosition(),a=i.getMainYAxisPosition(),s=i.getMainXScaleType(),u=i.getMainYScaleType(),l=function(t,e,n){return function(r,o){return i.getValueFromScale(t,e,n,r,o)}},c=l(this.xScale,s,o),h=l(this.yScale,u,a),d=Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"type"),f=Et.height[d],p=nd().x((function(t,e){return c(t,e)})).y0(f).y1((function(t,e){return f-h(t,e)})),g=Rf.appendOrSelect(t,e).datum(n).attr("d",p);r&&g.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,o){var a=Rf.appendOrSelect(t,"clipPath").attr("id",e);Rf.appendOrSelect(a,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=Aa.clone(t),i=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(r[0][i]))(n={})[i]=e[0],n[o]=0,r.unshift(n);if(Number(e[1])>Number(r[r.length-1][i]))(n={})[i]=e[1],n[o]=0,r.push(n);return r}},e.prototype.renderZoomBarBaseline=function(t,e,n,r){void 0===r&&(r=!1);var i=Aa.getProperty(this.model.getOptions(),"zoomBar",R.TOP,"type"),o=Et.height[i],a=ed()([[e,o],[n,o]]);Rf.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",a).classed("zoom-bg-baseline-skeleton",r)},e.prototype.renderSkeleton=function(t,e,n){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),Rf.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"type")===I.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(it.ZoomBar.UPDATE,this.render.bind(this))},e}(_v),k_=function(){function t(t,e){this.services={domUtils:Rf,files:Nf,events:If,gradientUtils:Zp,transitions:Yp,canvasZoom:bv},this.model=new uf(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},{skipUpdate:!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(it.Model.UPDATE,(function(t){var e=!!Aa.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(it.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(it.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},{skipUpdate:!0})},t.prototype.getChartComponents=function(t,e){var n={id:"title",components:[new Nm(this.model,this.services)],growth:F.PREFERRED},r={id:"legend",components:[new xv(this.model,this.services)],growth:F.PREFERRED},i=Aa.getProperty(this.model.getOptions(),"canvasZoom","enabled");i&&!0===i&&t.push(new Hm(this.model,this.services));var o={id:"graph-frame",components:t,growth:F.STRETCH,renderType:Aa.getProperty(e,"graphFrameRenderType")||L.SVG},a=!0!==Aa.getProperty(e,"excludeLegend")&&!1!==this.model.getOptions().legend.enabled,s=j.COLUMN;if(a){var u=Aa.getProperty(this.model.getOptions(),"legend","position");"left"===u?(s=j.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=H.VERTICAL)):"right"===u?(s=j.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=H.VERTICAL)):"bottom"===u&&(s=j.COLUMN_REVERSE)}var l={id:"spacer",components:[new Db(this.model,this.services)],growth:F.PREFERRED},c={id:"full-frame",components:[new kb(this.model,this.services,P(a?[r]:[],a?[l]:[],[o]),{direction:s})],growth:F.STRETCH},h=[];if(this.model.getOptions().title){h.push(n);var d={id:"spacer",components:[new Db(this.model,this.services)],growth:F.PREFERRED};h.push(d)}return h.push(c),[new Vm(this.model,this.services),new Om(this.model,this.services),new kb(this.model,this.services,h,{direction:j.COLUMN})]},t}(),R_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.assignRangeAndDomains=function(){var t=this.services.cartesianScales,e=this.getOptions(),n=t.isDualAxes(),r={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=t.secondaryDomainAxisPosition,r.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(r).forEach((function(n){var i=r[n];t.scales[i]?r[n]={position:i,label:t.getScaleLabel(i),identifier:Aa.getProperty(e,"axes",i,"mapsTo")}:r[n]=null})),r},e.prototype.getTabularDataArray=function(){var t,e=this.getDisplayData(),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales,i=this.assignRangeAndDomains(),o=i.primaryDomain,a=i.primaryRange,s=i.secondaryDomain,u=i.secondaryRange;return r.getDomainAxisScaleType()===V.TIME&&(t=function(t){return uv(t,"MMM d, yyyy")}),P([P(["Group",o.label,a.label],s?[s.label]:[],u?[u.label]:[])],e.map((function(e){return P([e[n],null===e[o.identifier]?"&ndash;":t?t(e[o.identifier]):e[o.identifier],null===e[a.identifier]||isNaN(e[a.identifier])?"&ndash;":e[a.identifier].toLocaleString()],s?[null===e[s.identifier]?"&ndash;":e[s.identifier]]:[],u?[null===e[u.identifier]||isNaN(e[u.identifier])?"&ndash;":e[u.identifier]]:[])})))},e.prototype.exportToCSV=function(){var t=this.getTabularDataArray().map((function(t){return t.map((function(t){return'"'+t+'"'}))})),e="",n="";t.forEach((function(r,i){n=r.join(","),e+=i<t.length?n+"\n":n})),this.services.files.downloadCSV(e,"myChart.csv")},e.prototype.setData=function(e){var n;if(e&&(n=t.prototype.setData.call(this,e),Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"enabled"))){var r=Aa.getProperty(this.getOptions(),"zoomBar",R.TOP,"data");this.setZoomBarData(r)}return n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(Aa.clone(t)):this.getDisplayData(),n=e,r=this.services.cartesianScales;if(e&&r.domainAxisPosition&&r.rangeAxisPosition){var i=r.getDomainIdentifier(),o=r.getRangeIdentifier(),a=e.map((function(t){return t[i].getTime()}));n=(a=Aa.removeArrayDuplicates(a).sort()).map((function(t){var n=0,r={};return e.forEach((function(e){e[i].getTime()===t&&(n+=e[o])})),r[i]=new Date(t),r[o]=n,r}))}this.set({zoomBarData:n})},e.prototype.getZoomBarData=function(){return this.get("zoomBarData")},e.prototype.sanitizeDateValues=function(t){var e=this.getOptions();if(!e.axes)return t;var n=[];return Object.keys(R).forEach((function(t){var r=R[t],i=e.axes[r];if(i&&i.scaleType===V.TIME){var o=i.mapsTo;null===o&&void 0===o||n.push(o)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){null===Aa.getProperty(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t},e.prototype.sanitize=function(e){return e=t.prototype.sanitize.call(this,e),e=this.sanitizeDateValues(e)},e}(uf),I_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:vv,curves:mv,zoom:yv}),r.model=new R_(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=Aa.getProperty(n,"zoomBar",R.TOP,"enabled"),i=Aa.getProperty(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var o=this.services.cartesianScales.getMainXAxisPosition(),a=Aa.getProperty(n,"axes",o,"scaleType"),s=r&&o===R.BOTTOM&&a===V.TIME,u=this.services.zoom.isZoomBarLocked(R.TOP),l=!!this.model.getOptions().title,c={id:"title",components:[new Nm(this.model,this.services)],growth:F.STRETCH},h={id:"toolbar",components:[new P_(this.model,this.services)],growth:F.PREFERRED},d={id:"header",components:[new kb(this.model,this.services,P([c],i?[h]:[]),{direction:j.ROW,alignItems:W.CENTER})],growth:F.PREFERRED},f={id:"legend",components:[new xv(this.model,this.services)],growth:F.PREFERRED};s&&!u&&t.push(new Gm(this.model,this.services),new E_(this.model,this.services)),t.push(new Im(this.model,this.services)),t.push(new zm(this.model,this.services));var p={id:"graph-frame",components:t,growth:F.STRETCH,renderType:L.SVG},g=!1!==Aa.getProperty(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,v=j.COLUMN;if(g){var m=Aa.getProperty(this.model.getOptions(),"legend","position");m===U.LEFT?(v=j.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=H.VERTICAL)):m===U.RIGHT?(v=j.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=H.VERTICAL)):m===U.BOTTOM&&(v=j.COLUMN_REVERSE)}var y={id:"spacer",components:[new Db(this.model,this.services)],growth:F.PREFERRED},b={id:"full-frame",components:[new kb(this.model,this.services,P(g?[f]:[],g?[y]:[],[p]),{direction:v})],growth:F.STRETCH},_={id:"zoom-bar",components:[new D_(this.model,this.services)],growth:F.PREFERRED,renderType:L.SVG},x=[];if(l||i){x.push(d);var w={id:"spacer",components:[new Db(this.model,this.services,i?{size:15}:void 0)],growth:F.PREFERRED};x.push(w)}return s&&x.push(_),x.push(b),[new Um(this.model,this.services),new Om(this.model,this.services),new kb(this.model,this.services,x,{direction:j.COLUMN})]},e}(k_),N_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(Aa.clone(xs.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new M_(this.model,this.services),new ty(this.model,this.services),new jm(this.model,this.services),new Km(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new sy(this.model,this.services,{skeleton:Y.GRID})];return this.getAxisChartComponents(t)},e}(I_),B_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new A_(this.model,this.services),new Fm(this.model,this.services),new ty(this.model,this.services,{stacked:!0}),new ny(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new sy(this.model,this.services,{skeleton:Y.GRID})];return this.getAxisChartComponents(t)},e}(I_),V_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new qm(this.model,this.services),new L_(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(I_),U_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new Ym(this.model,this.services),new L_(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(I_),G_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new A_(this.model,this.services),new Zm(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.VERT_OR_HORIZ}),new L_(this.model,this.services)];return this.getAxisChartComponents(t)},e}(I_),H_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getBoxQuartiles=function(t){return{q_25:Fs(t,.25),q_50:Fs(t,.5),q_75:Fs(t,.75)}},e.prototype.getBoxplotData=function(){for(var t=this.getOptions().data.groupMapsTo,e=this.getGroupedData(),n=[],r=function(e,r){for(var o,a=i.services.cartesianScales.getRangeIdentifier(),s=r.map((function(t){return t[a]})).sort(Os),u=((o={})[t]=e,o.counts=s,o.quartiles=i.getBoxQuartiles(s),o.outliers=null,o.whiskers=null,o),l=u.quartiles.q_25,c=u.quartiles.q_75,h=1.5*(c-l),d=l-h,f=c+h,p=[],g=[],v=0,m=s;v<m.length;v++){var y=m[v];y<d?p.push(y):y>f?p.push(y):g.push(y)}u.outliers=p;var b=zs(g),_=Hs(g);u.whiskers={min:b||zs([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75]),max:_||Hs([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75])},n.push(u)},i=this,o=0,a=e;o<a.length;o++){var s=a[o];r(s.name,s.data)}return n},e.prototype.setColorClassNames=function(){var t=Aa.getProperty(this.getOptions(),"color","pairing"),e=Aa.getProperty(t,"option");e=e<=ft.pairingOptions["1-color"]?e:1;var n=this.allDataGroups.map((function(t,n){return"1-"+e+"-1"}));this.colorClassNames=Xs().range(n).domain(this.allDataGroups)},e}(R_),z_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new H_(r.services),r.model.setOptions(Aa.mergeDefaultChartOptions(xs.boxplotChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new Xm(this.model,this.services),new L_(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})},e}(I_),j_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new M_(this.model,this.services),new Qm(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.GRID})];return this.getAxisChartComponents(t)},e}(I_),F_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.bulletChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new $m(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.GRID})];return this.getAxisChartComponents(t)},e}(I_),W_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this.getBinnedStackedData();return P([P([kn(t,"bins.rangeLabel")||"Range"],n.map((function(t){return kn(t,"0."+e)})))],kn(n,0).map((function(t,r){return P([kn(t,"data.x0")+" – "+kn(t,"data.x1")],n.map((function(t){return kn(t[r],"data."+kn(t[r],e))})))})))},e}(R_),q_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new W_(r.services),r.model.setOptions(Aa.mergeDefaultChartOptions(xs.histogramChart,n.options)),r.init(e,n),r.update(),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new C_(this.model,this.services),new Jm(this.model,this.services)];return this.getAxisChartComponents(t)},e}(I_),Y_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new M_(this.model,this.services),new ty(this.model,this.services),new Km(this.model,this.services,{handleThresholds:!0}),new uy(this.model,this.services),new L_(this.model,this.services)];return this.getAxisChartComponents(t)},e}(I_),Z_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.lollipopChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new M_(this.model,this.services),new ey(this.model,this.services),new Km(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.GRID})];return this.getAxisChartComponents(t)},e}(I_),X_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new qb(this.model,this.services),new T_(this.model,this.services),new M_(this.model,this.services),new Km(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.GRID})];return this.getAxisChartComponents(t)},e}(I_),K_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularData=function(e){var n=t.prototype.getTabularData.call(this,e);return e!==n&&n.forEach((function(t){t.key&&t.key!==t.group&&(t.group=t.key)})),n},e.prototype.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}(uf),Q_=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new K_(i.services),r?i:(i.model.setOptions(Aa.mergeDefaultChartOptions(xs.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new iy(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.PIE})];return this.getChartComponents(t)},e}(k_),$_=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ay(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.DONUT})];return this.getChartComponents(t)},e}(Q_),J_=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getMaximumDomain=function(t){return t.reduce((function(t,e){return t+e.value}),0)},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=Aa.getProperty(n,"color","scale"),i=this.getStatus();return r||!i?t.prototype.getFillColor.call(this,e):null},e.prototype.getStatus=function(){var t=this.getOptions(),e=Aa.getProperty(this.getDisplayData(),0,"value"),n=e>100?100:e,r=Aa.getProperty(t,"meter","status","ranges");if(r){var i=r.filter((function(t){return t.range[0]<=n&&n<=t.range[1]}));if(i.length>0)return i[0].status}return null},e}(uf),tx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e.renderType=L.SVG,e}return n(e,t),e.prototype.getStackedBounds=function(t,e){var n=0;return t.map((function(t,r){return 0!==r?(n+=e(t.value),C(C({},t),{width:Math.abs(e(t.value)-yt.dividerWidth),x:n-e(t.value)})):(n=e(t.value),C(C({},t),{width:Math.abs(e(t.value)-yt.dividerWidth),x:0}))}))},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i=this,o=this.getComponentContainer(),a=this.getOptions(),s=Aa.getProperty(a,"meter","proportional"),u=this.model.getDisplayData(),l=this.model.getStatus(),c=Rf.getSVGElementSize(o,{useAttrs:!0}).width,h=a.data.groupMapsTo;if(null===Aa.getProperty(a,"meter","proportional"))n=100;else{var d=Aa.getProperty(a,"meter","proportional","total");n=d||this.model.getMaximumDomain(this.model.getDisplayData())}var f=_l().domain([0,n]).range([0,c]),p=this.getStackedBounds(u,f),g=Aa.getProperty(a,"meter","height");Rf.appendOrSelect(o,"rect.container").attr("x",0).attr("y",0).attr("width",c).attr("height",g||(s?yt.height.proportional:yt.height.default)),Rf.appendOrSelect(o,"line.rangeIndicator").attr("x1",c).attr("x2",c).attr("y1",0).attr("y2",g||(s?yt.height.proportional:yt.height.default));var v=o.selectAll("rect.value").data(p),m=null==l||i.model.isUserProvidedColorScaleValid()?"value":"value status--"+l;v.enter().append("rect").classed("value",!0).merge(v).attr("x",(function(t){return t.x})).attr("y",0).attr("height",(function(){var t=Aa.getProperty(a,"meter","height");return t||(s?yt.height.proportional:yt.height.default)})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[k.FILL],dataGroupName:t[h],originalClassName:m})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"meter-bar-update",animate:t})})).attr("width",(function(t,e){return t.value>n?f(n):t.width})).style("fill",(function(t){return i.model.getFillColor(t[h])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),v.exit().remove();var y=s?null:Aa.getProperty(a,"meter","peak"),b=y;null!==y&&(y>n?b=n:y<u[0].value&&(b=u[0].value>n?n:u[0].value));var _=o.selectAll("line.peak").data(null==b?[]:[b]);_.enter().append("line").classed("peak",!0).merge(_).attr("y1",0).attr("y2",(function(){var t=Aa.getProperty(a,"meter","height");return t||8})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"peak-line-update",animate:t})})).attr("x1",(function(t){return f(t)})).attr("x2",(function(t){return f(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),_.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this,r=Aa.getProperty(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",(function(t,i){var o=ka(this);n.services.events.dispatchEvent(it.Meter.METER_MOUSEOVER,{event:t,element:o,datum:i}),r&&(o.classed("hovered",!0),o.transition(n.services.transitions.getTransition("graph_element_mouseover_fill_update")),n.services.events.dispatchEvent(it.Tooltip.SHOW,{event:t,hoveredElement:o,items:[{label:i[e],value:i.value}]}))})).on("mousemove",(function(t,e){var i=ka(this);n.services.events.dispatchEvent(it.Meter.METER_MOUSEMOVE,{event:t,element:i,datum:e}),r&&n.services.events.dispatchEvent(it.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){n.services.events.dispatchEvent(it.Meter.METER_CLICK,{event:t,element:ka(this),datum:e})})).on("mouseout",(function(t,e){var i=ka(this);n.services.events.dispatchEvent(it.Meter.METER_MOUSEOUT,{event:t,element:i,datum:e}),r&&(i.classed("hovered",!1),n.services.events.dispatchEvent(it.Tooltip.HIDE,{hoveredElement:i}))}))},e.prototype.destroy=function(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)},e}(_v),ex=function(t){function e(e,n){var r=t.call(this,e,n)||this;r.model=new J_(r.services);var i=n.options.meter.proportional?Aa.merge(Aa.clone(xs.proportionalMeterChart),n.options):Aa.merge(Aa.clone(xs.meterChart),n.options);return r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new tx(this.model,this.services)],growth:F.STRETCH,renderType:L.SVG},e={id:"meter-title",components:[new Bm(this.model,this.services)],growth:F.STRETCH,renderType:L.SVG},n={id:"spacer",components:[new Db(this.model,this.services,{size:8})],growth:F.STRETCH},r=[new kb(this.model,this.services,[e,n,t],{direction:j.COLUMN})];return this.getChartComponents(r,{graphFrameRenderType:L.HTML})},e}(k_),nx=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return r?i:(i.model.setOptions(Aa.mergeDefaultChartOptions(xs.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new sb(this.model,this.services)];return this.getChartComponents(t)},e}(k_),rx=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDataGroups=function(){return t.prototype.getDataGroups.call(this).filter((function(t){return"delta"!==t.name}))},e}(uf),ix=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new rx(r.services),r.model.setOptions(Aa.mergeDefaultChartOptions(xs.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new oy(this.model,this.services)];return this.getChartComponents(t)},e}(k_),ox=((S_={})[tt.LINE]=[ty,Km],S_[tt.SCATTER]=[Km],S_[tt.AREA]=[jm,ty,Km],S_[tt.STACKED_AREA]=[Fm,ty,ny,A_],S_[tt.SIMPLE_BAR]=[qm],S_[tt.GROUPED_BAR]=[Ym,L_],S_[tt.STACKED_BAR]=[Zm,A_],S_),ax=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=Aa.mergeDefaultChartOptions(xs.comboChart,n.options);return n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:tt.LINE,correspondingDatasets:[]}]),r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getGraphComponents=function(){var t=this,e=this.model.getOptions().comboChartTypes,n=0,r=e.map((function(e){var r,i,o=e.type;return"string"==typeof e.type?Object.keys(ox).includes(e.type)?(r=Aa.merge({},xs[Aa.camelCase(e.type)+"Chart"],t.model.getOptions(),e.options),e.type===tt.STACKED_AREA&&(i=!0),ox[e.type].map((function(o,a){return new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r,stacked:i})}))):(console.error('Invalid chart type "'+e.type+'" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.'),null):(r=Aa.merge({},t.model.getOptions(),e.options),new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r}))})).filter((function(t){return null!==t}));return Aa.flatten(r)},e.prototype.getComponents=function(){var t=this.model.getOptions().comboChartTypes.some((function(t){return t.type===tt.STACKED_BAR||t.type===tt.STACKED_AREA})),e=P([new qb(this.model,this.services),new T_(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.GRID})],t?[]:[new M_(this.model,this.services)],this.getGraphComponents());return this.getAxisChartComponents(e)},e}(I_),sx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.treeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new $y(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})},e}(k_),ux=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new nb(this.model,this.services)];return this.getChartComponents(t)},e}(k_),lx=function(t){function e(e){var n=t.call(this,e)||this;return n.parentNode=!1,n.set({depth:2},{skipUpdate:!0}),n}return n(e,t),e.prototype.setData=function(e){t.prototype.setData.call(this,e),this.setDataGroups(),1===e.length&&(this.parentNode=!0),this.setZoom()},e.prototype.setOptions=function(t){var e=this.getOptions(),n=Aa.merge({},t,this.getZoomOptions(t));Aa.updateLegendAdditionalItems(e,n);var r=this.getHierarchyLevel(),i=Aa.getProperty(e,"circlePack","hierarchyLevel");this.set({options:Aa.merge(e,n),depth:i&&i<4?i:r})},e.prototype.getZoomOptions=function(t){if(!this.getDisplayData())return{};var e=this.getDisplayData(),n=t||this.getOptions(),r=1===e.length&&Aa.getProperty(e,0,"children")?Aa.getProperty(e,0,"children"):e,i=this.getHierarchyLevel();return r.some((function(t){if(t.children&&t.children.some((function(t){return t.children})))return i=3,!1})),!0===Aa.getProperty(n,"canvasZoom","enabled")&&i>2?{legend:{additionalItems:[{type:rt.ZOOM,name:"Click to zoom"}]}}:null},e.prototype.setZoom=function(t){this.setOptions(this.getZoomOptions(t))},e.prototype.updateHierarchyLevel=function(t){this.set({depth:t})},e.prototype.getHierarchyLevel=function(){return this.get("depth")},e.prototype.hasParentNode=function(){return this.parentNode},e.prototype.setDataGroups=function(){var t=this,e=this.getData(),n=this.getOptions().data.groupMapsTo,r=e.map((function(e){var r=e[n];return t.setChildrenDataGroup(e,r)}));this.set({data:r},{skipUpdate:!0})},e.prototype.setChildrenDataGroup=function(t,e){var n=this;return t.children?C(C({},t),{dataGroupName:e,children:t.children.map((function(t,r){return n.setChildrenDataGroup(t,e)}))}):C(C({},t),{dataGroupName:e})},e}(uf),cx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new lx(r.services),r.model.setOptions(Aa.mergeDefaultChartOptions(xs.circlePackChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ub(this.model,this.services)];return this.getChartComponents(t)},e}(k_),hx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(Aa.mergeDefaultChartOptions(xs.wordCloudChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Lb(this.model,this.services),new sy(this.model,this.services,{skeleton:Y.PIE})];return this.getChartComponents(t)},e}(k_);t.AreaChart=N_,t.BoxplotChart=z_,t.BubbleChart=j_,t.BulletChart=F_,t.CirclePackChart=cx,t.ComboChart=ax,t.DonutChart=$_,t.GaugeChart=ix,t.GroupedBarChart=U_,t.HistogramChart=q_,t.LineChart=Y_,t.LollipopChart=Z_,t.MeterChart=ex,t.PieChart=Q_,t.RadarChart=nx,t.ScatterChart=X_,t.SimpleBarChart=V_,t.StackedAreaChart=B_,t.StackedBarChart=G_,t.TreeChart=sx,t.TreemapChart=ux,t.WordCloudChart=hx,t.configurations=ws,t.interfaces=ot,Object.defineProperty(t,"__esModule",{value:!0})}));
15
+ ***************************************************************************** */var e=function(t,n){return(e=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,n)};function n(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var r,i,o,a,s,u,l,c,h,f,d,p,g,v,m,y,b,_,x,w,O,E,T,S,M,C,A=function(){return(A=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)};function P(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return 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",t.DOCUMENT="document",t.CHECKBOX="checkbox",t.BUTTON="button",t.MENU="menu",t.MENU_ITEM="menuitem",t.IMG="img"}(r||(r={})),function(t){t.RENDER_FINISHED="render-finished",t.RESIZE="chart-resize",t.MOUSEOVER="chart-mouseover",t.MOUSEOUT="chart-mouseout"}(i||(i={})),function(t){t.SHOW="show-modal",t.HIDE="hide-modal"}(o||(o={})),function(t){t.UPDATE="model-update"}(a||(a={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu"}(s||(s={})),function(t){t.UPDATE="zoom-bar-update",t.SELECTION_START="zoom-bar-selection-start",t.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",t.SELECTION_END="zoom-bar-selection-end"}(u||(u={})),function(t){t.CHANGE="zoom-domain-change"}(l||(l={})),function(t){t.CANVAS_ZOOM_IN="canvas-zoom-in",t.CANVAS_ZOOM_OUT="canvas-zoom-out"}(c||(c={})),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"}(h||(h={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(f||(f={})),function(t){t.WORD_MOUSEOVER="wordcloud-word-mouseover",t.WORD_MOUSEMOVE="wordcloud-word-mousemove",t.WORD_CLICK="wordcloud-word-click",t.WORD_MOUSEOUT="wordcloud-word-mouseout"}(d||(d={})),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"}(p||(p={})),function(t){t.ARC_MOUSEOVER="gauge-arc-mouseover",t.ARC_MOUSEMOVE="gauge-arc-mousemove",t.ARC_CLICK="gauge-arc-click",t.ARC_MOUSEOUT="gauge-arc-mouseout"}(g||(g={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(v||(v={})),function(t){t.BOX_MOUSEOVER="box-mouseover",t.BOX_MOUSEMOVE="box-mousemove",t.BOX_CLICK="box-click",t.BOX_MOUSEOUT="box-mouseout",t.OUTLIER_MOUSEOVER="outlier-mouseover",t.OUTLIER_MOUSEMOVE="outlier-mousemove",t.OUTLIER_CLICK="outlier-click",t.OUTLIER_MOUSEOUT="outlier-mouseout"}(m||(m={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(y||(y={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(b||(b={})),function(t){t.X_AXIS_MOUSEOVER="radar-x-axis-mouseover",t.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",t.X_AXIS_CLICK="radar-x-axis-click",t.X_AXIS_MOUSEOUT="radar-x-axis-mouseout"}(_||(_={})),function(t){t.NODE_MOUSEOVER="tree-node-mouseover",t.NODE_CLICK="tree-node-click",t.NODE_MOUSEOUT="tree-node-mouseout"}(x||(x={})),function(t){t.LEAF_MOUSEOVER="leaf-mouseover",t.LEAF_MOUSEMOVE="leaf-mousemove",t.LEAF_CLICK="leaf-click",t.LEAF_MOUSEOUT="leaf-mouseout"}(w||(w={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(O||(O={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(E||(E={})),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"}(T||(T={})),function(t){t.CIRCLE_MOUSEOVER="circle-leaf-mouseover",t.CIRCLE_CLICK="circle-leaf-click",t.CIRCLE_MOUSEOUT="circle-leaf-mouseout",t.CIRCLE_MOUSEMOVE="circle-leaf-mousemove"}(S||(S={})),function(t){t.NODE_MOUSEOVER="alluvial-node-mouseover",t.NODE_CLICK="alluvial-node-click",t.NODE_MOUSEOUT="alluvial-node-mouseout",t.NODE_MOUSEMOVE="alluvial-node-mousemove",t.LINE_MOUSEOVER="alluvial-line-mouseover",t.LINE_CLICK="alluvial-line-click",t.LINE_MOUSEOUT="alluvial-line-mouseout",t.LINE_MOUSEMOVE="alluvial-line-mousemove"}(M||(M={})),function(t){t.METER_MOUSEOVER="meter-mouseover",t.METER_CLICK="meter-click",t.METER_MOUSEOUT="meter-mouseout",t.METER_MOUSEMOVE="meter-mousemove"}(C||(C={}));var k,D,R,I,N,B,V,U,G,H,z,j,F,W,q,Y,Z,X,K,Q,$,J,tt,et,nt,rt,it,ot=Object.freeze({__proto__:null,get Chart(){return i},get Modal(){return o},get Model(){return a},get Toolbar(){return s},get ZoomBar(){return u},get ZoomDomain(){return l},get CanvasZoom(){return c},get Axis(){return h},get Area(){return f},get WordCloud(){return d},get Pie(){return p},get Gauge(){return g},get Bar(){return v},get Boxplot(){return m},get Scatter(){return y},get Line(){return b},get Radar(){return _},get Tree(){return x},get Treemap(){return w},get Tooltip(){return O},get Threshold(){return E},get Legend(){return T},get CirclePack(){return S},get Alluvial(){return M},get Meter(){return C}});!function(t){t.HTML="html",t.SVG="svg"}(k||(k={})),function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(D||(D={})),function(t){t.BACKGROUND="background",t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(R||(R={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(I||(I={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(N||(N={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(B||(B={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(V||(V={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels",t.LABELS_RATIO="labels-ratio"}(U||(U={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(G||(G={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(H||(H={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(z||(z={})),function(t){t.TREE="tree",t.DENDROGRAM="dendrogram"}(j||(j={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(F||(F={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(W||(W={})),function(t){t.CENTER="center"}(q||(q={})),function(t){t.LEFT="left",t.RIGHT="right"}(Y||(Y={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(Z||(Z={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(X||(X={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(K||(K={})),function(t){t.SEMI="semi",t.FULL="full"}(Q||(Q={})),function(t){t.UP="up",t.DOWN="down"}($||($={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(J||(J={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(tt||(tt={})),function(t){t.SCATTER="scatter",t.LINE="line",t.SIMPLE_BAR="simple-bar",t.STACKED_BAR="stacked-bar",t.GROUPED_BAR="grouped-bar",t.AREA="area",t.STACKED_AREA="stacked-area"}(et||(et={})),function(t){t.EXPORT_CSV="Export as CSV",t.EXPORT_PNG="Export as PNG",t.EXPORT_JPG="Export as JPG",t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom",t.MAKE_FULLSCREEN="Make fullscreen",t.SHOW_AS_DATATABLE="Show as data-table"}(nt||(nt={})),function(t){t.LEFT="left",t.RIGHT="right"}(rt||(rt={})),function(t){t.CHECKBOX="checkbox",t.RADIUS="radius",t.AREA="area",t.SIZE="size",t.LINE="line",t.QUARTILE="quartile",t.ZOOM="zoom"}(it||(it={}));var at=Object.freeze({__proto__:null,get Roles(){return r},Events:ot,get RenderTypes(){return k},get ChartTheme(){return D},get ColorClassNameTypes(){return R},get AxisPositions(){return I},get ZoomBarTypes(){return N},get TruncationTypes(){return B},get CartesianOrientations(){return V},get ScaleTypes(){return U},get LegendPositions(){return G},get Alignments(){return H},get LegendOrientations(){return z},get TreeTypes(){return j},get LayoutDirection(){return F},get LayoutGrowth(){return W},get LayoutAlignItems(){return q},get CalloutDirections(){return Y},get Skeletons(){return Z},get TextAnchor(){return X},get DominantBaseline(){return K},get GaugeTypes(){return Q},get ArrowDirections(){return $},get Statuses(){return J},get TickRotations(){return tt},get ChartTypes(){return et},get ToolbarControlTypes(){return nt},get AxisTitleOrientations(){return rt},get LegendItemType(){return it}});const st=t=>+t;function ut(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var lt,ct={opacity:{unselected:.05,selected:.4}},ht={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},ratio:{reference:"value",compareTo:"marker"},paddingRatio:.1},ft={duration:1e3,ease:ut,zoomLevel:3},dt={circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},hierarchyLevel:2},pt={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},gt={circle:{radius:4,opacity:{hovered:1,default:.3}},box:{opacity:{hovered:.5,default:.3}},strokeWidth:{default:1,thicker:2}},vt={defaultBins:10},mt={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"}},yt={opacity:{unselected:.3,selected:1},weight:{selected:2,unselected:1}},bt={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15},total:{paddingLeft:36},height:{default:8,proportional:16},dividerWidth:2},_t={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}},xt={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},wt={nodeWidth:4,nodeHoveredWidth:8,minNodePadding:24,opacity:{unfocus:.3,default:.8,selected:1}},Ot={default:{size:24}},Et={horizontalOffset:10},Tt={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}},St={height:(lt={},lt[N.GRAPH_VIEW]=32,lt[N.SLIDER_VIEW]=10,lt),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Mt=[{type:it.RADIUS,name:"Radius"},{type:it.AREA,name:"Poor area"},{type:it.AREA,name:"Satisfactory area"},{type:it.AREA,name:"Great area"},{type:it.QUARTILE,name:"Quartiles"}],Ct="object"==typeof global&&global&&global.Object===Object&&global,At="object"==typeof self&&self&&self.Object===Object&&self,Pt=Ct||At||Function("return this")(),Lt=Pt.Symbol,kt=Object.prototype,Dt=kt.hasOwnProperty,Rt=kt.toString,It=Lt?Lt.toStringTag:void 0;var Nt=Object.prototype.toString;var Bt=Lt?Lt.toStringTag:void 0;function Vt(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Bt&&Bt in Object(t)?function(t){var e=Dt.call(t,It),n=t[It];try{t[It]=void 0;var r=!0}catch(t){}var i=Rt.call(t);return r&&(e?t[It]=n:delete t[It]),i}(t):function(t){return Nt.call(t)}(t)}function Ut(t){return null!=t&&"object"==typeof t}function Gt(t){return"symbol"==typeof t||Ut(t)&&"[object Symbol]"==Vt(t)}function Ht(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}var zt=Array.isArray,jt=Lt?Lt.prototype:void 0,Ft=jt?jt.toString:void 0;function Wt(t){if("string"==typeof t)return t;if(zt(t))return Ht(t,Wt)+"";if(Gt(t))return Ft?Ft.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}var qt=/\s/;var Yt=/^\s+/;function Zt(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&qt.test(t.charAt(e)););return e}(t)+1).replace(Yt,""):t}function Xt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var Kt=/^[-+]0x[0-9a-f]+$/i,Qt=/^0b[01]+$/i,$t=/^0o[0-7]+$/i,Jt=parseInt;function te(t){if("number"==typeof t)return t;if(Gt(t))return NaN;if(Xt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Xt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Zt(t);var n=Qt.test(t);return n||$t.test(t)?Jt(t.slice(2),n?2:8):Kt.test(t)?NaN:+t}function ee(t){return t}function ne(t){if(!Xt(t))return!1;var e=Vt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var re,ie=Pt["__core-js_shared__"],oe=(re=/[^.]+$/.exec(ie&&ie.keys&&ie.keys.IE_PROTO||""))?"Symbol(src)_1."+re:"";var ae=Function.prototype.toString;function se(t){if(null!=t){try{return ae.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var ue=/^\[object .+?Constructor\]$/,le=Function.prototype,ce=Object.prototype,he=le.toString,fe=ce.hasOwnProperty,de=RegExp("^"+he.call(fe).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function pe(t){return!(!Xt(t)||(e=t,oe&&oe in e))&&(ne(t)?de:ue).test(se(t));var e}function ge(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return pe(n)?n:void 0}var ve=ge(Pt,"WeakMap"),me=Object.create,ye=function(){function t(){}return function(e){if(!Xt(e))return{};if(me)return me(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function be(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 _e(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var xe=Date.now;function we(t){return function(){return t}}var Oe=function(){try{var t=ge(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ee=function(t){var e=0,n=0;return function(){var r=xe(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Oe?function(t,e){return Oe(t,"toString",{configurable:!0,enumerable:!1,value:we(e),writable:!0})}:ee);function Te(t){return t!=t}function Se(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,Te,n)}(t,e,0)>-1}var Me=/^(?:0|[1-9]\d*)$/;function Ce(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Me.test(t))&&t>-1&&t%1==0&&t<e}function Ae(t,e,n){"__proto__"==e&&Oe?Oe(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Pe(t,e){return t===e||t!=t&&e!=e}var Le=Object.prototype.hasOwnProperty;function ke(t,e,n){var r=t[e];Le.call(t,e)&&Pe(r,n)&&(void 0!==n||e in t)||Ae(t,e,n)}function De(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?Ae(n,s,u):ke(n,s,u)}return n}var Re=Math.max;function Ie(t,e){return Ee(function(t,e,n){return e=Re(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=Re(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),be(t,this,s)}}(t,e,ee),t+"")}function Ne(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Be(t){return null!=t&&Ne(t.length)&&!ne(t)}function Ve(t,e,n){if(!Xt(n))return!1;var r=typeof e;return!!("number"==r?Be(n)&&Ce(e,n.length):"string"==r&&e in n)&&Pe(n[e],t)}var Ue=Object.prototype;function Ge(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Ue)}function He(t){return Ut(t)&&"[object Arguments]"==Vt(t)}var ze=Object.prototype,je=ze.hasOwnProperty,Fe=ze.propertyIsEnumerable,We=He(function(){return arguments}())?He:function(t){return Ut(t)&&je.call(t,"callee")&&!Fe.call(t,"callee")};var qe="object"==typeof t&&t&&!t.nodeType&&t,Ye=qe&&"object"==typeof module&&module&&!module.nodeType&&module,Ze=Ye&&Ye.exports===qe?Pt.Buffer:void 0,Xe=(Ze?Ze.isBuffer:void 0)||function(){return!1},Ke={};function Qe(t){return function(e){return t(e)}}Ke["[object Float32Array]"]=Ke["[object Float64Array]"]=Ke["[object Int8Array]"]=Ke["[object Int16Array]"]=Ke["[object Int32Array]"]=Ke["[object Uint8Array]"]=Ke["[object Uint8ClampedArray]"]=Ke["[object Uint16Array]"]=Ke["[object Uint32Array]"]=!0,Ke["[object Arguments]"]=Ke["[object Array]"]=Ke["[object ArrayBuffer]"]=Ke["[object Boolean]"]=Ke["[object DataView]"]=Ke["[object Date]"]=Ke["[object Error]"]=Ke["[object Function]"]=Ke["[object Map]"]=Ke["[object Number]"]=Ke["[object Object]"]=Ke["[object RegExp]"]=Ke["[object Set]"]=Ke["[object String]"]=Ke["[object WeakMap]"]=!1;var $e="object"==typeof t&&t&&!t.nodeType&&t,Je=$e&&"object"==typeof module&&module&&!module.nodeType&&module,tn=Je&&Je.exports===$e&&Ct.process,en=function(){try{var t=Je&&Je.require&&Je.require("util").types;return t||tn&&tn.binding&&tn.binding("util")}catch(t){}}(),nn=en&&en.isTypedArray,rn=nn?Qe(nn):function(t){return Ut(t)&&Ne(t.length)&&!!Ke[Vt(t)]},on=Object.prototype.hasOwnProperty;function an(t,e){var n=zt(t),r=!n&&We(t),i=!n&&!r&&Xe(t),o=!n&&!r&&!i&&rn(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&&!on.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ce(l,u))||s.push(l);return s}function sn(t,e){return function(n){return t(e(n))}}var un=sn(Object.keys,Object),ln=Object.prototype.hasOwnProperty;function cn(t){if(!Ge(t))return un(t);var e=[];for(var n in Object(t))ln.call(t,n)&&"constructor"!=n&&e.push(n);return e}function hn(t){return Be(t)?an(t):cn(t)}var fn=Object.prototype.hasOwnProperty;function dn(t){if(!Xt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Ge(t),n=[];for(var r in t)("constructor"!=r||!e&&fn.call(t,r))&&n.push(r);return n}function pn(t){return Be(t)?an(t,!0):dn(t)}var gn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,vn=/^\w*$/;function mn(t,e){if(zt(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Gt(t))||(vn.test(t)||!gn.test(t)||null!=e&&t in Object(e))}var yn=ge(Object,"create");var bn=Object.prototype.hasOwnProperty;var _n=Object.prototype.hasOwnProperty;function xn(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 wn(t,e){for(var n=t.length;n--;)if(Pe(t[n][0],e))return n;return-1}xn.prototype.clear=function(){this.__data__=yn?yn(null):{},this.size=0},xn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},xn.prototype.get=function(t){var e=this.__data__;if(yn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return bn.call(e,t)?e[t]:void 0},xn.prototype.has=function(t){var e=this.__data__;return yn?void 0!==e[t]:_n.call(e,t)},xn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=yn&&void 0===e?"__lodash_hash_undefined__":e,this};var On=Array.prototype.splice;function En(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])}}En.prototype.clear=function(){this.__data__=[],this.size=0},En.prototype.delete=function(t){var e=this.__data__,n=wn(e,t);return!(n<0)&&(n==e.length-1?e.pop():On.call(e,n,1),--this.size,!0)},En.prototype.get=function(t){var e=this.__data__,n=wn(e,t);return n<0?void 0:e[n][1]},En.prototype.has=function(t){return wn(this.__data__,t)>-1},En.prototype.set=function(t,e){var n=this.__data__,r=wn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Tn=ge(Pt,"Map");function Sn(t,e){var n=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?n["string"==typeof e?"string":"hash"]:n.map}function Mn(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])}}Mn.prototype.clear=function(){this.size=0,this.__data__={hash:new xn,map:new(Tn||En),string:new xn}},Mn.prototype.delete=function(t){var e=Sn(this,t).delete(t);return this.size-=e?1:0,e},Mn.prototype.get=function(t){return Sn(this,t).get(t)},Mn.prototype.has=function(t){return Sn(this,t).has(t)},Mn.prototype.set=function(t,e){var n=Sn(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Cn(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var a=t.apply(this,r);return n.cache=o.set(i,a)||o,a};return n.cache=new(Cn.Cache||Mn),n}Cn.Cache=Mn;var An=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Pn=/\\(\\)?/g,Ln=function(t){var e=Cn(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(An,(function(t,n,r,i){e.push(r?i.replace(Pn,"$1"):n||t)})),e}));function kn(t){return null==t?"":Wt(t)}function Dn(t,e){return zt(t)?t:mn(t,e)?[t]:Ln(kn(t))}function Rn(t){if("string"==typeof t||Gt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function In(t,e){for(var n=0,r=(e=Dn(e,t)).length;null!=t&&n<r;)t=t[Rn(e[n++])];return n&&n==r?t:void 0}function Nn(t,e,n){var r=null==t?void 0:In(t,e);return void 0===r?n:r}function Bn(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Vn=Lt?Lt.isConcatSpreadable:void 0;function Un(t){return zt(t)||We(t)||!!(Vn&&t&&t[Vn])}function Gn(t,e,n,r,i){var o=-1,a=t.length;for(n||(n=Un),i||(i=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?Gn(s,e-1,n,r,i):Bn(i,s):r||(i[i.length]=s)}return i}function Hn(t){return(null==t?0:t.length)?Gn(t,1):[]}var zn=sn(Object.getPrototypeOf,Object),jn=Function.prototype,Fn=Object.prototype,Wn=jn.toString,qn=Fn.hasOwnProperty,Yn=Wn.call(Object);function Zn(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:function(t,e,n){var r=-1,i=t.length;e<0&&(e=-e>i?0:i+e),(n=n>i?i:n)<0&&(n+=i),i=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(i);++r<i;)o[r]=t[r+e];return o}(t,e,n)}var Xn=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Kn(t){return Xn.test(t)}var Qn="[\\ud800-\\udfff]",$n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Jn="\\ud83c[\\udffb-\\udfff]",tr="[^\\ud800-\\udfff]",er="(?:\\ud83c[\\udde6-\\uddff]){2}",nr="[\\ud800-\\udbff][\\udc00-\\udfff]",rr="(?:"+$n+"|"+Jn+")"+"?",ir="[\\ufe0e\\ufe0f]?"+rr+("(?:\\u200d(?:"+[tr,er,nr].join("|")+")[\\ufe0e\\ufe0f]?"+rr+")*"),or="(?:"+[tr+$n+"?",$n,er,nr,Qn].join("|")+")",ar=RegExp(Jn+"(?="+Jn+")|"+or+ir,"g");function sr(t){return Kn(t)?function(t){return t.match(ar)||[]}(t):function(t){return t.split("")}(t)}var ur,lr=(ur="toUpperCase",function(t){var e=Kn(t=kn(t))?sr(t):void 0,n=e?e[0]:t.charAt(0),r=e?Zn(e,1).join(""):t.slice(1);return n[ur]()+r});var cr=function(t){return function(e){return null==t?void 0:t[e]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),hr=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,fr=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var dr=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var pr=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var gr="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",vr="["+gr+"]",mr="\\d+",yr="[\\u2700-\\u27bf]",br="[a-z\\xdf-\\xf6\\xf8-\\xff]",_r="[^\\ud800-\\udfff"+gr+mr+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",xr="(?:\\ud83c[\\udde6-\\uddff]){2}",wr="[\\ud800-\\udbff][\\udc00-\\udfff]",Or="[A-Z\\xc0-\\xd6\\xd8-\\xde]",Er="(?:"+br+"|"+_r+")",Tr="(?:"+Or+"|"+_r+")",Sr="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Mr="[\\ufe0e\\ufe0f]?"+Sr+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",xr,wr].join("|")+")[\\ufe0e\\ufe0f]?"+Sr+")*"),Cr="(?:"+[yr,xr,wr].join("|")+")"+Mr,Ar=RegExp([Or+"?"+br+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[vr,Or,"$"].join("|")+")",Tr+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[vr,Or+Er,"$"].join("|")+")",Or+"?"+Er+"+(?:['’](?:d|ll|m|re|s|t|ve))?",Or+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",mr,Cr].join("|"),"g");function Pr(t,e,n){return t=kn(t),void 0===(e=n?void 0:e)?function(t){return pr.test(t)}(t)?function(t){return t.match(Ar)||[]}(t):function(t){return t.match(dr)||[]}(t):t.match(e)||[]}var Lr=RegExp("['’]","g");function kr(t){return function(e){return function(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}(Pr(function(t){return(t=kn(t))&&t.replace(hr,cr).replace(fr,"")}(e).replace(Lr,"")),t,"")}}var Dr=kr((function(t,e,n){return e=e.toLowerCase(),t+(n?lr(kn(e).toLowerCase()):e)}));function Rr(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=te(n))==n?n:0),void 0!==e&&(e=(e=te(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}(te(t),e,n)}function Ir(t){var e=this.__data__=new En(t);this.size=e.size}Ir.prototype.clear=function(){this.__data__=new En,this.size=0},Ir.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Ir.prototype.get=function(t){return this.__data__.get(t)},Ir.prototype.has=function(t){return this.__data__.has(t)},Ir.prototype.set=function(t,e){var n=this.__data__;if(n instanceof En){var r=n.__data__;if(!Tn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Mn(r)}return n.set(t,e),this.size=n.size,this};var Nr="object"==typeof t&&t&&!t.nodeType&&t,Br=Nr&&"object"==typeof module&&module&&!module.nodeType&&module,Vr=Br&&Br.exports===Nr?Pt.Buffer:void 0,Ur=Vr?Vr.allocUnsafe:void 0;function Gr(t,e){if(e)return t.slice();var n=t.length,r=Ur?Ur(n):new t.constructor(n);return t.copy(r),r}function Hr(){return[]}var zr=Object.prototype.propertyIsEnumerable,jr=Object.getOwnPropertySymbols,Fr=jr?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}(jr(t),(function(e){return zr.call(t,e)})))}:Hr;var Wr=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Bn(e,Fr(t)),t=zn(t);return e}:Hr;function qr(t,e,n){var r=e(t);return zt(t)?r:Bn(r,n(t))}function Yr(t){return qr(t,hn,Fr)}function Zr(t){return qr(t,pn,Wr)}var Xr=ge(Pt,"DataView"),Kr=ge(Pt,"Promise"),Qr=ge(Pt,"Set"),$r=se(Xr),Jr=se(Tn),ti=se(Kr),ei=se(Qr),ni=se(ve),ri=Vt;(Xr&&"[object DataView]"!=ri(new Xr(new ArrayBuffer(1)))||Tn&&"[object Map]"!=ri(new Tn)||Kr&&"[object Promise]"!=ri(Kr.resolve())||Qr&&"[object Set]"!=ri(new Qr)||ve&&"[object WeakMap]"!=ri(new ve))&&(ri=function(t){var e=Vt(t),n="[object Object]"==e?t.constructor:void 0,r=n?se(n):"";if(r)switch(r){case $r:return"[object DataView]";case Jr:return"[object Map]";case ti:return"[object Promise]";case ei:return"[object Set]";case ni:return"[object WeakMap]"}return e});var ii=ri,oi=Object.prototype.hasOwnProperty;var ai=Pt.Uint8Array;function si(t){var e=new t.constructor(t.byteLength);return new ai(e).set(new ai(t)),e}var ui=/\w*$/;var li=Lt?Lt.prototype:void 0,ci=li?li.valueOf:void 0;function hi(t,e){var n=e?si(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function fi(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return si(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?si(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 hi(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,ui.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,ci?Object(ci.call(r)):{}}}function di(t){return"function"!=typeof t.constructor||Ge(t)?{}:ye(zn(t))}var pi=en&&en.isMap,gi=pi?Qe(pi):function(t){return Ut(t)&&"[object Map]"==ii(t)};var vi=en&&en.isSet,mi=vi?Qe(vi):function(t){return Ut(t)&&"[object Set]"==ii(t)},yi={};function bi(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(!Xt(t))return t;var c=zt(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&oi.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return _e(t,a)}else{var h=ii(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(Xe(t))return Gr(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:di(t),!s)return u?function(t,e){return De(t,Wr(t),e)}(t,function(t,e){return t&&De(e,pn(e),t)}(a,t)):function(t,e){return De(t,Fr(t),e)}(t,function(t,e){return t&&De(e,hn(e),t)}(a,t))}else{if(!yi[h])return i?t:{};a=fi(t,h,s)}}o||(o=new Ir);var d=o.get(t);if(d)return d;o.set(t,a),mi(t)?t.forEach((function(r){a.add(bi(r,e,n,r,t,o))})):gi(t)&&t.forEach((function(r,i){a.set(i,bi(r,e,n,i,t,o))}));var p=c?void 0:(l?u?Zr:Yr:u?pn:hn)(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(p||t,(function(r,i){p&&(r=t[i=r]),ke(a,i,bi(r,e,n,i,t,o))})),a}yi["[object Arguments]"]=yi["[object Array]"]=yi["[object ArrayBuffer]"]=yi["[object DataView]"]=yi["[object Boolean]"]=yi["[object Date]"]=yi["[object Float32Array]"]=yi["[object Float64Array]"]=yi["[object Int8Array]"]=yi["[object Int16Array]"]=yi["[object Int32Array]"]=yi["[object Map]"]=yi["[object Number]"]=yi["[object Object]"]=yi["[object RegExp]"]=yi["[object Set]"]=yi["[object String]"]=yi["[object Symbol]"]=yi["[object Uint8Array]"]=yi["[object Uint8ClampedArray]"]=yi["[object Uint16Array]"]=yi["[object Uint32Array]"]=!0,yi["[object Error]"]=yi["[object Function]"]=yi["[object WeakMap]"]=!1;function _i(t){return bi(t,5)}function xi(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Mn;++e<n;)this.add(t[e])}function wi(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function Oi(t,e){return t.has(e)}xi.prototype.add=xi.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},xi.prototype.has=function(t){return this.__data__.has(t)};function Ei(t,e,n,r,i,o){var a=1&n,s=t.length,u=e.length;if(s!=u&&!(a&&u>s))return!1;var l=o.get(t),c=o.get(e);if(l&&c)return l==e&&c==t;var h=-1,f=!0,d=2&n?new xi:void 0;for(o.set(t,e),o.set(e,t);++h<s;){var p=t[h],g=e[h];if(r)var v=a?r(g,p,h,e,t,o):r(p,g,h,t,e,o);if(void 0!==v){if(v)continue;f=!1;break}if(d){if(!wi(e,(function(t,e){if(!Oi(d,e)&&(p===t||i(p,t,n,r,o)))return d.push(e)}))){f=!1;break}}else if(p!==g&&!i(p,g,n,r,o)){f=!1;break}}return o.delete(t),o.delete(e),f}function Ti(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function Si(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var Mi=Lt?Lt.prototype:void 0,Ci=Mi?Mi.valueOf:void 0;var Ai=Object.prototype.hasOwnProperty;var Pi=Object.prototype.hasOwnProperty;function Li(t,e,n,r,i,o){var a=zt(t),s=zt(e),u=a?"[object Array]":ii(t),l=s?"[object Array]":ii(e),c="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(l="[object Arguments]"==l?"[object Object]":l),f=u==l;if(f&&Xe(t)){if(!Xe(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new Ir),a||rn(t)?Ei(t,e,n,r,i,o):function(t,e,n,r,i,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ai(t),new ai(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Pe(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=Ti;case"[object Set]":var u=1&r;if(s||(s=Si),t.size!=e.size&&!u)return!1;var l=a.get(t);if(l)return l==e;r|=2,a.set(t,e);var c=Ei(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(Ci)return Ci.call(t)==Ci.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var d=c&&Pi.call(t,"__wrapped__"),p=h&&Pi.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new Ir),i(g,v,n,r,o)}}return!!f&&(o||(o=new Ir),function(t,e,n,r,i,o){var a=1&n,s=Yr(t),u=s.length;if(u!=Yr(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:Ai.call(e,c)))return!1}var h=o.get(t),f=o.get(e);if(h&&f)return h==e&&f==t;var d=!0;o.set(t,e),o.set(e,t);for(var p=a;++l<u;){var g=t[c=s[l]],v=e[c];if(r)var m=a?r(v,g,c,e,t,o):r(g,v,c,t,e,o);if(!(void 0===m?g===v||i(g,v,n,r,o):m)){d=!1;break}p||(p="constructor"==c)}if(d&&!p){var y=t.constructor,b=e.constructor;y!=b&&"constructor"in t&&"constructor"in e&&!("function"==typeof y&&y instanceof y&&"function"==typeof b&&b instanceof b)&&(d=!1)}return o.delete(t),o.delete(e),d}(t,e,n,r,i,o))}function ki(t,e,n,r,i){return t===e||(null==t||null==e||!Ut(t)&&!Ut(e)?t!=t&&e!=e:Li(t,e,n,r,ki,i))}function Di(t){return t==t&&!Xt(t)}function Ri(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Ii(t){var e=function(t){for(var e=hn(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Di(i)]}return e}(t);return 1==e.length&&e[0][2]?Ri(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,o=i,a=!r;if(null==t)return!o;for(t=Object(t);i--;){var s=n[i];if(a&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<o;){var u=(s=n[i])[0],l=t[u],c=s[1];if(a&&s[2]){if(void 0===l&&!(u in t))return!1}else{var h=new Ir;if(r)var f=r(l,c,u,t,e,h);if(!(void 0===f?ki(c,l,3,r,h):f))return!1}}return!0}(n,t,e)}}function Ni(t,e){return null!=t&&e in Object(t)}function Bi(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Dn(e,t)).length,o=!1;++r<i;){var a=Rn(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Ne(i)&&Ce(a,i)&&(zt(t)||We(t))}(t,e,Ni)}function Vi(t){return mn(t)?(e=Rn(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return In(e,t)}}(t);var e}function Ui(t){return"function"==typeof t?t:null==t?ee:"object"==typeof t?zt(t)?function(t,e){return mn(t)&&Di(e)?Ri(Rn(t),e):function(n){var r=Nn(n,t);return void 0===r&&r===e?Bi(n,t):ki(e,r,3)}}(t[0],t[1]):Ii(t):Vi(t)}function Gi(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var a=t[i];e(r,a,n(a),t)}return r}var Hi,zi=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Hi?a:++r];if(!1===e(i[s],s,i))break}return t};var ji=function(t,e){return function(n,r){if(null==n)return n;if(!Be(n))return t(n,r);for(var i=n.length,o=e?i:-1,a=Object(n);(e?o--:++o<i)&&!1!==r(a[o],o,a););return n}}((function(t,e){return t&&zi(t,e,hn)}));function Fi(t,e,n,r){return ji(t,(function(t,i,o){e(r,t,n(t),o)})),r}var Wi=function(){return Pt.Date.now()},qi=Math.max,Yi=Math.min;function Zi(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=Wi();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Yi(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=Wi(),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=te(e)||0,Xt(n)&&(c=!!n.leading,o=(h="maxWait"in n)?qi(te(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(Wi())},y}function Xi(t,e,n){(void 0===n||Pe(t[e],n))&&(void 0!==n||e in t)||Ae(t,e,n)}function Ki(t){return Ut(t)&&Be(t)}function Qi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function $i(t,e,n,r,i,o,a){var s=Qi(t,n),u=Qi(e,n),l=a.get(u);if(l)Xi(t,n,l);else{var c=o?o(s,u,n+"",t,e,a):void 0,h=void 0===c;if(h){var f=zt(u),d=!f&&Xe(u),p=!f&&!d&&rn(u);c=u,f||d||p?zt(s)?c=s:Ki(s)?c=_e(s):d?(h=!1,c=Gr(u,!0)):p?(h=!1,c=hi(u,!0)):c=[]:function(t){if(!Ut(t)||"[object Object]"!=Vt(t))return!1;var e=zn(t);if(null===e)return!0;var n=qn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Wn.call(n)==Yn}(u)||We(u)?(c=s,We(s)?c=function(t){return De(t,pn(t))}(s):Xt(s)&&!ne(s)||(c=di(u))):h=!1}h&&(a.set(u,c),i(c,u,r,o,a),a.delete(u)),Xi(t,n,c)}}function Ji(t,e,n,r,i){t!==e&&zi(e,(function(o,a){if(i||(i=new Ir),Xt(o))$i(t,e,a,n,Ji,r,i);else{var s=r?r(Qi(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Xi(t,a,s)}}),pn)}function to(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function eo(t,e){var n=-1,r=Be(t)?Array(t.length):[];return ji(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function no(t,e){return Gn(function(t,e){return(zt(t)?Ht:eo)(t,Ui(e))}(t,e),1/0)}function ro(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r}var io,oo,ao=Object.prototype.hasOwnProperty,so=(io=function(t,e,n){ao.call(t,n)?t[n].push(e):Ae(t,n,[e])},function(t,e){var n=zt(t)?Gi:Fi,r=oo?oo():{};return n(t,io,Ui(e),r)}),uo=Object.prototype.hasOwnProperty;function lo(t){if(null==t)return!0;if(Be(t)&&(zt(t)||"string"==typeof t||"function"==typeof t.splice||Xe(t)||rn(t)||We(t)))return!t.length;var e=ii(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(Ge(t))return!cn(t).length;for(var n in t)if(uo.call(t,n))return!1;return!0}function co(t,e){return ki(t,e)}var ho,fo=kr((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),po=(ho=function(t,e,n){Ji(t,e,n)},Ie((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=ho.length>3&&"function"==typeof i?(r--,i):void 0,o&&Ve(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&ho(t,a,n,i)}return t})));function go(t,e){var n;return ji(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function vo(t,e,n){var r=zt(t)?wi:go;return n&&Ve(t,e,n)&&(e=void 0),r(t,Ui(e))}var mo=Qr&&1/Si(new Qr([,-0]))[1]==1/0?function(t){return new Qr(t)}:function(){};function yo(t,e,n){var r=-1,i=Se,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=to;else if(o>=200){var l=e?null:mo(t);if(l)return Si(l);a=!1,i=Oi,u=new xi}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}var bo=Ie((function(t){var e=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}(t);return Ki(e)&&(e=void 0),yo(Gn(t,1,Ki,!0),Ui(e))}));function _o(t){return t&&t.length?yo(t):[]}var xo="http://www.w3.org/1999/xhtml",wo={svg:"http://www.w3.org/2000/svg",xhtml:xo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Oo(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),wo.hasOwnProperty(e)?{space:wo[e],local:t}:t}function Eo(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===xo&&e.documentElement.namespaceURI===xo?e.createElement(t):e.createElementNS(n,t)}}function To(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function So(t){var e=Oo(t);return(e.local?To:Eo)(e)}function Mo(){}function Co(t){return null==t?Mo:function(){return this.querySelector(t)}}function Ao(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Po(){return[]}function Lo(t){return null==t?Po:function(){return this.querySelectorAll(t)}}function ko(t){return function(){return this.matches(t)}}function Do(t){return function(e){return e.matches(t)}}var Ro=Array.prototype.find;function Io(){return this.firstElementChild}var No=Array.prototype.filter;function Bo(){return Array.from(this.children)}function Vo(t){return new Array(t.length)}function Uo(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Go(t){return function(){return t}}function Ho(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 Uo(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function zo(t,e,n,r,i,o,a){var s,u,l,c=new Map,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)+"",c.has(l)?i[s]=u:c.set(l,u));for(s=0;s<f;++s)l=a.call(t,o[s],s,o)+"",(u=c.get(l))?(r[s]=u,u.__data__=o[s],c.delete(l)):n[s]=new Uo(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c.get(d[s])===u&&(i[s]=u)}function jo(t){return t.__data__}function Fo(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function Wo(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function qo(t){return function(){this.removeAttribute(t)}}function Yo(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Zo(t,e){return function(){this.setAttribute(t,e)}}function Xo(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ko(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Qo(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 $o(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Jo(t){return function(){this.style.removeProperty(t)}}function ta(t,e,n){return function(){this.style.setProperty(t,e,n)}}function ea(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function na(t,e){return t.style.getPropertyValue(e)||$o(t).getComputedStyle(t,null).getPropertyValue(e)}function ra(t){return function(){delete this[t]}}function ia(t,e){return function(){this[t]=e}}function oa(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function aa(t){return t.trim().split(/^|\s+/)}function sa(t){return t.classList||new ua(t)}function ua(t){this._node=t,this._names=aa(t.getAttribute("class")||"")}function la(t,e){for(var n=sa(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function ca(t,e){for(var n=sa(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function ha(t){return function(){la(this,t)}}function fa(t){return function(){ca(this,t)}}function da(t,e){return function(){(e.apply(this,arguments)?la:ca)(this,t)}}function pa(){this.textContent=""}function ga(t){return function(){this.textContent=t}}function va(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function ma(){this.innerHTML=""}function ya(t){return function(){this.innerHTML=t}}function ba(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function _a(){this.nextSibling&&this.parentNode.appendChild(this)}function xa(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function wa(){return null}function Oa(){var t=this.parentNode;t&&t.removeChild(this)}function Ea(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Ta(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Sa(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 Ma(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.options);++i?e.length=i:delete this.__on}}}function Ca(t,e,n){return function(){var r,i=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(i)for(var a=0,s=i.length;a<s;++a)if((r=i[a]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),void(r.value=e);this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function Aa(t,e,n){var r=$o(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 Pa(t,e){return function(){return Aa(this,t,e)}}function La(t,e){return function(){return Aa(this,t,e.apply(this,arguments))}}Uo.prototype={constructor:Uo,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)}},ua.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 ka,Da=[null];function Ra(t,e){this._groups=t,this._parents=e}function Ia(){return new Ra([[document.documentElement]],Da)}function Na(t){return"string"==typeof t?new Ra([[document.querySelector(t)]],[document.documentElement]):new Ra([[t]],Da)}function Ba(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function Va(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function Ua(t,e){return t(e={exports:{}},e.exports),e.exports}Ra.prototype=Ia.prototype={constructor:Ra,select:function(t){"function"!=typeof t&&(t=Co(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 Ra(r,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Ao(t.apply(this,arguments))}}(t):Lo(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 Ra(r,i)},selectChild:function(t){return this.select(null==t?Io:function(t){return function(){return Ro.call(this.children,t)}}("function"==typeof t?t:Do(t)))},selectChildren:function(t){return this.selectAll(null==t?Bo:function(t){return function(){return No.call(this.children,t)}}("function"==typeof t?t:Do(t)))},filter:function(t){"function"!=typeof t&&(t=ko(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 Ra(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,jo);var n=e?zo:Ho,r=this._parents,i=this._groups;"function"!=typeof t&&(t=Go(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=Fo(t.call(c,c&&c.__data__,l,r)),p=d.length,g=s[l]=new Array(p),v=a[l]=new Array(p),m=u[l]=new Array(f);n(c,h,g,v,m,d,e);for(var y,b,_=0,x=0;_<p;++_)if(y=g[_]){for(_>=x&&(x=_+1);!(b=v[x])&&++x<p;);y._next=b||null}}return(a=new Ra(a,r))._enter=s,a._exit=u,a},enter:function(){return new Ra(this._enter||this._groups.map(Vo),this._parents)},exit:function(){return new Ra(this._exit||this._groups.map(Vo),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),s=new Array(i),u=0;u<a;++u)for(var l,c=n[u],h=r[u],f=c.length,d=s[u]=new Array(f),p=0;p<f;++p)(l=c[p]||h[p])&&(d[p]=l);for(;u<i;++u)s[u]=n[u];return new Ra(s,this._parents)},selection:function(){return this},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=Wo);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 Ra(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},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(){let t=0;for(const e of this)++t;return 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=Oo(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?Yo:qo:"function"==typeof e?n.local?Qo:Ko:n.local?Xo:Zo)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Jo:"function"==typeof e?ea:ta)(t,e,null==n?"":n)):na(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?ra:"function"==typeof e?oa:ia)(t,e)):this.node()[t]},classed:function(t,e){var n=aa(t+"");if(arguments.length<2){for(var r=sa(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?da:e?ha:fa)(n,e))},text:function(t){return arguments.length?this.each(null==t?pa:("function"==typeof t?va:ga)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?ma:("function"==typeof t?ba:ya)(t)):this.node().innerHTML},raise:function(){return this.each(_a)},lower:function(){return this.each(xa)},append:function(t){var e="function"==typeof t?t:So(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:So(t),r=null==e?wa:"function"==typeof e?e:Co(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Oa)},clone:function(t){return this.select(t?Ta:Ea)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=Sa(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Ca:Ma,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?La:Pa)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}},function(t){function e(e,n){var r=t.getProperty(e,"legend","additionalItems"),i=t.getProperty(n,"legend","additionalItems");if(r&&i){var o=i.map((function(t){return t.type})),a=r.map((function(t){return t.type})),s=Mt.filter((function(t){return a.includes(t.type)&&!o.includes(t.type)}));e.legend.additionalItems=s,n.legend.additionalItems=t.unionBy(s,i,"name")}}t.debounce=Zi,t.clone=_i,t.merge=po,t.unionBy=bo,t.removeArrayDuplicates=_o,t.clamp=Rr,t.flatten=Hn,t.groupBy=so,t.camelCase=Dr,t.isEmpty=lo,t.isEqual=co,t.flatMapDeep=no,t.kebabCase=fo,t.fromPairs=ro,t.some=vo,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,o=arguments;i.mousePosition=Ba(o[0],n),clearTimeout(r),r=setTimeout((function(){t.apply(i,o)}),e)}},t.mergeDefaultChartOptions=function(n,r){var i,o,a=t.clone(n),s=Object.keys(r.axes||{});for(var u in(null===(o=null===(i=r)||void 0===i?void 0:i.toolbar)||void 0===o?void 0:o.controls)&&delete a.toolbar.controls,0===s.length&&delete a.axes,a.axes)if(s.includes(u)){var l=r.axes[u];(l.primary||l.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/docs-tutorials--tabular-data-format");var c=l.mapsTo;if(null==c){var h=l.scaleType;null==h?l.mapsTo="value":h===U.TIME?l.mapsTo="date":h===U.LABELS&&(l.mapsTo="key")}}else delete a.axes[u];return e(a,r),t.merge(a,r)},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){if(t){var e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;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.formatWidthHeightValues=function(t){var e=t.toString();return e.match(/[a-z]/i)?e:e+"px"},t.capitalizeFirstLetter=function(t){return t[0].toUpperCase()+t.slice(1)},t.convertValueToPercentage=function(t,e,n){void 0===n&&(n="value");var r=t/e.reduce((function(t,e){return t+e[n]}),0)*100;return r%1!=0?parseFloat(r.toFixed(1)):r},t.truncateLabel=function(t,e,n){return n>t.length?t:e===B.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===B.FRONT_LINE?"..."+t.substr(-n):e===B.END_LINE?t.substr(0,n)+"...":void 0},t.updateLegendAdditionalItems=e,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},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===V.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(ka||(ka={}));var Ga=Ua((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}));Va(Ga);var Ha=Ua((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}));Va(Ha);var za=Ua((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Ha)&&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}));Va(za);var ja=Ua((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}));Va(ja);var Fa=Ua((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}));Va(Fa);var Wa=Ua((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Fa)&&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}));Va(Wa);var qa=Ua((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}));Va(qa);var Ya=Ua((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}));Va(Ya);var Za=Ua((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(qa),r=i(Ya);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}));Va(Za);var Xa=Va(Ua((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Ga),r=s(za),i=s(ja),o=s(Wa),a=s(Za);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}))),Ka={type:B.END_LINE,threshold:16,numCharacter:14},Qa={enabled:!0,position:G.BOTTOM,clickable:!0,truncation:Ka,alignment:H.LEFT,order:null,additionalItems:[]},$a={x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},Ja={enabled:!0},ts={enabled:!0,showTotal:!0,truncation:Ka,groupLabel:"Group"},es={top:{visible:!0,includeZero:!0,truncation:Ka},bottom:{visible:!0,includeZero:!0,truncation:Ka},left:{visible:!0,includeZero:!0,truncation:Ka},right:{visible:!0,includeZero:!0,truncation:Ka}},ns={addSpaceOnEdges:1,showDayName:!1,localeObject:Xa,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"}}},rs="undefined"!=typeof document&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled),is={width:null,height:null,resizable:!0,tooltip:ts,legend:Qa,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:L([{type:nt.SHOW_AS_DATATABLE}],rs?[{type:nt.MAKE_FULLSCREEN}]:[],[{type:nt.EXPORT_CSV},{type:nt.EXPORT_PNG},{type:nt.EXPORT_JPG}])}},os=ka.merge({},is,{axes:es,timeScale:ns,grid:$a,ruler:Ja,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:N.GRAPH_VIEW}}}),as=ka.merge({},os,{bars:{maxWidth:16},timeScale:ka.merge(ns,{addSpaceOnEdges:1})}),ss=ka.merge({},as,{}),us=ka.merge({},as,{}),ls=ka.merge({},as,{bars:ka.merge({},as.bars,{dividerSize:1.5})}),cs=ka.merge({},as,{}),hs=ka.merge({},os,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),fs=hs,ds=ka.merge({},hs,{points:{radius:3,filled:!1,enabled:!0}}),ps=ka.merge({},ds,{timeScale:ka.merge(ns,{addSpaceOnEdges:0})}),gs=ps,vs=ka.merge({},os,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:it.RADIUS,name:"Radius"}]}}),ms=ka.merge({},os,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:it.AREA,name:"Poor area"},{type:it.AREA,name:"Satisfactory area"},{type:it.AREA,name:"Great area"},{type:it.QUARTILE,name:"Quartiles"}]}}),ys=ka.merge({},as,{bars:{dividerSize:1.5},timeScale:ka.merge(ns,{addSpaceOnEdges:0})}),bs=ka.merge({},is,{tooltip:ka.merge({},ts,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:function(t,e){var n=Math.min(t.width,t.height);return[20*n/400,75*n/400]},wordMapsTo:"word"}}),_s=ka.merge({},is,{pie:{labels:{formatter:null,enabled:!0},alignment:H.LEFT,sortFunction:null,valueMapsTo:"value"}}),xs=ka.merge({},is,{legend:{enabled:!1},gauge:{type:Q.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:function(t){return t/8},valueFontSize:function(t){return t/2.5},numberFormatter:function(t){return t.toFixed(2)%1!=0?t.toFixed(2).toLocaleString():t.toFixed().toLocaleString()},alignment:H.LEFT}}),ws=ka.merge({},_s,{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()}},alignment:H.LEFT}}),Os=ka.merge({},is,{legend:{enabled:!1,clickable:!1},meter:{proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}),Es={chart:is,axisChart:os,simpleBarChart:ss,groupedBarChart:us,stackedBarChart:ls,boxplotChart:cs,bubbleChart:vs,bulletChart:ms,histogramChart:ys,lineChart:ds,areaChart:ps,stackedAreaChart:gs,scatterChart:hs,lollipopChart:fs,pieChart:_s,donutChart:ws,meterChart:Os,proportionalMeterChart:ka.merge({},Os,{legend:{enabled:!0}}),radarChart:ka.merge({},is,{radar:{axes:{angle:"key",value:"value"},alignment:H.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:xs,comboChart:ka.merge({},as,{comboChartTypes:[]}),treeChart:ka.merge({tree:{type:j.TREE}},is,{}),treemapChart:ka.merge({},is,{data:ka.merge(is.data,{groupMapsTo:"name"})}),circlePackChart:ka.merge({},is,dt,{data:ka.merge(is.data,{groupMapsTo:"name"})}),wordCloudChart:bs,alluvialChart:ka.merge({},is,{alluvial:{data:ka.merge(is.data,{groupMapsTo:"source"}),nodePadding:24,monochrome:!1,nodes:[]}})},Ts=Object.freeze({__proto__:null,grid:$a,ruler:Ja,baseTooltip:ts,timeScale:ns,options:Es,area:ct,axis:ht,canvasZoomSettings:ft,circlePack:dt,color:pt,boxplot:gt,histogram:vt,legend:mt,lines:yt,meter:bt,pie:_t,radar:xt,alluvial:wt,spacers:Ot,tooltips:Et,transitions:Tt,toolbar:{buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},zoomBar:St,defaultLegendAdditionalItems:Mt});function Ss(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Ms(t){let e=t,n=t;function r(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const o=r+i>>>1;n(t[o],e)<0?r=o+1:i=o}return r}return 1===t.length&&(e=(e,n)=>t(e)-n,n=function(t){return(e,n)=>Ss(t(e),n)}(t)),{left:r,center:function(t,n,i,o){null==i&&(i=0),null==o&&(o=t.length);const a=r(t,n,i,o-1);return a>i&&e(t[a-1],n)>-e(t[a],n)?a-1:a},right:function(t,e,r,i){for(null==r&&(r=0),null==i&&(i=t.length);r<i;){const o=r+i>>>1;n(t[o],e)>0?i=o:r=o+1}return r}}}const Cs=Ms(Ss).right;Ms((function(t){return null===t?NaN:+t})).center;function As(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let i=-1;for(let o of t)null!=(o=e(o,++i,t))&&(void 0===n?o>=o&&(n=r=o):(n>o&&(n=o),r<o&&(r=o)))}return[n,r]}class Ps extends Map{constructor(t,e=ks){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(Ls(this,t))}has(t){return super.has(Ls(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):(t.set(r,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){const r=e(n);t.has(r)&&(n=t.get(n),t.delete(r));return n}(this,t))}}function Ls({_intern:t,_key:e},n){const r=e(n);return t.has(r)?t.get(r):n}function ks(t){return null!==t&&"object"==typeof t?t.valueOf():t}function Ds(t){return t}var Rs=Array.prototype.slice;function Is(t){return function(){return t}}var Ns=Math.sqrt(50),Bs=Math.sqrt(10),Vs=Math.sqrt(2);function Us(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=Gs(t,e,n))||!isFinite(a))return[];if(a>0){let n=Math.round(t/a),r=Math.round(e/a);for(n*a<t&&++n,r*a>e&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)*a}else{a=-a;let n=Math.round(t*a),r=Math.round(e*a);for(n/a<t&&++n,r/a>e&&--r,o=new Array(i=r-n+1);++s<i;)o[s]=(n+s)/a}return r&&o.reverse(),o}function Gs(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>=Ns?10:o>=Bs?5:o>=Vs?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Ns?10:o>=Bs?5:o>=Vs?2:1)}function Hs(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>=Ns?i*=10:o>=Bs?i*=5:o>=Vs&&(i*=2),e<t?-i:i}function zs(t){return Math.ceil(Math.log(function(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&++n}return n}(t))/Math.LN2)+1}function js(){var t=Ds,e=As,n=zs;function r(r){Array.isArray(r)||(r=Array.from(r));var i,o,a=r.length,s=new Array(a);for(i=0;i<a;++i)s[i]=t(r[i],i,r);var u=e(s),l=u[0],c=u[1],h=n(s,l,c);if(!Array.isArray(h)){const t=c,n=+h;if(e===As&&([l,c]=function(t,e,n){let r;for(;;){const i=Gs(t,e,n);if(i===r||0===i||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),r=i}}(l,c,n)),(h=Us(l,c,n))[h.length-1]>=c)if(t>=c&&e===As){const t=Gs(l,c,n);isFinite(t)&&(t>0?c=(Math.floor(c/t)+1)*t:t<0&&(c=(Math.ceil(c*-t)+1)/-t))}else h.pop()}for(var f=h.length;h[0]<=l;)h.shift(),--f;for(;h[f-1]>c;)h.pop(),--f;var d,p=new Array(f+1);for(i=0;i<=f;++i)(d=p[i]=[]).x0=i>0?h[i-1]:l,d.x1=i<f?h[i]:c;for(i=0;i<a;++i)null!=(o=s[i])&&l<=o&&o<=c&&p[Cs(h,o,0,f)].push(r[i]);return p}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:Is(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:Is([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?Is(Rs.call(t)):Is(t),r):n},r}function Fs(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Ws(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}function qs(t,e,n){const r=t[e];t[e]=t[n],t[n]=r}function Ys(t,e,n){if(r=(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let n=-1;for(let r of t)null!=(r=e(r,++n,t))&&(r=+r)>=r&&(yield r)}}(t,n))).length){if((e=+e)<=0||r<2)return Ws(t);if(e>=1)return Fs(t);var r,i=(r-1)*e,o=Math.floor(i),a=Fs(function t(e,n,r=0,i=e.length-1,o=Ss){for(;i>r;){if(i-r>600){const a=i-r+1,s=n-r+1,u=Math.log(a),l=.5*Math.exp(2*u/3),c=.5*Math.sqrt(u*l*(a-l)/a)*(s-a/2<0?-1:1);t(e,n,Math.max(r,Math.floor(n-s*l/a+c)),Math.min(i,Math.floor(n+(a-s)*l/a+c)),o)}const a=e[n];let s=r,u=i;for(qs(e,r,n),o(e[i],a)>0&&qs(e,r,i);s<u;){for(qs(e,s,u),++s,--u;o(e[s],a)<0;)++s;for(;o(e[u],a)>0;)--u}0===o(e[r],a)?qs(e,r,u):(++u,qs(e,u,i)),u<=n&&(r=u+1),n<=u&&(i=u-1)}return e}(t,o).subarray(0,o+1));return a+(Ws(t.subarray(o+1))-a)*(i-o)}}function Zs(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}function Xs(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Ks(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}const Qs=Symbol("implicit");function $s(){var t=new Ps,e=[],n=[],r=Qs;function i(i){let o=t.get(i);if(void 0===o){if(r!==Qs)return r;t.set(i,o=e.push(i)-1)}return n[o%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=new Ps;for(const r of n)t.has(r)||t.set(r,e.push(r)-1);return i},i.range=function(t){return arguments.length?(n=Array.from(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return $s(e,n).unknown(r)},Ks.apply(i,arguments),i}function Js(){var t,e,n=$s().unknown(void 0),r=n.domain,i=n.range,o=0,a=1,s=!1,u=0,l=0,c=.5;function h(){var n=r().length,h=a<o,f=h?a:o,d=h?o:a;t=(d-f)/Math.max(1,n-u+2*l),s&&(t=Math.floor(t)),f+=(d-f-t*(n-u))*c,e=t*(1-u),s&&(f=Math.round(f),e=Math.round(e));var p=Zs(n).map((function(e){return f+t*e}));return i(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),h()):r()},n.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,h()):[o,a]},n.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,s=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,h()):s},n.padding=function(t){return arguments.length?(u=Math.min(1,l=+t),h()):u},n.paddingInner=function(t){return arguments.length?(u=Math.min(1,t),h()):u},n.paddingOuter=function(t){return arguments.length?(l=+t,h()):l},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),h()):c},n.copy=function(){return Js(r(),[o,a]).round(s).paddingInner(u).paddingOuter(l).align(c)},Ks.apply(h(),arguments)}function tu(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function eu(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function nu(){}var ru="\\s*([+-]?\\d+)\\s*",iu="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ou="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",au=/^#([0-9a-f]{3,8})$/,su=new RegExp("^rgb\\("+[ru,ru,ru]+"\\)$"),uu=new RegExp("^rgb\\("+[ou,ou,ou]+"\\)$"),lu=new RegExp("^rgba\\("+[ru,ru,ru,iu]+"\\)$"),cu=new RegExp("^rgba\\("+[ou,ou,ou,iu]+"\\)$"),hu=new RegExp("^hsl\\("+[iu,ou,ou]+"\\)$"),fu=new RegExp("^hsla\\("+[iu,ou,ou,iu]+"\\)$"),du={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 pu(){return this.rgb().formatHex()}function gu(){return this.rgb().formatRgb()}function vu(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=au.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?mu(e):3===n?new xu(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?yu(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?yu(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=su.exec(t))?new xu(e[1],e[2],e[3],1):(e=uu.exec(t))?new xu(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=lu.exec(t))?yu(e[1],e[2],e[3],e[4]):(e=cu.exec(t))?yu(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=hu.exec(t))?Tu(e[1],e[2]/100,e[3]/100,1):(e=fu.exec(t))?Tu(e[1],e[2]/100,e[3]/100,e[4]):du.hasOwnProperty(t)?mu(du[t]):"transparent"===t?new xu(NaN,NaN,NaN,0):null}function mu(t){return new xu(t>>16&255,t>>8&255,255&t,1)}function yu(t,e,n,r){return r<=0&&(t=e=n=NaN),new xu(t,e,n,r)}function bu(t){return t instanceof nu||(t=vu(t)),t?new xu((t=t.rgb()).r,t.g,t.b,t.opacity):new xu}function _u(t,e,n,r){return 1===arguments.length?bu(t):new xu(t,e,n,null==r?1:r)}function xu(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function wu(){return"#"+Eu(this.r)+Eu(this.g)+Eu(this.b)}function Ou(){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 Eu(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Tu(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Cu(t,e,n,r)}function Su(t){if(t instanceof Cu)return new Cu(t.h,t.s,t.l,t.opacity);if(t instanceof nu||(t=vu(t)),!t)return new Cu;if(t instanceof Cu)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 Cu(a,s,u,t.opacity)}function Mu(t,e,n,r){return 1===arguments.length?Su(t):new Cu(t,e,n,null==r?1:r)}function Cu(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Au(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}tu(nu,vu,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:pu,formatHex:pu,formatHsl:function(){return Su(this).formatHsl()},formatRgb:gu,toString:gu}),tu(xu,_u,eu(nu,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new xu(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new xu(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:wu,formatHex:wu,formatRgb:Ou,toString:Ou})),tu(Cu,Mu,eu(nu,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Cu(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Cu(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 xu(Au(t>=240?t-240:t+120,i,r),Au(t,i,r),Au(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 Pu=t=>()=>t;function Lu(t){return 1==(t=+t)?ku: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):Pu(isNaN(e)?n:e)}}function ku(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Pu(isNaN(t)?e:t)}var Du=function t(e){var n=Lu(e);function r(t,e){var r=n((t=_u(t)).r,(e=_u(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=ku(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 Ru(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 Iu(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]=zu(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 Nu(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Bu(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Vu(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]=zu(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Uu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Gu=new RegExp(Uu.source,"g");function Hu(t,e){var n,r,i,o=Uu.lastIndex=Gu.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=Uu.exec(t))&&(r=Gu.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:Bu(n,r)})),o=Gu.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 zu(t,e){var n,r=typeof e;return null==e||"boolean"===r?Pu(e):("number"===r?Bu:"string"===r?(n=vu(e))?(e=n,Du):Hu:e instanceof vu?Du:e instanceof Date?Nu:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Ru:Array.isArray(e)?Iu:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Vu:Bu)(t,e)}function ju(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Fu,Wu=180/Math.PI,qu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yu(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)*Wu,skewX:Math.atan(u)*Wu,scaleX:a,scaleY:s}}function Zu(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:Bu(t,i)},{i:u-2,x:Bu(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:Bu(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:Bu(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:Bu(t,n)},{i:s-2,x:Bu(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 Xu=Zu((function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?qu:Yu(e.a,e.b,e.c,e.d,e.e,e.f)}),"px, ","px)","deg)"),Ku=Zu((function(t){return null==t?qu:(Fu||(Fu=document.createElementNS("http://www.w3.org/2000/svg","g")),Fu.setAttribute("transform",t),(t=Fu.transform.baseVal.consolidate())?Yu((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):qu)}),", ",")",")");function Qu(t){return+t}var $u=[0,1];function Ju(t){return t}function tl(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function el(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=tl(i,r),o=n(a,o)):(r=tl(r,i),o=n(o,a)),function(t){return o(r(t))}}function nl(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]=tl(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=Cs(t,e,1,r)-1;return o[n](i[n](e))}}function rl(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function il(){var t,e,n,r,i,o,a=$u,s=$u,u=zu,l=Ju;function c(){var t,e,n,u=Math.min(a.length,s.length);return l!==Ju&&(t=a[0],e=a[u-1],t>e&&(n=t,t=e,e=n),l=function(n){return Math.max(t,Math.min(e,n))}),r=u>2?nl:el,i=o=null,h}function h(e){return null==e||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),Bu)))(n)))},h.domain=function(t){return arguments.length?(a=Array.from(t,Qu),c()):a.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),u=ju,c()},h.clamp=function(t){return arguments.length?(l=!!t||Ju,c()):l!==Ju},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 ol(){return il()(Ju,Ju)}function al(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 sl(t){return(t=al(Math.abs(t)))?t[1]:NaN}var ul,ll=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cl(t){if(!(e=ll.exec(t)))throw new Error("invalid format: "+t);var e;return new hl({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 hl(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 fl(t,e){var n=al(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")}cl.prototype=hl.prototype,hl.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 dl={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>fl(100*t,e),r:fl,s:function(t,e){var n=al(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(ul=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")+al(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function pl(t){return t}var gl,vl,ml,yl=Array.prototype.map,bl=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _l(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?pl:(e=yl.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?pl:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(yl.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=cl(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"):dl[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",_="$"===f?o:/[%p]/.test(y)?u:"",x=dl[y],w=/[defgprs%]/.test(y);function O(t){var i,o,u,f=b,O=_;if("c"===y)O=x(t)+O,t="";else{var E=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:x(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)),E&&0==+t&&"+"!==h&&(E=!1),f=(E?"("===h?h:l:"-"===h||"("===h?"":h)+f,O=("s"===y?bl[8+ul/3]:"")+O+(E&&"("===h?")":""),w)for(i=-1,o=t.length;++i<o;)if(48>(u=t.charCodeAt(i))||u>57){O=(46===u?a+t.slice(i+1):t.slice(i))+O,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var T=f.length+t.length+O.length,S=T<p?new Array(p-T+1).join(e):"";switch(g&&d&&(t=r(S+t,S.length?p-O.length:1/0),S=""),n){case"<":t=f+t+O+S;break;case"=":t=f+S+t+O;break;case"^":t=S.slice(0,T=S.length>>1)+f+t+O+S.slice(T);break;default:t=S+f+t+O}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)),O.toString=function(){return t+""},O}return{format:h,formatPrefix:function(t,e){var n=h(((t=cl(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(sl(e)/3))),i=Math.pow(10,-r),o=bl[8+r/3];return function(t){return n(i*t)+o}}}}function xl(t,e,n,r){var i,o=Hs(t,e,n);switch((r=cl(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(sl(e)/3)))-sl(Math.abs(t)))}(o,a))||(r.precision=i),ml(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,sl(e)-sl(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,-sl(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return vl(r)}function wl(t){var e=t.domain;return t.ticks=function(t){var n=e();return Us(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return xl(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i,o=e(),a=0,s=o.length-1,u=o[a],l=o[s],c=10;for(l<u&&(i=u,u=l,l=i,i=a,a=s,s=i);c-- >0;){if((i=Gs(u,l,n))===r)return o[a]=u,o[s]=l,e(o);if(i>0)u=Math.floor(u/i)*i,l=Math.ceil(l/i)*i;else{if(!(i<0))break;u=Math.ceil(u*i)/i,l=Math.floor(l*i)/i}r=i}return t},t}function Ol(){var t=ol();return t.copy=function(){return rl(t,Ol())},Ks.apply(t,arguments),wl(t)}function El(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 Tl(t){return Math.log(t)}function Sl(t){return Math.exp(t)}function Ml(t){return-Math.log(-t)}function Cl(t){return-Math.exp(-t)}function Al(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Pl(t){return function(e){return-t(-e)}}function Ll(t){var e,n,r=t(Tl,Sl),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?Al:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=Pl(e),n=Pl(n),t(Ml,Cl)):t(Tl,Sl),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.floor(f),d=Math.ceil(d),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)}2*g.length<p&&(g=Us(s,u,p))}else g=Us(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=vl(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(El(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}gl=_l({thousands:",",grouping:[3],currency:["$",""]}),vl=gl.format,ml=gl.formatPrefix;var kl=new Date,Dl=new Date;function Rl(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 Rl((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 kl.setTime(+e),Dl.setTime(+r),t(kl),t(Dl),Math.floor(n(kl,Dl))},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 Il=Rl((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Il.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Rl((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Il:null};var Nl=Rl((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()})),Bl=Rl((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()})),Vl=Rl((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()})),Ul=Rl(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1);function Gl(t){return Rl((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 Hl=Gl(0),zl=Gl(1),jl=(Gl(2),Gl(3),Gl(4)),Fl=(Gl(5),Gl(6),Rl((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()}))),Wl=Rl((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()}));Wl.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Rl((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 ql=Rl((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 Yl(t){return Rl((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 Zl=Yl(0),Xl=Yl(1),Kl=(Yl(2),Yl(3),Yl(4)),Ql=(Yl(5),Yl(6),Rl((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()})));Ql.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Rl((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};const[$l,Jl]=function(t,e,n,r,i,o){const a=[[Nl,1,1e3],[Nl,5,5e3],[Nl,15,15e3],[Nl,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 s(e,n,r){const i=Math.abs(n-e)/r,o=Ms(([,,t])=>t).right(a,i);if(o===a.length)return t.every(Hs(e/31536e6,n/31536e6,r));if(0===o)return Il.every(Math.max(Hs(e,n,r),1));const[s,u]=a[i/a[o-1][2]<a[o][2]/i?o-1:o];return s.every(u)}return[function(t,e,n){const r=e<t;r&&([t,e]=[e,t]);const i=n&&"function"==typeof n.range?n:s(t,e,n),o=i?i.range(t,+e+1):[];return r?o.reverse():o},s]}(Wl,Fl,Hl,Ul,Vl,Bl);function tc(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 ec(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 nc(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var rc,ic,oc={"-":"",_:" ",0:"0"},ac=/^\s*\d+/,sc=/^%/,uc=/[\\^$*+?|[\]().{}]/g;function lc(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 cc(t){return t.replace(uc,"\\$&")}function hc(t){return new RegExp("^(?:"+t.map(cc).join("|")+")","i")}function fc(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function dc(t,e,n){var r=ac.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function pc(t,e,n){var r=ac.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function gc(t,e,n){var r=ac.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function vc(t,e,n){var r=ac.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function mc(t,e,n){var r=ac.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function yc(t,e,n){var r=ac.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function bc(t,e,n){var r=ac.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function _c(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 xc(t,e,n){var r=ac.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function wc(t,e,n){var r=ac.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function Oc(t,e,n){var r=ac.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function Ec(t,e,n){var r=ac.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function Tc(t,e,n){var r=ac.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Sc(t,e,n){var r=ac.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Mc(t,e,n){var r=ac.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Cc(t,e,n){var r=ac.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Ac(t,e,n){var r=ac.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Pc(t,e,n){var r=sc.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Lc(t,e,n){var r=ac.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function kc(t,e,n){var r=ac.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Dc(t,e){return lc(t.getDate(),e,2)}function Rc(t,e){return lc(t.getHours(),e,2)}function Ic(t,e){return lc(t.getHours()%12||12,e,2)}function Nc(t,e){return lc(1+Ul.count(Wl(t),t),e,3)}function Bc(t,e){return lc(t.getMilliseconds(),e,3)}function Vc(t,e){return Bc(t,e)+"000"}function Uc(t,e){return lc(t.getMonth()+1,e,2)}function Gc(t,e){return lc(t.getMinutes(),e,2)}function Hc(t,e){return lc(t.getSeconds(),e,2)}function zc(t){var e=t.getDay();return 0===e?7:e}function jc(t,e){return lc(Hl.count(Wl(t)-1,t),e,2)}function Fc(t){var e=t.getDay();return e>=4||0===e?jl(t):jl.ceil(t)}function Wc(t,e){return t=Fc(t),lc(jl.count(Wl(t),t)+(4===Wl(t).getDay()),e,2)}function qc(t){return t.getDay()}function Yc(t,e){return lc(zl.count(Wl(t)-1,t),e,2)}function Zc(t,e){return lc(t.getFullYear()%100,e,2)}function Xc(t,e){return lc((t=Fc(t)).getFullYear()%100,e,2)}function Kc(t,e){return lc(t.getFullYear()%1e4,e,4)}function Qc(t,e){var n=t.getDay();return lc((t=n>=4||0===n?jl(t):jl.ceil(t)).getFullYear()%1e4,e,4)}function $c(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+lc(e/60|0,"0",2)+lc(e%60,"0",2)}function Jc(t,e){return lc(t.getUTCDate(),e,2)}function th(t,e){return lc(t.getUTCHours(),e,2)}function eh(t,e){return lc(t.getUTCHours()%12||12,e,2)}function nh(t,e){return lc(1+ql.count(Ql(t),t),e,3)}function rh(t,e){return lc(t.getUTCMilliseconds(),e,3)}function ih(t,e){return rh(t,e)+"000"}function oh(t,e){return lc(t.getUTCMonth()+1,e,2)}function ah(t,e){return lc(t.getUTCMinutes(),e,2)}function sh(t,e){return lc(t.getUTCSeconds(),e,2)}function uh(t){var e=t.getUTCDay();return 0===e?7:e}function lh(t,e){return lc(Zl.count(Ql(t)-1,t),e,2)}function ch(t){var e=t.getUTCDay();return e>=4||0===e?Kl(t):Kl.ceil(t)}function hh(t,e){return t=ch(t),lc(Kl.count(Ql(t),t)+(4===Ql(t).getUTCDay()),e,2)}function fh(t){return t.getUTCDay()}function dh(t,e){return lc(Xl.count(Ql(t)-1,t),e,2)}function ph(t,e){return lc(t.getUTCFullYear()%100,e,2)}function gh(t,e){return lc((t=ch(t)).getUTCFullYear()%100,e,2)}function vh(t,e){return lc(t.getUTCFullYear()%1e4,e,4)}function mh(t,e){var n=t.getUTCDay();return lc((t=n>=4||0===n?Kl(t):Kl.ceil(t)).getUTCFullYear()%1e4,e,4)}function yh(){return"+0000"}function bh(){return"%"}function _h(t){return+t}function xh(t){return Math.floor(+t/1e3)}function wh(t){return new Date(t)}function Oh(t){return t instanceof Date?+t:+new Date(+t)}function Eh(t,e,n,r,i,o,a,s,u,l){var c=ol(),h=c.invert,f=c.domain,d=l(".%L"),p=l(":%S"),g=l("%I:%M"),v=l("%I %p"),m=l("%a %d"),y=l("%b %d"),b=l("%B"),_=l("%Y");function x(t){return(u(t)<t?d:s(t)<t?p:a(t)<t?g:o(t)<t?v:r(t)<t?i(t)<t?m:y:n(t)<t?b:_)(t)}return c.invert=function(t){return new Date(h(t))},c.domain=function(t){return arguments.length?f(Array.from(t,Oh)):f().map(wh)},c.ticks=function(e){var n=f();return t(n[0],n[n.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?x:l(e)},c.nice=function(t){var n=f();return t&&"function"==typeof t.range||(t=e(n[0],n[n.length-1],null==t?10:t)),t?f(El(n,t)):c},c.copy=function(){return rl(c,Eh(t,e,n,r,i,o,a,s,u,l))},c}function Th(){return Ks.apply(Eh($l,Jl,Wl,Fl,Hl,Ul,Vl,Bl,Nl,ic).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}!function(t){rc=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=hc(i),c=fc(i),h=hc(o),f=fc(o),d=hc(a),p=fc(a),g=hc(s),v=fc(s),m=hc(u),y=fc(u),b={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:Dc,e:Dc,f:Vc,g:Xc,G:Qc,H:Rc,I:Ic,j:Nc,L:Bc,m:Uc,M:Gc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:_h,s:xh,S:Hc,u:zc,U:jc,V:Wc,w:qc,W:Yc,x:null,X:null,y:Zc,Y:Kc,Z:$c,"%":bh},_={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:Jc,e:Jc,f:ih,g:gh,G:mh,H:th,I:eh,j:nh,L:rh,m:oh,M:ah,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:_h,s:xh,S:sh,u:uh,U:lh,V:hh,w:fh,W:dh,x:null,X:null,y:ph,Y:vh,Z:yh,"%":bh},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p.get(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.get(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.get(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.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:Oc,e:Oc,f:Ac,g:bc,G:yc,H:Tc,I:Tc,j:Ec,L:Cc,m:wc,M:Sc,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c.get(r[0].toLowerCase()),n+r[0].length):-1},q:xc,Q:Lc,s:kc,S:Mc,u:pc,U:gc,V:vc,w:dc,W:mc,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:bc,Y:yc,Z:_c,"%":Pc};function w(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=oc[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 O(t,e){return function(n){var r,i,o=nc(1900,void 0,1);if(E(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=ec(nc(o.y,0,1))).getUTCDay(),r=i>4||0===i?Xl.ceil(r):Xl(r),r=ql.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=tc(nc(o.y,0,1))).getDay(),r=i>4||0===i?zl.ceil(r):zl(r),r=Ul.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?ec(nc(o.y,0,1)).getUTCDay():tc(nc(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,ec(o)):tc(o)}}function E(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=x[i in oc?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),{format:function(t){var e=w(t+="",b);return e.toString=function(){return t},e},parse:function(t){var e=O(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=w(t+="",_);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}})}(t),ic=rc.format,rc.parse,rc.utcFormat,rc.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"]});const Sh=Math.PI,Mh=2*Sh,Ch=Mh-1e-6;function Ah(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ph(){return new Ah}function Lh(t){return function(){return t}}Ah.prototype=Ph.prototype={constructor:Ah,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((Sh-Math.acos((p+h-g)/(2*v*m)))/2),b=y/m,_=y/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*l)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*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%Mh+Mh),h>Ch?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>=Sh)+","+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 kh=Math.abs,Dh=Math.atan2,Rh=Math.cos,Ih=Math.max,Nh=Math.min,Bh=Math.sin,Vh=Math.sqrt,Uh=Math.PI,Gh=Uh/2,Hh=2*Uh;function zh(t){return t>1?0:t<-1?Uh:Math.acos(t)}function jh(t){return t>=1?Gh:t<=-1?-Gh:Math.asin(t)}function Fh(t){return t.innerRadius}function Wh(t){return t.outerRadius}function qh(t){return t.startAngle}function Yh(t){return t.endAngle}function Zh(t){return t&&t.padAngle}function Xh(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 Kh(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/Vh(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,b=g-d,_=y*y+b*b,x=i-o,w=f*g-p*d,O=(b<0?-1:1)*Vh(Ih(0,x*x*_-w*w)),E=(w*b-y*O)/_,T=(-w*y-b*O)/_,S=(w*b+y*O)/_,M=(-w*y+b*O)/_,C=E-v,A=T-m,P=S-v,L=M-m;return C*C+A*A>P*P+L*L&&(E=S,T=M),{cx:E,cy:T,x01:-c,y01:-h,x11:E*(i/x-1),y11:T*(i/x-1)}}function Qh(){var t=Fh,e=Wh,n=Lh(0),r=null,i=qh,o=Yh,a=Zh,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Gh,d=o.apply(this,arguments)-Gh,p=kh(d-f),g=d>f;if(s||(s=u=Ph()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>Hh-1e-12)s.moveTo(h*Rh(f),h*Bh(f)),s.arc(0,0,h,f,d,!g),c>1e-12&&(s.moveTo(c*Rh(d),c*Bh(d)),s.arc(0,0,c,d,f,g));else{var v,m,y=f,b=d,_=f,x=d,w=p,O=p,E=a.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):Vh(c*c+h*h)),S=Nh(kh(h-c)/2,+n.apply(this,arguments)),M=S,C=S;if(T>1e-12){var A=jh(T/c*Bh(E)),P=jh(T/h*Bh(E));(w-=2*A)>1e-12?(_+=A*=g?1:-1,x-=A):(w=0,_=x=(f+d)/2),(O-=2*P)>1e-12?(y+=P*=g?1:-1,b-=P):(O=0,y=b=(f+d)/2)}var L=h*Rh(y),k=h*Bh(y),D=c*Rh(x),R=c*Bh(x);if(S>1e-12){var I,N=h*Rh(b),B=h*Bh(b),V=c*Rh(_),U=c*Bh(_);if(p<Uh&&(I=Xh(L,k,V,U,N,B,D,R))){var G=L-I[0],H=k-I[1],z=N-I[0],j=B-I[1],F=1/Bh(zh((G*z+H*j)/(Vh(G*G+H*H)*Vh(z*z+j*j)))/2),W=Vh(I[0]*I[0]+I[1]*I[1]);M=Nh(S,(c-W)/(F-1)),C=Nh(S,(h-W)/(F+1))}}O>1e-12?C>1e-12?(v=Kh(V,U,L,k,h,C,g),m=Kh(N,B,D,R,h,C,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),C<S?s.arc(v.cx,v.cy,C,Dh(v.y01,v.x01),Dh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,C,Dh(v.y01,v.x01),Dh(v.y11,v.x11),!g),s.arc(0,0,h,Dh(v.cy+v.y11,v.cx+v.x11),Dh(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,C,Dh(m.y11,m.x11),Dh(m.y01,m.x01),!g))):(s.moveTo(L,k),s.arc(0,0,h,y,b,!g)):s.moveTo(L,k),c>1e-12&&w>1e-12?M>1e-12?(v=Kh(D,R,N,B,c,-M,g),m=Kh(L,k,V,U,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<S?s.arc(v.cx,v.cy,M,Dh(v.y01,v.x01),Dh(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,Dh(v.y01,v.x01),Dh(v.y11,v.x11),!g),s.arc(0,0,c,Dh(v.cy+v.y11,v.cx+v.x11),Dh(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,Dh(m.y11,m.x11),Dh(m.y01,m.x01),!g))):s.arc(0,0,c,x,_,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-Uh/2;return[Rh(r)*n,Bh(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:Lh(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:Lh(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:Lh(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Lh(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:Lh(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:Lh(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:Lh(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}var $h=Array.prototype.slice;function Jh(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function tf(t){this._context=t}function ef(t){return new tf(t)}function nf(t){return t[0]}function rf(t){return t[1]}function of(t,e){var n=Lh(!0),r=null,i=ef,o=null;function a(a){var s,u,l,c=(a=Jh(a)).length,h=!1;for(null==r&&(o=i(l=Ph())),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 t="function"==typeof t?t:void 0===t?nf:Lh(t),e="function"==typeof e?e:void 0===e?rf:Lh(e),a.x=function(e){return arguments.length?(t="function"==typeof e?e:Lh(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:Lh(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:Lh(!!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}function af(t,e,n){var r=null,i=Lh(!0),o=null,a=ef,s=null;function u(u){var l,c,h,f,d,p=(u=Jh(u)).length,g=!1,v=new Array(p),m=new Array(p);for(null==o&&(s=a(d=Ph())),l=0;l<=p;++l){if(!(l<p&&i(f=u[l],l,u))===g)if(g=!g)c=l,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=l-1;h>=c;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[l]=+t(f,l,u),m[l]=+e(f,l,u),s.point(r?+r(f,l,u):v[l],n?+n(f,l,u):m[l]))}if(d)return s=null,d+""||null}function l(){return of().defined(i).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?nf:Lh(+t),e="function"==typeof e?e:Lh(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?rf:Lh(+n),u.x=function(e){return arguments.length?(t="function"==typeof e?e:Lh(+e),r=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:Lh(+e),u):t},u.x1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:Lh(+t),u):r},u.y=function(t){return arguments.length?(e="function"==typeof t?t:Lh(+t),n=null,u):e},u.y0=function(t){return arguments.length?(e="function"==typeof t?t:Lh(+t),u):e},u.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:Lh(+t),u):n},u.lineX0=u.lineY0=function(){return l().x(t).y(e)},u.lineY1=function(){return l().x(t).y(n)},u.lineX1=function(){return l().x(r).y(e)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:Lh(!!t),u):i},u.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),u):a},u.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),u):o},u}function sf(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function uf(t){return t}tf.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 lf=hf(ef);function cf(t){this._curve=t}function hf(t){function e(e){return new cf(t(e))}return e._curve=t,e}function ff(){return t=of().curve(lf),e=t.curve,t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(hf(t)):e()._curve},t;var t,e}function df(t){return t.source}function pf(t){return t.target}function gf(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function vf(){return function(t){var e=df,n=pf,r=nf,i=rf,o=null;function a(){var a,s=$h.call(arguments),u=e.apply(this,s),l=n.apply(this,s);if(o||(o=a=Ph()),t(o,+r.apply(this,(s[0]=u,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:Lh(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:Lh(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}(gf)}function mf(){}function yf(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 bf(t){this._context=t}function _f(t){return new bf(t)}function xf(t){this._context=t}function wf(t){return new xf(t)}function Of(t){this._context=t}function Ef(t){return new Of(t)}function Tf(t,e){this._basis=new bf(t),this._beta=e}cf.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}},bf.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:yf(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:yf(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},xf.prototype={areaStart:mf,areaEnd:mf,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:yf(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Of.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:yf(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Tf.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 Sf=function t(e){function n(t){return 1===e?new bf(t):new Tf(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Mf(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 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(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Mf(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:Mf(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 Pf(t,e){this._context=t,this._k=(1-e)/6}Pf.prototype={areaStart:mf,areaEnd:mf,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:Mf(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 Lf=function t(e){function n(t){return new Pf(t,e)}return n.tension=function(e){return t(+e)},n}(0);function kf(t,e){this._context=t,this._k=(1-e)/6}kf.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:Mf(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 Df=function t(e){function n(t){return new kf(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Rf(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 If(t,e){this._context=t,this._alpha=e}If.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:Rf(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 If(t,e):new Cf(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Bf(t,e){this._context=t,this._alpha=e}Bf.prototype={areaStart:mf,areaEnd:mf,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:Rf(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 Vf=function t(e){function n(t){return e?new Bf(t,e):new Pf(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Uf(t,e){this._context=t,this._alpha=e}Uf.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:Rf(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 Gf=function t(e){function n(t){return e?new Uf(t,e):new kf(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Hf(t){this._context=t}function zf(t){return new Hf(t)}function jf(t){return t<0?-1:1}function Ff(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(jf(o)+jf(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Wf(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function qf(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 Yf(t){this._context=t}function Zf(t){this._context=new Xf(t)}function Xf(t){this._context=t}function Kf(t){return new Yf(t)}function Qf(t){return new Zf(t)}function $f(t){this._context=t}function Jf(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 td(t){return new $f(t)}function ed(t,e){this._context=t,this._t=e}function nd(t){return new ed(t,.5)}function rd(t){return new ed(t,0)}function id(t){return new ed(t,1)}function od(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 ad(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function sd(t,e){return t[e]}function ud(t){const e=[];return e.key=t,e}function ld(){var t=Lh([]),e=ad,n=od,r=sd;function i(i){var o,a,s=Array.from(t.apply(this,arguments),ud),u=s.length,l=-1;for(const t of i)for(o=0,++l;o<u;++o)(s[o][l]=[0,+r(t,s[o].key,l,i)]).data=t;for(o=0,a=Jh(e(s));o<u;++o)s[a[o]].index=o;return n(s,a),s}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:Lh(Array.from(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:Lh(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?ad:"function"==typeof t?t:Lh(Array.from(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?od:t,i):n},i}function cd(t,e){if((s=t.length)>0)for(var n,r,i,o,a,s,u=0,l=t[e[0]].length;u<l;++u)for(o=a=0,n=0;n<s;++n)(i=(r=t[e[n]][u])[1]-r[0])>0?(r[0]=o,r[1]=o+=i):i<0?(r[1]=a,r[0]=a+=i):(r[0]=0,r[1]=i)}Hf.prototype={areaStart:mf,areaEnd:mf,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))}},Yf.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:qf(this,this._t0,Wf(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,qf(this,Wf(this,n=Ff(this,t,e)),n);break;default:qf(this,this._t0,n=Ff(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Zf.prototype=Object.create(Yf.prototype)).point=function(t,e){Yf.prototype.point.call(this,e,t)},Xf.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)}},$f.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=Jf(t),i=Jf(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)}},ed.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 hd=function(){function t(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}return t.prototype.getAllDataFromDomain=function(t){if(!this.getData())return null;var e=this.getOptions(),n=this.getData(),r=this.getDataGroups(),i=ka.getProperty(e,"data").groupMapsTo,o=ka.getProperty(e,"axes");return t&&(n=n.filter((function(e){return t.includes(e[i])}))),o&&Object.keys(o).forEach((function(t){var e=o[t].mapsTo,r=o[t].scaleType;if(r!==U.LINEAR&&r!==U.LOG||(n=n.map((function(t){var n;return A(A({},t),((n={})[e]=null===t[e]?t[e]:Number(t[e]),n))}))),e&&o[t].domain)if(r===U.LABELS)n=n.filter((function(n){return o[t].domain.includes(n[e])}));else{var i=o[t].domain,a=i[0],s=i[1];n=n.filter((function(t){return!(e in t)||t[e]>=a&&t[e]<=s}))}})),n.filter((function(t){return r.find((function(e){return e.name===t[i]}))}))},t.prototype.getDisplayData=function(t){if(!this.get("data"))return null;var e=mt.items.status.ACTIVE,n=this.getDataGroups(t),r=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain(t).filter((function(t){return n.find((function(n){return n.name===t[r]&&n.status===e}))}))},t.prototype.getData=function(){return this.get("data")},t.prototype.isDataEmpty=function(){return!this.getData().length},t.prototype.setData=function(t){var e=this.sanitize(ka.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(t){return ka.getProperty(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter((function(e){return t.includes(e.name)})):this.get("dataGroups")},t.prototype.getActiveDataGroups=function(t){var e=mt.items.status.ACTIVE;return this.getDataGroups(t).filter((function(t){return t.status===e}))},t.prototype.getDataGroupNames=function(t){return this.getDataGroups(t).map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(t){return this.getActiveDataGroups(t).map((function(t){return t.name}))},t.prototype.aggregateBinDataByGroup=function(t){return ka.groupBy(t,"group")},t.prototype.getBinConfigurations=function(){var t=this,e=this.getDisplayData(),n=this.getOptions(),r=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),o=n.axes[r],a=n.data.groupMapsTo,s=o.bins,u=void 0===s?vt.defaultBins:s,l=Array.isArray(u),c=js().value((function(t){return t[i]})).thresholds(u)(e);if(l)c[c.length-1].x1=u[u.length-1];else{var h=c[0].x1-c[0].x0;c[c.length-1].x1=+c[c.length-1].x0+h}var f=l?[u[0],u[u.length-1]]:[c[0].x0,c[c.length-1].x1],d=Array.from(new Set(e.map((function(t){return t[a]})))),p=[];return c.forEach((function(e){var n=e.x0+"-"+e.x1,r=t.aggregateBinDataByGroup(e);d.forEach((function(t){p.push({group:t,key:n,value:r[t]||0,bin:e.x0})}))})),{bins:c,binsDomain:f}},t.prototype.getBinnedStackedData=function(){var t=this.getOptions().data.groupMapsTo,e=this.getActiveDataGroupNames(),n=this.getBinConfigurations().bins,r=this.getDataValuesGroupedByKeys({bins:n});return ld().keys(e)(r).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.getGroupedData=function(t){var e=this.getDisplayData(t),n={},r=this.getOptions().data.groupMapsTo;return e.map((function(t){var e=t[r];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]})),Object.keys(n).map((function(t){return{name:t,data:n[t]}}))},t.prototype.getStackKeys=function(t){var e,n=this,r=t.bins,i=void 0===r?null:r,o=t.groups,a=void 0===o?null:o,s=this.getOptions(),u=this.getDisplayData(a);e=i?i.map((function(t){return t.x0+"-"+t.x1})):ka.removeArrayDuplicates(u.map((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]})));var l=this.services.cartesianScales.domainAxisPosition,c=s.axes[l].scaleType;return c===U.TIME?e.sort((function(t,e){return new Date(t)-new Date(e)})):c!==U.LOG&&c!==U.LINEAR||e.sort((function(t,e){return t-e})),e},t.prototype.getDataValuesGroupedByKeys=function(t){var e=this,n=t.bins,r=void 0===n?null:n,i=t.groups,o=void 0===i?null:i,a=this.getOptions().data.groupMapsTo,s=this.getDisplayData(o),u=this.getDataGroupNames(),l=this.getStackKeys({bins:r,groups:o});return r?l.map((function(t){var e=t.split("-"),n=e[0],i=e[1],o={x0:n,x1:i},s=r.find((function(t){return t.x0.toString()===n.toString()}));return u.forEach((function(t){o[t]=s.filter((function(e){return e[a]===t})).length})),o})):l.map((function(t){var n={sharedStackKey:t};return u.forEach((function(r){var i=s.find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[a]===r&&n.hasOwnProperty(i)&&n[i].toString()===t})),o=e.services.cartesianScales.getRangeIdentifier(n);n[r]=i?i[o]:null})),n}))},t.prototype.getStackedData=function(t){var e=t.percentage,n=void 0!==e&&e,r=t.groups,i=void 0===r?null:r,o=t.divergent,a=void 0!==o&&o,s=this.getOptions().data.groupMapsTo,u=this.getDataGroupNames(i),l=this.getDataValuesGroupedByKeys({groups:i});if(n){var c=ka.fromPairs(l.map((function(t){return[t.sharedStackKey,0]})));l.forEach((function(t){u.forEach((function(e){c[t.sharedStackKey]+=t[e]}))})),l.forEach((function(t){u.forEach((function(e){c[t.sharedStackKey]?t[e]=t[e]/c[t.sharedStackKey]*100:t[e]=0}))}))}return(a?ld().offset(cd):ld()).keys(u)(l).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(n){var r=t[n];return r[s]=u[e],r}))}))},t.prototype.getOptions=function(){return this.state.options},t.prototype.set=function(t,e){this.state=Object.assign({},this.state,t);var n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)},t.prototype.get=function(t){return t?this.state[t]:this.state},t.prototype.setOptions=function(t){var e=this.getOptions();ka.updateLegendAdditionalItems(e,t),this.set({options:ka.merge(e,t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(ot.Model.UPDATE,{animate:t}))},t.prototype.toggleDataLabel=function(t){var e=mt.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}));var u=i.filter((function(t){return t.status===n})),l=this.getOptions(),c=i.some((function(t){return t.status===r}));l.data.selectedGroups=c?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(ot.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},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=ka.getProperty(this.colorScale,t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=ka.getProperty(this.colorScale,t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.isUserProvidedColorScaleValid=function(){var t=ka.getProperty(this.getOptions(),"color","scale"),e=this.getDataGroups();return null!=t&&0!=Object.keys(t).length&&e.some((function(e){return Object.keys(t).includes(e.name)}))},t.prototype.getColorClassName=function(t){var e=this.colorClassNames(t.dataGroupName),n=t.originalClassName;return t.classNameTypes.forEach((function(r){return n=t.originalClassName?n+" "+r+"-"+e:r+"-"+e})),n},t.prototype.getStatus=function(){return null},t.prototype.getAllDataGroupsNames=function(){return this.allDataGroups},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/docs-tutorials--tabular-data-format");var e=[],n=t.datasets,r=t.labels;return n.forEach((function(t){t.data.forEach((function(n,i){var o,a=ka.getProperty(t,"label");if(null===a){var s=ka.getProperty(r,i);o=s||"Ungrouped"}else o=a;var u={group:o,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return t=this.getTabularData(t)},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=mt.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=ka.removeArrayDuplicates(t.map((function(t){return t[e]})));o.data.selectedGroups.length&&(o.data.selectedGroups.every((function(t){return a.includes(t)}))||(o.data.selectedGroups=[]));var s=function(t){return!o.data.selectedGroups.length||o.data.selectedGroups.includes(t)?r:i};return a.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setCustomColorScale=function(){var t=this;if(this.isUserProvidedColorScaleValid()){var e=this.getOptions(),n=ka.getProperty(e,"color","scale");Object.keys(n).forEach((function(e){t.allDataGroups.includes(e)||console.warn('"'+e+'" does not exist in data groups.')})),this.allDataGroups.filter((function(t){return n[t]})).forEach((function(e){return t.colorScale[e]=n[e]}))}},t.prototype.setColorClassNames=function(){var t=ka.getProperty(this.getOptions(),"color","pairing"),e=ka.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=ka.getProperty(t,"option"),r=e>5?14:e;n=n<=pt.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.colorClassNames=$s().range(i).domain(this.allDataGroups)},t}(),fd=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}(),dd={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 ",selectorFocusable:"\n a[href], area[href], input:not([disabled]),\n button:not([disabled]),select:not([disabled]),\n textarea:not([disabled]),\n iframe, object, embed, *[tabindex], *[contenteditable=true]\n "},pd=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}()}(),gd="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,vd="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),md="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(vd):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},yd=["top","right","bottom","left","width","height","size","weight"],bd="undefined"!=typeof MutationObserver,_d=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(){md(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)};_d.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},_d.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},_d.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},_d.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},_d.prototype.connect_=function(){gd&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),bd?(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)},_d.prototype.disconnect_=function(){gd&&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)},_d.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),yd.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},_d.getInstance=function(){return this.instance_||(this.instance_=new _d),this.instance_},_d.instance_=null;var xd=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},wd=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||vd},Od=Ad(0,0,0,0);function Ed(t){return parseFloat(t)||0}function Td(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Ed(t["border-"+n+"-width"])}),0)}function Sd(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Od;var r=wd(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]=Ed(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Ed(r.width),u=Ed(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Td(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Td(r,"top","bottom")+a)),!function(t){return t===wd(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 Ad(i.left,i.top,s,u)}var Md="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof wd(t).SVGGraphicsElement}:function(t){return t instanceof wd(t).SVGElement&&"function"==typeof t.getBBox};function Cd(t){return gd?Md(t)?function(t){var e=t.getBBox();return Ad(0,0,e.width,e.height)}(t):Sd(t):Od}function Ad(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Pd=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Ad(0,0,0,0),this.target=t};Pd.prototype.isActive=function(){var t=Cd(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Pd.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Ld=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 xd(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);xd(this,{target:t,contentRect:n})},kd=function(t,e,n){if(this.activeObservations_=[],this.observations_=new pd,"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};kd.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 wd(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Pd(t)),this.controller_.addObserver(this),this.controller_.refresh())}},kd.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 wd(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))}},kd.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},kd.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},kd.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Ld(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},kd.prototype.clearActive=function(){this.activeObservations_.splice(0)},kd.prototype.hasActive=function(){return this.activeObservations_.length>0};var Dd="undefined"!=typeof WeakMap?new WeakMap:new pd,Rd=function(t){if(!(this instanceof Rd))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=_d.getInstance(),n=new kd(t,e,this);Dd.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){Rd.prototype[t]=function(){return(e=Dd.get(this))[t].apply(e,arguments);var e}}));var Id=void 0!==vd.ResizeObserver?vd.ResizeObserver:Rd,Nd=Ua((function(t){!function(e){var n=function(){return{escape:function(t){return t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1")},parseExtension:t,mimeType:function(e){var n=t(e).toLowerCase();return(r="application/font-woff",{woff:r,woff2:r,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:"image/jpeg",jpeg:"image/jpeg",gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml"})[n]||"";var r},dataAsUrl:function(t,e){return"data:"+e+";base64,"+t},isDataUrl:function(t){return-1!==t.search(/^(data:)/)},canvasToBlob:function(t){return t.toBlob?new Promise((function(e){t.toBlob(e)})):function(t){return new Promise((function(e){for(var n=window.atob(t.toDataURL().split(",")[1]),r=n.length,i=new Uint8Array(r),o=0;o<r;o++)i[o]=n.charCodeAt(o);e(new Blob([i],{type:"image/png"}))}))}(t)},resolveUrl:function(t,e){var n=document.implementation.createHTMLDocument(),r=n.createElement("base");n.head.appendChild(r);var i=n.createElement("a");return n.body.appendChild(i),r.href=e,i.href=t,i.href},getAndEncode:function(t){s.impl.options.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+(new Date).getTime());return new Promise((function(e){var n,r=new XMLHttpRequest;if(r.onreadystatechange=function(){if(4!==r.readyState)return;if(200!==r.status)return void(n?e(n):o("cannot fetch resource: "+t+", status: "+r.status));var i=new FileReader;i.onloadend=function(){var t=i.result.split(/,/)[1];e(t)},i.readAsDataURL(r.response)},r.ontimeout=function(){n?e(n):o("timeout of 30000ms occured while fetching resource: "+t)},r.responseType="blob",r.timeout=3e4,r.open("GET",t,!0),r.send(),s.impl.options.imagePlaceholder){var i=s.impl.options.imagePlaceholder.split(/,/);i&&i[1]&&(n=i[1])}function o(t){console.error(t),e("")}}))},uid:function(){var t=0;return function(){return"u"+("0000"+(Math.random()*Math.pow(36,4)<<0).toString(36)).slice(-4)+t++}}(),delay:function(t){return function(e){return new Promise((function(n){setTimeout((function(){n(e)}),t)}))}},asArray:function(t){for(var e=[],n=t.length,r=0;r<n;r++)e.push(t[r]);return e},escapeXhtml:function(t){return t.replace(/#/g,"%23").replace(/\n/g,"%0A")},makeImage:function(t){return new Promise((function(e,n){var r=new Image;r.onload=function(){e(r)},r.onerror=n,r.src=t}))},width:function(t){var n=e(t,"border-left-width"),r=e(t,"border-right-width");return t.scrollWidth+n+r},height:function(t){var n=e(t,"border-top-width"),r=e(t,"border-bottom-width");return t.scrollHeight+n+r}};function t(t){var e=/\.([^\.\/]*?)$/g.exec(t);return e?e[1]:""}function e(t,e){var n=window.getComputedStyle(t).getPropertyValue(e);return parseFloat(n.replace("px",""))}}(),r=function(){var t=/url\(['"]?([^'"]+?)['"]?\)/g;return{inlineAll:function(t,n,o){return function(){return!e(t)}()?Promise.resolve(t):Promise.resolve(t).then(r).then((function(e){var r=Promise.resolve(t);return e.forEach((function(t){r=r.then((function(e){return i(e,t,n,o)}))})),r}))},shouldProcess:e,impl:{readUrls:r,inline:i}};function e(e){return-1!==e.search(t)}function r(e){for(var r,i=[];null!==(r=t.exec(e));)i.push(r[1]);return i.filter((function(t){return!n.isDataUrl(t)}))}function i(t,e,r,i){return Promise.resolve(e).then((function(t){return r?n.resolveUrl(t,r):t})).then(i||n.getAndEncode).then((function(t){return n.dataAsUrl(t,n.mimeType(e))})).then((function(r){return t.replace(function(t){return new RegExp("(url\\(['\"]?)("+n.escape(t)+")(['\"]?\\))","g")}(e),"$1"+r+"$3")}))}}(),i=function(){return{resolveAll:function(){return t().then((function(t){return Promise.all(t.map((function(t){return t.resolve()})))})).then((function(t){return t.join("\n")}))},impl:{readAll:t}};function t(){return Promise.resolve(n.asArray(document.styleSheets)).then((function(t){var e=[];return t.forEach((function(t){try{n.asArray(t.cssRules||[]).forEach(e.push.bind(e))}catch(e){console.log("Error while reading CSS rules from "+t.href,e.toString())}})),e})).then((function(t){return t.filter((function(t){return t.type===CSSRule.FONT_FACE_RULE})).filter((function(t){return r.shouldProcess(t.style.getPropertyValue("src"))}))})).then((function(e){return e.map(t)}));function t(t){return{resolve:function(){var e=(t.parentStyleSheet||{}).href;return r.inlineAll(t.cssText,e)},src:function(){return t.style.getPropertyValue("src")}}}}}(),o=function(){return{inlineAll:function e(i){return i instanceof Element?function(t){var e=t.style.getPropertyValue("background");return e?r.inlineAll(e).then((function(e){t.style.setProperty("background",e,t.style.getPropertyPriority("background"))})).then((function(){return t})):Promise.resolve(t)}(i).then((function(){return i instanceof HTMLImageElement?t(i).inline():Promise.all(n.asArray(i.childNodes).map((function(t){return e(t)})))})):Promise.resolve(i)},impl:{newImage:t}};function t(t){return{inline:function(e){return n.isDataUrl(t.src)?Promise.resolve():Promise.resolve(t.src).then(e||n.getAndEncode).then((function(e){return n.dataAsUrl(e,n.mimeType(t.src))})).then((function(e){return new Promise((function(n,r){t.onload=n,t.onerror=r,t.src=e}))}))}}}}(),a={imagePlaceholder:void 0,cacheBust:!1},s={toSvg:u,toPng:function(t,e){return l(t,e||{}).then((function(t){return t.toDataURL()}))},toJpeg:function(t,e){return l(t,e=e||{}).then((function(t){return t.toDataURL("image/jpeg",e.quality||1)}))},toBlob:function(t,e){return l(t,e||{}).then(n.canvasToBlob)},toPixelData:function(t,e){return l(t,e||{}).then((function(e){return e.getContext("2d").getImageData(0,0,n.width(t),n.height(t)).data}))},impl:{fontFaces:i,images:o,util:n,inliner:r,options:{}}};function u(t,e){return function(t){void 0===t.imagePlaceholder?s.impl.options.imagePlaceholder=a.imagePlaceholder:s.impl.options.imagePlaceholder=t.imagePlaceholder;void 0===t.cacheBust?s.impl.options.cacheBust=a.cacheBust:s.impl.options.cacheBust=t.cacheBust}(e=e||{}),Promise.resolve(t).then((function(t){return function t(e,r,i){return i||!r||r(e)?Promise.resolve(e).then((function(t){return t instanceof HTMLCanvasElement?n.makeImage(t.toDataURL()):t.cloneNode(!1)})).then((function(t){return o(e,t,r)})).then((function(t){return function(t,e){return e instanceof Element?Promise.resolve().then(r).then(i).then(o).then(a).then((function(){return e})):e;function r(){var r,i;r=window.getComputedStyle(t),i=e.style,r.cssText?i.cssText=r.cssText:function(t,e){n.asArray(t).forEach((function(n){e.setProperty(n,t.getPropertyValue(n),t.getPropertyPriority(n))}))}(r,i)}function i(){[":before",":after"].forEach((function(r){!function(r){var i=window.getComputedStyle(t,r),o=i.getPropertyValue("content");if(""===o||"none"===o)return;var a=n.uid();e.className=e.className+" "+a;var s=document.createElement("style");s.appendChild(function(t,e,r){var i="."+t+":"+e,o=r.cssText?function(t){var e=t.getPropertyValue("content");return t.cssText+" content: "+e+";"}(r):function(t){return n.asArray(t).map((function(e){return e+": "+t.getPropertyValue(e)+(t.getPropertyPriority(e)?" !important":"")})).join("; ")+";"}(r);return document.createTextNode(i+"{"+o+"}")}(a,r,i)),e.appendChild(s)}(r)}))}function o(){t instanceof HTMLTextAreaElement&&(e.innerHTML=t.value),t instanceof HTMLInputElement&&e.setAttribute("value",t.value)}function a(){e instanceof SVGElement&&(e.setAttribute("xmlns","http://www.w3.org/2000/svg"),e instanceof SVGRectElement&&["width","height"].forEach((function(t){var n=e.getAttribute(t);n&&e.style.setProperty(t,n)})))}}(e,t)})):Promise.resolve();function o(e,r,i){var o=e.childNodes;return 0===o.length?Promise.resolve(r):a(r,n.asArray(o),i).then((function(){return r}));function a(e,n,r){var i=Promise.resolve();return n.forEach((function(n){i=i.then((function(){return t(n,r)})).then((function(t){t&&e.appendChild(t)}))})),i}}}(t,e.filter,!0)})).then(c).then(h).then((function(t){e.bgcolor&&(t.style.backgroundColor=e.bgcolor);e.width&&(t.style.width=e.width+"px");e.height&&(t.style.height=e.height+"px");e.style&&Object.keys(e.style).forEach((function(n){t.style[n]=e.style[n]}));return t})).then((function(r){return function(t,e,r){return Promise.resolve(t).then((function(t){return t.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),(new XMLSerializer).serializeToString(t)})).then(n.escapeXhtml).then((function(t){return'<foreignObject x="0" y="0" width="100%" height="100%">'+t+"</foreignObject>"})).then((function(t){return'<svg xmlns="http://www.w3.org/2000/svg" width="'+e+'" height="'+r+'">'+t+"</svg>"})).then((function(t){return"data:image/svg+xml;charset=utf-8,"+t}))}(r,e.width||n.width(t),e.height||n.height(t))}))}function l(t,e){return u(t,e).then(n.makeImage).then(n.delay(100)).then((function(r){var i=function(t){var r=document.createElement("canvas");if(r.width=e.width||n.width(t),r.height=e.height||n.height(t),e.bgcolor){var i=r.getContext("2d");i.fillStyle=e.bgcolor,i.fillRect(0,0,r.width,r.height)}return r}(t);return i.getContext("2d").drawImage(r,0,0),i}))}function c(t){return i.resolveAll().then((function(e){var n=document.createElement("style");return t.appendChild(n),n.appendChild(document.createTextNode(e)),t}))}function h(t){return o.inlineAll(t).then((function(){return t}))}t.exports=s}()})),Bd=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.getHTMLElementSize=function(t){return{width:t.clientWidth,height:t.clientHeight}},e.getSVGElementSize=function(t,e){t.attr||(t=Na(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:ka.getProperty(t.node(),"width","baseVal","value"),height:ka.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=t.select(""+e);if(n.empty()){var r=e.split("#"),i=void 0,o=void 0;return 2===r.length?(i=r[0],o=(r=r[1].split("."))[0]):i=(r=e.split("."))[0],t.append(i).attr("id",o).attr("class",r.slice(1).join(" "))}return n},e.prototype.init=function(){this.styleHolderElement(),this.addMainContainer(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()},e.prototype.addMainContainer=function(){var t=this.model.getOptions(),e=ka.getProperty(t,"style","prefix"),n=Na(this.getHolder()).append("div").classed(dd.prefix+"--"+e+"--chart-wrapper",!0).style("height","100%").style("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=n.node()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();Na(this.getHolder()).classed(dd.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.exportToJPG=function(){var t=this,e=this.getHolder(),n=Na(e);n.classed("filled",!0),Nd.toJpeg(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(e).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("bx--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.jpg"),n.classed("filled",!1)}))},e.prototype.exportToPNG=function(){var t=this,e=this.getHolder(),n=Na(e);n.classed("filled",!0),Nd.toPng(this.getMainContainer(),{bgcolor:"undefined"!=typeof window?window.getComputedStyle(e).getPropertyValue("background-color"):void 0,quality:1,filter:function(t){return!t.classList||!t.classList.contains("bx--cc--toolbar")}}).then((function(e){t.services.files.downloadImage(e,"myChart.png"),n.classed("filled",!1)})).catch((function(t){console.error("oops, something went wrong!",t)}))},e.prototype.toggleFullscreen=function(){var t=this.getHolder();Na(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()},e.prototype.handleFullscreenChange=function(){var t=this;document.addEventListener("fullscreenchange",(function(){var e=Na(t.getHolder()),n=e.classed("fullscreen");e.classed("fullscreen",!n)}))},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=Na(t.mainContainer).select("g.DONT_STYLE_ME_css_styles_verifier").node(),n=getComputedStyle(e);"hidden"===n.getPropertyValue("overflow")&&"0"===n.getPropertyValue("opacity")||console.error("Missing CSS styles for Carbon Charts. Please read the Carbon Charts getting started guide.")}))},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(Na(this.mainContainer),{useBBox:!0}).height,n=Na(this.mainContainer).attr("class"),r=Na(this.mainContainer).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(Na(t),{useBBox:!0}).height)})),i<=t?Na(this.mainContainer).attr("height",i):Na(this.mainContainer).attr("height","100%")}},e.prototype.getMainContainer=function(){return this.mainContainer},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&Na(e).on("mouseover",(function(){t.services.events.dispatchEvent(ot.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(ot.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=ka.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(ot.Chart.RESIZE))}),12.5);new Id(i).observe(e)}},e}(fd),Vd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(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}(fd),Ud=function(t){function e(e,n){return t.call(this,e,n)||this}return n(e,t),e.prototype.downloadCSV=function(t,e,n){var r=document.createElement("a");if("text/csv;encoding:utf-8",navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:"text/csv;encoding:utf-8"}),e);else if(URL&&"download"in r){var i=URL.createObjectURL(new Blob([t],{type:"text/csv;encoding:utf-8"}));r.href=i,r.setAttribute("download",e),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(i)}else location.href="data:application/octet-stream,"+encodeURIComponent(t)},e.prototype.downloadImage=function(t,e){var n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)},e}(fd),Gd={value:()=>{}};function Hd(){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 zd(r)}function zd(t){this._=t}function jd(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 Fd(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Wd(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=Gd,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}zd.prototype=Hd.prototype={constructor:zd,on:function(t,e){var n,r=this._,i=jd(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]=Wd(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Wd(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=Fd(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new zd(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 qd,Yd,Zd=0,Xd=0,Kd=0,Qd=0,$d=0,Jd=0,tp="object"==typeof performance&&performance.now?performance:Date,ep="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function np(){return $d||(ep(rp),$d=tp.now()+Jd)}function rp(){$d=0}function ip(){this._call=this._time=this._next=null}function op(t,e,n){var r=new ip;return r.restart(t,e,n),r}function ap(){$d=(Qd=tp.now())+Jd,Zd=Xd=0;try{!function(){np(),++Zd;for(var t,e=qd;e;)(t=$d-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Zd}()}finally{Zd=0,function(){var t,e,n=qd,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:qd=e);Yd=t,up(r)}(),$d=0}}function sp(){var t=tp.now(),e=t-Qd;e>1e3&&(Jd-=e,Qd=t)}function up(t){Zd||(Xd&&(Xd=clearTimeout(Xd)),t-$d>24?(t<1/0&&(Xd=setTimeout(ap,t-tp.now()-Jd)),Kd&&(Kd=clearInterval(Kd))):(Kd||(Qd=tp.now(),Kd=setInterval(sp,1e3)),Zd=1,ep(ap)))}function lp(t,e,n){var r=new ip;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}ip.prototype=op.prototype={constructor:ip,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?np():+n)+(null==e?0:+e),this._next||Yd===this||(Yd?Yd._next=this:qd=this,Yd=this),this._call=t,this._time=n,up()},stop:function(){this._call&&(this._call=null,this._time=1/0,up())}};var cp=Hd("start","end","cancel","interrupt"),hp=[];function fp(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 lp(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(lp((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=op((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:cp,tween:hp,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function dp(t,e){var n=gp(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function pp(t,e){var n=gp(t,e);if(n.state>3)throw new Error("too late; already running");return n}function gp(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function vp(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}}function mp(t,e){var n,r;return function(){var i=pp(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 yp(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=pp(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 bp(t,e,n){var r=t._id;return t.each((function(){var t=pp(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return gp(t,r).value[e]}}function _p(t,e){var n;return("number"==typeof e?Bu:e instanceof vu?Du:(n=vu(e))?(e=n,Du):Hu)(t,e)}function xp(t){return function(){this.removeAttribute(t)}}function wp(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Op(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 Ep(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 Tp(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 Sp(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 Mp(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Cp(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Ap(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Cp(t,i)),n}return i._value=e,i}function Pp(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Mp(t,i)),n}return i._value=e,i}function Lp(t,e){return function(){dp(this,t).delay=+e.apply(this,arguments)}}function kp(t,e){return e=+e,function(){dp(this,t).delay=e}}function Dp(t,e){return function(){pp(this,t).duration=+e.apply(this,arguments)}}function Rp(t,e){return e=+e,function(){pp(this,t).duration=e}}function Ip(t,e){if("function"!=typeof e)throw new Error;return function(){pp(this,t).ease=e}}function Np(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)?dp:pp;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var Bp=Ia.prototype.constructor;function Vp(t){return function(){this.style.removeProperty(t)}}function Up(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Gp(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&Up(t,o,n)),r}return o._value=e,o}function Hp(t){return function(e){this.textContent=t.call(this,e)}}function zp(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Hp(r)),e}return r._value=t,r}var jp=0;function Fp(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Wp(t){return Ia().transition(t)}function qp(){return++jp}var Yp=Ia.prototype;Fp.prototype=Wp.prototype={constructor:Fp,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Co(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,fp(h[f],e,n,f,h,gp(s,n)));return new Fp(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=Lo(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=gp(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&fp(f,e,n,g,d,p);o.push(d),a.push(u)}return new Fp(o,a,e,n)},selectChild:Yp.selectChild,selectChildren:Yp.selectChildren,filter:function(t){"function"!=typeof t&&(t=ko(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 Fp(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 Fp(a,this._parents,this._name,this._id)},selection:function(){return new Bp(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=qp(),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=gp(a,e);fp(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Fp(r,this._parents,t,n)},call:Yp.call,nodes:Yp.nodes,node:Yp.node,size:Yp.size,empty:Yp.empty,each:Yp.each,on:function(t,e){var n=this._id;return arguments.length<2?gp(this.node(),n).on.on(t):this.each(Np(n,t,e))},attr:function(t,e){var n=Oo(t),r="transform"===n?Ku:_p;return this.attrTween(t,"function"==typeof e?(n.local?Sp:Tp)(n,r,bp(this,"attr."+t,e)):null==e?(n.local?wp:xp)(n):(n.local?Ep:Op)(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=Oo(t);return this.tween(n,(r.local?Ap:Pp)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Xu:_p;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=na(this,t),a=(this.style.removeProperty(t),na(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,Vp(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=na(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=na(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,bp(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=pp(this,t),l=u.on,c=null==u.value[a]?o||(o=Vp(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=na(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,Gp(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}}(bp(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,zp(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=gp(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?mp:yp)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Lp:kp)(e,t)):gp(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Dp:Rp)(e,t)):gp(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Ip(e,t)):gp(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var n=e.apply(this,arguments);if("function"!=typeof n)throw new Error;pp(this,t).ease=n}}(this._id,t))},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=pp(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})),0===i&&o()}))},[Symbol.iterator]:Yp[Symbol.iterator]};var Zp={time:null,delay:0,duration:250,ease:ut};function Xp(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}Ia.prototype.interrupt=function(t){return this.each((function(){vp(this,t)}))},Ia.prototype.transition=function(t){var e,n;t instanceof Fp?(e=t._id,t=t._name):(e=qp(),(n=Zp).time=np(),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])&&fp(a,t,e,l,s,n||Xp(a,e));return new Fp(r,this._parents,t,e)};var Kp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.pendingTransitions={},e}return n(e,t),e.prototype.init=function(){var t=this;this.services.events.addEventListener(ot.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=Wp(t).duration(ka.getProperty(Tt,t,"duration")||Tt.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=Wp(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.setupTransition=function(t){var e=this,n=t.transition,r=t.name,i=t.animate;return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),!0!==i?n.duration(0):n.duration(ka.getProperty(Tt,r,"duration")||Tt.default.duration)},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(fd),Qp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.appendOrUpdateLinearGradient=function(t){var e=t.svg.select("defs linearGradient#"+t.id);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").remove(),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",(function(t){return t.offset})).style("stop-color",(function(t){return t.color})).style("stop-opacity",(function(t){return t.opacity}))},e.getOffsetRatio=function(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"},e.getStops=function(t,n){var r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return t[0]<0&&t[1]>0&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:e.getOffsetRatio(t),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r},e}(fd);function $p(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 Jp(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 tg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t),r=Jp(e);return n.setDate(n.getDate()+r),n}function eg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t).getTime(),r=Jp(e);return new Date(n+r)}function ng(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return eg(t,36e5*n)}function rg(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function ig(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=$p(t);return e.setHours(0,0,0,0),e}function og(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=ig(t),r=ig(e),i=n.getTime()-rg(n),o=r.getTime()-rg(r);return Math.round((i-o)/864e5)}function ag(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return eg(t,6e4*n)}function sg(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=$p(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 ug(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t),r=Jp(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=sg(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function lg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return eg(t,1e3*n)}function cg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return ug(t,12*n)}function hg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t),r=$p(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function fg(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=$p(t);return!isNaN(e)}function dg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t),r=$p(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function pg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t),r=$p(e);return n.getFullYear()-r.getFullYear()}function gg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t),r=$p(e);return n.getTime()-r.getTime()}function vg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gg(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function mg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gg(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var yg={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 bg(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var _g={date:bg({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:bg({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:bg({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},xg={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function wg(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 Og(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 Eg,Tg={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof yg[t]?yg[t]:1===e?yg[t].one:yg[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:_g,formatRelative:function(t,e,n,r){return xg[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:wg({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:wg({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:wg({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:wg({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:wg({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:(Eg={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(Eg.matchPattern);if(!i)return null;var o=i[0],a=n.match(Eg.parsePattern);if(!a)return null;var s=Eg.valueCallback?Eg.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Og({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:Og({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:Og({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:Og({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:Og({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 Sg(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return eg(t,-n)}function Mg(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Cg=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Mg("yy"===e?r%100:r,e.length)},Ag=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Mg(n+1,2)},Pg=function(t,e){return Mg(t.getUTCDate(),e.length)},Lg=function(t,e){return Mg(t.getUTCHours()%12||12,e.length)},kg=function(t,e){return Mg(t.getUTCHours(),e.length)},Dg=function(t,e){return Mg(t.getUTCMinutes(),e.length)},Rg=function(t,e){return Mg(t.getUTCSeconds(),e.length)},Ig=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Mg(Math.floor(r*Math.pow(10,n-3)),e.length)};function Ng(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=$p(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 Bg(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=$p(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=Ng(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=Ng(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function Vg(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Bg(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=Ng(n);return r}function Ug(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:Jp(i),a=null==n.weekStartsOn?o:Jp(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=$p(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 Gg(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=$p(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:Jp(a),u=null==i.firstWeekContainsDate?s:Jp(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=Ug(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=Ug(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function Hg(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:Jp(i),a=null==n.firstWeekContainsDate?o:Jp(n.firstWeekContainsDate),s=Gg(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=Ug(u,e);return l}var zg="midnight",jg="noon",Fg="morning",Wg="afternoon",qg="evening",Yg="night",Zg={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 Cg(t,e)},Y:function(t,e,n,r){var i=Gg(t,r),o=i>0?i:1-i;return"YY"===e?Mg(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Mg(o,e.length)},R:function(t,e){return Mg(Bg(t),e.length)},u:function(t,e){return Mg(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 Mg(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 Mg(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 Ag(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 Mg(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=$p(t),r=Ug(n,e).getTime()-Hg(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Mg(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=$p(t),n=Ng(e).getTime()-Vg(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Mg(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Pg(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=$p(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"}):Mg(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 Mg(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 Mg(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 Mg(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?jg:0===i?zg: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?qg:i>=12?Wg:i>=4?Fg:Yg,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 Lg(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):kg(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Mg(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Mg(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):Dg(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):Rg(t,e)},S:function(t,e){return Ig(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Kg(i);case"XXXX":case"XX":return Qg(i);case"XXXXX":case"XXX":default:return Qg(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Kg(i);case"xxxx":case"xx":return Qg(i);case"xxxxx":case"xxx":default:return Qg(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Xg(i,":");case"OOOO":default:return"GMT"+Qg(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Xg(i,":");case"zzzz":default:return"GMT"+Qg(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Mg(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Mg((r._originalDate||t).getTime(),e.length)}};function Xg(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+Mg(o,2)}function Kg(t,e){return t%60==0?(t>0?"-":"+")+Mg(Math.abs(t)/60,2):Qg(t,e)}function Qg(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Mg(Math.floor(i/60),2)+n+Mg(i%60,2)}function $g(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 Jg(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 tv={p:Jg,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return $g(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}}",$g(i,e)).replace("{{time}}",Jg(o,e))}},ev=["D","DD"],nv=["YY","YYYY"];function rv(t){return-1!==ev.indexOf(t)}function iv(t){return-1!==nv.indexOf(t)}function ov(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 av=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,sv=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,uv=/^'([^]*?)'?$/,lv=/''/g,cv=/[a-zA-Z]/;function hv(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||Tg,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:Jp(a),u=null==i.firstWeekContainsDate?s:Jp(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:Jp(l),h=null==i.weekStartsOn?c:Jp(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=$p(t);if(!fg(f))throw new RangeError("Invalid time value");var d=rg(f),p=Sg(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(sv).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,tv[e])(t,o.formatLong,g):t})).join("").match(av).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return fv(t);var n=Zg[e];if(n)return!i.useAdditionalWeekYearTokens&&iv(t)&&ov(t),!i.useAdditionalDayOfYearTokens&&rv(t)&&ov(t),n(p,t,o.localize,g);if(e.match(cv))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function fv(t){return t.match(uv)[1].replace(lv,"'")}function dv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return tg(t,-n)}function pv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return ng(t,-n)}function gv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return ag(t,-n)}function vv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return ug(t,-n)}function mv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return lg(t,-n)}function yv(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Jp(e);return cg(t,-n)}var bv=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 n(e,t),e.prototype.getDomainAxisPosition=function(t){var e,n=(void 0===t?{}:t).datum,r=void 0===n?null:n;if(this.dualAxes&&r){var i=this.model.getOptions(),o=i.data.groupMapsTo,a=ka.getProperty(i,"axes",this.secondaryDomainAxisPosition),s=r[o];if((null===(e=a)||void 0===e?void 0:e.correspondingDatasets)&&a.correspondingDatasets.includes(s))return this.secondaryDomainAxisPosition}return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(t){var e,n=void 0===t?{}:t,r=n.datum,i=void 0===r?null:r,o=n.groups,a=void 0===o?null:o;if(this.dualAxes){var s=this.model.getOptions(),u=s.data.groupMapsTo,l=ka.getProperty(s,"axes",this.secondaryRangeAxisPosition),c=void 0;if(null!==i?c=i[u]:a&&a.length>0&&(c=a[0]),(null===(e=l)||void 0===e?void 0:e.correspondingDatasets)&&l.correspondingDatasets.includes(c))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return ka.getProperty(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.getScaleLabel=function(t){var e=this.getAxisOptions(t).title;return e||(t===I.BOTTOM||t===I.TOP?"x-value":"y-value")},e.prototype.getDomainLabel=function(){return this.getScaleLabel(this.getDomainAxisPosition())},e.prototype.getRangeLabel=function(){return this.getScaleLabel(this.getRangeAxisPosition())},e.prototype.update=function(t){var e=this;this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(I).map((function(t){return I[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==I.LEFT&&this.rangeAxisPosition!==I.RIGHT||this.domainAxisPosition!==I.BOTTOM&&this.domainAxisPosition!==I.TOP?this.orientation=V.HORIZONTAL:this.orientation=V.VERTICAL},e.prototype.isDualAxes=function(){return this.dualAxes},e.prototype.determineAxisDuality=function(){var t,e,n,r,i=this.model.getOptions(),o=ka.getProperty(i,"axes");((null===(t=o[I.LEFT])||void 0===t?void 0:t.correspondingDatasets)&&o[I.RIGHT]||(null===(e=o[I.RIGHT])||void 0===e?void 0:e.correspondingDatasets)&&o[I.LEFT]||(null===(n=o[I.TOP])||void 0===n?void 0:n.correspondingDatasets)&&o[I.BOTTOM]||(null===(r=o[I.BOTTOM])||void 0===r?void 0:r.correspondingDatasets)&&o[I.TOP])&&(this.dualAxes=!0)},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.getDomainAxisScaleType=function(){var t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)},e.prototype.getRangeAxisScaleType=function(){var t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(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=[I.BOTTOM,I.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[I.LEFT,I.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,r,i){var o,a=this.model.getOptions(),s=ka.getProperty(a,"axes")[n].mapsTo,u=null!==ka.getProperty(r,s)?r[s]:r;switch(e){case U.LABELS:o=t(u)+t.step()/2;break;case U.TIME:o=t(new Date(u));break;default:o=t(u)}return o},e.prototype.getBoundedScaledValues=function(t,e){var n=this.model.getOptions().bounds,r=this.scales[this.rangeAxisPosition],i=this.model.getOptions(),o=ka.getProperty(i,"axes")[this.rangeAxisPosition].mapsTo,a=void 0!==t[o]?t[o]:t;return[r(null!==ka.getProperty(t,n.upperBoundMapsTo)?t[n.upperBoundMapsTo]:a),r(null!==ka.getProperty(t,n.lowerBoundMapsTo)?t[n.lowerBoundMapsTo]:a)]},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){var n=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getRangeValue=function(t,e){var n=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(n,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(t){var e=this.model.getOptions();return ka.getProperty(e,"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")},e.prototype.getRangeIdentifier=function(t){var e=this.model.getOptions();return ka.getProperty(e,"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions(),r=ka.getProperty(n,"axes",t);return r.scaleType===U.TIME?function(t,e){var n=new Date(t[0]),r=new Date(t[1]);if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t),r=$p(e),i=hg(n,r),o=Math.abs(pg(n,r));n.setFullYear(n.getFullYear()-i*o);var a=hg(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[yv(n,e),cg(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t),r=$p(e),i=hg(n,r),o=Math.abs(dg(n,r));n.setMonth(n.getMonth()-i*o);var a=hg(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[vv(n,e),ug(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=$p(t),r=$p(e),i=hg(n,r),o=Math.abs(og(n,r));n.setDate(n.getDate()-i*o);var a=hg(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[dv(n,e),tg(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=gg(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[pv(n,e),ng(r,e)];if(vg(r,n)>30)return[gv(n,30*e),ag(r,30*e)];if(vg(r,n)>1)return[gv(n,e),ag(r,e)];if(mg(r,n)>15)return[mv(n,15*e),lg(r,15*e)];if(mg(r,n)>1)return[mv(n,e),lg(r,e)];return[n,r]}(e,ka.getProperty(n,"timeScale","addSpaceOnEdges")):function(t,e,n){var r=t[0],i=t[1],o=(i-r)*e,a=i<=0&&i+o>0?0:i+o,s=r>=0&&r-o<0?0:r-o;if(n===U.LOG&&s<=0){if(r<=0)throw Error("Data must have values greater than 0 if log scale type is used.");s=r}return[s,a]}(e,ht.paddingRatio,r.scaleType)},e.prototype.findVerticalAxesPositions=function(){var t=this.model.getOptions(),e=ka.getProperty(t,"axes"),n=this.isDualAxes();return null===ka.getProperty(e,I.LEFT)&&null!==ka.getProperty(e,I.RIGHT)||!0===ka.getProperty(e,I.RIGHT,"main")||n&&ka.getProperty(e,I.LEFT,"correspondingDatasets")?{primary:I.RIGHT,secondary:I.LEFT}:{primary:I.LEFT,secondary:I.RIGHT}},e.prototype.findHorizontalAxesPositions=function(){var t=this.model.getOptions(),e=ka.getProperty(t,"axes"),n=this.isDualAxes();return null===ka.getProperty(e,I.BOTTOM)&&null!==ka.getProperty(e,I.TOP)||!0===ka.getProperty(e,I.TOP,"main")||n&&ka.getProperty(e,I.BOTTOM,"correspondingDatasets")?{primary:I.TOP,secondary:I.BOTTOM}:{primary:I.BOTTOM,secondary:I.TOP}},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=ka.getProperty(n,"axes",t.primary),i=ka.getProperty(n,"axes",e.primary),o=r.scaleType||U.LINEAR,a=i.scaleType||U.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary,(a!==U.LABELS&&a!==U.TIME&&o===U.LABELS||o===U.TIME)&&(s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=ka.getProperty(e,"axes",t),r=ka.getProperty(e,"bounds"),i=n.includeZero,o=ka.getProperty(n,"scaleType")||U.LINEAR;if(this.model.isDataEmpty())return[];if(n.binned)return[0,Fs(a=this.model.getBinConfigurations().bins,(function(t){return t.length}))];if(n.limitDomainToBins){var a=this.model.getBinConfigurations().bins,s=this.model.getStackKeys({bins:a});return[s[0].split("-")[0],s[s.length-1].split("-")[1]]}var u,l,c=this.model.getDisplayData(),h=n.extendLinearDomainBy,f=n.mapsTo,d=n.percentage,p=n.thresholds,g=ht.ratio,v=g.reference,m=g.compareTo;if(n.domain)return o===U.LABELS?n.domain:(o===U.TIME&&(n.domain=n.domain.map((function(t){return void 0===t.getTime?new Date(t):t}))),this.extendsDomain(t,n.domain));if(d)return[0,100];if(n&&o===U.LABELS)return ka.removeArrayDuplicates(c.map((function(t){return t[f]})));var y=this.model.getDataGroupNames();if(o===U.LABELS_RATIO)return c.map((function(t){return t[v]+"/"+t[m]}));if(o===U.TIME)l=c.map((function(t){return+new Date(t[f])}));else if(r&&e.axes)l=[],c.forEach((function(t){l.push(t[f]),t[r.upperBoundMapsTo]&&l.push(t[r.upperBoundMapsTo]),t[r.lowerBoundMapsTo]&&l.push(t[r.lowerBoundMapsTo])}));else if(!0===n.stacked&&y&&t===this.getRangeAxisPosition()){var b=e.data.groupMapsTo,_=this.model.getDataValuesGroupedByKeys({groups:y}),x=c.filter((function(t){return!y.includes(t[b])})),w=[];_.forEach((function(t){t.sharedStackKey;var e=P(t,["sharedStackKey"]),n=0,r=0;Object.values(e).forEach((function(t){t<0?r+=t:n+=t})),w.push([r,n])})),l=L(ka.flatten(w),x.map((function(t){return t[f]})))}else l=[],c.forEach((function(t){var e=t[f];Array.isArray(e)&&2===e.length?(l.push(e[0]),l.push(e[1])):(h&&l.push(Math.max(t[f],t[h])),l.push(e))}));return o!==U.TIME&&o!==U.LOG&&i&&l.push(0),p&&p.length>0&&p.forEach((function(t){var e=ka.getProperty(t,"value");null!==e&&l.push(e)})),u=As(l),u=this.extendsDomain(t,u)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=ka.getProperty(e,"axes",t);if(!n)return null;var r,i=ka.getProperty(n,"scaleType")||U.LINEAR;return this.scaleTypes[t]=i,(r=i===U.TIME?Th():i===U.LOG?function t(){var e=Ll(il()).domain([1,10]);return e.copy=function(){return rl(e,t()).base(e.base())},Ks.apply(e,arguments),e}().base(n.base||10):i===U.LABELS||i===U.LABELS_RATIO?Js():Ol()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=ka.getProperty(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!n)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==U.TIME||"string"!=typeof i.value&&void 0!==i.value.getTime||(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}},e.prototype.getHighestRangeThreshold=function(){var t=ka.getProperty(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!t)return null;var e=this.getRangeScale(),n=t.sort((function(t,e){return e.value-t.value}))[0];return{threshold:n,scaleValue:e(n.value)}},e}(fd);var _v=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:ef,curveLinearClosed:zf,curveBasis:_f,curveBasisClosed:wf,curveBasisOpen:Ef,curveBundle:Sf,curveCardinal:Af,curveCardinalClosed:Lf,curveCardinalOpen:Df,curveCatmullRom:Nf,curveCatmullRomClosed:Vf,curveCatmullRomOpen:Gf,curveMonotoneX:Kf,curveMonotoneY:Qf,curveNatural:td,curveStep:nd,curveStepAfter:id,curveStepBefore:rd},e}return n(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}(fd),xv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.isZoomBarEnabled=function(){if(!this.services.cartesianScales)return!1;if(!ka.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=ka.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===I.BOTTOM&&e===U.TIME},e.prototype.getZoomBarData=function(){var t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()},e.prototype.getDefaultZoomBarDomain=function(t){var e=t||this.services.zoom.getZoomBarData(),n=this.services.cartesianScales,r=n.getMainXAxisPosition(),i=n.getDomainIdentifier();return n.extendsDomain(r,As(e,(function(t){return t[i]})))},e.prototype.handleDomainChange=function(t,e){void 0===e&&(e={dispatchEvent:!0}),this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&this.services.events.dispatchEvent(ot.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return ka.getProperty(this.model.getOptions(),"zoomBar","zoomRatio")},e.prototype.filterDataForRangeAxis=function(t,e){var n=this.model.get("zoomDomain"),r=Object.assign({stacked:!1},e),i=ka.getProperty(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&i&&n){var o=r.stacked?"sharedStackKey":this.services.cartesianScales.getDomainIdentifier(),a=t.filter((function(t){return new Date(t[o])>=n[0]&&new Date(t[o])<=n[1]}));if(a.length>0)return a}return t},e.prototype.zoomIn=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=St.handleWidth,r=this.services.cartesianScales.getMainXScale().copy();r.domain(this.getDefaultZoomBarDomain());var i=r(e[0]),o=r(e[1]);if(!(o-i<n+1)){var a=r.range(),s=o-i,u=Math.min((a[1]-a[0])/2*(t/2),s/2),l=i+u,c=o-u;l>=c&&(l=i+s/2-n/2,c=o-s/2+n/2);var h=[r.invert(l),r.invert(c)];e[0].valueOf()===h[0].valueOf()&&e[1].valueOf()===h[1].valueOf()||this.handleDomainChange(h)}},e.prototype.zoomOut=function(t){void 0===t&&(t=this.getZoomRatio());var e=this.model.get("zoomDomain"),n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());var r=n(e[0]),i=n(e[1]),o=n.range(),a=(o[1]-o[0])/2*(t/2),s=Math.max(r-a,o[0]),u=Math.min(i+a,o[1]),l=[n.invert(s),n.invert(u)];e[0].valueOf()===l[0].valueOf()&&e[1].valueOf()===l[1].valueOf()||this.handleDomainChange(l)},e.prototype.resetZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();t[0].valueOf()===e[0].valueOf()&&t[1].valueOf()===e[1].valueOf()||this.handleDomainChange(e)},e.prototype.isMinZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e)&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<ka.getProperty(this.model.getOptions(),"zoomBar","minZoomRatio")},e.prototype.isMaxZoomDomain=function(){var t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!(!t||!e||t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())},e.prototype.isEmptyState=function(){return 0===this.getZoomBarData().length},e.prototype.isZoomBarLoading=function(t){return ka.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return ka.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(fd),wv=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.zoomIn=function(t,e,n){var r,i,o,a=n||ft;t&&(r=t.x,i=t.y,o=2);var s=Bd.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0}),u=s.width,l=s.height;e.transition().duration(a.duration).ease(a.ease).attr("transform","translate("+u/2+", "+l/2+") scale("+o+") translate("+-r+","+-i+")"),this.services.events.dispatchEvent(ot.CanvasZoom.CANVAS_ZOOM_IN,{element:Na(t)})},e.prototype.zoomOut=function(t,e){var n=e||ft;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(ot.CanvasZoom.CANVAS_ZOOM_OUT)},e}(fd),Ov=function(){function t(t,e,n){if(this.renderType=k.HTML,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){var r=ka.getProperty(this.model.getOptions(),"style","prefix");this.id=r+"--"+this.configs.id}this.parent||this.setParent(Na(this.services.domUtils.getMainContainer()))}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=ka.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(dd.prefix+"--"+n+"--"+this.type,!0).attr("id",this.id),e&&e.classed(dd.prefix+"--"+n+"--"+this.type,!1).attr("id",this.id)}},t.prototype.getParent=function(){return this.parent},t.prototype.getComponentContainer=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=ka.getProperty(this.model.getOptions(),"style","prefix"),n=this.id?"#"+this.id:"",r=Bd.appendOrSelect(this.parent,(this.renderType===k.SVG?"svg":"div")+n+"."+dd.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var i=this.model.get("chartClipId");if(i){var o=Na("#"+i).select("rect");0!==o.size()&&parseFloat(o.attr("height"))>0&&r.attr("clip-path","url(#"+i+")")}}return r.attr("width","100%").attr("height","100%")}return this.parent},t.prototype.getOptions=function(){return this.configs.options?ka.merge({},this.model.getOptions(),this.configs.options):this.model.getOptions()},t}(),Ev=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e.renderType=k.HTML,e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getOptions(),n=ka.getProperty(e,"legend"),i=ka.getProperty(n,"alignment"),o=ka.getProperty(e,"legend","orientation"),a=this.model.getDataGroups(),s=mt.items.status.DISABLED,u=a.some((function(t){return t.status===s})),l=ka.getProperty(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===H.CENTER).classed("right-aligned",i===H.RIGHT).classed(o,!0).classed("has-deactivated-items",u).attr("role",r.GROUP).attr("data-name","legend-items");l&&(a=this.sortDataGroups(a,l));var h=c.selectAll("div.legend-item").data(a,(function(t){return t.name})),f=h.enter().append("div").attr("class","legend-item");f.merge(c.selectAll("div.legend-item")).classed("active",(function(t,e){return t.status===mt.items.status.ACTIVE}));var d=ka.getProperty(this.getOptions(),"legend","clickable");c.classed("clickable",d&&a.length>1);var p=mt.checkbox.radius,g=f.append("div").classed("checkbox",!0);g.merge(h.select("div.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",d?0:-1).attr("aria-label",(function(t){return t.name})).attr("aria-checked",(function(t){return t.status===mt.items.status.ACTIVE})).attr("width",2*p).attr("height",2*p).attr("rx",1).attr("ry",1).attr("class",(function(e,n){return t.model.getColorClassName({classNameTypes:[R.BACKGROUND],dataGroupName:e.name,originalClassName:"checkbox"})})).style("background",(function(e){return e.status===mt.items.status.ACTIVE?t.model.getFillColor(e.name)||t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===mt.items.status.ACTIVE}));g.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("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");var v=f.append("p").merge(h.select("p"));this.truncateLegendText(v);var m=ka.getProperty(e,"legend","additionalItems");if(m&&a.length){var y=this,b=c.selectAll("div.additional-item").data(m);b.exit().remove();var _,x=b.enter().append("div").merge(b).classed("legend-item",!0).classed("additional",!0);x.selectAll("*").remove();var w=1;x.append("svg").classed("icon",!0).each((function(t,e){var n=Na(this);_&&_==t.type?w++:(_=t.type,w=1),y.addAdditionalItem(n,t,w)}));var O=x.append("p").merge(x.select("p"));this.truncateLegendText(O)}h.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),d&&f.size()>1&&this.addEventListeners()},e.prototype.sortDataGroups=function(t,e){if(t.sort((function(t,n){return e.indexOf(t.name)-e.indexOf(n.name)})),e.length<t.length){var n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t},e.prototype.addAdditionalItem=function(t,e,n){var i=mt.area,o=i.width,a=i.height;if(e.type===it.RADIUS?t.style("width",a+"px").style("height",a+"px"):t.style("width",o+"px").style("height",a+"px"),e.type===it.RADIUS){var s=mt.radius,u=s.iconData,l=s.fill,c=s.stroke;t.attr("fill","none").selectAll("circle").data(u).enter().append("circle").classed("radius",!0).attr("role",r.IMG).attr("aria-label","radius").attr("cx",(function(t){return t.cx})).attr("cy",(function(t){return t.cy})).attr("r",(function(t){return t.r})).style("fill",e.fill?e.fill:l).style("stroke",e.stroke?e.stroke:c)}else if(e.type===it.LINE){var h=mt.line;t.select("line.line").empty()&&t.append("line").classed("line-"+n,!0).attr("role",r.IMG).attr("aria-label","line").attr("x1",0).attr("y1",h.yPosition).attr("x2",o).attr("y2",h.yPosition).style("stroke",e.stroke?e.stroke:h.stroke).style("stroke-width",h.strokeWidth)}else if(e.type===it.AREA)t.select("rect.area").empty()&&t.append("rect").classed("area-"+n,!0).attr("role",r.IMG).attr("aria-label","area").attr("width",o).attr("height",a).style("fill",n>3&&!e.fill?mt.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===it.SIZE){var f=mt.size;u=f.iconData,l=f.fill,c=f.stroke;t.attr("fill","none").attr("role",r.IMG).attr("aria-label","size").selectAll("rect").data(u).enter().append("rect").classed("size",!0).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).attr("y",(function(t){return 0})).style("fill",e.fill?e.fill:l).style("stroke",e.stroke?e.stroke:c).style("stroke-width",1)}else if(e.type===it.QUARTILE){u=mt.quartile.iconData;t.selectAll("rect").attr("role",r.IMG).attr("aria-label","quartile").data(u).enter().append("rect").attr("class",(function(t,e){return"quartile-"+(0===e?"wrapper":"line")})).attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height}))}else if(e.type===it.ZOOM){var d=ka.getProperty(Ts,"legend","zoom"),p=(u=d.iconData,d.color),g=t.attr("role",r.IMG).attr("aria-label","zoom").selectAll("g.icon").data(u).enter();g.append("g").attr("x",(function(t){return t.x})).attr("y",(function(t){return t.y})).attr("width",(function(t){return t.width})).attr("height",(function(t){return t.height})).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",(function(t){return e.color?e.color:p})),g.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",(function(t){return e.color?e.color:p}))}},e.prototype.truncateLegendText=function(t){var e=ka.getProperty(this.getOptions(),"legend","truncation"),n=ka.getProperty(e,"type"),r=ka.getProperty(e,"threshold"),i=ka.getProperty(e,"numCharacter");n!==B.NONE?t.html((function(t){return t.name.length>r?ka.truncateLabel(t.name,n,i):t.name})):t.html((function(t){return t.name}))},e.prototype.addEventListeners=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=ka.getProperty(n,"legend"),i=ka.getProperty(r,"truncation","threshold");e.selectAll("div.legend-item").on("mouseover",(function(e){t.services.events.dispatchEvent(ot.Legend.ITEM_HOVER,{hoveredElement:Na(this)});var n=Na(this);n.select("div.checkbox").classed("hovered",!0);var r=n.datum();r.name.length>i&&t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})})).on("mousemove",(function(e){t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(){t.services.events.dispatchEvent(ot.Legend.ITEM_CLICK,{clickedElement:Na(this)});var e=Na(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=Na(this);e.select("div.checkbox").classed("hovered",!1),t.services.events.dispatchEvent(ot.Tooltip.HIDE),t.services.events.dispatchEvent(ot.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("div.legend-item div.checkbox").on("keyup",(function(e,n){!e.key||"Enter"!==e.key&&" "!==e.key||(e.preventDefault(),t.model.toggleDataLabel(n.name))})),e.selectAll("g.additional-item").on("mouseover",(function(e){var n=Na(this),r=n.datum();r.name.length>i&&t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})}))},e}(Ov);function Tv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Sv(t){return function(t){if(Array.isArray(t))return Mv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Mv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mv(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Mv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Cv(t){return t.reduce((function(t,e){return Array.isArray(e)?t.push.apply(t,Sv(Cv(e))):t.push(e),t}),[])}function Av(t){return(Av="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Pv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Lv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function kv(t,e){return(kv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Dv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Nv(t);if(e){var i=Nv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Rv(this,n)}}function Rv(t,e){return!e||"object"!==Av(e)&&"function"!=typeof e?Iv(t):e}function Iv(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Nv(t){return(Nv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Bv(t){return(Bv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Vv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Uv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Gv(t,e,n){return(Gv="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fv(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function Hv(t,e){return(Hv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function zv(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Fv(t);if(e){var i=Fv(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return jv(this,n)}}function jv(t,e){return!e||"object"!==Bv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Fv(t){return(Fv=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Wv(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return t.addEventListener.apply(t,n),{release:function(){return t.removeEventListener.apply(t,n),null}}}function qv(t){return(qv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Yv(t){return function(t){if(Array.isArray(t))return Zv(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Zv(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zv(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zv(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Xv(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Kv(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function Qv(t,e){return(Qv=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function $v(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=tm(t);if(e){var i=tm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Jv(this,n)}}function Jv(t,e){return!e||"object"!==qv(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function tm(t){return(tm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function em(t,e){var n=t.target,r=t.currentTarget;if("function"==typeof n.matches){if(n.matches(e))return n;if(n.matches("".concat(e," *"))){var i=n.closest(e);if((r.nodeType===Node.DOCUMENT_NODE?r.documentElement:r).contains(i))return i}}}function nm(t){if(!t||"function"==typeof t)return{launchingElement:null,launchingEvent:null};var e=t.delegateTarget||t.currentTarget||t,n=t.currentTarget&&t;if(e&&!e.nodeType)throw new TypeError("DOM Node should be given for launching element.");if(n&&!n.type)throw new TypeError("DOM event should be given for launching event.");return{launchingElement:e,launchingEvent:n}}function rm(t){return(rm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function im(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function om(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function am(t,e){return(am=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function sm(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=lm(t);if(e){var i=lm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return um(this,n)}}function um(t,e){return!e||"object"!==rm(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function lm(t){return(lm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function cm(t){return(cm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function hm(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function fm(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function dm(t,e){return(dm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function pm(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=vm(t);if(e){var i=vm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gm(this,n)}}function gm(t,e){return!e||"object"!==cm(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function vm(t){return(vm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function mm(t){return(mm="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ym(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function bm(t,e){return(bm=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=wm(t);if(e){var i=wm(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xm(this,n)}}function xm(t,e){return!e||"object"!==mm(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function wm(t){return(wm=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Om,Em,Tm=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&bm(t,e)}(o,t);var e,n,r,i=_m(o);function o(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(n=i.call(this,t,e))._handleFocusinListener=void 0,n._handleKeydownListener=void 0,n._handleFocusin=function(t){var e=n.element.querySelector(n.options.selectorModalContainer)||n.element;n.element.classList.contains(n.options.classVisible)&&!e.contains(t.target)&&n.options.selectorsFloatingMenus.every((function(e){return!em(t,e)}))&&n.element.querySelector(dd.selectorTabbable).focus()},n._hookCloseActions(),n}return e=o,r=[{key:"options",get:function(){var t=dd.prefix;return{selectorInit:"[data-modal]",selectorModalClose:"[data-modal-close]",selectorPrimaryFocus:"[data-modal-primary-focus]",selectorsFloatingMenus:[".".concat(t,"--overflow-menu-options"),".".concat(t,"--tooltip"),".flatpickr-calendar"],selectorModalContainer:".".concat(t,"--modal-container"),classVisible:"is-visible",classBody:"".concat(t,"--body--with-modal-open"),attribInitTarget:"data-modal-target",initEventNames:["click"],eventBeforeShown:"modal-beingshown",eventAfterShown:"modal-shown",eventBeforeHidden:"modal-beinghidden",eventAfterHidden:"modal-hidden"}}}],(n=[{key:"createdByLauncher",value:function(t){this.show(t)}},{key:"shouldStateBeChanged",value:function(t){return"shown"===t?!this.element.classList.contains(this.options.classVisible):this.element.classList.contains(this.options.classVisible)}},{key:"_changeState",value:function(t,e,n){var r,i=this;if(this._handleFocusinListener&&(this._handleFocusinListener=this.unmanage(this._handleFocusinListener).release()),"shown"===t){var o="onfocusin"in this.element.ownerDocument.defaultView,a=o?"focusin":"focus";this._handleFocusinListener=this.manage(Wv(this.element.ownerDocument,a,this._handleFocusin,!o))}"hidden"===t?(this.element.classList.toggle(this.options.classVisible,!1),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!1),(this.options.selectorFocusOnClose||this.previouslyFocusedNode)&&(this.element.ownerDocument.querySelector(this.options.selectorFocusOnClose)||this.previouslyFocusedNode).focus()):"shown"===t&&(this.element.classList.toggle(this.options.classVisible,!0),this.element.ownerDocument.body.classList.toggle(this.options.classBody,!0)),r=this.manage(Wv(this.element,"transitionend",(function(){r&&(r=i.unmanage(r).release()),"shown"===t&&i.element.offsetWidth>0&&i.element.offsetHeight>0&&(i.previouslyFocusedNode=i.element.ownerDocument.activeElement,(i.element.querySelector(i.options.selectorPrimaryFocus)||i.element.querySelector(dd.selectorTabbable)).focus()),n()})))}},{key:"_hookCloseActions",value:function(){var t=this;this.manage(Wv(this.element,"click",(function(e){var n=em(e,t.options.selectorModalClose);n&&(e.delegateTarget=n),(n||e.target===t.element)&&t.hide(e)}))),this._handleKeydownListener&&(this._handleKeydownListener=this.unmanage(this._handleKeydownListener).release()),this._handleKeydownListener=this.manage(Wv(this.element.ownerDocument.body,"keydown",(function(e){27===e.which&&t.shouldStateBeChanged("hidden")&&(e.stopPropagation(),t.hide(e))})))}}])&&ym(e.prototype,n),r&&ym(e,r),o.components=new WeakMap,o}(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Cv(e).reduce((function(t,e){return e(t)}),function(){return function t(){Tv(this,t)}}())}((function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&kv(t,e)}(o,t);var e,n,r,i=Dv(o);function o(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Pv(this,o),(e=i.call(this,t,n)).children=[],!t||t.nodeType!==Node.ELEMENT_NODE)throw new TypeError("DOM element should be given to initialize this widget.");return e.element=t,e.options=Object.assign(Object.create(e.constructor.options),n),e.constructor.components.set(e.element,Iv(e)),e}return e=o,r=[{key:"create",value:function(t,e){return this.components.get(t)||new this(t,e)}}],(n=[{key:"release",value:function(){for(var t=this.children.pop();t;t=this.children.pop())t.release();return this.constructor.components.delete(this.element),null}}])&&Lv(e.prototype,n),r&&Lv(e,r),o}(t)}),(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&dm(t,e)}(o,t);var e,n,r,i=pm(o);function o(){return hm(this,o),i.apply(this,arguments)}return e=o,r=[{key:"init",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object.assign(Object.create(this.options),n);if(!e||e.nodeType!==Node.ELEMENT_NODE&&e.nodeType!==Node.DOCUMENT_NODE)throw new TypeError("DOM document or DOM element should be given to search for and initialize this widget.");if(e.nodeType!==Node.ELEMENT_NODE||!e.matches(r.selectorInit)){var i=r.initEventNames.map((function(i){return Wv(e,i,(function(e){var i=em(e,"[".concat(r.attribInitTarget,"]"));if(i){e.delegateTarget=i;var o=i.ownerDocument.querySelectorAll(i.getAttribute(r.attribInitTarget));if(o.length>1)throw new Error("Target widget must be unique.");if(1===o.length){"A"===i.tagName&&e.preventDefault();var a=t.create(o[0],n);"function"==typeof a.createdByLauncher&&a.createdByLauncher(e)}}}))}));return{release:function(){for(var t=i.pop();t;t=i.pop())t.release()}}}return this.create(e,n),""}}],(n=null)&&fm(e.prototype,n),r&&fm(e,r),o.forLazyInit=!0,o}(t)}),[function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Qv(t,e)}(o,t);var e,n,r,i=$v(o);function o(){return Xv(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"_changeState",value:function(){throw new Error("_changeState() should be overriden to perform actual change in state.")}},{key:"changeState",value:function(){for(var t=this,e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];var i="string"==typeof n[0]?n.shift():void 0,o=Object(n[0])===n[0]&&"function"!=typeof n[0]?n.shift():void 0,a="function"==typeof n[0]?n.shift():void 0;if("function"!=typeof this.shouldStateBeChanged||this.shouldStateBeChanged(i,o)){var s={group:o&&o.group,state:i},u=[s.group,i].filter(Boolean).join("-").split("-").map((function(t){return t[0].toUpperCase()+t.substr(1)})).join(""),l=new CustomEvent(this.options["eventBefore".concat(u)],{bubbles:!0,cancelable:!0,detail:o}),c=o&&o.delegatorNode||this.element,h=!c.dispatchEvent(l);if(h){if(a){var f=new Error("Changing state (".concat(JSON.stringify(s),") has been canceled."));f.canceled=!0,a(f)}}else{var d=[i,o].filter(Boolean);this._changeState.apply(this,Yv(d).concat([function(){c.dispatchEvent(new CustomEvent(t.options["eventAfter".concat(u)],{bubbles:!0,cancelable:!0,detail:o})),a&&a()}]))}}else a&&a(null,!0)}}])&&Kv(e.prototype,n),r&&Kv(e,r),o}(t)},function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&am(t,e)}(o,t);var e,n,r,i=sm(o);function o(){return im(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"show",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("shown",nm(t),e)}},{key:"hide",value:function(t,e){t&&"function"!=typeof t||(e=t),this.changeState("hidden",nm(t),e)}}])&&om(e.prototype,n),r&&om(e,r),o}(t)}],(function(t){return function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Hv(t,e)}(o,t);var e,n,r,i=zv(o);function o(){var t;Vv(this,o);for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return(t=i.call.apply(i,[this].concat(n))).handles=new Set,t}return e=o,(n=[{key:"manage",value:function(t){return this.handles.add(t),t}},{key:"unmanage",value:function(t){return this.handles.delete(t),t}},{key:"release",value:function(){var t=this;return this.handles.forEach((function(e){e.release(),t.handles.delete(e)})),Gv(Fv(o.prototype),"release",this).call(this)}}])&&Uv(e.prototype,n),r&&Uv(e,r),o}(t)}))),Sm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="modal",i.isEventListenerAdded=!1,i.handleShowModal=function(){i.modal.html(i.getModalHTML()),i.modal.select("div.bx--modal-footer button.bx--btn").on("click",(function(){return i.model.exportToCSV()})),Tm.create(i.modal.node()).show()},i.handleHideModal=function(){},i.init(),i}return n(e,t),e.prototype.addEventListeners=function(){this.services.events.addEventListener(ot.Modal.SHOW,this.handleShowModal),this.services.events.addEventListener(ot.Modal.HIDE,this.handleHideModal)},e.prototype.removeEventListeners=function(){this.services.events.removeEventListener(ot.Modal.SHOW,this.handleShowModal),this.services.events.removeEventListener(ot.Modal.HIDE,this.handleHideModal)},e.prototype.getModalHTML=function(){var t=this.model.getOptions(),e=ka.getProperty(t,"style","prefix"),n=this.model.getTabularDataArray();return'\n\t\t<div class="bx--modal-container">\n\t\t\t<div class="bx--modal-header">\n\t\t\t\t<p class="bx--modal-header__label bx--type-delta">Tabular representation</p>\n\t\t\t\t<p class="bx--modal-header__heading bx--type-beta">'+t.title+'</p>\n\t\t\t\t<button class="bx--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>\n\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="bx--modal-close__icon">\n\t\t\t\t\t\t<path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>\n\t\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t\t<div class="bx--modal-content"><table class="bx--data-table bx--data-table--no-border">\n\t\t\t\t\t<thead>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t'+Nn(n,0).map((function(t){return'<th scope="col">\n\t\t\t\t\t\t\t\t<div class="bx--table-header-label">'+t+"</div>\n\t\t\t\t\t\t\t</th>"})).join("")+"\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody>"+n.slice(1).map((function(t){return"\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t"+t.map((function(t){return"<td>"+t+"</td>"})).join("")+"\n\t\t\t\t\t\t\t</tr>"})).join("")+'\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t\t<div class="bx--modal-footer">\n\t\t\t <div class="'+dd.prefix+"--"+e+'-modal-footer-spacer"></div>\n\t\t\t <button class="bx--btn bx--btn--primary" type="button" data-modal-primary-focus>Download as CSV</button>\n\t\t\t</div>\n\t\t</div>'},e.prototype.render=function(){var t=this.model.getOptions();if(!this.isEventListenerAdded){var e=Na(this.services.domUtils.getHolder()),n=ka.getProperty(t,"style","prefix");this.modal=Bd.appendOrSelect(e,"div."+dd.prefix+"--"+n+"--modal"),this.addEventListeners(),this.isEventListenerAdded=!0,this.modal.attr("data-modal",!0).attr("class","bx--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby","modal-5ppouesvfhc-label").attr("aria-describedby","modal-5ppouesvfhc-heading").attr("tabindex",-1)}},e.prototype.destroy=function(){this.removeEventListeners(),this.isEventListenerAdded=!1},e}(Ov);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(Em||(Em={}));var Mm=((Om={})[Em.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)}},Om[Em.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)}},Om[Em.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)}},Om[Em.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)}},Om),Cm="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Am=function(){function t(t){void 0===t&&(t={}),this.positions=Mm,this.positions=Object.assign({},Mm,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:Cm.innerHeight-Cm.scrollY,height:Cm.innerWidth-Cm.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}(),Pm=(new Am,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function Lm(t,e,n,r,i){var o=0===e,a=2===Number(hv(new Date(t),"c")),s=1===Number(hv(new Date(t),"q")),u=0!==e?n[e-1]:null;switch(r){case"15seconds":case"minute":case"30minutes":case"hourly":return o||Im(t)||Nm(t,u)||Bm(t);case"daily":return i?o||a||Bm(t):o||Nm(t,u)||Bm(t);case"monthly":return o||Bm(t);case"quarterly":return o||s;case"yearly":return!1;default:throw new Error(r+" is not a valid time interval.")}}function km(t,e,n,r,i){var o=i.showDayName,a="daily"===r&&o?"weekly":r,s=new Date(t),u=ka.getProperty(i,"timeIntervalFormats")[a],l=ka.getProperty(u,"primary"),c=ka.getProperty(u,"secondary");return hv(s,Lm(t,e,n,r,o)?l:c,{locale:i.localeObject})}function Dm(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function Rm(t){return 1===t.length?"15seconds":function(t){var e=Pm.reduce((function(e,n,r){n[0];var i=n[1],o=Pm[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Pm[e][0]}(Ws(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function Im(t){var e=Dm(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function Nm(t,e){return Dm(t).M!==Dm(e).M}function Bm(t){var e=Dm(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 Vm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="threshold",r.renderType=k.SVG,r.positionService=new Am,r}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=ka.getProperty(this.getOptions(),"axes"),r=[];Object.keys(n).forEach((function(t){if(Object.values(I).includes(t)){var e=n[t];e.thresholds&&e.thresholds.length>0&&r.push({axisPosition:t,thresholds:e.thresholds})}}));var i=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-thresholds").data(r,(function(t){return t.axisPosition}));i.exit().attr("opacity",0).remove();var o=i.enter().append("g").merge(i);o.attr("class",(function(t){return"axis-thresholds "+t.axisPosition}));var a=o.selectAll("g.threshold-group").data((function(t){return t.thresholds.map((function(e){return e.axisPosition=t.axisPosition,e}))}));a.exit().attr("opacity",0).remove();var s=a.enter().append("g");s.append("line").attr("class","threshold-line"),s.append("rect").attr("class","threshold-hoverable-area"),s.merge(a).attr("class","threshold-group");var u=this;o.each((function(e){var n=e.axisPosition,r=u.services.cartesianScales.getScaleByPosition(n),i=u.services.cartesianScales.getScaleTypeByPosition(n),o=u.services.cartesianScales.getMainXScale(),a=u.services.cartesianScales.getMainYScale(),s=i===U.LABELS,l=o.range(),c=l[0],h=l[1],f=a.range(),d=f[0],p=f[1],g=u.services.cartesianScales,v=g.getOrientation(),m=ka.flipDomainAndRangeBasedOnOrientation((function(t){return g.getDomainValue(t)}),(function(t){return g.getRangeValue(t)}),v),y=m[0],b=m[1],_=Na(this);n===I.TOP||n===I.BOTTOM?(_.selectAll("line.threshold-line").transition().call((function(e){return u.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("y1",p).attr("y2",d).attr("x1",(function(t){var e=t.value;return y(e)+(s?r.step()/2:0)})).attr("x2",(function(t){var e=t.value;return y(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),_.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",(function(t){var e=t.value;return-y(e)})).attr("width",Math.abs(d-p)).classed("rotate",!0)):(_.selectAll("line.threshold-line").transition().call((function(e){return u.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})})).attr("x1",c).attr("x2",h).attr("y1",(function(t){var e=t.value;return b(e)+(s?r.step()/2:0)})).attr("y2",(function(t){var e=t.value;return b(e)+(s?r.step()/2:0)})).style("stroke",(function(t){return t.fillColor})),_.selectAll("rect.threshold-hoverable-area").attr("x",c).attr("y",(function(t){var e=t.value;return b(e)})).attr("width",Math.abs(h-c)).classed("rotate",!1))})),this.services.events.addEventListener(ot.Threshold.SHOW,(function(t){e.setThresholdLabelPosition(t.detail),e.label.classed("hidden",!1)})),this.services.events.addEventListener(ot.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(t){var e=t.value,n=t.axisPosition,r=this.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===U.TIME){var i=[I.LEFT,I.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=ka.getProperty(r,"timeScale"),l=Rm(s.ticks());return km(e,0,s.ticks(),l,u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=Na(this.services.domUtils.getHolder()),e=ka.getProperty(this.getOptions(),"style","prefix");this.label=Bd.appendOrSelect(t,"div."+dd.prefix+"--"+e+"--threshold--label").classed("hidden",!0)},e.prototype.setThresholdLabelPosition=function(t){var e=t.event,n=t.datum,r=this.services.domUtils.getHolder(),i=Ba(e,r),o=n.valueFormatter?n.valueFormatter(n.value):this.getFormattedValue(n);this.label.html((n.label||"Threshold")+": "+o).style("background-color",n.fillColor);var a=this.label.node(),s=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},a,[Em.RIGHT,Em.LEFT,Em.TOP,Em.BOTTOM],(function(){return{width:r.offsetWidth,height:r.offsetHeight}})),u=this.positionService.findPositionAt({left:i[0],top:i[1]},a,s);this.positionService.setElement(a,u)},e.prototype.addEventListeners=function(){var t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",(function(e){Na(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(ot.Threshold.SHOW,{event:e,hoveredElement:Na(this),datum:Na(this).datum()})})).on("mouseout",(function(e){Na(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(ot.Threshold.HIDE,{event:e,hoveredElement:Na(this),datum:Na(this).datum()})}))},e}(Ov),Um=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e.renderType=k.HTML,e}return n(e,t),e.prototype.render=function(){var t=this.getComponentContainer(),e=ka.getProperty(this.getOptions(),"title"),n=t.selectAll("p.title").data([e]);if(n.enter().append("p").classed("title",!0).merge(n).attr("x",0).attr("y","1em").html((function(t){return t})),n.node()&&n.node().offsetWidth<n.node().scrollWidth){var r=this;n.on("mouseover",(function(t){r.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:t,hoveredElement:n,content:n.text()})})).on("mousemove",(function(t){r.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){r.services.events.dispatchEvent(ot.Tooltip.HIDE)}))}n.exit().remove()},e.prototype.truncateTitle=function(t,e){if(!(e<=0)){var n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");var r=Bd.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),o=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,o-1)).append("tspan").text("...");var a=this;t.on("mouseover",(function(e){a.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:e,hoveredElement:t,content:n})})).on("mousemove",(function(t){a.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:t})})).on("mouseout",(function(){a.services.events.dispatchEvent(ot.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return Bd.getSVGElementSize(this.parent.node(),{useAttr:!0}).width},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}(Ov),Gm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(){var t=ka.getProperty(this.model.getDisplayData(),0),e=this.getOptions(),n=this.getComponentContainer(),r=e.data.groupMapsTo;if(ka.getProperty(e,"meter","proportional"))this.displayTotal(),this.displayBreakdownTitle();else{var i=n.selectAll("text.meter-title").data([t[r]]);i.enter().append("text").classed("meter-title",!0).merge(i).attr("x",0).attr("y","1em").text((function(t){return t})),i.exit().remove(),this.appendPercentage(),this.displayStatus()}var o=this.getMaxTitleWidth(),a=Bd.appendOrSelect(n,"text.meter-title");o>0&&a.node().getComputedTextLength()>o&&this.truncateTitle(a,o)},e.prototype.displayBreakdownTitle=function(){var t,e=this.getComponentContainer(),n=this.getOptions(),r=this.model.getMaximumDomain(this.model.getDisplayData()),i=ka.getProperty(n,"meter","proportional","total"),o=ka.getProperty(n,"meter","proportional","unit")?ka.getProperty(n,"meter","proportional","unit"):"";if(r===i)t=null;else{var a=null!==i?i-r:r,s=ka.getProperty(n,"meter","proportional","breakdownFormatter");t=null!==s?s({datasetsTotal:r,total:i}):r+" "+o+" used ("+a+" "+o+" available)"}var u=e.selectAll("text.proportional-meter-title").data([t]);u.enter().append("text").classed("proportional-meter-title",!0).merge(u).attr("x",0).attr("y","1em").text((function(t){return t})),u.exit().remove();var l=this.getMaxTitleWidth(),c=Bd.appendOrSelect(e,"text.proportional-meter-title");l>0&&c.node().getComputedTextLength()>l&&this.truncateTitle(c,l)},e.prototype.displayTotal=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=ka.getProperty(e,"meter","proportional","total"),r=n?ka.getProperty(e,"meter","proportional","total"):this.model.getMaximumDomain(this.model.getDisplayData()),i=ka.getProperty(e,"meter","proportional","unit")?ka.getProperty(e,"meter","proportional","unit"):"",o=ka.getProperty(e,"meter","proportional","totalFormatter"),a=null!==o?o(r):n+" "+i+" total",s=Bd.getSVGElementSize(this.services.domUtils.getMainContainer(),{useAttr:!0}),u=s.width?s.width:this.parent.node().getAttribute("width"),l=t.selectAll("text.proportional-meter-total").data([a]);l.enter().append("text").classed("proportional-meter-total",!0).merge(l).attr("x",u).attr("y","1em").attr("text-anchor","end").text((function(t){return t})),l.exit().remove()},e.prototype.displayStatus=function(){var t=this.getComponentContainer(),e=Bd.getHTMLElementSize(this.services.domUtils.getMainContainer()),n=e.width?e.width:0,r=this.model.getStatus(),i=bt.status.indicatorSize/2,o=Bd.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),a=r?[r]:[],s=o.selectAll("circle.status").data(a);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var u=o.selectAll("path.innerFill").data(a);u.enter().append("path").merge(u).attr("d",this.getStatusIconPathString(r)).attr("transform","translate(-"+i+", 0)").attr("class","innerFill"),u.exit().remove(),s.exit().remove()},e.prototype.appendPercentage=function(){var t=ka.getProperty(this.model.getDisplayData(),0,"value"),e=this.getComponentContainer(),n=Bd.appendOrSelect(e,"text.meter-title"),r=!0===ka.getProperty(this.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),o=bt.statusBar.paddingRight;i.enter().append("text").classed("percent-value",!0).merge(i).text((function(t){return t+"%"})).attr("x",+n.attr("x")+n.node().getComputedTextLength()+o).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=Bd.appendOrSelect(this.parent,"tspan"),i=bt.statusBar.paddingRight,o=Math.ceil(r.node().getComputedTextLength());Bd.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+o+i)},e.prototype.getMaxTitleWidth=function(){var t=Bd.getHTMLElementSize(this.services.domUtils.getMainContainer()),e=ka.getProperty(this.getOptions(),"meter","proportional"),n=t.width?t.width:this.parent.node().getAttribute("width");if(null!==e){var r=Bd.appendOrSelect(this.parent,"text.proportional-meter-total").node();return n-Bd.getSVGElementSize(r,{useBBox:!0}).width-bt.total.paddingLeft}var i=Bd.appendOrSelect(this.parent,"text.percent-value"),o=bt.statusBar.paddingRight,a=i.node().getComputedTextLength(),s=Bd.appendOrSelect(this.parent,"g.status-indicator").node();return n-a-o-(Bd.getSVGElementSize(s,{useBBox:!0}).width+bt.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case J.SUCCESS:return"M6.875 11.3125 3.75 8.1875 4.74375 7.25 6.875 9.34375 11.50625 4.75 12.5 5.7375 Z";case J.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case J.WARNING:return"M7.9375,11.125 C7.41973305,11.125 7,11.544733 7,12.0625 C7,12.580267 7.41973305,13 7.9375,13 C8.45526695,13 8.875,12.580267 8.875,12.0625 C8.875,11.544733 8.45526695,11.125 7.9375,11.125 M7.3125, 3 8.5625, 3 8.5625, 9.875 7.3125, 9.875, 7.3125, 3 Z"}},e}(Um),Hm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.renderType=k.HTML,i.isEventListenerAdded=!1,i.positionService=new Am,i.handleShowTooltip=function(t){var e=t.detail.data||t.detail.items,n=i.getTooltipHTML(t),r=Bd.appendOrSelect(i.tooltip,"div.content-box");if(ka.getProperty(i.getOptions(),"tooltip","customHTML"))if(t.detail.content){var o='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";r.html(o)}else r.html(i.model.getOptions().tooltip.customHTML(e,n));else r.html(n);i.positionTooltip(t),i.tooltip.classed("hidden",!1).attr("aria-hidden",!1)},i.handleHideTooltip=function(){i.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},i.init(),i}return n(e,t),e.prototype.addTooltipEventListener=function(){var t=this;this.services.events.addEventListener(ot.Tooltip.MOVE,(function(e){!1===t.tooltip.classed("hidden")&&t.positionTooltip(e)})),this.services.events.addEventListener(ot.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(ot.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(ot.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(ot.Tooltip.MOVE,null),this.services.events.removeEventListener(ot.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(ot.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(ot.Chart.MOUSEOUT,this.handleHideTooltip)},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this,n=this.getOptions(),r=ka.getProperty(n,"tooltip","truncation","type"),i=ka.getProperty(n,"tooltip","truncation","threshold"),o=ka.getProperty(n,"tooltip","truncation","numCharacter");return r!==B.NONE?t.map((function(t){var n=t.labelIcon?12:0;return t.value=t.value?e.valueFormatter(t.value,t.label):t.value,t.label&&t.label.length+n>i&&(t.label=ka.truncateLabel(t.label,r,o)),t.value&&t.value.length>i&&(t.value=ka.truncateLabel(t.value,r,o)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip"><p>'+t.detail.content+"</p></div>";else{var n=this.getItems(t);e="<ul class='multi-tooltip'>"+this.formatItems(n).map((function(t){return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.class?'<a class="tooltip-color '+t.class+'"></a>':"")+"\n\t\t\t\t\t\t\t\t"+(t.color?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<div class="label">\n\t\t\t\t\t\t\t\t<p>'+(t.label||"")+"</p>\n\t\t\t\t\t\t\t\t"+(t.labelIcon?'<span class="label-icon"/>'+t.labelIcon+"</span>":"")+"\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t"+(void 0===t.value||null===t.value?"":'<p class="value"/>'+t.value+"</p>")+"\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</li>"})).join("")+"</ul>"}return e},e.prototype.valueFormatter=function(t,e){var n=this.getOptions(),r=ka.getProperty(n,"tooltip","valueFormatter");return r?r(t,e):"function"==typeof t.getTime?hv(t,"MMM d, yyyy"):t.toLocaleString()},e.prototype.render=function(){var t=this.getOptions(),e=ka.getProperty(t,"tooltip","enabled");if(e){var n=Na(this.services.domUtils.getHolder()),r=ka.getProperty(t,"style","prefix");this.tooltip=Bd.appendOrSelect(n,"div."+dd.prefix+"--"+r+"--tooltip"),this.tooltip.style("max-width",null),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!e&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=this.getOptions(),o=ka.getProperty(i,"zoomBar","top","enabled"),a=ka.getProperty(t,"detail","mousePosition");if(a){var s=ka.getProperty(i,"zoomBar","top","type"),u=St.height[s];o&&(a[1]+=u+St.spacerHeight)}else a=Ba(ka.getProperty(t,"detail","event"),n);var l,c=n.offsetWidth,h=n.offsetHeight;l=a[0]/c>.9?Em.LEFT:a[0]/c<.1?Em.RIGHT:this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[Em.RIGHT,Em.LEFT,Em.TOP,Em.BOTTOM],(function(){return{width:c,height:h}}));var f=Et.horizontalOffset;l===Em.LEFT&&(f*=-1),e=this.positionService.findPositionAt({left:a[0]+f,top:a[1]},r,l),this.positionService.setElement(r,e)},e}(Ov),zm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getItems=function(t){var e=this;if(t.detail.items)return t.detail.items;var n=t.detail.data;if(!n.length||!n[0])return[];var r,i=this.getOptions(),o=this.services.cartesianScales,a=o.getDomainIdentifier(),s=i.data.groupMapsTo,u=o.getDomainLabel(),l=o.getRangeLabel(),c=n[0][a];if(1===n.length){var h=n[0],f=o.getRangeIdentifier(h),d=h[f];r=L([{label:u,value:c}],Array.isArray(d)&&2===d.length?[{label:"Start",value:d[0]},{label:"End",value:d[1]}]:[{label:l,value:h[f]}]),t.detail.additionalItems&&t.detail.additionalItems.forEach((function(t){return r.push({label:t.label,value:t.value})})),r.push({label:i.tooltip.groupLabel,value:h[s],color:this.model.getFillColor(h[s]),class:this.model.getColorClassName({classNameTypes:[R.TOOLTIP],dataGroupName:h[s]})})}else if(n.length>1){if(r=(r=[{label:u,value:c}]).concat(n.map((function(t){return{label:t[s],value:t[o.getRangeIdentifier(t)],color:e.model.getFillColor(t[s]),class:e.model.getColorClassName({classNameTypes:[R.TOOLTIP],dataGroupName:t[s]})}})).sort((function(t,e){return e.value-t.value}))),!o.isDualAxes()&&!0===ka.getProperty(i,"tooltip","showTotal")){var p=o.getRangeIdentifier();r.push({label:Nn(i,"tooltip.totalLabel")||"Total",value:n.reduce((function(t,e){return t+e[p]}),0),bold:!0})}}return r},e}(Hm),jm=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",i.renderType=k.SVG,i.chartClipId="chart-clip-id-"+Math.floor(99999999999*Math.random()),i.init(),i}return n(e,t),e.prototype.init=function(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})},e.prototype.render=function(t){this.createClipPath()},e.prototype.createClipPath=function(){var t=this.parent,e=this.services.cartesianScales,n=e.getMainXScale(),r=e.getMainYScale(),i=n.range(),o=i[0],a=i[1],s=r.range(),u=s[0],l=s[1];this.chartClipPath=Bd.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=Bd.appendOrSelect(this.chartClipPath,"rect."+this.type);c.attr("x",o).attr("y",l).attr("width",a-o).attr("height",u-l),this.chartClipPath.merge(c).lower()},e}(Ov),Fm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="canvas-chart-clip",e.chartClipId="canvas-chart-clip-id-"+Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.createClipPath=function(){var t=this.parent,e=Bd.getSVGElementSize(this.parent,{useAttrs:!0}),n=e.width,r=e.height;this.chartClipPath=Bd.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var i=Bd.appendOrSelect(this.chartClipPath,"rect."+this.type);i.attr("x",0).attr("y",0).attr("width",n).attr("height",r),this.chartClipPath.merge(i).lower()},e}(jm),Wm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.type="highlight",r.renderType=k.SVG,r.positionService=new Am,r.highlightStrokeWidth=1,r}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!1);var e=ka.getProperty(this.getOptions(),"axes"),n=[];Object.keys(e).forEach((function(t){if(Object.values(I).includes(t)){var r=e[t];r.highlights&&r.highlights.data.length>0&&n.push({axisPosition:t,highlightStartMapsTo:r.highlights.highlightStartMapsTo,highlightEndMapsTo:r.highlights.highlightEndMapsTo,labelMapsTo:r.highlights.labelMapsTo,highlight:r.highlights.data,color:r.highlights.color})}}));var r=this.getComponentContainer({withinChartClip:!0}).selectAll("g.axis-highlight").data(n,(function(t){return t.axisPosition}));r.exit().attr("opacity",0).remove();var i=r.enter().append("g").merge(r);i.attr("class",(function(t){return"axis-highlight "+t.axisPosition}));var o=i.selectAll("g.highlight-group").data((function(t){return t.highlight.map((function(e){return e.axisPosition=t.axisPosition,e.highlightStartMapsTo=t.highlightStartMapsTo,e.labelMapsTo=t.labelMapsTo,e.color=t.color,e.highlightEndMapsTo=t.highlightEndMapsTo,e}))}));o.exit().attr("opacity",0).remove();var a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");var s=this;i.each((function(e){var n=e.axisPosition,r=s.services.cartesianScales.getMainXScale(),i=s.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],u=o[1],l=i.range(),c=l[0],h=l[1],f=s.services.cartesianScales,d=f.getOrientation(),p=ka.flipDomainAndRangeBasedOnOrientation((function(t){return f.getDomainValue(t)}),(function(t){return f.getRangeValue(t)}),d),g=p[0],v=p[1],m=Na(this);n===I.TOP||n===I.BOTTOM?m.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("y",Math.max(h+s.highlightStrokeWidth,0)).attr("height",Math.max(c-2*s.highlightStrokeWidth,0)).attr("x",(function(t){var e=t.highlightStartMapsTo,n=P(t,["highlightStartMapsTo"]);return g(n[e])})).attr("width",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=P(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(g(r[n])-g(r[e]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=P(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=P(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})):m.selectAll("rect.highlight-bar").transition().call((function(e){return s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})})).attr("x",a).attr("width",Math.max(u-a,0)).attr("y",(function(t){var e=t.highlightEndMapsTo,n=P(t,["highlightEndMapsTo"]);return v(n[e])})).attr("height",(function(t){var e=t.highlightStartMapsTo,n=t.highlightEndMapsTo,r=P(t,["highlightStartMapsTo","highlightEndMapsTo"]);return Math.max(v(r[e])-v(r[n]),0)})).style("stroke",(function(t){var e=t.color,n=t.labelMapsTo,r=P(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null})).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",(function(t){var e=t.color,n=t.labelMapsTo,r=P(t,["color","labelMapsTo"]);return e&&e.scale[r[n]]?e.scale[r[n]]:null}))}))},e}(Ov),qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",e.renderType=k.SVG,e.gradient_id="gradient-id-"+Math.floor(99999999999*Math.random()),e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t.name!==n.datum().name?ct.opacity.unselected:ct.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",ct.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),r=[0,0],i=this.services.cartesianScales,o=i.getOrientation(),a=af().curve(this.services.curves.getD3Curve()).defined((function(t,e){var n=t[i.getRangeIdentifier()];return null!=n})),s=this.model.getGroupedData(this.configs.groups),u=ka.getProperty(this.getOptions(),"bounds"),l=u&&s&&1===s.length;!l&&u&&console.warn("Bounds can only be shown when having 1 single datagroup, you've supplied "+s.length);var c=function(t,e){return l?i.getBoundedScaledValues(t,e)[0]:i.getRangeValue(0)},h=function(t,e){return l?i.getBoundedScaledValues(t,e)[1]:i.getRangeValue(t,e)};o===V.VERTICAL?(r=this.services.cartesianScales.getMainYScale().domain(),a.x((function(t,e){return i.getDomainValue(t,e)})).y0((function(t,e){return c(t,e)})).y1((function(t,e){return h(t,e)}))):(r=this.services.cartesianScales.getMainXScale().domain(),a.x0((function(t,e){return c(t,e)})).x1((function(t,e){return h(t,e)})).y((function(t,e){return i.getDomainValue(t,e)})));var f=ka.getProperty(this.getOptions(),"color","gradient","enabled"),d=s&&1===s.length&&f;s.length>1&&f&&console.error("Gradients can only be enabled when having 1 single dataset");var p=n.selectAll("path.area").data(s,(function(t){return t.name})),g=Na(this.services.domUtils.getMainContainer());if(p.exit().attr("opacity",0).remove(),s.length){if(d){var v=g.select("path."+this.model.getColorClassName({classNameTypes:[R.STROKE],dataGroupName:s[0].name})).node(),m=void 0;if(v)m=getComputedStyle(v,null).getPropertyValue("stroke");else{var y=ka.getProperty(this.model.getOptions(),"color","scale");if(null!==y)m=y[Object.keys(y)[0]]}Qp.appendOrUpdateLinearGradient({svg:this.parent,id:s[0].name.replace(" ","")+"_"+this.gradient_id,x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:Qp.getStops(r,m)})}else this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()}));var b=this,_=p.enter().append("path");d?_.merge(p).style("fill",(function(t){return"url(#"+t.name.replace(" ","")+"_"+e.gradient_id+")"})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return a(e)})):(_.attr("opacity",0).merge(p).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL,R.STROKE],dataGroupName:t.name,originalClassName:"area"})})).style("fill",(function(t){return b.model.getFillColor(t.name)})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",l?1:ct.opacity.selected).attr("d",(function(t){var e=t.data;return a(e)})),l&&_.attr("fill-opacity",ct.opacity.selected).style("stroke",(function(t){return b.model.getStrokeColor(t.name)})).style("stroke-dasharray","2, 2").attr("stroke-width","0.7px"))}},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Ov),Ym=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return ka.getProperty(t,0,r)!==n.datum().name?ct.opacity.unselected:ct.opacity.selected}))},e.handleLegendMouseOut=function(){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",ct.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this,o=this.getOptions(),a=o.data.groupMapsTo,s=Object.keys(o.axes).some((function(t){return o.axes[t].percentage})),u=this.model.getStackedData({percentage:s,groups:this.configs.groups}),l=ka.getProperty(u,0,0),c=this.services.cartesianScales.getDomainAxisPosition({firstDatum:l}),h=this.services.cartesianScales.getRangeAxisPosition({firstDatum:l}),f=this.services.cartesianScales.getScaleByPosition(h),d=n.selectAll("path.area").data(u,(function(t){return ka.getProperty(t,0,a)}));this.areaGenerator=af().x((function(t,n){return e.services.cartesianScales.getValueThroughAxisPosition(c,t.data.sharedStackKey,n)})).y0((function(t){return f(t[0])})).y1((function(t){return f(t[1])})).curve(this.services.curves.getD3Curve()),d.exit().attr("opacity",0).remove(),d.enter().append("path").attr("opacity",0).merge(d).data(u,(function(t){return ka.getProperty(t,0,a)})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:ka.getProperty(t,0,a),originalClassName:"area"})})).style("fill",(function(t){return i.model.getFillColor(ka.getProperty(t,0,a))})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"area-update-enter",animate:t})})).attr("opacity",ct.opacity.selected).attr("d",this.areaGenerator)},e}(Ov),Zm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.getOptions();if(e.bars.width)return e.bars.width;var n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=Bd.getSVGElementSize(this.parent,{useAttrs:!0}).width;return r.step?Math.min(e.bars.maxWidth,r.step()/2):Math.min(e.bars.maxWidth,.25*i/n)},e.prototype.isOutsideZoomedDomain=function(t,e){if(this.model.getDisplayData().length<=1)return!1;var n=this.model.get("zoomDomain");if(void 0!==n){var r=this.services.cartesianScales.getDomainScale();return t<r(n[0])||e>r(n[1])}return!1},e}(Ov),Xm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getOptions().data.groupMapsTo,i=this.getComponentContainer({withinChartClip:!0}),o=this.model.getDisplayData(this.configs.groups),a=this.services.cartesianScales.getOrientation(),s=i.selectAll("path.bar").data(o,(function(t){return t[n]}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t[n],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r,i,o=e.services.cartesianScales.getRangeIdentifier(),s=e.getBarWidth(),u=t[o],l=e.services.cartesianScales.getDomainValue(t,n)-s/2,c=l+s;if(Array.isArray(u)&&2===u.length)r=e.services.cartesianScales.getRangeValue(u[0]),i=e.services.cartesianScales.getRangeValue(u[1],n);else{var h=e.services.cartesianScales.getRangeScale().domain()[0];r=e.services.cartesianScales.getRangeValue(Math.max(0,h)),i=e.services.cartesianScales.getRangeValue(t,n)}var f=Math.abs(i-r);if(0!==f&&f<2&&(i=u>0&&a===V.VERTICAL||u<0&&a===V.HORIZONTAL?r-2:r+2),!e.isOutsideZoomedDomain(l,c))return ka.generateSVGPathString({x0:l,x1:c,y0:r,y1:i},a)})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=Na(this);r.classed("hovered",!0),r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(ot.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ot.Bar.BAR_MOUSEMOVE,{event:e,element:Na(this),datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Bar.BAR_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1),r.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(ot.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Zm),Km=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.renderType=k.SVG,e.padding=5,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(this.configs.groups),i=this.getOptions().data.groupMapsTo;this.setGroupScale();var o=this.getComponentContainer({withinChartClip:!0}),a=ka.removeArrayDuplicates(n.map((function(t){var n=e.services.cartesianScales.getDomainIdentifier(t);return t[n]&&"function"==typeof t[n].toString?t[n].toString():t[n]}))),s=o.selectAll("g.bars").data(a,(function(t){return t}));s.exit().attr("opacity",0).remove();var u=s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(s);u.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-group-update-enter",animate:t})})).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===V.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"}));var l=u.selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}),(function(t){return t[i]}));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t){var n=e.groupScale(t[i]),r=n,o=n+e.getBarWidth(),a=e.services.cartesianScales.getRangeAxisPosition({datum:t}),s=e.services.cartesianScales.getValueThroughAxisPosition(a,0),u=e.services.cartesianScales.getRangeValue(t);if(!e.isOutsideZoomedDomain(r,o))return ka.generateSVGPathString({x0:r,x1:o,y0:s,y1:u},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.bar").on("mouseover",(function(e,n){var r=Na(this);r.classed("hovered",!0),r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(ot.Bar.BAR_MOUSEOVER,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:e,hoveredElement:r,data:[n]})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.Bar.BAR_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Bar.BAR_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1),r.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(ot.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this;return this.model.getDisplayData(this.configs.groups).filter((function(n){return n[e.services.cartesianScales.getDomainIdentifier(n)]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getGroupedData(this.configs.groups);if(1===t.length)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t.length-1)},e.prototype.getBarWidth=function(){var t=this.getOptions(),e=ka.getProperty(t,"bars","width"),n=ka.getProperty(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;var r=this.model.getGroupedData(this.configs.groups).length,i=this.getTotalGroupPadding(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},e.prototype.setGroupScale=function(){var t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=Js().domain(t).rangeRound([0,this.getGroupWidth()])},e}(Zm),Qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.renderType=k.SVG,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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=this.model.getStackedData({groups:this.configs.groups,divergent:!0}),s=this.model.getActiveDataGroupNames(),u=n.selectAll("g.bars").data(a,(function(t){return ka.getProperty(t,0,o)}));u.exit().attr("opacity",0).remove(),u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars");var l=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));l.exit().remove(),l.enter().append("path").merge(l).classed("bar",!0).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t[o],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[o])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,o=e.getBarWidth(),a=e.services.cartesianScales.getDomainValue(r,n)-o/2,u=a+o,l=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(a,u)){if(Math.abs(c-l)>0&&Math.abs(c-l)>i.bars.dividerSize){var h=t[0]<0&&t[1]<=0;h&&s.length>1?e.services.cartesianScales.getOrientation()===V.VERTICAL?c+=0===t[1]?2:1:c-=(t[1],1):h||(e.services.cartesianScales.getOrientation()===V.VERTICAL?c+=1:c-=1)}return ka.generateSVGPathString({x0:a,x1:u,y0:l,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n,r){var i,o=Na(this);o.classed("hovered",!0),o.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")),e.services.events.dispatchEvent(ot.Bar.BAR_MOUSEOVER,{event:n,element:o,datum:r});var a=e.model.getDisplayData(e.configs.groups).find((function(n){var i=e.services.cartesianScales.getDomainIdentifier(n);return n[e.services.cartesianScales.getRangeIdentifier(n)]===r.data[r[t]]&&n[i].toString()===r.data.sharedStackKey&&n[t]===r[t]}));if(void 0===a){var s=e.services.cartesianScales.getDomainIdentifier(),u=e.services.cartesianScales.getRangeIdentifier();(i={})[s]=r.data.sharedStackKey,i[u]=r.data[r[t]],i[t]=r[t],a=i}e.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:n,hoveredElement:o,data:[a]})})).on("mousemove",(function(t,n){var r=Na(this);e.services.events.dispatchEvent(ot.Bar.BAR_MOUSEMOVE,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ot.Bar.BAR_CLICK,{event:t,element:Na(this),datum:n})})).on("mouseout",(function(t,n){var r=Na(this);r.classed("hovered",!1),e.services.events.dispatchEvent(ot.Bar.BAR_MOUSEOUT,{event:t,element:r,datum:n}),e.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Zm),$m=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="boxplot",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions().data.groupMapsTo,o=this.model.getDataGroupNames(),a=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),u=a.range(),l=u[0],c=u[1],h=s.range(),f=c-l,d=h[0]-h[1];if(0!==f){var p=this.services.cartesianScales,g=p.getOrientation(),v=g===V.VERTICAL,m=ka.flipDomainAndRangeBasedOnOrientation((function(t,n){return e.services.cartesianScales.getDomainValue(t,n)}),(function(t,n){return e.services.cartesianScales.getRangeValue(t,n)}),g),y=m[0],b=m[1],_=Math.floor((v?f:d)/o.length),x=Math.min(_/2,16),w=this.model.getBoxplotData(),O=n.selectAll(".box-group").data(w);O.exit().remove();var E=O.enter().append("g").attr("class","box-group"),T=O.merge(E);E.append("path").merge(O.select("path.vertical-line.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[R.STROKE],originalClassName:"vertical-line start"})})).attr("stroke-width",gt.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalstartline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.quartiles.q_25);return ka.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.vertical-line.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[R.STROKE],originalClassName:"vertical-line end"})})).attr("stroke-width",gt.strokeWidth.default).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-verticalendline",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i]),n=e,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.quartiles.q_75);return ka.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.box")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[R.FILL,R.STROKE],originalClassName:"box"})})).attr("fill-opacity",gt.box.opacity.default).attr("stroke-width",gt.strokeWidth.default).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","box").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-quartiles",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(Math[v?"max":"min"](t.quartiles.q_75,t.quartiles.q_25)),o=r+Math.abs(p.getRangeValue(t.quartiles.q_75)-p.getRangeValue(t.quartiles.q_25));return ka.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.highlight-area")).attr("class","highlight-area").attr("opacity",0).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.max);return ka.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.whisker.start")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[R.STROKE],originalClassName:"whisker start"})})).attr("stroke-width",gt.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-startingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/4,n=e+x/2,r=p.getRangeValue(t.whiskers.min),o=p.getRangeValue(t.whiskers.min);return ka.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.median")).attr("fill","none").attr("class",(function(){return e.model.getColorClassName({classNameTypes:[R.STROKE],originalClassName:"median"})})).attr("stroke-width",2).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-median",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/2,n=e+x,r=p.getRangeValue(t.quartiles.q_50),o=r;return ka.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)})),E.append("path").merge(O.select("path.whisker.end")).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[R.STROKE],originalClassName:"whisker end"})})).attr("stroke-width",gt.strokeWidth.thicker).attr("fill","none").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-endingwhisker",animate:t})})).attr("d",(function(t){var e=p.getDomainValue(t[i])-x/4,n=e+x/2,r=p.getRangeValue(t.whiskers.max),o=p.getRangeValue(t.whiskers.max);return ka.generateSVGPathString({x0:e,x1:n,y0:r,y1:o},g)}));var S=T.selectAll("circle.outlier").data((function(t){return t.outliers.map((function(e){var n;return(n={min:t.whiskers.min,max:t.whiskers.max})[i]=t[i],n.value=e,n}))}));S.exit().remove();var M=S.enter().append("circle");S.merge(M).attr("r",gt.circle.radius).attr("class",(function(){return e.model.getColorClassName({classNameTypes:[R.FILL,R.STROKE],originalClassName:"outlier"})})).attr("fill-opacity",gt.circle.opacity.default).attr("cx",y).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"boxplot-update-circles",animate:t})})).attr("cy",b),this.addBoxEventListeners(),this.addCircleEventListeners()}},e.prototype.addBoxEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo;this.parent.selectAll("path.highlight-area").on("mouseover",(function(r,i){var o=Na(this);Na(this.parentNode).select("path.box").classed("hovered",!0).attr("fill-opacity",gt.box.opacity.hovered),t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:e.tooltip.groupLabel,value:i[n],class:t.model.getColorClassName({classNameTypes:[R.TOOLTIP]})},{label:"Minimum",value:i.whiskers.min},{label:"Q1",value:i.quartiles.q_25},{label:"Median",value:i.quartiles.q_50},{label:"Q3",value:i.quartiles.q_75},{label:"Maximum",value:i.whiskers.max},{label:"IQR",value:i.quartiles.q_75-i.quartiles.q_25}]}),t.services.events.dispatchEvent(ot.Boxplot.BOX_MOUSEOVER,{event:r,element:o,datum:i})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.Boxplot.BOX_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Boxplot.BOX_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);Na(this.parentNode).select("path.box").classed("hovered",!1).attr("fill-opacity",gt.box.opacity.default),t.services.events.dispatchEvent(ot.Boxplot.BOX_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.addCircleEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("circle").on("mouseover",(function(i,o){var a=Na(this);a.classed("hovered",!0).attr("fill-opacity",gt.circle.opacity.hovered).classed("unfilled",!1),t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel,value:o[n],class:t.model.getColorClassName({classNameTypes:[R.TOOLTIP]})},{label:"Outlier",value:o[r]}]}),t.services.events.dispatchEvent(ot.Boxplot.OUTLIER_MOUSEOVER,{event:i,element:a,datum:o})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.Boxplot.OUTLIER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Boxplot.OUTLIER_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1).attr("fill-opacity",gt.circle.opacity.default),t.services.events.dispatchEvent(ot.Boxplot.OUTLIER_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:r})}))},e}(Ov),Jm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",e.renderType=k.SVG,e.handleChartHolderOnHover=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-hover-scatter")).attr("opacity",1)},e.handleChartHolderOnMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("chart-holder-mouseout-scatter")).attr("opacity",0)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(ot.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(ot.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(t),n=this.model.get("zoomDomain");return void 0!==n?t.filter((function(t){return t[e].getTime()>=n[0].getTime()&&t[e].getTime()<=n[1].getTime()})):t},e.prototype.getScatterData=function(){var t,e=this,n=this.getOptions();if(this.configs.stacked){var r=Object.keys(n.axes).some((function(t){return n.axes[t].percentage}));t=this.model.getStackedData({groups:this.configs.groups,percentage:r})}else t=this.model.getDisplayData(this.configs.groups).filter((function(t){var n=e.services.cartesianScales.getRangeIdentifier(t);return void 0!==t[n]&&null!==t[n]}));return this.filterBasedOnZoomDomain(t)},e.prototype.render=function(t){if(ka.getProperty(this.getOptions(),"points","enabled")||ka.getProperty(this.getOptions(),"bubble","enabled")){var e=this.getComponentContainer({withinChartClip:!0}),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales.getDomainIdentifier(),i=e.selectAll("circle.dot").data(this.getScatterData(),(function(t){return t[n]+"-"+t[r]}));i.exit().attr("opacity",0).remove();var o=i.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(i);this.styleCircles(o,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){var n=this;if(!this.configs.handleThresholds)return!1;var r=this.services.cartesianScales.getOrientation(),i=ka.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=ka.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.services.cartesianScales.getDomainValue(t,e)}),(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)}),r),u=s[0],l=s[1],c=u(t,e),h=l(t,e);return a&&o?h<=a.scaleValue&&c>=o.scaleValue:a?h<=a.scaleValue:o?c>=o.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.points,a=o.filled,s=o.fillOpacity,u=this.services,l=u.cartesianScales,c=(u.transitions,i.data.groupMapsTo),h=ka.flipDomainAndRangeBasedOnOrientation((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),f=h[0],d=h[1],p=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=l.getDomainIdentifier(t),r=n.model.getIsFilled(t[c],t[e],t,a)?[R.FILL,R.STROKE]:[R.STROKE];return n.model.getColorClassName({classNameTypes:r,dataGroupName:t[c],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){var e=l.getDomainIdentifier(t);return n.model.getIsFilled(t[c],t[e],t,a)})).classed("unfilled",(function(t){var e=l.getDomainIdentifier(t);return!n.model.getIsFilled(t[c],t[e],t,a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"scatter-update-enter",animate:e})})).attr("cx",f).attr("cy",d).attr("r",i.points.radius).style("fill",(function(t){var e=l.getDomainIdentifier(t);if(n.model.getIsFilled(t[c],t[e],t,a))return n.model.getFillColor(t[c],t[e],t)})).style("stroke",(function(t){var e=l.getDomainIdentifier(t);return n.model.getStrokeColor(t[c],t[e],t)})).attr("fill-opacity",a?s:1).attr("opacity",p?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[l.getRangeIdentifier(t)]})),this.addEventListeners()},e.prototype.getTooltipAdditionalItems=function(t){return null},e.prototype.addEventListeners=function(){var t=this,e=t.getOptions().data.groupMapsTo;this.parent.selectAll("circle").on("mouseover",(function(n,r){var i=Na(this);i.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:n[e],originalClassName:i.attr("class")})})).style("fill",(function(n){var r=t.services.cartesianScales.getDomainIdentifier(n);return t.model.getFillColor(n[e],n[r],n)})).classed("unfilled",!1),t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:n,hoveredElement:i,data:[r],additionalItems:t.getTooltipAdditionalItems(r)}),t.services.events.dispatchEvent(ot.Scatter.SCATTER_MOUSEOVER,{event:n,element:i,datum:r})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.Scatter.SCATTER_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Scatter.SCATTER_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(n,r){var i=Na(this);if(i.classed("hovered",!1),!t.configs.filled){var o=t.getOptions().points.filled,a=t.services.cartesianScales.getDomainIdentifier(r),s=t.model.getIsFilled(r[e],r[a],r,o);i.classed("unfilled",!s).style("fill",(function(n){return s||o?t.model.getFillColor(n[e],n[a],n):null}))}t.services.events.dispatchEvent(ot.Scatter.SCATTER_MOUSEOUT,{event:n,element:i,datum:r}),t.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:i})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(ot.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(ot.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Ov),ty=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e.renderType=k.SVG,e}return n(e,t),e.prototype.getRadiusScale=function(t){var e=this.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=Bd.getHTMLElementSize(this.services.domUtils.getMainContainer()),a=i.length>0,s=a?As(i):[1,1];return Ol().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales,l=ka.flipDomainAndRangeBasedOnOrientation((function(t,e){return u.getDomainValue(t,e)}),(function(t,e){return u.getRangeValue(t,e)}),u.getOrientation()),c=l[0],h=l[1];t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"bubble-update-enter",animate:e})})).attr("cx",c).attr("cy",h).attr("r",(function(t){return a(t[o]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[R.FILL,R.STROKE],dataGroupName:t[s],originalClassName:"dot"})})).style("fill",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getFillColor(t[s],t[e],t)})).style("stroke",(function(t){var e=n.services.cartesianScales.getDomainIdentifier(t);return n.model.getStrokeColor(t[s],t[e],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)},e.prototype.getTooltipAdditionalItems=function(t){var e=ka.getProperty(this.getOptions(),"bubble");return[{label:ka.getProperty(e,"radiusLabel"),value:t[ka.getProperty(e,"radiusMapsTo")]}]},e}(Jm),ey=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bullet",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e,n=this,i=this.getOptions().data.groupMapsTo,o=this.getComponentContainer({withinChartClip:!0}),a=this.model.getDisplayData(this.configs.groups),s=this.services.cartesianScales.getRangeScale(),u=this.services.cartesianScales.getRangeIdentifier(),l=s.range(),c=l[0],h=l[1],f=s.domain(),d=(f[0],f[1]);!function(){var e=[];a.forEach((function(t){t.ranges?t.ranges.forEach((function(n,r){null!=n&&n<d&&e.push({datum:t,value:n,order:r+1})})):e.push({datum:t,order:1})}));var r=Bd.appendOrSelect(o,"g.range-boxes").selectAll("path.range-box").data(e,(function(t){return t[i]+"-"+t.order}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"range-box order-"+t.order})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-range-box-update-enter",animate:t})})).attr("d",(function(t,e){var r,i,o,a;return 1===t.order?(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=h-2,a=c+1):(i=(r=n.services.cartesianScales.getDomainValue(t.datum,e)-8)+16,o=n.services.cartesianScales.getRangeValue(t.value,e),a=h),ka.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),(e=Bd.appendOrSelect(o,"g.bars").selectAll("path.bar").data(a,(function(t){return t[i]}))).exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("bar",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-bar-update-enter",animate:t})})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t[i],originalClassName:"bar"})})).style("fill",(function(t){return n.model.getFillColor(t[i])})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-4,i=r+8,o=n.services.cartesianScales.getRangeValue(0)+1,a=n.services.cartesianScales.getRangeValue(t,e);return ka.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),function(){var e=Bd.appendOrSelect(o,"g.markers").selectAll("path.marker").data(a.filter((function(t){return null!==ka.getProperty(t,"marker")})),(function(t){return t[i]}));e.exit().attr("opacity",0).remove(),e.enter().append("path").attr("opacity",0).merge(e).classed("marker",!0).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-marker-update-enter",animate:t})})).attr("d",(function(t,e){var r=n.services.cartesianScales.getDomainValue(t,e)-12,i=r+24,o=n.services.cartesianScales.getRangeValue(t.marker,e),a=o;return ka.generateSVGPathString({x0:r,x1:i,y0:o,y1:a},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),function(){var e=[];a.filter((function(t){return null!==ka.getProperty(t,"marker")})).forEach((function(t){var n=t.marker,r=t[u];e=e.concat([{datum:t,value:.25*n,barValue:r},{datum:t,value:.5*n,barValue:r},{datum:t,value:.75*n,barValue:r}])}));var r=Bd.appendOrSelect(o,"g.quartiles").selectAll("path.quartile").data(e,(function(t){return t[i]}));r.exit().attr("opacity",0).remove(),r.enter().append("path").attr("opacity",0).merge(r).attr("class",(function(t){return"quartile "+(t.value<=t.barValue?"over-bar":"")})).transition().call((function(e){return n.services.transitions.setupTransition({transition:e,name:"bullet-quartile-update-enter",animate:t})})).attr("d",(function(t,e){var r=t.datum,i=t.value,o=4;r.ranges&&-1!==r.ranges.indexOf(i)&&(o=8);var a=n.services.cartesianScales.getDomainValue(r,e)-o/2,s=a+o,u=n.services.cartesianScales.getRangeValue(i,e),l=u;return ka.generateSVGPathString({x0:a,x1:s,y0:u,y1:l},n.services.cartesianScales.getOrientation())})).attr("opacity",1)}(),this.addEventListeners()},e.prototype.getMatchingRangeIndexForDatapoint=function(t){for(var e=t.ranges.length-1;e>0;e--){var n=t.ranges[e];if(t.value>=n)return e}return 0},e.prototype.addEventListeners=function(){var t=this,e=this.getOptions(),n=e.data.groupMapsTo,r=this.services.cartesianScales.getRangeIdentifier();this.parent.selectAll("path.bar").on("mouseover",(function(i,o){var a=Na(this);a.classed("hovered",!0),a.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(ot.Bar.BAR_MOUSEOVER,{event:i,element:a,datum:o});var s=ka.getProperty(e,"bullet","performanceAreaTitles"),u=t.getMatchingRangeIndexForDatapoint(o);t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:i,hoveredElement:a,items:[{label:e.tooltip.groupLabel||"Group",value:o[n],class:t.model.getColorClassName({classNameTypes:[R.TOOLTIP],dataGroupName:o[n]})},{label:"Value",value:o[r]},{label:"Target",value:o.marker},{label:"Percentage",value:Math.floor(o[r]/o.marker*100)+"%"},{label:"Performance",value:s[u]}]})})).on("mousemove",(function(e,n){t.services.events.dispatchEvent(ot.Bar.BAR_MOUSEMOVE,{event:e,element:Na(this),datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Bar.BAR_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1),r.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(ot.Bar.BAR_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Ov),ny=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="histogram",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),i=this.model.getOptions(),o=i.groupIdentifier,a=i.data.groupMapsTo,s=this.model.getBinnedStackedData(),u=this.services.cartesianScales.getMainXScale(),l=n.selectAll("g.bars").data(s,(function(t){return Nn(t,"0."+a)}));l.exit().attr("opacity",0).remove(),l.enter().append("g").classed("bars",!0).attr("role",r.GROUP);var c=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}));c.exit().remove(),c.enter().append("path").merge(c).classed("bar",!0).attr(o,(function(t,e){return e})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"histogram-bar-update-enter",animate:t})})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t[a],originalClassName:"bar"})})).style("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=Nn(t,"data");if(r){var o=u(r.x1)-u(r.x0)-1,a=e.services.cartesianScales.getDomainValue(r.x0,n),s=a+o,l=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);return Math.abs(c-l)>0&&Math.abs(c-l)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===V.VERTICAL?c+=1:c-=1),ka.generateSVGPathString({x0:a,x1:s,y0:l,y1:c},e.services.cartesianScales.getOrientation())}})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t.value})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions(),e=t.data.groupMapsTo,n=this;this.parent.selectAll("path.bar").on("mouseover",(function(r,i){var o=Na(this);o.classed("hovered",!0),o.transition(n.services.transitions.getTransition("graph_element_mouseover_fill_update"));var a=parseFloat(Nn(i,"data.x0")),s=parseFloat(Nn(i,"data.x1")),u=n.services.cartesianScales.getRangeAxisPosition(),l=n.services.cartesianScales.getScaleLabel(u);n.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:Nn(t,"bins.rangeLabel")||"Range",value:a+" – "+s},{label:t.tooltip.groupLabel||"Group",value:i[e],class:n.model.getColorClassName({classNameTypes:[R.TOOLTIP],dataGroupName:i[e]})},{label:l,value:Nn(i,"data."+i[e])}]})})).on("mousemove",(function(t,e){n.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:t})})).on("mouseout",(function(t,e){Na(this).classed("hovered",!1),n.services.events.dispatchEvent(ot.Tooltip.HIDE)}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Ov),ry=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?yt.opacity.unselected:yt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",yt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),i=this.services,o=i.cartesianScales,a=i.curves,s=ka.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),o.getOrientation()),u=s[0],l=s[1],c=this.getOptions(),h=of().x(u).y(l).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier(t)];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(c.axes).some((function(t){return c.axes[t].percentage})),p=c.data.groupMapsTo;f=this.model.getStackedData({groups:this.configs.groups,percentage:d}).map((function(t){var n=e.services.cartesianScales.getDomainIdentifier(t),r=e.services.cartesianScales.getRangeIdentifier(t);return{name:ka.getProperty(t,0,p),data:t.map((function(t){var e;return(e={})[n]=t.data.sharedStackKey,e[p]=t[p],e[r]=t[1],e})),hidden:!ka.some(t,(function(t){return t[0]!==t[1]}))}}))}else f=this.model.getGroupedData(this.configs.groups);var g=n.selectAll("path.line").data(f,(function(t){return t.name}));g.exit().attr("opacity",0).remove(),g.enter().append("path").classed("line",!0).attr("opacity",0).merge(g).data(f,(function(t){return t.name})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.STROKE],dataGroupName:t.name,originalClassName:"line"})})).style("stroke",(function(t){return e.model.getStrokeColor(t.name)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){return t.data.map((function(t){return t[e.services.cartesianScales.getRangeIdentifier(t)]})).join(",")})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"line-update-enter",animate:t})})).attr("opacity",(function(t){return t.hidden?0:1})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Ov),iy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="lollipop",e.renderType=k.SVG,e.handleScatterOnHover=function(t){var n=t.detail,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").attr("stroke-width",(function(t){return t[r]!==n.datum[r]?yt.weight.unselected:yt.weight.selected}))},e.handleScatterOnMouseOut=function(t){e.parent.selectAll("line.line").attr("stroke-width",yt.weight.unselected)},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("line.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t[r]!==n.datum().name?yt.opacity.unselected:yt.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("line.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",yt.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,o=this.services.cartesianScales,a=o.getMainXScale(),s=o.getMainYScale(),u=o.getDomainIdentifier(),l=o.getOrientation(),c=ka.flipDomainAndRangeBasedOnOrientation((function(t,e){return o.getDomainValue(t,e)}),(function(t,e){return o.getRangeValue(t,e)}),l),h=c[0],f=c[1],d=n.selectAll("line.line").data(this.getScatterData(),(function(t){return t[i]+"-"+t[u]}));d.exit().attr("opacity",0).remove();var p=d.enter().append("line").attr("opacity",0).merge(d).classed("line",!0).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.STROKE],dataGroupName:t[i],originalClassName:"line"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"lollipop-line-update-enter",animate:t})})).style("stroke",(function(t){return e.model.getFillColor(t[i],t[u],t)})).attr("opacity",1);l===V.HORIZONTAL?p.attr("y1",f).attr("y2",f).attr("x1",a.range()[0]).attr("x2",(function(t,e){return h(t,e)-r.points.radius})):p.attr("x1",h).attr("x2",h).attr("y1",s.range()[0]).attr("y2",(function(t,e){return f(t,e)+r.points.radius})),this.addScatterPointEventListeners()},e.prototype.addScatterPointEventListeners=function(){this.services.events.addEventListener(ot.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),this.services.events.addEventListener(ot.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e.prototype.destroy=function(){var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(ot.Scatter.SCATTER_MOUSEOVER,this.handleScatterOnHover),t.removeEventListener(ot.Scatter.SCATTER_MOUSEOUT,this.handleScatterOnMouseOut)},e}(Jm),oy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this;if(ka.getProperty(this.getOptions(),"points","enabled")){var n=this.getComponentContainer({withinChartClip:!0}),i=this.getOptions(),o=i.data.groupMapsTo,a=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),s=this.model.getStackedData({groups:this.configs.groups,percentage:a}),u=n.selectAll("g.dots").data(s,(function(t){return ka.getProperty(t,0,o)}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(u).selectAll("circle.dot").data((function(t){return t}));l.exit().attr("opacity",0).remove();var c=l.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(l).datum((function(t){var n,r=t[o],i=e.services.cartesianScales.getDomainIdentifier(t),a=e.services.cartesianScales.getRangeIdentifier(t);return(n={})[o]=r,n[i]=t.data.sharedStackKey,n[a]=t[1],n}));this.styleCircles(c,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.getOptions(),i=r.data.groupMapsTo,o=Object.keys(r.axes).some((function(t){return r.axes[t].percentage})),a=this.model.getStackedData({groups:this.configs.groups,percentage:o}),s=[];return a.forEach((function(r,a){r.forEach((function(r,u){var l,c=r[i],h=r.data.sharedStackKey,f=r.data[c],d=r[1],p=n.services.cartesianScales.getDomainIdentifier(r),g=n.services.cartesianScales.getRangeIdentifier(r);null!=f&&t===n.services.cartesianScales.getDomainValue(h)&&e===n.services.cartesianScales.getRangeValue(d)&&(o&&(f=n.model.getStackedData({groups:n.configs.groups})[a][u].data[c]),null!==f&&s.push(((l={})[i]=c,l[p]=h,l[g]=f,l)))}))})),this.model.getDisplayData(this.configs.groups).filter((function(t){var e=n.services.cartesianScales.getDomainIdentifier(t),r=n.services.cartesianScales.getRangeIdentifier(t);return void 0!==s.find((function(n){return n[i]==t[i]&&n[e]==t[e]&&n[r]==t[r]}))}))},e}(Jm);function ay(t,e){var n=this,r=zu(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var sy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.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 n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return _t.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getComponentContainer(),o=this.getOptions(),a=o.data.groupMapsTo,s=o.pie.valueMapsTo,u=this.model.getDisplayData().filter((function(t){return t[s]>0})),l=this.computeRadius();this.arc=Qh().innerRadius(this.getInnerRadius()).outerRadius(l),this.hoverArc=Qh().innerRadius(this.getInnerRadius()).outerRadius(l+_t.hoverArc.outerRadiusOffset);var c=function(){var t=uf,e=sf,n=null,r=Lh(0),i=Lh(Hh),o=Lh(0);function a(a){var s,u,l,c,h,f=(a=Jh(a)).length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(Hh,Math.max(-Hh,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),b=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*b)/d:0;s<f;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+b,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:Lh(+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:Lh(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Lh(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:Lh(+t),a):o},a}().value((function(t){return t[s]})).sort(ka.getProperty(o,"pie","sortFunction")).padAngle(_t.padAngle)(u),h=Bd.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(c,(function(t){return t.data[a]}));h.exit().attr("opacity",0).remove(),h.enter().append("path").classed("slice",!0).attr("opacity",0).merge(h).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t.data[a],originalClassName:"slice"})})).style("fill",(function(t){return n.model.getFillColor(t.data[a])})).attr("d",this.arc).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"pie_slice_enter_update",animate:t})})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t[s]+", "+ka.convertValueToPercentage(t.data[s],u,s)+"%"})).attrTween("d",(function(t){return ay.bind(this)(t,n.arc)}));var f=o.pie.labels.enabled,d=f?c.filter((function(t){return t.data[s]>0})):[],p=Bd.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(d,(function(t){return t.data[a]}));p.exit().attr("opacity",0).remove();var g=p.enter().append("text").classed("pie-label",!0),v=[];g.merge(p).style("text-anchor","middle").text((function(t){return o.pie.labels.formatter?o.pie.labels.formatter(t):ka.convertValueToPercentage(t.data[s],u,s)+"%"})).datum((function(t){var e=l+7,n=(t.endAngle-t.startAngle)/2+t.startAngle,r=n/Math.PI*180,i=this.getComputedTextLength();return t.textOffsetX=i/2,t.textOffsetY=r>90&&r<270?10:0,t.xPosition=(t.textOffsetX+e)*Math.sin(n),t.yPosition=(t.textOffsetY+e)*-Math.cos(n),t})).attr("transform",(function(t,e){var n=d.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<_t.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+_t.callout.offsetX+_t.callout.textMargin+t.textOffsetX,o=t.yPosition-_t.callout.offsetY,t.direction=Y.RIGHT,v.push(t)):(i=t.xPosition-_t.callout.offsetX-t.textOffsetX-_t.callout.textMargin,o=t.yPosition-_t.callout.offsetY,t.direction=Y.LEFT,v.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(v);var m=ka.getProperty(o,"donut")?"donut":"pie",y=ka.getProperty(o,m,"alignment"),b=Bd.getSVGElementSize(this.getParent(),{useAttr:!0}).width,_=f?_t.yOffset:0,x=l+(f?_t.xOffset:0);y===H.CENTER?x=b/2:y===H.RIGHT&&(x=b-l-_t.xOffset);var w=l+_;v.length>0&&(w+=_t.yOffsetCallout),i.attr("x",x+7).attr("y",w),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=Bd.appendOrSelect(this.getComponentContainer(),"g.callouts").attr("role",r.GROUP).attr("data-name","callouts"),n=e.selectAll("g.callout").data(t);n.exit().remove();var i=n.enter().append("g").classed("callout",!0).attr("role",r.GRAPHICS_SYMBOL+" "+r.GROUP).attr("aria-roledescription","label callout");i.merge(n).datum((function(t){var e=t.xPosition,n=t.yPosition;return t.direction===Y.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+_t.callout.offsetX,y:n-_t.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-_t.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-_t.callout.offsetX,y:n-_t.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+_t.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return Na(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})),i.append("line").classed("horizontal-line",!0).merge(e.selectAll("line.horizontal-line")).datum((function(t){return Na(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}))},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.slice").on("mouseover",(function(e,n){var r=Na(this);r.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(ot.Pie.SLICE_MOUSEOVER,{event:e,element:Na(this),datum:n});var i=t.getOptions().data.groupMapsTo,o=t.getOptions().pie.valueMapsTo;t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{label:n.data[i],value:n.data[o]}]})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.Pie.SLICE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Pie.SLICE_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(ot.Pie.SLICE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.computeRadius=function(){var t=Bd.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height,r=this.getOptions(),i=Math.min(e,n)/2;return r.pie.labels.enabled?i+_t.radiusOffset:i},e}(Ov),uy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e.renderType=k.SVG,e}return n(e,t),e.prototype.getValue=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"value"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getValueRatio=function(){return ka.clamp(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.getOptions();return ka.getProperty(t,"gauge","type")===Q.FULL?1:.5},e.prototype.getArcSize=function(){return this.getArcRatio()*Math.PI*2},e.prototype.getStartAngle=function(){var t=this.getArcSize();return t===2*Math.PI?0:-t/2},e.prototype.getArrow=function(t){var e=this.getOptions();switch(ka.getProperty(e,"gauge","deltaArrow","direction")){case $.UP:return"4,10 8,6 12,10";case $.DOWN:return"12,6 8,10 4,6";default:return t>0?"4,10 8,6 12,10":"12,6 8,10 4,6"}},e.prototype.render=function(t){var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),i=this.getOptions(),o=this.getValue(),a=this.getValueRatio(),s=this.getArcSize(),u=this.getStartAngle(),l=u+a*s,c=u+s,h=this.computeRadius(),f=this.getInnerRadius();this.backgroundArc=Qh().innerRadius(f).outerRadius(h).startAngle(l).endAngle(c),this.arc=Qh().innerRadius(f).outerRadius(h).startAngle(u).endAngle(l),Bd.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var d=n.selectAll("path.arc-foreground").data([o]);d.enter().append("path").merge(d).attr("class",this.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).style("fill",(function(t){return ka.getProperty(e.getOptions(),"color","scale","value")})).attr("d",this.arc).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),this.drawValueNumber(),this.drawDelta(),d.exit().remove();var p=ka.getProperty(i,"gauge","alignment"),g=Bd.getSVGElementSize(this.getParent(),{useAttr:!0}).width,v=h;p===H.CENTER?v=g/2:p===H.RIGHT&&(v=g-h),n.attr("x",v).attr("y",h),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getComponentContainer(),e=this.getOptions(),n=ka.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=ka.getProperty(e,"gauge","valueFontSize"),s=ka.getProperty(e,"gauge","deltaFontSize"),u=ka.getProperty(e,"gauge","numberSpacing"),l=ka.getProperty(e,"gauge","showPercentageSymbol"),c=0;n!==Q.FULL||i?n===Q.SEMI&&i&&(c=-(s(o)+u)):c=s(o);var h=Bd.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),f=a(o),d=Bd.appendOrSelect(h,"g.gauge-value-number"),p=ka.getProperty(e,"gauge","numberFormatter"),g=d.selectAll("text.gauge-value-number").data([r]);g.enter().append("text").attr("class","gauge-value-number").merge(g).style("font-size",f+"px").attr("text-anchor","middle").text((function(t){return p(t)}));var v=Bd.getSVGElementSize(Bd.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width,m=f/2,y=l?"%":"",b=Bd.appendOrSelect(d,"text.gauge-value-symbol").style("font-size",m+"px").attr("x",v/2).text(y),_=Bd.getSVGElementSize(b,{useBBox:!0}),x=_.width,w=_.height;b.attr("y","-"+w/2+"px"),d.attr("transform","translate(-"+x/2+", 0)")},e.prototype.drawDelta=function(){var t=this,e=this.getComponentContainer(),n=this.getOptions(),r=this.getDelta(),i=this.computeRadius(),o=r?ka.getProperty(n,"gauge","deltaFontSize"):function(){return 0},a=r?ka.getProperty(n,"gauge","numberFormatter"):function(){return null},s=ka.getProperty(n,"gauge","deltaArrow","size"),u=ka.getProperty(n,"gauge","numberSpacing"),l=ka.getProperty(n,"gauge","showPercentageSymbol"),c=Bd.appendOrSelect(e,"g.gauge-numbers"),h=Bd.appendOrSelect(c,"g.gauge-delta").attr("transform","translate(0, "+(o(i)+u)+")"),f=Bd.appendOrSelect(h,"text.gauge-delta-number"),d=l?"%":"";f.data(null===r?[]:[r]),f.enter().append("text").classed("gauge-delta-number",!0).merge(f).attr("text-anchor","middle").style("font-size",o(i)+"px").text((function(t){return""+a(t)+d}));var p=Bd.getSVGElementSize(Bd.appendOrSelect(e,".gauge-delta-number"),{useBBox:!0}).width,g=ka.getProperty(n,"gauge","deltaArrow","enabled"),v=h.selectAll("svg.gauge-delta-arrow").data(null!==r&&g?[r]:[]);v.enter().append("svg").merge(v).attr("class","gauge-delta-arrow").attr("x",-s(i)-p/2).attr("y",-s(i)/2-.35*o(i)).attr("width",s(i)).attr("height",s(i)).attr("viewBox","0 0 16 16").each((function(){var e=Na(this);Bd.appendOrSelect(e,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var i=ka.getProperty(n,"gauge","status");Bd.appendOrSelect(e,"polygon.gauge-delta-arrow").attr("class",null!==i?"gauge-delta-arrow status--"+i:"").attr("points",t.getArrow(r))})),v.exit().remove(),f.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-ka.getProperty(this.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e,n){t.services.events.dispatchEvent(ot.Gauge.ARC_MOUSEOVER,{event:e,element:Na(this),datum:n})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.Gauge.ARC_MOUSEMOVE,{event:e,element:r,datum:n})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Gauge.ARC_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.Gauge.ARC_MOUSEOUT,{event:e,element:r,datum:n})}))},e.prototype.computeRadius=function(){var t=this.getOptions(),e=ka.getProperty(t,"gauge","type"),n=Bd.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===Q.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Ov),ly=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(e){var n=this;void 0===e&&(e=!0),t.prototype.render.call(this,e);var r=this;if(this.model.isDataEmpty())this.getComponentContainer().select("g.center").remove();else{var i=Bd.appendOrSelect(this.getComponentContainer(),"g.center"),o=this.getOptions(),a=this.computeRadius(),s=ka.getProperty(o,"donut","center","label");Bd.appendOrSelect(i,"text.donut-figure").attr("text-anchor","middle").style("dominant-baseline",(function(){return null===s||""===s?"central":"initial"})).style("font-size",(function(){return o.donut.center.numberFontSize(a)})).transition().call((function(t){return n.services.transitions.setupTransition({transition:t,name:"donut-figure-enter-update",animate:e})})).tween("text",(function(){return r.centerNumberTween(Na(this))})),null!==s&&""!==s&&Bd.appendOrSelect(i,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return o.donut.center.titleFontSize(a)})).attr("y",o.donut.center.titleYPosition(a)).text(s)}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.getOptions(),n=ka.getProperty(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,n){return t+n[e.pie.valueMapsTo]}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?ju:Bu)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(sy),cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton",e}return n(e,t),e.prototype.render=function(){var t=ka.getProperty(this.getOptions(),"data","loading");t?this.renderSkeleton(t):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===Z.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===Z.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===Z.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==Z.DONUT)throw new Error('"'+this.configs.skeleton+'" is not a valid Skeleton type.');this.renderDonutSkeleton(t)}},e.prototype.renderGridSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.renderVertOrHorizSkeleton=function(t){var e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===V.VERTICAL&&this.drawYGrid(t),e===V.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")},e.prototype.renderPieSkeleton=function(t){var e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.renderDonutSkeleton=function(t){var e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")},e.prototype.setScales=function(){var t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=Ol().domain([0,1]).range(t),this.yScale=Ol().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=Bd.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;this.backdrop=Bd.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",r).attr("height",i);var o=Bd.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var a=this.xScale.range(),s=a[0],u=(a[1],this.yScale.range()),l=(u[0],u[1]);this.backdrop.merge(o).attr("x",s).attr("y",l),o.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("width"),n=ka.getProperty(this.getOptions(),"grid","x","numberOfTicks"),r=this.xScale.ticks(n).map((function(t){return t*e})),i=Bd.appendOrSelect(this.backdrop,"g.x.skeleton"),o=i.selectAll("line").data(r);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2","100%"),i.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=ka.getProperty(this.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=Bd.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawRing=function(t,e,n){void 0===n&&(n=!0);var r=this.parent,i=Bd.getSVGElementSize(r,{useAttrs:!0}),o=i.width,a=i.height,s=Bd.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=0===e?"pie":"donut",l=ka.getProperty(this.getOptions(),u,"alignment");Bd.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none");var c=Qh().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(_t.radiusOffset),f=t+(Math.min(o,a)-2*t)/2,d=Bd.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+h+", "+f+")").attr("d",c).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n),p=t+_t.xOffset;l===H.CENTER?p=o/2:l===H.RIGHT&&(p=o-t-_t.xOffset);var g=t+_t.yOffset;d.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=Bd.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+_t.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=Bd.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=Bd.appendOrSelect(e,"defs").lower(),o=Bd.appendOrSelect(i,"linearGradient").attr("id",t).attr("x1",0-3*.2*n).attr("x2",r).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)");o.html('\n\t\t\t<stop class="stop-bg-shimmer" offset="0"></stop>\n\t\t\t<stop class="stop-shimmer" offset="0.2"></stop>\n\t\t\t<stop class="stop-bg-shimmer" offset="0.4"></stop>\n\t\t'),function t(){o.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(st).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Ov),hy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="skeleton-lines",e}return n(e,t),e.prototype.render=function(){var e=ka.getProperty(this.getOptions(),"data","loading"),n=!(ka.getProperty(this.getOptions(),"grid","x","enabled")||ka.getProperty(this.getOptions(),"grid","y","enabled")||ka.getProperty(this.getOptions(),"axes","bottom","visible")||ka.getProperty(this.getOptions(),"axes","left","visible"));e&&!n?t.prototype.renderGridSkeleton.call(this,e):e&&n?this.renderSparklineSkeleton(e):this.removeSkeleton()},e.prototype.renderSparklineSkeleton=function(t){this.setScales(),this.drawBackdrop(t),this.drawSparkline(t),this.updateBackdropStyle(),t&&this.setShimmerEffect("shimmer-lines")},e.prototype.drawSparkline=function(t){var e=this.backdrop.attr("width"),n=Bd.appendOrSelect(this.backdrop,"g.y.skeleton"),r=n.selectAll("line").data([100]);r.enter().append("line").merge(r).attr("x1",0).attr("x2",e).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),n.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.updateBackdropStyle=function(){var t=this.parent;this.backdrop=Bd.appendOrSelect(t,"svg.chart-skeleton.DAII");var e=Bd.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");e.classed("shimmer-effect-lines",!1),e.classed("shimmer-effect-sparkline",!0)},e}(cy);function fy(t,e){return t.parent===e.parent?1:2}function dy(t,e){return t+e.x}function py(t,e){return Math.max(t,e.y)}function gy(){var t=fy,e=1,n=1,r=!1;function i(i){var o,a=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(dy,0)/t.length}(n),e.y=function(t){return 1+t.reduce(py,0)}(n)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),u=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),l=s.x-t(s,u)/2,c=u.x+t(u,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-l)/(c-l)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function vy(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 my(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=by)):void 0===e&&(e=yy);for(var n,r,i,o,a,s=new wy(t),u=[s];n=u.pop();)if((i=e(n.data))&&(a=(i=Array.from(i)).length))for(n.children=i,o=a-1;o>=0;--o)u.push(r=i[o]=new wy(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(xy)}function yy(t){return t.children}function by(t){return Array.isArray(t)?t[1]:null}function _y(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function xy(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function wy(t){this.data=t,this.depth=this.height=0,this.parent=null}function Oy(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(Array.from(t))).length,o=[];r<i;)e=t[r],n&&Sy(n,e)?++r:(n=Cy(o=Ey(o,e)),r=0);return n}function Ey(t,e){var n,r;if(My(e,t))return[e];for(n=0;n<t.length;++n)if(Ty(e,t[n])&&My(Ay(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(Ty(Ay(t[n],t[r]),e)&&Ty(Ay(t[n],e),t[r])&&Ty(Ay(t[r],e),t[n])&&My(Py(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function Ty(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function Sy(t,e){var n=t.r-e.r+1e-9*Math.max(t.r,e.r,1),r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function My(t,e){for(var n=0;n<e.length;++n)if(!Sy(t,e[n]))return!1;return!0}function Cy(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return Ay(t[0],t[1]);case 3:return Py(t[0],t[1],t[2])}var e}function Ay(t,e){var n=t.x,r=t.y,i=t.r,o=e.x,a=e.y,s=e.r,u=o-n,l=a-r,c=s-i,h=Math.sqrt(u*u+l*l);return{x:(n+o+u/h*c)/2,y:(r+a+l/h*c)/2,r:(h+i+s)/2}}function Py(t,e,n){var r=t.x,i=t.y,o=t.r,a=e.x,s=e.y,u=e.r,l=n.x,c=n.y,h=n.r,f=r-a,d=r-l,p=i-s,g=i-c,v=u-o,m=h-o,y=r*r+i*i-o*o,b=y-a*a-s*s+u*u,_=y-l*l-c*c+h*h,x=d*p-f*g,w=(p*_-g*b)/(2*x)-r,O=(g*v-p*m)/x,E=(d*b-f*_)/(2*x)-i,T=(f*m-d*v)/x,S=O*O+T*T-1,M=2*(o+w*O+E*T),C=w*w+E*E-o*o,A=-(S?(M+Math.sqrt(M*M-4*S*C))/(2*S):C/M);return{x:r+w+O*A,y:i+E+T*A,r:A}}function Ly(t,e,n){var r,i,o,a,s=t.x-e.x,u=t.y-e.y,l=s*s+u*u;l?(i=e.r+n.r,i*=i,a=t.r+n.r,i>(a*=a)?(r=(l+a-i)/(2*l),o=Math.sqrt(Math.max(0,a/l-r*r)),n.x=t.x-r*s-o*u,n.y=t.y-r*u+o*s):(r=(l+i-a)/(2*l),o=Math.sqrt(Math.max(0,i/l-r*r)),n.x=e.x+r*s-o*u,n.y=e.y+r*u+o*s)):(n.x=e.x+n.r,n.y=e.y)}function ky(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Dy(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,o=(e.y*n.r+n.y*e.r)/r;return i*i+o*o}function Ry(t){this._=t,this.next=null,this.previous=null}function Iy(t){if(!(i=(t=function(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}(t)).length))return 0;var e,n,r,i,o,a,s,u,l,c,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;Ly(n,e,r=t[2]),e=new Ry(e),n=new Ry(n),r=new Ry(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){Ly(e._,n._,r=t[s]),r=new Ry(r),u=n.next,l=e.previous,c=n._.r,h=e._.r;do{if(c<=h){if(ky(u._,r._)){n=u,e.next=n,n.previous=e,--s;continue t}c+=u._.r,u=u.next}else{if(ky(l._,r._)){(e=l).next=n,n.previous=e,--s;continue t}h+=l._.r,l=l.previous}}while(u!==l.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,o=Dy(e);(r=r.next)!==n;)(a=Dy(r))<o&&(e=r,o=a);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=Oy(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}function Ny(t){return null==t?null:By(t)}function By(t){if("function"!=typeof t)throw new Error;return t}function Vy(){return 0}function Uy(t){return function(){return t}}function Gy(t){return Math.sqrt(t.value)}function Hy(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function zy(t,e){return function(n){if(r=n.children){var r,i,o,a=r.length,s=t(n)*e||0;if(s)for(i=0;i<a;++i)r[i].r+=s;if(o=Iy(r),s)for(i=0;i<a;++i)r[i].r-=s;n.r=o+s}}}function jy(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}function Fy(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 Wy(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 qy(t,e){return t.parent===e.parent?1:2}function Yy(t){var e=t.children;return e?e[0]:t.t}function Zy(t){var e=t.children;return e?e[e.length-1]:t.t}function Xy(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Ky(t,e,n){return t.a.parent===e.parent?t.a:n}function Qy(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function $y(){var t=qy,e=1,n=1,r=null;function i(i){var u=function(t){for(var e,n,r,i,o,a=new Qy(t,0),s=[a];e=s.pop();)if(r=e._.children)for(e.children=new Array(o=r.length),i=o-1;i>=0;--i)s.push(n=e.children[i]=new Qy(r[i],i)),n.parent=e;return(a.parent=new Qy(null,0)).children=[a],a}(i);if(u.eachAfter(o),u.parent.m=-u.z,u.eachBefore(a),r)i.eachBefore(s);else{var l=i,c=i,h=i;i.eachBefore((function(t){t.x<l.x&&(l=t),t.x>c.x&&(c=t),t.depth>h.depth&&(h=t)}));var f=l===c?1:t(l,c)/2,d=f-l.x,p=e/(c.x+f+d),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function o(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,o=i.length;--o>=0;)(e=i[o]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,u=o.parent.children[0],l=o.m,c=a.m,h=s.m,f=u.m;s=Zy(s),o=Yy(o),s&&o;)u=Yy(u),(a=Zy(a)).a=e,(i=s.z+h-o.z-l+t(s._,o._))>0&&(Xy(Ky(s,e,r),e,i),l+=i,c+=i),h+=s.m,l+=o.m,f+=u.m,c+=a.m;s&&!Zy(a)&&(a.t=s,a.m+=h-c),o&&!Yy(u)&&(u.t=o,u.m+=l-f,r=e)}return r}(e,i,e.parent.A||r[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i}function Jy(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}wy.prototype=my.prototype={constructor:wy,count:function(){return this.eachAfter(vy)},each:function(t,e){let n=-1;for(const r of this)t.call(e,r,++n,this);return this},eachAfter:function(t,e){for(var n,r,i,o=this,a=[o],s=[],u=-1;o=a.pop();)if(s.push(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r]);for(;o=s.pop();)t.call(e,o,++u,this);return this},eachBefore:function(t,e){for(var n,r,i=this,o=[i],a=-1;i=o.pop();)if(t.call(e,i,++a,this),n=i.children)for(r=n.length-1;r>=0;--r)o.push(n[r]);return this},find:function(t,e){let n=-1;for(const r of this)if(t.call(e,r,++n,this))return r},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(){return Array.from(this)},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 my(this).eachBefore(_y)},[Symbol.iterator]:function*(){var t,e,n,r,i=this,o=[i];do{for(t=o.reverse(),o=[];i=t.pop();)if(yield i,e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n])}while(o.length)}},Qy.prototype=Object.create(wy.prototype);var tb=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,b=0,_=0,x=y.length,w=e.value;b<x;){u=i-n,l=o-r;do{c=y[_++].value}while(!c&&_<x);for(h=f=c,v=c*c*(g=Math.max(l/u,u/l)/(w*t)),p=Math.max(f/v,v/h);_<x;++_){if(c+=s=y[_].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?Wy(a,n,r,i,w?r+=l*c/w:o):Jy(a,n,r,w?n+=u*c/w:i,o),w-=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);var eb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="tree",e.renderType=k.SVG,e}return n(e,t),e.prototype.getLongestLabel=function(t){var e=this,n="";return t.forEach((function(t){var r=t.children?e.getLongestLabel(t.children):"";(r.length>n.length||t.name.length>n.length)&&(n=r.length>t.name.length?r:t.name)})),n},e.prototype.getMockLabelWidth=function(t,e){var n=t.append("text").attr("dy","0.31em").attr("x",0).attr("text-anchor","end").text(e),r=Bd.getSVGElementSize(n.node(),{useBBox:!0}).width;return n.remove(),r},e.prototype.render=function(t){var e=this,n=this.getComponentContainer();n.html("");var r=Bd.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getOptions(),s=this.model.getDisplayData(),u=ka.getProperty(a,"tree","rootTitle")||"Tree",l=this.getMockLabelWidth(n,u),c=this.getLongestLabel(s),h=this.getMockLabelWidth(n,c),f=0,d=l>0?l+6:24,p=my({name:u,children:s}),g=i/6,v=function(t){var r=p.descendants().reverse(),o=p.links(),a=p,s=p;p.eachBefore((function(t){t.x<a.x&&(a=t),t.x>s.x&&(s=t)}));var u=s.x-a.x,l=n.transition().call((function(t){return e.services.transitions.setupTransition({transition:t,name:"tree-update-viewbox",animate:!0})})).attr("viewBox",[-d,a.x,i,u]),c=w.selectAll("g").data(r,(function(t){return t.id})),h=e,f=c.enter().append("g").attr("transform",(function(){return"translate("+t.y0+","+t.x0+")"})).attr("class",(function(t){return 0!==t.depth&&t.children&&t.children.length>0?"clickable":null})).on("mouseover",(function(t,e){h.services.events.dispatchEvent(ot.Tree.NODE_MOUSEOVER,{event:t,element:Na(this),datum:e})})).on("click",(function(t,e){0!==e.depth&&(e.children=e.children?null:e._children,v(e)),h.services.events.dispatchEvent(ot.Tree.NODE_CLICK,{event:t,element:Na(this),datum:e})})).on("mouseout",(function(t,e){h.services.events.dispatchEvent(ot.Tree.NODE_MOUSEOUT,{event:t,element:Na(this),datum:e})}));f.append("circle").attr("r",2.5).attr("class",(function(t){return t._children?"parent":"child"})).attr("stroke-width",10),f.append("text").attr("dy","0.31em").attr("x",(function(t){return t._children?-6:6})).attr("text-anchor",(function(t){return t._children?"end":"start"})).text((function(t){return t.data.name})).clone(!0).attr("class","text-stroke").lower(),c.merge(f).transition(l).attr("transform",(function(t){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",1).attr("stroke-opacity",1),c.exit().transition(l).remove().attr("transform",(function(){return"translate("+t.y+","+t.x+")"})).attr("fill-opacity",0).attr("stroke-opacity",0);var g=x.selectAll("path").data(o,(function(t){return t.target.id})),m=g.enter().append("path").attr("d",(function(e){var n={x:t.x0,y:t.y0};return _({source:n,target:n})}));g.merge(m).transition(l).attr("d",_),g.exit().transition(l).remove().attr("d",(function(){var e={x:t.x,y:t.y};return _({source:e,target:e})})),p.eachBefore((function(t){t.x0=t.x,t.y0=t.y}))},m=p.descendants(),y=m[m.length-1].depth,b=ka.getProperty(a,"tree","type")===j.DENDROGRAM?gy().size([o,i-h-6*y-l]):$y().nodeSize([10,g]).size([o,i-h-6*y-l]),_=vf().x((function(t){return t.y})).y((function(t){return t.x}));p.x0=g/2,p.y0=0,p.descendants().forEach((function(t,e){t.id=e,t._children=t.children})),b(p),n.attr("viewBox",[-d,-f,i,10]).style("user-select","none");var x=n.append("g").attr("class","links"),w=n.append("g").attr("class","nodes");v(p)}},e}(Ov),nb={black:{100:"#000000"},blue:{10:"#edf5ff",20:"#d0e2ff",30:"#a6c8ff",40:"#78a9ff",50:"#4589ff",60:"#0f62fe",70:"#0043ce",80:"#002d9c",90:"#001d6c",100:"#001141"},coolGray:{10:"#f2f4f8",20:"#dde1e6",30:"#c1c7cd",40:"#a2a9b0",50:"#878d96",60:"#697077",70:"#4d5358",80:"#343a3f",90:"#21272a",100:"#121619"},cyan:{10:"#e5f6ff",20:"#bae6ff",30:"#82cfff",40:"#33b1ff",50:"#1192e8",60:"#0072c3",70:"#00539a",80:"#003a6d",90:"#012749",100:"#061727"},gray:{10:"#f4f4f4",20:"#e0e0e0",30:"#c6c6c6",40:"#a8a8a8",50:"#8d8d8d",60:"#6f6f6f",70:"#525252",80:"#393939",90:"#262626",100:"#161616"},green:{10:"#defbe6",20:"#a7f0ba",30:"#6fdc8c",40:"#42be65",50:"#24a148",60:"#198038",70:"#0e6027",80:"#044317",90:"#022d0d",100:"#071908"},magenta:{10:"#fff0f7",20:"#ffd6e8",30:"#ffafd2",40:"#ff7eb6",50:"#ee5396",60:"#d02670",70:"#9f1853",80:"#740937",90:"#510224",100:"#2a0a18"},orange:{10:"#fff2e8",20:"#ffd9be",30:"#ffb784",40:"#ff832b",50:"#eb6200",60:"#ba4e00",70:"#8a3800",80:"#5e2900",90:"#3e1a00",100:"#231000"},purple:{10:"#f6f2ff",20:"#e8daff",30:"#d4bbff",40:"#be95ff",50:"#a56eff",60:"#8a3ffc",70:"#6929c4",80:"#491d8b",90:"#31135e",100:"#1c0f30"},red:{10:"#fff1f1",20:"#ffd7d9",30:"#ffb3b8",40:"#ff8389",50:"#fa4d56",60:"#da1e28",70:"#a2191f",80:"#750e13",90:"#520408",100:"#2d0709"},teal:{10:"#d9fbfb",20:"#9ef0f0",30:"#3ddbd9",40:"#08bdba",50:"#009d9a",60:"#007d79",70:"#005d5d",80:"#004144",90:"#022b30",100:"#081a1c"},warmGray:{10:"#f7f3f2",20:"#e5e0df",30:"#cac5c4",40:"#ada8a8",50:"#8f8b8b",60:"#726e6e",70:"#565151",80:"#3c3838",90:"#272525",100:"#171414"},white:{0:"#ffffff"},yellow:{10:"#fcf4d6",20:"#fddc69",30:"#f1c21b",40:"#d2a106",50:"#b28600",60:"#8e6a00",70:"#684e00",80:"#483700",90:"#302400",100:"#1c1500"}},rb=function(){var t,e=Na(this.parentNode).select("rect.leaf"),n=vu(getComputedStyle(e.node(),null).getPropertyValue("fill"));if(n&&(t=function(t){if(!t)return null;for(var e=0,n=Object.keys(nb);e<n.length;e++)for(var r=n[e],i=nb[r],o=0,a=Object.keys(i);o<a.length;o++){var s=a[o];if(i[s]===t)return s}return null}(n?n.hex():null)),null==t){var r=Mu(n).l;t=Math.abs(100*r-100)}return t>50?"white":"black"},ib=0,ob=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="treemap",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("legend-hover-treemap")).attr("opacity",(function(t){return t.parent.data.name===n.datum().name?1:.3}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g[data-name='leaf']").transition(e.services.transitions.getTransition("legend-mouseout-treemap")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),r=this.model.getData(),i=this.model.getDisplayData(),o=this.model.getOptions(),a=ka.getProperty(window,"location"),s=Bd.getSVGElementSize(n,{useAttrs:!0}),u=s.width,l=s.height,c=my({name:o.title||"Treemap",children:i}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),h=(Xs(r,(function(t){return Xs(t.children,(function(t){return t.value}))})),function(){var t=tb,e=!1,n=1,r=1,i=[0],o=Vy,a=Vy,s=Vy,u=Vy,l=Vy;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Fy),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=By(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:Uy(+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:Uy(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Uy(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Uy(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:Uy(+t),c):l},c}().size([u,l]).paddingInner(1).paddingOuter(0).round(!0)(c)),f=(this.services.transitions,n.selectAll("g[data-name='leaf']").data(h.leaves(),(function(t){return t.data.name})));f.exit().attr("opacity",0).remove();var d=f.enter().append("g").attr("data-name","leaf").attr("data-uid",(function(){return ib++})).merge(f);d.attr("data-name","leaf").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-group-update",animate:t})})).attr("transform",(function(t){return"translate("+t.x0+","+t.y0+")"}));var p=d.selectAll("rect.leaf").data((function(t){return[t]}));p.exit().attr("width",0).attr("height",0).remove(),p.enter().append("rect").classed("leaf",!0).merge(p).attr("width",0).attr("height",0).attr("id",(function(){var t=Na(this.parentNode).attr("data-uid");return o.style.prefix+"-leaf-"+t})).attr("class",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t.data.name,originalClassName:"leaf"})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"treemap-leaf-update-enter",animate:t})})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).style("fill",(function(t){for(;t.depth>1;)t=t.parent;return e.model.getFillColor(t.data.name)})),d.selectAll("clipPath").data((function(t){return!0!==t.data.showLabel?[]:[1]}),(function(t){return t})).join((function(t){t.append("clipPath").attr("id",(function(){var t=Na(this.parentNode).attr("data-uid");return o.style.prefix+"-clip-"+t})).append("use").attr("xlink:href",(function(){var t=Na(this.parentNode.parentNode).attr("data-uid"),e=o.style.prefix+"-leaf-"+t;return new URL("#"+e,a)+""}))}),(function(t){return null}),(function(t){return t.remove()})),d.selectAll("text").data((function(t){if(!0!==t.data.showLabel)return[];for(var n=t;n.depth>1;)n=n.parent;var r=Mu(e.model.getFillColor(n.data.name));return[{text:t.data.name,color:r.l<.5?"white":"black"}]}),(function(t){return t})).join((function(t){var e=t.append("text").text((function(t){return t.text})).style("fill",rb).attr("x",7).attr("y",18);a&&e.attr("clip-path",(function(){var t=Na(this.parentNode).attr("data-uid"),e=o.style.prefix+"-clip-"+t;return"url("+new URL("#"+e,a)+")"}))}),(function(t){return t.text((function(t){return t.text})).style("fill",rb)}),(function(t){return t.remove()})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("rect.leaf").on("mouseover",(function(e,n){for(var r=Na(this),i=getComputedStyle(this,null).getPropertyValue("fill"),o=n;o.depth>1;)o=o.parent;r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).style("fill",(function(e){var n=t.model.getFillColor(e.parent.data.name);return n&&(i=n),vu(i).darker(.7).toString()})),t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:e,hoveredElement:r,items:[{color:i,label:o.data.name,bold:!0},{label:n.data.name,value:n.data.value}]}),t.services.events.dispatchEvent(ot.Treemap.LEAF_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.Treemap.LEAF_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Treemap.LEAF_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1);for(var i=n;i.depth>1;)i=i.parent;r.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).style("fill",(function(e){return t.model.getFillColor(e.parent.data.name)})),t.services.events.dispatchEvent(ot.Treemap.LEAF_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:r})}))},e}(Ov);function ab(t){var e,n=(ub(t)%(e=360)+e)%e;return sb(n,[0,10])||sb(n,[350,0])?{textAnchor:X.START,dominantBaseline:K.MIDDLE}:sb(n,[10,80])?{textAnchor:X.START,dominantBaseline:K.HANGING}:sb(n,[80,100])?{textAnchor:X.MIDDLE,dominantBaseline:K.HANGING}:sb(n,[100,170])?{textAnchor:X.END,dominantBaseline:K.HANGING}:sb(n,[170,190])?{textAnchor:X.END,dominantBaseline:K.MIDDLE}:sb(n,[190,260])?{textAnchor:X.END,dominantBaseline:K.BASELINE}:sb(n,[260,280])?{textAnchor:X.MIDDLE,dominantBaseline:K.BASELINE}:{textAnchor:X.START,dominantBaseline:K.BASELINE}}function sb(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function ub(t){return t*(180/Math.PI)}function lb(t,e,n){return void 0===n&&(n={x:0,y:0}),{x:e*Math.cos(t)+n.x,y:e*Math.sin(t)+n.y}}var cb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.renderType=k.SVG,e.getLabelDimensions=function(t){var n=Bd.appendOrSelect(e.getComponentContainer(),"g.tmp-tick"),r=Bd.appendOrSelect(n,"text").text(t),i=Bd.getSVGElementSize(r.node(),{useBBox:!0}),o=i.width,a=i.height;return n.remove(),{width:o,height:a}},e.normalizeFlatData=function(t){var n=e.getOptions(),r=ka.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=ka.getProperty(n,"data","groupMapsTo"),s=ka.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[a]=e,n[o]=null,n}))})));return ka.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.getOptions(),r=ka.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=ka.getProperty(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[a]=n,e[i]=t,e[o]=null,e}));return{name:n,data:ka.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?xt.opacity.unselected:xt.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?xt.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",xt.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer(),i=Bd.getSVGElementSize(n,{useAttrs:!0}),o=i.width,a=i.height,s=this.model.getData(),u=this.model.getGroupedData(),l=this.getOptions(),c=ka.getProperty(l,"radar","axes"),h=c.angle,f=c.value,d=ka.getProperty(l,"data","groupMapsTo"),p=xt.xLabelPadding,g=xt.yLabelPadding,v=xt.yTicksNumber,m=xt.minRange,y=xt.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[h]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[d]})))),this.fullDataNormalized=this.normalizeFlatData(s),this.groupedDataNormalized=this.normalizeGroupedData(u);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+g),_=(Math.min(o,a)-b)/2;if(!(_<=0)){var x=Js().domain(this.fullDataNormalized.map((function(t){return t[h]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),w=Ws(this.fullDataNormalized.map((function(t){return t[f]}))),O=Ol().domain([w>=0?0:w,Fs(this.fullDataNormalized.map((function(t){return t[f]})))]).range([m,_]).nice(v),E=O.ticks(v),T=function(t){return e.model.getFillColor(t)},S=ff().angle((function(t){return x(t[h])+Math.PI/2})).radius((function(t){return O(t[f])})).curve(zf),M={x:Fs(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=x(t),_*Math.sin(n-Math.PI/2))})))+p,y:a/2},C=Bd.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(E,(function(t){return t})),A=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[h]=e,n[f]=t,n}))};C.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+M.x+", "+M.y+")").attr("fill","none").call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return S(A(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_update",t)).attr("opacity",1).attr("transform","translate("+M.x+", "+M.y+")").attr("d",(function(t){return S(A(t))}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_exit",t)).attr("d",(function(t){return S(A(t))})).attr("opacity",0).remove()}))})),Bd.appendOrSelect(n,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+ka.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return lb(x(t),0,M).x})).attr("y1",(function(t){return lb(x(t),0,M).y})).attr("x2",(function(t){return lb(x(t),0,M).x})).attr("y2",(function(t){return lb(x(t),0,M).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return lb(x(t),O.range()[0],M).x})).attr("y1",(function(t){return lb(x(t),O.range()[0],M).y})).attr("x2",(function(t){return lb(x(t),O.range()[1],M).x})).attr("y2",(function(t){return lb(x(t),O.range()[1],M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_update",t)).attr("opacity",1).attr("x1",(function(t){return lb(x(t),O.range()[0],M).x})).attr("y1",(function(t){return lb(x(t),O.range()[0],M).y})).attr("x2",(function(t){return lb(x(t),O.range()[1],M).x})).attr("y2",(function(t){return lb(x(t),O.range()[1],M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),Bd.appendOrSelect(n,"g.x-labels").attr("role",r.GROUP).selectAll("text").data(this.uniqueKeys).join((function(n){return n.append("text").text((function(t){return t})).attr("opacity",0).attr("x",(function(t){return lb(x(t),O.range()[1]+p,M).x})).attr("y",(function(t){return lb(x(t),O.range()[1]+p,M).y})).style("text-anchor",(function(t){return ab(x(t)).textAnchor})).style("dominant-baseline",(function(t){return ab(x(t)).dominantBaseline})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_update",t)).attr("opacity",1).attr("x",(function(t){return lb(x(t),O.range()[1]+p,M).x})).attr("y",(function(t){return lb(x(t),O.range()[1]+p,M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),Bd.appendOrSelect(n,"g.blobs").attr("role",r.GROUP).selectAll("path").data(this.groupedDataNormalized,(function(t){return t.name})).join((function(n){return n.append("path").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL,R.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform",t?function(){return"translate("+M.x+", "+M.y+") scale("+(1+.35*Math.random())+")"}:"translate("+M.x+", "+M.y+")").style("fill",(function(t){return T(t.name)})).style("fill-opacity",xt.opacity.selected).style("stroke",(function(t){return T(t.name)})).call((function(n){var r=n.transition(e.services.transitions.getTransition("radar_blobs_enter",t));t&&r.delay((function(){return 30*Math.random()})).attr("transform","translate("+M.x+", "+M.y+")"),r.attr("opacity",1).attr("d",(function(t){return S(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL,R.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).style("fill",(function(t){return T(t.name)})).style("stroke",(function(t){return T(t.name)})),n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+M.x+", "+M.y+")").attr("d",(function(t){return S(t.data)}))}))}),(function(n){return n.call((function(n){var r=n.transition(e.services.transitions.getTransition("radar_blobs_exit",t));t&&r.delay((function(){return 30*Math.random()})).attr("transform",(function(){return"translate("+M.x+", "+M.y+") scale("+(1+.35*Math.random())+")"})),r.attr("opacity",0).remove()}))})),Bd.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.fullDataNormalized.filter((function(t){return null!==ka.getProperty(t,f)}))).join((function(t){return t.append("circle").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t[d],originalClassName:ka.kebabCase(t[h])})})).attr("cx",(function(t){return lb(x(t[h]),O(t[f]),M).x})).attr("cy",(function(t){return lb(x(t[h]),O(t[f]),M).y})).attr("r",0).attr("opacity",0).style("fill",(function(t){return T(t[d])})),Bd.appendOrSelect(n,"g.x-axes-rect").attr("role",r.GROUP).selectAll("rect").data(this.uniqueKeys).join((function(t){return t.append("rect").attr("role",r.GRAPHICS_SYMBOL)}),(function(t){return t}),(function(t){return t.remove()})).attr("x",M.x).attr("y",M.y-y/2).attr("width",O.range()[1]).attr("height",y).style("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+ub(x(t))+", "+M.x+", "+M.y+")"})),Bd.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(As(E)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return lb(-Math.PI/2,O(t),M).x+g})).attr("y",(function(t){return lb(-Math.PI/2,O(t),M).y})).style("text-anchor","start").style("dominant-baseline","middle").call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_enter",t)).attr("opacity",1)}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_update",t)).text((function(t){return t})).attr("opacity",1).attr("x",(function(t){return lb(-Math.PI/2,O(t),M).x+g})).attr("y",(function(t){return lb(-Math.PI/2,O(t),M).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_labels_exit",t)).attr("opacity",0).remove()}))}));var P=ka.getProperty(l,"radar","alignment"),L=this.getAlignmentXOffset(P,n,this.getParent());n.attr("x",L),this.addEventListeners()}},e.prototype.getAlignmentXOffset=function(t,e,n){var r=Bd.getSVGElementSize(e,{useBBox:!0}),i=Bd.getSVGElementSize(n,{useAttr:!0}).width,o=0;return t===H.CENTER?o=Math.floor((i-r.width)/2):t===H.RIGHT&&(o=i-r.width),o},e.prototype.destroy=function(){this.parent.selectAll(".x-axes-rect > rect").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=ka.getProperty(this.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n,r){var i=Na(this);t.services.events.dispatchEvent(ot.Radar.X_AXIS_MOUSEOVER,{event:n,element:i,datum:r});var o=t.parent.select(".x-axes .x-axis-"+ka.kebabCase(r)),a=t.parent.selectAll(".dots circle."+ka.kebabCase(r));o.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",xt.dotsRadius);var s=t.fullDataNormalized.filter((function(t){return t[e]===r})),u=t.getOptions(),l=u.data.groupMapsTo,c=ka.getProperty(u,"radar","axes","value");t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:n,hoveredElement:i,items:s.filter((function(t){return"number"==typeof t[c]})).map((function(e){return{label:e[l],value:e[c],color:t.model.getFillColor(e[l]),class:t.model.getColorClassName({classNameTypes:[R.TOOLTIP],dataGroupName:e[l]})}}))})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.Radar.X_AXIS_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("click",(function(e,n){t.services.events.dispatchEvent(ot.Radar.X_AXIS_CLICK,{event:e,element:Na(this),datum:n})})).on("mouseout",(function(e,n){var r=Na(this),i=t.parent.select(".x-axes .x-axis-"+ka.kebabCase(n)),o=t.parent.selectAll(".dots circle."+ka.kebabCase(n));i.classed("hovered",!1).attr("stroke-dasharray","0"),o.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(ot.Radar.X_AXIS_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.HIDE)}))},e}(Ov),hb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="circle-pack",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("circle.node").transition(e.services.transitions.getTransition("legend-hover-circlepack")).attr("opacity",(function(t){return t.data.dataGroupName===n.datum().name?1:dt.circles.fillOpacity}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.node").transition(e.services.transitions.getTransition("legend-mouseout-circlepack")).attr("opacity",1)},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getComponentContainer({withinChartClip:!0}),r=Bd.getSVGElementSize(this.parent,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getDisplayData(),s=this.model.hasParentNode(),u=this.model.getHierarchyLevel(),l=this.getOptions(),c=ka.getProperty(l,"canvasZoom","enabled");s&&ka.getProperty(a,0,"children")&&(a=ka.getProperty(a,0,"children"));var h=my({children:a}).sum((function(t){return t.value})).sort((function(t,e){return e.value-t.value})),f=function(){var t=null,e=1,n=1,r=Vy;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Hy(t)).eachAfter(zy(r,.5)).eachBefore(jy(1)):i.eachBefore(Hy(Gy)).eachAfter(zy(Vy,1)).eachAfter(zy(r,i.r/Math.min(e,n))).eachBefore(jy(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Ny(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Uy(+t),i):r},i}().size([i,o]).padding((function(t){return t.depth>=1?dt.padding.children+3:dt.padding.mainGroup+3}))(h).descendants().splice(1).filter((function(t){return t.depth<=u})),d=n.selectAll("circle.node").data(f);d.exit().attr("width",0).attr("height",0).remove();var p=d.enter().append("circle").classed("node",!0);p.merge(d).attr("class",(function(t){var n=c&&3===u?e.getZoomClass(t):"";return e.model.getColorClassName({classNameTypes:[R.FILL,R.STROKE],dataGroupName:t.data.dataGroupName,originalClassName:t.children?"node "+n:"node node-leaf "+n})})).style("fill",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)})).attr("cx",(function(t){return t.x})).attr("cy",(function(t){return t.y})).transition(this.services.transitions.getTransition("circlepack-leaf-update-enter",t)).attr("r",(function(t){return t.r})).attr("opacity",1).attr("fill-opacity",dt.circles.fillOpacity),!0===c&&this.focal&&(this.services.canvasZoom.zoomIn(this.focal,p,ft),this.setBackgroundListeners()),s||this.addLegendListeners(),this.addEventListeners()}},e.prototype.unhighlightChildren=function(t){var e=this,n=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return n.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",(function(t){return e.model.getFillColor(t.data.dataGroupName)}))},e.prototype.highlightChildren=function(t){var e=t.map((function(t){return t.data}));this.parent.selectAll("circle.node").filter((function(t){return e.some((function(e){return e===t.data}))&&t.depth>1})).style("stroke",dt.circles.hover.stroke)},e.prototype.getZoomClass=function(t){return 3===this.model.getHierarchyLevel()&&this.focal&&(t.data===this.focal.data||this.focal.children.some((function(e){return e.data===t.data})))?"focal":"non-focal"},e.prototype.addLegendListeners=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.removeBackgroundListeners=function(){Na(this.services.domUtils.getMainContainer()).on("click",(function(){return null}))},e.prototype.setBackgroundListeners=function(){var t=Na(this.services.domUtils.getMainContainer()),e=this,n=this.parent.selectAll("circle.node"),r=ka.getProperty(Ts,"canvasZoomSettings");t.on("click",(function(){e.focal=null,e.model.updateHierarchyLevel(2),t.classed("zoomed-in",!1),e.services.canvasZoom.zoomOut(n,r)}))},e.prototype.getZoomIcon=function(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 10 10">\n\t\t\t<polygon points="5.93 3.71 4.45 3.71 4.45 2.23 3.71 2.23 3.71 3.71 2.23 3.71 2.23 4.45 3.71 4.45 3.71 5.93 4.45 5.93 4.45 4.45 5.93 4.45 5.93 3.71"/>\n\t\t\t<path d="M7.2,6.67a4,4,0,0,0,1-2.59A4.08,4.08,0,1,0,4.07,8.15h0a4,4,0,0,0,2.59-1L9.48,10,10,9.48Zm-3.12.77A3.34,3.34,0,1,1,7.41,4.08,3.34,3.34,0,0,1,4.08,7.44Z"/>\n\t\t</svg>'},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("circle.node").on("mouseover",(function(e,n){var r=Na(this);r.classed("hovered",!0);var i=t.model.getHierarchyLevel(),o=i>2&&!r.classed("focal"),a=ka.getProperty(t.model.getOptions(),"canvasZoom","enabled"),s=!1;if(!o){var u=[],l=[],c=null;if(n.children)n.depth>1&&a&&(s=!0,r.classed("clickable",!0)),u=n.children.map((function(e){if(null!==e)return"number"==typeof e.data.value?{label:e.data.name,value:e.data.value}:{label:e.data.name,labelIcon:a&&i<=2?t.getZoomIcon():null,value:e.value}})),l=[{label:Nn(t.model.getOptions(),"tooltip.totalLabel")||"Total",value:n.value,bold:!0}],t.highlightChildren(n.children);else c=n.value;var h=getComputedStyle(this,null).getPropertyValue("fill");t.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:e,hoveredElement:r,items:L([{color:h,label:n.data.name,labelIcon:s&&a&&i<=2?t.getZoomIcon():null,value:c}],u,l)})}t.services.events.dispatchEvent(ot.CirclePack.CIRCLE_MOUSEOVER,{event:e,element:r,datum:n})})).on("mousemove",(function(e,n){var r=Na(this);t.services.events.dispatchEvent(ot.CirclePack.CIRCLE_MOUSEMOVE,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:e})})).on("mouseout",(function(e,n){var r=Na(this);r.classed("hovered",!1),n.children&&t.unhighlightChildren(n.children),t.services.events.dispatchEvent(ot.CirclePack.CIRCLE_MOUSEOUT,{event:e,element:r,datum:n}),t.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:r})})).on("click",(function(e,n){var r=Na(this),i=r.classed("non-focal");if(ka.getProperty(t.getOptions(),"canvasZoom","enabled")&&t.model.getHierarchyLevel()>2){var o=t.parent.selectAll("circle.node");Na(t.services.domUtils.getMainContainer()).classed("zoomed-in",!1),t.focal=null,t.model.updateHierarchyLevel(2),t.services.canvasZoom.zoomOut(o,ft)}else if(2===n.depth&&n.children&&!i){o=t.parent.selectAll("circle.node");Na(t.services.domUtils.getMainContainer()).classed("zoomed-in",!0),t.focal=n,t.model.updateHierarchyLevel(3),t.services.canvasZoom.zoomIn(n,o,ft),e.stopPropagation()}t.services.events.dispatchEvent(ot.CirclePack.CIRCLE_CLICK,{event:e,element:r,datum:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle.node").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null);var t=this.services.events;t.removeEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.removeBackgroundListeners()},e}(Ov),fb={value:function(){}};function db(){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 pb(r)}function pb(t){this._=t}function gb(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 vb(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function mb(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=fb,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}pb.prototype=db.prototype={constructor:pb,on:function(t,e){var n,r=this._,i=gb(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]=mb(r[n],t.name,e);else if(null==e)for(n in r)r[n]=mb(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=vb(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new pb(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 yb=Object.freeze({__proto__:null,dispatch:db}).dispatch,bb=Math.PI/180,_b=function(){var t=[256,256],e=xb,n=wb,r=Eb,i=Ob,o=Ob,a=Tb,s=Sb,u=Pb,l=[],c=1/0,h=yb("word","end"),f=null,d=Math.random,p={},g=Lb;function v(e,n,r){t[0],t[1];for(var i,o,a,s,l,c=n.x,h=n.y,f=Math.sqrt(t[0]*t[0]+t[1]*t[1]),p=u(t),g=d()<.5?1:-1,v=-g;(i=p(v+=g))&&(o=~~i[0],a=~~i[1],!(Math.min(Math.abs(o),Math.abs(a))>=f));)if(n.x=c+o,n.y=h+a,!(n.x+n.x0<0||n.y+n.y0<0||n.x+n.x1>t[0]||n.y+n.y1>t[1]||r&&Cb(n,e,t[0])||r&&(l=r,!((s=n).x+s.x1>l[0].x&&s.x+s.x0<l[1].x&&s.y+s.y1>l[0].y&&s.y+s.y0<l[1].y)))){for(var m,y=n.sprite,b=n.width>>5,_=t[0]>>5,x=n.x-(b<<4),w=127&x,O=32-w,E=n.y1-n.y0,T=(n.y+n.y0)*_+(x>>5),S=0;S<E;S++){m=0;for(var M=0;M<=b;M++)e[T+M]|=m<<O|(M<b?(m=y[S*b+M])>>>w:0);T+=_}return delete n.sprite,!0}return!1}return p.canvas=function(t){return arguments.length?(g=kb(t),p):g},p.start=function(){var u=function(t){t.width=t.height=1;var e=Math.sqrt(t.getContext("2d").getImageData(0,0,1,1).data.length>>2);t.width=2048/e,t.height=2048/e;var n=t.getContext("2d");return n.fillStyle=n.strokeStyle="red",n.textAlign="center",{context:n,ratio:e}}(g()),m=function(t){var e=[],n=-1;for(;++n<t;)e[n]=0;return e}((t[0]>>5)*t[1]),y=null,b=l.length,_=-1,x=[],w=l.map((function(t,u){return t.text=e.call(this,t,u),t.font=n.call(this,t,u),t.style=i.call(this,t,u),t.weight=o.call(this,t,u),t.rotate=a.call(this,t,u),t.size=~~r.call(this,t,u),t.padding=s.call(this,t,u),t})).sort((function(t,e){return e.size-t.size}));return f&&clearInterval(f),f=setInterval(O,0),O(),p;function O(){for(var e=Date.now();Date.now()-e<c&&++_<b&&f;){var n=w[_];n.x=t[0]*(d()+.5)>>1,n.y=t[1]*(d()+.5)>>1,Mb(u,n,w,_),n.hasText&&v(m,n,y)&&(x.push(n),h.call("word",p,n),y?Ab(y,n):y=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=t[0]>>1,n.y-=t[1]>>1)}_>=b&&(p.stop(),h.call("end",p,x,y))}},p.stop=function(){return f&&(clearInterval(f),f=null),p},p.timeInterval=function(t){return arguments.length?(c=null==t?1/0:t,p):c},p.words=function(t){return arguments.length?(l=t,p):l},p.size=function(e){return arguments.length?(t=[+e[0],+e[1]],p):t},p.font=function(t){return arguments.length?(n=kb(t),p):n},p.fontStyle=function(t){return arguments.length?(i=kb(t),p):i},p.fontWeight=function(t){return arguments.length?(o=kb(t),p):o},p.rotate=function(t){return arguments.length?(a=kb(t),p):a},p.text=function(t){return arguments.length?(e=kb(t),p):e},p.spiral=function(t){return arguments.length?(u=Db[t]||t,p):u},p.fontSize=function(t){return arguments.length?(r=kb(t),p):r},p.padding=function(t){return arguments.length?(s=kb(t),p):s},p.random=function(t){return arguments.length?(d=t,p):d},p.on=function(){var t=h.on.apply(h,arguments);return t===h?p:t},p};function xb(t){return t.text}function wb(){return"serif"}function Ob(){return"normal"}function Eb(t){return Math.sqrt(t.value)}function Tb(){return 30*(~~(6*Math.random())-3)}function Sb(){return 1}function Mb(t,e,n,r){if(!e.sprite){var i=t.context,o=t.ratio;i.clearRect(0,0,2048/o,2048/o);var a=0,s=0,u=0,l=n.length;for(--r;++r<l;){e=n[r],i.save(),i.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;var c=i.measureText(e.text+"m").width*o,h=e.size<<1;if(e.rotate){var f=Math.sin(e.rotate*bb),d=Math.cos(e.rotate*bb),p=c*d,g=c*f,v=h*d,m=h*f;c=Math.max(Math.abs(p+m),Math.abs(p-m))+31>>5<<5,h=~~Math.max(Math.abs(g+v),Math.abs(g-v))}else c=c+31>>5<<5;if(h>u&&(u=h),a+c>=2048&&(a=0,s+=u,u=0),s+h>=2048)break;i.translate((a+(c>>1))/o,(s+(h>>1))/o),e.rotate&&i.rotate(e.rotate*bb),i.fillText(e.text,0,0),e.padding&&(i.lineWidth=2*e.padding,i.strokeText(e.text,0,0)),i.restore(),e.width=c,e.height=h,e.xoff=a,e.yoff=s,e.x1=c>>1,e.y1=h>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,a+=c}for(var y=i.getImageData(0,0,2048/o,2048/o).data,b=[];--r>=0;)if((e=n[r]).hasText){for(var _=(c=e.width)>>5,x=(h=e.y1-e.y0,0);x<h*_;x++)b[x]=0;if(null==(a=e.xoff))return;s=e.yoff;for(var w=0,O=-1,E=0;E<h;E++){for(x=0;x<c;x++){var T=_*E+(x>>5),S=y[2048*(s+E)+(a+x)<<2]?1<<31-x%32:0;b[T]|=S,w|=S}w?O=E:(e.y0++,h--,E--,s++)}e.y1=e.y0+O,e.sprite=b.slice(0,(e.y1-e.y0)*_)}}}function Cb(t,e,n){n>>=5;for(var r,i=t.sprite,o=t.width>>5,a=t.x-(o<<4),s=127&a,u=32-s,l=t.y1-t.y0,c=(t.y+t.y0)*n+(a>>5),h=0;h<l;h++){r=0;for(var f=0;f<=o;f++)if((r<<u|(f<o?(r=i[h*o+f])>>>s:0))&e[c+f])return!0;c+=n}return!1}function Ab(t,e){var n=t[0],r=t[1];e.x+e.x0<n.x&&(n.x=e.x+e.x0),e.y+e.y0<n.y&&(n.y=e.y+e.y0),e.x+e.x1>r.x&&(r.x=e.x+e.x1),e.y+e.y1>r.y&&(r.y=e.y+e.y1)}function Pb(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function Lb(){return document.createElement("canvas")}function kb(t){return"function"==typeof t?t:function(){return t}}var Db={archimedean:Pb,rectangular:function(t){var e=4*t[0]/t[1],n=0,r=0;return function(t){var i=t<0?-1:1;switch(Math.sqrt(1+4*i*t)-i&3){case 0:n+=e;break;case 1:r+=4;break;case 2:n-=e;break;default:r-=4}return[n,r]}}},Rb=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="wordcloud",e.renderType=k.SVG,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.getOptions().data.groupMapsTo;e.parent.selectAll("text.word").transition(e.services.transitions.getTransition("legend-hover-wordcloud")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("text.word").transition(e.services.transitions.getTransition("legend-mouseout-wordcloud")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(ot.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(ot.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getComponentContainer().attr("width","100%").attr("height","100%"),r=this.model.getDisplayData(),i=this.getFontSizeScale(r),o=this.getOptions(),a=o.wordCloud,s=a.fontSizeMapsTo,u=a.wordMapsTo,l=o.data.groupMapsTo,c=Bd.getSVGElementSize(n,{useAttrs:!0}),h=c.width,f=c.height;if(0!==h&&0!==f){var d=_b().size([h,f]).words(r.map((function(t){var e;return(e={})[l]=t[l],e.text=t[u],e.size=t[s],e.value=t[s],e}))).padding(5).rotate(0).fontSize((function(t){return i(t.size)})).on("end",(function(r){var i=Bd.appendOrSelect(n,"g.words");i.attr("transform","translate("+d.size()[0]/2+", "+d.size()[1]/2+")");var o=i.selectAll("text").data(r,(function(t){return t[l]+"-"+t.text}));o.exit().attr("opacity",0).remove(),o.enter().append("text").attr("opacity",0).merge(o).style("font-size",(function(t){return t.size+"px"})).text((function(t){return t.text})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t[l],originalClassName:"word "+(t.size>32?"light":"")})})).style("fill",(function(t){return e.model.getFillColor(t[l],t.text,t)})).attr("text-anchor","middle").transition(e.services.transitions.getTransition("wordcloud-text-update-enter",t)).attr("transform",(function(t){return"translate("+t.x+", "+t.y+")"})).attr("opacity",1)}));d.start(),this.addEventListeners()}},e.prototype.getFontSizeScale=function(t){var e=this.getOptions(),n=e.wordCloud.fontSizeMapsTo,r=t.map((function(t){return t[n]})).filter((function(t){return t})),i=Bd.getHTMLElementSize(this.services.domUtils.getMainContainer()),o=r.length>0,a=o?As(r):[1,1];return Ol().domain(a).range(o?e.wordCloud.fontSizeRange(i,t):[4,4])},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=ka.debounce((function(t){var e=r.parent.selectAll("text.word").transition(r.services.transitions.getTransition("wordcloud-word-mouse-highlight"));null===t?e.attr("opacity",1):e.attr("opacity",(function(){return t===this?1:.3}))}),6),r=this;this.parent.selectAll("text.word").on("mouseover",(function(i,o){n(this),r.services.events.dispatchEvent(ot.WordCloud.WORD_MOUSEOVER,{event:i,element:Na(this),datum:o}),r.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:i,hoveredElement:this,items:[{label:t.tooltip.wordLabel,value:o.text},{label:t.tooltip.valueLabel,value:o.value},{label:t.tooltip.groupLabel,value:o[e],class:r.model.getColorClassName({classNameTypes:[R.TOOLTIP],dataGroupName:o[e]})}]})})).on("mousemove",(function(t,e){var n=Na(this);r.services.events.dispatchEvent(ot.WordCloud.WORD_MOUSEMOVE,{element:n,datum:e}),r.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){r.services.events.dispatchEvent(ot.WordCloud.WORD_CLICK,{event:t,element:Na(this),datum:e})})).on("mouseout",(function(t,e){var i=Na(this);n(null),r.services.events.dispatchEvent(ot.WordCloud.WORD_MOUSEOUT,{event:t,element:i,datum:e}),r.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:i})}))},e}(Ov);function Ib(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n<i||void 0===n&&i>=i)&&(n=i)}return n}function Nb(t,e){let n=0;if(void 0===e)for(let e of t)(e=+e)&&(n+=e);else{let r=-1;for(let i of t)(i=+e(i,++r,t))&&(n+=i)}return n}function Bb(t,e){return t.sourceLinks.length?t.depth:e-1}function Vb(t){return function(){return t}}function Ub(t,e){return Hb(t.source,e.source)||t.index-e.index}function Gb(t,e){return Hb(t.target,e.target)||t.index-e.index}function Hb(t,e){return t.y0-e.y0}function zb(t){return t.value}function jb(t){return t.index}function Fb(t){return t.nodes}function Wb(t){return t.links}function qb(t,e){const n=t.get(e);if(!n)throw new Error("missing: "+e);return n}function Yb({nodes:t}){for(const e of t){let t=e.y0,n=t;for(const n of e.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(const t of e.targetLinks)t.y1=n+t.width/2,n+=t.width}}function Zb(){let t,e,n,r=0,i=0,o=1,a=1,s=24,u=8,l=jb,c=Bb,h=Fb,f=Wb,d=6;function p(){const t={nodes:h.apply(null,arguments),links:f.apply(null,arguments)};return g(t),v(t),m(t),y(t),b(t),Yb(t),t}function g({nodes:t,links:e}){for(const[e,n]of t.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];const r=new Map(t.map((e,n)=>[l(e,n,t),e]));for(const[t,n]of e.entries()){n.index=t;let{source:e,target:i}=n;"object"!=typeof e&&(e=n.source=qb(r,e)),"object"!=typeof i&&(i=n.target=qb(r,i)),e.sourceLinks.push(n),i.targetLinks.push(n)}if(null!=n)for(const{sourceLinks:e,targetLinks:r}of t)e.sort(n),r.sort(n)}function v({nodes:t}){for(const e of t)e.value=void 0===e.fixedValue?Math.max(Nb(e.sourceLinks,zb),Nb(e.targetLinks,zb)):e.fixedValue}function m({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.depth=i;for(const{target:e}of t.sourceLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function y({nodes:t}){const e=t.length;let n=new Set(t),r=new Set,i=0;for(;n.size;){for(const t of n){t.height=i;for(const{source:e}of t.targetLinks)r.add(e)}if(++i>e)throw new Error("circular link");n=r,r=new Set}}function b(n){const l=function({nodes:t}){const n=Ib(t,t=>t.depth)+1,i=(o-r-s)/(n-1),a=new Array(n);for(const e of t){const t=Math.max(0,Math.min(n-1,Math.floor(c.call(null,e,n))));e.layer=t,e.x0=r+t*i,e.x1=e.x0+s,a[t]?a[t].push(e):a[t]=[e]}if(e)for(const t of a)t.sort(e);return a}(n);t=Math.min(u,(a-i)/(Ib(l,t=>t.length)-1)),function(e){const n=function(t,e){let n;if(void 0===e)for(const e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(n>i||void 0===n&&i>=i)&&(n=i)}return n}(e,e=>(a-i-(e.length-1)*t)/Nb(e,zb));for(const r of e){let e=i;for(const i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+t;for(const t of i.sourceLinks)t.width=t.value*n}e=(a-e+t)/(r.length+1);for(let t=0;t<r.length;++t){const n=r[t];n.y0+=e*(t+1),n.y1+=e*(t+1)}S(r)}}(l);for(let t=0;t<d;++t){const e=Math.pow(.99,t),n=Math.max(1-e,(t+1)/d);x(l,e,n),_(l,e,n)}}function _(t,n,r){for(let i=1,o=t.length;i<o;++i){const o=t[i];for(const t of o){let e=0,r=0;for(const{source:n,value:i}of t.targetLinks){let o=i*(t.layer-n.layer);e+=M(n,t)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,T(t)}void 0===e&&o.sort(Hb),w(o,r)}}function x(t,n,r){for(let i=t.length-2;i>=0;--i){const o=t[i];for(const t of o){let e=0,r=0;for(const{target:n,value:i}of t.sourceLinks){let o=i*(n.layer-t.layer);e+=C(t,n)*o,r+=o}if(!(r>0))continue;let i=(e/r-t.y0)*n;t.y0+=i,t.y1+=i,T(t)}void 0===e&&o.sort(Hb),w(o,r)}}function w(e,n){const r=e.length>>1,o=e[r];E(e,o.y0-t,r-1,n),O(e,o.y1+t,r+1,n),E(e,a,e.length-1,n),O(e,i,0,n)}function O(e,n,r,i){for(;r<e.length;++r){const o=e[r],a=(n-o.y0)*i;a>1e-6&&(o.y0+=a,o.y1+=a),n=o.y1+t}}function E(e,n,r,i){for(;r>=0;--r){const o=e[r],a=(o.y1-n)*i;a>1e-6&&(o.y0-=a,o.y1-=a),n=o.y0-t}}function T({sourceLinks:t,targetLinks:e}){if(void 0===n){for(const{source:{sourceLinks:t}}of e)t.sort(Gb);for(const{target:{targetLinks:e}}of t)e.sort(Ub)}}function S(t){if(void 0===n)for(const{sourceLinks:e,targetLinks:n}of t)e.sort(Gb),n.sort(Ub)}function M(e,n){let r=e.y0-(e.sourceLinks.length-1)*t/2;for(const{target:i,width:o}of e.sourceLinks){if(i===n)break;r+=o+t}for(const{source:t,width:i}of n.targetLinks){if(t===e)break;r-=i}return r}function C(e,n){let r=n.y0-(n.targetLinks.length-1)*t/2;for(const{source:i,width:o}of n.targetLinks){if(i===e)break;r+=o+t}for(const{target:t,width:i}of e.sourceLinks){if(t===n)break;r-=i}return r}return p.update=function(t){return Yb(t),t},p.nodeId=function(t){return arguments.length?(l="function"==typeof t?t:Vb(t),p):l},p.nodeAlign=function(t){return arguments.length?(c="function"==typeof t?t:Vb(t),p):c},p.nodeSort=function(t){return arguments.length?(e=t,p):e},p.nodeWidth=function(t){return arguments.length?(s=+t,p):s},p.nodePadding=function(e){return arguments.length?(u=t=+e,p):u},p.nodes=function(t){return arguments.length?(h="function"==typeof t?t:Vb(t),p):h},p.links=function(t){return arguments.length?(f="function"==typeof t?t:Vb(t),p):f},p.linkSort=function(t){return arguments.length?(n=t,p):n},p.size=function(t){return arguments.length?(r=i=0,o=+t[0],a=+t[1],p):[o-r,a-i]},p.extent=function(t){return arguments.length?(r=+t[0][0],o=+t[1][0],i=+t[0][1],a=+t[1][1],p):[[r,i],[o,a]]},p.iterations=function(t){return arguments.length?(d=+t,p):d},p}var Xb=Math.PI,Kb=2*Xb,Qb=Kb-1e-6;function $b(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Jb(){return new $b}function t_(t){return function(){return t}}function e_(t){return t[0]}function n_(t){return t[1]}$b.prototype=Jb.prototype={constructor:$b,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((Xb-Math.acos((p+h-g)/(2*v*m)))/2),b=y/m,_=y/v;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*l)+","+(e+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*d)+","+(this._x1=t+_*s)+","+(this._y1=e+_*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%Kb+Kb),h>Qb?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>=Xb)+","+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 r_=Array.prototype.slice;function i_(t){return t.source}function o_(t){return t.target}function a_(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function s_(){return function(t){var e=i_,n=o_,r=e_,i=n_,o=null;function a(){var a,s=r_.call(arguments),u=e.apply(this,s),l=n.apply(this,s);if(o||(o=a=Jb()),t(o,+r.apply(this,(s[0]=u,s)),+i.apply(this,s),+r.apply(this,(s[0]=l,s)),+i.apply(this,s)),a)return o=null,a+""||null}return a.source=function(t){return arguments.length?(e=t,a):e},a.target=function(t){return arguments.length?(n=t,a):n},a.x=function(t){return arguments.length?(r="function"==typeof t?t:t_(+t),a):r},a.y=function(t){return arguments.length?(i="function"==typeof t?t:t_(+t),a):i},a.context=function(t){return arguments.length?(o=null==t?null:t,a):o},a}(a_)}function u_(t){return[t.source.x1,t.y0]}function l_(t){return[t.target.x0,t.y1]}var c_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="alluvial",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.getComponentContainer({withinChartClip:!0});n.html("");var r=Bd.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;if(!(i<1||o<1)){var a=this.model.getOptions(),s=this.model.getDisplayData(),u=wt.minNodePadding;a.alluvial.nodePadding>wt.minNodePadding&&(u=a.alluvial.nodePadding);var l=Zb().nodeId((function(t){return t.name})).nodeWidth(wt.nodeWidth).nodePadding(u).extent([[2,30],[i-2,o]]);this.graph=l({nodes:a.alluvial.nodes.map((function(t){return Object.assign({},t)})),links:s.map((function(t){return Object.assign({},t)}))}),this.graph.nodes=this.graph.nodes.filter((function(t){return 0!==t.value}));var c={};this.graph.nodes.forEach((function(t){var e,n=t.x0;t.category&&(c[n]=null===(e=t)||void 0===e?void 0:e.category)})),n.append("g").classed("header-arrows",!0).selectAll("g").data(Object.keys(c)).join("g").attr("transform",(function(t){return"translate("+t+", 0)"})).append("text").attr("id",(function(t,e){return"category-"+e})).style("font-size","14px").text((function(t){return c[t]?c[t]:""})).attr("y",20).attr("x",(function(t,e){var n=Bd.getSVGElementSize(Na("text#category-"+e),{useBBox:!0}).width,r=0;return t+r>=n&&(r=4-n),r})),n.append("g").attr("fill","none").selectAll("g").data(this.graph.links).join("path").classed("link",!0).attr("d",s_().source(u_).target(l_)).attr("id",(function(t){return"line-"+t.index})).attr("class",(function(t){return a.alluvial.monochrome?e.model.getColorClassName({classNameTypes:[R.STROKE],dataGroupName:0,originalClassName:"link"}):e.model.getColorClassName({classNameTypes:[R.STROKE],dataGroupName:t.source.index,originalClassName:"link"})})).attr("stroke-width",(function(t){return Math.max(1,t.width)})).style("stroke-opacity",wt.opacity.default).attr("aria-label",(function(t){return t.source.name+" → "+t.target.name+" ("+t.value+(a.alluvial.units?" "+a.alluvial.units:"")+")"}));var h=n.append("g").selectAll("g").data(this.graph.nodes).enter().append("g").attr("id",(function(t){return"node-"+t.index})).classed("node-group",!0).attr("transform",(function(t){return"translate("+t.x0+", "+t.y0+")"}));h.append("rect").classed("node",!0).attr("height",(function(t){return t.y1-t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("fill","black");var f=h.append("g").attr("id",(function(t){return"node-title-"+t.index}));f.append("text").attr("id",(function(t){return"node-text-"+t.index})).attr("class","node-text").style("font-size","12px").attr("text-anchor","start").attr("fill","white").attr("x",4).attr("dy",13).text((function(t){return t.name+" ("+t.value+")"})).attr("aria-label",(function(t){return t.name+" ("+t.value+")"})),f.append("rect").classed("node-text-bg",!0).attr("width",(function(t,e){return Bd.getSVGElementSize(Na("text#node-text-"+e),{useBBox:!0}).width+8})).attr("height",18).attr("stroke-width",2).lower(),f.attr("transform",(function(t,e){var n=Bd.getSVGElementSize(Na("text#node-text-"+e),{useBBox:!0}).width,r=(t.y1-t.y0)/2-9,i=t.x1-t.x0;return t.x1>=n?i-=n+16:i+=4,"translate("+i+", "+r+")"})),this.addLineEventListener(),this.addNodeEventListener()}},e.prototype.addLineEventListener=function(){var t=this.getOptions(),e=this,n=ka.debounce((function(t,n){void 0===n&&(n="mouseover");var r=e.parent.selectAll("path.link").transition(e.services.transitions.getTransition("alluvial-link-mouse-highlight"));"mouseout"===n?(Na(t).lower(),r.style("stroke-opacity",wt.opacity.default)):r.style("stroke-opacity",(function(){return t===this?(Na(this).raise(),wt.opacity.selected):wt.opacity.unfocus}))}),33);this.parent.selectAll("path.link").on("mouseover",(function(r,i){var o=Na(this);n(this,"mouseover"),o.classed("link-hovered",!0);var a=getComputedStyle(this).getPropertyValue("stroke");e.services.events.dispatchEvent(ot.Alluvial.LINE_MOUSEOVER,{event:r,element:o,datum:i}),e.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:r,hoveredElement:o,items:[{label:i.target.name,value:i.value+(t.alluvial.units?" "+t.alluvial.units:""),color:a,labelIcon:e.getRightArrowIcon()}]})})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(ot.Alluvial.LINE_MOUSEMOVE,{event:t,element:Na(this),datum:n}),e.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ot.Alluvial.LINE_CLICK,{event:t,element:Na(this),datum:n})})).on("mouseout",(function(t,r){var i=Na(this);n(this,"mouseout"),i.classed("link-hovered",!1),e.services.events.dispatchEvent(ot.Alluvial.LINE_MOUSEOUT,{event:t,element:i,datum:r}),e.services.events.dispatchEvent(ot.Tooltip.HIDE,{event:t,hoveredElement:i})}))},e.prototype.addNodeEventListener=function(){var t=this,e=this,n=ka.debounce((function(n,r){(void 0===n&&(n=[]),void 0===r&&(r="mouseover"),"mouseout"!==r&&0!==n.length)?e.parent.selectAll("path.link").transition(e.services.transitions.getTransition("alluvial-links-mouse-highlight")).style("stroke-opacity",(function(t){return n.some((function(e){return e===t.index}))?(Na(this).classed("link-hovered",!0).raise(),wt.opacity.selected):wt.opacity.unfocus})):e.parent.selectAll("path.link").classed("link-hovered",!1).data(t.graph.links,(function(t){return t.index})).order().style("stroke-opacity",wt.opacity.default)}),66);e.parent.selectAll(".node-group").on("mouseover",(function(t,r){var i=Na(this),o=[];if(e.traverse({link:"sourceLinks",node:"target"},r,o),e.traverse({link:"targetLinks",node:"source"},r,o),o.length){var a=ka.getTranformOffsets(i.attr("transform"));if(i.attr("transform","translate("+(a.x-2)+", "+a.y+")"),i.classed("node-hovered",!0).selectAll("rect.node").attr("width",8),r.x0-2==0){var s=e.parent.select("g#node-title-"+r.index),u=ka.getTranformOffsets(s.attr("transform"));s.attr("transform","translate("+(u.x+4)+","+u.y+")")}e.parent.select("text#node-text-"+r.index).style("font-weight","bold"),n(o,"mouseover"),e.services.events.dispatchEvent(ot.Alluvial.NODE_MOUSEOVER,{event:t,element:i,datum:r})}})).on("mousemove",(function(t,n){e.services.events.dispatchEvent(ot.Alluvial.NODE_MOUSEMOVE,{event:t,element:Na(this),datum:n}),e.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:t})})).on("click",(function(t,n){e.services.events.dispatchEvent(ot.Alluvial.NODE_CLICK,{event:t,element:Na(this),datum:n})})).on("mouseout",(function(t,r){var i=Na(this),o=ka.getTranformOffsets(i.attr("transform"));if(i.classed("node-hovered",!1).attr("transform","translate("+(o.x+2)+", "+o.y+")").select("rect.node").attr("width",wt.nodeWidth),r.x0-2==0){var a=e.parent.select("g#node-title-"+r.index),s=ka.getTranformOffsets(a.attr("transform"));a.attr("transform","translate("+(s.x-4)+","+s.y+")")}e.parent.select("text#node-text-"+r.index).style("font-weight","normal"),n([],"mouseout"),e.services.events.dispatchEvent(ot.Alluvial.NODE_MOUSEOUT,{event:t,element:i,datum:r}),e.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:i})}))},e.prototype.traverse=function(t,e,n){var r=this;void 0===n&&(n=[]),e[t.link].map((function(e){return n.push(e.index),e[t.node]})).forEach((function(e){return r.traverse(t,e,n)}))},e.prototype.getRightArrowIcon=function(){return'\n\t\t<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32">\n\t\t\t<polygon points="18 6 16.57 7.393 24.15 15 4 15 4 17 24.15 17 16.57 24.573 18 26 28 16 18 6"/>\n\t\t\t<rect data-name="&lt;Transparent Rectangle&gt;" style="fill: none;" width="32" height="32"/>\n\t\t</svg>'},e.prototype.destroy=function(){this.parent.selectAll("path.line,.node-group").on("mouseover",null).on("mousemove",null).on("click",null).on("mouseout",null)},e}(Ov),h_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="spacer",e}return n(e,t),e.prototype.render=function(){this.getComponentContainer().style("width",(this.configs.size||Ot.default.size)+"px").style("height",(this.configs.size||Ot.default.size)+"px").attr("opacity",0)},e}(Ov),f_=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.init(),a}return n(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("div.layout-child-"+this._instanceID).filter((function(t){var e=ka.getProperty(t,"growth");return e===W.PREFERRED||e===W.FIXED})).each((function(t){e+=t.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("div.layout-child-"+this._instanceID).filter((function(t){return ka.getProperty(t,"growth")===W.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=Bd.getHTMLElementSize(n.node()),i=r.width,o=r.height,a=this.configs.direction===F.ROW||this.configs.direction===F.ROW_REVERSE,s=ka.getProperty(this.model.getOptions(),"style","prefix"),u=n.classed(dd.prefix+"--"+s+"--layout-row",this.configs.direction===F.ROW).classed(dd.prefix+"--"+s+"--layout-row-reverse",this.configs.direction===F.ROW_REVERSE).classed(dd.prefix+"--"+s+"--layout-column",this.configs.direction===F.COLUMN).classed(dd.prefix+"--"+s+"--layout-column-reverse",this.configs.direction===F.COLUMN_REVERSE).classed(dd.prefix+"--"+s+"--layout-alignitems-center",this.configs.alignItems===q.CENTER).selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));u.enter().append("div").merge(n.selectAll("div.layout-child-"+this._instanceID)).attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.id})).each((function(e){var n=this;e.components.forEach((function(r){var i=Na(n),o=ka.getProperty(e,"renderType")===k.SVG;r.setParent(o?Bd.appendOrSelect(i,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):i);var a=ka.getProperty(e,"growth");a!==W.PREFERRED&&a!==W.FIXED||r.render(t)}))})),n.selectAll("div.layout-child-"+this._instanceID).style("height",null).style("width",null).each((function(t){var e=ka.getProperty(t,"growth"),n=ka.getProperty(t,"renderType")===k.SVG?Bd.getSVGElementSize(Na(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):Bd.getHTMLElementSize(this);if(e===W.PREFERRED){var r=a?n.width:n.height,s=a?i:o;t.size=r/s*100}})),u.exit().remove(),this.children.filter((function(t){return ka.getProperty(t,"growth")===W.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()}));var l=n.selectAll("div.layout-child-"+this._instanceID).data(this.children,(function(t){return t.id}));a?l.style("width",(function(t){return t.size/100*i+"px"})).style("height","100%"):l.style("height",(function(t){return t.size/100*o+"px"})).style("width","100%"),l.each((function(e,n){e.components.forEach((function(n){ka.getProperty(e,"growth")===W.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}(Ov);function d_(t){return t}function p_(t){return"translate("+t+",0)"}function g_(t){return"translate(0,"+t+")"}function v_(t){return e=>+t(e)}function m_(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}function y_(){return!this.__axis}function b_(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,l=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",h=1===t||3===t?p_:g_;function f(f){var d=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,p=null==i?e.tickFormat?e.tickFormat.apply(e,n):d_:i,g=Math.max(o,0)+s,v=e.range(),m=+v[0]+u,y=+v[v.length-1]+u,b=(e.bandwidth?m_:v_)(e.copy(),u),_=f.selection?f.selection():f,x=_.selectAll(".domain").data([null]),w=_.selectAll(".tick").data(d,e).order(),O=w.exit(),E=w.enter().append("g").attr("class","tick"),T=w.select("line"),S=w.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),w=w.merge(E),T=T.merge(E.append("line").attr("stroke","currentColor").attr(c+"2",l*o)),S=S.merge(E.append("text").attr("fill","currentColor").attr(c,l*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),f!==_&&(x=x.transition(f),w=w.transition(f),T=T.transition(f),S=S.transition(f),O=O.transition(f).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=b(t))?h(t+u):this.getAttribute("transform")})),E.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:b(t))+u)}))),O.remove(),x.attr("d",4===t||2===t?a?"M"+l*a+","+m+"H"+u+"V"+y+"H"+l*a:"M"+u+","+m+"V"+y:a?"M"+m+","+l*a+"V"+u+"H"+y+"V"+l*a:"M"+m+","+u+"H"+y),w.attr("opacity",1).attr("transform",(function(t){return h(b(t)+u)})),T.attr(c+"2",l*o),S.attr(c,l*g).text(p),_.filter(y_).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=b}))}return f.scale=function(t){return arguments.length?(e=t,f):e},f.ticks=function(){return n=Array.from(arguments),f},f.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),f):n.slice()},f.tickValues=function(t){return arguments.length?(r=null==t?null:Array.from(t),f):r&&r.slice()},f.tickFormat=function(t){return arguments.length?(i=t,f):i},f.tickSize=function(t){return arguments.length?(o=a=+t,f):o},f.tickSizeInner=function(t){return arguments.length?(o=+t,f):o},f.tickSizeOuter=function(t){return arguments.length?(a=+t,f):a},f.tickPadding=function(t){return arguments.length?(s=+t,f):s},f.offset=function(t){return arguments.length?(u=+t,f):u},f}function __(t){return b_(1,t)}function x_(t){return b_(2,t)}function w_(t){return b_(3,t)}function O_(t){return b_(4,t)}var E_=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",i.renderType=k.SVG,r&&(i.configs=r),i.margins=i.configs.margins,i}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i,o=this.configs.position,a=this.getOptions(),s=ka.getProperty(a,"axes",o,"visible"),u=this.getComponentContainer(),l=Bd.getSVGElementSize(u,{useAttrs:!0}),c=l.width,h=l.height,f=Bd.appendOrSelect(u,"g.axis."+o);o===I.BOTTOM||o===I.TOP?(n=this.configs.axes[I.LEFT]?this.margins.left:0,i=this.configs.axes[I.RIGHT]?c-this.margins.right:c):(n=h-this.margins.bottom,i=this.margins.top);var d,p=this.services.cartesianScales.getScaleByPosition(o);switch(this.scaleType===U.LABELS||this.scaleType===U.LABELS_RATIO?p.rangeRound([n,i]):p.range([n,i]),o){case I.LEFT:d=O_;break;case I.BOTTOM:d=w_;break;case I.RIGHT:d=x_;break;case I.TOP:d=__}f.attr("aria-label",o+" axis");var g=!f.select("g.ticks").empty(),v=Bd.appendOrSelect(f,"g.ticks");g||(v.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),v.attr("aria-label",o+" ticks"));var m=Bd.appendOrSelect(f,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+o+" ticks"),y=ka.getProperty(a,"axes",o),b=this.scaleType===U.TIME||y.scaleType===U.TIME,_=o===I.LEFT||o===I.RIGHT,x=this.model.get("zoomDomain");if(x&&b&&!_&&p.domain(x),s){var w=ka.getProperty(y,"scaleType"),O=ka.getProperty(a,"data","loading"),E=ka.getProperty(y,"ticks","number"),T=ka.getProperty(y,"ticks","values"),S=ka.getProperty(y,"truncation","type"),M=ka.getProperty(y,"truncation","threshold"),C=ka.getProperty(y,"truncation","numCharacter"),A=null!==E,P=ka.getProperty(a,"timeScale"),L=Bd.appendOrSelect(m,"g.tick"),k=Bd.appendOrSelect(L,"text").text("0"),D=Bd.getSVGElementSize(k.node(),{useBBox:!0}).height;L.remove();var R,N=this.scaleType||y.scaleType||U.LINEAR,V=d(p).tickSizeOuter(0);if(p.ticks){var G=void 0;if(A?G=E:(G=ht.ticks.number,_&&(G=this.getNumberOfFittingTicks(h,D,ht.ticks.verticalSpaceRatio))),1===p.ticks().length&&0===p.ticks()[0]&&(G=0),V.ticks(G),b)if(p.ticks(G).length){var H=ka.getProperty(a,"timeScale","addSpaceOnEdges"),z=ka.getProperty(a,"axes",o,"domain"),j=void 0,F=p.copy();H&&!z&&F.nice(G),j=F.ticks(G),H&&j.length>2&&!z&&(j.splice(j.length-1,1),j.splice(0,1)),V.tickValues(j)}else V.tickValues([])}var W=ka.getProperty(y,"ticks","formatter");if(b){var q=Rm(V.tickValues());R=null===W?function(t,e){return km(t,e,V.tickValues(),q,P)}:function(t,e){var n=km(t,e,V.tickValues(),q,P);return W(t,e,n)}}else null===W?N===U.LINEAR&&(R=function(t){return t.toLocaleString()}):R=W;V.tickFormat(R);var Y,Z=this.services.cartesianScales.getScaleByPosition(o).domain(),X=Z[0],K=Z[1];if(T){if(b)T.forEach((function(t,e){void 0===t.getTime&&(T[e]=new Date(t))})),Y=T.filter((function(t){var e=t.getTime();return e>=new Date(X).getTime()&&e<=new Date(K).getTime()}));else if(w===U.LABELS){var Q=this.services.cartesianScales.getScaleByPosition(o).domain();Y=T.filter((function(t){return Q.includes(t)}))}else Y=T.filter((function(t){return t>=X&&t<=K}));V.tickValues(Y)}switch(o){case I.LEFT:v.attr("transform","translate("+this.margins.left+", 0)");break;case I.BOTTOM:v.attr("transform","translate(0, "+(h-this.margins.bottom)+")");break;case I.RIGHT:v.attr("transform","translate("+(c-this.margins.right)+", 0)");break;case I.TOP:v.attr("transform","translate(0, "+this.margins.top+")")}var $=this.model.isDataEmpty();if(y.title){var J=Bd.appendOrSelect(f,"text.axis-title").html($||O?"":y.title),et=ka.getProperty(y,"titleOrientation");switch(o){case I.LEFT:et===rt.RIGHT?J.attr("transform","rotate(90)").attr("y",0).attr("x",p.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):J.attr("transform","rotate(-90)").attr("y",0).attr("x",-p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case I.BOTTOM:J.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+(h+4)+")").style("text-anchor","middle");break;case I.RIGHT:et===rt.LEFT?J.attr("transform","rotate(-90)").attr("y",c).attr("x",-p.range()[0]/2).style("text-anchor","middle"):J.attr("transform","rotate(90)").attr("y",-c).attr("x",p.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case I.TOP:var nt=Bd.getSVGElementSize(J,{useBBox:!0}).height;J.attr("transform","translate("+(this.margins.left/2+p.range()[1]/2)+", "+nt/2+")").style("text-anchor","middle")}}if(b){var it=Rm(V.tickValues()),ot=P.showDayName,at=v;t&&(v=v.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})}))),v=v.call(V),at.selectAll(".tick").data(V.tickValues(),p).order().select("text").style("font-weight",(function(t,e){return Lm(t,e,V.tickValues(),it,ot)?"bold":"normal"}))}else v=t&&g?v.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"axis-update",animate:t})})).call(V):v.call(V);if(m.call(V),o===I.BOTTOM||o===I.TOP){var st=!1,ut=ka.getProperty(y,"ticks","rotation");if(ut===tt.ALWAYS)st=!0;else if(ut===tt.NEVER)st=!1;else if(!ut||ut===tt.AUTO)if(p.step){var lt=m.selectAll("g.tick text").nodes();st=lt.some((function(t){return Bd.getSVGElementSize(t,{useBBox:!0}).width>=p.step()}))}else{st=!1;var ct,ft=m.append("text").text("A").node().getBBox().width;m.selectAll("g.tick").each((function(){var t=Na(this),e=parseFloat(ka.getProperty(ka.getTranslationValues(this),"tx"));null!==e&&ct+t.text().length*ft*.8>=e&&(st=!0),ct=e}))}st?(A||(V.ticks(this.getNumberOfFittingTicks(c,D,ht.ticks.horizontalSpaceRatio)),m.call(V),v.call(V)),f.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",o===I.TOP?"start":"end")):f.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(O?f.attr("opacity",0):f.attr("opacity",1),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),m.selectAll("g.tick").attr("aria-label",(function(t){return t})),S!==B.NONE&&w===U.LABELS&&!T){var dt=this.services.cartesianScales.getScaleDomain(o);if(dt.length>0){var pt=u.select("g.axis."+o+" g.ticks g.tick").html();f.selectAll("g.ticks g.tick").html(pt),f.selectAll("g.tick text").data(dt).text((function(t){return t.length>M?ka.truncateLabel(t,S,C):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(dt).text((function(t){return t.length>M?ka.truncateLabel(t,S,C):t})),f.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),f.selectAll("g.tick text").data(dt)}}this.addEventListeners()}else v.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getComponentContainer(),e=this.configs.position,n=Bd.appendOrSelect(t,"g.axis."+e),r=this.getOptions(),i=ka.getProperty(r,"axes",e),o=ka.getProperty(i,"scaleType"),a=ka.getProperty(i,"truncation","threshold"),s=(this.scaleType===U.TIME||(i.scaleType,U.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t,e){s.services.events.dispatchEvent(ot.Axis.LABEL_MOUSEOVER,{event:t,element:Na(this),datum:e}),o===U.LABELS&&e.length>a&&s.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:t,hoveredElement:Na(this),content:e})})).on("mousemove",(function(t,e){s.services.events.dispatchEvent(ot.Axis.LABEL_MOUSEMOVE,{event:t,element:Na(this),datum:e}),o===U.LABELS&&e.length>a&&s.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){s.services.events.dispatchEvent(ot.Axis.LABEL_CLICK,{event:t,element:Na(this),datum:e})})).on("mouseout",(function(t,e){s.services.events.dispatchEvent(ot.Axis.LABEL_MOUSEOUT,{event:t,element:Na(this),datum:e}),o===U.LABELS&&s.services.events.dispatchEvent(ot.Tooltip.HIDE)}))},e.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" g.ticks.invisible")},e.prototype.getTitleRef=function(){var t=this.configs.position;return this.getComponentContainer().select("g.axis."+t+" text.axis-title")},e.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return ka.clamp(r,2,ht.ticks.number)},e.prototype.destroy=function(){var t=this.getComponentContainer(),e=this.configs.position;Bd.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Ov),T_=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",e.renderType=k.SVG,e.children={},e.thresholds=[],e.margins={top:0,right:0,bottom:0,left:0},e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n={},r=Object.keys(I),i=ka.getProperty(this.getOptions(),"axes");r.forEach((function(t){i[I[t]]&&(n[I[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=I[t];if(e.configs.axes[n]&&!e.children[n]){var r=new E_(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=Bd.getSVGElementSize(a,{useBBox:!0}),u=s.width,l=s.height;switch(r.getTitleRef().empty()?n=0:(n=Bd.getSVGElementSize(r.getTitleRef(),{useBBox:!0}).height,i!==I.LEFT&&i!==I.RIGHT||(n+=5)),i){case I.TOP:o.top=l+n;break;case I.BOTTOM:o.bottom=l+n;break;case I.LEFT:o.left=u+n;break;case I.RIGHT:o.right=u+n}})),Object.keys(o).some((function(t){return e.margins[t]!==o[t]}))&&(this.margins=Object.assign(this.margins,o),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(ot.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e}(Ov);const S_={capture:!0,passive:!1};function M_(t){t.preventDefault(),t.stopImmediatePropagation()}function C_(t){var e=t.document.documentElement,n=Na(t).on("dragstart.drag",M_,S_);"onselectstart"in e?n.on("selectstart.drag",M_,S_):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function A_(t,e){var n=t.document.documentElement,r=Na(t).on("dragstart.drag",null);e&&(r.on("click.drag",M_,S_),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var P_=t=>()=>t;function L_(t,{sourceEvent:e,target:n,selection:r,mode:i,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:r,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:o}})}function k_(t){t.stopImmediatePropagation()}function D_(t){t.preventDefault(),t.stopImmediatePropagation()}var R_={name:"drag"},I_={name:"space"},N_={name:"handle"},B_={name:"center"};const{abs:V_,max:U_,min:G_}=Math;function H_(t){return[+t[0],+t[1]]}function z_(t){return[H_(t[0]),H_(t[1])]}var j_={name:"x",handles:["w","e"].map(K_),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},F_={name:"y",handles:["n","s"].map(K_),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},W_={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},q_={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Y_={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Z_={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},X_={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function K_(t){return{type:t}}function Q_(t){return!t.ctrlKey&&!t.button}function $_(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function J_(){return navigator.maxTouchPoints||"ontouchstart"in this}function tx(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function ex(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function nx(){return function(t){var e,n=$_,r=Q_,i=J_,o=!0,a=Hd("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([K_("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",W_.overlay).merge(n).each((function(){var t=tx(this).extent;Na(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])})),e.selectAll(".selection").data([K_("selection")]).enter().append("rect").attr("class","selection").attr("cursor",W_.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return W_[t.type]})),e.each(l).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function l(){var t=Na(this),e=tx(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",(function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2})).attr("y",(function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2})).attr("width",(function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s})).attr("height",(function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s}))):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,n){var r=t.__brush.emitter;return!r||n&&r.clean?new h(t,e,n):r}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function f(n){if((!e||n.touches)&&r.apply(this,arguments)){var i,a,s,u,h,f,d,p,g,v,m,y=this,b=n.target.__data__.type,_="selection"===(o&&n.metaKey?b="overlay":b)?R_:o&&n.altKey?B_:N_,x=t===F_?null:Z_[b],w=t===j_?null:X_[b],O=tx(y),E=O.extent,T=O.selection,S=E[0][0],M=E[0][1],C=E[1][0],A=E[1][1],P=0,L=0,k=x&&w&&o&&n.shiftKey,D=Array.from(n.touches||[n],t=>{const e=t.identifier;return(t=Ba(t,y)).point0=t.slice(),t.identifier=e,t});vp(y);var R=c(y,arguments,!0).beforestart();if("overlay"===b){T&&(g=!0);const e=[D[0],D[1]||D[0]];O.selection=T=[[i=t===F_?S:G_(e[0][0],e[1][0]),s=t===j_?M:G_(e[0][1],e[1][1])],[h=t===F_?C:U_(e[0][0],e[1][0]),d=t===j_?A:U_(e[0][1],e[1][1])]],D.length>1&&U(n)}else i=T[0][0],s=T[0][1],h=T[1][0],d=T[1][1];a=i,u=s,f=h,p=d;var I=Na(y).attr("pointer-events","none"),N=I.selectAll(".overlay").attr("cursor",W_[b]);if(n.touches)R.moved=V,R.ended=G;else{var B=Na(n.view).on("mousemove.brush",V,!0).on("mouseup.brush",G,!0);o&&B.on("keydown.brush",H,!0).on("keyup.brush",z,!0),C_(n.view)}l.call(y),R.start(n,_.name)}function V(t){for(const e of t.changedTouches||[t])for(const t of D)t.identifier===e.identifier&&(t.cur=Ba(e,y));if(k&&!v&&!m&&1===D.length){const t=D[0];V_(t.cur[0]-t[0])>V_(t.cur[1]-t[1])?m=!0:v=!0}for(const t of D)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,D_(t),U(t)}function U(t){const e=D[0],n=e.point0;var r;switch(P=e[0]-n[0],L=e[1]-n[1],_){case I_:case R_:x&&(P=U_(S-i,G_(C-h,P)),a=i+P,f=h+P),w&&(L=U_(M-s,G_(A-d,L)),u=s+L,p=d+L);break;case N_:D[1]?(x&&(a=U_(S,G_(C,D[0][0])),f=U_(S,G_(C,D[1][0])),x=1),w&&(u=U_(M,G_(A,D[0][1])),p=U_(M,G_(A,D[1][1])),w=1)):(x<0?(P=U_(S-i,G_(C-i,P)),a=i+P,f=h):x>0&&(P=U_(S-h,G_(C-h,P)),a=i,f=h+P),w<0?(L=U_(M-s,G_(A-s,L)),u=s+L,p=d):w>0&&(L=U_(M-d,G_(A-d,L)),u=s,p=d+L));break;case B_:x&&(a=U_(S,G_(C,i-P*x)),f=U_(S,G_(C,h+P*x))),w&&(u=U_(M,G_(A,s-L*w)),p=U_(M,G_(A,d+L*w)))}f<a&&(x*=-1,r=i,i=h,h=r,r=a,a=f,f=r,b in q_&&N.attr("cursor",W_[b=q_[b]])),p<u&&(w*=-1,r=s,s=d,d=r,r=u,u=p,p=r,b in Y_&&N.attr("cursor",W_[b=Y_[b]])),O.selection&&(T=O.selection),v&&(a=T[0][0],f=T[1][0]),m&&(u=T[0][1],p=T[1][1]),T[0][0]===a&&T[0][1]===u&&T[1][0]===f&&T[1][1]===p||(O.selection=[[a,u],[f,p]],l.call(y),R.brush(t,_.name))}function G(t){if(k_(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else A_(t.view,g),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);I.attr("pointer-events","all"),N.attr("cursor",W_.overlay),O.selection&&(T=O.selection),ex(T)&&(O.selection=null,l.call(y)),R.end(t,_.name)}function H(t){switch(t.keyCode){case 16:k=x&&w;break;case 18:_===N_&&(x&&(h=f-P*x,i=a+P*x),w&&(d=p-L*w,s=u+L*w),_=B_,U(t));break;case 32:_!==N_&&_!==B_||(x<0?h=f-P:x>0&&(i=a-P),w<0?d=p-L:w>0&&(s=u-L),_=I_,N.attr("cursor",W_.selection),U(t));break;default:return}D_(t)}function z(t){switch(t.keyCode){case 16:k&&(v=m=k=!1,U(t));break;case 18:_===B_&&(x<0?h=f:x>0&&(i=a),w<0?d=p:w>0&&(s=u),_=N_,U(t));break;case 32:_===I_&&(t.altKey?(x&&(h=f-P*x,i=a+P*x),w&&(d=p-L*w,s=u+L*w),_=B_):(x<0?h=f:x>0&&(i=a),w<0?d=p:w>0&&(s=u),_=N_),N.attr("cursor",W_[b]),U(t));break;default:return}D_(t)}}function d(t){c(this,arguments).moved(t)}function p(t){c(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=z_(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n,r){e.tween?e.on("start.brush",(function(t){c(this,arguments).beforestart().start(t)})).on("interrupt.brush end.brush",(function(t){c(this,arguments).end(t)})).tween("brush",(function(){var e=this,r=e.__brush,i=c(e,arguments),o=r.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=zu(o,a);function u(t){r.selection=1===t&&null===a?null:s(t),l.call(e),i.brush()}return null!==o&&null!==a?u:u(1)})):e.each((function(){var e=this,i=arguments,o=e.__brush,a=t.input("function"==typeof n?n.apply(e,i):n,o.extent),s=c(e,i).beforestart();vp(e),o.selection=null===a?null:a,l.call(e),s.start(r).brush(r).end(r)}))},u.clear=function(t,e){u.move(t,null,e)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,r){var i=Na(this.that).datum();a.call(e,this.that,new L_(e,{sourceEvent:n,target:u,selection:t.output(this.state.selection),mode:r,dispatch:a}),i)}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:P_(z_(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:P_(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:P_(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(o=!!t,u):o},u.on=function(){var t=a.on.apply(a,arguments);return t===a?u:t},u}(j_)}var rx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",e.renderType=k.SVG,e.selectionSelector="rect.selection",e.frontSelectionSelector="rect.frontSelection",e}return n(e,t),e.prototype.render=function(t){var n=this,r=this.parent,i=this.getComponentContainer(),o=Bd.appendOrSelect(r,"svg.chart-grid-backdrop"),a=Bd.appendOrSelect(o,"g."+this.type),s=Bd.appendOrSelect(a,this.selectionSelector),u=Bd.getSVGElementSize(o,{useAttrs:!0}),l=u.width,c=u.height,h=this.services.cartesianScales,f=h.getMainXScaleType(),d=h.getMainXScale(),p=d.range(),g=p[0];p[1];i.attr("transform","translate("+g+",0)");var v=Bd.appendOrSelect(i,this.frontSelectionSelector);if(d&&f===U.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain())&&this.model.set({zoomDomain:m},{animate:!1});var y=function(t,e){var r=Th().range([0,l]).domain(m),i=[r.invert(t),r.invert(e)];i[0].valueOf()===i[1].valueOf()&&(i=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===i[0].valueOf()&&m[1].valueOf()===i[1].valueOf()||n.services.zoom.handleDomainChange(i)},b=nx().extent([[0,0],[l-1,c]]).on("start brush end",(function(t){var n=t.selection;null!==n&&n[0]!==n[1]&&(v.attr("x",parseFloat(s.attr("x"))+parseFloat(o.attr("x"))).attr("y",s.attr("y")).attr("width",s.attr("width")).attr("height",s.attr("height")).style("cursor","pointer").style("display",null),function(t){for(var n=t[1]-t[0],r="0,"+n.toString(),i=Math.floor(c/e.DASH_LENGTH),o=i*e.DASH_LENGTH,a=0;a<i;a++)r+=","+e.DASH_LENGTH;r+=","+(c-o),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+c.toString(),v.attr("stroke-dasharray",r)}(n))})).on("end.brushed",(function(t){var e=t.selection;null!==e&&(y(e[0],e[1]),a.call(b.move,null),v.style("display","none"))}));a.call(b);var _=this.services.zoom.getZoomRatio();o.on("click",(function(t){if(t.shiftKey){var e=this.services.domUtils.getHolder(),n=Ba(a.node(),e)[0],r=n-l*_/2;r<0&&(r=0);var i=n+l*_/2;i>l&&(i=l),y(r,i)}}))}},e.DASH_LENGTH=4,e}(Ov),ix=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=ka.getProperty(this.getOptions(),"grid","x","enabled"),n=ka.getProperty(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),(e||n)&&(e&&(Bd.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(Bd.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("height"),i=w_(this.services.cartesianScales.getMainXScale()).tickSizeInner(-r).tickSizeOuter(0);if(ka.getProperty(this.getOptions(),"grid","x","alignWithAxisTicks")){var o=this.services.cartesianScales.getDomainAxisPosition(),a=ka.getProperty(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=ka.getProperty(this.getOptions(),"grid","x","numberOfTicks");i.ticks(s)}var u=n.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+r+")");t?u.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):u.call(i),this.cleanGrid(u)},e.prototype.drawYGrid=function(t){var e=this,n=this.parent,r=this.backdrop.attr("width"),i=O_(this.services.cartesianScales.getMainYScale()).tickSizeInner(-r).tickSizeOuter(0);if(ka.getProperty(this.getOptions(),"grid","y","alignWithAxisTicks")){var o=this.services.cartesianScales.getRangeAxisPosition(),a=ka.getProperty(this.getOptions(),"axes",o,"ticks","values");a&&i.tickValues(a)}else{var s=ka.getProperty(this.getOptions(),"grid","y","numberOfTicks");i.ticks(s)}var u=n.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");t?u.transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"grid-update",animate:t})})).call(i):u.call(i),this.cleanGrid(u)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(ka.getTranslationValues(t).tx)-Number(ka.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+ka.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=+ka.getTranslationValues(s).tx-+ka.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=Bd.getSVGElementSize(u).width-+ka.getTranslationValues(a).tx}else o=+ka.getTranslationValues(s).tx;return o*this.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=ka.getProperty(this.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=ka.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(t,e){var n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),o=r.range(),a=o[0],s=o[1],u=i.range(),l=u[0],c=u[1];this.backdrop=Bd.appendOrSelect(n,"svg.chart-grid-backdrop");var h=Bd.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",a).attr("y",c).attr("width",Math.abs(s-a)).attr("height",Math.abs(l-c)).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){t.selectAll("text").remove(),t.select(".domain").remove()},e}(Ov);var ox,ax=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.renderType=k.SVG,e.isXGridEnabled=ka.getProperty(e.getOptions(),"grid","x","enabled"),e.isYGridEnabled=ka.getProperty(e.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=ka.getProperty(this.getOptions(),"ruler","enabled");this.drawBackdrop(),t&&!this.isEventListenerAdded?this.addBackdropEventListeners():!t&&this.isEventListenerAdded&&this.removeBackdropEventListeners()},e.prototype.removeBackdropEventListeners=function(){this.isEventListenerAdded=!1,this.backdrop.on("mousemove mouseover mouseout",null)},e.prototype.formatTooltipData=function(t){return t},e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.services.cartesianScales.getOrientation(),s=this.model.getDisplayData(),u=this.services.cartesianScales.getRangeScale().range(),l=u[0],c=u[1],h=a===V.HORIZONTAL?i:r,f=Bd.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),d=Bd.appendOrSelect(f,"line.ruler-line"),p=o.selectAll("[role=graphics-symbol]"),g=s.map((function(t){return{domainValue:n.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,h)}));if(this.pointsWithinLine&&g.length===this.pointsWithinLine.length&&g.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=g,this.services.events.dispatchEvent(ot.Tooltip.MOVE,{mousePosition:[r,i]});this.pointsWithinLine=g;var v=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(h-e.domainValue),i=Math.abs(h-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(v.length>0){var m=v.map((function(t){return t.originalData})).filter((function(t){var e=t[n.services.cartesianScales.getRangeIdentifier(t)];return null!=e})),y=v.map((function(t){return t.domainValue})),b=p.filter((function(t){var e=n.services.cartesianScales.getDomainValue(t);return y.includes(e)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!ka.isEqual(this.elementsToHighlight,b)&&this.hideRuler(),b.dispatch("mouseover"),this.elementsToHighlight=b,this.services.events.dispatchEvent(ot.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:d,data:this.formatTooltipData(m)}),f.attr("opacity",1);var _=v[0];"horizontal"===a?d.attr("x1",c).attr("x2",l).attr("y1",_.domainValue).attr("y2",_.domainValue):d.attr("y1",c).attr("y2",l).attr("x1",_.domainValue).attr("x2",_.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=Bd.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(ot.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.services.domUtils.getHolder(),n=this.model.getDisplayData(),r=function(e){var n=Ba(e,t.parent.node());t.showRuler(e,n)};if(n.length>100){var i=n.length%50*12.5;r=ka.debounceWithD3MousePosition((function(e){var n=this.mousePosition;t.showRuler(e,n)}),i,e)}this.backdrop.on("mousemove mouseover",r).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent;this.backdrop=Bd.appendOrSelect(t,"svg.chart-grid-backdrop")},e}(Ov),sx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler-binned",e.renderType=k.SVG,e}return n(e,t),e.prototype.showRuler=function(t,e){var n=this,r=e[0],i=e[1],o=this.parent,a=this.model.getOptions(),s=this.services.cartesianScales.getOrientation(),u=this.services.cartesianScales.getRangeScale().range(),l=u[0],c=u[1],h=this.services.cartesianScales.getDomainScale(),f=h.invert(s===V.VERTICAL?r:i),d=Bd.appendOrSelect(o,"g.ruler").attr("aria-label","ruler"),p=Bd.appendOrSelect(d,"line.ruler-line"),g=o.selectAll("[role=graphics-symbol]").filter((function(t){if(parseFloat(Nn(t,"data.x0"))<=f&&parseFloat(Nn(t,"data.x1"))>=f)return!0}));if(g.size()>0){this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!ka.isEqual(this.elementsToHighlight,g)&&this.hideRuler(),g.dispatch("mouseover"),this.elementsToHighlight=g;var v=Na(g.nodes()[0]).datum(),m=parseFloat(Nn(v,"data.x0")),y=parseFloat(Nn(v,"data.x1")),b=this.model.getActiveDataGroupNames(),_=b.reverse().map((function(t){return{label:"Group",value:Nn(v,"data."+t),class:n.model.getColorClassName({classNameTypes:[R.TOOLTIP],dataGroupName:t})}})).filter((function(t){return 0!==t.value}));if(_.length>0){this.services.events.dispatchEvent(ot.Tooltip.SHOW,{mousePosition:[r,i],hoveredElement:p,items:L([{label:Nn(a,"bins.rangeLabel")||"Range",value:m+" – "+y}],_,!0===ka.getProperty(a,"tooltip","showTotal")?[{label:Nn(a,"tooltip.totalLabel")||"Total",value:b.reduce((function(t,e){return t+parseFloat(Nn(v,"data."+e))}),0)}]:[])}),d.attr("opacity",1);var x=h((m+y)/2);"horizontal"===s?p.attr("x1",c).attr("x2",l).attr("y1",x).attr("y2",x):p.attr("y1",c).attr("y2",l).attr("x1",x).attr("x2",x)}else this.hideRuler()}else this.hideRuler()},e}(ax),ux=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.formatTooltipData=function(t){return t.reverse()},e}(ax),lx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.renderType=k.HTML,e}return n(e,t),e.prototype.init=function(){var t=this,e=function(){return t.updateOverflowMenu(!1)};this.services.events.addEventListener(ot.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.renderOverflowMenu(),document.body.addEventListener("click",e)})),this.services.events.addEventListener(ot.Toolbar.HIDE_OVERFLOW_MENU,(function(){document.body.removeEventListener("click",e)}))},e.prototype.render=function(t){var e=this.getComponentContainer();this.overflowMenu||(this.overflowMenu=e.append("div").attr("class","bx--overflow-menu-options bx--overflow-menu--flip").attr("tabindex",-1).attr("role","menu").html("<ul></ul>"));var n=this.getControlConfigs(),r=n.buttonList;n.overflowMenuItemList&&r.push(this.getOverflowButtonConfig());var i=e.selectAll("div.toolbar-control").data(r,(function(t){return t.id}));i.exit().remove();i.enter().append("div").attr("class","toolbar-control bx--overflow-menu").merge(i).classed("disabled",(function(t){return!!t.shouldBeDisabled&&t.shouldBeDisabled()})).html((function(t){return'\n\t\t\t<button\n\t\t\t\tclass="bx--overflow-menu__trigger"\n\t\t\t\taria-haspopup="true" aria-expanded="false" id="'+t.id+'">\n\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet" style="will-change: transform; width: '+(void 0!==t.iconWidth?t.iconWidth:"20px")+"; height: "+(void 0!==t.iconWidth?t.iconHeight:"20px")+'" xmlns="http://www.w3.org/2000/svg" class="bx--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">\n\t\t\t\t\t'+t.iconSVGContent+"\n\t\t\t\t</svg>\n\t\t\t</button>"})).each((function(t){Na(this).select("button").on("click",t.clickFunction).on("keyup",(function(e){(e.key&&"Enter"===e.key||" "===e.key)&&(e.preventDefault(),t.clickFunction())}))}));this.overflowButton=this.getComponentContainer().select("button.bx--overflow-menu__trigger#toolbar-overflow-menu")},e.prototype.renderOverflowMenu=function(){var t=this.getControlConfigs().overflowMenuItemList,e=this.overflowMenu.select("ul").selectAll("li.bx--overflow-menu-options__option").data(t,(function(t){return ka.getProperty(t,"id")}));e.exit().remove();var n=e.enter().append("li").attr("id",(function(t){return t.id})).attr("class","bx--overflow-menu-options__option");n.append("button").attr("class","bx--overflow-menu-options__btn").attr("role","menuitem"),n.merge(e).classed("bx--overflow-menu-options__option--disabled",(function(t){return t.shouldBeDisabled()})).attr("aria-disabled",(function(t){return t.shouldBeDisabled()})).selectAll("button").text((function(t){return t.text}))},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.classed("is-open")},e.prototype.updateOverflowMenu=function(t){this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),Na(this.overflowButton.node().parentNode).classed("bx--overflow-menu--open",t)),t?this.services.events.dispatchEvent(ot.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(ot.Toolbar.HIDE_OVERFLOW_MENU)},e.prototype.focusOnPreviousEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=e.length,r=t-1;r>=0;r--){if(!e[r].shouldBeDisabled()){n=r;break}}if(n<e.length){var i=Na("#"+e[n].id+" button").node();"focus"in i&&i.focus()}},e.prototype.focusOnNextEnabledMenuItem=function(t){for(var e=this.getOverflowMenuItems(),n=-1,r=t+1;r<e.length;r++){if(!e[r].shouldBeDisabled()){n=r;break}}if(n>-1){var i=Na("#"+e[n].id+" button").node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var e=this;this.getOverflowMenuItems().forEach((function(n,r){var i=Na("#"+n.id);null!==i&&(i.on("click",(function(){n.clickFunction(),e.updateOverflowMenu(!1)})),i.on("keyup",(function(){"Enter"===t.key?n.clickFunction():"ArrowUp"===t.key?e.focusOnPreviousEnabledMenuItem(r):"ArrowDown"===t.key&&e.focusOnNextEnabledMenuItem(r)})))})),e.focusOnNextEnabledMenuItem(-1)}t.stopImmediatePropagation()},e.prototype.getControlConfigs=function(){var t=this,e=ka.getProperty(this.getOptions(),"toolbar","numberOfIcons"),n=ka.getProperty(this.getOptions(),"toolbar","controls"),r=[],i=[];return n.forEach((function(e){var n=t.getControlConfigByType(e.type);n&&(n.text=e.text?e.text:e.type,-1!==n.id.indexOf("toolbar-export")?i.push(n):r.push(n))})),r.length<=e&&0===i.length?{buttonList:r}:{buttonList:r.splice(0,e-1),overflowMenuItemList:r.concat(i)}},e.prototype.getOverflowMenuItems=function(){var t=this.getControlConfigs().overflowMenuItemList;return t||[]},e.prototype.getOverflowButtonConfig=function(){var t=this;return{id:"toolbar-overflow-menu",shouldBeDisabled:function(){return!1},iconSVGContent:'<circle cx="16" cy="8" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="16" r="2"></circle>\n\t\t\t\t\t\t\t <circle cx="16" cy="24" r="2"></circle>',clickFunction:function(e){return t.toggleOverflowMenu(e)}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState();switch(t){case nt.ZOOM_IN:r&&(e={id:"toolbar-zoomIn",shouldBeDisabled:function(){return n.services.zoom.isMinZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomIn()}});break;case nt.ZOOM_OUT:r&&(e={id:"toolbar-zoomOut",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.zoomOut()}});break;case nt.RESET_ZOOM:r&&(e={id:"toolbar-resetZoom",shouldBeDisabled:function(){return n.services.zoom.isMaxZoomDomain()},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.zoom.resetZoomDomain()}});break;case nt.MAKE_FULLSCREEN:e={id:"toolbar-makefullscreen",iconSVGContent:this.getControlIconByType(t),iconWidth:"15px",iconHight:"15px",shouldBeDisabled:function(){return!1},clickFunction:function(){n.services.domUtils.toggleFullscreen()}};break;case nt.SHOW_AS_DATATABLE:e={id:"toolbar-showasdatatable",iconSVGContent:this.getControlIconByType(t),shouldBeDisabled:!1,clickFunction:function(){return n.services.events.dispatchEvent(ot.Modal.SHOW)}};break;case nt.EXPORT_CSV:e={id:"toolbar-export-CSV",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.model.exportToCSV()}};break;case nt.EXPORT_PNG:e={id:"toolbar-export-PNG",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.domUtils.exportToPNG()}};break;case nt.EXPORT_JPG:e={id:"toolbar-export-JPG",shouldBeDisabled:function(){return!1},iconSVGContent:this.getControlIconByType(t),clickFunction:function(){return n.services.domUtils.exportToJPG()}};break;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case nt.ZOOM_IN:return'<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case nt.ZOOM_OUT:return'<rect x="9" y="13" width="10" height="2"/>\n\t\t\t\t\t\t<path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>';case nt.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case nt.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case nt.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case nt.EXPORT_CSV:case nt.EXPORT_JPG:case nt.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}},e}(Ov),cx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e.renderType=k.SVG,e}return n(e,t),e.prototype.render=function(t){var e=this,n=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),r=this.services.cartesianScales.getScaleByPosition(n),i=r.domain(),o=i[0],a=i[1],s=o>0&&a<0||o<0&&a>0,u=this.getComponentContainer();if(s){var l=this.services.cartesianScales.getDomainScale().range(),c=l[0],h=l[1],f=+r(0)+.5;f||(f=r.range()[0]);var d=ka.flipSVGCoordinatesBasedOnOrientation({x0:c,x1:h,y0:f,y1:f},this.services.cartesianScales.getOrientation());Bd.appendOrSelect(u,"line.domain").transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"zero-line-update",animate:t})})).attr("y1",d.y0).attr("y2",d.y1).attr("x1",d.x0).attr("x2",d.x1)}else u.selectAll("line.domain").remove()},e}(Ov),hx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.renderType=k.SVG,e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=nx(),e.highlightStrokeWidth=1,e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(ot.ZoomBar.UPDATE,this.render.bind(this));var t=ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getComponentContainer(),r=this.services.zoom.isZoomBarLoading(I.TOP),i=this.services.zoom.isZoomBarLocked(I.TOP),o=ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"type"),a=ka.getProperty(this.getOptions(),"axes",I.BOTTOM,"highlights"),s=St.height[o],u=Bd.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(0!==u){var l=0,c=this.model.get("axesMargins");c&&c.left&&(l=c.left);var h=Bd.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",s).attr("opacity",1);Bd.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",s).attr("width","100%").attr("height",St.spacerHeight).attr("opacity",1).attr("fill","none");if(o===N.GRAPH_VIEW?Bd.appendOrSelect(h,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",u-l).attr("height","100%").classed("zoom-bg-skeleton",r):o===N.SLIDER_VIEW&&Bd.appendOrSelect(h,"rect.zoom-slider-bg").attr("x",l).attr("y",s/2-1).attr("width",u-l).attr("height",2).classed("zoom-slider-bg-skeleton",r),r)this.renderSkeleton(h,l,u);else{var f=this.services.cartesianScales,d=f.getMainXScale(),p=f.getMainYScale(),g=f.getMainXScaleType();if(d&&g===U.TIME){var v=this.services.zoom.getZoomBarData();if(ka.isEmpty(v)||1===v.length)return;this.xScale=d.copy(),this.yScale=p.copy();var m=this.services.zoom.getDefaultZoomBarDomain(v);v=this.compensateDataForDefaultDomain(v,m);var y=this.model.get("initialZoomDomain"),b=ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"initialZoomDomain");b&&b[0]&&b[1]&&(b[0]=new Date(b[0]),b[1]=new Date(b[1])),!b||y&&y[0].valueOf()===b[0].valueOf()&&y[1].valueOf()===b[1].valueOf()?null===b&&null!=y&&this.model.set({initialZoomDomain:null,zoomDomain:ka.merge([],m)},{skipUpdate:!0}):this.model.set({initialZoomDomain:ka.merge([],b),zoomDomain:b?ka.merge([],b):m},{skipUpdate:!0}),this.xScale.range([l,u]).domain(m),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,s-6]).domain(As(v,(function(t){return t.value})));var _=this.model.get("zoomDomain");if(o===N.GRAPH_VIEW&&(this.renderZoomBarArea(h,"path.zoom-graph-area-unselected",v,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(h,"path.zoom-graph-area",v,this.clipId),this.renderZoomBarBaseline(h,l,u),a)){var x=a.highlightStartMapsTo,w=a.highlightEndMapsTo,O=a.color,E=a.labelMapsTo;a.data.forEach((function(t,n){Bd.appendOrSelect(h,"rect.highlight-"+n).attr("height",s-2*e.highlightStrokeWidth).attr("y",e.highlightStrokeWidth).attr("x",e.xScale(t[x])).attr("width",e.xScale(t[w])-e.xScale(t[x])).style("fill",O&&O.scale[t[E]]?O.scale[t[E]]:null).style("fill-opacity",.1).style("stroke",O&&O.scale[t[E]]?O.scale[t[E]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")}))}this.addBrushEventListener(_,l,u);var T=Bd.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===_);else if(_[0].valueOf()===_[1].valueOf())T.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range(),this.xScale.domain());else{var S=_.map((function(t){return e.xScale(t)}));S[1]-S[0]<this.MIN_SELECTION_DIFF||(T.call(this.brush.move,S),this.updateBrushHandle(this.getComponentContainer(),S,_))}i&&(this.brush.filter((function(){return!1})),T.selectAll("rect").attr("cursor","auto"))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"type"),o=St.height[i];this.brush.extent([[e,0],[n,o]]).on("start brush end",null).on("start brush end",(function(e){var n=e.selection;null===n?r.handleBrushedEvent(e,t,r.xScale,r.xScale.range()):n[0]===n[1]||r.handleBrushedEvent(e,t,r.xScale,n)}))},e.prototype.handleBrushedEvent=function(t,e,n,r){var i=[n.invert(r[0]),n.invert(r[1])];if(this.updateBrushHandle(this.getComponentContainer(),r,i),null!=t.sourceEvent&&("mousemove"===t.sourceEvent.type||"mouseup"===t.sourceEvent.type||"mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type||"touchmove"===t.sourceEvent.type||"touchend"===t.sourceEvent.type)){void 0!==e&&e[0]===i[0]&&e[1]===i[1]||this.services.zoom.handleDomainChange(i,{dispatchEvent:!1});var o=void 0;"start"===t.type?o=ot.ZoomBar.SELECTION_START:"brush"===t.type?o=ot.ZoomBar.SELECTION_IN_PROGRESS:"end"===t.type&&(o=ot.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(ot.ZoomDomain.CHANGE,{newDomain:i})),this.services.events.dispatchEvent(o,{selection:r,newDomain:i})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=St.handleWidth,o=ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"type"),a=St.height[o],s=-i/2,u=St.handleBarWidth,l=o===N.GRAPH_VIEW?St.handleBarHeight:6,c=-u/2,h=(a-l)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",(function(t){return"w"===t.type?Math.max(e[0]+s,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+s,r.maxSelectionRange[1]-i):void 0})).attr("y",0).attr("width",i).attr("height",a).attr("cursor","ew-resize").style("display",null);var f=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);f.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),f.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+c,r.maxSelectionRange[0]-s+c):"e"===t.type?Math.min(e[1]+c,r.maxSelectionRange[1]+s+c):void 0})).attr("y",h).attr("width",u).attr("height",l).attr("cursor","ew-resize"),o===N.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],a)},e.prototype.updateSliderSelectedArea=function(t){var e=ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"type"),n=St.height[e],r=(Bd.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getComponentContainer().select("svg.zoom-container");Bd.appendOrSelect(i,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",n/2-1).attr("width",t[1]-t[0]).attr("height",2)},e.prototype.renderZoomBarArea=function(t,e,n,r){var i=this.services.cartesianScales,o=i.getMainXAxisPosition(),a=i.getMainYAxisPosition(),s=i.getMainXScaleType(),u=i.getMainYScaleType(),l=function(t,e,n){return function(r,o){return i.getValueFromScale(t,e,n,r,o)}},c=l(this.xScale,s,o),h=l(this.yScale,u,a),f=ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"type"),d=St.height[f],p=af().x((function(t,e){return c(t,e)})).y0(d).y1((function(t,e){return d-h(t,e)})),g=Bd.appendOrSelect(t,e).datum(n).attr("d",p);r&&g.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,o){var a=Bd.appendOrSelect(t,"clipPath").attr("id",e);Bd.appendOrSelect(a,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",o)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=ka.clone(t),i=this.services.cartesianScales.getDomainIdentifier(),o=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(r[0][i]))(n={})[i]=e[0],n[o]=0,r.unshift(n);if(Number(e[1])>Number(r[r.length-1][i]))(n={})[i]=e[1],n[o]=0,r.push(n);return r}},e.prototype.renderZoomBarBaseline=function(t,e,n,r){void 0===r&&(r=!1);var i=ka.getProperty(this.model.getOptions(),"zoomBar",I.TOP,"type"),o=St.height[i],a=of()([[e,o],[n,o]]);Bd.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",a).classed("zoom-bg-baseline-skeleton",r)},e.prototype.renderSkeleton=function(t,e,n){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),Bd.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"type")===N.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(ot.ZoomBar.UPDATE,this.render.bind(this))},e}(Ov),fx=function(){function t(t,e){this.services={domUtils:Bd,files:Ud,events:Vd,gradientUtils:Qp,transitions:Kp,canvasZoom:wv},this.model=new hd(this.services)}return t.prototype.init=function(t,e){var n=this;this.model.set({holder:t},{skipUpdate:!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(ot.Model.UPDATE,(function(t){var e=!!ka.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(ot.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(ot.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},{skipUpdate:!0})},t.prototype.getChartComponents=function(t,e){var n={id:"title",components:[new Um(this.model,this.services)],growth:W.PREFERRED},r={id:"legend",components:[new Ev(this.model,this.services)],growth:W.PREFERRED},i=ka.getProperty(this.model.getOptions(),"canvasZoom","enabled");i&&!0===i&&t.push(new Fm(this.model,this.services));var o={id:"graph-frame",components:t,growth:W.STRETCH,renderType:ka.getProperty(e,"graphFrameRenderType")||k.SVG},a=!0!==ka.getProperty(e,"excludeLegend")&&!1!==this.model.getOptions().legend.enabled,s=F.COLUMN;if(a){var u=ka.getProperty(this.model.getOptions(),"legend","position");"left"===u?(s=F.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=z.VERTICAL)):"right"===u?(s=F.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=z.VERTICAL)):"bottom"===u&&(s=F.COLUMN_REVERSE)}var l={id:"spacer",components:[new h_(this.model,this.services)],growth:W.PREFERRED},c={id:"full-frame",components:[new f_(this.model,this.services,L(a?[r]:[],a?[l]:[],[o]),{direction:s})],growth:W.STRETCH},h=[];if(this.model.getOptions().title){h.push(n);var f={id:"spacer",components:[new h_(this.model,this.services)],growth:W.PREFERRED};h.push(f)}return h.push(c),[new Hm(this.model,this.services),new Sm(this.model,this.services),new f_(this.model,this.services,h,{direction:F.COLUMN})]},t}(),dx=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.assignRangeAndDomains=function(){var t=this.services.cartesianScales,e=this.getOptions(),n=t.isDualAxes(),r={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(r.secondaryDomain=t.secondaryDomainAxisPosition,r.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(r).forEach((function(n){var i=r[n];t.scales[i]?r[n]={position:i,label:t.getScaleLabel(i),identifier:ka.getProperty(e,"axes",i,"mapsTo")}:r[n]=null})),r},e.prototype.getTabularDataArray=function(){var t,e=this.getDisplayData(),n=this.getOptions().data.groupMapsTo,r=this.services.cartesianScales,i=this.assignRangeAndDomains(),o=i.primaryDomain,a=i.primaryRange,s=i.secondaryDomain,u=i.secondaryRange;return r.getDomainAxisScaleType()===U.TIME&&(t=function(t){return hv(t,"MMM d, yyyy")}),L([L(["Group",o.label,a.label],s?[s.label]:[],u?[u.label]:[])],e.map((function(e){return L([e[n],null===e[o.identifier]?"&ndash;":t?t(e[o.identifier]):e[o.identifier],null===e[a.identifier]||isNaN(e[a.identifier])?"&ndash;":e[a.identifier].toLocaleString()],s?[null===e[s.identifier]?"&ndash;":e[s.identifier]]:[],u?[null===e[u.identifier]||isNaN(e[u.identifier])?"&ndash;":e[u.identifier]]:[])})))},e.prototype.exportToCSV=function(){var t=this.getTabularDataArray().map((function(t){return t.map((function(t){return'"'+t+'"'}))})),e="",n="";t.forEach((function(r,i){n=r.join(","),e+=i<t.length?n+"\n":n})),this.services.files.downloadCSV(e,"myChart.csv")},e.prototype.setData=function(e){var n;if(e&&(n=t.prototype.setData.call(this,e),ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"enabled"))){var r=ka.getProperty(this.getOptions(),"zoomBar",I.TOP,"data");this.setZoomBarData(r)}return n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(ka.clone(t)):this.getDisplayData(),n=e,r=this.services.cartesianScales;if(e&&r.domainAxisPosition&&r.rangeAxisPosition){var i=r.getDomainIdentifier(),o=r.getRangeIdentifier(),a=e.map((function(t){return t[i].getTime()}));n=(a=ka.removeArrayDuplicates(a).sort()).map((function(t){var n=0,r={};return e.forEach((function(e){e[i].getTime()===t&&(n+=e[o])})),r[i]=new Date(t),r[o]=n,r}))}this.set({zoomBarData:n})},e.prototype.getZoomBarData=function(){return this.get("zoomBarData")},e.prototype.sanitizeDateValues=function(t){var e=this.getOptions();if(!e.axes)return t;var n=[];return Object.keys(I).forEach((function(t){var r=I[t],i=e.axes[r];if(i&&i.scaleType===U.TIME){var o=i.mapsTo;null===o&&void 0===o||n.push(o)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){null===ka.getProperty(t,e,"getTime")&&(t[e]=new Date(t[e]))}))})),t},e.prototype.sanitize=function(e){return e=t.prototype.sanitize.call(this,e),e=this.sanitizeDateValues(e)},e}(hd),px=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:bv,curves:_v,zoom:xv}),r.model=new dx(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t,e){var n=this.model.getOptions(),r=ka.getProperty(n,"zoomBar",I.TOP,"enabled"),i=ka.getProperty(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();var o=this.services.cartesianScales.getMainXAxisPosition(),a=ka.getProperty(n,"axes",o,"scaleType"),s=r&&o===I.BOTTOM&&a===U.TIME,u=this.services.zoom.isZoomBarLocked(I.TOP),l=!!this.model.getOptions().title,c={id:"title",components:[new Um(this.model,this.services)],growth:W.STRETCH},h={id:"toolbar",components:[new lx(this.model,this.services)],growth:W.PREFERRED},f={id:"header",components:[new f_(this.model,this.services,L([c],i?[h]:[]),{direction:F.ROW,alignItems:q.CENTER})],growth:W.PREFERRED},d={id:"legend",components:[new Ev(this.model,this.services)],growth:W.PREFERRED};s&&!u&&t.push(new jm(this.model,this.services),new rx(this.model,this.services)),t.push(new Vm(this.model,this.services)),t.push(new Wm(this.model,this.services));var p={id:"graph-frame",components:t,growth:W.STRETCH,renderType:k.SVG},g=!1!==ka.getProperty(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,v=F.COLUMN;if(g){var m=ka.getProperty(this.model.getOptions(),"legend","position");m===G.LEFT?(v=F.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=z.VERTICAL)):m===G.RIGHT?(v=F.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=z.VERTICAL)):m===G.BOTTOM&&(v=F.COLUMN_REVERSE)}var y={id:"spacer",components:[new h_(this.model,this.services)],growth:W.PREFERRED},b={id:"full-frame",components:[new f_(this.model,this.services,L(g?[d]:[],g?[y]:[],[p]),{direction:v})],growth:W.STRETCH},_={id:"zoom-bar",components:[new hx(this.model,this.services)],growth:W.PREFERRED,renderType:k.SVG},x=[];if(l||i){x.push(f);var w={id:"spacer",components:[new h_(this.model,this.services,i?{size:15}:void 0)],growth:W.PREFERRED};x.push(w)}return s&&x.push(_),x.push(b),[new zm(this.model,this.services),new Sm(this.model,this.services),new f_(this.model,this.services,x,{direction:F.COLUMN})]},e}(fx),gx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(ka.clone(Es.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new ax(this.model,this.services),new ry(this.model,this.services),new qm(this.model,this.services),new Jm(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0}),new cy(this.model,this.services,{skeleton:Z.GRID})];return this.getAxisChartComponents(t)},e}(px),vx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new ux(this.model,this.services),new Ym(this.model,this.services),new ry(this.model,this.services,{stacked:!0}),new oy(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0}),new cy(this.model,this.services,{skeleton:Z.GRID})];return this.getAxisChartComponents(t)},e}(px),mx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new Xm(this.model,this.services),new cx(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(px),yx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new Km(this.model,this.services),new cx(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(px),bx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new ux(this.model,this.services),new Qm(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.VERT_OR_HORIZ}),new cx(this.model,this.services)];return this.getAxisChartComponents(t)},e}(px),_x=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getBoxQuartiles=function(t){return{q_25:Ys(t,.25),q_50:Ys(t,.5),q_75:Ys(t,.75)}},e.prototype.getBoxplotData=function(){for(var t=this.getOptions().data.groupMapsTo,e=this.getGroupedData(),n=[],r=function(e,r){for(var o,a=i.services.cartesianScales.getRangeIdentifier(),s=r.map((function(t){return t[a]})).sort(Ss),u=((o={})[t]=e,o.counts=s,o.quartiles=i.getBoxQuartiles(s),o.outliers=null,o.whiskers=null,o),l=u.quartiles.q_25,c=u.quartiles.q_75,h=1.5*(c-l),f=l-h,d=c+h,p=[],g=[],v=0,m=s;v<m.length;v++){var y=m[v];y<f?p.push(y):y>d?p.push(y):g.push(y)}u.outliers=p;var b=Ws(g),_=Fs(g);u.whiskers={min:b||Ws([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75]),max:_||Fs([u.quartiles.q_25,u.quartiles.q_50,u.quartiles.q_75])},n.push(u)},i=this,o=0,a=e;o<a.length;o++){var s=a[o];r(s.name,s.data)}return n},e.prototype.setColorClassNames=function(){var t=ka.getProperty(this.getOptions(),"color","pairing"),e=ka.getProperty(t,"option");e=e<=pt.pairingOptions["1-color"]?e:1;var n=this.allDataGroups.map((function(t,n){return"1-"+e+"-1"}));this.colorClassNames=$s().range(n).domain(this.allDataGroups)},e}(dx),xx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new _x(r.services),r.model.setOptions(ka.mergeDefaultChartOptions(Es.boxplotChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new $m(this.model,this.services),new cx(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.VERT_OR_HORIZ})];return this.getAxisChartComponents(t,{legend:{enabled:!1}})},e}(px),wx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new ax(this.model,this.services),new ty(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.GRID})];return this.getAxisChartComponents(t)},e}(px),Ox=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.bulletChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new ey(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.GRID})];return this.getAxisChartComponents(t)},e}(px),Ex=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getTabularDataArray=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this.getBinnedStackedData();return L([L([Nn(t,"bins.rangeLabel")||"Range"],n.map((function(t){return Nn(t,"0."+e)})))],Nn(n,0).map((function(t,r){return L([Nn(t,"data.x0")+" – "+Nn(t,"data.x1")],n.map((function(t){return Nn(t[r],"data."+Nn(t[r],e))})))})))},e}(dx),Tx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new Ex(r.services),r.model.setOptions(ka.mergeDefaultChartOptions(Es.histogramChart,n.options)),r.init(e,n),r.update(),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new sx(this.model,this.services),new ny(this.model,this.services)];return this.getAxisChartComponents(t)},e}(px),Sx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new ax(this.model,this.services),new ry(this.model,this.services),new Jm(this.model,this.services,{handleThresholds:!0}),new hy(this.model,this.services),new cx(this.model,this.services)];return this.getAxisChartComponents(t)},e}(px),Mx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.lollipopChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new ax(this.model,this.services),new iy(this.model,this.services),new Jm(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.GRID})];return this.getAxisChartComponents(t)},e}(px),Cx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new T_(this.model,this.services),new ix(this.model,this.services),new ax(this.model,this.services),new Jm(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.GRID})];return this.getAxisChartComponents(t)},e}(px),Ax=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getTabularData=function(e){var n=t.prototype.getTabularData.call(this,e);return e!==n&&n.forEach((function(t){t.key&&t.key!==t.group&&(t.group=t.key)})),n},e.prototype.sanitize=function(t){return this.getTabularData(t).sort((function(t,e){return e.value-t.value}))},e}(hd),Px=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new Ax(i.services),r?i:(i.model.setOptions(ka.mergeDefaultChartOptions(Es.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new sy(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.PIE})];return this.getChartComponents(t)},e}(fx),Lx=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ly(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.DONUT})];return this.getChartComponents(t)},e}(Px),kx=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getMaximumDomain=function(t){return t.reduce((function(t,e){return t+e.value}),0)},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=ka.getProperty(n,"color","scale"),i=this.getStatus();return r||!i?t.prototype.getFillColor.call(this,e):null},e.prototype.getStatus=function(){var t=this.getOptions(),e=ka.getProperty(this.getDisplayData(),0,"value"),n=e>100?100:e,r=ka.getProperty(t,"meter","status","ranges");if(r){var i=r.filter((function(t){return t.range[0]<=n&&n<=t.range[1]}));if(i.length>0)return i[0].status}return null},e}(hd),Dx=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e.renderType=k.SVG,e}return n(e,t),e.prototype.getStackedBounds=function(t,e){var n=0;return t.map((function(t,r){return 0!==r?(n+=e(t.value),A(A({},t),{width:Math.abs(e(t.value)-bt.dividerWidth),x:n-e(t.value)})):(n=e(t.value),A(A({},t),{width:Math.abs(e(t.value)-bt.dividerWidth),x:0}))}))},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n,i=this,o=this.getComponentContainer(),a=this.getOptions(),s=ka.getProperty(a,"meter","proportional"),u=this.model.getDisplayData(),l=this.model.getStatus(),c=Bd.getSVGElementSize(o,{useAttrs:!0}).width,h=a.data.groupMapsTo;if(null===ka.getProperty(a,"meter","proportional"))n=100;else{var f=ka.getProperty(a,"meter","proportional","total");n=f||this.model.getMaximumDomain(this.model.getDisplayData())}var d=Ol().domain([0,n]).range([0,c]),p=this.getStackedBounds(u,d),g=ka.getProperty(a,"meter","height");Bd.appendOrSelect(o,"rect.container").attr("x",0).attr("y",0).attr("width",c).attr("height",g||(s?bt.height.proportional:bt.height.default)),Bd.appendOrSelect(o,"line.rangeIndicator").attr("x1",c).attr("x2",c).attr("y1",0).attr("y2",g||(s?bt.height.proportional:bt.height.default));var v=o.selectAll("rect.value").data(p),m=null==l||i.model.isUserProvidedColorScaleValid()?"value":"value status--"+l;v.enter().append("rect").classed("value",!0).merge(v).attr("x",(function(t){return t.x})).attr("y",0).attr("height",(function(){var t=ka.getProperty(a,"meter","height");return t||(s?bt.height.proportional:bt.height.default)})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[R.FILL],dataGroupName:t[h],originalClassName:m})})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"meter-bar-update",animate:t})})).attr("width",(function(t,e){return t.value>n?d(n):t.width})).style("fill",(function(t){return i.model.getFillColor(t[h])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),v.exit().remove();var y=s?null:ka.getProperty(a,"meter","peak"),b=y;null!==y&&(y>n?b=n:y<u[0].value&&(b=u[0].value>n?n:u[0].value));var _=o.selectAll("line.peak").data(null==b?[]:[b]);_.enter().append("line").classed("peak",!0).merge(_).attr("y1",0).attr("y2",(function(){var t=ka.getProperty(a,"meter","height");return t||8})).transition().call((function(n){return e.services.transitions.setupTransition({transition:n,name:"peak-line-update",animate:t})})).attr("x1",(function(t){return d(t)})).attr("x2",(function(t){return d(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),_.exit().remove(),this.services.domUtils.setSVGMaxHeight(),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this,r=ka.getProperty(t,"meter","proportional");this.parent.selectAll("rect.value").on("mouseover",(function(t,i){var o=Na(this);n.services.events.dispatchEvent(ot.Meter.METER_MOUSEOVER,{event:t,element:o,datum:i}),r&&(o.classed("hovered",!0),o.transition(n.services.transitions.getTransition("graph_element_mouseover_fill_update")),n.services.events.dispatchEvent(ot.Tooltip.SHOW,{event:t,hoveredElement:o,items:[{label:i[e],value:i.value}]}))})).on("mousemove",(function(t,e){var i=Na(this);n.services.events.dispatchEvent(ot.Meter.METER_MOUSEMOVE,{event:t,element:i,datum:e}),r&&n.services.events.dispatchEvent(ot.Tooltip.MOVE,{event:t})})).on("click",(function(t,e){n.services.events.dispatchEvent(ot.Meter.METER_CLICK,{event:t,element:Na(this),datum:e})})).on("mouseout",(function(t,e){var i=Na(this);n.services.events.dispatchEvent(ot.Meter.METER_MOUSEOUT,{event:t,element:i,datum:e}),r&&(i.classed("hovered",!1),n.services.events.dispatchEvent(ot.Tooltip.HIDE,{hoveredElement:i}))}))},e.prototype.destroy=function(){this.parent.selectAll("rect.value").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("click",null)},e}(Ov),Rx=function(t){function e(e,n){var r=t.call(this,e,n)||this;r.model=new kx(r.services);var i=n.options.meter.proportional?ka.merge(ka.clone(Es.proportionalMeterChart),n.options):ka.merge(ka.clone(Es.meterChart),n.options);return r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new Dx(this.model,this.services)],growth:W.STRETCH,renderType:k.SVG},e={id:"meter-title",components:[new Gm(this.model,this.services)],growth:W.STRETCH,renderType:k.SVG},n={id:"spacer",components:[new h_(this.model,this.services,{size:8})],growth:W.STRETCH},r=[new f_(this.model,this.services,[e,n,t],{direction:F.COLUMN})];return this.getChartComponents(r,{graphFrameRenderType:k.HTML})},e}(fx),Ix=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return r?i:(i.model.setOptions(ka.mergeDefaultChartOptions(Es.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new cb(this.model,this.services)];return this.getChartComponents(t)},e}(fx),Nx=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.getDataGroups=function(){return t.prototype.getDataGroups.call(this).filter((function(t){return"delta"!==t.name}))},e}(hd),Bx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new Nx(r.services),r.model.setOptions(ka.mergeDefaultChartOptions(Es.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new uy(this.model,this.services)];return this.getChartComponents(t)},e}(fx),Vx=((ox={})[et.LINE]=[ry,Jm],ox[et.SCATTER]=[Jm],ox[et.AREA]=[qm,ry,Jm],ox[et.STACKED_AREA]=[Ym,ry,oy,ux],ox[et.SIMPLE_BAR]=[Xm],ox[et.GROUPED_BAR]=[Km,cx],ox[et.STACKED_BAR]=[Qm,ux],ox),Ux=function(t){function e(e,n){var r=t.call(this,e,n)||this,i=ka.mergeDefaultChartOptions(Es.comboChart,n.options);return n.options.comboChartTypes||(console.error("No comboChartTypes defined for the Combo Chart!"),i.comboChartTypes=[{type:et.LINE,correspondingDatasets:[]}]),r.model.setOptions(i),r.init(e,n),r}return n(e,t),e.prototype.getGraphComponents=function(){var t=this,e=this.model.getOptions().comboChartTypes,n=0,r=e.map((function(e){var r,i,o=e.type;return"string"==typeof e.type?Object.keys(Vx).includes(e.type)?(r=ka.merge({},Es[ka.camelCase(e.type)+"Chart"],t.model.getOptions(),e.options),e.type===et.STACKED_AREA&&(i=!0),Vx[e.type].map((function(o,a){return new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r,stacked:i})}))):(console.error('Invalid chart type "'+e.type+'" specified for combo chart. Please refer to the ComboChart tutorial for more guidance.'),null):(r=ka.merge({},t.model.getOptions(),e.options),new o(t.model,t.services,{groups:e.correspondingDatasets,id:n++,options:r}))})).filter((function(t){return null!==t}));return ka.flatten(r)},e.prototype.getComponents=function(){var t=this.model.getOptions().comboChartTypes.some((function(t){return t.type===et.STACKED_BAR||t.type===et.STACKED_AREA})),e=L([new T_(this.model,this.services),new ix(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.GRID})],t?[]:[new ax(this.model,this.services)],this.getGraphComponents());return this.getAxisChartComponents(e)},e}(px),Gx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.treeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new eb(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})},e}(fx),Hx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.treemapChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new ob(this.model,this.services)];return this.getChartComponents(t)},e}(fx),zx=function(t){function e(e){var n=t.call(this,e)||this;return n.parentNode=!1,n.set({depth:2},{skipUpdate:!0}),n}return n(e,t),e.prototype.setData=function(e){t.prototype.setData.call(this,e),this.setDataGroups(),1===e.length&&(this.parentNode=!0),this.setZoom()},e.prototype.setOptions=function(t){var e=this.getOptions(),n=ka.merge({},t,this.getZoomOptions(t));ka.updateLegendAdditionalItems(e,n);var r=this.getHierarchyLevel(),i=ka.getProperty(e,"circlePack","hierarchyLevel");this.set({options:ka.merge(e,n),depth:i&&i<4?i:r})},e.prototype.getZoomOptions=function(t){if(!this.getDisplayData())return{};var e=this.getDisplayData(),n=t||this.getOptions(),r=1===e.length&&ka.getProperty(e,0,"children")?ka.getProperty(e,0,"children"):e,i=this.getHierarchyLevel();return r.some((function(t){if(t.children&&t.children.some((function(t){return t.children})))return i=3,!1})),!0===ka.getProperty(n,"canvasZoom","enabled")&&i>2?{legend:{additionalItems:[{type:it.ZOOM,name:"Click to zoom"}]}}:null},e.prototype.setZoom=function(t){this.setOptions(this.getZoomOptions(t))},e.prototype.updateHierarchyLevel=function(t){this.set({depth:t})},e.prototype.getHierarchyLevel=function(){return this.get("depth")},e.prototype.hasParentNode=function(){return this.parentNode},e.prototype.setDataGroups=function(){var t=this,e=this.getData(),n=this.getOptions().data.groupMapsTo,r=e.map((function(e){var r=e[n];return t.setChildrenDataGroup(e,r)}));this.set({data:r},{skipUpdate:!0})},e.prototype.setChildrenDataGroup=function(t,e){var n=this;return t.children?A(A({},t),{dataGroupName:e,children:t.children.map((function(t,r){return n.setChildrenDataGroup(t,e)}))}):A(A({},t),{dataGroupName:e})},e}(hd),jx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new zx(r.services),r.model.setOptions(ka.mergeDefaultChartOptions(Es.circlePackChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new hb(this.model,this.services)];return this.getChartComponents(t)},e}(fx),Fx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.wordCloudChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Rb(this.model,this.services),new cy(this.model,this.services,{skeleton:Z.PIE})];return this.getChartComponents(t)},e}(fx),Wx=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(ka.mergeDefaultChartOptions(Es.alluvialChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new c_(this.model,this.services)];return this.getChartComponents(t,{excludeLegend:!0})},e}(fx);t.AlluvialChart=Wx,t.AreaChart=gx,t.BoxplotChart=xx,t.BubbleChart=wx,t.BulletChart=Ox,t.CirclePackChart=jx,t.ComboChart=Ux,t.DonutChart=Lx,t.GaugeChart=Bx,t.GroupedBarChart=yx,t.HistogramChart=Tx,t.LineChart=Sx,t.LollipopChart=Mx,t.MeterChart=Rx,t.PieChart=Px,t.RadarChart=Ix,t.ScatterChart=Cx,t.SimpleBarChart=mx,t.StackedAreaChart=vx,t.StackedBarChart=bx,t.TreeChart=Gx,t.TreemapChart=Hx,t.WordCloudChart=Fx,t.configurations=Ts,t.interfaces=at,Object.defineProperty(t,"__esModule",{value:!0})}));