@carbon/charts 0.37.1 → 0.38.0

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,a,o,s,u,c,l,h,f,d,p,g,v,m,y=function(){return(y=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 _(){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 a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];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"}(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"}(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"}(o||(o={})),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"}(s||(s={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(u||(u={})),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"}(c||(c={})),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"}(l||(l={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(h||(h={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(f||(f={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(d||(d={})),function(t){t.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"}(p||(p={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(g||(g={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(v||(v={})),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"}(m||(m={}));var b,x,w,E,S,O,T,M,A,C,P,D,k,R,L,I,N,V,U,G=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return a},get ZoomBar(){return o},get Axis(){return s},get Area(){return u},get Pie(){return c},get Gauge(){return l},get Bar(){return h},get Scatter(){return f},get Line(){return d},get Radar(){return p},get Tooltip(){return g},get Threshold(){return v},get Legend(){return m}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(b||(b={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(x||(x={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(w||(w={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(E||(E={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(S||(S={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(O||(O={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(T||(T={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(M||(M={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(A||(A={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(C||(C={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(P||(P={})),function(t){t.LEFT="left",t.RIGHT="right"}(D||(D={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(k||(k={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(R||(R={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(L||(L={})),function(t){t.SEMI="semi",t.FULL="full"}(I||(I={})),function(t){t.UP="up",t.DOWN="down"}(N||(N={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(V||(V={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(U||(U={}));var B=Object.freeze({__proto__:null,get Roles(){return r},Events:G,get ChartTheme(){return b},get AxisPositions(){return x},get ZoomBarTypes(){return w},get TruncationTypes(){return E},get CartesianOrientations(){return S},get ScaleTypes(){return O},get LegendPositions(){return T},get Alignments(){return M},get LegendOrientations(){return A},get LayoutDirection(){return C},get LayoutGrowth(){return P},get CalloutDirections(){return D},get Skeletons(){return k},get TextAnchor(){return R},get DominantBaseline(){return L},get GaugeTypes(){return I},get ArrowDirections(){return N},get Statuses(){return V},get TickRotations(){return U}}),H="object"==typeof global&&global&&global.Object===Object&&global,j="object"==typeof self&&self&&self.Object===Object&&self,z=H||j||Function("return this")(),F=z.Symbol,W=Object.prototype,Y=W.hasOwnProperty,q=W.toString,X=F?F.toStringTag:void 0;var Z=Object.prototype.toString;var K=F?F.toStringTag:void 0;function $(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":K&&K in Object(t)?function(t){var e=Y.call(t,X),n=t[X];try{t[X]=void 0;var r=!0}catch(t){}var i=q.call(t);return r&&(e?t[X]=n:delete t[X]),i}(t):function(t){return Z.call(t)}(t)}function Q(t){return null!=t&&"object"==typeof t}function J(t){return"symbol"==typeof t||Q(t)&&"[object Symbol]"==$(t)}function tt(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 et=Array.isArray,nt=F?F.prototype:void 0,rt=nt?nt.toString:void 0;function it(t){if("string"==typeof t)return t;if(et(t))return tt(t,it)+"";if(J(t))return rt?rt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function at(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ot=/^\s+|\s+$/g,st=/^[-+]0x[0-9a-f]+$/i,ut=/^0b[01]+$/i,ct=/^0o[0-7]+$/i,lt=parseInt;function ht(t){if("number"==typeof t)return t;if(J(t))return NaN;if(at(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=at(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ot,"");var n=ut.test(t);return n||ct.test(t)?lt(t.slice(2),n?2:8):st.test(t)?NaN:+t}function ft(t){return t}function dt(t){if(!at(t))return!1;var e=$(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var pt,gt=z["__core-js_shared__"],vt=(pt=/[^.]+$/.exec(gt&&gt.keys&&gt.keys.IE_PROTO||""))?"Symbol(src)_1."+pt:"";var mt=Function.prototype.toString;function yt(t){if(null!=t){try{return mt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var _t=/^\[object .+?Constructor\]$/,bt=Function.prototype,xt=Object.prototype,wt=bt.toString,Et=xt.hasOwnProperty,St=RegExp("^"+wt.call(Et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ot(t){return!(!at(t)||(e=t,vt&&vt in e))&&(dt(t)?St:_t).test(yt(t));var e}function Tt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Ot(n)?n:void 0}var Mt=Tt(z,"WeakMap"),At=Object.create,Ct=function(){function t(){}return function(e){if(!at(e))return{};if(At)return At(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Pt(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 Dt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var kt=Date.now;var Rt=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Lt=function(t){var e=0,n=0;return function(){var r=kt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Rt?function(t,e){return Rt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:ft);function It(t){return t!=t}function Nt(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,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}(t,It,n)}(t,e,0)>-1}var Vt=/^(?:0|[1-9]\d*)$/;function Ut(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Vt.test(t))&&t>-1&&t%1==0&&t<e}function Gt(t,e,n){"__proto__"==e&&Rt?Rt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Bt(t,e){return t===e||t!=t&&e!=e}var Ht=Object.prototype.hasOwnProperty;function jt(t,e,n){var r=t[e];Ht.call(t,e)&&Bt(r,n)&&(void 0!==n||e in t)||Gt(t,e,n)}function zt(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var s=e[a],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?Gt(n,s,u):jt(n,s,u)}return n}var Ft=Math.max;function Wt(t,e){return Lt(function(t,e,n){return e=Ft(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=Ft(r.length-e,0),o=Array(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),Pt(t,this,s)}}(t,e,ft),t+"")}function Yt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function qt(t){return null!=t&&Yt(t.length)&&!dt(t)}function Xt(t,e,n){if(!at(n))return!1;var r=typeof e;return!!("number"==r?qt(n)&&Ut(e,n.length):"string"==r&&e in n)&&Bt(n[e],t)}var Zt=Object.prototype;function Kt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Zt)}function $t(t){return Q(t)&&"[object Arguments]"==$(t)}var Qt=Object.prototype,Jt=Qt.hasOwnProperty,te=Qt.propertyIsEnumerable,ee=$t(function(){return arguments}())?$t:function(t){return Q(t)&&Jt.call(t,"callee")&&!te.call(t,"callee")};var ne="object"==typeof t&&t&&!t.nodeType&&t,re=ne&&"object"==typeof module&&module&&!module.nodeType&&module,ie=re&&re.exports===ne?z.Buffer:void 0,ae=(ie?ie.isBuffer:void 0)||function(){return!1},oe={};function se(t){return function(e){return t(e)}}oe["[object Float32Array]"]=oe["[object Float64Array]"]=oe["[object Int8Array]"]=oe["[object Int16Array]"]=oe["[object Int32Array]"]=oe["[object Uint8Array]"]=oe["[object Uint8ClampedArray]"]=oe["[object Uint16Array]"]=oe["[object Uint32Array]"]=!0,oe["[object Arguments]"]=oe["[object Array]"]=oe["[object ArrayBuffer]"]=oe["[object Boolean]"]=oe["[object DataView]"]=oe["[object Date]"]=oe["[object Error]"]=oe["[object Function]"]=oe["[object Map]"]=oe["[object Number]"]=oe["[object Object]"]=oe["[object RegExp]"]=oe["[object Set]"]=oe["[object String]"]=oe["[object WeakMap]"]=!1;var ue="object"==typeof t&&t&&!t.nodeType&&t,ce=ue&&"object"==typeof module&&module&&!module.nodeType&&module,le=ce&&ce.exports===ue&&H.process,he=function(){try{var t=ce&&ce.require&&ce.require("util").types;return t||le&&le.binding&&le.binding("util")}catch(t){}}(),fe=he&&he.isTypedArray,de=fe?se(fe):function(t){return Q(t)&&Yt(t.length)&&!!oe[$(t)]},pe=Object.prototype.hasOwnProperty;function ge(t,e){var n=et(t),r=!n&&ee(t),i=!n&&!r&&ae(t),a=!n&&!r&&!i&&de(t),o=n||r||i||a,s=o?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var c in t)!e&&!pe.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ut(c,u))||s.push(c);return s}function ve(t,e){return function(n){return t(e(n))}}var me=ve(Object.keys,Object),ye=Object.prototype.hasOwnProperty;function _e(t){return qt(t)?ge(t):function(t){if(!Kt(t))return me(t);var e=[];for(var n in Object(t))ye.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var be=Object.prototype.hasOwnProperty;function xe(t){if(!at(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Kt(t),n=[];for(var r in t)("constructor"!=r||!e&&be.call(t,r))&&n.push(r);return n}function we(t){return qt(t)?ge(t,!0):xe(t)}var Ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Se=/^\w*$/;function Oe(t,e){if(et(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!J(t))||(Se.test(t)||!Ee.test(t)||null!=e&&t in Object(e))}var Te=Tt(Object,"create");var Me=Object.prototype.hasOwnProperty;var Ae=Object.prototype.hasOwnProperty;function Ce(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Pe(t,e){for(var n=t.length;n--;)if(Bt(t[n][0],e))return n;return-1}Ce.prototype.clear=function(){this.__data__=Te?Te(null):{},this.size=0},Ce.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ce.prototype.get=function(t){var e=this.__data__;if(Te){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Me.call(e,t)?e[t]:void 0},Ce.prototype.has=function(t){var e=this.__data__;return Te?void 0!==e[t]:Ae.call(e,t)},Ce.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Te&&void 0===e?"__lodash_hash_undefined__":e,this};var De=Array.prototype.splice;function ke(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])}}ke.prototype.clear=function(){this.__data__=[],this.size=0},ke.prototype.delete=function(t){var e=this.__data__,n=Pe(e,t);return!(n<0)&&(n==e.length-1?e.pop():De.call(e,n,1),--this.size,!0)},ke.prototype.get=function(t){var e=this.__data__,n=Pe(e,t);return n<0?void 0:e[n][1]},ke.prototype.has=function(t){return Pe(this.__data__,t)>-1},ke.prototype.set=function(t,e){var n=this.__data__,r=Pe(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Re=Tt(z,"Map");function Le(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 Ie(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])}}Ie.prototype.clear=function(){this.size=0,this.__data__={hash:new Ce,map:new(Re||ke),string:new Ce}},Ie.prototype.delete=function(t){var e=Le(this,t).delete(t);return this.size-=e?1:0,e},Ie.prototype.get=function(t){return Le(this,t).get(t)},Ie.prototype.has=function(t){return Le(this,t).has(t)},Ie.prototype.set=function(t,e){var n=Le(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Ne(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],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Ne.Cache||Ie),n}Ne.Cache=Ie;var Ve=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ue=/\\(\\)?/g,Ge=function(t){var e=Ne(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(Ve,(function(t,n,r,i){e.push(r?i.replace(Ue,"$1"):n||t)})),e}));function Be(t){return null==t?"":it(t)}function He(t,e){return et(t)?t:Oe(t,e)?[t]:Ge(Be(t))}function je(t){if("string"==typeof t||J(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ze(t,e){for(var n=0,r=(e=He(e,t)).length;null!=t&&n<r;)t=t[je(e[n++])];return n&&n==r?t:void 0}function Fe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var We=F?F.isConcatSpreadable:void 0;function Ye(t){return et(t)||ee(t)||!!(We&&t&&t[We])}var qe=ve(Object.getPrototypeOf,Object),Xe=Function.prototype,Ze=Object.prototype,Ke=Xe.toString,$e=Ze.hasOwnProperty,Qe=Ke.call(Object);var Je=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"}),tn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,en=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var nn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var rn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var an="\\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",on="["+an+"]",sn="\\d+",un="[\\u2700-\\u27bf]",cn="[a-z\\xdf-\\xf6\\xf8-\\xff]",ln="[^\\ud800-\\udfff"+an+sn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",hn="(?:\\ud83c[\\udde6-\\uddff]){2}",fn="[\\ud800-\\udbff][\\udc00-\\udfff]",dn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",pn="(?:"+cn+"|"+ln+")",gn="(?:"+dn+"|"+ln+")",vn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",mn="[\\ufe0e\\ufe0f]?"+vn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",hn,fn].join("|")+")[\\ufe0e\\ufe0f]?"+vn+")*"),yn="(?:"+[un,hn,fn].join("|")+")"+mn,_n=RegExp([dn+"?"+cn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[on,dn,"$"].join("|")+")",gn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[on,dn+pn,"$"].join("|")+")",dn+"?"+pn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",dn+"+(?:['’](?: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_])",sn,yn].join("|"),"g");function bn(t,e,n){return t=Be(t),void 0===(e=n?void 0:e)?function(t){return rn.test(t)}(t)?function(t){return t.match(_n)||[]}(t):function(t){return t.match(nn)||[]}(t):t.match(e)||[]}var xn=RegExp("['’]","g");function wn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=ht(n))==n?n:0),void 0!==e&&(e=(e=ht(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}(ht(t),e,n)}function En(t){var e=this.__data__=new ke(t);this.size=e.size}En.prototype.clear=function(){this.__data__=new ke,this.size=0},En.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},En.prototype.get=function(t){return this.__data__.get(t)},En.prototype.has=function(t){return this.__data__.has(t)},En.prototype.set=function(t,e){var n=this.__data__;if(n instanceof ke){var r=n.__data__;if(!Re||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(t,e),this.size=n.size,this};var Sn="object"==typeof t&&t&&!t.nodeType&&t,On=Sn&&"object"==typeof module&&module&&!module.nodeType&&module,Tn=On&&On.exports===Sn?z.Buffer:void 0,Mn=Tn?Tn.allocUnsafe:void 0;function An(t,e){if(e)return t.slice();var n=t.length,r=Mn?Mn(n):new t.constructor(n);return t.copy(r),r}function Cn(){return[]}var Pn=Object.prototype.propertyIsEnumerable,Dn=Object.getOwnPropertySymbols,kn=Dn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}(Dn(t),(function(e){return Pn.call(t,e)})))}:Cn;var Rn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Fe(e,kn(t)),t=qe(t);return e}:Cn;function Ln(t,e,n){var r=e(t);return et(t)?r:Fe(r,n(t))}function In(t){return Ln(t,_e,kn)}function Nn(t){return Ln(t,we,Rn)}var Vn=Tt(z,"DataView"),Un=Tt(z,"Promise"),Gn=Tt(z,"Set"),Bn=yt(Vn),Hn=yt(Re),jn=yt(Un),zn=yt(Gn),Fn=yt(Mt),Wn=$;(Vn&&"[object DataView]"!=Wn(new Vn(new ArrayBuffer(1)))||Re&&"[object Map]"!=Wn(new Re)||Un&&"[object Promise]"!=Wn(Un.resolve())||Gn&&"[object Set]"!=Wn(new Gn)||Mt&&"[object WeakMap]"!=Wn(new Mt))&&(Wn=function(t){var e=$(t),n="[object Object]"==e?t.constructor:void 0,r=n?yt(n):"";if(r)switch(r){case Bn:return"[object DataView]";case Hn:return"[object Map]";case jn:return"[object Promise]";case zn:return"[object Set]";case Fn:return"[object WeakMap]"}return e});var Yn=Wn,qn=Object.prototype.hasOwnProperty;var Xn=z.Uint8Array;function Zn(t){var e=new t.constructor(t.byteLength);return new Xn(e).set(new Xn(t)),e}var Kn=/\w*$/;var $n=F?F.prototype:void 0,Qn=$n?$n.valueOf:void 0;function Jn(t,e){var n=e?Zn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function tr(t,e,n){var r,i,a,o=t.constructor;switch(e){case"[object ArrayBuffer]":return Zn(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return function(t,e){var n=e?Zn(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 Jn(t,n);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(a=new(i=t).constructor(i.source,Kn.exec(i))).lastIndex=i.lastIndex,a;case"[object Set]":return new o;case"[object Symbol]":return r=t,Qn?Object(Qn.call(r)):{}}}function er(t){return"function"!=typeof t.constructor||Kt(t)?{}:Ct(qe(t))}var nr=he&&he.isMap,rr=nr?se(nr):function(t){return Q(t)&&"[object Map]"==Yn(t)};var ir=he&&he.isSet,ar=ir?se(ir):function(t){return Q(t)&&"[object Set]"==Yn(t)},or={};function sr(t,e,n,r,i,a){var o,s=1&e,u=2&e,c=4&e;if(n&&(o=i?n(t,r,i,a):n(t)),void 0!==o)return o;if(!at(t))return t;var l=et(t);if(l){if(o=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 Dt(t,o)}else{var h=Yn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(ae(t))return An(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(o=u||f?{}:er(t),!s)return u?function(t,e){return zt(t,Rn(t),e)}(t,function(t,e){return t&&zt(e,we(e),t)}(o,t)):function(t,e){return zt(t,kn(t),e)}(t,function(t,e){return t&&zt(e,_e(e),t)}(o,t))}else{if(!or[h])return i?t:{};o=tr(t,h,s)}}a||(a=new En);var d=a.get(t);if(d)return d;a.set(t,o),ar(t)?t.forEach((function(r){o.add(sr(r,e,n,r,t,a))})):rr(t)&&t.forEach((function(r,i){o.set(i,sr(r,e,n,i,t,a))}));var p=c?u?Nn:In:u?keysIn:_e,g=l?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),jt(o,i,sr(r,e,n,i,t,a))})),o}or["[object Arguments]"]=or["[object Array]"]=or["[object ArrayBuffer]"]=or["[object DataView]"]=or["[object Boolean]"]=or["[object Date]"]=or["[object Float32Array]"]=or["[object Float64Array]"]=or["[object Int8Array]"]=or["[object Int16Array]"]=or["[object Int32Array]"]=or["[object Map]"]=or["[object Number]"]=or["[object Object]"]=or["[object RegExp]"]=or["[object Set]"]=or["[object String]"]=or["[object Symbol]"]=or["[object Uint8Array]"]=or["[object Uint8ClampedArray]"]=or["[object Uint16Array]"]=or["[object Uint32Array]"]=!0,or["[object Error]"]=or["[object Function]"]=or["[object WeakMap]"]=!1;function ur(t){return sr(t,5)}function cr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Ie;++e<n;)this.add(t[e])}function lr(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 hr(t,e){return t.has(e)}cr.prototype.add=cr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},cr.prototype.has=function(t){return this.__data__.has(t)};function fr(t,e,n,r,i,a){var o=1&n,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var l=-1,h=!0,f=2&n?new cr:void 0;for(a.set(t,e),a.set(e,t);++l<s;){var d=t[l],p=e[l];if(r)var g=o?r(p,d,l,e,t,a):r(d,p,l,t,e,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!lr(e,(function(t,e){if(!hr(f,e)&&(d===t||i(d,t,n,r,a)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function dr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function pr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var gr=F?F.prototype:void 0,vr=gr?gr.valueOf:void 0;var mr=Object.prototype.hasOwnProperty;var yr=Object.prototype.hasOwnProperty;function _r(t,e,n,r,i,a){var o=et(t),s=et(e),u=o?"[object Array]":Yn(t),c=s?"[object Array]":Yn(e),l="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f=u==c;if(f&&ae(t)){if(!ae(e))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new En),o||de(t)?fr(t,e,n,r,i,a):function(t,e,n,r,i,a,o){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||!a(new Xn(t),new Xn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Bt(+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=dr;case"[object Set]":var u=1&r;if(s||(s=pr),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var l=fr(s(t),s(e),r,i,a,o);return o.delete(t),l;case"[object Symbol]":if(vr)return vr.call(t)==vr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(1&n)){var d=l&&yr.call(t,"__wrapped__"),p=h&&yr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return a||(a=new En),i(g,v,n,r,a)}}return!!f&&(a||(a=new En),function(t,e,n,r,i,a){var o=1&n,s=In(t),u=s.length;if(u!=In(e).length&&!o)return!1;for(var c=u;c--;){var l=s[c];if(!(o?l in e:mr.call(e,l)))return!1}var h=a.get(t);if(h&&a.get(e))return h==e;var f=!0;a.set(t,e),a.set(e,t);for(var d=o;++c<u;){var p=t[l=s[c]],g=e[l];if(r)var v=o?r(g,p,l,e,t,a):r(p,g,l,t,e,a);if(!(void 0===v?p===g||i(p,g,n,r,a):v)){f=!1;break}d||(d="constructor"==l)}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 a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}function br(t,e,n,r,i){return t===e||(null==t||null==e||!Q(t)&&!Q(e)?t!=t&&e!=e:_r(t,e,n,r,br,i))}function xr(t){return t==t&&!at(t)}function wr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Er(t){var e=function(t){for(var e=_e(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,xr(i)]}return e}(t);return 1==e.length&&e[0][2]?wr(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var u=(s=n[i])[0],c=t[u],l=s[1];if(o&&s[2]){if(void 0===c&&!(u in t))return!1}else{var h=new En;if(r)var f=r(c,l,u,t,e,h);if(!(void 0===f?br(l,c,3,r,h):f))return!1}}return!0}(n,t,e)}}function Sr(t,e){return null!=t&&e in Object(t)}function Or(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=He(e,t)).length,a=!1;++r<i;){var o=je(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&Yt(i)&&Ut(o,i)&&(et(t)||ee(t))}(t,e,Sr)}function Tr(t,e){return Oe(t)&&xr(e)?wr(je(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:ze(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Or(n,t):br(e,r,3)}}function Mr(t){return Oe(t)?(e=je(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return ze(e,t)}}(t);var e}function Ar(t){return"function"==typeof t?t:null==t?ft:"object"==typeof t?et(t)?Tr(t[0],t[1]):Er(t):Mr(t)}var Cr,Pr=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[Cr?o:++r];if(!1===e(i[s],s,i))break}return t};var Dr=function(t,e){return function(n,r){if(null==n)return n;if(!qt(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}((function(t,e){return t&&Pr(t,e,_e)})),kr=function(){return z.Date.now()},Rr=Math.max,Lr=Math.min;function Ir(t,e,n){var r,i,a,o,s,u,c=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,a=i;return r=i=void 0,c=e,o=t.apply(a,n)}function p(t){return c=t,s=setTimeout(v,e),l?d(t):o}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=a}function v(){var t=kr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Lr(n,a-(t-c)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,o)}function y(){var t=kr(),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)),o}return e=ht(e)||0,at(n)&&(l=!!n.leading,a=(h="maxWait"in n)?Rr(ht(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?o:m(kr())},y}function Nr(t,e,n){(void 0===n||Bt(t[e],n))&&(void 0!==n||e in t)||Gt(t,e,n)}function Vr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Ur(t,e,n,r,i,a,o){var s=Vr(t,n),u=Vr(e,n),c=o.get(u);if(c)Nr(t,n,c);else{var l,h=a?a(s,u,n+"",t,e,o):void 0,f=void 0===h;if(f){var d=et(u),p=!d&&ae(u),g=!d&&!p&&de(u);h=u,d||p||g?et(s)?h=s:Q(l=s)&&qt(l)?h=Dt(s):p?(f=!1,h=An(u,!0)):g?(f=!1,h=Jn(u,!0)):h=[]:function(t){if(!Q(t)||"[object Object]"!=$(t))return!1;var e=qe(t);if(null===e)return!0;var n=$e.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ke.call(n)==Qe}(u)||ee(u)?(h=s,ee(s)?h=function(t){return zt(t,we(t))}(s):at(s)&&!dt(s)||(h=er(u))):f=!1}f&&(o.set(u,h),i(h,u,r,a,o),o.delete(u)),Nr(t,n,h)}}function Gr(t,e,n,r,i){t!==e&&Pr(e,(function(a,o){if(i||(i=new En),at(a))Ur(t,e,o,n,Gr,r,i);else{var s=r?r(Vr(t,o),a,o+"",t,e,i):void 0;void 0===s&&(s=a),Nr(t,o,s)}}),we)}function Br(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 Hr(t,e){var n=-1,r=qt(t)?Array(t.length):[];return Dr(t,(function(t,i,a){r[++n]=e(t,i,a)})),r}function jr(t,e){return function t(e,n,r,i,a){var o=-1,s=e.length;for(r||(r=Ye),a||(a=[]);++o<s;){var u=e[o];n>0&&r(u)?n>1?t(u,n-1,r,i,a):Fe(a,u):i||(a[a.length]=u)}return a}(function(t,e){return(et(t)?tt:Hr)(t,Ar(e))}(t,e),1/0)}function zr(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 Fr(t,e){return br(t,e)}var Wr,Yr,qr=(Wr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}(bn(function(t){return(t=Be(t))&&t.replace(tn,Je).replace(en,"")}(t).replace(xn,"")),Wr,"")}),Xr=(Yr=function(t,e,n){Gr(t,e,n)},Wt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,a=r>2?e[2]:void 0;for(i=Yr.length>3&&"function"==typeof i?(r--,i):void 0,a&&Xt(e[0],e[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var o=e[n];o&&Yr(t,o,n,i)}return t})));function Zr(t,e){var n;return Dr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Kr(t,e,n){var r=et(t)?lr:Zr;return n&&Xt(t,e,n)&&(e=void 0),r(t,Ar(e))}var $r=Gn&&1/pr(new Gn([,-0]))[1]==1/0?function(t){return new Gn(t)}:function(){};function Qr(t){return t&&t.length?function(t,e,n){var r=-1,i=Nt,a=t.length,o=!0,s=[],u=s;if(n)o=!1,i=Br;else if(a>=200){var c=e?null:$r(t);if(c)return pr(c);o=!1,i=hr,u=new cr}else u=e?[]:s;t:for(;++r<a;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,o&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}(t):[]}var Jr="http://www.w3.org/1999/xhtml",ti={svg:"http://www.w3.org/2000/svg",xhtml:Jr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ei(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ti.hasOwnProperty(e)?{space:ti[e],local:t}:t}function ni(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Jr&&e.documentElement.namespaceURI===Jr?e.createElement(t):e.createElementNS(n,t)}}function ri(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ii(t){var e=ei(t);return(e.local?ri:ni)(e)}function ai(){}function oi(t){return null==t?ai:function(){return this.querySelector(t)}}function si(){return[]}function ui(t){return null==t?si:function(){return this.querySelectorAll(t)}}function ci(t){return function(){return this.matches(t)}}function li(t){return new Array(t.length)}function hi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}hi.prototype={constructor:hi,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 fi(t,e,n,r,i,a){for(var o,s=0,u=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new hi(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function di(t,e,n,r,i,a,o){var s,u,c,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=c="$"+o.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<f;++s)(u=l[c="$"+o.call(t,a[s],s,a)])?(r[s]=u,u.__data__=a[s],l[c]=null):n[s]=new hi(t,a[s]);for(s=0;s<h;++s)(u=e[s])&&l[d[s]]===u&&(i[s]=u)}function pi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function gi(t){return function(){this.removeAttribute(t)}}function vi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function mi(t,e){return function(){this.setAttribute(t,e)}}function yi(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function _i(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function bi(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 xi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function wi(t){return function(){this.style.removeProperty(t)}}function Ei(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Si(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Oi(t,e){return t.style.getPropertyValue(e)||xi(t).getComputedStyle(t,null).getPropertyValue(e)}function Ti(t){return function(){delete this[t]}}function Mi(t,e){return function(){this[t]=e}}function Ai(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ci(t){return t.trim().split(/^|\s+/)}function Pi(t){return t.classList||new Di(t)}function Di(t){this._node=t,this._names=Ci(t.getAttribute("class")||"")}function ki(t,e){for(var n=Pi(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ri(t,e){for(var n=Pi(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Li(t){return function(){ki(this,t)}}function Ii(t){return function(){Ri(this,t)}}function Ni(t,e){return function(){(e.apply(this,arguments)?ki:Ri)(this,t)}}function Vi(){this.textContent=""}function Ui(t){return function(){this.textContent=t}}function Gi(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Bi(){this.innerHTML=""}function Hi(t){return function(){this.innerHTML=t}}function ji(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function zi(){this.nextSibling&&this.parentNode.appendChild(this)}function Fi(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Wi(){return null}function Yi(){var t=this.parentNode;t&&t.removeChild(this)}function qi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xi(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Di.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 Zi={},Ki=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Zi={mouseenter:"mouseover",mouseleave:"mouseout"}));function $i(t,e,n){return t=Qi(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Qi(t,e,n){return function(r){var i=Ki;Ki=r;try{t.call(this,this.__data__,e,n)}finally{Ki=i}}}function Ji(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 ta(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++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 ea(t,e,n){var r=Zi.hasOwnProperty(t.type)?$i:Qi;return function(i,a,o){var s,u=this.__on,c=r(e,a,o);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function na(t,e,n){var r=xi(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 ra(t,e){return function(){return na(this,t,e)}}function ia(t,e){return function(){return na(this,t,e.apply(this,arguments))}}var aa,oa=[null];function sa(t,e){this._groups=t,this._parents=e}function ua(){return new sa([[document.documentElement]],oa)}function ca(t){return"string"==typeof t?new sa([[document.querySelector(t)]],[document.documentElement]):new sa([[t]],oa)}function la(){for(var t,e=Ki;t=e.sourceEvent;)e=t;return e}function ha(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 fa(t){var e=la();return e.changedTouches&&(e=e.changedTouches[0]),ha(t,e)}function da(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pa(t,e){return t(e={exports:{}},e.exports),e.exports}sa.prototype=ua.prototype={constructor:sa,select:function(t){"function"!=typeof t&&(t=oi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,c=r[i]=new Array(u),l=0;l<u;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),c[l]=o);return new sa(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=ui(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,c=0;c<u;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new sa(r,i)},filter: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 a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new sa(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n=e?di:fi,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),c=0;c<a;++c){var l=r[c],h=i[c],f=h.length,d=t.call(l,l&&l.__data__,c,r),p=d.length,g=s[c]=new Array(p),v=o[c]=new Array(p);n(l,h,g,v,u[c]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(o=new sa(o,r))._enter=s,o._exit=u,o},enter:function(){return new sa(this._enter||this._groups.map(li),this._parents)},exit:function(){return new sa(this._exit||this._groups.map(li),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,c=e[s],l=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new sa(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=pi);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,c=i[a]=new Array(u),l=0;l<u;++l)(o=s[l])&&(c[l]=o);c.sort(e)}return new sa(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,a=r.length;i<a;++i){var o=r[i];if(o)return o}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,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=ei(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?vi:gi:"function"==typeof e?n.local?bi:_i:n.local?yi:mi)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?wi:"function"==typeof e?Si:Ei)(t,e,null==n?"":n)):Oi(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ti:"function"==typeof e?Ai:Mi)(t,e)):this.node()[t]},classed:function(t,e){var n=Ci(t+"");if(arguments.length<2){for(var r=Pi(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Ni:e?Li:Ii)(n,e))},text:function(t){return arguments.length?this.each(null==t?Vi:("function"==typeof t?Gi:Ui)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Bi:("function"==typeof t?ji:Hi)(t)):this.node().innerHTML},raise:function(){return this.each(zi)},lower:function(){return this.each(Fi)},append:function(t){var e="function"==typeof t?t:ii(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ii(t),r=null==e?Wi:"function"==typeof e?e:oi(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Yi)},clone:function(t){return this.select(t?Xi:qi)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Ji(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?ea:ta,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?ia:ra)(t,e))}},function(t){t.debounce=Ir,t.clone=ur,t.merge=Xr,t.removeArrayDuplicates=Qr,t.clamp=wn,t.isEqual=Fr,t.flatMapDeep=jr,t.kebabCase=qr,t.fromPairs=zr,t.some=Kr,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,a=arguments;i.mousePosition=fa(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,a)}),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 a=n.axes[i];(a.primary||a.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 o=a.mapsTo;if(null==o){var s=a.scaleType;null==s?a.mapsTo="value":s===O.TIME?a.mapsTo="date":s===O.LABELS&&(a.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===E.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===E.FRONT_LINE?"..."+t.substr(-n):e===E.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,a=e;i<a.length;i++){var o=a[i];if(null===r[o]||void 0===r[o])return null;r=r[o]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===S.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,a=r.x1,o=r.y0,s=r.y1;return"M"+i+","+o+"L"+i+","+s+"L"+a+","+s+"L"+a+","+o+"L"+i+","+o},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===S.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(aa||(aa={}));var ga=pa((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}));da(ga);var va=pa((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}));da(va);var ma=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=va)&&n.__esModule?n:{default:n};var i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.default=i,t.exports=e.default}));da(ma);var ya=pa((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}));da(ya);var _a=pa((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 a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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}));da(_a);var ba=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=_a)&&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}));da(ba);var xa=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=r.match(t.matchPattern);if(!a)return null;var o=a[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(o.length)}}},t.exports=e.default}));da(xa);var wa=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,c=s[0],l=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}},t.exports=e.default}));da(wa);var Ea=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(xa),r=i(wa);function i(t){return t&&t.__esModule?t:{default:t}}var a={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=a,t.exports=e.default}));da(Ea);var Sa,Oa=da(pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(ga),r=s(ma),i=s(ya),a=s(ba),o=s(Ea);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:a.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),Ta={opacity:{unselected:0,selected:.4}},Ma={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},paddingRatio:.1},Aa={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Ca={opacity:{unselected:.3,selected:1}},Pa={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15}},Da={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}},ka={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},Ra={default:{size:24}},La={horizontalOffset:10},Ia={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}},Na={height:(Sa={},Sa[w.GRAPH_VIEW]=32,Sa[w.SLIDER_VIEW]=10,Sa),spacerHeight:8},Va={type:E.END_LINE,threshold:16,numCharacter:14},Ua={x:{enabled:!0,numberOfTicks:15},y:{enabled:!0,numberOfTicks:5}},Ga={showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:Va},Ba={top:{includeZero:!0,truncation:Va},bottom:{includeZero:!0,truncation:Va},left:{includeZero:!0,truncation:Va},right:{includeZero:!0,truncation:Va}},Ha={addSpaceOnEdges:1,showDayName:!1,localeObject:Oa,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"}}},ja={width:null,height:null,resizable:!0,tooltip:Ga,legend:{enabled:!0,position:T.BOTTOM,clickable:!0,truncation:Va,alignment:M.LEFT,order:null},style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null}},za=aa.merge({},ja,{axes:Ba,timeScale:Ha,grid:Ua,zoomBar:{top:{enabled:!1,type:w.GRAPH_VIEW}}}),Fa=aa.merge({},za,{bars:{maxWidth:16},timeScale:aa.merge(Ha,{addSpaceOnEdges:1})}),Wa=aa.merge({},Fa,{}),Ya=aa.merge({},Fa,{}),qa=aa.merge({},Fa,{bars:aa.merge({},Fa.bars,{dividerSize:1.5})}),Xa=aa.merge({},za,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Za=aa.merge({},Xa,{points:{radius:3,filled:!1,enabled:!0}}),Ka=aa.merge({},Za,{timeScale:aa.merge(Ha,{addSpaceOnEdges:0})}),$a=Ka,Qa=aa.merge({},za,{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}}),Ja=aa.merge({},ja,{pie:{labels:{formatter:null},alignment:M.LEFT}}),to=aa.merge({},ja,{legend:{enabled:!1},gauge:{type:I.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()}}}),eo={chart:ja,axisChart:za,simpleBarChart:Wa,groupedBarChart:Ya,stackedBarChart:qa,bubbleChart:Qa,lineChart:Za,areaChart:Ka,stackedAreaChart:$a,scatterChart:Xa,pieChart:Ja,donutChart:aa.merge({},Ja,{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:M.LEFT}}),meterChart:aa.merge({},ja,{legend:{enabled:!1},meter:{height:8,statusBar:{percentageIndicator:{enabled:!0}}}}),radarChart:aa.merge({},ja,{radar:{axes:{angle:"key",value:"value"},alignment:M.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:to},no=Object.freeze({__proto__:null,grid:Ua,baseTooltip:Ga,timeScale:Ha,options:eo,area:Ta,axis:Ma,legend:Aa,lines:Ca,meter:Pa,pie:Da,radar:ka,spacers:Ra,tooltips:La,transitions:Ia,zoomBar:Na}),ro={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},io={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},ao={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},oo={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},so={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},uo={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},co={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},lo=function(t,e){return t[e]},ho=function(t){return lo(oo,t)},fo=function(t){return lo(so,t)},po=function(t){return lo(co,t)},go=function(t){return lo(io,t)},vo=function(t){return lo(ao,t)},mo=function(t){return lo(ro,t)},yo=function(t){return lo(uo,t)},_o=[vo(70),fo(50),yo(70),go(70),mo(50),mo(90),po(60),ho(80),go(50),"#b28600",yo(50),fo(90),"#8a3800",vo(50)],bo=[vo(60),fo(40),yo(60),go(40),mo(50),mo(10),po(30),ho(50),go(60),"#d2a106",yo(40),fo(20),"#ba4e00",vo(30)],xo=_o,wo=bo,Eo=bo,So=_o,Oo=Object.freeze({__proto__:null,WHITE:_o,DARK:bo,G10:xo,G90:wo,G100:Eo,DEFAULT:So});function To(){}function Mo(t,e){var n=new To;if(t instanceof To)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}function Ao(){}To.prototype=Mo.prototype={constructor:To,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 Co=Mo.prototype;function Po(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function Do(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Po(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}Ao.prototype=function(t,e){var n=new Ao;if(t instanceof Ao)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:Ao,has:Co.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Co.remove,clear:Co.clear,values:Co.keys,size:Co.size,empty:Co.empty,each:Co.each};var ko=Do(Po).right;function Ro(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function Lo(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)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var Io=Math.sqrt(50),No=Math.sqrt(10),Vo=Math.sqrt(2);function Uo(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=Go(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function Go(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=Io?10:a>=No?5:a>=Vo?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Io?10:a>=No?5:a>=Vo?2:1)}function Bo(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Io?i*=10:a>=No?i*=5:a>=Vo&&(i*=2),e<t?-i:i}function Ho(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function jo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var zo=Array.prototype,Fo=zo.map,Wo=zo.slice,Yo={name:"implicit"};function qo(){var t=Mo(),e=[],n=[],r=Yo;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Yo)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Mo();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=Wo.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return qo(e,n).unknown(r)},jo.apply(i,arguments),i}function Xo(){var t,e,n=qo().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*u),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*c,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=Lo(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return Xo(r(),a).round(o).paddingInner(s).paddingOuter(u).align(c)},jo.apply(l(),arguments)}function Zo(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Ko(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function $o(){}var Qo="\\s*([+-]?\\d+)\\s*",Jo="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",ts="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",es=/^#([0-9a-f]{3,8})$/,ns=new RegExp("^rgb\\("+[Qo,Qo,Qo]+"\\)$"),rs=new RegExp("^rgb\\("+[ts,ts,ts]+"\\)$"),is=new RegExp("^rgba\\("+[Qo,Qo,Qo,Jo]+"\\)$"),as=new RegExp("^rgba\\("+[ts,ts,ts,Jo]+"\\)$"),os=new RegExp("^hsl\\("+[Jo,ts,ts]+"\\)$"),ss=new RegExp("^hsla\\("+[Jo,ts,ts,Jo]+"\\)$"),us={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 cs(){return this.rgb().formatHex()}function ls(){return this.rgb().formatRgb()}function hs(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=es.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?fs(e):3===n?new vs(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new vs(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new vs(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=ns.exec(t))?new vs(e[1],e[2],e[3],1):(e=rs.exec(t))?new vs(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=is.exec(t))?ds(e[1],e[2],e[3],e[4]):(e=as.exec(t))?ds(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=os.exec(t))?bs(e[1],e[2]/100,e[3]/100,1):(e=ss.exec(t))?bs(e[1],e[2]/100,e[3]/100,e[4]):us.hasOwnProperty(t)?fs(us[t]):"transparent"===t?new vs(NaN,NaN,NaN,0):null}function fs(t){return new vs(t>>16&255,t>>8&255,255&t,1)}function ds(t,e,n,r){return r<=0&&(t=e=n=NaN),new vs(t,e,n,r)}function ps(t){return t instanceof $o||(t=hs(t)),t?new vs((t=t.rgb()).r,t.g,t.b,t.opacity):new vs}function gs(t,e,n,r){return 1===arguments.length?ps(t):new vs(t,e,n,null==r?1:r)}function vs(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ms(){return"#"+_s(this.r)+_s(this.g)+_s(this.b)}function ys(){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 _s(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function bs(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new ws(t,e,n,r)}function xs(t){if(t instanceof ws)return new ws(t.h,t.s,t.l,t.opacity);if(t instanceof $o||(t=hs(t)),!t)return new ws;if(t instanceof ws)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new ws(o,s,u,t.opacity)}function ws(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Es(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 Ss(t){return function(){return t}}function Os(t){return 1==(t=+t)?Ts: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):Ss(isNaN(e)?n:e)}}function Ts(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Ss(isNaN(t)?e:t)}Zo($o,hs,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:cs,formatHex:cs,formatHsl:function(){return xs(this).formatHsl()},formatRgb:ls,toString:ls}),Zo(vs,gs,Ko($o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new vs(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new vs(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:ms,formatHex:ms,formatRgb:ys,toString:ys})),Zo(ws,(function(t,e,n,r){return 1===arguments.length?xs(t):new ws(t,e,n,null==r?1:r)}),Ko($o,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ws(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ws(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 vs(Es(t>=240?t-240:t+120,i,r),Es(t,i,r),Es(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 Ms=function t(e){var n=Os(e);function r(t,e){var r=n((t=gs(t)).r,(e=gs(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Ts(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function As(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function Cs(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Ns(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Ps(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function Ds(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function ks(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]=Ns(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Rs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ls=new RegExp(Rs.source,"g");function Is(t,e){var n,r,i,a=Rs.lastIndex=Ls.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=Rs.exec(t))&&(r=Ls.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:Ds(n,r)})),a=Ls.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=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 Ns(t,e){var n,r=typeof e;return null==e||"boolean"===r?Ss(e):("number"===r?Ds:"string"===r?(n=hs(e))?(e=n,Ms):Is:e instanceof hs?Ms:e instanceof Date?Ps:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?As:Array.isArray(e)?Cs:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ks:Ds)(t,e)}function Vs(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Us,Gs,Bs,Hs,js=180/Math.PI,zs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Fs(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(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,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*js,skewX:Math.atan(u)*js,scaleX:o,scaleY:s}}function Ws(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:Ds(t,i)},{i:u-2,x:Ds(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:Ds(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:Ds(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:Ds(t,n)},{i:s-2,x:Ds(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=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 Ys=Ws((function(t){return"none"===t?zs:(Us||(Us=document.createElement("DIV"),Gs=document.documentElement,Bs=document.defaultView),Us.style.transform=t,t=Bs.getComputedStyle(Gs.appendChild(Us),null).getPropertyValue("transform"),Gs.removeChild(Us),Fs(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),qs=Ws((function(t){return null==t?zs:(Hs||(Hs=document.createElementNS("http://www.w3.org/2000/svg","g")),Hs.setAttribute("transform",t),(t=Hs.transform.baseVal.consolidate())?Fs((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):zs)}),", ",")",")");function Xs(t){return+t}var Zs=[0,1];function Ks(t){return t}function $s(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Qs(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],a=e[0],o=e[1];return i<r?(r=$s(i,r),a=n(o,a)):(r=$s(r,i),a=n(a,o)),function(t){return a(r(t))}}function tu(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=$s(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=ko(t,e,1,r)-1;return a[n](i[n](e))}}function eu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function nu(){var t,e,n,r,i,a,o=Zs,s=Zs,u=Ns,c=Ks;function l(){return r=Math.min(o.length,s.length)>2?tu:Js,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((a||(a=r(s,o.map(t),Ds)))(n)))},h.domain=function(t){return arguments.length?(o=Fo.call(t,Xs),c===Ks||(c=Qs(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=Wo.call(t),l()):s.slice()},h.rangeRound=function(t){return s=Wo.call(t),u=Vs,l()},h.clamp=function(t){return arguments.length?(c=t?Qs(o):Ks,h):c!==Ks},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function ru(t,e){return nu()(t,e)}function iu(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 au(t){return(t=iu(Math.abs(t)))?t[1]:NaN}var ou,su=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function uu(t){if(!(e=su.exec(t)))throw new Error("invalid format: "+t);var e;return new cu({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 cu(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 lu(t,e){var n=iu(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")}uu.prototype=cu.prototype,cu.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 hu={"%":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 lu(100*t,e)},r:lu,s:function(t,e){var n=iu(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(ou=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+iu(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function fu(t){return t}var du,pu,gu,vu=Array.prototype.map,mu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function yu(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?fu:(e=vu.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?fu:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(vu.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=uu(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"):hu[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?a:/[%p]/.test(y)?u:"",x=hu[y],w=/[defgprs%]/.test(y);function E(t){var i,a,u,f=_,E=b;if("c"===y)E=x(t)+E,t="";else{var S=(t=+t)<0;if(t=isNaN(t)?l: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)),S&&0==+t&&(S=!1),f=(S?"("===h?h:c:"-"===h||"("===h?"":h)+f,E=("s"===y?mu[8+ou/3]:"")+E+(S&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){E=(46===u?o+t.slice(i+1):t.slice(i))+E,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var O=f.length+t.length+E.length,T=O<p?new Array(p-O+1).join(e):"";switch(g&&d&&(t=r(T+t,T.length?p-E.length:1/0),T=""),n){case"<":t=f+t+E+T;break;case"=":t=f+T+t+E;break;case"^":t=T.slice(0,O=T.length>>1)+f+t+E+T.slice(O);break;default:t=T+f+t+E}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)),E.toString=function(){return t+""},E}return{format:h,formatPrefix:function(t,e){var n=h(((t=uu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(au(e)/3))),i=Math.pow(10,-r),a=mu[8+r/3];return function(t){return n(i*t)+a}}}}function _u(t,e,n,r){var i,a=Bo(t,e,n);switch((r=uu(null==r?",f":r)).type){case"s":var o=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(au(e)/3)))-au(Math.abs(t)))}(a,o))||(r.precision=i),gu(r,o);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,au(e)-au(t))+1}(a,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,-au(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return pu(r)}function bu(t){var e=t.domain;return t.ticks=function(t){var n=e();return Uo(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return _u(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],u=i[o];return u<s&&(r=s,s=u,u=r,r=a,a=o,o=r),(r=Go(s,u,n))>0?r=Go(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Go(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function xu(){var t=ru(Ks,Ks);return t.copy=function(){return eu(t,xu())},jo.apply(t,arguments),bu(t)}function wu(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Eu(t){return Math.log(t)}function Su(t){return Math.exp(t)}function Ou(t){return-Math.log(-t)}function Tu(t){return-Math.exp(-t)}function Mu(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Au(t){return function(e){return-t(-e)}}function Cu(t){var e,n,r=t(Eu,Su),i=r.domain,a=10;function o(){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})}(a),n=function(t){return 10===t?Mu:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Au(e),n=Au(n),t(Ou,Tu)):t(Eu,Su),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],u=o[o.length-1];(r=u<s)&&(f=s,s=u,u=f);var c,l,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,c=n(f);l<a;++l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(l=a-1,c=n(f);l>=1;--l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else g=Uo(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=pu(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(wu(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}du=yu({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),pu=du.format,gu=du.formatPrefix;var Pu=new Date,Du=new Date;function ku(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,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return ku((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 Pu.setTime(+e),Du.setTime(+r),t(Pu),t(Du),Math.floor(n(Pu,Du))},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 Ru=ku((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Ru.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?ku((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Ru:null};var Lu=ku((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()})),Iu=ku((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()})),Nu=ku((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()})),Vu=ku((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 Uu(t){return ku((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 Gu=Uu(0),Bu=Uu(1),Hu=(Uu(2),Uu(3),Uu(4)),ju=(Uu(5),Uu(6),ku((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()}))),zu=ku((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()}));zu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ku((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 Fu=ku((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 Wu(t){return ku((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 Yu=Wu(0),qu=Wu(1),Xu=(Wu(2),Wu(3),Wu(4)),Zu=(Wu(5),Wu(6),ku((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 Ku(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 $u(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 Qu(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Zu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?ku((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,tc,ec={"-":"",_:" ",0:"0"},nc=/^\s*\d+/,rc=/^%/,ic=/[\\^$*+?|[\]().{}]/g;function ac(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function oc(t){return t.replace(ic,"\\$&")}function sc(t){return new RegExp("^(?:"+t.map(oc).join("|")+")","i")}function uc(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function cc(t,e,n){var r=nc.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function lc(t,e,n){var r=nc.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function hc(t,e,n){var r=nc.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function fc(t,e,n){var r=nc.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function dc(t,e,n){var r=nc.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function pc(t,e,n){var r=nc.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function gc(t,e,n){var r=nc.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function vc(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 mc(t,e,n){var r=nc.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function yc(t,e,n){var r=nc.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function _c(t,e,n){var r=nc.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function bc(t,e,n){var r=nc.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function xc(t,e,n){var r=nc.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function wc(t,e,n){var r=nc.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Ec(t,e,n){var r=nc.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Sc(t,e,n){var r=nc.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Oc(t,e,n){var r=nc.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Tc(t,e,n){var r=rc.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Mc(t,e,n){var r=nc.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Ac(t,e,n){var r=nc.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Cc(t,e){return ac(t.getDate(),e,2)}function Pc(t,e){return ac(t.getHours(),e,2)}function Dc(t,e){return ac(t.getHours()%12||12,e,2)}function kc(t,e){return ac(1+Vu.count(zu(t),t),e,3)}function Rc(t,e){return ac(t.getMilliseconds(),e,3)}function Lc(t,e){return Rc(t,e)+"000"}function Ic(t,e){return ac(t.getMonth()+1,e,2)}function Nc(t,e){return ac(t.getMinutes(),e,2)}function Vc(t,e){return ac(t.getSeconds(),e,2)}function Uc(t){var e=t.getDay();return 0===e?7:e}function Gc(t,e){return ac(Gu.count(zu(t)-1,t),e,2)}function Bc(t,e){var n=t.getDay();return t=n>=4||0===n?Hu(t):Hu.ceil(t),ac(Hu.count(zu(t),t)+(4===zu(t).getDay()),e,2)}function Hc(t){return t.getDay()}function jc(t,e){return ac(Bu.count(zu(t)-1,t),e,2)}function zc(t,e){return ac(t.getFullYear()%100,e,2)}function Fc(t,e){return ac(t.getFullYear()%1e4,e,4)}function Wc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+ac(e/60|0,"0",2)+ac(e%60,"0",2)}function Yc(t,e){return ac(t.getUTCDate(),e,2)}function qc(t,e){return ac(t.getUTCHours(),e,2)}function Xc(t,e){return ac(t.getUTCHours()%12||12,e,2)}function Zc(t,e){return ac(1+Fu.count(Zu(t),t),e,3)}function Kc(t,e){return ac(t.getUTCMilliseconds(),e,3)}function $c(t,e){return Kc(t,e)+"000"}function Qc(t,e){return ac(t.getUTCMonth()+1,e,2)}function Jc(t,e){return ac(t.getUTCMinutes(),e,2)}function tl(t,e){return ac(t.getUTCSeconds(),e,2)}function el(t){var e=t.getUTCDay();return 0===e?7:e}function nl(t,e){return ac(Yu.count(Zu(t)-1,t),e,2)}function rl(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Xu(t):Xu.ceil(t),ac(Xu.count(Zu(t),t)+(4===Zu(t).getUTCDay()),e,2)}function il(t){return t.getUTCDay()}function al(t,e){return ac(qu.count(Zu(t)-1,t),e,2)}function ol(t,e){return ac(t.getUTCFullYear()%100,e,2)}function sl(t,e){return ac(t.getUTCFullYear()%1e4,e,4)}function ul(){return"+0000"}function cl(){return"%"}function ll(t){return+t}function hl(t){return Math.floor(+t/1e3)}!function(t){Ju=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,c=sc(i),l=uc(i),h=sc(a),f=uc(a),d=sc(o),p=uc(o),g=sc(s),v=uc(s),m=sc(u),y=uc(u),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Cc,e:Cc,f:Lc,H:Pc,I:Dc,j:kc,L:Rc,m:Ic,M:Nc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:ll,s:hl,S:Vc,u:Uc,U:Gc,V:Bc,w:Hc,W:jc,x:null,X:null,y:zc,Y:Fc,Z:Wc,"%":cl},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Yc,e:Yc,f:$c,H:qc,I:Xc,j:Zc,L:Kc,m:Qc,M:Jc,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:ll,s:hl,S:tl,u:el,U:nl,V:rl,w:il,W:al,x:null,X:null,y:ol,Y:sl,Z:ul,"%":cl},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 S(t,e,n,r)},d:_c,e:_c,f:Oc,H:xc,I:xc,j:bc,L:Sc,m:yc,M:wc,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:mc,Q:Mc,s:Ac,S:Ec,u:lc,U:hc,V:fc,w:cc,W:dc,x:function(t,e,r){return S(t,n,e,r)},X:function(t,e,n){return S(t,r,e,n)},y:gc,Y:pc,Z:vc,"%":Tc};function w(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(i=ec[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=s+1);return o.push(t.slice(u,s)),o.join("")}}function E(t,e){return function(n){var r,i,a=Qu(1900,void 0,1);if(S(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=$u(Qu(a.y,0,1))).getUTCDay(),r=i>4||0===i?qu.ceil(r):qu(r),r=Fu.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Ku(Qu(a.y,0,1))).getDay(),r=i>4||0===i?Bu.ceil(r):Bu(r),r=Vu.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?$u(Qu(a.y,0,1)).getUTCDay():Ku(Qu(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,$u(a)):Ku(a)}}function S(t,e,n,r){for(var i,a,o=0,s=e.length,u=n.length;o<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in ec?e.charAt(o++):i])||(r=a(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=E(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=E(t+="",!0);return e.toString=function(){return t},e}})}(t),tc=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 fl(t){return new Date(t)}function dl(t){return t instanceof Date?+t:+new Date(+t)}function pl(t,e,n,r,i,a,o,s,u){var c=ru(Ks,Ks),l=c.invert,h=c.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,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(o(s)<s?f:a(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 a=Math.abs(r-n)/e,o=Do((function(t){return t[2]})).right(b,a);o===b.length?(i=Bo(n/31536e6,r/31536e6,e),e=t):o?(i=(o=b[a/b[o-1][2]<b[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(Bo(n,r,e),1),e=s)}return null==i?e:e.every(i)}return c.invert=function(t){return new Date(l(t))},c.domain=function(t){return arguments.length?h(Fo.call(t,dl)):h().map(fl)},c.ticks=function(t,e){var n,r=h(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=w(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},c.tickFormat=function(t,e){return null==e?x:u(e)},c.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(wu(n,t)):c},c.copy=function(){return eu(c,pl(t,e,n,r,i,a,o,s,u))},c}function gl(){return jo.apply(pl(zu,ju,Gu,Vu,Nu,Iu,Lu,Ru,tc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var vl=Math.PI,ml=2*vl,yl=ml-1e-6;function _l(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function bl(){return new _l}function xl(t){return function(){return t}}_l.prototype=bl.prototype={constructor:_l,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,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,u=r-e,c=a-t,l=o-e,h=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var f=n-a,d=r-o,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((vl-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*c)+","+(e+_*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+o,c=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%ml+ml),h>yl?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=vl)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var wl=Math.abs,El=Math.atan2,Sl=Math.cos,Ol=Math.max,Tl=Math.min,Ml=Math.sin,Al=Math.sqrt,Cl=Math.PI,Pl=Cl/2,Dl=2*Cl;function kl(t){return t>1?0:t<-1?Cl:Math.acos(t)}function Rl(t){return t>=1?Pl:t<=-1?-Pl:Math.asin(t)}function Ll(t){return t.innerRadius}function Il(t){return t.outerRadius}function Nl(t){return t.startAngle}function Vl(t){return t.endAngle}function Ul(t){return t&&t.padAngle}function Gl(t,e,n,r,i,a,o,s){var u=n-t,c=r-e,l=o-i,h=s-a,f=h*u-l*c;if(!(f*f<1e-12))return[t+(f=(l*(e-a)-h*(t-i))/f)*u,e+f*c]}function Bl(t,e,n,r,i,a,o){var s=t-n,u=e-r,c=(o?a:-a)/Al(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-a,w=f*g-p*d,E=(_<0?-1:1)*Al(Ol(0,x*x*b-w*w)),S=(w*_-y*E)/b,O=(-w*y-_*E)/b,T=(w*_+y*E)/b,M=(-w*y+_*E)/b,A=S-v,C=O-m,P=T-v,D=M-m;return A*A+C*C>P*P+D*D&&(S=T,O=M),{cx:S,cy:O,x01:-l,y01:-h,x11:S*(i/x-1),y11:O*(i/x-1)}}function Hl(){var t=Ll,e=Il,n=xl(0),r=null,i=Nl,a=Vl,o=Ul,s=null;function u(){var u,c,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Pl,d=a.apply(this,arguments)-Pl,p=wl(d-f),g=d>f;if(s||(s=u=bl()),h<l&&(c=h,h=l,l=c),h>1e-12)if(p>Dl-1e-12)s.moveTo(h*Sl(f),h*Ml(f)),s.arc(0,0,h,f,d,!g),l>1e-12&&(s.moveTo(l*Sl(d),l*Ml(d)),s.arc(0,0,l,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,E=p,S=o.apply(this,arguments)/2,O=S>1e-12&&(r?+r.apply(this,arguments):Al(l*l+h*h)),T=Tl(wl(h-l)/2,+n.apply(this,arguments)),M=T,A=T;if(O>1e-12){var C=Rl(O/l*Ml(S)),P=Rl(O/h*Ml(S));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(E-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(E=0,y=_=(f+d)/2)}var D=h*Sl(y),k=h*Ml(y),R=l*Sl(x),L=l*Ml(x);if(T>1e-12){var I,N=h*Sl(_),V=h*Ml(_),U=l*Sl(b),G=l*Ml(b);if(p<Cl&&(I=Gl(D,k,U,G,N,V,R,L))){var B=D-I[0],H=k-I[1],j=N-I[0],z=V-I[1],F=1/Ml(kl((B*j+H*z)/(Al(B*B+H*H)*Al(j*j+z*z)))/2),W=Al(I[0]*I[0]+I[1]*I[1]);M=Tl(T,(l-W)/(F-1)),A=Tl(T,(h-W)/(F+1))}}E>1e-12?A>1e-12?(v=Bl(U,G,D,k,h,A,g),m=Bl(N,V,R,L,h,A,g),s.moveTo(v.cx+v.x01,v.cy+v.y01),A<T?s.arc(v.cx,v.cy,A,El(v.y01,v.x01),El(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,El(v.y01,v.x01),El(v.y11,v.x11),!g),s.arc(0,0,h,El(v.cy+v.y11,v.cx+v.x11),El(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,El(m.y11,m.x11),El(m.y01,m.x01),!g))):(s.moveTo(D,k),s.arc(0,0,h,y,_,!g)):s.moveTo(D,k),l>1e-12&&w>1e-12?M>1e-12?(v=Bl(R,L,N,V,l,-M,g),m=Bl(D,k,U,G,l,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,El(v.y01,v.x01),El(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,El(v.y01,v.x01),El(v.y11,v.x11),!g),s.arc(0,0,l,El(v.cy+v.y11,v.cx+v.x11),El(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,El(m.y11,m.x11),El(m.y01,m.x01),!g))):s.arc(0,0,l,x,b,g):s.lineTo(R,L)}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)+ +a.apply(this,arguments))/2-Cl/2;return[Sl(r)*n,Ml(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:xl(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:xl(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:xl(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:xl(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:xl(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:xl(+t),u):a},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:xl(+t),u):o},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function jl(t){this._context=t}function zl(t){return new jl(t)}function Fl(t){return t[0]}function Wl(t){return t[1]}function Yl(){var t=Fl,e=Wl,n=xl(!0),r=null,i=zl,a=null;function o(o){var s,u,c,l=o.length,h=!1;for(null==r&&(a=i(c=bl())),s=0;s<=l;++s)!(s<l&&n(u=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(u,s,o),+e(u,s,o));if(c)return a=null,c+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:xl(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:xl(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:xl(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function ql(){var t=Fl,e=null,n=xl(0),r=Wl,i=xl(!0),a=null,o=zl,s=null;function u(u){var c,l,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==a&&(s=o(d=bl())),c=0;c<=p;++c){if(!(c<p&&i(f=u[c],c,u))===g)if(g=!g)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=c-1;h>=l;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[c]=+t(f,c,u),m[c]=+n(f,c,u),s.point(e?+e(f,c,u):v[c],r?+r(f,c,u):m[c]))}if(d)return s=null,d+""||null}function c(){return Yl().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:xl(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:xl(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:xl(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:xl(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:xl(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:xl(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:xl(!!t),u):i},u.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),u):o},u.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),u):a},u}function Xl(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Zl(t){return t}jl.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 Kl=Ql(zl);function $l(t){this._curve=t}function Ql(t){function e(e){return new $l(t(e))}return e._curve=t,e}function Jl(){return t=Yl().curve(Kl),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(Ql(t)):e()._curve},t;var t,e}$l.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 th=Array.prototype.slice;function eh(){}function nh(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 rh(t){this._context=t}function ih(t){return new rh(t)}function ah(t){this._context=t}function oh(t){return new ah(t)}function sh(t){this._context=t}function uh(t){return new sh(t)}function ch(t,e){this._basis=new rh(t),this._beta=e}rh.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:nh(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:nh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ah.prototype={areaStart:eh,areaEnd:eh,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:nh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},sh.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:nh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},ch.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],a=e[0],o=t[n]-i,s=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var lh=function t(e){function n(t){return 1===e?new rh(t):new ch(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function hh(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 fh(t,e){this._context=t,this._k=(1-e)/6}fh.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:hh(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:hh(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 dh=function t(e){function n(t){return new fh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function ph(t,e){this._context=t,this._k=(1-e)/6}ph.prototype={areaStart:eh,areaEnd:eh,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:hh(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 gh=function t(e){function n(t){return new ph(t,e)}return n.tension=function(e){return t(+e)},n}(0);function vh(t,e){this._context=t,this._k=(1-e)/6}vh.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:hh(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 mh=function t(e){function n(t){return new vh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function yh(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function _h(t,e){this._context=t,this._alpha=e}_h.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:yh(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 bh=function t(e){function n(t){return e?new _h(t,e):new fh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function xh(t,e){this._context=t,this._alpha=e}xh.prototype={areaStart:eh,areaEnd:eh,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:yh(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 wh=function t(e){function n(t){return e?new xh(t,e):new ph(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Eh(t,e){this._context=t,this._alpha=e}Eh.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:yh(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 Sh=function t(e){function n(t){return e?new Eh(t,e):new vh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Oh(t){this._context=t}function Th(t){return new Oh(t)}function Mh(t){return t<0?-1:1}function Ah(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Mh(a)+Mh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ch(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Ph(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function Dh(t){this._context=t}function kh(t){this._context=new Rh(t)}function Rh(t){this._context=t}function Lh(t){return new Dh(t)}function Ih(t){return new kh(t)}function Nh(t){this._context=t}function Vh(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Uh(t){return new Nh(t)}function Gh(t,e){this._context=t,this._t=e}function Bh(t){return new Gh(t,.5)}function Hh(t){return new Gh(t,0)}function jh(t){return new Gh(t,1)}function zh(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Fh(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Wh(t,e){return t[e]}Oh.prototype={areaStart:eh,areaEnd:eh,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))}},Dh.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:Ph(this,this._t0,Ch(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,Ph(this,Ch(this,n=Ah(this,t,e)),n);break;default:Ph(this,this._t0,n=Ah(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(kh.prototype=Object.create(Dh.prototype)).point=function(t,e){Dh.prototype.point.call(this,e,t)},Rh.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,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Nh.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=Vh(t),i=Vh(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(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)}},Gh.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 Yh=function(){function t(t){this.state={options:{}},this.colorScale={},this.services=t}return t.prototype.getAllDataFromDomain=function(){if(!this.get("data"))return null;var t=this.getDataGroups(),e=aa.clone(this.get("data")),n=this.getOptions().data.groupMapsTo,r=this.getOptions().axes;return r&&Object.keys(r).forEach((function(t){if(r[t].mapsTo&&r[t].domain){var n=r[t].mapsTo;if(r[t].scaleType===O.LABELS)e=e.filter((function(e){return r[t].domain.includes(e[n])}));else{var i=r[t].domain,a=i[0],o=i[1];e=e.filter((function(t){return t[n]>=a&&t[n]<=o}))}}})),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=Aa.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(aa.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return aa.getProperty(this.getOptions(),"data","loading")?[]:this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=Aa.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(),a=Mo(n,(function(t){return t[r]})).keys(),o=this.services.cartesianScales.domainAxisPosition,s=t.axes[o].scaleType;s===O.TIME?a.sort((function(t,e){return new Date(t)-new Date(e)})):s!==O.LOG&&s!==O.LINEAR||a.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return a.map((function(t){var a={sharedStackKey:t};return u.forEach((function(o){var s=n.find((function(n){return n[e]===o&&n[r].toString()===t}));a[o]=s?s[i]:null})),a}))},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 a=aa.fromPairs(i.map((function(t){return[t.sharedStackKey,0]})));i.forEach((function(t){r.forEach((function(e){a[t.sharedStackKey]+=t[e]}))})),i.forEach((function(t){r.forEach((function(e){t[e]=t[e]/a[t.sharedStackKey]*100}))}))}return function(){var t=xl([]),e=Fh,n=zh,r=Wh;function i(i){var a,o,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(a=0;a<c;++a){for(var h,f=s[a],d=l[a]=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(a=0,o=e(l);a<c;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:xl(th.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:xl(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Fh:"function"==typeof t?t:xl(th.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?zh: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 a=t[i];return a[n]=r[e],a}))}))},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:aa.merge(this.getOptions(),t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(G.Model.UPDATE,{animate:t}))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Aa.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),a=i.some((function(t){return t.status===r})),o=i.filter((function(t){return t.status===n}));if(a)if(1===o.length&&o[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,a){i[a].status=e.name===t?n:r}));var u=i.filter((function(t){return t.status===n})),c=this.getOptions(),l=i.some((function(t){return t.status===r}));c.data.selectedGroups=l?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(G.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=this.getFillScale()(t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale(t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.getStatus=function(){return null},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 a,o=aa.getProperty(t,"label");if(null===o){var s=aa.getProperty(r,i);a=s||"Ungrouped"}else a=o;var u={group:a,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return this.getTabularData(t)},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=Aa.items.status,r=n.ACTIVE,i=n.DISABLED,a=this.getOptions(),o=Mo(t,(function(t){return t[e]})).keys();a.data.selectedGroups.length&&(a.data.selectedGroups.every((function(t){return o.includes(t)}))||(a.data.selectedGroups=[]));var s=function(t){return!a.data.selectedGroups.length||a.data.selectedGroups.includes(t)?r:i};return o.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setColorScale=function(){var t=So,e=this.getOptions(),n=aa.getProperty(e,"color","scale");if(null!==n&&0!==Object.keys(n).length){var r=[],i=0;this.allDataGroups.forEach((function(e){n[e]?r.push(n[e]):r.push(t[i]),i===t.length-1?i=0:i++})),this.colorScale=qo().range(r).domain(this.allDataGroups)}else this.colorScale=qo().range(t).domain(this.allDataGroups)},t}(),qh=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}(),Xh={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 "},Zh=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}()}(),Kh="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,$h="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Qh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind($h):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},Jh=["top","right","bottom","left","width","height","size","weight"],tf="undefined"!=typeof MutationObserver,ef=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 a(){n&&(n=!1,t()),r&&s()}function o(){Qh(a)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(o,e);i=t}return s}(this.refresh.bind(this),20)};ef.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},ef.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},ef.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},ef.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},ef.prototype.connect_=function(){Kh&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),tf?(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)},ef.prototype.disconnect_=function(){Kh&&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)},ef.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),Jh.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},ef.getInstance=function(){return this.instance_||(this.instance_=new ef),this.instance_},ef.instance_=null;var nf=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},rf=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||$h},af=hf(0,0,0,0);function of(t){return parseFloat(t)||0}function sf(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+of(t["border-"+n+"-width"])}),0)}function uf(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return af;var r=rf(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],a=t["padding-"+i];e[i]=of(a)}return e}(r),a=i.left+i.right,o=i.top+i.bottom,s=of(r.width),u=of(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==e&&(s-=sf(r,"left","right")+a),Math.round(u+o)!==n&&(u-=sf(r,"top","bottom")+o)),!function(t){return t===rf(t).document.documentElement}(t)){var c=Math.round(s+a)-e,l=Math.round(u+o)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return hf(i.left,i.top,s,u)}var cf="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof rf(t).SVGGraphicsElement}:function(t){return t instanceof rf(t).SVGElement&&"function"==typeof t.getBBox};function lf(t){return Kh?cf(t)?function(t){var e=t.getBBox();return hf(0,0,e.width,e.height)}(t):uf(t):af}function hf(t,e,n,r){return{x:t,y:e,width:n,height:r}}var ff=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=hf(0,0,0,0),this.target=t};ff.prototype.isActive=function(){var t=lf(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},ff.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var df=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(a.prototype);return nf(o,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),o}(e);nf(this,{target:t,contentRect:n})},pf=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Zh,"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};pf.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 rf(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new ff(t)),this.controller_.addObserver(this),this.controller_.refresh())}},pf.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 rf(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))}},pf.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},pf.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},pf.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new df(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},pf.prototype.clearActive=function(){this.activeObservations_.splice(0)},pf.prototype.hasActive=function(){return this.activeObservations_.length>0};var gf="undefined"!=typeof WeakMap?new WeakMap:new Zh,vf=function(t){if(!(this instanceof vf))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=ef.getInstance(),n=new pf(t,e,this);gf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){vf.prototype[t]=function(){return(e=gf.get(this))[t].apply(e,arguments);var e}}));var mf=void 0!==$h.ResizeObserver?$h.ResizeObserver:vf,yf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=ca(t));var n,r,i,a,o={width:0,height:0},s=function(t){t&&Object.keys(o).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>o[e]&&-1===(""+n).indexOf("%")&&(o[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{a={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var c={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),o.width>0&&o.height>0))return o;if(e.useClientDimensions&&(s(c),o.width>0&&o.height>0))return c;if(e.useBBox&&(s(r),o.width>0&&o.height>0))return r;if(e.useBoundingRect&&(s(a),o.width>0&&o.height>0))return a}try{s({width:aa.getProperty(t.node(),"width","baseVal","value"),height:aa.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(c),s(r),s(u)}return o},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}),a=e.getSVGElementSize(r,{useAttr:!0}).width,o=0;return t===M.CENTER?o=Math.floor((a-i.width)/2):t===M.RIGHT&&(o=a-i.width),o},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();ca(this.getHolder()).classed(Xh.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=aa.getProperty(t,"style","prefix"),n=ca(this.getHolder()).append("svg").classed(Xh.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=n.node()},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(ca(this.svg),{useBBox:!0}).height,n=ca(this.svg).attr("class"),r=ca(this.svg).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(ca(t),{useBBox:!0}).height)})),i<=t?ca(this.svg).attr("height",i):ca(this.svg).attr("height","100%")}},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&ca(e).on("mouseover",(function(){t.services.events.dispatchEvent(G.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(G.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=aa.debounce((function(i,a){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(G.Chart.RESIZE))}),12.5);new mf(i).observe(e)}},e}(qh),_f=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}(qh),bf={value:function(){}};function xf(){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 wf(r)}function wf(t){this._=t}function Ef(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 Sf(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Of(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=bf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}wf.prototype=xf.prototype={constructor:wf,on:function(t,e){var n,r=this._,i=Ef(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Of(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Of(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Sf(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new wf(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].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,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Tf,Mf,Af=0,Cf=0,Pf=0,Df=0,kf=0,Rf=0,Lf="object"==typeof performance&&performance.now?performance:Date,If="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Nf(){return kf||(If(Vf),kf=Lf.now()+Rf)}function Vf(){kf=0}function Uf(){this._call=this._time=this._next=null}function Gf(t,e,n){var r=new Uf;return r.restart(t,e,n),r}function Bf(){kf=(Df=Lf.now())+Rf,Af=Cf=0;try{!function(){Nf(),++Af;for(var t,e=Tf;e;)(t=kf-e._time)>=0&&e._call.call(null,t),e=e._next;--Af}()}finally{Af=0,function(){var t,e,n=Tf,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:Tf=e);Mf=t,jf(r)}(),kf=0}}function Hf(){var t=Lf.now(),e=t-Df;e>1e3&&(Rf-=e,Df=t)}function jf(t){Af||(Cf&&(Cf=clearTimeout(Cf)),t-kf>24?(t<1/0&&(Cf=setTimeout(Bf,t-Lf.now()-Rf)),Pf&&(Pf=clearInterval(Pf))):(Pf||(Df=Lf.now(),Pf=setInterval(Hf,1e3)),Af=1,If(Bf)))}function zf(t,e,n){var r=new Uf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Uf.prototype=Gf.prototype={constructor:Uf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Nf():+n)+(null==e?0:+e),this._next||Mf===this||(Mf?Mf._next=this:Tf=this,Mf=this),this._call=t,this._time=n,jf()},stop:function(){this._call&&(this._call=null,this._time=1/0,jf())}};var Ff=xf("start","end","cancel","interrupt"),Wf=[];function Yf(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(u){var c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return zf(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(zf((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,l=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].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=Gf((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Ff,tween:Wf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function qf(t,e){var n=Zf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Xf(t,e){var n=Zf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Zf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function Kf(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[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 a[i]):o=!1;o&&delete t.__transition}}function $f(t,e){var n,r;return function(){var i=Xf(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Qf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Xf(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}a.tween=i}}function Jf(t,e,n){var r=t._id;return t.each((function(){var t=Xf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Zf(t,r).value[e]}}function td(t,e){var n;return("number"==typeof e?Ds:e instanceof hs?Ms:(n=hs(e))?(e=n,Ms):Is)(t,e)}function ed(t){return function(){this.removeAttribute(t)}}function nd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function rd(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function id(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function ad(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttribute(t)}}function od(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function sd(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function ud(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function cd(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ud(t,i)),n}return i._value=e,i}function ld(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&sd(t,i)),n}return i._value=e,i}function hd(t,e){return function(){qf(this,t).delay=+e.apply(this,arguments)}}function fd(t,e){return e=+e,function(){qf(this,t).delay=e}}function dd(t,e){return function(){Xf(this,t).duration=+e.apply(this,arguments)}}function pd(t,e){return e=+e,function(){Xf(this,t).duration=e}}function gd(t,e){if("function"!=typeof e)throw new Error;return function(){Xf(this,t).ease=e}}function vd(t,e,n){var r,i,a=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)?qf:Xf;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var md=ua.prototype.constructor;function yd(t){return function(){this.style.removeProperty(t)}}function _d(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function bd(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&_d(t,a,n)),r}return a._value=e,a}function xd(t){return function(e){this.textContent=t.call(this,e)}}function wd(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&xd(r)),e}return r._value=t,r}var Ed=0;function Sd(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Od(t){return ua().transition(t)}function Td(){return++Ed}var Md=ua.prototype;function Ad(t){return+t}Sd.prototype=Od.prototype={constructor:Sd,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=oi(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,c=r[o],l=c.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,Yf(h[f],e,n,f,h,Zf(s,n)));return new Sd(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ui(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,h=0;h<l;++h)if(u=c[h]){for(var f,d=t.call(u,u.__data__,h,c),p=Zf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&Yf(f,e,n,g,d,p);a.push(d),o.push(u)}return new Sd(a,o,e,n)},filter: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 a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Sd(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,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,c=e[s],l=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new Sd(o,this._parents,this._name,this._id)},selection:function(){return new md(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Td(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)if(o=s[c]){var l=Zf(o,e);Yf(o,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Sd(r,this._parents,t,n)},call:Md.call,nodes:Md.nodes,node:Md.node,size:Md.size,empty:Md.empty,each:Md.each,on:function(t,e){var n=this._id;return arguments.length<2?Zf(this.node(),n).on.on(t):this.each(vd(n,t,e))},attr:function(t,e){var n=ei(t),r="transform"===n?qs:td;return this.attrTween(t,"function"==typeof e?(n.local?od:ad)(n,r,Jf(this,"attr."+t,e)):null==e?(n.local?nd:ed)(n):(n.local?id:rd)(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=ei(t);return this.tween(n,(r.local?cd:ld)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?Ys:td;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Oi(this,t),o=(this.style.removeProperty(t),Oi(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,yd(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Oi(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Oi(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,Jf(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=Xf(this,t),c=u.on,l=null==u.value[o]?a||(a=yd(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Oi(this,t);return o===a?null:o===r?i:i=e(r=o,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,bd(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,wd(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=Zf(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?$f:Qf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?hd:fd)(e,t)):Zf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?dd:pd)(e,t)):Zf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(gd(e,t)):Zf(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=Xf(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 Cd={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Pd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Cd.time=Nf(),Cd;return n}ua.prototype.interrupt=function(t){return this.each((function(){Kf(this,t)}))},ua.prototype.transition=function(t){var e,n;t instanceof Sd?(e=t._id,t=t._name):(e=Td(),(n=Cd).time=Nf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)(o=s[c])&&Yf(o,t,e,c,s,n||Pd(o,e));return new Sd(r,this._parents,t,e)};var Dd=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(G.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=Od(t).duration(aa.getProperty(Ia,t,"duration")||Ia.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=Od(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}(qh);function kd(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 Rd(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 Ld(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t),r=Rd(e);return n.setDate(n.getDate()+r),n}function Id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t).getTime(),r=Rd(e);return new Date(n+r)}function Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Id(t,36e5*n)}function Vd(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Ud(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=kd(t);return e.setHours(0,0,0,0),e}function Gd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ud(t),r=Ud(e),i=n.getTime()-Vd(n),a=r.getTime()-Vd(r);return Math.round((i-a)/864e5)}function Bd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Id(t,6e4*n)}function Hd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=kd(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 jd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t),r=Rd(e),i=n.getMonth()+r,a=new Date(0);a.setFullYear(n.getFullYear(),i,1),a.setHours(0,0,0,0);var o=Hd(a);return n.setMonth(i,Math.min(o,n.getDate())),n}function zd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Id(t,1e3*n)}function Fd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return jd(t,12*n)}function Wd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t),r=kd(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function Yd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=kd(t);return!isNaN(e)}function qd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t),r=kd(e),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return 12*i+a}function Xd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t),r=kd(e);return n.getFullYear()-r.getFullYear()}function Zd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t),r=kd(e);return n.getTime()-r.getTime()}function Kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Zd(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function $d(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Zd(t,e)/1e3;return n>0?Math.floor(n):Math.ceil(n)}var Qd={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 Jd(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var tp={date:Jd({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:Jd({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:Jd({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},ep={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function np(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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 rp(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,c=s[0],l=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}}var ip,ap={code:"en-US",formatDistance:function(t,e,n){var r;return n=n||{},r="string"==typeof Qd[t]?Qd[t]:1===e?Qd[t].one:Qd[t].other.replace("{{count}}",e),n.addSuffix?n.comparison>0?"in "+r:r+" ago":r},formatLong:tp,formatRelative:function(t,e,n,r){return ep[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:np({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:np({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:np({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:np({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:np({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:(ip={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(ip.matchPattern);if(!i)return null;var a=i[0],o=n.match(ip.parsePattern);if(!o)return null;var s=ip.valueCallback?ip.valueCallback(o[0]):o[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:rp({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:rp({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:rp({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:rp({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:rp({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 op(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Id(t,-n)}function sp(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var up=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return sp("yy"===e?r%100:r,e.length)},cp=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):sp(n+1,2)},lp=function(t,e){return sp(t.getUTCDate(),e.length)},hp=function(t,e){return sp(t.getUTCHours()%12||12,e.length)},fp=function(t,e){return sp(t.getUTCHours(),e.length)},dp=function(t,e){return sp(t.getUTCMinutes(),e.length)},pp=function(t,e){return sp(t.getUTCSeconds(),e.length)},gp=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return sp(Math.floor(r*Math.pow(10,n-3)),e.length)};function vp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=kd(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 mp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=kd(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=vp(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=vp(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function yp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=mp(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=vp(n);return r}function _p(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,a=null==i?0:Rd(i),o=null==n.weekStartsOn?a:Rd(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=kd(t),u=s.getUTCDay(),c=(u<o?7:0)+u-o;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function bp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=kd(t,e),r=n.getUTCFullYear(),i=e||{},a=i.locale,o=a&&a.options&&a.options.firstWeekContainsDate,s=null==o?1:Rd(o),u=null==i.firstWeekContainsDate?s:Rd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=_p(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=_p(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function xp(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,a=null==i?1:Rd(i),o=null==n.firstWeekContainsDate?a:Rd(n.firstWeekContainsDate),s=bp(t,e),u=new Date(0);u.setUTCFullYear(s,0,o),u.setUTCHours(0,0,0,0);var c=_p(u,e);return c}var wp="midnight",Ep="noon",Sp="morning",Op="afternoon",Tp="evening",Mp="night",Ap={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 up(t,e)},Y:function(t,e,n,r){var i=bp(t,r),a=i>0?i:1-i;return"YY"===e?sp(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):sp(a,e.length)},R:function(t,e){return sp(mp(t),e.length)},u:function(t,e){return sp(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 sp(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 sp(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 cp(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 sp(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=kd(t),r=_p(n,e).getTime()-xp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):sp(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=kd(t),n=vp(e).getTime()-yp(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):sp(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):lp(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=kd(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"}):sp(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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return sp(a,2);case"eo":return n.ordinalNumber(a,{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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return sp(a,e.length);case"co":return n.ordinalNumber(a,{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 sp(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?Ep:0===i?wp: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?Tp:i>=12?Op:i>=4?Sp:Mp,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 hp(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):fp(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):sp(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):sp(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):dp(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):pp(t,e)},S:function(t,e){return gp(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Pp(i);case"XXXX":case"XX":return Dp(i);case"XXXXX":case"XXX":default:return Dp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Pp(i);case"xxxx":case"xx":return Dp(i);case"xxxxx":case"xxx":default:return Dp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Cp(i,":");case"OOOO":default:return"GMT"+Dp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Cp(i,":");case"zzzz":default:return"GMT"+Dp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return sp(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return sp((r._originalDate||t).getTime(),e.length)}};function Cp(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+sp(a,2)}function Pp(t,e){return t%60==0?(t>0?"-":"+")+sp(Math.abs(t)/60,2):Dp(t,e)}function Dp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+sp(Math.floor(i/60),2)+n+sp(i%60,2)}function kp(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 Rp(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 Lp={p:Rp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],a=r[2];if(!a)return kp(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}}",kp(i,e)).replace("{{time}}",Rp(a,e))}},Ip=["D","DD"],Np=["YY","YYYY"];function Vp(t){return-1!==Ip.indexOf(t)}function Up(t){return-1!==Np.indexOf(t)}function Gp(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 Bp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Hp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,jp=/^'([^]*?)'?$/,zp=/''/g,Fp=/[a-zA-Z]/;function Wp(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},a=i.locale||ap,o=a.options&&a.options.firstWeekContainsDate,s=null==o?1:Rd(o),u=null==i.firstWeekContainsDate?s:Rd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=a.options&&a.options.weekStartsOn,l=null==c?0:Rd(c),h=null==i.weekStartsOn?l:Rd(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!a.localize)throw new RangeError("locale must contain localize property");if(!a.formatLong)throw new RangeError("locale must contain formatLong property");var f=kd(t);if(!Yd(f))throw new RangeError("Invalid time value");var d=Vd(f),p=op(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:a,_originalDate:f},v=r.match(Hp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Lp[e])(t,a.formatLong,g):t})).join("").match(Bp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return Yp(t);var n=Ap[e];if(n)return!i.useAdditionalWeekYearTokens&&Up(t)&&Gp(t),!i.useAdditionalDayOfYearTokens&&Vp(t)&&Gp(t),n(p,t,a.localize,g);if(e.match(Fp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function Yp(t){return t.match(jp)[1].replace(zp,"'")}function qp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Ld(t,-n)}function Xp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Nd(t,-n)}function Zp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Bd(t,-n)}function Kp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return jd(t,-n)}function $p(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return zd(t,-n)}function Qp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Fd(t,-n)}var Jp=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 aa.getProperty(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(x).map((function(t){return x[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!==x.LEFT&&this.rangeAxisPosition!==x.RIGHT||this.domainAxisPosition!==x.BOTTOM&&this.domainAxisPosition!==x.TOP?this.orientation=S.HORIZONTAL:this.orientation=S.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=[x.BOTTOM,x.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[x.LEFT,x.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 a,o=this.model.getOptions(),s=aa.getProperty(o,"axes")[n].mapsTo,u=void 0!==r[s]?r[s]:r;switch(e){case O.LABELS:a=t(u)+t.step()/2;break;case O.TIME:a=t(new Date(u));break;default:a=t(u)}return a},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){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 aa.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return aa.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===O.TIME?e.filter((function(e){var r=e[n];return"string"!=typeof r&&void 0!==r.getTime||(r=new Date(r)),r.getTime()===t.getTime()})):e.filter((function(e){return e[n]===t}))},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return aa.getProperty(n,"axes",t).scaleType===O.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=kd(t),r=kd(e),i=Wd(n,r),a=Math.abs(Xd(n,r));n.setFullYear(n.getFullYear()-i*a);var o=Wd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Qp(n,e),Fd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t),r=kd(e),i=Wd(n,r),a=Math.abs(qd(n,r));n.setMonth(n.getMonth()-i*a);var o=Wd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Kp(n,e),jd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=kd(t),r=kd(e),i=Wd(n,r),a=Math.abs(Gd(n,r));n.setDate(n.getDate()-i*a);var o=Wd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[qp(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=Zd(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Xp(n,e),Nd(r,e)];if(Kd(r,n)>30)return[Zp(n,30*e),Bd(r,30*e)];if(Kd(r,n)>1)return[Zp(n,e),Bd(r,e)];if($d(r,n)>15)return[$p(n,15*e),zd(r,15*e)];if($d(r,n)>1)return[$p(n,e),zd(r,e)];return[n,r]}(e,aa.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,Ma.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=aa.getProperty(t,"axes");return null===aa.getProperty(e,x.LEFT)&&null!==aa.getProperty(e,x.RIGHT)||!0===aa.getProperty(e,x.RIGHT,"main")?x.RIGHT:x.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=aa.getProperty(t,"axes");return null===aa.getProperty(e,x.BOTTOM)&&null!==aa.getProperty(e,x.TOP)||!0===aa.getProperty(e,x.TOP,"main")?x.TOP:x.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=aa.getProperty(n,"axes",t),i=aa.getProperty(n,"axes",e),a=r.scaleType||O.LINEAR,o=i.scaleType||O.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return o===O.LABELS||o===O.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):a===O.LABELS||a===O.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=aa.getProperty(e,"axes",t),r=n.includeZero,i=aa.getProperty(n,"scaleType")||O.LINEAR;if(this.model.isDataEmpty())return[];var a,o,s=this.model.getDisplayData(),u=n.mapsTo,c=n.percentage;if(n.domain)return i===O.LABELS?n.domain:this.extendsDomain(t,n.domain);if(c)return[0,100];if(n&&i===O.LABELS)return Mo(s,(function(t){return t[u]})).keys();n.stacked?o=this.model.getDataValuesGroupedByKeys().map((function(t){return function(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):o=s.map((function(t){return t[u]}));return i!==O.TIME&&r&&o.push(0),a=Ro(o),a=this.extendsDomain(t,a)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=aa.getProperty(e,"axes",t);if(!n)return null;var r,i=aa.getProperty(n,"scaleType")||O.LINEAR;return this.scaleTypes[t]=i,(r=i===O.TIME?gl():i===O.LOG?function t(){var e=Cu(nu()).domain([1,10]);return e.copy=function(){return eu(e,t()).base(e.base())},jo.apply(e,arguments),e}().base(n.base||10):i===O.LABELS?Xo():xu()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=aa.getProperty(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!n)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==O.TIME||"string"!=typeof i.value&&void 0!==i.value.getTime||(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}},e.prototype.getHighestRangeThreshold=function(){var t=aa.getProperty(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!t)return null;var e=this.getRangeScale(),n=t.sort((function(t,e){return e.value-t.value}))[0];return{threshold:n,scaleValue:e(n.value)}},e}(qh);var tg,eg,ng=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:zl,curveLinearClosed:Th,curveBasis:ih,curveBasisClosed:oh,curveBasisOpen:uh,curveBundle:lh,curveCardinal:dh,curveCardinalClosed:gh,curveCardinalOpen:mh,curveCatmullRom:bh,curveCatmullRomClosed:wh,curveCatmullRomOpen:Sh,curveMonotoneX:Lh,curveMonotoneY:Ih,curveNatural:Uh,curveStep:Bh,curveStepAfter:jh,curveStepBefore:Hh},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}(qh),rg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getZoomBarData=function(){var t,e=this.services.cartesianScales,n=e.getDomainIdentifier(),r=e.getRangeIdentifier(),i=aa.getProperty(this.model.getOptions(),"zoomBar","top","data");t=i&&i.length>1?i:this.model.getDisplayData();var a=[];return t.forEach((function(t){a=a.concat(Number(t[n]))})),(a=aa.removeArrayDuplicates(a).sort()).map((function(e){var i=0,a={};return t.forEach((function(t){Number(t[n])===e&&(i+=t[r])})),a[n]=new Date(e),a[r]=i,a}))},e.prototype.getDefaultZoomBarDomain=function(){var t=this.services.zoom.getZoomBarData(),e=this.services.cartesianScales,n=e.getMainXAxisPosition(),r=e.getDomainIdentifier();return e.extendsDomain(n,Ro(t,(function(t){return t[r]})))},e}(qh),ig=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(ca(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=aa.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Xh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Xh.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=aa.getProperty(this.model.getOptions(),"style","prefix"),n=yf.appendOrSelect(this.parent,"g."+Xh.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}(),ag=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.GRAPHICS_DOCUMENT+" "+r.DOCUMENT),n=this.model.getOptions(),i=aa.getProperty(n,"legend"),a=this.model.getDataGroups(),o=aa.getProperty(i,"order");o&&(a=this.sortDataGroups(a,o));var s=e.selectAll("g.legend-item").data(a,(function(t){return t.name})),u=s.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===Aa.items.status.ACTIVE})),c=Aa.checkbox.radius,l=aa.getProperty(i,"truncation","type"),h=aa.getProperty(i,"truncation","threshold"),f=aa.getProperty(i,"truncation","numCharacter");u.append("rect").classed("checkbox",!0).merge(s.select("rect.checkbox")).attr("width",2*c).attr("height",2*c).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.status===Aa.items.status.ACTIVE?t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===Aa.items.status.ACTIVE}));var d=u.append("text").merge(s.select("text"));l!==E.NONE?d.html((function(t){return t.name.length>h?aa.truncateLabel(t.name,l,f):t.name})):d.html((function(t){return t.name})),this.breakItemsIntoLines(u),s.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var p=aa.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",p),p&&u.size()>0&&this.addEventListeners();var g=aa.getProperty(i,"alignment"),v=yf.getAlignmentOffset(g,e,this.getParent());e.attr("transform","translate("+v+", 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=Aa.checkbox.radius,a=Aa.items.horizontalSpace,o=Aa.items.verticalSpace,s=Aa.items.textYOffset,u=2*i+Aa.checkbox.spaceAfter,c=Aa.items.status.DISABLED,l=this.model.getDataGroups().some((function(t){return t.status===c})),h=aa.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var c=ca(this),g=ca(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===A.VERTICAL)h===A.VERTICAL&&0!==r&&d++;else{var v=yf.getSVGElementSize(e.parent,{useAttr:!0}),m=yf.getSVGElementSize(ca(this).select("text"),{useBBox:!0}),y=yf.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+a)+u+m.width>v.width&&(d++,f=0,p=0)}c.select("rect.checkbox").attr("x",f).attr("y",0+d*o);var _=s+d*o;c.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===A.HORIZONTAL)&&"0"===c.select("rect.checkbox").attr("y"),x=h===A.VERTICAL&&"0"===c.select("rect.checkbox").attr("x"),w=b||x;l&&c.select("g.check").empty()&&w?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):l||c.select("g.check").empty()||c.select("g.check").remove(),p++}))},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions(),r=aa.getProperty(n,"legend"),i=aa.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(G.Legend.ITEM_HOVER,{hoveredElement:ca(this)});var e=Aa.checkbox.radius,n=ca(this);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(G.Tooltip.SHOW,{hoveredElement:n,content:r.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(G.Legend.ITEM_CLICK,{clickedElement:ca(this)});var e=ca(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=ca(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(G.Tooltip.HIDE),t.services.events.dispatchEvent(G.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},e}(ig);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(eg||(eg={}));var og=((tg={})[eg.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)}},tg[eg.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)}},tg[eg.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)}},tg[eg.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)}},tg),sg="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},ug=function(){function t(t){void 0===t&&(t={}),this.positions=og,this.positions=Object.assign({},og,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(),a=document.body.getBoundingClientRect();return{top:i.top-a.top+n.top,left:i.left-a.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),a=t.getBoundingClientRect();return this.calculatePosition(i,a,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 a=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var o=n.map((function(n){var o=i(t,e,n),s=a.getPlacementBox(e,o),u=s.bottom-r().height,c=s.right-r().width;u=u<0?e.offsetHeight:u,c=c<0?e.offsetWidth:c;var l=e.offsetHeight*e.offsetWidth,h=l-u*c;return{placement:n,weight:(h=0===h?l:h)/l}}));return o.sort((function(t,e){return e.weight-t.weight})),o[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:sg.innerHeight-sg.scrollY,height:sg.innerWidth-sg.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}(),cg=(new ug,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function lg(t,e,n,r){var i=0===e,a=2===Number(Wp(new Date(t),"c")),o=1===Number(Wp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||pg(t)||gg(t)||vg(t);case"daily":return r?i||a||vg(t):i||gg(t)||vg(t);case"monthly":return i||vg(t);case"quarterly":return i||o;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function hg(t,e,n,r){var i=r.showDayName,a="daily"===n&&i?"weekly":n,o=new Date(t),s=aa.getProperty(r,"timeIntervalFormats")[a],u=aa.getProperty(s,"primary"),c=aa.getProperty(s,"secondary");return Wp(o,lg(t,e,n,i)?u:c,{locale:r.localeObject})}function fg(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function dg(t){return 1===t.length?"15seconds":function(t){var e=cg.reduce((function(e,n,r){n[0];var i=n[1],a=cg[e][1];return Math.abs(a-t)<Math.abs(i-t)?e:r}),0);return cg[e][0]}(function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,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 pg(t){var e=fg(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function gg(t){var e=fg(t),n=e.d,r=e.s,i=e.m,a=e.H;return 1===n&&0===a&&0===i&&0===r}function vg(t){var e=fg(t),n=e.M,r=e.d,i=e.s,a=e.m,o=e.H;return 1===n&&1===r&&0===o&&0===a&&0===i}var mg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new ug,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,a=n.axisPosition,o=n.index,s=aa.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Xh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=a+"-"+o,this.threshold=yf.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=yf.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),c=yf.appendOrSelect(this.threshold,"line.threshold-line");c.style("stroke",i);var l=this.services.cartesianScales.getScaleByPosition(a),h=this.services.cartesianScales.getScaleTypeByPosition(a),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===O.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],b=y[1],w=this.services.cartesianScales,E=w.getOrientation(),S=aa.flipDomainAndRangeBasedOnOrientation((function(t){return w.getDomainValue(t)}),(function(t){return w.getRangeValue(t)}),E),T=S[0],M=S[1];if(a===x.TOP||a===x.BOTTOM){var A=T(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+A+", "+b+")"),c.attr("y2",_-b),u.attr("width",_-b).classed("rotate",!0)}else{A=M(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+A+")"),c.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(G.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(G.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)===O.TIME){var i=[x.LEFT,x.RIGHT].includes(n),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=i?o:a,u=aa.getProperty(r,"timeScale");return hg(e,0,dg(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,a=void 0===i?"Threshold":i,o=ca(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=yf.appendOrSelect(o,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(a+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=fa(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[eg.RIGHT,eg.LEFT,eg.TOP,eg.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;yf.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(G.Threshold.SHOW,{hoveredElement:ca(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(G.Threshold.HIDE,{hoveredElement:ca(t.threshold)})}))},e}(ig),yg=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=yf.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=yf.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),a=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,a-1)).append("tspan").text("...");var o=this;t.on("mouseover",(function(){o.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){o.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("mouseout",(function(){o.services.events.dispatchEvent(G.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return yf.getSVGElementSize(this.services.domUtils.getMainSVG(),{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}(ig),_g=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 a=this.getMaxTitleWidth(),o=yf.appendOrSelect(n,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)},e.prototype.displayStatus=function(){var t=this.getContainerSVG(),e=(this.model.getOptions(),yf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0})),n=e.width?e.width:this.parent.node().getAttribute("width"),r=this.model.getStatus(),i=Pa.status.indicatorSize/2,a=yf.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),o=r?[r]:[],s=a.selectAll("circle.status").data(o);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var u=a.selectAll("path.innerFill").data(o);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=yf.appendOrSelect(e,"text.meter-title"),r=!0===aa.getProperty(this.model.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),a=Pa.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()+a).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=yf.appendOrSelect(this.parent,"tspan"),i=Pa.statusBar.paddingRight,a=Math.ceil(r.node().getComputedTextLength());yf.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+a+i)},e.prototype.getMaxTitleWidth=function(){var t=yf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),e=t.width?t.width:this.parent.node().getAttribute("width"),n=yf.appendOrSelect(this.parent,"text.percent-value"),r=Pa.statusBar.paddingRight,i=n.node().getComputedTextLength(),a=yf.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(yf.getSVGElementSize(a,{useBBox:!0}).width+Pa.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case V.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 V.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case V.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}(yg),bg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new ug,i.init(),i}return n(e,t),e.prototype.init=function(){var t=this,e=ca(this.services.domUtils.getHolder()),n=aa.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=yf.appendOrSelect(e,"div."+Xh.prefix+"--"+n+"--tooltip");var r=yf.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(G.Tooltip.MOVE,(function(e){t.positionTooltip(e)})),this.services.events.addEventListener(G.Tooltip.SHOW,(function(e){var n=e.detail.data||e.detail.items,i=t.getTooltipHTML(e);if(aa.getProperty(t.model.getOptions(),"tooltip","customHTML"))if(e.detail.content){var a='<div class="title-tooltip">'+e.detail.content+"</div>";r.html(a)}else r.html(t.model.getOptions().tooltip.customHTML(n,i));else r.html(i);t.positionTooltip(e),t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(G.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this.model.getOptions(),n=aa.getProperty(e,"tooltip","truncation","type"),r=aa.getProperty(e,"tooltip","truncation","threshold"),i=aa.getProperty(e,"tooltip","truncation","numCharacter");return n!==E.NONE?t.map((function(t){return t.label&&t.label.length>r&&(t.label=aa.truncateLabel(t.label,n,i)),t.value&&t.value.length>r&&(t.value=aa.truncateLabel(t.value,n,i)),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);e="<ul class='multi-tooltip'>"+this.formatItems(n).map((function(t){return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.color?'<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=aa.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=aa.getProperty(this.model.getOptions(),"zoomBar","top","enabled"),a=aa.getProperty(t,"detail","mousePosition");if(a){var o=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),s=Na.height[o];i&&(a[1]+=s+Na.spacerHeight)}else a=fa(n);var u=this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[eg.RIGHT,eg.LEFT,eg.TOP,eg.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),c=La.horizontalOffset;u===eg.LEFT&&(c*=-1),e=this.positionService.findPositionAt({left:a[0]+c,top:a[1]},r,u),this.positionService.setElement(r,e)},e}(ig),xg=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,a=i.getDomainAxisOptions(),o=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=i.getRangeAxisOptions(),c=i.getRangeIdentifier(),l=(i.getRangeAxisScaleType(),r.data.groupMapsTo),h=a.title;if(!h){var f=i.getDomainAxisPosition();h=f===x.BOTTOM||f===x.TOP?"x-value":"y-value"}var d,p=n[0][o];if(s===O.TIME?p=Wp(new Date(n[0][o]),"MMM d, yyyy"):s===O.LINEAR&&(p=p.toLocaleString()),1===n.length){var g=n[0],v=u.title;if(!v){var m=i.getRangeAxisPosition();v=m===x.LEFT||m===x.RIGHT?"y-value":"x-value"}d=[{label:h,value:p},{label:v,value:this.valueFormatter(g[c])},{label:"Group",value:g[l],color:this.model.getStrokeColor(g[l])}]}else n.length>1&&(d=(d=[{label:h,value:this.valueFormatter(p)}]).concat(n.map((function(t){return{label:t[l],value:e.valueFormatter(t[c]),color:e.model.getStrokeColor(t[l])}})).sort((function(t,e){return e.value-t.value}))),!0===aa.getProperty(r,"tooltip","showTotal")&&d.push({label:"Total",value:this.valueFormatter(n.reduce((function(t,e){return t+e[c]}),0)),bold:!0}));return d},e}(bg),wg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",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?Ta.opacity.unselected:Ta.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Ta.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.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=this.services.cartesianScales,i=r.getOrientation(),a=ql().curve(this.services.curves.getD3Curve());i===S.VERTICAL?a.x((function(t,e){return r.getDomainValue(t,e)})).y0(r.getRangeValue(0)).y1((function(t,e){return r.getRangeValue(t,e)})):a.x0(r.getRangeValue(0)).x1((function(t,e){return r.getRangeValue(t,e)})).y((function(t,e){return r.getDomainValue(t,e)}));var o=this.model.getGroupedData(),s=n.selectAll("path.area").data(o,(function(t){return t.name}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).attr("fill",(function(t){return e.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Ta.opacity.selected).attr("class","area").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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(ig),Eg=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?Ta.opacity.unselected:Ta.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Ta.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this.getContainerSVG({withinChartClip:!0}),n=this,i=this.model.getOptions(),a=i.data.groupMapsTo,o=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),u=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(u)===O.TIME){var c=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),l=this.model.getStackedData({percentage:c}),h=e.selectAll("path.area").data(l,(function(t){return t[0][a]}));this.areaGenerator=ql().x((function(t){return o(new Date(t.data.sharedStackKey))})).y0((function(t){return s(t[0])})).y1((function(t){return s(t[1])})).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(l,(function(t){return t[0][a]})).attr("fill",(function(t){return n.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",Ta.opacity.selected).attr("class","area").attr("d",this.areaGenerator)}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(ig),Sg=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(),n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=yf.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}(ig),Og=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.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("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,a=i+r,o=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);if(!e.isOutsideZoomedDomain(i,a))return aa.generateSVGPathString({x0:i,x1:a,y0:o,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.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=ca(this);r.classed("hovered",!0),r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return hs(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(G.Bar.BAR_MOUSEOVER,{element:r,datum:n}),e.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(t){ca(this);e.services.events.dispatchEvent(G.Bar.BAR_MOUSEMOVE,{element:ca(this),datum:t}),e.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(G.Bar.BAR_CLICK,{element:ca(this),datum:t})})).on("mouseout",(function(n){var r=ca(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(G.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(G.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Sg),Tg=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var o=this.getContainerSVG({withinChartClip:!0}),s=Mo(n,(function(t){return t[a]})).keys(),u=o.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var c=u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-labelledby",(function(t){return t})).merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===S.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t){var n=e.groupScale(t[i]),r=n,a=n+e.getBarWidth(),o=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);if(!e.isOutsideZoomedDomain(r,a))return aa.generateSVGPathString({x0:r,x1:a,y0:o,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,e=this.model.getOptions().data.groupMapsTo;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=ca(this);r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return hs(t.model.getFillColor(n[e])).darker(.7).toString()})),t.services.events.dispatchEvent(G.Bar.BAR_MOUSEOVER,{element:r,datum:n}),t.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(G.Bar.BAR_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this);n.classed("hovered",!1);var r=t.model.getOptions().data.groupMapsTo;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillColor(e[r])})),t.services.events.dispatchEvent(G.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(G.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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.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=aa.getProperty(t,"bars","width"),n=aa.getProperty(t,"bars","maxWidth");if(null!==e){if(null===n)return e;if(e<=n)return e}var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),a=this.services.cartesianScales.getDomainScale();return Math.min(n,(a.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=Xo().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(Sg),Mg=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.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()),a=i.data.groupMapsTo,o=(this.services.cartesianScales.getDomainIdentifier(),this.model.getStackedData()),s=n.selectAll("g.bars").data(o,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-label","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("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,a=e.getBarWidth(),o=e.services.cartesianScales.getDomainValue(r,n)-a/2,s=o+a,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(o,s))return Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===S.VERTICAL?c+=1:c-=1),aa.generateSVGPathString({x0:o,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r,i=ca(this);i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return hs(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(G.Bar.BAR_MOUSEOVER,{element:i,datum:n});var a=e.model.getDisplayData(),o=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier(),u=a.find((function(e){return e[s]===n.data[n.group]&&e[o].toString()===n.data.sharedStackKey&&e[t]===n.group}));void 0===u&&((r={})[o]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,u=r),e.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:i,data:[u]})})).on("mousemove",(function(t){var n=ca(this);e.services.events.dispatchEvent(G.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(G.Bar.BAR_CLICK,{element:ca(this),datum:t})})).on("mouseout",(function(n){var r=ca(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(G.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(G.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Sg),Ag=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(G.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(G.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]>n[0]&&t[e]<n[1]})):t},e.prototype.render=function(t){if(aa.getProperty(this.model.getOptions(),"points","enabled")||aa.getProperty(this.model.getOptions(),"bubble","enabled")){var e,n=this.getContainerSVG({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier(),o=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[o]&&null!==t[o]}));e=this.filterBasedOnZoomDomain(e);var u=n.selectAll("circle.dot").data(e,(function(t){return t[i]+"-"+t[a]}));u.exit().attr("opacity",0).remove();var c=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u);this.styleCircles(c,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=aa.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),a=i[0],o=i[1],s=aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.getRangeValue(t,e)}),r),u=s[0],c=s[1],l=u(t,e),h=c(t,e);return o&&a?h<=o.scaleValue&&l>=a.scaleValue:o?h<=o.scaleValue:a?l>=a.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.points,o=a.filled,s=a.fillOpacity,u=this.services,c=u.cartesianScales,l=u.transitions,h=i.data.groupMapsTo,f=c.getDomainIdentifier(),d=c.getRangeIdentifier(),p=aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return c.getDomainValue(t,e)}),(function(t,e){return c.getRangeValue(t,e)}),c.getOrientation()),g=p[0],v=p[1],m=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[h],t[f],t,o)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[h],t[f],t,o)})).transition(l.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,o))return n.model.getFillColor(t[h],t[f],t)})).attr("fill-opacity",o?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=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover",(function(r){var i=ca(this);i.classed("hovered",!0).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)}));var a=t.services.cartesianScales.getDomainValue(r),o=t.services.cartesianScales.getRangeValue(r),s=t.getTooltipData(a,o);t.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:i,data:s}),t.services.events.dispatchEvent(G.Scatter.SCATTER_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(G.Scatter.SCATTER_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(G.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(G.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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(G.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(G.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(ig),Cg=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})),a=yf.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),o=i.length>0,s=o?Ro(i):[1,1];return xu().domain(s).range(o?e.bubble.radiusRange(a,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.bubble.radiusMapsTo,o=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 o(t[a]||1)})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("opacity",1)},e}(Ag),Pg=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?Ca.opacity.unselected:Ca.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Ca.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.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,a=i.cartesianScales,o=i.curves,s=aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return a.getDomainValue(t,e)}),(function(t,e){return a.getRangeValue(t,e)}),a.getOrientation()),u=s[0],c=s[1],l=this.model.getOptions(),h=Yl().x(u).y(c).curve(o.getD3Curve()).defined((function(t,e){var n=t[a.getRangeIdentifier()];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(l.axes).some((function(t){return l.axes[t].percentage})),p=l.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:!aa.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("stroke",(function(t,n){return e.model.getStrokeColor(t.name)})).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("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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(ig),Dg=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){var e=aa.getProperty(this.model.getOptions(),"scatterDotEnabled");if(this.configs.alwaysEnableScatterDot||e){var n=this.getContainerSVG({withinChartClip:!0}),i=this.model.getOptions(),a=i.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),s=this.services.cartesianScales.getRangeIdentifier(),u=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),c=this.model.getStackedData({percentage:u}),l=n.selectAll("g.dots").data(c,(function(t){return t[0][a]}));l.exit().attr("opacity",0).remove();var h=l.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(l).selectAll("circle.dot").data((function(t){return t}));h.exit().attr("opacity",0).remove();var f=h.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(h).datum((function(t){var e,n=t[a];return(e={})[a]=n,e[o]=t.data.sharedStackKey,e[s]=t[1],e}));this.styleCircles(f,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),a=this.model.getOptions(),o=a.data.groupMapsTo,s=Object.keys(a.axes).some((function(t){return a.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),c=[];return u.forEach((function(a,u){a.forEach((function(a,l){var h,f=a[o],d=a.data.sharedStackKey,p=a.data[f],g=a[1];p&&t===n.services.cartesianScales.getDomainValue(d)&&e===n.services.cartesianScales.getRangeValue(g)&&(s&&(p=n.model.getStackedData()[u][l].data[f]),c.push(((h={})[o]=f,h[r]=d,h[i]=p,h)))}))})),c},e}(Ag);function kg(t,e){var n=this,r=Ns(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Rg=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return Da.innerRadius},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),a=this.model.getOptions(),o=a.data.groupMapsTo,s=this.computeRadius();this.arc=Hl().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=Hl().innerRadius(this.getInnerRadius()).outerRadius(s+Da.hoverArc.outerRadiusOffset);var u=function(){var t=Zl,e=Xl,n=null,r=xl(0),i=xl(Dl),a=xl(0);function o(o){var s,u,c,l,h,f=o.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(Dl,Math.max(-Dl,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,a.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>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(o[t],o[e])})),s=0,c=d?(m-f*_)/d:0;s<f;++s,v=l)u=p[s],l=v+((h=g[u])>0?h*c:0)+_,g[u]={data:o[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:y};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:xl(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:xl(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:xl(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:xl(+t),o):a},o}().value((function(t){return t.value})).sort(null).padAngle(Da.padAngle)(i).sort((function(t,e){return t.index-e.index})),c=yf.appendOrSelect(n,"g.slices").attr("role",r.GROUP).attr("aria-label","slices").selectAll("path.slice").data(u,(function(t){return t.data[o]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return e.model.getFillColor(t.data[o])})).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+", "+aa.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return kg.bind(this)(t,e.arc)}));var l=u.filter((function(t){return t.value>0})),h=yf.appendOrSelect(n,"g.labels").attr("role",r.GROUP).attr("aria-label","labels").selectAll("text.pie-label").data(l,(function(t){return t.data[o]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return a.pie.labels.formatter?a.pie.labels.formatter(t):aa.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+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=l.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<Da.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+Da.callout.offsetX+Da.callout.textMargin+t.textOffsetX,a=t.yPosition-Da.callout.offsetY,t.direction=D.RIGHT,d.push(t)):(i=t.xPosition-Da.callout.offsetX-t.textOffsetX-Da.callout.textMargin,a=t.yPosition-Da.callout.offsetY,t.direction=D.LEFT,d.push(t)),"translate("+i+", "+a+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(d);var p=aa.getProperty(a,"donut")?"donut":"pie",g=aa.getProperty(a,p,"alignment"),v=yf.getSVGElementSize(this.getParent(),{useAttr:!0}).width,m=s+Da.xOffset;g===M.CENTER?m=v/2:g===M.RIGHT&&(m=v-s-Da.xOffset);var y=s+Da.yOffset;d.length>0&&(y+=Da.yOffsetCallout),n.attr("transform","translate("+m+", "+y+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=yf.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP).attr("aria-label","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===D.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+Da.callout.offsetX,y:n-Da.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-Da.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-Da.callout.offsetX,y:n-Da.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+Da.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return ca(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 ca(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=ca(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(G.Pie.SLICE_MOUSEOVER,{element:ca(this),datum:e});var r=t.model.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value,color:t.model.getStrokeColor(e.data[r])}]})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(G.Pie.SLICE_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(G.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=yf.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Da.radiusOffset},e}(ig),Lg=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 aa.clamp(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.model.getOptions();return aa.getProperty(t,"gauge","type")===I.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(aa.getProperty(e,"gauge","deltaArrow","direction")){case N.UP:return"4,10 8,6 12,10";case N.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,a=this.getValue(),o=this.getValueRatio(),s=this.getArcSize(),u=this.getStartAngle(),c=u+o*s,l=u+s,h=this.computeRadius(),f=this.getInnerRadius();this.backgroundArc=Hl().innerRadius(f).outerRadius(h).startAngle(c).endAngle(l),this.arc=Hl().innerRadius(f).outerRadius(h).startAngle(u).endAngle(c),yf.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var d=n.selectAll("path.arc-foreground").data([a]);d.enter().append("path").attr("class","arc-foreground").merge(d).attr("d",this.arc).attr("fill",(function(t){return e.model.getFillColor(t[i])})).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=aa.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),a=this.computeRadius(),o=aa.getProperty(e,"gauge","valueFontSize"),s=aa.getProperty(e,"gauge","deltaFontSize"),u=aa.getProperty(e,"gauge","numberSpacing"),c=0;n!==I.FULL||i?n===I.SEMI&&i&&(c=-(s(a)+u)):c=s(a);var l=yf.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),h=yf.appendOrSelect(l,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=aa.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",o(a)+"px").attr("text-anchor","middle").text((function(t){return f(t)}));var p=yf.getSVGElementSize(yf.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;yf.appendOrSelect(h,"text.gauge-value-symbol").style("font-size",o(a)/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?aa.getProperty(e,"gauge","deltaFontSize"):function(){return 0},a=n?aa.getProperty(e,"gauge","numberFormatter"):function(){return null},o=aa.getProperty(e,"gauge","deltaArrow","size"),s=aa.getProperty(e,"gauge","numberSpacing"),u=yf.appendOrSelect(t,"g.gauge-numbers"),c=yf.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),l=yf.appendOrSelect(c,"text.gauge-delta-number");l.data(null===n?[]:[n]),l.enter().append("text").classed("gauge-delta-number",!0).merge(l).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return a(t)+"%"}));var h=yf.getSVGElementSize(yf.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=aa.getProperty(e,"gauge","deltaArrow","enabled"),d=c.selectAll("svg.gauge-delta-arrow").data(null!==n&&f?[n]:[]);d.enter().append("svg").merge(d).attr("class","gauge-delta-arrow").attr("x",-o(r)-h/2).attr("y",-o(r)/2-.35*i(r)).attr("width",o(r)).attr("height",o(r)).attr("viewBox","0 0 16 16"),yf.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=aa.getProperty(e,"gauge","status");yf.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(),l.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-aa.getProperty(this.model.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc").on("mouseover",(function(e){t.services.events.dispatchEvent(G.Gauge.ARC_MOUSEOVER,{element:ca(this),datum:e})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(G.Gauge.ARC_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=aa.getProperty(t,"gauge","type"),n=yf.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===I.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(ig),Ig=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=yf.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),a=this.computeRadius();yf.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(a)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(ca(this))})),yf.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(a)})).attr("y",i.donut.center.titleYPosition(a)).text(aa.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=aa.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?Vs:Ds)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Rg),Ng=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=yf.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var a=aa.getProperty(this.model.getOptions(),"data","loading");a?this.renderSkeleton(a):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===k.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===k.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===k.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==k.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===S.VERTICAL&&this.drawYGrid(t),e===S.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=xu().domain([0,1]).range(t),this.yScale=xu().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=yf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;this.backdrop=yf.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",a);var o=yf.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],c=(s[1],this.yScale.range()),l=(c[0],c[1]);this.backdrop.merge(o).attr("x",u).attr("y",l),o.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=aa.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),a=yf.appendOrSelect(this.backdrop,"g.x.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),a.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=aa.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),a=yf.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),a.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=yf.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),a=i.width,o=i.height,s=yf.appendOrSelect(r,"svg.chart-skeleton").attr("width",a).attr("height",o),u=0===e?"pie":"donut",c=aa.getProperty(this.model.getOptions(),u,"alignment");yf.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",a).attr("height",o).attr("fill","none");var l=Hl().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(Da.radiusOffset),f=t+(Math.min(a,o)-2*t)/2,d=yf.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+h+", "+f+")").attr("d",l).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n),p=t+Da.xOffset;c===M.CENTER?p=a/2:c===M.RIGHT&&(p=a-t-Da.xOffset);var g=t+Da.yOffset;d.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=yf.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Da.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=yf.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=yf.appendOrSelect(e,"defs").lower(),a=yf.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)");a.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(){a.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(Ad).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(ig),Vg=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(){yf.appendOrSelect(this.getContainerSVG(),"rect").attr("x",0).attr("y",0).attr("width",this.configs.size||Ra.default.size).attr("height",this.configs.size||Ra.default.size).attr("opacity",0)},e}(ig);function Ug(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 Gg(t,e){var n,r,i,a,o,s=new zg(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Bg);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)c.push(r=n.children[a]=new zg(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(jg)}function Bg(t){return t.children}function Hg(t){t.data=t.data.data}function jg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function zg(t){this.data=t,this.depth=this.height=0,this.parent=null}function Fg(t){if("function"!=typeof t)throw new Error;return t}function Wg(){return 0}function Yg(t){return function(){return t}}function qg(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 Xg(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function Zg(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}zg.prototype=Gg.prototype={constructor:zg,count:function(){return this.eachAfter(Ug)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.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 Gg(this).eachBefore(Hg)}};var Kg=function t(e){function n(t,n,r,i,a){!function(t,e,n,r,i,a){for(var o,s,u,c,l,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,c=a-r;do{l=y[b++].value}while(!l&&b<x);for(h=f=l,v=l*l*(g=Math.max(c/u,u/c)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(l+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=l*l*g,(d=Math.max(f/v,v/h))>p){l-=s;break}p=d}m.push(o={value:l,dice:u<c,children:y.slice(_,b)}),o.dice?Xg(o,n,r,i,w?r+=c*l/w:a):Zg(o,n,r,w?n+=u*l/w:i,a),w-=l,_=b}}(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function $g(){var t=Kg,e=!1,n=1,r=1,i=[0],a=Wg,o=Wg,s=Wg,u=Wg,c=Wg;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(qg),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=c(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Fg(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Yg(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Yg(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Yg(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:Yg(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:Yg(+t),l):c},l}var Qg=function(t){function e(n,r,i,a){var o=t.call(this,n,r,a)||this;return o.type="layout",o.configs=a,o.children=i,o._instanceID=e.instanceID++,(o.configs.direction===C.ROW_REVERSE||o.configs.direction===C.COLUMN_REVERSE)&&(o.children=o.children.reverse()),o.init(),o}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=aa.getProperty(t,"data","growth","x");return e===P.PREFERRED||e===P.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 aa.getProperty(t,"data","growth","x")===P.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=yf.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height,o=Gg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===C.ROW||this.configs.direction===C.ROW_REVERSE?Xg:Zg;$g().tile(s).size([i,a])(o);var u=this.configs.direction===C.ROW||this.configs.direction===C.ROW_REVERSE,c=n.selectAll("svg.layout-child-"+this._instanceID).data(o.leaves(),(function(t){return t.data.id}));c.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),c.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(ca(n));var i=aa.getProperty(e,"data","growth","x");i!==P.PREFERRED&&i!==P.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=aa.getProperty(t,"data","growth","x"),n=yf.getSVGElementSize(ca(this),{useBBox:!0});if("legend"===t.data.id){var r=yf.getSVGElementSize(ca(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===P.PREFERRED){var o=u?n.width:n.height,s=u?i:a;t.data.size=o/s*100}})),c.exit().remove(),this.children.filter((function(t){return aa.getProperty(t,"growth","x")===P.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),o=Gg({children:this.children}).sum((function(t){return t.size})),$g().tile(s).size([i,a]).padding(0)(o),n.selectAll("svg.layout-child-"+this._instanceID).data(o.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){aa.getProperty(e,"data","growth","x")===P.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}(ig),Jg=Array.prototype.slice;function tv(t){return t}function ev(t){return"translate("+(t+.5)+",0)"}function nv(t){return"translate(0,"+(t+.5)+")"}function rv(t){return function(e){return+t(e)}}function iv(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function av(){return!this.__axis}function ov(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",l=1===t||3===t?ev:nv;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):tv:i,p=Math.max(a,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?iv:rv)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),E=x.enter().append("g").attr("class","tick"),S=x.select("line"),O=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),S=S.merge(E.append("line").attr("stroke","currentColor").attr(c+"2",u*a)),O=O.merge(E.append("text").attr("fill","currentColor").attr(c,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),S=S.transition(h),O=O.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?l(t):this.getAttribute("transform")})),E.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.attr("d",4===t||2==t?o?"M"+u*o+","+v+"H0.5V"+m+"H"+u*o:"M0.5,"+v+"V"+m:o?"M"+v+","+u*o+"V0.5H"+m+"V"+u*o:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return l(y(t))})),S.attr(c+"2",u*a),O.attr(c,u*p).text(d),_.filter(av).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=Jg.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:Jg.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:Jg.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function sv(t){return ov(1,t)}function uv(t){return ov(2,t)}function cv(t){return ov(3,t)}function lv(t){return ov(4,t)}var hv=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,a=this.model.getOptions(),o=aa.getProperty(a,"axes",i),s=aa.getProperty(o,"scaleType"),u=aa.getProperty(a,"data","loading"),c=aa.getProperty(o,"ticks","number"),l=aa.getProperty(o,"ticks","values"),h=aa.getProperty(o,"truncation","type"),f=aa.getProperty(o,"truncation","threshold"),d=aa.getProperty(o,"truncation","numCharacter"),p=null!==c,g=i===x.LEFT||i===x.RIGHT,v=aa.getProperty(a,"timeScale"),m=this.getContainerSVG(),y=yf.getSVGElementSize(this.parent,{useAttrs:!0}),_=y.width,b=y.height;i===x.BOTTOM||i===x.TOP?(e=this.configs.axes[x.LEFT]?this.margins.left:0,n=this.configs.axes[x.RIGHT]?_-this.margins.right:_):(e=b-this.margins.bottom,n=this.margins.top);var w,S=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===O.LABELS?S.rangeRound([e,n]):S.range([e,n]),i){case x.LEFT:w=lv;break;case x.BOTTOM:w=cv;break;case x.RIGHT:w=uv;break;case x.TOP:w=sv}var T=yf.appendOrSelect(m,"g.axis."+i);T.attr("aria-label",i+" axis");var M=!T.select("g.ticks").empty(),A=yf.appendOrSelect(T,"g.ticks");M||(A.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),A.attr("aria-label",i+" ticks"));var C=yf.appendOrSelect(T,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),P=yf.appendOrSelect(C,"g.tick"),D=yf.appendOrSelect(P,"text").text("0"),k=yf.getSVGElementSize(D.node(),{useBBox:!0}).height;P.remove();var R=this.scaleType===O.TIME||o.scaleType===O.TIME,L=this.scaleType||o.scaleType||O.LINEAR,I=this.model.get("zoomDomain");I&&R&&!g&&S.domain(I);var N,V=w(S).tickSizeOuter(0);if(S.ticks){var G=void 0;if(p?G=c:(G=Ma.ticks.number,g&&(G=this.getNumberOfFittingTicks(b,k,Ma.ticks.verticalSpaceRatio))),1===S.ticks().length&&0===S.ticks()[0]&&(G=0),V.ticks(G),R)if(S.ticks(G).length){var B=aa.getProperty(a,"timeScale","addSpaceOnEdges"),H=aa.getProperty(a,"axes",i,"domain"),j=void 0,z=S.copy();B&&!H&&z.nice(G),j=z.ticks(G),B&&j.length>2&&!H&&(j.splice(j.length-1,1),j.splice(0,1)),V.tickValues(j)}else V.tickValues([])}var F=aa.getProperty(o,"ticks","formatter");if(R){var W=dg(V.tickValues());N=null===F?function(t,e){return hg(t,e,W,v)}:function(t,e){var n=hg(t,e,W,v);return F(t,e,n)}}else null===F?L===O.LINEAR&&(N=function(t){return t.toLocaleString()}):N=F;switch(V.tickFormat(N),l&&V.tickValues(l),i){case x.LEFT:A.attr("transform","translate("+this.margins.left+", 0)");break;case x.BOTTOM:A.attr("transform","translate(0, "+(b-this.margins.bottom)+")");break;case x.RIGHT:A.attr("transform","translate("+(_-this.margins.right)+", 0)");break;case x.TOP:A.attr("transform","translate(0, "+this.margins.top+")")}var Y=this.model.isDataEmpty();if(o.title){var q=yf.appendOrSelect(T,"text.axis-title").html(Y||u?"":o.title);switch(i){case x.LEFT:q.attr("transform","rotate(-90)").attr("y",0).attr("x",-S.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case x.BOTTOM:q.attr("transform","translate("+(this.margins.left/2+S.range()[1]/2)+", "+b+")").style("text-anchor","middle");break;case x.RIGHT:q.attr("transform","rotate(90)").attr("y",-_).attr("x",S.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case x.TOP:var X=yf.getSVGElementSize(q,{useBBox:!0}).height;q.attr("transform","translate("+(this.margins.left/2+S.range()[1]/2)+", "+X/2+")").style("text-anchor","middle")}}if(R){var Z=dg(V.tickValues()),K=v.showDayName,$=A;t&&(A=A.transition(this.services.transitions.getTransition("axis-update",t))),A=A.call(V),$.selectAll(".tick").data(V.tickValues(),S).order().select("text").style("font-weight",(function(t,e){return lg(t,e,Z,K)?"bold":"normal"}))}else A=t&&M?A.transition(this.services.transitions.getTransition("axis-update")).call(V):A.call(V);if(C.call(V),i===x.BOTTOM||i===x.TOP){var Q=!1,J=aa.getProperty(o,"ticks","rotation");if(J===U.ALWAYS)Q=!0;else if(J===U.NEVER)Q=!1;else if(!J||J===U.AUTO)if(S.step){Q=C.selectAll("g.tick text").nodes().some((function(t){return yf.getSVGElementSize(t,{useBBox:!0}).width>=S.step()}))}else{var tt=aa.getProperty(o,"ticks","rotateIfSmallerThan")||Ma.ticks.rotateIfSmallerThan,et=_/(R?V.tickValues().length:S.ticks().length)/2;Q=R?et<2*tt:et<tt}Q?(p||(V.ticks(this.getNumberOfFittingTicks(_,k,Ma.ticks.horizontalSpaceRatio)),C.call(V),A.call(V)),T.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===x.TOP?"start":"end")):T.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(u?T.attr("opacity",0):T.attr("opacity",1),A.selectAll("g.tick").attr("aria-label",(function(t){return t})),C.selectAll("g.tick").attr("aria-label",(function(t){return t})),h!==E.NONE&&s===O.LABELS&&!l){var nt=this.model.getDataValuesGroupedByKeys();if(nt.length>0){var rt=nt.map((function(t){return t.sharedStackKey})),it=m.select("g.axis."+i+" g.ticks g.tick").html();T.selectAll("g.ticks g.tick").html(it),T.selectAll("g.tick text").data(rt).text((function(t){return t.length>f?aa.truncateLabel(t,h,d):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(rt).text((function(t){return t.length>f?aa.truncateLabel(t,h,d):t})),T.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),T.selectAll("g.tick text").data(rt)}}this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=yf.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=aa.getProperty(r,"axes",e),a=aa.getProperty(i,"scaleType"),o=aa.getProperty(i,"truncation","threshold"),s=(this.scaleType===O.TIME||(i.scaleType,O.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(G.Axis.LABEL_MOUSEOVER,{element:ca(this),datum:t}),a===O.LABELS&&t.length>o&&s.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:ca(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(G.Axis.LABEL_MOUSEMOVE,{element:ca(this),datum:t}),a===O.LABELS&&t.length>o&&s.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(G.Axis.LABEL_CLICK,{element:ca(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(G.Axis.LABEL_MOUSEOUT,{element:ca(this),datum:t}),a===O.LABELS&&s.services.events.dispatchEvent(G.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 aa.clamp(r,2,Ma.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;yf.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(ig),fv=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(x),i=aa.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[x[t]]&&(n[x[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=x[t];if(e.configs.axes[n]&&!e.children[n]){var r=new hv(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 a={};Object.keys(this.children).forEach((function(n){var r,i=e.children[n],o=i.configs.position,s=i.getInvisibleAxisRef(),u=yf.getSVGElementSize(s,{useBBox:!0}),c=u.width,l=u.height;switch(r=i.getTitleRef().empty()?0:yf.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,o){case x.TOP:a.top=l+r;break;case x.BOTTOM:a.bottom=l+r;break;case x.LEFT:a.left=c+r;break;case x.RIGHT:a.right=c+r}e.addAxisThresholds(t,o)})),Object.keys(a).some((function(t){return e.margins[t]!==a[t]}))&&(this.margins=Object.assign(this.margins,a),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(G.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=aa.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new mg(n.model,n.services,y(y({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(ig);function dv(){Ki.preventDefault(),Ki.stopImmediatePropagation()}function pv(t){var e=t.document.documentElement,n=ca(t).on("dragstart.drag",dv,!0);"onselectstart"in e?n.on("selectstart.drag",dv,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function gv(t,e){var n=t.document.documentElement,r=ca(t).on("dragstart.drag",null);e&&(r.on("click.drag",dv,!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 vv(t){return function(){return t}}function mv(t,e,n){this.target=t,this.type=e,this.selection=n}function yv(){Ki.stopImmediatePropagation()}function _v(){Ki.preventDefault(),Ki.stopImmediatePropagation()}var bv={name:"drag"},xv={name:"space"},wv={name:"handle"},Ev={name:"center"};function Sv(t){return[+t[0],+t[1]]}function Ov(t){return[Sv(t[0]),Sv(t[1])]}function Tv(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=la().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return ha(t,r);return null}(e,Ki.touches,t)}}var Mv={name:"x",handles:["w","e"].map(Lv),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]]}},Av={name:"y",handles:["n","s"].map(Lv),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]]}},Cv={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"},Pv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},Dv={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},kv={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Rv={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Lv(t){return{type:t}}function Iv(){return!Ki.ctrlKey&&!Ki.button}function Nv(){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 Vv(){return navigator.maxTouchPoints||"ontouchstart"in this}function Uv(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Gv(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Bv(){return function(t){var e,n=Nv,r=Iv,i=Vv,a=!0,o=xf("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([Lv("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Cv.overlay).merge(n).each((function(){var t=Uv(this).extent;ca(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([Lv("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Cv.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 Cv[t.type]})),e.each(c).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 c(){var t=ca(this),e=Uv(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 l(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||Ki.touches)&&r.apply(this,arguments)){var n,i,o,s,u,h,f,d,p,g,v,m=this,y=Ki.target.__data__.type,_="selection"===(a&&Ki.metaKey?y="overlay":y)?bv:a&&Ki.altKey?Ev:wv,b=t===Av?null:kv[y],x=t===Mv?null:Rv[y],w=Uv(m),E=w.extent,S=w.selection,O=E[0][0],T=E[0][1],M=E[1][0],A=E[1][1],C=0,P=0,D=b&&x&&a&&Ki.shiftKey,k=Ki.touches?Tv(Ki.changedTouches[0].identifier):fa,R=k(m),L=R,I=l(m,arguments,!0).beforestart();"overlay"===y?(S&&(p=!0),w.selection=S=[[n=t===Av?O:R[0],o=t===Mv?T:R[1]],[u=t===Av?M:n,f=t===Mv?A:o]]):(n=S[0][0],o=S[0][1],u=S[1][0],f=S[1][1]),i=n,s=o,h=u,d=f;var N=ca(m).attr("pointer-events","none"),V=N.selectAll(".overlay").attr("cursor",Cv[y]);if(Ki.touches)I.moved=G,I.ended=H;else{var U=ca(Ki.view).on("mousemove.brush",G,!0).on("mouseup.brush",H,!0);a&&U.on("keydown.brush",j,!0).on("keyup.brush",z,!0),pv(Ki.view)}yv(),Kf(m),c.call(m),I.start()}function G(){var t=k(m);!D||g||v||(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1])?v=!0:g=!0),L=t,p=!0,_v(),B()}function B(){var t;switch(C=L[0]-R[0],P=L[1]-R[1],_){case xv:case bv:b&&(C=Math.max(O-n,Math.min(M-u,C)),i=n+C,h=u+C),x&&(P=Math.max(T-o,Math.min(A-f,P)),s=o+P,d=f+P);break;case wv:b<0?(C=Math.max(O-n,Math.min(M-n,C)),i=n+C,h=u):b>0&&(C=Math.max(O-u,Math.min(M-u,C)),i=n,h=u+C),x<0?(P=Math.max(T-o,Math.min(A-o,P)),s=o+P,d=f):x>0&&(P=Math.max(T-f,Math.min(A-f,P)),s=o,d=f+P);break;case Ev:b&&(i=Math.max(O,Math.min(M,n-C*b)),h=Math.max(O,Math.min(M,u+C*b))),x&&(s=Math.max(T,Math.min(A,o-P*x)),d=Math.max(T,Math.min(A,f+P*x)))}h<i&&(b*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in Pv&&V.attr("cursor",Cv[y=Pv[y]])),d<s&&(x*=-1,t=o,o=f,f=t,t=s,s=d,d=t,y in Dv&&V.attr("cursor",Cv[y=Dv[y]])),w.selection&&(S=w.selection),g&&(i=S[0][0],h=S[1][0]),v&&(s=S[0][1],d=S[1][1]),S[0][0]===i&&S[0][1]===s&&S[1][0]===h&&S[1][1]===d||(w.selection=[[i,s],[h,d]],c.call(m),I.brush())}function H(){if(yv(),Ki.touches){if(Ki.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else gv(Ki.view,p),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),V.attr("cursor",Cv.overlay),w.selection&&(S=w.selection),Gv(S)&&(w.selection=null,c.call(m)),I.end()}function j(){switch(Ki.keyCode){case 16:D=b&&x;break;case 18:_===wv&&(b&&(u=h-C*b,n=i+C*b),x&&(f=d-P*x,o=s+P*x),_=Ev,B());break;case 32:_!==wv&&_!==Ev||(b<0?u=h-C:b>0&&(n=i-C),x<0?f=d-P:x>0&&(o=s-P),_=xv,V.attr("cursor",Cv.selection),B());break;default:return}_v()}function z(){switch(Ki.keyCode){case 16:D&&(g=v=D=!1,B());break;case 18:_===Ev&&(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=wv,B());break;case 32:_===xv&&(Ki.altKey?(b&&(u=h-C*b,n=i+C*b),x&&(f=d-P*x,o=s+P*x),_=Ev):(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=wv),V.attr("cursor",Cv[y]),B());break;default:return}_v()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=Ov(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Ns(a,o);function u(t){r.selection=1===t&&null===o?null:s(t),c.call(e),i.brush()}return null!==a&&null!==o?u:u(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();Kf(e),i.selection=null===a?null:a,c.call(e),o.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=Ki;t.sourceEvent=Ki,Ki=t;try{e.apply(n,r)}finally{Ki=i}}(new mv(u,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:vv(Ov(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:vv(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:vv(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(a=!!t,u):a},u.on=function(){var t=o.on.apply(o,arguments);return t===o?u:t},u}(Mv)}var Hv=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(),a=yf.appendOrSelect(r,"svg.chart-grid-backdrop"),o=yf.appendOrSelect(a,"g."+this.type),s=yf.appendOrSelect(o,this.selectionSelector),u=yf.getSVGElementSize(a,{useAttrs:!0}),c=u.width,l=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=yf.appendOrSelect(i,this.frontSelectionSelector);if(d&&f===O.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain(),this.model.set({zoomDomain:m},{animate:!1}));var y=Bv().extent([[0,0],[c-1,l]]).on("start brush end",(function(){var t=Ki.selection;if(null!==t){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(l/e.DASH_LENGTH),a=i*e.DASH_LENGTH,o=0;o<i;o++)r+=","+e.DASH_LENGTH;r+=","+(l-a),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+l.toString(),v.attr("stroke-dasharray",r)}(t);var r=gl().range([0,c]).domain(m),i=[r.invert(t[0]),r.invert(t[1])];if(null!=t&&null!=Ki.sourceEvent&&("mousemove"===Ki.sourceEvent.type||"mouseup"===Ki.sourceEvent.type||"mousedown"===Ki.sourceEvent.type||"touchstart"===Ki.sourceEvent.type||"touchmove"===Ki.sourceEvent.type||"touchend"===Ki.sourceEvent.type)){var a=void 0;"start"===Ki.type?a=G.ZoomBar.SELECTION_START:"brush"===Ki.type?a=G.ZoomBar.SELECTION_IN_PROGRESS:"end"===Ki.type&&(a=G.ZoomBar.SELECTION_END),n.services.events.dispatchEvent(a,{selection:t,newDomain:i})}}})).on("end.brushed",(function(){var t=Ki.selection;if(null!==t){var e=gl().range([0,c]).domain(m),r=[e.invert(t[0]),e.invert(t[1])];r[0].valueOf()===r[1].valueOf()&&(r=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===r[0].valueOf()&&m[1].valueOf()===r[1].valueOf()||n.model.set({zoomDomain:r},{animate:!1}),o.call(y.move,null),v.style("display","none")}}));o.call(y)}},e.DASH_LENGTH=4,e}(ig),jv=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(),a=i[0],o=i[1],s=r.range(),u=s[0],c=s[1];this.chartClipPath=yf.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var l=yf.appendOrSelect(this.chartClipPath,"rect."+this.type);l.attr("x",a).attr("y",c).attr("width",o-a).attr("height",u-c),this.chartClipPath.merge(l).lower()},e}(ig),zv=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=aa.getProperty(this.model.getOptions(),"grid","x","enabled"),n=aa.getProperty(this.model.getOptions(),"grid","y","enabled");(e||n)&&(this.drawBackdrop(e,n),e&&(yf.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(yf.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=cv(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=aa.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var a=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=lv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=aa.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var a=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(aa.getTranslationValues(t).tx)-Number(aa.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+aa.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var a,o=r[i],s=r[e];if(o)if(s)a=+aa.getTranslationValues(s).tx-+aa.getTranslationValues(o).tx;else{var u=n.select("rect.chart-grid-backdrop").node();a=yf.getSVGElementSize(u).width-+aa.getTranslationValues(o).tx}else a=+aa.getTranslationValues(s).tx;return a*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=aa.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=aa.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(t,e){var n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),a=r.range(),o=a[0],s=a[1],u=i.range(),c=u[0],l=u[1];this.backdrop=yf.appendOrSelect(n,"svg.chart-grid-backdrop");var h=yf.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",o).attr("y",l).attr("width",s-o).attr("height",c-l).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}(ig);var Fv,Wv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.isXGridEnabled=aa.getProperty(e.model.getOptions(),"grid","x","enabled"),e.isYGridEnabled=aa.getProperty(e.model.getOptions(),"grid","y","enabled"),e}return n(e,t),e.prototype.render=function(){this.drawBackdrop(),this.addBackdropEventListeners()},e.prototype.formatTooltipData=function(t){return t},e.prototype.showRuler=function(t){var e=this,n=t[0],r=t[1],i=this.parent,a=this.services.cartesianScales.getOrientation(),o=a===S.HORIZONTAL?r:n,s=yf.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=yf.appendOrSelect(s,"line.ruler-line"),c=i.selectAll("[role=graphics-symbol]"),l=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=l.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,o)}));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(G.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(o-e.domainValue),i=Math.abs(o-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})),_=c.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!aa.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent(G.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(m)}),s.attr("opacity",1);var b=g[0];"horizontal"===a?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=yf.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(G.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){var t=this,e=this.model.getDisplayData(),n=function(){var e=fa(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=aa.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],a=r[1],o=n.range(),s=o[0],u=o[1];this.backdrop=yf.appendOrSelect(t,"svg.chart-grid-backdrop");var c=yf.appendOrSelect(this.backdrop,this.isXGridEnabled||this.isYGridEnabled?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",i).attr("y",u).attr("width",a-i).attr("height",s-u).lower(),c.attr("width","100%").attr("height","100%")},e}(ig),Yv=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=yf.appendOrSelect(t,"g.ruler");this.services.events.dispatchEvent(G.Tooltip.HIDE),e.attr("opacity",0)},e}(Wv),qv=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(),a=this.services.cartesianScales.getDomainScale().range(),o=a[0],s=a[1],u=+this.services.cartesianScales.getRangeValue(0)+.5;if(!u){var c=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(c).range()[0]}var l=aa.flipSVGCoordinatesBasedOnOrientation({x0:o,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());yf.appendOrSelect(i,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",l.y0).attr("y2",l.y1).attr("x1",l.x0).attr("x2",l.x1)}},e}(ig),Xv=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=Bv(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(G.ZoomBar.UPDATE,this.render.bind(this))},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=aa.getProperty(r,"data","loading"),a=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),o=Na.height[a],s=yf.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=0,c=this.model.get("axesMargins");c&&c.left&&(u=c.left);var l=yf.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);yf.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",Na.spacerHeight).attr("opacity",1).attr("fill","none");if(a===w.GRAPH_VIEW?yf.appendOrSelect(l,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",s-u).attr("height","100%"):a===w.SLIDER_VIEW&&yf.appendOrSelect(l,"rect.zoom-slider-bg").attr("x",u).attr("y",o/2-1).attr("width",s-u).attr("height",2),!i){var h=this.services.cartesianScales,f=h.getMainXScale(),d=h.getMainYScale(),p=h.getMainXScaleType();if(f&&p===O.TIME){var g=this.services.zoom.getZoomBarData();this.xScale=f.copy(),this.yScale=d.copy();var v=this.services.zoom.getDefaultZoomBarDomain();this.compensateDataForDefaultDomain(g,v);var m=this.model.get("initialZoomDomain"),y=aa.getProperty(this.model.getOptions(),"zoomBar","top","initialZoomDomain");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,o-6]).domain(Ro(g,(function(t){return t.value})));var _=this.model.get("zoomDomain");if(a===w.GRAPH_VIEW){this.renderZoomBarArea(l,"path.zoom-graph-area-unselected",g,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(l,"path.zoom-graph-area",g,this.clipId);var b=Yl()([[u,o],[s,o]]);yf.appendOrSelect(l,"path.zoom-bg-baseline").attr("d",b)}this.addBrushEventListener(_,u,s);var x=yf.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 E=_.map((function(t){return e.xScale(t)}));E[1]-E[0]<this.MIN_SELECTION_DIFF||(x.call(this.brush.move,E),this.updateBrushHandle(this.getContainerSVG(),E,_))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),a=Na.height[i];this.brush.extent([[e,0],[n,a]]).on("start brush end",null).on("start brush end",(function(){var e=Ki.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!=Ki.sourceEvent&&("mousemove"===Ki.sourceEvent.type||"mouseup"===Ki.sourceEvent.type||"mousedown"===Ki.sourceEvent.type||"touchstart"===Ki.sourceEvent.type||"touchmove"===Ki.sourceEvent.type||"touchend"===Ki.sourceEvent.type)){void 0!==t&&t[0]===r[0]&&t[1]===r[1]||this.model.set({zoomDomain:r},{animate:!1});var i=void 0;"start"===Ki.type?i=G.ZoomBar.SELECTION_START:"brush"===Ki.type?i=G.ZoomBar.SELECTION_IN_PROGRESS:"end"===Ki.type&&(i=G.ZoomBar.SELECTION_END),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),a=Na.height[i],o=i===w.GRAPH_VIEW?12:6,s=(a-o)/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]+-2.5,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+-2.5,r.maxSelectionRange[1]-5):void 0})).attr("y",0).attr("width",5).attr("height",a).attr("cursor","ew-resize").style("display",null);var u=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);u.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),u.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+-.5,r.maxSelectionRange[0]- -2.5-.5):"e"===t.type?Math.min(e[1]+-.5,r.maxSelectionRange[1]+-2.5+-.5):void 0})).attr("y",s).attr("width",1).attr("height",o).attr("cursor","ew-resize"),i===w.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],a)},e.prototype.updateSliderSelectedArea=function(t){var e=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),n=Na.height[e],r=(yf.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getContainerSVG().select("svg.zoom-container");yf.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,a=i.getMainXAxisPosition(),o=i.getMainYAxisPosition(),s=i.getMainXScaleType(),u=i.getMainYScaleType(),c=function(t,e,n){return function(r,a){return i.getValueFromScale(t,e,n,r,a)}},l=c(this.xScale,s,a),h=c(this.yScale,u,o),f=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),d=Na.height[f],p=ql().x((function(t,e){return l(t,e)})).y0(d).y1((function(t,e){return d-h(t,e)})),g=yf.appendOrSelect(t,e).datum(n).attr("d",p);r&&g.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,a){var o=yf.appendOrSelect(t,"clipPath").attr("id",e);yf.appendOrSelect(o,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",a)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(t[0][r]))(n={})[r]=e[0],n[i]=0,t.unshift(n);if(Number(e[1])>Number(t[t.length-1][r]))(n={})[r]=e[1],n[i]=0,t.push(n)}},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(G.ZoomBar.UPDATE,this.render.bind(this))},e}(ig),Zv=function(){function t(t,e){this.services={domUtils:yf,events:_f,transitions:Dd},this.model=new Yh(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(G.Model.UPDATE,(function(t){var e=!!aa.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(G.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(G.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 yg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},n={id:"legend",components:[new ag(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},r={id:"graph-frame",components:t,growth:{x:P.STRETCH,y:P.FIXED}},i=!1!==this.model.getOptions().legend.enabled,a=C.COLUMN;if(i){var o=aa.getProperty(this.model.getOptions(),"legend","position");"left"===o?(a=C.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):"right"===o?(a=C.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):"bottom"===o&&(a=C.COLUMN_REVERSE)}var s={id:"spacer",components:[new Vg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},u={id:"full-frame",components:[new Qg(this.model,this.services,_(i?[n]:[],i?[s]:[],[r]),{direction:a})],growth:{x:P.STRETCH,y:P.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Vg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}};c.push(l)}return c.push(u),[new bg(this.model,this.services),new Qg(this.model,this.services,c,{direction:C.COLUMN})]},t}(),Kv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:Jp,curves:ng,zoom:rg}),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e=aa.getProperty(this.model.getOptions(),"zoomBar","top","enabled");this.services.cartesianScales.findDomainAndRangeAxes();var n=this.services.cartesianScales.getMainXAxisPosition(),r=aa.getProperty(this.model.getOptions(),"axes",n,"scaleType"),i=e&&n===x.BOTTOM&&r===O.TIME,a={id:"title",components:[new yg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},o={id:"legend",components:[new ag(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}};i&&t.push(new jv(this.model,this.services),new Hv(this.model,this.services));var s={id:"graph-frame",components:t,growth:{x:P.STRETCH,y:P.FIXED}},u=!1!==this.model.getOptions().legend.enabled,c=C.COLUMN;if(u){var l=aa.getProperty(this.model.getOptions(),"legend","position");l===T.LEFT?(c=C.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):l===T.RIGHT?(c=C.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):l===T.BOTTOM&&(c=C.COLUMN_REVERSE)}var h={id:"spacer",components:[new Vg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},f={id:"full-frame",components:[new Qg(this.model,this.services,_(u?[o]:[],u?[h]:[],[s]),{direction:c})],growth:{x:P.STRETCH,y:P.FIXED}},d={id:"zoom-bar",components:[new Xv(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},p=[];if(this.model.getOptions().title){p.push(a);var g={id:"spacer",components:[new Vg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}};p.push(g)}return i&&p.push(d),p.push(f),[new xg(this.model,this.services),new Qg(this.model,this.services,p,{direction:C.COLUMN})]},e}(Zv),$v=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(aa.clone(eo.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new fv(this.model,this.services),new zv(this.model,this.services),new Wv(this.model,this.services),new Pg(this.model,this.services),new wg(this.model,this.services),new Ag(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}(Kv),Qv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(eo.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new fv(this.model,this.services),new zv(this.model,this.services),new Wv(this.model,this.services),new Eg(this.model,this.services),new Pg(this.model,this.services,{stacked:!0}),new Dg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}(Kv),Jv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(eo.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new fv(this.model,this.services),new zv(this.model,this.services),new Og(this.model,this.services),new qv(this.model,this.services),new Ng(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Kv),tm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(eo.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new fv(this.model,this.services),new zv(this.model,this.services),new Tg(this.model,this.services),new qv(this.model,this.services),new Ng(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Kv),em=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(eo.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new fv(this.model,this.services),new zv(this.model,this.services),new Yv(this.model,this.services),new Mg(this.model,this.services),new Ng(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}(Kv),nm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(eo.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new fv(this.model,this.services),new zv(this.model,this.services),new Wv(this.model,this.services),new Cg(this.model,this.services),new Ng(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}(Kv),rm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(eo.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new fv(this.model,this.services),new zv(this.model,this.services),new Wv(this.model,this.services),new Pg(this.model,this.services),new Ag(this.model,this.services,{handleThresholds:!0}),new Ng(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}(Kv),im=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(eo.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new fv(this.model,this.services),new zv(this.model,this.services),new Wv(this.model,this.services),new Ag(this.model,this.services),new Ng(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}(Kv),am=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}(Yh),om=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new am(i.services),r?i:(i.model.setOptions(aa.mergeDefaultChartOptions(eo.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Rg(this.model,this.services),new Ng(this.model,this.services,{skeleton:k.PIE})];return this.getChartComponents(t)},e}(Zv),sm=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(eo.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ig(this.model,this.services),new Ng(this.model,this.services,{skeleton:k.DONUT})];return this.getChartComponents(t)},e}(om),um=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]=Aa.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=aa.getProperty(n,"color","scale"),i=this.getStatus();return r||!i?t.prototype.getFillColor.call(this,e):null},e.prototype.getStatus=function(){var t=this.getOptions(),e=this.getDisplayData().value,n=e>100?100:e,r=aa.getProperty(t,"meter","status","ranges");if(r){var i=r.filter((function(t){return t.range[0]<=n&&n<=t.range[1]}));if(i.length>0)return i[0].status}return null},e}(Yh),cm=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){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getOptions(),a=this.model.getDisplayData(),o=this.model.getStatus(),s=yf.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=i.data.groupMapsTo,c=xu().domain([0,100]).range([0,s]);yf.appendOrSelect(n,"rect.container").attr("x",0).attr("y",0).attr("width",s).attr("height",aa.getProperty(i,"meter","height"));var l=a.value>=100,h=n.selectAll("rect.value").data([a]),f=aa.getProperty(i,"color","scale");h.enter().append("rect").classed("value",!0).merge(h).attr("x",0).attr("y",0).attr("height",aa.getProperty(i,"meter","height")).attr("class",null==o||f?"":"value status--"+o).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(l?100:t.value)})).attr("fill",(function(t){return e.model.getFillColor(t[u])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var d=aa.getProperty(i,"meter","peak"),p=null!==d&&d<a.value?a.value:d,g=null===p||l?[]:[p],v=n.selectAll("line.peak").data(g);v.enter().append("line").classed("peak",!0).merge(v).attr("y1",0).attr("y2",aa.getProperty(i,"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})),v.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(ig),lm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new um(r.services),r.model.setOptions(aa.merge(aa.clone(eo.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new cm(this.model,this.services)],growth:{x:P.STRETCH,y:P.FIXED}},e={id:"title",components:[new _g(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},n={id:"spacer",components:[new Vg(this.model,this.services,{size:8})],growth:{x:P.PREFERRED,y:P.FIXED}},r=[new Qg(this.model,this.services,[e,n,t],{direction:C.COLUMN})];return this.getChartComponents(r)},e}(Zv);function hm(t){var e,n=(dm(t)%(e=360)+e)%e;return fm(n,[0,10])||fm(n,[350,0])?{textAnchor:R.START,dominantBaseline:L.MIDDLE}:fm(n,[10,80])?{textAnchor:R.START,dominantBaseline:L.HANGING}:fm(n,[80,100])?{textAnchor:R.MIDDLE,dominantBaseline:L.HANGING}:fm(n,[100,170])?{textAnchor:R.END,dominantBaseline:L.HANGING}:fm(n,[170,190])?{textAnchor:R.END,dominantBaseline:L.MIDDLE}:fm(n,[190,260])?{textAnchor:R.END,dominantBaseline:L.BASELINE}:fm(n,[260,280])?{textAnchor:R.MIDDLE,dominantBaseline:L.BASELINE}:{textAnchor:R.START,dominantBaseline:L.BASELINE}}function fm(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function dm(t){return t*(180/Math.PI)}function pm(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 gm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=yf.appendOrSelect(e.getContainerSVG(),"g.tmp-tick"),r=yf.appendOrSelect(n,"text").text(t),i=yf.getSVGElementSize(r.node(),{useBBox:!0}),a=i.width,o=i.height;return n.remove(),{width:a,height:o}},e.normalizeFlatData=function(t){var n=e.model.getOptions(),r=aa.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=aa.getProperty(n,"data","groupMapsTo"),s=aa.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[o]=e,n[a]=null,n}))})));return aa.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=aa.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=aa.getProperty(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[o]=n,e[i]=t,e[a]=null,e}));return{name:n,data:aa.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?ka.opacity.unselected:ka.opacity.selected}))},e.handleLegendMouseOut=function(t){var n=aa.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",aa.getProperty(n,"selected"))},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=yf.getSVGElementSize(this.parent,{useAttrs:!0}),a=i.width,o=i.height,s=this.model.getData(),u=this.model.getDisplayData(),c=this.model.getGroupedData(),l=this.model.getOptions(),h=aa.getProperty(l,"radar","axes"),f=h.angle,d=h.value,p=aa.getProperty(l,"data","groupMapsTo"),g=ka.xLabelPadding,v=ka.yLabelPadding,m=ka.yTicksNumber,y=ka.minRange,_=ka.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(c);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),x=(Math.min(a,o)-b)/2;if(!(x<=0)){var w=Xo().domain(this.displayDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),E=xu().domain([0,Ho(this.displayDataNormalized.map((function(t){return t[d]})))]).range([y,x]).nice(m),S=E.ticks(m),O=function(t){return e.model.getFillColor(t)},T=Jl().angle((function(t){return w(t[f])+Math.PI/2})).radius((function(t){return E(t[d])})).curve(Th),M=Jl().angle(T.angle()).radius((function(t){return Fv?Fv(t[d]):y})).curve(T.curve()),A={x:Ho(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=w(t),x*Math.sin(n-Math.PI/2))})))+g,y:o/2},C=yf.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}))};C.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+A.x+", "+A.y+")").attr("fill","none").attr("d",(function(t){return M(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 T(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("+A.x+", "+A.y+")").attr("d",(function(t){return T(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 T(P(t))})).attr("opacity",0).remove()}))})),yf.appendOrSelect(n,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+aa.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return pm(w(t),0,A).x})).attr("y1",(function(t){return pm(w(t),0,A).y})).attr("x2",(function(t){return pm(w(t),0,A).x})).attr("y2",(function(t){return pm(w(t),0,A).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return pm(w(t),E.range()[0],A).x})).attr("y1",(function(t){return pm(w(t),E.range()[0],A).y})).attr("x2",(function(t){return pm(w(t),E.range()[1],A).x})).attr("y2",(function(t){return pm(w(t),E.range()[1],A).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 pm(w(t),E.range()[0],A).x})).attr("y1",(function(t){return pm(w(t),E.range()[0],A).y})).attr("x2",(function(t){return pm(w(t),E.range()[1],A).x})).attr("y2",(function(t){return pm(w(t),E.range()[1],A).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),yf.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 pm(w(t),E.range()[1]+g,A).x})).attr("y",(function(t){return pm(w(t),E.range()[1]+g,A).y})).style("text-anchor",(function(t){return hm(w(t)).textAnchor})).style("dominant-baseline",(function(t){return hm(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 pm(w(t),E.range()[1]+g,A).x})).attr("y",(function(t){return pm(w(t),E.range()[1]+g,A).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),yf.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","blob").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+A.x+", "+A.y+")").attr("fill",(function(t){return O(t.name)})).style("fill-opacity",ka.opacity.selected).attr("stroke",(function(t){return O(t.name)})).attr("d",(function(t){return M(t.data)})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_enter",t)).attr("opacity",1).attr("d",(function(t){return T(t.data)}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+A.x+", "+A.y+")").attr("d",(function(t){return T(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 T(t.data)})).attr("opacity",0).remove()}))})),yf.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 aa.kebabCase(t[f])})).attr("cx",(function(t){return pm(w(t[f]),E(t[d]),A).x})).attr("cy",(function(t){return pm(w(t[f]),E(t[d]),A).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return O(t[p])})),yf.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",A.x).attr("y",A.y-_/2).attr("width",E.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+dm(w(t))+", "+A.x+", "+A.y+")"})),yf.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(Ro(S)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return pm(-Math.PI/2,E(t),A).x+v})).attr("y",(function(t){return pm(-Math.PI/2,E(t),A).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 pm(-Math.PI/2,E(t),A).x+v})).attr("y",(function(t){return pm(-Math.PI/2,E(t),A).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 D=aa.getProperty(l,"radar","alignment"),k=yf.getAlignmentOffset(D,n,this.getParent());n.attr("transform","translate("+k+", 0)"),this.addEventListeners(),Fv=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=aa.getProperty(this.model.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n){var r=ca(this);t.services.events.dispatchEvent(G.Radar.X_AXIS_MOUSEOVER,{element:r,datum:n});var i=t.parent.select(".x-axes .x-axis-"+aa.kebabCase(n)),a=t.parent.selectAll(".dots circle."+aa.kebabCase(n));i.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",ka.dotsRadius);var o=t.displayDataNormalized.filter((function(t){return t[e]===n})),s=t.model.getOptions(),u=s.data.groupMapsTo,c=aa.getProperty(s,"radar","axes","value");t.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:r,items:o.filter((function(t){return"number"==typeof t[c]})).map((function(e){return{label:e[u],value:e[c],color:t.model.getStrokeColor(e[u])}}))})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(G.Radar.X_AXIS_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this),r=t.parent.select(".x-axes .x-axis-"+aa.kebabCase(e)),i=t.parent.selectAll(".dots circle."+aa.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(G.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.HIDE)}))},e}(ig),vm=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return r?i:(i.model.setOptions(aa.mergeDefaultChartOptions(eo.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new gm(this.model,this.services)];return this.getChartComponents(t)},e}(Zv),mm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(eo.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Lg(this.model,this.services)];return this.getChartComponents(t)},e}(Zv),ym=So;t.AreaChart=$v,t.BubbleChart=nm,t.DonutChart=sm,t.GaugeChart=mm,t.GroupedBarChart=tm,t.LineChart=rm,t.MeterChart=lm,t.PieChart=om,t.RadarChart=vm,t.ScatterChart=im,t.SimpleBarChart=Jv,t.StackedAreaChart=Qv,t.StackedBarChart=em,t.colorPalettes=Oo,t.configurations=no,t.defaultColors=ym,t.interfaces=B,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,a,o,s,u,c,l,h,f,d,p,g,v,m,y=function(){return(y=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 _(){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 a=arguments[e],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];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"}(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"}(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"}(o||(o={})),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"}(s||(s={})),function(t){t.AREA_MOUSEOVER="area-mouseover",t.AREA_MOUSEMOVE="area-mousemove",t.AREA_CLICK="area-click",t.AREA_MOUSEOUT="area-mouseout"}(u||(u={})),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"}(c||(c={})),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"}(l||(l={})),function(t){t.BAR_MOUSEOVER="bar-mouseover",t.BAR_MOUSEMOVE="bar-mousemove",t.BAR_CLICK="bar-click",t.BAR_MOUSEOUT="bar-mouseout"}(h||(h={})),function(t){t.SCATTER_MOUSEOVER="scatter-mouseover",t.SCATTER_MOUSEMOVE="scatter-mousemove",t.SCATTER_CLICK="scatter-click",t.SCATTER_MOUSEOUT="scatter-mouseout"}(f||(f={})),function(t){t.POINT_MOUSEOVER="scatter-mouseover",t.POINT_MOUSEMOVE="scatter-mousemove",t.POINT_CLICK="scatter-click",t.POINT_MOUSEOUT="scatter-mouseout"}(d||(d={})),function(t){t.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"}(p||(p={})),function(t){t.SHOW="show-tooltip",t.MOVE="move-tooltip",t.HIDE="hide-tooltip"}(g||(g={})),function(t){t.SHOW="show-threshold",t.HIDE="hide-threshold"}(v||(v={})),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"}(m||(m={}));var b,x,w,E,S,O,T,M,A,C,P,D,k,L,R,I,N,V,U,G=Object.freeze({__proto__:null,get Chart(){return i},get Model(){return a},get ZoomBar(){return o},get Axis(){return s},get Area(){return u},get Pie(){return c},get Gauge(){return l},get Bar(){return h},get Scatter(){return f},get Line(){return d},get Radar(){return p},get Tooltip(){return g},get Threshold(){return v},get Legend(){return m}});!function(t){t.DEFAULT="default",t.G100="g100",t.G90="g90",t.G10="g10"}(b||(b={})),function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(x||(x={})),function(t){t.GRAPH_VIEW="graph_view",t.SLIDER_VIEW="slider_view"}(w||(w={})),function(t){t.END_LINE="end_line",t.MID_LINE="mid_line",t.FRONT_LINE="front_line",t.NONE="none"}(E||(E={})),function(t){t.VERTICAL="vertical",t.HORIZONTAL="horizontal"}(S||(S={})),function(t){t.TIME="time",t.LINEAR="linear",t.LOG="log",t.LABELS="labels"}(O||(O={})),function(t){t.RIGHT="right",t.LEFT="left",t.TOP="top",t.BOTTOM="bottom"}(T||(T={})),function(t){t.LEFT="left",t.CENTER="center",t.RIGHT="right"}(M||(M={})),function(t){t.HORIZONTAL="horizontal",t.VERTICAL="vertical"}(A||(A={})),function(t){t.ROW="row",t.COLUMN="column",t.ROW_REVERSE="row-reverse",t.COLUMN_REVERSE="column-reverse"}(C||(C={})),function(t){t.FIXED="fixed",t.PREFERRED="preferred",t.STRETCH="stretch"}(P||(P={})),function(t){t.LEFT="left",t.RIGHT="right"}(D||(D={})),function(t){t.GRID="grid",t.VERT_OR_HORIZ="vertOrHoriz",t.PIE="pie",t.DONUT="donut"}(k||(k={})),function(t){t.START="start",t.MIDDLE="middle",t.END="end"}(L||(L={})),function(t){t.BASELINE="baseline",t.MIDDLE="middle",t.HANGING="hanging"}(R||(R={})),function(t){t.SEMI="semi",t.FULL="full"}(I||(I={})),function(t){t.UP="up",t.DOWN="down"}(N||(N={})),function(t){t.SUCCESS="success",t.WARNING="warning",t.DANGER="danger"}(V||(V={})),function(t){t.ALWAYS="always",t.AUTO="auto",t.NEVER="never"}(U||(U={}));var B=Object.freeze({__proto__:null,get Roles(){return r},Events:G,get ChartTheme(){return b},get AxisPositions(){return x},get ZoomBarTypes(){return w},get TruncationTypes(){return E},get CartesianOrientations(){return S},get ScaleTypes(){return O},get LegendPositions(){return T},get Alignments(){return M},get LegendOrientations(){return A},get LayoutDirection(){return C},get LayoutGrowth(){return P},get CalloutDirections(){return D},get Skeletons(){return k},get TextAnchor(){return L},get DominantBaseline(){return R},get GaugeTypes(){return I},get ArrowDirections(){return N},get Statuses(){return V},get TickRotations(){return U}}),H="object"==typeof global&&global&&global.Object===Object&&global,j="object"==typeof self&&self&&self.Object===Object&&self,z=H||j||Function("return this")(),F=z.Symbol,W=Object.prototype,Y=W.hasOwnProperty,q=W.toString,X=F?F.toStringTag:void 0;var Z=Object.prototype.toString;var K=F?F.toStringTag:void 0;function $(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":K&&K in Object(t)?function(t){var e=Y.call(t,X),n=t[X];try{t[X]=void 0;var r=!0}catch(t){}var i=q.call(t);return r&&(e?t[X]=n:delete t[X]),i}(t):function(t){return Z.call(t)}(t)}function Q(t){return null!=t&&"object"==typeof t}function J(t){return"symbol"==typeof t||Q(t)&&"[object Symbol]"==$(t)}function tt(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 et=Array.isArray,nt=F?F.prototype:void 0,rt=nt?nt.toString:void 0;function it(t){if("string"==typeof t)return t;if(et(t))return tt(t,it)+"";if(J(t))return rt?rt.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function at(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var ot=/^\s+|\s+$/g,st=/^[-+]0x[0-9a-f]+$/i,ut=/^0b[01]+$/i,ct=/^0o[0-7]+$/i,lt=parseInt;function ht(t){if("number"==typeof t)return t;if(J(t))return NaN;if(at(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=at(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(ot,"");var n=ut.test(t);return n||ct.test(t)?lt(t.slice(2),n?2:8):st.test(t)?NaN:+t}function ft(t){return t}function dt(t){if(!at(t))return!1;var e=$(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var pt,gt=z["__core-js_shared__"],vt=(pt=/[^.]+$/.exec(gt&&gt.keys&&gt.keys.IE_PROTO||""))?"Symbol(src)_1."+pt:"";var mt=Function.prototype.toString;function yt(t){if(null!=t){try{return mt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var _t=/^\[object .+?Constructor\]$/,bt=Function.prototype,xt=Object.prototype,wt=bt.toString,Et=xt.hasOwnProperty,St=RegExp("^"+wt.call(Et).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Ot(t){return!(!at(t)||(e=t,vt&&vt in e))&&(dt(t)?St:_t).test(yt(t));var e}function Tt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Ot(n)?n:void 0}var Mt=Tt(z,"WeakMap"),At=Object.create,Ct=function(){function t(){}return function(e){if(!at(e))return{};if(At)return At(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function Pt(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 Dt(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}var kt=Date.now;var Lt=function(){try{var t=Tt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Rt=function(t){var e=0,n=0;return function(){var r=kt(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(Lt?function(t,e){return Lt(t,"toString",{configurable:!0,enumerable:!1,value:(n=e,function(){return n}),writable:!0});var n}:ft);function It(t){return t!=t}function Nt(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,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}(t,It,n)}(t,e,0)>-1}var Vt=/^(?:0|[1-9]\d*)$/;function Ut(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Vt.test(t))&&t>-1&&t%1==0&&t<e}function Gt(t,e,n){"__proto__"==e&&Lt?Lt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function Bt(t,e){return t===e||t!=t&&e!=e}var Ht=Object.prototype.hasOwnProperty;function jt(t,e,n){var r=t[e];Ht.call(t,e)&&Bt(r,n)&&(void 0!==n||e in t)||Gt(t,e,n)}function zt(t,e,n,r){var i=!n;n||(n={});for(var a=-1,o=e.length;++a<o;){var s=e[a],u=r?r(n[s],t[s],s,n,t):void 0;void 0===u&&(u=t[s]),i?Gt(n,s,u):jt(n,s,u)}return n}var Ft=Math.max;function Wt(t,e){return Rt(function(t,e,n){return e=Ft(void 0===e?t.length-1:e,0),function(){for(var r=arguments,i=-1,a=Ft(r.length-e,0),o=Array(a);++i<a;)o[i]=r[e+i];i=-1;for(var s=Array(e+1);++i<e;)s[i]=r[i];return s[e]=n(o),Pt(t,this,s)}}(t,e,ft),t+"")}function Yt(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function qt(t){return null!=t&&Yt(t.length)&&!dt(t)}function Xt(t,e,n){if(!at(n))return!1;var r=typeof e;return!!("number"==r?qt(n)&&Ut(e,n.length):"string"==r&&e in n)&&Bt(n[e],t)}var Zt=Object.prototype;function Kt(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||Zt)}function $t(t){return Q(t)&&"[object Arguments]"==$(t)}var Qt=Object.prototype,Jt=Qt.hasOwnProperty,te=Qt.propertyIsEnumerable,ee=$t(function(){return arguments}())?$t:function(t){return Q(t)&&Jt.call(t,"callee")&&!te.call(t,"callee")};var ne="object"==typeof t&&t&&!t.nodeType&&t,re=ne&&"object"==typeof module&&module&&!module.nodeType&&module,ie=re&&re.exports===ne?z.Buffer:void 0,ae=(ie?ie.isBuffer:void 0)||function(){return!1},oe={};function se(t){return function(e){return t(e)}}oe["[object Float32Array]"]=oe["[object Float64Array]"]=oe["[object Int8Array]"]=oe["[object Int16Array]"]=oe["[object Int32Array]"]=oe["[object Uint8Array]"]=oe["[object Uint8ClampedArray]"]=oe["[object Uint16Array]"]=oe["[object Uint32Array]"]=!0,oe["[object Arguments]"]=oe["[object Array]"]=oe["[object ArrayBuffer]"]=oe["[object Boolean]"]=oe["[object DataView]"]=oe["[object Date]"]=oe["[object Error]"]=oe["[object Function]"]=oe["[object Map]"]=oe["[object Number]"]=oe["[object Object]"]=oe["[object RegExp]"]=oe["[object Set]"]=oe["[object String]"]=oe["[object WeakMap]"]=!1;var ue="object"==typeof t&&t&&!t.nodeType&&t,ce=ue&&"object"==typeof module&&module&&!module.nodeType&&module,le=ce&&ce.exports===ue&&H.process,he=function(){try{var t=ce&&ce.require&&ce.require("util").types;return t||le&&le.binding&&le.binding("util")}catch(t){}}(),fe=he&&he.isTypedArray,de=fe?se(fe):function(t){return Q(t)&&Yt(t.length)&&!!oe[$(t)]},pe=Object.prototype.hasOwnProperty;function ge(t,e){var n=et(t),r=!n&&ee(t),i=!n&&!r&&ae(t),a=!n&&!r&&!i&&de(t),o=n||r||i||a,s=o?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],u=s.length;for(var c in t)!e&&!pe.call(t,c)||o&&("length"==c||i&&("offset"==c||"parent"==c)||a&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||Ut(c,u))||s.push(c);return s}function ve(t,e){return function(n){return t(e(n))}}var me=ve(Object.keys,Object),ye=Object.prototype.hasOwnProperty;function _e(t){return qt(t)?ge(t):function(t){if(!Kt(t))return me(t);var e=[];for(var n in Object(t))ye.call(t,n)&&"constructor"!=n&&e.push(n);return e}(t)}var be=Object.prototype.hasOwnProperty;function xe(t){if(!at(t))return function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}(t);var e=Kt(t),n=[];for(var r in t)("constructor"!=r||!e&&be.call(t,r))&&n.push(r);return n}function we(t){return qt(t)?ge(t,!0):xe(t)}var Ee=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Se=/^\w*$/;function Oe(t,e){if(et(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!J(t))||(Se.test(t)||!Ee.test(t)||null!=e&&t in Object(e))}var Te=Tt(Object,"create");var Me=Object.prototype.hasOwnProperty;var Ae=Object.prototype.hasOwnProperty;function Ce(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Pe(t,e){for(var n=t.length;n--;)if(Bt(t[n][0],e))return n;return-1}Ce.prototype.clear=function(){this.__data__=Te?Te(null):{},this.size=0},Ce.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ce.prototype.get=function(t){var e=this.__data__;if(Te){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Me.call(e,t)?e[t]:void 0},Ce.prototype.has=function(t){var e=this.__data__;return Te?void 0!==e[t]:Ae.call(e,t)},Ce.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Te&&void 0===e?"__lodash_hash_undefined__":e,this};var De=Array.prototype.splice;function ke(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])}}ke.prototype.clear=function(){this.__data__=[],this.size=0},ke.prototype.delete=function(t){var e=this.__data__,n=Pe(e,t);return!(n<0)&&(n==e.length-1?e.pop():De.call(e,n,1),--this.size,!0)},ke.prototype.get=function(t){var e=this.__data__,n=Pe(e,t);return n<0?void 0:e[n][1]},ke.prototype.has=function(t){return Pe(this.__data__,t)>-1},ke.prototype.set=function(t,e){var n=this.__data__,r=Pe(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};var Le=Tt(z,"Map");function Re(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 Ie(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])}}Ie.prototype.clear=function(){this.size=0,this.__data__={hash:new Ce,map:new(Le||ke),string:new Ce}},Ie.prototype.delete=function(t){var e=Re(this,t).delete(t);return this.size-=e?1:0,e},Ie.prototype.get=function(t){return Re(this,t).get(t)},Ie.prototype.has=function(t){return Re(this,t).has(t)},Ie.prototype.set=function(t,e){var n=Re(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Ne(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],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(Ne.Cache||Ie),n}Ne.Cache=Ie;var Ve=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ue=/\\(\\)?/g,Ge=function(t){var e=Ne(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(Ve,(function(t,n,r,i){e.push(r?i.replace(Ue,"$1"):n||t)})),e}));function Be(t){return null==t?"":it(t)}function He(t,e){return et(t)?t:Oe(t,e)?[t]:Ge(Be(t))}function je(t){if("string"==typeof t||J(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function ze(t,e){for(var n=0,r=(e=He(e,t)).length;null!=t&&n<r;)t=t[je(e[n++])];return n&&n==r?t:void 0}function Fe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}var We=F?F.isConcatSpreadable:void 0;function Ye(t){return et(t)||ee(t)||!!(We&&t&&t[We])}var qe=ve(Object.getPrototypeOf,Object),Xe=Function.prototype,Ze=Object.prototype,Ke=Xe.toString,$e=Ze.hasOwnProperty,Qe=Ke.call(Object);var Je=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"}),tn=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,en=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var nn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var rn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var an="\\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",on="["+an+"]",sn="\\d+",un="[\\u2700-\\u27bf]",cn="[a-z\\xdf-\\xf6\\xf8-\\xff]",ln="[^\\ud800-\\udfff"+an+sn+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",hn="(?:\\ud83c[\\udde6-\\uddff]){2}",fn="[\\ud800-\\udbff][\\udc00-\\udfff]",dn="[A-Z\\xc0-\\xd6\\xd8-\\xde]",pn="(?:"+cn+"|"+ln+")",gn="(?:"+dn+"|"+ln+")",vn="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",mn="[\\ufe0e\\ufe0f]?"+vn+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",hn,fn].join("|")+")[\\ufe0e\\ufe0f]?"+vn+")*"),yn="(?:"+[un,hn,fn].join("|")+")"+mn,_n=RegExp([dn+"?"+cn+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[on,dn,"$"].join("|")+")",gn+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[on,dn+pn,"$"].join("|")+")",dn+"?"+pn+"+(?:['’](?:d|ll|m|re|s|t|ve))?",dn+"+(?:['’](?: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_])",sn,yn].join("|"),"g");function bn(t,e,n){return t=Be(t),void 0===(e=n?void 0:e)?function(t){return rn.test(t)}(t)?function(t){return t.match(_n)||[]}(t):function(t){return t.match(nn)||[]}(t):t.match(e)||[]}var xn=RegExp("['’]","g");function wn(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=ht(n))==n?n:0),void 0!==e&&(e=(e=ht(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}(ht(t),e,n)}function En(t){var e=this.__data__=new ke(t);this.size=e.size}En.prototype.clear=function(){this.__data__=new ke,this.size=0},En.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},En.prototype.get=function(t){return this.__data__.get(t)},En.prototype.has=function(t){return this.__data__.has(t)},En.prototype.set=function(t,e){var n=this.__data__;if(n instanceof ke){var r=n.__data__;if(!Le||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ie(r)}return n.set(t,e),this.size=n.size,this};var Sn="object"==typeof t&&t&&!t.nodeType&&t,On=Sn&&"object"==typeof module&&module&&!module.nodeType&&module,Tn=On&&On.exports===Sn?z.Buffer:void 0,Mn=Tn?Tn.allocUnsafe:void 0;function An(t,e){if(e)return t.slice();var n=t.length,r=Mn?Mn(n):new t.constructor(n);return t.copy(r),r}function Cn(){return[]}var Pn=Object.prototype.propertyIsEnumerable,Dn=Object.getOwnPropertySymbols,kn=Dn?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}(Dn(t),(function(e){return Pn.call(t,e)})))}:Cn;var Ln=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Fe(e,kn(t)),t=qe(t);return e}:Cn;function Rn(t,e,n){var r=e(t);return et(t)?r:Fe(r,n(t))}function In(t){return Rn(t,_e,kn)}function Nn(t){return Rn(t,we,Ln)}var Vn=Tt(z,"DataView"),Un=Tt(z,"Promise"),Gn=Tt(z,"Set"),Bn=yt(Vn),Hn=yt(Le),jn=yt(Un),zn=yt(Gn),Fn=yt(Mt),Wn=$;(Vn&&"[object DataView]"!=Wn(new Vn(new ArrayBuffer(1)))||Le&&"[object Map]"!=Wn(new Le)||Un&&"[object Promise]"!=Wn(Un.resolve())||Gn&&"[object Set]"!=Wn(new Gn)||Mt&&"[object WeakMap]"!=Wn(new Mt))&&(Wn=function(t){var e=$(t),n="[object Object]"==e?t.constructor:void 0,r=n?yt(n):"";if(r)switch(r){case Bn:return"[object DataView]";case Hn:return"[object Map]";case jn:return"[object Promise]";case zn:return"[object Set]";case Fn:return"[object WeakMap]"}return e});var Yn=Wn,qn=Object.prototype.hasOwnProperty;var Xn=z.Uint8Array;function Zn(t){var e=new t.constructor(t.byteLength);return new Xn(e).set(new Xn(t)),e}var Kn=/\w*$/;var $n=F?F.prototype:void 0,Qn=$n?$n.valueOf:void 0;function Jn(t,e){var n=e?Zn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function tr(t,e,n){var r,i,a,o=t.constructor;switch(e){case"[object ArrayBuffer]":return Zn(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return function(t,e){var n=e?Zn(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 Jn(t,n);case"[object Map]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(a=new(i=t).constructor(i.source,Kn.exec(i))).lastIndex=i.lastIndex,a;case"[object Set]":return new o;case"[object Symbol]":return r=t,Qn?Object(Qn.call(r)):{}}}function er(t){return"function"!=typeof t.constructor||Kt(t)?{}:Ct(qe(t))}var nr=he&&he.isMap,rr=nr?se(nr):function(t){return Q(t)&&"[object Map]"==Yn(t)};var ir=he&&he.isSet,ar=ir?se(ir):function(t){return Q(t)&&"[object Set]"==Yn(t)},or={};function sr(t,e,n,r,i,a){var o,s=1&e,u=2&e,c=4&e;if(n&&(o=i?n(t,r,i,a):n(t)),void 0!==o)return o;if(!at(t))return t;var l=et(t);if(l){if(o=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 Dt(t,o)}else{var h=Yn(t),f="[object Function]"==h||"[object GeneratorFunction]"==h;if(ae(t))return An(t,s);if("[object Object]"==h||"[object Arguments]"==h||f&&!i){if(o=u||f?{}:er(t),!s)return u?function(t,e){return zt(t,Ln(t),e)}(t,function(t,e){return t&&zt(e,we(e),t)}(o,t)):function(t,e){return zt(t,kn(t),e)}(t,function(t,e){return t&&zt(e,_e(e),t)}(o,t))}else{if(!or[h])return i?t:{};o=tr(t,h,s)}}a||(a=new En);var d=a.get(t);if(d)return d;a.set(t,o),ar(t)?t.forEach((function(r){o.add(sr(r,e,n,r,t,a))})):rr(t)&&t.forEach((function(r,i){o.set(i,sr(r,e,n,i,t,a))}));var p=c?u?Nn:In:u?keysIn:_e,g=l?void 0:p(t);return function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););}(g||t,(function(r,i){g&&(r=t[i=r]),jt(o,i,sr(r,e,n,i,t,a))})),o}or["[object Arguments]"]=or["[object Array]"]=or["[object ArrayBuffer]"]=or["[object DataView]"]=or["[object Boolean]"]=or["[object Date]"]=or["[object Float32Array]"]=or["[object Float64Array]"]=or["[object Int8Array]"]=or["[object Int16Array]"]=or["[object Int32Array]"]=or["[object Map]"]=or["[object Number]"]=or["[object Object]"]=or["[object RegExp]"]=or["[object Set]"]=or["[object String]"]=or["[object Symbol]"]=or["[object Uint8Array]"]=or["[object Uint8ClampedArray]"]=or["[object Uint16Array]"]=or["[object Uint32Array]"]=!0,or["[object Error]"]=or["[object Function]"]=or["[object WeakMap]"]=!1;function ur(t){return sr(t,5)}function cr(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Ie;++e<n;)this.add(t[e])}function lr(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 hr(t,e){return t.has(e)}cr.prototype.add=cr.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},cr.prototype.has=function(t){return this.__data__.has(t)};function fr(t,e,n,r,i,a){var o=1&n,s=t.length,u=e.length;if(s!=u&&!(o&&u>s))return!1;var c=a.get(t);if(c&&a.get(e))return c==e;var l=-1,h=!0,f=2&n?new cr:void 0;for(a.set(t,e),a.set(e,t);++l<s;){var d=t[l],p=e[l];if(r)var g=o?r(p,d,l,e,t,a):r(d,p,l,t,e,a);if(void 0!==g){if(g)continue;h=!1;break}if(f){if(!lr(e,(function(t,e){if(!hr(f,e)&&(d===t||i(d,t,n,r,a)))return f.push(e)}))){h=!1;break}}else if(d!==p&&!i(d,p,n,r,a)){h=!1;break}}return a.delete(t),a.delete(e),h}function dr(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function pr(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var gr=F?F.prototype:void 0,vr=gr?gr.valueOf:void 0;var mr=Object.prototype.hasOwnProperty;var yr=Object.prototype.hasOwnProperty;function _r(t,e,n,r,i,a){var o=et(t),s=et(e),u=o?"[object Array]":Yn(t),c=s?"[object Array]":Yn(e),l="[object Object]"==(u="[object Arguments]"==u?"[object Object]":u),h="[object Object]"==(c="[object Arguments]"==c?"[object Object]":c),f=u==c;if(f&&ae(t)){if(!ae(e))return!1;o=!0,l=!1}if(f&&!l)return a||(a=new En),o||de(t)?fr(t,e,n,r,i,a):function(t,e,n,r,i,a,o){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||!a(new Xn(t),new Xn(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Bt(+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=dr;case"[object Set]":var u=1&r;if(s||(s=pr),t.size!=e.size&&!u)return!1;var c=o.get(t);if(c)return c==e;r|=2,o.set(t,e);var l=fr(s(t),s(e),r,i,a,o);return o.delete(t),l;case"[object Symbol]":if(vr)return vr.call(t)==vr.call(e)}return!1}(t,e,u,n,r,i,a);if(!(1&n)){var d=l&&yr.call(t,"__wrapped__"),p=h&&yr.call(e,"__wrapped__");if(d||p){var g=d?t.value():t,v=p?e.value():e;return a||(a=new En),i(g,v,n,r,a)}}return!!f&&(a||(a=new En),function(t,e,n,r,i,a){var o=1&n,s=In(t),u=s.length;if(u!=In(e).length&&!o)return!1;for(var c=u;c--;){var l=s[c];if(!(o?l in e:mr.call(e,l)))return!1}var h=a.get(t);if(h&&a.get(e))return h==e;var f=!0;a.set(t,e),a.set(e,t);for(var d=o;++c<u;){var p=t[l=s[c]],g=e[l];if(r)var v=o?r(g,p,l,e,t,a):r(p,g,l,t,e,a);if(!(void 0===v?p===g||i(p,g,n,r,a):v)){f=!1;break}d||(d="constructor"==l)}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 a.delete(t),a.delete(e),f}(t,e,n,r,i,a))}function br(t,e,n,r,i){return t===e||(null==t||null==e||!Q(t)&&!Q(e)?t!=t&&e!=e:_r(t,e,n,r,br,i))}function xr(t){return t==t&&!at(t)}function wr(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}function Er(t){var e=function(t){for(var e=_e(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,xr(i)]}return e}(t);return 1==e.length&&e[0][2]?wr(e[0][0],e[0][1]):function(n){return n===t||function(t,e,n,r){var i=n.length,a=i,o=!r;if(null==t)return!a;for(t=Object(t);i--;){var s=n[i];if(o&&s[2]?s[1]!==t[s[0]]:!(s[0]in t))return!1}for(;++i<a;){var u=(s=n[i])[0],c=t[u],l=s[1];if(o&&s[2]){if(void 0===c&&!(u in t))return!1}else{var h=new En;if(r)var f=r(c,l,u,t,e,h);if(!(void 0===f?br(l,c,3,r,h):f))return!1}}return!0}(n,t,e)}}function Sr(t,e){return null!=t&&e in Object(t)}function Or(t,e){return null!=t&&function(t,e,n){for(var r=-1,i=(e=He(e,t)).length,a=!1;++r<i;){var o=je(e[r]);if(!(a=null!=t&&n(t,o)))break;t=t[o]}return a||++r!=i?a:!!(i=null==t?0:t.length)&&Yt(i)&&Ut(o,i)&&(et(t)||ee(t))}(t,e,Sr)}function Tr(t,e){return Oe(t)&&xr(e)?wr(je(t),e):function(n){var r=function(t,e,n){var r=null==t?void 0:ze(t,e);return void 0===r?n:r}(n,t);return void 0===r&&r===e?Or(n,t):br(e,r,3)}}function Mr(t){return Oe(t)?(e=je(t),function(t){return null==t?void 0:t[e]}):function(t){return function(e){return ze(e,t)}}(t);var e}function Ar(t){return"function"==typeof t?t:null==t?ft:"object"==typeof t?et(t)?Tr(t[0],t[1]):Er(t):Mr(t)}var Cr,Pr=function(t,e,n){for(var r=-1,i=Object(t),a=n(t),o=a.length;o--;){var s=a[Cr?o:++r];if(!1===e(i[s],s,i))break}return t};var Dr=function(t,e){return function(n,r){if(null==n)return n;if(!qt(n))return t(n,r);for(var i=n.length,a=e?i:-1,o=Object(n);(e?a--:++a<i)&&!1!==r(o[a],a,o););return n}}((function(t,e){return t&&Pr(t,e,_e)})),kr=function(){return z.Date.now()},Lr=Math.max,Rr=Math.min;function Ir(t,e,n){var r,i,a,o,s,u,c=0,l=!1,h=!1,f=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function d(e){var n=r,a=i;return r=i=void 0,c=e,o=t.apply(a,n)}function p(t){return c=t,s=setTimeout(v,e),l?d(t):o}function g(t){var n=t-u;return void 0===u||n>=e||n<0||h&&t-c>=a}function v(){var t=kr();if(g(t))return m(t);s=setTimeout(v,function(t){var n=e-(t-u);return h?Rr(n,a-(t-c)):n}(t))}function m(t){return s=void 0,f&&r?d(t):(r=i=void 0,o)}function y(){var t=kr(),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)),o}return e=ht(e)||0,at(n)&&(l=!!n.leading,a=(h="maxWait"in n)?Lr(ht(n.maxWait)||0,e):a,f="trailing"in n?!!n.trailing:f),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,r=u=i=s=void 0},y.flush=function(){return void 0===s?o:m(kr())},y}function Nr(t,e,n){(void 0===n||Bt(t[e],n))&&(void 0!==n||e in t)||Gt(t,e,n)}function Vr(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function Ur(t,e,n,r,i,a,o){var s=Vr(t,n),u=Vr(e,n),c=o.get(u);if(c)Nr(t,n,c);else{var l,h=a?a(s,u,n+"",t,e,o):void 0,f=void 0===h;if(f){var d=et(u),p=!d&&ae(u),g=!d&&!p&&de(u);h=u,d||p||g?et(s)?h=s:Q(l=s)&&qt(l)?h=Dt(s):p?(f=!1,h=An(u,!0)):g?(f=!1,h=Jn(u,!0)):h=[]:function(t){if(!Q(t)||"[object Object]"!=$(t))return!1;var e=qe(t);if(null===e)return!0;var n=$e.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Ke.call(n)==Qe}(u)||ee(u)?(h=s,ee(s)?h=function(t){return zt(t,we(t))}(s):at(s)&&!dt(s)||(h=er(u))):f=!1}f&&(o.set(u,h),i(h,u,r,a,o),o.delete(u)),Nr(t,n,h)}}function Gr(t,e,n,r,i){t!==e&&Pr(e,(function(a,o){if(i||(i=new En),at(a))Ur(t,e,o,n,Gr,r,i);else{var s=r?r(Vr(t,o),a,o+"",t,e,i):void 0;void 0===s&&(s=a),Nr(t,o,s)}}),we)}function Br(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 Hr(t,e){var n=-1,r=qt(t)?Array(t.length):[];return Dr(t,(function(t,i,a){r[++n]=e(t,i,a)})),r}function jr(t,e){return function t(e,n,r,i,a){var o=-1,s=e.length;for(r||(r=Ye),a||(a=[]);++o<s;){var u=e[o];n>0&&r(u)?n>1?t(u,n-1,r,i,a):Fe(a,u):i||(a[a.length]=u)}return a}(function(t,e){return(et(t)?tt:Hr)(t,Ar(e))}(t,e),1/0)}function zr(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 Fr(t,e){return br(t,e)}var Wr,Yr,qr=(Wr=function(t,e,n){return t+(n?"-":"")+e.toLowerCase()},function(t){return function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}(bn(function(t){return(t=Be(t))&&t.replace(tn,Je).replace(en,"")}(t).replace(xn,"")),Wr,"")}),Xr=(Yr=function(t,e,n){Gr(t,e,n)},Wt((function(t,e){var n=-1,r=e.length,i=r>1?e[r-1]:void 0,a=r>2?e[2]:void 0;for(i=Yr.length>3&&"function"==typeof i?(r--,i):void 0,a&&Xt(e[0],e[1],a)&&(i=r<3?void 0:i,r=1),t=Object(t);++n<r;){var o=e[n];o&&Yr(t,o,n,i)}return t})));function Zr(t,e){var n;return Dr(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function Kr(t,e,n){var r=et(t)?lr:Zr;return n&&Xt(t,e,n)&&(e=void 0),r(t,Ar(e))}var $r=Gn&&1/pr(new Gn([,-0]))[1]==1/0?function(t){return new Gn(t)}:function(){};function Qr(t){return t&&t.length?function(t,e,n){var r=-1,i=Nt,a=t.length,o=!0,s=[],u=s;if(n)o=!1,i=Br;else if(a>=200){var c=e?null:$r(t);if(c)return pr(c);o=!1,i=hr,u=new cr}else u=e?[]:s;t:for(;++r<a;){var l=t[r],h=e?e(l):l;if(l=n||0!==l?l:0,o&&h==h){for(var f=u.length;f--;)if(u[f]===h)continue t;e&&u.push(h),s.push(l)}else i(u,h,n)||(u!==s&&u.push(h),s.push(l))}return s}(t):[]}var Jr="http://www.w3.org/1999/xhtml",ti={svg:"http://www.w3.org/2000/svg",xhtml:Jr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ei(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),ti.hasOwnProperty(e)?{space:ti[e],local:t}:t}function ni(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Jr&&e.documentElement.namespaceURI===Jr?e.createElement(t):e.createElementNS(n,t)}}function ri(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function ii(t){var e=ei(t);return(e.local?ri:ni)(e)}function ai(){}function oi(t){return null==t?ai:function(){return this.querySelector(t)}}function si(){return[]}function ui(t){return null==t?si:function(){return this.querySelectorAll(t)}}function ci(t){return function(){return this.matches(t)}}function li(t){return new Array(t.length)}function hi(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}hi.prototype={constructor:hi,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 fi(t,e,n,r,i,a){for(var o,s=0,u=e.length,c=a.length;s<c;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new hi(t,a[s]);for(;s<u;++s)(o=e[s])&&(i[s]=o)}function di(t,e,n,r,i,a,o){var s,u,c,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(u=e[s])&&(d[s]=c="$"+o.call(u,u.__data__,s,e),c in l?i[s]=u:l[c]=u);for(s=0;s<f;++s)(u=l[c="$"+o.call(t,a[s],s,a)])?(r[s]=u,u.__data__=a[s],l[c]=null):n[s]=new hi(t,a[s]);for(s=0;s<h;++s)(u=e[s])&&l[d[s]]===u&&(i[s]=u)}function pi(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function gi(t){return function(){this.removeAttribute(t)}}function vi(t){return function(){this.removeAttributeNS(t.space,t.local)}}function mi(t,e){return function(){this.setAttribute(t,e)}}function yi(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function _i(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function bi(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 xi(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function wi(t){return function(){this.style.removeProperty(t)}}function Ei(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Si(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Oi(t,e){return t.style.getPropertyValue(e)||xi(t).getComputedStyle(t,null).getPropertyValue(e)}function Ti(t){return function(){delete this[t]}}function Mi(t,e){return function(){this[t]=e}}function Ai(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Ci(t){return t.trim().split(/^|\s+/)}function Pi(t){return t.classList||new Di(t)}function Di(t){this._node=t,this._names=Ci(t.getAttribute("class")||"")}function ki(t,e){for(var n=Pi(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Li(t,e){for(var n=Pi(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function Ri(t){return function(){ki(this,t)}}function Ii(t){return function(){Li(this,t)}}function Ni(t,e){return function(){(e.apply(this,arguments)?ki:Li)(this,t)}}function Vi(){this.textContent=""}function Ui(t){return function(){this.textContent=t}}function Gi(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Bi(){this.innerHTML=""}function Hi(t){return function(){this.innerHTML=t}}function ji(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function zi(){this.nextSibling&&this.parentNode.appendChild(this)}function Fi(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Wi(){return null}function Yi(){var t=this.parentNode;t&&t.removeChild(this)}function qi(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Xi(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}Di.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 Zi={},Ki=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(Zi={mouseenter:"mouseover",mouseleave:"mouseout"}));function $i(t,e,n){return t=Qi(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Qi(t,e,n){return function(r){var i=Ki;Ki=r;try{t.call(this,this.__data__,e,n)}finally{Ki=i}}}function Ji(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 ta(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++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 ea(t,e,n){var r=Zi.hasOwnProperty(t.type)?$i:Qi;return function(i,a,o){var s,u=this.__on,c=r(e,a,o);if(u)for(var l=0,h=u.length;l<h;++l)if((s=u[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=c,s.capture=n),void(s.value=e);this.addEventListener(t.type,c,n),s={type:t.type,name:t.name,value:e,listener:c,capture:n},u?u.push(s):this.__on=[s]}}function na(t,e,n){var r=xi(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 ra(t,e){return function(){return na(this,t,e)}}function ia(t,e){return function(){return na(this,t,e.apply(this,arguments))}}var aa,oa=[null];function sa(t,e){this._groups=t,this._parents=e}function ua(){return new sa([[document.documentElement]],oa)}function ca(t){return"string"==typeof t?new sa([[document.querySelector(t)]],[document.documentElement]):new sa([[t]],oa)}function la(){for(var t,e=Ki;t=e.sourceEvent;)e=t;return e}function ha(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 fa(t){var e=la();return e.changedTouches&&(e=e.changedTouches[0]),ha(t,e)}function da(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function pa(t,e){return t(e={exports:{}},e.exports),e.exports}sa.prototype=ua.prototype={constructor:sa,select:function(t){"function"!=typeof t&&(t=oi(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],u=s.length,c=r[i]=new Array(u),l=0;l<u;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),c[l]=o);return new sa(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=ui(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],u=s.length,c=0;c<u;++c)(o=s[c])&&(r.push(t.call(o,o.__data__,c,s)),i.push(o));return new sa(r,i)},filter: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 a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new sa(r,this._parents)},data:function(t,e){if(!t)return d=new Array(this.size()),c=-1,this.each((function(t){d[++c]=t})),d;var n=e?di:fi,r=this._parents,i=this._groups;"function"!=typeof t&&(t=function(t){return function(){return t}}(t));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),c=0;c<a;++c){var l=r[c],h=i[c],f=h.length,d=t.call(l,l&&l.__data__,c,r),p=d.length,g=s[c]=new Array(p),v=o[c]=new Array(p);n(l,h,g,v,u[c]=new Array(f),d,e);for(var m,y,_=0,b=0;_<p;++_)if(m=g[_]){for(_>=b&&(b=_+1);!(y=v[b])&&++b<p;);m._next=y||null}}return(o=new sa(o,r))._enter=s,o._exit=u,o},enter:function(){return new sa(this._enter||this._groups.map(li),this._parents)},exit:function(){return new sa(this._exit||this._groups.map(li),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,c=e[s],l=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new sa(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=pi);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],u=s.length,c=i[a]=new Array(u),l=0;l<u;++l)(o=s[l])&&(c[l]=o);c.sort(e)}return new sa(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,a=r.length;i<a;++i){var o=r[i];if(o)return o}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,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=ei(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?vi:gi:"function"==typeof e?n.local?bi:_i:n.local?yi:mi)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?wi:"function"==typeof e?Si:Ei)(t,e,null==n?"":n)):Oi(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ti:"function"==typeof e?Ai:Mi)(t,e)):this.node()[t]},classed:function(t,e){var n=Ci(t+"");if(arguments.length<2){for(var r=Pi(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Ni:e?Ri:Ii)(n,e))},text:function(t){return arguments.length?this.each(null==t?Vi:("function"==typeof t?Gi:Ui)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Bi:("function"==typeof t?ji:Hi)(t)):this.node().innerHTML},raise:function(){return this.each(zi)},lower:function(){return this.each(Fi)},append:function(t){var e="function"==typeof t?t:ii(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ii(t),r=null==e?Wi:"function"==typeof e?e:oi(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Yi)},clone:function(t){return this.select(t?Xi:qi)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=Ji(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?ea:ta,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var u,c=0,l=s.length;c<l;++c)for(r=0,u=s[c];r<o;++r)if((i=a[r]).type===u.type&&i.name===u.name)return u.value},dispatch:function(t,e){return this.each(("function"==typeof e?ia:ra)(t,e))}},function(t){t.debounce=Ir,t.clone=ur,t.merge=Xr,t.removeArrayDuplicates=Qr,t.clamp=wn,t.isEqual=Fr,t.flatMapDeep=jr,t.kebabCase=qr,t.fromPairs=zr,t.some=Kr,t.debounceWithD3MousePosition=function(t,e,n){var r=null;return function(){var i=this,a=arguments;i.mousePosition=fa(n),clearTimeout(r),r=setTimeout((function(){t.apply(i,a)}),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 a=n.axes[i];(a.primary||a.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 o=a.mapsTo;if(null==o){var s=a.scaleType;null==s?a.mapsTo="value":s===O.TIME?a.mapsTo="date":s===O.LABELS&&(a.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===E.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===E.FRONT_LINE?"..."+t.substr(-n):e===E.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,a=e;i<a.length;i++){var o=a[i];if(null===r[o]||void 0===r[o])return null;r=r[o]}return r}return null},t.flipSVGCoordinatesBasedOnOrientation=function(t,e){return e===S.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,a=r.x1,o=r.y0,s=r.y1;return"M"+i+","+o+"L"+i+","+s+"L"+a+","+s+"L"+a+","+o+"L"+i+","+o},t.flipDomainAndRangeBasedOnOrientation=function(t,e,n){return n===S.VERTICAL?[t,e]:[e,t]},t.compareNumeric=function(t,e){return Number(t)===Number(e)}}(aa||(aa={}));var ga=pa((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}));da(ga);var va=pa((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}));da(va);var ma=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=va)&&n.__esModule?n:{default:n};var i={date:(0,r.default)({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:(0,r.default)({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:(0,r.default)({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})};e.default=i,t.exports=e.default}));da(ma);var ya=pa((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}));da(ya);var _a=pa((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 a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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}));da(_a);var ba=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n,r=(n=_a)&&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}));da(ba);var xa=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=r.match(t.matchPattern);if(!a)return null;var o=a[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(o.length)}}},t.exports=e.default}));da(xa);var wa=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,c=s[0],l=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}},t.exports=e.default}));da(wa);var Ea=pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=i(xa),r=i(wa);function i(t){return t&&t.__esModule?t:{default:t}}var a={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=a,t.exports=e.default}));da(Ea);var Sa,Oa=da(pa((function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=s(ga),r=s(ma),i=s(ya),a=s(ba),o=s(Ea);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:a.default,match:o.default,options:{weekStartsOn:0,firstWeekContainsDate:1}};e.default=u,t.exports=e.default}))),Ta={opacity:{unselected:0,selected:.4}},Ma={ticks:{number:7,rotateIfSmallerThan:30,verticalSpaceRatio:2.5,horizontalSpaceRatio:3.5},paddingRatio:.1},Aa={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8},checkbox:{radius:6.5,spaceAfter:4}},Ca={opacity:{unselected:.3,selected:1}},Pa={statusBar:{paddingRight:5},status:{indicatorSize:16,paddingLeft:15}},Da={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}},ka={opacity:{unselected:.1,selected:.3},xLabelPadding:10,yLabelPadding:8,yTicksNumber:4,minRange:10,xAxisRectHeight:50,dotsRadius:5},La={default:{size:24}},Ra={horizontalOffset:10},Ia={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}},Na={height:(Sa={},Sa[w.GRAPH_VIEW]=32,Sa[w.SLIDER_VIEW]=10,Sa),spacerHeight:8},Va={type:E.END_LINE,threshold:16,numCharacter:14},Ua={x:{enabled:!0,numberOfTicks:15},y:{enabled:!0,numberOfTicks:5}},Ga={enabled:!0},Ba={showTotal:!0,valueFormatter:function(t){return t.toLocaleString()},truncation:Va},Ha={top:{visible:!0,includeZero:!0,truncation:Va},bottom:{visible:!0,includeZero:!0,truncation:Va},left:{visible:!0,includeZero:!0,truncation:Va},right:{visible:!0,includeZero:!0,truncation:Va}},ja={addSpaceOnEdges:1,showDayName:!1,localeObject:Oa,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"}}},za={width:null,height:null,resizable:!0,tooltip:Ba,legend:{enabled:!0,position:T.BOTTOM,clickable:!0,truncation:Va,alignment:M.LEFT,order:null},style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null}},Fa=aa.merge({},za,{axes:Ha,timeScale:ja,grid:Ua,ruler:Ga,zoomBar:{top:{enabled:!1,type:w.GRAPH_VIEW}}}),Wa=aa.merge({},Fa,{bars:{maxWidth:16},timeScale:aa.merge(ja,{addSpaceOnEdges:1})}),Ya=aa.merge({},Wa,{}),qa=aa.merge({},Wa,{}),Xa=aa.merge({},Wa,{bars:aa.merge({},Wa.bars,{dividerSize:1.5})}),Za=aa.merge({},Fa,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}}),Ka=aa.merge({},Za,{points:{radius:3,filled:!1,enabled:!0}}),$a=aa.merge({},Ka,{timeScale:aa.merge(ja,{addSpaceOnEdges:0})}),Qa=$a,Ja=aa.merge({},Fa,{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}}),to=aa.merge({},za,{pie:{labels:{formatter:null},alignment:M.LEFT}}),eo=aa.merge({},za,{legend:{enabled:!1},gauge:{type:I.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()}}}),no={chart:za,axisChart:Fa,simpleBarChart:Ya,groupedBarChart:qa,stackedBarChart:Xa,bubbleChart:Ja,lineChart:Ka,areaChart:$a,stackedAreaChart:Qa,scatterChart:Za,pieChart:to,donutChart:aa.merge({},to,{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:M.LEFT}}),meterChart:aa.merge({},za,{legend:{enabled:!1},meter:{height:8,statusBar:{percentageIndicator:{enabled:!0}}}}),radarChart:aa.merge({},za,{radar:{axes:{angle:"key",value:"value"},alignment:M.LEFT},tooltip:{gridline:{enabled:!0},valueFormatter:function(t){return null!=t?t:"N/A"}}}),gaugeChart:eo},ro=Object.freeze({__proto__:null,grid:Ua,ruler:Ga,baseTooltip:Ba,timeScale:ja,options:no,area:Ta,axis:Ma,legend:Aa,lines:Ca,meter:Pa,pie:Da,radar:ka,spacers:La,tooltips:Ra,transitions:Ia,zoomBar:Na}),io={10:"#fff0f1",20:"#fcd0d3",30:"#ffa4a9",40:"#ff767c",50:"#fb4b53",60:"#da1e28",70:"#a51920",80:"#750e13",90:"#570408",100:"#2c080a"},ao={10:"#fff0f6",20:"#ffcfe1",30:"#ffa0c2",40:"#fa75a6",50:"#ee538b",60:"#d12765",70:"#a11950",80:"#760a3a",90:"#57002b",100:"#2a0a16"},oo={10:"#f7f1ff",20:"#e6d6ff",30:"#d0b0ff",40:"#bb8eff",50:"#a66efa",60:"#8a3ffc",70:"#6e32c9",80:"#4f2196",90:"#38146b",100:"#1e1033"},so={10:"#edf4ff",20:"#c9deff",30:"#97c1ff",40:"#6ea6ff",50:"#408bfc",60:"#0062ff",70:"#054ada",80:"#0530ad",90:"#061f80",100:"#051243"},uo={10:"#e3f6ff",20:"#b3e6ff",30:"#6ccaff",40:"#30b0ff",50:"#1191e6",60:"#0072c3",70:"#0058a1",80:"#003d73",90:"#002b50",100:"#07192b"},co={10:"#dbfbfb",20:"#92eeee",30:"#20d5d2",40:"#00bab6",50:"#009c98",60:"#007d79",70:"#006161",80:"#004548",90:"#003137",100:"#081a1c"},lo={10:"#dafbe4",20:"#9deeb2",30:"#56d679",40:"#3dbb61",50:"#24a148",60:"#198038",70:"#10642a",80:"#054719",90:"#01330f",100:"#081b09"},ho=function(t,e){return t[e]},fo=function(t){return ho(so,t)},po=function(t){return ho(uo,t)},go=function(t){return ho(lo,t)},vo=function(t){return ho(ao,t)},mo=function(t){return ho(oo,t)},yo=function(t){return ho(io,t)},_o=function(t){return ho(co,t)},bo=[mo(70),po(50),_o(70),vo(70),yo(50),yo(90),go(60),fo(80),vo(50),"#b28600",_o(50),po(90),"#8a3800",mo(50)],xo=[mo(60),po(40),_o(60),vo(40),yo(50),yo(10),go(30),fo(50),vo(60),"#d2a106",_o(40),po(20),"#ba4e00",mo(30)],wo=bo,Eo=xo,So=xo,Oo=bo,To=Object.freeze({__proto__:null,WHITE:bo,DARK:xo,G10:wo,G90:Eo,G100:So,DEFAULT:Oo});function Mo(){}function Ao(t,e){var n=new Mo;if(t instanceof Mo)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}function Co(){}Mo.prototype=Ao.prototype={constructor:Mo,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 Po=Ao.prototype;function Do(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function ko(t){var e;return 1===t.length&&(e=t,t=function(t,n){return Do(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}}Co.prototype=function(t,e){var n=new Co;if(t instanceof Co)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:Co,has:Po.has,add:function(t){return this["$"+(t+="")]=t,this},remove:Po.remove,clear:Po.clear,values:Po.keys,size:Po.size,empty:Po.empty,each:Po.each};var Lo=ko(Do).right;function Ro(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]}function Io(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)),a=new Array(i);++r<i;)a[r]=t+r*n;return a}var No=Math.sqrt(50),Vo=Math.sqrt(10),Uo=Math.sqrt(2);function Go(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=Bo(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a}function Bo(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=No?10:a>=Vo?5:a>=Uo?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=No?10:a>=Vo?5:a>=Uo?2:1)}function Ho(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=No?i*=10:a>=Vo?i*=5:a>=Uo&&(i*=2),e<t?-i:i}function jo(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r}function zo(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var Fo=Array.prototype,Wo=Fo.map,Yo=Fo.slice,qo={name:"implicit"};function Xo(){var t=Ao(),e=[],n=[],r=qo;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==qo)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Ao();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=Yo.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Xo(e,n).unknown(r)},zo.apply(i,arguments),i}function Zo(){var t,e,n=Xo().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,u=0,c=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*u),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*c,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=Io(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,u=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(u=+t,l()):u},n.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),l()):c},n.copy=function(){return Zo(r(),a).round(o).paddingInner(s).paddingOuter(u).align(c)},zo.apply(l(),arguments)}function Ko(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function $o(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Qo(){}var Jo="\\s*([+-]?\\d+)\\s*",ts="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",es="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ns=/^#([0-9a-f]{3,8})$/,rs=new RegExp("^rgb\\("+[Jo,Jo,Jo]+"\\)$"),is=new RegExp("^rgb\\("+[es,es,es]+"\\)$"),as=new RegExp("^rgba\\("+[Jo,Jo,Jo,ts]+"\\)$"),os=new RegExp("^rgba\\("+[es,es,es,ts]+"\\)$"),ss=new RegExp("^hsl\\("+[ts,es,es]+"\\)$"),us=new RegExp("^hsla\\("+[ts,es,es,ts]+"\\)$"),cs={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 ls(){return this.rgb().formatHex()}function hs(){return this.rgb().formatRgb()}function fs(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=ns.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ds(e):3===n?new ms(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new ms(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new ms(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=rs.exec(t))?new ms(e[1],e[2],e[3],1):(e=is.exec(t))?new ms(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=as.exec(t))?ps(e[1],e[2],e[3],e[4]):(e=os.exec(t))?ps(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ss.exec(t))?xs(e[1],e[2]/100,e[3]/100,1):(e=us.exec(t))?xs(e[1],e[2]/100,e[3]/100,e[4]):cs.hasOwnProperty(t)?ds(cs[t]):"transparent"===t?new ms(NaN,NaN,NaN,0):null}function ds(t){return new ms(t>>16&255,t>>8&255,255&t,1)}function ps(t,e,n,r){return r<=0&&(t=e=n=NaN),new ms(t,e,n,r)}function gs(t){return t instanceof Qo||(t=fs(t)),t?new ms((t=t.rgb()).r,t.g,t.b,t.opacity):new ms}function vs(t,e,n,r){return 1===arguments.length?gs(t):new ms(t,e,n,null==r?1:r)}function ms(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ys(){return"#"+bs(this.r)+bs(this.g)+bs(this.b)}function _s(){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 bs(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function xs(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Es(t,e,n,r)}function ws(t){if(t instanceof Es)return new Es(t.h,t.s,t.l,t.opacity);if(t instanceof Qo||(t=fs(t)),!t)return new Es;if(t instanceof Es)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new Es(o,s,u,t.opacity)}function Es(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Ss(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 Os(t){return function(){return t}}function Ts(t){return 1==(t=+t)?Ms: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):Os(isNaN(e)?n:e)}}function Ms(t,e){var n=e-t;return n?function(t,e){return function(n){return t+n*e}}(t,n):Os(isNaN(t)?e:t)}Ko(Qo,fs,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ls,formatHex:ls,formatHsl:function(){return ws(this).formatHsl()},formatRgb:hs,toString:hs}),Ko(ms,vs,$o(Qo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new ms(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new ms(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:ys,formatHex:ys,formatRgb:_s,toString:_s})),Ko(Es,(function(t,e,n,r){return 1===arguments.length?ws(t):new Es(t,e,n,null==r?1:r)}),$o(Qo,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Es(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Es(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 ms(Ss(t>=240?t-240:t+120,i,r),Ss(t,i,r),Ss(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 As=function t(e){var n=Ts(e);function r(t,e){var r=n((t=vs(t)).r,(e=vs(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=Ms(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function Cs(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}}function Ps(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Vs(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}function Ds(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}}function ks(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}function Ls(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]=Vs(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}var Rs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Is=new RegExp(Rs.source,"g");function Ns(t,e){var n,r,i,a=Rs.lastIndex=Is.lastIndex=0,o=-1,s=[],u=[];for(t+="",e+="";(n=Rs.exec(t))&&(r=Is.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,u.push({i:o,x:ks(n,r)})),a=Is.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=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 Vs(t,e){var n,r=typeof e;return null==e||"boolean"===r?Os(e):("number"===r?ks:"string"===r?(n=fs(e))?(e=n,As):Ns:e instanceof fs?As:e instanceof Date?Ds:function(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}(e)?Cs:Array.isArray(e)?Ps:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?Ls:ks)(t,e)}function Us(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}}var Gs,Bs,Hs,js,zs=180/Math.PI,Fs={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ws(t,e,n,r,i,a){var o,s,u;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(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,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*zs,skewX:Math.atan(u)*zs,scaleX:o,scaleY:s}}function Ys(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],u=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var u=o.push("translate(",null,e,null,n);s.push({i:u-4,x:ks(t,i)},{i:u-2,x:ks(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,u),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:ks(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,u),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:ks(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,u),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:ks(t,n)},{i:s-2,x:ks(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,u),a=o=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 qs=Ys((function(t){return"none"===t?Fs:(Gs||(Gs=document.createElement("DIV"),Bs=document.documentElement,Hs=document.defaultView),Gs.style.transform=t,t=Hs.getComputedStyle(Bs.appendChild(Gs),null).getPropertyValue("transform"),Bs.removeChild(Gs),Ws(+(t=t.slice(7,-1).split(","))[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),Xs=Ys((function(t){return null==t?Fs:(js||(js=document.createElementNS("http://www.w3.org/2000/svg","g")),js.setAttribute("transform",t),(t=js.transform.baseVal.consolidate())?Ws((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):Fs)}),", ",")",")");function Zs(t){return+t}var Ks=[0,1];function $s(t){return t}function Qs(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:function(t){return function(){return t}}(isNaN(e)?NaN:.5)}function Js(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 tu(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Qs(i,r),a=n(o,a)):(r=Qs(r,i),a=n(a,o)),function(t){return a(r(t))}}function eu(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Qs(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=Lo(t,e,1,r)-1;return a[n](i[n](e))}}function nu(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function ru(){var t,e,n,r,i,a,o=Ks,s=Ks,u=Vs,c=$s;function l(){return r=Math.min(o.length,s.length)>2?eu:tu,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,u)))(t(c(e)))}return h.invert=function(n){return c(e((a||(a=r(s,o.map(t),ks)))(n)))},h.domain=function(t){return arguments.length?(o=Wo.call(t,Zs),c===$s||(c=Js(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=Yo.call(t),l()):s.slice()},h.rangeRound=function(t){return s=Yo.call(t),u=Us,l()},h.clamp=function(t){return arguments.length?(c=t?Js(o):$s,h):c!==$s},h.interpolate=function(t){return arguments.length?(u=t,l()):u},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function iu(t,e){return ru()(t,e)}function au(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 ou(t){return(t=au(Math.abs(t)))?t[1]:NaN}var su,uu=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function cu(t){if(!(e=uu.exec(t)))throw new Error("invalid format: "+t);var e;return new lu({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 lu(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 hu(t,e){var n=au(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")}cu.prototype=lu.prototype,lu.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 fu={"%":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 hu(100*t,e)},r:hu,s:function(t,e){var n=au(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(su=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+au(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function du(t){return t}var pu,gu,vu,mu=Array.prototype.map,yu=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _u(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?du:(e=mu.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],u=0;i>0&&s>0&&(u+s+1>r&&(s=Math.max(1,r-u)),a.push(t.substring(i-=s,i+s)),!((u+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?du:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(mu.call(t.numerals,String)),u=void 0===t.percent?"%":t.percent+"",c=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=cu(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"):fu[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?a:/[%p]/.test(y)?u:"",x=fu[y],w=/[defgprs%]/.test(y);function E(t){var i,a,u,f=_,E=b;if("c"===y)E=x(t)+E,t="";else{var S=(t=+t)<0;if(t=isNaN(t)?l: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)),S&&0==+t&&(S=!1),f=(S?"("===h?h:c:"-"===h||"("===h?"":h)+f,E=("s"===y?yu[8+su/3]:"")+E+(S&&"("===h?")":""),w)for(i=-1,a=t.length;++i<a;)if(48>(u=t.charCodeAt(i))||u>57){E=(46===u?o+t.slice(i+1):t.slice(i))+E,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var O=f.length+t.length+E.length,T=O<p?new Array(p-O+1).join(e):"";switch(g&&d&&(t=r(T+t,T.length?p-E.length:1/0),T=""),n){case"<":t=f+t+E+T;break;case"=":t=f+T+t+E;break;case"^":t=T.slice(0,O=T.length>>1)+f+t+E+T.slice(O);break;default:t=T+f+t+E}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)),E.toString=function(){return t+""},E}return{format:h,formatPrefix:function(t,e){var n=h(((t=cu(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor(ou(e)/3))),i=Math.pow(10,-r),a=yu[8+r/3];return function(t){return n(i*t)+a}}}}function bu(t,e,n,r){var i,a=Ho(t,e,n);switch((r=cu(null==r?",f":r)).type){case"s":var o=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(ou(e)/3)))-ou(Math.abs(t)))}(a,o))||(r.precision=i),vu(r,o);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,ou(e)-ou(t))+1}(a,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,-ou(Math.abs(t)))}(a))||(r.precision=i-2*("%"===r.type))}return gu(r)}function xu(t){var e=t.domain;return t.ticks=function(t){var n=e();return Go(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return bu(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],u=i[o];return u<s&&(r=s,s=u,u=r,r=a,a=o,o=r),(r=Bo(s,u,n))>0?r=Bo(s=Math.floor(s/r)*r,u=Math.ceil(u/r)*r,n):r<0&&(r=Bo(s=Math.ceil(s*r)/r,u=Math.floor(u*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(u/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(u*r)/r,e(i)),t},t}function wu(){var t=iu($s,$s);return t.copy=function(){return nu(t,wu())},zo.apply(t,arguments),xu(t)}function Eu(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t}function Su(t){return Math.log(t)}function Ou(t){return Math.exp(t)}function Tu(t){return-Math.log(-t)}function Mu(t){return-Math.exp(-t)}function Au(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Cu(t){return function(e){return-t(-e)}}function Pu(t){var e,n,r=t(Su,Ou),i=r.domain,a=10;function o(){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})}(a),n=function(t){return 10===t?Au:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=Cu(e),n=Cu(n),t(Tu,Mu)):t(Su,Ou),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],u=o[o.length-1];(r=u<s)&&(f=s,s=u,u=f);var c,l,h,f=e(s),d=e(u),p=null==t?10:+t,g=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,c=n(f);l<a;++l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else for(;f<d;++f)for(l=a-1,c=n(f);l>=1;--l)if(!((h=c*l)<s)){if(h>u)break;g.push(h)}}else g=Go(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=gu(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(Eu(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}pu=_u({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),gu=pu.format,vu=pu.formatPrefix;var Du=new Date,ku=new Date;function Lu(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,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Lu((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 Du.setTime(+e),ku.setTime(+r),t(Du),t(ku),Math.floor(n(Du,ku))},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 Ru=Lu((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));Ru.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Lu((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):Ru:null};var Iu=Lu((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()})),Nu=Lu((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()})),Vu=Lu((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()})),Uu=Lu((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 Gu(t){return Lu((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 Bu=Gu(0),Hu=Gu(1),ju=(Gu(2),Gu(3),Gu(4)),zu=(Gu(5),Gu(6),Lu((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()}))),Fu=Lu((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()}));Fu.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Lu((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 Wu=Lu((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 Yu(t){return Lu((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 qu=Yu(0),Xu=Yu(1),Zu=(Yu(2),Yu(3),Yu(4)),Ku=(Yu(5),Yu(6),Lu((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 $u(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 Qu(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 Ju(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}Ku.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Lu((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 tc,ec,nc={"-":"",_:" ",0:"0"},rc=/^\s*\d+/,ic=/^%/,ac=/[\\^$*+?|[\]().{}]/g;function oc(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function sc(t){return t.replace(ac,"\\$&")}function uc(t){return new RegExp("^(?:"+t.map(sc).join("|")+")","i")}function cc(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function lc(t,e,n){var r=rc.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function hc(t,e,n){var r=rc.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function fc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function dc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function pc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function gc(t,e,n){var r=rc.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function vc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function mc(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function yc(t,e,n){var r=rc.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function _c(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function bc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function xc(t,e,n){var r=rc.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function wc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function Ec(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function Sc(t,e,n){var r=rc.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function Oc(t,e,n){var r=rc.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function Tc(t,e,n){var r=rc.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function Mc(t,e,n){var r=ic.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function Ac(t,e,n){var r=rc.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function Cc(t,e,n){var r=rc.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function Pc(t,e){return oc(t.getDate(),e,2)}function Dc(t,e){return oc(t.getHours(),e,2)}function kc(t,e){return oc(t.getHours()%12||12,e,2)}function Lc(t,e){return oc(1+Uu.count(Fu(t),t),e,3)}function Rc(t,e){return oc(t.getMilliseconds(),e,3)}function Ic(t,e){return Rc(t,e)+"000"}function Nc(t,e){return oc(t.getMonth()+1,e,2)}function Vc(t,e){return oc(t.getMinutes(),e,2)}function Uc(t,e){return oc(t.getSeconds(),e,2)}function Gc(t){var e=t.getDay();return 0===e?7:e}function Bc(t,e){return oc(Bu.count(Fu(t)-1,t),e,2)}function Hc(t,e){var n=t.getDay();return t=n>=4||0===n?ju(t):ju.ceil(t),oc(ju.count(Fu(t),t)+(4===Fu(t).getDay()),e,2)}function jc(t){return t.getDay()}function zc(t,e){return oc(Hu.count(Fu(t)-1,t),e,2)}function Fc(t,e){return oc(t.getFullYear()%100,e,2)}function Wc(t,e){return oc(t.getFullYear()%1e4,e,4)}function Yc(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+oc(e/60|0,"0",2)+oc(e%60,"0",2)}function qc(t,e){return oc(t.getUTCDate(),e,2)}function Xc(t,e){return oc(t.getUTCHours(),e,2)}function Zc(t,e){return oc(t.getUTCHours()%12||12,e,2)}function Kc(t,e){return oc(1+Wu.count(Ku(t),t),e,3)}function $c(t,e){return oc(t.getUTCMilliseconds(),e,3)}function Qc(t,e){return $c(t,e)+"000"}function Jc(t,e){return oc(t.getUTCMonth()+1,e,2)}function tl(t,e){return oc(t.getUTCMinutes(),e,2)}function el(t,e){return oc(t.getUTCSeconds(),e,2)}function nl(t){var e=t.getUTCDay();return 0===e?7:e}function rl(t,e){return oc(qu.count(Ku(t)-1,t),e,2)}function il(t,e){var n=t.getUTCDay();return t=n>=4||0===n?Zu(t):Zu.ceil(t),oc(Zu.count(Ku(t),t)+(4===Ku(t).getUTCDay()),e,2)}function al(t){return t.getUTCDay()}function ol(t,e){return oc(Xu.count(Ku(t)-1,t),e,2)}function sl(t,e){return oc(t.getUTCFullYear()%100,e,2)}function ul(t,e){return oc(t.getUTCFullYear()%1e4,e,4)}function cl(){return"+0000"}function ll(){return"%"}function hl(t){return+t}function fl(t){return Math.floor(+t/1e3)}!function(t){tc=function(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,u=t.shortMonths,c=uc(i),l=cc(i),h=uc(a),f=cc(a),d=uc(o),p=cc(o),g=uc(s),v=cc(s),m=uc(u),y=cc(u),_={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return u[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Pc,e:Pc,f:Ic,H:Dc,I:kc,j:Lc,L:Rc,m:Nc,M:Vc,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:hl,s:fl,S:Uc,u:Gc,U:Bc,V:Hc,w:jc,W:zc,x:null,X:null,y:Fc,Y:Wc,Z:Yc,"%":ll},b={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return u[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:qc,e:qc,f:Qc,H:Xc,I:Zc,j:Kc,L:$c,m:Jc,M:tl,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:hl,s:fl,S:el,u:nl,U:rl,V:il,w:al,W:ol,x:null,X:null,y:sl,Y:ul,Z:cl,"%":ll},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 S(t,e,n,r)},d:bc,e:bc,f:Tc,H:wc,I:wc,j:xc,L:Oc,m:_c,M:Ec,p:function(t,e,n){var r=c.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:yc,Q:Ac,s:Cc,S:Sc,u:hc,U:fc,V:dc,w:lc,W:pc,x:function(t,e,r){return S(t,n,e,r)},X:function(t,e,n){return S(t,r,e,n)},y:vc,Y:gc,Z:mc,"%":Mc};function w(t,e){return function(n){var r,i,a,o=[],s=-1,u=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(o.push(t.slice(u,s)),null!=(i=nc[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),u=s+1);return o.push(t.slice(u,s)),o.join("")}}function E(t,e){return function(n){var r,i,a=Ju(1900,void 0,1);if(S(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=Qu(Ju(a.y,0,1))).getUTCDay(),r=i>4||0===i?Xu.ceil(r):Xu(r),r=Wu.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=$u(Ju(a.y,0,1))).getDay(),r=i>4||0===i?Hu.ceil(r):Hu(r),r=Uu.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?Qu(Ju(a.y,0,1)).getUTCDay():$u(Ju(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,Qu(a)):$u(a)}}function S(t,e,n,r){for(var i,a,o=0,s=e.length,u=n.length;o<s;){if(r>=u)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=x[i in nc?e.charAt(o++):i])||(r=a(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=E(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=E(t+="",!0);return e.toString=function(){return t},e}})}(t),ec=tc.format,tc.parse,tc.utcFormat,tc.utcParse}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function dl(t){return new Date(t)}function pl(t){return t instanceof Date?+t:+new Date(+t)}function gl(t,e,n,r,i,a,o,s,u){var c=iu($s,$s),l=c.invert,h=c.domain,f=u(".%L"),d=u(":%S"),p=u("%I:%M"),g=u("%I %p"),v=u("%a %d"),m=u("%b %d"),y=u("%B"),_=u("%Y"),b=[[o,1,1e3],[o,5,5e3],[o,15,15e3],[o,30,3e4],[a,1,6e4],[a,5,3e5],[a,15,9e5],[a,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(o(s)<s?f:a(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 a=Math.abs(r-n)/e,o=ko((function(t){return t[2]})).right(b,a);o===b.length?(i=Ho(n/31536e6,r/31536e6,e),e=t):o?(i=(o=b[a/b[o-1][2]<b[o][2]/a?o-1:o])[1],e=o[0]):(i=Math.max(Ho(n,r,e),1),e=s)}return null==i?e:e.every(i)}return c.invert=function(t){return new Date(l(t))},c.domain=function(t){return arguments.length?h(Wo.call(t,pl)):h().map(dl)},c.ticks=function(t,e){var n,r=h(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=w(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},c.tickFormat=function(t,e){return null==e?x:u(e)},c.nice=function(t,e){var n=h();return(t=w(t,n[0],n[n.length-1],e))?h(Eu(n,t)):c},c.copy=function(){return nu(c,gl(t,e,n,r,i,a,o,s,u))},c}function vl(){return zo.apply(gl(Fu,zu,Bu,Uu,Vu,Nu,Iu,Ru,ec).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}var ml=Math.PI,yl=2*ml,_l=yl-1e-6;function bl(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function xl(){return new bl}function wl(t){return function(){return t}}bl.prototype=xl.prototype={constructor:bl,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,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,u=r-e,c=a-t,l=o-e,h=c*c+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-u*c)>1e-6&&i){var f=n-a,d=r-o,p=s*s+u*u,g=f*f+d*d,v=Math.sqrt(p),m=Math.sqrt(h),y=i*Math.tan((ml-Math.acos((p+h-g)/(2*v*m)))/2),_=y/m,b=y/v;Math.abs(_-1)>1e-6&&(this._+="L"+(t+_*c)+","+(e+_*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>c*d)+","+(this._x1=t+b*s)+","+(this._y1=e+b*u)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),u=t+o,c=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+u+","+c:(Math.abs(this._x1-u)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+u+","+c),n&&(h<0&&(h=h%yl+yl),h>_l?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=u)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=ml)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var El=Math.abs,Sl=Math.atan2,Ol=Math.cos,Tl=Math.max,Ml=Math.min,Al=Math.sin,Cl=Math.sqrt,Pl=Math.PI,Dl=Pl/2,kl=2*Pl;function Ll(t){return t>1?0:t<-1?Pl:Math.acos(t)}function Rl(t){return t>=1?Dl:t<=-1?-Dl:Math.asin(t)}function Il(t){return t.innerRadius}function Nl(t){return t.outerRadius}function Vl(t){return t.startAngle}function Ul(t){return t.endAngle}function Gl(t){return t&&t.padAngle}function Bl(t,e,n,r,i,a,o,s){var u=n-t,c=r-e,l=o-i,h=s-a,f=h*u-l*c;if(!(f*f<1e-12))return[t+(f=(l*(e-a)-h*(t-i))/f)*u,e+f*c]}function Hl(t,e,n,r,i,a,o){var s=t-n,u=e-r,c=(o?a:-a)/Cl(s*s+u*u),l=c*u,h=-c*s,f=t+l,d=e+h,p=n+l,g=r+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,b=y*y+_*_,x=i-a,w=f*g-p*d,E=(_<0?-1:1)*Cl(Tl(0,x*x*b-w*w)),S=(w*_-y*E)/b,O=(-w*y-_*E)/b,T=(w*_+y*E)/b,M=(-w*y+_*E)/b,A=S-v,C=O-m,P=T-v,D=M-m;return A*A+C*C>P*P+D*D&&(S=T,O=M),{cx:S,cy:O,x01:-l,y01:-h,x11:S*(i/x-1),y11:O*(i/x-1)}}function jl(){var t=Il,e=Nl,n=wl(0),r=null,i=Vl,a=Ul,o=Gl,s=null;function u(){var u,c,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-Dl,d=a.apply(this,arguments)-Dl,p=El(d-f),g=d>f;if(s||(s=u=xl()),h<l&&(c=h,h=l,l=c),h>1e-12)if(p>kl-1e-12)s.moveTo(h*Ol(f),h*Al(f)),s.arc(0,0,h,f,d,!g),l>1e-12&&(s.moveTo(l*Ol(d),l*Al(d)),s.arc(0,0,l,d,f,g));else{var v,m,y=f,_=d,b=f,x=d,w=p,E=p,S=o.apply(this,arguments)/2,O=S>1e-12&&(r?+r.apply(this,arguments):Cl(l*l+h*h)),T=Ml(El(h-l)/2,+n.apply(this,arguments)),M=T,A=T;if(O>1e-12){var C=Rl(O/l*Al(S)),P=Rl(O/h*Al(S));(w-=2*C)>1e-12?(b+=C*=g?1:-1,x-=C):(w=0,b=x=(f+d)/2),(E-=2*P)>1e-12?(y+=P*=g?1:-1,_-=P):(E=0,y=_=(f+d)/2)}var D=h*Ol(y),k=h*Al(y),L=l*Ol(x),R=l*Al(x);if(T>1e-12){var I,N=h*Ol(_),V=h*Al(_),U=l*Ol(b),G=l*Al(b);if(p<Pl&&(I=Bl(D,k,U,G,N,V,L,R))){var B=D-I[0],H=k-I[1],j=N-I[0],z=V-I[1],F=1/Al(Ll((B*j+H*z)/(Cl(B*B+H*H)*Cl(j*j+z*z)))/2),W=Cl(I[0]*I[0]+I[1]*I[1]);M=Ml(T,(l-W)/(F-1)),A=Ml(T,(h-W)/(F+1))}}E>1e-12?A>1e-12?(v=Hl(U,G,D,k,h,A,g),m=Hl(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,Sl(v.y01,v.x01),Sl(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,A,Sl(v.y01,v.x01),Sl(v.y11,v.x11),!g),s.arc(0,0,h,Sl(v.cy+v.y11,v.cx+v.x11),Sl(m.cy+m.y11,m.cx+m.x11),!g),s.arc(m.cx,m.cy,A,Sl(m.y11,m.x11),Sl(m.y01,m.x01),!g))):(s.moveTo(D,k),s.arc(0,0,h,y,_,!g)):s.moveTo(D,k),l>1e-12&&w>1e-12?M>1e-12?(v=Hl(L,R,N,V,l,-M,g),m=Hl(D,k,U,G,l,-M,g),s.lineTo(v.cx+v.x01,v.cy+v.y01),M<T?s.arc(v.cx,v.cy,M,Sl(v.y01,v.x01),Sl(m.y01,m.x01),!g):(s.arc(v.cx,v.cy,M,Sl(v.y01,v.x01),Sl(v.y11,v.x11),!g),s.arc(0,0,l,Sl(v.cy+v.y11,v.cx+v.x11),Sl(m.cy+m.y11,m.cx+m.x11),g),s.arc(m.cx,m.cy,M,Sl(m.y11,m.x11),Sl(m.y01,m.x01),!g))):s.arc(0,0,l,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)+ +a.apply(this,arguments))/2-Pl/2;return[Ol(r)*n,Al(r)*n]},u.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:wl(+e),u):t},u.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:wl(+t),u):e},u.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:wl(+t),u):n},u.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:wl(+t),u):r},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:wl(+t),u):i},u.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:wl(+t),u):a},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:wl(+t),u):o},u.context=function(t){return arguments.length?(s=null==t?null:t,u):s},u}function zl(t){this._context=t}function Fl(t){return new zl(t)}function Wl(t){return t[0]}function Yl(t){return t[1]}function ql(){var t=Wl,e=Yl,n=wl(!0),r=null,i=Fl,a=null;function o(o){var s,u,c,l=o.length,h=!1;for(null==r&&(a=i(c=xl())),s=0;s<=l;++s)!(s<l&&n(u=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(u,s,o),+e(u,s,o));if(c)return a=null,c+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:wl(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:wl(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:wl(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o}function Xl(){var t=Wl,e=null,n=wl(0),r=Yl,i=wl(!0),a=null,o=Fl,s=null;function u(u){var c,l,h,f,d,p=u.length,g=!1,v=new Array(p),m=new Array(p);for(null==a&&(s=o(d=xl())),c=0;c<=p;++c){if(!(c<p&&i(f=u[c],c,u))===g)if(g=!g)l=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=c-1;h>=l;--h)s.point(v[h],m[h]);s.lineEnd(),s.areaEnd()}g&&(v[c]=+t(f,c,u),m[c]=+n(f,c,u),s.point(e?+e(f,c,u):v[c],r?+r(f,c,u):m[c]))}if(d)return s=null,d+""||null}function c(){return ql().defined(i).curve(o).context(a)}return u.x=function(n){return arguments.length?(t="function"==typeof n?n:wl(+n),e=null,u):t},u.x0=function(e){return arguments.length?(t="function"==typeof e?e:wl(+e),u):t},u.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:wl(+t),u):e},u.y=function(t){return arguments.length?(n="function"==typeof t?t:wl(+t),r=null,u):n},u.y0=function(t){return arguments.length?(n="function"==typeof t?t:wl(+t),u):n},u.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:wl(+t),u):r},u.lineX0=u.lineY0=function(){return c().x(t).y(n)},u.lineY1=function(){return c().x(t).y(r)},u.lineX1=function(){return c().x(e).y(n)},u.defined=function(t){return arguments.length?(i="function"==typeof t?t:wl(!!t),u):i},u.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),u):o},u.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),u):a},u}function Zl(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function Kl(t){return t}zl.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 $l=Jl(Fl);function Ql(t){this._curve=t}function Jl(t){function e(e){return new Ql(t(e))}return e._curve=t,e}function th(){return t=ql().curve($l),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(Jl(t)):e()._curve},t;var t,e}Ql.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 eh=Array.prototype.slice;function nh(){}function rh(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 ih(t){this._context=t}function ah(t){return new ih(t)}function oh(t){this._context=t}function sh(t){return new oh(t)}function uh(t){this._context=t}function ch(t){return new uh(t)}function lh(t,e){this._basis=new ih(t),this._beta=e}ih.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:rh(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:rh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},oh.prototype={areaStart:nh,areaEnd:nh,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:rh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},uh.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:rh(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},lh.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],a=e[0],o=t[n]-i,s=e[n]-a,u=-1;++u<=n;)r=u/n,this._basis.point(this._beta*t[u]+(1-this._beta)*(i+r*o),this._beta*e[u]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var hh=function t(e){function n(t){return 1===e?new ih(t):new lh(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function fh(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 dh(t,e){this._context=t,this._k=(1-e)/6}dh.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:fh(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:fh(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 ph=function t(e){function n(t){return new dh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function gh(t,e){this._context=t,this._k=(1-e)/6}gh.prototype={areaStart:nh,areaEnd:nh,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:fh(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 vh=function t(e){function n(t){return new gh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function mh(t,e){this._context=t,this._k=(1-e)/6}mh.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:fh(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 yh=function t(e){function n(t){return new mh(t,e)}return n.tension=function(e){return t(+e)},n}(0);function _h(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,u=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/u,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/u}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*c+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function bh(t,e){this._context=t,this._alpha=e}bh.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:_h(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 xh=function t(e){function n(t){return e?new bh(t,e):new dh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function wh(t,e){this._context=t,this._alpha=e}wh.prototype={areaStart:nh,areaEnd:nh,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:_h(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 Eh=function t(e){function n(t){return e?new wh(t,e):new gh(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: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:_h(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 Oh=function t(e){function n(t){return e?new Sh(t,e):new mh(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Th(t){this._context=t}function Mh(t){return new Th(t)}function Ah(t){return t<0?-1:1}function Ch(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ah(a)+Ah(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Ph(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Dh(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function kh(t){this._context=t}function Lh(t){this._context=new Rh(t)}function Rh(t){this._context=t}function Ih(t){return new kh(t)}function Nh(t){return new Lh(t)}function Vh(t){this._context=t}function Uh(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Gh(t){return new Vh(t)}function Bh(t,e){this._context=t,this._t=e}function Hh(t){return new Bh(t,.5)}function jh(t){return new Bh(t,0)}function zh(t){return new Bh(t,1)}function Fh(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]}function Wh(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n}function Yh(t,e){return t[e]}Th.prototype={areaStart:nh,areaEnd:nh,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))}},kh.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:Dh(this,this._t0,Ph(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,Dh(this,Ph(this,n=Ch(this,t,e)),n);break;default:Dh(this,this._t0,n=Ch(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(Lh.prototype=Object.create(kh.prototype)).point=function(t,e){kh.prototype.point.call(this,e,t)},Rh.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,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},Vh.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=Uh(t),i=Uh(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(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)}},Bh.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 qh=function(){function t(t){this.state={options:{}},this.colorScale={},this.services=t}return t.prototype.getAllDataFromDomain=function(){if(!this.get("data"))return null;var t=this.getDataGroups(),e=aa.clone(this.get("data")),n=this.getOptions().data.groupMapsTo,r=this.getOptions().axes;return r&&Object.keys(r).forEach((function(t){if(r[t].mapsTo&&r[t].domain){var n=r[t].mapsTo;if(r[t].scaleType===O.LABELS)e=e.filter((function(e){return r[t].domain.includes(e[n])}));else{var i=r[t].domain,a=i[0],o=i[1];e=e.filter((function(t){return t[n]>=a&&t[n]<=o}))}}})),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=Aa.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(aa.clone(t)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e},t.prototype.getDataGroups=function(){return aa.getProperty(this.getOptions(),"data","loading")?[]:this.get("dataGroups")},t.prototype.getActiveDataGroups=function(){var t=Aa.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(),a=Ao(n,(function(t){return t[r]})).keys(),o=this.services.cartesianScales.domainAxisPosition,s=t.axes[o].scaleType;s===O.TIME?a.sort((function(t,e){return new Date(t)-new Date(e)})):s!==O.LOG&&s!==O.LINEAR||a.sort((function(t,e){return t-e}));var u=this.getDataGroupNames();return a.map((function(t){var a={sharedStackKey:t};return u.forEach((function(o){var s=n.find((function(n){return n[e]===o&&n[r].toString()===t}));a[o]=s?s[i]:null})),a}))},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 a=aa.fromPairs(i.map((function(t){return[t.sharedStackKey,0]})));i.forEach((function(t){r.forEach((function(e){a[t.sharedStackKey]+=t[e]}))})),i.forEach((function(t){r.forEach((function(e){t[e]=t[e]/a[t.sharedStackKey]*100}))}))}return function(){var t=wl([]),e=Wh,n=Fh,r=Yh;function i(i){var a,o,s=t.apply(this,arguments),u=i.length,c=s.length,l=new Array(c);for(a=0;a<c;++a){for(var h,f=s[a],d=l[a]=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(a=0,o=e(l);a<c;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:wl(eh.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:wl(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?Wh:"function"==typeof t?t:wl(eh.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?Fh: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 a=t[i];return a[n]=r[e],a}))}))},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:aa.merge(this.getOptions(),t)})},t.prototype.update=function(t){void 0===t&&(t=!0),this.getDisplayData()&&(this.updateAllDataGroups(),this.setColorScale(),this.services.events.dispatchEvent(G.Model.UPDATE,{animate:t}))},t.prototype.setUpdateCallback=function(t){this.updateCallback=t},t.prototype.toggleDataLabel=function(t){var e=Aa.items.status,n=e.ACTIVE,r=e.DISABLED,i=this.getDataGroups(),a=i.some((function(t){return t.status===r})),o=i.filter((function(t){return t.status===n}));if(a)if(1===o.length&&o[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,a){i[a].status=e.name===t?n:r}));var u=i.filter((function(t){return t.status===n})),c=this.getOptions(),l=i.some((function(t){return t.status===r}));c.data.selectedGroups=l?u.map((function(t){return t.name})):[],this.services.events.dispatchEvent(G.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})},t.prototype.getIsFilled=function(t,e,n,r){var i=this.getOptions();return i.getIsFilled?i.getIsFilled(t,e,n,r):r},t.prototype.getFillColor=function(t,e,n){var r=this.getOptions(),i=this.getFillScale()(t);return r.getFillColor?r.getFillColor(t,e,n,i):i},t.prototype.getStrokeColor=function(t,e,n){var r=this.getOptions(),i=this.colorScale(t);return r.getStrokeColor?r.getStrokeColor(t,e,n,i):i},t.prototype.getFillScale=function(){return this.colorScale},t.prototype.getStatus=function(){return null},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 a,o=aa.getProperty(t,"label");if(null===o){var s=aa.getProperty(r,i);a=s||"Ungrouped"}else a=o;var u={group:a,key:r[i]};isNaN(n)?(u.value=n.value,u.date=n.date):u.value=n,e.push(u)}))})),e},t.prototype.getTabularData=function(t){return Array.isArray(t)?t:this.transformToTabularData(t)},t.prototype.sanitize=function(t){return this.getTabularData(t)},t.prototype.updateAllDataGroups=function(){var t=this;this.allDataGroups?this.getDataGroupNames().forEach((function(e){-1===t.allDataGroups.indexOf(e)&&t.allDataGroups.push(e)})):this.allDataGroups=this.getDataGroupNames()},t.prototype.generateDataGroups=function(t){var e=this.getOptions().data.groupMapsTo,n=Aa.items.status,r=n.ACTIVE,i=n.DISABLED,a=this.getOptions(),o=Ao(t,(function(t){return t[e]})).keys();a.data.selectedGroups.length&&(a.data.selectedGroups.every((function(t){return o.includes(t)}))||(a.data.selectedGroups=[]));var s=function(t){return!a.data.selectedGroups.length||a.data.selectedGroups.includes(t)?r:i};return o.map((function(t){return{name:t,status:s(t)}}))},t.prototype.setColorScale=function(){var t=Oo,e=this.getOptions(),n=aa.getProperty(e,"color","scale");if(null!==n&&0!==Object.keys(n).length){var r=[],i=0;this.allDataGroups.forEach((function(e){n[e]?r.push(n[e]):r.push(t[i]),i===t.length-1?i=0:i++})),this.colorScale=Xo().range(r).domain(this.allDataGroups)}else this.colorScale=Xo().range(t).domain(this.allDataGroups)},t}(),Xh=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}(),Zh={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 "},Kh=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}()}(),$h="undefined"!=typeof window&&"undefined"!=typeof document&&window.document===document,Qh="undefined"!=typeof global&&global.Math===Math?global:"undefined"!=typeof self&&self.Math===Math?self:"undefined"!=typeof window&&window.Math===Math?window:Function("return this")(),Jh="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(Qh):function(t){return setTimeout((function(){return t(Date.now())}),1e3/60)},tf=["top","right","bottom","left","width","height","size","weight"],ef="undefined"!=typeof MutationObserver,nf=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 a(){n&&(n=!1,t()),r&&s()}function o(){Jh(a)}function s(){var t=Date.now();if(n){if(t-i<2)return;r=!0}else n=!0,r=!1,setTimeout(o,e);i=t}return s}(this.refresh.bind(this),20)};nf.prototype.addObserver=function(t){~this.observers_.indexOf(t)||this.observers_.push(t),this.connected_||this.connect_()},nf.prototype.removeObserver=function(t){var e=this.observers_,n=e.indexOf(t);~n&&e.splice(n,1),!e.length&&this.connected_&&this.disconnect_()},nf.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},nf.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},nf.prototype.connect_=function(){$h&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),ef?(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)},nf.prototype.disconnect_=function(){$h&&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)},nf.prototype.onTransitionEnd_=function(t){var e=t.propertyName;void 0===e&&(e=""),tf.some((function(t){return!!~e.indexOf(t)}))&&this.refresh()},nf.getInstance=function(){return this.instance_||(this.instance_=new nf),this.instance_},nf.instance_=null;var rf=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},af=function(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView||Qh},of=ff(0,0,0,0);function sf(t){return parseFloat(t)||0}function uf(t){for(var e=[],n=arguments.length-1;n-- >0;)e[n]=arguments[n+1];return e.reduce((function(e,n){return e+sf(t["border-"+n+"-width"])}),0)}function cf(t){var e=t.clientWidth,n=t.clientHeight;if(!e&&!n)return of;var r=af(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],a=t["padding-"+i];e[i]=sf(a)}return e}(r),a=i.left+i.right,o=i.top+i.bottom,s=sf(r.width),u=sf(r.height);if("border-box"===r.boxSizing&&(Math.round(s+a)!==e&&(s-=uf(r,"left","right")+a),Math.round(u+o)!==n&&(u-=uf(r,"top","bottom")+o)),!function(t){return t===af(t).document.documentElement}(t)){var c=Math.round(s+a)-e,l=Math.round(u+o)-n;1!==Math.abs(c)&&(s-=c),1!==Math.abs(l)&&(u-=l)}return ff(i.left,i.top,s,u)}var lf="undefined"!=typeof SVGGraphicsElement?function(t){return t instanceof af(t).SVGGraphicsElement}:function(t){return t instanceof af(t).SVGElement&&"function"==typeof t.getBBox};function hf(t){return $h?lf(t)?function(t){var e=t.getBBox();return ff(0,0,e.width,e.height)}(t):cf(t):of}function ff(t,e,n,r){return{x:t,y:e,width:n,height:r}}var df=function(t){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ff(0,0,0,0),this.target=t};df.prototype.isActive=function(){var t=hf(this.target);return this.contentRect_=t,t.width!==this.broadcastWidth||t.height!==this.broadcastHeight},df.prototype.broadcastRect=function(){var t=this.contentRect_;return this.broadcastWidth=t.width,this.broadcastHeight=t.height,t};var pf=function(t,e){var n=function(t){var e=t.x,n=t.y,r=t.width,i=t.height,a="undefined"!=typeof DOMRectReadOnly?DOMRectReadOnly:Object,o=Object.create(a.prototype);return rf(o,{x:e,y:n,width:r,height:i,top:n,right:e+r,bottom:i+n,left:e}),o}(e);rf(this,{target:t,contentRect:n})},gf=function(t,e,n){if(this.activeObservations_=[],this.observations_=new Kh,"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};gf.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 af(t).Element))throw new TypeError('parameter 1 is not of type "Element".');var e=this.observations_;e.has(t)||(e.set(t,new df(t)),this.controller_.addObserver(this),this.controller_.refresh())}},gf.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 af(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))}},gf.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},gf.prototype.gatherActive=function(){var t=this;this.clearActive(),this.observations_.forEach((function(e){e.isActive()&&t.activeObservations_.push(e)}))},gf.prototype.broadcastActive=function(){if(this.hasActive()){var t=this.callbackCtx_,e=this.activeObservations_.map((function(t){return new pf(t.target,t.broadcastRect())}));this.callback_.call(t,e,t),this.clearActive()}},gf.prototype.clearActive=function(){this.activeObservations_.splice(0)},gf.prototype.hasActive=function(){return this.activeObservations_.length>0};var vf="undefined"!=typeof WeakMap?new WeakMap:new Kh,mf=function(t){if(!(this instanceof mf))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=nf.getInstance(),n=new gf(t,e,this);vf.set(this,n)};["observe","unobserve","disconnect"].forEach((function(t){mf.prototype[t]=function(){return(e=vf.get(this))[t].apply(e,arguments);var e}}));var yf=void 0!==Qh.ResizeObserver?Qh.ResizeObserver:mf,_f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.getSVGElementSize=function(t,e){t.attr||(t=ca(t));var n,r,i,a,o={width:0,height:0},s=function(t){t&&Object.keys(o).forEach((function(e){if(t[e]){var n=t[e],r=parseFloat(n);n&&r>o[e]&&-1===(""+n).indexOf("%")&&(o[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{a={width:(i=t.node().getBoundingClientRect()).width,height:i.height}}catch(t){}var c={width:t.node().clientWidth,height:t.node().clientHeight};if(e){if(e.useAttrs&&(s(u),o.width>0&&o.height>0))return o;if(e.useClientDimensions&&(s(c),o.width>0&&o.height>0))return c;if(e.useBBox&&(s(r),o.width>0&&o.height>0))return r;if(e.useBoundingRect&&(s(a),o.width>0&&o.height>0))return a}try{s({width:aa.getProperty(t.node(),"width","baseVal","value"),height:aa.getProperty(t.node(),"height","baseVal","value")})}catch(t){s(c),s(r),s(u)}return o},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}),a=e.getSVGElementSize(r,{useAttr:!0}).width,o=0;return t===M.CENTER?o=Math.floor((a-i.width)/2):t===M.RIGHT&&(o=a-i.width),o},e.prototype.init=function(){this.styleHolderElement(),this.addSVGElement(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners()},e.prototype.update=function(){this.styleHolderElement()},e.prototype.styleHolderElement=function(){var t=this.getHolder();ca(this.getHolder()).classed(Zh.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=aa.getProperty(t,"style","prefix"),n=ca(this.getHolder()).append("svg").classed(Zh.prefix+"--"+e+"--chart-svg",!0).attr("height","100%").attr("width","100%");this.svg=n.node()},e.prototype.setSVGMaxHeight=function(){if(!this.model.getOptions().height){var t=e.getSVGElementSize(ca(this.svg),{useBBox:!0}).height,n=ca(this.svg).attr("class"),r=ca(this.svg).selectAll("."+n+" > svg"),i=0;r.nodes().forEach((function(t){i+=Number(e.getSVGElementSize(ca(t),{useBBox:!0}).height)})),i<=t?ca(this.svg).attr("height",i):ca(this.svg).attr("height","100%")}},e.prototype.getMainSVG=function(){return this.svg},e.prototype.addHolderListeners=function(){var t=this,e=this.getHolder();e&&ca(e).on("mouseover",(function(){t.services.events.dispatchEvent(G.Chart.MOUSEOVER)})).on("mouseout",(function(){t.services.events.dispatchEvent(G.Chart.MOUSEOUT)}))},e.prototype.addResizeListener=function(){var t=this,e=this.getHolder();if(e){var n=e.clientWidth,r=e.clientHeight,i=aa.debounce((function(i,a){e&&(Math.abs(n-e.clientWidth)>1||Math.abs(r-e.clientHeight)>1)&&(n=e.clientWidth,r=e.clientHeight,t.services.events.dispatchEvent(G.Chart.RESIZE))}),12.5);new yf(i).observe(e)}},e}(Xh),bf=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}(Xh),xf={value:function(){}};function wf(){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 Ef(r)}function Ef(t){this._=t}function Sf(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 Of(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function Tf(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=xf,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}Ef.prototype=wf.prototype={constructor:Ef,on:function(t,e){var n,r=this._,i=Sf(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=Tf(r[n],t.name,e);else if(null==e)for(n in r)r[n]=Tf(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=Of(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new Ef(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].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,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var Mf,Af,Cf=0,Pf=0,Df=0,kf=0,Lf=0,Rf=0,If="object"==typeof performance&&performance.now?performance:Date,Nf="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Vf(){return Lf||(Nf(Uf),Lf=If.now()+Rf)}function Uf(){Lf=0}function Gf(){this._call=this._time=this._next=null}function Bf(t,e,n){var r=new Gf;return r.restart(t,e,n),r}function Hf(){Lf=(kf=If.now())+Rf,Cf=Pf=0;try{!function(){Vf(),++Cf;for(var t,e=Mf;e;)(t=Lf-e._time)>=0&&e._call.call(null,t),e=e._next;--Cf}()}finally{Cf=0,function(){var t,e,n=Mf,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:Mf=e);Af=t,zf(r)}(),Lf=0}}function jf(){var t=If.now(),e=t-kf;e>1e3&&(Rf-=e,kf=t)}function zf(t){Cf||(Pf&&(Pf=clearTimeout(Pf)),t-Lf>24?(t<1/0&&(Pf=setTimeout(Hf,t-If.now()-Rf)),Df&&(Df=clearInterval(Df))):(Df||(kf=If.now(),Df=setInterval(jf,1e3)),Cf=1,Nf(Hf)))}function Ff(t,e,n){var r=new Gf;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r}Gf.prototype=Bf.prototype={constructor:Gf,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?Vf():+n)+(null==e?0:+e),this._next||Af===this||(Af?Af._next=this:Mf=this,Af=this),this._call=t,this._time=n,zf()},stop:function(){this._call&&(this._call=null,this._time=1/0,zf())}};var Wf=wf("start","end","cancel","interrupt"),Yf=[];function qf(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(u){var c,l,h,f;if(1!==n.state)return s();for(c in i)if((f=i[c]).name===n.name){if(3===f.state)return Ff(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[c]):+c<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[c])}if(Ff((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(u))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),c=0,l=-1;c<h;++c)(f=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].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=Bf((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Wf,tween:Yf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function Xf(t,e){var n=Kf(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function Zf(t,e){var n=Kf(t,e);if(n.state>3)throw new Error("too late; already running");return n}function Kf(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function $f(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[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 a[i]):o=!1;o&&delete t.__transition}}function Qf(t,e){var n,r;return function(){var i=Zf(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function Jf(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=Zf(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},u=0,c=i.length;u<c;++u)if(i[u].name===e){i[u]=s;break}u===c&&i.push(s)}a.tween=i}}function td(t,e,n){var r=t._id;return t.each((function(){var t=Zf(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return Kf(t,r).value[e]}}function ed(t,e){var n;return("number"==typeof e?ks:e instanceof fs?As:(n=fs(e))?(e=n,As):Ns)(t,e)}function nd(t){return function(){this.removeAttribute(t)}}function rd(t){return function(){this.removeAttributeNS(t.space,t.local)}}function id(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function ad(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function od(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttribute(t))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttribute(t)}}function sd(t,e,n){var r,i,a;return function(){var o,s,u=n(this);if(null!=u)return(o=this.getAttributeNS(t.space,t.local))===(s=u+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,u));this.removeAttributeNS(t.space,t.local)}}function ud(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function cd(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function ld(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&cd(t,i)),n}return i._value=e,i}function hd(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&ud(t,i)),n}return i._value=e,i}function fd(t,e){return function(){Xf(this,t).delay=+e.apply(this,arguments)}}function dd(t,e){return e=+e,function(){Xf(this,t).delay=e}}function pd(t,e){return function(){Zf(this,t).duration=+e.apply(this,arguments)}}function gd(t,e){return e=+e,function(){Zf(this,t).duration=e}}function vd(t,e){if("function"!=typeof e)throw new Error;return function(){Zf(this,t).ease=e}}function md(t,e,n){var r,i,a=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)?Xf:Zf;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var yd=ua.prototype.constructor;function _d(t){return function(){this.style.removeProperty(t)}}function bd(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function xd(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&bd(t,a,n)),r}return a._value=e,a}function wd(t){return function(e){this.textContent=t.call(this,e)}}function Ed(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&wd(r)),e}return r._value=t,r}var Sd=0;function Od(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function Td(t){return ua().transition(t)}function Md(){return++Sd}var Ad=ua.prototype;function Cd(t){return+t}Od.prototype=Td.prototype={constructor:Od,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=oi(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,u,c=r[o],l=c.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=c[f])&&(u=t.call(s,s.__data__,f,c))&&("__data__"in s&&(u.__data__=s.__data__),h[f]=u,qf(h[f],e,n,f,h,Kf(s,n)));return new Od(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ui(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u,c=r[s],l=c.length,h=0;h<l;++h)if(u=c[h]){for(var f,d=t.call(u,u.__data__,h,c),p=Kf(u,n),g=0,v=d.length;g<v;++g)(f=d[g])&&qf(f,e,n,g,d,p);a.push(d),o.push(u)}return new Od(a,o,e,n)},filter: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 a,o=e[i],s=o.length,u=r[i]=[],c=0;c<s;++c)(a=o[c])&&t.call(a,a.__data__,c,o)&&u.push(a);return new Od(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,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u,c=e[s],l=n[s],h=c.length,f=o[s]=new Array(h),d=0;d<h;++d)(u=c[d]||l[d])&&(f[d]=u);for(;s<r;++s)o[s]=e[s];return new Od(o,this._parents,this._name,this._id)},selection:function(){return new yd(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Md(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)if(o=s[c]){var l=Kf(o,e);qf(o,t,n,c,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Od(r,this._parents,t,n)},call:Ad.call,nodes:Ad.nodes,node:Ad.node,size:Ad.size,empty:Ad.empty,each:Ad.each,on:function(t,e){var n=this._id;return arguments.length<2?Kf(this.node(),n).on.on(t):this.each(md(n,t,e))},attr:function(t,e){var n=ei(t),r="transform"===n?Xs:ed;return this.attrTween(t,"function"==typeof e?(n.local?sd:od)(n,r,td(this,"attr."+t,e)):null==e?(n.local?rd:nd)(n):(n.local?ad:id)(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=ei(t);return this.tween(n,(r.local?ld:hd)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?qs:ed;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Oi(this,t),o=(this.style.removeProperty(t),Oi(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,_d(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Oi(this,t),s=n(this),u=s+"";return null==s&&(this.style.removeProperty(t),u=s=Oi(this,t)),o===u?null:o===r&&u===i?a:(i=u,a=e(r=o,s))}}(t,r,td(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var u=Zf(this,t),c=u.on,l=null==u.value[o]?a||(a=_d(e)):void 0;c===n&&i===l||(r=(n=c).copy()).on(s,i=l),u.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Oi(this,t);return o===a?null:o===r?i:i=e(r=o,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,xd(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}}(td(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,Ed(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=Kf(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?Qf:Jf)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?fd:dd)(e,t)):Kf(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?pd:gd)(e,t)):Kf(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(vd(e,t)):Kf(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},u={value:function(){0==--i&&a()}};n.each((function(){var n=Zf(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 Pd={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function Dd(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Pd.time=Vf(),Pd;return n}ua.prototype.interrupt=function(t){return this.each((function(){$f(this,t)}))},ua.prototype.transition=function(t){var e,n;t instanceof Od?(e=t._id,t=t._name):(e=Md(),(n=Pd).time=Vf(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],u=s.length,c=0;c<u;++c)(o=s[c])&&qf(o,t,e,c,s,n||Dd(o,e));return new Od(r,this._parents,t,e)};var kd=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(G.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=Td(t).duration(aa.getProperty(Ia,t,"duration")||Ia.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=Td(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}(Xh);function Ld(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 Rd(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 Id(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ld(t),r=Rd(e);return n.setDate(n.getDate()+r),n}function Nd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ld(t).getTime(),r=Rd(e);return new Date(n+r)}function Vd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Nd(t,36e5*n)}function Ud(t){var e=new Date(t.getTime()),n=Math.ceil(e.getTimezoneOffset());return e.setSeconds(0,0),6e4*n+e.getTime()%6e4}function Gd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ld(t);return e.setHours(0,0,0,0),e}function Bd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Gd(t),r=Gd(e),i=n.getTime()-Ud(n),a=r.getTime()-Ud(r);return Math.round((i-a)/864e5)}function Hd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Nd(t,6e4*n)}function jd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ld(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 zd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ld(t),r=Rd(e),i=n.getMonth()+r,a=new Date(0);a.setFullYear(n.getFullYear(),i,1),a.setHours(0,0,0,0);var o=jd(a);return n.setMonth(i,Math.min(o,n.getDate())),n}function Fd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Nd(t,1e3*n)}function Wd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return zd(t,12*n)}function Yd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ld(t),r=Ld(e),i=n.getTime()-r.getTime();return i<0?-1:i>0?1:i}function qd(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ld(t);return!isNaN(e)}function Xd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ld(t),r=Ld(e),i=n.getFullYear()-r.getFullYear(),a=n.getMonth()-r.getMonth();return 12*i+a}function Zd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ld(t),r=Ld(e);return n.getFullYear()-r.getFullYear()}function Kd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ld(t),r=Ld(e);return n.getTime()-r.getTime()}function $d(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kd(t,e)/6e4;return n>0?Math.floor(n):Math.ceil(n)}function Qd(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kd(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 tp(t){return function(e){var n=e||{},r=n.width?String(n.width):t.defaultWidth;return t.formats[r]||t.formats[t.defaultWidth]}}var ep={date:tp({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:tp({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:tp({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},np={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function rp(t){return function(e,n){var r,i=n||{};if("formatting"===(i.context?String(i.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,o=i.width?String(i.width):a;r=t.formattingValues[o]||t.formattingValues[a]}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 ip(t){return function(e,n){var r=String(e),i=n||{},a=i.width,o=a&&t.matchPatterns[a]||t.matchPatterns[t.defaultMatchWidth],s=r.match(o);if(!s)return null;var u,c=s[0],l=a&&t.parsePatterns[a]||t.parsePatterns[t.defaultParseWidth];return u="[object Array]"===Object.prototype.toString.call(l)?function(t,e){for(var n=0;n<t.length;n++)if(e(t[n]))return n}(l,(function(t){return t.test(r)})):function(t,e){for(var n in t)if(t.hasOwnProperty(n)&&e(t[n]))return n}(l,(function(t){return t.test(r)})),u=t.valueCallback?t.valueCallback(u):u,{value:u=i.valueCallback?i.valueCallback(u):u,rest:r.slice(c.length)}}}var ap,op={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:ep,formatRelative:function(t,e,n,r){return np[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:rp({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:rp({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:rp({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:rp({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:rp({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:(ap={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(ap.matchPattern);if(!i)return null;var a=i[0],o=n.match(ap.parsePattern);if(!o)return null;var s=ap.valueCallback?ap.valueCallback(o[0]):o[0];return{value:s=r.valueCallback?r.valueCallback(s):s,rest:n.slice(a.length)}}),era:ip({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:ip({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:ip({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:ip({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:ip({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 sp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Nd(t,-n)}function up(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length<e;)r="0"+r;return n+r}var cp=function(t,e){var n=t.getUTCFullYear(),r=n>0?n:1-n;return up("yy"===e?r%100:r,e.length)},lp=function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):up(n+1,2)},hp=function(t,e){return up(t.getUTCDate(),e.length)},fp=function(t,e){return up(t.getUTCHours()%12||12,e.length)},dp=function(t,e){return up(t.getUTCHours(),e.length)},pp=function(t,e){return up(t.getUTCMinutes(),e.length)},gp=function(t,e){return up(t.getUTCSeconds(),e.length)},vp=function(t,e){var n=e.length,r=t.getUTCMilliseconds();return up(Math.floor(r*Math.pow(10,n-3)),e.length)};function mp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=1,n=Ld(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 yp(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=Ld(t),n=e.getUTCFullYear(),r=new Date(0);r.setUTCFullYear(n+1,0,4),r.setUTCHours(0,0,0,0);var i=mp(r),a=new Date(0);a.setUTCFullYear(n,0,4),a.setUTCHours(0,0,0,0);var o=mp(a);return e.getTime()>=i.getTime()?n+1:e.getTime()>=o.getTime()?n:n-1}function _p(t){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var e=yp(t),n=new Date(0);n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0);var r=mp(n);return r}function bp(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,a=null==i?0:Rd(i),o=null==n.weekStartsOn?a:Rd(n.weekStartsOn);if(!(o>=0&&o<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var s=Ld(t),u=s.getUTCDay(),c=(u<o?7:0)+u-o;return s.setUTCDate(s.getUTCDate()-c),s.setUTCHours(0,0,0,0),s}function xp(t,e){if(arguments.length<1)throw new TypeError("1 argument required, but only "+arguments.length+" present");var n=Ld(t,e),r=n.getUTCFullYear(),i=e||{},a=i.locale,o=a&&a.options&&a.options.firstWeekContainsDate,s=null==o?1:Rd(o),u=null==i.firstWeekContainsDate?s:Rd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=new Date(0);c.setUTCFullYear(r+1,0,u),c.setUTCHours(0,0,0,0);var l=bp(c,e),h=new Date(0);h.setUTCFullYear(r,0,u),h.setUTCHours(0,0,0,0);var f=bp(h,e);return n.getTime()>=l.getTime()?r+1:n.getTime()>=f.getTime()?r:r-1}function wp(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,a=null==i?1:Rd(i),o=null==n.firstWeekContainsDate?a:Rd(n.firstWeekContainsDate),s=xp(t,e),u=new Date(0);u.setUTCFullYear(s,0,o),u.setUTCHours(0,0,0,0);var c=bp(u,e);return c}var Ep="midnight",Sp="noon",Op="morning",Tp="afternoon",Mp="evening",Ap="night",Cp={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 cp(t,e)},Y:function(t,e,n,r){var i=xp(t,r),a=i>0?i:1-i;return"YY"===e?up(a%100,2):"Yo"===e?n.ordinalNumber(a,{unit:"year"}):up(a,e.length)},R:function(t,e){return up(yp(t),e.length)},u:function(t,e){return up(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 up(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 up(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 lp(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 up(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=Ld(t),r=bp(n,e).getTime()-wp(n,e).getTime();return Math.round(r/6048e5)+1}(t,r);return"wo"===e?n.ordinalNumber(i,{unit:"week"}):up(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=Ld(t),n=mp(e).getTime()-_p(e).getTime();return Math.round(n/6048e5)+1}(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):up(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):hp(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=Ld(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"}):up(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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(a);case"ee":return up(a,2);case"eo":return n.ordinalNumber(a,{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(),a=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(a);case"cc":return up(a,e.length);case"co":return n.ordinalNumber(a,{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 up(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?Sp:0===i?Ep: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?Mp:i>=12?Tp:i>=4?Op:Ap,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 fp(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):dp(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):up(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):up(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):pp(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):gp(t,e)},S:function(t,e){return vp(t,e)},X:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return Dp(i);case"XXXX":case"XX":return kp(i);case"XXXXX":case"XXX":default:return kp(i,":")}},x:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return Dp(i);case"xxxx":case"xx":return kp(i);case"xxxxx":case"xxx":default:return kp(i,":")}},O:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Pp(i,":");case"OOOO":default:return"GMT"+kp(i,":")}},z:function(t,e,n,r){var i=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Pp(i,":");case"zzzz":default:return"GMT"+kp(i,":")}},t:function(t,e,n,r){var i=r._originalDate||t;return up(Math.floor(i.getTime()/1e3),e.length)},T:function(t,e,n,r){return up((r._originalDate||t).getTime(),e.length)}};function Pp(t,e){var n=t>0?"-":"+",r=Math.abs(t),i=Math.floor(r/60),a=r%60;if(0===a)return n+String(i);var o=e||"";return n+String(i)+o+up(a,2)}function Dp(t,e){return t%60==0?(t>0?"-":"+")+up(Math.abs(t)/60,2):kp(t,e)}function kp(t,e){var n=e||"",r=t>0?"-":"+",i=Math.abs(t);return r+up(Math.floor(i/60),2)+n+up(i%60,2)}function Lp(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 Rp(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 Ip={p:Rp,P:function(t,e){var n,r=t.match(/(P+)(p+)?/),i=r[1],a=r[2];if(!a)return Lp(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}}",Lp(i,e)).replace("{{time}}",Rp(a,e))}},Np=["D","DD"],Vp=["YY","YYYY"];function Up(t){return-1!==Np.indexOf(t)}function Gp(t){return-1!==Vp.indexOf(t)}function Bp(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 Hp=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,jp=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zp=/^'([^]*?)'?$/,Fp=/''/g,Wp=/[a-zA-Z]/;function Yp(t,e,n){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var r=String(e),i=n||{},a=i.locale||op,o=a.options&&a.options.firstWeekContainsDate,s=null==o?1:Rd(o),u=null==i.firstWeekContainsDate?s:Rd(i.firstWeekContainsDate);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var c=a.options&&a.options.weekStartsOn,l=null==c?0:Rd(c),h=null==i.weekStartsOn?l:Rd(i.weekStartsOn);if(!(h>=0&&h<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!a.localize)throw new RangeError("locale must contain localize property");if(!a.formatLong)throw new RangeError("locale must contain formatLong property");var f=Ld(t);if(!qd(f))throw new RangeError("Invalid time value");var d=Ud(f),p=sp(f,d),g={firstWeekContainsDate:u,weekStartsOn:h,locale:a,_originalDate:f},v=r.match(jp).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,Ip[e])(t,a.formatLong,g):t})).join("").match(Hp).map((function(t){if("''"===t)return"'";var e=t[0];if("'"===e)return qp(t);var n=Cp[e];if(n)return!i.useAdditionalWeekYearTokens&&Gp(t)&&Bp(t),!i.useAdditionalDayOfYearTokens&&Up(t)&&Bp(t),n(p,t,a.localize,g);if(e.match(Wp))throw new RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return t})).join("");return v}function qp(t){return t.match(zp)[1].replace(Fp,"'")}function Xp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Id(t,-n)}function Zp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Vd(t,-n)}function Kp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Hd(t,-n)}function $p(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return zd(t,-n)}function Qp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Fd(t,-n)}function Jp(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Rd(e);return Wd(t,-n)}var tg=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 aa.getProperty(this.model.getOptions(),"axes",t)},e.prototype.getDomainAxisOptions=function(){var t=this.getDomainAxisPosition();return this.getAxisOptions(t)},e.prototype.getRangeAxisOptions=function(){var t=this.getRangeAxisPosition();return this.getAxisOptions(t)},e.prototype.update=function(t){var e=this;this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(x).map((function(t){return x[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!==x.LEFT&&this.rangeAxisPosition!==x.RIGHT||this.domainAxisPosition!==x.BOTTOM&&this.domainAxisPosition!==x.TOP?this.orientation=S.HORIZONTAL:this.orientation=S.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=[x.BOTTOM,x.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find((function(e){return t.indexOf(e)>-1}))},e.prototype.getMainYAxisPosition=function(){var t=[x.LEFT,x.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 a,o=this.model.getOptions(),s=aa.getProperty(o,"axes")[n].mapsTo,u=void 0!==r[s]?r[s]:r;switch(e){case O.LABELS:a=t(u)+t.step()/2;break;case O.TIME:a=t(new Date(u));break;default:a=t(u)}return a},e.prototype.getValueThroughAxisPosition=function(t,e,n){var r=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,r,t,e,n)},e.prototype.getDomainValue=function(t,e){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 aa.getProperty(t,"axes",this.domainAxisPosition).mapsTo},e.prototype.getRangeIdentifier=function(){var t=this.model.getOptions();return aa.getProperty(t,"axes",this.rangeAxisPosition).mapsTo},e.prototype.getDataFromDomain=function(t){var e=this.model.getDisplayData(),n=this.getDomainIdentifier();return this.scaleTypes[this.domainAxisPosition]===O.TIME?e.filter((function(e){var r=e[n];return"string"!=typeof r&&void 0!==r.getTime||(r=new Date(r)),r.getTime()===t.getTime()})):e.filter((function(e){return e[n]===t}))},e.prototype.extendsDomain=function(t,e){var n=this.model.getOptions();return aa.getProperty(n,"axes",t).scaleType===O.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=Ld(t),r=Ld(e),i=Yd(n,r),a=Math.abs(Zd(n,r));n.setFullYear(n.getFullYear()-i*a);var o=Yd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Jp(n,e),Wd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ld(t),r=Ld(e),i=Yd(n,r),a=Math.abs(Xd(n,r));n.setMonth(n.getMonth()-i*a);var o=Yd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[$p(n,e),zd(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Ld(t),r=Ld(e),i=Yd(n,r),a=Math.abs(Bd(n,r));n.setDate(n.getDate()-i*a);var o=Yd(n,r)===-i,s=i*(a-o);return 0===s?0:s}(r,n)>1)return[Xp(n,e),Id(r,e)];if(function(t,e){if(arguments.length<2)throw new TypeError("2 arguments required, but only "+arguments.length+" present");var n=Kd(t,e)/36e5;return n>0?Math.floor(n):Math.ceil(n)}(r,n)>1)return[Zp(n,e),Vd(r,e)];if($d(r,n)>30)return[Kp(n,30*e),Hd(r,30*e)];if($d(r,n)>1)return[Kp(n,e),Hd(r,e)];if(Qd(r,n)>15)return[Qp(n,15*e),Fd(r,15*e)];if(Qd(r,n)>1)return[Qp(n,e),Fd(r,e)];return[n,r]}(e,aa.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,Ma.paddingRatio)},e.prototype.findMainVerticalAxisPosition=function(){var t=this.model.getOptions(),e=aa.getProperty(t,"axes");return null===aa.getProperty(e,x.LEFT)&&null!==aa.getProperty(e,x.RIGHT)||!0===aa.getProperty(e,x.RIGHT,"main")?x.RIGHT:x.LEFT},e.prototype.findMainHorizontalAxisPosition=function(){var t=this.model.getOptions(),e=aa.getProperty(t,"axes");return null===aa.getProperty(e,x.BOTTOM)&&null!==aa.getProperty(e,x.TOP)||!0===aa.getProperty(e,x.TOP,"main")?x.TOP:x.BOTTOM},e.prototype.findDomainAndRangeAxesPositions=function(t,e){var n=this.model.getOptions(),r=aa.getProperty(n,"axes",t),i=aa.getProperty(n,"axes",e),a=r.scaleType||O.LINEAR,o=i.scaleType||O.LINEAR,s={domainAxisPosition:null,rangeAxisPosition:null};return o===O.LABELS||o===O.TIME?(s.domainAxisPosition=e,s.rangeAxisPosition=t):a===O.LABELS||a===O.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=aa.getProperty(e,"axes",t),r=n.includeZero,i=aa.getProperty(n,"scaleType")||O.LINEAR;if(this.model.isDataEmpty())return[];var a,o,s=this.model.getDisplayData(),u=n.mapsTo,c=n.percentage;if(n.domain)return i===O.LABELS?n.domain:this.extendsDomain(t,n.domain);if(c)return[0,100];if(n&&i===O.LABELS)return Ao(s,(function(t){return t[u]})).keys();n.stacked?o=this.model.getDataValuesGroupedByKeys().map((function(t){return function(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a}(function(t){var e=[];for(var n in t)e.push(t[n]);return e}(t))})):o=s.map((function(t){return t[u]}));return i!==O.TIME&&r&&o.push(0),a=Ro(o),a=this.extendsDomain(t,a)},e.prototype.createScale=function(t){var e=this.model.getOptions(),n=aa.getProperty(e,"axes",t);if(!n)return null;var r,i=aa.getProperty(n,"scaleType")||O.LINEAR;return this.scaleTypes[t]=i,(r=i===O.TIME?vl():i===O.LOG?function t(){var e=Pu(ru()).domain([1,10]);return e.copy=function(){return nu(e,t()).base(e.base())},zo.apply(e,arguments),e}().base(n.base||10):i===O.LABELS?Zo():wu()).domain(this.getScaleDomain(t)),r},e.prototype.getHighestDomainThreshold=function(){var t=aa.getProperty(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),n=t[e].thresholds;if(!n)return null;var r=this.getDomainScale(),i=n.sort((function(t,e){return e.value-t.value}))[0];return this.getScaleTypeByPosition(e)!==O.TIME||"string"!=typeof i.value&&void 0!==i.value.getTime||(i.value=new Date(i.value)),{threshold:i,scaleValue:r(i.value)}},e.prototype.getHighestRangeThreshold=function(){var t=aa.getProperty(this.model.getOptions(),"axes")[this.getRangeAxisPosition()].thresholds;if(!t)return null;var e=this.getRangeScale(),n=t.sort((function(t,e){return e.value-t.value}))[0];return{threshold:n,scaleValue:e(n.value)}},e}(Xh);var eg,ng,rg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.curveTypes={curveLinear:Fl,curveLinearClosed:Mh,curveBasis:ah,curveBasisClosed:sh,curveBasisOpen:ch,curveBundle:hh,curveCardinal:ph,curveCardinalClosed:vh,curveCardinalOpen:yh,curveCatmullRom:xh,curveCatmullRomClosed:Eh,curveCatmullRomOpen:Oh,curveMonotoneX:Ih,curveMonotoneY:Nh,curveNatural:Gh,curveStep:Hh,curveStepAfter:zh,curveStepBefore:jh},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}(Xh),ig=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return n(e,t),e.prototype.getZoomBarData=function(){var t,e=this.services.cartesianScales,n=e.getDomainIdentifier(),r=e.getRangeIdentifier(),i=aa.getProperty(this.model.getOptions(),"zoomBar","top","data");t=i&&i.length>1?i:this.model.getDisplayData();var a=[];return t.forEach((function(t){a=a.concat(Number(t[n]))})),(a=aa.removeArrayDuplicates(a).sort()).map((function(e){var i=0,a={};return t.forEach((function(t){Number(t[n])===e&&(i+=t[r])})),a[n]=new Date(e),a[r]=i,a}))},e.prototype.getDefaultZoomBarDomain=function(){var t=this.services.zoom.getZoomBarData(),e=this.services.cartesianScales,n=e.getMainXAxisPosition(),r=e.getDomainIdentifier();return e.extendsDomain(n,Ro(t,(function(t){return t[r]})))},e}(Xh),ag=function(){function t(t,e,n){this.configs={},this.model=t,this.services=e,n&&(this.configs=n),this.parent||this.setParent(ca(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=aa.getProperty(this.model.getOptions(),"style","prefix");this.parent.classed(Zh.prefix+"--"+n+"--"+this.type,!0),e&&e.classed(Zh.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=aa.getProperty(this.model.getOptions(),"style","prefix"),n=_f.appendOrSelect(this.parent,"g."+Zh.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}(),og=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.GRAPHICS_DOCUMENT+" "+r.DOCUMENT),n=this.model.getOptions(),i=aa.getProperty(n,"legend"),a=this.model.getDataGroups(),o=aa.getProperty(i,"order");o&&(a=this.sortDataGroups(a,o));var s=e.selectAll("g.legend-item").data(a,(function(t){return t.name})),u=s.enter().append("g").classed("legend-item",!0).classed("active",(function(t,e){return t.status===Aa.items.status.ACTIVE})),c=Aa.checkbox.radius,l=aa.getProperty(i,"truncation","type"),h=aa.getProperty(i,"truncation","threshold"),f=aa.getProperty(i,"truncation","numCharacter");u.append("rect").classed("checkbox",!0).merge(s.select("rect.checkbox")).attr("width",2*c).attr("height",2*c).attr("rx",1).attr("ry",1).style("fill",(function(e){return e.status===Aa.items.status.ACTIVE?t.model.getStrokeColor(e.name):null})).classed("active",(function(t,e){return t.status===Aa.items.status.ACTIVE}));var d=u.append("text").merge(s.select("text"));l!==E.NONE?d.html((function(t){return t.name.length>h?aa.truncateLabel(t.name,l,f):t.name})):d.html((function(t){return t.name})),this.breakItemsIntoLines(u),s.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove();var p=aa.getProperty(this.model.getOptions(),"legend","clickable");e.classed("clickable",p),p&&u.size()>0&&this.addEventListeners();var g=aa.getProperty(i,"alignment"),v=_f.getAlignmentOffset(g,e,this.getParent());e.attr("transform","translate("+v+", 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=Aa.checkbox.radius,a=Aa.items.horizontalSpace,o=Aa.items.verticalSpace,s=Aa.items.textYOffset,u=2*i+Aa.checkbox.spaceAfter,c=Aa.items.status.DISABLED,l=this.model.getDataGroups().some((function(t){return t.status===c})),h=aa.getProperty(r,"legend","orientation"),f=0,d=0,p=0;t.merge(n.selectAll("g.legend-item")).each((function(t,r){var c=ca(this),g=ca(n.selectAll("g.legend-item").nodes()[r-1]);if(0===p||g.empty()||h===A.VERTICAL)h===A.VERTICAL&&0!==r&&d++;else{var v=_f.getSVGElementSize(e.parent,{useAttr:!0}),m=_f.getSVGElementSize(ca(this).select("text"),{useBBox:!0}),y=_f.getSVGElementSize(g.select("text"),{useBBox:!0});(f=f+y.width+u+a)+u+m.width>v.width&&(d++,f=0,p=0)}c.select("rect.checkbox").attr("x",f).attr("y",0+d*o);var _=s+d*o;c.select("text").attr("x",f+u).attr("y",0+_+3);var b=(!h||h===A.HORIZONTAL)&&"0"===c.select("rect.checkbox").attr("y"),x=h===A.VERTICAL&&"0"===c.select("rect.checkbox").attr("x"),w=b||x;l&&c.select("g.check").empty()&&w?(c.append("g").classed("check",!0).html('\n\t\t\t\t\t\t\t<svg focusable="false" preserveAspectRatio="xMidYMid meet"\n\t\t\t\t\t\t\t\txmlns="http://www.w3.org/2000/svg" width="32" height="32"\n\t\t\t\t\t\t\t\tviewBox="0 0 32 32" aria-hidden="true"\n\t\t\t\t\t\t\t\tstyle="will-change: transform;">\n\t\t\t\t\t\t\t\t<path d="M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"></path>\n\t\t\t\t\t\t\t\t<title>Checkmark</title>\n\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t'),c.select("g.check svg").attr("width",2*i-1).attr("height",2*i-1).attr("x",parseFloat(c.select("rect.checkbox").attr("x"))+.5).attr("y",parseFloat(c.select("rect.checkbox").attr("y"))+.5)):l||c.select("g.check").empty()||c.select("g.check").remove(),p++}))},e.prototype.addEventListeners=function(){var t=this,e=this.getContainerSVG(),n=this.model.getOptions(),r=aa.getProperty(n,"legend"),i=aa.getProperty(r,"truncation","threshold");e.selectAll("g.legend-item").on("mouseover",(function(){t.services.events.dispatchEvent(G.Legend.ITEM_HOVER,{hoveredElement:ca(this)});var e=Aa.checkbox.radius,n=ca(this);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(G.Tooltip.SHOW,{hoveredElement:n,content:r.name})})).on("mousemove",(function(){t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(){t.services.events.dispatchEvent(G.Legend.ITEM_CLICK,{clickedElement:ca(this)});var e=ca(this).datum();t.model.toggleDataLabel(e.name)})).on("mouseout",(function(){var e=ca(this);e.select("rect.hover-stroke").remove(),t.services.events.dispatchEvent(G.Tooltip.HIDE),t.services.events.dispatchEvent(G.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}))},e}(ag);!function(t){t.LEFT="left",t.RIGHT="right",t.TOP="top",t.BOTTOM="bottom"}(ng||(ng={}));var sg=((eg={})[ng.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)}},eg[ng.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)}},eg[ng.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)}},eg[ng.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)}},eg),ug="undefined"!=typeof window?window:{innerHeight:0,scrollY:0,innerWidth:0,scrollX:0},cg=function(){function t(t){void 0===t&&(t={}),this.positions=sg,this.positions=Object.assign({},sg,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(),a=document.body.getBoundingClientRect();return{top:i.top-a.top+n.top,left:i.left-a.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),a=t.getBoundingClientRect();return this.calculatePosition(i,a,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 a=this;void 0===r&&(r=this.defaultContainerFunction),void 0===i&&(i=this.findPosition);var o=n.map((function(n){var o=i(t,e,n),s=a.getPlacementBox(e,o),u=s.bottom-r().height,c=s.right-r().width;u=u<0?e.offsetHeight:u,c=c<0?e.offsetWidth:c;var l=e.offsetHeight*e.offsetWidth,h=l-u*c;return{placement:n,weight:(h=0===h?l:h)/l}}));return o.sort((function(t,e){return e.weight-t.weight})),o[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:ug.innerHeight-ug.scrollY,height:ug.innerWidth-ug.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}(),lg=(new cg,[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]]);function hg(t,e,n,r){var i=0===e,a=2===Number(Yp(new Date(t),"c")),o=1===Number(Yp(new Date(t),"q"));switch(n){case"15seconds":case"minute":case"30minutes":case"hourly":return i||gg(t)||vg(t)||mg(t);case"daily":return r?i||a||mg(t):i||vg(t)||mg(t);case"monthly":return i||mg(t);case"quarterly":return i||o;case"yearly":return!1;default:throw new Error(n+" is not a valid time interval.")}}function fg(t,e,n,r){var i=r.showDayName,a="daily"===n&&i?"weekly":n,o=new Date(t),s=aa.getProperty(r,"timeIntervalFormats")[a],u=aa.getProperty(s,"primary"),c=aa.getProperty(s,"secondary");return Yp(o,hg(t,e,n,i)?u:c,{locale:r.localeObject})}function dg(t){var e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function pg(t){return 1===t.length?"15seconds":function(t){var e=lg.reduce((function(e,n,r){n[0];var i=n[1],a=lg[e][1];return Math.abs(a-t)<Math.abs(i-t)?e:r}),0);return lg[e][0]}(function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,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 gg(t){var e=dg(t),n=e.s,r=e.m;return 0===e.H&&0===r&&0===n}function vg(t){var e=dg(t),n=e.d,r=e.s,i=e.m,a=e.H;return 1===n&&0===a&&0===i&&0===r}function mg(t){var e=dg(t),n=e.M,r=e.d,i=e.s,a=e.m,o=e.H;return 1===n&&1===r&&0===o&&0===a&&0===i}var yg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="threshold",i.positionService=new cg,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,a=n.axisPosition,o=n.index,s=aa.getProperty(this.model.getOptions(),"style","prefix");this.thresholdClass=Zh.prefix+"--"+s+"--threshold",this.thresholdIdentifierClass=a+"-"+o,this.threshold=_f.appendOrSelect(this.parent,"g."+this.thresholdClass+"."+this.thresholdIdentifierClass).raise();var u=_f.appendOrSelect(this.threshold,"rect.threshold-hoverable-area"),c=_f.appendOrSelect(this.threshold,"line.threshold-line");c.style("stroke",i);var l=this.services.cartesianScales.getScaleByPosition(a),h=this.services.cartesianScales.getScaleTypeByPosition(a),f=this.services.cartesianScales.getMainXScale(),d=this.services.cartesianScales.getMainYScale(),p=h===O.LABELS,g=f.range(),v=g[0],m=g[1],y=d.range(),_=y[0],b=y[1],w=this.services.cartesianScales,E=w.getOrientation(),S=aa.flipDomainAndRangeBasedOnOrientation((function(t){return w.getDomainValue(t)}),(function(t){return w.getRangeValue(t)}),E),T=S[0],M=S[1];if(a===x.TOP||a===x.BOTTOM){var A=T(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+A+", "+b+")"),c.attr("y2",_-b),u.attr("width",_-b).classed("rotate",!0)}else{A=M(r)+(p?l.step()/2:0);this.threshold.transition(this.services.transitions.getTransition("threshold-update",t)).attr("transform","translate("+v+", "+A+")"),c.attr("x2",m-v),u.attr("width",m-v)}var C=this;this.services.events.addEventListener(G.Threshold.SHOW,(function(t){t.detail.hoveredElement.node()===C.threshold&&(e.setThresholdLabelPosition(),e.label.classed("hidden",!1))})),this.services.events.addEventListener(G.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)===O.TIME){var i=[x.LEFT,x.RIGHT].includes(n),a=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),s=i?o:a,u=aa.getProperty(r,"timeScale");return fg(e,0,pg(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,a=void 0===i?"Threshold":i,o=ca(this.services.domUtils.getHolder()),s=n?n(e):this.getFormattedValue();this.label=_f.appendOrSelect(o,"div."+this.thresholdClass+"--label."+this.thresholdIdentifierClass),this.label.html(a+": "+s).classed("hidden",!0).style("background-color",r)},e.prototype.setThresholdLabelPosition=function(){var t=this.services.domUtils.getHolder(),e=this.label.node(),n=fa(t),r=this.positionService.findBestPlacementAt({left:n[0],top:n[1]},e,[ng.RIGHT,ng.LEFT,ng.TOP,ng.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;_f.appendOrSelect(this.threshold,"rect").on("mouseover mousemove",(function(){t.threshold.classed("active",!0),t.services.events.dispatchEvent(G.Threshold.SHOW,{hoveredElement:ca(t.threshold)})})).on("mouseout",(function(){t.threshold.classed("active",!1),t.services.events.dispatchEvent(G.Threshold.HIDE,{hoveredElement:ca(t.threshold)})}))},e}(ag),_g=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=_f.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=_f.appendOrSelect(t,"tspan").node().getComputedTextLength(),i=t.text(),a=this.getSubstringIndex(t.node(),0,i.length-1,e-r);t.html(i.substring(0,a-1)).append("tspan").text("...");var o=this;t.on("mouseover",(function(){o.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:t,content:n})})).on("mousemove",(function(){o.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("mouseout",(function(){o.services.events.dispatchEvent(G.Tooltip.HIDE)}))}}},e.prototype.getMaxTitleWidth=function(){return _f.getSVGElementSize(this.services.domUtils.getMainSVG(),{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}(ag),bg=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 a=this.getMaxTitleWidth(),o=_f.appendOrSelect(n,"text.meter-title");a>0&&o.node().getComputedTextLength()>a&&this.truncateTitle(o,a)},e.prototype.displayStatus=function(){var t=this.getContainerSVG(),e=(this.model.getOptions(),_f.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0})),n=e.width?e.width:this.parent.node().getAttribute("width"),r=this.model.getStatus(),i=Pa.status.indicatorSize/2,a=_f.appendOrSelect(t,"g.status-indicator").attr("class",null!==r?"status-indicator status--"+r:"").attr("transform","translate("+(n-i)+", 0)"),o=r?[r]:[],s=a.selectAll("circle.status").data(o);s.enter().append("circle").merge(s).attr("class","status").attr("r",i).attr("cx",0).attr("cy","calc(1em / 2)");var u=a.selectAll("path.innerFill").data(o);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=_f.appendOrSelect(e,"text.meter-title"),r=!0===aa.getProperty(this.model.getOptions(),"meter","statusBar","percentageIndicator","enabled")?[t]:[],i=e.selectAll("text.percent-value").data(r),a=Pa.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()+a).attr("y",n.attr("y")),i.exit().remove()},e.prototype.truncateTitle=function(e,n){t.prototype.truncateTitle.call(this,e,n);var r=_f.appendOrSelect(this.parent,"tspan"),i=Pa.statusBar.paddingRight,a=Math.ceil(r.node().getComputedTextLength());_f.appendOrSelect(this.parent,"text.percent-value").attr("x",+e.attr("x")+e.node().getComputedTextLength()+a+i)},e.prototype.getMaxTitleWidth=function(){var t=_f.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),e=t.width?t.width:this.parent.node().getAttribute("width"),n=_f.appendOrSelect(this.parent,"text.percent-value"),r=Pa.statusBar.paddingRight,i=n.node().getComputedTextLength(),a=_f.appendOrSelect(this.parent,"g.status-indicator").node();return e-i-r-(_f.getSVGElementSize(a,{useBBox:!0}).width+Pa.status.paddingLeft)},e.prototype.getStatusIconPathString=function(t){switch(t){case V.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 V.DANGER:return"M10.7 11.5 4.5 5.3 5.3 4.5 11.5 10.7 Z";case V.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}(_g),xg=function(t){function e(e,n,r){var i=t.call(this,e,n,r)||this;return i.type="tooltip",i.positionService=new cg,i.init(),i}return n(e,t),e.prototype.init=function(){var t=this,e=ca(this.services.domUtils.getHolder()),n=aa.getProperty(this.model.getOptions(),"style","prefix");this.tooltip=_f.appendOrSelect(e,"div."+Zh.prefix+"--"+n+"--tooltip");var r=_f.appendOrSelect(this.tooltip,"div.content-box");this.tooltip.style("max-width",null),this.services.events.addEventListener(G.Tooltip.MOVE,(function(e){t.positionTooltip(e)})),this.services.events.addEventListener(G.Tooltip.SHOW,(function(e){var n=e.detail.data||e.detail.items,i=t.getTooltipHTML(e);if(aa.getProperty(t.model.getOptions(),"tooltip","customHTML"))if(e.detail.content){var a='<div class="title-tooltip">'+e.detail.content+"</div>";r.html(a)}else r.html(t.model.getOptions().tooltip.customHTML(n,i));else r.html(i);t.positionTooltip(e),t.tooltip.classed("hidden",!1)})),this.services.events.addEventListener(G.Tooltip.HIDE,(function(){t.tooltip.classed("hidden",!0)}))},e.prototype.getItems=function(t){return t.detail.items?t.detail.items:[]},e.prototype.formatItems=function(t){var e=this.model.getOptions(),n=aa.getProperty(e,"tooltip","truncation","type"),r=aa.getProperty(e,"tooltip","truncation","threshold"),i=aa.getProperty(e,"tooltip","truncation","numCharacter");return n!==E.NONE?t.map((function(t){return t.label&&t.label.length>r&&(t.label=aa.truncateLabel(t.label,n,i)),t.value&&t.value.length>r&&(t.value=aa.truncateLabel(t.value,n,i)),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);e="<ul class='multi-tooltip'>"+this.formatItems(n).map((function(t){return'<li>\n\t\t\t\t\t\t\t<div class="datapoint-tooltip '+(t.bold?"bold":"")+'">\n\t\t\t\t\t\t\t\t'+(t.color?'<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=aa.getProperty(e,"tooltip","valueFormatter");return n?n(t):t.toLocaleString()},e.prototype.render=function(){this.tooltip.classed("hidden",!0)},e.prototype.positionTooltip=function(t){var e,n=this.services.domUtils.getHolder(),r=this.tooltip.node(),i=aa.getProperty(this.model.getOptions(),"zoomBar","top","enabled"),a=aa.getProperty(t,"detail","mousePosition");if(a){var o=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),s=Na.height[o];i&&(a[1]+=s+Na.spacerHeight)}else a=fa(n);var u=this.positionService.findBestPlacementAt({left:a[0],top:a[1]},r,[ng.RIGHT,ng.LEFT,ng.TOP,ng.BOTTOM],(function(){return{width:n.offsetWidth,height:n.offsetHeight}})),c=Ra.horizontalOffset;u===ng.LEFT&&(c*=-1),e=this.positionService.findPositionAt({left:a[0]+c,top:a[1]},r,u),this.positionService.setElement(r,e)},e}(ag),wg=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,a=i.getDomainAxisOptions(),o=i.getDomainIdentifier(),s=i.getDomainAxisScaleType(),u=i.getRangeAxisOptions(),c=i.getRangeIdentifier(),l=(i.getRangeAxisScaleType(),r.data.groupMapsTo),h=a.title;if(!h){var f=i.getDomainAxisPosition();h=f===x.BOTTOM||f===x.TOP?"x-value":"y-value"}var d,p=n[0][o];if(s===O.TIME?p=Yp(new Date(n[0][o]),"MMM d, yyyy"):s===O.LINEAR&&(p=p.toLocaleString()),1===n.length){var g=n[0],v=u.title;if(!v){var m=i.getRangeAxisPosition();v=m===x.LEFT||m===x.RIGHT?"y-value":"x-value"}d=[{label:h,value:p},{label:v,value:this.valueFormatter(g[c])},{label:"Group",value:g[l],color:this.model.getStrokeColor(g[l])}]}else n.length>1&&(d=(d=[{label:h,value:this.valueFormatter(p)}]).concat(n.map((function(t){return{label:t[l],value:e.valueFormatter(t[c]),color:e.model.getStrokeColor(t[l])}})).sort((function(t,e){return e.value-t.value}))),!0===aa.getProperty(r,"tooltip","showTotal")&&d.push({label:"Total",value:this.valueFormatter(n.reduce((function(t,e){return t+e[c]}),0)),bold:!0}));return d},e}(xg),Eg=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="area",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?Ta.opacity.unselected:Ta.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Ta.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.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=this.services.cartesianScales,i=r.getOrientation(),a=Xl().curve(this.services.curves.getD3Curve());i===S.VERTICAL?a.x((function(t,e){return r.getDomainValue(t,e)})).y0(r.getRangeValue(0)).y1((function(t,e){return r.getRangeValue(t,e)})):a.x0(r.getRangeValue(0)).x1((function(t,e){return r.getRangeValue(t,e)})).y((function(t,e){return r.getDomainValue(t,e)}));var o=this.model.getGroupedData(),s=n.selectAll("path.area").data(o,(function(t){return t.name}));s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).attr("fill",(function(t){return e.model.getFillColor(t.name)})).transition(this.services.transitions.getTransition("area-update-enter",t)).attr("opacity",Ta.opacity.selected).attr("class","area").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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(ag),Sg=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?Ta.opacity.unselected:Ta.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.area").transition(e.services.transitions.getTransition("legend-mouseout-area")).attr("opacity",Ta.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this.getContainerSVG({withinChartClip:!0}),n=this,i=this.model.getOptions(),a=i.data.groupMapsTo,o=this.services.cartesianScales.getMainXScale(),s=this.services.cartesianScales.getMainYScale(),u=this.services.cartesianScales.getDomainAxisPosition();if(this.services.cartesianScales.getScaleTypeByPosition(u)===O.TIME){var c=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),l=this.model.getStackedData({percentage:c}),h=e.selectAll("path.area").data(l,(function(t){return t[0][a]}));this.areaGenerator=Xl().x((function(t){return o(new Date(t.data.sharedStackKey))})).y0((function(t){return s(t[0])})).y1((function(t){return s(t[1])})).curve(this.services.curves.getD3Curve()),h.exit().attr("opacity",0).remove(),h.enter().append("path").attr("opacity",0).merge(h).data(l,(function(t){return t[0][a]})).attr("fill",(function(t){return n.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",Ta.opacity.selected).attr("class","area").attr("d",this.areaGenerator)}},e.prototype.destroy=function(){this.parent.selectAll("path.area").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(ag),Og=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(),n=this.model.getDisplayData().length,r=this.services.cartesianScales.getMainXScale(),i=_f.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}(ag),Tg=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.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("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,a=i+r,o=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t,n);if(!e.isOutsideZoomedDomain(i,a))return aa.generateSVGPathString({x0:i,x1:a,y0:o,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.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=ca(this);r.classed("hovered",!0),r.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return fs(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(G.Bar.BAR_MOUSEOVER,{element:r,datum:n}),e.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(t){ca(this);e.services.events.dispatchEvent(G.Bar.BAR_MOUSEMOVE,{element:ca(this),datum:t}),e.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(G.Bar.BAR_CLICK,{element:ca(this),datum:t})})).on("mouseout",(function(n){var r=ca(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(G.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(G.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Og),Mg=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this,n=this.model.getDisplayData(),i=this.model.getOptions().data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier();this.setGroupScale();var o=this.getContainerSVG({withinChartClip:!0}),s=Ao(n,(function(t){return t[a]})).keys(),u=o.selectAll("g.bars").data(s,(function(t){return t}));u.exit().attr("opacity",0).remove();var c=u.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-labelledby",(function(t){return t})).merge(u).attr("transform",(function(t,n){var r=e.services.cartesianScales.getDomainValue(t,n)-e.getGroupWidth()/2;return e.services.cartesianScales.getOrientation()===S.VERTICAL?"translate("+r+", 0)":"translate(0, "+r+")"})).selectAll("path.bar").data((function(t){return e.getDataCorrespondingToLabel(t)}));c.exit().attr("opacity",0).remove(),c.enter().append("path").attr("opacity",0).merge(c).classed("bar",!0).transition(this.services.transitions.getTransition("bar-update-enter",t)).attr("fill",(function(t){return e.model.getFillColor(t[i])})).attr("d",(function(t){var n=e.groupScale(t[i]),r=n,a=n+e.getBarWidth(),o=e.services.cartesianScales.getRangeValue(0),s=e.services.cartesianScales.getRangeValue(t.value);if(!e.isOutsideZoomedDomain(r,a))return aa.generateSVGPathString({x0:r,x1:a,y0:o,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,e=this.model.getOptions().data.groupMapsTo;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r=ca(this);r.transition(t.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return fs(t.model.getFillColor(n[e])).darker(.7).toString()})),t.services.events.dispatchEvent(G.Bar.BAR_MOUSEOVER,{element:r,datum:n}),t.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:r,data:[n]})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Bar.BAR_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(G.Bar.BAR_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this);n.classed("hovered",!1);var r=t.model.getOptions().data.groupMapsTo;n.transition(t.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(e){return t.model.getFillColor(e[r])})),t.services.events.dispatchEvent(G.Bar.BAR_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(G.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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.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=aa.getProperty(t,"bars","width"),n=aa.getProperty(t,"bars","maxWidth");if(null!==e){if(null===n)return e;if(e<=n)return e}var r=this.model.getActiveDataGroupNames().length,i=this.getTotalGroupPadding(),a=this.services.cartesianScales.getDomainScale();return Math.min(n,(a.step()-i)/r)},e.prototype.setGroupScale=function(){this.groupScale=Zo().domain(this.model.getActiveDataGroupNames()).rangeRound([0,this.getGroupWidth()])},e}(Og),Ag=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.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()),a=i.data.groupMapsTo,o=(this.services.cartesianScales.getDomainIdentifier(),this.model.getStackedData()),s=n.selectAll("g.bars").data(o,(function(t){return t.key}));s.exit().attr("opacity",0).remove(),s.enter().append("g").classed("bars",!0).attr("role",r.GROUP).attr("aria-label","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("fill",(function(t){return e.model.getFillColor(t[a])})).attr("d",(function(t,n){var r=t.data.sharedStackKey,a=e.getBarWidth(),o=e.services.cartesianScales.getDomainValue(r,n)-a/2,s=o+a,u=e.services.cartesianScales.getRangeValue(t[0],n),c=e.services.cartesianScales.getRangeValue(t[1],n);if(!e.isOutsideZoomedDomain(o,s))return Math.abs(c-u)>0&&Math.abs(c-u)>i.bars.dividerSize&&(e.services.cartesianScales.getOrientation()===S.VERTICAL?c+=1:c-=1),aa.generateSVGPathString({x0:o,x1:s,y0:u,y1:c},e.services.cartesianScales.getOrientation())})).attr("opacity",1).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",(function(t){return t[1]-t[0]})),this.addEventListeners()},e.prototype.addEventListeners=function(){var t=this.model.getOptions().data.groupMapsTo,e=this;this.parent.selectAll("path.bar").on("mouseover",(function(n){var r,i=ca(this);i.transition(e.services.transitions.getTransition("graph_element_mouseover_fill_update")).attr("fill",(function(n){return fs(e.model.getFillColor(n[t])).darker(.7).toString()})),e.services.events.dispatchEvent(G.Bar.BAR_MOUSEOVER,{element:i,datum:n});var a=e.model.getDisplayData(),o=e.services.cartesianScales.getDomainIdentifier(),s=e.services.cartesianScales.getRangeIdentifier(),u=a.find((function(e){return e[s]===n.data[n.group]&&e[o].toString()===n.data.sharedStackKey&&e[t]===n.group}));void 0===u&&((r={})[o]=n.data.sharedStackKey,r[s]=n.data[n.group],r[t]=n.group,u=r),e.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:i,data:[u]})})).on("mousemove",(function(t){var n=ca(this);e.services.events.dispatchEvent(G.Bar.BAR_MOUSEMOVE,{element:n,datum:t}),e.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(t){e.services.events.dispatchEvent(G.Bar.BAR_CLICK,{element:ca(this),datum:t})})).on("mouseout",(function(n){var r=ca(this);r.classed("hovered",!1),r.transition(e.services.transitions.getTransition("graph_element_mouseout_fill_update")).attr("fill",(function(n){return e.model.getFillColor(n[t])})),e.services.events.dispatchEvent(G.Bar.BAR_MOUSEOUT,{element:r,datum:n}),e.services.events.dispatchEvent(G.Tooltip.HIDE,{hoveredElement:r})}))},e.prototype.destroy=function(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);var t=this.services.events;t.removeEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(Og),Cg=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),this.configs.fadeInOnChartHolderMouseover&&(t.addEventListener(G.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.addEventListener(G.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]>n[0]&&t[e]<n[1]})):t},e.prototype.render=function(t){if(aa.getProperty(this.model.getOptions(),"points","enabled")||aa.getProperty(this.model.getOptions(),"bubble","enabled")){var e,n=this.getContainerSVG({withinChartClip:!0}),r=this.model.getOptions(),i=r.data.groupMapsTo,a=this.services.cartesianScales.getDomainIdentifier(),o=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[o]&&null!==t[o]}));e=this.filterBasedOnZoomDomain(e);var u=n.selectAll("circle.dot").data(e,(function(t){return t[i]+"-"+t[a]}));u.exit().attr("opacity",0).remove();var c=u.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(u);this.styleCircles(c,t),this.addEventListeners()}},e.prototype.isDatapointThresholdAnomaly=function(t,e){if(!this.configs.handleThresholds)return!1;var n=this.services.cartesianScales,r=n.getOrientation(),i=aa.flipDomainAndRangeBasedOnOrientation(this.services.cartesianScales.getHighestDomainThreshold(),this.services.cartesianScales.getHighestRangeThreshold(),r),a=i[0],o=i[1],s=aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return n.getDomainValue(t,e)}),(function(t,e){return n.getRangeValue(t,e)}),r),u=s[0],c=s[1],l=u(t,e),h=c(t,e);return o&&a?h<=o.scaleValue&&l>=a.scaleValue:o?h<=o.scaleValue:a?l>=a.scaleValue:void 0},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.points,o=a.filled,s=a.fillOpacity,u=this.services,c=u.cartesianScales,l=u.transitions,h=i.data.groupMapsTo,f=c.getDomainIdentifier(),d=c.getRangeIdentifier(),p=aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return c.getDomainValue(t,e)}),(function(t,e){return c.getRangeValue(t,e)}),c.getOrientation()),g=p[0],v=p[1],m=this.configs.fadeInOnChartHolderMouseover;t.raise().classed("dot",!0).classed("threshold-anomaly",(function(t,e){return n.isDatapointThresholdAnomaly(t,e)})).classed("filled",(function(t){return n.model.getIsFilled(t[h],t[f],t,o)})).classed("unfilled",(function(t){return!n.model.getIsFilled(t[h],t[f],t,o)})).transition(l.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,o))return n.model.getFillColor(t[h],t[f],t)})).attr("fill-opacity",o?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=this.model.getOptions().data.groupMapsTo,n=this.services.cartesianScales.getDomainIdentifier();this.parent.selectAll("circle").on("mouseover",(function(r){var i=ca(this);i.classed("hovered",!0).style("fill",(function(r){return t.model.getFillColor(r[e],r[n],r)}));var a=t.services.cartesianScales.getDomainValue(r),o=t.services.cartesianScales.getRangeValue(r),s=t.getTooltipData(a,o);t.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:i,data:s}),t.services.events.dispatchEvent(G.Scatter.SCATTER_MOUSEOVER,{element:i,datum:r})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Scatter.SCATTER_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(G.Scatter.SCATTER_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this);n.classed("hovered",!1),t.configs.filled||n.style("fill",null),t.services.events.dispatchEvent(G.Scatter.SCATTER_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(G.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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut),t.removeEventListener(G.Chart.MOUSEOVER,this.handleChartHolderOnHover),t.removeEventListener(G.Chart.MOUSEOUT,this.handleChartHolderOnMouseOut)},e}(ag),Pg=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})),a=_f.getSVGElementSize(this.services.domUtils.getMainSVG(),{useAttr:!0}),o=i.length>0,s=o?Ro(i):[1,1];return wu().domain(s).range(o?e.bubble.radiusRange(a,r):[4,4])},e.prototype.styleCircles=function(t,e){var n=this,i=this.model.getOptions(),a=i.bubble.radiusMapsTo,o=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 o(t[a]||1)})).attr("fill",(function(t){return n.model.getFillColor(t[s],t[u],t)})).attr("fill-opacity",i.bubble.fillOpacity).attr("stroke",(function(t){return n.model.getStrokeColor(t[s],t[u],t)})).attr("opacity",1)},e}(Cg),Dg=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?Ca.opacity.unselected:Ca.opacity.selected}))},e.handleLegendMouseOut=function(t){e.parent.selectAll("path.line").transition(e.services.transitions.getTransition("legend-mouseout-line")).attr("opacity",Ca.opacity.selected)},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.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,a=i.cartesianScales,o=i.curves,s=aa.flipDomainAndRangeBasedOnOrientation((function(t,e){return a.getDomainValue(t,e)}),(function(t,e){return a.getRangeValue(t,e)}),a.getOrientation()),u=s[0],c=s[1],l=this.model.getOptions(),h=ql().x(u).y(c).curve(o.getD3Curve()).defined((function(t,e){var n=t[a.getRangeIdentifier()];return null!=n})),f=[];if(this.configs.stacked){var d=Object.keys(l.axes).some((function(t){return l.axes[t].percentage})),p=l.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:!aa.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("stroke",(function(t,n){return e.model.getStrokeColor(t.name)})).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("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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e}(ag),kg=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){var e=aa.getProperty(this.model.getOptions(),"scatterDotEnabled");if(this.configs.alwaysEnableScatterDot||e){var n=this.getContainerSVG({withinChartClip:!0}),i=this.model.getOptions(),a=i.data.groupMapsTo,o=this.services.cartesianScales.getDomainIdentifier(),s=this.services.cartesianScales.getRangeIdentifier(),u=Object.keys(i.axes).some((function(t){return i.axes[t].percentage})),c=this.model.getStackedData({percentage:u}),l=n.selectAll("g.dots").data(c,(function(t){return t[0][a]}));l.exit().attr("opacity",0).remove();var h=l.enter().append("g").classed("dots",!0).attr("role",r.GROUP).merge(l).selectAll("circle.dot").data((function(t){return t}));h.exit().attr("opacity",0).remove();var f=h.enter().append("circle").classed("dot",!0).attr("opacity",0).merge(h).datum((function(t){var e,n=t[a];return(e={})[a]=n,e[o]=t.data.sharedStackKey,e[s]=t[1],e}));this.styleCircles(f,t),this.addEventListeners()}},e.prototype.getTooltipData=function(t,e){var n=this,r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier(),a=this.model.getOptions(),o=a.data.groupMapsTo,s=Object.keys(a.axes).some((function(t){return a.axes[t].percentage})),u=this.model.getStackedData({percentage:s}),c=[];return u.forEach((function(a,u){a.forEach((function(a,l){var h,f=a[o],d=a.data.sharedStackKey,p=a.data[f],g=a[1];p&&t===n.services.cartesianScales.getDomainValue(d)&&e===n.services.cartesianScales.getRangeValue(g)&&(s&&(p=n.model.getStackedData()[u][l].data[f]),c.push(((h={})[o]=f,h[r]=d,h[i]=p,h)))}))})),c},e}(Cg);function Lg(t,e){var n=this,r=Vs(this._current,t);return function(t){return n._current=r(t),e(n._current)}}var Rg=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.getInnerRadius=function(){return Da.innerRadius},e.prototype.render=function(t){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getDisplayData(),a=this.model.getOptions(),o=a.data.groupMapsTo,s=this.computeRadius();this.arc=jl().innerRadius(this.getInnerRadius()).outerRadius(s),this.hoverArc=jl().innerRadius(this.getInnerRadius()).outerRadius(s+Da.hoverArc.outerRadiusOffset);var u=function(){var t=Kl,e=Zl,n=null,r=wl(0),i=wl(kl),a=wl(0);function o(o){var s,u,c,l,h,f=o.length,d=0,p=new Array(f),g=new Array(f),v=+r.apply(this,arguments),m=Math.min(kl,Math.max(-kl,i.apply(this,arguments)-v)),y=Math.min(Math.abs(m)/f,a.apply(this,arguments)),_=y*(m<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>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(o[t],o[e])})),s=0,c=d?(m-f*_)/d:0;s<f;++s,v=l)u=p[s],l=v+((h=g[u])>0?h*c:0)+_,g[u]={data:o[u],index:s,value:h,startAngle:v,endAngle:l,padAngle:y};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:wl(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:wl(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:wl(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:wl(+t),o):a},o}().value((function(t){return t.value})).sort(null).padAngle(Da.padAngle)(i).sort((function(t,e){return t.index-e.index})),c=_f.appendOrSelect(n,"g.slices").attr("role",r.GROUP).attr("aria-label","slices").selectAll("path.slice").data(u,(function(t){return t.data[o]}));c.exit().attr("opacity",0).remove(),c.enter().append("path").classed("slice",!0).attr("opacity",0).merge(c).attr("fill",(function(t){return e.model.getFillColor(t.data[o])})).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+", "+aa.convertValueToPercentage(t.data.value,i)+"%"})).attrTween("d",(function(t){return Lg.bind(this)(t,e.arc)}));var l=u.filter((function(t){return t.value>0})),h=_f.appendOrSelect(n,"g.labels").attr("role",r.GROUP).attr("aria-label","labels").selectAll("text.pie-label").data(l,(function(t){return t.data[o]}));h.exit().attr("opacity",0).remove();var f=h.enter().append("text").classed("pie-label",!0),d=[];f.merge(h).style("text-anchor","middle").text((function(t){return a.pie.labels.formatter?a.pie.labels.formatter(t):aa.convertValueToPercentage(t.data.value,i)+"%"})).datum((function(t){var e=s+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=l.length,r=(t.endAngle-t.startAngle)*(180/Math.PI);if(e>=n-2&&r<Da.callout.minSliceDegree){var i=void 0,a=void 0;return t.index===n-1?(i=t.xPosition+Da.callout.offsetX+Da.callout.textMargin+t.textOffsetX,a=t.yPosition-Da.callout.offsetY,t.direction=D.RIGHT,d.push(t)):(i=t.xPosition-Da.callout.offsetX-t.textOffsetX-Da.callout.textMargin,a=t.yPosition-Da.callout.offsetY,t.direction=D.LEFT,d.push(t)),"translate("+i+", "+a+")"}return"translate("+t.xPosition+", "+t.yPosition+")"})),this.renderCallouts(d);var p=aa.getProperty(a,"donut")?"donut":"pie",g=aa.getProperty(a,p,"alignment"),v=_f.getSVGElementSize(this.getParent(),{useAttr:!0}).width,m=s+Da.xOffset;g===M.CENTER?m=v/2:g===M.RIGHT&&(m=v-s-Da.xOffset);var y=s+Da.yOffset;d.length>0&&(y+=Da.yOffsetCallout),n.attr("transform","translate("+m+", "+y+")"),this.addEventListeners()},e.prototype.renderCallouts=function(t){var e=_f.appendOrSelect(this.getContainerSVG(),"g.callouts").attr("role",r.GROUP).attr("aria-label","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===D.RIGHT?(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e+Da.callout.offsetX,y:n-Da.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x-Da.callout.horizontalLineLength):(t.startPos={x:e,y:n+t.textOffsetY},t.endPos={x:e-Da.callout.offsetX,y:n-Da.callout.offsetY+t.textOffsetY},t.intersectPointX=t.endPos.x+Da.callout.horizontalLineLength),t})),i.append("line").classed("vertical-line",!0).merge(e.selectAll("line.vertical-line")).datum((function(t){return ca(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 ca(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=ca(this);n.classed("hovered",!0).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.hoverArc),t.services.events.dispatchEvent(G.Pie.SLICE_MOUSEOVER,{element:ca(this),datum:e});var r=t.model.getOptions().data.groupMapsTo;t.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:n,items:[{label:e.data[r],value:e.data.value,color:t.model.getStrokeColor(e.data[r])}]})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Pie.SLICE_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(G.Pie.SLICE_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this);n.classed("hovered",!1).transition(t.services.transitions.getTransition("pie_slice_mouseover")).attr("d",t.arc),t.services.events.dispatchEvent(G.Pie.SLICE_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.HIDE,{hoveredElement:n})}))},e.prototype.computeRadius=function(){var t=_f.getSVGElementSize(this.parent,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Da.radiusOffset},e}(ag),Ig=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 aa.clamp(this.getValue(),0,100)/100},e.prototype.getDelta=function(){var t,e;return null!=(e=null===(t=this.model.getData().find((function(t){return"delta"===t.group})))||void 0===t?void 0:t.value)?e:null},e.prototype.getArcRatio=function(){var t=this.model.getOptions();return aa.getProperty(t,"gauge","type")===I.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(aa.getProperty(e,"gauge","deltaArrow","direction")){case N.UP:return"4,10 8,6 12,10";case N.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,a=this.getValue(),o=this.getValueRatio(),s=this.getArcSize(),u=this.getStartAngle(),c=u+o*s,l=u+s,h=this.computeRadius(),f=this.getInnerRadius();this.backgroundArc=jl().innerRadius(f).outerRadius(h).startAngle(c).endAngle(l),this.arc=jl().innerRadius(f).outerRadius(h).startAngle(u).endAngle(c),_f.appendOrSelect(n,"path.arc-background").attr("d",this.backgroundArc).attr("role",r.GROUP);var d=n.selectAll("path.arc-foreground").data([a]);d.enter().append("path").attr("class","arc-foreground").merge(d).attr("d",this.arc).attr("fill",(function(t){return e.model.getFillColor(t[i])})).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=aa.getProperty(e,"gauge","type"),r=this.getValue(),i=this.getDelta(),a=this.computeRadius(),o=aa.getProperty(e,"gauge","valueFontSize"),s=aa.getProperty(e,"gauge","deltaFontSize"),u=aa.getProperty(e,"gauge","numberSpacing"),c=0;n!==I.FULL||i?n===I.SEMI&&i&&(c=-(s(a)+u)):c=s(a);var l=_f.appendOrSelect(t,"g.gauge-numbers").attr("transform","translate(0, "+c+")"),h=_f.appendOrSelect(l,"g.gauge-value-number").attr("transform","translate(-10, 0)"),f=aa.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",o(a)+"px").attr("text-anchor","middle").text((function(t){return f(t)}));var p=_f.getSVGElementSize(_f.appendOrSelect(t,"text.gauge-value-number"),{useBBox:!0}).width;_f.appendOrSelect(h,"text.gauge-value-symbol").style("font-size",o(a)/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?aa.getProperty(e,"gauge","deltaFontSize"):function(){return 0},a=n?aa.getProperty(e,"gauge","numberFormatter"):function(){return null},o=aa.getProperty(e,"gauge","deltaArrow","size"),s=aa.getProperty(e,"gauge","numberSpacing"),u=_f.appendOrSelect(t,"g.gauge-numbers"),c=_f.appendOrSelect(u,"g.gauge-delta").attr("transform","translate(0, "+(i(r)+s)+")"),l=_f.appendOrSelect(c,"text.gauge-delta-number");l.data(null===n?[]:[n]),l.enter().append("text").classed("gauge-delta-number",!0).merge(l).attr("text-anchor","middle").style("font-size",i(r)+"px").text((function(t){return a(t)+"%"}));var h=_f.getSVGElementSize(_f.appendOrSelect(t,".gauge-delta-number"),{useBBox:!0}).width,f=aa.getProperty(e,"gauge","deltaArrow","enabled"),d=c.selectAll("svg.gauge-delta-arrow").data(null!==n&&f?[n]:[]);d.enter().append("svg").merge(d).attr("class","gauge-delta-arrow").attr("x",-o(r)-h/2).attr("y",-o(r)/2-.35*i(r)).attr("width",o(r)).attr("height",o(r)).attr("viewBox","0 0 16 16"),_f.appendOrSelect(d,"rect.gauge-delta-arrow-backdrop").attr("width","16").attr("height","16").attr("fill","none");var p=aa.getProperty(e,"gauge","status");_f.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(),l.exit().remove()},e.prototype.getInnerRadius=function(){return this.computeRadius()-aa.getProperty(this.model.getOptions(),"gauge","arcWidth")},e.prototype.addEventListeners=function(){var t=this;this.parent.selectAll("path.arc").on("mouseover",(function(e){t.services.events.dispatchEvent(G.Gauge.ARC_MOUSEOVER,{element:ca(this),datum:e})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Gauge.ARC_MOUSEMOVE,{element:n,datum:e})})).on("click",(function(e){t.services.events.dispatchEvent(G.Gauge.ARC_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Gauge.ARC_MOUSEOUT,{element:n,datum:e})}))},e.prototype.computeRadius=function(){var t=this.model.getOptions(),e=aa.getProperty(t,"gauge","type"),n=_f.getSVGElementSize(this.parent,{useAttrs:!0}),r=n.width,i=n.height;return e===I.SEMI?Math.min(r/2,i):Math.min(r/2,i/2)},e}(ag),Ng=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=_f.appendOrSelect(this.getContainerSVG(),"g.center"),i=this.model.getOptions(),a=this.computeRadius();_f.appendOrSelect(r,"text.donut-figure").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.numberFontSize(a)})).transition(this.services.transitions.getTransition("donut-figure-enter-update",e)).tween("text",(function(){return n.centerNumberTween(ca(this))})),_f.appendOrSelect(r,"text.donut-title").attr("text-anchor","middle").style("font-size",(function(){return i.donut.center.titleFontSize(a)})).attr("y",i.donut.center.titleYPosition(a)).text(aa.getProperty(i,"donut","center","label"))}},e.prototype.getInnerRadius=function(){return.75*this.computeRadius()},e.prototype.centerNumberTween=function(t){var e=this.model.getOptions(),n=aa.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?Us:ks)(r,n);return function(n){var r=e.donut.center.numberFormatter;t.text(r(i(n)))}},e}(Rg),Vg=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=_f.getSVGElementSize(e,{useAttrs:!0}),r=n.width,i=n.height;t.attr("width",r).attr("height",i);var a=aa.getProperty(this.model.getOptions(),"data","loading");a?this.renderSkeleton(a):this.removeSkeleton()},e.prototype.renderSkeleton=function(t){if(this.configs.skeleton===k.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===k.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===k.PIE)this.renderPieSkeleton(t);else{if(this.configs.skeleton!==k.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===S.VERTICAL&&this.drawYGrid(t),e===S.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=wu().domain([0,1]).range(t),this.yScale=wu().domain([0,1]).range(e)},e.prototype.drawBackdrop=function(t){var e=this.parent,n=e.node().parentNode,r=_f.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height;this.backdrop=_f.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("width",i).attr("height",a);var o=_f.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");o.attr("width","100%").attr("height","100%");var s=this.xScale.range(),u=s[0],c=(s[1],this.yScale.range()),l=(c[0],c[1]);this.backdrop.merge(o).attr("x",u).attr("y",l),o.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=aa.getProperty(this.model.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*n})),a=_f.appendOrSelect(this.backdrop,"g.x.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",(function(t){return t})).attr("x2",(function(t){return t})).attr("y1",0).attr("y2",e),a.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t)},e.prototype.drawYGrid=function(t){var e=this.backdrop.attr("height"),n=this.backdrop.attr("width"),r=aa.getProperty(this.model.getOptions(),"grid","y","numberOfTicks"),i=this.xScale.ticks(r).map((function(t){return t*e})),a=_f.appendOrSelect(this.backdrop,"g.y.skeleton"),o=a.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",0).attr("x2",n).attr("y1",(function(t){return t})).attr("y2",(function(t){return t})),a.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=_f.getSVGElementSize(r.node().parentNode,{useAttrs:!0}),a=i.width,o=i.height,s=_f.appendOrSelect(r,"svg.chart-skeleton").attr("width",a).attr("height",o),u=0===e?"pie":"donut",c=aa.getProperty(this.model.getOptions(),u,"alignment");_f.appendOrSelect(s,"rect.chart-skeleton-area-container").attr("width",a).attr("height",o).attr("fill","none");var l=jl().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),h=t+Math.abs(Da.radiusOffset),f=t+(Math.min(a,o)-2*t)/2,d=_f.appendOrSelect(s,"path").attr("class","skeleton-area-shape").attr("transform","translate("+h+", "+f+")").attr("d",l).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n),p=t+Da.xOffset;c===M.CENTER?p=a/2:c===M.RIGHT&&(p=a-t-Da.xOffset);var g=t+Da.yOffset;d.attr("transform","translate("+p+", "+g+")")},e.prototype.computeOuterRadius=function(){var t=_f.getSVGElementSize(this.parent.node().parentNode,{useAttrs:!0}),e=t.width,n=t.height;return Math.min(e,n)/2+Da.radiusOffset},e.prototype.computeInnerRadius=function(){return.75*this.computeOuterRadius()},e.prototype.setShimmerEffect=function(t){var e=this.parent.select(".chart-skeleton"),n=_f.getSVGElementSize(this.parent,{useAttrs:!0}).width,r=n,i=_f.appendOrSelect(e,"defs").lower(),a=_f.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)");a.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(){a.attr("gradientTransform","translate("+(0-3*.2*n)+", 0)").transition().duration(2e3).delay(1e3).ease(Cd).attr("gradientTransform","translate("+(r+3*.2*n)+", 0)").on("end",t)}()},e.prototype.removeSkeleton=function(){this.parent.select(".chart-skeleton").remove()},e}(ag),Ug=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(){_f.appendOrSelect(this.getContainerSVG(),"rect").attr("x",0).attr("y",0).attr("width",this.configs.size||La.default.size).attr("height",this.configs.size||La.default.size).attr("opacity",0)},e}(ag);function Gg(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 Bg(t,e){var n,r,i,a,o,s=new Fg(t),u=+t.value&&(s.value=t.value),c=[s];for(null==e&&(e=Hg);n=c.pop();)if(u&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)c.push(r=n.children[a]=new Fg(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(zg)}function Hg(t){return t.children}function jg(t){t.data=t.data.data}function zg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function Fg(t){this.data=t,this.depth=this.height=0,this.parent=null}function Wg(t){if("function"!=typeof t)throw new Error;return t}function Yg(){return 0}function qg(t){return function(){return t}}function Xg(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 Zg(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(r-e)/t.value;++s<u;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*c}function Kg(t,e,n,r,i){for(var a,o=t.children,s=-1,u=o.length,c=t.value&&(i-n)/t.value;++s<u;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*c}Fg.prototype=Bg.prototype={constructor:Fg,count:function(){return this.eachAfter(Gg)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.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 Bg(this).eachBefore(jg)}};var $g=function t(e){function n(t,n,r,i,a){!function(t,e,n,r,i,a){for(var o,s,u,c,l,h,f,d,p,g,v,m=[],y=e.children,_=0,b=0,x=y.length,w=e.value;_<x;){u=i-n,c=a-r;do{l=y[b++].value}while(!l&&b<x);for(h=f=l,v=l*l*(g=Math.max(c/u,u/c)/(w*t)),p=Math.max(f/v,v/h);b<x;++b){if(l+=s=y[b].value,s<h&&(h=s),s>f&&(f=s),v=l*l*g,(d=Math.max(f/v,v/h))>p){l-=s;break}p=d}m.push(o={value:l,dice:u<c,children:y.slice(_,b)}),o.dice?Zg(o,n,r,i,w?r+=c*l/w:a):Kg(o,n,r,w?n+=u*l/w:i,a),w-=l,_=b}}(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}((1+Math.sqrt(5))/2);function Qg(){var t=$g,e=!1,n=1,r=1,i=[0],a=Yg,o=Yg,s=Yg,u=Yg,c=Yg;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(Xg),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=c(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=u(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Wg(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:qg(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:qg(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:qg(+t),l):s},l.paddingBottom=function(t){return arguments.length?(u="function"==typeof t?t:qg(+t),l):u},l.paddingLeft=function(t){return arguments.length?(c="function"==typeof t?t:qg(+t),l):c},l}var Jg=function(t){function e(n,r,i,a){var o=t.call(this,n,r,a)||this;return o.type="layout",o.configs=a,o.children=i,o._instanceID=e.instanceID++,(o.configs.direction===C.ROW_REVERSE||o.configs.direction===C.COLUMN_REVERSE)&&(o.children=o.children.reverse()),o.init(),o}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=aa.getProperty(t,"data","growth","x");return e===P.PREFERRED||e===P.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 aa.getProperty(t,"data","growth","x")===P.STRETCH})).size()},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.parent,r=_f.getSVGElementSize(n,{useAttrs:!0}),i=r.width,a=r.height,o=Bg({children:this.children}).sum((function(t){return t.size})),s=this.configs.direction===C.ROW||this.configs.direction===C.ROW_REVERSE?Zg:Kg;Qg().tile(s).size([i,a])(o);var u=this.configs.direction===C.ROW||this.configs.direction===C.ROW_REVERSE,c=n.selectAll("svg.layout-child-"+this._instanceID).data(o.leaves(),(function(t){return t.data.id}));c.attr("width",(function(t){return t.x1-t.x0})).attr("height",(function(t){return t.y1-t.y0})),c.enter().append("svg").attr("class",(function(t){return"layout-child layout-child-"+e._instanceID+" "+t.data.id})).attr("x",(function(t){return t.x0})).attr("y",(function(t){return t.y0})).merge(n.selectAll("svg.layout-child-"+this._instanceID)).each((function(e){var n=this;e.data.components.forEach((function(r){r.setParent(ca(n));var i=aa.getProperty(e,"data","growth","x");i!==P.PREFERRED&&i!==P.FIXED||r.render(t)}))})),n.selectAll("svg.layout-child-"+this._instanceID).each((function(t){var e=aa.getProperty(t,"data","growth","x"),n=_f.getSVGElementSize(ca(this),{useBBox:!0});if("legend"===t.data.id){var r=_f.getSVGElementSize(ca(this),{useAttrs:!0});r.height<40&&(n.height=r.height)}if(e===P.PREFERRED){var o=u?n.width:n.height,s=u?i:a;t.data.size=o/s*100}})),c.exit().remove(),this.children.filter((function(t){return aa.getProperty(t,"growth","x")===P.STRETCH})).forEach((function(t,n){t.size=(100-+e.getPreferedAndFixedSizeSum())/+e.getNumOfStretchChildren()})),o=Bg({children:this.children}).sum((function(t){return t.size})),Qg().tile(s).size([i,a]).padding(0)(o),n.selectAll("svg.layout-child-"+this._instanceID).data(o.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){aa.getProperty(e,"data","growth","x")===P.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}(ag),tv=Array.prototype.slice;function ev(t){return t}function nv(t){return"translate("+(t+.5)+",0)"}function rv(t){return"translate(0,"+(t+.5)+")"}function iv(t){return function(e){return+t(e)}}function av(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function ov(){return!this.__axis}function sv(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,u=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",l=1===t||3===t?nv:rv;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):ev:i,p=Math.max(a,0)+s,g=e.range(),v=+g[0]+.5,m=+g[g.length-1]+.5,y=(e.bandwidth?av:iv)(e.copy()),_=h.selection?h.selection():h,b=_.selectAll(".domain").data([null]),x=_.selectAll(".tick").data(f,e).order(),w=x.exit(),E=x.enter().append("g").attr("class","tick"),S=x.select("line"),O=x.select("text");b=b.merge(b.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),x=x.merge(E),S=S.merge(E.append("line").attr("stroke","currentColor").attr(c+"2",u*a)),O=O.merge(E.append("text").attr("fill","currentColor").attr(c,u*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==_&&(b=b.transition(h),x=x.transition(h),S=S.transition(h),O=O.transition(h),w=w.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=y(t))?l(t):this.getAttribute("transform")})),E.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:y(t))}))),w.remove(),b.attr("d",4===t||2==t?o?"M"+u*o+","+v+"H0.5V"+m+"H"+u*o:"M0.5,"+v+"V"+m:o?"M"+v+","+u*o+"V0.5H"+m+"V"+u*o:"M"+v+",0.5H"+m),x.attr("opacity",1).attr("transform",(function(t){return l(y(t))})),S.attr(c+"2",u*a),O.attr(c,u*p).text(d),_.filter(ov).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=tv.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:tv.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:tv.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function uv(t){return sv(1,t)}function cv(t){return sv(2,t)}function lv(t){return sv(3,t)}function hv(t){return sv(4,t)}var fv=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,a=this.model.getOptions(),o=aa.getProperty(a,"axes",i,"visible"),s=this.getContainerSVG(),u=_f.getSVGElementSize(this.parent,{useAttrs:!0}),c=u.width,l=u.height,h=_f.appendOrSelect(s,"g.axis."+i);i===x.BOTTOM||i===x.TOP?(e=this.configs.axes[x.LEFT]?this.margins.left:0,n=this.configs.axes[x.RIGHT]?c-this.margins.right:c):(e=l-this.margins.bottom,n=this.margins.top);var f,d=this.services.cartesianScales.getScaleByPosition(i);switch(this.scaleType===O.LABELS?d.rangeRound([e,n]):d.range([e,n]),i){case x.LEFT:f=hv;break;case x.BOTTOM:f=lv;break;case x.RIGHT:f=cv;break;case x.TOP:f=uv}h.attr("aria-label",i+" axis");var p=!h.select("g.ticks").empty(),g=_f.appendOrSelect(h,"g.ticks");p||(g.attr("role",r.GRAPHICS_OBJECT+" "+r.GROUP),g.attr("aria-label",i+" ticks"));var v=_f.appendOrSelect(h,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label","invisible "+i+" ticks"),m=aa.getProperty(a,"axes",i),y=this.scaleType===O.TIME||m.scaleType===O.TIME,_=i===x.LEFT||i===x.RIGHT,b=this.model.get("zoomDomain");if(b&&y&&!_&&d.domain(b),o){var w=aa.getProperty(m,"scaleType"),S=aa.getProperty(a,"data","loading"),T=aa.getProperty(m,"ticks","number"),M=aa.getProperty(m,"ticks","values"),A=aa.getProperty(m,"truncation","type"),C=aa.getProperty(m,"truncation","threshold"),P=aa.getProperty(m,"truncation","numCharacter"),D=null!==T,k=aa.getProperty(a,"timeScale"),L=_f.appendOrSelect(v,"g.tick"),R=_f.appendOrSelect(L,"text").text("0"),I=_f.getSVGElementSize(R.node(),{useBBox:!0}).height;L.remove();var N,V=this.scaleType||m.scaleType||O.LINEAR,G=f(d).tickSizeOuter(0);if(d.ticks){var B=void 0;if(D?B=T:(B=Ma.ticks.number,_&&(B=this.getNumberOfFittingTicks(l,I,Ma.ticks.verticalSpaceRatio))),1===d.ticks().length&&0===d.ticks()[0]&&(B=0),G.ticks(B),y)if(d.ticks(B).length){var H=aa.getProperty(a,"timeScale","addSpaceOnEdges"),j=aa.getProperty(a,"axes",i,"domain"),z=void 0,F=d.copy();H&&!j&&F.nice(B),z=F.ticks(B),H&&z.length>2&&!j&&(z.splice(z.length-1,1),z.splice(0,1)),G.tickValues(z)}else G.tickValues([])}var W=aa.getProperty(m,"ticks","formatter");if(y){var Y=pg(G.tickValues());N=null===W?function(t,e){return fg(t,e,Y,k)}:function(t,e){var n=fg(t,e,Y,k);return W(t,e,n)}}else null===W?V===O.LINEAR&&(N=function(t){return t.toLocaleString()}):N=W;switch(G.tickFormat(N),M&&G.tickValues(M),i){case x.LEFT:g.attr("transform","translate("+this.margins.left+", 0)");break;case x.BOTTOM:g.attr("transform","translate(0, "+(l-this.margins.bottom)+")");break;case x.RIGHT:g.attr("transform","translate("+(c-this.margins.right)+", 0)");break;case x.TOP:g.attr("transform","translate(0, "+this.margins.top+")")}var q=this.model.isDataEmpty();if(m.title){var X=_f.appendOrSelect(h,"text.axis-title").html(q||S?"":m.title);switch(i){case x.LEFT:X.attr("transform","rotate(-90)").attr("y",0).attr("x",-d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case x.BOTTOM:X.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+l+")").style("text-anchor","middle");break;case x.RIGHT:X.attr("transform","rotate(90)").attr("y",-c).attr("x",d.range()[0]/2).attr("dy","1em").style("text-anchor","middle");break;case x.TOP:var Z=_f.getSVGElementSize(X,{useBBox:!0}).height;X.attr("transform","translate("+(this.margins.left/2+d.range()[1]/2)+", "+Z/2+")").style("text-anchor","middle")}}if(y){var K=pg(G.tickValues()),$=k.showDayName,Q=g;t&&(g=g.transition(this.services.transitions.getTransition("axis-update",t))),g=g.call(G),Q.selectAll(".tick").data(G.tickValues(),d).order().select("text").style("font-weight",(function(t,e){return hg(t,e,K,$)?"bold":"normal"}))}else g=t&&p?g.transition(this.services.transitions.getTransition("axis-update")).call(G):g.call(G);if(v.call(G),i===x.BOTTOM||i===x.TOP){var J=!1,tt=aa.getProperty(m,"ticks","rotation");if(tt===U.ALWAYS)J=!0;else if(tt===U.NEVER)J=!1;else if(!tt||tt===U.AUTO)if(d.step){J=v.selectAll("g.tick text").nodes().some((function(t){return _f.getSVGElementSize(t,{useBBox:!0}).width>=d.step()}))}else{var et=aa.getProperty(m,"ticks","rotateIfSmallerThan")||Ma.ticks.rotateIfSmallerThan,nt=c/(y?G.tickValues().length:d.ticks().length)/2;J=y?nt<2*et:nt<et}J?(D||(G.ticks(this.getNumberOfFittingTicks(c,I,Ma.ticks.horizontalSpaceRatio)),v.call(G),g.call(G)),h.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").style("text-anchor",i===x.TOP?"start":"end")):h.selectAll("g.ticks g.tick text").attr("transform",null).style("text-anchor",null)}if(S?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})),A!==E.NONE&&w===O.LABELS&&!M){var rt=this.model.getDataValuesGroupedByKeys();if(rt.length>0){var it=rt.map((function(t){return t.sharedStackKey})),at=s.select("g.axis."+i+" g.ticks g.tick").html();h.selectAll("g.ticks g.tick").html(at),h.selectAll("g.tick text").data(it).text((function(t){return t.length>C?aa.truncateLabel(t,A,P):t})),this.getInvisibleAxisRef().selectAll("g.tick text").data(it).text((function(t){return t.length>C?aa.truncateLabel(t,A,P):t})),h.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),h.selectAll("g.tick text").data(it)}}this.addEventListeners()}else g.attr("aria-hidden",!0)},e.prototype.addEventListeners=function(){var t=this.getContainerSVG(),e=this.configs.position,n=_f.appendOrSelect(t,"g.axis."+e),r=this.model.getOptions(),i=aa.getProperty(r,"axes",e),a=aa.getProperty(i,"scaleType"),o=aa.getProperty(i,"truncation","threshold"),s=(this.scaleType===O.TIME||(i.scaleType,O.TIME),this);n.selectAll("g.tick text").on("mouseover",(function(t){s.services.events.dispatchEvent(G.Axis.LABEL_MOUSEOVER,{element:ca(this),datum:t}),a===O.LABELS&&t.length>o&&s.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:ca(this),content:t})})).on("mousemove",(function(t){s.services.events.dispatchEvent(G.Axis.LABEL_MOUSEMOVE,{element:ca(this),datum:t}),a===O.LABELS&&t.length>o&&s.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(t){s.services.events.dispatchEvent(G.Axis.LABEL_CLICK,{element:ca(this),datum:t})})).on("mouseout",(function(t){s.services.events.dispatchEvent(G.Axis.LABEL_MOUSEOUT,{element:ca(this),datum:t}),a===O.LABELS&&s.services.events.dispatchEvent(G.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 aa.clamp(r,2,Ma.ticks.number)},e.prototype.destroy=function(){var t=this.getContainerSVG(),e=this.configs.position;_f.appendOrSelect(t,"g.axis."+e).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)},e}(ag),dv=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(x),i=aa.getProperty(this.model.getOptions(),"axes");r.forEach((function(t){i[x[t]]&&(n[x[t]]=!0)})),this.configs.axes=n,r.forEach((function(t){var n=x[t];if(e.configs.axes[n]&&!e.children[n]){var r=new fv(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 a={};Object.keys(this.children).forEach((function(n){var r,i=e.children[n],o=i.configs.position,s=i.getInvisibleAxisRef(),u=_f.getSVGElementSize(s,{useBBox:!0}),c=u.width,l=u.height;switch(r=i.getTitleRef().empty()?0:_f.getSVGElementSize(i.getTitleRef(),{useBBox:!0}).height,o){case x.TOP:a.top=l+r;break;case x.BOTTOM:a.bottom=l+r;break;case x.LEFT:a.left=c+r;break;case x.RIGHT:a.right=c+r}e.addAxisThresholds(t,o)})),Object.keys(a).some((function(t){return e.margins[t]!==a[t]}))&&(this.margins=Object.assign(this.margins,a),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(G.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=aa.getProperty(this.model.getOptions(),"axes",e).thresholds;r&&(r.forEach((function(t,r){var i=new yg(n.model,n.services,y(y({},t),{axisPosition:e,index:r}));n.thresholds.push(i)})),this.thresholds.forEach((function(e){e.setParent(n.parent),e.render(t)})))},e}(ag);function pv(){Ki.preventDefault(),Ki.stopImmediatePropagation()}function gv(t){var e=t.document.documentElement,n=ca(t).on("dragstart.drag",pv,!0);"onselectstart"in e?n.on("selectstart.drag",pv,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function vv(t,e){var n=t.document.documentElement,r=ca(t).on("dragstart.drag",null);e&&(r.on("click.drag",pv,!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 mv(t){return function(){return t}}function yv(t,e,n){this.target=t,this.type=e,this.selection=n}function _v(){Ki.stopImmediatePropagation()}function bv(){Ki.preventDefault(),Ki.stopImmediatePropagation()}var xv={name:"drag"},wv={name:"space"},Ev={name:"handle"},Sv={name:"center"};function Ov(t){return[+t[0],+t[1]]}function Tv(t){return[Ov(t[0]),Ov(t[1])]}function Mv(t){return function(e){return function(t,e,n){arguments.length<3&&(n=e,e=la().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return ha(t,r);return null}(e,Ki.touches,t)}}var Av={name:"x",handles:["w","e"].map(Iv),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]]}},Cv={name:"y",handles:["n","s"].map(Iv),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]]}},Pv={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"},Dv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},kv={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},Lv={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},Rv={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function Iv(t){return{type:t}}function Nv(){return!Ki.ctrlKey&&!Ki.button}function Vv(){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 Uv(){return navigator.maxTouchPoints||"ontouchstart"in this}function Gv(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Bv(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function Hv(){return function(t){var e,n=Vv,r=Nv,i=Uv,a=!0,o=wf("start","brush","end"),s=6;function u(e){var n=e.property("__brush",g).selectAll(".overlay").data([Iv("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Pv.overlay).merge(n).each((function(){var t=Gv(this).extent;ca(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([Iv("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Pv.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 Pv[t.type]})),e.each(c).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 c(){var t=ca(this),e=Gv(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 l(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||Ki.touches)&&r.apply(this,arguments)){var n,i,o,s,u,h,f,d,p,g,v,m=this,y=Ki.target.__data__.type,_="selection"===(a&&Ki.metaKey?y="overlay":y)?xv:a&&Ki.altKey?Sv:Ev,b=t===Cv?null:Lv[y],x=t===Av?null:Rv[y],w=Gv(m),E=w.extent,S=w.selection,O=E[0][0],T=E[0][1],M=E[1][0],A=E[1][1],C=0,P=0,D=b&&x&&a&&Ki.shiftKey,k=Ki.touches?Mv(Ki.changedTouches[0].identifier):fa,L=k(m),R=L,I=l(m,arguments,!0).beforestart();"overlay"===y?(S&&(p=!0),w.selection=S=[[n=t===Cv?O:L[0],o=t===Av?T:L[1]],[u=t===Cv?M:n,f=t===Av?A:o]]):(n=S[0][0],o=S[0][1],u=S[1][0],f=S[1][1]),i=n,s=o,h=u,d=f;var N=ca(m).attr("pointer-events","none"),V=N.selectAll(".overlay").attr("cursor",Pv[y]);if(Ki.touches)I.moved=G,I.ended=H;else{var U=ca(Ki.view).on("mousemove.brush",G,!0).on("mouseup.brush",H,!0);a&&U.on("keydown.brush",j,!0).on("keyup.brush",z,!0),gv(Ki.view)}_v(),$f(m),c.call(m),I.start()}function G(){var t=k(m);!D||g||v||(Math.abs(t[0]-R[0])>Math.abs(t[1]-R[1])?v=!0:g=!0),R=t,p=!0,bv(),B()}function B(){var t;switch(C=R[0]-L[0],P=R[1]-L[1],_){case wv:case xv:b&&(C=Math.max(O-n,Math.min(M-u,C)),i=n+C,h=u+C),x&&(P=Math.max(T-o,Math.min(A-f,P)),s=o+P,d=f+P);break;case Ev:b<0?(C=Math.max(O-n,Math.min(M-n,C)),i=n+C,h=u):b>0&&(C=Math.max(O-u,Math.min(M-u,C)),i=n,h=u+C),x<0?(P=Math.max(T-o,Math.min(A-o,P)),s=o+P,d=f):x>0&&(P=Math.max(T-f,Math.min(A-f,P)),s=o,d=f+P);break;case Sv:b&&(i=Math.max(O,Math.min(M,n-C*b)),h=Math.max(O,Math.min(M,u+C*b))),x&&(s=Math.max(T,Math.min(A,o-P*x)),d=Math.max(T,Math.min(A,f+P*x)))}h<i&&(b*=-1,t=n,n=u,u=t,t=i,i=h,h=t,y in Dv&&V.attr("cursor",Pv[y=Dv[y]])),d<s&&(x*=-1,t=o,o=f,f=t,t=s,s=d,d=t,y in kv&&V.attr("cursor",Pv[y=kv[y]])),w.selection&&(S=w.selection),g&&(i=S[0][0],h=S[1][0]),v&&(s=S[0][1],d=S[1][1]),S[0][0]===i&&S[0][1]===s&&S[1][0]===h&&S[1][1]===d||(w.selection=[[i,s],[h,d]],c.call(m),I.brush())}function H(){if(_v(),Ki.touches){if(Ki.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else vv(Ki.view,p),U.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),V.attr("cursor",Pv.overlay),w.selection&&(S=w.selection),Bv(S)&&(w.selection=null,c.call(m)),I.end()}function j(){switch(Ki.keyCode){case 16:D=b&&x;break;case 18:_===Ev&&(b&&(u=h-C*b,n=i+C*b),x&&(f=d-P*x,o=s+P*x),_=Sv,B());break;case 32:_!==Ev&&_!==Sv||(b<0?u=h-C:b>0&&(n=i-C),x<0?f=d-P:x>0&&(o=s-P),_=wv,V.attr("cursor",Pv.selection),B());break;default:return}bv()}function z(){switch(Ki.keyCode){case 16:D&&(g=v=D=!1,B());break;case 18:_===Sv&&(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=Ev,B());break;case 32:_===wv&&(Ki.altKey?(b&&(u=h-C*b,n=i+C*b),x&&(f=d-P*x,o=s+P*x),_=Sv):(b<0?u=h:b>0&&(n=i),x<0?f=d:x>0&&(o=s),_=Ev),V.attr("cursor",Pv[y]),B());break;default:return}bv()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=Tv(n.apply(this,arguments)),e.dim=t,e}return u.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Vs(a,o);function u(t){r.selection=1===t&&null===o?null:s(t),c.call(e),i.brush()}return null!==a&&null!==o?u:u(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();$f(e),i.selection=null===a?null:a,c.call(e),o.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=Ki;t.sourceEvent=Ki,Ki=t;try{e.apply(n,r)}finally{Ki=i}}(new yv(u,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},u.extent=function(t){return arguments.length?(n="function"==typeof t?t:mv(Tv(t)),u):n},u.filter=function(t){return arguments.length?(r="function"==typeof t?t:mv(!!t),u):r},u.touchable=function(t){return arguments.length?(i="function"==typeof t?t:mv(!!t),u):i},u.handleSize=function(t){return arguments.length?(s=+t,u):s},u.keyModifiers=function(t){return arguments.length?(a=!!t,u):a},u.on=function(){var t=o.on.apply(o,arguments);return t===o?u:t},u}(Av)}var jv=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(),a=_f.appendOrSelect(r,"svg.chart-grid-backdrop"),o=_f.appendOrSelect(a,"g."+this.type),s=_f.appendOrSelect(o,this.selectionSelector),u=_f.getSVGElementSize(a,{useAttrs:!0}),c=u.width,l=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=_f.appendOrSelect(i,this.frontSelectionSelector);if(d&&f===O.TIME){var m=this.model.get("zoomDomain");void 0===m&&(m=this.services.zoom.getDefaultZoomBarDomain(),this.model.set({zoomDomain:m},{animate:!1}));var y=Hv().extent([[0,0],[c-1,l]]).on("start brush end",(function(){var t=Ki.selection;if(null!==t){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(l/e.DASH_LENGTH),a=i*e.DASH_LENGTH,o=0;o<i;o++)r+=","+e.DASH_LENGTH;r+=","+(l-a),i%2==1&&(r+=",0"),r+=","+n.toString(),r+=","+l.toString(),v.attr("stroke-dasharray",r)}(t);var r=vl().range([0,c]).domain(m),i=[r.invert(t[0]),r.invert(t[1])];if(null!=t&&null!=Ki.sourceEvent&&("mousemove"===Ki.sourceEvent.type||"mouseup"===Ki.sourceEvent.type||"mousedown"===Ki.sourceEvent.type||"touchstart"===Ki.sourceEvent.type||"touchmove"===Ki.sourceEvent.type||"touchend"===Ki.sourceEvent.type)){var a=void 0;"start"===Ki.type?a=G.ZoomBar.SELECTION_START:"brush"===Ki.type?a=G.ZoomBar.SELECTION_IN_PROGRESS:"end"===Ki.type&&(a=G.ZoomBar.SELECTION_END),n.services.events.dispatchEvent(a,{selection:t,newDomain:i})}}})).on("end.brushed",(function(){var t=Ki.selection;if(null!==t){var e=vl().range([0,c]).domain(m),r=[e.invert(t[0]),e.invert(t[1])];r[0].valueOf()===r[1].valueOf()&&(r=n.services.zoom.getDefaultZoomBarDomain()),m[0].valueOf()===r[0].valueOf()&&m[1].valueOf()===r[1].valueOf()||n.model.set({zoomDomain:r},{animate:!1}),o.call(y.move,null),v.style("display","none")}}));o.call(y)}},e.DASH_LENGTH=4,e}(ag),zv=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(),a=i[0],o=i[1],s=r.range(),u=s[0],c=s[1];this.chartClipPath=_f.appendOrSelect(t,"clipPath."+this.type).attr("id",this.chartClipId);var l=_f.appendOrSelect(this.chartClipPath,"rect."+this.type);l.attr("x",a).attr("y",c).attr("width",o-a).attr("height",u-c),this.chartClipPath.merge(l).lower()},e}(ag),Fv=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=aa.getProperty(this.model.getOptions(),"grid","x","enabled"),n=aa.getProperty(this.model.getOptions(),"grid","y","enabled");(e||n)&&(this.drawBackdrop(e,n),e&&(_f.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(_f.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))},e.prototype.drawXGrid=function(t){var e=this.parent,n=this.backdrop.attr("height"),r=lv(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0),i=aa.getProperty(this.model.getOptions(),"grid","x","numberOfTicks");r.ticks(i);var a=e.select(".x.grid").attr("transform","translate("+-this.backdrop.attr("x")+", "+n+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.drawYGrid=function(t){var e=this.parent,n=this.backdrop.attr("width"),r=hv(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0),i=aa.getProperty(this.model.getOptions(),"grid","y","numberOfTicks");r.ticks(i);var a=e.select(".y.grid").attr("transform","translate(0, "+-this.backdrop.attr("y")+")");if(t){var o=this.services.transitions.getTransition("grid-update");a.transition(o).call(r)}else a.call(r);this.cleanGrid(a)},e.prototype.getGridlineThreshold=function(t){var e,n=this.parent,r=n.selectAll(".x.grid .tick").nodes().sort((function(t,e){return Number(aa.getTranslationValues(t).tx)-Number(aa.getTranslationValues(e).tx)})),i=-1;if(r.length){r.forEach((function(e,n){t[0]>=+aa.getTranslationValues(e).tx&&i++})),e=i+1<r.length?i+1:r.length;var a,o=r[i],s=r[e];if(o)if(s)a=+aa.getTranslationValues(s).tx-+aa.getTranslationValues(o).tx;else{var u=n.select("rect.chart-grid-backdrop").node();a=_f.getSVGElementSize(u).width-+aa.getTranslationValues(o).tx}else a=+aa.getTranslationValues(s).tx;return a*this.model.getOptions().tooltip.gridline.threshold}},e.prototype.getActiveGridline=function(t){var e=aa.getProperty(this.model.getOptions,"tooltip","gridline","threshold"),n=e||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter((function(){var e=aa.getTranslationValues(this),r=Number(e.tx)-n,i=Number(e.tx)+n;return r<=t[0]&&t[0]<=i}))},e.prototype.drawBackdrop=function(t,e){var n=this.parent,r=this.services.cartesianScales.getMainXScale(),i=this.services.cartesianScales.getMainYScale(),a=r.range(),o=a[0],s=a[1],u=i.range(),c=u[0],l=u[1];this.backdrop=_f.appendOrSelect(n,"svg.chart-grid-backdrop");var h=_f.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(h).attr("x",o).attr("y",l).attr("width",s-o).attr("height",c-l).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}(ag);var Wv,Yv=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="ruler",e.isXGridEnabled=aa.getProperty(e.model.getOptions(),"grid","x","enabled"),e.isYGridEnabled=aa.getProperty(e.model.getOptions(),"grid","y","enabled"),e.isEventListenerAdded=!1,e}return n(e,t),e.prototype.render=function(){var t=aa.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,a=this.services.cartesianScales.getOrientation(),o=a===S.HORIZONTAL?r:n,s=_f.appendOrSelect(i,"g.ruler").attr("aria-label","ruler"),u=_f.appendOrSelect(s,"line.ruler-line"),c=i.selectAll("[role=graphics-symbol]"),l=this.model.getDisplayData(),h=this.services.cartesianScales.getRangeScale().range(),f=h[0],d=h[1],p=l.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,o)}));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(G.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(o-e.domainValue),i=Math.abs(o-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})),_=c.filter((function(t){var n=e.services.cartesianScales.getDomainValue(t);return y.includes(n)}));this.elementsToHighlight&&this.elementsToHighlight.size()>0&&!aa.isEqual(this.elementsToHighlight,_)&&this.hideRuler(),_.dispatch("mouseover"),this.elementsToHighlight=_,this.services.events.dispatchEvent(G.Tooltip.SHOW,{mousePosition:[n,r],hoveredElement:u,data:this.formatTooltipData(m)}),s.attr("opacity",1);var b=g[0];"horizontal"===a?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=_f.appendOrSelect(t,"g.ruler");t.selectAll("[role=graphics-symbol]").dispatch("mouseout"),this.services.events.dispatchEvent(G.Tooltip.HIDE),e.attr("opacity",0)},e.prototype.addBackdropEventListeners=function(){this.isEventListenerAdded=!0;var t=this,e=this.model.getDisplayData(),n=function(){var e=fa(t.parent.node());t.showRuler(e)};if(e.length>100){var r=e.length%50*12.5;n=aa.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=_f.appendOrSelect(t,"svg.chart-grid-backdrop");_f.appendOrSelect(this.backdrop,this.isXGridEnabled||this.isYGridEnabled?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop")},e}(ag),qv=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=_f.appendOrSelect(t,"g.ruler");this.services.events.dispatchEvent(G.Tooltip.HIDE),e.attr("opacity",0)},e}(Yv),Xv=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(),a=this.services.cartesianScales.getDomainScale().range(),o=a[0],s=a[1],u=+this.services.cartesianScales.getRangeValue(0)+.5;if(!u){var c=this.services.cartesianScales.getRangeAxisPosition();u=this.services.cartesianScales.getScaleByPosition(c).range()[0]}var l=aa.flipSVGCoordinatesBasedOnOrientation({x0:o,x1:s,y0:u,y1:u},this.services.cartesianScales.getOrientation());_f.appendOrSelect(i,"line.domain").transition(this.services.transitions.getTransition("zero-line-update",t)).attr("y1",l.y0).attr("y2",l.y1).attr("x1",l.x0).attr("x2",l.x1)}},e}(ag),Zv=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=Hv(),e}return n(e,t),e.prototype.init=function(){this.services.events.addEventListener(G.ZoomBar.UPDATE,this.render.bind(this))},e.prototype.render=function(t){var e=this,n=this.getContainerSVG(),r=this.model.getOptions(),i=aa.getProperty(r,"data","loading"),a=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),o=Na.height[a],s=_f.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=0,c=this.model.get("axesMargins");c&&c.left&&(u=c.left);var l=_f.appendOrSelect(n,"svg.zoom-container").attr("width","100%").attr("height",o).attr("opacity",1);_f.appendOrSelect(n,"rect.zoom-spacer").attr("x",0).attr("y",o).attr("width","100%").attr("height",Na.spacerHeight).attr("opacity",1).attr("fill","none");if(a===w.GRAPH_VIEW?_f.appendOrSelect(l,"rect.zoom-bg").attr("x",u).attr("y",0).attr("width",s-u).attr("height","100%"):a===w.SLIDER_VIEW&&_f.appendOrSelect(l,"rect.zoom-slider-bg").attr("x",u).attr("y",o/2-1).attr("width",s-u).attr("height",2),!i){var h=this.services.cartesianScales,f=h.getMainXScale(),d=h.getMainYScale(),p=h.getMainXScaleType();if(f&&p===O.TIME){var g=this.services.zoom.getZoomBarData();this.xScale=f.copy(),this.yScale=d.copy();var v=this.services.zoom.getDefaultZoomBarDomain();this.compensateDataForDefaultDomain(g,v);var m=this.model.get("initialZoomDomain"),y=aa.getProperty(this.model.getOptions(),"zoomBar","top","initialZoomDomain");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,o-6]).domain(Ro(g,(function(t){return t.value})));var _=this.model.get("zoomDomain");if(a===w.GRAPH_VIEW){this.renderZoomBarArea(l,"path.zoom-graph-area-unselected",g,null),this.updateClipPath(n,this.clipId,0,0,0,0),this.renderZoomBarArea(l,"path.zoom-graph-area",g,this.clipId);var b=ql()([[u,o],[s,o]]);_f.appendOrSelect(l,"path.zoom-bg-baseline").attr("d",b)}this.addBrushEventListener(_,u,s);var x=_f.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 E=_.map((function(t){return e.xScale(t)}));E[1]-E[0]<this.MIN_SELECTION_DIFF||(x.call(this.brush.move,E),this.updateBrushHandle(this.getContainerSVG(),E,_))}}}},e.prototype.addBrushEventListener=function(t,e,n){var r=this,i=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),a=Na.height[i];this.brush.extent([[e,0],[n,a]]).on("start brush end",null).on("start brush end",(function(){var e=Ki.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!=Ki.sourceEvent&&("mousemove"===Ki.sourceEvent.type||"mouseup"===Ki.sourceEvent.type||"mousedown"===Ki.sourceEvent.type||"touchstart"===Ki.sourceEvent.type||"touchmove"===Ki.sourceEvent.type||"touchend"===Ki.sourceEvent.type)){void 0!==t&&t[0]===r[0]&&t[1]===r[1]||this.model.set({zoomDomain:r},{animate:!1});var i=void 0;"start"===Ki.type?i=G.ZoomBar.SELECTION_START:"brush"===Ki.type?i=G.ZoomBar.SELECTION_IN_PROGRESS:"end"===Ki.type&&(i=G.ZoomBar.SELECTION_END),this.services.events.dispatchEvent(i,{selection:n,newDomain:r})}},e.prototype.updateBrushHandle=function(t,e,n){var r=this,i=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),a=Na.height[i],o=i===w.GRAPH_VIEW?12:6,s=(a-o)/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]+-2.5,r.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+-2.5,r.maxSelectionRange[1]-5):void 0})).attr("y",0).attr("width",5).attr("height",a).attr("cursor","ew-resize").style("display",null);var u=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);u.enter().append("rect").attr("class",(function(t){return"handle-bar handle-bar--"+t.type})),u.attr("x",(function(t){return"w"===t.type?Math.max(e[0]+-.5,r.maxSelectionRange[0]- -2.5-.5):"e"===t.type?Math.min(e[1]+-.5,r.maxSelectionRange[1]+-2.5+-.5):void 0})).attr("y",s).attr("width",1).attr("height",o).attr("cursor","ew-resize"),i===w.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],a)},e.prototype.updateSliderSelectedArea=function(t){var e=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),n=Na.height[e],r=(_f.getSVGElementSize(this.parent,{useAttrs:!0}).width,this.model.get("axesMargins"));r&&r.left&&r.left;var i=this.getContainerSVG().select("svg.zoom-container");_f.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,a=i.getMainXAxisPosition(),o=i.getMainYAxisPosition(),s=i.getMainXScaleType(),u=i.getMainYScaleType(),c=function(t,e,n){return function(r,a){return i.getValueFromScale(t,e,n,r,a)}},l=c(this.xScale,s,a),h=c(this.yScale,u,o),f=aa.getProperty(this.model.getOptions(),"zoomBar","top","type"),d=Na.height[f],p=Xl().x((function(t,e){return l(t,e)})).y0(d).y1((function(t,e){return d-h(t,e)})),g=_f.appendOrSelect(t,e).datum(n).attr("d",p);r&&g.attr("clip-path","url(#"+r+")")},e.prototype.updateClipPath=function(t,e,n,r,i,a){var o=_f.appendOrSelect(t,"clipPath").attr("id",e);_f.appendOrSelect(o,"rect").attr("x",n).attr("y",r).attr("width",i).attr("height",a)},e.prototype.compensateDataForDefaultDomain=function(t,e){if(t&&!(t.length<2)){var n,r=this.services.cartesianScales.getDomainIdentifier(),i=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(t[0][r]))(n={})[r]=e[0],n[i]=0,t.unshift(n);if(Number(e[1])>Number(t[t.length-1][r]))(n={})[r]=e[1],n[i]=0,t.push(n)}},e.prototype.destroy=function(){this.brush.on("start brush end",null),this.services.events.removeEventListener(G.ZoomBar.UPDATE,this.render.bind(this))},e}(ag),Kv=function(){function t(t,e){this.services={domUtils:_f,events:bf,transitions:kd},this.model=new qh(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(G.Model.UPDATE,(function(t){var e=!!aa.getProperty(t,"detail","animate");n.update(e)})),this.model.setData(e.data),this.services.events.addEventListener(G.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(G.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 _g(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},n={id:"legend",components:[new og(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},r={id:"graph-frame",components:t,growth:{x:P.STRETCH,y:P.FIXED}},i=!1!==this.model.getOptions().legend.enabled,a=C.COLUMN;if(i){var o=aa.getProperty(this.model.getOptions(),"legend","position");"left"===o?(a=C.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):"right"===o?(a=C.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):"bottom"===o&&(a=C.COLUMN_REVERSE)}var s={id:"spacer",components:[new Ug(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},u={id:"full-frame",components:[new Jg(this.model,this.services,_(i?[n]:[],i?[s]:[],[r]),{direction:a})],growth:{x:P.STRETCH,y:P.FIXED}},c=[];if(this.model.getOptions().title){c.push(e);var l={id:"spacer",components:[new Ug(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}};c.push(l)}return c.push(u),[new xg(this.model,this.services),new Jg(this.model,this.services,c,{direction:C.COLUMN})]},t}(),$v=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.services=Object.assign(r.services,{cartesianScales:tg,curves:rg,zoom:ig}),r}return n(e,t),e.prototype.getAxisChartComponents=function(t){var e=aa.getProperty(this.model.getOptions(),"zoomBar","top","enabled");this.services.cartesianScales.findDomainAndRangeAxes();var n=this.services.cartesianScales.getMainXAxisPosition(),r=aa.getProperty(this.model.getOptions(),"axes",n,"scaleType"),i=e&&n===x.BOTTOM&&r===O.TIME,a={id:"title",components:[new _g(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},o={id:"legend",components:[new og(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}};i&&t.push(new zv(this.model,this.services),new jv(this.model,this.services));var s={id:"graph-frame",components:t,growth:{x:P.STRETCH,y:P.FIXED}},u=!1!==this.model.getOptions().legend.enabled,c=C.COLUMN;if(u){var l=aa.getProperty(this.model.getOptions(),"legend","position");l===T.LEFT?(c=C.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):l===T.RIGHT?(c=C.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=A.VERTICAL)):l===T.BOTTOM&&(c=C.COLUMN_REVERSE)}var h={id:"spacer",components:[new Ug(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},f={id:"full-frame",components:[new Jg(this.model,this.services,_(u?[o]:[],u?[h]:[],[s]),{direction:c})],growth:{x:P.STRETCH,y:P.FIXED}},d={id:"zoom-bar",components:[new Zv(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},p=[];if(this.model.getOptions().title){p.push(a);var g={id:"spacer",components:[new Ug(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}};p.push(g)}return i&&p.push(d),p.push(f),[new wg(this.model,this.services),new Jg(this.model,this.services,p,{direction:C.COLUMN})]},e}(Kv),Qv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(aa.clone(no.areaChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dv(this.model,this.services),new Fv(this.model,this.services),new Yv(this.model,this.services),new Dg(this.model,this.services),new Eg(this.model,this.services),new Cg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0})];return this.getAxisChartComponents(t)},e}($v),Jv=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(no.stackedAreaChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dv(this.model,this.services),new Fv(this.model,this.services),new Yv(this.model,this.services),new Sg(this.model,this.services),new Dg(this.model,this.services,{stacked:!0}),new kg(this.model,this.services,{fadeInOnChartHolderMouseover:!0,handleThresholds:!0,stacked:!0})];return this.getAxisChartComponents(t)},e}($v),tm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(no.simpleBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dv(this.model,this.services),new Fv(this.model,this.services),new Tg(this.model,this.services),new Xv(this.model,this.services),new Vg(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}($v),em=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(no.groupedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dv(this.model,this.services),new Fv(this.model,this.services),new Mg(this.model,this.services),new Xv(this.model,this.services),new Vg(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}($v),nm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(no.stackedBarChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dv(this.model,this.services),new Fv(this.model,this.services),new qv(this.model,this.services),new Ag(this.model,this.services),new Vg(this.model,this.services,{skeleton:k.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)},e}($v),rm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(no.bubbleChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dv(this.model,this.services),new Fv(this.model,this.services),new Yv(this.model,this.services),new Pg(this.model,this.services),new Vg(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}($v),im=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(no.lineChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dv(this.model,this.services),new Fv(this.model,this.services),new Yv(this.model,this.services),new Dg(this.model,this.services),new Cg(this.model,this.services,{handleThresholds:!0}),new Vg(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}($v),am=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(no.scatterChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new dv(this.model,this.services),new Fv(this.model,this.services),new Yv(this.model,this.services),new Cg(this.model,this.services),new Vg(this.model,this.services,{skeleton:k.GRID})];return this.getAxisChartComponents(t)},e}($v),om=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}(qh),sm=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return i.model=new om(i.services),r?i:(i.model.setOptions(aa.mergeDefaultChartOptions(no.pieChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new Rg(this.model,this.services),new Vg(this.model,this.services,{skeleton:k.PIE})];return this.getChartComponents(t)},e}(Kv),um=function(t){function e(e,n){var r=t.call(this,e,n,!0)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(no.donutChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ng(this.model,this.services),new Vg(this.model,this.services,{skeleton:k.DONUT})];return this.getChartComponents(t)},e}(sm),cm=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]=Aa.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=aa.getProperty(n,"color","scale"),i=this.getStatus();return r||!i?t.prototype.getFillColor.call(this,e):null},e.prototype.getStatus=function(){var t=this.getOptions(),e=this.getDisplayData().value,n=e>100?100:e,r=aa.getProperty(t,"meter","status","ranges");if(r){var i=r.filter((function(t){return t.range[0]<=n&&n<=t.range[1]}));if(i.length>0)return i[0].status}return null},e}(qh),lm=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){void 0===t&&(t=!0);var e=this,n=this.getContainerSVG(),i=this.model.getOptions(),a=this.model.getDisplayData(),o=this.model.getStatus(),s=_f.getSVGElementSize(this.parent,{useAttrs:!0}).width,u=i.data.groupMapsTo,c=wu().domain([0,100]).range([0,s]);_f.appendOrSelect(n,"rect.container").attr("x",0).attr("y",0).attr("width",s).attr("height",aa.getProperty(i,"meter","height"));var l=a.value>=100,h=n.selectAll("rect.value").data([a]),f=aa.getProperty(i,"color","scale");h.enter().append("rect").classed("value",!0).merge(h).attr("x",0).attr("y",0).attr("height",aa.getProperty(i,"meter","height")).attr("class",null==o||f?"":"value status--"+o).transition(this.services.transitions.getTransition("meter-bar-update",t)).attr("width",(function(t){return c(l?100:t.value)})).attr("fill",(function(t){return e.model.getFillColor(t[u])})).attr("role",r.GRAPHICS_SYMBOL).attr("aria-roledescription","value").attr("aria-label",(function(t){return t.value}));var d=aa.getProperty(i,"meter","peak"),p=null!==d&&d<a.value?a.value:d,g=null===p||l?[]:[p],v=n.selectAll("line.peak").data(g);v.enter().append("line").classed("peak",!0).merge(v).attr("y1",0).attr("y2",aa.getProperty(i,"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})),v.exit().remove(),this.services.domUtils.setSVGMaxHeight()},e}(ag),hm=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model=new cm(r.services),r.model.setOptions(aa.merge(aa.clone(no.meterChart),n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t={id:"meter-graph",components:[new lm(this.model,this.services)],growth:{x:P.STRETCH,y:P.FIXED}},e={id:"title",components:[new bg(this.model,this.services)],growth:{x:P.PREFERRED,y:P.FIXED}},n={id:"spacer",components:[new Ug(this.model,this.services,{size:8})],growth:{x:P.PREFERRED,y:P.FIXED}},r=[new Jg(this.model,this.services,[e,n,t],{direction:C.COLUMN})];return this.getChartComponents(r)},e}(Kv);function fm(t){var e,n=(pm(t)%(e=360)+e)%e;return dm(n,[0,10])||dm(n,[350,0])?{textAnchor:L.START,dominantBaseline:R.MIDDLE}:dm(n,[10,80])?{textAnchor:L.START,dominantBaseline:R.HANGING}:dm(n,[80,100])?{textAnchor:L.MIDDLE,dominantBaseline:R.HANGING}:dm(n,[100,170])?{textAnchor:L.END,dominantBaseline:R.HANGING}:dm(n,[170,190])?{textAnchor:L.END,dominantBaseline:R.MIDDLE}:dm(n,[190,260])?{textAnchor:L.END,dominantBaseline:R.BASELINE}:dm(n,[260,280])?{textAnchor:L.MIDDLE,dominantBaseline:R.BASELINE}:{textAnchor:L.START,dominantBaseline:R.BASELINE}}function dm(t,e){var n=e[0],r=e[1];return t>=n&&t<=r}function pm(t){return t*(180/Math.PI)}function gm(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 vm=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.type="radar",e.getLabelDimensions=function(t){var n=_f.appendOrSelect(e.getContainerSVG(),"g.tmp-tick"),r=_f.appendOrSelect(n,"text").text(t),i=_f.getSVGElementSize(r.node(),{useBBox:!0}),a=i.width,o=i.height;return n.remove(),{width:a,height:o}},e.normalizeFlatData=function(t){var n=e.model.getOptions(),r=aa.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=aa.getProperty(n,"data","groupMapsTo"),s=aa.flatMapDeep(e.uniqueKeys.map((function(t){return e.uniqueGroups.map((function(e){var n;return(n={})[i]=t,n[o]=e,n[a]=null,n}))})));return aa.merge(s,t)},e.normalizeGroupedData=function(t){var n=e.model.getOptions(),r=aa.getProperty(n,"radar","axes"),i=r.angle,a=r.value,o=aa.getProperty(n,"data","groupMapsTo");return t.map((function(t){var n=t.name,r=t.data,s=e.uniqueKeys.map((function(t){var e;return(e={})[o]=n,e[i]=t,e[a]=null,e}));return{name:n,data:aa.merge(s,r)}}))},e.handleLegendOnHover=function(t){var n=t.detail.hoveredElement;e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-hover-blob")).style("fill-opacity",(function(t){return t.name!==n.datum().name?ka.opacity.unselected:ka.opacity.selected}))},e.handleLegendMouseOut=function(t){var n=aa.getProperty(e.model.getOptions(),"radar","opacity");e.parent.selectAll("g.blobs path").transition(e.services.transitions.getTransition("legend-mouseout-blob")).style("fill-opacity",aa.getProperty(n,"selected"))},e}return n(e,t),e.prototype.init=function(){var t=this.services.events;t.addEventListener(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.render=function(t){var e=this;void 0===t&&(t=!0);var n=this.getContainerSVG(),i=_f.getSVGElementSize(this.parent,{useAttrs:!0}),a=i.width,o=i.height,s=this.model.getData(),u=this.model.getDisplayData(),c=this.model.getGroupedData(),l=this.model.getOptions(),h=aa.getProperty(l,"radar","axes"),f=h.angle,d=h.value,p=aa.getProperty(l,"data","groupMapsTo"),g=ka.xLabelPadding,v=ka.yLabelPadding,m=ka.yTicksNumber,y=ka.minRange,_=ka.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(c);var b=2*(this.getLabelDimensions(this.uniqueKeys[0]).height+v),x=(Math.min(a,o)-b)/2;if(!(x<=0)){var w=Zo().domain(this.displayDataNormalized.map((function(t){return t[f]}))).range([0,2*Math.PI].map((function(t){return t-Math.PI/2}))),E=wu().domain([0,jo(this.displayDataNormalized.map((function(t){return t[d]})))]).range([y,x]).nice(m),S=E.ticks(m),O=function(t){return e.model.getFillColor(t)},T=th().angle((function(t){return w(t[f])+Math.PI/2})).radius((function(t){return E(t[d])})).curve(Mh),M=th().angle(T.angle()).radius((function(t){return Wv?Wv(t[d]):y})).curve(T.curve()),A={x:jo(this.uniqueKeys.map((function(t){var n;return e.getLabelDimensions(t).width+(n=w(t),x*Math.sin(n-Math.PI/2))})))+g,y:o/2},C=_f.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}))};C.join((function(n){return n.append("path").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+A.x+", "+A.y+")").attr("fill","none").attr("d",(function(t){return M(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 T(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("+A.x+", "+A.y+")").attr("d",(function(t){return T(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 T(P(t))})).attr("opacity",0).remove()}))})),_f.appendOrSelect(n,"g.x-axes").attr("role",r.GROUP).selectAll("line").data(this.uniqueKeys,(function(t){return t})).join((function(n){return n.append("line").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("class",(function(t){return"x-axis-"+aa.kebabCase(t)})).attr("stroke-dasharray","0").attr("x1",(function(t){return gm(w(t),0,A).x})).attr("y1",(function(t){return gm(w(t),0,A).y})).attr("x2",(function(t){return gm(w(t),0,A).x})).attr("y2",(function(t){return gm(w(t),0,A).y})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_enter",t)).attr("opacity",1).attr("x1",(function(t){return gm(w(t),E.range()[0],A).x})).attr("y1",(function(t){return gm(w(t),E.range()[0],A).y})).attr("x2",(function(t){return gm(w(t),E.range()[1],A).x})).attr("y2",(function(t){return gm(w(t),E.range()[1],A).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 gm(w(t),E.range()[0],A).x})).attr("y1",(function(t){return gm(w(t),E.range()[0],A).y})).attr("x2",(function(t){return gm(w(t),E.range()[1],A).x})).attr("y2",(function(t){return gm(w(t),E.range()[1],A).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_axes_exit",t)).attr("opacity",0).remove()}))})),_f.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 gm(w(t),E.range()[1]+g,A).x})).attr("y",(function(t){return gm(w(t),E.range()[1]+g,A).y})).style("text-anchor",(function(t){return fm(w(t)).textAnchor})).style("dominant-baseline",(function(t){return fm(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 gm(w(t),E.range()[1]+g,A).x})).attr("y",(function(t){return gm(w(t),E.range()[1]+g,A).y}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_x_labels_exit",t)).attr("opacity",0).remove()}))})),_f.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","blob").attr("role",r.GRAPHICS_SYMBOL).attr("opacity",0).attr("transform","translate("+A.x+", "+A.y+")").attr("fill",(function(t){return O(t.name)})).style("fill-opacity",ka.opacity.selected).attr("stroke",(function(t){return O(t.name)})).attr("d",(function(t){return M(t.data)})).call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_enter",t)).attr("opacity",1).attr("d",(function(t){return T(t.data)}))}))}),(function(n){return n.call((function(n){return n.transition(e.services.transitions.getTransition("radar_blobs_update",t)).attr("opacity",1).attr("transform","translate("+A.x+", "+A.y+")").attr("d",(function(t){return T(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 T(t.data)})).attr("opacity",0).remove()}))})),_f.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 aa.kebabCase(t[f])})).attr("cx",(function(t){return gm(w(t[f]),E(t[d]),A).x})).attr("cy",(function(t){return gm(w(t[f]),E(t[d]),A).y})).attr("r",0).attr("opacity",0).attr("fill",(function(t){return O(t[p])})),_f.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",A.x).attr("y",A.y-_/2).attr("width",E.range()[1]).attr("height",_).attr("fill","red").style("fill-opacity",0).attr("transform",(function(t){return"rotate("+pm(w(t))+", "+A.x+", "+A.y+")"})),_f.appendOrSelect(n,"g.y-labels").attr("role",r.GROUP).selectAll("text").data(Ro(S)).join((function(n){return n.append("text").attr("opacity",0).text((function(t){return t})).attr("x",(function(t){return gm(-Math.PI/2,E(t),A).x+v})).attr("y",(function(t){return gm(-Math.PI/2,E(t),A).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 gm(-Math.PI/2,E(t),A).x+v})).attr("y",(function(t){return gm(-Math.PI/2,E(t),A).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 D=aa.getProperty(l,"radar","alignment"),k=_f.getAlignmentOffset(D,n,this.getParent());n.attr("transform","translate("+k+", 0)"),this.addEventListeners(),Wv=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(G.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(G.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)},e.prototype.addEventListeners=function(){var t=this,e=aa.getProperty(this.model.getOptions(),"radar").axes.angle;this.parent.selectAll(".x-axes-rect > rect").on("mouseover",(function(n){var r=ca(this);t.services.events.dispatchEvent(G.Radar.X_AXIS_MOUSEOVER,{element:r,datum:n});var i=t.parent.select(".x-axes .x-axis-"+aa.kebabCase(n)),a=t.parent.selectAll(".dots circle."+aa.kebabCase(n));i.classed("hovered",!0).attr("stroke-dasharray","4 4"),a.classed("hovered",!0).attr("opacity",1).attr("r",ka.dotsRadius);var o=t.displayDataNormalized.filter((function(t){return t[e]===n})),s=t.model.getOptions(),u=s.data.groupMapsTo,c=aa.getProperty(s,"radar","axes","value");t.services.events.dispatchEvent(G.Tooltip.SHOW,{hoveredElement:r,items:o.filter((function(t){return"number"==typeof t[c]})).map((function(e){return{label:e[u],value:e[c],color:t.model.getStrokeColor(e[u])}}))})})).on("mousemove",(function(e){var n=ca(this);t.services.events.dispatchEvent(G.Radar.X_AXIS_MOUSEMOVE,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.MOVE)})).on("click",(function(e){t.services.events.dispatchEvent(G.Radar.X_AXIS_CLICK,{element:ca(this),datum:e})})).on("mouseout",(function(e){var n=ca(this),r=t.parent.select(".x-axes .x-axis-"+aa.kebabCase(e)),i=t.parent.selectAll(".dots circle."+aa.kebabCase(e));r.classed("hovered",!1).attr("stroke-dasharray","0"),i.classed("hovered",!1).attr("opacity",0).attr("r",0),t.services.events.dispatchEvent(G.Radar.X_AXIS_MOUSEOUT,{element:n,datum:e}),t.services.events.dispatchEvent(G.Tooltip.HIDE)}))},e}(ag),mm=function(t){function e(e,n,r){void 0===r&&(r=!1);var i=t.call(this,e,n)||this;return r?i:(i.model.setOptions(aa.mergeDefaultChartOptions(no.radarChart,n.options)),i.init(e,n),i)}return n(e,t),e.prototype.getComponents=function(){var t=[new vm(this.model,this.services)];return this.getChartComponents(t)},e}(Kv),ym=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.model.setOptions(aa.mergeDefaultChartOptions(no.gaugeChart,n.options)),r.init(e,n),r}return n(e,t),e.prototype.getComponents=function(){var t=[new Ig(this.model,this.services)];return this.getChartComponents(t)},e}(Kv),_m=Oo;t.AreaChart=Qv,t.BubbleChart=rm,t.DonutChart=um,t.GaugeChart=ym,t.GroupedBarChart=em,t.LineChart=im,t.MeterChart=hm,t.PieChart=sm,t.RadarChart=mm,t.ScatterChart=am,t.SimpleBarChart=tm,t.StackedAreaChart=Jv,t.StackedBarChart=nm,t.colorPalettes=To,t.configurations=ro,t.defaultColors=_m,t.interfaces=B,Object.defineProperty(t,"__esModule",{value:!0})}));