@carbon/charts 0.40.13 → 0.40.14

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.
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,f,d,p,g,v,m,y,_,b=function(){return(b=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 x(){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.UPDATE="model-update"}(o||(o={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu"}(a||(a={})),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"}(s||(s={})),function(t){t.CHANGE="zoom-domain-change"}(u||(u={})),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"}(l||(l={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(c||(c={})),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"}(h||(h={})),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"}(f||(f={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(d||(d={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(p||(p={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(g||(g={})),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"}(v||(v={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(m||(m={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(y||(y={})),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"}(_||(_={}));var w,O,E,S,T,M,A,C,D,P,k,L,R,I,N,V,B,j,G,U,z,H=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return o},get Toolbar(){return a},get ZoomBar(){return s},get ZoomDomain(){return u},get Axis(){return l},get Area(){return c},get Pie(){return h},get Gauge(){return f},get Bar(){return d},get Scatter(){return p},get Line(){return g},get Radar(){return v},get Tooltip(){return m},get Threshold(){return y},get Legend(){return _}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(w||(w={})),function(t){t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(O||(O={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(E||(E={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(S||(S={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(T||(T={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(M||(M={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(A||(A={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(C||(C={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(D||(D={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(P||(P={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(k||(k={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(L||(L={})),function(t){t.LEFT="left",t.RIGHT="right"}(R||(R={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(I||(I={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(N||(N={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(V||(V={})),function(t){t.SEMI="semi",t.FULL="full"}(B||(B={})),function(t){t.UP="up",t.DOWN="down"}(j||(j={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(G||(G={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(U||(U={})),function(t){t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom"}(z||(z={}));var F=Object.freeze({__proto__:null,get Roles(){return r},Events:H,get ChartTheme(){return w},get ColorClassNameTypes(){return O},get AxisPositions(){return E},get ZoomBarTypes(){return S},get TruncationTypes(){return T},get CartesianOrientations(){return M},get ScaleTypes(){return A},get LegendPositions(){return C},get Alignments(){return D},get LegendOrientations(){return P},get LayoutDirection(){return k},get LayoutGrowth(){return L},get CalloutDirections(){return R},get Skeletons(){return I},get TextAnchor(){return N},get DominantBaseline(){return V},get GaugeTypes(){return B},get ArrowDirections(){return j},get Statuses(){return G},get TickRotations(){return U},get ToolbarControlTypes(){return z}}),W="object"==typeof global&&global&&global.Object===Object&&global,Y="object"==typeof self&&self&&self.Object===Object&&self,X=W||Y||Function("return this")(),q=X.Symbol,Z=Object.prototype,K=Z.hasOwnProperty,$=Z.toString,Q=q?q.toStringTag:void 0;var J=Object.prototype.toString;var tt=q?q.toStringTag:void 0;function et(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":tt&&tt in Object(t)?function(t){var e=K.call(t,Q),n=t[Q];try{t[Q]=void 0;var r=!0}catch(t){}var i=$.call(t);return r&&(e?t[Q]=n:delete t[Q]),i}(t):function(t){return J.call(t)}(t)}function nt(t){return null!=t&&"object"==typeof t}function rt(t){return"symbol"==typeof t||nt(t)&&"[object Symbol]"==et(t)}function it(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 ot=Array.isArray,at=q?q.prototype:void 0,st=at?at.toString:void 0;function ut(t){if("string"==typeof t)return t;if(ot(t))return it(t,ut)+"";if(rt(t))return st?st.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function lt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ct=/^\s+|\s+$/g,ht=/^[-+]0x[0-9a-f]+$/i,ft=/^0b[01]+$/i,dt=/^0o[0-7]+$/i,pt=parseInt;function gt(t){if("number"==typeof t)return t;if(rt(t))return NaN;if(lt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=lt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ct,"");var n=ft.test(t);return n||dt.test(t)?pt(t.slice(2),n?2:8):ht.test(t)?NaN:+t}function vt(t){return t}function mt(t){if(!lt(t))return!1;var e=et(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var yt,_t=X["__core-js_shared__"],bt=(yt=/[^.]+$/.exec(_t&&_t.keys&&_t.keys.IE_PROTO||""))?"Symbol(src)_1."+yt:"";var xt=Function.prototype.toString;function wt(t){if(null!=t){try{return xt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Ot=/^\[object .+?Constructor\]$/,Et=Function.prototype,St=Object.prototype,Tt=Et.toString,Mt=St.hasOwnProperty,At=RegExp("^"+Tt.call(Mt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ct(t){return!(!lt(t)||(e=t,bt&&bt in e))&&(mt(t)?At:Ot).test(wt(t));var e}function Dt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Ct(n)?n:void 0}var Pt=Dt(X,"WeakMap"),kt=Object.create,Lt=function(){function t(){}return function(e){if(!lt(e))return{};if(kt)return kt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Rt(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 It(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Nt=Date.now;var Vt=function(){try{var t=Dt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Bt=function(t){var e=0,n=0;return function(){var r=Nt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Vt?function(t,e){return Vt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:vt);function jt(t){return t!=t}function Gt(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,jt,n)}(t,e,0)>-1}var Ut=/^(?:0|[1-9]\d*)$/;function zt(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Ut.test(t))&&t>-1&&t%1==0&&t<e}function Ht(t,e,n){"__proto__"==e&&Vt?Vt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Ft(t,e){return t===e||t!=t&&e!=e}var Wt=Object.prototype.hasOwnProperty;function Yt(t,e,n){var r=t[e];Wt.call(t,e)&&Ft(r,n)&&(void 0!==n||e in t)||Ht(t,e,n)}function Xt(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?Ht(n,s,u):Yt(n,s,u)}return n}var qt=Math.max;function Zt(t,e){return Bt(function(t,e,n){return e=qt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=qt(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),Rt(t,this,s)}}(t,e,vt),t+"")}function Kt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function $t(t){return null!=t&&Kt(t.length)&&!mt(t)}function Qt(t,e,n){if(!lt(n))return!1;var r=typeof e;return!!("number"==r?$t(n)&&zt(e,n.length):"string"==r&&e in n)&&Ft(n[e],t)}var Jt=Object.prototype;function te(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Jt)}function ee(t){return nt(t)&&"[object Arguments]"==et(t)}var ne=Object.prototype,re=ne.hasOwnProperty,ie=ne.propertyIsEnumerable,oe=ee(function(){return arguments}())?ee:function(t){return nt(t)&&re.call(t,"callee")&&!ie.call(t,"callee")};var ae="object"==typeof t&&t&&!t.nodeType&&t,se=ae&&"object"==typeof module&&module&&!module.nodeType&&module,ue=se&&se.exports===ae?X.Buffer:void 0,le=(ue?ue.isBuffer:void 0)||function(){return!1},ce={};function he(t){return function(e){return t(e)}}ce["[object Float32Array]"]=ce["[object Float64Array]"]=ce["[object Int8Array]"]=ce["[object Int16Array]"]=ce["[object Int32Array]"]=ce["[object Uint8Array]"]=ce["[object Uint8ClampedArray]"]=ce["[object Uint16Array]"]=ce["[object Uint32Array]"]=!0,ce["[object Arguments]"]=ce["[object Array]"]=ce["[object ArrayBuffer]"]=ce["[object Boolean]"]=ce["[object DataView]"]=ce["[object Date]"]=ce["[object Error]"]=ce["[object Function]"]=ce["[object Map]"]=ce["[object Number]"]=ce["[object Object]"]=ce["[object RegExp]"]=ce["[object Set]"]=ce["[object String]"]=ce["[object WeakMap]"]=!1;var fe="object"==typeof t&&t&&!t.nodeType&&t,de=fe&&"object"==typeof module&&module&&!module.nodeType&&module,pe=de&&de.exports===fe&&W.process,ge=function(){try{var t=de&&de.require&&de.require("util").types;return t||pe&&pe.binding&&pe.binding("util")}catch(t){}}(),ve=ge&&ge.isTypedArray,me=ve?he(ve):function(t){return nt(t)&&Kt(t.length)&&!!ce[et(t)]},ye=Object.prototype.hasOwnProperty;function _e(t,e){var n=ot(t),r=!n&&oe(t),i=!n&&!r&&le(t),o=!n&&!r&&!i&&me(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&&!ye.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||zt(l,u))||s.push(l);return s}function be(t,e){return function(n){return t(e(n))}}var xe=be(Object.keys,Object),we=Object.prototype.hasOwnProperty;function Oe(t){return $t(t)?_e(t):function(t){if(!te(t))return xe(t);var e=[];for(var n in Object(t))we.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var Ee=Object.prototype.hasOwnProperty;function Se(t){if(!lt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=te(t),n=[];for(var r in t)("constructor"!=r||!e&&Ee.call(t,r))&&n.push(r);return n}function Te(t){return $t(t)?_e(t,!0):Se(t)}var Me=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ae=/^\w*$/;function Ce(t,e){if(ot(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!rt(t))||(Ae.test(t)||!Me.test(t)||null!=e&&t in Object(e))}var De=Dt(Object,"create");var Pe=Object.prototype.hasOwnProperty;var ke=Object.prototype.hasOwnProperty;function Le(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Re(t,e){for(var n=t.length;n--;)if(Ft(t[n][0],e))return n;return-1}Le.prototype.clear=function(){this.__data__=De?De(null):{},this.size=0},Le.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Le.prototype.get=function(t){var e=this.__data__;if(De){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Pe.call(e,t)?e[t]:void 0},Le.prototype.has=function(t){var e=this.__data__;return De?void 0!==e[t]:ke.call(e,t)},Le.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=De&&void 0===e?"__lodash_hash_undefined__":e,this};var Ie=Array.prototype.splice;function Ne(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])}}Ne.prototype.clear=function(){this.__data__=[],this.size=0},Ne.prototype.delete=function(t){var e=this.__data__,n=Re(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ie.call(e,n,1),--this.size,!0)},Ne.prototype.get=function(t){var e=this.__data__,n=Re(e,t);return n<0?void 0:e[n][1]},Ne.prototype.has=function(t){return Re(this.__data__,t)>-1},Ne.prototype.set=function(t,e){var n=this.__data__,r=Re(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Ve=Dt(X,"Map");function Be(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 je(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])}}je.prototype.clear=function(){this.size=0,this.__data__={hash:new Le,map:new(Ve||Ne),string:new Le}},je.prototype.delete=function(t){var e=Be(this,t).delete(t);return this.size-=e?1:0,e},je.prototype.get=function(t){return Be(this,t).get(t)},je.prototype.has=function(t){return Be(this,t).has(t)},je.prototype.set=function(t,e){var n=Be(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Ge(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(Ge.Cache||je),n}Ge.Cache=je;var Ue=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ze=/\\(\\)?/g,He=function(t){var e=Ge(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(Ue,(function(t,n,r,i){e.push(r?i.replace(ze,"$1"):n||t)})),e}));function Fe(t){return null==t?"":ut(t)}function We(t,e){return ot(t)?t:Ce(t,e)?[t]:He(Fe(t))}function Ye(t){if("string"==typeof t||rt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Xe(t,e){for(var n=0,r=(e=We(e,t)).length;null!=t&&n<r;)t=t[Ye(e[n++])];return n&&n==r?t:void 0}function qe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Ze=q?q.isConcatSpreadable:void 0;function Ke(t){return ot(t)||oe(t)||!!(Ze&&t&&t[Ze])}var $e=be(Object.getPrototypeOf,Object),Qe=Function.prototype,Je=Object.prototype,tn=Qe.toString,en=Je.hasOwnProperty,nn=tn.call(Object);var rn=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"}),on=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,an=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var sn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var un=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var ln="\\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",cn="["+ln+"]",hn="\\d+",fn="[\\u2700-\\u27bf]",dn="[a-z\\xdf-\\xf6\\xf8-\\xff]",pn="[^\\ud800-\\udfff"+ln+hn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",gn="(?:\\ud83c[\\udde6-\\uddff]){2}",vn="[\\ud800-\\udbff][\\udc00-\\udfff]",mn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",yn="(?:"+dn+"|"+pn+")",_n="(?:"+mn+"|"+pn+")",bn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",xn="[\\ufe0e\\ufe0f]?"+bn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",gn,vn].join("|")+")[\\ufe0e\\ufe0f]?"+bn+")*"),wn="(?:"+[fn,gn,vn].join("|")+")"+xn,On=RegExp([mn+"?"+dn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[cn,mn,"$"].join("|")+")",_n+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[cn,mn+yn,"$"].join("|")+")",mn+"?"+yn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",mn+"+(?:['’](?: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_])",hn,wn].join("|"),"g");function En(t,e,n){return t=Fe(t),void 0===(e=n?void 0:e)?function(t){return un.test(t)}(t)?function(t){return t.match(On)||[]}(t):function(t){return t.match(sn)||[]}(t):t.match(e)||[]}var Sn=RegExp("['’]","g");function Tn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=gt(n))==n?n:0),void 0!==e&&(e=(e=gt(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}(gt(t),e,n)}function Mn(t){var e=this.__data__=new Ne(t);this.size=e.size}Mn.prototype.clear=function(){this.__data__=new Ne,this.size=0},Mn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Mn.prototype.get=function(t){return this.__data__.get(t)},Mn.prototype.has=function(t){return this.__data__.has(t)},Mn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ne){var r=n.__data__;if(!Ve||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new je(r)}return n.set(t,e),this.size=n.size,this};var An="object"==typeof t&&t&&!t.nodeType&&t,Cn=An&&"object"==typeof module&&module&&!module.nodeType&&module,Dn=Cn&&Cn.exports===An?X.Buffer:void 0,Pn=Dn?Dn.allocUnsafe:void 0;function kn(t,e){if(e)return t.slice();var n=t.length,r=Pn?Pn(n):new t.constructor(n);return t.copy(r),r}function Ln(){return[]}var Rn=Object.prototype.propertyIsEnumerable,In=Object.getOwnPropertySymbols,Nn=In?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}(In(t),(function(e){return Rn.call(t,e)})))}:Ln;var Vn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)qe(e,Nn(t)),t=$e(t);return e}:Ln;function Bn(t,e,n){var r=e(t);return ot(t)?r:qe(r,n(t))}function jn(t){return Bn(t,Oe,Nn)}function Gn(t){return Bn(t,Te,Vn)}var Un=Dt(X,"DataView"),zn=Dt(X,"Promise"),Hn=Dt(X,"Set"),Fn=wt(Un),Wn=wt(Ve),Yn=wt(zn),Xn=wt(Hn),qn=wt(Pt),Zn=et;(Un&&"[object DataView]"!=Zn(new Un(new ArrayBuffer(1)))||Ve&&"[object Map]"!=Zn(new Ve)||zn&&"[object Promise]"!=Zn(zn.resolve())||Hn&&"[object Set]"!=Zn(new Hn)||Pt&&"[object WeakMap]"!=Zn(new Pt))&&(Zn=function(t){var e=et(t),n="[object Object]"==e?t.constructor:void 0,r=n?wt(n):"";if(r)switch(r){case Fn:return"[object DataView]";case Wn:return"[object Map]";case Yn:return"[object Promise]";case Xn:return"[object Set]";case qn:return"[object WeakMap]"}return e});var Kn=Zn,$n=Object.prototype.hasOwnProperty;var Qn=X.Uint8Array;function Jn(t){var e=new t.constructor(t.byteLength);return new Qn(e).set(new Qn(t)),e}var tr=/\w*$/;var er=q?q.prototype:void 0,nr=er?er.valueOf:void 0;function rr(t,e){var n=e?Jn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function ir(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return Jn(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?Jn(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 rr(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,tr.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,nr?Object(nr.call(r)):{}}}function or(t){return"function"!=typeof t.constructor||te(t)?{}:Lt($e(t))}var ar=ge&&ge.isMap,sr=ar?he(ar):function(t){return nt(t)&&"[object Map]"==Kn(t)};var ur=ge&&ge.isSet,lr=ur?he(ur):function(t){return nt(t)&&"[object Set]"==Kn(t)},cr={};function hr(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(!lt(t))return t;var c=ot(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&$n.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return It(t,a)}else{var h=Kn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(le(t))return kn(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:or(t),!s)return u?function(t,e){return Xt(t,Vn(t),e)}(t,function(t,e){return t&&Xt(e,Te(e),t)}(a,t)):function(t,e){return Xt(t,Nn(t),e)}(t,function(t,e){return t&&Xt(e,Oe(e),t)}(a,t))}else{if(!cr[h])return i?t:{};a=ir(t,h,s)}}o||(o=new Mn);var d=o.get(t);if(d)return d;o.set(t,a),lr(t)?t.forEach((function(r){a.add(hr(r,e,n,r,t,o))})):sr(t)&&t.forEach((function(r,i){a.set(i,hr(r,e,n,i,t,o))}));var p=l?u?Gn:jn:u?keysIn:Oe,g=c?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),Yt(a,i,hr(r,e,n,i,t,o))})),a}cr["[object Arguments]"]=cr["[object Array]"]=cr["[object ArrayBuffer]"]=cr["[object DataView]"]=cr["[object Boolean]"]=cr["[object Date]"]=cr["[object Float32Array]"]=cr["[object Float64Array]"]=cr["[object Int8Array]"]=cr["[object Int16Array]"]=cr["[object Int32Array]"]=cr["[object Map]"]=cr["[object Number]"]=cr["[object Object]"]=cr["[object RegExp]"]=cr["[object Set]"]=cr["[object String]"]=cr["[object Symbol]"]=cr["[object Uint8Array]"]=cr["[object Uint8ClampedArray]"]=cr["[object Uint16Array]"]=cr["[object Uint32Array]"]=!0,cr["[object Error]"]=cr["[object Function]"]=cr["[object WeakMap]"]=!1;function fr(t){return hr(t,5)}function dr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new je;++e<n;)this.add(t[e])}function pr(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 gr(t,e){return t.has(e)}dr.prototype.add=dr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},dr.prototype.has=function(t){return this.__data__.has(t)};function vr(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);if(l&&o.get(e))return l==e;var c=-1,h=!0,f=2&n?new dr:void 0;for(o.set(t,e),o.set(e,t);++c<s;){var d=t[c],p=e[c];if(r)var g=a?r(p,d,c,e,t,o):r(d,p,c,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!pr(e,(function(t,e){if(!gr(f,e)&&(d===t||i(d,t,n,r,o)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function mr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function yr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var _r=q?q.prototype:void 0,br=_r?_r.valueOf:void 0;var xr=Object.prototype.hasOwnProperty;var wr=Object.prototype.hasOwnProperty;function Or(t,e,n,r,i,o){var a=ot(t),s=ot(e),u=a?"[object Array]":Kn(t),l=s?"[object Array]":Kn(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&&le(t)){if(!le(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new Mn),a||me(t)?vr(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 Qn(t),new Qn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ft(+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=mr;case"[object Set]":var u=1&r;if(s||(s=yr),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=vr(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(br)return br.call(t)==br.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var d=c&&wr.call(t,"__wrapped__"),p=h&&wr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new Mn),i(g,v,n,r,o)}}return!!f&&(o||(o=new Mn),function(t,e,n,r,i,o){var a=1&n,s=jn(t),u=s.length;if(u!=jn(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:xr.call(e,c)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var f=!0;o.set(t,e),o.set(e,t);for(var d=a;++l<u;){var p=t[c=s[l]],g=e[c];if(r)var v=a?r(g,p,c,e,t,o):r(p,g,c,t,e,o);if(!(void 0===v?p===g||i(p,g,n,r,o):v)){f=!1;break}d||(d="constructor"==c)}if(f&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function Er(t,e,n,r,i){return t===e||(null==t||null==e||!nt(t)&&!nt(e)?t!=t&&e!=e:Or(t,e,n,r,Er,i))}function Sr(t){return t==t&&!lt(t)}function Tr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Mr(t){var e=function(t){for(var e=Oe(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Sr(i)]}return e}(t);return 1==e.length&&e[0][2]?Tr(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 Mn;if(r)var f=r(l,c,u,t,e,h);if(!(void 0===f?Er(c,l,3,r,h):f))return!1}}return!0}(n,t,e)}}function Ar(t,e){return null!=t&&e in Object(t)}function Cr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=We(e,t)).length,o=!1;++r<i;){var a=Ye(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Kt(i)&&zt(a,i)&&(ot(t)||oe(t))}(t,e,Ar)}function Dr(t,e){return Ce(t)&&Sr(e)?Tr(Ye(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:Xe(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Cr(n,t):Er(e,r,3)}}function Pr(t){return Ce(t)?(e=Ye(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return Xe(e,t)}}(t);var e}function kr(t){return"function"==typeof t?t:null==t?vt:"object"==typeof t?ot(t)?Dr(t[0],t[1]):Mr(t):Pr(t)}var Lr,Rr=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Lr?a:++r];if(!1===e(i[s],s,i))break}return t};var Ir=function(t,e){return function(n,r){if(null==n)return n;if(!$t(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&&Rr(t,e,Oe)})),Nr=function(){return X.Date.now()},Vr=Math.max,Br=Math.min;function jr(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=Nr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Br(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=Nr(),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=gt(e)||0,lt(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Vr(gt(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(Nr())},y}function Gr(t,e,n){(void 0===n||Ft(t[e],n))&&(void 0!==n||e in t)||Ht(t,e,n)}function Ur(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function zr(t,e,n,r,i,o,a){var s=Ur(t,n),u=Ur(e,n),l=a.get(u);if(l)Gr(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=ot(u),p=!d&&le(u),g=!d&&!p&&me(u);h=u,d||p||g?ot(s)?h=s:nt(c=s)&&$t(c)?h=It(s):p?(f=!1,h=kn(u,!0)):g?(f=!1,h=rr(u,!0)):h=[]:function(t){if(!nt(t)||"[object Object]"!=et(t))return!1;var e=$e(t);if(null===e)return!0;var n=en.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&tn.call(n)==nn}(u)||oe(u)?(h=s,oe(s)?h=function(t){return Xt(t,Te(t))}(s):lt(s)&&!mt(s)||(h=or(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),Gr(t,n,h)}}function Hr(t,e,n,r,i){t!==e&&Rr(e,(function(o,a){if(i||(i=new Mn),lt(o))zr(t,e,a,n,Hr,r,i);else{var s=r?r(Ur(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),Gr(t,a,s)}}),Te)}function Fr(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 Wr(t,e){var n=-1,r=$t(t)?Array(t.length):[];return Ir(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Yr(t,e){return function t(e,n,r,i,o){var a=-1,s=e.length;for(r||(r=Ke),o||(o=[]);++a<s;){var u=e[a];n>0&&r(u)?n>1?t(u,n-1,r,i,o):qe(o,u):i||(o[o.length]=u)}return o}(function(t,e){return(ot(t)?it:Wr)(t,kr(e))}(t,e),1/0)}function Xr(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}function qr(t,e){return Er(t,e)}var Zr,Kr,$r=(Zr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){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}(En(function(t){return(t=Fe(t))&&t.replace(on,rn).replace(an,"")}(t).replace(Sn,"")),Zr,"")}),Qr=(Kr=function(t,e,n){Hr(t,e,n)},Zt((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=Kr.length>3&&"function"==typeof i?(r--,i):void 0,o&&Qt(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&Kr(t,a,n,i)}return t})));function Jr(t,e){var n;return Ir(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ti(t,e,n){var r=ot(t)?pr:Jr;return n&&Qt(t,e,n)&&(e=void 0),r(t,kr(e))}var ei=Hn&&1/yr(new Hn([,-0]))[1]==1/0?function(t){return new Hn(t)}:function(){};function ni(t){return t&&t.length?function(t,e,n){var r=-1,i=Gt,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Fr;else if(o>=200){var l=e?null:ei(t);if(l)return yr(l);a=!1,i=gr,u=new dr}else u=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}(t):[]}var ri="http://www.w3.org/1999/xhtml",ii={svg:"http://www.w3.org/2000/svg",xhtml:ri,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function oi(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ii.hasOwnProperty(e)?{space:ii[e],local:t}:t}function ai(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ri&&e.documentElement.namespaceURI===ri?e.createElement(t):e.createElementNS(n,t)}}function si(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ui(t){var e=oi(t);return(e.local?si:ai)(e)}function li(){}function ci(t){return null==t?li:function(){return this.querySelector(t)}}function hi(){return[]}function fi(t){return null==t?hi:function(){return this.querySelectorAll(t)}}function di(t){return function(){return this.matches(t)}}function pi(t){return new Array(t.length)}function gi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}gi.prototype={constructor:gi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function vi(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 gi(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function mi(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=l="$"+a.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):n[s]=new gi(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[d[s]]===u&&(i[s]=u)}function yi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function _i(t){return function(){this.removeAttribute(t)}}function bi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function xi(t,e){return function(){this.setAttribute(t,e)}}function wi(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Oi(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Ei(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 Si(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ti(t){return function(){this.style.removeProperty(t)}}function Mi(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Ai(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Ci(t,e){return t.style.getPropertyValue(e)||Si(t).getComputedStyle(t,null).getPropertyValue(e)}function Di(t){return function(){delete this[t]}}function Pi(t,e){return function(){this[t]=e}}function ki(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Li(t){return t.trim().split(/^|\s+/)}function Ri(t){return t.classList||new Ii(t)}function Ii(t){this._node=t,this._names=Li(t.getAttribute("class")||"")}function Ni(t,e){for(var n=Ri(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Vi(t,e){for(var n=Ri(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Bi(t){return function(){Ni(this,t)}}function ji(t){return function(){Vi(this,t)}}function Gi(t,e){return function(){(e.apply(this,arguments)?Ni:Vi)(this,t)}}function Ui(){this.textContent=""}function zi(t){return function(){this.textContent=t}}function Hi(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Fi(){this.innerHTML=""}function Wi(t){return function(){this.innerHTML=t}}function Yi(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Xi(){this.nextSibling&&this.parentNode.appendChild(this)}function qi(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Zi(){return null}function Ki(){var t=this.parentNode;t&&t.removeChild(this)}function $i(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Qi(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Ii.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 Ji={},to=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Ji={mouseenter:"mouseover",mouseleave:"mouseout"}));function eo(t,e,n){return t=no(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function no(t,e,n){return function(r){var i=to;to=r;try{t.call(this,this.__data__,e,n)}finally{to=i}}}function ro(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 io(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function oo(t,e,n){var r=Ji.hasOwnProperty(t.type)?eo:no;return function(i,o,a){var s,u=this.__on,l=r(e,o,a);if(u)for(var c=0,h=u.length;c<h;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function ao(t,e,n){var r=Si(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 so(t,e){return function(){return ao(this,t,e)}}function uo(t,e){return function(){return ao(this,t,e.apply(this,arguments))}}var lo,co=[null];function ho(t,e){this._groups=t,this._parents=e}function fo(){return new ho([[document.documentElement]],co)}function po(t){return"string"==typeof t?new ho([[document.querySelector(t)]],[document.documentElement]):new ho([[t]],co)}function go(){for(var t,e=to;t=e.sourceEvent;)e=t;return e}function vo(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function mo(t){var e=go();return e.changedTouches&&(e=e.changedTouches[0]),vo(t,e)}ho.prototype=fo.prototype={constructor:ho,select:function(t){"function"!=typeof t&&(t=ci(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 ho(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=fi(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 ho(r,i)},filter:function(t){"function"!=typeof t&&(t=di(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 ho(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),l=-1,this.each((function(t){d[++l]=t})),d;var n=e?mi:vi,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,d=t.call(c,c&&c.__data__,l,r),p=d.length,g=s[l]=new Array(p),v=a[l]=new Array(p);n(c,h,g,v,u[l]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new ho(a,r))._enter=s,a._exit=u,a},enter:function(){return new ho(this._enter||this._groups.map(pi),this._parents)},exit:function(){return new ho(this._exit||this._groups.map(pi),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new ho(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=yi);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 ho(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=oi(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?bi:_i:"function"==typeof e?n.local?Ei:Oi:n.local?wi:xi)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ti:"function"==typeof e?Ai:Mi)(t,e,null==n?"":n)):Ci(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Di:"function"==typeof e?ki:Pi)(t,e)):this.node()[t]},classed:function(t,e){var n=Li(t+"");if(arguments.length<2){for(var r=Ri(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Gi:e?Bi:ji)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ui:("function"==typeof t?Hi:zi)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Fi:("function"==typeof t?Yi:Wi)(t)):this.node().innerHTML},raise:function(){return this.each(Xi)},lower:function(){return this.each(qi)},append:function(t){var e="function"==typeof t?t:ui(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ui(t),r=null==e?Zi:"function"==typeof e?e:ci(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Ki)},clone:function(t){return this.select(t?Qi:$i)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=ro(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?oo:io,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?uo:so)(t,e))}},function(t){t.debounce=jr,t.clone=fr,t.merge=Qr,t.removeArrayDuplicates=ni,t.clamp=Tn,t.isEqual=qr,t.flatMapDeep=Yr,t.kebabCase=$r,t.fromPairs=Xr,t.some=ti,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,o=arguments;i.mousePosition=mo(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,o)}),e)}},t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)if(r.includes(i)){var o=n.axes[i];(o.primary||o.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var a=o.mapsTo;if(null==a){var s=o.scaleType;null==s?o.mapsTo="value":s===A.TIME?o.mapsTo="date":s===A.LABELS&&(o.mapsTo="key")}}else delete e.axes[i];return t.merge(e,n)},t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){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){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n%1!=0?parseFloat(n.toFixed(1)):n},t.truncateLabel=function(t,e,n){return n>t.length?t:e===T.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===T.FRONT_LINE?"..."+t.substr(-n):e===T.END_LINE?t.substr(0,n)+"...":void 0},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===M.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===M.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(lo||(lo={}));var yo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function _o(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function bo(t,e){return t(e={exports:{}},e.exports),e.exports}var xo=bo((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}));_o(xo);var wo=bo((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}));_o(wo);var Oo=bo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=wo)&&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}));_o(Oo);var Eo=bo((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}));_o(Eo);var So=bo((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}));_o(So);var To=bo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=So)&&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}));_o(To);var Mo=bo((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}));_o(Mo);var Ao=bo((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}));_o(Ao);var Co=bo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(Mo),r=i(Ao);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}));_o(Co);var Do,Po=_o(bo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(xo),r=s(Oo),i=s(Eo),o=s(To),a=s(Co);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}))),ko={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Lo={opacity:{unselected:0,selected:.4}},Ro={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},paddingRatio:.1},Io={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},No={opacity:{unselected:.3,selected:1}},Vo={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15}},Bo={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}},jo={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Go={default:{size:24}},Uo={horizontalOffset:10},zo={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}},Ho={buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},Fo={height:(Do={},Do[S.GRAPH_VIEW]=32,Do[S.SLIDER_VIEW]=10,Do),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Wo={type:T.END_LINE,threshold:16,numCharacter:14},Yo={x:{enabled:!0,numberOfTicks:15},y:{enabled:!0,numberOfTicks:5}},Xo={enabled:!0},qo={enabled:!0,showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:Wo},Zo={top:{visible:!0,includeZero:!0,truncation:Wo},bottom:{visible:!0,includeZero:!0,truncation:Wo},left:{visible:!0,includeZero:!0,truncation:Wo},right:{visible:!0,includeZero:!0,truncation:Wo}},Ko={addSpaceOnEdges:1,showDayName:!1,localeObject:Po,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"}}},$o={width:null,height:null,resizable:!0,tooltip:qo,legend:{enabled:!0,position:C.BOTTOM,clickable:!0,truncation:Wo,alignment:D.LEFT,order:null},style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}}},Qo=lo.merge({},$o,{axes:Zo,timeScale:Ko,grid:Yo,ruler:Xo,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:S.GRAPH_VIEW},updateRangeAxis:!1},toolbar:{enabled:!1,numberOfIcons:3,controls:[]}}),Jo=lo.merge({},Qo,{bars:{maxWidth:16},timeScale:lo.merge(Ko,{addSpaceOnEdges:1})}),ta=lo.merge({},Jo,{}),ea=lo.merge({},Jo,{}),na=lo.merge({},Jo,{bars:lo.merge({},Jo.bars,{dividerSize:1.5})}),ra=lo.merge({},Qo,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),ia=lo.merge({},ra,{points:{radius:3,filled:!1,enabled:!0}}),oa=lo.merge({},ia,{timeScale:lo.merge(Ko,{addSpaceOnEdges:0})}),aa=oa,sa=lo.merge({},Qo,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2,enabled:!0}}),ua=lo.merge({},$o,{pie:{labels:{formatter:null},alignment:D.LEFT}}),la=lo.merge({},$o,{legend:{enabled:!1},gauge:{type:B.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!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()}}}),ca={chart:$o,axisChart:Qo,simpleBarChart:ta,groupedBarChart:ea,stackedBarChart:na,bubbleChart:sa,lineChart:ia,areaChart:oa,stackedAreaChart:aa,scatterChart:ra,pieChart:ua,donutChart:lo.merge({},ua,{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:D.LEFT}}),meterChart:lo.merge({},$o,{legend:{enabled:!1},meter:{height:8,statusBar:{percentageIndicator:{enabled:!0}}}}),radarChart:lo.merge({},$o,{radar:{axes:{angle:"key",value:"value"},alignment:D.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:la},ha=Object.freeze({__proto__:null,grid:Yo,ruler:Xo,baseTooltip:qo,timeScale:Ko,options:ca,color:ko,area:Lo,axis:Ro,legend:Io,lines:No,meter:Vo,pie:Bo,radar:jo,spacers:Go,tooltips:Uo,transitions:zo,toolbar:Ho,zoomBar:Fo});function fa(){}function da(t,e){var n=new fa;if(t instanceof fa)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function pa(){}fa.prototype=da.prototype={constructor:fa,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var ga=da.prototype;function va(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ma(t){var e;return 1===t.length&&(e=t,t=function(t,n){return va(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}pa.prototype=function(t,e){var n=new pa;if(t instanceof pa)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:pa,has:ga.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ga.remove,clear:ga.clear,values:ga.keys,size:ga.size,empty:ga.empty,each:ga.each};var ya=ma(va).right;function _a(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function ba(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}var xa=Math.sqrt(50),wa=Math.sqrt(10),Oa=Math.sqrt(2);function Ea(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=Sa(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o}function Sa(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>=xa?10:o>=wa?5:o>=Oa?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=xa?10:o>=wa?5:o>=Oa?2:1)}function Ta(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>=xa?i*=10:o>=wa?i*=5:o>=Oa&&(i*=2),e<t?-i:i}function Ma(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r}function Aa(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Ca=Array.prototype,Da=Ca.map,Pa=Ca.slice,ka={name:"implicit"};function La(){var t=da(),e=[],n=[],r=ka;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==ka)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=da();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=Pa.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return La(e,n).unknown(r)},Aa.apply(i,arguments),i}function Ra(){var t,e,n=La().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],h=o[c-0],f=o[1-c];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var d=ba(n).map((function(e){return h+t*e}));return i(c?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),c()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,c()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),c()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),c()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,c()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},n.copy=function(){return Ra(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},Aa.apply(c(),arguments)}function Ia(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Na(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Va(){}var Ba="\\s*([+-]?\\d+)\\s*",ja="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ga="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ua=/^#([0-9a-f]{3,8})$/,za=new RegExp("^rgb\\("+[Ba,Ba,Ba]+"\\)$"),Ha=new RegExp("^rgb\\("+[Ga,Ga,Ga]+"\\)$"),Fa=new RegExp("^rgba\\("+[Ba,Ba,Ba,ja]+"\\)$"),Wa=new RegExp("^rgba\\("+[Ga,Ga,Ga,ja]+"\\)$"),Ya=new RegExp("^hsl\\("+[ja,Ga,Ga]+"\\)$"),Xa=new RegExp("^hsla\\("+[ja,Ga,Ga,ja]+"\\)$"),qa={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 Za(){return this.rgb().formatHex()}function Ka(){return this.rgb().formatRgb()}function $a(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Ua.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?Qa(e):3===n?new ns(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new ns(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new ns(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=za.exec(t))?new ns(e[1],e[2],e[3],1):(e=Ha.exec(t))?new ns(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Fa.exec(t))?Ja(e[1],e[2],e[3],e[4]):(e=Wa.exec(t))?Ja(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Ya.exec(t))?as(e[1],e[2]/100,e[3]/100,1):(e=Xa.exec(t))?as(e[1],e[2]/100,e[3]/100,e[4]):qa.hasOwnProperty(t)?Qa(qa[t]):"transparent"===t?new ns(NaN,NaN,NaN,0):null}function Qa(t){return new ns(t>>16&255,t>>8&255,255&t,1)}function Ja(t,e,n,r){return r<=0&&(t=e=n=NaN),new ns(t,e,n,r)}function ts(t){return t instanceof Va||(t=$a(t)),t?new ns((t=t.rgb()).r,t.g,t.b,t.opacity):new ns}function es(t,e,n,r){return 1===arguments.length?ts(t):new ns(t,e,n,null==r?1:r)}function ns(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function rs(){return"#"+os(this.r)+os(this.g)+os(this.b)}function is(){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 os(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function as(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new us(t,e,n,r)}function ss(t){if(t instanceof us)return new us(t.h,t.s,t.l,t.opacity);if(t instanceof Va||(t=$a(t)),!t)return new us;if(t instanceof us)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 us(a,s,u,t.opacity)}function us(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function ls(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function cs(t){return function(){return t}}function hs(t){return 1==(t=+t)?fs: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):cs(isNaN(e)?n:e)}}function fs(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):cs(isNaN(t)?e:t)}Ia(Va,$a,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Za,formatHex:Za,formatHsl:function(){return ss(this).formatHsl()},formatRgb:Ka,toString:Ka}),Ia(ns,es,Na(Va,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ns(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ns(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:rs,formatHex:rs,formatRgb:is,toString:is})),Ia(us,(function(t,e,n,r){return 1===arguments.length?ss(t):new us(t,e,n,null==r?1:r)}),Na(Va,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new us(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new us(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 ns(ls(t>=240?t-240:t+120,i,r),ls(t,i,r),ls(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 ds=function t(e){var n=hs(e);function r(t,e){var r=n((t=es(t)).r,(e=es(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=fs(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 ps(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 gs(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]=ws(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 vs(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ms(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ys(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]=ws(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var _s=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,bs=new RegExp(_s.source,"g");function xs(t,e){var n,r,i,o=_s.lastIndex=bs.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=_s.exec(t))&&(r=bs.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:ms(n,r)})),o=bs.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 ws(t,e){var n,r=typeof e;return null==e||"boolean"===r?cs(e):("number"===r?ms:"string"===r?(n=$a(e))?(e=n,ds):xs:e instanceof $a?ds:e instanceof Date?vs:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?ps:Array.isArray(e)?gs:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ys:ms)(t,e)}function Os(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Es,Ss,Ts,Ms,As=180/Math.PI,Cs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ds(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)*As,skewX:Math.atan(u)*As,scaleX:a,scaleY:s}}function Ps(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:ms(t,i)},{i:u-2,x:ms(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:ms(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:ms(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:ms(t,n)},{i:s-2,x:ms(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 ks=Ps((function(t){return"none"===t?Cs:(Es||(Es=document.createElement("DIV"),Ss=document.documentElement,Ts=document.defaultView),Es.style.transform=t,t=Ts.getComputedStyle(Ss.appendChild(Es),null).getPropertyValue("transform"),Ss.removeChild(Es),Ds(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Ls=Ps((function(t){return null==t?Cs:(Ms||(Ms=document.createElementNS("http://www.w3.org/2000/svg","g")),Ms.setAttribute("transform",t),(t=Ms.transform.baseVal.consolidate())?Ds((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Cs)}),", ",")",")");function Rs(t){return+t}var Is=[0,1];function Ns(t){return t}function Vs(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Bs(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function js(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Vs(i,r),o=n(a,o)):(r=Vs(r,i),o=n(o,a)),function(t){return o(r(t))}}function Gs(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]=Vs(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=ya(t,e,1,r)-1;return o[n](i[n](e))}}function Us(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function zs(){var t,e,n,r,i,o,a=Is,s=Is,u=ws,l=Ns;function c(){return r=Math.min(a.length,s.length)>2?Gs:js,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),ms)))(n)))},h.domain=function(t){return arguments.length?(a=Da.call(t,Rs),l===Ns||(l=Bs(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=Pa.call(t),c()):s.slice()},h.rangeRound=function(t){return s=Pa.call(t),u=Os,c()},h.clamp=function(t){return arguments.length?(l=t?Bs(a):Ns,h):l!==Ns},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 Hs(t,e){return zs()(t,e)}function Fs(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 Ws(t){return(t=Fs(Math.abs(t)))?t[1]:NaN}var Ys,Xs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function qs(t){if(!(e=Xs.exec(t)))throw new Error("invalid format: "+t);var e;return new Zs({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 Zs(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 Ks(t,e){var n=Fs(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")}qs.prototype=Zs.prototype,Zs.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 $s={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Ks(100*t,e)},r:Ks,s:function(t,e){var n=Fs(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(Ys=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")+Fs(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function Qs(t){return t}var Js,tu,eu,nu=Array.prototype.map,ru=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function iu(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Qs:(e=nu.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?Qs:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(nu.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=qs(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"):$s[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?o:/[%p]/.test(y)?u:"",x=$s[y],w=/[defgprs%]/.test(y);function O(t){var i,o,u,f=_,O=b;if("c"===y)O=x(t)+O,t="";else{var E=(t=+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&&(E=!1),f=(E?"("===h?h:l:"-"===h||"("===h?"":h)+f,O=("s"===y?ru[8+Ys/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 S=f.length+t.length+O.length,T=S<p?new Array(p-S+1).join(e):"";switch(g&&d&&(t=r(T+t,T.length?p-O.length:1/0),T=""),n){case"<":t=f+t+O+T;break;case"=":t=f+T+t+O;break;case"^":t=T.slice(0,S=T.length>>1)+f+t+O+T.slice(S);break;default:t=T+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=qs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Ws(e)/3))),i=Math.pow(10,-r),o=ru[8+r/3];return function(t){return n(i*t)+o}}}}function ou(t,e,n,r){var i,o=Ta(t,e,n);switch((r=qs(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(Ws(e)/3)))-Ws(Math.abs(t)))}(o,a))||(r.precision=i),eu(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,Ws(e)-Ws(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,-Ws(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return tu(r)}function au(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ea(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ou(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=Sa(s,u,n))>0?r=Sa(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Sa(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function su(){var t=Hs(Ns,Ns);return t.copy=function(){return Us(t,su())},Aa.apply(t,arguments),au(t)}function uu(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 lu(t){return Math.log(t)}function cu(t){return Math.exp(t)}function hu(t){return-Math.log(-t)}function fu(t){return-Math.exp(-t)}function du(t){return isFinite(t)?+("1e"+t):t<0?0:t}function pu(t){return function(e){return-t(-e)}}function gu(t){var e,n,r=t(lu,cu),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?du:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=pu(e),n=pu(n),t(hu,fu)):t(lu,cu),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var l,c,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(c=1,l=n(f);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(c=o-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=Ea(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=tu(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(uu(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}Js=iu({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),tu=Js.format,eu=Js.formatPrefix;var vu=new Date,mu=new Date;function yu(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 yu((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 vu.setTime(+e),mu.setTime(+r),t(vu),t(mu),Math.floor(n(vu,mu))},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 _u=yu((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));_u.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?yu((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):_u:null};var bu=yu((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()})),xu=yu((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()})),wu=yu((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()})),Ou=yu((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}));function Eu(t){return yu((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 Su=Eu(0),Tu=Eu(1),Mu=(Eu(2),Eu(3),Eu(4)),Au=(Eu(5),Eu(6),yu((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()}))),Cu=yu((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()}));Cu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?yu((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 Du=yu((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 Pu(t){return yu((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 ku=Pu(0),Lu=Pu(1),Ru=(Pu(2),Pu(3),Pu(4)),Iu=(Pu(5),Pu(6),yu((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));function Nu(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 Vu(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 Bu(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Iu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?yu((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var ju,Gu,Uu={"-":"",_:" ",0:"0"},zu=/^\s*\d+/,Hu=/^%/,Fu=/[\\^$*+?|[\]().{}]/g;function Wu(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 Yu(t){return t.replace(Fu,"\\$&")}function Xu(t){return new RegExp("^(?:"+t.map(Yu).join("|")+")","i")}function qu(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function Zu(t,e,n){var r=zu.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Ku(t,e,n){var r=zu.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function $u(t,e,n){var r=zu.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function Qu(t,e,n){var r=zu.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function Ju(t,e,n){var r=zu.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function tl(t,e,n){var r=zu.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function el(t,e,n){var r=zu.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function nl(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 rl(t,e,n){var r=zu.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function il(t,e,n){var r=zu.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function ol(t,e,n){var r=zu.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function al(t,e,n){var r=zu.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function sl(t,e,n){var r=zu.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function ul(t,e,n){var r=zu.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function ll(t,e,n){var r=zu.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function cl(t,e,n){var r=zu.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function hl(t,e,n){var r=zu.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function fl(t,e,n){var r=Hu.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function dl(t,e,n){var r=zu.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function pl(t,e,n){var r=zu.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function gl(t,e){return Wu(t.getDate(),e,2)}function vl(t,e){return Wu(t.getHours(),e,2)}function ml(t,e){return Wu(t.getHours()%12||12,e,2)}function yl(t,e){return Wu(1+Ou.count(Cu(t),t),e,3)}function _l(t,e){return Wu(t.getMilliseconds(),e,3)}function bl(t,e){return _l(t,e)+"000"}function xl(t,e){return Wu(t.getMonth()+1,e,2)}function wl(t,e){return Wu(t.getMinutes(),e,2)}function Ol(t,e){return Wu(t.getSeconds(),e,2)}function El(t){var e=t.getDay();return 0===e?7:e}function Sl(t,e){return Wu(Su.count(Cu(t)-1,t),e,2)}function Tl(t,e){var n=t.getDay();return t=n>=4||0===n?Mu(t):Mu.ceil(t),Wu(Mu.count(Cu(t),t)+(4===Cu(t).getDay()),e,2)}function Ml(t){return t.getDay()}function Al(t,e){return Wu(Tu.count(Cu(t)-1,t),e,2)}function Cl(t,e){return Wu(t.getFullYear()%100,e,2)}function Dl(t,e){return Wu(t.getFullYear()%1e4,e,4)}function Pl(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Wu(e/60|0,"0",2)+Wu(e%60,"0",2)}function kl(t,e){return Wu(t.getUTCDate(),e,2)}function Ll(t,e){return Wu(t.getUTCHours(),e,2)}function Rl(t,e){return Wu(t.getUTCHours()%12||12,e,2)}function Il(t,e){return Wu(1+Du.count(Iu(t),t),e,3)}function Nl(t,e){return Wu(t.getUTCMilliseconds(),e,3)}function Vl(t,e){return Nl(t,e)+"000"}function Bl(t,e){return Wu(t.getUTCMonth()+1,e,2)}function jl(t,e){return Wu(t.getUTCMinutes(),e,2)}function Gl(t,e){return Wu(t.getUTCSeconds(),e,2)}function Ul(t){var e=t.getUTCDay();return 0===e?7:e}function zl(t,e){return Wu(ku.count(Iu(t)-1,t),e,2)}function Hl(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Ru(t):Ru.ceil(t),Wu(Ru.count(Iu(t),t)+(4===Iu(t).getUTCDay()),e,2)}function Fl(t){return t.getUTCDay()}function Wl(t,e){return Wu(Lu.count(Iu(t)-1,t),e,2)}function Yl(t,e){return Wu(t.getUTCFullYear()%100,e,2)}function Xl(t,e){return Wu(t.getUTCFullYear()%1e4,e,4)}function ql(){return"+0000"}function Zl(){return"%"}function Kl(t){return+t}function $l(t){return Math.floor(+t/1e3)}!function(t){ju=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=Xu(i),c=qu(i),h=Xu(o),f=qu(o),d=Xu(a),p=qu(a),g=Xu(s),v=qu(s),m=Xu(u),y=qu(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:gl,e:gl,f:bl,H:vl,I:ml,j:yl,L:_l,m:xl,M:wl,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Kl,s:$l,S:Ol,u:El,U:Sl,V:Tl,w:Ml,W:Al,x:null,X:null,y:Cl,Y:Dl,Z:Pl,"%":Zl},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:kl,e:kl,f:Vl,H:Ll,I:Rl,j:Il,L:Nl,m:Bl,M:jl,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Kl,s:$l,S:Gl,u:Ul,U:zl,V:Hl,w:Fl,W:Wl,x:null,X:null,y:Yl,Y:Xl,Z:ql,"%":Zl},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:ol,e:ol,f:hl,H:sl,I:sl,j:al,L:cl,m:il,M:ul,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:rl,Q:dl,s:pl,S:ll,u:Ku,U:$u,V:Qu,w:Zu,W:Ju,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:el,Y:tl,Z:nl,"%":fl};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=Uu[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=Bu(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=Vu(Bu(o.y,0,1))).getUTCDay(),r=i>4||0===i?Lu.ceil(r):Lu(r),r=Du.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Nu(Bu(o.y,0,1))).getDay(),r=i>4||0===i?Tu.ceil(r):Tu(r),r=Ou.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?Vu(Bu(o.y,0,1)).getUTCDay():Nu(Bu(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,Vu(o)):Nu(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 Uu?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",_);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+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}})}(t),Gu=ju.format,ju.parse,ju.utcFormat,ju.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Ql(t){return new Date(t)}function Jl(t){return t instanceof Date?+t:+new Date(+t)}function tc(t,e,n,r,i,o,a,s,u){var l=Hs(Ns,Ns),c=l.invert,h=l.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function x(s){return(a(s)<s?f:o(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=ma((function(t){return t[2]})).right(b,o);a===b.length?(i=Ta(n/31536e6,r/31536e6,e),e=t):a?(i=(a=b[o/b[a-1][2]<b[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(Ta(n,r,e),1),e=s)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(c(t))},l.domain=function(t){return arguments.length?h(Da.call(t,Jl)):h().map(Ql)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(uu(n,t)):l},l.copy=function(){return Us(l,tc(t,e,n,r,i,o,a,s,u))},l}function ec(){return Aa.apply(tc(Cu,Au,Su,Ou,wu,xu,bu,_u,Gu).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var nc=Math.PI,rc=2*nc,ic=rc-1e-6;function oc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function ac(){return new oc}function sc(t){return function(){return t}}oc.prototype=ac.prototype={constructor:oc,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((nc-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%rc+rc),h>ic?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>=nc)+","+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 uc=Math.abs,lc=Math.atan2,cc=Math.cos,hc=Math.max,fc=Math.min,dc=Math.sin,pc=Math.sqrt,gc=Math.PI,vc=gc/2,mc=2*gc;function yc(t){return t>1?0:t<-1?gc:Math.acos(t)}function _c(t){return t>=1?vc:t<=-1?-vc:Math.asin(t)}function bc(t){return t.innerRadius}function xc(t){return t.outerRadius}function wc(t){return t.startAngle}function Oc(t){return t.endAngle}function Ec(t){return t&&t.padAngle}function Sc(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 Tc(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/pc(s*s+u*u),c=l*u,h=-l*s,f=t+c,d=e+h,p=n+c,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-o,w=f*g-p*d,O=(_<0?-1:1)*pc(hc(0,x*x*b-w*w)),E=(w*_-y*O)/b,S=(-w*y-_*O)/b,T=(w*_+y*O)/b,M=(-w*y+_*O)/b,A=E-v,C=S-m,D=T-v,P=M-m;return A*A+C*C>D*D+P*P&&(E=T,S=M),{cx:E,cy:S,x01:-c,y01:-h,x11:E*(i/x-1),y11:S*(i/x-1)}}function Mc(){var t=bc,e=xc,n=sc(0),r=null,i=wc,o=Oc,a=Ec,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-vc,d=o.apply(this,arguments)-vc,p=uc(d-f),g=d>f;if(s||(s=u=ac()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>mc-1e-12)s.moveTo(h*cc(f),h*dc(f)),s.arc(0,0,h,f,d,!g),c>1e-12&&(s.moveTo(c*cc(d),c*dc(d)),s.arc(0,0,c,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,O=p,E=a.apply(this,arguments)/2,S=E>1e-12&&(r?+r.apply(this,arguments):pc(c*c+h*h)),T=fc(uc(h-c)/2,+n.apply(this,arguments)),M=T,A=T;if(S>1e-12){var C=_c(S/c*dc(E)),D=_c(S/h*dc(E));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(O-=2*D)>1e-12?(y+=D*=g?1:-1,_-=D):(O=0,y=_=(f+d)/2)}var P=h*cc(y),k=h*dc(y),L=c*cc(x),R=c*dc(x);if(T>1e-12){var I,N=h*cc(_),V=h*dc(_),B=c*cc(b),j=c*dc(b);if(p<gc&&(I=Sc(P,k,B,j,N,V,L,R))){var G=P-I[0],U=k-I[1],z=N-I[0],H=V-I[1],F=1/dc(yc((G*z+U*H)/(pc(G*G+U*U)*pc(z*z+H*H)))/2),W=pc(I[0]*I[0]+I[1]*I[1]);M=fc(T,(c-W)/(F-1)),A=fc(T,(h-W)/(F+1))}}O>1e-12?A>1e-12?(v=Tc(B,j,P,k,h,A,g),m=Tc(N,V,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<T?s.arc(v.cx,v.cy,A,lc(v.y01,v.x01),lc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,lc(v.y01,v.x01),lc(v.y11,v.x11),!g),s.arc(0,0,h,lc(v.cy+v.y11,v.cx+v.x11),lc(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,lc(m.y11,m.x11),lc(m.y01,m.x01),!g))):(s.moveTo(P,k),s.arc(0,0,h,y,_,!g)):s.moveTo(P,k),c>1e-12&&w>1e-12?M>1e-12?(v=Tc(L,R,N,V,c,-M,g),m=Tc(P,k,B,j,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,lc(v.y01,v.x01),lc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,lc(v.y01,v.x01),lc(v.y11,v.x11),!g),s.arc(0,0,c,lc(v.cy+v.y11,v.cx+v.x11),lc(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,lc(m.y11,m.x11),lc(m.y01,m.x01),!g))):s.arc(0,0,c,x,b,g):s.lineTo(L,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-gc/2;return[cc(r)*n,dc(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:sc(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:sc(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:sc(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:sc(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:sc(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:sc(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:sc(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Ac(t){this._context=t}function Cc(t){return new Ac(t)}function Dc(t){return t[0]}function Pc(t){return t[1]}function kc(){var t=Dc,e=Pc,n=sc(!0),r=null,i=Cc,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=ac())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(l)return o=null,l+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:sc(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:sc(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:sc(!!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 Lc(){var t=Dc,e=null,n=sc(0),r=Pc,i=sc(!0),o=null,a=Cc,s=null;function u(u){var l,c,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==o&&(s=a(d=ac())),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]=+n(f,l,u),s.point(e?+e(f,l,u):v[l],r?+r(f,l,u):m[l]))}if(d)return s=null,d+""||null}function l(){return kc().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:sc(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:sc(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:sc(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:sc(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:sc(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:sc(+t),u):r},u.lineX0=u.lineY0=function(){return l().x(t).y(n)},u.lineY1=function(){return l().x(t).y(r)},u.lineX1=function(){return l().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:sc(!!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 Rc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Ic(t){return t}Ac.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 Nc=Bc(Cc);function Vc(t){this._curve=t}function Bc(t){function e(e){return new Vc(t(e))}return e._curve=t,e}function jc(){return t=kc().curve(Nc),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(Bc(t)):e()._curve},t;var t,e}Vc.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))}};var Gc=Array.prototype.slice;function Uc(){}function zc(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 Hc(t){this._context=t}function Fc(t){return new Hc(t)}function Wc(t){this._context=t}function Yc(t){return new Wc(t)}function Xc(t){this._context=t}function qc(t){return new Xc(t)}function Zc(t,e){this._basis=new Hc(t),this._beta=e}Hc.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:zc(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:zc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Wc.prototype={areaStart:Uc,areaEnd:Uc,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:zc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Xc.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:zc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Zc.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 Kc=function t(e){function n(t){return 1===e?new Hc(t):new Zc(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function $c(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 Qc(t,e){this._context=t,this._k=(1-e)/6}Qc.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:$c(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:$c(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 Jc=function t(e){function n(t){return new Qc(t,e)}return n.tension=function(e){return t(+e)},n}(0);function th(t,e){this._context=t,this._k=(1-e)/6}th.prototype={areaStart:Uc,areaEnd:Uc,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:$c(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 eh=function t(e){function n(t){return new th(t,e)}return n.tension=function(e){return t(+e)},n}(0);function nh(t,e){this._context=t,this._k=(1-e)/6}nh.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:$c(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 rh=function t(e){function n(t){return new nh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ih(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 oh(t,e){this._context=t,this._alpha=e}oh.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:ih(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 ah=function t(e){function n(t){return e?new oh(t,e):new Qc(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function sh(t,e){this._context=t,this._alpha=e}sh.prototype={areaStart:Uc,areaEnd:Uc,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:ih(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 uh=function t(e){function n(t){return e?new sh(t,e):new th(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function lh(t,e){this._context=t,this._alpha=e}lh.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:ih(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 ch=function t(e){function n(t){return e?new lh(t,e):new nh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function hh(t){this._context=t}function fh(t){return new hh(t)}function dh(t){return t<0?-1:1}function ph(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(dh(o)+dh(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function gh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function vh(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 mh(t){this._context=t}function yh(t){this._context=new _h(t)}function _h(t){this._context=t}function bh(t){return new mh(t)}function xh(t){return new yh(t)}function wh(t){this._context=t}function Oh(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 Eh(t){return new wh(t)}function Sh(t,e){this._context=t,this._t=e}function Th(t){return new Sh(t,.5)}function Mh(t){return new Sh(t,0)}function Ah(t){return new Sh(t,1)}function Ch(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 Dh(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Ph(t,e){return t[e]}hh.prototype={areaStart:Uc,areaEnd:Uc,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))}},mh.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:vh(this,this._t0,gh(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,vh(this,gh(this,n=ph(this,t,e)),n);break;default:vh(this,this._t0,n=ph(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(yh.prototype=Object.create(mh.prototype)).point=function(t,e){mh.prototype.point.call(this,e,t)},_h.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)}},wh.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=Oh(t),i=Oh(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)}},Sh.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 kh=function(){function t(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}return t.prototype.getAllDataFromDomain=function(){if(!this.get("data"))return null;var t=this.getDataGroups(),e=lo.clone(this.get("data")),n=this.getOptions().data.groupMapsTo,r=this.getOptions().axes;return r&&Object.keys(r).forEach((function(t){var n=r[t].mapsTo,i=r[t].scaleType;if(i!==A.LINEAR&&i!==A.LOG||(e=e.map((function(t){var e;return b(b({},t),((e={})[n]=Number(t[n]),e))}))),r[t].mapsTo&&r[t].domain)if(i===A.LABELS)e=e.filter((function(e){return r[t].domain.includes(e[n])}));else{var o=r[t].domain,a=o[0],s=o[1];e=e.filter((function(t){return t[n]>=a&&t[n]<=s}))}})),e.filter((function(e){return t.find((function(t){return t.name===e[n]}))}))},t.prototype.getDisplayData=function(){if(!this.get("data"))return null;var t=Io.items.status.ACTIVE,e=this.getDataGroups(),n=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain().filter((function(r){return e.find((function(e){return e.name===r[n]&&e.status===t}))}))},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(lo.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return lo.getProperty(this.getOptions(),"data","loading")?[]:this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=Io.items.status.ACTIVE;return this.getDataGroups().filter((function(e){return e.status===t}))},t.prototype.getDataGroupNames=function(){return this.getDataGroups().map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(){return this.getActiveDataGroups().map((function(t){return t.name}))},t.prototype.getGroupedData=function(){var t=this.getDisplayData(),e={},n=this.getOptions().data.groupMapsTo;return t.map((function(t){var r=t[n];null!==e[r]&&void 0!==e[r]?e[r].push(t):e[r]=[t]})),Object.keys(e).map((function(t){return{name:t,data:e[t]}}))},t.prototype.getDataValuesGroupedByKeys=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this.getDisplayData(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o=da(n,(function(t){return t[r]})).keys(),a=this.services.cartesianScales.domainAxisPosition,s=t.axes[a].scaleType;s===A.TIME?o.sort((function(t,e){return new Date(t)-new Date(e)})):s!==A.LOG&&s!==A.LINEAR||o.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return o.map((function(t){var o={sharedStackKey:t};return u.forEach((function(a){var s=n.find((function(n){return n[e]===a&&n[r].toString()===t}));o[a]=s?s[i]:null})),o}))},t.prototype.getStackedData=function(t){var e=(void 0===t?{percentage:!1}:t).percentage,n=this.getOptions().data.groupMapsTo,r=this.getDataGroupNames(),i=this.getDataValuesGroupedByKeys();if(e){var o=lo.fromPairs(i.map((function(t){return[t.sharedStackKey,0]})));i.forEach((function(t){r.forEach((function(e){o[t.sharedStackKey]+=t[e]}))})),i.forEach((function(t){r.forEach((function(e){o[t.sharedStackKey]?t[e]=t[e]/o[t.sharedStackKey]*100:t[e]=0}))}))}return function(){var t=sc([]),e=Dh,n=Ch,r=Ph;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var h,f=s[o],d=c[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(o=0,a=e(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:sc(Gc.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:sc(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Dh:"function"==typeof t?t:sc(Gc.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Ch:t,i):n},i}().keys(r)(i).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(i){var o=t[i];return o[n]=r[e],o}))}))},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){this.set({options:lo.merge(this.getOptions(),t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(H.Model.UPDATE,{animate:t}))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Io.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(H.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){if(!this.isUserProvidedColorScaleValid())return null;var r=this.getOptions(),i=this.getFillScale()(t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){if(!this.isUserProvidedColorScaleValid())return null;var r=this.getOptions(),i=this.colorScale(t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.isUserProvidedColorScaleValid=function(){var t=lo.getProperty(this.getOptions(),"color","scale"),e=this.getDataGroups();return!(null==t||Object.keys(t).length<e.length)&&e.every((function(e){return Object.keys(t).includes(e.name)}))},t.prototype.getColorClassName=function(t){if(this.isUserProvidedColorScaleValid())return t.originalClassName;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/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=lo.getProperty(t,"label");if(null===a){var s=lo.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.sanitizeDateValues=function(t){var e=this.getOptions();if(!e.axes)return t;var n=[];return Object.keys(E).forEach((function(t){var r=E[t],i=e.axes[r];if(i&&i.scaleType===A.TIME){var o=i.mapsTo;null===o&&void 0===o||n.push(o)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){void 0===t[e].getTime&&(t[e]=new Date(t[e]))}))})),t},t.prototype.sanitize=function(t){return t=this.getTabularData(t),t=this.sanitizeDateValues(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=Io.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=da(t,(function(t){return t[e]})).keys();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(){if(this.isUserProvidedColorScaleValid()){var t=this.getOptions(),e=lo.getProperty(t,"color","scale"),n=[];this.allDataGroups.forEach((function(t){e[t]&&n.push(e[t])})),this.colorScale=La().range(n).domain(this.allDataGroups)}},t.prototype.setColorClassNames=function(){var t=lo.getProperty(this.getOptions(),"color","pairing"),e=lo.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=lo.getProperty(t,"option"),r=e>5?14:e;n=n<=ko.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.isUserProvidedColorScaleValid()||(this.colorClassNames=La().range(i).domain(this.allDataGroups))},t}(),Lh=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}(),Rh={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 "},Ih=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}()}(),Nh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Vh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Bh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Vh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},jh=["top","right","bottom","left","width","height","size","weight"],Gh="undefined"!=typeof MutationObserver,Uh=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(){Bh(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)};Uh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Uh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Uh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Uh.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},Uh.prototype.connect_=function(){Nh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Gh?(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)},Uh.prototype.disconnect_=function(){Nh&&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)},Uh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),jh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Uh.getInstance=function(){return this.instance_||(this.instance_=new Uh),this.instance_},Uh.instance_=null;var zh=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},Hh=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Vh},Fh=Kh(0,0,0,0);function Wh(t){return parseFloat(t)||0}function Yh(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Wh(t["border-"+n+"-width"])}),0)}function Xh(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Fh;var r=Hh(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]=Wh(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Wh(r.width),u=Wh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=Yh(r,"left","right")+o),Math.round(u+a)!==n&&(u-=Yh(r,"top","bottom")+a)),!function(t){return t===Hh(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 Kh(i.left,i.top,s,u)}var qh="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Hh(t).SVGGraphicsElement}:function(t){return t instanceof Hh(t).SVGElement&&"function"==typeof t.getBBox};function Zh(t){return Nh?qh(t)?function(t){var e=t.getBBox();return Kh(0,0,e.width,e.height)}(t):Xh(t):Fh}function Kh(t,e,n,r){return{x:t,y:e,width:n,height:r}}var $h=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Kh(0,0,0,0),this.target=t};$h.prototype.isActive=function(){var t=Zh(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},$h.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var Qh=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 zh(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);zh(this,{target:t,contentRect:n})},Jh=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Ih,"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};Jh.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 Hh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new $h(t)),this.controller_.addObserver(this),this.controller_.refresh())}},Jh.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 Hh(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))}},Jh.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},Jh.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},Jh.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new Qh(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},Jh.prototype.clearActive=function(){this.activeObservations_.splice(0)},Jh.prototype.hasActive=function(){return this.activeObservations_.length>0};var tf="undefined"!=typeof WeakMap?new WeakMap:new Ih,ef=function(t){if(!(this instanceof ef))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=Uh.getInstance(),n=new Jh(t,e,this);tf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){ef.prototype[t]=function(){return(e=tf.get(this))[t].apply(e,arguments);var e}}));var nf=void 0!==Vh.ResizeObserver?Vh.ResizeObserver:ef,rf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=po(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:lo.getProperty(t.node(),"width","baseVal","value"),height:lo.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.getAlignmentOffset=function(t,n,r){var i=e.getSVGElementSize(n,{useBBox:!0}),o=e.getSVGElementSize(r,{useAttr:!0}).width,a=0;return t===D.CENTER?a=Math.floor((o-i.width)/2):t===D.RIGHT&&(a=o-i.width),a},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();po(this.getHolder()).classed(Rh.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.addSVGElement=function(){var t=this.model.getOptions(),e=lo.getProperty(t,"style","prefix"),n=po(this.getHolder()).append("svg").classed(Rh.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.svg=n.node()},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=po(t.svg).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(po(this.svg),{useBBox:!0}).height,n=po(this.svg).attr("class"),r=po(this.svg).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(po(t),{useBBox:!0}).height)})),i<=t?po(this.svg).attr("height",i):po(this.svg).attr("height","100%")}},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&po(e).on("mouseover",(function(){t.services.events.dispatchEvent(H.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(H.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=lo.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(H.Chart.RESIZE))}),12.5);new nf(i).observe(e)}},e}(Lh),of=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}(Lh),af={value:function(){}};function sf(){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 lf(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 cf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function hf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=af,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}uf.prototype=sf.prototype={constructor:uf,on:function(t,e){var n,r=this._,i=lf(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]=hf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=hf(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=cf(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 ff,df,pf=0,gf=0,vf=0,mf=0,yf=0,_f=0,bf="object"==typeof performance&&performance.now?performance:Date,xf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function wf(){return yf||(xf(Of),yf=bf.now()+_f)}function Of(){yf=0}function Ef(){this._call=this._time=this._next=null}function Sf(t,e,n){var r=new Ef;return r.restart(t,e,n),r}function Tf(){yf=(mf=bf.now())+_f,pf=gf=0;try{!function(){wf(),++pf;for(var t,e=ff;e;)(t=yf-e._time)>=0&&e._call.call(null,t),e=e._next;--pf}()}finally{pf=0,function(){var t,e,n=ff,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:ff=e);df=t,Af(r)}(),yf=0}}function Mf(){var t=bf.now(),e=t-mf;e>1e3&&(_f-=e,mf=t)}function Af(t){pf||(gf&&(gf=clearTimeout(gf)),t-yf>24?(t<1/0&&(gf=setTimeout(Tf,t-bf.now()-_f)),vf&&(vf=clearInterval(vf))):(vf||(mf=bf.now(),vf=setInterval(Mf,1e3)),pf=1,xf(Tf)))}function Cf(t,e,n){var r=new Ef;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Ef.prototype=Sf.prototype={constructor:Ef,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?wf():+n)+(null==e?0:+e),this._next||df===this||(df?df._next=this:ff=this,df=this),this._call=t,this._time=n,Af()},stop:function(){this._call&&(this._call=null,this._time=1/0,Af())}};var Df=sf("start","end","cancel","interrupt"),Pf=[];function kf(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 Cf(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(Cf((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=Sf((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:Df,tween:Pf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function Lf(t,e){var n=If(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Rf(t,e){var n=If(t,e);if(n.state>3)throw new Error("too late; already running");return n}function If(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Nf(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 Vf(t,e){var n,r;return function(){var i=Rf(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 Bf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Rf(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 jf(t,e,n){var r=t._id;return t.each((function(){var t=Rf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return If(t,r).value[e]}}function Gf(t,e){var n;return("number"==typeof e?ms:e instanceof $a?ds:(n=$a(e))?(e=n,ds):xs)(t,e)}function Uf(t){return function(){this.removeAttribute(t)}}function zf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Hf(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 Ff(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 Wf(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 Yf(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 Xf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function qf(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Zf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&qf(t,i)),n}return i._value=e,i}function Kf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Xf(t,i)),n}return i._value=e,i}function $f(t,e){return function(){Lf(this,t).delay=+e.apply(this,arguments)}}function Qf(t,e){return e=+e,function(){Lf(this,t).delay=e}}function Jf(t,e){return function(){Rf(this,t).duration=+e.apply(this,arguments)}}function td(t,e){return e=+e,function(){Rf(this,t).duration=e}}function ed(t,e){if("function"!=typeof e)throw new Error;return function(){Rf(this,t).ease=e}}function nd(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)?Lf:Rf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var rd=fo.prototype.constructor;function id(t){return function(){this.style.removeProperty(t)}}function od(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ad(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&od(t,o,n)),r}return o._value=e,o}function sd(t){return function(e){this.textContent=t.call(this,e)}}function ud(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&sd(r)),e}return r._value=t,r}var ld=0;function cd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function hd(t){return fo().transition(t)}function fd(){return++ld}var dd=fo.prototype;function pd(t){return+t}cd.prototype=hd.prototype={constructor:cd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ci(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,kf(h[f],e,n,f,h,If(s,n)));return new cd(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=fi(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=If(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&kf(f,e,n,g,d,p);o.push(d),a.push(u)}return new cd(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=di(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 cd(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 cd(a,this._parents,this._name,this._id)},selection:function(){return new rd(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=fd(),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=If(a,e);kf(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new cd(r,this._parents,t,n)},call:dd.call,nodes:dd.nodes,node:dd.node,size:dd.size,empty:dd.empty,each:dd.each,on:function(t,e){var n=this._id;return arguments.length<2?If(this.node(),n).on.on(t):this.each(nd(n,t,e))},attr:function(t,e){var n=oi(t),r="transform"===n?Ls:Gf;return this.attrTween(t,"function"==typeof e?(n.local?Yf:Wf)(n,r,jf(this,"attr."+t,e)):null==e?(n.local?zf:Uf)(n):(n.local?Ff:Hf)(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=oi(t);return this.tween(n,(r.local?Zf:Kf)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?ks:Gf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=Ci(this,t),a=(this.style.removeProperty(t),Ci(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,id(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=Ci(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Ci(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,jf(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Rf(this,t),l=u.on,c=null==u.value[a]?o||(o=id(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=Ci(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,ad(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}}(jf(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,ud(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=If(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?Vf:Bf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?$f:Qf)(e,t)):If(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Jf:td)(e,t)):If(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(ed(e,t)):If(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=Rf(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}))}))}};var gd={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function vd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return gd.time=wf(),gd;return n}fo.prototype.interrupt=function(t){return this.each((function(){Nf(this,t)}))},fo.prototype.transition=function(t){var e,n;t instanceof cd?(e=t._id,t=t._name):(e=fd(),(n=gd).time=wf(),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])&&kf(a,t,e,l,s,n||vd(a,e));return new cd(r,this._parents,t,e)};var md=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(H.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=hd(t).duration(lo.getProperty(zo,t,"duration")||zo.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=hd(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(Lh),yd=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").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}(Lh);function _d(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 bd(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 xd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t),r=bd(e);return n.setDate(n.getDate()+r),n}function wd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t).getTime(),r=bd(e);return new Date(n+r)}function Od(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return wd(t,36e5*n)}function Ed(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Sd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_d(t);return e.setHours(0,0,0,0),e}function Td(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Sd(t),r=Sd(e),i=n.getTime()-Ed(n),o=r.getTime()-Ed(r);return Math.round((i-o)/864e5)}function Md(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return wd(t,6e4*n)}function Ad(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_d(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 Cd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t),r=bd(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Ad(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function Dd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return wd(t,1e3*n)}function Pd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return Cd(t,12*n)}function kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t),r=_d(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Ld(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_d(t);return!isNaN(e)}function Rd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t),r=_d(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t),r=_d(e);return n.getFullYear()-r.getFullYear()}function Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t),r=_d(e);return n.getTime()-r.getTime()}function Vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nd(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Bd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nd(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var jd={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 Gd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Ud={date:Gd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Gd({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:Gd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},zd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Hd(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 Fd(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 Wd,Yd={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof jd[t]?jd[t]:1===e?jd[t].one:jd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Ud,formatRelative:function(t,e,n,r){return zd[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:Hd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Hd({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:Hd({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:Hd({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:Hd({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:(Wd={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(Wd.matchPattern);if(!i)return null;var o=i[0],a=n.match(Wd.parsePattern);if(!a)return null;var s=Wd.valueCallback?Wd.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Fd({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:Fd({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:Fd({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:Fd({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:Fd({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 Xd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return wd(t,-n)}function qd(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var Zd=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return qd("yy"===e?r%100:r,e.length)},Kd=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):qd(n+1,2)},$d=function(t,e){return qd(t.getUTCDate(),e.length)},Qd=function(t,e){return qd(t.getUTCHours()%12||12,e.length)},Jd=function(t,e){return qd(t.getUTCHours(),e.length)},tp=function(t,e){return qd(t.getUTCMinutes(),e.length)},ep=function(t,e){return qd(t.getUTCSeconds(),e.length)},np=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return qd(Math.floor(r*Math.pow(10,n-3)),e.length)};function rp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=_d(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 ip(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=_d(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=rp(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=rp(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function op(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=ip(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=rp(n);return r}function ap(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:bd(i),a=null==n.weekStartsOn?o:bd(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=_d(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 sp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=_d(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:bd(a),u=null==i.firstWeekContainsDate?s:bd(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=ap(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=ap(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function up(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:bd(i),a=null==n.firstWeekContainsDate?o:bd(n.firstWeekContainsDate),s=sp(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=ap(u,e);return l}var lp="midnight",cp="noon",hp="morning",fp="afternoon",dp="evening",pp="night",gp={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 Zd(t,e)},Y:function(t,e,n,r){var i=sp(t,r),o=i>0?i:1-i;return"YY"===e?qd(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):qd(o,e.length)},R:function(t,e){return qd(ip(t),e.length)},u:function(t,e){return qd(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 qd(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 qd(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 Kd(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 qd(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=_d(t),r=ap(n,e).getTime()-up(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):qd(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=_d(t),n=rp(e).getTime()-op(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):qd(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):$d(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=_d(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"}):qd(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 qd(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 qd(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 qd(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?cp:0===i?lp: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?dp:i>=12?fp:i>=4?hp:pp,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 Qd(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):Jd(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):qd(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):qd(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):tp(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):ep(t,e)},S:function(t,e){return np(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return mp(i);case"XXXX":case"XX":return yp(i);case"XXXXX":case"XXX":default:return yp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return mp(i);case"xxxx":case"xx":return yp(i);case"xxxxx":case"xxx":default:return yp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+vp(i,":");case"OOOO":default:return"GMT"+yp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+vp(i,":");case"zzzz":default:return"GMT"+yp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return qd(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return qd((r._originalDate||t).getTime(),e.length)}};function vp(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+qd(o,2)}function mp(t,e){return t%60==0?(t>0?"-":"+")+qd(Math.abs(t)/60,2):yp(t,e)}function yp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+qd(Math.floor(i/60),2)+n+qd(i%60,2)}function _p(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 bp(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 xp={p:bp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return _p(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}}",_p(i,e)).replace("{{time}}",bp(o,e))}},wp=["D","DD"],Op=["YY","YYYY"];function Ep(t){return-1!==wp.indexOf(t)}function Sp(t){return-1!==Op.indexOf(t)}function Tp(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 Mp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ap=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Cp=/^'([^]*?)'?$/,Dp=/''/g,Pp=/[a-zA-Z]/;function kp(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||Yd,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:bd(a),u=null==i.firstWeekContainsDate?s:bd(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:bd(l),h=null==i.weekStartsOn?c:bd(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=_d(t);if(!Ld(f))throw new RangeError("Invalid time value");var d=Ed(f),p=Xd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(Ap).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,xp[e])(t,o.formatLong,g):t})).join("").match(Mp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Lp(t);var n=gp[e];if(n)return!i.useAdditionalWeekYearTokens&&Sp(t)&&Tp(t),!i.useAdditionalDayOfYearTokens&&Ep(t)&&Tp(t),n(p,t,o.localize,g);if(e.match(Pp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Lp(t){return t.match(Cp)[1].replace(Dp,"'")}function Rp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return xd(t,-n)}function Ip(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return Od(t,-n)}function Np(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return Md(t,-n)}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return Cd(t,-n)}function Bp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return Dd(t,-n)}function jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=bd(e);return Pd(t,-n)}var Gp=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(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return lo.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.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(E).map((function(t){return E[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findMainVerticalAxisPosition(),e=this.findMainHorizontalAxisPosition(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.domainAxisPosition,this.rangeAxisPosition=n.rangeAxisPosition},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==E.LEFT&&this.rangeAxisPosition!==E.RIGHT||this.domainAxisPosition!==E.BOTTOM&&this.domainAxisPosition!==E.TOP?this.orientation=M.HORIZONTAL:this.orientation=M.VERTICAL},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=[E.BOTTOM,E.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[E.LEFT,E.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=lo.getProperty(a,"axes")[n].mapsTo,u=void 0!==r[s]?r[s]:r;switch(e){case A.LABELS:o=t(u)+t.step()/2;break;case A.TIME:o=t(new Date(u));break;default:o=t(u)}return o},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){return this.getValueThroughAxisPosition(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueThroughAxisPosition(this.rangeAxisPosition,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(){var t=this.model.getOptions();return lo.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return lo.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return lo.getProperty(n,"axes",t).scaleType===A.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=_d(t),r=_d(e),i=kd(n,r),o=Math.abs(Id(n,r));n.setFullYear(n.getFullYear()-i*o);var a=kd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[jp(n,e),Pd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t),r=_d(e),i=kd(n,r),o=Math.abs(Rd(n,r));n.setMonth(n.getMonth()-i*o);var a=kd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Vp(n,e),Cd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=_d(t),r=_d(e),i=kd(n,r),o=Math.abs(Td(n,r));n.setDate(n.getDate()-i*o);var a=kd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Rp(n,e),xd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Nd(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Ip(n,e),Od(r,e)];if(Vd(r,n)>30)return[Np(n,30*e),Md(r,30*e)];if(Vd(r,n)>1)return[Np(n,e),Md(r,e)];if(Bd(r,n)>15)return[Bp(n,15*e),Dd(r,15*e)];if(Bd(r,n)>1)return[Bp(n,e),Dd(r,e)];return[n,r]}(e,lo.getProperty(n,"timeScale","addSpaceOnEdges")):function(t,e){var n=t[0],r=t[1],i=(r-n)*e;return[n>=0&&n-i<0?0:n-i,r<=0&&r+i>0?0:r+i]}(e,Ro.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=lo.getProperty(t,"axes");return null===lo.getProperty(e,E.LEFT)&&null!==lo.getProperty(e,E.RIGHT)||!0===lo.getProperty(e,E.RIGHT,"main")?E.RIGHT:E.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=lo.getProperty(t,"axes");return null===lo.getProperty(e,E.BOTTOM)&&null!==lo.getProperty(e,E.TOP)||!0===lo.getProperty(e,E.TOP,"main")?E.TOP:E.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=lo.getProperty(n,"axes",t),i=lo.getProperty(n,"axes",e),o=r.scaleType||A.LINEAR,a=i.scaleType||A.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return a===A.LABELS||a===A.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):o===A.LABELS||o===A.TIME?(s.domainAxisPosition=t,s.rangeAxisPosition=e):(s.domainAxisPosition=e,s.rangeAxisPosition=t),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=lo.getProperty(e,"axes",t),r=n.includeZero,i=lo.getProperty(n,"scaleType")||A.LINEAR;if(this.model.isDataEmpty())return[];var o,a,s=this.model.getDisplayData(),u=n.mapsTo,l=n.percentage;if(n.domain)return i===A.LABELS?n.domain:this.extendsDomain(t,n.domain);if(l)return[0,100];if(n&&i===A.LABELS)return da(s,(function(t){return t[u]})).keys();n.stacked?a=this.services.zoom.filterDataForRangeAxis(this.model.getDataValuesGroupedByKeys(),{stacked:!0}).map((function(t){return function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):a=i===A.TIME?s.map((function(t){return t[u]})):this.services.zoom.filterDataForRangeAxis(s).map((function(t){return t[u]}));return i!==A.TIME&&r&&a.push(0),o=_a(a),o=this.extendsDomain(t,o)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=lo.getProperty(e,"axes",t);if(!n)return null;var r,i=lo.getProperty(n,"scaleType")||A.LINEAR;return this.scaleTypes[t]=i,(r=i===A.TIME?ec():i===A.LOG?function t(){var e=gu(zs()).domain([1,10]);return e.copy=function(){return Us(e,t()).base(e.base())},Aa.apply(e,arguments),e}().base(n.base||10):i===A.LABELS?Ra():su()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=lo.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)!==A.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=lo.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}(Lh);var Up,zp,Hp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Cc,curveLinearClosed:fh,curveBasis:Fc,curveBasisClosed:Yc,curveBasisOpen:qc,curveBundle:Kc,curveCardinal:Jc,curveCardinalClosed:eh,curveCardinalOpen:rh,curveCatmullRom:ah,curveCatmullRomClosed:uh,curveCatmullRomOpen:ch,curveMonotoneX:bh,curveMonotoneY:xh,curveNatural:Eh,curveStep:Th,curveStepAfter:Ah,curveStepBefore:Mh},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}(Lh),Fp=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(!lo.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=lo.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===E.BOTTOM&&e===A.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,_a(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(H.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return lo.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=lo.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=Fo.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())<lo.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 lo.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return lo.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(Lh),Wp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(po(this.services.domUtils.getMainSVG()))}return t.prototype.init=function(){},t.prototype.render=function(t){console.error("render() method is not implemented")},t.prototype.destroy=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t.prototype.setParent=function(t){var e=this.parent;if(this.parent=t,(!e||e.node()!==t.node())&&this.type){var n=lo.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Rh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Rh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=lo.getProperty(this.model.getOptions(),"style","prefix"),n=rf.appendOrSelect(this.parent,"g."+Rh.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var r=this.model.get("chartClipId");r&&n.attr("clip-path","url(#"+r+")")}return n}return this.parent},t}(),Yp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getContainerSVG().attr("role",r.GROUP).attr("data-name","legend-items"),n=this.model.getOptions(),i=lo.getProperty(n,"legend"),o=this.model.getDataGroups(),a=lo.getProperty(i,"order");a&&(o=this.sortDataGroups(o,a));var s=e.selectAll("g.legend-item").data(o,(function(t){return t.name})),u=s.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===Io.items.status.ACTIVE})),l=Io.checkbox.radius,c=lo.getProperty(i,"truncation","type"),h=lo.getProperty(i,"truncation","threshold"),f=lo.getProperty(i,"truncation","numCharacter"),d=lo.getProperty(n,"color","pairing","option");u.append("rect").classed("checkbox",!0).merge(s.select("rect.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",0).attr("aria-label",(function(t){return t.name})).attr("aria-checked",(function(t){return t.status===Io.items.status.ACTIVE})).attr("width",2*l).attr("height",2*l).attr("rx",1).attr("ry",1).attr("class",(function(e,n){if(d)return t.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:e.name,originalClassName:"checkbox"})})).style("fill",(function(e){return e.status===Io.items.status.ACTIVE?t.model.getFillColor(e.name):null})).classed("active",(function(t,e){return t.status===Io.items.status.ACTIVE}));var p=u.append("text").merge(s.select("text"));c!==T.NONE?p.html((function(t){return t.name.length>h?lo.truncateLabel(t.name,c,f):t.name})):p.html((function(t){return t.name})),this.breakItemsIntoLines(u),s.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var g=lo.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",g),g&&u.size()>0&&this.addEventListeners();var v=lo.getProperty(i,"alignment"),m=rf.getAlignmentOffset(v,e,this.getParent());e.attr("transform","translate("+m+", 0)")},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.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=Io.checkbox.radius,o=Io.items.horizontalSpace,a=Io.items.verticalSpace,s=Io.items.textYOffset,u=2*i+Io.checkbox.spaceAfter,l=Io.items.status.DISABLED,c=this.model.getDataGroups().some((function(t){return t.status===l})),h=lo.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var l=po(this),g=po(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===P.VERTICAL)h===P.VERTICAL&&0!==r&&d++;else{var v=rf.getSVGElementSize(e.parent,{useAttr:!0}),m=rf.getSVGElementSize(po(this).select("text"),{useBBox:!0}),y=rf.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+o)+u+m.width>v.width&&(d++,f=0,p=0)}l.select("rect.checkbox").attr("x",f).attr("y",0+d*a);var _=s+d*a;l.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===P.HORIZONTAL)&&"0"===l.select("rect.checkbox").attr("y"),x=h===P.VERTICAL&&"0"===l.select("rect.checkbox").attr("x"),w=b||x;c&&l.select("g.check").empty()&&w?(l.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),l.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(l.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(l.select("rect.checkbox").attr("y"))+.5)):c||l.select("g.check").empty()||l.select("g.check").remove(),p++}))},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions(),r=lo.getProperty(n,"legend"),i=lo.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(H.Legend.ITEM_HOVER,{hoveredElement:po(this)});var e=Io.checkbox.radius,n=po(this);n.select("rect.checkbox").classed("hovered",!0),n.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(n.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(n.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower();var r=n.datum();r.name.length>i&&t.services.events.dispatchEvent(H.Tooltip.SHOW,{hoveredElement:n,content:r.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(H.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(H.Legend.ITEM_CLICK,{clickedElement:po(this)});var e=po(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=po(this);e.select("rect.hover-stroke").remove(),e.select("rect.checkbox").classed("hovered",!1),t.services.events.dispatchEvent(H.Tooltip.HIDE),t.services.events.dispatchEvent(H.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("g.legend-item rect.checkbox").on("keyup",(function(e){!to.key||"Enter"!==to.key&&" "!==to.key||(to.preventDefault(),t.model.toggleDataLabel(e.name))}))},e}(Wp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(zp||(zp={}));var Xp=((Up={})[zp.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)}},Up[zp.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)}},Up[zp.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)}},Up[zp.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)}},Up),qp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},Zp=function(){function t(t){void 0===t&&(t={}),this.positions=Xp,this.positions=Object.assign({},Xp,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:qp.innerHeight-qp.scrollY,height:qp.innerWidth-qp.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}(),Kp=(new Zp,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function $p(t,e,n,r){var i=0===e,o=2===Number(kp(new Date(t),"c")),a=1===Number(kp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||eg(t)||ng(t)||rg(t);case"daily":return r?i||o||rg(t):i||ng(t)||rg(t);case"monthly":return i||rg(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function Qp(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=lo.getProperty(r,"timeIntervalFormats")[o],u=lo.getProperty(s,"primary"),l=lo.getProperty(s,"secondary");return kp(a,$p(t,e,n,i)?u:l,{locale:r.localeObject})}function Jp(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function tg(t){return 1===t.length?"15seconds":function(t){var e=Kp.reduce((function(e,n,r){n[0];var i=n[1],o=Kp[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Kp[e][0]}(function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function eg(t){var e=Jp(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function ng(t){var e=Jp(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function rg(t){var e=Jp(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 ig=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new Zp,i}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=this.configs,r=n.value,i=n.fillColor,o=n.axisPosition,a=n.index,s=lo.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Rh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=o+"-"+a,this.threshold=rf.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=rf.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),l=rf.appendOrSelect(this.threshold,"line.threshold-line");l.style("stroke",i);var c=this.services.cartesianScales.getScaleByPosition(o),h=this.services.cartesianScales.getScaleTypeByPosition(o),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===A.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],b=y[1],x=this.services.cartesianScales,w=x.getOrientation(),O=lo.flipDomainAndRangeBasedOnOrientation((function(t){return x.getDomainValue(t)}),(function(t){return x.getRangeValue(t)}),w),S=O[0],T=O[1];if(o===E.TOP||o===E.BOTTOM){var M=S(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+M+", "+b+")"),l.attr("y2",_-b),u.attr("width",_-b).classed("rotate",!0)}else{M=T(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+M+")"),l.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(H.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(H.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(){var t=this.configs,e=t.value,n=t.axisPosition,r=this.model.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===A.TIME){var i=[E.LEFT,E.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=lo.getProperty(r,"timeScale");return Qp(e,0,tg(s.ticks()),u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=this.configs,e=t.value,n=t.valueFormatter,r=t.fillColor,i=t.label,o=void 0===i?"Threshold":i,a=po(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=rf.appendOrSelect(a,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(o+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=mo(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[zp.RIGHT,zp.LEFT,zp.TOP,zp.BOTTOM],(function(){return{width:t.offsetWidth,height:t.offsetHeight}})),i=this.positionService.findPositionAt({left:n[0],top:n[1]},e,r);this.positionService.setElement(e,i)},e.prototype.addEventListeners=function(){var t=this;rf.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(H.Threshold.SHOW,{hoveredElement:po(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(H.Threshold.HIDE,{hoveredElement:po(t.threshold)})}))},e}(Wp),og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return n(e,t),e.prototype.render=function(){var t=this.getContainerSVG(),e=t.selectAll("text.title").data([this.model.getOptions().title]);e.enter().append("text").classed("title",!0).merge(e).attr("x",0).attr("y","1em").html((function(t){return t}));var n=this.getMaxTitleWidth(),r=rf.appendOrSelect(t,"text.title");r.node().getComputedTextLength()>n&&n>0&&this.truncateTitle(r,n),e.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(){a.services.events.dispatchEvent(H.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){a.services.events.dispatchEvent(H.Tooltip.MOVE)})).on("mouseout",(function(){a.services.events.dispatchEvent(H.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}(Wp),ag=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e}return n(e,t),e.prototype.render=function(){var t=this.model.getDisplayData(),e=this.model.getOptions(),n=this.getContainerSVG(),r=e.data.groupMapsTo,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.displayStatus=function(){var t=this.getContainerSVG(),e=(this.model.getOptions(),rf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0})),n=e.width?e.width:this.parent.node().getAttribute("width"),r=this.model.getStatus(),i=Vo.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=this.model.getDisplayData().value,e=this.getContainerSVG(),n=rf.appendOrSelect(e,"text.meter-title"),r=!0===lo.getProperty(this.model.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),o=Vo.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=Vo.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.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),e=t.width?t.width:this.parent.node().getAttribute("width"),n=rf.appendOrSelect(this.parent,"text.percent-value"),r=Vo.statusBar.paddingRight,i=n.node().getComputedTextLength(),o=rf.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(rf.getSVGElementSize(o,{useBBox:!0}).width+Vo.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case G.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 G.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case G.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}(og),sg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.isEventListenerAdded=!1,i.positionService=new Zp,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(lo.getProperty(i.model.getOptions(),"tooltip","customHTML"))if(t.detail.content){var o='<div class="title-tooltip">'+t.detail.content+"</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(H.Tooltip.MOVE,(function(e){t.positionTooltip(e)})),this.services.events.addEventListener(H.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(H.Tooltip.HIDE,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(H.Tooltip.MOVE,null),this.services.events.removeEventListener(H.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(H.Tooltip.HIDE,this.handleHideTooltip)},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this,n=this.model.getOptions(),r=lo.getProperty(n,"tooltip","truncation","type"),i=lo.getProperty(n,"tooltip","truncation","threshold"),o=lo.getProperty(n,"tooltip","truncation","numCharacter");return r!==T.NONE?t.map((function(t){return t.value=e.valueFormatter(t.value),t.label&&t.label.length>i&&(t.label=lo.truncateLabel(t.label,r,o)),t.value&&t.value.length>i&&(t.value=lo.truncateLabel(t.value,r,o)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip">'+t.detail.content+"</div>";else{var n=this.getItems(t),r=this.formatItems(n),i=this.model.isUserProvidedColorScaleValid();e="<ul class='multi-tooltip'>"+r.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&&!i?'<a class="tooltip-color '+t.class+'"></a>':"")+"\n\t\t\t\t\t\t\t\t"+(t.color&&i?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<p class="label">'+t.label+'</p>\n\t\t\t\t\t\t\t\t<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){var e=this.model.getOptions(),n=lo.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){var t=this.model.getOptions(),e=lo.getProperty(t,"tooltip","enabled");if(e){var n=po(this.services.domUtils.getHolder()),r=lo.getProperty(t,"style","prefix");this.tooltip=rf.appendOrSelect(n,"div."+Rh.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.model.getOptions(),o=lo.getProperty(i,"zoomBar","top","enabled"),a=lo.getProperty(t,"detail","mousePosition");if(a){var s=lo.getProperty(i,"zoomBar","top","type"),u=Fo.height[s];o&&(a[1]+=u+Fo.spacerHeight)}else a=mo(n);var l=this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[zp.RIGHT,zp.LEFT,zp.TOP,zp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),c=Uo.horizontalOffset;l===zp.LEFT&&(c*=-1),e=this.positionService.findPositionAt({left:a[0]+c,top:a[1]},r,l),this.positionService.setElement(r,e)},e}(Wp),ug=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=this.model.getOptions(),i=this.services.cartesianScales,o=i.getDomainAxisOptions(),a=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=i.getRangeAxisOptions(),l=i.getRangeIdentifier(),c=(i.getRangeAxisScaleType(),r.data.groupMapsTo),h=o.title;if(!h){var f=i.getDomainAxisPosition();h=f===E.BOTTOM||f===E.TOP?"x-value":"y-value"}var d,p=n[0][a];if(s===A.TIME?p=kp(new Date(n[0][a]),"MMM d, yyyy"):s===A.LINEAR&&(p=p.toLocaleString()),1===n.length){var g=n[0],v=u.title;if(!v){var m=i.getRangeAxisPosition();v=m===E.LEFT||m===E.RIGHT?"y-value":"x-value"}d=[{label:h,value:p},{label:v,value:g[l]},{label:r.tooltip.groupLabel||"Group",value:g[c],color:this.model.getFillColor(g[c]),class:this.model.getColorClassName({classNameTypes:[O.TOOLTIP],dataGroupName:g[c]})}]}else n.length>1&&(d=(d=[{label:h,value:this.valueFormatter(p)}]).concat(n.map((function(t){return{label:t[c],value:e.valueFormatter(t[l]),color:e.model.getFillColor(t[c]),class:e.model.getColorClassName({classNameTypes:[O.TOOLTIP],dataGroupName:t[c]})}})).sort((function(t,e){return e.value-t.value}))),!0===lo.getProperty(r,"tooltip","showTotal")&&d.push({label:r.tooltip.totalLabel||"Total",value:this.valueFormatter(n.reduce((function(t,e){return t+e[l]}),0)),bold:!0}));return d},e}(sg),lg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",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?Lo.opacity.unselected:Lo.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Lo.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),r=[0,0],i=this.services.cartesianScales,o=i.getOrientation(),a=Lc().curve(this.services.curves.getD3Curve());o===M.VERTICAL?(a.x((function(t,e){return i.getDomainValue(t,e)})).y0(i.getRangeValue(0)).y1((function(t,e){return i.getRangeValue(t,e)})),r=this.services.cartesianScales.getMainYScale().domain()):(a.x0(i.getRangeValue(0)).x1((function(t,e){return i.getRangeValue(t,e)})).y((function(t,e){return i.getDomainValue(t,e)})),r=this.services.cartesianScales.getMainXScale().domain());var s=this.model.getGroupedData(),u=lo.getProperty(this.model.getOptions(),"color","gradient","enabled"),l=s&&1===s.length&&u;s.length>1&&u&&console.error("Gradients can only be enabled when having 1 single dataset");var c=n.selectAll("path.area").data(s,(function(t){return t.name})),h=lo.getProperty(this.model.getOptions(),"style","prefix"),f=rf.appendOrSelect(po(this.services.domUtils.getHolder()),"svg."+Rh.prefix+"--"+h+"--chart-svg").select("path."+this.model.getColorClassName({classNameTypes:[O.STROKE],dataGroupName:s[0].name})).node(),d=f?getComputedStyle(f,null).getPropertyValue("stroke"):null;l&&d?yd.appendOrUpdateLinearGradient({svg:this.parent,id:s[0].name.replace(" ","")+"_"+this.gradient_id,x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:yd.getStops(r,d)}):this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()})),c.exit().attr("opacity",0).remove();var p=this,g=c.enter().append("path");l?g.merge(c).style("fill",(function(t){return"url(#"+t.name.replace(" ","")+"_"+e.gradient_id+")"})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return a(e)})):g.attr("opacity",0).merge(c).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("fill",(function(t){return p.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Lo.opacity.selected).attr("d",(function(t){var e=t.data;return a(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wp),cg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t[0][r]!==n.datum().name?Lo.opacity.unselected:Lo.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Lo.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this,o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.services.cartesianScales.getMainXScale(),u=this.services.cartesianScales.getMainYScale(),l=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(l)===A.TIME){var c=Object.keys(o.axes).some((function(t){return o.axes[t].percentage})),h=this.model.getStackedData({percentage:c}),f=n.selectAll("path.area").data(h,(function(t){return t[0][a]}));this.areaGenerator=Lc().x((function(t){return s(new Date(t.data.sharedStackKey))})).y0((function(t){return u(t[0])})).y1((function(t){return u(t[1])})).curve(this.services.curves.getD3Curve()),f.exit().attr("opacity",0).remove(),f.enter().append("path").attr("opacity",0).merge(f).data(h,(function(t){return t[0][a]})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[0][a],originalClassName:"area"})})).attr("fill",(function(t){return i.model.getFillColor(t[0][a])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Lo.opacity.selected).attr("d",this.areaGenerator)}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Wp),hg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.model.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}(Wp),fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG({withinChartClip:!0}).selectAll("path.bar").data(this.model.getDisplayData(),(function(t){return t[n]}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[n],originalClassName:"bar"})})).attr("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r=e.getBarWidth(),i=e.services.cartesianScales.getDomainValue(t,n)-r/2,o=i+r,a=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);if(!e.isOutsideZoomedDomain(i,o))return lo.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},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){var n=po(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(H.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){po(this);t.services.events.dispatchEvent(H.Bar.BAR_MOUSEMOVE,{element:po(this),datum:e}),t.services.events.dispatchEvent(H.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(H.Bar.BAR_CLICK,{element:po(this),datum:e})})).on("mouseout",(function(e){var n=po(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(H.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.HIDE,{hoveredElement:n})}))},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(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(hg),dg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.padding=5,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var a=this.getContainerSVG({withinChartClip:!0}),s=da(n,(function(t){return t[o]})).keys(),u=a.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===M.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[i],originalClassName:"bar"})})).attr("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.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);if(!e.isOutsideZoomedDomain(r,o))return lo.generateSVGPathString({x0:r,x1:o,y0:a,y1:s},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){var n=po(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(H.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){var n=po(this);t.services.events.dispatchEvent(H.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(H.Bar.BAR_CLICK,{element:po(this),datum:e})})).on("mouseout",(function(e){var n=po(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(H.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.HIDE,{hoveredElement:n})}))},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(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier();return e.filter((function(e){return e[n]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getActiveDataGroupNames().length,e=this.getTotalGroupPadding();return this.getBarWidth()*t+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getActiveDataGroupNames().length;if(1===t)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t-1)},e.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=lo.getProperty(t,"bars","width"),n=lo.getProperty(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=Ra().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(hg),pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG({withinChartClip:!0}),i=(this.model.getDisplayData(),this.model.getOptions()),o=i.data.groupMapsTo,a=(this.services.cartesianScales.getDomainIdentifier(),this.model.getStackedData()),s=n.selectAll("g.bars").data(a,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars");var u=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));u.exit().remove(),u.enter().append("path").merge(u).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[o],originalClassName:"bar"})})).attr("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,s=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),l=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(a,s))return Math.abs(l-u)>0&&Math.abs(l-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===M.VERTICAL?l+=1:l-=1),lo.generateSVGPathString({x0:a,x1:s,y0:u,y1:l},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.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r,i=po(this);i.classed("hovered",!0),i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")),e.services.events.dispatchEvent(H.Bar.BAR_MOUSEOVER,{element:i,datum:n});var o=e.model.getDisplayData(),a=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier(),u=o.find((function(e){return e[s]===n.data[n.group]&&e[a].toString()===n.data.sharedStackKey&&e[t]===n.group}));void 0===u&&((r={})[a]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,u=r),e.services.events.dispatchEvent(H.Tooltip.SHOW,{hoveredElement:i,data:[u]})})).on("mousemove",(function(t){var n=po(this);e.services.events.dispatchEvent(H.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(H.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(H.Bar.BAR_CLICK,{element:po(this),datum:t})})).on("mouseout",(function(t){var n=po(this);n.classed("hovered",!1),e.services.events.dispatchEvent(H.Bar.BAR_MOUSEOUT,{element:n,datum:t}),e.services.events.dispatchEvent(H.Tooltip.HIDE,{hoveredElement:n})}))},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(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(hg),gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",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.model.getOptions().data.groupMapsTo;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(H.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(H.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(),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.render=function(t){if(lo.getProperty(this.model.getOptions(),"points","enabled")||lo.getProperty(this.model.getOptions(),"bubble","enabled")){var e,n=this.getContainerSVG({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),a=this.services.cartesianScales.getRangeIdentifier();if(this.configs.stacked){var s=Object.keys(r.axes).some((function(t){return r.axes[t].percentage}));e=this.model.getStackedData({percentage:s})}else e=this.model.getDisplayData().filter((function(t){return void 0!==t[a]&&null!==t[a]}));e=this.filterBasedOnZoomDomain(e);var u=n.selectAll("circle.dot").data(e,(function(t){return t[i]+"-"+t[o]}));u.exit().attr("opacity",0).remove();var l=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u);this.styleCircles(l,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=lo.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=lo.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.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.model.getOptions(),o=i.points,a=o.filled,s=o.fillOpacity,u=this.services,l=u.cartesianScales,c=u.transitions,h=i.data.groupMapsTo,f=l.getDomainIdentifier(),d=l.getRangeIdentifier(),p=lo.flipDomainAndRangeBasedOnOrientation((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),g=p[0],v=p[1],m=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=n.model.getIsFilled(t[h],t[f],t,a)?[O.FILL,O.STROKE]:[O.STROKE];return n.model.getColorClassName({classNameTypes:e,dataGroupName:t[h],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[h],t[f],t,a)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[h],t[f],t,a)})).transition(c.getTransition("scatter-update-enter",e)).attr("cx",g).attr("cy",v).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[h],t[f],t,a))return n.model.getFillColor(t[h],t[f],t)})).attr("fill-opacity",a?s:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[h],t[f],t)})).attr("opacity",m?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[d]})),this.addEventListeners()},e.prototype.getTooltipData=function(t,e){var n=this;return this.model.getDisplayData().filter((function(r){return t===n.services.cartesianScales.getDomainValue(r)&&e===n.services.cartesianScales.getRangeValue(r)}))},e.prototype.addEventListeners=function(){var t=this,e=t.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover",(function(r){var i=po(this);i.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:n[e],originalClassName:i.attr("class")})})).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)})).classed("unfilled",!1);var o=t.services.cartesianScales.getDomainValue(r),a=t.services.cartesianScales.getRangeValue(r),s=t.getTooltipData(o,a);t.services.events.dispatchEvent(H.Tooltip.SHOW,{hoveredElement:i,data:s}),t.services.events.dispatchEvent(H.Scatter.SCATTER_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=po(this);t.services.events.dispatchEvent(H.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(H.Scatter.SCATTER_CLICK,{element:po(this),datum:e})})).on("mouseout",(function(e){var n=po(this);n.classed("hovered",!1),t.configs.filled||"1"!==n.attr("fill-opacity")||(n.classed("unfilled",!0),n.style("fill",null)),t.services.events.dispatchEvent(H.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(H.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(H.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Wp),vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return n(e,t),e.prototype.getRadiusScale=function(t){var e=this.model.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=rf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=i.length>0,s=a?_a(i):[1,1];return su().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales.getDomainIdentifier();t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return a(t[o]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[O.FILL,O.STROKE],dataGroupName:t[s],originalClassName:"dot"})})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)},e}(gg),mg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?No.opacity.unselected:No.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",No.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this.services,o=i.cartesianScales,a=i.curves,s=lo.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.model.getOptions(),h=kc().x(u).y(l).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];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,g=this.model.getStackedData({percentage:d}),v=this.services.cartesianScales.getDomainIdentifier(),m=this.services.cartesianScales.getRangeIdentifier();f=g.map((function(t){return{name:t[0][p],data:t.map((function(t){var e;return(e={})[v]=t.data.sharedStackKey,e[p]=t[p],e[m]=t[1],e})),hidden:!lo.some(t,(function(t){return t[0]!==t[1]}))}}))}else f=this.model.getGroupedData();var y=n.selectAll("path.line").data(f,(function(t){return t.name}));y.exit().attr("opacity",0).remove(),y.enter().append("path").classed("line",!0).attr("opacity",0).merge(y).data(f,(function(t){return t.name})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.STROKE],dataGroupName:t.name,originalClassName:"line"})})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){var n=t.data,r=e.services.cartesianScales.getRangeIdentifier();return n.map((function(t){return t[r]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",(function(t){return t.hidden?0:1})).attr("stroke",(function(t){return e.model.getStrokeColor(t.name)})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Wp),yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e}return n(e,t),e.prototype.render=function(t){if(lo.getProperty(this.model.getOptions(),"points","enabled")){var e=this.getContainerSVG({withinChartClip:!0}),n=this.model.getOptions(),i=n.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),a=this.services.cartesianScales.getRangeIdentifier(),s=Object.keys(n.axes).some((function(t){return n.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),l=e.selectAll("g.dots").data(u,(function(t){return t[0][i]}));l.exit().attr("opacity",0).remove();var c=l.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(l).selectAll("circle.dot").data((function(t){return t}));c.exit().attr("opacity",0).remove();var h=c.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(c).datum((function(t){var e,n=t[i];return(e={})[i]=n,e[o]=t.data.sharedStackKey,e[a]=t[1],e}));this.styleCircles(h,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=Object.keys(o.axes).some((function(t){return o.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),l=[];return u.forEach((function(o,u){o.forEach((function(o,c){var h,f=o[a],d=o.data.sharedStackKey,p=o.data[f],g=o[1];null!=p&&t===n.services.cartesianScales.getDomainValue(d)&&e===n.services.cartesianScales.getRangeValue(g)&&(s&&(p=n.model.getStackedData()[u][c].data[f]),null!==p&&l.push(((h={})[a]=f,h[r]=d,h[i]=p,h)))}))})),this.model.getDisplayData().filter((function(t){return void 0!==l.find((function(e){return e[a]==t[a]&&e[r]==t[r]&&e[i]==t[i]}))}))},e}(gg);function _g(t,e){var n=this,r=ws(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return Bo.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),o=this.model.getDisplayData(),a=this.model.getOptions(),s=a.data.groupMapsTo,u=this.computeRadius();this.arc=Mc().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=Mc().innerRadius(this.getInnerRadius()).outerRadius(u+Bo.hoverArc.outerRadiusOffset);var l=function(){var t=Ic,e=Rc,n=null,r=sc(0),i=sc(mc),o=sc(0);function a(a){var s,u,l,c,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(mc,Math.max(-mc,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,l=d?(m-f*_)/d:0;s<f;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:sc(+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:sc(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:sc(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:sc(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(Bo.padAngle)(o).sort((function(t,e){return t.index-e.index})),c=rf.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,(function(t){return t.data[s]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t.data[s],originalClassName:"slice"})})).attr("fill",(function(t){return n.model.getFillColor(t.data[s])})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+lo.convertValueToPercentage(t.data.value,o)+"%"})).attrTween("d",(function(t){return _g.bind(this)(t,n.arc)}));var h=l.filter((function(t){return t.value>0})),f=rf.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(h,(function(t){return t.data[s]}));f.exit().attr("opacity",0).remove();var d=f.enter().append("text").classed("pie-label",!0),p=[];d.merge(f).style("text-anchor","middle").text((function(t){return a.pie.labels.formatter?a.pie.labels.formatter(t):lo.convertValueToPercentage(t.data.value,o)+"%"})).datum((function(t){var e=u+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=h.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<Bo.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+Bo.callout.offsetX+Bo.callout.textMargin+t.textOffsetX,o=t.yPosition-Bo.callout.offsetY,t.direction=R.RIGHT,p.push(t)):(i=t.xPosition-Bo.callout.offsetX-t.textOffsetX-Bo.callout.textMargin,o=t.yPosition-Bo.callout.offsetY,t.direction=R.LEFT,p.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(p);var g=lo.getProperty(a,"donut")?"donut":"pie",v=lo.getProperty(a,g,"alignment"),m=rf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,y=u+Bo.xOffset;v===D.CENTER?y=m/2:v===D.RIGHT&&(y=m-u-Bo.xOffset);var _=u+Bo.yOffset;p.length>0&&(_+=Bo.yOffsetCallout),i.attr("transform","translate("+y+", "+_+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=rf.appendOrSelect(this.getContainerSVG(),"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===R.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+Bo.callout.offsetX,y:n-Bo.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-Bo.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-Bo.callout.offsetX,y:n-Bo.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+Bo.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return po(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 po(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){var n=po(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(H.Pie.SLICE_MOUSEOVER,{element:po(this),datum:e});var r=t.model.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(H.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value}]})})).on("mousemove",(function(e){var n=po(this);t.services.events.dispatchEvent(H.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(H.Pie.SLICE_CLICK,{element:po(this),datum:e})})).on("mouseout",(function(e){var n=po(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(H.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=rf.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Bo.radiusOffset},e}(Wp),xg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e}return n(e,t),e.prototype.init=function(){this.services.events},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 lo.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.model.getOptions();return lo.getProperty(t,"gauge","type")===B.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.model.getOptions();switch(lo.getProperty(e,"gauge","deltaArrow","direction")){case j.UP:return"4,10 8,6 12,10";case j.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.getContainerSVG(),i=this.model.getOptions().data.groupMapsTo,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=Mc().innerRadius(f).outerRadius(h).startAngle(l).endAngle(c),this.arc=Mc().innerRadius(f).outerRadius(h).startAngle(u).endAngle(l),rf.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:[O.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",this.arc).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),n.attr("transform","translate("+h+", "+h+")"),this.drawValueNumber(),this.drawDelta(),d.exit().remove(),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=lo.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=lo.getProperty(e,"gauge","valueFontSize"),s=lo.getProperty(e,"gauge","deltaFontSize"),u=lo.getProperty(e,"gauge","numberSpacing"),l=0;n!==B.FULL||i?n===B.SEMI&&i&&(l=-(s(o)+u)):l=s(o);var c=rf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+l+")"),h=rf.appendOrSelect(c,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=lo.getProperty(e,"gauge","numberFormatter"),d=h.selectAll("text.gauge-value-number").data([r]);d.enter().append("text").attr("class","gauge-value-number").merge(d).style("font-size",a(o)+"px").attr("text-anchor","middle").text((function(t){return f(t)}));var p=rf.getSVGElementSize(rf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;rf.appendOrSelect(h,"text.gauge-value-symbol").style("font-size",a(o)/2+"px").attr("x",p/2).text("%")},e.prototype.drawDelta=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=this.getDelta(),r=this.computeRadius(),i=n?lo.getProperty(e,"gauge","deltaFontSize"):function(){return 0},o=n?lo.getProperty(e,"gauge","numberFormatter"):function(){return null},a=lo.getProperty(e,"gauge","deltaArrow","size"),s=lo.getProperty(e,"gauge","numberSpacing"),u=rf.appendOrSelect(t,"g.gauge-numbers"),l=rf.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),c=rf.appendOrSelect(l,"text.gauge-delta-number");c.data(null===n?[]:[n]),c.enter().append("text").classed("gauge-delta-number",!0).merge(c).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return o(t)+"%"}));var h=rf.getSVGElementSize(rf.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=lo.getProperty(e,"gauge","deltaArrow","enabled"),d=l.selectAll("svg.gauge-delta-arrow").data(null!==n&&f?[n]:[]);d.enter().append("svg").merge(d).attr("class","gauge-delta-arrow").attr("x",-a(r)-h/2).attr("y",-a(r)/2-.35*i(r)).attr("width",a(r)).attr("height",a(r)).attr("viewBox","0 0 16 16"),rf.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=lo.getProperty(e,"gauge","status");rf.appendOrSelect(d,"polygon.gauge-delta-arrow").attr("class",null!==p?"gauge-delta-arrow status--"+p:"").attr("fill",(function(){return null===p?"currentColor":null})).attr("points",this.getArrow(n)),d.exit().remove(),c.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-lo.getProperty(this.model.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e){t.services.events.dispatchEvent(H.Gauge.ARC_MOUSEOVER,{element:po(this),datum:e})})).on("mousemove",(function(e){var n=po(this);t.services.events.dispatchEvent(H.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(H.Gauge.ARC_CLICK,{element:po(this),datum:e})})).on("mouseout",(function(e){var n=po(this);t.services.events.dispatchEvent(H.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=lo.getProperty(t,"gauge","type"),n=rf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===B.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Wp),wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this;if(this.model.isDataEmpty())this.getContainerSVG().select("g.center").remove();else{var r=rf.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();rf.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(po(this))})),rf.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text(lo.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=lo.getProperty(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,e){return t+e.value}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?Os:ms)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(bg),Og=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=this.parent,e=t.node().parentNode,n=rf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var o=lo.getProperty(this.model.getOptions(),"data","loading");o?this.renderSkeleton(o):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===I.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===I.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===I.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==I.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===M.VERTICAL&&this.drawYGrid(t),e===M.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=su().domain([0,1]).range(t),this.yScale=su().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=rf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;this.backdrop=rf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",o);var a=rf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");a.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],l=(s[1],this.yScale.range()),c=(l[0],l[1]);this.backdrop.merge(a).attr("x",u).attr("y",c),a.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=lo.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),o=rf.appendOrSelect(this.backdrop,"g.x.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),o.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=lo.getProperty(this.model.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.node().parentNode,{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=lo.getProperty(this.model.getOptions(),u,"alignment");rf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none");var c=Mc().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(Bo.radiusOffset),f=t+(Math.min(o,a)-2*t)/2,d=rf.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+Bo.xOffset;l===D.CENTER?p=o/2:l===D.RIGHT&&(p=o-t-Bo.xOffset);var g=t+Bo.yOffset;d.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=rf.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Bo.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(pd).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Wp),Eg=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=this.parent,n=e.node().parentNode,r=rf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;e.attr("width",i).attr("height",o);var a=lo.getProperty(this.model.getOptions(),"data","loading"),s=!(lo.getProperty(this.model.getOptions(),"grid","x","enabled")||lo.getProperty(this.model.getOptions(),"grid","y","enabled")||lo.getProperty(this.model.getOptions(),"axes","bottom","visible")||lo.getProperty(this.model.getOptions(),"axes","left","visible"));a&&!s?t.prototype.renderGridSkeleton.call(this,a):a&&s?this.renderSparklineSkeleton(a):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}(Og),Sg=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(){rf.appendOrSelect(this.getContainerSVG(),"rect").attr("x",0).attr("y",0).attr("width",this.configs.size||Go.default.size).attr("height",this.configs.size||Go.default.size).attr("opacity",0)},e}(Wp);function Tg(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 Mg(t,e){var n,r,i,o,a,s=new Pg(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Ag);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Pg(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(Dg)}function Ag(t){return t.children}function Cg(t){t.data=t.data.data}function Dg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Pg(t){this.data=t,this.depth=this.height=0,this.parent=null}function kg(t){if("function"!=typeof t)throw new Error;return t}function Lg(){return 0}function Rg(t){return function(){return t}}function Ig(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 Ng(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 Vg(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}Pg.prototype=Mg.prototype={constructor:Pg,count:function(){return this.eachAfter(Tg)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Mg(this).eachBefore(Cg)}};var Bg=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,l,c,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,l=o-r;do{c=y[b++].value}while(!c&&b<x);for(h=f=c,v=c*c*(g=Math.max(l/u,u/l)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(c+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=c*c*g,(d=Math.max(f/v,v/h))>p){c-=s;break}p=d}m.push(a={value:c,dice:u<l,children:y.slice(_,b)}),a.dice?Ng(a,n,r,i,w?r+=l*c/w:o):Vg(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);function jg(){var t=Bg,e=!1,n=1,r=1,i=[0],o=Lg,a=Lg,s=Lg,u=Lg,l=Lg;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Ig),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=kg(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:Rg(+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:Rg(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Rg(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Rg(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:Rg(+t),c):l},c}var Gg=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===k.ROW_REVERSE||a.configs.direction===k.COLUMN_REVERSE)&&(a.children=a.children.reverse()),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("svg.layout-child-"+this._instanceID).filter((function(t){var e=lo.getProperty(t,"data","growth","x");return e===L.PREFERRED||e===L.FIXED})).each((function(t){e+=t.data.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){return lo.getProperty(t,"data","growth","x")===L.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=rf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=Mg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===k.ROW||this.configs.direction===k.ROW_REVERSE?Ng:Vg;jg().tile(s).size([i,o])(a);var u=this.configs.direction===k.ROW||this.configs.direction===k.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));l.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),l.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(po(n));var i=lo.getProperty(e,"data","growth","x");i!==L.PREFERRED&&i!==L.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=lo.getProperty(t,"data","growth","x"),n=rf.getSVGElementSize(po(this),{useBBox:!0});if("legend"===t.data.id){var r=rf.getSVGElementSize(po(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===L.PREFERRED){var a=u?n.width:n.height,s=u?i:o;t.data.size=a/s*100}})),l.exit().remove(),this.children.filter((function(t){return lo.getProperty(t,"growth","x")===L.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=Mg({children:this.children}).sum((function(t){return t.size})),jg().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){lo.getProperty(e,"data","growth","x")===L.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}(Wp),Ug=Array.prototype.slice;function zg(t){return t}function Hg(t){return"translate("+(t+.5)+",0)"}function Fg(t){return"translate(0,"+(t+.5)+")"}function Wg(t){return function(e){return+t(e)}}function Yg(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Xg(){return!this.__axis}function qg(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?Hg:Fg;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):zg:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?Yg:Wg)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),O=x.enter().append("g").attr("class","tick"),E=x.select("line"),S=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(O),E=E.merge(O.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),S=S.merge(O.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),E=E.transition(h),S=S.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),O.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),E.attr(l+"2",u*o),S.attr(l,u*p).text(d),_.filter(Xg).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Ug.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Ug.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Ug.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function Zg(t){return qg(1,t)}function Kg(t){return qg(2,t)}function $g(t){return qg(3,t)}function Qg(t){return qg(4,t)}var Jg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",r&&(i.configs=r),i.margins=i.configs.margins,i}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e,n,i=this.configs.position,o=this.model.getOptions(),a=lo.getProperty(o,"axes",i,"visible"),s=this.getContainerSVG(),u=rf.getSVGElementSize(this.parent,{useAttrs:!0}),l=u.width,c=u.height,h=rf.appendOrSelect(s,"g.axis."+i);i===E.BOTTOM||i===E.TOP?(e=this.configs.axes[E.LEFT]?this.margins.left:0,n=this.configs.axes[E.RIGHT]?l-this.margins.right:l):(e=c-this.margins.bottom,n=this.margins.top);var f,d=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===A.LABELS?d.rangeRound([e,n]):d.range([e,n]),i){case E.LEFT:f=Qg;break;case E.BOTTOM:f=$g;break;case E.RIGHT:f=Kg;break;case E.TOP:f=Zg}h.attr("aria-label",i+" axis");var p=!h.select("g.ticks").empty(),g=rf.appendOrSelect(h,"g.ticks");p||(g.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),g.attr("aria-label",i+" ticks"));var v=rf.appendOrSelect(h,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),m=lo.getProperty(o,"axes",i),y=this.scaleType===A.TIME||m.scaleType===A.TIME,_=i===E.LEFT||i===E.RIGHT,b=this.model.get("zoomDomain");if(b&&y&&!_&&d.domain(b),a){var x=lo.getProperty(m,"scaleType"),w=lo.getProperty(o,"data","loading"),O=lo.getProperty(m,"ticks","number"),S=lo.getProperty(m,"ticks","values"),M=lo.getProperty(m,"truncation","type"),C=lo.getProperty(m,"truncation","threshold"),D=lo.getProperty(m,"truncation","numCharacter"),P=null!==O,k=lo.getProperty(o,"timeScale"),L=rf.appendOrSelect(v,"g.tick"),R=rf.appendOrSelect(L,"text").text("0"),I=rf.getSVGElementSize(R.node(),{useBBox:!0}).height;L.remove();var N,V=this.scaleType||m.scaleType||A.LINEAR,B=f(d).tickSizeOuter(0);if(d.ticks){var j=void 0;if(P?j=O:(j=Ro.ticks.number,_&&(j=this.getNumberOfFittingTicks(c,I,Ro.ticks.verticalSpaceRatio))),1===d.ticks().length&&0===d.ticks()[0]&&(j=0),B.ticks(j),y)if(d.ticks(j).length){var G=lo.getProperty(o,"timeScale","addSpaceOnEdges"),z=lo.getProperty(o,"axes",i,"domain"),H=void 0,F=d.copy();G&&!z&&F.nice(j),H=F.ticks(j),G&&H.length>2&&!z&&(H.splice(H.length-1,1),H.splice(0,1)),B.tickValues(H)}else B.tickValues([])}var W=lo.getProperty(m,"ticks","formatter");if(y){var Y=tg(B.tickValues());N=null===W?function(t,e){return Qp(t,e,Y,k)}:function(t,e){var n=Qp(t,e,Y,k);return W(t,e,n)}}else null===W?V===A.LINEAR&&(N=function(t){return t.toLocaleString()}):N=W;B.tickFormat(N);var X,q=this.services.cartesianScales.getScaleByPosition(i).domain(),Z=q[0],K=q[1];if(S){if(y)S.forEach((function(t,e){void 0===t.getTime&&(S[e]=new Date(t))})),X=S.filter((function(t){var e=t.getTime();return e>=new Date(Z).getTime()&&e<=new Date(K).getTime()}));else if(x===A.LABELS){var $=this.services.cartesianScales.getScaleByPosition(i).domain();X=S.filter((function(t){return $.includes(t)}))}else X=S.filter((function(t){return t>=Z&&t<=K}));B.tickValues(X)}switch(i){case E.LEFT:g.attr("transform","translate("+this.margins.left+", 0)");break;case E.BOTTOM:g.attr("transform","translate(0, "+(c-this.margins.bottom)+")");break;case E.RIGHT:g.attr("transform","translate("+(l-this.margins.right)+", 0)");break;case E.TOP:g.attr("transform","translate(0, "+this.margins.top+")")}var Q=this.model.isDataEmpty();if(m.title){var J=rf.appendOrSelect(h,"text.axis-title").html(Q||w?"":m.title);switch(i){case E.LEFT:J.attr("transform","rotate(-90)").attr("y",0).attr("x",-d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case E.BOTTOM:J.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+c+")").style("text-anchor","middle");break;case E.RIGHT:J.attr("transform","rotate(90)").attr("y",-l).attr("x",d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case E.TOP:var tt=rf.getSVGElementSize(J,{useBBox:!0}).height;J.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+tt/2+")").style("text-anchor","middle")}}if(y){var et=tg(B.tickValues()),nt=k.showDayName,rt=g;t&&(g=g.transition(this.services.transitions.getTransition("axis-update",t))),g=g.call(B),rt.selectAll(".tick").data(B.tickValues(),d).order().select("text").style("font-weight",(function(t,e){return $p(t,e,et,nt)?"bold":"normal"}))}else g=t&&p?g.transition(this.services.transitions.getTransition("axis-update")).call(B):g.call(B);if(v.call(B),i===E.BOTTOM||i===E.TOP){var it=!1,ot=lo.getProperty(m,"ticks","rotation");if(ot===U.ALWAYS)it=!0;else if(ot===U.NEVER)it=!1;else if(!ot||ot===U.AUTO)if(d.step){it=v.selectAll("g.tick text").nodes().some((function(t){return rf.getSVGElementSize(t,{useBBox:!0}).width>=d.step()}))}else{var at=lo.getProperty(m,"ticks","rotateIfSmallerThan")||Ro.ticks.rotateIfSmallerThan,st=l/(y?B.tickValues().length:d.ticks().length)/2;it=y?st<2*at:st<at}it?(P||(B.ticks(this.getNumberOfFittingTicks(l,I,Ro.ticks.horizontalSpaceRatio)),v.call(B),g.call(B)),h.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===E.TOP?"start":"end")):h.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(w?h.attr("opacity",0):h.attr("opacity",1),g.selectAll("g.tick").attr("aria-label",(function(t){return t})),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),M!==T.NONE&&x===A.LABELS&&!S){var ut=this.model.getDataValuesGroupedByKeys();if(ut.length>0){var lt=ut.map((function(t){return t.sharedStackKey})),ct=s.select("g.axis."+i+" g.ticks g.tick").html();h.selectAll("g.ticks g.tick").html(ct),h.selectAll("g.tick text").data(lt).text((function(t){return t.length>C?lo.truncateLabel(t,M,D):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(lt).text((function(t){return t.length>C?lo.truncateLabel(t,M,D):t})),h.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),h.selectAll("g.tick text").data(lt)}}this.addEventListeners()}else g.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=rf.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=lo.getProperty(r,"axes",e),o=lo.getProperty(i,"scaleType"),a=lo.getProperty(i,"truncation","threshold"),s=(this.scaleType===A.TIME||(i.scaleType,A.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(H.Axis.LABEL_MOUSEOVER,{element:po(this),datum:t}),o===A.LABELS&&t.length>a&&s.services.events.dispatchEvent(H.Tooltip.SHOW,{hoveredElement:po(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(H.Axis.LABEL_MOUSEMOVE,{element:po(this),datum:t}),o===A.LABELS&&t.length>a&&s.services.events.dispatchEvent(H.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(H.Axis.LABEL_CLICK,{element:po(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(H.Axis.LABEL_MOUSEOUT,{element:po(this),datum:t}),o===A.LABELS&&s.services.events.dispatchEvent(H.Tooltip.HIDE)}))},e.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},e.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},e.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return lo.clamp(r,2,Ro.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;rf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Wp),tv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",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(E),i=lo.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[E[t]]&&(n[E[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=E[t];if(e.configs.axes[n]&&!e.children[n]){var r=new Jg(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(n){var r,i=e.children[n],a=i.configs.position,s=i.getInvisibleAxisRef(),u=rf.getSVGElementSize(s,{useBBox:!0}),l=u.width,c=u.height;switch(r=i.getTitleRef().empty()?0:rf.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,a){case E.TOP:o.top=c+r;break;case E.BOTTOM:o.bottom=c+r;break;case E.LEFT:o.left=l+r;break;case E.RIGHT:o.right=l+r}e.addAxisThresholds(t,a)})),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(H.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e.prototype.addAxisThresholds=function(t,e){var n=this,r=lo.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new ig(n.model,n.services,b(b({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(Wp);function ev(){to.preventDefault(),to.stopImmediatePropagation()}function nv(t){var e=t.document.documentElement,n=po(t).on("dragstart.drag",ev,!0);"onselectstart"in e?n.on("selectstart.drag",ev,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function rv(t,e){var n=t.document.documentElement,r=po(t).on("dragstart.drag",null);e&&(r.on("click.drag",ev,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function iv(t){return function(){return t}}function ov(t,e,n){this.target=t,this.type=e,this.selection=n}function av(){to.stopImmediatePropagation()}function sv(){to.preventDefault(),to.stopImmediatePropagation()}var uv={name:"drag"},lv={name:"space"},cv={name:"handle"},hv={name:"center"};function fv(t){return[+t[0],+t[1]]}function dv(t){return[fv(t[0]),fv(t[1])]}function pv(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=go().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return vo(t,r);return null}(e,to.touches,t)}}var gv={name:"x",handles:["w","e"].map(wv),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]]}},vv={name:"y",handles:["n","s"].map(wv),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]]}},mv={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"},yv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},_v={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},bv={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},xv={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function wv(t){return{type:t}}function Ov(){return!to.ctrlKey&&!to.button}function Ev(){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 Sv(){return navigator.maxTouchPoints||"ontouchstart"in this}function Tv(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Mv(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Av(){return function(t){var e,n=Ev,r=Ov,i=Sv,o=!0,a=sf("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([wv("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",mv.overlay).merge(n).each((function(){var t=Tv(this).extent;po(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([wv("selection")]).enter().append("rect").attr("class","selection").attr("cursor",mv.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 mv[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=po(this),e=Tv(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){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function f(){if((!e||to.touches)&&r.apply(this,arguments)){var n,i,a,s,u,h,f,d,p,g,v,m=this,y=to.target.__data__.type,_="selection"===(o&&to.metaKey?y="overlay":y)?uv:o&&to.altKey?hv:cv,b=t===vv?null:bv[y],x=t===gv?null:xv[y],w=Tv(m),O=w.extent,E=w.selection,S=O[0][0],T=O[0][1],M=O[1][0],A=O[1][1],C=0,D=0,P=b&&x&&o&&to.shiftKey,k=to.touches?pv(to.changedTouches[0].identifier):mo,L=k(m),R=L,I=c(m,arguments,!0).beforestart();"overlay"===y?(E&&(p=!0),w.selection=E=[[n=t===vv?S:L[0],a=t===gv?T:L[1]],[u=t===vv?M:n,f=t===gv?A:a]]):(n=E[0][0],a=E[0][1],u=E[1][0],f=E[1][1]),i=n,s=a,h=u,d=f;var N=po(m).attr("pointer-events","none"),V=N.selectAll(".overlay").attr("cursor",mv[y]);if(to.touches)I.moved=j,I.ended=U;else{var B=po(to.view).on("mousemove.brush",j,!0).on("mouseup.brush",U,!0);o&&B.on("keydown.brush",z,!0).on("keyup.brush",H,!0),nv(to.view)}av(),Nf(m),l.call(m),I.start()}function j(){var t=k(m);!P||g||v||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?v=!0:g=!0),R=t,p=!0,sv(),G()}function G(){var t;switch(C=R[0]-L[0],D=R[1]-L[1],_){case lv:case uv:b&&(C=Math.max(S-n,Math.min(M-u,C)),i=n+C,h=u+C),x&&(D=Math.max(T-a,Math.min(A-f,D)),s=a+D,d=f+D);break;case cv:b<0?(C=Math.max(S-n,Math.min(M-n,C)),i=n+C,h=u):b>0&&(C=Math.max(S-u,Math.min(M-u,C)),i=n,h=u+C),x<0?(D=Math.max(T-a,Math.min(A-a,D)),s=a+D,d=f):x>0&&(D=Math.max(T-f,Math.min(A-f,D)),s=a,d=f+D);break;case hv:b&&(i=Math.max(S,Math.min(M,n-C*b)),h=Math.max(S,Math.min(M,u+C*b))),x&&(s=Math.max(T,Math.min(A,a-D*x)),d=Math.max(T,Math.min(A,f+D*x)))}h<i&&(b*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in yv&&V.attr("cursor",mv[y=yv[y]])),d<s&&(x*=-1,t=a,a=f,f=t,t=s,s=d,d=t,y in _v&&V.attr("cursor",mv[y=_v[y]])),w.selection&&(E=w.selection),g&&(i=E[0][0],h=E[1][0]),v&&(s=E[0][1],d=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===d||(w.selection=[[i,s],[h,d]],l.call(m),I.brush())}function U(){if(av(),to.touches){if(to.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else rv(to.view,p),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),V.attr("cursor",mv.overlay),w.selection&&(E=w.selection),Mv(E)&&(w.selection=null,l.call(m)),I.end()}function z(){switch(to.keyCode){case 16:P=b&&x;break;case 18:_===cv&&(b&&(u=h-C*b,n=i+C*b),x&&(f=d-D*x,a=s+D*x),_=hv,G());break;case 32:_!==cv&&_!==hv||(b<0?u=h-C:b>0&&(n=i-C),x<0?f=d-D:x>0&&(a=s-D),_=lv,V.attr("cursor",mv.selection),G());break;default:return}sv()}function H(){switch(to.keyCode){case 16:P&&(g=v=P=!1,G());break;case 18:_===hv&&(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(a=s),_=cv,G());break;case 32:_===lv&&(to.altKey?(b&&(u=h-C*b,n=i+C*b),x&&(f=d-D*x,a=s+D*x),_=hv):(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(a=s),_=cv),V.attr("cursor",mv[y]),G());break;default:return}sv()}}function d(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=dv(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){c(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){c(this,arguments).end()})).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=ws(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,r=arguments,i=e.__brush,o=t.input("function"==typeof n?n.apply(e,r):n,i.extent),a=c(e,r).beforestart();Nf(e),i.selection=null===o?null:o,l.call(e),a.start().brush().end()}))},u.clear=function(t){u.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){!function(t,e,n,r){var i=to;t.sourceEvent=to,to=t;try{e.apply(n,r)}finally{to=i}}(new ov(u,e,t.output(this.state.selection)),a.apply,a,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:iv(dv(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:iv(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:iv(!!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}(gv)}var Cv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",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.getContainerSVG(),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,f=h.getMainXScaleType(),d=h.getMainXScale(),p=d.range(),g=p[0];p[1];i.attr("transform","translate("+g+",0)");var v=rf.appendOrSelect(i,this.frontSelectionSelector);if(d&&f===A.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=ec().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)},_=Av().extent([[0,0],[l-1,c]]).on("start brush end",(function(){var t=to.selection;null!==t&&t[0]!==t[1]&&(v.attr("x",s.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)}(t))})).on("end.brushed",(function(){var t=to.selection;null!==t&&(y(t[0],t[1]),a.call(_.move,null),v.style("display","none"))}));a.call(_);var b=this.services.zoom.getZoomRatio();o.on("click",(function(){if(to.shiftKey){var t=mo(a.node())[0],e=t-l*b/2;e<0&&(e=0);var n=t+l*b/2;n>l&&(n=l),y(e,n)}}))}},e.DASH_LENGTH=4,e}(Wp),Dv=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",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}(Wp),Pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=lo.getProperty(this.model.getOptions(),"grid","x","enabled"),n=lo.getProperty(this.model.getOptions(),"grid","y","enabled");(e||n)&&(this.drawBackdrop(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.parent,n=this.backdrop.attr("height"),r=$g(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=lo.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var o=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=Qg(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=lo.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var o=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(lo.getTranslationValues(t).tx)-Number(lo.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+lo.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=+lo.getTranslationValues(s).tx-+lo.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=rf.getSVGElementSize(u).width-+lo.getTranslationValues(a).tx}else o=+lo.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=lo.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=lo.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",s-a).attr("height",l-c).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){this.model.getOptions();t.selectAll("text").remove(),t.select(".domain").remove()},e}(Wp);var kv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.isXGridEnabled=lo.getProperty(e.model.getOptions(),"grid","x","enabled"),e.isYGridEnabled=lo.getProperty(e.model.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=lo.getProperty(this.model.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){var e=this,n=t[0],r=t[1],i=this.parent,o=this.services.cartesianScales.getOrientation(),a=o===M.HORIZONTAL?r:n,s=rf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=rf.appendOrSelect(s,"line.ruler-line"),l=i.selectAll("[role=graphics-symbol]"),c=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=c.map((function(t){return{domainValue:e.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,a)}));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(H.Tooltip.MOVE,{mousePosition:[n,r]});this.pointsWithinLine=p;var g=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(g.length>0){var v=this.services.cartesianScales.getRangeIdentifier(),m=g.map((function(t){return t.originalData})).filter((function(t){var e=t[v];return null!=e})),y=g.map((function(t){return t.domainValue})),_=l.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!lo.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent(H.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(m)}),s.attr("opacity",1);var b=g[0];"horizontal"===o?u.attr("x1",d).attr("x2",f).attr("y1",b.domainValue).attr("y2",b.domainValue):u.attr("y1",d).attr("y2",f).attr("x1",b.domainValue).attr("x2",b.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(H.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.model.getDisplayData(),n=function(){var e=mo(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=lo.debounceWithD3MousePosition((function(){var e=this.mousePosition;t.showRuler(e)}),r,this.parent.node())}this.backdrop.on("mousemove mouseover",n).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=(r[0],r[1],n.range());i[0],i[1];this.backdrop=rf.appendOrSelect(t,"svg.chart-grid-backdrop");rf.appendOrSelect(this.backdrop,this.isXGridEnabled||this.isYGridEnabled?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop")},e}(Wp),Lv=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.prototype.hideRuler=function(){var t=this.parent,e=rf.appendOrSelect(t,"g.ruler");this.services.events.dispatchEvent(H.Tooltip.HIDE),e.attr("opacity",0)},e}(kv),Rv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.overflowMenuX=0,e.overflowMenuY=0,e.overflowMenuItemId=Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.init=function(){var t=this,e=this.model.getOptions(),n=po(this.services.domUtils.getHolder()),r=lo.getProperty(e,"style","prefix");this.overflowMenu=rf.appendOrSelect(n,"div."+Rh.prefix+"--"+r+"--overflowMenu"),this.overflowMenu.style("max-width",null),this.services.events.addEventListener(H.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.overflowMenu.html(t.getOverflowMenuHTML())})),this.services.events.addEventListener(H.Toolbar.HIDE_OVERFLOW_MENU,(function(){t.overflowMenu.html(null)})),document.body.addEventListener("click",(function(){return t.updateOverflowMenu(!1)}))},e.prototype.render=function(t){var e=lo.getProperty(this.model.getOptions(),"data","loading"),n=Ho.buttonSize,i=parseFloat(this.parent.node().getAttribute("y")),o=this.getContainerSVG();o.attr("transform","translate(0, "+(i+-6)+")");var a=rf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttrs:!0}).width;this.overflowMenuX=a-160,this.overflowMenuY=i+-6+n;var s=rf.appendOrSelect(o,"svg.toolbar-container").attr("width","100%").attr("height",Ho.height).attr("opacity",1);s.html(null);var u=this.getControlConfigs(),l=u.buttonList;if(u.overflowMenuItemList&&l.push(this.getOverflowButtonConfig()),e||0===l.length)rf.appendOrSelect(s,"svg.toolbar-loading-spacer").append("rect").attr("height",Ho.height).attr("width",3*n).attr("opacity",0);else{var c=0;l.forEach((function(t){var e=rf.appendOrSelect(s,"svg."+t.id).classed("toolbar-button",!0),i=rf.appendOrSelect(e,"rect.toolbar-button-background").attr("x",c).attr("y",0).attr("width",n).attr("height",n),o=rf.appendOrSelect(e,"svg.toolbar-button-icon").attr("x",c+Ho.iconPadding).attr("y",Ho.iconPadding).attr("width",Ho.iconSize).attr("height",Ho.iconSize).attr("viewBox","0 0 32 32").attr("role",r.IMG);o.html(t.iconSVGContent),t.shouldBeDisabled()?(e.classed("toolbar-button--disabled",!0).classed("toolbar-button--focusable",!1).attr("tabindex",-1).attr("role",null),o.classed("toolbar-button-icon--disabled",!0),i.classed("toolbar-button-background--disabled",!0),e.on("click",null).on("keyup",null)):(e.classed("toolbar-button--disabled",!1).classed("toolbar-button--focusable",!0).attr("tabindex",0).attr("role",r.BUTTON),o.classed("toolbar-button-icon--disabled",!1),i.classed("toolbar-button-background--disabled",!1),e.on("click",t.clickFunction).on("keyup",(function(){(to.key&&"Enter"===to.key||" "===to.key)&&(to.preventDefault(),t.clickFunction())}))),c+=n})),this.overflowButton=this.getContainerSVG().select("svg.toolbar-overflow-menu"),this.isOverflowMenuOpen()&&this.updateOverflowMenu(!0)}},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.selectAll("ul.bx--overflow-menu-options--open").size()>0},e.prototype.updateOverflowMenu=function(t){this.overflowButton&&this.overflowButton.classed("toolbar-button--hovered",t),t?this.services.events.dispatchEvent(H.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(H.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=po("#"+e[n].id+this.overflowMenuItemId).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=po("#"+e[n].id+this.overflowMenuItemId).node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(){var t=this;if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var e=this;this.getOverflowMenuItems().forEach((function(n,r){var i=po("#"+n.id+t.overflowMenuItemId);null!==i&&(i.on("click",(function(){n.clickFunction(),e.updateOverflowMenu(!1)})),i.on("keyup",(function(){"Enter"===to.key?n.clickFunction():"ArrowUp"===to.key?e.focusOnPreviousEnabledMenuItem(r):"ArrowDown"===to.key&&e.focusOnNextEnabledMenuItem(r)})))})),e.focusOnNextEnabledMenuItem(-1)}to.stopImmediatePropagation()},e.prototype.getOverflowMenuHTML=function(){var t,e=this,n=this.getOverflowMenuItems();return n&&0!==n.length?(t='<div data-floating-menu-container="true" data-floating-menu-direction="bottom" role="main">\n\t\t\t<ul class="bx--overflow-menu-options bx--overflow-menu--flip bx--overflow-menu-options--open"\n\t\t\t\ttabindex="-1" role="'+r.MENU+'" aria-label="Menu" data-floating-menu-direction="bottom"\n\t\t\t\tstyle="left:'+this.overflowMenuX+"px; top:"+this.overflowMenuY+'px;">',n.forEach((function(n,i){var o="bx--overflow-menu-options__option".concat(n.shouldBeDisabled()?" bx--overflow-menu-options__option--disabled":"");t+='<li class="'+o+'" role="'+r.MENU_ITEM+'">\n\t\t\t\t<button class="bx--overflow-menu-options__btn"\n\t\t\t\t\tdata-floating-menu-primary-focus="'+(0===i)+'"\n\t\t\t\t\ttabindex="-1" index="'+i+'" title="'+n.text+'"\n\t\t\t\t\tid="'+(n.id+e.overflowMenuItemId)+'">\n\t\t\t\t\t<div class="bx--overflow-menu-options__option-content">\n\t\t\t\t\t\t'+n.text+"\n\t\t\t\t\t</div>\n\t\t\t\t</button>\n\t\t\t</li>"})),t+="</ul></div>"):""},e.prototype.getControlConfigs=function(){var t=this,e=lo.getProperty(this.model.getOptions(),"toolbar","numberOfIcons"),n=lo.getProperty(this.model.getOptions(),"toolbar","controls"),r=[];return n.forEach((function(e){var n=t.getControlConfigByType(e.type);n&&(n.text=e.text?e.text:e.type,r.push(n))})),r.length<=e?{buttonList:r}:{buttonList:r.splice(0,e-1),overflowMenuItemList:r}},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(){return t.toggleOverflowMenu()}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState();switch(t){case z.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 z.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 z.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;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case z.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<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 z.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 z.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"/>';default:throw Error("Not supported toolbar control type: "+t)}},e}(Wp),Iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return n(e,t),e.prototype.render=function(t){var e=this.services.cartesianScales.getRangeScale().domain(),n=e[0],r=e[1];if(n>0&&r<0||n<0&&r>0){var i=this.getContainerSVG(),o=this.services.cartesianScales.getDomainScale().range(),a=o[0],s=o[1],u=+this.services.cartesianScales.getRangeValue(0)+.5;if(!u){var l=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(l).range()[0]}var c=lo.flipSVGCoordinatesBasedOnOrientation({x0:a,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());rf.appendOrSelect(i,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",c.y0).attr("y2",c.y1).attr("x1",c.x0).attr("x2",c.x1)}},e}(Wp),Nv=Object.prototype;var Vv=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Nv)};var Bv=function(t,e){return function(n){return t(e(n))}}(Object.keys,Object),jv=Object.prototype.hasOwnProperty;var Gv=function(t){if(!Vv(t))return Bv(t);var e=[];for(var n in Object(t))jv.call(t,n)&&"constructor"!=n&&e.push(n);return e},Uv="object"==typeof yo&&yo&&yo.Object===Object&&yo,zv="object"==typeof self&&self&&self.Object===Object&&self,Hv=Uv||zv||Function("return this")(),Fv=Hv.Symbol,Wv=Object.prototype,Yv=Wv.hasOwnProperty,Xv=Wv.toString,qv=Fv?Fv.toStringTag:void 0;var Zv=function(t){var e=Yv.call(t,qv),n=t[qv];try{t[qv]=void 0;var r=!0}catch(t){}var i=Xv.call(t);return r&&(e?t[qv]=n:delete t[qv]),i},Kv=Object.prototype.toString;var $v=function(t){return Kv.call(t)},Qv=Fv?Fv.toStringTag:void 0;var Jv=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Qv&&Qv in Object(t)?Zv(t):$v(t)};var tm=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)};var em=function(t){if(!tm(t))return!1;var e=Jv(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},nm=Hv["__core-js_shared__"],rm=function(){var t=/[^.]+$/.exec(nm&&nm.keys&&nm.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();var im=function(t){return!!rm&&rm in t},om=Function.prototype.toString;var am=function(t){if(null!=t){try{return om.call(t)}catch(t){}try{return t+""}catch(t){}}return""},sm=/^\[object .+?Constructor\]$/,um=Function.prototype,lm=Object.prototype,cm=um.toString,hm=lm.hasOwnProperty,fm=RegExp("^"+cm.call(hm).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var dm=function(t){return!(!tm(t)||im(t))&&(em(t)?fm:sm).test(am(t))};var pm=function(t,e){return null==t?void 0:t[e]};var gm=function(t,e){var n=pm(t,e);return dm(n)?n:void 0},vm=gm(Hv,"DataView"),mm=gm(Hv,"Map"),ym=gm(Hv,"Promise"),_m=gm(Hv,"Set"),bm=gm(Hv,"WeakMap"),xm=am(vm),wm=am(mm),Om=am(ym),Em=am(_m),Sm=am(bm),Tm=Jv;(vm&&"[object DataView]"!=Tm(new vm(new ArrayBuffer(1)))||mm&&"[object Map]"!=Tm(new mm)||ym&&"[object Promise]"!=Tm(ym.resolve())||_m&&"[object Set]"!=Tm(new _m)||bm&&"[object WeakMap]"!=Tm(new bm))&&(Tm=function(t){var e=Jv(t),n="[object Object]"==e?t.constructor:void 0,r=n?am(n):"";if(r)switch(r){case xm:return"[object DataView]";case wm:return"[object Map]";case Om:return"[object Promise]";case Em:return"[object Set]";case Sm:return"[object WeakMap]"}return e});var Mm=Tm;var Am=function(t){return null!=t&&"object"==typeof t};var Cm=function(t){return Am(t)&&"[object Arguments]"==Jv(t)},Dm=Object.prototype,Pm=Dm.hasOwnProperty,km=Dm.propertyIsEnumerable,Lm=Cm(function(){return arguments}())?Cm:function(t){return Am(t)&&Pm.call(t,"callee")&&!km.call(t,"callee")},Rm=Array.isArray;var Im=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991};var Nm=function(t){return null!=t&&Im(t.length)&&!em(t)};var Vm=function(){return!1},Bm=bo((function(t,e){var n=e&&!e.nodeType&&e,r=n&&t&&!t.nodeType&&t,i=r&&r.exports===n?Hv.Buffer:void 0,o=(i?i.isBuffer:void 0)||Vm;t.exports=o})),jm={};jm["[object Float32Array]"]=jm["[object Float64Array]"]=jm["[object Int8Array]"]=jm["[object Int16Array]"]=jm["[object Int32Array]"]=jm["[object Uint8Array]"]=jm["[object Uint8ClampedArray]"]=jm["[object Uint16Array]"]=jm["[object Uint32Array]"]=!0,jm["[object Arguments]"]=jm["[object Array]"]=jm["[object ArrayBuffer]"]=jm["[object Boolean]"]=jm["[object DataView]"]=jm["[object Date]"]=jm["[object Error]"]=jm["[object Function]"]=jm["[object Map]"]=jm["[object Number]"]=jm["[object Object]"]=jm["[object RegExp]"]=jm["[object Set]"]=jm["[object String]"]=jm["[object WeakMap]"]=!1;var Gm=function(t){return Am(t)&&Im(t.length)&&!!jm[Jv(t)]};var Um=function(t){return function(e){return t(e)}},zm=bo((function(t,e){var n=e&&!e.nodeType&&e,r=n&&t&&!t.nodeType&&t,i=r&&r.exports===n&&Uv.process,o=function(){try{var t=r&&r.require&&r.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=o})),Hm=zm&&zm.isTypedArray,Fm=Hm?Um(Hm):Gm,Wm=Object.prototype.hasOwnProperty;var Ym,Xm=function(t){if(null==t)return!0;if(Nm(t)&&(Rm(t)||"string"==typeof t||"function"==typeof t.splice||Bm(t)||Fm(t)||Lm(t)))return!t.length;var e=Mm(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(Vv(t))return!Gv(t).length;for(var n in t)if(Wm.call(t,n))return!1;return!0},qm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=Av(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(H.ZoomBar.UPDATE,this.render.bind(this));var t=lo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),r=this.services.zoom.isZoomBarLoading(E.TOP),i=this.services.zoom.isZoomBarLocked(E.TOP),o=lo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),a=Fo.height[o],s=rf.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=0,l=this.model.get("axesMargins");l&&l.left&&(u=l.left);var c=rf.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",a).attr("opacity",1);rf.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",a).attr("width","100%").attr("height",Fo.spacerHeight).attr("opacity",1).attr("fill","none");if(o===S.GRAPH_VIEW?rf.appendOrSelect(c,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",s-u).attr("height","100%"):o===S.SLIDER_VIEW&&rf.appendOrSelect(c,"rect.zoom-slider-bg").attr("x",u).attr("y",a/2-1).attr("width",s-u).attr("height",2),!r){var h=this.services.cartesianScales,f=h.getMainXScale(),d=h.getMainYScale(),p=h.getMainXScaleType();if(f&&p===A.TIME){var g=this.services.zoom.getZoomBarData();if(Xm(g))return;this.xScale=f.copy(),this.yScale=d.copy();var v=this.services.zoom.getDefaultZoomBarDomain(g);g=this.compensateDataForDefaultDomain(g,v);var m=this.model.get("initialZoomDomain"),y=lo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"initialZoomDomain");y&&y[0]&&y[1]&&(y[0]=new Date(y[0]),y[1]=new Date(y[1])),m===y||m&&y&&m[0].valueOf()===y[0].valueOf()&&m[1].valueOf()===y[1].valueOf()||this.model.set({initialZoomDomain:y,zoomDomain:y||v},{skipUpdate:!0}),this.xScale.range([u,s]).domain(v),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,a-6]).domain(_a(g,(function(t){return t.value})));var _=this.model.get("zoomDomain");if(o===S.GRAPH_VIEW){this.renderZoomBarArea(c,"path.zoom-graph-area-unselected",g,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(c,"path.zoom-graph-area",g,this.clipId);var b=kc()([[u,a],[s,a]]);rf.appendOrSelect(c,"path.zoom-bg-baseline").attr("d",b)}this.addBrushEventListener(_,u,s);var x=rf.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===_);else if(_[0].valueOf()===_[1].valueOf())x.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getContainerSVG(),this.xScale.range(),this.xScale.domain());else{var w=_.map((function(t){return e.xScale(t)}));w[1]-w[0]<this.MIN_SELECTION_DIFF||(x.call(this.brush.move,w),this.updateBrushHandle(this.getContainerSVG(),w,_))}i&&(this.brush.filter((function(){return!1})),x.selectAll("rect").attr("cursor","auto"))}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=lo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),o=Fo.height[i];this.brush.extent([[e,0],[n,o]]).on("start brush end",null).on("start brush end",(function(){var e=to.selection;null===e?r.handleBrushedEvent(t,r.xScale,r.xScale.range()):e[0]===e[1]||r.handleBrushedEvent(t,r.xScale,e)}))},e.prototype.handleBrushedEvent=function(t,e,n){var r=[e.invert(n[0]),e.invert(n[1])];if(this.updateBrushHandle(this.getContainerSVG(),n,r),null!=to.sourceEvent&&("mousemove"===to.sourceEvent.type||"mouseup"===to.sourceEvent.type||"mousedown"===to.sourceEvent.type||"touchstart"===to.sourceEvent.type||"touchmove"===to.sourceEvent.type||"touchend"===to.sourceEvent.type)){void 0!==t&&t[0]===r[0]&&t[1]===r[1]||this.services.zoom.handleDomainChange(r,{dispatchEvent:!1});var i=void 0;"start"===to.type?i=H.ZoomBar.SELECTION_START:"brush"===to.type?i=H.ZoomBar.SELECTION_IN_PROGRESS:"end"===to.type&&(i=H.ZoomBar.SELECTION_END),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=Fo.handleWidth,o=lo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),a=Fo.height[o],s=-i/2,u=Fo.handleBarWidth,l=o===S.GRAPH_VIEW?Fo.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===S.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=lo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),n=Fo.height[e],r=(rf.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getContainerSVG().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),f=lo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),d=Fo.height[f],p=Lc().x((function(t,e){return c(t,e)})).y0(d).y1((function(t,e){return d-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=lo.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.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(H.ZoomBar.UPDATE,this.render.bind(this))},e}(Wp),Zm=function(){function t(t,e){this.services={domUtils:rf,events:of,gradientUtils:yd,transitions:md},this.model=new kh(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(H.Model.UPDATE,(function(t){var e=!!lo.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(H.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(H.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){var e={id:"title",components:[new og(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},n={id:"legend",components:[new Yp(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},r={id:"graph-frame",components:t,growth:{x:L.STRETCH,y:L.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=k.COLUMN;if(i){var a=lo.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=k.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=P.VERTICAL)):"right"===a?(o=k.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=P.VERTICAL)):"bottom"===a&&(o=k.COLUMN_REVERSE)}var s={id:"spacer",components:[new Sg(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},u={id:"full-frame",components:[new Gg(this.model,this.services,x(i?[n]:[],i?[s]:[],[r]),{direction:o})],growth:{x:L.STRETCH,y:L.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new Sg(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}};l.push(c)}return l.push(u),[new sg(this.model,this.services),new Gg(this.model,this.services,l,{direction:k.COLUMN})]},t}(),Km=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.setData=function(e){var n;return e&&(n=t.prototype.setData.call(this,e),lo.getProperty(this.getOptions(),"zoomBar")&&this.setZoomBarData()),n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(lo.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=lo.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}(kh),$m=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Gp,curves:Hp,zoom:Fp}),r.model=new Km(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e=lo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"enabled"),n=lo.getProperty(this.model.getOptions(),"toolbar","enabled");this.services.cartesianScales.findDomainAndRangeAxes();var r=this.services.cartesianScales.getMainXAxisPosition(),i=lo.getProperty(this.model.getOptions(),"axes",r,"scaleType"),o=e&&r===E.BOTTOM&&i===A.TIME,a=this.services.zoom.isZoomBarLocked(E.TOP),s=!!this.model.getOptions().title,u={id:"title",components:[new og(this.model,this.services)],growth:{x:L.STRETCH,y:L.FIXED}},l={id:"toolbar",components:[new Rv(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},c={id:"header",components:[new Gg(this.model,this.services,x([u],n?[l]:[]),{direction:k.ROW})],growth:{x:L.PREFERRED,y:L.FIXED}},h={id:"legend",components:[new Yp(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}};o&&!a&&t.push(new Dv(this.model,this.services),new Cv(this.model,this.services));var f={id:"graph-frame",components:t,growth:{x:L.STRETCH,y:L.FIXED}},d=!1!==this.model.getOptions().legend.enabled,p=k.COLUMN;if(d){var g=lo.getProperty(this.model.getOptions(),"legend","position");g===C.LEFT?(p=k.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=P.VERTICAL)):g===C.RIGHT?(p=k.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=P.VERTICAL)):g===C.BOTTOM&&(p=k.COLUMN_REVERSE)}var v={id:"spacer",components:[new Sg(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},m={id:"full-frame",components:[new Gg(this.model,this.services,x(d?[h]:[],d?[v]:[],[f]),{direction:p})],growth:{x:L.STRETCH,y:L.FIXED}},y={id:"zoom-bar",components:[new qm(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},_=[];if(s||n){_.push(c);var b={id:"spacer",components:[new Sg(this.model,this.services,n?{size:15}:void 0)],growth:{x:L.PREFERRED,y:L.FIXED}};_.push(b)}return o&&_.push(y),_.push(m),[new ug(this.model,this.services),new Gg(this.model,this.services,_,{direction:k.COLUMN})]},e}(Zm),Qm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(lo.mergeDefaultChartOptions(lo.clone(ca.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new Pv(this.model,this.services),new kv(this.model,this.services),new mg(this.model,this.services),new lg(this.model,this.services),new gg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}($m),Jm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(lo.mergeDefaultChartOptions(ca.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new Pv(this.model,this.services),new kv(this.model,this.services),new cg(this.model,this.services),new mg(this.model,this.services,{stacked:!0}),new yg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}($m),ty=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(lo.mergeDefaultChartOptions(ca.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new Pv(this.model,this.services),new fg(this.model,this.services),new Iv(this.model,this.services),new Og(this.model,this.services,{skeleton:I.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}($m),ey=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(lo.mergeDefaultChartOptions(ca.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new Pv(this.model,this.services),new dg(this.model,this.services),new Iv(this.model,this.services),new Og(this.model,this.services,{skeleton:I.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}($m),ny=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(lo.mergeDefaultChartOptions(ca.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new Pv(this.model,this.services),new Lv(this.model,this.services),new pg(this.model,this.services),new Og(this.model,this.services,{skeleton:I.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}($m),ry=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(lo.mergeDefaultChartOptions(ca.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new Pv(this.model,this.services),new kv(this.model,this.services),new vg(this.model,this.services),new Og(this.model,this.services,{skeleton:I.GRID})];return this.getAxisChartComponents(t)},e}($m),iy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(lo.mergeDefaultChartOptions(ca.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new Pv(this.model,this.services),new kv(this.model,this.services),new mg(this.model,this.services),new gg(this.model,this.services,{handleThresholds:!0}),new Eg(this.model,this.services)];return this.getAxisChartComponents(t)},e}($m),oy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(lo.mergeDefaultChartOptions(ca.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new tv(this.model,this.services),new Pv(this.model,this.services),new kv(this.model,this.services),new gg(this.model,this.services),new Og(this.model,this.services,{skeleton:I.GRID})];return this.getAxisChartComponents(t)},e}($m),ay=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}(kh),sy=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new ay(i.services),r?i:(i.model.setOptions(lo.mergeDefaultChartOptions(ca.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new bg(this.model,this.services),new Og(this.model,this.services,{skeleton:I.PIE})];return this.getChartComponents(t)},e}(Zm),uy=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(lo.mergeDefaultChartOptions(ca.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new wg(this.model,this.services),new Og(this.model,this.services,{skeleton:I.DONUT})];return this.getChartComponents(t)},e}(sy),ly=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.generateDataLabels=function(t){var e={};return e[t.label]=Io.items.status.ACTIVE,e},e.prototype.getDisplayData=function(){return this.get("data")?this.get("data")[0]:null},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=lo.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=this.getDisplayData().value,n=e>100?100:e,r=lo.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}(kh),cy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),o=this.model.getOptions(),a=this.model.getDisplayData(),s=this.model.getStatus(),u=rf.getSVGElementSize(this.parent,{useAttrs:!0}).width,l=o.data.groupMapsTo,c=su().domain([0,100]).range([0,u]);rf.appendOrSelect(i,"rect.container").attr("x",0).attr("y",0).attr("width",u).attr("height",lo.getProperty(o,"meter","height"));var h=a.value>=100,f=i.selectAll("rect.value").data([a]),d=null==s||n.model.isUserProvidedColorScaleValid()?"":"value status--"+s;f.enter().append("rect").classed("value",!0).merge(f).attr("x",0).attr("y",0).attr("height",lo.getProperty(o,"meter","height")).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[l],originalClassName:d})})).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(h?100:t.value)})).attr("fill",(function(t){return n.model.getFillColor(t[l])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var p=lo.getProperty(o,"meter","peak"),g=null!==p&&p<a.value?a.value:p,v=null===g||h?[]:[g],m=i.selectAll("line.peak").data(v);m.enter().append("line").classed("peak",!0).merge(m).attr("y1",0).attr("y2",lo.getProperty(o,"meter","height")).transition(this.services.transitions.getTransition("peak-line-update",t)).attr("x1",(function(t){return c(t)})).attr("x2",(function(t){return c(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),m.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(Wp),hy=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new ly(r.services),r.model.setOptions(lo.merge(lo.clone(ca.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new cy(this.model,this.services)],growth:{x:L.STRETCH,y:L.FIXED}},e={id:"title",components:[new ag(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},n={id:"spacer",components:[new Sg(this.model,this.services,{size:8})],growth:{x:L.PREFERRED,y:L.FIXED}},r=[new Gg(this.model,this.services,[e,n,t],{direction:k.COLUMN})];return this.getChartComponents(r)},e}(Zm);function fy(t){var e,n=(py(t)%(e=360)+e)%e;return dy(n,[0,10])||dy(n,[350,0])?{textAnchor:N.START,dominantBaseline:V.MIDDLE}:dy(n,[10,80])?{textAnchor:N.START,dominantBaseline:V.HANGING}:dy(n,[80,100])?{textAnchor:N.MIDDLE,dominantBaseline:V.HANGING}:dy(n,[100,170])?{textAnchor:N.END,dominantBaseline:V.HANGING}:dy(n,[170,190])?{textAnchor:N.END,dominantBaseline:V.MIDDLE}:dy(n,[190,260])?{textAnchor:N.END,dominantBaseline:V.BASELINE}:dy(n,[260,280])?{textAnchor:N.MIDDLE,dominantBaseline:V.BASELINE}:{textAnchor:N.START,dominantBaseline:V.BASELINE}}function dy(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function py(t){return t*(180/Math.PI)}function gy(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 vy=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=rf.appendOrSelect(e.getContainerSVG(),"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.model.getOptions(),r=lo.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=lo.getProperty(n,"data","groupMapsTo"),s=lo.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 lo.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=lo.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=lo.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:lo.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?jo.opacity.unselected:jo.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?jo.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",jo.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=rf.getSVGElementSize(this.parent,{useAttrs:!0}),o=i.width,a=i.height,s=this.model.getData(),u=this.model.getDisplayData(),l=this.model.getGroupedData(),c=this.model.getOptions(),h=lo.getProperty(c,"radar","axes"),f=h.angle,d=h.value,p=lo.getProperty(c,"data","groupMapsTo"),g=jo.xLabelPadding,v=jo.yLabelPadding,m=jo.yTicksNumber,y=jo.minRange,_=jo.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[f]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[p]})))),this.displayDataNormalized=this.normalizeFlatData(u),this.groupedDataNormalized=this.normalizeGroupedData(l);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),x=(Math.min(o,a)-b)/2;if(!(x<=0)){var w=Ra().domain(this.displayDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),E=su().domain([0,Ma(this.displayDataNormalized.map((function(t){return t[d]})))]).range([y,x]).nice(m),S=E.ticks(m),T=function(t){return e.model.getFillColor(t)},M=jc().angle((function(t){return w(t[f])+Math.PI/2})).radius((function(t){return E(t[d])})).curve(fh),A=jc().angle(M.angle()).radius((function(t){return Ym?Ym(t[d]):y})).curve(M.curve()),C={x:Ma(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=w(t),x*Math.sin(n-Math.PI/2))})))+g,y:a/2},D=rf.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(S,(function(t){return t})),P=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[f]=e,n[d]=t,n}))};D.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill","none").attr("d",(function(t){return A(P(t))})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return M(P(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("+C.x+", "+C.y+")").attr("d",(function(t){return M(P(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 M(P(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-"+lo.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return gy(w(t),0,C).x})).attr("y1",(function(t){return gy(w(t),0,C).y})).attr("x2",(function(t){return gy(w(t),0,C).x})).attr("y2",(function(t){return gy(w(t),0,C).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return gy(w(t),E.range()[0],C).x})).attr("y1",(function(t){return gy(w(t),E.range()[0],C).y})).attr("x2",(function(t){return gy(w(t),E.range()[1],C).x})).attr("y2",(function(t){return gy(w(t),E.range()[1],C).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 gy(w(t),E.range()[0],C).x})).attr("y1",(function(t){return gy(w(t),E.range()[0],C).y})).attr("x2",(function(t){return gy(w(t),E.range()[1],C).x})).attr("y2",(function(t){return gy(w(t),E.range()[1],C).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 gy(w(t),E.range()[1]+g,C).x})).attr("y",(function(t){return gy(w(t),E.range()[1]+g,C).y})).style("text-anchor",(function(t){return fy(w(t)).textAnchor})).style("dominant-baseline",(function(t){return fy(w(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 gy(w(t),E.range()[1]+g,C).x})).attr("y",(function(t){return gy(w(t),E.range()[1]+g,C).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:[O.FILL,O.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill",(function(t){return T(t.name)})).style("fill-opacity",jo.opacity.selected).attr("stroke",(function(t){return T(t.name)})).attr("d",(function(t){return A(t.data)})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_enter",t)).attr("opacity",1).attr("d",(function(t){return M(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL,O.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("fill",(function(t){return T(t.name)})).attr("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("+C.x+", "+C.y+")").attr("d",(function(t){return M(t.data)}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_exit",t)).attr("d",(function(t){return M(t.data)})).attr("opacity",0).remove()}))})),rf.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.displayDataNormalized).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:[O.FILL],dataGroupName:t[p],originalClassName:lo.kebabCase(t[f])})})).attr("cx",(function(t){return gy(w(t[f]),E(t[d]),C).x})).attr("cy",(function(t){return gy(w(t[f]),E(t[d]),C).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return T(t[p])})),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",C.x).attr("y",C.y-_/2).attr("width",E.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+py(w(t))+", "+C.x+", "+C.y+")"})),rf.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(_a(S)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return gy(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return gy(-Math.PI/2,E(t),C).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 gy(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return gy(-Math.PI/2,E(t),C).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 k=lo.getProperty(c,"radar","alignment"),L=rf.getAlignmentOffset(k,n,this.getParent());n.attr("transform","translate("+L+", 0)"),this.addEventListeners(),Ym=E}},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(H.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(H.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=lo.getProperty(this.model.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n){var r=po(this);t.services.events.dispatchEvent(H.Radar.X_AXIS_MOUSEOVER,{element:r,datum:n});var i=t.parent.select(".x-axes .x-axis-"+lo.kebabCase(n)),o=t.parent.selectAll(".dots circle."+lo.kebabCase(n));i.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",1).attr("r",jo.dotsRadius);var a=t.displayDataNormalized.filter((function(t){return t[e]===n})),s=t.model.getOptions(),u=s.data.groupMapsTo,l=lo.getProperty(s,"radar","axes","value");t.services.events.dispatchEvent(H.Tooltip.SHOW,{hoveredElement:r,items:a.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[u],value:e[l],color:t.model.getFillColor(e[u]),class:t.model.getColorClassName({classNameTypes:[O.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e){var n=po(this);t.services.events.dispatchEvent(H.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(H.Radar.X_AXIS_CLICK,{element:po(this),datum:e})})).on("mouseout",(function(e){var n=po(this),r=t.parent.select(".x-axes .x-axis-"+lo.kebabCase(e)),i=t.parent.selectAll(".dots circle."+lo.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(H.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(H.Tooltip.HIDE)}))},e}(Wp),my=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(lo.mergeDefaultChartOptions(ca.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new vy(this.model,this.services)];return this.getChartComponents(t)},e}(Zm),yy=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}(kh),_y=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new yy(r.services),r.model.setOptions(lo.mergeDefaultChartOptions(ca.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new xg(this.model,this.services)];return this.getChartComponents(t)},e}(Zm);t.AreaChart=Qm,t.BubbleChart=ry,t.DonutChart=uy,t.GaugeChart=_y,t.GroupedBarChart=ey,t.LineChart=iy,t.MeterChart=hy,t.PieChart=sy,t.RadarChart=my,t.ScatterChart=oy,t.SimpleBarChart=ty,t.StackedAreaChart=Jm,t.StackedBarChart=ny,t.configurations=ha,t.interfaces=F,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=function(){return(b=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 x(){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.UPDATE="model-update"}(o||(o={})),function(t){t.SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",t.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu"}(a||(a={})),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"}(s||(s={})),function(t){t.CHANGE="zoom-domain-change"}(u||(u={})),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"}(l||(l={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(c||(c={})),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"}(h||(h={})),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"}(f||(f={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(d||(d={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(p||(p={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(g||(g={})),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"}(v||(v={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(m||(m={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(y||(y={})),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"}(_||(_={}));var w,O,E,S,T,M,A,C,D,P,k,L,R,I,N,V,B,G,U,z,H,F=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return o},get Toolbar(){return a},get ZoomBar(){return s},get ZoomDomain(){return u},get Axis(){return l},get Area(){return c},get Pie(){return h},get Gauge(){return f},get Bar(){return d},get Scatter(){return p},get Line(){return g},get Radar(){return v},get Tooltip(){return m},get Threshold(){return y},get Legend(){return _}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(w||(w={})),function(t){t.FILL="fill",t.STROKE="stroke",t.TOOLTIP="tooltip"}(O||(O={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(E||(E={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(S||(S={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(T||(T={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(M||(M={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(A||(A={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(C||(C={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(D||(D={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(P||(P={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(k||(k={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(L||(L={})),function(t){t.LEFT="left",t.RIGHT="right"}(R||(R={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(I||(I={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(N||(N={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(V||(V={})),function(t){t.SEMI="semi",t.FULL="full"}(B||(B={})),function(t){t.UP="up",t.DOWN="down"}(G||(G={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(U||(U={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(z||(z={})),function(t){t.ZOOM_IN="Zoom in",t.ZOOM_OUT="Zoom out",t.RESET_ZOOM="Reset zoom"}(H||(H={}));var j=Object.freeze({__proto__:null,get Roles(){return r},Events:F,get ChartTheme(){return w},get ColorClassNameTypes(){return O},get AxisPositions(){return E},get ZoomBarTypes(){return S},get TruncationTypes(){return T},get CartesianOrientations(){return M},get ScaleTypes(){return A},get LegendPositions(){return C},get Alignments(){return D},get LegendOrientations(){return P},get LayoutDirection(){return k},get LayoutGrowth(){return L},get CalloutDirections(){return R},get Skeletons(){return I},get TextAnchor(){return N},get DominantBaseline(){return V},get GaugeTypes(){return B},get ArrowDirections(){return G},get Statuses(){return U},get TickRotations(){return z},get ToolbarControlTypes(){return H}}),W="object"==typeof global&&global&&global.Object===Object&&global,Y="object"==typeof self&&self&&self.Object===Object&&self,X=W||Y||Function("return this")(),q=X.Symbol,Z=Object.prototype,K=Z.hasOwnProperty,$=Z.toString,Q=q?q.toStringTag:void 0;var J=Object.prototype.toString;var tt=q?q.toStringTag:void 0;function et(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":tt&&tt in Object(t)?function(t){var e=K.call(t,Q),n=t[Q];try{t[Q]=void 0;var r=!0}catch(t){}var i=$.call(t);return r&&(e?t[Q]=n:delete t[Q]),i}(t):function(t){return J.call(t)}(t)}function nt(t){return null!=t&&"object"==typeof t}function rt(t){return"symbol"==typeof t||nt(t)&&"[object Symbol]"==et(t)}function it(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 ot=Array.isArray,at=q?q.prototype:void 0,st=at?at.toString:void 0;function ut(t){if("string"==typeof t)return t;if(ot(t))return it(t,ut)+"";if(rt(t))return st?st.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function lt(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ct=/^\s+|\s+$/g,ht=/^[-+]0x[0-9a-f]+$/i,ft=/^0b[01]+$/i,dt=/^0o[0-7]+$/i,pt=parseInt;function gt(t){if("number"==typeof t)return t;if(rt(t))return NaN;if(lt(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=lt(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ct,"");var n=ft.test(t);return n||dt.test(t)?pt(t.slice(2),n?2:8):ht.test(t)?NaN:+t}function vt(t){return t}function mt(t){if(!lt(t))return!1;var e=et(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var yt,_t=X["__core-js_shared__"],bt=(yt=/[^.]+$/.exec(_t&&_t.keys&&_t.keys.IE_PROTO||""))?"Symbol(src)_1."+yt:"";var xt=Function.prototype.toString;function wt(t){if(null!=t){try{return xt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var Ot=/^\[object .+?Constructor\]$/,Et=Function.prototype,St=Object.prototype,Tt=Et.toString,Mt=St.hasOwnProperty,At=RegExp("^"+Tt.call(Mt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ct(t){return!(!lt(t)||(e=t,bt&&bt in e))&&(mt(t)?At:Ot).test(wt(t));var e}function Dt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Ct(n)?n:void 0}var Pt=Dt(X,"WeakMap"),kt=Object.create,Lt=function(){function t(){}return function(e){if(!lt(e))return{};if(kt)return kt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Rt(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 It(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var Nt=Date.now;var Vt=function(){try{var t=Dt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Bt=function(t){var e=0,n=0;return function(){var r=Nt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Vt?function(t,e){return Vt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:vt);function Gt(t){return t!=t}function Ut(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,Gt,n)}(t,e,0)>-1}var zt=/^(?:0|[1-9]\d*)$/;function Ht(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&zt.test(t))&&t>-1&&t%1==0&&t<e}function Ft(t,e,n){"__proto__"==e&&Vt?Vt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function jt(t,e){return t===e||t!=t&&e!=e}var Wt=Object.prototype.hasOwnProperty;function Yt(t,e,n){var r=t[e];Wt.call(t,e)&&jt(r,n)&&(void 0!==n||e in t)||Ft(t,e,n)}function Xt(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?Ft(n,s,u):Yt(n,s,u)}return n}var qt=Math.max;function Zt(t,e){return Bt(function(t,e,n){return e=qt(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,o=qt(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),Rt(t,this,s)}}(t,e,vt),t+"")}function Kt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function $t(t){return null!=t&&Kt(t.length)&&!mt(t)}function Qt(t,e,n){if(!lt(n))return!1;var r=typeof e;return!!("number"==r?$t(n)&&Ht(e,n.length):"string"==r&&e in n)&&jt(n[e],t)}var Jt=Object.prototype;function te(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Jt)}function ee(t){return nt(t)&&"[object Arguments]"==et(t)}var ne=Object.prototype,re=ne.hasOwnProperty,ie=ne.propertyIsEnumerable,oe=ee(function(){return arguments}())?ee:function(t){return nt(t)&&re.call(t,"callee")&&!ie.call(t,"callee")};var ae="object"==typeof t&&t&&!t.nodeType&&t,se=ae&&"object"==typeof module&&module&&!module.nodeType&&module,ue=se&&se.exports===ae?X.Buffer:void 0,le=(ue?ue.isBuffer:void 0)||function(){return!1},ce={};function he(t){return function(e){return t(e)}}ce["[object Float32Array]"]=ce["[object Float64Array]"]=ce["[object Int8Array]"]=ce["[object Int16Array]"]=ce["[object Int32Array]"]=ce["[object Uint8Array]"]=ce["[object Uint8ClampedArray]"]=ce["[object Uint16Array]"]=ce["[object Uint32Array]"]=!0,ce["[object Arguments]"]=ce["[object Array]"]=ce["[object ArrayBuffer]"]=ce["[object Boolean]"]=ce["[object DataView]"]=ce["[object Date]"]=ce["[object Error]"]=ce["[object Function]"]=ce["[object Map]"]=ce["[object Number]"]=ce["[object Object]"]=ce["[object RegExp]"]=ce["[object Set]"]=ce["[object String]"]=ce["[object WeakMap]"]=!1;var fe="object"==typeof t&&t&&!t.nodeType&&t,de=fe&&"object"==typeof module&&module&&!module.nodeType&&module,pe=de&&de.exports===fe&&W.process,ge=function(){try{var t=de&&de.require&&de.require("util").types;return t||pe&&pe.binding&&pe.binding("util")}catch(t){}}(),ve=ge&&ge.isTypedArray,me=ve?he(ve):function(t){return nt(t)&&Kt(t.length)&&!!ce[et(t)]},ye=Object.prototype.hasOwnProperty;function _e(t,e){var n=ot(t),r=!n&&oe(t),i=!n&&!r&&le(t),o=!n&&!r&&!i&&me(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&&!ye.call(t,l)||a&&("length"==l||i&&("offset"==l||"parent"==l)||o&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ht(l,u))||s.push(l);return s}function be(t,e){return function(n){return t(e(n))}}var xe=be(Object.keys,Object),we=Object.prototype.hasOwnProperty;function Oe(t){if(!te(t))return xe(t);var e=[];for(var n in Object(t))we.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Ee(t){return $t(t)?_e(t):Oe(t)}var Se=Object.prototype.hasOwnProperty;function Te(t){if(!lt(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=te(t),n=[];for(var r in t)("constructor"!=r||!e&&Se.call(t,r))&&n.push(r);return n}function Me(t){return $t(t)?_e(t,!0):Te(t)}var Ae=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ce=/^\w*$/;function De(t,e){if(ot(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!rt(t))||(Ce.test(t)||!Ae.test(t)||null!=e&&t in Object(e))}var Pe=Dt(Object,"create");var ke=Object.prototype.hasOwnProperty;var Le=Object.prototype.hasOwnProperty;function Re(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Ie(t,e){for(var n=t.length;n--;)if(jt(t[n][0],e))return n;return-1}Re.prototype.clear=function(){this.__data__=Pe?Pe(null):{},this.size=0},Re.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Re.prototype.get=function(t){var e=this.__data__;if(Pe){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ke.call(e,t)?e[t]:void 0},Re.prototype.has=function(t){var e=this.__data__;return Pe?void 0!==e[t]:Le.call(e,t)},Re.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Pe&&void 0===e?"__lodash_hash_undefined__":e,this};var Ne=Array.prototype.splice;function Ve(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])}}Ve.prototype.clear=function(){this.__data__=[],this.size=0},Ve.prototype.delete=function(t){var e=this.__data__,n=Ie(e,t);return!(n<0)&&(n==e.length-1?e.pop():Ne.call(e,n,1),--this.size,!0)},Ve.prototype.get=function(t){var e=this.__data__,n=Ie(e,t);return n<0?void 0:e[n][1]},Ve.prototype.has=function(t){return Ie(this.__data__,t)>-1},Ve.prototype.set=function(t,e){var n=this.__data__,r=Ie(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Be=Dt(X,"Map");function Ge(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 Ue(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])}}Ue.prototype.clear=function(){this.size=0,this.__data__={hash:new Re,map:new(Be||Ve),string:new Re}},Ue.prototype.delete=function(t){var e=Ge(this,t).delete(t);return this.size-=e?1:0,e},Ue.prototype.get=function(t){return Ge(this,t).get(t)},Ue.prototype.has=function(t){return Ge(this,t).has(t)},Ue.prototype.set=function(t,e){var n=Ge(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function ze(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(ze.Cache||Ue),n}ze.Cache=Ue;var He=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Fe=/\\(\\)?/g,je=function(t){var e=ze(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(He,(function(t,n,r,i){e.push(r?i.replace(Fe,"$1"):n||t)})),e}));function We(t){return null==t?"":ut(t)}function Ye(t,e){return ot(t)?t:De(t,e)?[t]:je(We(t))}function Xe(t){if("string"==typeof t||rt(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function qe(t,e){for(var n=0,r=(e=Ye(e,t)).length;null!=t&&n<r;)t=t[Xe(e[n++])];return n&&n==r?t:void 0}function Ze(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var Ke=q?q.isConcatSpreadable:void 0;function $e(t){return ot(t)||oe(t)||!!(Ke&&t&&t[Ke])}var Qe=be(Object.getPrototypeOf,Object),Je=Function.prototype,tn=Object.prototype,en=Je.toString,nn=tn.hasOwnProperty,rn=en.call(Object);var on=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"}),an=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,sn=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var un=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var ln=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var cn="\\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",hn="["+cn+"]",fn="\\d+",dn="[\\u2700-\\u27bf]",pn="[a-z\\xdf-\\xf6\\xf8-\\xff]",gn="[^\\ud800-\\udfff"+cn+fn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",vn="(?:\\ud83c[\\udde6-\\uddff]){2}",mn="[\\ud800-\\udbff][\\udc00-\\udfff]",yn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",_n="(?:"+pn+"|"+gn+")",bn="(?:"+yn+"|"+gn+")",xn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",wn="[\\ufe0e\\ufe0f]?"+xn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",vn,mn].join("|")+")[\\ufe0e\\ufe0f]?"+xn+")*"),On="(?:"+[dn,vn,mn].join("|")+")"+wn,En=RegExp([yn+"?"+pn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[hn,yn,"$"].join("|")+")",bn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[hn,yn+_n,"$"].join("|")+")",yn+"?"+_n+"+(?:['’](?:d|ll|m|re|s|t|ve))?",yn+"+(?:['’](?: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_])",fn,On].join("|"),"g");function Sn(t,e,n){return t=We(t),void 0===(e=n?void 0:e)?function(t){return ln.test(t)}(t)?function(t){return t.match(En)||[]}(t):function(t){return t.match(un)||[]}(t):t.match(e)||[]}var Tn=RegExp("['’]","g");function Mn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=gt(n))==n?n:0),void 0!==e&&(e=(e=gt(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}(gt(t),e,n)}function An(t){var e=this.__data__=new Ve(t);this.size=e.size}An.prototype.clear=function(){this.__data__=new Ve,this.size=0},An.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},An.prototype.get=function(t){return this.__data__.get(t)},An.prototype.has=function(t){return this.__data__.has(t)},An.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Ve){var r=n.__data__;if(!Be||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ue(r)}return n.set(t,e),this.size=n.size,this};var Cn="object"==typeof t&&t&&!t.nodeType&&t,Dn=Cn&&"object"==typeof module&&module&&!module.nodeType&&module,Pn=Dn&&Dn.exports===Cn?X.Buffer:void 0,kn=Pn?Pn.allocUnsafe:void 0;function Ln(t,e){if(e)return t.slice();var n=t.length,r=kn?kn(n):new t.constructor(n);return t.copy(r),r}function Rn(){return[]}var In=Object.prototype.propertyIsEnumerable,Nn=Object.getOwnPropertySymbols,Vn=Nn?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}(Nn(t),(function(e){return In.call(t,e)})))}:Rn;var Bn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Ze(e,Vn(t)),t=Qe(t);return e}:Rn;function Gn(t,e,n){var r=e(t);return ot(t)?r:Ze(r,n(t))}function Un(t){return Gn(t,Ee,Vn)}function zn(t){return Gn(t,Me,Bn)}var Hn=Dt(X,"DataView"),Fn=Dt(X,"Promise"),jn=Dt(X,"Set"),Wn=wt(Hn),Yn=wt(Be),Xn=wt(Fn),qn=wt(jn),Zn=wt(Pt),Kn=et;(Hn&&"[object DataView]"!=Kn(new Hn(new ArrayBuffer(1)))||Be&&"[object Map]"!=Kn(new Be)||Fn&&"[object Promise]"!=Kn(Fn.resolve())||jn&&"[object Set]"!=Kn(new jn)||Pt&&"[object WeakMap]"!=Kn(new Pt))&&(Kn=function(t){var e=et(t),n="[object Object]"==e?t.constructor:void 0,r=n?wt(n):"";if(r)switch(r){case Wn:return"[object DataView]";case Yn:return"[object Map]";case Xn:return"[object Promise]";case qn:return"[object Set]";case Zn:return"[object WeakMap]"}return e});var $n=Kn,Qn=Object.prototype.hasOwnProperty;var Jn=X.Uint8Array;function tr(t){var e=new t.constructor(t.byteLength);return new Jn(e).set(new Jn(t)),e}var er=/\w*$/;var nr=q?q.prototype:void 0,rr=nr?nr.valueOf:void 0;function ir(t,e){var n=e?tr(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function or(t,e,n){var r,i,o,a=t.constructor;switch(e){case"[object ArrayBuffer]":return tr(t);case"[object Boolean]":case"[object Date]":return new a(+t);case"[object DataView]":return function(t,e){var n=e?tr(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 ir(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,er.exec(i))).lastIndex=i.lastIndex,o;case"[object Set]":return new a;case"[object Symbol]":return r=t,rr?Object(rr.call(r)):{}}}function ar(t){return"function"!=typeof t.constructor||te(t)?{}:Lt(Qe(t))}var sr=ge&&ge.isMap,ur=sr?he(sr):function(t){return nt(t)&&"[object Map]"==$n(t)};var lr=ge&&ge.isSet,cr=lr?he(lr):function(t){return nt(t)&&"[object Set]"==$n(t)},hr={};function fr(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(!lt(t))return t;var c=ot(t);if(c){if(a=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&Qn.call(t,"index")&&(n.index=t.index,n.input=t.input),n}(t),!s)return It(t,a)}else{var h=$n(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(le(t))return Ln(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(a=u||f?{}:ar(t),!s)return u?function(t,e){return Xt(t,Bn(t),e)}(t,function(t,e){return t&&Xt(e,Me(e),t)}(a,t)):function(t,e){return Xt(t,Vn(t),e)}(t,function(t,e){return t&&Xt(e,Ee(e),t)}(a,t))}else{if(!hr[h])return i?t:{};a=or(t,h,s)}}o||(o=new An);var d=o.get(t);if(d)return d;o.set(t,a),cr(t)?t.forEach((function(r){a.add(fr(r,e,n,r,t,o))})):ur(t)&&t.forEach((function(r,i){a.set(i,fr(r,e,n,i,t,o))}));var p=l?u?zn:Un:u?keysIn:Ee,g=c?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),Yt(a,i,fr(r,e,n,i,t,o))})),a}hr["[object Arguments]"]=hr["[object Array]"]=hr["[object ArrayBuffer]"]=hr["[object DataView]"]=hr["[object Boolean]"]=hr["[object Date]"]=hr["[object Float32Array]"]=hr["[object Float64Array]"]=hr["[object Int8Array]"]=hr["[object Int16Array]"]=hr["[object Int32Array]"]=hr["[object Map]"]=hr["[object Number]"]=hr["[object Object]"]=hr["[object RegExp]"]=hr["[object Set]"]=hr["[object String]"]=hr["[object Symbol]"]=hr["[object Uint8Array]"]=hr["[object Uint8ClampedArray]"]=hr["[object Uint16Array]"]=hr["[object Uint32Array]"]=!0,hr["[object Error]"]=hr["[object Function]"]=hr["[object WeakMap]"]=!1;function dr(t){return fr(t,5)}function pr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Ue;++e<n;)this.add(t[e])}function gr(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 vr(t,e){return t.has(e)}pr.prototype.add=pr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},pr.prototype.has=function(t){return this.__data__.has(t)};function mr(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);if(l&&o.get(e))return l==e;var c=-1,h=!0,f=2&n?new pr:void 0;for(o.set(t,e),o.set(e,t);++c<s;){var d=t[c],p=e[c];if(r)var g=a?r(p,d,c,e,t,o):r(d,p,c,t,e,o);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!gr(e,(function(t,e){if(!vr(f,e)&&(d===t||i(d,t,n,r,o)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,o)){h=!1;break}}return o.delete(t),o.delete(e),h}function yr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function _r(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var br=q?q.prototype:void 0,xr=br?br.valueOf:void 0;var wr=Object.prototype.hasOwnProperty;var Or=Object.prototype.hasOwnProperty;function Er(t,e,n,r,i,o){var a=ot(t),s=ot(e),u=a?"[object Array]":$n(t),l=s?"[object Array]":$n(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&&le(t)){if(!le(e))return!1;a=!0,c=!1}if(f&&!c)return o||(o=new An),a||me(t)?mr(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 Jn(t),new Jn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return jt(+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=yr;case"[object Set]":var u=1&r;if(s||(s=_r),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=mr(s(t),s(e),r,i,o,a);return a.delete(t),c;case"[object Symbol]":if(xr)return xr.call(t)==xr.call(e)}return!1}(t,e,u,n,r,i,o);if(!(1&n)){var d=c&&Or.call(t,"__wrapped__"),p=h&&Or.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return o||(o=new An),i(g,v,n,r,o)}}return!!f&&(o||(o=new An),function(t,e,n,r,i,o){var a=1&n,s=Un(t),u=s.length;if(u!=Un(e).length&&!a)return!1;for(var l=u;l--;){var c=s[l];if(!(a?c in e:wr.call(e,c)))return!1}var h=o.get(t);if(h&&o.get(e))return h==e;var f=!0;o.set(t,e),o.set(e,t);for(var d=a;++l<u;){var p=t[c=s[l]],g=e[c];if(r)var v=a?r(g,p,c,e,t,o):r(p,g,c,t,e,o);if(!(void 0===v?p===g||i(p,g,n,r,o):v)){f=!1;break}d||(d="constructor"==c)}if(f&&!d){var m=t.constructor,y=e.constructor;m!=y&&"constructor"in t&&"constructor"in e&&!("function"==typeof m&&m instanceof m&&"function"==typeof y&&y instanceof y)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o))}function Sr(t,e,n,r,i){return t===e||(null==t||null==e||!nt(t)&&!nt(e)?t!=t&&e!=e:Er(t,e,n,r,Sr,i))}function Tr(t){return t==t&&!lt(t)}function Mr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Ar(t){var e=function(t){for(var e=Ee(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,Tr(i)]}return e}(t);return 1==e.length&&e[0][2]?Mr(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 An;if(r)var f=r(l,c,u,t,e,h);if(!(void 0===f?Sr(c,l,3,r,h):f))return!1}}return!0}(n,t,e)}}function Cr(t,e){return null!=t&&e in Object(t)}function Dr(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=Ye(e,t)).length,o=!1;++r<i;){var a=Xe(e[r]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&Kt(i)&&Ht(a,i)&&(ot(t)||oe(t))}(t,e,Cr)}function Pr(t,e){return De(t)&&Tr(e)?Mr(Xe(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:qe(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Dr(n,t):Sr(e,r,3)}}function kr(t){return De(t)?(e=Xe(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return qe(e,t)}}(t);var e}function Lr(t){return"function"==typeof t?t:null==t?vt:"object"==typeof t?ot(t)?Pr(t[0],t[1]):Ar(t):kr(t)}var Rr,Ir=function(t,e,n){for(var r=-1,i=Object(t),o=n(t),a=o.length;a--;){var s=o[Rr?a:++r];if(!1===e(i[s],s,i))break}return t};var Nr=function(t,e){return function(n,r){if(null==n)return n;if(!$t(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&&Ir(t,e,Ee)})),Vr=function(){return X.Date.now()},Br=Math.max,Gr=Math.min;function Ur(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=Vr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Gr(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=Vr(),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=gt(e)||0,lt(n)&&(c=!!n.leading,o=(h="maxWait"in n)?Br(gt(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(Vr())},y}function zr(t,e,n){(void 0===n||jt(t[e],n))&&(void 0!==n||e in t)||Ft(t,e,n)}function Hr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Fr(t,e,n,r,i,o,a){var s=Hr(t,n),u=Hr(e,n),l=a.get(u);if(l)zr(t,n,l);else{var c,h=o?o(s,u,n+"",t,e,a):void 0,f=void 0===h;if(f){var d=ot(u),p=!d&&le(u),g=!d&&!p&&me(u);h=u,d||p||g?ot(s)?h=s:nt(c=s)&&$t(c)?h=It(s):p?(f=!1,h=Ln(u,!0)):g?(f=!1,h=ir(u,!0)):h=[]:function(t){if(!nt(t)||"[object Object]"!=et(t))return!1;var e=Qe(t);if(null===e)return!0;var n=nn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&en.call(n)==rn}(u)||oe(u)?(h=s,oe(s)?h=function(t){return Xt(t,Me(t))}(s):lt(s)&&!mt(s)||(h=ar(u))):f=!1}f&&(a.set(u,h),i(h,u,r,o,a),a.delete(u)),zr(t,n,h)}}function jr(t,e,n,r,i){t!==e&&Ir(e,(function(o,a){if(i||(i=new An),lt(o))Fr(t,e,a,n,jr,r,i);else{var s=r?r(Hr(t,a),o,a+"",t,e,i):void 0;void 0===s&&(s=o),zr(t,a,s)}}),Me)}function Wr(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 Yr(t,e){var n=-1,r=$t(t)?Array(t.length):[];return Nr(t,(function(t,i,o){r[++n]=e(t,i,o)})),r}function Xr(t,e){return function t(e,n,r,i,o){var a=-1,s=e.length;for(r||(r=$e),o||(o=[]);++a<s;){var u=e[a];n>0&&r(u)?n>1?t(u,n-1,r,i,o):Ze(o,u):i||(o[o.length]=u)}return o}(function(t,e){return(ot(t)?it:Yr)(t,Lr(e))}(t,e),1/0)}function qr(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 Zr=Object.prototype.hasOwnProperty;function Kr(t){if(null==t)return!0;if($t(t)&&(ot(t)||"string"==typeof t||"function"==typeof t.splice||le(t)||me(t)||oe(t)))return!t.length;var e=$n(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(te(t))return!Oe(t).length;for(var n in t)if(Zr.call(t,n))return!1;return!0}function $r(t,e){return Sr(t,e)}var Qr,Jr,ti=(Qr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){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}(Sn(function(t){return(t=We(t))&&t.replace(an,on).replace(sn,"")}(t).replace(Tn,"")),Qr,"")}),ei=(Jr=function(t,e,n){jr(t,e,n)},Zt((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=Jr.length>3&&"function"==typeof i?(r--,i):void 0,o&&Qt(e[0],e[1],o)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var a=e[n];a&&Jr(t,a,n,i)}return t})));function ni(t,e){var n;return Nr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function ri(t,e,n){var r=ot(t)?gr:ni;return n&&Qt(t,e,n)&&(e=void 0),r(t,Lr(e))}var ii=jn&&1/_r(new jn([,-0]))[1]==1/0?function(t){return new jn(t)}:function(){};function oi(t){return t&&t.length?function(t,e,n){var r=-1,i=Ut,o=t.length,a=!0,s=[],u=s;if(n)a=!1,i=Wr;else if(o>=200){var l=e?null:ii(t);if(l)return _r(l);a=!1,i=vr,u=new pr}else u=e?[]:s;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,a&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(c)}else i(u,h,n)||(u!==s&&u.push(h),s.push(c))}return s}(t):[]}var ai="http://www.w3.org/1999/xhtml",si={svg:"http://www.w3.org/2000/svg",xhtml:ai,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ui(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),si.hasOwnProperty(e)?{space:si[e],local:t}:t}function li(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===ai&&e.documentElement.namespaceURI===ai?e.createElement(t):e.createElementNS(n,t)}}function ci(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function hi(t){var e=ui(t);return(e.local?ci:li)(e)}function fi(){}function di(t){return null==t?fi:function(){return this.querySelector(t)}}function pi(){return[]}function gi(t){return null==t?pi:function(){return this.querySelectorAll(t)}}function vi(t){return function(){return this.matches(t)}}function mi(t){return new Array(t.length)}function yi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}yi.prototype={constructor:yi,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function _i(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 yi(t,o[s]);for(;s<u;++s)(a=e[s])&&(i[s]=a)}function bi(t,e,n,r,i,o,a){var s,u,l,c={},h=e.length,f=o.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=l="$"+a.call(u,u.__data__,s,e),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):n[s]=new yi(t,o[s]);for(s=0;s<h;++s)(u=e[s])&&c[d[s]]===u&&(i[s]=u)}function xi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function wi(t){return function(){this.removeAttribute(t)}}function Oi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ei(t,e){return function(){this.setAttribute(t,e)}}function Si(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ti(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Mi(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 Ai(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Ci(t){return function(){this.style.removeProperty(t)}}function Di(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Pi(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function ki(t,e){return t.style.getPropertyValue(e)||Ai(t).getComputedStyle(t,null).getPropertyValue(e)}function Li(t){return function(){delete this[t]}}function Ri(t,e){return function(){this[t]=e}}function Ii(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ni(t){return t.trim().split(/^|\s+/)}function Vi(t){return t.classList||new Bi(t)}function Bi(t){this._node=t,this._names=Ni(t.getAttribute("class")||"")}function Gi(t,e){for(var n=Vi(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ui(t,e){for(var n=Vi(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function zi(t){return function(){Gi(this,t)}}function Hi(t){return function(){Ui(this,t)}}function Fi(t,e){return function(){(e.apply(this,arguments)?Gi:Ui)(this,t)}}function ji(){this.textContent=""}function Wi(t){return function(){this.textContent=t}}function Yi(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Xi(){this.innerHTML=""}function qi(t){return function(){this.innerHTML=t}}function Zi(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Ki(){this.nextSibling&&this.parentNode.appendChild(this)}function $i(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Qi(){return null}function Ji(){var t=this.parentNode;t&&t.removeChild(this)}function to(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function eo(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Bi.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 no={},ro=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(no={mouseenter:"mouseover",mouseleave:"mouseout"}));function io(t,e,n){return t=oo(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function oo(t,e,n){return function(r){var i=ro;ro=r;try{t.call(this,this.__data__,e,n)}finally{ro=i}}}function ao(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 so(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function uo(t,e,n){var r=no.hasOwnProperty(t.type)?io:oo;return function(i,o,a){var s,u=this.__on,l=r(e,o,a);if(u)for(var c=0,h=u.length;c<h;++c)if((s=u[c]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=l,s.capture=n),void(s.value=e);this.addEventListener(t.type,l,n),s={type:t.type,name:t.name,value:e,listener:l,capture:n},u?u.push(s):this.__on=[s]}}function lo(t,e,n){var r=Ai(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 co(t,e){return function(){return lo(this,t,e)}}function ho(t,e){return function(){return lo(this,t,e.apply(this,arguments))}}var fo,po=[null];function go(t,e){this._groups=t,this._parents=e}function vo(){return new go([[document.documentElement]],po)}function mo(t){return"string"==typeof t?new go([[document.querySelector(t)]],[document.documentElement]):new go([[t]],po)}function yo(){for(var t,e=ro;t=e.sourceEvent;)e=t;return e}function _o(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}function bo(t){var e=yo();return e.changedTouches&&(e=e.changedTouches[0]),_o(t,e)}function xo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function wo(t,e){return t(e={exports:{}},e.exports),e.exports}go.prototype=vo.prototype={constructor:go,select:function(t){"function"!=typeof t&&(t=di(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 go(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=gi(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 go(r,i)},filter:function(t){"function"!=typeof t&&(t=vi(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 go(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),l=-1,this.each((function(t){d[++l]=t})),d;var n=e?bi:_i,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var o=i.length,a=new Array(o),s=new Array(o),u=new Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,d=t.call(c,c&&c.__data__,l,r),p=d.length,g=s[l]=new Array(p),v=a[l]=new Array(p);n(c,h,g,v,u[l]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(a=new go(a,r))._enter=s,a._exit=u,a},enter:function(){return new go(this._enter||this._groups.map(mi),this._parents)},exit:function(){return new go(this._exit||this._groups.map(mi),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=new Array(r),s=0;s<o;++s)for(var u,l=e[s],c=n[s],h=l.length,f=a[s]=new Array(h),d=0;d<h;++d)(u=l[d]||c[d])&&(f[d]=u);for(;s<r;++s)a[s]=e[s];return new go(a,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=xi);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 go(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,s=o.length;a<s;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=ui(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?Oi:wi:"function"==typeof e?n.local?Mi:Ti:n.local?Si:Ei)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Ci:"function"==typeof e?Pi:Di)(t,e,null==n?"":n)):ki(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Li:"function"==typeof e?Ii:Ri)(t,e)):this.node()[t]},classed:function(t,e){var n=Ni(t+"");if(arguments.length<2){for(var r=Vi(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Fi:e?zi:Hi)(n,e))},text:function(t){return arguments.length?this.each(null==t?ji:("function"==typeof t?Yi:Wi)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Xi:("function"==typeof t?Zi:qi)(t)):this.node().innerHTML},raise:function(){return this.each(Ki)},lower:function(){return this.each($i)},append:function(t){var e="function"==typeof t?t:hi(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:hi(t),r=null==e?Qi:"function"==typeof e?e:di(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Ji)},clone:function(t){return this.select(t?eo:to)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=ao(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?uo:so,null==n&&(n=!1),r=0;r<a;++r)this.each(s(o[r],e,n));return this}var s=this.node().__on;if(s)for(var u,l=0,c=s.length;l<c;++l)for(r=0,u=s[l];r<a;++r)if((i=o[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?ho:co)(t,e))}},function(t){t.debounce=Ur,t.clone=dr,t.merge=ei,t.removeArrayDuplicates=oi,t.clamp=Mn,t.isEmpty=Kr,t.isEqual=$r,t.flatMapDeep=Xr,t.kebabCase=ti,t.fromPairs=qr,t.some=ri,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,o=arguments;i.mousePosition=bo(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,o)}),e)}},t.mergeDefaultChartOptions=function(e,n){e=t.clone(e);var r=Object.keys(n.axes||{});for(var i in 0===r.length&&delete e.axes,e.axes)if(r.includes(i)){var o=n.axes[i];(o.primary||o.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format");var a=o.mapsTo;if(null==a){var s=o.scaleType;null==s?o.mapsTo="value":s===A.TIME?o.mapsTo="date":s===A.LABELS&&(o.mapsTo="key")}}else delete e.axes[i];return t.merge(e,n)},t.getDimensions=function(t){return{width:parseFloat(t.style.width.replace("px","")||t.offsetWidth),height:parseFloat(t.style.height.replace("px","")||t.offsetHeight)}},t.getTranslationValues=function(t){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){var n=t/e.reduce((function(t,e){return t+e.value}),0)*100;return n%1!=0?parseFloat(n.toFixed(1)):n},t.truncateLabel=function(t,e,n){return n>t.length?t:e===T.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===T.FRONT_LINE?"..."+t.substr(-n):e===T.END_LINE?t.substr(0,n)+"...":void 0},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===M.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===M.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(fo||(fo={}));var Oo=wo((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}));xo(Oo);var Eo=wo((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}));xo(Eo);var So=wo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Eo)&&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}));xo(So);var To=wo((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}));xo(To);var Mo=wo((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}));xo(Mo);var Ao=wo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=Mo)&&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}));xo(Ao);var Co=wo((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}));xo(Co);var Do=wo((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}));xo(Do);var Po=wo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(Co),r=i(Do);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}));xo(Po);var ko,Lo=xo(wo((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(Oo),r=s(So),i=s(To),o=s(Ao),a=s(Po);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}))),Ro={pairingOptions:{"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1}},Io={opacity:{unselected:0,selected:.4}},No={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},paddingRatio:.1},Vo={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Bo={opacity:{unselected:.3,selected:1}},Go={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15}},Uo={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}},zo={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Ho={default:{size:24}},Fo={horizontalOffset:10},jo={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}},Wo={buttonSize:32,iconSize:20,height:32,spacerHeight:10,iconPadding:6},Yo={height:(ko={},ko[S.GRAPH_VIEW]=32,ko[S.SLIDER_VIEW]=10,ko),spacerHeight:8,handleWidth:5,handleBarWidth:1,handleBarHeight:12},Xo={type:T.END_LINE,threshold:16,numCharacter:14},qo={x:{enabled:!0,numberOfTicks:15},y:{enabled:!0,numberOfTicks:5}},Zo={enabled:!0},Ko={enabled:!0,showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:Xo},$o={top:{visible:!0,includeZero:!0,truncation:Xo},bottom:{visible:!0,includeZero:!0,truncation:Xo},left:{visible:!0,includeZero:!0,truncation:Xo},right:{visible:!0,includeZero:!0,truncation:Xo}},Qo={addSpaceOnEdges:1,showDayName:!1,localeObject:Lo,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"}}},Jo={width:null,height:null,resizable:!0,tooltip:Ko,legend:{enabled:!0,position:C.BOTTOM,clickable:!0,truncation:Xo,alignment:D.LEFT,order:null},style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}}},ta=fo.merge({},Jo,{axes:$o,timeScale:Qo,grid:qo,ruler:Zo,zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:S.GRAPH_VIEW},updateRangeAxis:!1},toolbar:{enabled:!1,numberOfIcons:3,controls:[]}}),ea=fo.merge({},ta,{bars:{maxWidth:16},timeScale:fo.merge(Qo,{addSpaceOnEdges:1})}),na=fo.merge({},ea,{}),ra=fo.merge({},ea,{}),ia=fo.merge({},ea,{bars:fo.merge({},ea.bars,{dividerSize:1.5})}),oa=fo.merge({},ta,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),aa=fo.merge({},oa,{points:{radius:3,filled:!1,enabled:!0}}),sa=fo.merge({},aa,{timeScale:fo.merge(Qo,{addSpaceOnEdges:0})}),ua=sa,la=fo.merge({},ta,{bubble:{radiusMapsTo:"radius",radiusRange:function(t,e){var n=Math.min(t.width,t.height);return[3*n/400,25*n/400]},fillOpacity:.2,enabled:!0}}),ca=fo.merge({},Jo,{pie:{labels:{formatter:null},alignment:D.LEFT}}),ha=fo.merge({},Jo,{legend:{enabled:!1},gauge:{type:B.SEMI,arcWidth:16,deltaArrow:{size:function(t){return t/8},enabled:!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()}}}),fa={chart:Jo,axisChart:ta,simpleBarChart:na,groupedBarChart:ra,stackedBarChart:ia,bubbleChart:la,lineChart:aa,areaChart:sa,stackedAreaChart:ua,scatterChart:oa,pieChart:ca,donutChart:fo.merge({},ca,{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:D.LEFT}}),meterChart:fo.merge({},Jo,{legend:{enabled:!1},meter:{height:8,statusBar:{percentageIndicator:{enabled:!0}}}}),radarChart:fo.merge({},Jo,{radar:{axes:{angle:"key",value:"value"},alignment:D.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:ha},da=Object.freeze({__proto__:null,grid:qo,ruler:Zo,baseTooltip:Ko,timeScale:Qo,options:fa,color:Ro,area:Io,axis:No,legend:Vo,lines:Bo,meter:Go,pie:Uo,radar:zo,spacers:Ho,tooltips:Fo,transitions:jo,toolbar:Wo,zoomBar:Yo});function pa(){}function ga(t,e){var n=new pa;if(t instanceof pa)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,o=t.length;if(null==e)for(;++i<o;)n.set(i,t[i]);else for(;++i<o;)n.set(e(r=t[i],i,t),r)}else if(t)for(var a in t)n.set(a,t[a]);return n}function va(){}pa.prototype=ga.prototype={constructor:pa,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var ma=ga.prototype;function ya(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function _a(t){var e;return 1===t.length&&(e=t,t=function(t,n){return ya(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)<0?r=o+1:i=o}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var o=r+i>>>1;t(e[o],n)>0?i=o:r=o+1}return r}}}va.prototype=function(t,e){var n=new va;if(t instanceof va)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}.prototype={constructor:va,has:ma.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ma.remove,clear:ma.clear,values:ma.keys,size:ma.size,empty:ma.empty,each:ma.each};var ba=_a(ya).right;function xa(t,e){var n,r,i,o=t.length,a=-1;if(null==e){for(;++a<o;)if(null!=(n=t[a])&&n>=n)for(r=i=n;++a<o;)null!=(n=t[a])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++a<o;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=i=n;++a<o;)null!=(n=e(t[a],a,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function wa(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(i);++r<i;)o[r]=t+r*n;return o}var Oa=Math.sqrt(50),Ea=Math.sqrt(10),Sa=Math.sqrt(2);function Ta(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=Ma(t,e,n))||!isFinite(a))return[];if(a>0)for(t=Math.ceil(t/a),e=Math.floor(e/a),o=new Array(i=Math.ceil(e-t+1));++s<i;)o[s]=(t+s)*a;else for(t=Math.floor(t*a),e=Math.ceil(e*a),o=new Array(i=Math.ceil(t-e+1));++s<i;)o[s]=(t-s)/a;return r&&o.reverse(),o}function Ma(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>=Oa?10:o>=Ea?5:o>=Sa?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(o>=Oa?10:o>=Ea?5:o>=Sa?2:1)}function Aa(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>=Oa?i*=10:o>=Ea?i*=5:o>=Sa&&(i*=2),e<t?-i:i}function Ca(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&n>r&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&n>r&&(r=n);return r}function Da(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Pa=Array.prototype,ka=Pa.map,La=Pa.slice,Ra={name:"implicit"};function Ia(){var t=ga(),e=[],n=[],r=Ra;function i(i){var o=i+"",a=t.get(o);if(!a){if(r!==Ra)return r;t.set(o,a=e.push(i))}return n[(a-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=ga();for(var r,o,a=-1,s=n.length;++a<s;)t.has(o=(r=n[a])+"")||t.set(o,e.push(r));return i},i.range=function(t){return arguments.length?(n=La.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Ia(e,n).unknown(r)},Da.apply(i,arguments),i}function Na(){var t,e,n=Ia().unknown(void 0),r=n.domain,i=n.range,o=[0,1],a=!1,s=0,u=0,l=.5;function c(){var n=r().length,c=o[1]<o[0],h=o[c-0],f=o[1-c];t=(f-h)/Math.max(1,n-s+2*u),a&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*l,e=t*(1-s),a&&(h=Math.round(h),e=Math.round(e));var d=wa(n).map((function(e){return h+t*e}));return i(c?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),c()):r()},n.range=function(t){return arguments.length?(o=[+t[0],+t[1]],c()):o.slice()},n.rangeRound=function(t){return o=[+t[0],+t[1]],a=!0,c()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(a=!!t,c()):a},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),c()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),c()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,c()):u},n.align=function(t){return arguments.length?(l=Math.max(0,Math.min(1,t)),c()):l},n.copy=function(){return Na(r(),o).round(a).paddingInner(s).paddingOuter(u).align(l)},Da.apply(c(),arguments)}function Va(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ba(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Ga(){}var Ua="\\s*([+-]?\\d+)\\s*",za="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ha="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Fa=/^#([0-9a-f]{3,8})$/,ja=new RegExp("^rgb\\("+[Ua,Ua,Ua]+"\\)$"),Wa=new RegExp("^rgb\\("+[Ha,Ha,Ha]+"\\)$"),Ya=new RegExp("^rgba\\("+[Ua,Ua,Ua,za]+"\\)$"),Xa=new RegExp("^rgba\\("+[Ha,Ha,Ha,za]+"\\)$"),qa=new RegExp("^hsl\\("+[za,Ha,Ha]+"\\)$"),Za=new RegExp("^hsla\\("+[za,Ha,Ha,za]+"\\)$"),Ka={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 $a(){return this.rgb().formatHex()}function Qa(){return this.rgb().formatRgb()}function Ja(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Fa.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ts(e):3===n?new is(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new is(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new is(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=ja.exec(t))?new is(e[1],e[2],e[3],1):(e=Wa.exec(t))?new is(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Ya.exec(t))?es(e[1],e[2],e[3],e[4]):(e=Xa.exec(t))?es(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=qa.exec(t))?us(e[1],e[2]/100,e[3]/100,1):(e=Za.exec(t))?us(e[1],e[2]/100,e[3]/100,e[4]):Ka.hasOwnProperty(t)?ts(Ka[t]):"transparent"===t?new is(NaN,NaN,NaN,0):null}function ts(t){return new is(t>>16&255,t>>8&255,255&t,1)}function es(t,e,n,r){return r<=0&&(t=e=n=NaN),new is(t,e,n,r)}function ns(t){return t instanceof Ga||(t=Ja(t)),t?new is((t=t.rgb()).r,t.g,t.b,t.opacity):new is}function rs(t,e,n,r){return 1===arguments.length?ns(t):new is(t,e,n,null==r?1:r)}function is(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function os(){return"#"+ss(this.r)+ss(this.g)+ss(this.b)}function as(){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 ss(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function us(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new cs(t,e,n,r)}function ls(t){if(t instanceof cs)return new cs(t.h,t.s,t.l,t.opacity);if(t instanceof Ga||(t=Ja(t)),!t)return new cs;if(t instanceof cs)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 cs(a,s,u,t.opacity)}function cs(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function hs(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function fs(t){return function(){return t}}function ds(t){return 1==(t=+t)?ps: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):fs(isNaN(e)?n:e)}}function ps(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):fs(isNaN(t)?e:t)}Va(Ga,Ja,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:$a,formatHex:$a,formatHsl:function(){return ls(this).formatHsl()},formatRgb:Qa,toString:Qa}),Va(is,rs,Ba(Ga,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new is(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new is(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:os,formatHex:os,formatRgb:as,toString:as})),Va(cs,(function(t,e,n,r){return 1===arguments.length?ls(t):new cs(t,e,n,null==r?1:r)}),Ba(Ga,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new cs(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new cs(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 is(hs(t>=240?t-240:t+120,i,r),hs(t,i,r),hs(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 gs=function t(e){var n=ds(e);function r(t,e){var r=n((t=rs(t)).r,(e=rs(e)).r),i=n(t.g,e.g),o=n(t.b,e.b),a=ps(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 vs(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 ms(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]=Es(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 ys(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function _s(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function bs(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]=Es(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var xs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ws=new RegExp(xs.source,"g");function Os(t,e){var n,r,i,o=xs.lastIndex=ws.lastIndex=0,a=-1,s=[],u=[];for(t+="",e+="";(n=xs.exec(t))&&(r=ws.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:_s(n,r)})),o=ws.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 Es(t,e){var n,r=typeof e;return null==e||"boolean"===r?fs(e):("number"===r?_s:"string"===r?(n=Ja(e))?(e=n,gs):Os:e instanceof Ja?gs:e instanceof Date?ys:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?vs:Array.isArray(e)?ms:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?bs:_s)(t,e)}function Ss(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Ts,Ms,As,Cs,Ds=180/Math.PI,Ps={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ks(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)*Ds,skewX:Math.atan(u)*Ds,scaleX:a,scaleY:s}}function Ls(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:_s(t,i)},{i:u-2,x:_s(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:_s(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:_s(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:_s(t,n)},{i:s-2,x:_s(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 Rs=Ls((function(t){return"none"===t?Ps:(Ts||(Ts=document.createElement("DIV"),Ms=document.documentElement,As=document.defaultView),Ts.style.transform=t,t=As.getComputedStyle(Ms.appendChild(Ts),null).getPropertyValue("transform"),Ms.removeChild(Ts),ks(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Is=Ls((function(t){return null==t?Ps:(Cs||(Cs=document.createElementNS("http://www.w3.org/2000/svg","g")),Cs.setAttribute("transform",t),(t=Cs.transform.baseVal.consolidate())?ks((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Ps)}),", ",")",")");function Ns(t){return+t}var Vs=[0,1];function Bs(t){return t}function Gs(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Us(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function zs(t,e,n){var r=t[0],i=t[1],o=e[0],a=e[1];return i<r?(r=Gs(i,r),o=n(a,o)):(r=Gs(r,i),o=n(o,a)),function(t){return o(r(t))}}function Hs(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]=Gs(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=ba(t,e,1,r)-1;return o[n](i[n](e))}}function Fs(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function js(){var t,e,n,r,i,o,a=Vs,s=Vs,u=Es,l=Bs;function c(){return r=Math.min(a.length,s.length)>2?Hs:zs,i=o=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(a.map(t),s,u)))(t(l(e)))}return h.invert=function(n){return l(e((o||(o=r(s,a.map(t),_s)))(n)))},h.domain=function(t){return arguments.length?(a=ka.call(t,Ns),l===Bs||(l=Us(a)),c()):a.slice()},h.range=function(t){return arguments.length?(s=La.call(t),c()):s.slice()},h.rangeRound=function(t){return s=La.call(t),u=Ss,c()},h.clamp=function(t){return arguments.length?(l=t?Us(a):Bs,h):l!==Bs},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 Ws(t,e){return js()(t,e)}function Ys(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 Xs(t){return(t=Ys(Math.abs(t)))?t[1]:NaN}var qs,Zs=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ks(t){if(!(e=Zs.exec(t)))throw new Error("invalid format: "+t);var e;return new $s({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 $s(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 Qs(t,e){var n=Ys(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")}Ks.prototype=$s.prototype,$s.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 Js={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Qs(100*t,e)},r:Qs,s:function(t,e){var n=Ys(t,e);if(!n)return t+"";var r=n[0],i=n[1],o=i-(qs=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")+Ys(t,Math.max(0,e+o-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function tu(t){return t}var eu,nu,ru,iu=Array.prototype.map,ou=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function au(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?tu:(e=iu.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?tu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(iu.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=Ks(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"):Js[y]||(void 0===v&&(v=12),m=!0,y="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var _="$"===f?i:"#"===f&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",b="$"===f?o:/[%p]/.test(y)?u:"",x=Js[y],w=/[defgprs%]/.test(y);function O(t){var i,o,u,f=_,O=b;if("c"===y)O=x(t)+O,t="";else{var E=(t=+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&&(E=!1),f=(E?"("===h?h:l:"-"===h||"("===h?"":h)+f,O=("s"===y?ou[8+qs/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 S=f.length+t.length+O.length,T=S<p?new Array(p-S+1).join(e):"";switch(g&&d&&(t=r(T+t,T.length?p-O.length:1/0),T=""),n){case"<":t=f+t+O+T;break;case"=":t=f+T+t+O;break;case"^":t=T.slice(0,S=T.length>>1)+f+t+O+T.slice(S);break;default:t=T+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=Ks(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(Xs(e)/3))),i=Math.pow(10,-r),o=ou[8+r/3];return function(t){return n(i*t)+o}}}}function su(t,e,n,r){var i,o=Aa(t,e,n);switch((r=Ks(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(Xs(e)/3)))-Xs(Math.abs(t)))}(o,a))||(r.precision=i),ru(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,Xs(e)-Xs(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,-Xs(Math.abs(t)))}(o))||(r.precision=i-2*("%"===r.type))}return nu(r)}function uu(t){var e=t.domain;return t.ticks=function(t){var n=e();return Ta(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return su(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),o=0,a=i.length-1,s=i[o],u=i[a];return u<s&&(r=s,s=u,u=r,r=o,o=a,a=r),(r=Ma(s,u,n))>0?r=Ma(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Ma(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[o]=Math.floor(s/r)*r,i[a]=Math.ceil(u/r)*r,e(i)):r<0&&(i[o]=Math.ceil(s*r)/r,i[a]=Math.floor(u*r)/r,e(i)),t},t}function lu(){var t=Ws(Bs,Bs);return t.copy=function(){return Fs(t,lu())},Da.apply(t,arguments),uu(t)}function cu(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 hu(t){return Math.log(t)}function fu(t){return Math.exp(t)}function du(t){return-Math.log(-t)}function pu(t){return-Math.exp(-t)}function gu(t){return isFinite(t)?+("1e"+t):t<0?0:t}function vu(t){return function(e){return-t(-e)}}function mu(t){var e,n,r=t(hu,fu),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?gu:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(o),i()[0]<0?(e=vu(e),n=vu(n),t(du,pu)):t(hu,fu),r}return r.base=function(t){return arguments.length?(o=+t,a()):o},r.domain=function(t){return arguments.length?(i(t),a()):i()},r.ticks=function(t){var r,a=i(),s=a[0],u=a[a.length-1];(r=u<s)&&(f=s,s=u,u=f);var l,c,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(o%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(c=1,l=n(f);c<o;++c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(c=o-1,l=n(f);c>=1;--c)if(!((h=l*c)<s)){if(h>u)break;g.push(h)}}else g=Ta(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=nu(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(cu(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}eu=au({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),nu=eu.format,ru=eu.formatPrefix;var yu=new Date,_u=new Date;function bu(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 bu((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 yu.setTime(+e),_u.setTime(+r),t(yu),t(_u),Math.floor(n(yu,_u))},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 xu=bu((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));xu.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?bu((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):xu:null};var wu=bu((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()})),Ou=bu((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()})),Eu=bu((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()})),Su=bu((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1}));function Tu(t){return bu((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 Mu=Tu(0),Au=Tu(1),Cu=(Tu(2),Tu(3),Tu(4)),Du=(Tu(5),Tu(6),bu((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()}))),Pu=bu((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()}));Pu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?bu((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 ku=bu((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 Lu(t){return bu((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 Ru=Lu(0),Iu=Lu(1),Nu=(Lu(2),Lu(3),Lu(4)),Vu=(Lu(5),Lu(6),bu((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()})));function Bu(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 Gu(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 Uu(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Vu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?bu((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var zu,Hu,Fu={"-":"",_:" ",0:"0"},ju=/^\s*\d+/,Wu=/^%/,Yu=/[\\^$*+?|[\]().{}]/g;function Xu(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 qu(t){return t.replace(Yu,"\\$&")}function Zu(t){return new RegExp("^(?:"+t.map(qu).join("|")+")","i")}function Ku(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function $u(t,e,n){var r=ju.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function Qu(t,e,n){var r=ju.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function Ju(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function tl(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function el(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function nl(t,e,n){var r=ju.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function rl(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function il(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 ol(t,e,n){var r=ju.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function al(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function sl(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function ul(t,e,n){var r=ju.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function ll(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function cl(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function hl(t,e,n){var r=ju.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function fl(t,e,n){var r=ju.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function dl(t,e,n){var r=ju.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function pl(t,e,n){var r=Wu.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function gl(t,e,n){var r=ju.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function vl(t,e,n){var r=ju.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function ml(t,e){return Xu(t.getDate(),e,2)}function yl(t,e){return Xu(t.getHours(),e,2)}function _l(t,e){return Xu(t.getHours()%12||12,e,2)}function bl(t,e){return Xu(1+Su.count(Pu(t),t),e,3)}function xl(t,e){return Xu(t.getMilliseconds(),e,3)}function wl(t,e){return xl(t,e)+"000"}function Ol(t,e){return Xu(t.getMonth()+1,e,2)}function El(t,e){return Xu(t.getMinutes(),e,2)}function Sl(t,e){return Xu(t.getSeconds(),e,2)}function Tl(t){var e=t.getDay();return 0===e?7:e}function Ml(t,e){return Xu(Mu.count(Pu(t)-1,t),e,2)}function Al(t,e){var n=t.getDay();return t=n>=4||0===n?Cu(t):Cu.ceil(t),Xu(Cu.count(Pu(t),t)+(4===Pu(t).getDay()),e,2)}function Cl(t){return t.getDay()}function Dl(t,e){return Xu(Au.count(Pu(t)-1,t),e,2)}function Pl(t,e){return Xu(t.getFullYear()%100,e,2)}function kl(t,e){return Xu(t.getFullYear()%1e4,e,4)}function Ll(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Xu(e/60|0,"0",2)+Xu(e%60,"0",2)}function Rl(t,e){return Xu(t.getUTCDate(),e,2)}function Il(t,e){return Xu(t.getUTCHours(),e,2)}function Nl(t,e){return Xu(t.getUTCHours()%12||12,e,2)}function Vl(t,e){return Xu(1+ku.count(Vu(t),t),e,3)}function Bl(t,e){return Xu(t.getUTCMilliseconds(),e,3)}function Gl(t,e){return Bl(t,e)+"000"}function Ul(t,e){return Xu(t.getUTCMonth()+1,e,2)}function zl(t,e){return Xu(t.getUTCMinutes(),e,2)}function Hl(t,e){return Xu(t.getUTCSeconds(),e,2)}function Fl(t){var e=t.getUTCDay();return 0===e?7:e}function jl(t,e){return Xu(Ru.count(Vu(t)-1,t),e,2)}function Wl(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Nu(t):Nu.ceil(t),Xu(Nu.count(Vu(t),t)+(4===Vu(t).getUTCDay()),e,2)}function Yl(t){return t.getUTCDay()}function Xl(t,e){return Xu(Iu.count(Vu(t)-1,t),e,2)}function ql(t,e){return Xu(t.getUTCFullYear()%100,e,2)}function Zl(t,e){return Xu(t.getUTCFullYear()%1e4,e,4)}function Kl(){return"+0000"}function $l(){return"%"}function Ql(t){return+t}function Jl(t){return Math.floor(+t/1e3)}!function(t){zu=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=Zu(i),c=Ku(i),h=Zu(o),f=Ku(o),d=Zu(a),p=Ku(a),g=Zu(s),v=Ku(s),m=Zu(u),y=Ku(u),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:ml,e:ml,f:wl,H:yl,I:_l,j:bl,L:xl,m:Ol,M:El,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:Ql,s:Jl,S:Sl,u:Tl,U:Ml,V:Al,w:Cl,W:Dl,x:null,X:null,y:Pl,Y:kl,Z:Ll,"%":$l},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Rl,e:Rl,f:Gl,H:Il,I:Nl,j:Vl,L:Bl,m:Ul,M:zl,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:Ql,s:Jl,S:Hl,u:Fl,U:jl,V:Wl,w:Yl,W:Xl,x:null,X:null,y:ql,Y:Zl,Z:Kl,"%":$l},x={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=m.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=v[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:sl,e:sl,f:dl,H:ll,I:ll,j:ul,L:fl,m:al,M:cl,p:function(t,e,n){var r=l.exec(e.slice(n));return r?(t.p=c[r[0].toLowerCase()],n+r[0].length):-1},q:ol,Q:gl,s:vl,S:hl,u:Qu,U:Ju,V:tl,w:$u,W:el,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:rl,Y:nl,Z:il,"%":pl};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=Fu[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=Uu(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=Gu(Uu(o.y,0,1))).getUTCDay(),r=i>4||0===i?Iu.ceil(r):Iu(r),r=ku.offset(r,7*(o.V-1)),o.y=r.getUTCFullYear(),o.m=r.getUTCMonth(),o.d=r.getUTCDate()+(o.w+6)%7):(i=(r=Bu(Uu(o.y,0,1))).getDay(),r=i>4||0===i?Au.ceil(r):Au(r),r=Su.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?Gu(Uu(o.y,0,1)).getUTCDay():Bu(Uu(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,Gu(o)):Bu(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 Fu?e.charAt(a++):i])||(r=o(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(_.x=w(n,_),_.X=w(r,_),_.c=w(e,_),b.x=w(n,b),b.X=w(r,b),b.c=w(e,b),{format:function(t){var e=w(t+="",_);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+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=O(t+="",!0);return e.toString=function(){return t},e}})}(t),Hu=zu.format,zu.parse,zu.utcFormat,zu.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function tc(t){return new Date(t)}function ec(t){return t instanceof Date?+t:+new Date(+t)}function nc(t,e,n,r,i,o,a,s,u){var l=Ws(Bs,Bs),c=l.invert,h=l.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[a,1,1e3],[a,5,5e3],[a,15,15e3],[a,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[i,1,36e5],[i,3,108e5],[i,6,216e5],[i,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function x(s){return(a(s)<s?f:o(s)<s?d:i(s)<s?p:r(s)<s?g:e(s)<s?n(s)<s?v:m:t(s)<s?y:_)(s)}function w(e,n,r,i){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,a=_a((function(t){return t[2]})).right(b,o);a===b.length?(i=Aa(n/31536e6,r/31536e6,e),e=t):a?(i=(a=b[o/b[a-1][2]<b[a][2]/o?a-1:a])[1],e=a[0]):(i=Math.max(Aa(n,r,e),1),e=s)}return null==i?e:e.every(i)}return l.invert=function(t){return new Date(c(t))},l.domain=function(t){return arguments.length?h(ka.call(t,ec)):h().map(tc)},l.ticks=function(t,e){var n,r=h(),i=r[0],o=r[r.length-1],a=o<i;return a&&(n=i,i=o,o=n),n=(n=w(t,i,o,e))?n.range(i,o+1):[],a?n.reverse():n},l.tickFormat=function(t,e){return null==e?x:u(e)},l.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(cu(n,t)):l},l.copy=function(){return Fs(l,nc(t,e,n,r,i,o,a,s,u))},l}function rc(){return Da.apply(nc(Pu,Du,Mu,Su,Eu,Ou,wu,xu,Hu).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var ic=Math.PI,oc=2*ic,ac=oc-1e-6;function sc(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function uc(){return new sc}function lc(t){return function(){return t}}sc.prototype=uc.prototype={constructor:sc,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((ic-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*l)+","+(e+_*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>l*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,o){t=+t,e=+e,o=!!o;var a=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+a,l=e+s,c=1^o,h=o?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+l:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-l)>1e-6)&&(this._+="L"+u+","+l),n&&(h<0&&(h=h%oc+oc),h>ac?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>=ic)+","+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 cc=Math.abs,hc=Math.atan2,fc=Math.cos,dc=Math.max,pc=Math.min,gc=Math.sin,vc=Math.sqrt,mc=Math.PI,yc=mc/2,_c=2*mc;function bc(t){return t>1?0:t<-1?mc:Math.acos(t)}function xc(t){return t>=1?yc:t<=-1?-yc:Math.asin(t)}function wc(t){return t.innerRadius}function Oc(t){return t.outerRadius}function Ec(t){return t.startAngle}function Sc(t){return t.endAngle}function Tc(t){return t&&t.padAngle}function Mc(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 Ac(t,e,n,r,i,o,a){var s=t-n,u=e-r,l=(a?o:-o)/vc(s*s+u*u),c=l*u,h=-l*s,f=t+c,d=e+h,p=n+c,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-o,w=f*g-p*d,O=(_<0?-1:1)*vc(dc(0,x*x*b-w*w)),E=(w*_-y*O)/b,S=(-w*y-_*O)/b,T=(w*_+y*O)/b,M=(-w*y+_*O)/b,A=E-v,C=S-m,D=T-v,P=M-m;return A*A+C*C>D*D+P*P&&(E=T,S=M),{cx:E,cy:S,x01:-c,y01:-h,x11:E*(i/x-1),y11:S*(i/x-1)}}function Cc(){var t=wc,e=Oc,n=lc(0),r=null,i=Ec,o=Sc,a=Tc,s=null;function u(){var u,l,c=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-yc,d=o.apply(this,arguments)-yc,p=cc(d-f),g=d>f;if(s||(s=u=uc()),h<c&&(l=h,h=c,c=l),h>1e-12)if(p>_c-1e-12)s.moveTo(h*fc(f),h*gc(f)),s.arc(0,0,h,f,d,!g),c>1e-12&&(s.moveTo(c*fc(d),c*gc(d)),s.arc(0,0,c,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,O=p,E=a.apply(this,arguments)/2,S=E>1e-12&&(r?+r.apply(this,arguments):vc(c*c+h*h)),T=pc(cc(h-c)/2,+n.apply(this,arguments)),M=T,A=T;if(S>1e-12){var C=xc(S/c*gc(E)),D=xc(S/h*gc(E));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(O-=2*D)>1e-12?(y+=D*=g?1:-1,_-=D):(O=0,y=_=(f+d)/2)}var P=h*fc(y),k=h*gc(y),L=c*fc(x),R=c*gc(x);if(T>1e-12){var I,N=h*fc(_),V=h*gc(_),B=c*fc(b),G=c*gc(b);if(p<mc&&(I=Mc(P,k,B,G,N,V,L,R))){var U=P-I[0],z=k-I[1],H=N-I[0],F=V-I[1],j=1/gc(bc((U*H+z*F)/(vc(U*U+z*z)*vc(H*H+F*F)))/2),W=vc(I[0]*I[0]+I[1]*I[1]);M=pc(T,(c-W)/(j-1)),A=pc(T,(h-W)/(j+1))}}O>1e-12?A>1e-12?(v=Ac(B,G,P,k,h,A,g),m=Ac(N,V,L,R,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<T?s.arc(v.cx,v.cy,A,hc(v.y01,v.x01),hc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,hc(v.y01,v.x01),hc(v.y11,v.x11),!g),s.arc(0,0,h,hc(v.cy+v.y11,v.cx+v.x11),hc(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,hc(m.y11,m.x11),hc(m.y01,m.x01),!g))):(s.moveTo(P,k),s.arc(0,0,h,y,_,!g)):s.moveTo(P,k),c>1e-12&&w>1e-12?M>1e-12?(v=Ac(L,R,N,V,c,-M,g),m=Ac(P,k,B,G,c,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,hc(v.y01,v.x01),hc(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,hc(v.y01,v.x01),hc(v.y11,v.x11),!g),s.arc(0,0,c,hc(v.cy+v.y11,v.cx+v.x11),hc(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,hc(m.y11,m.x11),hc(m.y01,m.x01),!g))):s.arc(0,0,c,x,b,g):s.lineTo(L,R)}else s.moveTo(0,0);if(s.closePath(),u)return s=null,u+""||null}return u.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-mc/2;return[fc(r)*n,gc(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:lc(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:lc(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:lc(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:lc(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:lc(+t),u):i},u.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:lc(+t),u):o},u.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:lc(+t),u):a},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function Dc(t){this._context=t}function Pc(t){return new Dc(t)}function kc(t){return t[0]}function Lc(t){return t[1]}function Rc(){var t=kc,e=Lc,n=lc(!0),r=null,i=Pc,o=null;function a(a){var s,u,l,c=a.length,h=!1;for(null==r&&(o=i(l=uc())),s=0;s<=c;++s)!(s<c&&n(u=a[s],s,a))===h&&((h=!h)?o.lineStart():o.lineEnd()),h&&o.point(+t(u,s,a),+e(u,s,a));if(l)return o=null,l+""||null}return a.x=function(e){return arguments.length?(t="function"==typeof e?e:lc(+e),a):t},a.y=function(t){return arguments.length?(e="function"==typeof t?t:lc(+t),a):e},a.defined=function(t){return arguments.length?(n="function"==typeof t?t:lc(!!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 Ic(){var t=kc,e=null,n=lc(0),r=Lc,i=lc(!0),o=null,a=Pc,s=null;function u(u){var l,c,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==o&&(s=a(d=uc())),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]=+n(f,l,u),s.point(e?+e(f,l,u):v[l],r?+r(f,l,u):m[l]))}if(d)return s=null,d+""||null}function l(){return Rc().defined(i).curve(a).context(o)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:lc(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:lc(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:lc(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:lc(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:lc(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:lc(+t),u):r},u.lineX0=u.lineY0=function(){return l().x(t).y(n)},u.lineY1=function(){return l().x(t).y(r)},u.lineX1=function(){return l().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:lc(!!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 Nc(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Vc(t){return t}Dc.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 Bc=Uc(Pc);function Gc(t){this._curve=t}function Uc(t){function e(e){return new Gc(t(e))}return e._curve=t,e}function zc(){return t=Rc().curve(Bc),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(Uc(t)):e()._curve},t;var t,e}Gc.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))}};var Hc=Array.prototype.slice;function Fc(){}function jc(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 Wc(t){this._context=t}function Yc(t){return new Wc(t)}function Xc(t){this._context=t}function qc(t){return new Xc(t)}function Zc(t){this._context=t}function Kc(t){return new Zc(t)}function $c(t,e){this._basis=new Wc(t),this._beta=e}Wc.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:jc(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:jc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Xc.prototype={areaStart:Fc,areaEnd:Fc,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:jc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},Zc.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:jc(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},$c.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 Qc=function t(e){function n(t){return 1===e?new Wc(t):new $c(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Jc(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 th(t,e){this._context=t,this._k=(1-e)/6}th.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:Jc(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:Jc(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 eh=function t(e){function n(t){return new th(t,e)}return n.tension=function(e){return t(+e)},n}(0);function nh(t,e){this._context=t,this._k=(1-e)/6}nh.prototype={areaStart:Fc,areaEnd:Fc,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:Jc(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 rh=function t(e){function n(t){return new nh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ih(t,e){this._context=t,this._k=(1-e)/6}ih.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:Jc(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 oh=function t(e){function n(t){return new ih(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ah(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 sh(t,e){this._context=t,this._alpha=e}sh.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:ah(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 uh=function t(e){function n(t){return e?new sh(t,e):new th(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function lh(t,e){this._context=t,this._alpha=e}lh.prototype={areaStart:Fc,areaEnd:Fc,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:ah(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 ch=function t(e){function n(t){return e?new lh(t,e):new nh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function hh(t,e){this._context=t,this._alpha=e}hh.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:ah(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 fh=function t(e){function n(t){return e?new hh(t,e):new ih(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function dh(t){this._context=t}function ph(t){return new dh(t)}function gh(t){return t<0?-1:1}function vh(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(gh(o)+gh(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function mh(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function yh(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 _h(t){this._context=t}function bh(t){this._context=new xh(t)}function xh(t){this._context=t}function wh(t){return new _h(t)}function Oh(t){return new bh(t)}function Eh(t){this._context=t}function Sh(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 Th(t){return new Eh(t)}function Mh(t,e){this._context=t,this._t=e}function Ah(t){return new Mh(t,.5)}function Ch(t){return new Mh(t,0)}function Dh(t){return new Mh(t,1)}function Ph(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 kh(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Lh(t,e){return t[e]}dh.prototype={areaStart:Fc,areaEnd:Fc,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))}},_h.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:yh(this,this._t0,mh(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,yh(this,mh(this,n=vh(this,t,e)),n);break;default:yh(this,this._t0,n=vh(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(bh.prototype=Object.create(_h.prototype)).point=function(t,e){_h.prototype.point.call(this,e,t)},xh.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)}},Eh.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=Sh(t),i=Sh(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)}},Mh.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 Rh=function(){function t(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}return t.prototype.getAllDataFromDomain=function(){if(!this.get("data"))return null;var t=this.getDataGroups(),e=fo.clone(this.get("data")),n=this.getOptions().data.groupMapsTo,r=this.getOptions().axes;return r&&Object.keys(r).forEach((function(t){var n=r[t].mapsTo,i=r[t].scaleType;if(i!==A.LINEAR&&i!==A.LOG||(e=e.map((function(t){var e;return b(b({},t),((e={})[n]=Number(t[n]),e))}))),r[t].mapsTo&&r[t].domain)if(i===A.LABELS)e=e.filter((function(e){return r[t].domain.includes(e[n])}));else{var o=r[t].domain,a=o[0],s=o[1];e=e.filter((function(t){return t[n]>=a&&t[n]<=s}))}})),e.filter((function(e){return t.find((function(t){return t.name===e[n]}))}))},t.prototype.getDisplayData=function(){if(!this.get("data"))return null;var t=Vo.items.status.ACTIVE,e=this.getDataGroups(),n=this.getOptions().data.groupMapsTo;return this.getAllDataFromDomain().filter((function(r){return e.find((function(e){return e.name===r[n]&&e.status===t}))}))},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(fo.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return fo.getProperty(this.getOptions(),"data","loading")?[]:this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=Vo.items.status.ACTIVE;return this.getDataGroups().filter((function(e){return e.status===t}))},t.prototype.getDataGroupNames=function(){return this.getDataGroups().map((function(t){return t.name}))},t.prototype.getActiveDataGroupNames=function(){return this.getActiveDataGroups().map((function(t){return t.name}))},t.prototype.getGroupedData=function(){var t=this.getDisplayData(),e={},n=this.getOptions().data.groupMapsTo;return t.map((function(t){var r=t[n];null!==e[r]&&void 0!==e[r]?e[r].push(t):e[r]=[t]})),Object.keys(e).map((function(t){return{name:t,data:e[t]}}))},t.prototype.getDataValuesGroupedByKeys=function(){var t=this.getOptions(),e=t.data.groupMapsTo,n=this.getDisplayData(),r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o=ga(n,(function(t){return t[r]})).keys(),a=this.services.cartesianScales.domainAxisPosition,s=t.axes[a].scaleType;s===A.TIME?o.sort((function(t,e){return new Date(t)-new Date(e)})):s!==A.LOG&&s!==A.LINEAR||o.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return o.map((function(t){var o={sharedStackKey:t};return u.forEach((function(a){var s=n.find((function(n){return n[e]===a&&n[r].toString()===t}));o[a]=s?s[i]:null})),o}))},t.prototype.getStackedData=function(t){var e=(void 0===t?{percentage:!1}:t).percentage,n=this.getOptions().data.groupMapsTo,r=this.getDataGroupNames(),i=this.getDataValuesGroupedByKeys();if(e){var o=fo.fromPairs(i.map((function(t){return[t.sharedStackKey,0]})));i.forEach((function(t){r.forEach((function(e){o[t.sharedStackKey]+=t[e]}))})),i.forEach((function(t){r.forEach((function(e){o[t.sharedStackKey]?t[e]=t[e]/o[t.sharedStackKey]*100:t[e]=0}))}))}return function(){var t=lc([]),e=kh,n=Ph,r=Lh;function i(i){var o,a,s=t.apply(this,arguments),u=i.length,l=s.length,c=new Array(l);for(o=0;o<l;++o){for(var h,f=s[o],d=c[o]=new Array(u),p=0;p<u;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(o=0,a=e(c);o<l;++o)c[a[o]].index=o;return n(c,a),c}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:lc(Hc.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:lc(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?kh:"function"==typeof t?t:lc(Hc.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Ph:t,i):n},i}().keys(r)(i).map((function(t,e){return Object.keys(t).filter((function(t){return!isNaN(t)})).map((function(i){var o=t[i];return o[n]=r[e],o}))}))},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){this.set({options:fo.merge(this.getOptions(),t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(F.Model.UPDATE,{animate:t}))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Vo.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(F.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){if(!this.isUserProvidedColorScaleValid())return null;var r=this.getOptions(),i=this.getFillScale()(t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){if(!this.isUserProvidedColorScaleValid())return null;var r=this.getOptions(),i=this.colorScale(t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.isUserProvidedColorScaleValid=function(){var t=fo.getProperty(this.getOptions(),"color","scale"),e=this.getDataGroups();return!(null==t||Object.keys(t).length<e.length)&&e.every((function(e){return Object.keys(t).includes(e.name)}))},t.prototype.getColorClassName=function(t){if(this.isUserProvidedColorScaleValid())return t.originalClassName;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/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=fo.getProperty(t,"label");if(null===a){var s=fo.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.sanitizeDateValues=function(t){var e=this.getOptions();if(!e.axes)return t;var n=[];return Object.keys(E).forEach((function(t){var r=E[t],i=e.axes[r];if(i&&i.scaleType===A.TIME){var o=i.mapsTo;null===o&&void 0===o||n.push(o)}})),n.length>0&&t.forEach((function(t){n.forEach((function(e){void 0===t[e].getTime&&(t[e]=new Date(t[e]))}))})),t},t.prototype.sanitize=function(t){return t=this.getTabularData(t),t=this.sanitizeDateValues(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=Vo.items.status,r=n.ACTIVE,i=n.DISABLED,o=this.getOptions(),a=ga(t,(function(t){return t[e]})).keys();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(){if(this.isUserProvidedColorScaleValid()){var t=this.getOptions(),e=fo.getProperty(t,"color","scale"),n=[];this.allDataGroups.forEach((function(t){e[t]&&n.push(e[t])})),this.colorScale=Ia().range(n).domain(this.allDataGroups)}},t.prototype.setColorClassNames=function(){var t=fo.getProperty(this.getOptions(),"color","pairing"),e=fo.getProperty(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);var n=fo.getProperty(t,"option"),r=e>5?14:e;n=n<=Ro.pairingOptions[r+"-color"]?n:1;var i=this.allDataGroups.map((function(t,e){return r+"-"+n+"-"+(e%14+1)}));this.isUserProvidedColorScaleValid()||(this.colorClassNames=Ia().range(i).domain(this.allDataGroups))},t}(),Ih=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}(),Nh={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 "},Vh=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}()}(),Bh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Gh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Uh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Gh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},zh=["top","right","bottom","left","width","height","size","weight"],Hh="undefined"!=typeof MutationObserver,Fh=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(){Uh(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)};Fh.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},Fh.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},Fh.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},Fh.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},Fh.prototype.connect_=function(){Bh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),Hh?(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)},Fh.prototype.disconnect_=function(){Bh&&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)},Fh.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),zh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},Fh.getInstance=function(){return this.instance_||(this.instance_=new Fh),this.instance_},Fh.instance_=null;var jh=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},Wh=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Gh},Yh=Qh(0,0,0,0);function Xh(t){return parseFloat(t)||0}function qh(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+Xh(t["border-"+n+"-width"])}),0)}function Zh(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return Yh;var r=Wh(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]=Xh(o)}return e}(r),o=i.left+i.right,a=i.top+i.bottom,s=Xh(r.width),u=Xh(r.height);if("border-box"===r.boxSizing&&(Math.round(s+o)!==e&&(s-=qh(r,"left","right")+o),Math.round(u+a)!==n&&(u-=qh(r,"top","bottom")+a)),!function(t){return t===Wh(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 Qh(i.left,i.top,s,u)}var Kh="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof Wh(t).SVGGraphicsElement}:function(t){return t instanceof Wh(t).SVGElement&&"function"==typeof t.getBBox};function $h(t){return Bh?Kh(t)?function(t){var e=t.getBBox();return Qh(0,0,e.width,e.height)}(t):Zh(t):Yh}function Qh(t,e,n,r){return{x:t,y:e,width:n,height:r}}var Jh=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Qh(0,0,0,0),this.target=t};Jh.prototype.isActive=function(){var t=$h(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},Jh.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var tf=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 jh(a,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),a}(e);jh(this,{target:t,contentRect:n})},ef=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Vh,"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};ef.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 Wh(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new Jh(t)),this.controller_.addObserver(this),this.controller_.refresh())}},ef.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 Wh(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))}},ef.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},ef.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},ef.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new tf(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},ef.prototype.clearActive=function(){this.activeObservations_.splice(0)},ef.prototype.hasActive=function(){return this.activeObservations_.length>0};var nf="undefined"!=typeof WeakMap?new WeakMap:new Vh,rf=function(t){if(!(this instanceof rf))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=Fh.getInstance(),n=new ef(t,e,this);nf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){rf.prototype[t]=function(){return(e=nf.get(this))[t].apply(e,arguments);var e}}));var of=void 0!==Gh.ResizeObserver?Gh.ResizeObserver:rf,af=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=mo(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:fo.getProperty(t.node(),"width","baseVal","value"),height:fo.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(l),s(r),s(u)}return a},e.appendOrSelect=function(t,e){var n=e.split("."),r=n[0],i=t.select(e);return i.empty()?t.append(r).attr("class",n.slice(1).join(" ")):i},e.getAlignmentOffset=function(t,n,r){var i=e.getSVGElementSize(n,{useBBox:!0}),o=e.getSVGElementSize(r,{useAttr:!0}).width,a=0;return t===D.CENTER?a=Math.floor((o-i.width)/2):t===D.RIGHT&&(a=o-i.width),a},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.verifyCSSStylesBeingApplied(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();mo(this.getHolder()).classed(Nh.prefix+"--chart-holder",!0);var e=this.model.getOptions(),n=e.width,r=e.height;n!==this.width&&(t.style.width=n,this.width=n),r!==this.height&&(t.style.height=r,this.height=r)},e.prototype.getHolder=function(){return this.model.get("holder")},e.prototype.addSVGElement=function(){var t=this.model.getOptions(),e=fo.getProperty(t,"style","prefix"),n=mo(this.getHolder()).append("svg").classed(Nh.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");n.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.svg=n.node()},e.prototype.verifyCSSStylesBeingApplied=function(){var t=this;setTimeout((function(){var e=mo(t.svg).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(mo(this.svg),{useBBox:!0}).height,n=mo(this.svg).attr("class"),r=mo(this.svg).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(mo(t),{useBBox:!0}).height)})),i<=t?mo(this.svg).attr("height",i):mo(this.svg).attr("height","100%")}},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&mo(e).on("mouseover",(function(){t.services.events.dispatchEvent(F.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(F.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=fo.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(F.Chart.RESIZE))}),12.5);new of(i).observe(e)}},e}(Ih),sf=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}(Ih),uf={value:function(){}};function lf(){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 cf(r)}function cf(t){this._=t}function hf(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 ff(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function df(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=uf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}cf.prototype=lf.prototype={constructor:cf,on:function(t,e){var n,r=this._,i=hf(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]=df(r[n],t.name,e);else if(null==e)for(n in r)r[n]=df(r[n],t.name,null);return this}for(;++o<a;)if((n=(t=i[o]).type)&&(n=ff(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new cf(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 pf,gf,vf=0,mf=0,yf=0,_f=0,bf=0,xf=0,wf="object"==typeof performance&&performance.now?performance:Date,Of="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Ef(){return bf||(Of(Sf),bf=wf.now()+xf)}function Sf(){bf=0}function Tf(){this._call=this._time=this._next=null}function Mf(t,e,n){var r=new Tf;return r.restart(t,e,n),r}function Af(){bf=(_f=wf.now())+xf,vf=mf=0;try{!function(){Ef(),++vf;for(var t,e=pf;e;)(t=bf-e._time)>=0&&e._call.call(null,t),e=e._next;--vf}()}finally{vf=0,function(){var t,e,n=pf,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:pf=e);gf=t,Df(r)}(),bf=0}}function Cf(){var t=wf.now(),e=t-_f;e>1e3&&(xf-=e,_f=t)}function Df(t){vf||(mf&&(mf=clearTimeout(mf)),t-bf>24?(t<1/0&&(mf=setTimeout(Af,t-wf.now()-xf)),yf&&(yf=clearInterval(yf))):(yf||(_f=wf.now(),yf=setInterval(Cf,1e3)),vf=1,Of(Af)))}function Pf(t,e,n){var r=new Tf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Tf.prototype=Mf.prototype={constructor:Tf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Ef():+n)+(null==e?0:+e),this._next||gf===this||(gf?gf._next=this:pf=this,gf=this),this._call=t,this._time=n,Df()},stop:function(){this._call&&(this._call=null,this._time=1/0,Df())}};var kf=lf("start","end","cancel","interrupt"),Lf=[];function Rf(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 Pf(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(Pf((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=Mf((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:kf,tween:Lf,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function If(t,e){var n=Vf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Nf(t,e){var n=Vf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Vf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Bf(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 Gf(t,e){var n,r;return function(){var i=Nf(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 Uf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var o=Nf(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 zf(t,e,n){var r=t._id;return t.each((function(){var t=Nf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Vf(t,r).value[e]}}function Hf(t,e){var n;return("number"==typeof e?_s:e instanceof Ja?gs:(n=Ja(e))?(e=n,gs):Os)(t,e)}function Ff(t){return function(){this.removeAttribute(t)}}function jf(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Wf(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 Yf(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 Xf(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 qf(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 Zf(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Kf(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function $f(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Kf(t,i)),n}return i._value=e,i}function Qf(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Zf(t,i)),n}return i._value=e,i}function Jf(t,e){return function(){If(this,t).delay=+e.apply(this,arguments)}}function td(t,e){return e=+e,function(){If(this,t).delay=e}}function ed(t,e){return function(){Nf(this,t).duration=+e.apply(this,arguments)}}function nd(t,e){return e=+e,function(){Nf(this,t).duration=e}}function rd(t,e){if("function"!=typeof e)throw new Error;return function(){Nf(this,t).ease=e}}function id(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)?If:Nf;return function(){var a=o(this,t),s=a.on;s!==r&&(i=(r=s).copy()).on(e,n),a.on=i}}var od=vo.prototype.constructor;function ad(t){return function(){this.style.removeProperty(t)}}function sd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function ud(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&sd(t,o,n)),r}return o._value=e,o}function ld(t){return function(e){this.textContent=t.call(this,e)}}function cd(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&ld(r)),e}return r._value=t,r}var hd=0;function fd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function dd(t){return vo().transition(t)}function pd(){return++hd}var gd=vo.prototype;function vd(t){return+t}fd.prototype=dd.prototype={constructor:fd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=di(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,Rf(h[f],e,n,f,h,Vf(s,n)));return new fd(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=gi(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=Vf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&Rf(f,e,n,g,d,p);o.push(d),a.push(u)}return new fd(o,a,e,n)},filter:function(t){"function"!=typeof t&&(t=vi(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 fd(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 fd(a,this._parents,this._name,this._id)},selection:function(){return new od(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=pd(),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=Vf(a,e);Rf(a,t,n,l,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new fd(r,this._parents,t,n)},call:gd.call,nodes:gd.nodes,node:gd.node,size:gd.size,empty:gd.empty,each:gd.each,on:function(t,e){var n=this._id;return arguments.length<2?Vf(this.node(),n).on.on(t):this.each(id(n,t,e))},attr:function(t,e){var n=ui(t),r="transform"===n?Is:Hf;return this.attrTween(t,"function"==typeof e?(n.local?qf:Xf)(n,r,zf(this,"attr."+t,e)):null==e?(n.local?jf:Ff)(n):(n.local?Yf:Wf)(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=ui(t);return this.tween(n,(r.local?$f:Qf)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Rs:Hf;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var o=ki(this,t),a=(this.style.removeProperty(t),ki(this,t));return o===a?null:o===n&&a===r?i:i=e(n=o,r=a)}}(t,r)).on("end.style."+t,ad(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,o;return function(){var a=ki(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=ki(this,t)),a===u?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}(t,r,zf(this,"style."+t,e))).each(function(t,e){var n,r,i,o,a="style."+e,s="end."+a;return function(){var u=Nf(this,t),l=u.on,c=null==u.value[a]?o||(o=ad(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=ki(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,ud(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}}(zf(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,cd(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=Vf(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?Gf:Uf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Jf:td)(e,t)):Vf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?ed:nd)(e,t)):Vf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(rd(e,t)):Vf(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(o,a){var s={value:a},u={value:function(){0==--i&&o()}};n.each((function(){var n=Nf(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(u)),n.on=e}))}))}};var md={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function yd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return md.time=Ef(),md;return n}vo.prototype.interrupt=function(t){return this.each((function(){Bf(this,t)}))},vo.prototype.transition=function(t){var e,n;t instanceof fd?(e=t._id,t=t._name):(e=pd(),(n=md).time=Ef(),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])&&Rf(a,t,e,l,s,n||yd(a,e));return new fd(r,this._parents,t,e)};var _d=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(F.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=dd(t).duration(fo.getProperty(jo,t,"duration")||jo.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=dd(t).duration(0);return this.pendingTransitions[n._id]=n,n.on("end interrupt cancel",(function(){delete e.pendingTransitions[n._id]})),n},e.prototype.getPendingTransitions=function(){return this.pendingTransitions},e}(Ih),bd=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").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}(Ih);function xd(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 wd(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 Od(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=wd(e);return n.setDate(n.getDate()+r),n}function Ed(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t).getTime(),r=wd(e);return new Date(n+r)}function Sd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Ed(t,36e5*n)}function Td(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Md(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=xd(t);return e.setHours(0,0,0,0),e}function Ad(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Md(t),r=Md(e),i=n.getTime()-Td(n),o=r.getTime()-Td(r);return Math.round((i-o)/864e5)}function Cd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Ed(t,6e4*n)}function Dd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=xd(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 Pd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=wd(e),i=n.getMonth()+r,o=new Date(0);o.setFullYear(n.getFullYear(),i,1),o.setHours(0,0,0,0);var a=Dd(o);return n.setMonth(i,Math.min(a,n.getDate())),n}function kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Ed(t,1e3*n)}function Ld(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Pd(t,12*n)}function Rd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Id(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=xd(t);return!isNaN(e)}function Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e);return n.getFullYear()-r.getFullYear()}function Bd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e);return n.getTime()-r.getTime()}function Gd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Bd(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Ud(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Bd(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var zd={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 Hd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var Fd={date:Hd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Hd({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:Hd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},jd={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function Wd(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 Yd(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 Xd,qd={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof zd[t]?zd[t]:1===e?zd[t].one:zd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:Fd,formatRelative:function(t,e,n,r){return jd[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:Wd({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:Wd({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:Wd({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:Wd({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:Wd({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:(Xd={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(Xd.matchPattern);if(!i)return null;var o=i[0],a=n.match(Xd.parsePattern);if(!a)return null;var s=Xd.valueCallback?Xd.valueCallback(a[0]):a[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(o.length)}}),era:Yd({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:Yd({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:Yd({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:Yd({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:Yd({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 Zd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Ed(t,-n)}function Kd(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var $d=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return Kd("yy"===e?r%100:r,e.length)},Qd=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):Kd(n+1,2)},Jd=function(t,e){return Kd(t.getUTCDate(),e.length)},tp=function(t,e){return Kd(t.getUTCHours()%12||12,e.length)},ep=function(t,e){return Kd(t.getUTCHours(),e.length)},np=function(t,e){return Kd(t.getUTCMinutes(),e.length)},rp=function(t,e){return Kd(t.getUTCSeconds(),e.length)},ip=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return Kd(Math.floor(r*Math.pow(10,n-3)),e.length)};function op(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=xd(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 ap(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=xd(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=op(r),o=new Date(0);o.setUTCFullYear(n,0,4),o.setUTCHours(0,0,0,0);var a=op(o);return e.getTime()>=i.getTime()?n+1:e.getTime()>=a.getTime()?n:n-1}function sp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=ap(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=op(n);return r}function up(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:wd(i),a=null==n.weekStartsOn?o:wd(n.weekStartsOn);if(!(a>=0&&a<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=xd(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 lp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=xd(t,e),r=n.getUTCFullYear(),i=e||{},o=i.locale,a=o&&o.options&&o.options.firstWeekContainsDate,s=null==a?1:wd(a),u=null==i.firstWeekContainsDate?s:wd(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=up(l,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=up(h,e);return n.getTime()>=c.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function cp(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:wd(i),a=null==n.firstWeekContainsDate?o:wd(n.firstWeekContainsDate),s=lp(t,e),u=new Date(0);u.setUTCFullYear(s,0,a),u.setUTCHours(0,0,0,0);var l=up(u,e);return l}var hp="midnight",fp="noon",dp="morning",pp="afternoon",gp="evening",vp="night",mp={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 $d(t,e)},Y:function(t,e,n,r){var i=lp(t,r),o=i>0?i:1-i;return"YY"===e?Kd(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):Kd(o,e.length)},R:function(t,e){return Kd(ap(t),e.length)},u:function(t,e){return Kd(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 Kd(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 Kd(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 Qd(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 Kd(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=xd(t),r=up(n,e).getTime()-cp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):Kd(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=xd(t),n=op(e).getTime()-sp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):Kd(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):Jd(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=xd(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"}):Kd(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 Kd(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 Kd(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 Kd(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?fp:0===i?hp: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?gp:i>=12?pp:i>=4?dp:vp,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 tp(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):ep(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):Kd(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):Kd(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):np(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):rp(t,e)},S:function(t,e){return ip(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return _p(i);case"XXXX":case"XX":return bp(i);case"XXXXX":case"XXX":default:return bp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return _p(i);case"xxxx":case"xx":return bp(i);case"xxxxx":case"xxx":default:return bp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+yp(i,":");case"OOOO":default:return"GMT"+bp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+yp(i,":");case"zzzz":default:return"GMT"+bp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return Kd(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return Kd((r._originalDate||t).getTime(),e.length)}};function yp(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+Kd(o,2)}function _p(t,e){return t%60==0?(t>0?"-":"+")+Kd(Math.abs(t)/60,2):bp(t,e)}function bp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+Kd(Math.floor(i/60),2)+n+Kd(i%60,2)}function xp(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 wp(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 Op={p:wp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],o=r[2];if(!o)return xp(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}}",xp(i,e)).replace("{{time}}",wp(o,e))}},Ep=["D","DD"],Sp=["YY","YYYY"];function Tp(t){return-1!==Ep.indexOf(t)}function Mp(t){return-1!==Sp.indexOf(t)}function Ap(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 Cp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Dp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pp=/^'([^]*?)'?$/,kp=/''/g,Lp=/[a-zA-Z]/;function Rp(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||qd,a=o.options&&o.options.firstWeekContainsDate,s=null==a?1:wd(a),u=null==i.firstWeekContainsDate?s:wd(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:wd(l),h=null==i.weekStartsOn?c:wd(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=xd(t);if(!Id(f))throw new RangeError("Invalid time value");var d=Td(f),p=Zd(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:o,_originalDate:f},v=r.match(Dp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Op[e])(t,o.formatLong,g):t})).join("").match(Cp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Ip(t);var n=mp[e];if(n)return!i.useAdditionalWeekYearTokens&&Mp(t)&&Ap(t),!i.useAdditionalDayOfYearTokens&&Tp(t)&&Ap(t),n(p,t,o.localize,g);if(e.match(Lp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Ip(t){return t.match(Pp)[1].replace(kp,"'")}function Np(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Od(t,-n)}function Vp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Sd(t,-n)}function Bp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Cd(t,-n)}function Gp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Pd(t,-n)}function Up(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return kd(t,-n)}function zp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=wd(e);return Ld(t,-n)}var Hp=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(){return this.domainAxisPosition},e.prototype.getRangeAxisPosition=function(){return this.rangeAxisPosition},e.prototype.getAxisOptions=function(t){return fo.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.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(E).map((function(t){return E[t]})).forEach((function(t){e.scales[t]=e.createScale(t)}))},e.prototype.findDomainAndRangeAxes=function(){var t=this.findMainVerticalAxisPosition(),e=this.findMainHorizontalAxisPosition(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.domainAxisPosition,this.rangeAxisPosition=n.rangeAxisPosition},e.prototype.determineOrientation=function(){this.rangeAxisPosition!==E.LEFT&&this.rangeAxisPosition!==E.RIGHT||this.domainAxisPosition!==E.BOTTOM&&this.domainAxisPosition!==E.TOP?this.orientation=M.HORIZONTAL:this.orientation=M.VERTICAL},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=[E.BOTTOM,E.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[E.LEFT,E.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=fo.getProperty(a,"axes")[n].mapsTo,u=void 0!==r[s]?r[s]:r;switch(e){case A.LABELS:o=t(u)+t.step()/2;break;case A.TIME:o=t(new Date(u));break;default:o=t(u)}return o},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){return this.getValueThroughAxisPosition(this.domainAxisPosition,t,e)},e.prototype.getRangeValue=function(t,e){return this.getValueThroughAxisPosition(this.rangeAxisPosition,t,e)},e.prototype.getMainXScaleType=function(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())},e.prototype.getMainYScaleType=function(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())},e.prototype.getDomainIdentifier=function(){var t=this.model.getOptions();return fo.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return fo.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return fo.getProperty(n,"axes",t).scaleType===A.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=xd(t),r=xd(e),i=Rd(n,r),o=Math.abs(Vd(n,r));n.setFullYear(n.getFullYear()-i*o);var a=Rd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[zp(n,e),Ld(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e),i=Rd(n,r),o=Math.abs(Nd(n,r));n.setMonth(n.getMonth()-i*o);var a=Rd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Gp(n,e),Pd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=xd(t),r=xd(e),i=Rd(n,r),o=Math.abs(Ad(n,r));n.setDate(n.getDate()-i*o);var a=Rd(n,r)===-i,s=i*(o-a);return 0===s?0:s}(r,n)>1)return[Np(n,e),Od(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Bd(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Vp(n,e),Sd(r,e)];if(Gd(r,n)>30)return[Bp(n,30*e),Cd(r,30*e)];if(Gd(r,n)>1)return[Bp(n,e),Cd(r,e)];if(Ud(r,n)>15)return[Up(n,15*e),kd(r,15*e)];if(Ud(r,n)>1)return[Up(n,e),kd(r,e)];return[n,r]}(e,fo.getProperty(n,"timeScale","addSpaceOnEdges")):function(t,e){var n=t[0],r=t[1],i=(r-n)*e;return[n>=0&&n-i<0?0:n-i,r<=0&&r+i>0?0:r+i]}(e,No.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=fo.getProperty(t,"axes");return null===fo.getProperty(e,E.LEFT)&&null!==fo.getProperty(e,E.RIGHT)||!0===fo.getProperty(e,E.RIGHT,"main")?E.RIGHT:E.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=fo.getProperty(t,"axes");return null===fo.getProperty(e,E.BOTTOM)&&null!==fo.getProperty(e,E.TOP)||!0===fo.getProperty(e,E.TOP,"main")?E.TOP:E.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=fo.getProperty(n,"axes",t),i=fo.getProperty(n,"axes",e),o=r.scaleType||A.LINEAR,a=i.scaleType||A.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return a===A.LABELS||a===A.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):o===A.LABELS||o===A.TIME?(s.domainAxisPosition=t,s.rangeAxisPosition=e):(s.domainAxisPosition=e,s.rangeAxisPosition=t),s},e.prototype.getScaleDomain=function(t){var e=this.model.getOptions(),n=fo.getProperty(e,"axes",t),r=n.includeZero,i=fo.getProperty(n,"scaleType")||A.LINEAR;if(this.model.isDataEmpty())return[];var o,a,s=this.model.getDisplayData(),u=n.mapsTo,l=n.percentage;if(n.domain)return i===A.LABELS?n.domain:this.extendsDomain(t,n.domain);if(l)return[0,100];if(n&&i===A.LABELS)return ga(s,(function(t){return t[u]})).keys();n.stacked?a=this.services.zoom.filterDataForRangeAxis(this.model.getDataValuesGroupedByKeys(),{stacked:!0}).map((function(t){return function(t,e){var n,r=t.length,i=-1,o=0;if(null==e)for(;++i<r;)(n=+t[i])&&(o+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(o+=n);return o}(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):a=i===A.TIME?s.map((function(t){return t[u]})):this.services.zoom.filterDataForRangeAxis(s).map((function(t){return t[u]}));return i!==A.TIME&&r&&a.push(0),o=xa(a),o=this.extendsDomain(t,o)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=fo.getProperty(e,"axes",t);if(!n)return null;var r,i=fo.getProperty(n,"scaleType")||A.LINEAR;return this.scaleTypes[t]=i,(r=i===A.TIME?rc():i===A.LOG?function t(){var e=mu(js()).domain([1,10]);return e.copy=function(){return Fs(e,t()).base(e.base())},Da.apply(e,arguments),e}().base(n.base||10):i===A.LABELS?Na():lu()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=fo.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)!==A.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=fo.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}(Ih);var Fp,jp,Wp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Pc,curveLinearClosed:ph,curveBasis:Yc,curveBasisClosed:qc,curveBasisOpen:Kc,curveBundle:Qc,curveCardinal:eh,curveCardinalClosed:rh,curveCardinalOpen:oh,curveCatmullRom:uh,curveCatmullRomClosed:ch,curveCatmullRomOpen:fh,curveMonotoneX:wh,curveMonotoneY:Oh,curveNatural:Th,curveStep:Ah,curveStepAfter:Dh,curveStepBefore:Ch},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}(Ih),Yp=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(!fo.getProperty(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();var t=this.services.cartesianScales.getMainXAxisPosition(),e=fo.getProperty(this.model.getOptions(),"axes",t,"scaleType");return t===E.BOTTOM&&e===A.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,xa(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(F.ZoomDomain.CHANGE,{newDomain:t})},e.prototype.getZoomRatio=function(){return fo.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=fo.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=Yo.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())<fo.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 fo.getProperty(this.model.getOptions(),"zoomBar",t,"loading")},e.prototype.isZoomBarLocked=function(t){return fo.getProperty(this.model.getOptions(),"zoomBar",t,"locked")},e}(Ih),Xp=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(mo(this.services.domUtils.getMainSVG()))}return t.prototype.init=function(){},t.prototype.render=function(t){console.error("render() method is not implemented")},t.prototype.destroy=function(){},t.prototype.setModel=function(t){this.model=t},t.prototype.setServices=function(t){this.services=t},t.prototype.setParent=function(t){var e=this.parent;if(this.parent=t,(!e||e.node()!==t.node())&&this.type){var n=fo.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Nh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Nh.prefix+"--"+n+"--"+this.type,!1)}},t.prototype.getParent=function(){return this.parent},t.prototype.getContainerSVG=function(t){if(void 0===t&&(t={withinChartClip:!1}),this.type){var e=fo.getProperty(this.model.getOptions(),"style","prefix"),n=af.appendOrSelect(this.parent,"g."+Nh.prefix+"--"+e+"--"+this.type);if(t.withinChartClip){var r=this.model.get("chartClipId");r&&n.attr("clip-path","url(#"+r+")")}return n}return this.parent},t}(),qp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="legend",e}return n(e,t),e.prototype.render=function(){var t=this,e=this.getContainerSVG().attr("role",r.GROUP).attr("data-name","legend-items"),n=this.model.getOptions(),i=fo.getProperty(n,"legend"),o=this.model.getDataGroups(),a=fo.getProperty(i,"order");a&&(o=this.sortDataGroups(o,a));var s=e.selectAll("g.legend-item").data(o,(function(t){return t.name})),u=s.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===Vo.items.status.ACTIVE})),l=Vo.checkbox.radius,c=fo.getProperty(i,"truncation","type"),h=fo.getProperty(i,"truncation","threshold"),f=fo.getProperty(i,"truncation","numCharacter"),d=fo.getProperty(n,"color","pairing","option");u.append("rect").classed("checkbox",!0).merge(s.select("rect.checkbox")).attr("role",r.CHECKBOX).attr("tabindex",0).attr("aria-label",(function(t){return t.name})).attr("aria-checked",(function(t){return t.status===Vo.items.status.ACTIVE})).attr("width",2*l).attr("height",2*l).attr("rx",1).attr("ry",1).attr("class",(function(e,n){if(d)return t.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:e.name,originalClassName:"checkbox"})})).style("fill",(function(e){return e.status===Vo.items.status.ACTIVE?t.model.getFillColor(e.name):null})).classed("active",(function(t,e){return t.status===Vo.items.status.ACTIVE}));var p=u.append("text").merge(s.select("text"));c!==T.NONE?p.html((function(t){return t.name.length>h?fo.truncateLabel(t.name,c,f):t.name})):p.html((function(t){return t.name})),this.breakItemsIntoLines(u),s.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var g=fo.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",g),g&&u.size()>0&&this.addEventListeners();var v=fo.getProperty(i,"alignment"),m=af.getAlignmentOffset(v,e,this.getParent());e.attr("transform","translate("+m+", 0)")},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.breakItemsIntoLines=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=Vo.checkbox.radius,o=Vo.items.horizontalSpace,a=Vo.items.verticalSpace,s=Vo.items.textYOffset,u=2*i+Vo.checkbox.spaceAfter,l=Vo.items.status.DISABLED,c=this.model.getDataGroups().some((function(t){return t.status===l})),h=fo.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var l=mo(this),g=mo(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===P.VERTICAL)h===P.VERTICAL&&0!==r&&d++;else{var v=af.getSVGElementSize(e.parent,{useAttr:!0}),m=af.getSVGElementSize(mo(this).select("text"),{useBBox:!0}),y=af.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+o)+u+m.width>v.width&&(d++,f=0,p=0)}l.select("rect.checkbox").attr("x",f).attr("y",0+d*a);var _=s+d*a;l.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===P.HORIZONTAL)&&"0"===l.select("rect.checkbox").attr("y"),x=h===P.VERTICAL&&"0"===l.select("rect.checkbox").attr("x"),w=b||x;c&&l.select("g.check").empty()&&w?(l.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),l.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(l.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(l.select("rect.checkbox").attr("y"))+.5)):c||l.select("g.check").empty()||l.select("g.check").remove(),p++}))},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions(),r=fo.getProperty(n,"legend"),i=fo.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(F.Legend.ITEM_HOVER,{hoveredElement:mo(this)});var e=Vo.checkbox.radius,n=mo(this);n.select("rect.checkbox").classed("hovered",!0),n.append("rect").classed("hover-stroke",!0).attr("x",parseFloat(n.select("rect.checkbox").attr("x"))-2).attr("y",parseFloat(n.select("rect.checkbox").attr("y"))-2).attr("width",2*e+4).attr("height",2*e+4).attr("rx",3).attr("ry",3).lower();var r=n.datum();r.name.length>i&&t.services.events.dispatchEvent(F.Tooltip.SHOW,{hoveredElement:n,content:r.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(F.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(F.Legend.ITEM_CLICK,{clickedElement:mo(this)});var e=mo(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=mo(this);e.select("rect.hover-stroke").remove(),e.select("rect.checkbox").classed("hovered",!1),t.services.events.dispatchEvent(F.Tooltip.HIDE),t.services.events.dispatchEvent(F.Legend.ITEM_MOUSEOUT,{hoveredElement:e})})),e.selectAll("g.legend-item rect.checkbox").on("keyup",(function(e){!ro.key||"Enter"!==ro.key&&" "!==ro.key||(ro.preventDefault(),t.model.toggleDataLabel(e.name))}))},e}(Xp);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(jp||(jp={}));var Zp=((Fp={})[jp.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)}},Fp[jp.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)}},Fp[jp.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)}},Fp[jp.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)}},Fp),Kp="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},$p=function(){function t(t){void 0===t&&(t={}),this.positions=Zp,this.positions=Object.assign({},Zp,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:Kp.innerHeight-Kp.scrollY,height:Kp.innerWidth-Kp.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}(),Qp=(new $p,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function Jp(t,e,n,r){var i=0===e,o=2===Number(Rp(new Date(t),"c")),a=1===Number(Rp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||rg(t)||ig(t)||og(t);case"daily":return r?i||o||og(t):i||ig(t)||og(t);case"monthly":return i||og(t);case"quarterly":return i||a;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function tg(t,e,n,r){var i=r.showDayName,o="daily"===n&&i?"weekly":n,a=new Date(t),s=fo.getProperty(r,"timeIntervalFormats")[o],u=fo.getProperty(s,"primary"),l=fo.getProperty(s,"secondary");return Rp(a,Jp(t,e,n,i)?u:l,{locale:r.localeObject})}function eg(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function ng(t){return 1===t.length?"15seconds":function(t){var e=Qp.reduce((function(e,n,r){n[0];var i=n[1],o=Qp[e][1];return Math.abs(o-t)<Math.abs(i-t)?e:r}),0);return Qp[e][0]}(function(t,e){var n,r,i=t.length,o=-1;if(null==e){for(;++o<i;)if(null!=(n=t[o])&&n>=n)for(r=n;++o<i;)null!=(n=t[o])&&r>n&&(r=n)}else for(;++o<i;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=n;++o<i;)null!=(n=e(t[o],o,t))&&r>n&&(r=n);return r}(function(t){if(t)return t.slice(1).map((function(e,n){return e-t[n]}))}(t)))}function rg(t){var e=eg(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function ig(t){var e=eg(t),n=e.d,r=e.s,i=e.m,o=e.H;return 1===n&&0===o&&0===i&&0===r}function og(t){var e=eg(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 ag=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new $p,i}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!1);var n=this.configs,r=n.value,i=n.fillColor,o=n.axisPosition,a=n.index,s=fo.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Nh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=o+"-"+a,this.threshold=af.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=af.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),l=af.appendOrSelect(this.threshold,"line.threshold-line");l.style("stroke",i);var c=this.services.cartesianScales.getScaleByPosition(o),h=this.services.cartesianScales.getScaleTypeByPosition(o),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===A.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],b=y[1],x=this.services.cartesianScales,w=x.getOrientation(),O=fo.flipDomainAndRangeBasedOnOrientation((function(t){return x.getDomainValue(t)}),(function(t){return x.getRangeValue(t)}),w),S=O[0],T=O[1];if(o===E.TOP||o===E.BOTTOM){var M=S(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+M+", "+b+")"),l.attr("y2",_-b),u.attr("width",_-b).classed("rotate",!0)}else{M=T(r)+(p?c.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+M+")"),l.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(F.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(F.Threshold.HIDE,(function(t){e.label.classed("hidden",!0)})),this.appendThresholdLabel(),this.addEventListeners()},e.prototype.getFormattedValue=function(){var t=this.configs,e=t.value,n=t.axisPosition,r=this.model.getOptions();if(this.services.cartesianScales.getScaleTypeByPosition(n)===A.TIME){var i=[E.LEFT,E.RIGHT].includes(n),o=this.services.cartesianScales.getMainXScale(),a=this.services.cartesianScales.getMainYScale(),s=i?a:o,u=fo.getProperty(r,"timeScale");return tg(e,0,ng(s.ticks()),u)}return e.toLocaleString("en")},e.prototype.appendThresholdLabel=function(){var t=this.configs,e=t.value,n=t.valueFormatter,r=t.fillColor,i=t.label,o=void 0===i?"Threshold":i,a=mo(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=af.appendOrSelect(a,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(o+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=bo(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[jp.RIGHT,jp.LEFT,jp.TOP,jp.BOTTOM],(function(){return{width:t.offsetWidth,height:t.offsetHeight}})),i=this.positionService.findPositionAt({left:n[0],top:n[1]},e,r);this.positionService.setElement(e,i)},e.prototype.addEventListeners=function(){var t=this;af.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(F.Threshold.SHOW,{hoveredElement:mo(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(F.Threshold.HIDE,{hoveredElement:mo(t.threshold)})}))},e}(Xp),sg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="title",e}return n(e,t),e.prototype.render=function(){var t=this.getContainerSVG(),e=t.selectAll("text.title").data([this.model.getOptions().title]);e.enter().append("text").classed("title",!0).merge(e).attr("x",0).attr("y","1em").html((function(t){return t}));var n=this.getMaxTitleWidth(),r=af.appendOrSelect(t,"text.title");r.node().getComputedTextLength()>n&&n>0&&this.truncateTitle(r,n),e.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=af.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(){a.services.events.dispatchEvent(F.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){a.services.events.dispatchEvent(F.Tooltip.MOVE)})).on("mouseout",(function(){a.services.events.dispatchEvent(F.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return af.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}(Xp),ug=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter-title",e}return n(e,t),e.prototype.render=function(){var t=this.model.getDisplayData(),e=this.model.getOptions(),n=this.getContainerSVG(),r=e.data.groupMapsTo,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=af.appendOrSelect(n,"text.meter-title");o>0&&a.node().getComputedTextLength()>o&&this.truncateTitle(a,o)},e.prototype.displayStatus=function(){var t=this.getContainerSVG(),e=(this.model.getOptions(),af.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0})),n=e.width?e.width:this.parent.node().getAttribute("width"),r=this.model.getStatus(),i=Go.status.indicatorSize/2,o=af.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=this.model.getDisplayData().value,e=this.getContainerSVG(),n=af.appendOrSelect(e,"text.meter-title"),r=!0===fo.getProperty(this.model.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),o=Go.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=af.appendOrSelect(this.parent,"tspan"),i=Go.statusBar.paddingRight,o=Math.ceil(r.node().getComputedTextLength());af.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+o+i)},e.prototype.getMaxTitleWidth=function(){var t=af.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),e=t.width?t.width:this.parent.node().getAttribute("width"),n=af.appendOrSelect(this.parent,"text.percent-value"),r=Go.statusBar.paddingRight,i=n.node().getComputedTextLength(),o=af.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(af.getSVGElementSize(o,{useBBox:!0}).width+Go.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case U.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 U.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case U.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}(sg),lg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.isEventListenerAdded=!1,i.positionService=new $p,i.handleShowTooltip=function(t){var e=t.detail.data||t.detail.items,n=i.getTooltipHTML(t),r=af.appendOrSelect(i.tooltip,"div.content-box");if(fo.getProperty(i.model.getOptions(),"tooltip","customHTML"))if(t.detail.content){var o='<div class="title-tooltip">'+t.detail.content+"</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(F.Tooltip.MOVE,(function(e){t.positionTooltip(e)})),this.services.events.addEventListener(F.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(F.Tooltip.HIDE,this.handleHideTooltip)},e.prototype.removeTooltipEventListener=function(){this.services.events.removeEventListener(F.Tooltip.MOVE,null),this.services.events.removeEventListener(F.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(F.Tooltip.HIDE,this.handleHideTooltip)},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this,n=this.model.getOptions(),r=fo.getProperty(n,"tooltip","truncation","type"),i=fo.getProperty(n,"tooltip","truncation","threshold"),o=fo.getProperty(n,"tooltip","truncation","numCharacter");return r!==T.NONE?t.map((function(t){return t.value=e.valueFormatter(t.value),t.label&&t.label.length>i&&(t.label=fo.truncateLabel(t.label,r,o)),t.value&&t.value.length>i&&(t.value=fo.truncateLabel(t.value,r,o)),t})):t},e.prototype.getTooltipHTML=function(t){var e;if(t.detail.content)e='<div class="title-tooltip">'+t.detail.content+"</div>";else{var n=this.getItems(t),r=this.formatItems(n),i=this.model.isUserProvidedColorScaleValid();e="<ul class='multi-tooltip'>"+r.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&&!i?'<a class="tooltip-color '+t.class+'"></a>':"")+"\n\t\t\t\t\t\t\t\t"+(t.color&&i?'<a style="background-color: '+t.color+'" class="tooltip-color"></a>':"")+'\n\t\t\t\t\t\t\t\t<p class="label">'+t.label+'</p>\n\t\t\t\t\t\t\t\t<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){var e=this.model.getOptions(),n=fo.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){var t=this.model.getOptions(),e=fo.getProperty(t,"tooltip","enabled");if(e){var n=mo(this.services.domUtils.getHolder()),r=fo.getProperty(t,"style","prefix");this.tooltip=af.appendOrSelect(n,"div."+Nh.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.model.getOptions(),o=fo.getProperty(i,"zoomBar","top","enabled"),a=fo.getProperty(t,"detail","mousePosition");if(a){var s=fo.getProperty(i,"zoomBar","top","type"),u=Yo.height[s];o&&(a[1]+=u+Yo.spacerHeight)}else a=bo(n);var l=this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[jp.RIGHT,jp.LEFT,jp.TOP,jp.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),c=Fo.horizontalOffset;l===jp.LEFT&&(c*=-1),e=this.positionService.findPositionAt({left:a[0]+c,top:a[1]},r,l),this.positionService.setElement(r,e)},e}(Xp),cg=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=this.model.getOptions(),i=this.services.cartesianScales,o=i.getDomainAxisOptions(),a=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=i.getRangeAxisOptions(),l=i.getRangeIdentifier(),c=(i.getRangeAxisScaleType(),r.data.groupMapsTo),h=o.title;if(!h){var f=i.getDomainAxisPosition();h=f===E.BOTTOM||f===E.TOP?"x-value":"y-value"}var d,p=n[0][a];if(s===A.TIME?p=Rp(new Date(n[0][a]),"MMM d, yyyy"):s===A.LINEAR&&(p=p.toLocaleString()),1===n.length){var g=n[0],v=u.title;if(!v){var m=i.getRangeAxisPosition();v=m===E.LEFT||m===E.RIGHT?"y-value":"x-value"}d=[{label:h,value:p},{label:v,value:g[l]},{label:r.tooltip.groupLabel||"Group",value:g[c],color:this.model.getFillColor(g[c]),class:this.model.getColorClassName({classNameTypes:[O.TOOLTIP],dataGroupName:g[c]})}]}else n.length>1&&(d=(d=[{label:h,value:this.valueFormatter(p)}]).concat(n.map((function(t){return{label:t[c],value:e.valueFormatter(t[l]),color:e.model.getFillColor(t[c]),class:e.model.getColorClassName({classNameTypes:[O.TOOLTIP],dataGroupName:t[c]})}})).sort((function(t,e){return e.value-t.value}))),!0===fo.getProperty(r,"tooltip","showTotal")&&d.push({label:r.tooltip.totalLabel||"Total",value:this.valueFormatter(n.reduce((function(t,e){return t+e[l]}),0)),bold:!0}));return d},e}(lg),hg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",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?Io.opacity.unselected:Io.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Io.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),r=[0,0],i=this.services.cartesianScales,o=i.getOrientation(),a=Ic().curve(this.services.curves.getD3Curve());o===M.VERTICAL?(a.x((function(t,e){return i.getDomainValue(t,e)})).y0(i.getRangeValue(0)).y1((function(t,e){return i.getRangeValue(t,e)})),r=this.services.cartesianScales.getMainYScale().domain()):(a.x0(i.getRangeValue(0)).x1((function(t,e){return i.getRangeValue(t,e)})).y((function(t,e){return i.getDomainValue(t,e)})),r=this.services.cartesianScales.getMainXScale().domain());var s=this.model.getGroupedData(),u=fo.getProperty(this.model.getOptions(),"color","gradient","enabled"),l=s&&1===s.length&&u;s.length>1&&u&&console.error("Gradients can only be enabled when having 1 single dataset");var c=n.selectAll("path.area").data(s,(function(t){return t.name})),h=fo.getProperty(this.model.getOptions(),"style","prefix"),f=af.appendOrSelect(mo(this.services.domUtils.getHolder()),"svg."+Nh.prefix+"--"+h+"--chart-svg").select("path."+this.model.getColorClassName({classNameTypes:[O.STROKE],dataGroupName:s[0].name})).node(),d=f?getComputedStyle(f,null).getPropertyValue("stroke"):null;l&&d?bd.appendOrUpdateLinearGradient({svg:this.parent,id:s[0].name.replace(" ","")+"_"+this.gradient_id,x1:"0%",x2:"0%",y1:"0%",y2:"100%",stops:bd.getStops(r,d)}):this.parent.selectAll("defs linearGradient").empty()||this.parent.selectAll("defs linearGradient").each((function(){this.parentNode.remove()})),c.exit().attr("opacity",0).remove();var p=this,g=c.enter().append("path");l?g.merge(c).style("fill",(function(t){return"url(#"+t.name.replace(" ","")+"_"+e.gradient_id+")"})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("d",(function(t){var e=t.data;return a(e)})):g.attr("opacity",0).merge(c).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t.name,originalClassName:"area"})})).attr("fill",(function(t){return p.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Io.opacity.selected).attr("d",(function(t){var e=t.data;return a(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Xp),fg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area-stacked",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-hover-area")).attr("opacity",(function(t){return t[0][r]!==n.datum().name?Io.opacity.unselected:Io.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Io.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this,o=this.model.getOptions(),a=o.data.groupMapsTo,s=this.services.cartesianScales.getMainXScale(),u=this.services.cartesianScales.getMainYScale(),l=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(l)===A.TIME){var c=Object.keys(o.axes).some((function(t){return o.axes[t].percentage})),h=this.model.getStackedData({percentage:c}),f=n.selectAll("path.area").data(h,(function(t){return t[0][a]}));this.areaGenerator=Ic().x((function(t){return s(new Date(t.data.sharedStackKey))})).y0((function(t){return u(t[0])})).y1((function(t){return u(t[1])})).curve(this.services.curves.getD3Curve()),f.exit().attr("opacity",0).remove(),f.enter().append("path").attr("opacity",0).merge(f).data(h,(function(t){return t[0][a]})).attr("class","area").attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[0][a],originalClassName:"area"})})).attr("fill",(function(t){return i.model.getFillColor(t[0][a])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","area").transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Io.opacity.selected).attr("d",this.areaGenerator)}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Xp),dg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getBarWidth=function(t){var e=this.model.getOptions();if(e.bars.width)return e.bars.width;var n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=af.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}(Xp),pg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="simple-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-simple-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-simple-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getOptions().data.groupMapsTo,i=this.getContainerSVG({withinChartClip:!0}).selectAll("path.bar").data(this.model.getDisplayData(),(function(t){return t[n]}));i.exit().attr("opacity",0).remove(),i.enter().append("path").attr("opacity",0).merge(i).classed("bar",!0).attr("width",this.getBarWidth.bind(this)).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[n],originalClassName:"bar"})})).attr("fill",(function(t){return e.model.getFillColor(t[n])})).attr("d",(function(t,n){var r=e.getBarWidth(),i=e.services.cartesianScales.getDomainValue(t,n)-r/2,o=i+r,a=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);if(!e.isOutsideZoomedDomain(i,o))return fo.generateSVGPathString({x0:i,x1:o,y0:a,y1:s},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){var n=mo(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(F.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){mo(this);t.services.events.dispatchEvent(F.Bar.BAR_MOUSEMOVE,{element:mo(this),datum:e}),t.services.events.dispatchEvent(F.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(F.Bar.BAR_CLICK,{element:mo(this),datum:e})})).on("mouseout",(function(e){var n=mo(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(F.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.HIDE,{hoveredElement:n})}))},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(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(dg),gg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grouped-bar",e.padding=5,e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var a=this.getContainerSVG({withinChartClip:!0}),s=ga(n,(function(t){return t[o]})).keys(),u=a.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var l=u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars").merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===M.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));l.exit().attr("opacity",0).remove(),l.enter().append("path").attr("opacity",0).merge(l).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[i],originalClassName:"bar"})})).attr("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.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);if(!e.isOutsideZoomedDomain(r,o))return fo.generateSVGPathString({x0:r,x1:o,y0:a,y1:s},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){var n=mo(this);n.classed("hovered",!0),n.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")),t.services.events.dispatchEvent(F.Bar.BAR_MOUSEOVER,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.SHOW,{hoveredElement:n,data:[e]})})).on("mousemove",(function(e){var n=mo(this);t.services.events.dispatchEvent(F.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(F.Bar.BAR_CLICK,{element:mo(this),datum:e})})).on("mouseout",(function(e){var n=mo(this);n.classed("hovered",!1),n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")),t.services.events.dispatchEvent(F.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.HIDE,{hoveredElement:n})}))},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(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getDataCorrespondingToLabel=function(t){var e=this.model.getDisplayData(),n=this.services.cartesianScales.getDomainIdentifier();return e.filter((function(e){return e[n]===t}))},e.prototype.getGroupWidth=function(){var t=this.model.getActiveDataGroupNames().length,e=this.getTotalGroupPadding();return this.getBarWidth()*t+e},e.prototype.getTotalGroupPadding=function(){var t=this.model.getActiveDataGroupNames().length;if(1===t)return 0;var e=this.services.cartesianScales.getDomainScale();return Math.min(5,e.step()/70*5)*(t-1)},e.prototype.getBarWidth=function(){var t=this.model.getOptions(),e=fo.getProperty(t,"bars","width"),n=fo.getProperty(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),o=this.services.cartesianScales.getDomainScale();return Math.min(n,(o.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=Na().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(dg),vg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="stacked-bar",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.datasetLabel!==n.datum().key?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.bar").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG({withinChartClip:!0}),i=(this.model.getDisplayData(),this.model.getOptions()),o=i.data.groupMapsTo,a=(this.services.cartesianScales.getDomainIdentifier(),this.model.getStackedData()),s=n.selectAll("g.bars").data(a,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("data-name","bars");var u=n.selectAll("g.bars").selectAll("path.bar").data((function(t){return t}),(function(t){return t.data.sharedStackKey}));u.exit().remove(),u.enter().append("path").merge(u).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[o],originalClassName:"bar"})})).attr("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,s=a+o,u=e.services.cartesianScales.getRangeValue(t[0],n),l=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(a,s))return Math.abs(l-u)>0&&Math.abs(l-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===M.VERTICAL?l+=1:l-=1),fo.generateSVGPathString({x0:a,x1:s,y0:u,y1:l},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.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r,i=mo(this);i.classed("hovered",!0),i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")),e.services.events.dispatchEvent(F.Bar.BAR_MOUSEOVER,{element:i,datum:n});var o=e.model.getDisplayData(),a=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier(),u=o.find((function(e){return e[s]===n.data[n.group]&&e[a].toString()===n.data.sharedStackKey&&e[t]===n.group}));void 0===u&&((r={})[a]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,u=r),e.services.events.dispatchEvent(F.Tooltip.SHOW,{hoveredElement:i,data:[u]})})).on("mousemove",(function(t){var n=mo(this);e.services.events.dispatchEvent(F.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(F.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(F.Bar.BAR_CLICK,{element:mo(this),datum:t})})).on("mouseout",(function(t){var n=mo(this);n.classed("hovered",!1),e.services.events.dispatchEvent(F.Bar.BAR_MOUSEOUT,{element:n,datum:t}),e.services.events.dispatchEvent(F.Tooltip.HIDE,{hoveredElement:n})}))},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(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(dg),mg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter",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.model.getOptions().data.groupMapsTo;e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-hover-scatter")).attr("opacity",(function(t){return t[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("circle.dot").transition(e.services.transitions.getTransition("legend-mouseout-scatter")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(F.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(F.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut))},e.prototype.filterBasedOnZoomDomain=function(t){var e=this.services.cartesianScales.getDomainIdentifier(),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.render=function(t){if(fo.getProperty(this.model.getOptions(),"points","enabled")||fo.getProperty(this.model.getOptions(),"bubble","enabled")){var e,n=this.getContainerSVG({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),a=this.services.cartesianScales.getRangeIdentifier();if(this.configs.stacked){var s=Object.keys(r.axes).some((function(t){return r.axes[t].percentage}));e=this.model.getStackedData({percentage:s})}else e=this.model.getDisplayData().filter((function(t){return void 0!==t[a]&&null!==t[a]}));e=this.filterBasedOnZoomDomain(e);var u=n.selectAll("circle.dot").data(e,(function(t){return t[i]+"-"+t[o]}));u.exit().attr("opacity",0).remove();var l=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u);this.styleCircles(l,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=fo.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),o=i[0],a=i[1],s=fo.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.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.model.getOptions(),o=i.points,a=o.filled,s=o.fillOpacity,u=this.services,l=u.cartesianScales,c=u.transitions,h=i.data.groupMapsTo,f=l.getDomainIdentifier(),d=l.getRangeIdentifier(),p=fo.flipDomainAndRangeBasedOnOrientation((function(t,e){return l.getDomainValue(t,e)}),(function(t,e){return l.getRangeValue(t,e)}),l.getOrientation()),g=p[0],v=p[1],m=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).attr("class",(function(t){var e=n.model.getIsFilled(t[h],t[f],t,a)?[O.FILL,O.STROKE]:[O.STROKE];return n.model.getColorClassName({classNameTypes:e,dataGroupName:t[h],originalClassName:"dot"})})).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[h],t[f],t,a)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[h],t[f],t,a)})).transition(c.getTransition("scatter-update-enter",e)).attr("cx",g).attr("cy",v).attr("r",i.points.radius).attr("fill",(function(t){if(n.model.getIsFilled(t[h],t[f],t,a))return n.model.getFillColor(t[h],t[f],t)})).attr("fill-opacity",a?s:1).attr("stroke",(function(t){return n.model.getStrokeColor(t[h],t[f],t)})).attr("opacity",m?0:1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","point").attr("aria-label",(function(t){return t[d]})),this.addEventListeners()},e.prototype.getTooltipData=function(t,e){var n=this;return this.model.getDisplayData().filter((function(r){return t===n.services.cartesianScales.getDomainValue(r)&&e===n.services.cartesianScales.getRangeValue(r)}))},e.prototype.addEventListeners=function(){var t=this,e=t.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover",(function(r){var i=mo(this);i.classed("hovered",!0).attr("class",(function(n){return t.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:n[e],originalClassName:i.attr("class")})})).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)})).classed("unfilled",!1);var o=t.services.cartesianScales.getDomainValue(r),a=t.services.cartesianScales.getRangeValue(r),s=t.getTooltipData(o,a);t.services.events.dispatchEvent(F.Tooltip.SHOW,{hoveredElement:i,data:s}),t.services.events.dispatchEvent(F.Scatter.SCATTER_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=mo(this);t.services.events.dispatchEvent(F.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(F.Scatter.SCATTER_CLICK,{element:mo(this),datum:e})})).on("mouseout",(function(e){var n=mo(this);n.classed("hovered",!1),t.configs.filled||"1"!==n.attr("fill-opacity")||(n.classed("unfilled",!0),n.style("fill",null)),t.services.events.dispatchEvent(F.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.destroy=function(){this.parent.selectAll("circle").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(F.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(F.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(Xp),yg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="bubble",e}return n(e,t),e.prototype.getRadiusScale=function(t){var e=this.model.getOptions(),n=e.bubble.radiusMapsTo,r=t.data(),i=r.map((function(t){return t[n]})).filter((function(t){return t})),o=af.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),a=i.length>0,s=a?xa(i):[1,1];return lu().domain(s).range(a?e.bubble.radiusRange(o,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),o=i.bubble.radiusMapsTo,a=this.getRadiusScale(t),s=i.data.groupMapsTo,u=this.services.cartesianScales.getDomainIdentifier();t.raise().classed("dot",!0).attr("role",r.GRAPHICS_SYMBOL).attr("cx",(function(t,e){return n.services.cartesianScales.getDomainValue(t,e)})).transition(this.services.transitions.getTransition("bubble-update-enter",e)).attr("cy",(function(t,e){return n.services.cartesianScales.getRangeValue(t,e)})).attr("r",(function(t){return a(t[o]||1)})).attr("class",(function(t){return n.model.getColorClassName({classNameTypes:[O.FILL,O.STROKE],dataGroupName:t[s],originalClassName:"dot"})})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("opacity",1)},e}(mg),_g=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="line",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-hover-line")).attr("opacity",(function(t){return t.name!==n.datum().name?Bo.opacity.unselected:Bo.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Bo.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG({withinChartClip:!0}),i=this.services,o=i.cartesianScales,a=i.curves,s=fo.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.model.getOptions(),h=Rc().x(u).y(l).curve(a.getD3Curve()).defined((function(t,e){var n=t[o.getRangeIdentifier()];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,g=this.model.getStackedData({percentage:d}),v=this.services.cartesianScales.getDomainIdentifier(),m=this.services.cartesianScales.getRangeIdentifier();f=g.map((function(t){return{name:t[0][p],data:t.map((function(t){var e;return(e={})[v]=t.data.sharedStackKey,e[p]=t[p],e[m]=t[1],e})),hidden:!fo.some(t,(function(t){return t[0]!==t[1]}))}}))}else f=this.model.getGroupedData();var y=n.selectAll("path.line").data(f,(function(t){return t.name}));y.exit().attr("opacity",0).remove(),y.enter().append("path").classed("line",!0).attr("opacity",0).merge(y).data(f,(function(t){return t.name})).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.STROKE],dataGroupName:t.name,originalClassName:"line"})})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","line").attr("aria-label",(function(t){var n=t.data,r=e.services.cartesianScales.getRangeIdentifier();return n.map((function(t){return t[r]})).join(",")})).transition(this.services.transitions.getTransition("line-update-enter",t)).attr("opacity",(function(t){return t.hidden?0:1})).attr("stroke",(function(t){return e.model.getStrokeColor(t.name)})).attr("d",(function(t){var e=t.data;return h(e)}))},e.prototype.destroy=function(){this.parent.selectAll("path.line").on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Xp),bg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="scatter-stacked",e}return n(e,t),e.prototype.render=function(t){if(fo.getProperty(this.model.getOptions(),"points","enabled")){var e=this.getContainerSVG({withinChartClip:!0}),n=this.model.getOptions(),i=n.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),a=this.services.cartesianScales.getRangeIdentifier(),s=Object.keys(n.axes).some((function(t){return n.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),l=e.selectAll("g.dots").data(u,(function(t){return t[0][i]}));l.exit().attr("opacity",0).remove();var c=l.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(l).selectAll("circle.dot").data((function(t){return t}));c.exit().attr("opacity",0).remove();var h=c.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(c).datum((function(t){var e,n=t[i];return(e={})[i]=n,e[o]=t.data.sharedStackKey,e[a]=t[1],e}));this.styleCircles(h,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),o=this.model.getOptions(),a=o.data.groupMapsTo,s=Object.keys(o.axes).some((function(t){return o.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),l=[];return u.forEach((function(o,u){o.forEach((function(o,c){var h,f=o[a],d=o.data.sharedStackKey,p=o.data[f],g=o[1];null!=p&&t===n.services.cartesianScales.getDomainValue(d)&&e===n.services.cartesianScales.getRangeValue(g)&&(s&&(p=n.model.getStackedData()[u][c].data[f]),null!==p&&l.push(((h={})[a]=f,h[r]=d,h[i]=p,h)))}))})),this.model.getDisplayData().filter((function(t){return void 0!==l.find((function(e){return e[a]==t[a]&&e[r]==t[r]&&e[i]==t[i]}))}))},e}(mg);function xg(t,e){var n=this,r=Es(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="pie",e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement,r=e.model.getOptions().data.groupMapsTo;e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-hover-bar")).attr("opacity",(function(t){return t.data[r]!==n.datum().name?.3:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.slice").transition(e.services.transitions.getTransition("legend-mouseout-bar")).attr("opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return Uo.innerRadius},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),o=this.model.getDisplayData(),a=this.model.getOptions(),s=a.data.groupMapsTo,u=this.computeRadius();this.arc=Cc().innerRadius(this.getInnerRadius()).outerRadius(u),this.hoverArc=Cc().innerRadius(this.getInnerRadius()).outerRadius(u+Uo.hoverArc.outerRadiusOffset);var l=function(){var t=Vc,e=Nc,n=null,r=lc(0),i=lc(_c),o=lc(0);function a(a){var s,u,l,c,h,f=a.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(_c,Math.max(-_c,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,o.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(a[s],s,a))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(a[t],a[e])})),s=0,l=d?(m-f*_)/d:0;s<f;++s,v=c)u=p[s],c=v+((h=g[u])>0?h*l:0)+_,g[u]={data:a[u],index:s,value:h,startAngle:v,endAngle:c,padAngle:y};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:lc(+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:lc(+t),a):r},a.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:lc(+t),a):i},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:lc(+t),a):o},a}().value((function(t){return t.value})).sort(null).padAngle(Uo.padAngle)(o).sort((function(t,e){return t.index-e.index})),c=af.appendOrSelect(i,"g.slices").attr("role",r.GROUP).attr("data-name","slices").selectAll("path.slice").data(l,(function(t){return t.data[s]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t.data[s],originalClassName:"slice"})})).attr("fill",(function(t){return n.model.getFillColor(t.data[s])})).attr("d",this.arc).transition(this.services.transitions.getTransition("pie-slice-enter-update",t)).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","slice").attr("aria-label",(function(t){return t.value+", "+fo.convertValueToPercentage(t.data.value,o)+"%"})).attrTween("d",(function(t){return xg.bind(this)(t,n.arc)}));var h=l.filter((function(t){return t.value>0})),f=af.appendOrSelect(i,"g.labels").attr("role",r.GROUP).attr("data-name","labels").selectAll("text.pie-label").data(h,(function(t){return t.data[s]}));f.exit().attr("opacity",0).remove();var d=f.enter().append("text").classed("pie-label",!0),p=[];d.merge(f).style("text-anchor","middle").text((function(t){return a.pie.labels.formatter?a.pie.labels.formatter(t):fo.convertValueToPercentage(t.data.value,o)+"%"})).datum((function(t){var e=u+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=h.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<Uo.callout.minSliceDegree){var i=void 0,o=void 0;return t.index===n-1?(i=t.xPosition+Uo.callout.offsetX+Uo.callout.textMargin+t.textOffsetX,o=t.yPosition-Uo.callout.offsetY,t.direction=R.RIGHT,p.push(t)):(i=t.xPosition-Uo.callout.offsetX-t.textOffsetX-Uo.callout.textMargin,o=t.yPosition-Uo.callout.offsetY,t.direction=R.LEFT,p.push(t)),"translate("+i+", "+o+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(p);var g=fo.getProperty(a,"donut")?"donut":"pie",v=fo.getProperty(a,g,"alignment"),m=af.getSVGElementSize(this.getParent(),{useAttr:!0}).width,y=u+Uo.xOffset;v===D.CENTER?y=m/2:v===D.RIGHT&&(y=m-u-Uo.xOffset);var _=u+Uo.yOffset;p.length>0&&(_+=Uo.yOffsetCallout),i.attr("transform","translate("+y+", "+_+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=af.appendOrSelect(this.getContainerSVG(),"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===R.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+Uo.callout.offsetX,y:n-Uo.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-Uo.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-Uo.callout.offsetX,y:n-Uo.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+Uo.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return mo(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 mo(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){var n=mo(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(F.Pie.SLICE_MOUSEOVER,{element:mo(this),datum:e});var r=t.model.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(F.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value}]})})).on("mousemove",(function(e){var n=mo(this);t.services.events.dispatchEvent(F.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(F.Pie.SLICE_CLICK,{element:mo(this),datum:e})})).on("mouseout",(function(e){var n=mo(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(F.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=af.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Uo.radiusOffset},e}(Xp),Og=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="gauge",e}return n(e,t),e.prototype.init=function(){this.services.events},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 fo.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.model.getOptions();return fo.getProperty(t,"gauge","type")===B.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.model.getOptions();switch(fo.getProperty(e,"gauge","deltaArrow","direction")){case G.UP:return"4,10 8,6 12,10";case G.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.getContainerSVG(),i=this.model.getOptions().data.groupMapsTo,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=Cc().innerRadius(f).outerRadius(h).startAngle(l).endAngle(c),this.arc=Cc().innerRadius(f).outerRadius(h).startAngle(u).endAngle(l),af.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:[O.FILL],dataGroupName:"value",originalClassName:"arc-foreground"})).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",this.arc).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value})),n.attr("transform","translate("+h+", "+h+")"),this.drawValueNumber(),this.drawDelta(),d.exit().remove(),this.addEventListeners()},e.prototype.drawValueNumber=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=fo.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),o=this.computeRadius(),a=fo.getProperty(e,"gauge","valueFontSize"),s=fo.getProperty(e,"gauge","deltaFontSize"),u=fo.getProperty(e,"gauge","numberSpacing"),l=0;n!==B.FULL||i?n===B.SEMI&&i&&(l=-(s(o)+u)):l=s(o);var c=af.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+l+")"),h=af.appendOrSelect(c,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=fo.getProperty(e,"gauge","numberFormatter"),d=h.selectAll("text.gauge-value-number").data([r]);d.enter().append("text").attr("class","gauge-value-number").merge(d).style("font-size",a(o)+"px").attr("text-anchor","middle").text((function(t){return f(t)}));var p=af.getSVGElementSize(af.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;af.appendOrSelect(h,"text.gauge-value-symbol").style("font-size",a(o)/2+"px").attr("x",p/2).text("%")},e.prototype.drawDelta=function(){var t=this.getContainerSVG(),e=this.model.getOptions(),n=this.getDelta(),r=this.computeRadius(),i=n?fo.getProperty(e,"gauge","deltaFontSize"):function(){return 0},o=n?fo.getProperty(e,"gauge","numberFormatter"):function(){return null},a=fo.getProperty(e,"gauge","deltaArrow","size"),s=fo.getProperty(e,"gauge","numberSpacing"),u=af.appendOrSelect(t,"g.gauge-numbers"),l=af.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),c=af.appendOrSelect(l,"text.gauge-delta-number");c.data(null===n?[]:[n]),c.enter().append("text").classed("gauge-delta-number",!0).merge(c).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return o(t)+"%"}));var h=af.getSVGElementSize(af.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=fo.getProperty(e,"gauge","deltaArrow","enabled"),d=l.selectAll("svg.gauge-delta-arrow").data(null!==n&&f?[n]:[]);d.enter().append("svg").merge(d).attr("class","gauge-delta-arrow").attr("x",-a(r)-h/2).attr("y",-a(r)/2-.35*i(r)).attr("width",a(r)).attr("height",a(r)).attr("viewBox","0 0 16 16"),af.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=fo.getProperty(e,"gauge","status");af.appendOrSelect(d,"polygon.gauge-delta-arrow").attr("class",null!==p?"gauge-delta-arrow status--"+p:"").attr("fill",(function(){return null===p?"currentColor":null})).attr("points",this.getArrow(n)),d.exit().remove(),c.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-fo.getProperty(this.model.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc-foreground").on("mouseover",(function(e){t.services.events.dispatchEvent(F.Gauge.ARC_MOUSEOVER,{element:mo(this),datum:e})})).on("mousemove",(function(e){var n=mo(this);t.services.events.dispatchEvent(F.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(F.Gauge.ARC_CLICK,{element:mo(this),datum:e})})).on("mouseout",(function(e){var n=mo(this);t.services.events.dispatchEvent(F.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=fo.getProperty(t,"gauge","type"),n=af.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===B.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(Xp),Eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="donut",e}return n(e,t),e.prototype.render=function(e){void 0===e&&(e=!0),t.prototype.render.call(this,e);var n=this;if(this.model.isDataEmpty())this.getContainerSVG().select("g.center").remove();else{var r=af.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),o=this.computeRadius();af.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(o)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(mo(this))})),af.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(o)})).attr("y",i.donut.center.titleYPosition(o)).text(fo.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=fo.getProperty(e,"donut","center","number");null===n&&(n=this.model.getDisplayData().reduce((function(t,e){return t+e.value}),0));var r=parseInt(t.text().replace(/[, ]+/g,""),10)||0,i=(r%1==0&&n%1==0?Ss:_s)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(wg),Sg=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=this.parent,e=t.node().parentNode,n=af.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var o=fo.getProperty(this.model.getOptions(),"data","loading");o?this.renderSkeleton(o):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===I.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===I.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===I.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==I.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===M.VERTICAL&&this.drawYGrid(t),e===M.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=lu().domain([0,1]).range(t),this.yScale=lu().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=af.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;this.backdrop=af.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",o);var a=af.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");a.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],l=(s[1],this.yScale.range()),c=(l[0],l[1]);this.backdrop.merge(a).attr("x",u).attr("y",c),a.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawXGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=fo.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),o=af.appendOrSelect(this.backdrop,"g.x.skeleton"),a=o.selectAll("line").data(i);a.enter().append("line").merge(a).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),o.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=fo.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),o=af.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=af.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),o=i.width,a=i.height,s=af.appendOrSelect(r,"svg.chart-skeleton").attr("width",o).attr("height",a),u=0===e?"pie":"donut",l=fo.getProperty(this.model.getOptions(),u,"alignment");af.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",o).attr("height",a).attr("fill","none");var c=Cc().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(Uo.radiusOffset),f=t+(Math.min(o,a)-2*t)/2,d=af.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+Uo.xOffset;l===D.CENTER?p=o/2:l===D.RIGHT&&(p=o-t-Uo.xOffset);var g=t+Uo.yOffset;d.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=af.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Uo.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=af.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=af.appendOrSelect(e,"defs").lower(),o=af.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(vd).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(Xp),Tg=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=this.parent,n=e.node().parentNode,r=af.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height;e.attr("width",i).attr("height",o);var a=fo.getProperty(this.model.getOptions(),"data","loading"),s=!(fo.getProperty(this.model.getOptions(),"grid","x","enabled")||fo.getProperty(this.model.getOptions(),"grid","y","enabled")||fo.getProperty(this.model.getOptions(),"axes","bottom","visible")||fo.getProperty(this.model.getOptions(),"axes","left","visible"));a&&!s?t.prototype.renderGridSkeleton.call(this,a):a&&s?this.renderSparklineSkeleton(a):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=af.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=af.appendOrSelect(t,"svg.chart-skeleton.DAII");var e=af.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");e.classed("shimmer-effect-lines",!1),e.classed("shimmer-effect-sparkline",!0)},e}(Sg),Mg=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(){af.appendOrSelect(this.getContainerSVG(),"rect").attr("x",0).attr("y",0).attr("width",this.configs.size||Ho.default.size).attr("height",this.configs.size||Ho.default.size).attr("opacity",0)},e}(Xp);function Ag(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 Cg(t,e){var n,r,i,o,a,s=new Lg(t),u=+t.value&&(s.value=t.value),l=[s];for(null==e&&(e=Dg);n=l.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(a=i.length))for(n.children=new Array(a),o=a-1;o>=0;--o)l.push(r=n.children[o]=new Lg(i[o])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(kg)}function Dg(t){return t.children}function Pg(t){t.data=t.data.data}function kg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Lg(t){this.data=t,this.depth=this.height=0,this.parent=null}function Rg(t){if("function"!=typeof t)throw new Error;return t}function Ig(){return 0}function Ng(t){return function(){return t}}function Vg(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 Bg(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 Gg(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}Lg.prototype=Cg.prototype={constructor:Lg,count:function(){return this.eachAfter(Ag)},each:function(t){var e,n,r,i,o=this,a=[o];do{for(e=a.reverse(),a=[];o=e.pop();)if(t(o),n=o.children)for(r=0,i=n.length;r<i;++r)a.push(n[r])}while(a.length);return this},eachAfter:function(t){for(var e,n,r,i=this,o=[i],a=[];i=o.pop();)if(a.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)o.push(e[n]);for(;i=a.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},leaves:function(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t},links:function(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return Cg(this).eachBefore(Pg)}};var Ug=function t(e){function n(t,n,r,i,o){!function(t,e,n,r,i,o){for(var a,s,u,l,c,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,l=o-r;do{c=y[b++].value}while(!c&&b<x);for(h=f=c,v=c*c*(g=Math.max(l/u,u/l)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(c+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=c*c*g,(d=Math.max(f/v,v/h))>p){c-=s;break}p=d}m.push(a={value:c,dice:u<l,children:y.slice(_,b)}),a.dice?Bg(a,n,r,i,w?r+=l*c/w:o):Gg(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);function zg(){var t=Ug,e=!1,n=1,r=1,i=[0],o=Ig,a=Ig,s=Ig,u=Ig,l=Ig;function c(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Vg),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=Rg(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:Ng(+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:Ng(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Ng(+t),c):s},c.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Ng(+t),c):u},c.paddingLeft=function(t){return arguments.length?(l="function"==typeof t?t:Ng(+t),c):l},c}var Hg=function(t){function e(n,r,i,o){var a=t.call(this,n,r,o)||this;return a.type="layout",a.configs=o,a.children=i,a._instanceID=e.instanceID++,(a.configs.direction===k.ROW_REVERSE||a.configs.direction===k.COLUMN_REVERSE)&&(a.children=a.children.reverse()),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("svg.layout-child-"+this._instanceID).filter((function(t){var e=fo.getProperty(t,"data","growth","x");return e===L.PREFERRED||e===L.FIXED})).each((function(t){e+=t.data.size})),e},e.prototype.getNumOfStretchChildren=function(){return this.parent.selectAll("svg.layout-child-"+this._instanceID).filter((function(t){return fo.getProperty(t,"data","growth","x")===L.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=af.getSVGElementSize(n,{useAttrs:!0}),i=r.width,o=r.height,a=Cg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===k.ROW||this.configs.direction===k.ROW_REVERSE?Bg:Gg;zg().tile(s).size([i,o])(a);var u=this.configs.direction===k.ROW||this.configs.direction===k.ROW_REVERSE,l=n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id}));l.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),l.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(mo(n));var i=fo.getProperty(e,"data","growth","x");i!==L.PREFERRED&&i!==L.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=fo.getProperty(t,"data","growth","x"),n=af.getSVGElementSize(mo(this),{useBBox:!0});if("legend"===t.data.id){var r=af.getSVGElementSize(mo(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===L.PREFERRED){var a=u?n.width:n.height,s=u?i:o;t.data.size=a/s*100}})),l.exit().remove(),this.children.filter((function(t){return fo.getProperty(t,"growth","x")===L.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),a=Cg({children:this.children}).sum((function(t){return t.size})),zg().tile(s).size([i,o]).padding(0)(a),n.selectAll("svg.layout-child-"+this._instanceID).data(a.leaves(),(function(t){return t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})).each((function(e,n){e.data.components.forEach((function(n){fo.getProperty(e,"data","growth","x")===L.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}(Xp),Fg=Array.prototype.slice;function jg(t){return t}function Wg(t){return"translate("+(t+.5)+",0)"}function Yg(t){return"translate(0,"+(t+.5)+")"}function Xg(t){return function(e){return+t(e)}}function qg(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Zg(){return!this.__axis}function Kg(t,e){var n=[],r=null,i=null,o=6,a=6,s=3,u=1===t||4===t?-1:1,l=4===t||2===t?"x":"y",c=1===t||3===t?Wg:Yg;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):jg:i,p=Math.max(o,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?qg:Xg)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),O=x.enter().append("g").attr("class","tick"),E=x.select("line"),S=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(O),E=E.merge(O.append("line").attr("stroke","currentColor").attr(l+"2",u*o)),S=S.merge(O.append("text").attr("fill","currentColor").attr(l,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),E=E.transition(h),S=S.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?c(t):this.getAttribute("transform")})),O.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return c(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.attr("d",4===t||2==t?a?"M"+u*a+","+v+"H0.5V"+m+"H"+u*a:"M0.5,"+v+"V"+m:a?"M"+v+","+u*a+"V0.5H"+m+"V"+u*a:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return c(y(t))})),E.attr(l+"2",u*o),S.attr(l,u*p).text(d),_.filter(Zg).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),_.each((function(){this.__axis=y}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=Fg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Fg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Fg.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(o=a=+t,h):o},h.tickSizeInner=function(t){return arguments.length?(o=+t,h):o},h.tickSizeOuter=function(t){return arguments.length?(a=+t,h):a},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function $g(t){return Kg(1,t)}function Qg(t){return Kg(2,t)}function Jg(t){return Kg(3,t)}function tv(t){return Kg(4,t)}var ev=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="axes",r&&(i.configs=r),i.margins=i.configs.margins,i}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e,n,i=this.configs.position,o=this.model.getOptions(),a=fo.getProperty(o,"axes",i,"visible"),s=this.getContainerSVG(),u=af.getSVGElementSize(this.parent,{useAttrs:!0}),l=u.width,c=u.height,h=af.appendOrSelect(s,"g.axis."+i);i===E.BOTTOM||i===E.TOP?(e=this.configs.axes[E.LEFT]?this.margins.left:0,n=this.configs.axes[E.RIGHT]?l-this.margins.right:l):(e=c-this.margins.bottom,n=this.margins.top);var f,d=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===A.LABELS?d.rangeRound([e,n]):d.range([e,n]),i){case E.LEFT:f=tv;break;case E.BOTTOM:f=Jg;break;case E.RIGHT:f=Qg;break;case E.TOP:f=$g}h.attr("aria-label",i+" axis");var p=!h.select("g.ticks").empty(),g=af.appendOrSelect(h,"g.ticks");p||(g.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),g.attr("aria-label",i+" ticks"));var v=af.appendOrSelect(h,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),m=fo.getProperty(o,"axes",i),y=this.scaleType===A.TIME||m.scaleType===A.TIME,_=i===E.LEFT||i===E.RIGHT,b=this.model.get("zoomDomain");if(b&&y&&!_&&d.domain(b),a){var x=fo.getProperty(m,"scaleType"),w=fo.getProperty(o,"data","loading"),O=fo.getProperty(m,"ticks","number"),S=fo.getProperty(m,"ticks","values"),M=fo.getProperty(m,"truncation","type"),C=fo.getProperty(m,"truncation","threshold"),D=fo.getProperty(m,"truncation","numCharacter"),P=null!==O,k=fo.getProperty(o,"timeScale"),L=af.appendOrSelect(v,"g.tick"),R=af.appendOrSelect(L,"text").text("0"),I=af.getSVGElementSize(R.node(),{useBBox:!0}).height;L.remove();var N,V=this.scaleType||m.scaleType||A.LINEAR,B=f(d).tickSizeOuter(0);if(d.ticks){var G=void 0;if(P?G=O:(G=No.ticks.number,_&&(G=this.getNumberOfFittingTicks(c,I,No.ticks.verticalSpaceRatio))),1===d.ticks().length&&0===d.ticks()[0]&&(G=0),B.ticks(G),y)if(d.ticks(G).length){var U=fo.getProperty(o,"timeScale","addSpaceOnEdges"),H=fo.getProperty(o,"axes",i,"domain"),F=void 0,j=d.copy();U&&!H&&j.nice(G),F=j.ticks(G),U&&F.length>2&&!H&&(F.splice(F.length-1,1),F.splice(0,1)),B.tickValues(F)}else B.tickValues([])}var W=fo.getProperty(m,"ticks","formatter");if(y){var Y=ng(B.tickValues());N=null===W?function(t,e){return tg(t,e,Y,k)}:function(t,e){var n=tg(t,e,Y,k);return W(t,e,n)}}else null===W?V===A.LINEAR&&(N=function(t){return t.toLocaleString()}):N=W;B.tickFormat(N);var X,q=this.services.cartesianScales.getScaleByPosition(i).domain(),Z=q[0],K=q[1];if(S){if(y)S.forEach((function(t,e){void 0===t.getTime&&(S[e]=new Date(t))})),X=S.filter((function(t){var e=t.getTime();return e>=new Date(Z).getTime()&&e<=new Date(K).getTime()}));else if(x===A.LABELS){var $=this.services.cartesianScales.getScaleByPosition(i).domain();X=S.filter((function(t){return $.includes(t)}))}else X=S.filter((function(t){return t>=Z&&t<=K}));B.tickValues(X)}switch(i){case E.LEFT:g.attr("transform","translate("+this.margins.left+", 0)");break;case E.BOTTOM:g.attr("transform","translate(0, "+(c-this.margins.bottom)+")");break;case E.RIGHT:g.attr("transform","translate("+(l-this.margins.right)+", 0)");break;case E.TOP:g.attr("transform","translate(0, "+this.margins.top+")")}var Q=this.model.isDataEmpty();if(m.title){var J=af.appendOrSelect(h,"text.axis-title").html(Q||w?"":m.title);switch(i){case E.LEFT:J.attr("transform","rotate(-90)").attr("y",0).attr("x",-d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case E.BOTTOM:J.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+c+")").style("text-anchor","middle");break;case E.RIGHT:J.attr("transform","rotate(90)").attr("y",-l).attr("x",d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case E.TOP:var tt=af.getSVGElementSize(J,{useBBox:!0}).height;J.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+tt/2+")").style("text-anchor","middle")}}if(y){var et=ng(B.tickValues()),nt=k.showDayName,rt=g;t&&(g=g.transition(this.services.transitions.getTransition("axis-update",t))),g=g.call(B),rt.selectAll(".tick").data(B.tickValues(),d).order().select("text").style("font-weight",(function(t,e){return Jp(t,e,et,nt)?"bold":"normal"}))}else g=t&&p?g.transition(this.services.transitions.getTransition("axis-update")).call(B):g.call(B);if(v.call(B),i===E.BOTTOM||i===E.TOP){var it=!1,ot=fo.getProperty(m,"ticks","rotation");if(ot===z.ALWAYS)it=!0;else if(ot===z.NEVER)it=!1;else if(!ot||ot===z.AUTO)if(d.step){it=v.selectAll("g.tick text").nodes().some((function(t){return af.getSVGElementSize(t,{useBBox:!0}).width>=d.step()}))}else{var at=fo.getProperty(m,"ticks","rotateIfSmallerThan")||No.ticks.rotateIfSmallerThan,st=l/(y?B.tickValues().length:d.ticks().length)/2;it=y?st<2*at:st<at}it?(P||(B.ticks(this.getNumberOfFittingTicks(l,I,No.ticks.horizontalSpaceRatio)),v.call(B),g.call(B)),h.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===E.TOP?"start":"end")):h.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(w?h.attr("opacity",0):h.attr("opacity",1),g.selectAll("g.tick").attr("aria-label",(function(t){return t})),v.selectAll("g.tick").attr("aria-label",(function(t){return t})),M!==T.NONE&&x===A.LABELS&&!S){var ut=this.model.getDataValuesGroupedByKeys();if(ut.length>0){var lt=ut.map((function(t){return t.sharedStackKey})),ct=s.select("g.axis."+i+" g.ticks g.tick").html();h.selectAll("g.ticks g.tick").html(ct),h.selectAll("g.tick text").data(lt).text((function(t){return t.length>C?fo.truncateLabel(t,M,D):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(lt).text((function(t){return t.length>C?fo.truncateLabel(t,M,D):t})),h.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),h.selectAll("g.tick text").data(lt)}}this.addEventListeners()}else g.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=af.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=fo.getProperty(r,"axes",e),o=fo.getProperty(i,"scaleType"),a=fo.getProperty(i,"truncation","threshold"),s=(this.scaleType===A.TIME||(i.scaleType,A.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(F.Axis.LABEL_MOUSEOVER,{element:mo(this),datum:t}),o===A.LABELS&&t.length>a&&s.services.events.dispatchEvent(F.Tooltip.SHOW,{hoveredElement:mo(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(F.Axis.LABEL_MOUSEMOVE,{element:mo(this),datum:t}),o===A.LABELS&&t.length>a&&s.services.events.dispatchEvent(F.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(F.Axis.LABEL_CLICK,{element:mo(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(F.Axis.LABEL_MOUSEOUT,{element:mo(this),datum:t}),o===A.LABELS&&s.services.events.dispatchEvent(F.Tooltip.HIDE)}))},e.prototype.getInvisibleAxisRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" g.ticks.invisible")},e.prototype.getTitleRef=function(){var t=this.configs.position;return this.getContainerSVG().select("g.axis."+t+" text.axis-title")},e.prototype.getNumberOfFittingTicks=function(t,e,n){var r=Math.floor(t/(e*n));return fo.clamp(r,2,No.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;af.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(Xp),nv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="2D-axes",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(E),i=fo.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[E[t]]&&(n[E[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=E[t];if(e.configs.axes[n]&&!e.children[n]){var r=new ev(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(n){var r,i=e.children[n],a=i.configs.position,s=i.getInvisibleAxisRef(),u=af.getSVGElementSize(s,{useBBox:!0}),l=u.width,c=u.height;switch(r=i.getTitleRef().empty()?0:af.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,a){case E.TOP:o.top=c+r;break;case E.BOTTOM:o.bottom=c+r;break;case E.LEFT:o.left=l+r;break;case E.RIGHT:o.right=l+r}e.addAxisThresholds(t,a)})),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(F.ZoomBar.UPDATE),Object.keys(this.children).forEach((function(t){e.children[t].margins=e.margins})),this.render(!0))},e.prototype.addAxisThresholds=function(t,e){var n=this,r=fo.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new ag(n.model,n.services,b(b({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(Xp);function rv(){ro.preventDefault(),ro.stopImmediatePropagation()}function iv(t){var e=t.document.documentElement,n=mo(t).on("dragstart.drag",rv,!0);"onselectstart"in e?n.on("selectstart.drag",rv,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function ov(t,e){var n=t.document.documentElement,r=mo(t).on("dragstart.drag",null);e&&(r.on("click.drag",rv,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function av(t){return function(){return t}}function sv(t,e,n){this.target=t,this.type=e,this.selection=n}function uv(){ro.stopImmediatePropagation()}function lv(){ro.preventDefault(),ro.stopImmediatePropagation()}var cv={name:"drag"},hv={name:"space"},fv={name:"handle"},dv={name:"center"};function pv(t){return[+t[0],+t[1]]}function gv(t){return[pv(t[0]),pv(t[1])]}function vv(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=yo().changedTouches);for(var r,i=0,o=e?e.length:0;i<o;++i)if((r=e[i]).identifier===n)return _o(t,r);return null}(e,ro.touches,t)}}var mv={name:"x",handles:["w","e"].map(Ev),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]]}},yv={name:"y",handles:["n","s"].map(Ev),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]]}},_v={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"},bv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},xv={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},wv={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Ov={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Ev(t){return{type:t}}function Sv(){return!ro.ctrlKey&&!ro.button}function Tv(){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 Mv(){return navigator.maxTouchPoints||"ontouchstart"in this}function Av(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Cv(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Dv(){return function(t){var e,n=Tv,r=Sv,i=Mv,o=!0,a=lf("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([Ev("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",_v.overlay).merge(n).each((function(){var t=Av(this).extent;mo(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([Ev("selection")]).enter().append("rect").attr("class","selection").attr("cursor",_v.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 _v[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=mo(this),e=Av(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){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function f(){if((!e||ro.touches)&&r.apply(this,arguments)){var n,i,a,s,u,h,f,d,p,g,v,m=this,y=ro.target.__data__.type,_="selection"===(o&&ro.metaKey?y="overlay":y)?cv:o&&ro.altKey?dv:fv,b=t===yv?null:wv[y],x=t===mv?null:Ov[y],w=Av(m),O=w.extent,E=w.selection,S=O[0][0],T=O[0][1],M=O[1][0],A=O[1][1],C=0,D=0,P=b&&x&&o&&ro.shiftKey,k=ro.touches?vv(ro.changedTouches[0].identifier):bo,L=k(m),R=L,I=c(m,arguments,!0).beforestart();"overlay"===y?(E&&(p=!0),w.selection=E=[[n=t===yv?S:L[0],a=t===mv?T:L[1]],[u=t===yv?M:n,f=t===mv?A:a]]):(n=E[0][0],a=E[0][1],u=E[1][0],f=E[1][1]),i=n,s=a,h=u,d=f;var N=mo(m).attr("pointer-events","none"),V=N.selectAll(".overlay").attr("cursor",_v[y]);if(ro.touches)I.moved=G,I.ended=z;else{var B=mo(ro.view).on("mousemove.brush",G,!0).on("mouseup.brush",z,!0);o&&B.on("keydown.brush",H,!0).on("keyup.brush",F,!0),iv(ro.view)}uv(),Bf(m),l.call(m),I.start()}function G(){var t=k(m);!P||g||v||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?v=!0:g=!0),R=t,p=!0,lv(),U()}function U(){var t;switch(C=R[0]-L[0],D=R[1]-L[1],_){case hv:case cv:b&&(C=Math.max(S-n,Math.min(M-u,C)),i=n+C,h=u+C),x&&(D=Math.max(T-a,Math.min(A-f,D)),s=a+D,d=f+D);break;case fv:b<0?(C=Math.max(S-n,Math.min(M-n,C)),i=n+C,h=u):b>0&&(C=Math.max(S-u,Math.min(M-u,C)),i=n,h=u+C),x<0?(D=Math.max(T-a,Math.min(A-a,D)),s=a+D,d=f):x>0&&(D=Math.max(T-f,Math.min(A-f,D)),s=a,d=f+D);break;case dv:b&&(i=Math.max(S,Math.min(M,n-C*b)),h=Math.max(S,Math.min(M,u+C*b))),x&&(s=Math.max(T,Math.min(A,a-D*x)),d=Math.max(T,Math.min(A,f+D*x)))}h<i&&(b*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in bv&&V.attr("cursor",_v[y=bv[y]])),d<s&&(x*=-1,t=a,a=f,f=t,t=s,s=d,d=t,y in xv&&V.attr("cursor",_v[y=xv[y]])),w.selection&&(E=w.selection),g&&(i=E[0][0],h=E[1][0]),v&&(s=E[0][1],d=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===d||(w.selection=[[i,s],[h,d]],l.call(m),I.brush())}function z(){if(uv(),ro.touches){if(ro.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else ov(ro.view,p),B.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),V.attr("cursor",_v.overlay),w.selection&&(E=w.selection),Cv(E)&&(w.selection=null,l.call(m)),I.end()}function H(){switch(ro.keyCode){case 16:P=b&&x;break;case 18:_===fv&&(b&&(u=h-C*b,n=i+C*b),x&&(f=d-D*x,a=s+D*x),_=dv,U());break;case 32:_!==fv&&_!==dv||(b<0?u=h-C:b>0&&(n=i-C),x<0?f=d-D:x>0&&(a=s-D),_=hv,V.attr("cursor",_v.selection),U());break;default:return}lv()}function F(){switch(ro.keyCode){case 16:P&&(g=v=P=!1,U());break;case 18:_===dv&&(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(a=s),_=fv,U());break;case 32:_===hv&&(ro.altKey?(b&&(u=h-C*b,n=i+C*b),x&&(f=d-D*x,a=s+D*x),_=dv):(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(a=s),_=fv),V.attr("cursor",_v[y]),U());break;default:return}lv()}}function d(){c(this,arguments).moved()}function p(){c(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=gv(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){c(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){c(this,arguments).end()})).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=Es(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,r=arguments,i=e.__brush,o=t.input("function"==typeof n?n.apply(e,r):n,i.extent),a=c(e,r).beforestart();Bf(e),i.selection=null===o?null:o,l.call(e),a.start().brush().end()}))},u.clear=function(t){u.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){!function(t,e,n,r){var i=ro;t.sourceEvent=ro,ro=t;try{e.apply(n,r)}finally{ro=i}}(new sv(u,e,t.output(this.state.selection)),a.apply,a,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:av(gv(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:av(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:av(!!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}(mv)}var Pv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid-brush",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.getContainerSVG(),o=af.appendOrSelect(r,"svg.chart-grid-backdrop"),a=af.appendOrSelect(o,"g."+this.type),s=af.appendOrSelect(a,this.selectionSelector),u=af.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=af.appendOrSelect(i,this.frontSelectionSelector);if(d&&f===A.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=rc().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)},_=Dv().extent([[0,0],[l-1,c]]).on("start brush end",(function(){var t=ro.selection;null!==t&&t[0]!==t[1]&&(v.attr("x",s.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)}(t))})).on("end.brushed",(function(){var t=ro.selection;null!==t&&(y(t[0],t[1]),a.call(_.move,null),v.style("display","none"))}));a.call(_);var b=this.services.zoom.getZoomRatio();o.on("click",(function(){if(ro.shiftKey){var t=bo(a.node())[0],e=t-l*b/2;e<0&&(e=0);var n=t+l*b/2;n>l&&(n=l),y(e,n)}}))}},e.DASH_LENGTH=4,e}(Xp),kv=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="chart-clip",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=af.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var c=af.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}(Xp),Lv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="grid",e}return n(e,t),e.prototype.render=function(t){void 0===t&&(t=!0);var e=fo.getProperty(this.model.getOptions(),"grid","x","enabled"),n=fo.getProperty(this.model.getOptions(),"grid","y","enabled");(e||n)&&(this.drawBackdrop(e,n),e&&(af.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(af.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=Jg(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=fo.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var o=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=tv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=fo.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var o=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var a=this.services.transitions.getTransition("grid-update");o.transition(a).call(r)}else o.call(r);this.cleanGrid(o)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(fo.getTranslationValues(t).tx)-Number(fo.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+fo.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=+fo.getTranslationValues(s).tx-+fo.getTranslationValues(a).tx;else{var u=n.select("rect.chart-grid-backdrop").node();o=af.getSVGElementSize(u).width-+fo.getTranslationValues(a).tx}else o=+fo.getTranslationValues(s).tx;return o*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=fo.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=fo.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=af.appendOrSelect(n,"svg.chart-grid-backdrop");var h=af.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",s-a).attr("height",l-c).lower(),h.attr("width","100%").attr("height","100%")},e.prototype.cleanGrid=function(t){this.model.getOptions();t.selectAll("text").remove(),t.select(".domain").remove()},e}(Xp);var Rv,Iv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.isXGridEnabled=fo.getProperty(e.model.getOptions(),"grid","x","enabled"),e.isYGridEnabled=fo.getProperty(e.model.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=fo.getProperty(this.model.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){var e=this,n=t[0],r=t[1],i=this.parent,o=this.services.cartesianScales.getOrientation(),a=o===M.HORIZONTAL?r:n,s=af.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=af.appendOrSelect(s,"line.ruler-line"),l=i.selectAll("[role=graphics-symbol]"),c=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=c.map((function(t){return{domainValue:e.services.cartesianScales.getDomainValue(t),originalData:t}})).filter((function(t){return function(t,e){return t>e-5&&t<e+5}(t.domainValue,a)}));if(this.pointsWithinLine&&p.length===this.pointsWithinLine.length&&p.map((function(t){return t.domainValue})).join()===this.pointsWithinLine.map((function(t){return t.domainValue})).join())return this.pointsWithinLine=p,this.services.events.dispatchEvent(F.Tooltip.MOVE,{mousePosition:[n,r]});this.pointsWithinLine=p;var g=this.pointsWithinLine.reduce((function(t,e){if(0===t.length)return t.push(e),t;var n=t[0].domainValue,r=Math.abs(a-e.domainValue),i=Math.abs(a-n);return r>i?t:(r<i?t=[e]:t.push(e),t)}),[]);if(g.length>0){var v=this.services.cartesianScales.getRangeIdentifier(),m=g.map((function(t){return t.originalData})).filter((function(t){var e=t[v];return null!=e})),y=g.map((function(t){return t.domainValue})),_=l.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!fo.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent(F.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(m)}),s.attr("opacity",1);var b=g[0];"horizontal"===o?u.attr("x1",d).attr("x2",f).attr("y1",b.domainValue).attr("y2",b.domainValue):u.attr("y1",d).attr("y2",f).attr("x1",b.domainValue).attr("x2",b.domainValue)}else this.hideRuler()},e.prototype.hideRuler=function(){var t=this.parent,e=af.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(F.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.model.getDisplayData(),n=function(){var e=bo(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=fo.debounceWithD3MousePosition((function(){var e=this.mousePosition;t.showRuler(e)}),r,this.parent.node())}this.backdrop.on("mousemove mouseover",n).on("mouseout",this.hideRuler.bind(this))},e.prototype.drawBackdrop=function(){var t=this.parent,e=this.services.cartesianScales.getMainXScale(),n=this.services.cartesianScales.getMainYScale(),r=e.range(),i=(r[0],r[1],n.range());i[0],i[1];this.backdrop=af.appendOrSelect(t,"svg.chart-grid-backdrop");af.appendOrSelect(this.backdrop,this.isXGridEnabled||this.isYGridEnabled?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop")},e}(Xp),Nv=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.prototype.hideRuler=function(){var t=this.parent,e=af.appendOrSelect(t,"g.ruler");this.services.events.dispatchEvent(F.Tooltip.HIDE),e.attr("opacity",0)},e}(Iv),Vv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="toolbar",e.overflowMenuX=0,e.overflowMenuY=0,e.overflowMenuItemId=Math.floor(99999999999*Math.random()),e}return n(e,t),e.prototype.init=function(){var t=this,e=this.model.getOptions(),n=mo(this.services.domUtils.getHolder()),r=fo.getProperty(e,"style","prefix");this.overflowMenu=af.appendOrSelect(n,"div."+Nh.prefix+"--"+r+"--overflowMenu"),this.overflowMenu.style("max-width",null),this.services.events.addEventListener(F.Toolbar.SHOW_OVERFLOW_MENU,(function(){t.overflowMenu.html(t.getOverflowMenuHTML())})),this.services.events.addEventListener(F.Toolbar.HIDE_OVERFLOW_MENU,(function(){t.overflowMenu.html(null)})),document.body.addEventListener("click",(function(){return t.updateOverflowMenu(!1)}))},e.prototype.render=function(t){var e=fo.getProperty(this.model.getOptions(),"data","loading"),n=Wo.buttonSize,i=parseFloat(this.parent.node().getAttribute("y")),o=this.getContainerSVG();o.attr("transform","translate(0, "+(i+-6)+")");var a=af.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttrs:!0}).width;this.overflowMenuX=a-160,this.overflowMenuY=i+-6+n;var s=af.appendOrSelect(o,"svg.toolbar-container").attr("width","100%").attr("height",Wo.height).attr("opacity",1);s.html(null);var u=this.getControlConfigs(),l=u.buttonList;if(u.overflowMenuItemList&&l.push(this.getOverflowButtonConfig()),e||0===l.length)af.appendOrSelect(s,"svg.toolbar-loading-spacer").append("rect").attr("height",Wo.height).attr("width",3*n).attr("opacity",0);else{var c=0;l.forEach((function(t){var e=af.appendOrSelect(s,"svg."+t.id).classed("toolbar-button",!0),i=af.appendOrSelect(e,"rect.toolbar-button-background").attr("x",c).attr("y",0).attr("width",n).attr("height",n),o=af.appendOrSelect(e,"svg.toolbar-button-icon").attr("x",c+Wo.iconPadding).attr("y",Wo.iconPadding).attr("width",Wo.iconSize).attr("height",Wo.iconSize).attr("viewBox","0 0 32 32").attr("role",r.IMG);o.html(t.iconSVGContent),t.shouldBeDisabled()?(e.classed("toolbar-button--disabled",!0).classed("toolbar-button--focusable",!1).attr("tabindex",-1).attr("role",null),o.classed("toolbar-button-icon--disabled",!0),i.classed("toolbar-button-background--disabled",!0),e.on("click",null).on("keyup",null)):(e.classed("toolbar-button--disabled",!1).classed("toolbar-button--focusable",!0).attr("tabindex",0).attr("role",r.BUTTON),o.classed("toolbar-button-icon--disabled",!1),i.classed("toolbar-button-background--disabled",!1),e.on("click",t.clickFunction).on("keyup",(function(){(ro.key&&"Enter"===ro.key||" "===ro.key)&&(ro.preventDefault(),t.clickFunction())}))),c+=n})),this.overflowButton=this.getContainerSVG().select("svg.toolbar-overflow-menu"),this.isOverflowMenuOpen()&&this.updateOverflowMenu(!0)}},e.prototype.isOverflowMenuOpen=function(){return this.overflowMenu.selectAll("ul.bx--overflow-menu-options--open").size()>0},e.prototype.updateOverflowMenu=function(t){this.overflowButton&&this.overflowButton.classed("toolbar-button--hovered",t),t?this.services.events.dispatchEvent(F.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(F.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=mo("#"+e[n].id+this.overflowMenuItemId).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=mo("#"+e[n].id+this.overflowMenuItemId).node();"focus"in i&&i.focus()}},e.prototype.toggleOverflowMenu=function(){var t=this;if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);var e=this;this.getOverflowMenuItems().forEach((function(n,r){var i=mo("#"+n.id+t.overflowMenuItemId);null!==i&&(i.on("click",(function(){n.clickFunction(),e.updateOverflowMenu(!1)})),i.on("keyup",(function(){"Enter"===ro.key?n.clickFunction():"ArrowUp"===ro.key?e.focusOnPreviousEnabledMenuItem(r):"ArrowDown"===ro.key&&e.focusOnNextEnabledMenuItem(r)})))})),e.focusOnNextEnabledMenuItem(-1)}ro.stopImmediatePropagation()},e.prototype.getOverflowMenuHTML=function(){var t,e=this,n=this.getOverflowMenuItems();return n&&0!==n.length?(t='<div data-floating-menu-container="true" data-floating-menu-direction="bottom" role="main">\n\t\t\t<ul class="bx--overflow-menu-options bx--overflow-menu--flip bx--overflow-menu-options--open"\n\t\t\t\ttabindex="-1" role="'+r.MENU+'" aria-label="Menu" data-floating-menu-direction="bottom"\n\t\t\t\tstyle="left:'+this.overflowMenuX+"px; top:"+this.overflowMenuY+'px;">',n.forEach((function(n,i){var o="bx--overflow-menu-options__option".concat(n.shouldBeDisabled()?" bx--overflow-menu-options__option--disabled":"");t+='<li class="'+o+'" role="'+r.MENU_ITEM+'">\n\t\t\t\t<button class="bx--overflow-menu-options__btn"\n\t\t\t\t\tdata-floating-menu-primary-focus="'+(0===i)+'"\n\t\t\t\t\ttabindex="-1" index="'+i+'" title="'+n.text+'"\n\t\t\t\t\tid="'+(n.id+e.overflowMenuItemId)+'">\n\t\t\t\t\t<div class="bx--overflow-menu-options__option-content">\n\t\t\t\t\t\t'+n.text+"\n\t\t\t\t\t</div>\n\t\t\t\t</button>\n\t\t\t</li>"})),t+="</ul></div>"):""},e.prototype.getControlConfigs=function(){var t=this,e=fo.getProperty(this.model.getOptions(),"toolbar","numberOfIcons"),n=fo.getProperty(this.model.getOptions(),"toolbar","controls"),r=[];return n.forEach((function(e){var n=t.getControlConfigByType(e.type);n&&(n.text=e.text?e.text:e.type,r.push(n))})),r.length<=e?{buttonList:r}:{buttonList:r.splice(0,e-1),overflowMenuItemList:r}},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(){return t.toggleOverflowMenu()}}},e.prototype.getControlConfigByType=function(t){var e,n=this,r=this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState();switch(t){case H.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 H.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 H.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;default:throw Error("Not supported toolbar control type: "+t)}return e},e.prototype.getControlIconByType=function(t){switch(t){case H.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<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 H.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 H.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"/>';default:throw Error("Not supported toolbar control type: "+t)}},e}(Xp),Bv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zero-line",e}return n(e,t),e.prototype.render=function(t){var e=this.services.cartesianScales.getRangeScale().domain(),n=e[0],r=e[1];if(n>0&&r<0||n<0&&r>0){var i=this.getContainerSVG(),o=this.services.cartesianScales.getDomainScale().range(),a=o[0],s=o[1],u=+this.services.cartesianScales.getRangeValue(0)+.5;if(!u){var l=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(l).range()[0]}var c=fo.flipSVGCoordinatesBasedOnOrientation({x0:a,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());af.appendOrSelect(i,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",c.y0).attr("y2",c.y1).attr("x1",c.x0).attr("x2",c.x1)}},e}(Xp),Gv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="zoom-bar",e.MIN_SELECTION_DIFF=9e-10,e.brushSelector="g.zoom-bar-brush",e.clipId="zoomBarClip-"+Math.floor(99999999999*Math.random()),e.brush=Dv(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(F.ZoomBar.UPDATE,this.render.bind(this));var t=fo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"data");this.model.setZoomBarData(t)},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),r=this.services.zoom.isZoomBarLoading(E.TOP),i=this.services.zoom.isZoomBarLocked(E.TOP),o=fo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),a=Yo.height[o],s=af.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=0,l=this.model.get("axesMargins");l&&l.left&&(u=l.left);var c=af.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",a).attr("opacity",1);af.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",a).attr("width","100%").attr("height",Yo.spacerHeight).attr("opacity",1).attr("fill","none");if(o===S.GRAPH_VIEW?af.appendOrSelect(c,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",s-u).attr("height","100%"):o===S.SLIDER_VIEW&&af.appendOrSelect(c,"rect.zoom-slider-bg").attr("x",u).attr("y",a/2-1).attr("width",s-u).attr("height",2),!r){var h=this.services.cartesianScales,f=h.getMainXScale(),d=h.getMainYScale(),p=h.getMainXScaleType();if(f&&p===A.TIME){var g=this.services.zoom.getZoomBarData();if(fo.isEmpty(g))return;this.xScale=f.copy(),this.yScale=d.copy();var v=this.services.zoom.getDefaultZoomBarDomain(g);g=this.compensateDataForDefaultDomain(g,v);var m=this.model.get("initialZoomDomain"),y=fo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"initialZoomDomain");y&&y[0]&&y[1]&&(y[0]=new Date(y[0]),y[1]=new Date(y[1])),m===y||m&&y&&m[0].valueOf()===y[0].valueOf()&&m[1].valueOf()===y[1].valueOf()||this.model.set({initialZoomDomain:y,zoomDomain:y||v},{skipUpdate:!0}),this.xScale.range([u,s]).domain(v),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,a-6]).domain(xa(g,(function(t){return t.value})));var _=this.model.get("zoomDomain");if(o===S.GRAPH_VIEW){this.renderZoomBarArea(c,"path.zoom-graph-area-unselected",g,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(c,"path.zoom-graph-area",g,this.clipId);var b=Rc()([[u,a],[s,a]]);af.appendOrSelect(c,"path.zoom-bg-baseline").attr("d",b)}this.addBrushEventListener(_,u,s);var x=af.appendOrSelect(n,this.brushSelector).call(this.brush);if(void 0===_);else if(_[0].valueOf()===_[1].valueOf())x.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getContainerSVG(),this.xScale.range(),this.xScale.domain());else{var w=_.map((function(t){return e.xScale(t)}));w[1]-w[0]<this.MIN_SELECTION_DIFF||(x.call(this.brush.move,w),this.updateBrushHandle(this.getContainerSVG(),w,_))}i&&(this.brush.filter((function(){return!1})),x.selectAll("rect").attr("cursor","auto"))}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=fo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),o=Yo.height[i];this.brush.extent([[e,0],[n,o]]).on("start brush end",null).on("start brush end",(function(){var e=ro.selection;null===e?r.handleBrushedEvent(t,r.xScale,r.xScale.range()):e[0]===e[1]||r.handleBrushedEvent(t,r.xScale,e)}))},e.prototype.handleBrushedEvent=function(t,e,n){var r=[e.invert(n[0]),e.invert(n[1])];if(this.updateBrushHandle(this.getContainerSVG(),n,r),null!=ro.sourceEvent&&("mousemove"===ro.sourceEvent.type||"mouseup"===ro.sourceEvent.type||"mousedown"===ro.sourceEvent.type||"touchstart"===ro.sourceEvent.type||"touchmove"===ro.sourceEvent.type||"touchend"===ro.sourceEvent.type)){void 0!==t&&t[0]===r[0]&&t[1]===r[1]||this.services.zoom.handleDomainChange(r,{dispatchEvent:!1});var i=void 0;"start"===ro.type?i=F.ZoomBar.SELECTION_START:"brush"===ro.type?i=F.ZoomBar.SELECTION_IN_PROGRESS:"end"===ro.type&&(i=F.ZoomBar.SELECTION_END),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=Yo.handleWidth,o=fo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),a=Yo.height[o],s=-i/2,u=Yo.handleBarWidth,l=o===S.GRAPH_VIEW?Yo.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===S.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=fo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),n=Yo.height[e],r=(af.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getContainerSVG().select("svg.zoom-container");af.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=fo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"type"),d=Yo.height[f],p=Ic().x((function(t,e){return c(t,e)})).y0(d).y1((function(t,e){return d-h(t,e)})),g=af.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=af.appendOrSelect(t,"clipPath").attr("id",e);af.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=fo.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.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(F.ZoomBar.UPDATE,this.render.bind(this))},e}(Xp),Uv=function(){function t(t,e){this.services={domUtils:af,events:sf,gradientUtils:bd,transitions:_d},this.model=new Rh(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(F.Model.UPDATE,(function(t){var e=!!fo.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(F.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(F.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){var e={id:"title",components:[new sg(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},n={id:"legend",components:[new qp(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},r={id:"graph-frame",components:t,growth:{x:L.STRETCH,y:L.FIXED}},i=!1!==this.model.getOptions().legend.enabled,o=k.COLUMN;if(i){var a=fo.getProperty(this.model.getOptions(),"legend","position");"left"===a?(o=k.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=P.VERTICAL)):"right"===a?(o=k.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=P.VERTICAL)):"bottom"===a&&(o=k.COLUMN_REVERSE)}var s={id:"spacer",components:[new Mg(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},u={id:"full-frame",components:[new Hg(this.model,this.services,x(i?[n]:[],i?[s]:[],[r]),{direction:o})],growth:{x:L.STRETCH,y:L.FIXED}},l=[];if(this.model.getOptions().title){l.push(e);var c={id:"spacer",components:[new Mg(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}};l.push(c)}return l.push(u),[new lg(this.model,this.services),new Hg(this.model,this.services,l,{direction:k.COLUMN})]},t}(),zv=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.setData=function(e){var n;return e&&(n=t.prototype.setData.call(this,e),fo.getProperty(this.getOptions(),"zoomBar")&&this.setZoomBarData()),n},e.prototype.setZoomBarData=function(t){var e=t?this.sanitize(fo.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=fo.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}(Rh),Hv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Hp,curves:Wp,zoom:Yp}),r.model=new zv(r.services),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e=fo.getProperty(this.model.getOptions(),"zoomBar",E.TOP,"enabled"),n=fo.getProperty(this.model.getOptions(),"toolbar","enabled");this.services.cartesianScales.findDomainAndRangeAxes();var r=this.services.cartesianScales.getMainXAxisPosition(),i=fo.getProperty(this.model.getOptions(),"axes",r,"scaleType"),o=e&&r===E.BOTTOM&&i===A.TIME,a=this.services.zoom.isZoomBarLocked(E.TOP),s=!!this.model.getOptions().title,u={id:"title",components:[new sg(this.model,this.services)],growth:{x:L.STRETCH,y:L.FIXED}},l={id:"toolbar",components:[new Vv(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},c={id:"header",components:[new Hg(this.model,this.services,x([u],n?[l]:[]),{direction:k.ROW})],growth:{x:L.PREFERRED,y:L.FIXED}},h={id:"legend",components:[new qp(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}};o&&!a&&t.push(new kv(this.model,this.services),new Pv(this.model,this.services));var f={id:"graph-frame",components:t,growth:{x:L.STRETCH,y:L.FIXED}},d=!1!==this.model.getOptions().legend.enabled,p=k.COLUMN;if(d){var g=fo.getProperty(this.model.getOptions(),"legend","position");g===C.LEFT?(p=k.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=P.VERTICAL)):g===C.RIGHT?(p=k.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=P.VERTICAL)):g===C.BOTTOM&&(p=k.COLUMN_REVERSE)}var v={id:"spacer",components:[new Mg(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},m={id:"full-frame",components:[new Hg(this.model,this.services,x(d?[h]:[],d?[v]:[],[f]),{direction:p})],growth:{x:L.STRETCH,y:L.FIXED}},y={id:"zoom-bar",components:[new Gv(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},_=[];if(s||n){_.push(c);var b={id:"spacer",components:[new Mg(this.model,this.services,n?{size:15}:void 0)],growth:{x:L.PREFERRED,y:L.FIXED}};_.push(b)}return o&&_.push(y),_.push(m),[new cg(this.model,this.services),new Hg(this.model,this.services,_,{direction:k.COLUMN})]},e}(Uv),Fv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fo.mergeDefaultChartOptions(fo.clone(fa.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new nv(this.model,this.services),new Lv(this.model,this.services),new Iv(this.model,this.services),new _g(this.model,this.services),new hg(this.model,this.services),new mg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}(Hv),jv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fo.mergeDefaultChartOptions(fa.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new nv(this.model,this.services),new Lv(this.model,this.services),new Iv(this.model,this.services),new fg(this.model,this.services),new _g(this.model,this.services,{stacked:!0}),new bg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}(Hv),Wv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fo.mergeDefaultChartOptions(fa.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new nv(this.model,this.services),new Lv(this.model,this.services),new pg(this.model,this.services),new Bv(this.model,this.services),new Sg(this.model,this.services,{skeleton:I.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Hv),Yv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fo.mergeDefaultChartOptions(fa.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new nv(this.model,this.services),new Lv(this.model,this.services),new gg(this.model,this.services),new Bv(this.model,this.services),new Sg(this.model,this.services,{skeleton:I.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Hv),Xv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fo.mergeDefaultChartOptions(fa.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new nv(this.model,this.services),new Lv(this.model,this.services),new Nv(this.model,this.services),new vg(this.model,this.services),new Sg(this.model,this.services,{skeleton:I.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Hv),qv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fo.mergeDefaultChartOptions(fa.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new nv(this.model,this.services),new Lv(this.model,this.services),new Iv(this.model,this.services),new yg(this.model,this.services),new Sg(this.model,this.services,{skeleton:I.GRID})];return this.getAxisChartComponents(t)},e}(Hv),Zv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fo.mergeDefaultChartOptions(fa.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new nv(this.model,this.services),new Lv(this.model,this.services),new Iv(this.model,this.services),new _g(this.model,this.services),new mg(this.model,this.services,{handleThresholds:!0}),new Tg(this.model,this.services)];return this.getAxisChartComponents(t)},e}(Hv),Kv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(fo.mergeDefaultChartOptions(fa.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new nv(this.model,this.services),new Lv(this.model,this.services),new Iv(this.model,this.services),new mg(this.model,this.services),new Sg(this.model,this.services,{skeleton:I.GRID})];return this.getAxisChartComponents(t)},e}(Hv),$v=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}(Rh),Qv=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new $v(i.services),r?i:(i.model.setOptions(fo.mergeDefaultChartOptions(fa.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new wg(this.model,this.services),new Sg(this.model,this.services,{skeleton:I.PIE})];return this.getChartComponents(t)},e}(Uv),Jv=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(fo.mergeDefaultChartOptions(fa.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Eg(this.model,this.services),new Sg(this.model,this.services,{skeleton:I.DONUT})];return this.getChartComponents(t)},e}(Qv),tm=function(t){function e(e){return t.call(this,e)||this}return n(e,t),e.prototype.generateDataLabels=function(t){var e={};return e[t.label]=Vo.items.status.ACTIVE,e},e.prototype.getDisplayData=function(){return this.get("data")?this.get("data")[0]:null},e.prototype.getFillColor=function(e){var n=this.getOptions(),r=fo.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=this.getDisplayData().value,n=e>100?100:e,r=fo.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}(Rh),em=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="meter",e}return n(e,t),e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this,i=this.getContainerSVG(),o=this.model.getOptions(),a=this.model.getDisplayData(),s=this.model.getStatus(),u=af.getSVGElementSize(this.parent,{useAttrs:!0}).width,l=o.data.groupMapsTo,c=lu().domain([0,100]).range([0,u]);af.appendOrSelect(i,"rect.container").attr("x",0).attr("y",0).attr("width",u).attr("height",fo.getProperty(o,"meter","height"));var h=a.value>=100,f=i.selectAll("rect.value").data([a]),d=null==s||n.model.isUserProvidedColorScaleValid()?"":"value status--"+s;f.enter().append("rect").classed("value",!0).merge(f).attr("x",0).attr("y",0).attr("height",fo.getProperty(o,"meter","height")).attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL],dataGroupName:t[l],originalClassName:d})})).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(h?100:t.value)})).attr("fill",(function(t){return n.model.getFillColor(t[l])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var p=fo.getProperty(o,"meter","peak"),g=null!==p&&p<a.value?a.value:p,v=null===g||h?[]:[g],m=i.selectAll("line.peak").data(v);m.enter().append("line").classed("peak",!0).merge(m).attr("y1",0).attr("y2",fo.getProperty(o,"meter","height")).transition(this.services.transitions.getTransition("peak-line-update",t)).attr("x1",(function(t){return c(t)})).attr("x2",(function(t){return c(t)})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","peak").attr("aria-label",(function(t){return t})),m.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(Xp),nm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new tm(r.services),r.model.setOptions(fo.merge(fo.clone(fa.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new em(this.model,this.services)],growth:{x:L.STRETCH,y:L.FIXED}},e={id:"title",components:[new ug(this.model,this.services)],growth:{x:L.PREFERRED,y:L.FIXED}},n={id:"spacer",components:[new Mg(this.model,this.services,{size:8})],growth:{x:L.PREFERRED,y:L.FIXED}},r=[new Hg(this.model,this.services,[e,n,t],{direction:k.COLUMN})];return this.getChartComponents(r)},e}(Uv);function rm(t){var e,n=(om(t)%(e=360)+e)%e;return im(n,[0,10])||im(n,[350,0])?{textAnchor:N.START,dominantBaseline:V.MIDDLE}:im(n,[10,80])?{textAnchor:N.START,dominantBaseline:V.HANGING}:im(n,[80,100])?{textAnchor:N.MIDDLE,dominantBaseline:V.HANGING}:im(n,[100,170])?{textAnchor:N.END,dominantBaseline:V.HANGING}:im(n,[170,190])?{textAnchor:N.END,dominantBaseline:V.MIDDLE}:im(n,[190,260])?{textAnchor:N.END,dominantBaseline:V.BASELINE}:im(n,[260,280])?{textAnchor:N.MIDDLE,dominantBaseline:V.BASELINE}:{textAnchor:N.START,dominantBaseline:V.BASELINE}}function im(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function om(t){return t*(180/Math.PI)}function am(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 sm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=af.appendOrSelect(e.getContainerSVG(),"g.tmp-tick"),r=af.appendOrSelect(n,"text").text(t),i=af.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.model.getOptions(),r=fo.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=fo.getProperty(n,"data","groupMapsTo"),s=fo.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 fo.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=fo.getProperty(n,"radar","axes"),i=r.angle,o=r.value,a=fo.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:fo.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?zo.opacity.unselected:zo.opacity.selected})).style("stroke-opacity",(function(t){return t.name!==n.datum().name?zo.opacity.unselected:1}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",zo.opacity.selected).style("stroke-opacity",1)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=af.getSVGElementSize(this.parent,{useAttrs:!0}),o=i.width,a=i.height,s=this.model.getData(),u=this.model.getDisplayData(),l=this.model.getGroupedData(),c=this.model.getOptions(),h=fo.getProperty(c,"radar","axes"),f=h.angle,d=h.value,p=fo.getProperty(c,"data","groupMapsTo"),g=zo.xLabelPadding,v=zo.yLabelPadding,m=zo.yTicksNumber,y=zo.minRange,_=zo.xAxisRectHeight;this.uniqueKeys=Array.from(new Set(s.map((function(t){return t[f]})))),this.uniqueGroups=Array.from(new Set(s.map((function(t){return t[p]})))),this.displayDataNormalized=this.normalizeFlatData(u),this.groupedDataNormalized=this.normalizeGroupedData(l);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),x=(Math.min(o,a)-b)/2;if(!(x<=0)){var w=Na().domain(this.displayDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),E=lu().domain([0,Ca(this.displayDataNormalized.map((function(t){return t[d]})))]).range([y,x]).nice(m),S=E.ticks(m),T=function(t){return e.model.getFillColor(t)},M=zc().angle((function(t){return w(t[f])+Math.PI/2})).radius((function(t){return E(t[d])})).curve(ph),A=zc().angle(M.angle()).radius((function(t){return Rv?Rv(t[d]):y})).curve(M.curve()),C={x:Ca(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=w(t),x*Math.sin(n-Math.PI/2))})))+g,y:a/2},D=af.appendOrSelect(n,"g.y-axes").attr("role",r.GROUP).selectAll("path").data(S,(function(t){return t})),P=function(t){return e.uniqueKeys.map((function(e){var n;return(n={})[f]=e,n[d]=t,n}))};D.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill","none").attr("d",(function(t){return A(P(t))})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_y_axes_enter",t)).attr("opacity",1).attr("d",(function(t){return M(P(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("+C.x+", "+C.y+")").attr("d",(function(t){return M(P(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 M(P(t))})).attr("opacity",0).remove()}))})),af.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-"+fo.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return am(w(t),0,C).x})).attr("y1",(function(t){return am(w(t),0,C).y})).attr("x2",(function(t){return am(w(t),0,C).x})).attr("y2",(function(t){return am(w(t),0,C).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return am(w(t),E.range()[0],C).x})).attr("y1",(function(t){return am(w(t),E.range()[0],C).y})).attr("x2",(function(t){return am(w(t),E.range()[1],C).x})).attr("y2",(function(t){return am(w(t),E.range()[1],C).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 am(w(t),E.range()[0],C).x})).attr("y1",(function(t){return am(w(t),E.range()[0],C).y})).attr("x2",(function(t){return am(w(t),E.range()[1],C).x})).attr("y2",(function(t){return am(w(t),E.range()[1],C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),af.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 am(w(t),E.range()[1]+g,C).x})).attr("y",(function(t){return am(w(t),E.range()[1]+g,C).y})).style("text-anchor",(function(t){return rm(w(t)).textAnchor})).style("dominant-baseline",(function(t){return rm(w(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 am(w(t),E.range()[1]+g,C).x})).attr("y",(function(t){return am(w(t),E.range()[1]+g,C).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),af.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:[O.FILL,O.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+C.x+", "+C.y+")").attr("fill",(function(t){return T(t.name)})).style("fill-opacity",zo.opacity.selected).attr("stroke",(function(t){return T(t.name)})).attr("d",(function(t){return A(t.data)})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_enter",t)).attr("opacity",1).attr("d",(function(t){return M(t.data)}))}))}),(function(n){n.attr("class",(function(t){return e.model.getColorClassName({classNameTypes:[O.FILL,O.STROKE],dataGroupName:t.name,originalClassName:"blob"})})).attr("fill",(function(t){return T(t.name)})).attr("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("+C.x+", "+C.y+")").attr("d",(function(t){return M(t.data)}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_exit",t)).attr("d",(function(t){return M(t.data)})).attr("opacity",0).remove()}))})),af.appendOrSelect(n,"g.dots").attr("role",r.GROUP).selectAll("circle").data(this.displayDataNormalized).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:[O.FILL],dataGroupName:t[p],originalClassName:fo.kebabCase(t[f])})})).attr("cx",(function(t){return am(w(t[f]),E(t[d]),C).x})).attr("cy",(function(t){return am(w(t[f]),E(t[d]),C).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return T(t[p])})),af.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",C.x).attr("y",C.y-_/2).attr("width",E.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+om(w(t))+", "+C.x+", "+C.y+")"})),af.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(xa(S)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return am(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return am(-Math.PI/2,E(t),C).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 am(-Math.PI/2,E(t),C).x+v})).attr("y",(function(t){return am(-Math.PI/2,E(t),C).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 k=fo.getProperty(c,"radar","alignment"),L=af.getAlignmentOffset(k,n,this.getParent());n.attr("transform","translate("+L+", 0)"),this.addEventListeners(),Rv=E}},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(F.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(F.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=fo.getProperty(this.model.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n){var r=mo(this);t.services.events.dispatchEvent(F.Radar.X_AXIS_MOUSEOVER,{element:r,datum:n});var i=t.parent.select(".x-axes .x-axis-"+fo.kebabCase(n)),o=t.parent.selectAll(".dots circle."+fo.kebabCase(n));i.classed("hovered",!0).attr("stroke-dasharray","4 4"),o.classed("hovered",!0).attr("opacity",1).attr("r",zo.dotsRadius);var a=t.displayDataNormalized.filter((function(t){return t[e]===n})),s=t.model.getOptions(),u=s.data.groupMapsTo,l=fo.getProperty(s,"radar","axes","value");t.services.events.dispatchEvent(F.Tooltip.SHOW,{hoveredElement:r,items:a.filter((function(t){return"number"==typeof t[l]})).map((function(e){return{label:e[u],value:e[l],color:t.model.getFillColor(e[u]),class:t.model.getColorClassName({classNameTypes:[O.TOOLTIP],dataGroupName:e[u]})}}))})})).on("mousemove",(function(e){var n=mo(this);t.services.events.dispatchEvent(F.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(F.Radar.X_AXIS_CLICK,{element:mo(this),datum:e})})).on("mouseout",(function(e){var n=mo(this),r=t.parent.select(".x-axes .x-axis-"+fo.kebabCase(e)),i=t.parent.selectAll(".dots circle."+fo.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(F.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(F.Tooltip.HIDE)}))},e}(Xp),um=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(fo.mergeDefaultChartOptions(fa.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new sm(this.model,this.services)];return this.getChartComponents(t)},e}(Uv),lm=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}(Rh),cm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new lm(r.services),r.model.setOptions(fo.mergeDefaultChartOptions(fa.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Og(this.model,this.services)];return this.getChartComponents(t)},e}(Uv);t.AreaChart=Fv,t.BubbleChart=qv,t.DonutChart=Jv,t.GaugeChart=cm,t.GroupedBarChart=Yv,t.LineChart=Zv,t.MeterChart=nm,t.PieChart=Qv,t.RadarChart=um,t.ScatterChart=Kv,t.SimpleBarChart=Wv,t.StackedAreaChart=jv,t.StackedBarChart=Xv,t.configurations=da,t.interfaces=j,Object.defineProperty(t,"__esModule",{value:!0})}));