From 45965dd8250ad21eb5a9a1fda02d6403dee7f2fc Mon Sep 17 00:00:00 2001 From: rozetko Date: Fri, 18 Mar 2022 21:47:35 +0400 Subject: [PATCH] upd core --- dist/index.d.ts | 1 + dist/index.js | 2 +- package-lock.json | 6 +++--- package.json | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/dist/index.d.ts b/dist/index.d.ts index 0c45277..6f81904 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -89,6 +89,7 @@ export declare const VueChartwerkLinePod: { panning(range: any): void; contextMenu(evt: any): void; sharedCrosshairMove(event: any): void; + renderStart(): void; renderEnd(): void; }; }[]; diff --git a/dist/index.js b/dist/index.js index 43fdffa..19c40ef 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1,4 +1,4 @@ -!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e=n();for(var r in e)("object"==typeof exports?exports:t)[r]=e[r]}}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=4)}([function(t,n,e){window,t.exports=function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=214)}([function(t,n){var e=Array.isArray;t.exports=e},function(t,n,e){var r=e(93),i=e(54);t.exports=function(t,n){return null!=t&&i(t,n,r)}},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(56),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,n,e){var r=e(29),i=e(78),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,n,e){var r=e(12),i=e(95),o=e(96),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?i(t):o(t)}},function(t,n,e){var r=e(103),i=e(106);t.exports=function(t,n){var e=i(t,n);return r(e)?e:void 0}},function(t,n,e){var r=e(34),i=e(38);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,n,e){var r=e(122);t.exports=function(t){return r(t,5)}},function(t,n,e){var r=e(29),i=e(73),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(3).Symbol;t.exports=r},function(t,n,e){var r=e(62),i=e(133),o=e(9);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,n){t.exports=function(t){return t}},function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n,e){var r=e(60),i=e(39);t.exports=function(t,n,e,o){var u=!e;e||(e={});for(var a=-1,c=n.length;++a-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}},function(t,n,e){var r=e(61);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){var r=e(132),i=e(27),o=e(42),u=o&&o.isTypedArray,a=u?i(u):r;t.exports=a},function(t,n,e){(function(t){var r=e(56),i=n&&!n.nodeType&&n,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=a}).call(this,e(40)(t))},function(t,n){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},function(t,n,e){var r=e(139),i=e(66),o=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols,a=u?function(t){return null==t?[]:(t=Object(t),r(u(t),(function(n){return o.call(t,n)})))}:i;t.exports=a},function(t,n){t.exports=function(t,n){for(var e=-1,r=n.length,i=t.length;++e1&&u(t,n[0],n[1])?n=[]:e>2&&u(n[0],n[1],n[2])&&(n=[n[0]]),i(t,r(n,1),[])}));t.exports=a},function(t,n){var e=Array.prototype.reverse;t.exports=function(t){return null==t?t:e.call(t)}},function(t,n,e){var r=e(55),i=e(23),o=e(0),u=e(37),a=e(38),c=e(24);t.exports=function(t,n,e){for(var f=-1,s=(n=r(n,t)).length,l=!1;++fs))return!1;var h=c.get(t),d=c.get(n);if(h&&d)return h==n&&d==t;var p=-1,v=!0,y=2&e?new r:void 0;for(c.set(t,n),c.set(n,t);++pn}},function(t,n,e){var r=e(182)();t.exports=r},function(t,n){t.exports=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}},function(t,n,e){var r=e(15),i=e(9),o=e(37),u=e(2);t.exports=function(t,n,e){if(!u(e))return!1;var a=typeof n;return!!("number"==a?i(e)&&o(n,e.length):"string"==a&&n in e)&&r(e[n],t)}},function(t,n,e){var r=e(25),i=e(83),o=e(79),u=e(193),a=e(2),c=e(17),f=e(84);t.exports=function t(n,e,s,l,h){n!==e&&o(e,(function(o,c){if(h||(h=new r),a(o))u(n,e,c,s,t,l,h);else{var d=l?l(f(n,c),o,c+"",n,e,h):void 0;void 0===d&&(d=o),i(n,c,d)}}),c)}},function(t,n,e){var r=e(39),i=e(15);t.exports=function(t,n,e){(void 0!==e&&!i(t[n],e)||void 0===e&&!(n in t))&&r(t,n,e)}},function(t,n){t.exports=function(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}},function(t,n,e){var r=e(2),i=e(6),o=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var e=a.test(t);return e||c.test(t)?f(t.slice(2),e?2:8):u.test(t)?NaN:+t}},function(t,n,e){var r=e(198),i=e(199);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[t.i,i,""]]);var o,u=0,a={injectType:"lazyStyleTag",insert:"head",singleton:!1},c={};c.locals=i.locals||{},c.use=function(){return u++||(o=r(i,a)),c},c.unuse=function(){u>0&&!--u&&(o(),o=null)},t.exports=c},function(t,n,e){var r=e(201),i=e(9),o=e(205),u=e(206),a=e(208),c=Math.max;t.exports=function(t,n,e,f){t=i(t)?t:a(t),e=e&&!f?u(e):0;var s=t.length;return e<0&&(e=c(s+e,0)),o(t)?e<=s&&t.indexOf(n,e)>-1:!!s&&r(t,n,e)>-1}},function(t,n,e){t.exports=e(210)},function(t,n){t.exports=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0}},function(t,n,e){var r=e(211)((function(t,n){return t+n}),0);t.exports=r},function(t,n,e){var r=e(58);t.exports=function(){var t=arguments,n=r(t[0]);return t.length<3?n:n.replace(t[1],t[2])}},function(t,n,e){var r=e(2),i=e(213),o=e(85),u=Math.max,a=Math.min;t.exports=function(t,n,e){var c,f,s,l,h,d,p=0,v=!1,y=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function _(n){var e=c,r=f;return c=f=void 0,p=n,l=t.apply(r,e)}function b(t){return p=t,h=setTimeout(x,n),v?_(t):l}function m(t){var e=t-d;return void 0===d||e>=n||e<0||y&&t-p>=s}function x(){var t=i();if(m(t))return w(t);h=setTimeout(x,function(t){var e=n-(t-d);return y?a(e,s-(t-p)):e}(t))}function w(t){return h=void 0,g&&c?_(t):(c=f=void 0,l)}function M(){var t=i(),e=m(t);if(c=arguments,f=this,d=t,e){if(void 0===h)return b(d);if(y)return clearTimeout(h),h=setTimeout(x,n),_(d)}return void 0===h&&(h=setTimeout(x,n)),l}return n=o(n)||0,r(e)&&(v=!!e.leading,s=(y="maxWait"in e)?u(o(e.maxWait)||0,n):s,g="trailing"in e?!!e.trailing:g),M.cancel=function(){void 0!==h&&clearTimeout(h),p=0,c=d=f=h=void 0},M.flush=function(){return void 0===h?l:w(i())},M}},function(t,n){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){var r=e(12),i=Object.prototype,o=i.hasOwnProperty,u=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var n=o.call(t,a),e=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=u.call(t);return r&&(n?t[a]=e:delete t[a]),i}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n,e){var r=e(98),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,u=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(i,(function(t,e,r,i){n.push(r?i.replace(o,"$1"):e||t)})),n}));t.exports=u},function(t,n,e){var r=e(99);t.exports=function(t){var n=r(t,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}},function(t,n,e){var r=e(33);function i(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(i.Cache||r),e}i.Cache=r,t.exports=i},function(t,n,e){var r=e(101),i=e(20),o=e(35);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,n,e){var r=e(102),i=e(107),o=e(108),u=e(109),a=e(110);function c(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1}},function(t,n,e){var r=e(21);t.exports=function(t,n){var e=this.__data__,i=r(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this}},function(t,n,e){var r=e(22);t.exports=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}},function(t,n){t.exports=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).get(t)}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).has(t)}},function(t,n,e){var r=e(22);t.exports=function(t,n){var e=r(this,t),i=e.size;return e.set(t,n),this.size+=e.size==i?0:1,this}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,n,e){var r=e(25),i=e(128),o=e(60),u=e(129),a=e(135),c=e(64),f=e(65),s=e(138),l=e(140),h=e(68),d=e(141),p=e(28),v=e(146),y=e(147),g=e(72),_=e(0),b=e(26),m=e(152),x=e(2),w=e(154),M=e(13),A=e(17),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,t.exports=function t(n,e,k,C,E,T){var O,N=1&e,j=2&e,R=4&e;if(k&&(O=E?k(n,C,E,T):k(n)),void 0!==O)return O;if(!x(n))return n;var z=_(n);if(z){if(O=v(n),!N)return f(n,O)}else{var P=p(n),L="[object Function]"==P||"[object GeneratorFunction]"==P;if(b(n))return c(n,N);if("[object Object]"==P||"[object Arguments]"==P||L&&!E){if(O=j||L?{}:g(n),!N)return j?l(n,a(O,n)):s(n,u(O,n))}else{if(!S[P])return E?n:{};O=y(n,P,N)}}T||(T=new r);var I=T.get(n);if(I)return I;T.set(n,O),w(n)?n.forEach((function(r){O.add(t(r,e,k,r,n,T))})):m(n)&&n.forEach((function(r,i){O.set(i,t(r,e,k,i,n,T))}));var D=z?void 0:(R?j?d:h:j?A:M)(n);return i(D||n,(function(r,i){D&&(r=n[i=r]),o(O,i,t(r,e,k,i,n,T))})),O}},function(t,n,e){var r=e(20);t.exports=function(){this.__data__=new r,this.size=0}},function(t,n){t.exports=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}},function(t,n){t.exports=function(t){return this.__data__.get(t)}},function(t,n){t.exports=function(t){return this.__data__.has(t)}},function(t,n,e){var r=e(20),i=e(35),o=e(33);t.exports=function(t,n){var e=this.__data__;if(e instanceof r){var u=e.__data__;if(!i||u.length<199)return u.push([t,n]),this.size=++e.size,this;e=this.__data__=new o(u)}return e.set(t,n),this.size=e.size,this}},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e0&&o(s)?e>1?t(s,e-1,o,u,a):r(a,s):u||(a[a.length]=s)}return a}},function(t,n,e){var r=e(12),i=e(23),o=e(0),u=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(u&&t&&t[u])}},function(t,n,e){var r=e(36),i=e(49),o=e(48),u=e(179),a=e(184),c=e(27),f=e(185),s=e(14),l=e(0);t.exports=function(t,n,e){n=n.length?r(n,(function(t){return l(t)?function(n){return i(n,1===t.length?t[0]:t)}:t})):[s];var h=-1;n=r(n,c(o));var d=u(t,(function(t,e,i){return{criteria:r(n,(function(n){return n(t)})),index:++h,value:t}}));return a(d,(function(t,n){return f(t,n,e)}))}},function(t,n,e){var r=e(180),i=e(9);t.exports=function(t,n){var e=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++e]=n(t,r,i)})),o}},function(t,n,e){var r=e(181),i=e(183)(r);t.exports=i},function(t,n,e){var r=e(79),i=e(13);t.exports=function(t,n){return t&&r(t,n,i)}},function(t,n){t.exports=function(t){return function(n,e,r){for(var i=-1,o=Object(n),u=r(n),a=u.length;a--;){var c=u[t?a:++i];if(!1===e(o[c],c,o))break}return n}}},function(t,n,e){var r=e(9);t.exports=function(t,n){return function(e,i){if(null==e)return e;if(!r(e))return t(e,i);for(var o=e.length,u=n?o:-1,a=Object(e);(n?u--:++u=c?f:f*("desc"==e[i]?-1:1)}return t.index-n.index}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(t!==n){var e=void 0!==t,i=null===t,o=t==t,u=r(t),a=void 0!==n,c=null===n,f=n==n,s=r(n);if(!c&&!s&&!u&&t>n||u&&a&&f&&!c&&!s||i&&a&&f||!e&&f||!o)return 1;if(!i&&!u&&!s&&t0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},function(t,n,e){var r=e(82),i=e(2);t.exports=function t(n,e,o,u,a,c){return i(n)&&i(e)&&(c.set(e,n),r(n,e,void 0,t,c),c.delete(e)),n}},function(t,n,e){var r=e(83),i=e(64),o=e(71),u=e(65),a=e(72),c=e(23),f=e(0),s=e(194),l=e(26),h=e(34),d=e(2),p=e(195),v=e(41),y=e(84),g=e(196);t.exports=function(t,n,e,_,b,m,x){var w=y(t,e),M=y(n,e),A=x.get(M);if(A)r(t,e,A);else{var S=m?m(w,M,e+"",t,n,x):void 0,k=void 0===S;if(k){var C=f(M),E=!C&&l(M),T=!C&&!E&&v(M);S=M,C||E||T?f(w)?S=w:s(w)?S=u(w):E?(k=!1,S=i(M,!0)):T?(k=!1,S=o(M,!0)):S=[]:p(M)||c(M)?(S=w,c(w)?S=g(w):d(w)&&!h(w)||(S=a(M))):k=!1}k&&(x.set(M,S),b(S,M,_,m,x),x.delete(M)),r(t,e,S)}}},function(t,n,e){var r=e(9),i=e(4);t.exports=function(t){return i(t)&&r(t)}},function(t,n,e){var r=e(7),i=e(46),o=e(4),u=Function.prototype,a=Object.prototype,c=u.toString,f=a.hasOwnProperty,s=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var n=i(t);if(null===n)return!0;var e=f.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&c.call(e)==s}},function(t,n,e){var r=e(16),i=e(17);t.exports=function(t){return r(t,i(t))}},function(t,n,e){var r=e(50),i=e(81);t.exports=function(t){return r((function(n,e){var r=-1,o=e.length,u=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(u=t.length>3&&"function"==typeof u?(o--,u):void 0,a&&i(e[0],e[1],a)&&(u=o<3?void 0:u,o=1),n=Object(n);++r0)for(var n=this.chartContainer.append("g").attr("class","legend-row"),e=function(e){if(Y()(r.seriesTargetsWithBounds,r.series[e].target))return"continue";var i=0;null!==n.selectAll("text").node()&&(i=n.node().getBBox().width+25);var o=!1!==r.series[e].visible;n.append("foreignObject").attr("x",i).attr("y",r.legendRowPositionY-12).attr("width",13).attr("height",15).html("
").on("click",(function(){void 0!==t.options.eventsCallbacks&&void 0!==t.options.eventsCallbacks.onLegendClick&&t.options.eventsCallbacks.onLegendClick(e)})),n.append("text").attr("x",i+20).attr("y",r.legendRowPositionY).attr("class","metric-legend-"+e).style("font-size","12px").style("fill",r.getSerieColor(e)).text(r.series[e].target).on("click",(function(){void 0!==t.options.eventsCallbacks&&void 0!==t.options.eventsCallbacks.onLegendLabelClick&&t.options.eventsCallbacks.onLegendLabelClick(e)}))},r=this,i=0;i0&&this.options.zoomEvents.scroll.pan.direction===c.FORWARD},t.prototype.disableScrollBackward=function(t){return t.sourceEvent.wheelDelta<0&&this.options.zoomEvents.scroll.pan.direction===c.BACKWARD},t.prototype.onPanning=function(){var t=this.d3.event;null!==t.sourceEvent&&void 0!==t.sourceEvent&&("wheel"===t.sourceEvent.type&&(this.disableScrollBackward(t)||this.disableScrollForward(t))||(this.rescaleMetricAndAxis(t),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.panning?this.options.eventsCallbacks.panning({ranges:[this.state.xValueRange,this.state.yValueRange,this.state.y1ValueRange],d3Event:t}):console.log("on panning, but there is no callback")))},t.prototype.rescaleMetricAndAxis=function(t){this.isPanning=!0,this.onMouseOut(),this.onPanningRescale(t),this.renderYAxis(),this.renderXAxis(),this.chartContainer.select(".metrics-rect").attr("transform","translate("+this.state.transform.x+","+this.state.transform.y+"), scale("+this.state.transform.k+")")},t.prototype.onPanningRescale=function(t){var n=t.sourceEvent.type,e=this.options.zoomEvents.scroll.pan,r=this.options.zoomEvents.scroll.zoom;if("wheel"!==n){var i=this.options.zoomEvents.mouse.pan.orientation;i!==u.HORIZONTAL&&i!==u.BOTH||this.rescaleAxisX(t.transform.x),i!==u.VERTICAL&&i!==u.BOTH||this.rescaleAxisY(t.transform.y)}else{if(!0===e.isActive&&this.isD3EventKeyEqualOption(t,e.keyEvent))return void this.onScrollPanningRescale(t);if(!0===r.isActive&&this.isD3EventKeyEqualOption(t,r.keyEvent)){var o=r.orientation,a=void 0;switch(o){case u.HORIZONTAL:a=t.transform.k+",1",this.rescaleAxisX(t.transform.x);break;case u.VERTICAL:a="1,"+t.transform.k,this.rescaleAxisY(t.transform.y);break;case u.BOTH:a=t.transform.k,this.rescaleAxisX(t.transform.x),this.rescaleAxisY(t.transform.y);break;default:throw new Error("Unknown type of PanOrientation: "+o)}return void(this.state.transform.k=a)}}},t.prototype.rescaleAxisX=function(t){this.state.transform={x:t};var n=this.d3.event.transform.rescaleX(this.initScaleX);this.xAxisElement.call(this.d3.axisBottom(this.xScale).scale(n)),this.state.xValueRange=[n.invert(0),n.invert(this.width)]},t.prototype.rescaleAxisY=function(t){this.state.transform={y:t};var n=this.d3.event.transform.rescaleY(this.initScaleY);if(this.yAxisElement.call(this.d3.axisLeft(this.yScale).scale(n)),this.state.yValueRange=[n.invert(0),n.invert(this.height)],this.y1AxisElement){var e=this.d3.event.transform.rescaleY(this.initScaleY1);this.y1AxisElement.call(this.d3.axisLeft(this.y1Scale).scale(e)),this.state.y1ValueRange=[e.invert(0),e.invert(this.height)],this.y1AxisElement.selectAll("line").attr("x2",2),this.y1AxisElement.selectAll("text").attr("x",5)}},t.prototype.onScrollPanningRescale=function(t){var n=this.options.zoomEvents.scroll.pan,e=n.panStep,r=n.orientation;switch(r){case a.HORIZONTAL:var i=Math.sign(t.transform.x),o=this.absXScale.invert(Math.abs(e)),u=this.state.xValueRange;this.state.xValueRange=[u[0]+i*o,u[1]+i*o];var c=this.state.transform.x+i*e;this.state.transform={x:c};break;case a.VERTICAL:var f=Math.sign(t.transform.y);!0===this.options.axis.y.invert&&(f=-f);var s=this.state.yValueRange,l=this.absYScale.invert(e);if(this.deltaYTransform=this.deltaYTransform+e,this.deltaYTransform>.9*this.height)return;this.state.yValueRange=[s[0]-f*l,s[1]-f*l];var h=this.state.transform.y+f*e;this.state.transform={y:h};break;default:throw new Error("Unknown type of scroll pan orientation: "+r)}},t.prototype.onPanningEnd=function(){this.isPanning=!1,this.deltaYTransform=0,this.onMouseOut(),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.panningEnd?this.options.eventsCallbacks.panningEnd([this.state.xValueRange,this.state.yValueRange,this.state.y1ValueRange]):console.log("on panning end, but there is no callback")},t.prototype.onBrush=function(){var t=this.d3.event.selection;if(this.options.zoomEvents.mouse.zoom.orientation===o.SQUARE&&null!==t){var n=this.getSelectionAttrs(t);void 0!==n&&this.chartContainer.select(".selection").attr("x",n.x).attr("y",n.y).attr("width",n.width).attr("height",n.height)}},t.prototype.getSelectionAttrs=function(t){if(null!==this.brushStartSelection&&null!=t){var n=this.brushStartSelection[0],e=this.brushStartSelection[1],r=t[0][0],i=t[1][0],o=t[0][1],u=i-r,a=t[1][1]-o,c=Math.min(u,a);return{x:r===n?n:n-c,y:o===e?e:e-c,width:c,height:c}}},t.prototype.onBrushStart=function(){this.isBrushing;var t=this.d3.event.selection;null!==t&&t.length>0&&(this.brushStartSelection=this.d3.event.selection[0]),this.onMouseOut()},t.prototype.onBrushEnd=function(){var t=this.d3.event.selection;if(this.isBrushing,!(null==t||t.length<2)){var n,e;switch(this.chartContainer.call(this.brush.move,null),this.options.zoomEvents.mouse.zoom.orientation){case o.HORIZONTAL:var r=this.xScale.invert(t[0]),i=this.xScale.invert(t[1]);if(Math.abs(i-r)0&&this.series[0].datapoints.length>1?this.series[0].datapoints[1][0]-this.series[0].datapoints[0][0]:void 0!==this.options.timeInterval&&void 0!==this.options.timeInterval.count?6e4*this.options.timeInterval.count:6e4},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xTickTransform",{get:function(){if(void 0===this.options.tickFormat||void 0===this.options.tickFormat.xTickOrientation)return"";switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:return"translate(-10px, 50px) rotate(-90deg)";case r.HORIZONTAL:return"";case r.DIAGONAL:return"translate(-30px, 30px) rotate(-45deg)";default:return""}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"extraMargin",{get:function(){var t={top:0,right:0,bottom:0,left:0};if(void 0!==this.options.tickFormat&&void 0!==this.options.tickFormat.xTickOrientation)switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:t.bottom+=80;break;case r.HORIZONTAL:break;case r.DIAGONAL:t.left+=15,t.bottom+=50,t.right+=10}return void 0!==this.options.labelFormat&&(void 0!==this.options.labelFormat.xAxis&&this.options.labelFormat.xAxis.length>0&&(t.bottom+=20),void 0!==this.options.labelFormat.yAxis&&this.options.labelFormat.yAxis.length>0&&(t.left+=20)),this.series.length>0&&(t.bottom+=25),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.d3Node.node().clientWidth-this.margin.left-this.margin.right},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.d3Node.node().clientHeight-this.margin.top-this.margin.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"legendRowPositionY",{get:function(){return this.height+this.margin.bottom-5},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){return void 0!==this.options.margin?this.options.margin:X()({},nt,this.extraMargin,Z.a)},enumerable:!1,configurable:!0}),t.prototype.formattedBound=function(t,n){return Q()(t,"$__metric_name",n)},t.prototype.clearState=function(){this.state.clearState()},t.prototype.getSerieColor=function(t){if(void 0===this.series[t])throw new Error("Can't get color for unexisting serie: "+t+", there are only "+this.series.length+" series");var n=this.series[t].color;return void 0===n&&(n=B[t%B.length]),n},Object.defineProperty(t.prototype,"seriesTargetsWithBounds",{get:function(){var t=this;if(void 0===this.options.bounds||void 0===this.options.bounds.upper||void 0===this.options.bounds.lower)return[];var n=[];return this.series.forEach((function(e){n.push(t.formattedBound(t.options.bounds.upper,e.target)),n.push(t.formattedBound(t.options.bounds.lower,e.target))})),n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleSeries",{get:function(){return this.series.filter((function(t){return!1!==t.visible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rectClipId",{get:function(){return 0===this._clipPathUID.length&&(this._clipPathUID=Math.random().toString(36).substr(2,12)),this._clipPathUID},enumerable:!1,configurable:!0}),t.prototype.isOutOfChart=function(){var t=this.d3.mouse(this.chartContainer.node()),n=t[0],e=t[1];return e>this.height+1||e<-1||n>this.width||n<0},t}()}])},function(t,n,e){(function(t,r){var i; +!function(t,n){if("object"==typeof exports&&"object"==typeof module)module.exports=n();else if("function"==typeof define&&define.amd)define([],n);else{var e=n();for(var r in e)("object"==typeof exports?exports:t)[r]=e[r]}}(window,(function(){return function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=4)}([function(t,n,e){window,t.exports=function(t){var n={};function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:r})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(e.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var i in t)e.d(r,i,function(n){return t[n]}.bind(null,i));return r},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=214)}([function(t,n,e){var r=e(93),i=e(54);t.exports=function(t,n){return null!=t&&i(t,n,r)}},function(t,n){var e=Array.isArray;t.exports=e},function(t,n){t.exports=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}},function(t,n,e){var r=e(56),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,n){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,n,e){var r=e(29),i=e(78),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,n,e){var r=e(12),i=e(95),o=e(96),u=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":u&&u in Object(t)?i(t):o(t)}},function(t,n,e){var r=e(103),i=e(106);t.exports=function(t,n){var e=i(t,n);return r(e)?e:void 0}},function(t,n,e){var r=e(34),i=e(38);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,n,e){var r=e(122);t.exports=function(t){return r(t,5)}},function(t,n,e){var r=e(29),i=e(73),o=e(14);t.exports=function(t){return t&&t.length?r(t,o,i):void 0}},function(t,n,e){var r=e(3).Symbol;t.exports=r},function(t,n,e){var r=e(62),i=e(133),o=e(9);t.exports=function(t){return o(t)?r(t):i(t)}},function(t,n){t.exports=function(t){return t}},function(t,n){t.exports=function(t,n){return t===n||t!=t&&n!=n}},function(t,n,e){var r=e(60),i=e(39);t.exports=function(t,n,e,o){var u=!e;e||(e={});for(var a=-1,c=n.length;++a-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}},function(t,n,e){var r=e(61);t.exports=function(t,n,e){"__proto__"==n&&r?r(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}},function(t,n){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,n,e){var r=e(132),i=e(27),o=e(42),u=o&&o.isTypedArray,a=u?i(u):r;t.exports=a},function(t,n,e){(function(t){var r=e(56),i=n&&!n.nodeType&&n,o=i&&"object"==typeof t&&t&&!t.nodeType&&t,u=o&&o.exports===i&&r.process,a=function(){try{return o&&o.require&&o.require("util").types||u&&u.binding&&u.binding("util")}catch(t){}}();t.exports=a}).call(this,e(40)(t))},function(t,n){var e=Object.prototype;t.exports=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}},function(t,n,e){var r=e(139),i=e(66),o=Object.prototype.propertyIsEnumerable,u=Object.getOwnPropertySymbols,a=u?function(t){return null==t?[]:(t=Object(t),r(u(t),(function(n){return o.call(t,n)})))}:i;t.exports=a},function(t,n){t.exports=function(t,n){for(var e=-1,r=n.length,i=t.length;++e1&&u(t,n[0],n[1])?n=[]:e>2&&u(n[0],n[1],n[2])&&(n=[n[0]]),i(t,r(n,1),[])}));t.exports=a},function(t,n){var e=Array.prototype.reverse;t.exports=function(t){return null==t?t:e.call(t)}},function(t,n,e){var r=e(55),i=e(23),o=e(1),u=e(37),a=e(38),c=e(24);t.exports=function(t,n,e){for(var f=-1,s=(n=r(n,t)).length,l=!1;++fs))return!1;var h=c.get(t),d=c.get(n);if(h&&d)return h==n&&d==t;var p=-1,v=!0,y=2&e?new r:void 0;for(c.set(t,n),c.set(n,t);++pn}},function(t,n,e){var r=e(182)();t.exports=r},function(t,n){t.exports=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}},function(t,n,e){var r=e(15),i=e(9),o=e(37),u=e(2);t.exports=function(t,n,e){if(!u(e))return!1;var a=typeof n;return!!("number"==a?i(e)&&o(n,e.length):"string"==a&&n in e)&&r(e[n],t)}},function(t,n,e){var r=e(25),i=e(83),o=e(79),u=e(193),a=e(2),c=e(17),f=e(84);t.exports=function t(n,e,s,l,h){n!==e&&o(e,(function(o,c){if(h||(h=new r),a(o))u(n,e,c,s,t,l,h);else{var d=l?l(f(n,c),o,c+"",n,e,h):void 0;void 0===d&&(d=o),i(n,c,d)}}),c)}},function(t,n,e){var r=e(39),i=e(15);t.exports=function(t,n,e){(void 0!==e&&!i(t[n],e)||void 0===e&&!(n in t))&&r(t,n,e)}},function(t,n){t.exports=function(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}},function(t,n,e){var r=e(2),i=e(6),o=/^\s+|\s+$/g,u=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,c=/^0o[0-7]+$/i,f=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=r(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(o,"");var e=a.test(t);return e||c.test(t)?f(t.slice(2),e?2:8):u.test(t)?NaN:+t}},function(t,n,e){var r=e(198),i=e(199);"string"==typeof(i=i.__esModule?i.default:i)&&(i=[[t.i,i,""]]);var o,u=0,a={injectType:"lazyStyleTag",insert:"head",singleton:!1},c={};c.locals=i.locals||{},c.use=function(){return u++||(o=r(i,a)),c},c.unuse=function(){u>0&&!--u&&(o(),o=null)},t.exports=c},function(t,n,e){var r=e(201),i=e(9),o=e(205),u=e(206),a=e(208),c=Math.max;t.exports=function(t,n,e,f){t=i(t)?t:a(t),e=e&&!f?u(e):0;var s=t.length;return e<0&&(e=c(s+e,0)),o(t)?e<=s&&t.indexOf(n,e)>-1:!!s&&r(t,n,e)>-1}},function(t,n,e){t.exports=e(210)},function(t,n){t.exports=function(t){var n=null==t?0:t.length;return n?t[n-1]:void 0}},function(t,n,e){var r=e(211)((function(t,n){return t+n}),0);t.exports=r},function(t,n,e){var r=e(58);t.exports=function(){var t=arguments,n=r(t[0]);return t.length<3?n:n.replace(t[1],t[2])}},function(t,n,e){var r=e(2),i=e(213),o=e(85),u=Math.max,a=Math.min;t.exports=function(t,n,e){var c,f,s,l,h,d,p=0,v=!1,y=!1,g=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function _(n){var e=c,r=f;return c=f=void 0,p=n,l=t.apply(r,e)}function b(t){return p=t,h=setTimeout(x,n),v?_(t):l}function m(t){var e=t-d;return void 0===d||e>=n||e<0||y&&t-p>=s}function x(){var t=i();if(m(t))return w(t);h=setTimeout(x,function(t){var e=n-(t-d);return y?a(e,s-(t-p)):e}(t))}function w(t){return h=void 0,g&&c?_(t):(c=f=void 0,l)}function M(){var t=i(),e=m(t);if(c=arguments,f=this,d=t,e){if(void 0===h)return b(d);if(y)return clearTimeout(h),h=setTimeout(x,n),_(d)}return void 0===h&&(h=setTimeout(x,n)),l}return n=o(n)||0,r(e)&&(v=!!e.leading,s=(y="maxWait"in e)?u(o(e.maxWait)||0,n):s,g="trailing"in e?!!e.trailing:g),M.cancel=function(){void 0!==h&&clearTimeout(h),p=0,c=d=f=h=void 0},M.flush=function(){return void 0===h?l:w(i())},M}},function(t,n){var e=Object.prototype.hasOwnProperty;t.exports=function(t,n){return null!=t&&e.call(t,n)}},function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},function(t,n,e){var r=e(12),i=Object.prototype,o=i.hasOwnProperty,u=i.toString,a=r?r.toStringTag:void 0;t.exports=function(t){var n=o.call(t,a),e=t[a];try{t[a]=void 0;var r=!0}catch(t){}var i=u.call(t);return r&&(n?t[a]=e:delete t[a]),i}},function(t,n){var e=Object.prototype.toString;t.exports=function(t){return e.call(t)}},function(t,n,e){var r=e(98),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,u=r((function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(i,(function(t,e,r,i){n.push(r?i.replace(o,"$1"):e||t)})),n}));t.exports=u},function(t,n,e){var r=e(99);t.exports=function(t){var n=r(t,(function(t){return 500===e.size&&e.clear(),t})),e=n.cache;return n}},function(t,n,e){var r=e(33);function i(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new TypeError("Expected a function");var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var u=t.apply(this,r);return e.cache=o.set(i,u)||o,u};return e.cache=new(i.Cache||r),e}i.Cache=r,t.exports=i},function(t,n,e){var r=e(101),i=e(20),o=e(35);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(o||i),string:new r}}},function(t,n,e){var r=e(102),i=e(107),o=e(108),u=e(109),a=e(110);function c(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n-1}},function(t,n,e){var r=e(21);t.exports=function(t,n){var e=this.__data__,i=r(e,t);return i<0?(++this.size,e.push([t,n])):e[i][1]=n,this}},function(t,n,e){var r=e(22);t.exports=function(t){var n=r(this,t).delete(t);return this.size-=n?1:0,n}},function(t,n){t.exports=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).get(t)}},function(t,n,e){var r=e(22);t.exports=function(t){return r(this,t).has(t)}},function(t,n,e){var r=e(22);t.exports=function(t,n){var e=r(this,t),i=e.size;return e.set(t,n),this.size+=e.size==i?0:1,this}},function(t,n,e){var r=e(7),i=e(4);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,n,e){var r=e(25),i=e(128),o=e(60),u=e(129),a=e(135),c=e(64),f=e(65),s=e(138),l=e(140),h=e(68),d=e(141),p=e(28),v=e(146),y=e(147),g=e(72),_=e(1),b=e(26),m=e(152),x=e(2),w=e(154),M=e(13),A=e(17),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,t.exports=function t(n,e,k,C,E,T){var O,N=1&e,j=2&e,R=4&e;if(k&&(O=E?k(n,C,E,T):k(n)),void 0!==O)return O;if(!x(n))return n;var z=_(n);if(z){if(O=v(n),!N)return f(n,O)}else{var P=p(n),L="[object Function]"==P||"[object GeneratorFunction]"==P;if(b(n))return c(n,N);if("[object Object]"==P||"[object Arguments]"==P||L&&!E){if(O=j||L?{}:g(n),!N)return j?l(n,a(O,n)):s(n,u(O,n))}else{if(!S[P])return E?n:{};O=y(n,P,N)}}T||(T=new r);var I=T.get(n);if(I)return I;T.set(n,O),w(n)?n.forEach((function(r){O.add(t(r,e,k,r,n,T))})):m(n)&&n.forEach((function(r,i){O.set(i,t(r,e,k,i,n,T))}));var D=z?void 0:(R?j?d:h:j?A:M)(n);return i(D||n,(function(r,i){D&&(r=n[i=r]),o(O,i,t(r,e,k,i,n,T))})),O}},function(t,n,e){var r=e(20);t.exports=function(){this.__data__=new r,this.size=0}},function(t,n){t.exports=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}},function(t,n){t.exports=function(t){return this.__data__.get(t)}},function(t,n){t.exports=function(t){return this.__data__.has(t)}},function(t,n,e){var r=e(20),i=e(35),o=e(33);t.exports=function(t,n){var e=this.__data__;if(e instanceof r){var u=e.__data__;if(!i||u.length<199)return u.push([t,n]),this.size=++e.size,this;e=this.__data__=new o(u)}return e.set(t,n),this.size=e.size,this}},function(t,n){t.exports=function(t,n){for(var e=-1,r=null==t?0:t.length;++e0&&o(s)?e>1?t(s,e-1,o,u,a):r(a,s):u||(a[a.length]=s)}return a}},function(t,n,e){var r=e(12),i=e(23),o=e(1),u=r?r.isConcatSpreadable:void 0;t.exports=function(t){return o(t)||i(t)||!!(u&&t&&t[u])}},function(t,n,e){var r=e(36),i=e(49),o=e(48),u=e(179),a=e(184),c=e(27),f=e(185),s=e(14),l=e(1);t.exports=function(t,n,e){n=n.length?r(n,(function(t){return l(t)?function(n){return i(n,1===t.length?t[0]:t)}:t})):[s];var h=-1;n=r(n,c(o));var d=u(t,(function(t,e,i){return{criteria:r(n,(function(n){return n(t)})),index:++h,value:t}}));return a(d,(function(t,n){return f(t,n,e)}))}},function(t,n,e){var r=e(180),i=e(9);t.exports=function(t,n){var e=-1,o=i(t)?Array(t.length):[];return r(t,(function(t,r,i){o[++e]=n(t,r,i)})),o}},function(t,n,e){var r=e(181),i=e(183)(r);t.exports=i},function(t,n,e){var r=e(79),i=e(13);t.exports=function(t,n){return t&&r(t,n,i)}},function(t,n){t.exports=function(t){return function(n,e,r){for(var i=-1,o=Object(n),u=r(n),a=u.length;a--;){var c=u[t?a:++i];if(!1===e(o[c],c,o))break}return n}}},function(t,n,e){var r=e(9);t.exports=function(t,n){return function(e,i){if(null==e)return e;if(!r(e))return t(e,i);for(var o=e.length,u=n?o:-1,a=Object(e);(n?u--:++u=c?f:f*("desc"==e[i]?-1:1)}return t.index-n.index}},function(t,n,e){var r=e(6);t.exports=function(t,n){if(t!==n){var e=void 0!==t,i=null===t,o=t==t,u=r(t),a=void 0!==n,c=null===n,f=n==n,s=r(n);if(!c&&!s&&!u&&t>n||u&&a&&f&&!c&&!s||i&&a&&f||!e&&f||!o)return 1;if(!i&&!u&&!s&&t0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}}},function(t,n,e){var r=e(82),i=e(2);t.exports=function t(n,e,o,u,a,c){return i(n)&&i(e)&&(c.set(e,n),r(n,e,void 0,t,c),c.delete(e)),n}},function(t,n,e){var r=e(83),i=e(64),o=e(71),u=e(65),a=e(72),c=e(23),f=e(1),s=e(194),l=e(26),h=e(34),d=e(2),p=e(195),v=e(41),y=e(84),g=e(196);t.exports=function(t,n,e,_,b,m,x){var w=y(t,e),M=y(n,e),A=x.get(M);if(A)r(t,e,A);else{var S=m?m(w,M,e+"",t,n,x):void 0,k=void 0===S;if(k){var C=f(M),E=!C&&l(M),T=!C&&!E&&v(M);S=M,C||E||T?f(w)?S=w:s(w)?S=u(w):E?(k=!1,S=i(M,!0)):T?(k=!1,S=o(M,!0)):S=[]:p(M)||c(M)?(S=w,c(w)?S=g(w):d(w)&&!h(w)||(S=a(M))):k=!1}k&&(x.set(M,S),b(S,M,_,m,x),x.delete(M)),r(t,e,S)}}},function(t,n,e){var r=e(9),i=e(4);t.exports=function(t){return i(t)&&r(t)}},function(t,n,e){var r=e(7),i=e(46),o=e(4),u=Function.prototype,a=Object.prototype,c=u.toString,f=a.hasOwnProperty,s=c.call(Object);t.exports=function(t){if(!o(t)||"[object Object]"!=r(t))return!1;var n=i(t);if(null===n)return!0;var e=f.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&c.call(e)==s}},function(t,n,e){var r=e(16),i=e(17);t.exports=function(t){return r(t,i(t))}},function(t,n,e){var r=e(50),i=e(81);t.exports=function(t){return r((function(n,e){var r=-1,o=e.length,u=o>1?e[o-1]:void 0,a=o>2?e[2]:void 0;for(u=t.length>3&&"function"==typeof u?(o--,u):void 0,a&&i(e[0],e[1],a)&&(u=o<3?void 0:u,o=1),n=Object(n);++r0)for(var n=this.chartContainer.append("g").attr("class","legend-row"),e=function(e){if(Y()(r.seriesTargetsWithBounds,r.series[e].target))return"continue";var i=0;null!==n.selectAll("text").node()&&(i=n.node().getBBox().width+25);var o=!1!==r.series[e].visible;n.append("foreignObject").attr("x",i).attr("y",r.legendRowPositionY-12).attr("width",13).attr("height",15).html("
").on("click",(function(){void 0!==t.options.eventsCallbacks&&void 0!==t.options.eventsCallbacks.onLegendClick&&t.options.eventsCallbacks.onLegendClick(e)})),n.append("text").attr("x",i+20).attr("y",r.legendRowPositionY).attr("class","metric-legend-"+e).style("font-size","12px").style("fill",r.getSerieColor(e)).text(r.series[e].target).on("click",(function(){void 0!==t.options.eventsCallbacks&&void 0!==t.options.eventsCallbacks.onLegendLabelClick&&t.options.eventsCallbacks.onLegendLabelClick(e)}))},r=this,i=0;i0&&this.options.zoomEvents.scroll.pan.direction===c.FORWARD},t.prototype.disableScrollBackward=function(t){return t.sourceEvent.wheelDelta<0&&this.options.zoomEvents.scroll.pan.direction===c.BACKWARD},t.prototype.onPanning=function(){var t=this.d3.event;null!==t.sourceEvent&&void 0!==t.sourceEvent&&("wheel"===t.sourceEvent.type&&(this.disableScrollBackward(t)||this.disableScrollForward(t))||(this.rescaleMetricAndAxis(t),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.panning?this.options.eventsCallbacks.panning({ranges:[this.state.xValueRange,this.state.yValueRange,this.state.y1ValueRange],d3Event:t}):console.log("on panning, but there is no callback")))},t.prototype.rescaleMetricAndAxis=function(t){this.isPanning=!0,this.onMouseOut(),this.onPanningRescale(t),this.renderYAxis(),this.renderXAxis(),this.chartContainer.select(".metrics-rect").attr("transform","translate("+this.state.transform.x+","+this.state.transform.y+"), scale("+this.state.transform.k+")")},t.prototype.onPanningRescale=function(t){var n=t.sourceEvent.type,e=this.options.zoomEvents.scroll.pan,r=this.options.zoomEvents.scroll.zoom;if("wheel"!==n){var i=this.options.zoomEvents.mouse.pan.orientation;i!==u.HORIZONTAL&&i!==u.BOTH||this.rescaleAxisX(t.transform.x),i!==u.VERTICAL&&i!==u.BOTH||this.rescaleAxisY(t.transform.y)}else{if(!0===e.isActive&&this.isD3EventKeyEqualOption(t,e.keyEvent))return void this.onScrollPanningRescale(t);if(!0===r.isActive&&this.isD3EventKeyEqualOption(t,r.keyEvent)){var o=r.orientation,a=void 0;switch(o){case u.HORIZONTAL:a=t.transform.k+",1",this.rescaleAxisX(t.transform.x);break;case u.VERTICAL:a="1,"+t.transform.k,this.rescaleAxisY(t.transform.y);break;case u.BOTH:a=t.transform.k,this.rescaleAxisX(t.transform.x),this.rescaleAxisY(t.transform.y);break;default:throw new Error("Unknown type of PanOrientation: "+o)}return void(this.state.transform.k=a)}}},t.prototype.rescaleAxisX=function(t){this.state.transform={x:t};var n=this.d3.event.transform.rescaleX(this.initScaleX);this.xAxisElement.call(this.d3.axisBottom(this.xScale).scale(n)),this.state.xValueRange=[n.invert(0),n.invert(this.width)]},t.prototype.rescaleAxisY=function(t){this.state.transform={y:t};var n=this.d3.event.transform.rescaleY(this.initScaleY);if(this.yAxisElement.call(this.d3.axisLeft(this.yScale).scale(n)),this.state.yValueRange=[n.invert(0),n.invert(this.height)],this.y1AxisElement){var e=this.d3.event.transform.rescaleY(this.initScaleY1);this.y1AxisElement.call(this.d3.axisLeft(this.y1Scale).scale(e)),this.state.y1ValueRange=[e.invert(0),e.invert(this.height)],this.y1AxisElement.selectAll("line").attr("x2",2),this.y1AxisElement.selectAll("text").attr("x",5)}},t.prototype.onScrollPanningRescale=function(t){var n=this.options.zoomEvents.scroll.pan,e=n.panStep,r=n.orientation;switch(r){case a.HORIZONTAL:var i=Math.sign(t.transform.x),o=this.absXScale.invert(Math.abs(e)),u=this.state.xValueRange;this.state.xValueRange=[u[0]+i*o,u[1]+i*o];var c=this.state.transform.x+i*e;this.state.transform={x:c};break;case a.VERTICAL:var f=Math.sign(t.transform.y);!0===this.options.axis.y.invert&&(f=-f);var s=this.state.yValueRange,l=this.absYScale.invert(e);if(this.deltaYTransform=this.deltaYTransform+e,this.deltaYTransform>.9*this.height)return;this.state.yValueRange=[s[0]-f*l,s[1]-f*l];var h=this.state.transform.y+f*e;this.state.transform={y:h};break;default:throw new Error("Unknown type of scroll pan orientation: "+r)}},t.prototype.onPanningEnd=function(){this.isPanning=!1,this.deltaYTransform=0,this.onMouseOut(),void 0!==this.options.eventsCallbacks&&void 0!==this.options.eventsCallbacks.panningEnd?this.options.eventsCallbacks.panningEnd([this.state.xValueRange,this.state.yValueRange,this.state.y1ValueRange]):console.log("on panning end, but there is no callback")},t.prototype.onBrush=function(){var t=this.d3.event.selection;if(this.options.zoomEvents.mouse.zoom.orientation===o.SQUARE&&null!==t){var n=this.getSelectionAttrs(t);void 0!==n&&this.chartContainer.select(".selection").attr("x",n.x).attr("y",n.y).attr("width",n.width).attr("height",n.height)}},t.prototype.getSelectionAttrs=function(t){if(null!==this.brushStartSelection&&null!=t){var n=this.brushStartSelection[0],e=this.brushStartSelection[1],r=t[0][0],i=t[1][0],o=t[0][1],u=i-r,a=t[1][1]-o,c=Math.min(u,a);return{x:r===n?n:n-c,y:o===e?e:e-c,width:c,height:c}}},t.prototype.onBrushStart=function(){this.isBrushing;var t=this.d3.event.selection;null!==t&&t.length>0&&(this.brushStartSelection=this.d3.event.selection[0]),this.onMouseOut()},t.prototype.onBrushEnd=function(){var t=this.d3.event.selection;if(this.isBrushing,!(null==t||t.length<2)){var n,e;switch(this.chartContainer.call(this.brush.move,null),this.options.zoomEvents.mouse.zoom.orientation){case o.HORIZONTAL:var r=this.xScale.invert(t[0]),i=this.xScale.invert(t[1]);if(Math.abs(i-r)0&&this.series[0].datapoints.length>1?this.series[0].datapoints[1][0]-this.series[0].datapoints[0][0]:void 0!==this.options.timeInterval&&void 0!==this.options.timeInterval.count?6e4*this.options.timeInterval.count:6e4},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"xTickTransform",{get:function(){if(void 0===this.options.tickFormat||void 0===this.options.tickFormat.xTickOrientation)return"";switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:return"translate(-10px, 50px) rotate(-90deg)";case r.HORIZONTAL:return"";case r.DIAGONAL:return"translate(-30px, 30px) rotate(-45deg)";default:return""}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"extraMargin",{get:function(){var t={top:0,right:0,bottom:0,left:0};if(void 0!==this.options.tickFormat&&void 0!==this.options.tickFormat.xTickOrientation)switch(this.options.tickFormat.xTickOrientation){case r.VERTICAL:t.bottom+=80;break;case r.HORIZONTAL:break;case r.DIAGONAL:t.left+=15,t.bottom+=50,t.right+=10}return void 0!==this.options.labelFormat&&(void 0!==this.options.labelFormat.xAxis&&this.options.labelFormat.xAxis.length>0&&(t.bottom+=20),void 0!==this.options.labelFormat.yAxis&&this.options.labelFormat.yAxis.length>0&&(t.left+=20)),this.series.length>0&&(t.bottom+=25),t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"width",{get:function(){return this.d3Node.node().clientWidth-this.margin.left-this.margin.right},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.d3Node.node().clientHeight-this.margin.top-this.margin.bottom},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"legendRowPositionY",{get:function(){return this.height+this.margin.bottom-5},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"margin",{get:function(){return void 0!==this.options.margin?this.options.margin:X()({},nt,this.extraMargin,Z.a)},enumerable:!1,configurable:!0}),t.prototype.formattedBound=function(t,n){return Q()(t,"$__metric_name",n)},t.prototype.clearState=function(){this.state.clearState()},t.prototype.getSerieColor=function(t){if(void 0===this.series[t])throw new Error("Can't get color for unexisting serie: "+t+", there are only "+this.series.length+" series");var n=this.series[t].color;return void 0===n&&(n=B[t%B.length]),n},Object.defineProperty(t.prototype,"seriesTargetsWithBounds",{get:function(){var t=this;if(void 0===this.options.bounds||void 0===this.options.bounds.upper||void 0===this.options.bounds.lower)return[];var n=[];return this.series.forEach((function(e){n.push(t.formattedBound(t.options.bounds.upper,e.target)),n.push(t.formattedBound(t.options.bounds.lower,e.target))})),n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visibleSeries",{get:function(){return this.series.filter((function(t){return!1!==t.visible}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rectClipId",{get:function(){return 0===this._clipPathUID.length&&(this._clipPathUID=Math.random().toString(36).substr(2,12)),this._clipPathUID},enumerable:!1,configurable:!0}),t.prototype.isOutOfChart=function(){var t=this.d3.mouse(this.chartContainer.node()),n=t[0],e=t[1];return e>this.height+1||e<-1||n>this.width||n<0},t}()}])},function(t,n,e){(function(t,r){var i; /** * @license * Lodash diff --git a/package-lock.json b/package-lock.json index 3c5e519..ffd391c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,9 +5,9 @@ "requires": true, "dependencies": { "@chartwerk/core": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/@chartwerk/core/-/core-0.3.9.tgz", - "integrity": "sha512-87zqRVnl3avQHkGc/b5FjOP/FGXdZiXwJdZK79xx7fq1P7XleAzdq5ca7dZ8u7rHBDtP4KcOwK0DptzvY5JMHg==" + "version": "0.3.10", + "resolved": "https://registry.npmjs.org/@chartwerk/core/-/core-0.3.10.tgz", + "integrity": "sha512-oYaAQ/GNGUPI7B2JpRIwIQ+ShlRQisz3AVH/T7Nelq0DnTvRB8NYCXXOOtJqgBB0IVKiYYkZr7HqDzNpYP38PA==" }, "@types/d3": { "version": "5.16.4", diff --git a/package.json b/package.json index 5631a2b..cb388d6 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ "author": "CorpGlory", "license": "ISC", "dependencies": { - "@chartwerk/core": "^0.3.9" + "@chartwerk/core": "^0.3.10" }, "devDependencies": { "@types/d3": "5.16.4",