!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.component=e():t.component=e()}("undefined"!=typeof self?self:this,function(){return function(t){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}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get: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,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=127)}([function(t,e,n){var r=n(52),i={};r.merge(i,r,{mixin:function(t,e){var n=t.CFG?"CFG":"ATTRS";if(t&&e){t._mixins=e,t[n]=t[n]||{};var r={};i.each(e,function(e){i.augment(t,e);var a=e[n];a&&i.merge(r,a)}),t[n]=i.merge(r,t[n])}}}),t.exports=i},function(t,e,n){var r=n(22),i=n(179),a=i.mix({assign:i.mix,isFinite:isFinite,isNaN:isNaN,Group:r.Group,Event:r.Event},i);t.exports=a},function(t,e,n){var r=n(31),i=n(3);t.exports=function(t,e){if(t)if(i(t))for(var n=0,a=t.length;n0){var a=e.strokeOpacity;r.isNil(a)||1===a||(t.globalAlpha=a),t.stroke()}}this.afterPath(t)},afterPath:function(){},isHitBox:function(){return!0},isHit:function(t,e){var n=[t,e,1];if(this.invert(n),this.isHitBox()){var r=this.getBBox();if(r&&!o.box(r.minX,r.maxX,r.minY,r.maxY,n[0],n[1]))return!1}var i=this._attrs.clip;return i?(i.invert(n,this.get("canvas")),!!i.isPointInPath(n[0],n[1])&&this.isPointInPath(n[0],n[1])):this.isPointInPath(n[0],n[1])},calculateBox:function(){return null},getHitLineWidth:function(){var t=this._attrs,e=t.lineAppendWidth||0;return(t.lineWidth||0)+e},clearTotalMatrix:function(){this._cfg.totalMatrix=null,this._cfg.region=null},clearBBox:function(){this._cfg.box=null,this._cfg.region=null},getBBox:function(){var t=this._cfg.box;return t||((t=this.calculateBox())&&(t.x=t.minX,t.y=t.minY,t.width=t.maxX-t.minX,t.height=t.maxY-t.minY),this._cfg.box=t),t},clone:function(){var t=null,e=this._attrs,n={};return r.each(e,function(t,i){u[i]&&r.isArray(e[i])?n[i]=function(t){for(var e=[],n=0;n1&&(e=(t[1].value-t[0].value)/2);for(var n=[],r=0;r0){var s=e.value-i[a-1].value;s/=t.get("subTickCount")+1;for(var u=1;u<=n;u++){var c={text:"",value:a?i[a-1].value+u*s:u*s},l=t.getTickPoint(c.value),h=void 0;h=o&&o.length?o.length:parseInt(.6*r.length,10),t._addTickItem(u-1,l,h,"sub")}}})}},n._addTickLine=function(t,e){var n=a.mix({},e),r=[];a.each(t,function(t){r.push(["M",t.x1,t.y1]),r.push(["L",t.x2,t.y2])}),delete n.length,n.path=r;var i=this.get("group").addShape("path",{attrs:n});i.name="axis-ticks",i._id=this.get("_id")+"-ticks",i.set("coord",this.get("coord")),this.get("appendInfo")&&i.setSilent("appendInfo",this.get("appendInfo"))},n._renderTicks=function(){var t=this.get("tickItems"),e=this.get("subTickItems");if(!a.isEmpty(t)){var n=this.get("tickLine");this._addTickLine(t,n)}if(!a.isEmpty(e)){var r=this.get("subTickLine")||this.get("tickLine");this._addTickLine(e,r)}},n._renderGrid=function(){var t=this.get("grid");if(t){t.coord=this.get("coord"),t.appendInfo=this.get("appendInfo");var e=this.get("group");this.set("gridGroup",e.addGroup(o,t))}},n._renderLabels=function(){var t=this.get("labelRenderer"),e=this.get("labelItems");t&&(t.set("items",e),t._dryDraw())},n.paint=function(){var t=this.get("tickLine"),e=!0;t&&t.hasOwnProperty("alignWithLabel")&&(e=t.alignWithLabel),this._renderLine();var n=this.get("type");("cat"===n||"timeCat"===n)&&!1===e?this._processCatTicks():this._processTicks(),this._renderTicks(),this._renderGrid(),this._renderLabels();var r=this.get("label");r&&r.autoRotate&&this.autoRotateLabels(),r&&r.autoHide&&this.autoHideLabels()},n.parseTick=function(t,e,n){return{text:t,value:e/(n-1)}},n.getTextAnchor=function(t){return Math.abs(t[1]/t[0])>=1?"center":t[0]>0?"start":"end"},n.getMaxLabelWidth=function(t){var e=t.getLabels(),n=0;return a.each(e,function(t){var e=t.getBBox().width;n1){var i=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=i}r.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0},numberToColor:function(t){var e=o[t];if(!e){for(var n=t.toString(16),r=n.length;r<6;r++)n="0"+n;e="#"+n,o[t]=e}return e}}},function(t,e,n){"use strict";function r(t,e){return function(n){return t+n*e}}function i(t,e){var n=e-t;return n?r(t,n):Object(a.a)(isNaN(t)?e:t)}e.c=function(t,e){var n=e-t;return n?r(t,n>180||n<-180?n-360*Math.round(n/360):n):Object(a.a)(isNaN(t)?e:t)},e.b=function(t){return 1==(t=+t)?i: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):Object(a.a)(isNaN(e)?n:e)}},e.a=i;var a=n(93)},function(t,e,n){function r(t,e){return i(e)?e:t.invert(t.scale(e))}var i=n(12),a=n(3),o=n(7),s=n(17),u=n(2),c=function(){function t(t){var e=this;this.type="base",this.name=null,this.method=null,this.values=[],this.scales=[],this.linear=null;var n=null,r=this.callback;if(t.callback){var i=t.callback;n=function(){for(var t=arguments.length,n=new Array(t),a=0;an&&(i=2*Math.PI-t+e,a=t-n):(i=t-e,a=n-t),i>a?n:e}function a(t,e,n,r){var a=0;return n-e>=2*Math.PI&&(a=2*Math.PI),e=s.mod(e,2*Math.PI),n=s.mod(n,2*Math.PI)+a,t=s.mod(t,2*Math.PI),r?e>=n?t>n&&tn?t:i(t,e,n):e<=n?ee||tt.x&&(p=t.x),dt.y&&(v=t.y),x0&&g>0?h=Math.PI/2-p:f<0&&g<0?h=-Math.PI/2-p:f>=0&&g<0?h=-p-Math.PI/2:f<=0&&g>0&&(h=Math.PI/2-p);var d=function(t){var e,n=[],r=a.parsePath(t.path);if(!Array.isArray(r)||0===r.length||"M"!==r[0][0]&&"m"!==r[0][0])return!1;for(var i=r.length,s=0;s=0,g=f?n.toUpperCase():n,p=t,v=e.endPoint,x=p[1],m=p[2];switch(g){default:break;case"M":h=f?r(x,m,v):{x:x,y:m},this.command="M",this.params=[v,h],this.subStart=h,this.endPoint=h;break;case"L":h=f?r(x,m,v):{x:x,y:m},this.command="L",this.params=[v,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-v.x,h.y-v.y]},this.startTangent=function(){return[v.x-h.x,v.y-h.y]};break;case"H":h=f?r(x,0,v):{x:x,y:v.y},this.command="L",this.params=[v,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-v.x,h.y-v.y]},this.startTangent=function(){return[v.x-h.x,v.y-h.y]};break;case"V":h=f?r(0,x,v):{x:v.x,y:x},this.command="L",this.params=[v,h],this.subStart=e.subStart,this.endPoint=h,this.endTangent=function(){return[h.x-v.x,h.y-v.y]},this.startTangent=function(){return[v.x-h.x,v.y-h.y]};break;case"Q":f?(a=r(x,m,v),c=r(p[3],p[4],v)):(a={x:x,y:m},c={x:p[3],y:p[4]}),this.command="Q",this.params=[v,a,c],this.subStart=e.subStart,this.endPoint=c,this.endTangent=function(){return[c.x-a.x,c.y-a.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]};break;case"T":c=f?r(x,m,v):{x:x,y:m},"Q"===e.command?(a=i(e.params[1],v),this.command="Q",this.params=[v,a,c],this.subStart=e.subStart,this.endPoint=c,this.endTangent=function(){return[c.x-a.x,c.y-a.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]}):(this.command="TL",this.params=[v,c],this.subStart=e.subStart,this.endPoint=c,this.endTangent=function(){return[c.x-v.x,c.y-v.y]},this.startTangent=function(){return[v.x-c.x,v.y-c.y]});break;case"C":f?(a=r(x,m,v),c=r(p[3],p[4],v),l=r(p[5],p[6],v)):(a={x:x,y:m},c={x:p[3],y:p[4]},l={x:p[5],y:p[6]}),this.command="C",this.params=[v,a,c,l],this.subStart=e.subStart,this.endPoint=l,this.endTangent=function(){return[l.x-c.x,l.y-c.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]};break;case"S":f?(c=r(x,m,v),l=r(p[3],p[4],v)):(c={x:x,y:m},l={x:p[3],y:p[4]}),"C"===e.command?(a=i(e.params[2],v),this.command="C",this.params=[v,a,c,l],this.subStart=e.subStart,this.endPoint=l,this.endTangent=function(){return[l.x-c.x,l.y-c.y]},this.startTangent=function(){return[v.x-a.x,v.y-a.y]}):(this.command="SQ",this.params=[v,c,l],this.subStart=e.subStart,this.endPoint=l,this.endTangent=function(){return[l.x-c.x,l.y-c.y]},this.startTangent=function(){return[v.x-c.x,v.y-c.y]});break;case"A":var y=x,b=m,_=p[3],M=p[4],S=p[5];h=f?r(p[6],p[7],v):{x:p[6],y:p[7]},this.command="A";var w=function(t,e,n,r,i,a,c){var l=u.mod(u.toRadian(c),2*Math.PI),h=t.x,f=t.y,g=e.x,p=e.y,d=Math.cos(l)*(h-g)/2+Math.sin(l)*(f-p)/2,v=-1*Math.sin(l)*(h-g)/2+Math.cos(l)*(f-p)/2,x=d*d/(i*i)+v*v/(a*a);x>1&&(i*=Math.sqrt(x),a*=Math.sqrt(x));var m=i*i*(v*v)+a*a*(d*d),y=Math.sqrt((i*i*(a*a)-m)/m);n===r&&(y*=-1),isNaN(y)&&(y=0);var b=y*i*v/a,_=y*-a*d/i,M=(h+g)/2+Math.cos(l)*b-Math.sin(l)*_,S=(f+p)/2+Math.sin(l)*b+Math.cos(l)*_,w=s([1,0],[(d-b)/i,(v-_)/a]),k=[(d-b)/i,(v-_)/a],A=[(-1*d-b)/i,(-1*v-_)/a],P=s(k,A);return o(k,A)<=-1&&(P=Math.PI),o(k,A)>=1&&(P=0),0===r&&P>0&&(P-=2*Math.PI),1===r&&P<0&&(P+=2*Math.PI),[t,M,S,i,a,w,P,l,r]}(v,h,M,S,y,b,_);this.params=w;var k=e.subStart;this.subStart=k,this.endPoint=h;var A=w[5]%(2*Math.PI);u.isNumberEqual(A,2*Math.PI)&&(A=0);var P=w[6]%(2*Math.PI);u.isNumberEqual(P,2*Math.PI)&&(P=0);var C=.001;this.startTangent=function(){0===S&&(C*=-1);var t=w[3]*Math.cos(A-C)+w[1],e=w[4]*Math.sin(A-C)+w[2];return[t-k.x,e-k.y]},this.endTangent=function(){var t=w[6];t-2*Math.PI<1e-4&&(t=0);var e=w[3]*Math.cos(A+t+C)+w[1],n=w[4]*Math.sin(A+t-C)+w[2];return[v.x-e,v.y-n]};break;case"Z":this.command="Z",this.params=[v,e.subStart],this.subStart=e.subStart,this.endPoint=e.subStart}},isInside:function(t,e,n){var r=this.command,i=this.params,a=this.box;if(a&&!c.box(a.minX,a.maxX,a.minY,a.maxY,t,e))return!1;switch(r){default:break;case"M":return!1;case"TL":case"L":case"Z":return c.line(i[0].x,i[0].y,i[1].x,i[1].y,n,t,e);case"SQ":case"Q":return c.quadraticline(i[0].x,i[0].y,i[1].x,i[1].y,i[2].x,i[2].y,n,t,e);case"C":return c.cubicline(i[0].x,i[0].y,i[1].x,i[1].y,i[2].x,i[2].y,i[3].x,i[3].y,n,t,e);case"A":var o=i,s=o[1],u=o[2],l=o[3],h=o[4],f=o[5],d=o[6],v=o[7],x=o[8],m=l>h?l:h,y=l>h?1:l/h,b=l>h?h/l:1;o=[t,e,1];var _=[1,0,0,0,1,0,0,0,1];return p.translate(_,_,[-s,-u]),p.rotate(_,_,-v),p.scale(_,_,[1/y,1/b]),g.transformMat3(o,o,_),c.arcline(0,0,m,f,f+d,1-x,n,o[0],o[1])}return!1},draw:function(t){var e,n,r,i=this.command,a=this.params;switch(i){default:break;case"M":t.moveTo(a[1].x,a[1].y);break;case"TL":case"L":t.lineTo(a[1].x,a[1].y);break;case"SQ":case"Q":e=a[1],n=a[2],t.quadraticCurveTo(e.x,e.y,n.x,n.y);break;case"C":e=a[1],n=a[2],r=a[3],t.bezierCurveTo(e.x,e.y,n.x,n.y,r.x,r.y);break;case"A":var o=a,s=o[1],u=o[2],c=o[3],l=o[4],h=o[5],f=o[6],g=o[7],p=o[8],d=c>l?c:l,v=c>l?1:c/l,x=c>l?l/c:1;t.translate(s,u),t.rotate(g),t.scale(v,x),t.arc(0,0,d,h,h+f,1-p),t.scale(1/v,1/x),t.rotate(-g),t.translate(-s,-u);break;case"Z":t.closePath()}},getBBox:function(t){var e,n,r,i,a=t/2,o=this.params;switch(this.command){default:case"M":case"Z":break;case"TL":case"L":this.box={minX:Math.min(o[0].x,o[1].x)-a,maxX:Math.max(o[0].x,o[1].x)+a,minY:Math.min(o[0].y,o[1].y)-a,maxY:Math.max(o[0].y,o[1].y)+a};break;case"SQ":case"Q":for(r=0,i=(n=h.extrema(o[0].x,o[1].x,o[2].x)).length;rS&&(S=A)}var P=f.yExtrema(x,g,p),C=1/0,I=-1/0,T=[y,b];for(r=2*-Math.PI;r<=2*Math.PI;r+=Math.PI){var O=P+r;1===m?yI&&(I=L)}this.box={minX:M-a,maxX:S+a,minY:C-a,maxY:I+a}}}}),t.exports=v},function(t,e,n){"use strict";e.a=function(t,e){return t=+t,e-=t,function(n){return t+e*n}}},function(t,e,n){var r=n(8),i=Array.prototype.indexOf;t.exports=function(t,e){return!!r(t)&&i.call(t,e)>-1}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(51),a=n(1),o=function(t){function e(e){var n,r=function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(n=t.call(this)||this),i={visible:!0},o=r.getDefaultCfg();return r._attrs=i,a.deepMix(i,o,e),n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){return{}},n.get=function(t){return this._attrs[t]},n.set=function(t,e){this._attrs[t]=e},n.changeVisible=function(){},n.destroy=function(){this._attrs={},this.removeAllListeners(),this.destroyed=!0},e}(i);t.exports=o},function(t,e){var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};t.exports=function(t){var e=void 0===t?"undefined":n(t);return null!==t&&"object"===e||"function"===e}},function(t,e,n){var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(3);t.exports=function t(e){if("object"!==(void 0===e?"undefined":r(e))||null===e)return e;var n=void 0;if(i(e)){n=[];for(var a=0,o=e.length;an?n:t}},function(t,e,n){var r=n(130);r.translate=function(t,e,n){var i=new Array(9);return r.fromTranslation(i,n),r.multiply(t,i,e)},r.rotate=function(t,e,n){var i=new Array(9);return r.fromRotation(i,n),r.multiply(t,i,e)},r.scale=function(t,e,n){var i=new Array(9);return r.fromScaling(i,n),r.multiply(t,i,e)},t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.setMatrixArrayType=function(t){e.ARRAY_TYPE=i=t},e.toRadian=function(t){return t*a},e.equals=function(t,e){return Math.abs(t-e)<=r*Math.max(1,Math.abs(t),Math.abs(e))};var r=e.EPSILON=1e-6,i=e.ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array,a=(e.RANDOM=Math.random,Math.PI/180)},function(t,e,n){var r=n(24),i=n(75),a=n(40),o=n(25);t.exports={line:function(t,e,n,i,a,o,s){var u=r.box(t,e,n,i,a);if(!this.box(u.minX,u.maxX,u.minY,u.maxY,o,s))return!1;var c=r.pointDistance(t,e,n,i,o,s);return!isNaN(c)&&c<=a/2},polyline:function(t,e,n,r){var i=t.length-1;if(i<1)return!1;for(var a=0;a=0&&v=0&&i<=1&&h.push(i);else{var f=c*c-4*u*l;o.isNumberEqual(f,0)?h.push(-c/(2*u)):f>0&&(a=(-c-(s=Math.sqrt(f)))/(2*u),(i=(-c+s)/(2*u))>=0&&i<=1&&h.push(i),a>=0&&a<=1&&h.push(a))}return h},len:function(t,e,n,r,i,s,u,c,l){o.isNil(l)&&(l=1);for(var h=(l=l>1?1:l<0?0:l)/2,f=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],g=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],p=0,d=0;d<12;d++){var v=h*f[d]+h,x=a(v,t,n,i,u),m=a(v,e,r,s,c),y=x*x+m*m;p+=g[d]*Math.sqrt(y)}return h*p}}},function(t,e,n){var r=n(0),i=n(4),a=n(19),o=n(27),s=function t(e){t.superclass.constructor.call(this,e)};s.Symbols={circle:function(t,e,n){return[["M",t,e],["m",-n,0],["a",n,n,0,1,0,2*n,0],["a",n,n,0,1,0,2*-n,0]]},square:function(t,e,n){return[["M",t-n,e-n],["L",t+n,e-n],["L",t+n,e+n],["L",t-n,e+n],["Z"]]},diamond:function(t,e,n){return[["M",t-n,e],["L",t,e-n],["L",t+n,e],["L",t,e+n],["Z"]]},triangle:function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e+r],["L",t,e-r],["L",t+n,e+r],["z"]]},"triangle-down":function(t,e,n){var r=n*Math.sin(1/3*Math.PI);return[["M",t-n,e-r],["L",t+n,e-r],["L",t,e+r],["Z"]]}},s.ATTRS={path:null,lineWidth:1},r.extend(s,i),r.augment(s,{type:"marker",canFill:!0,canStroke:!0,getDefaultAttrs:function(){return{x:0,y:0,lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.radius,i=this.getHitLineWidth()/2+r;return{minX:e-i,minY:n-i,maxX:e+i,maxY:n+i}},_getPath:function(){var t,e=this._attrs,n=e.x,i=e.y,a=e.radius||e.r,o=e.symbol||"circle";return(t=r.isFunction(o)?o:s.Symbols[o])?t(n,i,a):(console.warn(o+" marker is not supported."),null)},createPath:function(t){var e=this._cfg.segments;if(!e||this._cfg.hasUpdate){var n=a.parsePath(this._getPath());t.beginPath();var r;e=[];for(var i=0;i2&&(n.push([r].concat(a.splice(0,2))),o="l",r="m"===r?"l":"L"),"o"===o&&1===a.length&&n.push([r,a[0]]),"r"===o)n.push([r].concat(a));else for(;a.length>=e[o]&&(n.push([r].concat(a.splice(0,e[o]))),e[o]););}),n},f=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n},g=function(t,e,n,r,i){var a=[];if(null===i&&null===r&&(r=n),t=+t,e=+e,n=+n,r=+r,null!==i){var o=Math.PI/180,s=t+n*Math.cos(-r*o),u=t+n*Math.cos(-i*o);a=[["M",s,e+n*Math.sin(-r*o)],["A",n,n,0,+(i-r>180),0,u,e+n*Math.sin(-i*o)]]}else a=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return a},p=function(t){if(!(t=h(t))||!t.length)return[["M",0,0]];var e,n,r=[],i=0,a=0,o=0,s=0,u=0;"M"===t[0][0]&&(o=i=+t[0][1],s=a=+t[0][2],u++,r[0]=["M",i,a]);for(var c,l,p=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),d=u,v=t.length;d1&&(r*=M=Math.sqrt(M),i*=M);var S=r*r,w=i*i,k=(o===s?-1:1)*Math.sqrt(Math.abs((S*w-S*_*_-w*b*b)/(S*_*_+w*b*b)));p=k*r*_/i+(e+u)/2,d=k*-i*b/r+(n+c)/2,f=Math.asin(((n-d)/i).toFixed(9)),g=Math.asin(((c-d)/i).toFixed(9)),f=eg&&(f-=2*Math.PI),!s&&g>f&&(g-=2*Math.PI)}var A=g-f;if(Math.abs(A)>v){var P=g,C=u,I=c;g=f+v*(s&&g>f?1:-1),m=t(u=p+r*Math.cos(g),c=d+i*Math.sin(g),r,i,a,0,s,C,I,[g,P,p,d])}A=g-f;var T=Math.cos(f),O=Math.sin(f),L=Math.cos(g),E=Math.sin(g),B=Math.tan(A/4),N=4/3*r*B,j=4/3*i*B,D=[e,n],R=[e+N*O,n-j*T],F=[u+N*E,c-j*L],Y=[u,c];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],l)return[R,F,Y].concat(m);for(var H=[],q=0,z=(m=[R,F,Y].concat(m).join().split(",")).length;q7){t[e].shift();for(var a=t[e];a.length;)s[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"].concat(a.splice(0,6)));t.splice(e,1),n=Math.max(r.length,i&&i.length||0)}},g=function(t,e,a,o,s){t&&e&&"M"===t[s][0]&&"M"!==e[s][0]&&(e.splice(s,0,["M",o.x,o.y]),a.bx=0,a.by=0,a.x=t[s][1],a.y=t[s][2],n=Math.max(r.length,i&&i.length||0))};n=Math.max(r.length,i&&i.length||0);for(var x=0;x1?1:u<0?0:u)/2,l=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],h=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],f=0,g=0;g<12;g++){var p=c*l[g]+c,d=b(p,t,n,i,o),v=b(p,e,r,a,s),x=d*d+v*v;f+=h[g]*Math.sqrt(x)}return c*f},M=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},S=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},w=function(t,e,n,r,i){if(i)return[["M",+t+ +i,e],["l",n-2*i,0],["a",i,i,0,0,1,i,i],["l",0,r-2*i],["a",i,i,0,0,1,-i,i],["l",2*i-n,0],["a",i,i,0,0,1,-i,-i],["l",0,2*i-r],["a",i,i,0,0,1,i,-i],["z"]];var a=[["M",t,e],["l",n,0],["l",0,r],["l",-n,0],["z"]];return a.parsePathArray=y,a},k=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:w(t,e,n,r),vb:[t,e,n,r].join(" ")}},A=function(t,e,n,r,i,a,o,u){s.isArray(t)||(t=[t,e,n,r,i,a,o,u]);var c=function(t,e,n,r,i,a,o,s){for(var u,c,l,h,f=[],g=[[],[]],p=0;p<2;++p)if(0===p?(c=6*t-12*n+6*i,u=-3*t+9*n-9*i+3*o,l=3*n-3*t):(c=6*e-12*r+6*a,u=-3*e+9*r-9*a+3*s,l=3*r-3*e),Math.abs(u)<1e-12){if(Math.abs(c)<1e-12)continue;(h=-l/c)>0&&h<1&&f.push(h)}else{var d=c*c-4*l*u,v=Math.sqrt(d);if(!(d<0)){var x=(-c+v)/(2*u);x>0&&x<1&&f.push(x);var m=(-c-v)/(2*u);m>0&&m<1&&f.push(m)}}for(var y,b=f.length,_=b;b--;)y=1-(h=f[b]),g[0][b]=y*y*y*t+3*y*y*h*n+3*y*h*h*i+h*h*h*o,g[1][b]=y*y*y*e+3*y*y*h*r+3*y*h*h*a+h*h*h*s;return g[0][_]=t,g[1][_]=e,g[0][_+1]=o,g[1][_+1]=s,g[0].length=g[1].length=_+2,{min:{x:Math.min.apply(0,g[0]),y:Math.min.apply(0,g[1])},max:{x:Math.max.apply(0,g[0]),y:Math.max.apply(0,g[1])}}}.apply(null,t);return k(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},P=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,g=f*u,p=t+2*u*(n-t)+f*(i-2*n+t),d=e+2*u*(r-e)+f*(a-2*r+e),v=n+2*u*(i-n)+f*(o-2*i+n),x=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+g*o,y:l*e+3*h*u*r+3*c*u*u*a+g*s,m:{x:p,y:d},n:{x:v,y:x},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(p-v,d-x)/Math.PI}},C=function(t,e,n){if(!function(t,e){return t=k(t),e=k(e),S(e,t.x,t.y)||S(e,t.x2,t.y)||S(e,t.x,t.y2)||S(e,t.x2,t.y2)||S(t,e.x,e.y)||S(t,e.x2,e.y)||S(t,e.x,e.y2)||S(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(A(t),A(e)))return n?0:[];for(var r=~~(_.apply(0,t)/8),i=~~(_.apply(0,e)/8),a=[],o=[],s={},u=n?0:[],c=0;c=0&&C<=1&&I>=0&&I<=1&&(n?u++:u.push({x:w.x,y:w.y,t1:C,t2:I}))}}return u},I=function(t,e,n){if(1===n)return[[].concat(t)];var i=[];if("L"===e[0]||"C"===e[0]||"Q"===e[0])i=i.concat(function(t,e,n){var i=[[t[1],t[2]]];n=n||2;var a=[];"A"===e[0]?(i.push(e[6]),i.push(e[7])):"C"===e[0]?(i.push([e[1],e[2]]),i.push([e[3],e[4]]),i.push([e[5],e[6]])):"S"===e[0]||"Q"===e[0]?(i.push([e[1],e[2]]),i.push([e[3],e[4]])):i.push([e[1],e[2]]);for(var o=i,s=1/n,u=0;u=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])})}(t,e,n));else{var a=[].concat(t);"M"===a[0]&&(a[0]="L");for(var o=0;o<=n-1;o++)i.push(a)}return i},T=function(t,e){if(t.length!==e.length)return!1;var n=!0;return s.each(t,function(t,r){if(t!==e[r])return n=!1,!1}),n};t.exports={parsePathString:h,parsePathArray:y,pathTocurve:x,pathToAbsolute:p,catmullRomToBezier:f,rectPath:w,fillPath:function(t,e){if(1===t.length)return t;var n=t.length-1,r=e.length-1,i=n/r,a=[];if(1===t.length&&"M"===t[0][0]){for(var o=0;o=0;f--)s=o[f].index,"add"===o[f].type?t.splice(s,0,[].concat(t[s])):t.splice(s,1)}var g=a-(r=t.length);if(r0)){t[r]=e[r];break}n=a(n,t[r-1],1)}t[r]=["Q"].concat(n.reduce(function(t,e){return t.concat(e)},[]));break;case"T":t[r]=["T"].concat(n[0]);break;case"C":if(n.length<3){if(!(r>0)){t[r]=e[r];break}n=a(n,t[r-1],2)}t[r]=["C"].concat(n.reduce(function(t,e){return t.concat(e)},[]));break;case"S":if(n.length<2){if(!(r>0)){t[r]=e[r];break}n=a(n,t[r-1],1)}t[r]=["S"].concat(n.reduce(function(t,e){return t.concat(e)},[]));break;default:t[r]=e[r]}return t},intersection:function(t,e){return function(t,e,n){t=x(t),e=x(e);for(var r,i,a,o,s,u,c,l,h,f,g=n?0:[],p=0,d=t.length;p=0&&e._call.call(null,t),e=e._next;--g}function u(){m=(x=b.now())+y,g=p=0;try{s()}finally{g=0,function(){var t,e,n=h,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:h=e);f=t,l(r)}(),m=0}}function c(){var t=b.now(),e=t-x;e>v&&(y-=e,x=t)}function l(t){if(!g){p&&(p=clearTimeout(p));t-m>24?(t<1/0&&(p=setTimeout(u,t-b.now()-y)),d&&(d=clearInterval(d))):(d||(x=b.now(),d=setInterval(c,v)),g=1,_(u))}}e.b=r,e.a=a,e.c=o,e.d=s;var h,f,g=0,p=0,d=0,v=1e3,x=0,m=0,y=0,b="object"==typeof performance&&performance.now?performance:Date,_="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};a.prototype=o.prototype={constructor:a,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?r():+n)+(null==e?0:+e),this._next||f===this||(f?f._next=this:h=this,f=this),this._call=t,this._time=n,l()},stop:function(){this._call&&(this._call=null,this._time=1/0,l())}}},function(t,e,n){"use strict";var r=n(13),i=n(91),a=n(94),o=n(95),s=n(28),u=n(96),c=n(97),l=n(93);e.a=function(t,e){var n,h=typeof e;return null==e||"boolean"===h?Object(l.a)(e):("number"===h?s.a:"string"===h?(n=Object(r.a)(e))?(e=n,i.a):c.a:e instanceof r.a?i.a:e instanceof Date?o.a:Array.isArray(e)?a.a:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?u.a:s.a)(t,e)}},function(t,e,n){"use strict";function r(){}function i(){return this.rgb().formatHex()}function a(){return this.rgb().formatRgb()}function o(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=A.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?s(e):3===n?new h(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?u(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?u(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=P.exec(t))?new h(e[1],e[2],e[3],1):(e=C.exec(t))?new h(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=I.exec(t))?u(e[1],e[2],e[3],e[4]):(e=T.exec(t))?u(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=O.exec(t))?d(e[1],e[2]/100,e[3]/100,1):(e=L.exec(t))?d(e[1],e[2]/100,e[3]/100,e[4]):E.hasOwnProperty(t)?s(E[t]):"transparent"===t?new h(NaN,NaN,NaN,0):null}function s(t){return new h(t>>16&255,t>>8&255,255&t,1)}function u(t,e,n,r){return r<=0&&(t=e=n=NaN),new h(t,e,n,r)}function c(t){return t instanceof r||(t=o(t)),t?(t=t.rgb(),new h(t.r,t.g,t.b,t.opacity)):new h}function l(t,e,n,r){return 1===arguments.length?c(t):new h(t,e,n,null==r?1:r)}function h(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function f(){return"#"+p(this.r)+p(this.g)+p(this.b)}function g(){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 p(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function d(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new m(t,e,n,r)}function v(t){if(t instanceof m)return new m(t.h,t.s,t.l,t.opacity);if(t instanceof r||(t=o(t)),!t)return new m;if(t instanceof m)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,a=Math.min(e,n,i),s=Math.max(e,n,i),u=NaN,c=s-a,l=(s+a)/2;return c?(u=e===s?(n-i)/c+6*(n0&&l<1?0:u,new m(u,c,l,t.opacity)}function x(t,e,n,r){return 1===arguments.length?v(t):new m(t,e,n,null==r?1:r)}function m(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function y(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e.a=r,n.d(e,"d",function(){return _}),n.d(e,"c",function(){return M}),e.e=o,e.h=c,e.g=l,e.b=h,e.f=x;var b=n(46),_=.7,M=1/_,S="\\s*([+-]?\\d+)\\s*",w="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",k="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",A=/^#([0-9a-f]{3,8})$/,P=new RegExp("^rgb\\("+[S,S,S]+"\\)$"),C=new RegExp("^rgb\\("+[k,k,k]+"\\)$"),I=new RegExp("^rgba\\("+[S,S,S,w]+"\\)$"),T=new RegExp("^rgba\\("+[k,k,k,w]+"\\)$"),O=new RegExp("^hsl\\("+[w,k,k]+"\\)$"),L=new RegExp("^hsla\\("+[w,k,k,w]+"\\)$"),E={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};Object(b.a)(r,o,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:i,formatHex:i,formatHsl:function(){return v(this).formatHsl()},formatRgb:a,toString:a}),Object(b.a)(h,l,Object(b.b)(r,{brighter:function(t){return t=null==t?M:Math.pow(M,t),new h(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?_:Math.pow(_,t),new h(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:f,formatHex:f,formatRgb:g,toString:g})),Object(b.a)(m,x,Object(b.b)(r,{brighter:function(t){return t=null==t?M:Math.pow(M,t),new m(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?_:Math.pow(_,t),new m(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 h(y(t>=240?t-240:t+120,i,r),y(t,i,r),y(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+")")}}))},function(t,e,n){"use strict";e.b=function(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n},e.a=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t}},function(t,e,n){"use strict";function r(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}e.a=r,e.b=function(t){var e=t.length-1;return function(n){var i=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),a=t[i],o=t[i+1],s=i>0?t[i-1]:2*a-o,u=i1&&(t=parseInt(t,10),e=parseInt(e,10)),n.attr("text",this._formatItemValue(t)+""),r.attr("text",this._formatItemValue(e)+"")},n._onMouseLeave=function(){var t=this.get("group").findById("hoverPointer");t&&t.destroy();var e=this.get("group").findById("hoverText");e&&e.destroy(),this.get("canvas").draw()},n._onMouseMove=function(t){var e,n=this.get("height"),r=this.get("width"),i=this.get("items"),a=this.get("canvas").get("el").getBoundingClientRect(),o=this.get("group").getBBox();if("vertical"===this.get("layout")){var s=5;"color-legend"===this.get("type")&&(s=30);var u=this.get("titleGap"),c=this.get("titleShape");c&&(u+=c.getBBox().maxY-c.getBBox().minY);var l=t.clientY||t.event.clientY;l=l-a.y-this.get("group").attr("matrix")[7]+o.y-s+u,e=i[0].value+(1-l/n)*(i[i.length-1].value-i[0].value)}else{var h=t.clientX||t.event.clientX;h=h-a.x-this.get("group").attr("matrix")[6],e=i[0].value+h/r*(i[i.length-1].value-i[0].value)}e=e.toFixed(2),this.activate(e),this.emit("mousehover",{value:e})},n.activate=function(t){if(t){var e=this.get("group").findById("hoverPointer"),n=this.get("group").findById("hoverText"),r=this.get("items");if(!(tr[r.length-1].value)){var a,o=this.get("height"),s=this.get("width"),u=this.get("titleShape"),c=this.get("titleGap"),l=[],h=(t-r[0].value)/(r[r.length-1].value-r[0].value);if("vertical"===this.get("layout")){var f=0,g=0;"color-legend"===this.get("type")&&(f=c,u&&(f+=u.getBBox().height)),this.get("slidable")&&("color-legend"===this.get("type")?f-=13:(f=c-15,u&&(f+=u.getBBox().height)),g+=10),l=[[g,(h=(1-h)*o)+f],[g-10,h+f-5],[g-10,h+f+5]],a=i.mix({},{x:s+this.get("textOffset")/2+g,y:h+f,text:this._formatItemValue(t)+""},this.get("textStyle"),{textAlign:"start"})}else{var p=0,d=0;"color-legend"===this.get("type")&&(p=c,u&&(p+=u.getBBox().height)),this.get("slidable")&&("color-legend"===this.get("type")?p-=7:(p=c,u||(p-=7)),d+=10),l=[[(h*=s)+d,p],[h+d-5,p-10],[h+d+5,p-10]],a=i.mix({},{x:h-5,y:o+this.get("textOffset")+p,text:this._formatItemValue(t)+""},this.get("textStyle"))}var v=i.mix(a,this.get("hoverTextStyle"));n?n.attr(v):(n=this.get("group").addShape("text",{attrs:v})).set("id","hoverText"),e?e.attr(i.mix({points:l},this.get("pointerStyle"))):(e=this.get("group").addShape("Polygon",{attrs:i.mix({points:l},this.get("pointerStyle"))})).set("id","hoverPointer"),this.get("canvas").draw()}}},n.deactivate=function(){var t=this.get("group").findById("hoverPointer");t&&t.destroy();var e=this.get("group").findById("hoverText");e&&e.destroy(),this.get("canvas").draw()},e}(a);t.exports=l},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(30),a=n(1),o=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{x:0,y:0,items:null,titleContent:null,showTitle:!0,plotRange:null,offset:10,timeStamp:0,inPlot:!0,crosshairs:null})},n.isContentChange=function(t,e){var n=this.get("titleContent"),r=this.get("items"),i=!(t===n&&r.length===e.length);return i||a.each(e,function(t,e){var n=r[e];for(var o in t)if(t.hasOwnProperty(o)&&!a.isObject(t[o])&&t[o]!==n[o]){i=!0;break}if(i)return!1}),i},n.setContent=function(t,e){var n=(new Date).valueOf();return this.set("items",e),this.set("titleContent",t),this.set("timeStamp",n),this.render(),this},n.setPosition=function(t,e){this.set("x",t),this.set("y",e)},n.render=function(){},n.clear=function(){},n.show=function(){this.set("visible",!0)},n.hide=function(){this.set("visible",!1)},e}(i);t.exports=o},function(t,e,n){var r;!function(e){"use strict";function i(){}function a(t,e){for(var n=t.length;n--;)if(t[n].listener===e)return n;return-1}function o(t){return function(){return this[t].apply(this,arguments)}}function s(t){return"function"==typeof t||t instanceof RegExp||!(!t||"object"!=typeof t)&&s(t.listener)}var u=i.prototype,c=e.EventEmitter;u.getListeners=function(t){var e,n,r=this._getEvents();if(t instanceof RegExp){e={};for(n in r)r.hasOwnProperty(n)&&t.test(n)&&(e[n]=r[n])}else e=r[t]||(r[t]=[]);return e},u.flattenListeners=function(t){var e,n=[];for(e=0;e-1;)r.call(t,s,1);return t}},function(t,e){t.exports=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-5;return Math.abs(t-e)]*>/,a={tr:document.createElement("tbody"),tbody:n,thead:n,tfoot:n,td:r,th:r,"*":document.createElement("div")};t.exports=function(t){var e=i.test(t)&&RegExp.$1;e in a||(e="*");var n=a[e];t=t.replace(/(^\s*)|(\s*$)/g,""),n.innerHTML=""+t;var r=n.childNodes[0];return n.removeChild(r),r}},function(t,e){t.exports=function(t,e){if(t)for(var n in e)e.hasOwnProperty(n)&&(t.style[n]=e[n]);return t}},function(t,e){t.exports=function(t){return(window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){return setTimeout(t,16)})(t)}},function(t,e,n){var r=n(131),i=n(36);r.angle=function(t,e){var n=r.dot(t,e)/(r.length(t)*r.length(e));return Math.acos(i(n,-1,1))},r.direction=function(t,e){return t[0]*e[1]-e[0]*t[1]},r.angleTo=function(t,e,n){var i=r.angle(t,e),a=r.direction(t,e)>=0;return n?a?2*Math.PI-i:i:a?i:2*Math.PI-i},r.vertical=function(t,e,n){return n?(t[0]=e[1],t[1]=-1*e[0]):(t[0]=-1*e[1],t[1]=e[0]),t},t.exports=r},function(t,e,n){var r=n(132);t.exports=r},function(t,e,n){var r=n(32),i=n(2),a=n(37);t.exports=function(t,e){return t=r(t),i(e,function(e){switch(e[0]){case"t":a.translate(t,t,[e[1],e[2]]);break;case"s":a.scale(t,t,[e[1],e[2]]);break;case"r":a.rotate(t,t,e[1]);break;case"m":a.multiply(t,t,e[1]);break;default:return!1}}),t}},function(t,e,n){var r=n(0),i=function(t,e,n,r){this.type=t,this.target=null,this.currentTarget=null,this.bubbles=n,this.cancelable=r,this.timeStamp=(new Date).getTime(),this.defaultPrevented=!1,this.propagationStopped=!1,this.removed=!1,this.event=e};r.augment(i,{preventDefault:function(){this.defaultPrevented=this.cancelable&&!0},stopPropagation:function(){this.propagationStopped=!0},remove:function(){this.remove=!0},clone:function(){return r.clone(this)},toString:function(){return"[Event (type="+this.type+")]"}}),t.exports=i},function(t,e,n){function r(t,e,n){for(var r,i=t.length-1;i>=0;i--){var a=t[i];if(a._cfg.visible&&a._cfg.capture&&(a.isGroup?r=a.getShape(e,n):a.isHit(e,n)&&(r=a)),r)break}return r}function i(t){if(!t._cfg&&t!==l){var e=t.superclass.constructor;e&&!e._cfg&&i(e),t._cfg={},a.merge(t._cfg,e._cfg),a.merge(t._cfg,t.CFG)}}var a=n(0),o=n(74),s=n(136),u={},c="_INDEX",l=function t(e){t.superclass.constructor.call(this,e),this.set("children",[]),this.set("tobeRemoved",[]),this._beforeRenderUI(),this._renderUI(),this._bindUI()};a.extend(l,o),a.augment(l,{isGroup:!0,type:"group",canFill:!0,canStroke:!0,getDefaultCfg:function(){return i(this.constructor),a.merge({},this.constructor._cfg)},_beforeRenderUI:function(){},_renderUI:function(){},_bindUI:function(){},addShape:function(t,e){var n=this.get("canvas");e=e||{};var r=u[t];if(r||(r=a.upperFirst(t),u[t]=r),e.attrs&&n){var i=e.attrs;if("text"===t){var o=n.get("fontFamily");o&&(i.fontFamily=i.fontFamily?i.fontFamily:o)}}e.canvas=n,e.type=t;var c=new s[r](e);return this.add(c),c},addGroup:function(t,e){var n,r=this.get("canvas");if(e=a.merge({},e),a.isFunction(t))e?(e.canvas=r,e.parent=this,n=new t(e)):n=new t({canvas:r,parent:this}),this.add(n);else if(a.isObject(t))t.canvas=r,n=new l(t),this.add(n);else{if(void 0!==t)return!1;n=new l,this.add(n)}return n},renderBack:function(t,e){var n=this.get("backShape"),r=this.getBBox();return a.merge(e,{x:r.minX-t[3],y:r.minY-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2]}),n?n.attr(e):n=this.addShape("rect",{zIndex:-1,attrs:e}),this.set("backShape",n),this.sort(),n},removeChild:function(t,e){if(arguments.length>=2)this.contain(t)&&t.remove(e);else{if(1===arguments.length){if(!a.isBoolean(t))return this.contain(t)&&t.remove(!0),this;e=t}0===arguments.length&&(e=!0),l.superclass.remove.call(this,e)}return this},add:function(t){var e=this,n=e.get("children");if(a.isArray(t))a.each(t,function(t){var n=t.get("parent");n&&n.removeChild(t,!1),e._setCfgProperty(t)}),e._cfg.children=n.concat(t);else{var r=t,i=r.get("parent");i&&i.removeChild(r,!1),e._setCfgProperty(r),n.push(r)}return e},_setCfgProperty:function(t){var e=this._cfg;t.set("parent",this),t.set("canvas",e.canvas),e.timeline&&t.set("timeline",e.timeline)},contain:function(t){return this.get("children").indexOf(t)>-1},getChildByIndex:function(t){return this.get("children")[t]},getFirst:function(){return this.getChildByIndex(0)},getLast:function(){var t=this.get("children").length-1;return this.getChildByIndex(t)},getBBox:function(){var t=1/0,e=-1/0,n=1/0,r=-1/0,i=this.get("children");i.length>0?a.each(i,function(i){if(i.get("visible")){if(i.isGroup&&0===i.get("children").length)return;var a=i.getBBox();if(!a)return!0;var o=[a.minX,a.minY,1],s=[a.minX,a.maxY,1],u=[a.maxX,a.minY,1],c=[a.maxX,a.maxY,1];i.apply(o),i.apply(s),i.apply(u),i.apply(c);var l=Math.min(o[0],s[0],u[0],c[0]),h=Math.max(o[0],s[0],u[0],c[0]),f=Math.min(o[1],s[1],u[1],c[1]),g=Math.max(o[1],s[1],u[1],c[1]);le&&(e=h),fr&&(r=g)}}):(t=0,e=0,n=0,r=0);var o={minX:t,minY:n,maxX:e,maxY:r};return o.x=o.minX,o.y=o.minY,o.width=o.maxX-o.minX,o.height=o.maxY-o.minY,o},getCount:function(){return this.get("children").length},sort:function(){var t=this.get("children");return a.each(t,function(t,e){return t[c]=e,t}),t.sort(function(t){return function(e,n){var r=t(e,n);return 0===r?e[c]-n[c]:r}}(function(t,e){return t.get("zIndex")-e.get("zIndex")})),this},findById:function(t){return this.find(function(e){return e.get("id")===t})},find:function(t){if(a.isString(t))return this.findById(t);var e=this.get("children"),n=null;return a.each(e,function(e){if(t(e)?n=e:e.find&&(n=e.find(t)),n)return!1}),n},findAll:function(t){var e=this.get("children"),n=[],r=[];return a.each(e,function(e){t(e)&&n.push(e),e.findAllBy&&(r=e.findAllBy(t),n=n.concat(r))}),n},findBy:function(t){var e=this.get("children"),n=null;return a.each(e,function(e){if(t(e)?n=e:e.findBy&&(n=e.findBy(t)),n)return!1}),n},findAllBy:function(t){var e=this.get("children"),n=[],r=[];return a.each(e,function(e){t(e)&&n.push(e),e.findAllBy&&(r=e.findAllBy(t),n=n.concat(r))}),n},getShape:function(t,e){var n,i=this._attrs.clip,a=this._cfg.children;if(i){var o=[t,e,1];i.invert(o,this.get("canvas")),i.isPointInPath(o[0],o[1])&&(n=r(a,t,e))}else n=r(a,t,e);return n},clearTotalMatrix:function(){if(this.get("totalMatrix")){this.setSilent("totalMatrix",null);for(var t=this._cfg.children,e=0;e=0;n--)e[n].remove(!0,t);return this._cfg.children=[],this},destroy:function(){this.get("destroyed")||(this.clear(),l.superclass.destroy.call(this))},clone:function(){var t=this._cfg.children,e=new l;return a.each(t,function(t){e.add(t.clone())}),e}}),t.exports=l},function(t,e,n){var r=n(0),i=n(133),a=n(134),o=n(135),s=n(51),u=function(t){this._cfg={zIndex:0,capture:!0,visible:!0,destroyed:!1},r.assign(this._cfg,this.getDefaultCfg(),t),this.initAttrs(this._cfg.attrs),this._cfg.attrs={},this.initTransform(),this.init()};u.CFG={id:null,zIndex:0,canvas:null,parent:null,capture:!0,context:null,visible:!0,destroyed:!1},r.augment(u,i,a,s,o,{init:function(){this.setSilent("animable",!0),this.setSilent("animating",!1)},getParent:function(){return this._cfg.parent},getDefaultCfg:function(){return{}},set:function(t,e){return"zIndex"===t&&this._beforeSetZIndex&&this._beforeSetZIndex(e),"loading"===t&&this._beforeSetLoading&&this._beforeSetLoading(e),this._cfg[t]=e,this},setSilent:function(t,e){this._cfg[t]=e},get:function(t){return this._cfg[t]},show:function(){return this._cfg.visible=!0,this},hide:function(){return this._cfg.visible=!1,this},remove:function(t,e){var n=this._cfg,i=n.parent,a=n.el;return i&&r.remove(i.get("children"),this),a&&(e?i&&i._cfg.tobeRemoved.push(a):a.parentNode.removeChild(a)),(t||void 0===t)&&this.destroy(),this},destroy:function(){this.get("destroyed")||(this._attrs=null,this.removeEvent(),this._cfg={destroyed:!0})},toFront:function(){var t=this._cfg,e=t.parent;if(e){var n=e._cfg.children,r=t.el,i=n.indexOf(this);n.splice(i,1),n.push(this),r&&(r.parentNode.removeChild(r),t.el=null)}},toBack:function(){var t=this._cfg,e=t.parent;if(e){var n=e._cfg.children,r=t.el,i=n.indexOf(this);if(n.splice(i,1),n.unshift(this),r){var a=r.parentNode;a.removeChild(r),a.insertBefore(r,a.firstChild)}}},_beforeSetZIndex:function(t){var e=this._cfg.parent;this._cfg.zIndex=t,r.isNil(e)||e.sort();var n=this._cfg.el;if(n){var i=e._cfg.children,a=i.indexOf(this),o=n.parentNode;o.removeChild(n),a===i.length-1?o.appendChild(n):o.insertBefore(n,o.childNodes[a])}return t},_setAttrs:function(t){return this.attr(t),t},setZIndex:function(t){return this._cfg.zIndex=t,this._beforeSetZIndex(t)},clone:function(){return r.clone(this)},getBBox:function(){}}),t.exports=u},function(t,e,n){function r(t,e,n,r){var i=1-r;return i*(i*t+2*r*e)+r*r*n}function i(t,e,n,i,a,s,u,c,l){var h,f,g,p,d,v,x,m=.005,y=1/0,b=[u,c];for(d=0;d<1;d+=.05)g=[r(t,n,a,d),r(e,i,s,d)],(f=o.squaredDistance(b,g))=0&&f=0?[i]:[]}}},function(t,e){t.exports={xAt:function(t,e,n,r,i){return e*Math.cos(t)*Math.cos(i)-n*Math.sin(t)*Math.sin(i)+r},yAt:function(t,e,n,r,i){return e*Math.sin(t)*Math.cos(i)+n*Math.cos(t)*Math.sin(i)+r},xExtrema:function(t,e,n){return Math.atan(-n/e*Math.tan(t))},yExtrema:function(t,e,n){return Math.atan(n/(e*Math.tan(t)))}}},function(t,e,n){function r(t,e,n){return t+e*Math.cos(n)}function i(t,e,n){return t+e*Math.sin(n)}var a=n(0),o=n(4),s=n(25),u=n(26),c=function t(e){t.superclass.constructor.call(this,e)};c.ATTRS={x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1},a.extend(c,o),a.augment(c,{canStroke:!0,type:"arc",getDefaultAttrs:function(){return{x:0,y:0,r:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.r,i=t.startAngle,a=t.endAngle,o=t.clockwise,u=this.getHitLineWidth()/2,c=s.box(e,n,r,i,a,o);return c.minX-=u,c.minY-=u,c.maxX+=u,c.maxY+=u,c},getStartTangent:function(){var t=this._attrs,e=t.x,n=t.y,a=t.startAngle,o=t.r,s=t.clockwise,u=Math.PI/180;s&&(u*=-1);var c=[],l=r(e,o,a+u),h=i(n,o,a+u),f=r(e,o,a),g=i(n,o,a);return c.push([l,h]),c.push([f,g]),c},getEndTangent:function(){var t=this._attrs,e=t.x,n=t.y,a=t.endAngle,o=t.r,s=t.clockwise,u=Math.PI/180,c=[];s&&(u*=-1);var l=r(e,o,a+u),h=i(n,o,a+u),f=r(e,o,a),g=i(n,o,a);return c.push([f,g]),c.push([l,h]),c},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.r,a=e.startAngle,o=e.endAngle,s=e.clockwise;(t=t||self.get("context")).beginPath(),t.arc(n,r,i,a,o,s)},afterPath:function(t){var e=this._attrs;if(t=t||this.get("context"),e.startArrow){var n=this.getStartTangent();u.addStartArrow(t,e,n[0][0],n[0][1],n[1][0],n[1][1])}if(e.endArrow){var r=this.getEndTangent();u.addEndArrow(t,e,r[0][0],r[0][1],r[1][0],r[1][1])}}}),t.exports=c},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,r:0,lineWidth:1},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"circle",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.r,i=this.getHitLineWidth()/2+r;return{minX:e-i,minY:n-i,maxX:e+i,maxY:n+i}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.r;t.beginPath(),t.arc(n,r,i,0,2*Math.PI,!1),t.closePath()}}),t.exports=a},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"dom",calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.width,i=t.height,a=this.getHitLineWidth()/2;return{minX:e-a,minY:n-a,maxX:e+r+a,maxY:n+i+a}}}),t.exports=a},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,rx:1,ry:1,lineWidth:1},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"ellipse",getDefaultAttrs:function(){return{lineWidth:1}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.rx,i=t.ry,a=this.getHitLineWidth(),o=r+a/2,s=i+a/2;return{minX:e-o,minY:n-s,maxX:e+o,maxY:n+s}},createPath:function(t){var e=this._attrs,n=e.x,i=e.y,a=e.rx,o=e.ry;t=t||self.get("context");var s=a>o?a:o,u=a>o?1:a/o,c=a>o?o/a:1,l=[1,0,0,0,1,0,0,0,1];r.mat3.scale(l,l,[u,c]),r.mat3.translate(l,l,[n,i]),t.beginPath(),t.save(),t.transform(l[0],l[1],l[3],l[4],l[6],l[7]),t.arc(0,0,s,0,2*Math.PI),t.restore(),t.closePath()}}),t.exports=a},function(t,e,n){var r=n(0),i=n(4),a=n(25),o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={x:0,y:0,rs:0,re:0,startAngle:0,endAngle:0,clockwise:!1,lineWidth:1},r.extend(o,i),r.augment(o,{canFill:!0,canStroke:!0,type:"fan",getDefaultAttrs:function(){return{clockwise:!1,lineWidth:1,rs:0,re:0}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.rs,i=t.re,o=t.startAngle,s=t.endAngle,u=t.clockwise,c=this.getHitLineWidth(),l=a.box(e,n,r,o,s,u),h=a.box(e,n,i,o,s,u),f=c/2;return{minX:Math.min(l.minX,h.minX)-f,minY:Math.min(l.minY,h.minY)-f,maxX:Math.max(l.maxX,h.maxX)+f,maxY:Math.max(l.maxY,h.maxY)+f}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,i=e.rs,a=e.re,o=e.startAngle,s=e.endAngle,u=e.clockwise,c={x:Math.cos(o)*i+n,y:Math.sin(o)*i+r},l={x:Math.cos(o)*a+n,y:Math.sin(o)*a+r},h={x:Math.cos(s)*i+n,y:Math.sin(s)*i+r};(t=t||self.get("context")).beginPath(),t.moveTo(c.x,c.y),t.lineTo(l.x,l.y),t.arc(n,r,a,o,s,u),t.lineTo(h.x,h.y),t.arc(n,r,i,s,o,!u),t.closePath()}}),t.exports=o},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,img:void 0,width:0,height:0,sx:null,sy:null,swidth:null,sheight:null},r.extend(a,i),r.augment(a,{type:"image",isHitBox:function(){return!1},calculateBox:function(){var t=this._attrs;this._cfg.attrs&&this._cfg.attrs.img===t.img||this._setAttrImg();var e=t.x,n=t.y;return{minX:e,minY:n,maxX:e+t.width,maxY:n+t.height}},_beforeSetLoading:function(t){var e=this.get("canvas");return!1===t&&!0===this.get("toDraw")&&(this._cfg.loading=!1,e.draw()),t},_setAttrImg:function(){var t=this,e=t._attrs,n=e.img;if(!r.isString(n))return n instanceof Image?(e.width||t.attr("width",n.width),e.height||t.attr("height",n.height),n):n instanceof HTMLElement&&r.isString(n.nodeName)&&"CANVAS"===n.nodeName.toUpperCase()?(e.width||t.attr("width",Number(n.getAttribute("width"))),e.height||t.attr("height",Number(n.getAttribute("height"))),n):n instanceof ImageData?(e.width||t.attr("width",n.width),e.height||t.attr("height",n.height),n):null;var i=new Image;i.onload=function(){if(t.get("destroyed"))return!1;t.attr("imgSrc",n),t.attr("img",i);var e=t.get("callback");e&&e.call(t),t.set("loading",!1)},i.src=n,i.crossOrigin="Anonymous",t.set("loading",!0)},drawInner:function(t){this._cfg.hasUpdate&&this._setAttrImg(),this.get("loading")?this.set("toDraw",!0):(this._drawImage(t),this._cfg.hasUpdate=!1)},_drawImage:function(t){var e=this._attrs,n=e.x,i=e.y,a=e.img,o=e.width,s=e.height,u=e.sx,c=e.sy,l=e.swidth,h=e.sheight;this.set("toDraw",!1);var f=a;if(f instanceof ImageData&&((f=new Image).src=a),f instanceof Image||f instanceof HTMLElement&&r.isString(f.nodeName)&&"CANVAS"===f.nodeName.toUpperCase()){if(r.isNil(u)||r.isNil(c)||r.isNil(l)||r.isNil(h))return void t.drawImage(f,n,i,o,s);if(!(r.isNil(u)||r.isNil(c)||r.isNil(l)||r.isNil(h)))return void t.drawImage(f,u,c,l,h,n,i,o,s)}}}),t.exports=a},function(t,e,n){var r=n(0),i=n(4),a=n(26),o=n(24),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={x1:0,y1:0,x2:0,y2:0,lineWidth:1,startArrow:!1,endArrow:!1},r.extend(s,i),r.augment(s,{canStroke:!0,type:"line",getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=t.x1,n=t.y1,r=t.x2,i=t.y2,a=this.getHitLineWidth();return o.box(e,n,r,i,a)},createPath:function(t){var e=this._attrs,n=e.x1,r=e.y1,i=e.x2,a=e.y2;(t=t||self.get("context")).beginPath(),t.moveTo(n,r),t.lineTo(i,a)},afterPath:function(t){var e=this._attrs,n=e.x1,r=e.y1,i=e.x2,o=e.y2;t=t||this.get("context"),e.startArrow&&a.addStartArrow(t,e,i,o,n,r),e.endArrow&&a.addEndArrow(t,e,n,r,i,o)},getPoint:function(t){var e=this._attrs;return{x:o.at(e.x1,e.x2,t),y:o.at(e.y1,e.y2,t)}}}),t.exports=s},function(t,e,n){var r=n(0),i=n(4),a=n(27),o=n(19),s=n(26),u=n(42),c=n(40),l=function t(e){t.superclass.constructor.call(this,e)};l.ATTRS={path:null,lineWidth:1,startArrow:!1,endArrow:!1},r.extend(l,i),r.augment(l,{canFill:!0,canStroke:!0,type:"path",getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},_afterSetAttrPath:function(t){if(r.isNil(t))return this.setSilent("segments",null),void this.setSilent("box",void 0);var e,n=o.parsePath(t),i=[];if(r.isArray(n)&&0!==n.length&&("M"===n[0][0]||"m"===n[0][0])){for(var s=n.length,u=0;ui&&(i=r.maxX),r.minYo&&(o=r.maxY))}),n===1/0||a===1/0?{minX:0,minY:0,maxX:0,maxY:0}:{minX:n,minY:a,maxX:i,maxY:o}},_setTcache:function(){var t,e,n,i,a=0,o=0,s=[],u=this._cfg.curve;u&&(r.each(u,function(t,e){n=u[e+1],i=t.length,n&&(a+=c.len(t[i-2],t[i-1],n[1],n[2],n[3],n[4],n[5],n[6]))}),r.each(u,function(r,l){n=u[l+1],i=r.length,n&&((t=[])[0]=o/a,e=c.len(r[i-2],r[i-1],n[1],n[2],n[3],n[4],n[5],n[6]),o+=e,t[1]=o/a,s.push(t))}),this._cfg.tCache=s)},_calculateCurve:function(){var t=this._attrs.path;this._cfg.curve=u.pathTocurve(t)},getStartTangent:function(){var t,e,n,i,a=this.get("segments");if(a.length>1)if(t=a[0].endPoint,e=a[1].endPoint,n=a[1].startTangent,i=[],r.isFunction(n)){var o=n();i.push([t.x-o[0],t.y-o[1]]),i.push([t.x,t.y])}else i.push([e.x,e.y]),i.push([t.x,t.y]);return i},getEndTangent:function(){var t,e,n,i,a=this.get("segments"),o=a.length;if(o>1)if(t=a[o-2].endPoint,e=a[o-1].endPoint,n=a[o-1].endTangent,i=[],r.isFunction(n)){var s=n();i.push([e.x-s[0],e.y-s[1]]),i.push([e.x,e.y])}else i.push([t.x,t.y]),i.push([e.x,e.y]);return i},getPoint:function(t){var e,n,i=this._cfg.tCache;i||(this._calculateCurve(),this._setTcache(),i=this._cfg.tCache);var a=this._cfg.curve;if(!i)return a?{x:a[0][1],y:a[0][2]}:null;r.each(i,function(r,i){t>=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)});var o=a[n];if(r.isNil(o)||r.isNil(n))return null;var s=o.length,u=a[n+1];return{x:c.at(o[s-2],u[1],u[3],u[5],1-e),y:c.at(o[s-1],u[2],u[4],u[6],1-e)}},createPath:function(t){var e=this.get("segments");if(r.isArray(e)){(t=t||this.get("context")).beginPath();for(var n=e.length,i=0;ia&&(a=e),ro&&(o=r)});var s=e/2;return{minX:n-s,minY:i-s,maxX:a+s,maxY:o+s}},createPath:function(t){var e=this._attrs.points;e.length<2||((t=t||this.get("context")).beginPath(),r.each(e,function(e,n){0===n?t.moveTo(e[0],e[1]):t.lineTo(e[0],e[1])}),t.closePath())}}),t.exports=a},function(t,e,n){var r=n(0),i=n(4),a=n(26),o=n(24),s=function t(e){t.superclass.constructor.call(this,e)};s.ATTRS={points:null,lineWidth:1,startArrow:!1,endArrow:!1,tCache:null},r.extend(s,i),r.augment(s,{canStroke:!0,type:"polyline",tCache:null,getDefaultAttrs:function(){return{lineWidth:1,startArrow:!1,endArrow:!1}},calculateBox:function(){var t=this._attrs,e=this.getHitLineWidth(),n=t.points;if(!n||0===n.length)return null;var i=1/0,a=1/0,o=-1/0,s=-1/0;r.each(n,function(t){var e=t[0],n=t[1];eo&&(o=e),ns&&(s=n)});var u=e/2;return{minX:i-u,minY:a-u,maxX:o+u,maxY:s+u}},_setTcache:function(){var t,e,n=this._attrs.points,i=0,a=0,s=[];n&&0!==n.length&&(r.each(n,function(t,e){n[e+1]&&(i+=o.len(t[0],t[1],n[e+1][0],n[e+1][1]))}),i<=0||(r.each(n,function(r,u){n[u+1]&&((t=[])[0]=a/i,e=o.len(r[0],r[1],n[u+1][0],n[u+1][1]),a+=e,t[1]=a/i,s.push(t))}),this.tCache=s))},createPath:function(t){var e,n,r=this._attrs.points;if(!(r.length<2)){for((t=t||this.get("context")).beginPath(),t.moveTo(r[0][0],r[0][1]),n=1,e=r.length-1;n=r[0]&&t<=r[1]&&(e=(t-r[0])/(r[1]-r[0]),n=i)}),{x:o.at(i[n][0],i[n+1][0],e),y:o.at(i[n][1],i[n+1][1],e)}}}),t.exports=s},function(t,e,n){var r=n(0),i=n(19).parseRadius,a=n(4),o=function t(e){t.superclass.constructor.call(this,e)};o.ATTRS={x:0,y:0,width:0,height:0,radius:0,lineWidth:1},r.extend(o,a),r.augment(o,{canFill:!0,canStroke:!0,type:"rect",getDefaultAttrs:function(){return{lineWidth:1,radius:0}},calculateBox:function(){var t=this._attrs,e=t.x,n=t.y,r=t.width,i=t.height,a=this.getHitLineWidth()/2;return{minX:e-a,minY:n-a,maxX:e+r+a,maxY:n+i+a}},createPath:function(t){var e=this._attrs,n=e.x,r=e.y,a=e.width,o=e.height,s=e.radius;if((t=t||this.get("context")).beginPath(),0===s)t.rect(n,r,a,o);else{var u=i(s);t.moveTo(n+u.r1,r),t.lineTo(n+a-u.r2,r),0!==u.r2&&t.arc(n+a-u.r2,r+u.r2,u.r2,-Math.PI/2,0),t.lineTo(n+a,r+o-u.r3),0!==u.r3&&t.arc(n+a-u.r3,r+o-u.r3,u.r3,0,Math.PI/2),t.lineTo(n+u.r4,r+o),0!==u.r4&&t.arc(n+u.r4,r+o-u.r4,u.r4,Math.PI/2,Math.PI),t.lineTo(n,r+u.r1),0!==u.r1&&t.arc(n+u.r1,r+u.r1,u.r1,Math.PI,1.5*Math.PI),t.closePath()}}}),t.exports=o},function(t,e,n){var r=n(0),i=n(4),a=function t(e){t.superclass.constructor.call(this,e)};a.ATTRS={x:0,y:0,text:null,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom",lineHeight:null,textArr:null},r.extend(a,i),r.augment(a,{canFill:!0,canStroke:!0,type:"text",getDefaultAttrs:function(){return{lineWidth:1,lineCount:1,fontSize:12,fontFamily:"sans-serif",fontStyle:"normal",fontWeight:"normal",fontVariant:"normal",textAlign:"start",textBaseline:"bottom"}},initTransform:function(){var t=this._attrs.fontSize;t&&+t<12&&this.transform([["t",-1*this._attrs.x,-1*this._attrs.y],["s",+t/12,+t/12],["t",this._attrs.x,this._attrs.y]])},_assembleFont:function(){var t=this._attrs,e=t.fontSize,n=t.fontFamily,r=t.fontWeight,i=t.fontStyle,a=t.fontVariant;t.font=[i,a,r,e+"px",n].join(" ")},_setAttrText:function(){var t=this._attrs,e=t.text,n=null;if(r.isString(e)&&-1!==e.indexOf("\n")){var i=(n=e.split("\n")).length;t.lineCount=i}t.textArr=n},_getTextHeight:function(){var t=this._attrs,e=t.lineCount,n=1*t.fontSize;if(e>1){return n*e+this._getSpaceingY()*(e-1)}return n},isHitBox:function(){return!1},calculateBox:function(){var t=this._attrs,e=this._cfg;e.attrs&&!e.hasUpdate||(this._assembleFont(),this._setAttrText()),t.textArr||this._setAttrText();var n=t.x,r=t.y,i=this.measureText();if(!i)return{minX:n,minY:r,maxX:n,maxY:r};var a=this._getTextHeight(),o=t.textAlign,s=t.textBaseline,u=this.getHitLineWidth(),c={x:n,y:r-a};o&&("end"===o||"right"===o?c.x-=i:"center"===o&&(c.x-=i/2)),s&&("top"===s?c.y+=a:"middle"===s&&(c.y+=a/2)),this.set("startPoint",c);var l=u/2;return{minX:c.x-l,minY:c.y-l,maxX:c.x+i+l,maxY:c.y+a+l}},_getSpaceingY:function(){var t=this._attrs,e=t.lineHeight,n=1*t.fontSize;return e?e-n:.14*n},drawInner:function(t){var e=this._attrs,n=this._cfg;n.attrs&&!n.hasUpdate||(this._assembleFont(),this._setAttrText()),t.font=e.font;var i=e.text;if(i){var a=e.textArr,o=e.x,s=e.y;if(t.beginPath(),this.hasStroke()){var u=e.strokeOpacity;r.isNil(u)||1===u||(t.globalAlpha=u),a?this._drawTextArr(t,!1):t.strokeText(i,o,s),t.globalAlpha=1}if(this.hasFill()){var c=e.fillOpacity;r.isNil(c)||1===c||(t.globalAlpha=c),a?this._drawTextArr(t,!0):t.fillText(i,o,s)}n.hasUpdate=!1}},_drawTextArr:function(t,e){var n,i=this._attrs.textArr,a=this._attrs.textBaseline,o=1*this._attrs.fontSize,s=this._getSpaceingY(),u=this._attrs.x,c=this._attrs.y,l=this.getBBox(),h=l.maxY-l.minY;r.each(i,function(r,i){n=c+i*(s+o)-h+o,"middle"===a&&(n+=h-o-(h-o)/2),"top"===a&&(n+=h-o),e?t.fillText(r,u,n):t.strokeText(r,u,n)})},measureText:function(){var t,e=this._attrs,n=e.text,i=e.font,a=e.textArr,o=0;if(!r.isNil(n)){var s=document.createElement("canvas").getContext("2d");return s.save(),s.font=i,a?r.each(a,function(e){t=s.measureText(e).width,ou&&(s=e.slice(u,s),l[c]?l[c]+=s:l[++c]=s),(n=n[0])===(o=o[0])?l[c]?l[c]+=o:l[++c]=o:(l[++c]=null,h.push({i:c,x:Object(r.a)(n,o)})),u=a.lastIndex;return u1&&(r*=M=Math.sqrt(M),i*=M);var S=r*r,w=i*i,k=(o===s?-1:1)*Math.sqrt(Math.abs((S*w-S*_*_-w*b*b)/(S*_*_+w*b*b)));x=k*r*_/i+(e+u)/2,m=k*-i*b/r+(n+c)/2,d=Math.asin(((n-m)/i).toFixed(9)),v=Math.asin(((c-m)/i).toFixed(9)),d=ev&&(d-=2*Math.PI),!s&&v>d&&(v-=2*Math.PI)}var A=v-d;if(Math.abs(A)>h){var P=v,C=u,I=c;v=d+h*(s&&v>d?1:-1),g=t(u=x+r*Math.cos(v),c=m+i*Math.sin(v),r,i,a,0,s,C,I,[v,P,x,m])}A=v-d;var T=Math.cos(d),O=Math.sin(d),L=Math.cos(v),E=Math.sin(v),B=Math.tan(A/4),N=4/3*r*B,j=4/3*i*B,D=[e,n],R=[e+N*O,n-j*T],F=[u+N*E,c-j*L],Y=[u,c];if(R[0]=2*D[0]-R[0],R[1]=2*D[1]-R[1],l)return[R,F,Y].concat(g);for(var H=[],q=0,z=(g=[R,F,Y].concat(g).join().split(",")).length;q7){t[e].shift();for(var r=t[e];r.length;)c[e]="A",o&&(l[e]="A"),t.splice(e++,0,["C"].concat(r.splice(0,6)));t.splice(e,1),g=Math.max(n.length,o&&o.length||0)}},v=function(t,e,r,i,a){t&&e&&"M"===t[a][0]&&"M"!==e[a][0]&&(e.splice(a,0,["M",i.x,i.y]),r.bx=0,r.by=0,r.x=t[a][1],r.y=t[a][2],g=Math.max(n.length,o&&o.length||0))};g=Math.max(n.length,o&&o.length||0);for(var x=0;x180),0,u,e+n*Math.sin(-i*o)]]}else a=[["M",t,e],["m",0,-r],["a",n,r,0,1,1,0,2*r],["a",n,r,0,1,1,0,-2*r],["z"]];return a}var i=n(109),a=n(110);t.exports=function(t){if(!(t=i(t))||!t.length)return[["M",0,0]];var e=[],n=0,o=0,s=0,u=0,c=0,l=void 0,h=void 0;"M"===t[0][0]&&(s=n=+t[0][1],u=o=+t[0][2],c++,e[0]=["M",n,o]);for(var f,g,p=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),d=c,v=t.length;d2&&(r.push([n].concat(o.splice(0,2))),s="l",n="m"===n?"l":"L"),"o"===s&&1===o.length&&r.push([n,o[0]]),"r"===s)r.push([n].concat(o));else for(;o.length>=e[s]&&(r.push([n].concat(o.splice(0,e[s]))),e[s]););}),r}},function(t,e){t.exports=function(t,e){for(var n=[],r=0,i=t.length;i-2*!e>r;r+=2){var a=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?i-4===r?a[3]={x:+t[0],y:+t[1]}:i-2===r&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[i-2],y:+t[i-1]}:i-4===r?a[3]=a[2]:r||(a[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return n}},function(t,e,n){var r=n(18);t.exports=function(t){return r(t).toLowerCase()}},function(t,e,n){var r=n(18);t.exports=function(t){return r(t).toUpperCase()}},function(t,e,n){var r=n(5),i=n(3),a=n(114);t.exports=function(t,e){if(!e)return{0:t};if(!r(e)){var n=i(e)?e:e.replace(/\s+/g,"").split("*");e=function(t){for(var e="_",r=0,i=n.length;r=0;o--)r.push(["L",e[o].x,e[o].y]);r.push(["Z"])}else{var s=t[0].flag;i.each(t,function(t,e){var n=t.radius;0===e?r.push(["M",t.x,t.y]):r.push(["A",n,n,0,0,t.flag,t.x,t.y])});for(var u=e.length-1;u>=0;u--){var c=e[u],l=c.radius;u===e.length-1?r.push(["M",c.x,c.y]):r.push(["A",l,l,0,0,1===s?0:1,c.x,c.y])}}return{fill:n,path:r}}}),t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=i.DomUtil,o=n(15),s={scatter:n(249),map:n(250),treemap:n(251)},u=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"label",type:"default",textStyle:null,formatter:null,items:null,useHtml:!1,containerTpl:'
',itemTpl:'
{text}
',labelLine:!1,lineGroup:null,shapes:null,config:!0,capture:!0})},n.clear=function(){var e=this.get("group"),n=this.get("container");e&&!e.get("destroyed")&&e.clear(),n&&(n.innerHTML=""),t.prototype.clear.call(this)},n.destroy=function(){var e=this.get("group"),n=this.get("container");e.destroy||e.destroy(),n&&n.parentNode&&n.parentNode.removeChild(n),t.prototype.destroy.call(this)},n.render=function(){this.clear(),this._init(),this.beforeDraw(),this.draw(),this.afterDraw()},n._dryDraw=function(){var t=this,e=t.get("items"),n=t.getLabels(),r=n.length;i.each(e,function(e,i){if(i=e.length;a--)n[a].remove();t._adjustLabels(),!t.get("labelLine")&&t.get("config")||t.drawLines()},n.draw=function(){this._dryDraw(),this.get("canvas").draw()},n.changeLabel=function(t,e){if(t)if(t.tagName){var n=this._createDom(e);t.innerHTML=n.innerHTML,this._setCustomPosition(e,t)}else t._id=e._id,t.attr("text",e.text),t.attr("x")===e.x&&t.attr("y")===e.y||(t.resetMatrix(),e.textStyle.rotate&&(t.rotateAtStart(e.textStyle.rotate),delete e.textStyle.rotate),t.attr(e))},n.show=function(){var t=this.get("group"),e=this.get("container");t&&t.show(),e&&(e.style.opacity=1)},n.hide=function(){var t=this.get("group"),e=this.get("container");t&&t.hide(),e&&(e.style.opacity=0)},n.drawLines=function(){var t=this;"boolean"==typeof t.get("labelLine")&&t.set("labelLine",{});var e=t.get("lineGroup");!e||e.get("destroyed")?(e=t.get("group").addGroup({elCls:"x-line-group"}),t.set("lineGroup",e)):e.clear(),i.each(t.get("items"),function(n){t.lineToLabel(n,e)})},n.lineToLabel=function(t,e){if(this.get("config")||t.labelLine){var n=t.labelLine||this.get("labelLine"),r=void 0===t.capture?this.get("capture"):t.capture,a=n.path;if(a&&i.isFunction(n.path)&&(a=n.path(t)),!a){var o=t.start||{x:t.x-t._offset.x,y:t.y-t._offset.y};a=[["M",o.x,o.y],["L",t.x,t.y]]}var s=t.color;s||(s=t.textStyle&&t.textStyle.fill?t.textStyle.fill:"#000");var u=e.addShape("path",{attrs:i.mix({path:a,fill:null,stroke:s},n),capture:r});u.name=this.get("name"),u._id=t._id&&t._id.replace("glabel","glabelline"),u.set("coord",this.get("coord"))}},n._adjustLabels=function(){var t=this.get("type"),e=this.getLabels(),n=this.get("shapes"),r=s[t];"default"!==t&&r&&r(e,n)},n.getLabels=function(){var t=this.get("container");return t?i.toArray(t.childNodes):this.get("group").get("children")},n._addLabel=function(t,e){var n=t;return this.get("config")&&(n=this._getLabelCfg(t,e)),this._createText(n)},n._getLabelCfg=function(t,e){var n=this.get("textStyle")||{},r=this.get("formatter"),a=this.get("htmlTemplate");if(!i.isObject(t)){var o=t;(t={}).text=o}i.isFunction(n)&&(n=n(t.text,t,e)),r&&(t.text=r(t.text,t,e)),a&&(t.useHtml=!0,i.isFunction(a)&&(t.text=a(t.text,t,e))),i.isNil(t.text)&&(t.text=""),t.text=t.text+"";return i.mix({},t,{textStyle:n},{x:t.x||0,y:t.y||0})},n._init=function(){if(!this.get("group")){var t=this.get("canvas").addGroup({id:"label-group"});this.set("group",t)}},n.initHtmlContainer=function(){var t=this.get("container");if(t)i.isString(t)&&(t=document.getElementById(t))&&this.set("container",t);else{var e=this.get("containerTpl"),n=this.get("canvas").get("el").parentNode;t=a.createDom(e),n.style.position="relative",n.appendChild(t),this.set("container",t)}return t},n._createText=function(t){var e,n=i.deepMix({},t),r=this.get("container"),a=void 0===n.capture?this.get("capture"):n.capture;if(!n.useHtml&&!n.htmlTemplate){var o=this.get("name"),s=n.point,u=this.get("group");delete n.point;var c=n.rotate;return n.textStyle&&(n.textStyle.rotate&&(c=n.textStyle.rotate,delete n.textStyle.rotate),n=i.mix({x:n.x,y:n.y,textAlign:n.textAlign,text:n.text},n.textStyle)),e=u.addShape("text",{attrs:n,capture:a}),c&&(Math.abs(c)>2*Math.PI&&(c=c/180*Math.PI),e.transform([["t",-n.x,-n.y],["r",c],["t",n.x,n.y]])),e.setSilent("origin",s||n),e.name=o,this.get("appendInfo")&&e.setSilent("appendInfo",this.get("appendInfo")),e}r||(r=this.initHtmlContainer());var l=this._createDom(n);r.appendChild(l),this._setCustomPosition(n,l)},n._createDom=function(t){var e=this.get("itemTpl"),n=i.substitute(e,{text:t.text});return a.createDom(n)},n._setCustomPosition=function(t,e){var n=t.textAlign||"left",r=t.y,i=t.x,o=a.getOuterWidth(e);r-=a.getOuterHeight(e)/2,"center"===n?i-=o/2:"right"===n&&(i-=o),e.style.top=parseInt(r,10)+"px",e.style.left=parseInt(i,10)+"px"},e}(o);t.exports=u},function(t,e){var n=function(){function t(){this.bitmap=[]}var e=t.prototype;return e.hasGap=function(t){for(var e=!0,n=this.bitmap,r=Math.floor(t.minX),i=Math.ceil(t.maxX),a=Math.floor(t.minY),o=Math.ceil(t.maxY)-1,s=r;sn&&o.each(e,function(t){h=t.getBBox(),c=f||h.width,l=h.height+i,n-ur&&o.each(n,function(t){g=t.getBBox(),h=g.width,f=g.height,c?p=c+i:h>p&&(p=h+i),r-l-1?t:t.parentNode?t.parentNode.className===f?t.parentNode:a(t.parentNode,e):null}function o(t,e){var n=null,r=e instanceof h?e.get("value"):e;return s.each(t,function(t){if(t.value===r)return n=t,!1}),n}var s=n(1),u=n(119),c=n(9).FONT_FAMILY,l=s.DomUtil,h=s.Group,f="g2-legend",g="g2-legend-list",p="g2-legend-list-item",d="g2-legend-marker",v=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return s.mix({},e,{type:"category-legend",container:null,containerTpl:'

    ',itemTpl:'
  • {value}
  • ',legendStyle:{},textStyle:{fill:"#333",fontSize:12,textAlign:"middle",textBaseline:"top",fontFamily:c},abridgeText:!1,tipTpl:'
    ',tipStyle:{display:"none",fontSize:"12px",backgroundColor:"#fff",position:"absolute",width:"auto",height:"auto",padding:"3px",boxShadow:"2px 2px 5px #888"},autoPosition:!0})},n._init=function(){},n.beforeRender=function(){},n.render=function(){this._renderHTML()},n._bindEvents=function(){var t=this,e=i(this.get("legendWrapper"),g);this.get("hoverable")&&(e.onmousemove=function(e){return t._onMousemove(e)},e.onmouseout=function(e){return t._onMouseleave(e)}),this.get("clickable")&&(e.onclick=function(e){return t._onClick(e)})},n._onMousemove=function(t){var e=this.get("items"),n=t.target,r=n.className;if(!((r=r.split(" ")).indexOf(f)>-1||r.indexOf(g)>-1)){var i=a(n,p),s=o(e,i.getAttribute("data-value"));s?(this.deactivate(),this.activate(i.getAttribute("data-value")),this.emit("itemhover",{item:s,currentTarget:i,checked:s.checked})):s||(this.deactivate(),this.emit("itemunhover",t))}},n._onMouseleave=function(t){this.deactivate(),this.emit("itemunhover",t)},n._onClick=function(t){var e=this,n=i(this.get("legendWrapper"),g),r=this.get("unCheckColor"),u=this.get("items"),c=this.get("selectedMode"),l=n.childNodes,h=t.target,v=h.className;if(!((v=v.split(" ")).indexOf(f)>-1||v.indexOf(g)>-1)){var x=a(h,p),m=i(x,"g2-legend-text"),y=i(x,d),b=o(u,x.getAttribute("data-value"));if(b){var _=x.className,M=x.getAttribute("data-color");if("single"===c)b.checked=!0,s.each(l,function(t){if(t!==x){i(t,d).style.backgroundColor=r,t.className=t.className.replace("checked","unChecked"),t.style.color=r;o(u,t.getAttribute("data-value")).checked=!1}else m&&(m.style.color=e.get("textStyle").fill),y&&(y.style.backgroundColor=M),x.className=_.replace("unChecked","checked")});else{var S=-1!==_.indexOf("checked"),w=0;if(s.each(l,function(t){-1!==t.className.indexOf("checked")&&w++}),!this.get("allowAllCanceled")&&S&&1===w)return void this.emit("clicklastitem",{item:b,currentTarget:x,checked:"single"===c||b.checked});b.checked=!b.checked,S?(y&&(y.style.backgroundColor=r),x.className=_.replace("checked","unChecked"),x.style.color=r):(y&&(y.style.backgroundColor=M),x.className=_.replace("unChecked","checked"),x.style.color=this.get("textStyle").fill)}this.emit("itemclick",{item:b,currentTarget:x,checked:"single"===c||b.checked})}}},n.activate=function(t){var e=this,n=this,r=n.get("items"),a=o(r,t);i(n.get("legendWrapper"),g).childNodes.forEach(function(t){var s=i(t,d),u=o(r,t.getAttribute("data-value"));if(e.get("highlight")){if(u===a&&u.checked)return void(s.style.border="1px solid #333")}else u===a?s.style.opacity=n.get("activeOpacity"):u.checked&&(s.style.opacity=n.get("inactiveOpacity"))})},n.deactivate=function(){var t=this,e=this;i(e.get("legendWrapper"),g).childNodes.forEach(function(n){var r=i(n,d);t.get("highlight")?r.style.border="1px solid #fff":r.style.opacity=e.get("inactiveOpacity")})},n._renderHTML=function(){var t=this,e=this.get("container"),n=this.get("title"),r=this.get("containerTpl"),a=l.createDom(r),o=i(a,"g2-legend-title"),u=i(a,g),h=this.get("unCheckColor"),v=s.deepMix({},{CONTAINER_CLASS:{height:"auto",width:"auto",position:"absolute",overflowY:"auto",fontSize:"12px",fontFamily:c,lineHeight:"20px",color:"#8C8C8C"},TITLE_CLASS:{marginBottom:this.get("titleGap")+"px",fontSize:"12px",color:"#333",textBaseline:"middle",fontFamily:c},LIST_CLASS:{listStyleType:"none",margin:0,padding:0,textAlign:"center"},LIST_ITEM_CLASS:{cursor:"pointer",marginBottom:"5px",marginRight:"24px"},MARKER_CLASS:{width:"9px",height:"9px",borderRadius:"50%",display:"inline-block",marginRight:"4px",verticalAlign:"middle"}},this.get("legendStyle"));if(/^\#/.test(e)||"string"==typeof e&&e.constructor===String){var x=e.replace("#","");(e=document.getElementById(x)).appendChild(a)}else{var m=this.get("position"),y={};y="left"===m||"right"===m?{maxHeight:(this.get("maxLength")||e.offsetHeight)+"px"}:{maxWidth:(this.get("maxLength")||e.offsetWidth)+"px"},l.modifyCSS(a,s.mix({},v.CONTAINER_CLASS,y,this.get(f))),e.appendChild(a)}l.modifyCSS(u,s.mix({},v.LIST_CLASS,this.get(g))),o&&(n&&n.text?(o.innerHTML=n.text,l.modifyCSS(o,s.mix({},v.TITLE_CLASS,this.get("g2-legend-title"),n))):a.removeChild(o));var b=this.get("items"),_=this.get("itemTpl"),M=this.get("position"),S=this.get("layout"),w="right"===M||"left"===M||"vertical"===S?"block":"inline-block",k=s.mix({},v.LIST_ITEM_CLASS,{display:w},this.get(p)),A=s.mix({},v.MARKER_CLASS,this.get(d));if(s.each(b,function(e,n){var r,o=e.checked,c=t._formatItemValue(e.value),f=e.marker.fill||e.marker.stroke,g=o?f:h;r=s.isFunction(_)?_(c,g,o,n):_;var p=s.substitute(r,s.mix({},e,{index:n,checked:o?"checked":"unChecked",value:c,color:g,originColor:f,originValue:e.value.replace(/\"/g,""")})),v=l.createDom(p);v.style.color=t.get("textStyle").fill;var x=i(v,d),m=i(v,"g2-legend-text");if(l.modifyCSS(v,k),x&&l.modifyCSS(x,A),o||(v.style.color=h,x&&(x.style.backgroundColor=h)),u.appendChild(v),t.get("abridgeText")){var y=c,b=v.offsetWidth,M=t.get("textStyle").fontSize;isNaN(M)&&(-1!==M.indexOf("pt")?M=1*parseFloat(M.substr(0,M.length-2))/72*96:-1!==M.indexOf("px")&&(M=parseFloat(M.substr(0,M.length-2))));var S=M*y.length,w=Math.floor(b/M);b<2*M?y="":b1&&(y=y.substr(0,w-1)+"..."),m.innerText=y,v.addEventListener("mouseover",function(){var t=i(a.parentNode,"textTip");t.style.display="block",t.style.left=v.offsetLeft+v.offsetWidth+"px",t.style.top=v.offsetTop+15+"px",t.innerText=c}),v.addEventListener("mouseout",function(){i(a.parentNode,"textTip").style.display="none"})}}),this.get("abridgeText")){var P=this.get("tipTpl"),C=l.createDom(P),I=this.get("tipStyle");l.modifyCSS(C,I),a.parentNode.appendChild(C),C.addEventListener("mouseover",function(){C.style.display="none"})}this.set("legendWrapper",a)},n._adjustPositionOffset=function(){if(!1!==this.get("autoPosition")){var t=this.get("position"),e=this.get("offset"),n=this.get("offsetX"),r=this.get("offsetY");n&&(e[0]=n),r&&(e[1]=r);var i=this.get("legendWrapper");i.style.left=t[0]+"px",i.style.top=t[1]+"px",i.style.marginLeft=e[0]+"px",i.style.marginTop=e[1]+"px"}},n.getWidth=function(){return l.getOuterWidth(this.get("legendWrapper"))},n.getHeight=function(){return l.getOuterHeight(this.get("legendWrapper"))},n.move=function(e,n){/^\#/.test(this.get("container"))?t.prototype.move.call(this,e,n):(l.modifyCSS(this.get("legendWrapper"),{left:e+"px",top:n+"px"}),this.set("x",e),this.set("y",n))},n.destroy=function(){var e=this.get("legendWrapper");e&&e.parentNode&&e.parentNode.removeChild(e),t.prototype.destroy.call(this)},e}(u);t.exports=v},function(t,e,n){function r(t,e,n,r){return t[r]+(e[r]-t[r])*n}function i(t){return"#"+a(t[0])+a(t[1])+a(t[2])}function a(t){return t=Math.round(t),1===(t=t.toString(16)).length&&(t="0"+t),t}function o(t){var e=[];return e.push(parseInt(t.substr(1,2),16)),e.push(parseInt(t.substr(3,2),16)),e.push(parseInt(t.substr(5,2),16)),e}var s=n(10),u=n(12),c=n(2),l=/rgba?\(([\s.,0-9]+)\)/,h={},f=null,g={toRGB:function(t){if("#"===t[0]&&7===t.length)return t;f||(f=function(){var t=document.createElement("i");return t.title="Web Colour Picker",t.style.display="none",document.body.appendChild(t),t}());var e;if(h[t])e=h[t];else{f.style.color=t,e=document.defaultView.getComputedStyle(f,"").getPropertyValue("color");e=i(l.exec(e)[1].split(/\s*,\s*/)),h[t]=e}return e},rgb2arr:o,gradient:function(t){var e=[];return u(t)&&(t=t.split("-")),c(t,function(t){-1===t.indexOf("#")&&(t=g.toRGB(t)),e.push(o(t))}),function(t){return function(t,e){(isNaN(e)||!s(e)||e<0)&&(e=0),e>1&&(e=1);var n=t.length-1,a=Math.floor(n*e),o=n*e-a,u=t[a],c=a===n?u:t[a+1];return i([r(u,c,o,0),r(u,c,o,1),r(u,c,o,2)])}(e,t)}}};t.exports=g},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(15),a=n(1),o=function(t){function e(e){var n;return(n=t.call(this,e)||this)._init_(),n.render(),n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{type:null,plot:null,plotRange:null,rectStyle:{fill:"#CCD6EC",opacity:.3},lineStyle:{stroke:"rgba(0, 0, 0, 0.25)",lineWidth:1},isTransposed:!1})},n._init_=function(){var t,e=this.get("plot");t="rect"===this.type?e.addGroup({zIndex:0}):e.addGroup(),this.set("container",t)},n._addLineShape=function(t,e){var n=this.get("container").addShape("line",{capture:!1,attrs:t});return this.set("crossLineShape"+e,n),n},n._renderHorizontalLine=function(t,e){var n=a.mix(this.get("lineStyle"),this.get("style")),r=a.mix({x1:e?e.bl.x:t.get("width"),y1:0,x2:e?e.br.x:0,y2:0},n);this._addLineShape(r,"X")},n._renderVerticalLine=function(t,e){var n=a.mix(this.get("lineStyle"),this.get("style")),r=a.mix({x1:0,y1:e?e.bl.y:t.get("height"),x2:0,y2:e?e.tl.y:0},n);this._addLineShape(r,"Y")},n._renderBackground=function(t,e){var n=a.mix(this.get("rectStyle"),this.get("style")),r=this.get("container"),i=a.mix({x:e?e.tl.x:0,y:e?e.tl.y:t.get("height"),width:e?e.br.x-e.bl.x:t.get("width"),height:e?Math.abs(e.tl.y-e.bl.y):t.get("height")},n),o=r.addShape("rect",{attrs:i,capture:!1});return this.set("crosshairsRectShape",o),o},n._updateRectShape=function(t){var e,n=this.get("crosshairsRectShape"),r=this.get("isTransposed"),i=t[0],o=t[t.length-1],s=r?"y":"x",u=r?"height":"width",c=i[s];if(t.length>1&&i[s]>o[s]&&(c=o[s]),this.get("width"))n.attr(s,c-this.get("crosshairs").width/2),n.attr(u,this.get("width"));else if(a.isArray(i.point[s])&&!i.size){var l=i.point[s][1]-i.point[s][0];n.attr(s,i.point[s][0]),n.attr(u,l)}else e=3*i.size/4,n.attr(s,c-e),1===t.length?n.attr(u,3*i.size/2):n.attr(u,Math.abs(o[s]-i[s])+2*e)},n.render=function(){var t=this.get("canvas"),e=this.get("plotRange"),n=this.get("isTransposed");switch(this.clear(),this.get("type")){case"x":this._renderHorizontalLine(t,e);break;case"y":this._renderVerticalLine(t,e);break;case"cross":this._renderHorizontalLine(t,e),this._renderVerticalLine(t,e);break;case"rect":this._renderBackground(t,e);break;default:n?this._renderHorizontalLine(t,e):this._renderVerticalLine(t,e)}},n.show=function(){var e=this.get("container");t.prototype.show.call(this),e.show()},n.hide=function(){var e=this.get("container");t.prototype.hide.call(this),e.hide()},n.clear=function(){var e=this.get("container");this.set("crossLineShapeX",null),this.set("crossLineShapeY",null),this.set("crosshairsRectShape",null),t.prototype.clear.call(this),e.clear()},n.destroy=function(){var e=this.get("container");t.prototype.destroy.call(this),e.remove()},n.setPosition=function(t,e,n){var r=this.get("crossLineShapeX"),i=this.get("crossLineShapeY"),a=this.get("crosshairsRectShape");i&&!i.get("destroyed")&&i.move(t,0),r&&!r.get("destroyed")&&r.move(0,e),a&&!a.get("destroyed")&&this._updateRectShape(n)},e}(i);t.exports=o},function(t,e){var n={_calcTooltipPosition:function(t,e,n,r,i,a){var o=0,s=0,u=20;if(a){var c=a.getBBox();o=c.width,s=c.height,t=c.x,e=c.y,u=5}switch(n){case"inside":t=t+o/2-r/2,e=e+s/2-i/2;break;case"top":t=t+o/2-r/2,e=e-i-u;break;case"left":t=t-r-u,e=e+s/2-i/2;break;case"right":t=t+o+u,e=e+s/2-i/2;break;case"bottom":default:t=t+o/2-r/2,e=e+s+u}return[t,e]},_constraintPositionInBoundary:function(t,e,n,r,i,a){return t+n+20>i?t=(t-=n+20)<0?0:t:t+20<0?t=20:t+=20,e+r+20>a?e=(e-=r+20)<0?0:e:e+20<0?e=20:e+=20,[t,e]},_constraintPositionInPlot:function(t,e,n,r,i,a){return t+n>i.tr.x&&(t-=a?n+1:n+40),ti.bl.y&&(e-=r+40),e0&&(i=1/Math.sqrt(i),t[0]=e[0]*i,t[1]=e[1]*i),t},e.dot=function(t,e){return t[0]*e[0]+t[1]*e[1]},e.cross=function(t,e,n){var r=e[0]*n[1]-e[1]*n[0];return t[0]=t[1]=0,t[2]=r,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t},e.random=function(t,e){e=e||1;var n=2*h.RANDOM()*Math.PI;return t[0]=Math.cos(n)*e,t[1]=Math.sin(n)*e,t},e.transformMat2=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i,t[1]=n[1]*r+n[3]*i,t},e.transformMat2d=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[2]*i+n[4],t[1]=n[1]*r+n[3]*i+n[5],t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[3]*i+n[6],t[1]=n[1]*r+n[4]*i+n[7],t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1];return t[0]=n[0]*r+n[4]*i+n[12],t[1]=n[1]*r+n[5]*i+n[13],t},e.rotate=function(t,e,n,r){var i=e[0]-n[0],a=e[1]-n[1],o=Math.sin(r),s=Math.cos(r);return t[0]=i*s-a*o+n[0],t[1]=i*o+a*s+n[1],t},e.angle=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1],o=n*n+r*r;o>0&&(o=1/Math.sqrt(o));var s=i*i+a*a;s>0&&(s=1/Math.sqrt(s));var u=(n*i+r*a)*o*s;return u>1?0:u<-1?Math.PI:Math.acos(u)},e.str=function(t){return"vec2("+t[0]+", "+t[1]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]},e.equals=function(t,e){var n=t[0],r=t[1],i=e[0],a=e[1];return Math.abs(n-i)<=h.EPSILON*Math.max(1,Math.abs(n),Math.abs(i))&&Math.abs(r-a)<=h.EPSILON*Math.max(1,Math.abs(r),Math.abs(a))};var h=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(38));e.len=c,e.sub=i,e.mul=a,e.div=o,e.dist=s,e.sqrDist=u,e.sqrLen=l,e.forEach=function(){var t=r();return function(e,n,r,i,a,o){var s=void 0,u=void 0;for(n||(n=2),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s0&&(a=1/Math.sqrt(a),t[0]=e[0]*a,t[1]=e[1]*a,t[2]=e[2]*a),t}function g(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}Object.defineProperty(e,"__esModule",{value:!0}),e.forEach=e.sqrLen=e.len=e.sqrDist=e.dist=e.div=e.mul=e.sub=void 0,e.create=r,e.clone=function(t){var e=new p.ARRAY_TYPE(3);return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},e.length=i,e.fromValues=a,e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.set=function(t,e,n,r){return t[0]=e,t[1]=n,t[2]=r,t},e.add=function(t,e,n){return t[0]=e[0]+n[0],t[1]=e[1]+n[1],t[2]=e[2]+n[2],t},e.subtract=o,e.multiply=s,e.divide=u,e.ceil=function(t,e){return t[0]=Math.ceil(e[0]),t[1]=Math.ceil(e[1]),t[2]=Math.ceil(e[2]),t},e.floor=function(t,e){return t[0]=Math.floor(e[0]),t[1]=Math.floor(e[1]),t[2]=Math.floor(e[2]),t},e.min=function(t,e,n){return t[0]=Math.min(e[0],n[0]),t[1]=Math.min(e[1],n[1]),t[2]=Math.min(e[2],n[2]),t},e.max=function(t,e,n){return t[0]=Math.max(e[0],n[0]),t[1]=Math.max(e[1],n[1]),t[2]=Math.max(e[2],n[2]),t},e.round=function(t,e){return t[0]=Math.round(e[0]),t[1]=Math.round(e[1]),t[2]=Math.round(e[2]),t},e.scale=function(t,e,n){return t[0]=e[0]*n,t[1]=e[1]*n,t[2]=e[2]*n,t},e.scaleAndAdd=function(t,e,n,r){return t[0]=e[0]+n[0]*r,t[1]=e[1]+n[1]*r,t[2]=e[2]+n[2]*r,t},e.distance=c,e.squaredDistance=l,e.squaredLength=h,e.negate=function(t,e){return t[0]=-e[0],t[1]=-e[1],t[2]=-e[2],t},e.inverse=function(t,e){return t[0]=1/e[0],t[1]=1/e[1],t[2]=1/e[2],t},e.normalize=f,e.dot=g,e.cross=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[0],s=n[1],u=n[2];return t[0]=i*u-a*s,t[1]=a*o-r*u,t[2]=r*s-i*o,t},e.lerp=function(t,e,n,r){var i=e[0],a=e[1],o=e[2];return t[0]=i+r*(n[0]-i),t[1]=a+r*(n[1]-a),t[2]=o+r*(n[2]-o),t},e.hermite=function(t,e,n,r,i,a){var o=a*a,s=o*(2*a-3)+1,u=o*(a-2)+a,c=o*(a-1),l=o*(3-2*a);return t[0]=e[0]*s+n[0]*u+r[0]*c+i[0]*l,t[1]=e[1]*s+n[1]*u+r[1]*c+i[1]*l,t[2]=e[2]*s+n[2]*u+r[2]*c+i[2]*l,t},e.bezier=function(t,e,n,r,i,a){var o=1-a,s=o*o,u=a*a,c=s*o,l=3*a*s,h=3*u*o,f=u*a;return t[0]=e[0]*c+n[0]*l+r[0]*h+i[0]*f,t[1]=e[1]*c+n[1]*l+r[1]*h+i[1]*f,t[2]=e[2]*c+n[2]*l+r[2]*h+i[2]*f,t},e.random=function(t,e){e=e||1;var n=2*p.RANDOM()*Math.PI,r=2*p.RANDOM()-1,i=Math.sqrt(1-r*r)*e;return t[0]=Math.cos(n)*i,t[1]=Math.sin(n)*i,t[2]=r*e,t},e.transformMat4=function(t,e,n){var r=e[0],i=e[1],a=e[2],o=n[3]*r+n[7]*i+n[11]*a+n[15];return o=o||1,t[0]=(n[0]*r+n[4]*i+n[8]*a+n[12])/o,t[1]=(n[1]*r+n[5]*i+n[9]*a+n[13])/o,t[2]=(n[2]*r+n[6]*i+n[10]*a+n[14])/o,t},e.transformMat3=function(t,e,n){var r=e[0],i=e[1],a=e[2];return t[0]=r*n[0]+i*n[3]+a*n[6],t[1]=r*n[1]+i*n[4]+a*n[7],t[2]=r*n[2]+i*n[5]+a*n[8],t},e.transformQuat=function(t,e,n){var r=n[0],i=n[1],a=n[2],o=n[3],s=e[0],u=e[1],c=e[2],l=i*c-a*u,h=a*s-r*c,f=r*u-i*s,g=i*f-a*h,p=a*l-r*f,d=r*h-i*l,v=2*o;return l*=v,h*=v,f*=v,g*=2,p*=2,d*=2,t[0]=s+l+g,t[1]=u+h+p,t[2]=c+f+d,t},e.rotateX=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0],a[1]=i[1]*Math.cos(r)-i[2]*Math.sin(r),a[2]=i[1]*Math.sin(r)+i[2]*Math.cos(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.rotateY=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[2]*Math.sin(r)+i[0]*Math.cos(r),a[1]=i[1],a[2]=i[2]*Math.cos(r)-i[0]*Math.sin(r),t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.rotateZ=function(t,e,n,r){var i=[],a=[];return i[0]=e[0]-n[0],i[1]=e[1]-n[1],i[2]=e[2]-n[2],a[0]=i[0]*Math.cos(r)-i[1]*Math.sin(r),a[1]=i[0]*Math.sin(r)+i[1]*Math.cos(r),a[2]=i[2],t[0]=a[0]+n[0],t[1]=a[1]+n[1],t[2]=a[2]+n[2],t},e.angle=function(t,e){var n=a(t[0],t[1],t[2]),r=a(e[0],e[1],e[2]);f(n,n),f(r,r);var i=g(n,r);return i>1?0:i<-1?Math.PI:Math.acos(i)},e.str=function(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]},e.equals=function(t,e){var n=t[0],r=t[1],i=t[2],a=e[0],o=e[1],s=e[2];return Math.abs(n-a)<=p.EPSILON*Math.max(1,Math.abs(n),Math.abs(a))&&Math.abs(r-o)<=p.EPSILON*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(i-s)<=p.EPSILON*Math.max(1,Math.abs(i),Math.abs(s))};var p=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(n(38));e.sub=o,e.mul=s,e.div=u,e.dist=c,e.sqrDist=l,e.len=i,e.sqrLen=h,e.forEach=function(){var t=r();return function(e,n,r,i,a,o){var s=void 0,u=void 0;for(n||(n=3),r||(r=0),u=i?Math.min(i*n+r,e.length):e.length,s=r;s2*Math.PI&&(t=t/180*Math.PI),this.transform([["t",-e,-n],["r",t],["t",e,n]])},move:function(t,e){var n=this.get("x")||0,r=this.get("y")||0;return this.translate(t-n,e-r),this.set("x",t),this.set("y",e),this},transform:function(t){var e=this,n=this._attrs.matrix;return o.each(t,function(t){switch(t[0]){case"t":e.translate(t[1],t[2]);break;case"s":e.scale(t[1],t[2]);break;case"r":e.rotate(t[1]);break;case"m":e.attr("matrix",o.mat3.multiply([],n,t[1])),e.clearTotalMatrix()}}),e},setTransform:function(t){return this.attr("matrix",[1,0,0,0,1,0,0,0,1]),this.transform(t)},getMatrix:function(){return this.attr("matrix")},setMatrix:function(t){return this.attr("matrix",t),this.clearTotalMatrix(),this},apply:function(t,e){var n;return n=e?this._getMatrixByRoot(e):this.attr("matrix"),o.vec3.transformMat3(t,t,n),this},_getMatrixByRoot:function(t){t=t||this;for(var e=this,n=[];e!==t;)n.unshift(e),e=e.get("parent");n.unshift(e);var r=[1,0,0,0,1,0,0,0,1];return o.each(n,function(t){o.mat3.multiply(r,t.attr("matrix"),r)}),r},getTotalMatrix:function(){var t=this._cfg.totalMatrix;if(!t){t=[1,0,0,0,1,0,0,0,1];var e=this._cfg.parent;if(e){a(t,e.getTotalMatrix())}a(t,this.attr("matrix")),this._cfg.totalMatrix=t}return t},clearTotalMatrix:function(){},invert:function(t){var e=this.getTotalMatrix();if(i(e))t[0]/=e[0],t[1]/=e[4];else{var n=o.mat3.invert([],e);n&&o.vec3.transformMat3(t,t,n)}return this},resetTransform:function(t){var e=this.attr("matrix");r(e)||t.transform(e[0],e[1],e[3],e[4],e[6],e[7])}}},function(t,e,n){var r=n(0),i={delay:"delay",rotate:"rotate"},a={fill:"fill",stroke:"stroke",fillStyle:"fillStyle",strokeStyle:"strokeStyle"};t.exports={animate:function(t,e,n,o,s){void 0===s&&(s=0);this.set("animating",!0);var u=this.get("timeline");u||(u=this.get("canvas").get("timeline"),this.setSilent("timeline",u));var c=this.get("animators")||[];u._timer||u.initTimer(),r.isNumber(o)&&(s=o,o=null),r.isFunction(n)?(o=n,n="easeLinear"):n=n||"easeLinear";var l=function(t,e){var n={matrix:null,attrs:{}},o=e._attrs;for(var s in t)if("transform"===s)n.matrix=r.transform(e.getMatrix(),t[s]);else if("rotate"===s)n.matrix=r.transform(e.getMatrix(),[["r",t[s]]]);else if("matrix"===s)n.matrix=t[s];else{if(a[s]&&/^[r,R,L,l]{1}[\s]*\(/.test(t[s]))continue;i[s]||o[s]===t[s]||(n.attrs[s]=t[s])}return n}(t,this),h={fromAttrs:function(t,e){var n={},r=e._attrs;for(var i in t.attrs)n[i]=r[i];return n}(l,this),toAttrs:l.attrs,fromMatrix:r.clone(this.getMatrix()),toMatrix:l.matrix,duration:e,easing:n,callback:o,delay:s,startTime:u.getTime(),id:r.uniqueId()};c.length>0?c=function(t,e){var n=e.delay,i=Object.prototype.hasOwnProperty;return r.each(e.toAttrs,function(e,a){r.each(t,function(t){n').getContext("2d"),u={arc:function(t,e){var n=this._attrs,r=n.x,i=n.y,o=n.r,s=n.startAngle,u=n.endAngle,c=n.clockwise,l=this.getHitLineWidth();return!!this.hasStroke()&&a.arcline(r,i,o,s,u,c,l,t,e)},circle:function(t,e){var n=this._attrs,r=n.x,i=n.y,o=n.r,s=this.getHitLineWidth(),u=this.hasFill(),c=this.hasStroke();return u&&c?a.circle(r,i,o,t,e)||a.arcline(r,i,o,0,2*Math.PI,!1,s,t,e):u?a.circle(r,i,o,t,e):!!c&&a.arcline(r,i,o,0,2*Math.PI,!1,s,t,e)},dom:function(t,e){if(!this._cfg.el)return!1;var n=this._cfg.el.getBBox();return a.box(n.x,n.x+n.width,n.y,n.y+n.height,t,e)},ellipse:function(t,e){var n=this._attrs,r=this.hasFill(),o=this.hasStroke(),s=n.x,u=n.y,c=n.rx,l=n.ry,h=this.getHitLineWidth(),f=c>l?c:l,g=c>l?1:c/l,p=c>l?l/c:1,d=[t,e,1],v=[1,0,0,0,1,0,0,0,1];i.mat3.scale(v,v,[g,p]),i.mat3.translate(v,v,[s,u]);var x=i.mat3.invert([],v);return i.vec3.transformMat3(d,d,x),r&&o?a.circle(0,0,f,d[0],d[1])||a.arcline(0,0,f,0,2*Math.PI,!1,h,d[0],d[1]):r?a.circle(0,0,f,d[0],d[1]):!!o&&a.arcline(0,0,f,0,2*Math.PI,!1,h,d[0],d[1])},fan:function(t,e){function n(){var t=o.arc.nearAngle(y,d,v,x);if(i.isNumberEqual(y,t)){var e=i.vec2.squaredLength(m);if(g*g<=e&&e<=p*p)return!0}return!1}function r(){var n=s.getHitLineWidth(),r={x:Math.cos(d)*g+h,y:Math.sin(d)*g+f},i={x:Math.cos(d)*p+h,y:Math.sin(d)*p+f},o={x:Math.cos(v)*g+h,y:Math.sin(v)*g+f},u={x:Math.cos(v)*p+h,y:Math.sin(v)*p+f};return!!(a.line(r.x,r.y,i.x,i.y,n,t,e)||a.line(o.x,o.y,u.x,u.y,n,t,e)||a.arcline(h,f,g,d,v,x,n,t,e)||a.arcline(h,f,p,d,v,x,n,t,e))}var s=this,u=s.hasFill(),c=s.hasStroke(),l=s._attrs,h=l.x,f=l.y,g=l.rs,p=l.re,d=l.startAngle,v=l.endAngle,x=l.clockwise,m=[t-h,e-f],y=i.vec2.angleTo([1,0],m);return u&&c?n()||r():u?n():!!c&&r()},image:function(t,e){var n=this._attrs;if(this.get("toDraw")||!n.img)return!1;this._cfg.attrs&&this._cfg.attrs.img===n.img||this._setAttrImg();var r=n.x,i=n.y,o=n.width,s=n.height;return a.rect(r,i,o,s,t,e)},line:function(t,e){var n=this._attrs,r=n.x1,i=n.y1,o=n.x2,s=n.y2,u=this.getHitLineWidth();return!!this.hasStroke()&&a.line(r,i,o,s,u,t,e)},path:function(t,e){function n(){if(!i.isEmpty(o)){for(var n=a.getHitLineWidth(),r=0,s=o.length;r=3&&o.push(n[0]),a.polyline(o,r,t,e)}var i=this,o=i.hasFill(),s=i.hasStroke();return o&&s?r(t,e,i)||n():o?r(t,e,i):!!s&&n()},polyline:function(t,e){var n=this._attrs;if(this.hasStroke()){var r=n.points;if(r.length<2)return!1;var i=n.lineWidth;return a.polyline(r,i,t,e)}return!1},rect:function(t,e){function n(){var n=i._attrs,r=n.x,o=n.y,s=n.width,u=n.height,c=n.radius,l=i.getHitLineWidth();if(0===c){var h=l/2;return a.line(r-h,o,r+s+h,o,l,t,e)||a.line(r+s,o-h,r+s,o+u+h,l,t,e)||a.line(r+s+h,o+u,r-h,o+u,l,t,e)||a.line(r,o+u+h,r,o-h,l,t,e)}return a.line(r+c,o,r+s-c,o,l,t,e)||a.line(r+s,o+c,r+s,o+u-c,l,t,e)||a.line(r+s-c,o+u,r+c,o+u,l,t,e)||a.line(r,o+u-c,r,o+c,l,t,e)||a.arcline(r+s-c,o+c,c,1.5*Math.PI,2*Math.PI,!1,l,t,e)||a.arcline(r+s-c,o+u-c,c,0,.5*Math.PI,!1,l,t,e)||a.arcline(r+c,o+u-c,c,.5*Math.PI,Math.PI,!1,l,t,e)||a.arcline(r+c,o+c,c,Math.PI,1.5*Math.PI,!1,l,t,e)}var i=this,o=i.hasFill(),s=i.hasStroke();return o&&s?r(t,e,i)||n():o?r(t,e,i):!!s&&n()},text:function(t,e){var n=this.getBBox();if(this.hasFill()||this.hasStroke())return a.box(n.minX,n.maxX,n.minY,n.maxY,t,e)}};t.exports={isPointInPath:function(t,e){var n=u[this.type];return!!n&&n.call(this,t,e)}}},function(t,e,n){function r(t,e,n){var r=e.startTime;if(np.length?(g=a.parsePathString(o[f]),p=a.parsePathString(s[f]),p=a.fillPathByDiff(p,g),p=a.formatPath(p,g),e.fromAttrs.path=p,e.toAttrs.path=g):e.pathFormatted||(g=a.parsePathString(o[f]),p=a.parsePathString(s[f]),p=a.formatPath(p,g),e.fromAttrs.path=p,e.toAttrs.path=g,e.pathFormatted=!0),r[f]=[];for(var d=0;d0){for(var u=i._animators.length-1;u>=0;u--)if((t=i._animators[u]).get("destroyed"))a.removeAnimator(u);else{if(!t.get("pause").isPaused)for(var c=(e=t.get("animators")).length-1;c>=0;c--)n=e[c],(s=r(t,n,o))&&(e.splice(c,1),s=!1,n.callback&&n.callback());0===e.length&&a.removeAnimator(u)}i.canvas.draw()}})},addAnimator:function(t){this._animators.push(t)},removeAnimator:function(t){this._animators.splice(t,1)},isAnimating:function(){return!!this._animators.length},stop:function(){this._timer&&this._timer.stop()},stopAllAnimations:function(){this._animators.forEach(function(t){t.stopAnimate()}),this._animators=[],this.canvas.draw()},getTime:function(){return this._current}}),t.exports=h},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(43);n.d(e,"now",function(){return r.b}),n.d(e,"timer",function(){return r.c}),n.d(e,"timerFlush",function(){return r.d});var i=n(140);n.d(e,"timeout",function(){return i.a});var a=n(141);n.d(e,"interval",function(){return a.a})},function(t,e,n){"use strict";var r=n(43);e.a=function(t,e,n){var i=new r.a;return e=null==e?0:+e,i.restart(function(n){i.stop(),t(n+e)},e,n),i}},function(t,e,n){"use strict";var r=n(43);e.a=function(t,e,n){var i=new r.a,a=e;return null==e?(i.restart(t,e,n),i):(e=+e,n=null==n?Object(r.b)():+n,i.restart(function r(o){o+=a,i.restart(r,a+=e,n),t(o)},e,n),i)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(143);n.d(e,"easeLinear",function(){return r.a});var i=n(144);n.d(e,"easeQuad",function(){return i.b}),n.d(e,"easeQuadIn",function(){return i.a}),n.d(e,"easeQuadOut",function(){return i.c}),n.d(e,"easeQuadInOut",function(){return i.b});var a=n(145);n.d(e,"easeCubic",function(){return a.b}),n.d(e,"easeCubicIn",function(){return a.a}),n.d(e,"easeCubicOut",function(){return a.c}),n.d(e,"easeCubicInOut",function(){return a.b});var o=n(146);n.d(e,"easePoly",function(){return o.b}),n.d(e,"easePolyIn",function(){return o.a}),n.d(e,"easePolyOut",function(){return o.c}),n.d(e,"easePolyInOut",function(){return o.b});var s=n(147);n.d(e,"easeSin",function(){return s.b}),n.d(e,"easeSinIn",function(){return s.a}),n.d(e,"easeSinOut",function(){return s.c}),n.d(e,"easeSinInOut",function(){return s.b});var u=n(148);n.d(e,"easeExp",function(){return u.b}),n.d(e,"easeExpIn",function(){return u.a}),n.d(e,"easeExpOut",function(){return u.c}),n.d(e,"easeExpInOut",function(){return u.b});var c=n(149);n.d(e,"easeCircle",function(){return c.b}),n.d(e,"easeCircleIn",function(){return c.a}),n.d(e,"easeCircleOut",function(){return c.c}),n.d(e,"easeCircleInOut",function(){return c.b});var l=n(150);n.d(e,"easeBounce",function(){return l.c}),n.d(e,"easeBounceIn",function(){return l.a}),n.d(e,"easeBounceOut",function(){return l.c}),n.d(e,"easeBounceInOut",function(){return l.b});var h=n(151);n.d(e,"easeBack",function(){return h.b}),n.d(e,"easeBackIn",function(){return h.a}),n.d(e,"easeBackOut",function(){return h.c}),n.d(e,"easeBackInOut",function(){return h.b});var f=n(152);n.d(e,"easeElastic",function(){return f.c}),n.d(e,"easeElasticIn",function(){return f.a}),n.d(e,"easeElasticOut",function(){return f.c}),n.d(e,"easeElasticInOut",function(){return f.b})},function(t,e,n){"use strict";e.a=function(t){return+t}},function(t,e,n){"use strict";e.a=function(t){return t*t},e.c=function(t){return t*(2-t)},e.b=function(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}},function(t,e,n){"use strict";e.a=function(t){return t*t*t},e.c=function(t){return--t*t*t+1},e.b=function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"c",function(){return i}),n.d(e,"b",function(){return a});var r=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),i=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),a=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3)},function(t,e,n){"use strict";e.a=function(t){return 1==+t?1:1-Math.cos(t*i)},e.c=function(t){return Math.sin(t*i)},e.b=function(t){return(1-Math.cos(r*t))/2};var r=Math.PI,i=r/2},function(t,e,n){"use strict";e.a=function(t){return Object(r.a)(1-+t)},e.c=function(t){return 1-Object(r.a)(t)},e.b=function(t){return((t*=2)<=1?Object(r.a)(1-t):2-Object(r.a)(t-1))/2};var r=n(89)},function(t,e,n){"use strict";e.a=function(t){return 1-Math.sqrt(1-t*t)},e.c=function(t){return Math.sqrt(1- --t*t)},e.b=function(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}},function(t,e,n){"use strict";function r(t){return(t=+t)S?Math.pow(t,1/3):t/M+b}function s(t){return t>_?t*t*t:M*(t-b)}function u(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function c(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function l(t){if(t instanceof f)return new f(t.h,t.c,t.l,t.opacity);if(t instanceof a||(t=r(t)),0===t.a&&0===t.b)return new f(NaN,0180?e+=360:e-t>180&&(t+=360),o.push({i:n.push(a(n)+"rotate(",null,r)-2,x:Object(i.a)(t,e)})):e&&n.push(a(n)+"rotate("+e+r)}(o.rotate,s.rotate,u,c),function(t,e,n,o){t!==e?o.push({i:n.push(a(n)+"skewX(",null,r)-2,x:Object(i.a)(t,e)}):e&&n.push(a(n)+"skewX("+e+r)}(o.skewX,s.skewX,u,c),function(t,e,n,r,o,s){if(t!==n||e!==r){var u=o.push(a(o)+"scale(",null,",",null,")");s.push({i:u-4,x:Object(i.a)(t,n)},{i:u-2,x:Object(i.a)(e,r)})}else 1===n&&1===r||o.push(a(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,s.scaleX,s.scaleY,u,c),o=s=null,function(t){for(var e,n=-1,r=c.length;++n');return t.appendChild(n),this.type="canvas",this.canvas=n,this.context=n.getContext("2d"),this.toDraw=!1,this}var e=t.prototype;return e.beforeDraw=function(){var t=this.canvas;this.context&&this.context.clearRect(0,0,t.width,t.height)},e.draw=function(t){function e(){n.animateHandler=r.requestAnimationFrame(function(){n.animateHandler=void 0,n.toDraw&&e()}),n.beforeDraw();try{n._drawGroup(t)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),n.toDraw=!1}n.toDraw=!1}var n=this;n.animateHandler?n.toDraw=!0:e()},e.drawSync=function(t){this.beforeDraw(),this._drawGroup(t)},e._drawGroup=function(t){if(!t._cfg.removed&&!t._cfg.destroyed&&t._cfg.visible){var e=t._cfg.children,n=null;this.setContext(t);for(var r=0;r-1){var s=n[o];"fillStyle"===o&&(s=i.parseStyle(s,t,e)),"strokeStyle"===o&&(s=i.parseStyle(s,t,e)),"lineDash"===o&&e.setLineDash?r.isArray(s)?e.setLineDash(s):r.isString(s)&&e.setLineDash(s.split(" ")):e[o]=s}},t}();t.exports=o},function(t,e,n){function r(t,e){var n=t.match(l);i.each(n,function(t){t=t.split(":"),e.addColorStop(t[0],t[1])})}var i=n(0),a=/[MLHVQTCSAZ]([^MLHVQTCSAZ]*)/gi,o=/[^\s\,]+/gi,s=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,u=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,c=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,l=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,h={};t.exports={parsePath:function(t){return t=t||[],i.isArray(t)?t:i.isString(t)?(t=t.match(a),i.each(t,function(e,n){if((e=e.match(o))[0].length>1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}i.each(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0},parseStyle:function(t,e,n){if(i.isString(t)){if("("===t[1]||"("===t[2]){if("l"===t[0])return function(t,e,n){var a,o,u=s.exec(t),c=i.mod(i.toRadian(parseFloat(u[1])),2*Math.PI),l=u[2],h=e.getBBox();c>=0&&c<.5*Math.PI?(a={x:h.minX,y:h.minY},o={x:h.maxX,y:h.maxY}):.5*Math.PI<=c&&c');return t.appendChild(n),this.type="svg",this.canvas=n,this.context=new o(n),this.toDraw=!1,this}var e=t.prototype;return e.draw=function(t){function e(){n.animateHandler=r.requestAnimationFrame(function(){n.animateHandler=void 0,n.toDraw&&e()});try{t.resetMatrix(),n._drawGroup(t,!1)}catch(t){console.warn("error in draw canvas, detail as:"),console.warn(t),n.toDraw=!1}n.toDraw=!1}var n=this;n.animateHandler?n.toDraw=!0:e()},e.drawSync=function(t){this._drawChildren(t,!1)},e._drawGroup=function(t,e){var n=t._cfg;n.removed||n.destroyed||(!n.el&&n.attrs&&(e=!0),n.tobeRemoved&&(r.each(n.tobeRemoved,function(t){t.parentNode&&t.parentNode.removeChild(t)}),n.tobeRemoved=[]),this._drawShape(t,e),n.children&&n.children.length>0&&this._drawChildren(t,e))},e._drawChildren=function(t,e){var n,r=t._cfg.children;if(r){if(t._cfg.el&&!e){var i=t._cfg.el.childNodes.length+1;0!==i&&i!==r.length&&(e=!0)}for(var a=0;as?1:0,f=Math.abs(u-s)>Math.PI?1:0,g=n.rs,p=n.re,d=e(s,n.rs,a),v=e(u,n.rs,a);n.rs>0?(o.push("M "+l.x+","+l.y),o.push("L "+v.x+","+v.y),o.push("A "+g+","+g+",0,"+f+","+(1===h?0:1)+","+d.x+","+d.y),o.push("L "+c.x+" "+c.y)):(o.push("M "+a.x+","+a.y),o.push("L "+c.x+","+c.y)),o.push("A "+p+","+p+",0,"+f+","+h+","+l.x+","+l.y),n.rs>0?o.push("L "+v.x+","+v.y):o.push("Z"),i.el.setAttribute("d",o.join(" "))},e._updateText=function(t){var e=t._attrs,n=t._cfg.attrs,r=t._cfg.el;this._setFont(t);for(var i in e)if(e[i]!==n[i]){if("text"===i){this._setText(t,""+e[i]);continue}if("fillStyle"===i||"strokeStyle"===i){this._setColor(t,i,e[i]);continue}if("matrix"===i){this._setTransform(t);continue}u[i]&&r.setAttribute(u[i],e[i])}t._cfg.attrs=Object.assign({},t._attrs),t._cfg.hasUpdate=!1},e._setFont=function(t){var e=t.get("el"),n=t._attrs,r=n.fontSize;e.setAttribute("alignment-baseline",c[n.textBaseline]||"baseline"),e.setAttribute("text-anchor",l[n.textAlign]||"left"),r&&+r<12&&(n.matrix=[1,0,0,0,1,0,0,0,1],t.transform([["t",-n.x,-n.y],["s",+r/12,+r/12],["t",n.x,n.y]]))},e._setText=function(t,e){var n=t._cfg.el,i=t._attrs.textBaseline||"bottom";if(e)if(~e.indexOf("\n")){var a=t._attrs.x,o=e.split("\n"),s=o.length-1,u="";r.each(o,function(t,e){0===e?"alphabetic"===i?u+=''+t+"":"top"===i?u+=''+t+"":"middle"===i?u+=''+t+"":"bottom"===i?u+=''+t+"":"hanging"===i&&(u+=''+t+""):u+=''+t+""}),n.innerHTML=u}else n.innerHTML=e;else n.innerHTML=""},e._setClip=function(t,e){var n=t._cfg.el;if(e)if(n.hasAttribute("clip-path"))e._cfg.hasUpdate&&this._updateShape(e);else{this._createDom(e),this._updateShape(e);var r=this.context.addClip(e);n.setAttribute("clip-path","url(#"+r+")")}else n.removeAttribute("clip-path")},e._setColor=function(t,e,n){var r=t._cfg.el,i=this.context;if(n)if(n=n.trim(),/^[r,R,L,l]{1}[\s]*\(/.test(n)){var a=i.find("gradient",n);a||(a=i.addGradient(n)),r.setAttribute(u[e],"url(#"+a+")")}else if(/^[p,P]{1}[\s]*\(/.test(n)){var o=i.find("pattern",n);o||(o=i.addPattern(n)),r.setAttribute(u[e],"url(#"+o+")")}else r.setAttribute(u[e],n);else r.setAttribute(u[e],"none")},e._setShadow=function(t){var e=t._cfg.el,n=t._attrs,r={dx:n.shadowOffsetX,dy:n.shadowOffsetY,blur:n.shadowBlur,color:n.shadowColor};if(r.dx||r.dy||r.blur||r.color){var i=this.context.find("filter",r);i||(i=this.context.addShadow(r,this)),e.setAttribute("filter","url(#"+i+")")}else e.removeAttribute("filter")},t}();t.exports=h},function(t,e,n){var r=n(0),i=n(173),a=n(174),o=n(175),s=n(176),u=n(177),c=function(){function t(t){var e=document.createElementNS("http://www.w3.org/2000/svg","defs"),n=r.uniqueId("defs_");e.id=n,t.appendChild(e),this.children=[],this.defaultArrow={},this.el=e,this.canvas=t}var e=t.prototype;return e.find=function(t,e){for(var n=this.children,r=null,i=0;i'}),n}var i=n(0),a=/^l\s*\(\s*([\d.]+)\s*\)\s*(.*)/i,o=/^r\s*\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*\)\s*(.*)/i,s=/[\d.]+:(#[^\s]+|[^\)]+\))/gi,u=function(){function t(t){var e=null,n=i.uniqueId("gradient_");return"l"===t.toLowerCase()[0]?function(t,e){var n,o,s=a.exec(t),u=i.mod(i.toRadian(parseFloat(s[1])),2*Math.PI),c=s[2];u>=0&&u<.5*Math.PI?(n={x:0,y:0},o={x:1,y:1}):.5*Math.PI<=u&&u';e.innerHTML=n},t}();t.exports=o},function(t,e,n){var r=n(0),i=function(){function t(t,e){var n=document.createElementNS("http://www.w3.org/2000/svg","marker"),i=r.uniqueId("marker_");n.setAttribute("id",i);var a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("stroke","none"),a.setAttribute("fill",t.stroke||"#000"),n.appendChild(a),n.setAttribute("overflow","visible"),n.setAttribute("orient","auto-start-reverse"),this.el=n,this.child=a,this.id=i,this.cfg=t["marker-start"===e?"startArrow":"endArrow"],this.stroke=t.stroke||"#000",!0===this.cfg?this._setDefaultPath(e,a):this._setMarker(t.lineWidth,a),this}var e=t.prototype;return e.match=function(){return!1},e._setDefaultPath=function(t,e){var n=this.el;e.setAttribute("d","M0,0 L6,3 L0,6 L3,3Z"),n.setAttribute("refX",3),n.setAttribute("refY",3)},e._setMarker=function(t,e){var n=this.el,i=this.cfg.path,a=this.cfg.d;r.isArray(i)&&(i=i.map(function(t){return t.join(" ")}).join("")),e.setAttribute("d",i),n.appendChild(e),a&&n.setAttribute("refX",a/t)},e.update=function(t){var e=this.child;e.attr?e.attr("fill",t):e.setAttribute("fill",t)},t}();t.exports=i},function(t,e,n){var r=n(0),i=function(){function t(t){this.type="clip";var e=document.createElementNS("http://www.w3.org/2000/svg","clipPath");this.el=e,this.id=r.uniqueId("clip_"),e.id=this.id;var n=t._cfg.el;return e.appendChild(n.cloneNode(!0)),this.cfg=t,this}var e=t.prototype;return e.match=function(){return!1},e.remove=function(){var t=this.el;t.parentNode.removeChild(t)},t}();t.exports=i},function(t,e,n){var r=n(0),i=/^p\s*\(\s*([axyn])\s*\)\s*(.*)/i,a=function(){function t(t){function e(){console.log(u.width,u.height),n.setAttribute("width",u.width),n.setAttribute("height",u.height)}var n=document.createElementNS("http://www.w3.org/2000/svg","pattern");n.setAttribute("patternUnits","userSpaceOnUse");var a=document.createElementNS("http://www.w3.org/2000/svg","image");n.appendChild(a);var o=r.uniqueId("pattern_");n.id=o,this.el=n,this.id=o,this.cfg=t;var s=i.exec(t)[2];a.setAttribute("href",s);var u=new Image;return s.match(/^data:/i)||(u.crossOrigin="Anonymous"),u.src=s,u.complete?e():(u.onload=e,u.src=u.src),this}return t.prototype.match=function(t,e){return this.cfg===e},t}();t.exports=a},function(t,e){var n={svg:"svg",circle:"circle",rect:"rect",text:"text",path:"path",foreignObject:"foreignObject",polygon:"polygon",ellipse:"ellipse",image:"image"};t.exports=function(t,e,r){var i=r.target||r.srcElement;if(!n[i.tagName]){for(var a=i.parentNode;a&&!n[a.tagName];)a=a.parentNode;i=a}return this._cfg.el===i?this:this.find(function(t){return t._cfg&&t._cfg.el===i})}},function(t,e,n){var r=n(2),i=n(17),a=n(180),o=n(189),s=n(202),u=n(205),c=n(209),l=n(219),h=n(220),f=n(224),g=n(230),p=n(235),d={DOMUtil:a,DomUtil:a,MatrixUtil:l,PathUtil:f,arrayUtil:o,domUtil:a,eventUtil:s,formatUtil:u,mathUtil:c,matrixUtil:l,objectUtil:h,stringUtil:g,pathUtil:f,typeUtil:p,augment:n(60),clone:n(32),debounce:n(242),deepMix:n(33),each:r,extend:n(59),filter:n(48),group:n(243),groupBy:n(114),groupToMap:n(113),indexOf:n(244),isEmpty:n(54),isEqual:n(35),isEqualWith:n(245),map:n(246),mix:i,pick:n(247),throttle:n(248),toArray:n(23),toString:n(18),uniqueId:n(57)};r([a,o,s,u,c,l,h,f,g,p],function(t){i(d,t)}),t.exports=d},function(t,e,n){t.exports={addEventListener:n(181),createDom:n(66),getBoundingClientRect:n(182),getHeight:n(183),getOuterHeight:n(184),getOuterWidth:n(185),getRatio:n(186),getStyle:n(187),getWidth:n(188),modifyCSS:n(67),requestAnimationFrame:n(68)}},function(t,e){t.exports=function(t,e,n){if(t){if(t.addEventListener)return t.addEventListener(e,n,!1),{remove:function(){t.removeEventListener(e,n,!1)}};if(t.attachEvent)return t.attachEvent("on"+e,n),{remove:function(){t.detachEvent("on"+e,n)}}}}},function(t,e){t.exports=function(t,e){if(t&&t.getBoundingClientRect){var n=t.getBoundingClientRect(),r=document.documentElement.clientTop,i=document.documentElement.clientLeft;return{top:n.top-r,bottom:n.bottom-r,left:n.left-i,right:n.right-i}}return e||null}},function(t,e){t.exports=function(t,e){var n=this.getStyle(t,"height",e);return"auto"===n&&(n=t.offsetHeight),parseFloat(n)}},function(t,e){t.exports=function(t,e){var n=this.getHeight(t,e),r=parseFloat(this.getStyle(t,"borderTopWidth"))||0,i=parseFloat(this.getStyle(t,"paddingTop"))||0,a=parseFloat(this.getStyle(t,"paddingBottom"))||0;return n+r+(parseFloat(this.getStyle(t,"borderBottomWidth"))||0)+i+a}},function(t,e){t.exports=function(t,e){var n=this.getWidth(t,e),r=parseFloat(this.getStyle(t,"borderLeftWidth"))||0,i=parseFloat(this.getStyle(t,"paddingLeft"))||0,a=parseFloat(this.getStyle(t,"paddingRight"))||0;return n+r+(parseFloat(this.getStyle(t,"borderRightWidth"))||0)+i+a}},function(t,e){t.exports=function(){return window.devicePixelRatio?window.devicePixelRatio:2}},function(t,e,n){var r=n(7);t.exports=function(t,e,n){try{return window.getComputedStyle?window.getComputedStyle(t,null)[e]:t.currentStyle[e]}catch(t){return r(n)?null:n}}},function(t,e){t.exports=function(t,e){var n=this.getStyle(t,"width",e);return"auto"===n&&(n=t.offsetWidth),parseFloat(n)}},function(t,e,n){t.exports={contains:n(29),difference:n(190),find:n(191),firstValue:n(192),flatten:n(193),flattenDeep:n(194),getRange:n(195),merge:n(196),pull:n(61),pullAt:n(100),reduce:n(197),remove:n(198),sortBy:n(199),union:n(200),uniq:n(101),valuesOfKey:n(201)}},function(t,e,n){var r=n(48),i=n(29);t.exports=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return r(t,function(t){return!i(e,t)})}},function(t,e,n){var r=n(5),i=n(16),a=n(98);t.exports=function(t,e){var n=void 0;if(r(e)&&(n=e),i(e)&&(n=function(t){return a(t,e)}),n)for(var o=0;o1&&void 0!==arguments[1]?arguments[1]:[];if(r(e))for(var i=0;ie[r])return 1;if(t[r]1){var r=e[0].charAt(0);e.splice(1,0,e[0].substr(1)),e[0]=r}a(e,function(t,n){isNaN(t)||(e[n]=+t)}),t[n]=e}),t):void 0}},function(t,e,n){var r=n(3);t.exports=function(t){var e=0,n=0,i=0,a=0;return r(t)?1===t.length?e=n=i=a=t[0]:2===t.length?(e=i=t[0],n=a=t[1]):3===t.length?(e=t[0],n=a=t[1],i=t[2]):(e=t[0],n=t[1],i=t[2],a=t[3]):e=n=i=a=t,{r1:e,r2:n,r3:i,r4:a}}},function(t,e,n){var r=n(62);t.exports={clamp:n(36),fixedBase:n(210),isDecimal:n(211),isEven:n(212),isInteger:n(213),isNegative:n(214),isNumberEqual:r,isOdd:n(215),isPositive:n(216),maxBy:n(217),minBy:n(218),mod:n(65),snapEqual:r,toDegree:n(64),toInt:n(102),toInteger:n(102),toRadian:n(63)}},function(t,e){t.exports=function(t,e){var n=e.toString(),r=n.indexOf(".");if(-1===r)return Math.round(t);var i=n.substr(r+1).length;return i>20&&(i=20),parseFloat(t.toFixed(i))}},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t%1!=0}},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t%2==0}},function(t,e,n){var r=n(10),i=Number.isInteger?Number.isInteger:function(t){return r(t)&&t%1==0};t.exports=i},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t<0}},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t%2!=0}},function(t,e,n){var r=n(10);t.exports=function(t){return r(t)&&t>0}},function(t,e,n){var r=n(3),i=n(5),a=n(2);t.exports=function(t,e){if(r(t)){var n=t[0],o=void 0;o=i(e)?e(t[0]):t[0][e];var s=void 0;return a(t,function(t){(s=i(e)?e(t):t[e])>o&&(n=t,o=s)}),n}}},function(t,e,n){var r=n(3),i=n(5),a=n(2);t.exports=function(t,e){if(r(t)){var n=t[0],o=void 0;o=i(e)?e(t[0]):t[0][e];var s=void 0;return a(t,function(t){(s=i(e)?e(t):t[e])1?1:c<0?0:c)/2,h=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],f=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],g=0,p=0;p<12;p++){var d=l*h[p]+l,v=o(d,t,n,i,s),x=o(d,e,r,a,u),m=v*v+x*x;g+=f[p]*Math.sqrt(m)}return l*g},u=function(t,e,n,r,i,a,o,s){if(!(Math.max(t,n)Math.max(i,o)||Math.max(e,r)Math.max(a,s))){var u=(t-n)*(a-s)-(e-r)*(i-o);if(u){var c=((t*r-e*n)*(i-o)-(t-n)*(i*s-a*o))/u,l=((t*r-e*n)*(a-s)-(e-r)*(i*s-a*o))/u,h=+c.toFixed(2),f=+l.toFixed(2);if(!(h<+Math.min(t,n).toFixed(2)||h>+Math.max(t,n).toFixed(2)||h<+Math.min(i,o).toFixed(2)||h>+Math.max(i,o).toFixed(2)||f<+Math.min(e,r).toFixed(2)||f>+Math.max(e,r).toFixed(2)||f<+Math.min(a,s).toFixed(2)||f>+Math.max(a,s).toFixed(2)))return{x:c,y:l}}}},c=function(t,e,n){return e>=t.x&&e<=t.x+t.width&&n>=t.y&&n<=t.y+t.height},l=function(t,e,n,r){return null===t&&(t=e=n=r=0),null===e&&(e=t.y,n=t.width,r=t.height,t=t.x),{x:t,y:e,width:n,w:n,height:r,h:r,x2:t+n,y2:e+r,cx:t+n/2,cy:e+r/2,r1:Math.min(n,r)/2,r2:Math.max(n,r)/2,r0:Math.sqrt(n*n+r*r)/2,path:i(t,e,n,r),vb:[t,e,n,r].join(" ")}},h=function(t,e,n,i,a,o,s,u){r(t)||(t=[t,e,n,i,a,o,s,u]);var c=function(t,e,n,r,i,a,o,s){for(var u=[],c=[[],[]],l=void 0,h=void 0,f=void 0,g=void 0,p=0;p<2;++p)if(0===p?(h=6*t-12*n+6*i,l=-3*t+9*n-9*i+3*o,f=3*n-3*t):(h=6*e-12*r+6*a,l=-3*e+9*r-9*a+3*s,f=3*r-3*e),Math.abs(l)<1e-12){if(Math.abs(h)<1e-12)continue;(g=-f/h)>0&&g<1&&u.push(g)}else{var d=h*h-4*f*l,v=Math.sqrt(d);if(!(d<0)){var x=(-h+v)/(2*l);x>0&&x<1&&u.push(x);var m=(-h-v)/(2*l);m>0&&m<1&&u.push(m)}}for(var y=u.length,b=y,_=void 0;y--;)_=1-(g=u[y]),c[0][y]=_*_*_*t+3*_*_*g*n+3*_*g*g*i+g*g*g*o,c[1][y]=_*_*_*e+3*_*_*g*r+3*_*g*g*a+g*g*g*s;return c[0][b]=t,c[1][b]=e,c[0][b+1]=o,c[1][b+1]=s,c[0].length=c[1].length=b+2,{min:{x:Math.min.apply(0,c[0]),y:Math.min.apply(0,c[1])},max:{x:Math.max.apply(0,c[0]),y:Math.max.apply(0,c[1])}}}.apply(null,t);return l(c.min.x,c.min.y,c.max.x-c.min.x,c.max.y-c.min.y)},f=function(t,e,n,r,i,a,o,s,u){var c=1-u,l=Math.pow(c,3),h=Math.pow(c,2),f=u*u,g=f*u,p=t+2*u*(n-t)+f*(i-2*n+t),d=e+2*u*(r-e)+f*(a-2*r+e),v=n+2*u*(i-n)+f*(o-2*i+n),x=r+2*u*(a-r)+f*(s-2*a+r);return{x:l*t+3*h*u*n+3*c*u*u*i+g*o,y:l*e+3*h*u*r+3*c*u*u*a+g*s,m:{x:p,y:d},n:{x:v,y:x},start:{x:c*t+u*n,y:c*e+u*r},end:{x:c*i+u*o,y:c*a+u*s},alpha:90-180*Math.atan2(p-v,d-x)/Math.PI}},g=function(t,e,n){if(!function(t,e){return t=l(t),e=l(e),c(e,t.x,t.y)||c(e,t.x2,t.y)||c(e,t.x,t.y2)||c(e,t.x2,t.y2)||c(t,e.x,e.y)||c(t,e.x2,e.y)||c(t,e.x,e.y2)||c(t,e.x2,e.y2)||(t.xe.x||e.xt.x)&&(t.ye.y||e.yt.y)}(h(t),h(e)))return n?0:[];for(var r=~~(s.apply(0,t)/8),i=~~(s.apply(0,e)/8),a=[],o=[],g={},p=n?0:[],d=0;d=0&&C<=1&&I>=0&&I<=1&&(n?p++:p.push({x:P.x,y:P.y,t1:C,t2:I}))}}return p};t.exports=function(t,e){return function(t,e,n){t=a(t),e=a(e);for(var r=void 0,i=void 0,o=void 0,s=void 0,u=void 0,c=void 0,l=void 0,h=void 0,f=void 0,p=void 0,d=n?0:[],v=0,x=t.length;v=3&&(3===t.length&&e.push("Q"),e=e.concat(t[1])),2===t.length&&e.push("L"),e=e.concat(t[t.length-1])})}(t,e,r));else{var a=[].concat(t);"M"===a[0]&&(a[0]="L");for(var o=0;o<=r-1;o++)i.push(a)}return i}t.exports=function(t,e){if(1===t.length)return t;var n=t.length-1,i=e.length-1,a=n/i,o=[];if(1===t.length&&"M"===t[0][0]){for(var s=0;s=0;g--)u=s[g].index,"add"===s[g].type?t.splice(u,0,[].concat(t[u])):t.splice(u,1)}if((a=t.length)0)){t[a]=e[a];break}i=r(i,t[a-1],1)}t[a]=["Q"].concat(i.reduce(function(t,e){return t.concat(e)},[]));break;case"T":t[a]=["T"].concat(i[0]);break;case"C":if(i.length<3){if(!(a>0)){t[a]=e[a];break}i=r(i,t[a-1],2)}t[a]=["C"].concat(i.reduce(function(t,e){return t.concat(e)},[]));break;case"S":if(i.length<2){if(!(a>0)){t[a]=e[a];break}i=r(i,t[a-1],1)}t[a]=["S"].concat(i.reduce(function(t,e){return t.concat(e)},[]));break;default:t[a]=e[a]}return t}},function(t,e,n){var r={lc:n(231),lowerCase:n(111),lowerFirst:n(232),substitute:n(233),uc:n(234),upperCase:n(112),upperFirst:n(58)};t.exports=r},function(t,e,n){t.exports=n(111)},function(t,e,n){var r=n(18);t.exports=function(t){var e=r(t);return e.charAt(0).toLowerCase()+e.substring(1)}},function(t,e){t.exports=function(t,e){return t&&e?t.replace(/\\?\{([^{}]+)\}/g,function(t,n){return"\\"===t.charAt(0)?t.slice(1):void 0===e[n]?"":e[n]}):t}},function(t,e,n){t.exports=n(112)},function(t,e,n){var r=n(6),i={getType:n(55),isArray:n(3),isArrayLike:n(8),isBoolean:n(53),isFunction:n(5),isNil:n(7),isNull:n(236),isNumber:n(10),isObject:n(31),isObjectLike:n(34),isPlainObject:n(16),isPrototype:n(56),isType:r,isUndefined:n(237),isString:n(12),isRegExp:n(238),isDate:n(239),isArguments:n(240),isError:n(241)};t.exports=i},function(t,e){t.exports=function(t){return null===t}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"RegExp")}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"Date")}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"Arguments")}},function(t,e,n){var r=n(6);t.exports=function(t){return r(t,"Error")}},function(t,e){t.exports=function(t,e,n){var r=void 0;return function(){var i=this,a=arguments,o=n&&!r;clearTimeout(r),r=setTimeout(function(){r=null,n||t.apply(i,a)},e),o&&t.apply(i,a)}}},function(t,e,n){var r=n(113);t.exports=function(t,e){if(!e)return[t];var n=r(t,e),i=[];for(var a in n)i.push(n[a]);return i}},function(t,e,n){var r=n(8);t.exports=function(t,e){if(!r(t))return-1;var n=Array.prototype.indexOf;if(n)return n.call(t,e);for(var i=-1,a=0;ae?(r&&(clearTimeout(r),r=null),s=c,o=t.apply(i,a),r||(i=a=null)):r||!1===n.trailing||(r=setTimeout(u,l)),o};return c.cancel=function(){clearTimeout(r),s=0,r=i=a=null},c}},function(t,e,n){function r(t,e,n,r){var i=t.getBBox(),a=i.width,o=i.height,s={x:e,y:n,textAlign:"center"};switch(r){case 0:s.y-=o/2,s.textAlign="left";break;case 1:s.y-=o/2,s.textAlign="right";break;case 2:s.y+=o/2,s.textAlign="right";break;case 3:s.y+=o/2,s.textAlign="left";break;case 5:s.y-=o/2;break;case 6:s.y+=o/2;break;case 7:s.x+=a/2,s.textAlign="left";break;case 8:s.x-=a/2,s.textAlign="right"}return t.attr(s),t.getBBox()}var i=n(117);t.exports=function(t){for(var e,n,a,o,s,u=new i,c=[],l=0;lr.width||n.height>r.height?i.push(t[a]):n.width*n.height>r.width*r.height&&i.push(t[a]);for(var o=0;o0?e="left":t[0]<0&&(e="right"),e},n.getLinePath=function(){var t=this.get("center"),e=t.x,n=t.y,r=this.get("radius"),i=r,a=this.get("startAngle"),o=this.get("endAngle"),s=this.get("inner"),u=[];if(Math.abs(o-a)===2*Math.PI)u=[["M",e,n],["m",0,-i],["a",r,i,0,1,1,0,2*i],["a",r,i,0,1,1,0,-2*i],["z"]];else{var c=this._getCirclePoint(a),l=this._getCirclePoint(o),h=Math.abs(o-a)>Math.PI?1:0,f=a>o?0:1;if(s){var g=this.getSideVector(s*r,c),p=this.getSideVector(s*r,l),d={x:g[0]+e,y:g[1]+n},v={x:p[0]+e,y:p[1]+n};u=[["M",d.x,d.y],["L",c.x,c.y],["A",r,i,0,h,f,l.x,l.y],["L",v.x,v.y],["A",r*s,i*s,0,h,Math.abs(f-1),d.x,d.y]]}else u=[["M",e,n],["L",c.x,c.y],["A",r,i,0,h,f,l.x,l.y],["L",e,n]]}return u},n.addLabel=function(e,n,r){var i=this.get("label").offset||this.get("_labelOffset")||.001;n=this.getSidePoint(n,i),t.prototype.addLabel.call(this,e,n,r)},n.autoRotateLabels=function(){var t=this.get("ticks"),e=this.get("labelRenderer");if(e&&t.length>12){var n=this.get("radius"),r=this.get("startAngle"),a=this.get("endAngle")-r,o=a/(t.length-1),s=Math.sin(o/2)*n*2,u=this.getMaxLabelWidth(e);i.each(e.get("group").get("children"),function(e,n){var i=t[n].value*a+r,o=i%(2*Math.PI);uMath.PI&&(i-=Math.PI),i-=Math.PI/2,e.attr("textAlign","center")):o>Math.PI/2?i-=Math.PI:oi.x)&&(c=!0);var l=o.vertical([],u,c);return o.scale([],l,t*n)},n.getAxisVector=function(){var t=this.get("start"),e=this.get("end");return[e.x-t.x,e.y-t.y]},n.getLinePath=function(){var t=this.get("start"),e=this.get("end"),n=[];return n.push(["M",t.x,t.y]),n.push(["L",e.x,e.y]),n},n.getTickEnd=function(t,e){var n=this.getSideVector(e);return{x:t.x+n[0],y:t.y+n[1]}},n.getTickPoint=function(t){var e=this.get("start"),n=this.get("end"),r=n.x-e.x,i=n.y-e.y;return{x:e.x+r*t,y:e.y+i*t}},n.renderTitle=function(){var t=this.get("title"),e=this.getTickPoint(.5),n=t.offset;if(a.isNil(n)){n=20;var r=this.get("labelsGroup");if(r){n+=this.getMaxLabelWidth(r)+(this.get("label").offset||this.get("_labelOffset"))}}var i=t.textStyle,s=a.mix({},i);if(t.text){var u=this.getAxisVector();if(t.autoRotate&&a.isNil(i.rotate)){var c=0;if(!a.snapEqual(u[1],0)){var l=[u[0],u[1]];c=o.angleTo(l,[1,0],!0)}s.rotate=c*(180/Math.PI)}else a.isNil(i.rotate)||(s.rotate=i.rotate/180*Math.PI);var h,f=this.getSideVector(n),g=t.position;h="start"===g?{x:this.get("start").x+f[0],y:this.get("start").y+f[1]}:"end"===g?{x:this.get("end").x+f[0],y:this.get("end").y+f[1]}:{x:e.x+f[0],y:e.y+f[1]},s.x=h.x,s.y=h.y,s.text=t.text;var p=this.get("group").addShape("Text",{zIndex:2,attrs:s});p.name="axis-title",this.get("appendInfo")&&p.setSilent("appendInfo",this.get("appendInfo"))}},n.autoRotateLabels=function(){var t=this.get("labelRenderer"),e=this.get("title");if(t){var n=t.get("group").get("children"),r=this.get("label").offset,i=e?e.offset:48;if(i<0)return;var o,s,u=this.getAxisVector();if(a.snapEqual(u[0],0)&&e&&e.text)(s=this.getMaxLabelWidth(t))>i-r-12&&(o=-1*Math.acos((i-r-12)/s));else if(a.snapEqual(u[1],0)&&n.length>1){var c=Math.abs(this._getAvgLabelLength(t));(s=this.getMaxLabelWidth(t))>c&&(o=Math.asin(1.25*(i-r-12)/s))}if(o){var l=this.get("factor");a.each(n,function(t){t.rotateAtStart(o),a.snapEqual(u[1],0)&&(l>0?t.attr("textAlign","left"):t.attr("textAlign","right"))})}}},n.autoHideLabels=function(){var t,e,n=this.get("labelRenderer");if(n){var r=n.get("group").get("children"),i=this.getAxisVector();if(r.length<2)return;if(a.snapEqual(i[0],0)){var o=this.getMaxLabelHeight(n)+8,s=Math.abs(this._getAvgLabelHeightSpace(n));o>s&&(t=o,e=s)}else if(a.snapEqual(i[1],0)&&r.length>1){var u=this.getMaxLabelWidth(n)+8,c=Math.abs(this._getAvgLabelLength(n));u>c&&(t=u,e=c)}if(t&&e){var l=Math.ceil(t/e);a.each(r,function(t,e){e%l!=0&&t.attr("text","")})}}},e}(i);t.exports=s},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(14),o=i.MatrixUtil,s=i.PathUtil,u=o.vec2,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"polyline"})},n.getLinePath=function(){var t=this.get("tickPoints"),e=this.get("start"),n=this.get("end"),r=[];r.push(e.x),r.push(e.y),i.each(t,function(t){r.push(t.x),r.push(t.y)}),r.push(n.x),r.push(n.y);var a=s.catmullRomToBezier(r);return a.unshift(["M",e.x,e.y]),a},n.getTickPoint=function(t,e){return this.get("tickPoints")[e]},n.getTickEnd=function(t,e,n){var r=this.get("tickLine"),i=e||r.length,a=this.getSideVector(i,t,n);return{x:t.x+a[0],y:t.y+a[1]}},n.getSideVector=function(t,e,n){var r;if(0===n){if((r=this.get("start")).x===e.x&&r.y===e.y)return[0,0]}else{r=this.get("tickPoints")[n-1]}var i=[e.x-r.x,e.y-r.y],a=u.normalize([],i),o=u.vertical([],a,!1);return u.scale([],o,t)},e}(a);t.exports=c},function(t,e,n){t.exports={Guide:n(11),Arc:n(257),DataMarker:n(258),DataRegion:n(259),Html:n(260),Image:n(261),Line:n(262),Region:n(263),Text:n(264)}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){var n,r=t.x-e.x,i=t.y-e.y;return 0===i?n=r<0?s/2:270*s/180:r>=0&&i>0?n=2*s-u(r/i):r<=0&&i<0?n=s-u(r/i):r>0&&i<0?n=s+u(-r/i):r<0&&i>0&&(n=u(r/-i)),n}var a=n(1),o=n(11),s=Math.PI,u=Math.atan,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{name:"arc",start:null,end:null,style:{stroke:"#999",lineWidth:1}})},n.render=function(t,e){var n=this.parsePoint(t,this.get("start")),r=this.parsePoint(t,this.get("end"));if(n&&r){var o,u=t.getCenter(),c=Math.sqrt((n.x-u.x)*(n.x-u.x)+(n.y-u.y)*(n.y-u.y)),l=i(n,u),h=i(r,u);if(hs?1:0;o=[["M",n.x,n.y],["A",c,c,0,f,1,r.x,r.y]]}var g=e.addShape("path",{zIndex:this.get("zIndex"),attrs:a.mix({path:o},this.get("style"))});g.name="guide-arc",this.get("appendInfo")&&g.setSilent("appendInfo",this.get("appendInfo")),this.set("el",g)}},e}(o);t.exports=c},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"dataMarker",zIndex:1,top:!0,position:null,style:{point:{r:3,fill:"#FFFFFF",stroke:"#1890FF",lineWidth:2},line:{stroke:"#A3B1BF",lineWidth:1},text:{fill:"#000000",opacity:.65,fontSize:12,textAlign:"start"}},display:{point:!0,line:!0,text:!0},lineLength:20,direction:"upward",autoAdjust:!0})},n.render=function(t,e){var n=this.parsePoint(t,this.get("position"));if(n){var r=e.addGroup();r.name="guide-data-marker";var i,a,o=this._getElementPosition(n),s=this.get("display");if(s.line){var u=o.line;i=this._drawLine(u,r)}if(s.text&&this.get("content")){var c=o.text;a=this._drawText(c,r)}if(s.point){var l=o.point;this._drawPoint(l,r)}if(this.get("autoAdjust")){var h=r.getBBox(),f=h.minX,g=h.minY,p=h.maxX,d=h.maxY,v=t.start,x=t.end;if(a){f<=v.x&&a.attr("textAlign","start"),p>=x.x&&a.attr("textAlign","end");var m=this.get("direction");if("upward"===m&&g<=x.y||"upward"!==m&&d>=v.y){var y,b;"upward"===m&&g<=x.y?(y="top",b=1):(y="bottom",b=-1),a.attr("textBaseline",y);var _=0;if(this.get("display").line){_=this.get("lineLength");var M=[["M",n.x,n.y],["L",n.x,n.y+_*b]];i.attr("path",M)}var S=n.y+(_+2)*b;a.attr("y",S)}}}this.get("appendInfo")&&r.setSilent("appendInfo",this.get("appendInfo")),this.set("el",r)}},n._getElementPosition=function(t){var e=t.x,n=t.y,r=this.get("display").line?this.get("lineLength"):0,i=this.get("direction");this.get("style").text.textBaseline="upward"===i?"bottom":"top";var a="upward"===i?-1:1;return{point:{x:e,y:n},line:[{x:e,y:n},{x:e,y:r*a+n}],text:{x:e,y:(r+2)*a+n}}},n._drawLine=function(t,e){var n=this.get("style").line,r=[["M",t[0].x,t[0].y],["L",t[1].x,t[1].y]];return e.addShape("path",{attrs:i.mix({path:r},n)})},n._drawText=function(t,e){var n=this.get("style").text;return e.addShape("text",{attrs:i.mix({text:this.get("content")},n,t)})},n._drawPoint=function(t,e){var n=this.get("style").point;return e.addShape("circle",{attrs:i.mix({},n,t)})},e}(n(11));t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(118),o=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"dataRegion",start:null,end:null,content:"",style:{region:{lineWidth:0,fill:"#000000",opacity:.04},text:{textAlign:"center",textBaseline:"bottom",fontSize:12,fill:"rgba(0, 0, 0, .65)"}}})},n.render=function(t,e,n){var r=this.get("lineLength")||0,a=this._getRegionData(t,n);if(a.length){var o=this._getBBox(a),s=[];s.push(["M",a[0].x,o.yMin-r]);for(var u=0,c=a.length;u=n){var d=this.parsePoint(t,[p[s],p[u]]);d&&h.push(d)}if(p[s]===l)break}return h},n._getBBox=function(t){for(var e=[],n=[],r=0;r');r.appendChild(o);var s=this.get("htmlContent")||this.get("html");if(i.isFunction(s)){s=s(this.get("xScales"),this.get("yScales"))}var u=a.createDom(s);o.appendChild(u),a.modifyCSS(o,{position:"absolute"}),this._setDomPosition(o,u,n),this.set("el",o)}},n._setDomPosition=function(t,e,n){var r=this.get("alignX"),i=this.get("alignY"),o=a.getOuterWidth(e),s=a.getOuterHeight(e),u={x:n.x,y:n.y};"middle"===r&&"top"===i?u.x-=Math.round(o/2):"middle"===r&&"bottom"===i?(u.x-=Math.round(o/2),u.y-=Math.round(s)):"left"===r&&"bottom"===i?u.y-=Math.round(s):"left"===r&&"middle"===i?u.y-=Math.round(s/2):"left"===r&&"top"===i?(u.x=n.x,u.y=n.y):"right"===r&&"bottom"===i?(u.x-=Math.round(o),u.y-=Math.round(s)):"right"===r&&"middle"===i?(u.x-=Math.round(o),u.y-=Math.round(s/2)):"right"===r&&"top"===i?u.x-=Math.round(o):(u.x-=Math.round(o/2),u.y-=Math.round(s/2));var c=this.get("offsetX");c&&(u.x+=c);var l=this.get("offsetY");l&&(u.y+=l),a.modifyCSS(t,{top:Math.round(u.y)+"px",left:Math.round(u.x)+"px",visibility:"visible",zIndex:this.get("zIndex")})},n.clear=function(){var t=this.get("el");t&&t.parentNode&&t.parentNode.removeChild(t)},e}(n(11));t.exports=o},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"image",start:null,end:null,src:null,offsetX:null,offsetY:null})},n.render=function(t,e){var n=this.parsePoint(t,this.get("start"));if(n){var r={x:n.x,y:n.y};if(r.img=this.get("src"),this.get("end")){var i=this.parsePoint(t,this.get("end"));if(!i)return;r.width=i.x-n.x,r.height=i.y-n.y}else r.width=this.get("width")||32,r.height=this.get("height")||32;this.get("offsetX")&&(r.x+=this.get("offsetX")),this.get("offsetY")&&(r.y+=this.get("offsetY"));var a=e.addShape("Image",{zIndex:1,attrs:r});a.name="guide-image",this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo")),this.set("el",a)}},e}(n(11));t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(11),o=i.MatrixUtil.vec2,s=n(9).FONT_FAMILY,u=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"line",start:null,end:null,lineStyle:{stroke:"#000",lineWidth:1},text:{position:"end",autoRotate:!0,style:{fill:"#999",fontSize:12,fontWeight:500,fontFamily:s},content:null}})},n.render=function(t,e){var n=this.parsePoint(t,this.get("start")),r=this.parsePoint(t,this.get("end"));if(n&&r){var i=e.addGroup({viewId:e.get("viewId")});this._drawLines(n,r,i);var a=this.get("text");a&&a.content&&this._drawText(n,r,i),this.set("el",i)}},n._drawLines=function(t,e,n){var r=[["M",t.x,t.y],["L",e.x,e.y]],a=n.addShape("Path",{attrs:i.mix({path:r},this.get("lineStyle"))});a.name="guide-line",this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo"))},n._drawText=function(t,e,n){var r,a=this.get("text"),s=a.position,u=a.style||{};((r="start"===s?0:"center"===s?.5:i.isString(s)&&-1!==s.indexOf("%")?parseInt(s,10)/100:i.isNumber(s)?s:1)>1||r<0)&&(r=1);var c={x:t.x+(e.x-t.x)*r,y:t.y+(e.y-t.y)*r};if(a.offsetX&&(c.x+=a.offsetX),a.offsetY&&(c.y+=a.offsetY),c.text=a.content,c=i.mix({},c,u),a.autoRotate&&i.isNil(u.rotate)){var l=o.angleTo([e.x-t.x,e.y-t.y],[1,0],1);c.rotate=l}else i.isNil(u.rotate)||(c.rotate=u.rotate*Math.PI/180);var h=n.addShape("Text",{attrs:c});h.name="guide-line-text",this.get("appendInfo")&&h.setSilent("appendInfo",this.get("appendInfo"))},e}(a);t.exports=u},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"region",zIndex:1,start:null,end:null,style:{lineWidth:0,fill:"#CCD7EB",opacity:.4}})},n.render=function(t,e){var n=this.get("style"),r=this._getPath(t);if(r.length){var a=e.addShape("path",{zIndex:this.get("zIndex"),attrs:i.mix({path:r},n)});a.name="guide-region",this.get("appendInfo")&&a.setSilent("appendInfo",this.get("appendInfo")),this.set("el",a)}},n._getPath=function(t){var e=this.parsePoint(t,this.get("start")),n=this.parsePoint(t,this.get("end"));if(!e||!n)return[];return[["M",e.x,e.y],["L",n.x,e.y],["L",n.x,n.y],["L",e.x,n.y],["z"]]},e}(n(11));t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{name:"text",position:null,content:null,style:{fill:"#999",fontSize:12,fontWeight:500,textAlign:"center"},offsetX:null,offsetY:null,top:!0})},n.render=function(t,e){var n=this.parsePoint(t,this.get("position"));if(n){var r=i.mix({},this.get("style")),a=this.get("offsetX"),o=this.get("offsetY");a&&(n.x+=a),o&&(n.y+=o),r.rotate&&(r.rotate=r.rotate*Math.PI/180);var s=e.addShape("Text",{zIndex:this.get("zIndex"),attrs:i.mix({text:this.get("content")},r,n)});s.name="guide-text",this.get("appendInfo")&&s.setSilent("appendInfo",this.get("appendInfo")),this.set("el",s)}},e}(n(11));t.exports=a},function(t,e,n){var r=n(116);t.exports=r},function(t,e,n){t.exports={Category:n(119),CatHtml:n(121),CatPageHtml:n(267),Color:n(268),Size:n(276),CircleSize:n(277)}},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function i(t,e){return t.getElementsByClassName(e)[0]}var a=n(1),o=n(121),s=n(9).FONT_FAMILY,u=a.DomUtil,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return a.mix({},e,{type:"category-page-legend",container:null,caretStyle:{fill:"rgba(0,0,0,0.65)"},pageNumStyle:{display:"inline-block",fontSize:"12px",fontFamily:s,cursor:"default"},slipDomStyle:{width:"auto",height:"auto",position:"absolute"},slipTpl:'

    1

    /2

    ',slipWidth:65,legendOverflow:"unset"})},n.render=function(){t.prototype._renderHTML.call(this),this._renderFlipPage()},n._renderFlipPage=function(){var t=this.get("legendWrapper"),e=i(t,"g2-legend-list"),n=this.get("position"),r=this.get("layout"),o="right"===n||"left"===n||"vertical"===r,s=o?"block":"inline-block",c=t.offsetHeight;if(t.scrollHeight>c){var l=this.get("slipTpl"),h=u.createDom(l),f=i(h,"g2-caret-up"),g=i(h,"g2-caret-down");u.modifyCSS(f,this.get("caretStyle")),u.modifyCSS(f,{fill:"rgba(0,0,0,0.25)"}),u.modifyCSS(g,this.get("caretStyle"));var p=i(h,"cur-pagenum"),d=i(h,"next-pagenum"),v=this.get("pageNumStyle");if(u.modifyCSS(p,a.mix({},v,{paddingLeft:"10px"})),u.modifyCSS(d,a.mix({},v,{opacity:.3,paddingRight:"10px"})),u.modifyCSS(h,a.mix({},this.get("slipDomStyle"),o?{top:c+"px"}:{right:0,top:"50%",transform:"translate(0, -50%)"})),t.style.overflow=this.get("legendOverflow"),t.appendChild(h),!o){var x=Math.max(t.offsetWidth-10-h.offsetWidth,0);u.modifyCSS(e,{maxWidth:x+"px"})}for(var m=e.childNodes,y=0,b=1,_=[],M=0;Mc&&(b++,_.forEach(function(t){t.style.display="none"}),_=[]),_.push(m[M]);d.innerText="/"+b,m.forEach(function(t){t.style.display=s,(y=t.offsetTop+t.offsetHeight)>c&&(t.style.display="none")}),f.addEventListener("click",function(){if(m[0].style.display!==s){var t=-1;m.forEach(function(e,n){e.style.display===s&&(t=-1===t?n:t,e.style.display="none")});for(var e=t-1;e>=0&&(m[e].style.display=s,y=m[t-1].offsetTop+m[t-1].offsetHeight,m[e].style.display="none",y<=c);e--)m[e].style.display=s;var n=Number.parseInt(p.innerText,10)-1;f.style.fill=1===n?"rgba(0,0,0,0.25)":"rgba(0,0,0,0.65)",g.style.fill="rgba(0,0,0,0.65)",p.innerText=n}}),g.addEventListener("click",function(){if(m[m.length-1].style.display!==s){var t=-1;m.forEach(function(e,n){e.style.display===s&&(t=n,e.style.display="none")});for(var e=t+1;e0){var p=i.toRGB(u[g-1].color);c+=1-u[g].percentage+":"+p+" "}h.addShape("text",{attrs:a.mix({},{x:r+this.get("textOffset")/2,y:o-u[g].percentage*o,text:this._formatItemValue(u[g].value)+""},this.get("textStyle"),{textAlign:"start"})})}}else{c+="l (0) ";for(var d=0;d0){var v=i.toRGB(u[d-1].color);c+=u[d].percentage+":"+v+" "}c+=u[d].percentage+":"+n+" ",h.addShape("text",{attrs:a.mix({},{x:u[d].percentage*r,y:o+5+this.get("textOffset"),text:this._formatItemValue(u[d].value)+""},this.get("textStyle"))})}}h.addShape("rect",{attrs:{x:0,y:0,width:r,height:o,fill:c,strokeOpacity:0}}),h.addShape("path",{attrs:a.mix({path:l},this.get("lineStyle"))}),h.move(0,e)},e}(n(49));t.exports=o},function(t,e,n){t.exports={Position:n(270),Color:n(271),Shape:n(272),Size:n(273),Opacity:n(274),ColorUtil:n(122)}},function(t,e,n){var r=n(7),i=n(3),a=n(2),o=function(t){function e(e){var n;return n=t.call(this,e)||this,n.names=["x","y"],n.type="position",n}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}(e,t);return e.prototype.mapping=function(t,e){var n,o,s,u=this.scales,c=this.coord,l=u[0],h=u[1];if(r(t)||r(e))return[];if(i(e)&&i(t)){n=[],o=[];for(var f=0,g=0,p=t.length,d=e.length;f-1}return!1},_getRange:function(t,e){var n=t+e;return n=n>100?100:n,n=n<0?0:n},_updateStatus:function(t,e){var n="x"===t?this.get("width"):this.get("height");t=r.upperFirst(t);var i,a=this.get("range"),o=this.get("page"+t),s=this.get("currentTarget"),u=this.get("rangeStash"),c="vertical"===this.get("layout")?-1:1,l=e["page"+t],h=(l-o)/n*100*c;a[1]<=a[0]?(this._isElement(s,"minHandleElement")||this._isElement(s,"maxHandleElement"))&&(a[0]=this._getRange(h,a[0]),a[1]=this._getRange(h,a[0])):(this._isElement(s,"minHandleElement")&&(a[0]=this._getRange(h,a[0])),this._isElement(s,"maxHandleElement")&&(a[1]=this._getRange(h,a[1]))),this._isElement(s,"middleHandleElement")&&(i=u[1]-u[0],a[0]=this._getRange(h,a[0]),a[1]=a[0]+i,a[1]>100&&(a[1]=100,a[0]=a[1]-i)),this.emit("sliderchange",{range:a}),this.set("page"+t,l),this._renderUI(),this.get("canvas").draw()},_onMouseDown:function(t){var e=t.currentTarget,n=t.event,r=this.get("range");n.stopPropagation(),n.preventDefault(),this.set("pageX",n.pageX),this.set("pageY",n.pageY),this.set("currentTarget",e),this.set("rangeStash",[r[0],r[1]]),this._bindCanvasEvents()},_bindCanvasEvents:function(){var t=this.get("canvas").get("containerDOM");this.onMouseMoveListener=i.addEventListener(t,"mousemove",r.wrapBehavior(this,"_onCanvasMouseMove")),this.onMouseUpListener=i.addEventListener(t,"mouseup",r.wrapBehavior(this,"_onCanvasMouseUp")),this.onMouseLeaveListener=i.addEventListener(t,"mouseleave",r.wrapBehavior(this,"_onCanvasMouseUp"))},_onCanvasMouseMove:function(t){if(!this._mouseOutArea(t)){"horizontal"===this.get("layout")?this._updateStatus("x",t):this._updateStatus("y",t)}},_onCanvasMouseUp:function(){this._removeDocumentEvents()},_removeDocumentEvents:function(){this.onMouseMoveListener.remove(),this.onMouseUpListener.remove()},_mouseOutArea:function(t){var e=this.get("canvas").get("el").getBoundingClientRect(),n=this.get("parent"),r=n.getBBox(),i=n.attr("matrix")[6],a=n.attr("matrix")[7],o=i+r.width,s=a+r.height,u=t.clientX-e.x,c=t.clientY-e.y;return uo||cs}}),t.exports=o},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"size-legend",width:100,height:200,_unslidableElementStyle:{fill:"#4E7CCC",fillOpacity:1},frontMiddleBarStyle:{fill:"rgb(64, 141, 251)"}})},n._renderSliderShape=function(){var t=this.get("slider").get("backgroundElement"),e=this.get("layout"),n=this.get("width"),r=this.get("height"),a=this.get("height")/2,o=this.get("frontMiddleBarStyle"),s="vertical"===e?[[0,0],[n,0],[n,r],[n-4,r]]:[[0,a+r/2],[0,a+r/2-4],[n,a-r/2],[n,a+r/2]];return this._addMiddleBar(t,"Polygon",i.mix({points:s},o))},n._renderUnslidable=function(){var t=this.get("layout"),e=this.get("width"),n=this.get("height"),r=this.get("frontMiddleBarStyle"),a="vertical"===t?[[0,0],[e,0],[e,n],[e-4,n]]:[[0,n],[0,n-4],[e,0],[e,n]];this.get("group").addGroup().addShape("Polygon",{attrs:i.mix({points:a},r)});var o=this._formatItemValue(this.get("firstItem").value),s=this._formatItemValue(this.get("lastItem").value);"vertical"===this.get("layout")?(this._addText(e+10,n-3,o),this._addText(e+10,3,s)):(this._addText(0,n,o),this._addText(e,n,s))},n._addText=function(t,e,n){var r=this.get("group").addGroup(),a=this.get("textStyle"),o=this.get("titleShape"),s=this.get("titleGap");o&&(s+=o.getBBox().height),"vertical"===this.get("layout")?r.addShape("text",{attrs:i.mix({x:t+this.get("textOffset"),y:e,text:0===n?"0":n},a)}):(e+=s+this.get("textOffset")-20,o||(e+=10),r.addShape("text",{attrs:i.mix({x:t,y:e,text:0===n?"0":n},a)}))},e}(n(49));t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{type:"size-circle-legend",width:100,height:200,_unslidableCircleStyle:{stroke:"rgb(99, 161, 248)",fill:"rgb(99, 161, 248)",fillOpacity:.3,lineWidth:1.5},triggerAttr:{fill:"white",shadowOffsetX:-2,shadowOffsetY:2,shadowBlur:10,shadowColor:"#ccc"},frontMiddleBarStyle:{fill:"rgb(64, 141, 251)"}})},n._renderSliderShape=function(){var t=this.get("slider").get("backgroundElement"),e=this.get("layout"),n="vertical"===e?2:this.get("width"),r="vertical"===e?this.get("height"):2,a=this.get("height")/2,o=this.get("frontMiddleBarStyle"),s="vertical"===e?[[0,0],[n,0],[n,r],[0,r]]:[[0,a+r],[0,a-r],[5+n-4,a-r],[5+n-4,a+r]];return this._addMiddleBar(t,"Polygon",i.mix({points:s},o))},n._addHorizontalTrigger=function(t,e,n,r){var a=this.get("slider").get(t+"HandleElement"),o=-this.get("height")/2,s=a.addShape("circle",{attrs:i.mix({x:0,y:o,r:r},e)}),u=a.addShape("text",{attrs:i.mix(n,{x:0,y:o+r+10,textAlign:"center",textBaseline:"middle"})}),c="vertical"===this.get("layout")?"ns-resize":"ew-resize";s.attr("cursor",c),u.attr("cursor",c),this.set(t+"ButtonElement",s),this.set(t+"TextElement",u)},n._addVerticalTrigger=function(t,e,n,r){var a=this.get("slider").get(t+"HandleElement"),o=a.addShape("circle",{attrs:i.mix({x:0,y:0,r:r},e)}),s=a.addShape("text",{attrs:i.mix(n,{x:r+10,y:0,textAlign:"start",textBaseline:"middle"})}),u="vertical"===this.get("layout")?"ns-resize":"ew-resize";o.attr("cursor",u),s.attr("cursor",u),this.set(t+"ButtonElement",o),this.set(t+"TextElement",s)},n._renderTrigger=function(){var t=this.get("firstItem"),e=this.get("lastItem"),n=this.get("layout"),r=this.get("textStyle"),a=this.get("triggerAttr"),o=i.mix({},a),s=i.mix({},a),u=i.mix({text:this._formatItemValue(t.value)+""},r),c=i.mix({text:this._formatItemValue(e.value)+""},r);"vertical"===n?(this._addVerticalTrigger("min",o,u,5),this._addVerticalTrigger("max",s,c,16)):(this._addHorizontalTrigger("min",o,u,5),this._addHorizontalTrigger("max",s,c,16))},n._bindEvents=function(){var t=this;if(this.get("slidable")){this.get("slider").on("sliderchange",function(e){var n=e.range,r=t.get("firstItem").value,i=t.get("lastItem").value,a=r+n[0]/100*(i-r),o=r+n[1]/100*(i-r),s=5+n[0]/100*11,u=5+n[1]/100*11;t._updateElement(a,o,s,u);var c=new Event("itemfilter",e,!0,!0);c.range=[a,o],t.emit("itemfilter",c)})}},n._updateElement=function(e,n,r,i){t.prototype._updateElement.call(this,e,n);var a=this.get("minTextElement"),o=this.get("maxTextElement"),s=this.get("minButtonElement"),u=this.get("maxButtonElement");s.attr("r",r),u.attr("r",i);if("vertical"===this.get("layout"))a.attr("x",r+10),o.attr("x",i+10);else{var c=-this.get("height")/2;a.attr("y",c+r+10),o.attr("y",c+i+10)}},n._addCircle=function(t,e,n,r,a){var o=this.get("group").addGroup(),s=this.get("_unslidableCircleStyle"),u=this.get("textStyle"),c=this.get("titleShape"),l=this.get("titleGap");c&&(l+=c.getBBox().height),o.addShape("circle",{attrs:i.mix({x:t,y:e+l,r:0===n?1:n},s)}),"vertical"===this.get("layout")?o.addShape("text",{attrs:i.mix({x:a+20+this.get("textOffset"),y:e+l,text:0===r?"0":r},u)}):o.addShape("text",{attrs:i.mix({x:t,y:e+l+a+13+this.get("textOffset"),text:0===r?"0":r},u)})},n._renderUnslidable=function(){var t=this.get("firstItem").value,e=this.get("lastItem").value;if(t>e){var n=e;e=t,t=n}var r=this._formatItemValue(t),i=this._formatItemValue(e),a=t<5?5:t,o=e>16?16:e;a>o&&(a=5,o=16),"vertical"===this.get("layout")?(this._addCircle(o,o,a,r,2*o),this._addCircle(o,2*o+16+a,o,i,2*o)):(this._addCircle(o,o,a,r,2*o),this._addCircle(2*o+16+a,o,o,i,2*o))},n.activate=function(e){this.get("slidable")&&t.prototype.activate.call(this,e)},e}(n(49));t.exports=a},function(t,e,n){var r=n(50);r.Html=n(279),r.Canvas=n(126),r.Mini=n(281),t.exports=r},function(t,e,n){function r(){return(r=Object.assign||function(t){for(var e=1;e
      ',itemTpl:'
    • \n \n {name}{value}
    • ',htmlContent:null,follow:!0,enterable:!1})},n._init_=function(){var t,e=this.get("containerTpl"),n=this.get("canvas").get("el").parentNode;if(!this.get("htmlContent")){if(/^\#/.test(e)){var r=e.replace("#","");t=document.getElementById(r)}else t=l.createDom(e),l.modifyCSS(t,this.style["g2-tooltip"]),n.appendChild(t),n.style.position="relative";this.set("container",t)}},n.render=function(){if(this.clear(),this.get("htmlContent")){var t=this.get("canvas").get("el").parentNode,e=this._getHtmlContent();t.appendChild(e),this.set("container",e)}else this._renderTpl()},n._renderTpl=function(){var t=this,e=t.get("showTitle"),n=t.get("titleContent"),r=t.get("container"),i=o(r,"g2-tooltip-title"),a=o(r,"g2-tooltip-list"),s=t.get("items");i&&e&&(l.modifyCSS(i,t.style["g2-tooltip-title"]),i.innerHTML=n),a&&(l.modifyCSS(a,t.style["g2-tooltip-list"]),c.each(s,function(e,n){a.appendChild(t._addItem(e,n))}))},n.clear=function(){var t=this.get("container");if(this.get("htmlContent"))t&&t.remove();else{var e=o(t,"g2-tooltip-title"),n=o(t,"g2-tooltip-list");e&&(e.innerHTML=""),n&&(n.innerHTML="")}},n.show=function(){var e=this.get("container");if(e&&!this.destroyed){e.style.visibility="visible",e.style.display="block";var n=this.get("crosshairGroup");n&&n.show();var r=this.get("markerGroup");r&&r.show(),t.prototype.show.call(this),this.get("canvas").draw()}},n.hide=function(){var e=this.get("container");if(e&&!this.destroyed){e.style.visibility="hidden",e.style.display="none";var n=this.get("crosshairGroup");n&&n.hide();var r=this.get("markerGroup");r&&r.hide(),t.prototype.hide.call(this),this.get("canvas").draw()}},n.destroy=function(){var e=this.get("container"),n=this.get("containerTpl");e&&!/^\#/.test(n)&&e.parentNode.removeChild(e);var r=this.get("crosshairGroup");r&&r.destroy();var i=this.get("markerGroup");i&&i.remove(),t.prototype.destroy.call(this)},n._getMarkerSvg=function(t){var e,n=t.marker||{},r=n.activeSymbol||n.symbol;c.isFunction(r)?e=r:c.isString(r)&&(e=d.Symbols[r]);return''},n._addItem=function(t,e){var n=this.get("itemTpl"),i=c.substitute(n,c.mix({index:e},t)),a=l.createDom(i);l.modifyCSS(a,this.style["g2-tooltip-list-item"]);var s=o(a,"g2-tooltip-marker");if(s){l.modifyCSS(s,r({},this.style["g2-tooltip-marker"],{borderRadius:"unset"}));var u=this._getMarkerSvg(t);s.innerHTML=u}var h=o(a,"g2-tooltip-value");return h&&l.modifyCSS(h,this.style["g2-tooltip-value"]),a},n._getHtmlContent=function(){var t=this.get("htmlContent")(this.get("titleContent"),this.get("items"));return l.createDom(t)},n.setPosition=function(e,n,r){var i,a=this.get("container"),o=this.get("canvas").get("el"),s=l.getWidth(o),u=l.getHeight(o),h=a.clientWidth,f=a.clientHeight,g=e,p=n,d=this.get("prePosition")||{x:0,y:0};if(h||(a.style.display="block",h=a.clientWidth,f=a.clientHeight,a.style.display="none"),this.get("enterable")?(i=[e,n-=a.clientHeight/2],d&&e-d.x>0?e-=a.clientWidth+1:e+=1):this.get("position")?(e=(i=this._calcTooltipPosition(e,n,this.get("position"),h,f,r))[0],n=i[1]):(e=(i=this._constraintPositionInBoundary(e,n,h,f,s,u))[0],n=i[1]),this.get("inPlot")){var v=this.get("plotRange");e=(i=this._constraintPositionInPlot(e,n,h,f,v,this.get("enterable")))[0],n=i[1]}var x=this.get("markerItems");c.isEmpty(x)||(g=x[0].x,p=x[0].y),this.set("prePosition",i);this.get("follow")&&(a.style.left=e+"px",a.style.top=n+"px");var m=this.get("crosshairGroup");if(m){var y=this.get("items");m.setPosition(g,p,y)}t.prototype.setPosition.call(this,e,n)},e}(u);t.exports=v},function(t,e,n){var r,i=n(9).FONT_FAMILY,a=(r={crosshairs:!1,offset:15},r["g2-tooltip"]={position:"absolute",visibility:"hidden",zIndex:8,transition:"visibility 0.2s cubic-bezier(0.23, 1, 0.32, 1), left 0.4s cubic-bezier(0.23, 1, 0.32, 1), top 0.4s cubic-bezier(0.23, 1, 0.32, 1)",backgroundColor:"rgba(255, 255, 255, 0.9)",boxShadow:"0px 0px 10px #aeaeae",borderRadius:"3px",color:"rgb(87, 87, 87)",fontSize:"12px",fontFamily:i,lineHeight:"20px",padding:"10px 10px 6px 10px"},r["g2-tooltip-title"]={marginBottom:"4px"},r["g2-tooltip-list"]={margin:0,listStyleType:"none",padding:0},r["g2-tooltip-list-item"]={marginBottom:"4px"},r["g2-tooltip-marker"]={width:"5px",height:"5px",borderRadius:"50%",display:"inline-block",marginRight:"8px"},r["g2-tooltip-value"]={display:"inline-block",float:"right",marginLeft:"30px"},r);t.exports=a},function(t,e,n){function r(t,e){return(r=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}var i=n(1),a=n(126),o=n(9).FONT_FAMILY,s=i.DomUtil,u=i.MatrixUtil,c=function(t){function e(){return t.apply(this,arguments)||this}!function(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,r(t,e)}(e,t);var n=e.prototype;return n.getDefaultCfg=function(){var e=t.prototype.getDefaultCfg.call(this);return i.mix({},e,{boardStyle:{x:0,y:0,width:0,height:0,radius:3},valueStyle:{x:0,y:0,text:"",fontFamily:o,fontSize:12,stroke:"#fff",lineWidth:2,fill:"black",textBaseline:"top",textAlign:"start"},padding:{top:5,right:5,bottom:0,left:5},triangleWidth:10,triangleHeight:4})},n._init_=function(){var t=this.get("padding"),e=this.get("frontPlot").addGroup();this.set("container",e);var n=e.addShape("rect",{attrs:i.mix({},this.get("boardStyle"))});this.set("board",n);var r=e.addShape("path",{attrs:{fill:this.get("boardStyle").fill}});this.set("triangleShape",r);var a=e.addGroup();a.move(t.left,t.top);var o=a.addShape("text",{attrs:i.mix({},this.get("valueStyle"))});this.set("valueShape",o)},n.render=function(){this.clear();var t=this.get("board"),e=this.get("valueShape"),n=this.get("padding"),r=this.get("items")[0];e&&e.attr("text",r.value);var i=e?e.getBBox():{width:80,height:30},a=n.left+i.width+n.right,o=n.top+i.height+n.bottom;t.attr("width",a),t.attr("height",o),this._centerTriangleShape()},n.clear=function(){this.get("valueShape").attr("text","")},n.setPosition=function(t,e,n){var r=this.get("container"),i=this.get("plotRange"),a=r.getBBox(),o=a.width,c=a.height;if(t-=o/2,n&&("point"===n.name||"interval"===n.name)){e=n.getBBox().y}if(e-=c,this.get("inPlot"))ti.tr.x?(t=i.tr.x-o,this._rightTriangleShape()):this._centerTriangleShape(),ei.bl.y&&(e=i.bl.y-c);else{var l=this.get("canvas").get("el"),h=s.getWidth(l),f=s.getHeight(l);t<0?(t=0,this._leftTriangleShape()):t+o/2>h?(t=h-o,this._rightTriangleShape()):this._centerTriangleShape(),e<0?e=0:e+c>f&&(e=f-c)}var g=u.transform([1,0,0,0,1,0,0,0,1],[["t",t,e]]);r.stopAnimate(),r.animate({matrix:g},this.get("animationDuration"))},n._centerTriangleShape=function(){var t=this.get("triangleShape"),e=this.get("triangleWidth"),n=this.get("triangleHeight"),r=this.get("board").getBBox(),i=r.width,a=r.height,o=[["M",0,0],["L",e,0],["L",e/2,n],["L",0,0],["Z"]];t.attr("path",o),t.move(i/2-e/2,a-1)},n._leftTriangleShape=function(){var t=this.get("triangleShape"),e=this.get("triangleWidth"),n=this.get("triangleHeight"),r=this.get("board").getBBox().height,i=[["M",0,0],["L",e,0],["L",0,n+3],["L",0,0],["Z"]];t.attr("path",i),t.move(0,r-3)},n._rightTriangleShape=function(){var t=this.get("triangleShape"),e=this.get("triangleWidth"),n=this.get("triangleHeight"),r=this.get("board").getBBox(),i=r.width,a=r.height,o=[["M",0,0],["L",e,0],["L",e,n+4],["L",0,0],["Z"]];t.attr("path",o),t.move(i-e-1,a-4)},e}(a);t.exports=c}])});