1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/admin/common/vendor"],{"0ced":function(t,e,a){"use strict";(function(t,e){var i=a("7037"),o={yAxisWidth:15,yAxisSplit:5,xAxisHeight:15,xAxisLineHeight:15,legendHeight:15,yAxisTitleWidth:15,padding:[10,10,10,10],pixelRatio:1,rotate:!1,columePadding:3,fontSize:13,dataPointShape:["circle","circle","circle","circle"],colors:["#1890ff","#2fc25b","#facc14","#f04864","#8543e0","#90ed7d"],pieChartLinePadding:15,pieChartTextPadding:5,xAxisTextPadding:3,titleColor:"#333333",titleFontSize:20,subtitleColor:"#999999",subtitleFontSize:15,toolTipPadding:3,toolTipBackground:"#000000",toolTipOpacity:.7,toolTipLineHeight:20,radarLabelTextMargin:15,gaugeLabelTextMargin:15},r=function(t){for(var e=arguments.length,a=new Array(e>1?e-1:0),i=1;i<e;i++)a[i-1]=arguments[i];if(null==t)throw new TypeError("Cannot convert undefined or null to object");if(!a||a.length<=0)return t;function o(t,e){for(var a in e)t[a]=t[a]&&"[object Object]"===t[a].toString()?o(t[a],e[a]):t[a]=e[a];return t}return a.forEach((function(e){t=o(t,e)})),t},n={toFixed:function(t,e){return e=e||2,this.isFloat(t)&&(t=t.toFixed(e)),t},isFloat:function(t){return t%1!==0},approximatelyEqual:function(t,e){return Math.abs(t-e)<1e-10},isSameSign:function(t,e){return Math.abs(t)===t&&Math.abs(e)===e||Math.abs(t)!==t&&Math.abs(e)!==e},isSameXCoordinateArea:function(t,e){return this.isSameSign(t.x,e.x)},isCollision:function(t,e){t.end={},t.end.x=t.start.x+t.width,t.end.y=t.start.y-t.height,e.end={},e.end.x=e.start.x+e.width,e.end.y=e.start.y-e.height;var a=e.start.x>t.end.x||e.end.x<t.start.x||e.end.y>t.start.y||e.start.y<t.end.y;return!a}};function l(t,e){var a=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(t,e,a,i){return e+e+a+a+i+i})),i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a),o=parseInt(i[1],16),r=parseInt(i[2],16),n=parseInt(i[3],16);return"rgba("+o+","+r+","+n+","+e+")"}function s(t,e,a){if(isNaN(t))throw new Error("[uCharts] unvalid series data!");a=a||10,e=e||"upper";var i=1;while(a<1)a*=10,i*=10;t="upper"===e?Math.ceil(t*i):Math.floor(t*i);while(t%a!==0)"upper"===e?t++:t--;return t/i}function h(t,e,a){function i(t){while(t<0)t+=2*Math.PI;while(t>2*Math.PI)t-=2*Math.PI;return t}return t=i(t),e=i(e),a=i(a),e>a&&(a+=2*Math.PI,t<e&&(t+=2*Math.PI)),t>=e&&t<=a}function c(t,e){function a(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].y>=Math.max(t[e-1].y,t[e+1].y)||t[e].y<=Math.min(t[e-1].y,t[e+1].y))}function i(t,e){return!(!t[e-1]||!t[e+1])&&(t[e].x>=Math.max(t[e-1].x,t[e+1].x)||t[e].x<=Math.min(t[e-1].x,t[e+1].x))}var o=.2,r=.2,n=null,l=null,s=null,h=null;if(e<1?(n=t[0].x+(t[1].x-t[0].x)*o,l=t[0].y+(t[1].y-t[0].y)*o):(n=t[e].x+(t[e+1].x-t[e-1].x)*o,l=t[e].y+(t[e+1].y-t[e-1].y)*o),e>t.length-3){var c=t.length-1;s=t[c].x-(t[c].x-t[c-1].x)*r,h=t[c].y-(t[c].y-t[c-1].y)*r}else s=t[e+1].x-(t[e+2].x-t[e].x)*r,h=t[e+1].y-(t[e+2].y-t[e].y)*r;return a(t,e+1)&&(h=t[e+1].y),a(t,e)&&(l=t[e].y),i(t,e+1)&&(s=t[e+1].x),i(t,e)&&(n=t[e].x),(l>=Math.max(t[e].y,t[e+1].y)||l<=Math.min(t[e].y,t[e+1].y))&&(l=t[e].y),(h>=Math.max(t[e].y,t[e+1].y)||h<=Math.min(t[e].y,t[e+1].y))&&(h=t[e+1].y),(n>=Math.max(t[e].x,t[e+1].x)||n<=Math.min(t[e].x,t[e+1].x))&&(n=t[e].x),(s>=Math.max(t[e].x,t[e+1].x)||s<=Math.min(t[e].x,t[e+1].x))&&(s=t[e+1].x),{ctrA:{x:n,y:l},ctrB:{x:s,y:h}}}function f(t,e,a){return{x:a.x+t,y:a.y-e}}function d(t,e){if(e)while(n.isCollision(t,e))t.start.x>0?t.start.y--:t.start.x<0||t.start.y>0?t.start.y++:t.start.y--;return t}function x(t,e,a){var i=0;return t.map((function(t){if(t.color||(t.color=a.colors[i],i=(i+1)%a.colors.length),t.index||(t.index=0),t.type||(t.type=e.type),"undefined"==typeof t.show&&(t.show=!0),t.type||(t.type=e.type),t.pointShape||(t.pointShape="circle"),!t.legendShape)switch(t.type){case"line":t.legendShape="line";break;case"column":t.legendShape="rect";break;case"area":t.legendShape="triangle";break;default:t.legendShape="circle"}return t}))}function p(t,e){var a=0,i=e-t;return a=i>=1e4?1e3:i>=1e3?100:i>=100?10:i>=10?5:i>=1?1:i>=.1?.1:i>=.01?.01:i>=.001?.001:i>=1e-4?1e-4:i>=1e-5?1e-5:1e-6,{minRange:s(t,"lower",a),maxRange:s(e,"upper",a)}}function b(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.fontSize;t=String(t);t=t.split("");for(var a=0,i=0;i<t.length;i++){var r=t[i];/[a-zA-Z]/.test(r)?a+=7:/[0-9]/.test(r)?a+=5.5:/\./.test(r)?a+=2.7:/-/.test(r)?a+=3.25:/[\u4e00-\u9fa5]/.test(r)?a+=10:/\(|\)/.test(r)?a+=3.73:/\s/.test(r)?a+=2.5:/%/.test(r)?a+=8:a+=10}return a*e/10}function u(t){return t.reduce((function(t,e){return(t.data?t.data:t).concat(e.data)}),[])}function g(t,e){for(var a=new Array(e),i=0;i<a.length;i++)a[i]=0;for(var o=0;o<t.length;o++)for(i=0;i<a.length;i++)a[i]+=t[o].data[i];return t.reduce((function(t,e){return(t.data?t.data:t).concat(e.data).concat(a)}),[])}function y(t,e,a){var i,o;return t.clientX?e.rotate?(o=e.height-t.clientX*e.pixelRatio,i=(t.pageY-a.currentTarget.offsetTop-e.height/e.pixelRatio/2*(e.pixelRatio-1))*e.pixelRatio):(i=t.clientX*e.pixelRatio,o=(t.pageY-a.currentTarget.offsetTop-e.height/e.pixelRatio/2*(e.pixelRatio-1))*e.pixelRatio):e.rotate?(o=e.height-t.x*e.pixelRatio,i=t.y*e.pixelRatio):(i=t.x*e.pixelRatio,o=t.y*e.pixelRatio),{x:i,y:o}}function v(t,e){for(var a=[],i=0;i<t.length;i++){var o=t[i];if(null!==o.data[e]&&"undefined"!==typeof o.data[e]&&o.show){var r={};r.color=o.color,r.type=o.type,r.style=o.style,r.pointShape=o.pointShape,r.disableLegend=o.disableLegend,r.name=o.name,r.show=o.show,r.data=o.format?o.format(o.data[e]):o.data[e],a.push(r)}}return a}function m(t){var e=t.map((function(t){return b(t)}));return Math.max.apply(null,e)}function S(t){for(var e=2*Math.PI/t,a=[],i=0;i<t;i++)a.push(e*i);return a.map((function(t){return-1*t+Math.PI/2}))}function A(t,e,a,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=t.map((function(t){var e=[];return e=i||t.data,{text:o.format?o.format(t,e[a]):t.name+": "+t.data,color:t.color}})),n=[],l={x:0,y:0},s=0;s<e.length;s++){var h=e[s];"undefined"!==typeof h[a]&&null!==h[a]&&n.push(h[a])}for(var c=0;c<n.length;c++){var f=n[c];l.x=Math.round(f.x),l.y+=f.y}return l.y/=n.length,{textList:r,offset:l}}function T(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},r=t.map((function(t){return{text:o.format?o.format(t,i[a]):t.name+": "+t.data,color:t.color,disableLegend:!!t.disableLegend}}));r=r.filter((function(t){if(!0!==t.disableLegend)return t}));for(var n=[],l={x:0,y:0},s=0;s<e.length;s++){var h=e[s];"undefined"!==typeof h[a]&&null!==h[a]&&n.push(h[a])}for(var c=0;c<n.length;c++){var f=n[c];l.x=Math.round(f.x),l.y+=f.y}return l.y/=n.length,{textList:r,offset:l}}function P(t,e,a,i,o,r){var n=r.color.upFill,l=r.color.downFill,s=[n,n,l,n],h=[],c={text:o[i],color:null};h.push(c),e.map((function(e){0==i&&e.data[1]-e.data[0]<0?s[1]=l:(e.data[0]<t[i-1][1]&&(s[0]=l),e.data[1]<e.data[0]&&(s[1]=l),e.data[2]>t[i-1][1]&&(s[2]=n),e.data[3]<t[i-1][1]&&(s[3]=l));var a={text:"开盘:"+e.data[0],color:s[0]},o={text:"收盘:"+e.data[1],color:s[1]},r={text:"最低:"+e.data[2],color:s[2]},c={text:"最高:"+e.data[3],color:s[3]};h.push(a,o,r,c)}));for(var f=[],d={x:0,y:0},x=0;x<a.length;x++){var p=a[x];"undefined"!==typeof p[i]&&null!==p[i]&&f.push(p[i])}return d.x=Math.round(f[0][0].x),{textList:h,offset:d}}function D(t,e,a){return t.x<=e.width-e.area[1]+10&&t.x>=e.area[3]-10&&t.y>=e.area[0]&&t.y<=e.height-e.area[2]}function w(t,e,a){return Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)<=Math.pow(a,2)}function _(t){var e=[],a=[];return t.forEach((function(t,i){null!==t?a.push(t):(a.length&&e.push(a),a=[])})),a.length&&e.push(a),e}function M(t,e,a,i){var o={angle:0,xAxisHeight:a.xAxisHeight},r=t.map((function(t){return b(t,e.xAxis.fontSize||a.fontSize)})),n=Math.max.apply(this,r);return 1==e.xAxis.rotateLabel&&n+2*a.xAxisTextPadding>i&&(o.angle=45*Math.PI/180,o.xAxisHeight=2*a.xAxisTextPadding+n*Math.sin(o.angle)),o}function L(t,e,a){var o={angle:0,xAxisHeight:a.xAxisHeight};o.ranges=function(t,e,a){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,r=u(t),n=[];r=r.filter((function(t){return"object"===i(t)&&null!==t?t.constructor==Array?null!==t:null!==t.value:null!==t})),r.map((function(t){"object"===i(t)?t.constructor==Array?"candle"==e.type?t.map((function(t){n.push(t)})):n.push(t[0]):n.push(t.value):n.push(t)}));var l=0,s=0;if(n.length>0&&(l=Math.min.apply(this,n),s=Math.max.apply(this,n)),o>-1?("number"===typeof e.xAxis.data[o].min&&(l=Math.min(e.xAxis.data[o].min,l)),"number"===typeof e.xAxis.data[o].max&&(s=Math.max(e.xAxis.data[o].max,s))):("number"===typeof e.xAxis.min&&(l=Math.min(e.xAxis.min,l)),"number"===typeof e.xAxis.max&&(s=Math.max(e.xAxis.max,s))),l===s){var h=s||10;s+=h}for(var c=l,f=s,d=[],x=(f-c)/e.xAxis.splitNumber,p=0;p<=e.xAxis.splitNumber;p++)d.push(c+x*p);return d}(t,e,a),o.rangesFormat=o.ranges.map((function(t){return t=e.xAxis.format?e.xAxis.format(t):n.toFixed(t,2),t}));var r=o.ranges.map((function(t){return t=n.toFixed(t,2),t=e.xAxis.format?e.xAxis.format(Number(t)):t,t}));o=Object.assign(o,B(r,e,a));var l=o.eachSpacing,s=r.map((function(t){return b(t)})),h=Math.max.apply(this,s);return h+2*a.xAxisTextPadding>l&&(o.angle=45*Math.PI/180,o.xAxisHeight=2*a.xAxisTextPadding+h*Math.sin(o.angle)),!0===e.xAxis.disabled&&(o.xAxisHeight=0),o}function F(t,e,a,i,o){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,n=o.extra.radar||{};n.max=n.max||0;for(var l=Math.max(n.max,Math.max.apply(null,u(i))),s=[],h=function(o){var n=i[o],h={};h.color=n.color,h.legendShape=n.legendShape,h.pointShape=n.pointShape,h.data=[],n.data.forEach((function(i,o){var n={};n.angle=t[o],n.proportion=i/l,n.position=f(a*n.proportion*r*Math.cos(n.angle),a*n.proportion*r*Math.sin(n.angle),e),h.data.push(n)})),s.push(h)},c=0;c<i.length;c++)h(c);return s}function k(t,e){for(var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,i=0,o=0,r=0;r<t.length;r++){var n=t[r];n.data=null===n.data?0:n.data,i+=n.data}for(var l=0;l<t.length;l++){var s=t[l];s.data=null===s.data?0:s.data,s._proportion_=0===i?1/t.length*a:s.data/i*a,s._radius_=e}for(var h=0;h<t.length;h++){var c=t[h];c._start_=o,o+=2*c._proportion_*Math.PI}return t}function C(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;t=t.sort((function(t,e){return parseInt(e.data)-parseInt(t.data)}));for(var i=0;i<t.length;i++)t[i].radius=t[i].data/t[0].data*e*a,t[i]._proportion_=t[i].data/t[0].data;return t.reverse()}function R(t,e,a,i){for(var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=0,n=0,l=[],s=0;s<t.length;s++){var h=t[s];h.data=null===h.data?0:h.data,r+=h.data,l.push(h.data)}for(var c=Math.min.apply(null,l),f=Math.max.apply(null,l),d=i-a,x=0;x<t.length;x++){var p=t[x];p.data=null===p.data?0:p.data,0===r||"area"==e?(p._proportion_=p.data/r*o,p._rose_proportion_=1/t.length*o):(p._proportion_=p.data/r*o,p._rose_proportion_=p.data/r*o),p._radius_=a+d*((p.data-c)/(f-c))}for(var b=0;b<t.length;b++){var u=t[b];u._start_=n,n+=2*u._rose_proportion_*Math.PI}return t}function I(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;1==a&&(a=.999999);for(var i=0;i<t.length;i++){var o=t[i];o.data=null===o.data?0:o.data;var r=void 0;r="circle"==e.type?2:e.endAngle<e.startAngle?2+e.endAngle-e.startAngle:e.startAngle-e.endAngle,o._proportion_=r*o.data*a+e.startAngle,o._proportion_>=2&&(o._proportion_=o._proportion_%2)}return t}function z(t,e,a){for(var i=e-a+1,o=e,r=0;r<t.length;r++)t[r].value=null===t[r].value?0:t[r].value,t[r]._startAngle_=o,t[r]._endAngle_=i*t[r].value+e,t[r]._endAngle_>=2&&(t[r]._endAngle_=t[r]._endAngle_%2),o=t[r]._endAngle_;return t}function W(t,e,a){for(var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=0;o<t.length;o++){var r=t[o];if(r.data=null===r.data?0:r.data,"auto"==a.pointer.color){for(var n=0;n<e.length;n++)if(r.data<=e[n].value){r.color=e[n].color;break}}else r.color=a.pointer.color;var l=a.startAngle-a.endAngle+1;r._endAngle_=l*r.data+a.startAngle,r._oldAngle_=a.oldAngle,a.oldAngle<a.endAngle&&(r._oldAngle_+=2),r.data>=a.oldData?r._proportion_=(r._endAngle_-r._oldAngle_)*i+a.oldAngle:r._proportion_=r._oldAngle_-(r._oldAngle_-r._endAngle_)*i,r._proportion_>=2&&(r._proportion_=r._proportion_%2)}return t}function O(t,e,a,i,o,r){return t.map((function(t){return null===t?null:(t.width=Math.ceil((e-2*o.columePadding)/a),r.extra.column&&r.extra.column.width&&+r.extra.column.width>0&&(t.width=Math.min(t.width,+r.extra.column.width)),t.width<=0&&(t.width=1),t.x+=(i+.5-a/2)*t.width,t)}))}function E(t,e,a,i,o,r,n){return t.map((function(t){return null===t?null:(t.width=Math.ceil((e-2*o.columePadding)/2),r.extra.column&&r.extra.column.width&&+r.extra.column.width>0&&(t.width=Math.min(t.width,+r.extra.column.width)),i>0&&(t.width-=2*n),t)}))}function N(t,e,a,i,o,r,n){return t.map((function(t,a){return null===t?null:(t.width=Math.ceil((e-2*o.columePadding)/2),r.extra.column&&r.extra.column.width&&+r.extra.column.width>0&&(t.width=Math.min(t.width,+r.extra.column.width)),t)}))}function B(t,e,a){var i=e.width-e.area[1]-e.area[3],o=e.enableScroll?Math.min(e.xAxis.itemCount,t.length):t.length;("line"==e.type||"area"==e.type)&&o>1&&"justify"==e.xAxis.boundaryGap&&(o-=1);var r=i/o,n=[],l=e.area[3],s=e.width-e.area[1];return t.forEach((function(t,e){n.push(l+e*r)})),"justify"!==e.xAxis.boundaryGap&&(!0===e.enableScroll?n.push(l+t.length*r):n.push(s)),{xAxisPoints:n,startX:l,endX:s,eachSpacing:r}}function H(t,e,a,i,o,r,n){var l=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,s=[],h=r.height-r.area[0]-r.area[2];return t.forEach((function(t,n){if(null===t)s.push(null);else{var c=[];t.forEach((function(t,s){var f={};f.x=i[n]+Math.round(o/2);var d=t.value||t,x=h*(d-e)/(a-e);x*=l,f.y=r.height-Math.round(x)-r.area[2],c.push(f)})),s.push(c)}})),s}function G(t,e,a,o,r,n,l){var s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:1,h="center";"line"!=n.type&&"area"!=n.type||(h=n.xAxis.boundaryGap);var c=[],f=n.height-n.area[0]-n.area[2],d=n.width-n.area[1]-n.area[3];return t.forEach((function(t,l){if(null===t)c.push(null);else{var x={};x.color=t.color,x.x=o[l];var p,b,u,g=t;if("object"===i(t)&&null!==t)if(t.constructor==Array)p=[].concat(n.chartData.xAxisData.ranges),b=p.shift(),u=p.pop(),g=t[1],x.x=n.area[3]+d*(t[0]-b)/(u-b);else g=t.value;"center"==h&&(x.x+=Math.round(r/2));var y=f*(g-e)/(a-e);y*=s,x.y=n.height-Math.round(y)-n.area[2],c.push(x)}})),c}function X(t,e,a,i,o,r,n,l,s){var h=arguments.length>9&&void 0!==arguments[9]?arguments[9]:1,c=[],f=r.height-r.area[0]-r.area[2];return t.forEach((function(t,n){if(null===t)c.push(null);else{var d={};if(d.color=t.color,d.x=i[n]+Math.round(o/2),l>0){for(var x=0,p=0;p<=l;p++)x+=s[p].data[n];var b=x-t,u=f*(x-e)/(a-e),g=f*(b-e)/(a-e)}else x=t,u=f*(x-e)/(a-e),g=0;var y=g;u*=h,y*=h,d.y=r.height-Math.round(u)-r.area[2],d.y0=r.height-Math.round(y)-r.area[2],c.push(d)}})),c}function Y(t,e,a,o){var r,n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1;r="stack"==o?g(t,e.categories.length):u(t);var l=[];r=r.filter((function(t){return"object"===i(t)&&null!==t?t.constructor==Array?null!==t:null!==t.value:null!==t})),r.map((function(t){"object"===i(t)?t.constructor==Array?"candle"==e.type?t.map((function(t){l.push(t)})):l.push(t[1]):l.push(t.value):l.push(t)}));var s=0,h=0;if(l.length>0&&(s=Math.min.apply(this,l),h=Math.max.apply(this,l)),n>-1?("number"===typeof e.yAxis.data[n].min&&(s=Math.min(e.yAxis.data[n].min,s)),"number"===typeof e.yAxis.data[n].max&&(h=Math.max(e.yAxis.data[n].max,h))):("number"===typeof e.yAxis.min&&(s=Math.min(e.yAxis.min,s)),"number"===typeof e.yAxis.max&&(h=Math.max(e.yAxis.max,h))),s===h){var c=h||10;h+=c}for(var f=p(s,h),d=f.minRange,x=f.maxRange,b=[],y=(x-d)/e.yAxis.splitNumber,v=0;v<=e.yAxis.splitNumber;v++)b.push(d+y*v);return b.reverse()}function j(t,e,a){var i=r({},{type:""},e.extra.column),o=e.yAxis.data.length,l=new Array(o);if(o>0){for(var s=0;s<o;s++){l[s]=[];for(var h=0;h<t.length;h++)t[h].index==s&&l[s].push(t[h])}for(var c=new Array(o),f=new Array(o),d=new Array(o),x=function(t){var o=e.yAxis.data[t];1==e.yAxis.disabled&&(o.disabled=!0),c[t]=Y(l[t],e,a,i.type,t);var r=o.fontSize||a.fontSize;d[t]={position:o.position?o.position:"left",width:0},f[t]=c[t].map((function(e){return e=n.toFixed(e,6),e=o.format?o.format(Number(e)):e,d[t].width=Math.max(d[t].width,b(e,r)+5),e}));var s=o.calibration?4*e.pixelRatio:0;d[t].width+=s+3*e.pixelRatio,!0===o.disabled&&(d[t].width=0)},p=0;p<o;p++)x(p)}else{c=new Array(1),f=new Array(1),d=new Array(1);c[0]=Y(t,e,a,i.type),d[0]={position:"left",width:0};var u=e.yAxis.fontSize||a.fontSize;f[0]=c[0].map((function(t){return t=n.toFixed(t,6),t=e.yAxis.format?e.yAxis.format(Number(t)):t,d[0].width=Math.max(d[0].width,b(t,u)+5),t})),d[0].width+=3*e.pixelRatio,!0===e.yAxis.disabled?(d[0]={position:"left",width:0},e.yAxis.data[0]={disabled:!0}):e.yAxis.data[0]={disabled:!1,position:"left",max:e.yAxis.max,min:e.yAxis.min,format:e.yAxis.format}}return{rangesFormat:f,ranges:c,yAxisWidth:d}}function q(t,e){!0!==e.rotateLock?(t.translate(e.height,0),t.rotate(90*Math.PI/180)):!0!==e._rotate_&&(t.translate(e.height,0),t.rotate(90*Math.PI/180),e._rotate_=!0)}function Z(t,e,a,i,o){i.beginPath(),"hollow"==o.dataPointShapeType?(i.setStrokeStyle(e),i.setFillStyle(o.background),i.setLineWidth(2*o.pixelRatio)):(i.setStrokeStyle("#ffffff"),i.setFillStyle(e),i.setLineWidth(1*o.pixelRatio)),"diamond"===a?t.forEach((function(t,e){null!==t&&(i.moveTo(t.x,t.y-4.5),i.lineTo(t.x-4.5,t.y),i.lineTo(t.x,t.y+4.5),i.lineTo(t.x+4.5,t.y),i.lineTo(t.x,t.y-4.5))})):"circle"===a?t.forEach((function(t,e){null!==t&&(i.moveTo(t.x+2.5*o.pixelRatio,t.y),i.arc(t.x,t.y,3*o.pixelRatio,0,2*Math.PI,!1))})):"rect"===a?t.forEach((function(t,e){null!==t&&(i.moveTo(t.x-3.5,t.y-3.5),i.rect(t.x-3.5,t.y-3.5,7,7))})):"triangle"===a&&t.forEach((function(t,e){null!==t&&(i.moveTo(t.x,t.y-4.5),i.lineTo(t.x-4.5,t.y+4.5),i.lineTo(t.x+4.5,t.y+4.5),i.lineTo(t.x,t.y-4.5))})),i.closePath(),i.fill(),i.stroke()}function U(t,e,a,i){var o=t.title.fontSize||e.titleFontSize,r=t.subtitle.fontSize||e.subtitleFontSize,n=t.title.name||"",l=t.subtitle.name||"",s=t.title.color||e.titleColor,h=t.subtitle.color||e.subtitleColor,c=n?o:0,f=l?r:0;if(l){var d=b(l,r),x=i.x-d/2+(t.subtitle.offsetX||0),p=i.y+r/2+(t.subtitle.offsetY||0);n&&(p+=(c+5)/2),a.beginPath(),a.setFontSize(r),a.setFillStyle(h),a.fillText(l,x,p),a.closePath(),a.stroke()}if(n){var u=b(n,o),g=i.x-u/2+(t.title.offsetX||0),y=i.y+o/2+(t.title.offsetY||0);l&&(y-=(f+5)/2),a.beginPath(),a.setFontSize(o),a.setFillStyle(s),a.fillText(n,g,y),a.closePath(),a.stroke()}}function J(t,e,a,o){var r=e.data;t.forEach((function(t,n){if(null!==t){o.beginPath(),o.setFontSize(e.textSize||a.fontSize),o.setFillStyle(e.textColor||"#666666");var l=r[n];"object"===i(r[n])&&null!==r[n]&&(l=r[n].constructor==Array?r[n][1]:r[n].value);var s=e.format?e.format(l):l;o.fillText(String(s),t.x-b(s,e.textSize||a.fontSize)/2,t.y-4),o.closePath(),o.stroke()}}))}function $(t,e,a,i,o,r){e-=t.width/2+o.gaugeLabelTextMargin;for(var n=t.startAngle-t.endAngle+1,l=n/t.splitLine.splitNumber,s=t.endNumber-t.startNumber,h=s/t.splitLine.splitNumber,c=t.startAngle,f=t.startNumber,d=0;d<t.splitLine.splitNumber+1;d++){var x={x:e*Math.cos(c*Math.PI),y:e*Math.sin(c*Math.PI)},p=t.labelFormat?t.labelFormat(f):f;x.x+=a.x-b(p)/2,x.y+=a.y;var u=x.x,g=x.y;r.beginPath(),r.setFontSize(o.fontSize),r.setFillStyle(t.labelColor||"#666666"),r.fillText(p,u,g+o.fontSize/2),r.closePath(),r.stroke(),c+=l,c>=2&&(c%=2),f+=h}}function K(t,e,a,i,o,r){var l=i.extra.radar||{};e+=o.radarLabelTextMargin,t.forEach((function(t,s){var h={x:e*Math.cos(t),y:e*Math.sin(t)},c=f(h.x,h.y,a),d=c.x,x=c.y;n.approximatelyEqual(h.x,0)?d-=b(i.categories[s]||"")/2:h.x<0&&(d-=b(i.categories[s]||"")),r.beginPath(),r.setFontSize(o.fontSize),r.setFillStyle(l.labelColor||"#666666"),r.fillText(i.categories[s]||"",d,x+o.fontSize/2),r.closePath(),r.stroke()}))}function Q(t,e,a,i,o,r){for(var l=a.pieChartLinePadding,s=[],h=null,c=t.map((function(t){var e=t.format?t.format(+t._proportion_.toFixed(2)):n.toFixed(100*t._proportion_.toFixed(4))+"%";t._rose_proportion_&&(t._proportion_=t._rose_proportion_);var a=2*Math.PI-(t._start_+2*Math.PI*t._proportion_/2),i=t.color,o=t._radius_;return{arc:a,text:e,color:i,radius:o,textColor:t.textColor,textSize:t.textSize}})),x=0;x<c.length;x++){var p=c[x],u=Math.cos(p.arc)*(p.radius+l),g=Math.sin(p.arc)*(p.radius+l),y=Math.cos(p.arc)*p.radius,v=Math.sin(p.arc)*p.radius,m=u>=0?u+a.pieChartTextPadding:u-a.pieChartTextPadding,S=g,A=b(p.text,p.textSize||a.fontSize),T=S;h&&n.isSameXCoordinateArea(h.start,{x:m})&&(T=m>0?Math.min(S,h.start.y):u<0||S>0?Math.max(S,h.start.y):Math.min(S,h.start.y)),m<0&&(m-=A);var P={lineStart:{x:y,y:v},lineEnd:{x:u,y:g},start:{x:m,y:T},width:A,height:a.fontSize,text:p.text,color:p.color,textColor:p.textColor,textSize:p.textSize};h=d(P,h),s.push(h)}for(var D=0;D<s.length;D++){var w=s[D],_=f(w.lineStart.x,w.lineStart.y,r),M=f(w.lineEnd.x,w.lineEnd.y,r),L=f(w.start.x,w.start.y,r);i.setLineWidth(1*e.pixelRatio),i.setFontSize(a.fontSize),i.beginPath(),i.setStrokeStyle(w.color),i.setFillStyle(w.color),i.moveTo(_.x,_.y);var F=w.start.x<0?L.x+w.width:L.x,k=w.start.x<0?L.x-5:L.x+5;i.quadraticCurveTo(M.x,M.y,F,L.y),i.moveTo(_.x,_.y),i.stroke(),i.closePath(),i.beginPath(),i.moveTo(L.x+w.width,L.y),i.arc(F,L.y,2,0,2*Math.PI),i.closePath(),i.fill(),i.beginPath(),i.setFontSize(w.textSize||a.fontSize),i.setFillStyle(w.textColor||"#666666"),i.fillText(w.text,k,L.y+3),i.closePath(),i.stroke(),i.closePath()}}function V(t,e,a){for(var i=r({},{type:"solid",dashLength:4,data:[]},t.extra.markLine),o=t.area[3],n=t.width-t.area[1],s=function(t,e){for(var a,i,o=e.height-e.area[0]-e.area[2],r=0;r<t.length;r++){t[r].yAxisIndex=t[r].yAxisIndex?t[r].yAxisIndex:0;var n=[].concat(e.chartData.yAxisData.ranges[t[r].yAxisIndex]);a=n.pop(),i=n.shift();var l=o*(t[r].value-a)/(i-a);t[r].y=e.height-Math.round(l)-e.area[2]}return t}(i.data,t),h=0;h<s.length;h++){var c=r({},{lineColor:"#DE4A42",showLabel:!1,labelFontColor:"#666666",labelBgColor:"#DFE8FF",labelBgOpacity:.8,yAxisIndex:0},s[h]);if("dash"==i.type&&a.setLineDash([i.dashLength,i.dashLength]),a.setStrokeStyle(c.lineColor),a.setLineWidth(1*t.pixelRatio),a.beginPath(),a.moveTo(o,c.y),a.lineTo(n,c.y),a.stroke(),a.setLineDash([]),c.showLabel){var f=t.yAxis.format?t.yAxis.format(Number(c.value)):c.value;a.setFontSize(e.fontSize);var d=b(f,e.fontSize),x=t.padding[3]+e.yAxisTitleWidth-e.toolTipPadding,p=Math.max(t.area[3],d+2*e.toolTipPadding),u=p-x,g=x+(u-d)/2,y=c.y;a.setFillStyle(l(c.labelBgColor,c.labelBgOpacity)),a.setStrokeStyle(c.labelBgColor),a.setLineWidth(1*t.pixelRatio),a.beginPath(),a.rect(x,y-.5*e.fontSize-e.toolTipPadding,u,e.fontSize+2*e.toolTipPadding),a.closePath(),a.stroke(),a.fill(),a.beginPath(),a.setFontSize(e.fontSize),a.setFillStyle(c.labelFontColor),a.fillText(String(f),g,y+.5*e.fontSize),a.stroke()}}}function tt(t,e,a,i,o){var n=r({},{gridType:"solid",dashLength:4},t.extra.tooltip),s=t.area[3],h=t.width-t.area[1];if("dash"==n.gridType&&a.setLineDash([n.dashLength,n.dashLength]),a.setStrokeStyle(n.gridColor||"#cccccc"),a.setLineWidth(1*t.pixelRatio),a.beginPath(),a.moveTo(s,t.tooltip.offset.y),a.lineTo(h,t.tooltip.offset.y),a.stroke(),a.setLineDash([]),n.yAxisLabel)for(var c=function(t,e,a,i,o){for(var r=[].concat(a.chartData.yAxisData.ranges),n=a.height-a.area[0]-a.area[2],l=a.area[0],s=[],h=0;h<r.length;h++){var c=r[h].shift(),f=r[h].pop(),d=c-(c-f)*(t-l)/n;d=a.yAxis.data[h].format?a.yAxis.data[h].format(Number(d)):d.toFixed(0),s.push(String(d))}return s}(t.tooltip.offset.y,t.series,t),f=t.chartData.yAxisData.yAxisWidth,d=t.area[3],x=t.width-t.area[1],p=0;p<c.length;p++){a.setFontSize(e.fontSize);var u,g=b(c[p],e.fontSize),y=void 0,v=void 0;"left"==f[p].position?(y=d-f[p].width,v=Math.max(y,y+g+2*e.toolTipPadding)):(y=x,v=Math.max(y+f[p].width,y+g+2*e.toolTipPadding)),u=v-y;var m=y+(u-g)/2,S=t.tooltip.offset.y;a.beginPath(),a.setFillStyle(l(n.labelBgColor||e.toolTipBackground,n.labelBgOpacity||e.toolTipOpacity)),a.setStrokeStyle(n.labelBgColor||e.toolTipBackground),a.setLineWidth(1*t.pixelRatio),a.rect(y,S-.5*e.fontSize-e.toolTipPadding,u,e.fontSize+2*e.toolTipPadding),a.closePath(),a.stroke(),a.fill(),a.beginPath(),a.setFontSize(e.fontSize),a.setFillStyle(n.labelFontColor||e.fontColor),a.fillText(c[p],m,S+.5*e.fontSize),a.closePath(),a.stroke(),"left"==f[p].position?d-=f[p].width+t.yAxis.padding:x+=f[p].width+t.yAxis.padding}}function et(t,e,a,i,o){var n=r({},{activeBgColor:"#000000",activeBgOpacity:.08},e.extra.tooltip),s=e.area[0],h=e.height-e.area[2];i.beginPath(),i.setFillStyle(l(n.activeBgColor,n.activeBgOpacity)),i.rect(t-o/2,s,o,h-s),i.closePath(),i.fill()}function at(t,e,a,i,o,n,s){var h=r({},{showBox:!0,bgColor:"#000000",bgOpacity:.7,fontColor:"#FFFFFF"},a.extra.tooltip),c=4*a.pixelRatio,f=5*a.pixelRatio,d=8*a.pixelRatio,x=!1;"line"!=a.type&&"area"!=a.type&&"candle"!=a.type&&"mix"!=a.type||function(t,e,a,i){var o=e.extra.tooltip||{};o.gridType=void 0==o.gridType?"solid":o.gridType,o.dashLength=void 0==o.dashLength?4:o.dashLength;var r=e.area[0],n=e.height-e.area[2];if("dash"==o.gridType&&i.setLineDash([o.dashLength,o.dashLength]),i.setStrokeStyle(o.gridColor||"#cccccc"),i.setLineWidth(1*e.pixelRatio),i.beginPath(),i.moveTo(t,r),i.lineTo(t,n),i.stroke(),i.setLineDash([]),o.xAxisLabel){var s=e.categories[e.tooltip.index];i.setFontSize(a.fontSize);var h=b(s,a.fontSize),c=t-.5*h,f=n;i.beginPath(),i.setFillStyle(l(o.labelBgColor||a.toolTipBackground,o.labelBgOpacity||a.toolTipOpacity)),i.setStrokeStyle(o.labelBgColor||a.toolTipBackground),i.setLineWidth(1*e.pixelRatio),i.rect(c-a.toolTipPadding,f,h+2*a.toolTipPadding,a.fontSize+2*a.toolTipPadding),i.closePath(),i.stroke(),i.fill(),i.beginPath(),i.setFontSize(a.fontSize),i.setFillStyle(o.labelFontColor||a.fontColor),i.fillText(String(s),c,f+a.toolTipPadding+a.fontSize),i.closePath(),i.stroke()}}(a.tooltip.offset.x,a,i,o),e=r({x:0,y:0},e),e.y-=8*a.pixelRatio;var p=t.map((function(t){return b(t.text,i.fontSize)})),u=c+f+4*i.toolTipPadding+Math.max.apply(null,p),g=2*i.toolTipPadding+t.length*i.toolTipLineHeight;0!=h.showBox&&(e.x-Math.abs(a._scrollDistance_)+d+u>a.width&&(x=!0),g+e.y>a.height&&(e.y=a.height-g),o.beginPath(),o.setFillStyle(l(h.bgColor||i.toolTipBackground,h.bgOpacity||i.toolTipOpacity)),x?(o.moveTo(e.x,e.y+10*a.pixelRatio),o.lineTo(e.x-d,e.y+10*a.pixelRatio-5*a.pixelRatio),o.lineTo(e.x-d,e.y),o.lineTo(e.x-d-Math.round(u),e.y),o.lineTo(e.x-d-Math.round(u),e.y+g),o.lineTo(e.x-d,e.y+g),o.lineTo(e.x-d,e.y+10*a.pixelRatio+5*a.pixelRatio),o.lineTo(e.x,e.y+10*a.pixelRatio)):(o.moveTo(e.x,e.y+10*a.pixelRatio),o.lineTo(e.x+d,e.y+10*a.pixelRatio-5*a.pixelRatio),o.lineTo(e.x+d,e.y),o.lineTo(e.x+d+Math.round(u),e.y),o.lineTo(e.x+d+Math.round(u),e.y+g),o.lineTo(e.x+d,e.y+g),o.lineTo(e.x+d,e.y+10*a.pixelRatio+5*a.pixelRatio),o.lineTo(e.x,e.y+10*a.pixelRatio)),o.closePath(),o.fill(),t.forEach((function(t,a){if(null!==t.color){o.beginPath(),o.setFillStyle(t.color);var r=e.x+d+2*i.toolTipPadding,n=e.y+(i.toolTipLineHeight-i.fontSize)/2+i.toolTipLineHeight*a+i.toolTipPadding+1;x&&(r=e.x-u-d+2*i.toolTipPadding),o.fillRect(r,n,c,i.fontSize),o.closePath()}})),t.forEach((function(t,a){var r=e.x+d+2*i.toolTipPadding+c+f;x&&(r=e.x-u-d+2*i.toolTipPadding+ +c+f);var n=e.y+(i.toolTipLineHeight-i.fontSize)/2+i.toolTipLineHeight*a+i.toolTipPadding;o.beginPath(),o.setFontSize(i.fontSize),o.setFillStyle(h.fontColor),o.fillText(t.text,r,n+i.fontSize),o.closePath(),o.stroke()})))}function it(t,e,a,i,o,r){var n=t.extra.tooltip||{};n.horizentalLine&&t.tooltip&&1===i&&("line"==t.type||"area"==t.type||"column"==t.type||"candle"==t.type||"mix"==t.type)&&tt(t,e,a),a.save(),t._scrollDistance_&&0!==t._scrollDistance_&&!0===t.enableScroll&&a.translate(t._scrollDistance_,0),t.tooltip&&t.tooltip.textList&&t.tooltip.textList.length&&1===i&&at(t.tooltip.textList,t.tooltip.offset,t,e,a),a.restore()}function ot(t,e,a,i){var o=e.chartData.xAxisData,r=o.xAxisPoints,n=o.startX,l=o.endX,s=o.eachSpacing,h="center";"line"!=e.type&&"area"!=e.type||(h=e.xAxis.boundaryGap);var c=e.height-e.area[2],f=e.area[0];if(e.enableScroll&&e.xAxis.scrollShow){var d=e.height-e.area[2]+a.xAxisHeight,x=l-n,p=s*(r.length-1),u=x*x/p,g=0;e._scrollDistance_&&(g=-e._scrollDistance_*x/p),i.beginPath(),i.setLineCap("round"),i.setLineWidth(6*e.pixelRatio),i.setStrokeStyle(e.xAxis.scrollBackgroundColor||"#EFEBEF"),i.moveTo(n,d),i.lineTo(l,d),i.stroke(),i.closePath(),i.beginPath(),i.setLineCap("round"),i.setLineWidth(6*e.pixelRatio),i.setStrokeStyle(e.xAxis.scrollColor||"#A6A6A6"),i.moveTo(n+g,d),i.lineTo(n+g+u,d),i.stroke(),i.closePath(),i.setLineCap("butt")}if(i.save(),e._scrollDistance_&&0!==e._scrollDistance_&&i.translate(e._scrollDistance_,0),!0===e.xAxis.calibration&&(i.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),i.setLineCap("butt"),i.setLineWidth(1*e.pixelRatio),r.forEach((function(t,a){a>0&&(i.beginPath(),i.moveTo(t-s/2,c),i.lineTo(t-s/2,c+3*e.pixelRatio),i.closePath(),i.stroke())}))),!0!==e.xAxis.disableGrid&&(i.setStrokeStyle(e.xAxis.gridColor||"#cccccc"),i.setLineCap("butt"),i.setLineWidth(1*e.pixelRatio),"dash"==e.xAxis.gridType&&i.setLineDash([e.xAxis.dashLength,e.xAxis.dashLength]),e.xAxis.gridEval=e.xAxis.gridEval||1,r.forEach((function(t,a){a%e.xAxis.gridEval==0&&(i.beginPath(),i.moveTo(t,c),i.lineTo(t,f),i.stroke())})),i.setLineDash([])),!0!==e.xAxis.disabled){var y=t.length;e.xAxis.labelCount&&(y=e.xAxis.itemCount?Math.ceil(t.length/e.xAxis.itemCount*e.xAxis.labelCount):e.xAxis.labelCount,y-=1);for(var v=Math.ceil(t.length/y),m=[],S=t.length,A=0;A<S;A++)A%v!==0?m.push(""):m.push(t[A]);m[S-1]=t[S-1];var T=e.xAxis.fontSize||a.fontSize;0===a._xAxisTextAngle_?m.forEach((function(t,o){var n=-b(String(t),T)/2;"center"==h&&(n+=s/2);var l=0;e.xAxis.scrollShow&&(l=6*e.pixelRatio),i.beginPath(),i.setFontSize(T),i.setFillStyle(e.xAxis.fontColor||"#666666"),i.fillText(String(t),r[o]+n,c+T+(a.xAxisHeight-l-T)/2),i.closePath(),i.stroke()})):m.forEach((function(t,o){i.save(),i.beginPath(),i.setFontSize(T),i.setFillStyle(e.xAxis.fontColor||"#666666");var n=b(String(t),T),l=-n;"center"==h&&(l+=s/2);var f=function(t,e,a){var i=t,o=a-e,r=i+(a-o-i)/Math.sqrt(2);r*=-1;var n=(a-o)*(Math.sqrt(2)-1)-(a-o-i)/Math.sqrt(2);return{transX:r,transY:n}}(r[o]+s/2,c+T/2+5,e.height),d=f.transX,x=f.transY;i.rotate(-1*a._xAxisTextAngle_),i.translate(d,x),i.fillText(String(t),r[o]+l,c+T+5),i.closePath(),i.stroke(),i.restore()}))}i.restore(),e.xAxis.axisLine&&(i.beginPath(),i.setStrokeStyle(e.xAxis.axisLineColor),i.setLineWidth(1*e.pixelRatio),i.moveTo(n,e.height-e.area[2]),i.lineTo(l,e.height-e.area[2]),i.stroke())}function rt(t,e,a,i){if(!0!==e.yAxis.disableGrid){for(var o=e.height-e.area[0]-e.area[2],r=o/e.yAxis.splitNumber,n=e.area[3],l=e.chartData.xAxisData.xAxisPoints,s=e.chartData.xAxisData.eachSpacing,h=s*(l.length-1),c=n+h,f=[],d=0;d<e.yAxis.splitNumber+1;d++)f.push(e.height-e.area[2]-r*d);i.save(),e._scrollDistance_&&0!==e._scrollDistance_&&i.translate(e._scrollDistance_,0),"dash"==e.yAxis.gridType&&i.setLineDash([e.yAxis.dashLength,e.yAxis.dashLength]),i.setStrokeStyle(e.yAxis.gridColor),i.setLineWidth(1*e.pixelRatio),f.forEach((function(t,e){i.beginPath(),i.moveTo(n,t),i.lineTo(c,t),i.stroke()})),i.setLineDash([]),i.restore()}}function nt(t,e,a,i){if(!0!==e.yAxis.disabled){var o=e.height-e.area[0]-e.area[2],r=o/e.yAxis.splitNumber,n=e.area[3],l=e.width-e.area[1],s=e.height-e.area[2],h=s+a.xAxisHeight;e.xAxis.scrollShow&&(h-=3*e.pixelRatio),e.xAxis.rotateLabel&&(h=e.height-e.area[2]+3),i.beginPath(),i.setFillStyle(e.background||"#ffffff"),e._scrollDistance_<0&&i.fillRect(0,0,n,h),1==e.enableScroll&&i.fillRect(l,0,e.width,h),i.closePath(),i.stroke();for(var c=[],f=0;f<=e.yAxis.splitNumber;f++)c.push(e.area[0]+r*f);for(var d=e.area[3],x=e.width-e.area[1],p=function(t){var o=e.yAxis.data[t];if(!0!==o.disabled){var r=e.chartData.yAxisData.rangesFormat[t],n=o.fontSize||a.fontSize,l=e.chartData.yAxisData.yAxisWidth[t];if(r.forEach((function(t,a){var r=c[a]?c[a]:s;i.beginPath(),i.setFontSize(n),i.setLineWidth(1*e.pixelRatio),i.setStrokeStyle(o.axisLineColor||"#cccccc"),i.setFillStyle(o.fontColor||"#666666"),"left"==l.position?(i.fillText(String(t),d-l.width,r+n/2),1==o.calibration&&(i.moveTo(d,r),i.lineTo(d-3*e.pixelRatio,r))):(i.fillText(String(t),x+4*e.pixelRatio,r+n/2),1==o.calibration&&(i.moveTo(x,r),i.lineTo(x+3*e.pixelRatio,r))),i.closePath(),i.stroke()})),!1!==o.axisLine&&(i.beginPath(),i.setStrokeStyle(o.axisLineColor||"#cccccc"),i.setLineWidth(1*e.pixelRatio),"left"==l.position?(i.moveTo(d,e.height-e.area[2]),i.lineTo(d,e.area[0])):(i.moveTo(x,e.height-e.area[2]),i.lineTo(x,e.area[0])),i.stroke()),e.yAxis.showTitle){var h=o.titleFontSize||a.fontSize,f=o.title;i.beginPath(),i.setFontSize(h),i.setFillStyle(o.titleFontColor||"#666666"),"left"==l.position?i.fillText(f,d-b(f,h)/2,e.area[0]-10*e.pixelRatio):i.fillText(f,x-b(f,h)/2,e.area[0]-10*e.pixelRatio),i.closePath(),i.stroke()}"left"==l.position?d-=l.width+e.yAxis.padding:x+=l.width+e.yAxis.padding}},u=0;u<e.yAxis.data.length;u++)p(u)}}function lt(t,e,a,i,o){if(!1!==e.legend.show){var r=o.legendData,n=r.points,l=r.area,s=e.legend.padding,h=e.legend.fontSize,c=15*e.pixelRatio,f=5*e.pixelRatio,d=e.legend.itemGap,x=Math.max(e.legend.lineHeight*e.pixelRatio,h);i.beginPath(),i.setLineWidth(e.legend.borderWidth),i.setStrokeStyle(e.legend.borderColor),i.setFillStyle(e.legend.backgroundColor),i.moveTo(l.start.x,l.start.y),i.rect(l.start.x,l.start.y,l.width,l.height),i.closePath(),i.fill(),i.stroke(),n.forEach((function(t,o){var n,p=0;p=r.widthArr[o],n=r.heightArr[o];var u=0,g=0;"top"==e.legend.position||"bottom"==e.legend.position?(u=l.start.x+(l.width-p)/2,g=l.start.y+s+o*x):(p=0==o?0:r.widthArr[o-1],u=l.start.x+s+p,g=l.start.y+s+(l.height-n)/2),i.setFontSize(a.fontSize);for(var y=0;y<t.length;y++){var v=t[y];switch(v.area=[0,0,0,0],v.area[0]=u,v.area[1]=g,v.area[3]=g+x,i.beginPath(),i.setLineWidth(1*e.pixelRatio),i.setStrokeStyle(v.show?v.color:e.legend.hiddenColor),i.setFillStyle(v.show?v.color:e.legend.hiddenColor),v.legendShape){case"line":i.moveTo(u,g+.5*x-2*e.pixelRatio),i.fillRect(u,g+.5*x-2*e.pixelRatio,15*e.pixelRatio,4*e.pixelRatio);break;case"triangle":i.moveTo(u+7.5*e.pixelRatio,g+.5*x-5*e.pixelRatio),i.lineTo(u+2.5*e.pixelRatio,g+.5*x+5*e.pixelRatio),i.lineTo(u+12.5*e.pixelRatio,g+.5*x+5*e.pixelRatio),i.lineTo(u+7.5*e.pixelRatio,g+.5*x-5*e.pixelRatio);break;case"diamond":i.moveTo(u+7.5*e.pixelRatio,g+.5*x-5*e.pixelRatio),i.lineTo(u+2.5*e.pixelRatio,g+.5*x),i.lineTo(u+7.5*e.pixelRatio,g+.5*x+5*e.pixelRatio),i.lineTo(u+12.5*e.pixelRatio,g+.5*x),i.lineTo(u+7.5*e.pixelRatio,g+.5*x-5*e.pixelRatio);break;case"circle":i.moveTo(u+7.5*e.pixelRatio,g+.5*x),i.arc(u+7.5*e.pixelRatio,g+.5*x,5*e.pixelRatio,0,2*Math.PI);break;case"rect":i.moveTo(u,g+.5*x-5*e.pixelRatio),i.fillRect(u,g+.5*x-5*e.pixelRatio,15*e.pixelRatio,10*e.pixelRatio);break;default:i.moveTo(u,g+.5*x-5*e.pixelRatio),i.fillRect(u,g+.5*x-5*e.pixelRatio,15*e.pixelRatio,10*e.pixelRatio)}i.closePath(),i.fill(),i.stroke(),u+=c+f;var m=.5*x+.5*h-2;i.beginPath(),i.setFontSize(h),i.setFillStyle(v.show?e.legend.fontColor:e.legend.hiddenColor),i.fillText(v.name,u,g+m),i.closePath(),i.stroke(),"top"==e.legend.position||"bottom"==e.legend.position?(u+=b(v.name,h)+d,v.area[2]=u):(v.area[2]=u+b(v.name,h)+d,u-=c+f,g+=x)}}))}}function st(t,e,a){a=0==a?1:a;for(var i=[],o=0;o<a;o++)i[o]=Math.random();return Math.floor(i.reduce((function(t,e){return t+e}))/a*(e-t))+t}function ht(t,e,a,i){for(var o=!1,r=0;r<e.length;r++)if(e[r].area){if(!(t[3]<e[r].area[1]||t[0]>e[r].area[2]||t[1]>e[r].area[3]||t[2]<e[r].area[0])){o=!0;break}if(t[0]<0||t[1]<0||t[2]>a||t[3]>i){o=!0;break}o=!1}return o}function ct(t,e,a,i,o,r){return{x:(e-a.xMin)*i+o,y:(a.yMax-t)*i+r}}function ft(t,e,a){if(e[1]==a[1])return!1;if(e[1]>t[1]&&a[1]>t[1])return!1;if(e[1]<t[1]&&a[1]<t[1])return!1;if(e[1]==t[1]&&a[1]>t[1])return!1;if(a[1]==t[1]&&e[1]>t[1])return!1;if(e[0]<t[0]&&a[1]<t[1])return!1;var i=a[0]-(a[0]-e[0])*(a[1]-t[1])/(a[1]-e[1]);return!(i<t[0])}function dt(t,e){for(var a=0,i=0;i<e.length;i++){var o=e[i][0];1==e.length&&(o=e[i][0]);for(var r=0;r<o.length-1;r++){var n=o[r],l=o[r+1];ft(t,n,l)&&(a+=1)}}return a%2==1}function xt(t,e,a,i,o,r,l){for(var s=0;s<t.length;s++){var h=t[s],c=void 0,f=void 0,d=void 0,x=void 0,p=h.format?h.format(+h._proportion_.toFixed(2)):n.toFixed(100*h._proportion_)+"%";"right"==o?(c=0==s?(h.funnelArea[2]+l.x)/2:(h.funnelArea[2]+t[s-1].funnelArea[2])/2,f=c+2*r,d=h.funnelArea[1]+i/2,x=h.textSize||e.fontSize,a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(h.color),a.setFillStyle(h.color),a.beginPath(),a.moveTo(c,d),a.lineTo(f,d),a.stroke(),a.closePath(),a.beginPath(),a.moveTo(f,d),a.arc(f,d,2,0,2*Math.PI),a.closePath(),a.fill(),a.beginPath(),a.setFontSize(x),a.setFillStyle(h.textColor||"#666666"),a.fillText(p,f+5,d+x/2-2),a.closePath(),a.stroke(),a.closePath()):(c=0==s?(h.funnelArea[0]+l.x)/2:(h.funnelArea[0]+t[s-1].funnelArea[0])/2,f=c-2*r,d=h.funnelArea[1]+i/2,x=h.textSize||e.fontSize,a.setLineWidth(1*e.pixelRatio),a.setStrokeStyle(h.color),a.setFillStyle(h.color),a.beginPath(),a.moveTo(c,d),a.lineTo(f,d),a.stroke(),a.closePath(),a.beginPath(),a.moveTo(f,d),a.arc(f,d,2,0,2*Math.PI),a.closePath(),a.fill(),a.beginPath(),a.setFontSize(x),a.setFillStyle(h.textColor||"#666666"),a.fillText(p,f-5-b(p),d+x/2-2),a.closePath(),a.stroke(),a.closePath())}}function pt(t,e){e.draw()}var bt={easeIn:function(t){return Math.pow(t,3)},easeOut:function(t){return Math.pow(t-1,3)+1},easeInOut:function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},linear:function(t){return t}};function ut(t){this.isStop=!1,t.duration="undefined"===typeof t.duration?1e3:t.duration,t.timing=t.timing||"linear";var e=function(){return"undefined"!==typeof setTimeout?function(t,e){setTimeout((function(){var e=+new Date;t(e)}),e)}:"undefined"!==typeof requestAnimationFrame?requestAnimationFrame:function(t){t(null)}}(),a=null,i=function(o){if(null===o||!0===this.isStop)return t.onProcess&&t.onProcess(1),void(t.onAnimationFinish&&t.onAnimationFinish());if(null===a&&(a=o),o-a<t.duration){var r=(o-a)/t.duration,n=bt[t.timing];r=n(r),t.onProcess&&t.onProcess(r),e(i,17)}else t.onProcess&&t.onProcess(1),t.onAnimationFinish&&t.onAnimationFinish()};i=i.bind(this),e(i,17)}function gt(t,e,a,i){var o=this,s=e.series,h=e.categories;s=x(s,e,a);var d=e.animation?e.duration:0;o.animationInstance&&o.animationInstance.stop();var p=null;if("candle"==t){var u=r({},e.extra.candle.average);u.show?(p=function(t,e,a,i){for(var o=[],r=0;r<t.length;r++){for(var n={data:[],name:e[r],color:a[r]},l=0,s=i.length;l<s;l++)if(l<t[r])n.data.push(null);else{for(var h=0,c=0;c<t[r];c++)h+=i[l-c][1];n.data.push(+(h/t[r]).toFixed(3))}o.push(n)}return o}(u.day,u.name,u.color,s[0].data),p=x(p,e,a),e.seriesMA=p):p=e.seriesMA?e.seriesMA=x(e.seriesMA,e,a):s}else p=s;e._series_=s=function(t){for(var e=[],a=0;a<t.length;a++)1==t[a].show&&e.push(t[a]);return e}(s),e.area=new Array(4);for(var g=0;g<4;g++)e.area[g]=e.padding[g];var y=function(t,e,a,i){var o={area:{start:{x:0,y:0},end:{x:0,y:0},width:0,height:0,wholeWidth:0,wholeHeight:0},points:[],widthArr:[],heightArr:[]};if(!1===e.legend.show)return i.legendData=o,o;var r=e.legend.padding,n=e.legend.margin,l=e.legend.fontSize,s=15*e.pixelRatio,h=5*e.pixelRatio,c=Math.max(e.legend.lineHeight*e.pixelRatio,l);if("top"==e.legend.position||"bottom"==e.legend.position){for(var f=[],d=0,x=[],p=[],u=0;u<t.length;u++){var g=t[u],y=s+h+b(g.name||"undefined",l)+e.legend.itemGap;d+y>e.width-e.padding[1]-e.padding[3]?(f.push(p),x.push(d-e.legend.itemGap),d=y,p=[g]):(d+=y,p.push(g))}if(p.length){f.push(p),x.push(d-e.legend.itemGap),o.widthArr=x;var v=Math.max.apply(null,x);switch(e.legend.float){case"left":o.area.start.x=e.padding[3],o.area.end.x=e.padding[3]+2*r;break;case"right":o.area.start.x=e.width-e.padding[1]-v-2*r,o.area.end.x=e.width-e.padding[1];break;default:o.area.start.x=(e.width-v)/2-r,o.area.end.x=(e.width+v)/2+r}o.area.width=v+2*r,o.area.wholeWidth=v+2*r,o.area.height=f.length*c+2*r,o.area.wholeHeight=f.length*c+2*r+2*n,o.points=f}}else{var m=t.length,S=e.height-e.padding[0]-e.padding[2]-2*n-2*r,A=Math.min(Math.floor(S/c),m);switch(o.area.height=A*c+2*r,o.area.wholeHeight=A*c+2*r,e.legend.float){case"top":o.area.start.y=e.padding[0]+n,o.area.end.y=e.padding[0]+n+o.area.height;break;case"bottom":o.area.start.y=e.height-e.padding[2]-n-o.area.height,o.area.end.y=e.height-e.padding[2]-n;break;default:o.area.start.y=(e.height-o.area.height)/2,o.area.end.y=(e.height+o.area.height)/2}for(var T=m%A===0?m/A:Math.floor(m/A+1),P=[],D=0;D<T;D++){var w=t.slice(D*A,D*A+A);P.push(w)}if(o.points=P,P.length){for(var _=0;_<P.length;_++){for(var M=P[_],L=0,F=0;F<M.length;F++){var k=s+h+b(M[F].name||"undefined",l)+e.legend.itemGap;k>L&&(L=k)}o.widthArr.push(L),o.heightArr.push(M.length*c+2*r)}for(var C=0,R=0;R<o.widthArr.length;R++)C+=o.widthArr[R];o.area.width=C-e.legend.itemGap+2*r,o.area.wholeWidth=o.area.width+r}}switch(e.legend.position){case"top":o.area.start.y=e.padding[0]+n,o.area.end.y=e.padding[0]+n+o.area.height;break;case"bottom":o.area.start.y=e.height-e.padding[2]-o.area.height-n,o.area.end.y=e.height-e.padding[2]-n;break;case"left":o.area.start.x=e.padding[3],o.area.end.x=e.padding[3]+o.area.width;break;case"right":o.area.start.x=e.width-e.padding[1]-o.area.width,o.area.end.x=e.width-e.padding[1];break}return i.legendData=o,o}(p,e,0,e.chartData),v=y.area.wholeHeight,A=y.area.wholeWidth;switch(e.legend.position){case"top":e.area[0]+=v;break;case"bottom":e.area[2]+=v;break;case"left":e.area[3]+=A;break;case"right":e.area[1]+=A;break}var T={},P=0;if("line"===e.type||"column"===e.type||"area"===e.type||"mix"===e.type||"candle"===e.type){if(T=j(s,e,a),P=T.yAxisWidth,e.yAxis.showTitle){for(var D=0,w=0;w<e.yAxis.data.length;w++)D=Math.max(D,e.yAxis.data[w].titleFontSize?e.yAxis.data[w].titleFontSize:a.fontSize);e.area[0]+=(D+6)*e.pixelRatio}for(var Y=0,tt=0,at=0;at<P.length;at++)"left"==P[at].position?(e.area[3]+=tt>0?P[at].width+e.yAxis.padding:P[at].width,tt+=1):(e.area[1]+=Y>0?P[at].width+e.yAxis.padding:P[at].width,Y+=1)}else a.yAxisWidth=P;if(e.chartData.yAxisData=T,e.categories&&e.categories.length){e.chartData.xAxisData=B(e.categories,e);var ft=M(e.categories,e,a,e.chartData.xAxisData.eachSpacing),dt=ft.xAxisHeight,bt=ft.angle;a.xAxisHeight=dt,a._xAxisTextAngle_=bt,e.area[2]+=dt,e.chartData.categoriesData=ft}else if("line"===e.type||"area"===e.type||"points"===e.type){e.chartData.xAxisData=L(s,e,a),h=e.chartData.xAxisData.rangesFormat;var gt=M(h,e,a,e.chartData.xAxisData.eachSpacing),yt=gt.xAxisHeight,vt=gt.angle;a.xAxisHeight=yt,a._xAxisTextAngle_=vt,e.area[2]+=yt,e.chartData.categoriesData=gt}else e.chartData.xAxisData={xAxisPoints:[]};if(e.enableScroll&&"right"==e.xAxis.scrollAlign&&void 0===e._scrollDistance_){var mt,St=e.chartData.xAxisData.xAxisPoints,At=e.chartData.xAxisData.startX,Tt=e.chartData.xAxisData.endX,Pt=e.chartData.xAxisData.eachSpacing,Dt=Pt*(St.length-1),wt=Tt-At;mt=wt-Dt,o.scrollOption={currentOffset:mt,startTouchX:mt,distance:0,lastMoveTime:0},e._scrollDistance_=mt}switch("pie"!==t&&"ring"!==t&&"rose"!==t||(a._pieTextMaxLength_=!1===e.dataLabel?0:function(t){t=k(t);for(var e=0,a=0;a<t.length;a++){var i=t[a],o=i.format?i.format(+i._proportion_.toFixed(2)):n.toFixed(100*i._proportion_)+"%";e=Math.max(e,b(o))}return e}(p)),t){case"word":var _t=r({},{type:"normal",autoColors:!0},e.extra.word);1!=e.updateData&&void 0!=e.updateData||(e.chartData.wordCloudData=function(t,e){var a=t.series.sort((function(t,e){return parseInt(e.textSize)-parseInt(t.textSize)}));switch(e){case"normal":for(var i=0;i<a.length;i++){var o=a[i].name,r=a[i].textSize,n=b(o,r),l=void 0,s=void 0,h=void 0,c=0;while(1){c++,l=st(-t.width/2,t.width/2,5)-n/2,s=st(-t.height/2,t.height/2,5)+r/2,h=[l-5+t.width/2,s-5-r+t.height/2,l+n+5+t.width/2,s+5+t.height/2];var f=ht(h,a,t.width,t.height);if(!f)break;if(1e3==c){h=[-100,-100,-100,-100];break}}a[i].area=h}break;case"vertical":for(var d=function(){return Math.random()>.7},x=0;x<a.length;x++){var p=a[x].name,u=a[x].textSize,g=b(p,u),y=d(),v=void 0,m=void 0,S=void 0,A=void 0,T=0;while(1){T++;var P=void 0;if(y?(v=st(-t.width/2,t.width/2,5)-g/2,m=st(-t.height/2,t.height/2,5)+u/2,S=[m-5-g+t.width/2,-v-5+t.height/2,m+5+t.width/2,-v+u+5+t.height/2],A=[t.width-(t.width/2-t.height/2)-(-v+u+5+t.height/2)-5,t.height/2-t.width/2+(m-5-g+t.width/2)-5,t.width-(t.width/2-t.height/2)-(-v+u+5+t.height/2)+u,t.height/2-t.width/2+(m-5-g+t.width/2)+g+5],P=ht(A,a,t.height,t.width)):(v=st(-t.width/2,t.width/2,5)-g/2,m=st(-t.height/2,t.height/2,5)+u/2,S=[v-5+t.width/2,m-5-u+t.height/2,v+g+5+t.width/2,m+5+t.height/2],P=ht(S,a,t.width,t.height)),!P)break;if(1e3==T){S=[-1e3,-1e3,-1e3,-1e3];break}}y?(a[x].area=A,a[x].areav=S):a[x].area=S,a[x].rotate=y}break}return a}(e,_t.type)),this.animationInstance=new ut({timing:"easeInOut",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1;r({},{type:"normal",autoColors:!0},e.extra.word),i.beginPath(),i.setFillStyle(e.background||"#FFFFFF"),i.rect(0,0,e.width,e.height),i.fill(),i.save();var n=e.chartData.wordCloudData;i.translate(e.width/2,e.height/2);for(var l=0;l<n.length;l++){i.save(),n[l].rotate&&i.rotate(90*Math.PI/180);var s=n[l].name,h=n[l].textSize,c=b(s,h);i.beginPath(),i.setStrokeStyle(n[l].color),i.setFillStyle(n[l].color),i.setFontSize(h),n[l].rotate?n[l].areav[0]>0&&(e.tooltip&&e.tooltip.index==l?i.strokeText(s,(n[l].areav[0]+5-e.width/2)*o-c*(1-o)/2,(n[l].areav[1]+5+h-e.height/2)*o):i.fillText(s,(n[l].areav[0]+5-e.width/2)*o-c*(1-o)/2,(n[l].areav[1]+5+h-e.height/2)*o)):n[l].area[0]>0&&(e.tooltip&&e.tooltip.index==l?i.strokeText(s,(n[l].area[0]+5-e.width/2)*o-c*(1-o)/2,(n[l].area[1]+5+h-e.height/2)*o):i.fillText(s,(n[l].area[0]+5-e.width/2)*o-c*(1-o)/2,(n[l].area[1]+5+h-e.height/2)*o)),i.stroke(),i.restore()}i.restore()}(s,e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"map":i.clearRect(0,0,e.width,e.height),function(t,e,a,i){var o,n,s=r({},{border:!0,borderWidth:1,borderColor:"#666666",fillOpacity:.6,activeBorderColor:"#f04864",activeFillColor:"#facc14",activeFillOpacity:1},e.extra.map),h=t,c=function(t){for(var e,a={xMin:180,xMax:0,yMin:90,yMax:0},i=0;i<t.length;i++)for(var o=t[i].geometry.coordinates,r=0;r<o.length;r++){e=o[r],1==e.length&&(e=e[0]);for(var n=0;n<e.length;n++){var l=e[n][0],s=e[n][1],h={x:l,y:s};a.xMin=a.xMin<h.x?a.xMin:h.x,a.xMax=a.xMax>h.x?a.xMax:h.x,a.yMin=a.yMin<h.y?a.yMin:h.y,a.yMax=a.yMax>h.y?a.yMax:h.y}}return a}(h),f=e.width/Math.abs(c.xMax-c.xMin),d=e.height/Math.abs(c.yMax-c.yMin),x=f<d?f:d,p=e.width/2-Math.abs(c.xMax-c.xMin)/2*x,u=e.height/2-Math.abs(c.yMax-c.yMin)/2*x;i.beginPath(),i.clearRect(0,0,e.width,e.height),i.setFillStyle(e.background||"#FFFFFF"),i.rect(0,0,e.width,e.height),i.fill();for(var g=0;g<h.length;g++){i.beginPath(),i.setLineWidth(s.borderWidth*e.pixelRatio),i.setStrokeStyle(s.borderColor),i.setFillStyle(l(t[g].color,s.fillOpacity)),e.tooltip&&e.tooltip.index==g&&(i.setStrokeStyle(s.activeBorderColor),i.setFillStyle(l(s.activeFillColor,s.activeFillOpacity)));for(var y=h[g].geometry.coordinates,v=0;v<y.length;v++){o=y[v],1==o.length&&(o=o[0]);for(var m=0;m<o.length;m++)n=ct(o[m][1],o[m][0],c,x,p,u),0===m?(i.beginPath(),i.moveTo(n.x,n.y)):i.lineTo(n.x,n.y);i.fill(),1==s.border&&i.stroke()}if(1==e.dataLabel){var S=h[g].properties.centroid;if(S){n=ct(S[1],S[0],c,x,p,u);var A=h[g].textSize||a.fontSize,T=h[g].properties.name;i.beginPath(),i.setFontSize(A),i.setFillStyle(h[g].textColor||"#666666"),i.fillText(T,n.x-b(T,A)/2,n.y+A/2),i.closePath(),i.stroke()}}}e.chartData.mapData={bounds:c,scale:x,xoffset:p,yoffset:u},it(e,a,i,1),i.draw()}(s,e,a,i);break;case"funnel":this.animationInstance=new ut({timing:"easeInOut",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),e.chartData.funnelData=function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,n=r({},{activeWidth:10,activeOpacity:.3,border:!1,borderWidth:2,borderColor:"#FFFFFF",fillOpacity:1,labelAlign:"right"},e.extra.funnel),s=(e.height-e.area[0]-e.area[2])/t.length,h={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.height-e.area[2]},c=n.activeWidth,f=Math.min((e.width-e.area[1]-e.area[3])/2-c,(e.height-e.area[0]-e.area[2])/2-c);t=C(t,f,o),i.save(),i.translate(h.x,h.y);for(var d=0;d<t.length;d++)0==d?(e.tooltip&&e.tooltip.index==d&&(i.beginPath(),i.setFillStyle(l(t[d].color,n.activeOpacity)),i.moveTo(-c,0),i.lineTo(-t[d].radius-c,-s),i.lineTo(t[d].radius+c,-s),i.lineTo(c,0),i.lineTo(-c,0),i.closePath(),i.fill()),t[d].funnelArea=[h.x-t[d].radius,h.y-s,h.x+t[d].radius,h.y],i.beginPath(),i.setLineWidth(n.borderWidth*e.pixelRatio),i.setStrokeStyle(n.borderColor),i.setFillStyle(l(t[d].color,n.fillOpacity)),i.moveTo(0,0),i.lineTo(-t[d].radius,-s),i.lineTo(t[d].radius,-s),i.lineTo(0,0),i.closePath(),i.fill(),1==n.border&&i.stroke()):(e.tooltip&&e.tooltip.index==d&&(i.beginPath(),i.setFillStyle(l(t[d].color,n.activeOpacity)),i.moveTo(0,0),i.lineTo(-t[d-1].radius-c,0),i.lineTo(-t[d].radius-c,-s),i.lineTo(t[d].radius+c,-s),i.lineTo(t[d-1].radius+c,0),i.lineTo(0,0),i.closePath(),i.fill()),t[d].funnelArea=[h.x-t[d].radius,h.y-s*(d+1),h.x+t[d].radius,h.y-s*d],i.beginPath(),i.setLineWidth(n.borderWidth*e.pixelRatio),i.setStrokeStyle(n.borderColor),i.setFillStyle(l(t[d].color,n.fillOpacity)),i.moveTo(0,0),i.lineTo(-t[d-1].radius,0),i.lineTo(-t[d].radius,-s),i.lineTo(t[d].radius,-s),i.lineTo(t[d-1].radius,0),i.lineTo(0,0),i.closePath(),i.fill(),1==n.border&&i.stroke()),i.translate(0,-s);return i.restore(),!1!==e.dataLabel&&1===o&&xt(t,e,i,s,n.labelAlign,c,h),{center:h,radius:f,series:t}}(s,e,a,i,t),lt(e.series,e,a,i,e.chartData),it(e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"line":this.animationInstance=new ut({timing:"easeIn",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),rt(0,e,0,i),ot(h,e,a,i);var o=function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,n=r({},{type:"straight",width:2},e.extra.line);n.width*=e.pixelRatio;var l=e.chartData.xAxisData,s=l.xAxisPoints,h=l.eachSpacing,f=[];i.save();var d=0,x=e.width+h;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(i.translate(e._scrollDistance_,0),d=-e._scrollDistance_-h+e.area[3],x=d+(e.xAxis.itemCount+4)*h),t.forEach((function(t,r){var l,p,b;l=[].concat(e.chartData.yAxisData.ranges[t.index]),p=l.pop(),b=l.shift();var u=t.data,g=G(u,p,b,s,h,e,a,o);f.push(g);var y=_(g);if("dash"==t.lineType){var v=t.dashLength?t.dashLength:8;v*=e.pixelRatio,i.setLineDash([v,v])}i.beginPath(),i.setStrokeStyle(t.color),i.setLineWidth(n.width),y.forEach((function(t,e){if(1===t.length)i.moveTo(t[0].x,t[0].y),i.arc(t[0].x,t[0].y,1,0,2*Math.PI);else{i.moveTo(t[0].x,t[0].y);var a=0;if("curve"===n.type)for(var o=0;o<t.length;o++){var r=t[o];if(0==a&&r.x>d&&(i.moveTo(r.x,r.y),a=1),o>0&&r.x>d&&r.x<x){var l=c(t,o-1);i.bezierCurveTo(l.ctrA.x,l.ctrA.y,l.ctrB.x,l.ctrB.y,r.x,r.y)}}else for(var s=0;s<t.length;s++){var h=t[s];0==a&&h.x>d&&(i.moveTo(h.x,h.y),a=1),s>0&&h.x>d&&h.x<x&&i.lineTo(h.x,h.y)}i.moveTo(t[0].x,t[0].y)}})),i.stroke(),i.setLineDash([]),!1!==e.dataPointShape&&Z(g,t.color,t.pointShape,i,e)})),!1!==e.dataLabel&&1===o&&t.forEach((function(t,r){var n,l,c;n=[].concat(e.chartData.yAxisData.ranges[t.index]),l=n.pop(),c=n.shift();var f=t.data,d=G(f,l,c,s,h,e,a,o);J(d,t,a,i)})),i.restore(),{xAxisPoints:s,calPoints:f,eachSpacing:h}}(s,e,a,i,t),n=o.xAxisPoints,l=o.calPoints,f=o.eachSpacing;e.chartData.xAxisPoints=n,e.chartData.calPoints=l,e.chartData.eachSpacing=f,nt(0,e,a,i),!1!==e.enableMarkLine&&1===t&&V(e,a,i),lt(e.series,e,a,i,e.chartData),it(e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"mix":this.animationInstance=new ut({timing:"easeIn",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),rt(0,e,0,i),ot(h,e,a,i);var o=function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=e.chartData.xAxisData,n=r.xAxisPoints,s=r.eachSpacing,h=e.height-e.area[2],f=[],d=0,x=0;t.forEach((function(t,e){"column"==t.type&&(x+=1)})),i.save();var p=-2,b=n.length+2,u=0,g=e.width+s;if(e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(i.translate(e._scrollDistance_,0),p=Math.floor(-e._scrollDistance_/s)-2,b=p+e.xAxis.itemCount+4,u=-e._scrollDistance_-s+e.area[3],g=u+(e.xAxis.itemCount+4)*s),t.forEach((function(t,r){var y,v,m;y=[].concat(e.chartData.yAxisData.ranges[t.index]),v=y.pop(),m=y.shift();var S=t.data,A=G(S,v,m,n,s,e,a,o);if(f.push(A),"column"==t.type){A=O(A,s,x,d,a,e);for(var T=0;T<A.length;T++){var P=A[T];if(null!==P&&T>p&&T<b){i.beginPath(),i.setStrokeStyle(P.color||t.color),i.setLineWidth(1),i.setFillStyle(P.color||t.color);var D=P.x-P.width/2;e.height,P.y,e.area[2];i.moveTo(D,P.y),i.moveTo(D,P.y),i.lineTo(D+P.width-2,P.y),i.lineTo(D+P.width-2,e.height-e.area[2]),i.lineTo(D,e.height-e.area[2]),i.lineTo(D,P.y),i.closePath(),i.stroke(),i.fill(),i.closePath(),i.fill()}}d+=1}if("area"==t.type)for(var w=_(A),M=0;M<w.length;M++){var L=w[M];if(i.beginPath(),i.setStrokeStyle(t.color),i.setFillStyle(l(t.color,.2)),i.setLineWidth(2*e.pixelRatio),L.length>1){var F=L[0],k=L[L.length-1];i.moveTo(F.x,F.y);var C=0;if("curve"===t.style)for(var R=0;R<L.length;R++){var I=L[R];if(0==C&&I.x>u&&(i.moveTo(I.x,I.y),C=1),R>0&&I.x>u&&I.x<g){var z=c(L,R-1);i.bezierCurveTo(z.ctrA.x,z.ctrA.y,z.ctrB.x,z.ctrB.y,I.x,I.y)}}else for(var W=0;W<L.length;W++){var E=L[W];0==C&&E.x>u&&(i.moveTo(E.x,E.y),C=1),W>0&&E.x>u&&E.x<g&&i.lineTo(E.x,E.y)}i.lineTo(k.x,h),i.lineTo(F.x,h),i.lineTo(F.x,F.y)}else{var N=L[0];i.moveTo(N.x-s/2,N.y),i.lineTo(N.x+s/2,N.y),i.lineTo(N.x+s/2,h),i.lineTo(N.x-s/2,h),i.moveTo(N.x-s/2,N.y)}i.closePath(),i.fill()}if("line"==t.type){var B=_(A);B.forEach((function(a,o){if("dash"==t.lineType){var r=t.dashLength?t.dashLength:8;r*=e.pixelRatio,i.setLineDash([r,r])}if(i.beginPath(),i.setStrokeStyle(t.color),i.setLineWidth(2*e.pixelRatio),1===a.length)i.moveTo(a[0].x,a[0].y),i.arc(a[0].x,a[0].y,1,0,2*Math.PI);else{i.moveTo(a[0].x,a[0].y);var n=0;if("curve"==t.style)for(var l=0;l<a.length;l++){var s=a[l];if(0==n&&s.x>u&&(i.moveTo(s.x,s.y),n=1),l>0&&s.x>u&&s.x<g){var h=c(a,l-1);i.bezierCurveTo(h.ctrA.x,h.ctrA.y,h.ctrB.x,h.ctrB.y,s.x,s.y)}}else for(var f=0;f<a.length;f++){var d=a[f];0==n&&d.x>u&&(i.moveTo(d.x,d.y),n=1),f>0&&d.x>u&&d.x<g&&i.lineTo(d.x,d.y)}i.moveTo(a[0].x,a[0].y)}i.stroke(),i.setLineDash([])}))}"point"==t.type&&(t.addPoint=!0),1==t.addPoint&&"column"!==t.type&&Z(A,t.color,t.pointShape,i,e)})),!1!==e.dataLabel&&1===o){d=0;t.forEach((function(t,r){var l,h,c;l=[].concat(e.chartData.yAxisData.ranges[t.index]),h=l.pop(),c=l.shift();var f=t.data,p=G(f,h,c,n,s,e,a,o);"column"!==t.type?J(p,t,a,i):(p=O(p,s,x,d,a,e),J(p,t,a,i),d+=1)}))}return i.restore(),{xAxisPoints:n,calPoints:f,eachSpacing:s}}(s,e,a,i,t),r=o.xAxisPoints,n=o.calPoints,f=o.eachSpacing;e.chartData.xAxisPoints=r,e.chartData.calPoints=n,e.chartData.eachSpacing=f,nt(0,e,a,i),!1!==e.enableMarkLine&&1===t&&V(e,a,i),lt(e.series,e,a,i,e.chartData),it(e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"column":this.animationInstance=new ut({timing:"easeIn",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),rt(0,e,0,i),ot(h,e,a,i);var o=function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,n=e.chartData.xAxisData,l=n.xAxisPoints,s=n.eachSpacing,h=r({},{type:"group",width:s/2,meter:{border:4,fillColor:"#FFFFFF"}},e.extra.column),c=[];i.save();var f=-2,d=l.length+2;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(i.translate(e._scrollDistance_,0),f=Math.floor(-e._scrollDistance_/s)-2,d=f+e.xAxis.itemCount+4),e.tooltip&&e.tooltip.textList&&e.tooltip.textList.length&&1===o&&et(e.tooltip.offset.x,e,0,i,s),t.forEach((function(r,n){var x,p,b;x=[].concat(e.chartData.yAxisData.ranges[r.index]),p=x.pop(),b=x.shift();var u=r.data;switch(h.type){case"group":var g=G(u,p,b,l,s,e,a,o),y=X(u,p,b,l,s,e,a,n,t,o);c.push(y),g=O(g,s,t.length,n,a,e);for(var v=0;v<g.length;v++){var m=g[v];if(null!==m&&v>f&&v<d){i.beginPath(),i.setStrokeStyle(m.color||r.color),i.setLineWidth(1),i.setFillStyle(m.color||r.color);var S=m.x-m.width/2,A=e.height-m.y-e.area[2];i.moveTo(S,m.y),i.lineTo(S+m.width-2,m.y),i.lineTo(S+m.width-2,e.height-e.area[2]),i.lineTo(S,e.height-e.area[2]),i.lineTo(S,m.y),i.closePath(),i.stroke(),i.fill()}}break;case"stack":g=X(u,p,b,l,s,e,a,n,t,o);c.push(g),g=N(g,s,t.length,0,a,e);for(var T=0;T<g.length;T++){var P=g[T];if(null!==P&&T>f&&T<d){i.beginPath(),i.setFillStyle(P.color||r.color);S=P.x-P.width/2+1,A=e.height-P.y-e.area[2];var D=e.height-P.y0-e.area[2];n>0&&(A-=D),i.moveTo(S,P.y),i.fillRect(S,P.y,P.width-2,A),i.closePath(),i.fill()}}break;case"meter":g=G(u,p,b,l,s,e,a,o);if(c.push(g),g=E(g,s,t.length,n,a,e,h.meter.border),0==n)for(var w=0;w<g.length;w++){var _=g[w];if(null!==_&&w>f&&w<d){i.beginPath(),i.setFillStyle(h.meter.fillColor);S=_.x-_.width/2,A=e.height-_.y-e.area[2];i.moveTo(S,_.y),i.fillRect(S,_.y,_.width,A),i.closePath(),i.fill(),h.meter.border>0&&(i.beginPath(),i.setStrokeStyle(r.color),i.setLineWidth(h.meter.border*e.pixelRatio),i.moveTo(S+.5*h.meter.border,_.y+A),i.lineTo(S+.5*h.meter.border,_.y+.5*h.meter.border),i.lineTo(S+_.width-.5*h.meter.border,_.y+.5*h.meter.border),i.lineTo(S+_.width-.5*h.meter.border,_.y+A),i.stroke())}}else for(var M=0;M<g.length;M++){var L=g[M];if(null!==L&&M>f&&M<d){i.beginPath(),i.setFillStyle(L.color||r.color);S=L.x-L.width/2,A=e.height-L.y-e.area[2];i.moveTo(S,L.y),i.fillRect(S,L.y,L.width,A),i.closePath(),i.fill()}}break}})),!1!==e.dataLabel&&1===o&&t.forEach((function(r,n){var c,f,d;c=[].concat(e.chartData.yAxisData.ranges[r.index]),f=c.pop(),d=c.shift();var x=r.data;switch(h.type){case"group":var p=G(x,f,d,l,s,e,a,o);p=O(p,s,t.length,n,a,e),J(p,r,a,i);break;case"stack":p=X(x,f,d,l,s,e,a,n,t,o);J(p,r,a,i);break;case"meter":p=G(x,f,d,l,s,e,a,o);J(p,r,a,i);break}})),i.restore(),{xAxisPoints:l,calPoints:c,eachSpacing:s}}(s,e,a,i,t),n=o.xAxisPoints,l=o.calPoints,c=o.eachSpacing;e.chartData.xAxisPoints=n,e.chartData.calPoints=l,e.chartData.eachSpacing=c,nt(0,e,a,i),!1!==e.enableMarkLine&&1===t&&V(e,a,i),lt(e.series,e,a,i,e.chartData),it(e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"area":this.animationInstance=new ut({timing:"easeIn",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),rt(0,e,0,i),ot(h,e,a,i);var o=function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,n=r({},{type:"straight",opacity:.2,addLine:!1,width:2,gradient:!1},e.extra.area),s=e.chartData.xAxisData,h=s.xAxisPoints,f=s.eachSpacing,d=e.height-e.area[2],x=[];i.save();var p=0,b=e.width+f;return e._scrollDistance_&&0!==e._scrollDistance_&&!0===e.enableScroll&&(i.translate(e._scrollDistance_,0),p=-e._scrollDistance_-f+e.area[3],b=p+(e.xAxis.itemCount+4)*f),t.forEach((function(t,r){var s,u,g;s=[].concat(e.chartData.yAxisData.ranges[t.index]),u=s.pop(),g=s.shift();var y=t.data,v=G(y,u,g,h,f,e,a,o);x.push(v);for(var m=_(v),S=0;S<m.length;S++){var A=m[S];if(i.beginPath(),i.setStrokeStyle(l(t.color,n.opacity)),n.gradient){var T=i.createLinearGradient(0,e.area[0],0,e.height-e.area[2]);T.addColorStop("0",l(t.color,n.opacity)),T.addColorStop("1.0",l("#FFFFFF",.1)),i.setFillStyle(T)}else i.setFillStyle(l(t.color,n.opacity));if(i.setLineWidth(n.width*e.pixelRatio),A.length>1){var P=A[0],D=A[A.length-1];i.moveTo(P.x,P.y);var w=0;if("curve"===n.type)for(var M=0;M<A.length;M++){var L=A[M];if(0==w&&L.x>p&&(i.moveTo(L.x,L.y),w=1),M>0&&L.x>p&&L.x<b){var F=c(A,M-1);i.bezierCurveTo(F.ctrA.x,F.ctrA.y,F.ctrB.x,F.ctrB.y,L.x,L.y)}}else for(var k=0;k<A.length;k++){var C=A[k];0==w&&C.x>p&&(i.moveTo(C.x,C.y),w=1),k>0&&C.x>p&&C.x<b&&i.lineTo(C.x,C.y)}i.lineTo(D.x,d),i.lineTo(P.x,d),i.lineTo(P.x,P.y)}else{var R=A[0];i.moveTo(R.x-f/2,R.y),i.lineTo(R.x+f/2,R.y),i.lineTo(R.x+f/2,d),i.lineTo(R.x-f/2,d),i.moveTo(R.x-f/2,R.y)}if(i.closePath(),i.fill(),n.addLine){if("dash"==t.lineType){var I=t.dashLength?t.dashLength:8;I*=e.pixelRatio,i.setLineDash([I,I])}if(i.beginPath(),i.setStrokeStyle(t.color),i.setLineWidth(n.width*e.pixelRatio),1===A.length)i.moveTo(A[0].x,A[0].y),i.arc(A[0].x,A[0].y,1,0,2*Math.PI);else{i.moveTo(A[0].x,A[0].y);var z=0;if("curve"===n.type)for(var W=0;W<A.length;W++){var O=A[W];if(0==z&&O.x>p&&(i.moveTo(O.x,O.y),z=1),W>0&&O.x>p&&O.x<b){var E=c(A,W-1);i.bezierCurveTo(E.ctrA.x,E.ctrA.y,E.ctrB.x,E.ctrB.y,O.x,O.y)}}else for(var N=0;N<A.length;N++){var B=A[N];0==z&&B.x>p&&(i.moveTo(B.x,B.y),z=1),N>0&&B.x>p&&B.x<b&&i.lineTo(B.x,B.y)}i.moveTo(A[0].x,A[0].y)}i.stroke(),i.setLineDash([])}}!1!==e.dataPointShape&&Z(v,t.color,t.pointShape,i,e)})),!1!==e.dataLabel&&1===o&&t.forEach((function(t,r){var n,l,s;n=[].concat(e.chartData.yAxisData.ranges[t.index]),l=n.pop(),s=n.shift();var c=t.data,d=G(c,l,s,h,f,e,a,o);J(d,t,a,i)})),i.restore(),{xAxisPoints:h,calPoints:x,eachSpacing:f}}(s,e,a,i,t),n=o.xAxisPoints,f=o.calPoints,d=o.eachSpacing;e.chartData.xAxisPoints=n,e.chartData.calPoints=f,e.chartData.eachSpacing=d,nt(0,e,a,i),!1!==e.enableMarkLine&&1===t&&V(e,a,i),lt(e.series,e,a,i,e.chartData),it(e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"ring":case"pie":this.animationInstance=new ut({timing:"easeInOut",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),e.chartData.pieData=function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,n=r({},{activeOpacity:.5,activeRadius:10*e.pixelRatio,offsetAngle:0,labelWidth:15*e.pixelRatio,ringWidth:0,border:!1,borderWidth:2,borderColor:"#FFFFFF"},e.extra.pie),s={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2};0==a.pieChartLinePadding&&(a.pieChartLinePadding=n.activeRadius);var h=Math.min((e.width-e.area[1]-e.area[3])/2-a.pieChartLinePadding-a.pieChartTextPadding-a._pieTextMaxLength_,(e.height-e.area[0]-e.area[2])/2-a.pieChartLinePadding-a.pieChartTextPadding);t=k(t,h,o);var c=n.activeRadius;if(t=t.map((function(t){return t._start_+=n.offsetAngle*Math.PI/180,t})),t.forEach((function(t,a){e.tooltip&&e.tooltip.index==a&&(i.beginPath(),i.setFillStyle(l(t.color,e.extra.pie.activeOpacity||.5)),i.moveTo(s.x,s.y),i.arc(s.x,s.y,t._radius_+c,t._start_,t._start_+2*t._proportion_*Math.PI),i.closePath(),i.fill()),i.beginPath(),i.setLineWidth(n.borderWidth*e.pixelRatio),i.lineJoin="round",i.setStrokeStyle(n.borderColor),i.setFillStyle(t.color),i.moveTo(s.x,s.y),i.arc(s.x,s.y,t._radius_,t._start_,t._start_+2*t._proportion_*Math.PI),i.closePath(),i.fill(),1==n.border&&i.stroke()})),"ring"===e.type){var f=.6*h;"number"===typeof e.extra.pie.ringWidth&&e.extra.pie.ringWidth>0&&(f=Math.max(0,h-e.extra.pie.ringWidth)),i.beginPath(),i.setFillStyle(e.background||"#ffffff"),i.moveTo(s.x,s.y),i.arc(s.x,s.y,f,0,2*Math.PI),i.closePath(),i.fill()}if(!1!==e.dataLabel&&1===o){for(var d=!1,x=0,p=t.length;x<p;x++)if(t[x].data>0){d=!0;break}d&&Q(t,e,a,i,0,s)}return 1===o&&"ring"===e.type&&U(e,a,i,s),{center:s,radius:h,series:t}}(s,e,a,i,t),lt(e.series,e,a,i,e.chartData),it(e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"rose":this.animationInstance=new ut({timing:"easeInOut",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),e.chartData.pieData=function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,n=r({},{type:"area",activeOpacity:.5,activeRadius:10*e.pixelRatio,offsetAngle:0,labelWidth:15*e.pixelRatio,border:!1,borderWidth:2,borderColor:"#FFFFFF"},e.extra.rose);0==a.pieChartLinePadding&&(a.pieChartLinePadding=n.activeRadius);var s={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2},h=Math.min((e.width-e.area[1]-e.area[3])/2-a.pieChartLinePadding-a.pieChartTextPadding-a._pieTextMaxLength_,(e.height-e.area[0]-e.area[2])/2-a.pieChartLinePadding-a.pieChartTextPadding),c=n.minRadius||.5*h;t=R(t,n.type,c,h,o);var f=n.activeRadius;if(t=t.map((function(t){return t._start_+=(n.offsetAngle||0)*Math.PI/180,t})),t.forEach((function(t,a){e.tooltip&&e.tooltip.index==a&&(i.beginPath(),i.setFillStyle(l(t.color,n.activeOpacity||.5)),i.moveTo(s.x,s.y),i.arc(s.x,s.y,f+t._radius_,t._start_,t._start_+2*t._rose_proportion_*Math.PI),i.closePath(),i.fill()),i.beginPath(),i.setLineWidth(n.borderWidth*e.pixelRatio),i.lineJoin="round",i.setStrokeStyle(n.borderColor),i.setFillStyle(t.color),i.moveTo(s.x,s.y),i.arc(s.x,s.y,t._radius_,t._start_,t._start_+2*t._rose_proportion_*Math.PI),i.closePath(),i.fill(),1==n.border&&i.stroke()})),!1!==e.dataLabel&&1===o){for(var d=!1,x=0,p=t.length;x<p;x++)if(t[x].data>0){d=!0;break}d&&Q(t,e,a,i,0,s)}return{center:s,radius:h,series:t}}(s,e,a,i,t),lt(e.series,e,a,i,e.chartData),it(e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"radar":this.animationInstance=new ut({timing:"easeInOut",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),e.chartData.radarData=function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,n=r({},{gridColor:"#cccccc",labelColor:"#666666",opacity:.2,gridCount:3},e.extra.radar),s=S(e.categories.length),h={x:e.area[3]+(e.width-e.area[1]-e.area[3])/2,y:e.area[0]+(e.height-e.area[0]-e.area[2])/2},c=Math.min(h.x-(m(e.categories)+a.radarLabelTextMargin),h.y-a.radarLabelTextMargin);c-=e.padding[1],i.beginPath(),i.setLineWidth(1*e.pixelRatio),i.setStrokeStyle(n.gridColor),s.forEach((function(t){var e=f(c*Math.cos(t),c*Math.sin(t),h);i.moveTo(h.x,h.y),i.lineTo(e.x,e.y)})),i.stroke(),i.closePath();for(var d=function(t){var a={};i.beginPath(),i.setLineWidth(1*e.pixelRatio),i.setStrokeStyle(n.gridColor),s.forEach((function(e,o){var r=f(c/n.gridCount*t*Math.cos(e),c/n.gridCount*t*Math.sin(e),h);0===o?(a=r,i.moveTo(r.x,r.y)):i.lineTo(r.x,r.y)})),i.lineTo(a.x,a.y),i.stroke(),i.closePath()},x=1;x<=n.gridCount;x++)d(x);var p=F(s,h,c,t,e,o);return p.forEach((function(t,a){if(i.beginPath(),i.setFillStyle(l(t.color,n.opacity)),t.data.forEach((function(t,e){0===e?i.moveTo(t.position.x,t.position.y):i.lineTo(t.position.x,t.position.y)})),i.closePath(),i.fill(),!1!==e.dataPointShape){var o=t.data.map((function(t){return t.position}));Z(o,t.color,t.pointShape,i,e)}})),K(s,c,h,e,a,i),{center:h,radius:c,angleList:s}}(s,e,a,i,t),lt(e.series,e,a,i,e.chartData),it(e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"arcbar":this.animationInstance=new ut({timing:"easeInOut",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),e.chartData.arcbarData=function(t,e,a,i){var o,n,l=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,s=r({},{startAngle:.75,endAngle:.25,type:"default",width:12*e.pixelRatio,gap:2*e.pixelRatio},e.extra.arcbar);t=I(t,s,l),o=s.center?s.center:{x:e.width/2,y:e.height/2},s.radius?n=s.radius:(n=Math.min(o.x,o.y),n-=5*e.pixelRatio,n-=s.width/2);for(var h=0;h<t.length;h++){var c=t[h];i.setLineWidth(s.width),i.setStrokeStyle(s.backgroundColor||"#E9E9E9"),i.setLineCap("round"),i.beginPath(),"default"==s.type?i.arc(o.x,o.y,n-(s.width+s.gap)*h,s.startAngle*Math.PI,s.endAngle*Math.PI,!1):i.arc(o.x,o.y,n-(s.width+s.gap)*h,0,2*Math.PI,!1),i.stroke(),i.setLineWidth(s.width),i.setStrokeStyle(c.color),i.setLineCap("round"),i.beginPath(),i.arc(o.x,o.y,n-(s.width+s.gap)*h,s.startAngle*Math.PI,c._proportion_*Math.PI,!1),i.stroke()}return U(e,a,i,o),{center:o,radius:n,series:t}}(s,e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"gauge":this.animationInstance=new ut({timing:"easeInOut",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),e.chartData.gaugeData=function(t,e,a,i,o){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,s=r({},{type:"default",startAngle:.75,endAngle:.25,width:15,splitLine:{fixRadius:0,splitNumber:10,width:15,color:"#FFFFFF",childNumber:5,childWidth:5},pointer:{width:15,color:"auto"}},a.extra.gauge);void 0==s.oldAngle&&(s.oldAngle=s.startAngle),void 0==s.oldData&&(s.oldData=0),t=z(t,s.startAngle,s.endAngle);var h={x:a.width/2,y:a.height/2},c=Math.min(h.x,h.y);c-=5*a.pixelRatio,c-=s.width/2;var f=c-s.width,d=0;if("progress"==s.type){var x=c-3*s.width;o.beginPath();var p=o.createLinearGradient(h.x,h.y-x,h.x,h.y+x);p.addColorStop("0",l(e[0].color,.3)),p.addColorStop("1.0",l("#FFFFFF",.1)),o.setFillStyle(p),o.arc(h.x,h.y,x,0,2*Math.PI,!1),o.fill(),o.setLineWidth(s.width),o.setStrokeStyle(l(e[0].color,.3)),o.setLineCap("round"),o.beginPath(),o.arc(h.x,h.y,f,s.startAngle*Math.PI,s.endAngle*Math.PI,!1),o.stroke(),d=s.startAngle-s.endAngle+1;s.splitLine.splitNumber;var b=d/s.splitLine.splitNumber/s.splitLine.childNumber,u=-c-.5*s.width-s.splitLine.fixRadius,g=-c-s.width-s.splitLine.fixRadius+s.splitLine.width;o.save(),o.translate(h.x,h.y),o.rotate((s.startAngle-1)*Math.PI);for(var y=s.splitLine.splitNumber*s.splitLine.childNumber+1,v=e[0].data*n,m=0;m<y;m++)o.beginPath(),v>m/y?o.setStrokeStyle(l(e[0].color,1)):o.setStrokeStyle(l(e[0].color,.3)),o.setLineWidth(3*a.pixelRatio),o.moveTo(u,0),o.lineTo(g,0),o.stroke(),o.rotate(b*Math.PI);o.restore(),e=I(e,s,n),o.setLineWidth(s.width),o.setStrokeStyle(e[0].color),o.setLineCap("round"),o.beginPath(),o.arc(h.x,h.y,f,s.startAngle*Math.PI,e[0]._proportion_*Math.PI,!1),o.stroke();var S=c-2.5*s.width;o.save(),o.translate(h.x,h.y),o.rotate((e[0]._proportion_-1)*Math.PI),o.beginPath(),o.setLineWidth(s.width/3);var A=o.createLinearGradient(0,.6*-S,0,.6*S);A.addColorStop("0",l("#FFFFFF",0)),A.addColorStop("0.5",l(e[0].color,1)),A.addColorStop("1.0",l("#FFFFFF",0)),o.setStrokeStyle(A),o.arc(0,0,S,.85*Math.PI,1.15*Math.PI,!1),o.stroke(),o.beginPath(),o.setLineWidth(1),o.setStrokeStyle(e[0].color),o.setFillStyle(e[0].color),o.moveTo(-S-s.width/3/2,-4),o.lineTo(-S-s.width/3/2-4,0),o.lineTo(-S-s.width/3/2,4),o.lineTo(-S-s.width/3/2,-4),o.stroke(),o.fill(),o.restore()}else{o.setLineWidth(s.width),o.setLineCap("butt");for(var T=0;T<t.length;T++){var P=t[T];o.beginPath(),o.setStrokeStyle(P.color),o.arc(h.x,h.y,c,P._startAngle_*Math.PI,P._endAngle_*Math.PI,!1),o.stroke()}o.save(),d=s.startAngle-s.endAngle+1;var D=d/s.splitLine.splitNumber,w=d/s.splitLine.splitNumber/s.splitLine.childNumber,_=-c-.5*s.width-s.splitLine.fixRadius,M=-c-.5*s.width-s.splitLine.fixRadius+s.splitLine.width,L=-c-.5*s.width-s.splitLine.fixRadius+s.splitLine.childWidth;o.translate(h.x,h.y),o.rotate((s.startAngle-1)*Math.PI);for(var F=0;F<s.splitLine.splitNumber+1;F++)o.beginPath(),o.setStrokeStyle(s.splitLine.color),o.setLineWidth(2*a.pixelRatio),o.moveTo(_,0),o.lineTo(M,0),o.stroke(),o.rotate(D*Math.PI);o.restore(),o.save(),o.translate(h.x,h.y),o.rotate((s.startAngle-1)*Math.PI);for(var k=0;k<s.splitLine.splitNumber*s.splitLine.childNumber+1;k++)o.beginPath(),o.setStrokeStyle(s.splitLine.color),o.setLineWidth(1*a.pixelRatio),o.moveTo(_,0),o.lineTo(L,0),o.stroke(),o.rotate(w*Math.PI);o.restore(),e=W(e,t,s,n);for(var C=0;C<e.length;C++){var R=e[C];o.save(),o.translate(h.x,h.y),o.rotate((R._proportion_-1)*Math.PI),o.beginPath(),o.setFillStyle(R.color),o.moveTo(s.pointer.width,0),o.lineTo(0,-s.pointer.width/2),o.lineTo(-f,0),o.lineTo(0,s.pointer.width/2),o.lineTo(s.pointer.width,0),o.closePath(),o.fill(),o.beginPath(),o.setFillStyle("#FFFFFF"),o.arc(0,0,s.pointer.width/6,0,2*Math.PI,!1),o.fill(),o.restore()}!1!==a.dataLabel&&$(s,c,h,0,i,o)}return U(a,i,o,h),1===n&&"gauge"===a.type&&(a.extra.gauge.oldAngle=e[0]._proportion_,a.extra.gauge.oldData=e[0].data),{center:h,radius:c,innerRadius:f,categories:t,totalAngle:d}}(h,s,e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break;case"candle":this.animationInstance=new ut({timing:"easeIn",duration:d,onProcess:function(t){i.clearRect(0,0,e.width,e.height),e.rotate&&q(i,e),rt(0,e,0,i),ot(h,e,a,i);var o=function(t,e,a,i,o){var n=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,l=r({},{color:{},average:{}},a.extra.candle);l.color=r({},{upLine:"#f04864",upFill:"#f04864",downLine:"#2fc25b",downFill:"#2fc25b"},l.color),l.average=r({},{show:!1,name:[],day:[],color:i.colors},l.average),a.extra.candle=l;var s=a.chartData.xAxisData,h=s.xAxisPoints,f=s.eachSpacing,d=[];o.save();var x=-2,p=h.length+2,b=0,u=a.width+f;return a._scrollDistance_&&0!==a._scrollDistance_&&!0===a.enableScroll&&(o.translate(a._scrollDistance_,0),x=Math.floor(-a._scrollDistance_/f)-2,p=x+a.xAxis.itemCount+4,b=-a._scrollDistance_-f+a.area[3],u=b+(a.xAxis.itemCount+4)*f),l.average.show&&e.forEach((function(t,e){var r,l,s;r=[].concat(a.chartData.yAxisData.ranges[t.index]),l=r.pop(),s=r.shift();for(var d=t.data,x=G(d,l,s,h,f,a,i,n),p=_(x),g=0;g<p.length;g++){var y=p[g];if(o.beginPath(),o.setStrokeStyle(t.color),o.setLineWidth(1),1===y.length)o.moveTo(y[0].x,y[0].y),o.arc(y[0].x,y[0].y,1,0,2*Math.PI);else{o.moveTo(y[0].x,y[0].y);for(var v=0,m=0;m<y.length;m++){var S=y[m];if(0==v&&S.x>b&&(o.moveTo(S.x,S.y),v=1),m>0&&S.x>b&&S.x<u){var A=c(y,m-1);o.bezierCurveTo(A.ctrA.x,A.ctrA.y,A.ctrB.x,A.ctrB.y,S.x,S.y)}}o.moveTo(y[0].x,y[0].y)}o.closePath(),o.stroke()}})),t.forEach((function(t,e){var r,s,c;r=[].concat(a.chartData.yAxisData.ranges[t.index]),s=r.pop(),c=r.shift();var b=t.data,u=H(b,s,c,h,f,a,i,n);d.push(u);for(var g=_(u),y=0;y<g[0].length;y++)if(y>x&&y<p){var v=g[0][y];o.beginPath(),b[y][1]-b[y][0]>0?(o.setStrokeStyle(l.color.upLine),o.setFillStyle(l.color.upFill),o.setLineWidth(1*a.pixelRatio),o.moveTo(v[3].x,v[3].y),o.lineTo(v[1].x,v[1].y),o.lineTo(v[1].x-f/4,v[1].y),o.lineTo(v[0].x-f/4,v[0].y),o.lineTo(v[0].x,v[0].y),o.lineTo(v[2].x,v[2].y),o.lineTo(v[0].x,v[0].y),o.lineTo(v[0].x+f/4,v[0].y),o.lineTo(v[1].x+f/4,v[1].y),o.lineTo(v[1].x,v[1].y),o.moveTo(v[3].x,v[3].y)):(o.setStrokeStyle(l.color.downLine),o.setFillStyle(l.color.downFill),o.setLineWidth(1*a.pixelRatio),o.moveTo(v[3].x,v[3].y),o.lineTo(v[0].x,v[0].y),o.lineTo(v[0].x-f/4,v[0].y),o.lineTo(v[1].x-f/4,v[1].y),o.lineTo(v[1].x,v[1].y),o.lineTo(v[2].x,v[2].y),o.lineTo(v[1].x,v[1].y),o.lineTo(v[1].x+f/4,v[1].y),o.lineTo(v[0].x+f/4,v[0].y),o.lineTo(v[0].x,v[0].y),o.moveTo(v[3].x,v[3].y)),o.closePath(),o.fill(),o.stroke()}})),o.restore(),{xAxisPoints:h,calPoints:d,eachSpacing:f}}(s,p,e,a,i,t),n=o.xAxisPoints,l=o.calPoints,f=o.eachSpacing;e.chartData.xAxisPoints=n,e.chartData.calPoints=l,e.chartData.eachSpacing=f,nt(0,e,a,i),!1!==e.enableMarkLine&&1===t&&V(e,a,i),lt(p?0:e.series,e,a,i,e.chartData),it(e,a,i,t),pt(0,i)},onAnimationFinish:function(){o.event.trigger("renderComplete")}});break}}function yt(){this.events={}}ut.prototype.stop=function(){this.isStop=!0},yt.prototype.addEventListener=function(t,e){this.events[t]=this.events[t]||[],this.events[t].push(e)},yt.prototype.trigger=function(){for(var t=arguments.length,e=Array(t),a=0;a<t;a++)e[a]=arguments[a];var i=e[0],o=e.slice(1);this.events[i]&&this.events[i].forEach((function(t){try{t.apply(null,o)}catch(e){}}))};var vt=function(e){e.pixelRatio=e.pixelRatio?e.pixelRatio:1,e.fontSize=e.fontSize?e.fontSize*e.pixelRatio:13*e.pixelRatio,e.title=r({},e.title),e.subtitle=r({},e.subtitle),e.duration=e.duration?e.duration:1e3,e.yAxis=r({},{data:[],showTitle:!1,disabled:!1,disableGrid:!1,splitNumber:5,gridType:"solid",dashLength:4*e.pixelRatio,gridColor:"#cccccc",padding:10,fontColor:"#666666"},e.yAxis),e.yAxis.dashLength*=e.pixelRatio,e.yAxis.padding*=e.pixelRatio,e.xAxis=r({},{rotateLabel:!1,type:"calibration",gridType:"solid",dashLength:4,scrollAlign:"left",boundaryGap:"center",axisLine:!0,axisLineColor:"#cccccc"},e.xAxis),e.xAxis.dashLength*=e.pixelRatio,e.legend=r({},{show:!0,position:"bottom",float:"center",backgroundColor:"rgba(0,0,0,0)",borderColor:"rgba(0,0,0,0)",borderWidth:0,padding:5,margin:5,itemGap:10,fontSize:e.fontSize,lineHeight:e.fontSize,fontColor:"#333333",format:{},hiddenColor:"#CECECE"},e.legend),e.legend.borderWidth=e.legend.borderWidth*e.pixelRatio,e.legend.itemGap=e.legend.itemGap*e.pixelRatio,e.legend.padding=e.legend.padding*e.pixelRatio,e.legend.margin=e.legend.margin*e.pixelRatio,e.extra=r({},e.extra),e.rotate=!!e.rotate,e.animation=!!e.animation,e.rotate=!!e.rotate;var a=JSON.parse(JSON.stringify(o));if(a.colors=e.colors?e.colors:a.colors,a.yAxisTitleWidth=!0!==e.yAxis.disabled&&e.yAxis.title?a.yAxisTitleWidth:0,"pie"!=e.type&&"ring"!=e.type||(a.pieChartLinePadding=!1===e.dataLabel?0:e.extra.pie.labelWidth*e.pixelRatio||a.pieChartLinePadding*e.pixelRatio),"rose"==e.type&&(a.pieChartLinePadding=!1===e.dataLabel?0:e.extra.rose.labelWidth*e.pixelRatio||a.pieChartLinePadding*e.pixelRatio),a.pieChartTextPadding=!1===e.dataLabel?0:a.pieChartTextPadding*e.pixelRatio,a.yAxisSplit=e.yAxis.splitNumber?e.yAxis.splitNumber:o.yAxisSplit,a.rotate=e.rotate,e.rotate){var i=e.width,n=e.height;e.width=n,e.height=i}e.padding=e.padding?e.padding:a.padding;for(var l=0;l<4;l++)e.padding[l]*=e.pixelRatio;a.yAxisWidth=o.yAxisWidth*e.pixelRatio,a.xAxisHeight=o.xAxisHeight*e.pixelRatio,e.enableScroll&&e.xAxis.scrollShow&&(a.xAxisHeight+=6*e.pixelRatio),a.xAxisLineHeight=o.xAxisLineHeight*e.pixelRatio,a.fontSize=e.fontSize,a.titleFontSize=o.titleFontSize*e.pixelRatio,a.subtitleFontSize=o.subtitleFontSize*e.pixelRatio,a.toolTipPadding=o.toolTipPadding*e.pixelRatio,a.toolTipLineHeight=o.toolTipLineHeight*e.pixelRatio,a.columePadding=o.columePadding*e.pixelRatio,e.$this=e.$this?e.$this:this,this.context=t.createCanvasContext(e.canvasId,e.$this),e.chartData={},this.event=new yt,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0},this.opts=e,this.config=a,gt.call(this,e.type,e,a,this.context)};vt.prototype.updateData=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=r({},this.opts,t),this.opts.updateData=!0;var e=t.scrollPosition||"current";switch(e){case"current":this.opts._scrollDistance_=this.scrollOption.currentOffset;break;case"left":this.opts._scrollDistance_=0,this.scrollOption={currentOffset:0,startTouchX:0,distance:0,lastMoveTime:0};break;case"right":var a=j(this.opts.series,this.opts,this.config),i=a.yAxisWidth;this.config.yAxisWidth=i;var o=0,n=B(this.opts.categories,this.opts,this.config),l=n.xAxisPoints,s=n.startX,h=n.endX,c=n.eachSpacing,f=c*(l.length-1),d=h-s;o=d-f,this.scrollOption={currentOffset:o,startTouchX:o,distance:0,lastMoveTime:0},this.opts._scrollDistance_=o;break}gt.call(this,this.opts.type,this.opts,this.config,this.context)},vt.prototype.zoom=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.opts.xAxis.itemCount;if(!0===this.opts.enableScroll){var e=Math.round(Math.abs(this.scrollOption.currentOffset)/this.opts.chartData.eachSpacing)+Math.round(this.opts.xAxis.itemCount/2);this.opts.animation=!1,this.opts.xAxis.itemCount=t.itemCount;var a=j(this.opts.series,this.opts,this.config),i=a.yAxisWidth;this.config.yAxisWidth=i;var o=0,r=B(this.opts.categories,this.opts,this.config),n=r.xAxisPoints,l=r.startX,s=r.endX,h=r.eachSpacing,c=h*e,f=s-l,d=f-h*(n.length-1);o=f/2-c,o>0&&(o=0),o<d&&(o=d),this.scrollOption={currentOffset:o,startTouchX:o,distance:0,lastMoveTime:0},this.opts._scrollDistance_=o,gt.call(this,this.opts.type,this.opts,this.config,this.context)}},vt.prototype.stopAnimation=function(){this.animationInstance&&this.animationInstance.stop()},vt.prototype.addEventListener=function(t,e){this.event.addEventListener(t,e)},vt.prototype.getCurrentDataIndex=function(t){var e=null;if(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],e){var a=y(e,this.opts,t);return"pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type?function(t,e){var a=-1;if(w(t,e.center,e.radius)){var i=Math.atan2(e.center.y-t.y,t.x-e.center.x);i=-i;for(var o=0,r=e.series.length;o<r;o++){var n=e.series[o];if(h(i,n._start_,n._start_+2*n._proportion_*Math.PI)){a=o;break}}}return a}({x:a.x,y:a.y},this.opts.chartData.pieData):"radar"===this.opts.type?function(t,e,a){var i=2*Math.PI/a,o=-1;if(w(t,e.center,e.radius)){var r=function(t){return t<0&&(t+=2*Math.PI),t>2*Math.PI&&(t-=2*Math.PI),t},n=Math.atan2(e.center.y-t.y,t.x-e.center.x);n*=-1,n<0&&(n+=2*Math.PI);var l=e.angleList.map((function(t){return t=r(-1*t),t}));l.forEach((function(t,e){var a=r(t-i/2),l=r(t+i/2);l<a&&(l+=2*Math.PI),(n>=a&&n<=l||n+2*Math.PI>=a&&n+2*Math.PI<=l)&&(o=e)}))}return o}({x:a.x,y:a.y},this.opts.chartData.radarData,this.opts.categories.length):"funnel"===this.opts.type?function(t,e){for(var a=-1,i=0,o=e.series.length;i<o;i++){var r=e.series[i];if(t.x>r.funnelArea[0]&&t.x<r.funnelArea[2]&&t.y>r.funnelArea[1]&&t.y<r.funnelArea[3]){a=i;break}}return a}({x:a.x,y:a.y},this.opts.chartData.funnelData):"map"===this.opts.type?function(t,e){for(var a=-1,i=e.chartData.mapData,o=e.series,r=function(t,e,a,i,o,r){return{x:(e-o)/i+a.xMin,y:a.yMax-(t-r)/i}}(t.y,t.x,i.bounds,i.scale,i.xoffset,i.yoffset),n=[r.x,r.y],l=0,s=o.length;l<s;l++){var h=o[l].geometry.coordinates;if(dt(n,h)){a=l;break}}return a}({x:a.x,y:a.y},this.opts):"word"===this.opts.type?function(t,e){for(var a=-1,i=0,o=e.length;i<o;i++){var r=e[i];if(t.x>r.area[0]&&t.x<r.area[2]&&t.y>r.area[1]&&t.y<r.area[3]){a=i;break}}return a}({x:a.x,y:a.y},this.opts.chartData.wordCloudData):function(t,e,a,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=-1,n=a.chartData.eachSpacing/2,l=[];if(e.length>0){if("candle"==a.type)for(var s=0;s<e[0].length;s++)l.push(e[0][s][0].x);else for(var h=0;h<e[0].length;h++)l.push(e[0][h].x);"line"!=a.type&&"area"!=a.type||"justify"!=a.xAxis.boundaryGap||(n=a.chartData.eachSpacing/2),a.categories||(n=0),D(t,a,i)&&l.forEach((function(e,a){t.x+o+n>e&&(r=a)}))}return r}({x:a.x,y:a.y},this.opts.chartData.calPoints,this.opts,this.config,Math.abs(this.scrollOption.currentOffset))}return-1},vt.prototype.getLegendDataIndex=function(t){var e=null;if(e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],e){var a=y(e,this.opts,t);return function(t,e,a){var i=-1;if(function(t,e){return t.x>e.start.x&&t.x<e.end.x&&t.y>e.start.y&&t.y<e.end.y}(t,e.area)){for(var o=e.points,r=-1,n=0,l=o.length;n<l;n++)for(var s=o[n],h=0;h<s.length;h++){r+=1;var c=s[h]["area"];if(t.x>c[0]&&t.x<c[2]&&t.y>c[1]&&t.y<c[3]){i=r;break}}return i}return i}({x:a.x,y:a.y},this.opts.chartData.legendData)}return-1},vt.prototype.touchLegend=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null;if(a=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],a){y(a,this.opts,t);var i=this.getLegendDataIndex(t);i>=0&&(this.opts.series[i].show=!this.opts.series[i].show,this.opts.animation=!!e.animation,this.opts._scrollDistance_=this.scrollOption.currentOffset,gt.call(this,this.opts.type,this.opts,this.config,this.context))}},vt.prototype.showToolTip=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=null;a=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0];var i=y(a,this.opts,t),o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1});if("line"===this.opts.type||"area"===this.opts.type||"column"===this.opts.type){var l=void 0==e.index?this.getCurrentDataIndex(t):e.index;if(l>-1){var s=v(this.opts.series,l);if(0!==s.length){var h=A(s,this.opts.chartData.calPoints,l,this.opts.categories,e),c=h.textList,f=h.offset;f.y=i.y,n.tooltip={textList:e.textList?e.textList:c,offset:f,option:e,index:l}}}gt.call(this,n.type,n,this.config,this.context)}if("mix"===this.opts.type){l=void 0==e.index?this.getCurrentDataIndex(t):e.index;if(l>-1){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=v(this.opts.series,l);if(0!==s.length){var d=T(s,this.opts.chartData.calPoints,l,this.opts.categories,e);c=d.textList,f=d.offset;f.y=i.y,n.tooltip={textList:e.textList?e.textList:c,offset:f,option:e,index:l}}}gt.call(this,n.type,n,this.config,this.context)}if("candle"===this.opts.type){l=void 0==e.index?this.getCurrentDataIndex(t):e.index;if(l>-1){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=v(this.opts.series,l);if(0!==s.length){h=P(this.opts.series[0].data,s,this.opts.chartData.calPoints,l,this.opts.categories,this.opts.extra.candle,e),c=h.textList,f=h.offset;f.y=i.y,n.tooltip={textList:e.textList?e.textList:c,offset:f,option:e,index:l}}}gt.call(this,n.type,n,this.config,this.context)}if("pie"===this.opts.type||"ring"===this.opts.type||"rose"===this.opts.type||"funnel"===this.opts.type){l=void 0==e.index?this.getCurrentDataIndex(t):e.index;if(l>-1){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=this.opts._series_[l],c=[{text:e.format?e.format(s):s.name+": "+s.data,color:s.color}],f={x:i.x,y:i.y};n.tooltip={textList:e.textList?e.textList:c,offset:f,option:e,index:l}}gt.call(this,n.type,n,this.config,this.context)}if("map"===this.opts.type||"word"===this.opts.type){l=void 0==e.index?this.getCurrentDataIndex(t):e.index;if(l>-1){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=this.opts._series_[l],c=[{text:e.format?e.format(s):s.properties.name,color:s.color}],f={x:i.x,y:i.y};n.tooltip={textList:e.textList?e.textList:c,offset:f,option:e,index:l}}n.updateData=!1,gt.call(this,n.type,n,this.config,this.context)}if("radar"===this.opts.type){l=void 0==e.index?this.getCurrentDataIndex(t):e.index;if(l>-1){o=this.scrollOption.currentOffset,n=r({},this.opts,{_scrollDistance_:o,animation:!1}),s=v(this.opts.series,l);if(0!==s.length){c=s.map((function(t){return{text:e.format?e.format(t):t.name+": "+t.data,color:t.color}})),f={x:i.x,y:i.y};n.tooltip={textList:e.textList?e.textList:c,offset:f,option:e,index:l}}}gt.call(this,n.type,n,this.config,this.context)}},vt.prototype.translate=function(t){this.scrollOption={currentOffset:t,startTouchX:t,distance:0,lastMoveTime:0};var e=r({},this.opts,{_scrollDistance_:t,animation:!1});gt.call(this,this.opts.type,e,this.config,this.context)},vt.prototype.scrollStart=function(t){var e=null;e=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0];var a=y(e,this.opts,t);e&&!0===this.opts.enableScroll&&(this.scrollOption.startTouchX=a.x)},vt.prototype.scroll=function(t){0===this.scrollOption.lastMoveTime&&(this.scrollOption.lastMoveTime=Date.now());var e=this.opts.extra.touchMoveLimit||20,a=Date.now(),i=a-this.scrollOption.lastMoveTime;if(!(i<Math.floor(1e3/e))){this.scrollOption.lastMoveTime=a;var o=null;if(o=t.changedTouches?t.changedTouches[0]:t.mp.changedTouches[0],o&&!0===this.opts.enableScroll){var n,l=y(o,this.opts,t);n=l.x-this.scrollOption.startTouchX;var s=this.scrollOption.currentOffset,h=function(t,e,a,i,o){var r=o.width-o.area[1]-o.area[3],n=a.eachSpacing*(o.chartData.xAxisData.xAxisPoints.length-1),l=e;return e>=0?(l=0,t.event.trigger("scrollLeft")):Math.abs(e)>=n-r&&(l=r-n,t.event.trigger("scrollRight")),l}(this,s+n,this.opts.chartData,this.config,this.opts);this.scrollOption.distance=n=h-s;var c=r({},this.opts,{_scrollDistance_:s+n,animation:!1});return gt.call(this,c.type,c,this.config,this.context),s+n}}},vt.prototype.scrollEnd=function(t){if(!0===this.opts.enableScroll){var e=this.scrollOption,a=e.currentOffset,i=e.distance;this.scrollOption.currentOffset=a+i,this.scrollOption.distance=0}},"object"===i(e)&&"object"===i(e.exports)&&(e.exports=vt)}).call(this,a("543d")["default"],a("62e4")(t))},"7c87":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={lunarInfo:[19416,19168,42352,21717,53856,55632,91476,22176,39632,21970,19168,42422,42192,53840,119381,46400,54944,44450,38320,84343,18800,42160,46261,27216,27968,109396,11104,38256,21234,18800,25958,54432,59984,28309,23248,11104,100067,37600,116951,51536,54432,120998,46416,22176,107956,9680,37584,53938,43344,46423,27808,46416,86869,19872,42416,83315,21168,43432,59728,27296,44710,43856,19296,43748,42352,21088,62051,55632,23383,22176,38608,19925,19152,42192,54484,53840,54616,46400,46752,103846,38320,18864,43380,42160,45690,27216,27968,44870,43872,38256,19189,18800,25776,29859,59984,27480,23232,43872,38613,37600,51552,55636,54432,55888,30034,22176,43959,9680,37584,51893,43344,46240,47780,44368,21977,19360,42416,86390,21168,43312,31060,27296,44368,23378,19296,42726,42208,53856,60005,54576,23200,30371,38608,19195,19152,42192,118966,53840,54560,56645,46496,22224,21938,18864,42359,42160,43600,111189,27936,44448,84835,37744,18936,18800,25776,92326,59984,27424,108228,43744,41696,53987,51552,54615,54432,55888,23893,22176,42704,21972,21200,43448,43344,46240,46758,44368,21920,43940,42416,21168,45683,26928,29495,27296,44368,84821,19296,42352,21732,53600,59752,54560,55968,92838,22224,19168,43476,41680,53584,62034,54560],solarMonth:[31,28,31,30,31,30,31,31,30,31,30,31],Gan:["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],Zhi:["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],Animals:["鼠","牛","虎","兔","龙","蛇","马","羊","猴","鸡","狗","猪"],solarTerm:["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"],sTermInfo:["9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd0b06bdb0722c965ce1cfcc920f","b027097bd097c36b0b6fc9274c91aa","9778397bd19801ec9210c965cc920e","97b6b97bd19801ec95f8c965cc920f","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd197c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bd09801d98082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec95f8c965cc920e","97bcf97c3598082c95f8e1cfcc920f","97bd097bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c3598082c95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf97c359801ec95f8c965cc920f","97bd097bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd19801ec9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b97bd19801ec95f8c965cc920f","97bd07f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c91aa","97b6b97bd19801ec9210c965cc920e","97bd07f1487f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c965cc920e","97bcf7f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b97bd19801ec9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b97bd197c36c9210c9274c920e","97bcf7f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","9778397bd097c36c9210c9274c920e","97b6b7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c36b0b6fc9210c8dc2","9778397bd097c36b0b70c9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9274c91aa","97b6b7f0e47f531b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c91aa","97b6b7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","9778397bd097c36b0b6fc9210c8dc2","977837f0e37f149b0723b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f5307f595b0b0bc920fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f595b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc9210c8dc2","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd097c35b0b6fc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0b0bb0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14998082b0723b06bd","7f07e7f0e37f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e397bd07f595b0b0bc920fb0722","977837f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f595b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e37f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f1487f531b0b0bb0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e47f149b0723b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14998082b0723b06bd","7f07e7f0e37f14998083b0787b0721","7f0e27f0e47f531b0723b0b6fb0722","7f0e37f0e366aa89801eb072297c35","7ec967f0e37f14898082b0723b02d5","7f07e7f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66aa89801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b0721","7f07e7f0e47f531b0723b0b6fb0722","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b0723b02d5","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e36665b66a449801e9808297c35","665f67f0e37f14898082b072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e26665b66a449801e9808297c35","665f67f0e37f1489801eb072297c35","7ec967f0e37f14998082b0787b06bd","7f07e7f0e47f531b0723b0b6fb0721","7f0e27f1487f531b0b0bb0b6fb0722"],nStr1:["日","一","二","三","四","五","六","七","八","九","十"],nStr2:["初","十","廿","卅"],nStr3:["正","二","三","四","五","六","七","八","九","十","冬","腊"],lYearDays:function(t){var e,a=348;for(e=32768;e>8;e>>=1)a+=this.lunarInfo[t-1900]&e?1:0;return a+this.leapDays(t)},leapMonth:function(t){return 15&this.lunarInfo[t-1900]},leapDays:function(t){return this.leapMonth(t)?65536&this.lunarInfo[t-1900]?30:29:0},monthDays:function(t,e){return e>12||e<1?-1:this.lunarInfo[t-1900]&65536>>e?30:29},solarDays:function(t,e){if(e>12||e<1)return-1;var a=e-1;return 1==a?t%4==0&&t%100!=0||t%400==0?29:28:this.solarMonth[a]},toGanZhiYear:function(t){var e=(t-3)%10,a=(t-3)%12;return 0==e&&(e=10),0==a&&(a=12),this.Gan[e-1]+this.Zhi[a-1]},toAstro:function(t,e){return"魔羯水瓶双鱼白羊金牛双子巨蟹狮子处女天秤天蝎射手魔羯".substr(2*t-(e<[20,19,21,21,21,22,23,23,23,23,22,22][t-1]?2:0),2)+"座"},toGanZhi:function(t){return this.Gan[t%10]+this.Zhi[t%12]},getTerm:function(t,e){if(t<1900||t>2100)return-1;if(e<1||e>24)return-1;var a=this.sTermInfo[t-1900],i=[parseInt("0x"+a.substr(0,5)).toString(),parseInt("0x"+a.substr(5,5)).toString(),parseInt("0x"+a.substr(10,5)).toString(),parseInt("0x"+a.substr(15,5)).toString(),parseInt("0x"+a.substr(20,5)).toString(),parseInt("0x"+a.substr(25,5)).toString()],o=[i[0].substr(0,1),i[0].substr(1,2),i[0].substr(3,1),i[0].substr(4,2),i[1].substr(0,1),i[1].substr(1,2),i[1].substr(3,1),i[1].substr(4,2),i[2].substr(0,1),i[2].substr(1,2),i[2].substr(3,1),i[2].substr(4,2),i[3].substr(0,1),i[3].substr(1,2),i[3].substr(3,1),i[3].substr(4,2),i[4].substr(0,1),i[4].substr(1,2),i[4].substr(3,1),i[4].substr(4,2),i[5].substr(0,1),i[5].substr(1,2),i[5].substr(3,1),i[5].substr(4,2)];return parseInt(o[e-1])},toChinaMonth:function(t){if(t>12||t<1)return-1;var e=this.nStr3[t-1];return e+="月",e},toChinaDay:function(t){var e;switch(t){case 10:e="初十";break;case 20:e="二十";break;case 30:e="三十";break;default:e=this.nStr2[Math.floor(t/10)],e+=this.nStr1[t%10]}return e},getAnimal:function(t){return this.Animals[(t-4)%12]},solar2lunar:function(t,e,a){if(t<1900||t>2100)return-1;if(1900==t&&1==e&&a<31)return-1;if(t)i=new Date(t,parseInt(e)-1,a);else var i=new Date;var o,r=0,n=(t=i.getFullYear(),e=i.getMonth()+1,a=i.getDate(),(Date.UTC(i.getFullYear(),i.getMonth(),i.getDate())-Date.UTC(1900,0,31))/864e5);for(o=1900;o<2101&&n>0;o++)r=this.lYearDays(o),n-=r;n<0&&(n+=r,o--);var l=new Date,s=!1;l.getFullYear()==t&&l.getMonth()+1==e&&l.getDate()==a&&(s=!0);var h=i.getDay(),c=this.nStr1[h];0==h&&(h=7);var f=o,d=this.leapMonth(o),x=!1;for(o=1;o<13&&n>0;o++)d>0&&o==d+1&&0==x?(--o,x=!0,r=this.leapDays(f)):r=this.monthDays(f,o),1==x&&o==d+1&&(x=!1),n-=r;0==n&&d>0&&o==d+1&&(x?x=!1:(x=!0,--o)),n<0&&(n+=r,--o);var p=o,b=n+1,u=e-1,g=this.toGanZhiYear(f),y=this.getTerm(t,2*e-1),v=this.getTerm(t,2*e),m=this.toGanZhi(12*(t-1900)+e+11);a>=y&&(m=this.toGanZhi(12*(t-1900)+e+12));var S=!1,A=null;y==a&&(S=!0,A=this.solarTerm[2*e-2]),v==a&&(S=!0,A=this.solarTerm[2*e-1]);var T=Date.UTC(t,u,1,0,0,0,0)/864e5+25567+10,P=this.toGanZhi(T+a-1),D=this.toAstro(e,a);return{lYear:f,lMonth:p,lDay:b,Animal:this.getAnimal(f),IMonthCn:(x?"闰":"")+this.toChinaMonth(p),IDayCn:this.toChinaDay(b),cYear:t,cMonth:e,cDay:a,gzYear:g,gzMonth:m,gzDay:P,isToday:s,isLeap:x,nWeek:h,ncWeek:"星期"+c,isTerm:S,Term:A,astro:D}},lunar2solar:function(t,e,a,i){i=!!i;var o=this.leapMonth(t);this.leapDays(t);if(i&&o!=e)return-1;if(2100==t&&12==e&&a>1||1900==t&&1==e&&a<31)return-1;var r=this.monthDays(t,e),n=r;if(i&&(n=this.leapDays(t,e)),t<1900||t>2100||a>n)return-1;for(var l=0,s=1900;s<t;s++)l+=this.lYearDays(s);var h=0,c=!1;for(s=1;s<e;s++)h=this.leapMonth(t),c||h<=s&&h>0&&(l+=this.leapDays(t),c=!0),l+=this.monthDays(t,s);i&&(l+=r);var f=Date.UTC(1900,1,30,0,0,0),d=new Date(864e5*(l+a-31)+f),x=d.getUTCFullYear(),p=d.getUTCMonth()+1,b=d.getUTCDate();return this.solar2lunar(x,p,b)}},o=i;e.default=o},dc86:function(t,e,a){"use strict";var i=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(a("7037")),r=i(a("970b")),n=i(a("5bc3")),l=i(a("7c87")),s=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=e.date,i=e.selected,o=e.startDate,n=e.endDate,l=e.range;(0,r.default)(this,t),this.date=this.getDate(a),this.selected=i||[],this.startDate=o,this.endDate=n,this.range=l,this.multipleStatus={before:"",after:"",data:[]},this.weeks={},this._getWeek(this.date.fullDate)}return(0,n.default)(t,[{key:"getDate",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"day";t||(t=new Date),"object"!==(0,o.default)(t)&&(t=t.replace(/-/g,"/"));var i=new Date(t);switch(a){case"day":i.setDate(i.getDate()+e);break;case"month":31===i.getDate()?i.setDate(i.getDate()+e):i.setMonth(i.getMonth()+e);break;case"year":i.setFullYear(i.getFullYear()+e);break}var r=i.getFullYear(),n=i.getMonth()+1<10?"0"+(i.getMonth()+1):i.getMonth()+1,l=i.getDate()<10?"0"+i.getDate():i.getDate();return{fullDate:r+"-"+n+"-"+l,year:r,month:n,date:l,day:i.getDay()}}},{key:"_getLastMonthDays",value:function(t,e){for(var a=[],i=t;i>0;i--){var o=new Date(e.year,e.month-1,1-i).getDate();a.push({date:o,month:e.month-1,lunar:this.getlunar(e.year,e.month-1,o),disable:!0})}return a}},{key:"_currentMonthDys",value:function(t,e){for(var a=this,i=[],o=this.date.fullDate,r=function(t){var r=e.year+"-"+(e.month,e.month+"-")+(t<10?"0"+t:t),n=o===r,l=a.selected&&a.selected.find((function(t){if(a.dateEqual(r,t.date))return t})),s=!0,h=!0;if(a.startDate){var c=a.dateCompare(a.startDate,o);s=a.dateCompare(c?a.startDate:o,r)}if(a.endDate){var f=a.dateCompare(o,a.endDate);h=a.dateCompare(r,f?a.endDate:o)}var d=a.multipleStatus.data,x=!1,p=-1;a.range&&(d&&(p=d.findIndex((function(t){return a.dateEqual(t,r)}))),-1!==p&&(x=!0));var b={fullDate:r,year:e.year,date:t,multiple:!!a.range&&x,month:e.month,lunar:a.getlunar(e.year,e.month,t),disable:!s||!h,isDay:n};l&&(b.extraInfo=l),i.push(b)},n=1;n<=t;n++)r(n);return i}},{key:"_getNextMonthDays",value:function(t,e){for(var a=[],i=1;i<t+1;i++)a.push({date:i,month:Number(e.month)+1,lunar:this.getlunar(e.year,Number(e.month)+1,i),disable:!0});return a}},{key:"setDate",value:function(t){this._getWeek(t)}},{key:"getInfo",value:function(t){var e=this;t||(t=new Date);var a=this.canlender.find((function(a){return a.fullDate===e.getDate(t).fullDate}));return a}},{key:"dateCompare",value:function(t,e){return t=new Date(t.replace("-","/").replace("-","/")),e=new Date(e.replace("-","/").replace("-","/")),t<=e}},{key:"dateEqual",value:function(t,e){return t=new Date(t.replace("-","/").replace("-","/")),e=new Date(e.replace("-","/").replace("-","/")),t.getTime()-e.getTime()===0}},{key:"geDateAll",value:function(t,e){var a=[],i=t.split("-"),o=e.split("-"),r=new Date;r.setFullYear(i[0],i[1]-1,i[2]);var n=new Date;n.setFullYear(o[0],o[1]-1,o[2]);for(var l=r.getTime()-864e5,s=n.getTime()-864e5,h=l;h<=s;)h+=864e5,a.push(this.getDate(new Date(parseInt(h))).fullDate);return a}},{key:"getlunar",value:function(t,e,a){return l.default.solar2lunar(t,e,a)}},{key:"setSelectInfo",value:function(t,e){this.selected=e,this._getWeek(t)}},{key:"setMultiple",value:function(t){var e=this.multipleStatus,a=e.before,i=e.after;this.range&&(a&&i?(this.multipleStatus.before="",this.multipleStatus.after="",this.multipleStatus.data=[],this._getWeek(t)):a?(this.multipleStatus.after=t,this.dateCompare(this.multipleStatus.before,this.multipleStatus.after)?this.multipleStatus.data=this.geDateAll(this.multipleStatus.before,this.multipleStatus.after):this.multipleStatus.data=this.geDateAll(this.multipleStatus.after,this.multipleStatus.before),this._getWeek(t)):this.multipleStatus.before=t)}},{key:"_getWeek",value:function(t){var e=this.getDate(t),a=(e.fullDate,e.year),i=e.month,o=(e.date,e.day,new Date(a,i-1,1).getDay()),r=new Date(a,i,0).getDate(),n={lastMonthDays:this._getLastMonthDays(o,this.getDate(t)),currentMonthDys:this._currentMonthDys(r,this.getDate(t)),nextMonthDays:[],weeks:[]},l=[],s=42-(n.lastMonthDays.length+n.currentMonthDys.length);n.nextMonthDays=this._getNextMonthDays(s,this.getDate(t)),l=l.concat(n.lastMonthDays,n.currentMonthDys,n.nextMonthDays);for(var h={},c=0;c<l.length;c++)c%7===0&&(h[parseInt(c/7)]=new Array(7)),h[parseInt(c/7)][c%7]=l[c];this.canlender=l,this.weeks=h}}]),t}(),h=s;e.default=h}}]);
|