Newer
Older
smartwell_front_dz / smartwell / static / js / chunk-libs-2dbd512b.bedf59b2.js
wangxitong on 11 Sep 2023 51 KB first commit
(self["webpackChunknewfront"]=self["webpackChunknewfront"]||[]).push([[6871],{94380:function(e,t,i){var n=i(25108);(function(t,n){e.exports=n(i(70492),i(83062),i(78511),i(40451),i(46295),i(94859),i(66614),i(48927),i(10064),i(32903),i(13017),i(90474),i(40055),i(88067),i(42213),i(83760),i(53665),i(27539),i(81052),i(94812),i(89777))})(0,(function(e){"use strict";e=e&&e.hasOwnProperty("default")?e["default"]:e;var t={categoryAxis:{axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},valueAxis:{axisLine:{show:!1}},line:{smooth:!0},grid:{containLabel:!0,left:10,right:10}},i=["#19d4ae","#5ab1ef","#fa6e86","#ffb980","#0067a6","#c4b4e4","#d87a80","#9cbbff","#d9d0c7","#87a997","#d49ea2","#5b4947","#7ba3a8"],a=["#313695","#4575b4","#74add1","#abd9e9","#e0f3f8","#ffffbf","#fee090","#fdae61","#f46d43","#d73027","#a50026"],r=["blue","blue","green","yellow","red"],o=function(e){return['<span style="',"background-color:"+e+";","display: inline-block;","width: 10px;","height: 10px;","border-radius: 50%;","margin-right:2px;",'"></span>'].join("")},s=["initOptions","loading","dataEmpty","judgeWidth","widthChangeDelay"],l=["grid","dataZoom","visualMap","toolbox","title","legend","xAxis","yAxis","radar","tooltip","axisPointer","brush","geo","timeline","graphic","series","backgroundColor","textStyle"],u={th:3,mi:6,bi:9,tr:12},c={zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0,abbrLabel:{th:"k",mi:"m",bi:"b",tr:"t"}},d=1e12,m=1e9,p=1e6,f=1e3;function h(e){return"number"===typeof e&&isNaN(e)}function v(e,t,i,n){var a=e.toString().split("."),r=t-(n||0),o=2===a.length?Math.min(Math.max(a[1].length,r),t):r,s=Math.pow(10,o),l=(i(e+"e+"+o)/s).toFixed(o);if(n>t-o){var u=new RegExp("\\.?0{1,"+(n-(t-o))+"}$");l=l.replace(u,"")}return l}function y(e,t,i,n){var a=Math.abs(t),r=!1,o=!1,s="",l="",c=!1,h=void 0,y=void 0;i=i||"",t=t||0,~i.indexOf("(")?(r=!0,i=i.replace(/[(|)]/g,"")):(~i.indexOf("+")||~i.indexOf("-"))&&(y=~i.indexOf("+")?i.indexOf("+"):t<0?i.indexOf("-"):-1,i=i.replace(/[+|-]/g,"")),~i.indexOf("a")&&(h=i.match(/a(k|m|b|t)?/),h=!!h&&h[1],~i.indexOf(" a")&&(s=" "),i=i.replace(new RegExp(s+"a[kmbt]?"),""),a>=d&&!h||"t"===h?(s+=e.abbrLabel.tr,t/=d):a<d&&a>=m&&!h||"b"===h?(s+=e.abbrLabel.bi,t/=m):a<m&&a>=p&&!h||"m"===h?(s+=e.abbrLabel.mi,t/=p):(a<p&&a>=f&&!h||"k"===h)&&(s+=e.abbrLabel.th,t/=f)),~i.indexOf("[.]")&&(o=!0,i=i.replace("[.]","."));var b=t.toString().split(".")[0],g=i.split(".")[1],x=i.indexOf(","),w=(i.split(".")[0].split(",")[0].match(/0/g)||[]).length;if(g?(~g.indexOf("[")?(g=g.replace("]",""),g=g.split("["),l=v(t,g[0].length+g[1].length,n,g[1].length)):l=v(t,g.length,n),b=l.split(".")[0],l=~l.indexOf(".")?"."+l.split(".")[1]:"",o&&0===+l.slice(1)&&(l="")):b=v(t,0,n),s&&!h&&+b>=1e3&&s!==u.trillion&&(b=""+ +b/1e3,s=u.million),~b.indexOf("-")&&(b=b.slice(1),c=!0),b.length<w)for(var S=w-b.length;S>0;S--)b="0"+b;x>-1&&(b=b.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")),i.indexOf(".")||(b="");var A=b+l+(s||"");return r?A=(r&&c?"(":"")+A+(r&&c?")":""):y>=0?A=0===y?(c?"-":"+")+A:A+(c?"-":"+"):c&&(A="-"+A),A}function b(e,t){Object.keys(t).forEach((function(i){e[i]=t[i]}))}var g={regexp:/%/,format:function(e,t,i,n){var a=~t.indexOf(" %")?" ":"",r=void 0;return n.options.scalePercentBy100&&(e*=100),t=t.replace(/\s?%/,""),r=n._numberToFormat(e,t,i),~r.indexOf(")")?(r=r.split(""),r.splice(-1,0,a+"%"),r=r.join("")):r=r+a+"%",r}},x={},w={};function S(e,t,i){t=t||x.defaultFormat,i=i||Math.round;var n=void 0,a=void 0;if(0===e&&null!==x.zeroFormat)n=x.zeroFormat;else if(null===e&&null!==x.nullFormat)n=x.nullFormat;else{for(var r in w)if(w[r]&&t.match(w[r].regexp)){a=w[r].format;break}a=a||y.bind(null,x),n=a(e,t,i,A)}return n}function A(e,t,i){var n=void 0;return n=0===e||"undefined"===typeof e?0:null===e||h(e)?null:"string"===typeof e?x.zeroFormat&&e===x.zeroFormat?0:x.nullFormat&&e===x.nullFormat||!e.replace(/[^0-9]+/g,"").length?null:+e:+e||null,S(n,t,i)}b(x,c),A.options=x,A._numberToFormat=y.bind(null,x),A.register=function(e,t){w[e]=t},A.unregister=function(e){w[e]=null},A.setOptions=function(e){b(x,e)},A.reset=function(){b(x,c)},A.register("percentage",g);var O="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M=function(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e},V=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},T=function(e){return Array.isArray(e)?e:Array.from(e)};function N(e,t){var i=null;return function(){var n=this,a=arguments;clearTimeout(i),i=setTimeout((function(){e.apply(n,a)}),t)}}function k(e,t,i){if(t){var n=e,a=t.split(".");a.forEach((function(e,t){t===a.length-1?n[e]=i:(n[e]||(n[e]={}),n=n[e])}))}}function L(e,t,i){if(!t)return e;var n=t.split("."),a=e;return n.some((function(e,t){if(void 0===a[e])return a=i,!0;a=a[e]})),a}var E="function"===typeof Symbol&&"symbol"===O(Symbol.iterator)?function(e){return"undefined"===typeof e?"undefined":O(e)}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":"undefined"===typeof e?"undefined":O(e)};function j(e){return Object.prototype.toString.call(e)}function z(e){return"undefined"===typeof e?"undefined":E(e)}function R(e){return"[object Object]"===j(e)}function C(e){return"[object Array]"===j(e)}function H(e){return"[object Function]"===j(e)}function F(e){return JSON.parse(JSON.stringify(e))}function _(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function P(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function D(e,t){if(e===t)return!0;if(null===e||null===t||"object"!==z(e)||"object"!==z(t))return e===t;for(var i in e)if(P(e,i)){var n=e[i],a=t[i],r=z(n);if("undefined"===z(a))return!1;if("object"===r){if(!D(n,a))return!1}else if(n!==a)return!1}for(var o in t)if(P(t,o)&&"undefined"===z(e)[o])return!1;return!0}var $=function(e,t,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"-";if(isNaN(e))return n;if(!t)return e;if(H(t))return t(e,A);i=isNaN(i)?0:++i;var a=".["+new Array(i).join(0)+"]",r=t;switch(t){case"KMB":r=i?"0,0"+a+"a":"0,0a";break;case"normal":r=i?"0,0"+a:"0,0";break;case"percent":r=i?"0,0"+a+"%":"0,0.[00]%";break}return A(e,r)},G=function(e){var t={};return Object.keys(e).forEach((function(i){e[i].forEach((function(e){t[e]=i}))})),t},B=function(e){return new Promise((function(t,i){var n=new XMLHttpRequest;n.open("GET",e),n.send(null),n.onload=function(){t(JSON.parse(n.responseText))},n.onerror=function(){i(JSON.parse(n.responseText))}}))},W={},I=function(e){var t=e.position,i=e.positionJsonLink,n=e.beforeRegisterMapOnce,a=e.mapURLProfix,r=i||""+a+t+".json";return W[r]||(W[r]=B(r).then((function(e){return n&&(e=n(e)),e}))),W[r]},Z=null,J=null,U=function(e,t){return Z||(Z=new Promise((function(i,n){var a="bmap"+Date.now();window[a]=i;var r=document.createElement("script");r.src=["https://api.map.baidu.com/api?v="+(t||"2.0"),"ak="+e,"callback="+a].join("&"),document.body.appendChild(r)}))),Z},q=function(e,t){return J||(J=new Promise((function(i,n){var a="amap"+Date.now();window[a]=i;var r=document.createElement("script");r.src=["https://webapi.amap.com/maps?v="+(t||"1.4.3"),"key="+e,"callback="+a].join("&"),document.body.appendChild(r)}))),J};function Y(e,t,i){void 0!==e[t]?e[t].push(i):e[t]=[i]}var X=.5;function K(e){var t=e.innerRows,i=e.dimAxisName,n=e.dimension,a=e.axisVisible,r=e.dimAxisType,o=e.dims;return n.map((function(e){return{type:"category",name:i,nameLocation:"middle",nameGap:22,data:"value"===r?Q(o):t.map((function(t){return t[e]})),axisLabel:{formatter:function(e){return String(e)}},show:a}}))}function Q(e){for(var t=Math.max.apply(null,e),i=Math.min.apply(null,e),n=[],a=i;a<=t;a++)n.push(a);return n}function ee(e){for(var t=e.meaAxisName,i=e.meaAxisType,n=e.axisVisible,a=e.digit,r=e.scale,o=e.min,s=e.max,l={type:"value",axisTick:{show:!1},show:n},u=[],c=function(e){i[e]?u[e]=V({},l,{axisLabel:{formatter:function(t){return $(t,i[e],a)}}}):u[e]=V({},l),u[e].name=t[e]||"",u[e].scale=r[e]||!1,u[e].min=o[e]||null,u[e].max=s[e]||null},d=0;d<2;d++)c(d);return u}function te(e){var t=e.axisSite,i=e.isHistogram,n=e.meaAxisType,a=e.digit,r=e.labelMap,s=i?t.right||[]:t.top||[];return r&&(s=s.map((function(e){return void 0===r[e]?e:r[e]}))),{trigger:"axis",formatter:function(e){var t=[];return t.push(e[0].name+"<br>"),e.forEach((function(e){var i=e.seriesName,r=~s.indexOf(i)?n[1]:n[0];t.push(o(e.color)),t.push(i+": "),t.push($(e.value,r,a)),t.push("<br>")})),t.join("")}}}function ie(e,t){for(var i=Math.max.apply(null,t),n=Math.min.apply(null,t),a=[],r=n;r<=i;r++){var o=t.indexOf(r);~o?a.push(e[o]):a.push(null)}return a}function ne(e){var t=e.innerRows,i=e.metrics,n=e.stack,a=e.axisSite,r=e.isHistogram,o=e.labelMap,s=e.itemStyle,l=e.label,u=e.showLine,c=void 0===u?[]:u,d=e.dimAxisType,m=e.barGap,p=e.opacity,f=e.dims,h=[],v={},y=r?a.right||[]:a.top||[],b=r?"yAxisIndex":"xAxisIndex",g=n&&G(n);return i.forEach((function(e){v[e]=[]})),t.forEach((function(e){i.forEach((function(t){v[t].push(e[t])}))})),h=Object.keys(v).map((function(e,t){var i="value"===d?ie(v[e],f):v[e],a=M({name:null!=o[e]?o[e]:e,type:~c.indexOf(e)?"line":"bar",data:i},b,~y.indexOf(e)?"1":"0");n&&g[e]&&(a.stack=g[e]),l&&(a.label=l),s&&(a.itemStyle=s);var r=p||L(a,"itemStyle.normal.opacity");return"value"===d&&(a.barGap=m,a.barCategoryGap="1%",null==r&&(r=X)),null!=r&&k(a,"itemStyle.normal.opacity",r),a})),!!h.length&&h}function ae(e){var t=e.metrics,i=e.labelMap,n=e.legendName;if(!n&&!i)return{data:t};var a=i?t.map((function(e){return null==i[e]?e:i[e]})):t;return{data:a,formatter:function(e){return null!=n[e]?n[e]:e}}}function re(e,t){return e.map((function(e){return e[t[0]]}))}var oe=function(e,t,i,a){var r=F(t),o=i.axisSite,s=void 0===o?{}:o,l=i.dimension,u=void 0===l?[e[0]]:l,c=i.stack,d=void 0===c?{}:c,m=i.axisVisible,p=void 0===m||m,f=i.digit,h=void 0===f?2:f,v=i.dataOrder,y=void 0!==v&&v,b=i.scale,g=void 0===b?[!1,!1]:b,x=i.min,w=void 0===x?[null,null]:x,S=i.max,A=void 0===S?[null,null]:S,O=i.legendName,M=void 0===O?{}:O,V=i.labelMap,T=void 0===V?{}:V,N=i.label,k=i.itemStyle,L=i.showLine,E=i.barGap,j=void 0===E?"-100%":E,z=i.opacity,R=a.tooltipVisible,C=a.legendVisible,H=e.slice();s.top&&s.bottom?H=s.top.concat(s.bottom):s.bottom&&!s.right?H=s.bottom:i.metrics?H=i.metrics:H.splice(e.indexOf(u[0]),1);var _=i.xAxisType||["normal","normal"],P=i.yAxisType||"category",D=i.xAxisName||[],$=i.yAxisName||"",G=!1;if(y){var B=y.label,W=y.order;B&&W?r.sort((function(e,t){return"desc"===W?e[B]-t[B]:t[B]-e[B]})):n.warn("Need to provide name and order parameters")}var I=re(r,u),Z=C&&ae({metrics:H,labelMap:T,legendName:M}),J=K({innerRows:r,dimAxisName:$,dimension:u,axisVisible:p,dimAxisType:P,dims:I}),U=ee({meaAxisName:D,meaAxisType:_,axisVisible:p,digit:h,scale:g,min:w,max:A}),q=ne({innerRows:r,metrics:H,stack:d,axisSite:s,isHistogram:G,labelMap:T,itemStyle:k,label:N,showLine:L,dimAxisType:P,dimension:u,barGap:j,opacity:z,dims:I}),Y={axisSite:s,isHistogram:G,meaAxisType:_,digit:h,labelMap:T},X=R&&te(Y),Q={legend:Z,yAxis:J,series:q,xAxis:U,tooltip:X};return Q},se=function(e,t,i,a){var r=F(t),o=i.axisSite,s=void 0===o?{}:o,l=i.dimension,u=void 0===l?[e[0]]:l,c=i.stack,d=void 0===c?{}:c,m=i.axisVisible,p=void 0===m||m,f=i.digit,h=void 0===f?2:f,v=i.dataOrder,y=void 0!==v&&v,b=i.scale,g=void 0===b?[!1,!1]:b,x=i.min,w=void 0===x?[null,null]:x,S=i.max,A=void 0===S?[null,null]:S,O=i.labelMap,M=void 0===O?{}:O,V=i.legendName,T=void 0===V?{}:V,N=i.label,k=i.itemStyle,L=i.showLine,E=i.barGap,j=void 0===E?"-100%":E,z=i.opacity;if(y){var R=y.label,C=y.order;R&&C?r.sort((function(e,t){return"desc"===C?e[R]-t[R]:t[R]-e[R]})):n.warn("Need to provide name and order parameters")}var H=a.tooltipVisible,_=a.legendVisible,P=e.slice();s.left&&s.right?P=s.left.concat(s.right):s.left&&!s.right?P=s.left:i.metrics?P=i.metrics:P.splice(e.indexOf(u[0]),1);var D=i.yAxisType||["normal","normal"],$=i.xAxisType||"category",G=i.yAxisName||[],B=i.xAxisName||"",W=!0,I=re(r,u),Z=_&&ae({metrics:P,labelMap:M,legendName:T}),J=K({innerRows:r,dimAxisName:B,dimension:u,axisVisible:p,dimAxisType:$,dims:I}),U=ee({meaAxisName:G,meaAxisType:D,axisVisible:p,digit:h,scale:g,min:w,max:A}),q=ne({innerRows:r,metrics:P,stack:d,axisSite:s,isHistogram:W,labelMap:M,itemStyle:k,label:N,showLine:L,dimAxisType:$,dimension:u,barGap:j,opacity:z,dims:I}),Y={axisSite:s,isHistogram:W,meaAxisType:D,digit:h,labelMap:M},X=H&&te(Y),Q={legend:Z,yAxis:U,series:q,xAxis:J,tooltip:X};return Q},le={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"v-charts-component-loading"},[i("div",{staticClass:"loader"},[i("div",{staticClass:"loading-spinner"},[i("svg",{staticClass:"circular",attrs:{viewBox:"25 25 50 50"}},[i("circle",{staticClass:"path",attrs:{cx:"50",cy:"50",r:"20",fill:"none"}})])])])])},staticRenderFns:[]},ue={render:function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",{staticClass:"v-charts-data-empty"},[e._v(" 暂无数据 ")])},staticRenderFns:[]};function ce(e,t){Object.keys(t).forEach((function(i){var n=t[i];~i.indexOf(".")?k(e,i,n):"function"===typeof n?e[i]=n(e[i]):C(e[i])&&R(e[i][0])?e[i].forEach((function(t,a){e[i][a]=V({},t,n)})):R(e[i])?e[i]=V({},e[i],n):e[i]=n}))}function de(e,t){Object.keys(t).forEach((function(i){t[i]&&(e[i]=t[i])}))}function me(e,t){Object.keys(t).forEach((function(i){e[i]=t[i]}))}var pe={render:function(e){return e("div",{class:[_(this.$options.name||this.$options._componentTag)],style:this.canvasStyle},[e("div",{style:this.canvasStyle,class:{"v-charts-mask-status":this.dataEmpty||this.loading},ref:"canvas"}),e(ue,{style:{display:this.dataEmpty?"":"none"}}),e(le,{style:{display:this.loading?"":"none"}}),this.$slots.default])},props:{data:{type:[Object,Array],default:function(){return{}}},settings:{type:Object,default:function(){return{}}},width:{type:String,default:"auto"},height:{type:String,default:"400px"},beforeConfig:{type:Function},afterConfig:{type:Function},afterSetOption:{type:Function},afterSetOptionOnce:{type:Function},events:{type:Object},grid:{type:[Object,Array]},colors:{type:Array},tooltipVisible:{type:Boolean,default:!0},legendVisible:{type:Boolean,default:!0},legendPosition:{type:String},markLine:{type:Object},markArea:{type:Object},markPoint:{type:Object},visualMap:{type:[Object,Array]},dataZoom:{type:[Object,Array]},toolbox:{type:[Object,Array]},initOptions:{type:Object,default:function(){return{}}},title:[Object,Array],legend:[Object,Array],xAxis:[Object,Array],yAxis:[Object,Array],radar:Object,tooltip:Object,axisPointer:[Object,Array],brush:[Object,Array],geo:[Object,Array],timeline:[Object,Array],graphic:[Object,Array],series:[Object,Array],backgroundColor:[Object,String],textStyle:[Object,Array],animation:Object,theme:Object,themeName:String,loading:Boolean,dataEmpty:Boolean,extend:Object,judgeWidth:{type:Boolean,default:!1},widthChangeDelay:{type:Number,default:300},tooltipFormatter:{type:Function},resizeable:{type:Boolean,default:!0},resizeDelay:{type:Number,default:200},changeDelay:{type:Number,default:0},setOptionOpts:{type:[Boolean,Object],default:!0},cancelResizeCheck:Boolean,notSetUnchange:Array,log:Boolean},watch:{data:{deep:!0,handler:function(e){e&&this.changeHandler()}},settings:{deep:!0,handler:function(e){e.type&&this.chartLib&&(this.chartHandler=this.chartLib[e.type]),this.changeHandler()}},width:"nextTickResize",height:"nextTickResize",events:{deep:!0,handler:"createEventProxy"},theme:{deep:!0,handler:"themeChange"},themeName:"themeChange",resizeable:"resizeableHandler"},computed:{canvasStyle:function(){return{width:this.width,height:this.height,position:"relative"}},chartColor:function(){return this.colors||this.theme&&this.theme.color||i}},methods:{dataHandler:function(){if(this.chartHandler){var e=this.data,t=e,i=t.columns,n=void 0===i?[]:i,a=t.rows,r=void 0===a?[]:a,o={tooltipVisible:this.tooltipVisible,legendVisible:this.legendVisible,echarts:this.echarts,color:this.chartColor,tooltipFormatter:this.tooltipFormatter,_once:this._once};this.beforeConfig&&(e=this.beforeConfig(e));var s=this.chartHandler(n,r,this.settings,o);s&&("function"===typeof s.then?s.then(this.optionsHandler):this.optionsHandler(s))}},nextTickResize:function(){this.$nextTick(this.resize)},resize:function(){(this.cancelResizeCheck||this.$el&&this.$el.clientWidth&&this.$el.clientHeight)&&this.echartsResize()},echartsResize:function(){this.echarts&&this.echarts.resize()},optionsHandler:function(t){var i=this;if(this.legendPosition&&t.legend&&(t.legend[this.legendPosition]=10,~["left","right"].indexOf(this.legendPosition)&&(t.legend.top="middle",t.legend.orient="vertical")),t.color=this.chartColor,l.forEach((function(e){i[e]&&(t[e]=i[e])})),this.animation&&me(t,this.animation),this.markArea||this.markLine||this.markPoint){var a={markArea:this.markArea,markLine:this.markLine,markPoint:this.markPoint},r=t.series;C(r)?r.forEach((function(e){de(e,a)})):R(r)&&de(r,a)}this.extend&&ce(t,this.extend),this.afterConfig&&(t=this.afterConfig(t));var o=this.setOptionOpts;!this.settings.bmap&&!this.settings.amap||R(o)||(o=!1),this.notSetUnchange&&this.notSetUnchange.length&&(this.notSetUnchange.forEach((function(e){var n=t[e];n&&(D(n,i._store[e])?t[e]=void 0:i._store[e]=F(n))})),R(o)?o.notMerge=!1:o=!1),this._isDestroyed||(this.log&&n.log(t),this.echarts.setOption(t,o),this.$emit("ready",this.echarts,t,e),this._once["ready-once"]||(this._once["ready-once"]=!0,this.$emit("ready-once",this.echarts,t,e)),this.judgeWidth&&this.judgeWidthHandler(t),this.afterSetOption&&this.afterSetOption(this.echarts,t,e),this.afterSetOptionOnce&&!this._once["afterSetOptionOnce"]&&(this._once["afterSetOptionOnce"]=!0,this.afterSetOptionOnce(this.echarts,t,e)))},judgeWidthHandler:function(e){var t=this,i=this.widthChangeDelay,a=this.resize;this.$el.clientWidth||this.$el.clientHeight?a():this.$nextTick((function(e){t.$el.clientWidth||t.$el.clientHeight?a():setTimeout((function(e){a(),t.$el.clientWidth&&t.$el.clientHeight||n.warn(" Can't get dom width or height ")}),i)}))},resizeableHandler:function(e){e&&!this._once.onresize&&this.addResizeListener(),!e&&this._once.onresize&&this.removeResizeListener()},init:function(){if(!this.echarts){var i=this.themeName||this.theme||t;this.echarts=e.init(this.$refs.canvas,i,this.initOptions),this.data&&this.changeHandler(),this.createEventProxy(),this.resizeable&&this.addResizeListener()}},addResizeListener:function(){window.addEventListener("resize",this.resizeHandler),this._once.onresize=!0},removeResizeListener:function(){window.removeEventListener("resize",this.resizeHandler),this._once.onresize=!1},addWatchToProps:function(){var e=this,t=this._watchers.map((function(e){return e.expression}));Object.keys(this.$props).forEach((function(i){if(!~t.indexOf(i)&&!~s.indexOf(i)){var n={};~["[object Object]","[object Array]"].indexOf(j(e.$props[i]))&&(n.deep=!0),e.$watch(i,(function(){e.changeHandler()}),n)}}))},createEventProxy:function(){var e=this,t=this,i=Object.keys(this.events||{});i.length&&i.forEach((function(i){-1===e.registeredEvents.indexOf(i)&&(e.registeredEvents.push(i),e.echarts.on(i,function(e){return function(){if(e in t.events){for(var i=arguments.length,n=Array(i),a=0;a<i;a++)n[a]=arguments[a];t.events[e].apply(null,n)}}}(i)))}))},themeChange:function(e){this.clean(),this.echarts=null,this.init()},clean:function(){this.resizeable&&this.removeResizeListener(),this.echarts.dispose()}},created:function(){this.echarts=null,this.registeredEvents=[],this._once={},this._store={},this.resizeHandler=N(this.resize,this.resizeDelay),this.changeHandler=N(this.dataHandler,this.changeDelay),this.addWatchToProps()},mounted:function(){this.init()},beforeDestroy:function(){this.clean()},_numerify:A},fe=V({},pe,{name:"VeBar",data:function(){return this.chartHandler=oe,{}}}),he=V({},pe,{name:"VeHistogram",data:function(){return this.chartHandler=se,{}}});function ve(e){var t=e.dimension,i=e.rows,n=e.xAxisName,a=e.axisVisible,r=e.xAxisType;return t.map((function(e,t){return{type:r,nameLocation:"middle",nameGap:22,name:n[t]||"",axisTick:{show:!0,lineStyle:{color:"#eee"}},data:i.map((function(t){return t[e]})),show:a}}))}function ye(e){var t=e.rows,i=e.axisSite,n=e.metrics,a=e.area,r=e.stack,o=e.nullAddZero,s=e.labelMap,l=e.label,u=e.itemStyle,c=e.lineStyle,d=e.areaStyle,m=e.dimension,p=[],f={},h=r&&G(r);return n.forEach((function(e){f[e]=[]})),t.forEach((function(e){n.forEach((function(t){var i=null;null!=e[t]?i=e[t]:o&&(i=0),f[t].push([e[m[0]],i])}))})),n.forEach((function(e){var t={name:null!=s[e]?s[e]:e,type:"line",data:f[e]};a&&(t.areaStyle={normal:{}}),i.right&&(t.yAxisIndex=~i.right.indexOf(e)?1:0),r&&h[e]&&(t.stack=h[e]),l&&(t.label=l),u&&(t.itemStyle=u),c&&(t.lineStyle=c),d&&(t.areaStyle=d),p.push(t)})),p}function be(e){for(var t=e.yAxisName,i=e.yAxisType,n=e.axisVisible,a=e.scale,r=e.min,o=e.max,s=e.digit,l={type:"value",axisTick:{show:!1},show:n},u=[],c=function(e){i[e]?u[e]=V({},l,{axisLabel:{formatter:function(t){return $(t,i[e],s)}}}):u[e]=V({},l),u[e].name=t[e]||"",u[e].scale=a[e]||!1,u[e].min=r[e]||null,u[e].max=o[e]||null},d=0;d<2;d++)c(d);return u}function ge(e){var t=e.axisSite,i=e.yAxisType,n=e.digit,a=e.labelMap,r=e.tooltipFormatter,o=t.right||[],s=a?o.map((function(e){return void 0===a[e]?e:a[e]})):o;return{trigger:"axis",formatter:function(e){if(r)return r.apply(null,arguments);var t=[],a=e[0],o=a.name,l=a.axisValueLabel,u=o||l;return t.push(u+"<br>"),e.forEach((function(e){var a=e.seriesName,r=e.data,o=e.marker,l=null,u=~s.indexOf(a)?i[1]:i[0],c=C(r)?r[1]:r;l=$(c,u,n),t.push(o),t.push(a+": "+l),t.push("<br>")})),t.join("")}}}function xe(e){var t=e.metrics,i=e.legendName,n=e.labelMap;if(!i&&!n)return{data:t};var a=n?t.map((function(e){return null==n[e]?e:n[e]})):t;return{data:a,formatter:function(e){return null!=i[e]?i[e]:e}}}var we=function(e,t,i,n){t=C(t)?t:[],e=C(e)?e:[];var a=i.axisSite,r=void 0===a?{}:a,o=i.yAxisType,s=void 0===o?["normal","normal"]:o,l=i.xAxisType,u=void 0===l?"category":l,c=i.yAxisName,d=void 0===c?[]:c,m=i.dimension,p=void 0===m?[e[0]]:m,f=i.xAxisName,h=void 0===f?[]:f,v=i.axisVisible,y=void 0===v||v,b=i.area,g=i.stack,x=i.scale,w=void 0===x?[!1,!1]:x,S=i.min,A=void 0===S?[null,null]:S,O=i.max,M=void 0===O?[null,null]:O,V=i.nullAddZero,T=void 0!==V&&V,N=i.digit,k=void 0===N?2:N,L=i.legendName,E=void 0===L?{}:L,j=i.labelMap,z=void 0===j?{}:j,R=i.label,H=i.itemStyle,F=i.lineStyle,_=i.areaStyle,P=n.tooltipVisible,D=n.legendVisible,$=n.tooltipFormatter,G=e.slice();r.left&&r.right?G=r.left.concat(r.right):r.left&&!r.right?G=r.left:i.metrics?G=i.metrics:G.splice(e.indexOf(p[0]),1);var B=D&&xe({metrics:G,legendName:E,labelMap:z}),W=P&&ge({axisSite:r,yAxisType:s,digit:k,labelMap:z,xAxisType:u,tooltipFormatter:$}),I=ve({dimension:p,rows:t,xAxisName:h,axisVisible:y,xAxisType:u}),Z=be({yAxisName:d,yAxisType:s,axisVisible:y,scale:w,min:A,max:M,digit:k}),J=ye({rows:t,axisSite:r,metrics:G,area:b,stack:g,nullAddZero:T,labelMap:z,label:R,itemStyle:H,lineStyle:F,areaStyle:_,xAxisType:u,dimension:p}),U={legend:B,xAxis:I,series:J,yAxis:Z,tooltip:W};return U},Se=V({},pe,{name:"VeLine",data:function(){return this.chartHandler=we,{}}}),Ae=100,Oe=[80,100],Me=[20,100],Ve=200;function Te(e){var t=e.innerRows,i=e.dataType,n=e.percentShow,a=e.dimension,r=e.metrics,o=e.radius,s=e.offsetY,l=e.selectedMode,u=e.hoverAnimation,c=e.digit,d=e.roseType,m=e.label,p=e.level,f=e.limitShowNum,h=e.isRing,v=e.labelLine,y=e.itemStyle,b=[],g={},x=[];p?(p.forEach((function(e,t){e.forEach((function(e){Y(g,e,t)}))})),t.forEach((function(e){var t=g[e[a]];t&&t.length&&t.forEach((function(t){Y(x,t,e)}))}))):x.push(t);var w={type:"pie",selectedMode:l,hoverAnimation:u,roseType:d,center:["50%",s]},S=x.length;if(x.forEach((function(e,t){var s=V({data:[]},w),l=o/S;if(t){var u=l+o/(2*S)*(2*t-1),d=u+o/(2*S);s.radius=[u,d]}else s.radius=h?o:l;S>1&&0===t&&(s.label={normal:{position:"inner"}}),m&&(s.label=m),v&&(s.labelLine=v),y&&(s.itemStyle=y),n&&(s.label={normal:{show:!0,position:S>1&&0===t?"inner":"outside",formatter:function(e){var t=[];return t.push(e.name+":"),t.push($(e.value,i,c)),t.push("("+e.percent+"%)"),t.join(" ")}}}),s.data=e.map((function(e){return{name:e[a],value:e[r]}})),b.push(s)})),f&&f<b[0].data.length){var A=b[0].data,O=A.slice(f,A.length),M=0;O.forEach((function(e){M+=e.value})),b[0].data=A.slice(0,f),b[0].data.push({name:"其他",value:M})}return b}function Ne(e){var t=e.innerRows,i=e.dimension,n=e.legendLimit,a=e.legendName,r=e.level,o=e.limitShowNum,s=[],l=[];if(r)r.forEach((function(e){e.forEach((function(e){l.push(e)}))})),s=l;else if(o&&o<t.length){for(var u=0;u<o;u++)s.push(t[u][i]);s.push("其他")}else s=t.map((function(e){return e[i]}));return!!s.length&&{data:s,show:s.length<n,formatter:function(e){return null!=a[e]?a[e]:e}}}function ke(e){var t=e.dataType,i=e.innerRows,n=e.limitShowNum,a=e.digit,r=e.metrics,s=e.dimension,l=0,u=i.map((function(e){return l+=e[r],{name:e[s],value:e[r]}})).slice(n,i.length);return{formatter:function(e){var i=[];return i.push(o(e.color)),n&&"其他"===e.name?(i.push("其他:"),u.forEach((function(e){var n=e.name,r=e.value,o=$(r/l,"percent");i.push("<br>"+n+":"),i.push($(r,t,a)),i.push("("+o+")")}))):(i.push(e.name+":"),i.push($(e.value,t,a)),i.push("("+e.percent+"%)")),i.join(" ")}}}var Le=function(e,t,i,n,a){var r=F(t),o=i.dataType,s=void 0===o?"normal":o,l=i.percentShow,u=i.dimension,c=void 0===u?e[0]:u,d=i.metrics,m=void 0===d?e[1]:d,p=i.roseType,f=void 0!==p&&p,h=i.radius,v=void 0===h?a?f?Me:Oe:Ae:h,y=i.offsetY,b=void 0===y?Ve:y,g=i.legendLimit,x=void 0===g?30:g,w=i.selectedMode,S=void 0!==w&&w,A=i.hoverAnimation,O=void 0===A||A,M=i.digit,V=void 0===M?2:M,T=i.legendName,N=void 0===T?{}:T,k=i.label,L=void 0!==k&&k,E=i.level,j=void 0!==E&&E,z=i.limitShowNum,R=void 0===z?0:z,C=i.labelLine,H=i.itemStyle,_=n.tooltipVisible,P=n.legendVisible;R&&r.sort((function(e,t){return t[m]-e[m]}));var D={innerRows:r,dataType:s,percentShow:l,dimension:c,metrics:m,radius:v,offsetY:b,selectedMode:S,hoverAnimation:O,digit:V,roseType:f,label:L,level:j,legendName:N,limitShowNum:R,isRing:a,labelLine:C,itemStyle:H},$=Te(D),G={innerRows:r,dimension:c,legendLimit:x,legendName:N,level:j,limitShowNum:R},B=P&&Ne(G),W=_&&ke({dataType:s,innerRows:r,limitShowNum:R,digit:V,metrics:m,dimension:c}),I={series:$,legend:B,tooltip:W};return I},Ee=function(e,t,i,n){return Le(e,t,i,n,!0)},je=V({},pe,{name:"VePie",data:function(){return this.chartHandler=Le,{}}}),ze=V({},pe,{name:"VeRing",data:function(){return this.chartHandler=Ee,{}}});function Re(e,t){return{trigger:"axis",axisPointer:{type:"shadow"},formatter:function(i){var n=i[1];return[n.name+"<br/>"+n.seriesName+" :",""+$(n.value,e,t)].join("")}}}function Ce(e){var t=e.dimension,i=e.rows,n=e.remainStatus,a=e.totalName,r=e.remainName,o=e.labelMap,s=e.xAxisName,l=e.axisVisible,u=[a].concat(i.map((function(e){return e[t]})));return"have-remain"===n&&(u=u.concat([r])),{type:"category",name:o&&o[s]||s,splitLine:{show:!1},data:u,show:l}}function He(e){var t=e.dataType,i=e.yAxisName,n=e.axisVisible,a=e.digit,r=e.labelMap;return{type:"value",name:null!=r[i]?r[i]:i,axisTick:{show:!1},axisLabel:{formatter:function(e){return $(e,t,a)}},show:n}}function Fe(e){var t=e.dataType,i=e.rows,n=e.metrics,a=e.totalNum,r=e.remainStatus,o=e.dataSum,s=e.digit,l={type:"bar",stack:"总量"},u=o,c=a,d=void 0,m=void 0,p=i.map((function(e){return e[n]}));"have-remain"===r?(d=[0].concat(i.map((function(e){return c-=e[n],c}))).concat([0]),m=[a].concat(p).concat([a-o])):(d=[0].concat(i.map((function(e){return u-=e[n],u}))),m=[o].concat(p));var f=[];return f.push(V({name:"辅助",itemStyle:{normal:{opacity:0},emphasis:{opacity:0}},data:d},l)),f.push(V({name:"数值",label:{normal:{show:!0,position:"top",formatter:function(e){return $(e.value,t,s)}}},data:m},l)),f}function _e(e,t){return t?t>e?"have-remain":"none-remain":"not-total"}var Pe=function(e,t,i,n){var a=i.dataType,r=void 0===a?"normal":a,o=i.dimension,s=void 0===o?e[0]:o,l=i.totalName,u=void 0===l?"总计":l,c=i.totalNum,d=i.remainName,m=void 0===d?"其他":d,p=i.xAxisName,f=void 0===p?s:p,h=i.labelMap,v=void 0===h?{}:h,y=i.axisVisible,b=void 0===y||y,g=i.digit,x=void 0===g?2:g,w=n.tooltipVisible,S=e.slice();S.splice(S.indexOf(s),1);var A=S[0],O=A,M=w&&Re(r,x),V=parseFloat(t.reduce((function(e,t){return e+Number(t[A])}),0).toFixed(x)),T=_e(V,c),N={dimension:s,rows:t,remainStatus:T,totalName:u,remainName:m,xAxisName:f,labelMap:v,axisVisible:b},k=Ce(N),L=He({dataType:r,yAxisName:O,axisVisible:b,digit:x,labelMap:v}),E={dataType:r,rows:t,dimension:s,metrics:A,totalNum:c,remainStatus:T,dataSum:V,digit:x},j=Fe(E),z={tooltip:M,xAxis:k,yAxis:L,series:j};return z},De=V({},pe,{name:"VeWaterfall",data:function(){return this.chartHandler=Pe,{}}});function $e(e,t){return{trigger:"item",formatter:function(i){var n=[];return n.push(o(i.color)),n.push(i.name+": "+$(i.data.realValue,e,t)),n.join("")}}}function Ge(e){var t=e.data,i=e.legendName;return{data:t,formatter:function(e){return null!=i[e]?i[e]:e}}}function Be(e){var t=e.dimension,i=e.metrics,n=e.rows,a=e.sequence,r=e.ascending,o=e.label,s=e.labelLine,l=e.itemStyle,u=e.filterZero,c=e.useDefaultOrder,d={type:"funnel"},m=n.sort((function(e,i){return a.indexOf(e[t])-a.indexOf(i[t])}));u&&(m=m.filter((function(e){return e[i]})));var p=!1;m.some((function(e,t){if(t&&e[i]>m[t-1][i])return p=!0,!0}));var f=100/m.length;return d.data=p&&!c?m.slice().reverse().map((function(e,n){return{name:e[t],value:(n+1)*f,realValue:e[i]}})):m.map((function(e){return{name:e[t],value:e[i],realValue:e[i]}})),r&&(d.sort="ascending"),o&&(d.label=o),s&&(d.labelLine=s),l&&(d.itemStyle=l),d}var We=function(e,t,i,n){var a=e.slice(),r=t.slice(),o=i.dataType,s=void 0===o?"normal":o,l=i.dimension,u=void 0===l?a[0]:l,c=i.sequence,d=void 0===c?r.map((function(e){return e[u]})):c,m=i.digit,p=void 0===m?2:m,f=i.ascending,h=i.label,v=i.labelLine,y=i.legendName,b=void 0===y?{}:y,g=i.itemStyle,x=i.filterZero,w=i.useDefaultOrder,S=n.tooltipVisible,A=n.legendVisible,O=void 0;if(i.metrics)O=i.metrics;else{var M=a.slice();M.splice(a.indexOf(u),1),O=M[0]}var V=S&&$e(s,p),T=A&&Ge({data:d,legendName:b}),N=Be({dimension:u,metrics:O,rows:r,sequence:d,ascending:f,label:h,labelLine:v,itemStyle:g,filterZero:x,useDefaultOrder:w}),k={tooltip:V,legend:T,series:N};return k},Ie=V({},pe,{name:"VeFunnel",data:function(){return this.chartHandler=We,{}}});function Ze(e,t,i){var n=e.map((function(e){return e[t]}));return{data:n,formatter:function(e){return null!=i[e]?i[e]:e}}}function Je(e,t,i){var n=[],a=[];return t.indicator.map((function(t,i){n[i]=e[t.name],a[i]=t.name})),{formatter:function(e){var t=[];return t.push(o(e.color)),t.push(e.name+"<br />"),e.data.value.forEach((function(e,r){t.push(a[r]+": "),t.push($(e,n[r],i)+"<br />")})),t.join("")}}}function Ue(e,t,i){var n={indicator:[],shape:"circle",splitNumber:5},a={};return e.forEach((function(e){t.forEach((function(t){var n=null!=i[t]?i[t]:t;a[n]?a[n].push(e[t]):a[n]=[e[t]]}))})),n.indicator=Object.keys(a).map((function(e){return{name:e,max:Math.max.apply(null,a[e])}})),n}function qe(e){var t=e.rows,i=e.dimension,n=e.metrics,a=e.radar,r=e.label,o=e.itemStyle,s=e.lineStyle,l=e.labelMap,u=e.areaStyle,c={};a.indicator.forEach((function(e,t){var i=e.name;c[i]=t}));var d=t.map((function(e){var t={value:[],name:e[i]};return Object.keys(e).forEach((function(i){if(~n.indexOf(i)){var a=null!=l[i]?c[l[i]]:c[i];t.value[a]=e[i]}})),t})),m={name:i,type:"radar",data:d};return r&&(m.label=r),o&&(m.itemStyle=o),s&&(m.lineStyle=s),u&&(m.areaStyle=u),[m]}var Ye=function(e,t,i,n){var a=i.dataType,r=void 0===a?{}:a,o=i.legendName,s=void 0===o?{}:o,l=i.labelMap,u=void 0===l?{}:l,c=i.dimension,d=void 0===c?e[0]:c,m=i.digit,p=void 0===m?2:m,f=i.label,h=i.itemStyle,v=i.lineStyle,y=i.areaStyle,b=n.tooltipVisible,g=n.legendVisible,x=e.slice();i.metrics?x=i.metrics:x.splice(e.indexOf(d),1);var w=g&&Ze(t,d,s),S=Ue(t,x,u),A=b&&Je(r,S,p),O=qe({rows:t,dimension:d,metrics:x,radar:S,label:f,itemStyle:h,lineStyle:v,labelMap:u,areaStyle:y}),M={legend:w,tooltip:A,radar:S,series:O};return M},Xe=V({},pe,{name:"VeRadar",data:function(){return this.chartHandler=Ye,{}}}),Ke=V({},pe,{name:"VeChart",data:function(){return this.chartLib={bar:oe,histogram:se,line:we,pie:Le,ring:Ee,funnel:We,radar:Ye,waterfall:Pe},this.chartHandler=this.chartLib[this.settings.type],{}}});function Qe(e,t,i,n,a,r){return{formatter:function(s){var l=[];return s.name?(l.push(s.name+"<br>"),n.forEach((function(n,u){var c=null!=r[n]?r[n]:n;l.push(o(a[u])+" "+c+" : "),i[s.name]?l.push($(i[s.name][n],e[n],t)):l.push("-"),l.push("<br>")})),l.join(" ")):""}}}function et(e){var t=e.position,i=e.selectData,n=e.dimension,a=e.metrics,r=e.rows,o=e.label,s=e.itemStyle,l=e.selectedMode,u=e.roam,c=e.center,d=e.aspectScale,m=e.boundingCoords,p=e.zoom,f=e.labelMap,h=e.scaleLimit,v=e.mapGrid,y=[],b={type:"map",mapType:t};return a.forEach((function(e){var t=V({name:null!=f[e]?f[e]:e,data:[],selectedMode:l,roam:u,center:c,aspectScale:d,boundingCoords:m,zoom:p,scaleLimit:h},b);v&&Object.keys(v).forEach((function(e){t[e]=v[e]})),tt(s,t,"itemStyle"),tt(o,t,"label"),r.forEach((function(a){t.data.push({name:a[n],value:a[e],selected:i})})),y.push(t)})),y}function tt(e,t,i){"object"===("undefined"===typeof e?"undefined":O(e))?t[i]=e:e&&(t[i]={normal:{show:!0},emphasis:{show:!0}})}function it(e){var t=e.metrics,i=e.legendName,n=e.labelMap;if(!i&&!n)return{data:t};var a=n?t.map((function(e){return null==n[e]?e:n[e]})):t;return{data:a,formatter:function(e){return null!=i[e]?i[e]:e}}}function nt(t,i){var n=t._once,a=t.registerSign,r=t.beforeRegisterMap,o=t.beforeRegisterMapOnce,s=t.registerSignOnce,l=t.position,u=t.specialAreas;n[a]||(r&&(i=r(i)),o&&!n[s]&&(n[s]=!0,i=o(i)),n[a]=!0,e.registerMap(l,i,u))}var at=function(e,t,i,n){var a=i.position,r=void 0===a?"china":a,o=i.selectData,s=void 0!==o&&o,l=i.selectedMode,u=i.label,c=void 0===u||u,d=i.dataType,m=void 0===d?{}:d,p=i.digit,f=void 0===p?2:p,h=i.dimension,v=void 0===h?e[0]:h,y=i.roam,b=i.center,g=i.aspectScale,x=i.boundingCoords,w=i.zoom,S=i.scaleLimit,A=i.legendName,O=void 0===A?{}:A,M=i.labelMap,V=void 0===M?{}:M,T=i.mapGrid,N=i.itemStyle,k=i.positionJsonLink,L=i.beforeRegisterMap,E=i.beforeRegisterMapOnce,j=i.mapURLProfix,z=void 0===j?"https://unpkg.com/echarts@3.6.2/map/json/":j,R=i.specialAreas,C=void 0===R?{}:R,H=i.mapOrigin,F=e.slice();i.metrics?F=i.metrics:F.splice(e.indexOf(v),1);var _=n.tooltipVisible,P=n.legendVisible,D=n.color,$=n._once,G={};t.forEach((function(e){G[e[v]]=e}));var B=_&&Qe(m,f,G,F,D,V),W=P&&it({metrics:F,legendName:O,labelMap:V}),Z={position:r,selectData:s,label:c,itemStyle:N,dimension:v,metrics:F,rows:t,selectedMode:l,roam:y,center:b,aspectScale:g,boundingCoords:x,zoom:w,labelMap:V,scaleLimit:S,mapGrid:T},J=et(Z),U={_once:$,beforeRegisterMap:L,beforeRegisterMapOnce:E,registerSign:"MAP_REGISTER_"+r,registerSignOnce:"ONCE_MAP_REGISTER_"+r,position:r,specialAreas:C};return H?(nt(U,H),{series:J,tooltip:B,legend:W}):I({position:r,positionJsonLink:k,beforeRegisterMapOnce:E,mapURLProfix:z}).then((function(e){return nt(U,e),{series:J,tooltip:B,legend:W}}))},rt=V({},pe,{name:"VeMap",data:function(){return this.chartHandler=at,{}}}),ot=function(e,t,i,a){var r=i.key,o=i.v,s=i.bmap,l=i.useOuterMap,u=a._once,c="bmap_register";return r||l||n.warn("settings.key must be a string."),u[c]?{}:(u[c]=!0,l?{bmap:s}:U(r,o).then((function(e){return{bmap:s}})))},st=V({},pe,{name:"VeBmap",data:function(){return this.chartHandler=ot,{}}}),lt=function(e,t,i,a){var r=i.key,o=i.v,s=i.amap,l=i.useOuterMap,u=a._once,c="amap_register";return r||l||n.warn("settings.key must be a string."),u[c]?{}:(u[c]=!0,l?{amap:s}:q(r,o).then((function(e){return{amap:s}})))},ut=V({},pe,{name:"VeAmap",data:function(){return this.chartHandler=lt,{}}});function ct(e){var t=e.itemDataType,i=e.linksDataType,n=e.digit;return{trigger:"item",formatter:function(e){var a=[],r=e.name,s=e.data,l=e.value,u=e.color;return a.push(o(u)),a.push(r+" : "),s&&s.source?a.push($(l,i,n)+"<br />"):a.push($(l,t,n)+"<br />"),a.join("")}}}function dt(e){var t=e.rows,i=e.dimension,n=e.metrics,a=e.links,r=e.valueFull,o=e.useDataValue,s=e.label,l=e.itemStyle,u=e.lineStyle,c={},d=t.map((function(e){return c[e[i]]=e[n],{name:e[i],value:e[n]}})),m=null;m=o?a.map((function(e){return V({},e,{value:c[e.target]})})):r?a:a.map((function(e){return null==e.value?V({},e,{value:c[e.target]}):e}));var p={type:"sankey",data:d,links:m};return s&&(p.label=s),l&&(p.itemStyle=l),u&&(p.lineStyle=u),[p]}var mt=function(e,t,i,a){var r=i.links,o=i.dimension,s=void 0===o?e[0]:o,l=i.metrics,u=void 0===l?e[1]:l,c=i.dataType,d=void 0===c?["normal","normal"]:c,m=i.digit,p=void 0===m?2:m,f=i.valueFull,h=void 0!==f&&f,v=i.useDataValue,y=void 0!==v&&v,b=i.label,g=i.itemStyle,x=i.lineStyle;if(r){var w=d[0],S=d[1],A=ct({itemDataType:w,linksDataType:S,digit:p}),O=dt({rows:t,dimension:s,metrics:u,links:r,valueFull:h,useDataValue:y,label:b,itemStyle:g,lineStyle:x});return{tooltip:A,series:O}}n.warn("links is needed in settings!")},pt=V({},pe,{name:"VeSankey",data:function(){return this.chartHandler=mt,{}}});function ft(e,t){var i=[];return e.forEach((function(e){~i.indexOf(e[t])||i.push(e[t])})),i}function ht(e){var t=e.rows,i=e.innerXAxisList,n=e.innerYAxisList,a=e.xDim,r=e.yDim,o=e.metrics,s=e.type,l=e.extraMetrics,u=null;return u="cartesian"===s?t.map((function(e){var t=i.indexOf(e[a]),s=n.indexOf(e[r]),u=o?e[o]:1,c=l.map((function(t){return e[t]||"-"}));return{value:[t,s,u].concat(c)}})):t.map((function(e){var t=o?e[o]:1;return{value:[e[a],e[r],t]}})),u}function vt(e,t){return{type:"category",data:e,name:t,nameLocation:"end",splitArea:{show:!0}}}function yt(e){var t=e.innerMin,i=e.innerMax,n=e.type,o=e.heatColor,s=e.series,l={min:t,max:i,calculable:!0},u=null;return"map"===n?(u={orient:"vertical",left:0,bottom:0,inRange:{color:o||a}},s[0].data.length||(u.show=!1)):u="bmap"===n||"amap"===n?{show:!1,orient:"vertical",left:0,bottom:0,inRange:{color:o||r}}:{orient:"horizontal",left:"center",bottom:10,dimension:2,inRange:o&&{color:o}},V(l,u)}function bt(e){var t=e.chartData;return[{type:"heatmap",data:t}]}function gt(e){var t=e.dataType,i=e.innerXAxisList,n=e.innerYAxisList,a=e.digit,r=e.extraMetrics,s=e.metrics;return{trigger:"item",formatter:function(e){var l=e.color,u=T(e.data.value),c=u[0],d=u[1],m=u[2],p=u.slice(3),f=[];return f.push(i[c]+" ~ "+n[d]+"<br>"),r.forEach((function(e,t){f.push(e+": "+p[t]+"<br>")})),f.push(o(l)+" "+s+": "+$(m,t,a)+"<br>"),f.join("")}}}var xt=function(t,i,n,a){var r=n.type,o=void 0===r?"cartesian":r,s=n.xAxisList,l=n.yAxisList,u=n.dimension,c=void 0===u?[t[0],t[1]]:u,d=n.metrics,m=void 0===d?t[2]:d,p=n.dataType,f=void 0===p?"normal":p,h=n.min,v=n.max,y=n.digit,b=n.bmap,g=n.amap,x=n.geo,w=n.key,S=n.v,A=void 0===S?"2.0":S,O=n.position,M=n.positionJsonLink,T=n.beforeRegisterMap,N=n.pointSize,k=void 0===N?10:N,L=n.blurSize,E=void 0===L?5:L,j=n.heatColor,z=n.yAxisName,R=n.xAxisName,C=n.beforeRegisterMapOnce,H=n.mapURLProfix,F=void 0===H?"https://unpkg.com/echarts@3.6.2/map/json/":H,_=n.specialAreas,P=void 0===_?{}:_,D=a.tooltipVisible,$=s,G=l,B=[],W=[],Z=c.concat([m]);t.forEach((function(e){~Z.indexOf(e)||W.push(e)})),"cartesian"===o?($&&$.length||($=ft(i,c[0])),G&&G.length||(G=ft(i,c[1])),B=ht({rows:i,innerXAxisList:$,innerYAxisList:G,xDim:c[0],yDim:c[1],metrics:m,type:o,extraMetrics:W})):B=ht({rows:i,xDim:c[0],yDim:c[1],metrics:m,type:o,extraMetrics:W});var J=m?i.map((function(e){return e[m]})):[0,5];J.length||(J=[0]);var Y=h||Math.min.apply(null,J),X=v||Math.max.apply(null,J),K=vt($,R),Q=vt(G,z),ee=bt({chartData:B}),te=yt({innerMin:Y,innerMax:X,type:o,heatColor:j,series:ee}),ie=D&&gt({dataType:f,innerXAxisList:$,innerYAxisList:G,digit:y,extraMetrics:W,metrics:m}),ne={visualMap:te,series:ee};return"bmap"===o?(V(ne.series[0],{coordinateSystem:"bmap",pointSize:k,blurSize:E}),U(w,A).then((function(e){return V({bmap:b},ne)}))):"map"===o?(ne.series[0].coordinateSystem="geo",I({position:O,positionJsonLink:M,beforeRegisterMapOnce:C,mapURLProfix:F}).then((function(t){var i=V({map:O},x);return T&&(t=T(t)),e.registerMap(O,t,P),V({geo:i},ne)}))):"amap"===o?(V(ne.series[0],{coordinateSystem:"amap",pointSize:k,blurSize:E}),q(w,A).then((function(e){return V({amap:g},ne)}))):V({xAxis:K,yAxis:Q,tooltip:ie},ne)},wt=V({},pe,{name:"VeHeatmap",data:function(){return this.chartHandler=xt,{}}});function St(e,t){return{data:e,formatter:function(e){return null!=t[e]?t[e]:e}}}function At(e){var t=e.tooltipTrigger;return{trigger:t,formatter:function(t){return C(t)?t.map((function(t){return Ot(t,e)})).join(""):Ot(t,e)}}}function Ot(e,t){var i=t.labelMap,n=t.columns,a=t.dataType,r=t.digit,s=[],l=e.color,u=e.seriesName,c=e.data.value;return s.push(o(l)+" "+u+"<br>"),c.forEach((function(e,t){var o=i[n[t]]||n[t],l=isNaN(e)?e:$(e,a[n[t]],r);s.push(o+": "+l+"<br>")})),s.join("")}function Mt(e){var t=e.xAxisName,i=e.axisVisible,n=e.xAxisType,a=e.rows,r=e.dataLabels,o=e.dimension,s=[];return r.forEach((function(e){var t=a[e];t.forEach((function(e){var t=e[o];t&&!~s.indexOf(t)&&s.push(t)}))})),[{type:n,show:i,name:t,data:s}]}function Vt(e){var t=e.min,i=e.max,n=e.scale,a=e.yAxisName,r=e.dataType,o=e.metrics,s=e.digit,l=e.axisVisible;return{type:"value",show:l,scale:n,min:t,max:i,axisTick:{show:!1},name:a,axisLabel:{formatter:function(e){return $(e,r[o[0]],s)}}}}function Tt(e){var t=e.rows,i=e.dataLabels,n=e.columns,a=e.metrics,r=e.dimension,o=e.label,s=e.itemStyle,l=e.symbol,u=e.symbolSizeMax,c=e.symbolSize,d=e.symbolRotate,m=e.symbolOffset,p=e.cursor,f=n.filter((function(e){return!~a.indexOf(e)&&e!==r})),h=[];i.forEach((function(e){t[e].forEach((function(e){h.push(e[a[1]])}))}));var v=Math.max.apply(null,h),y=[];return i.forEach((function(e){var i=[],n=t[e];n.forEach((function(e){var t={value:[]};t.value.push(e[r],e[a[0]],e[a[1]]),f.forEach((function(i){t.value.push(e[i])})),t.symbolSize=c||e[a[1]]/v*u,i.push(t)})),y.push({type:"scatter",data:i,name:e,label:o,itemStyle:s,symbol:l,symbolRotate:d,symbolOffset:m,cursor:p})})),y}var Nt=function(e,t,i,n){var a=i.dimension,r=void 0===a?e[0]:a,o=i.metrics,s=void 0===o?[e[1],e[2]]:o,l=i.dataType,u=void 0===l?{}:l,c=i.xAxisType,d=void 0===c?"category":c,m=i.xAxisName,p=i.yAxisName,f=i.digit,h=void 0===f?2:f,v=i.legendName,y=void 0===v?{}:v,b=i.labelMap,g=void 0===b?{}:b,x=i.tooltipTrigger,w=void 0===x?"item":x,S=i.axisVisible,A=void 0===S||S,O=i.symbolSizeMax,M=void 0===O?50:O,T=i.symbol,N=i.symbolSize,k=i.symbolRotate,L=i.symbolOffset,E=i.cursor,j=i.min,z=i.max,R=i.scale,H=i.label,F=i.itemStyle;if(C(t)){var _=V({},i,{xAxisName:m?[m]:void 0,yAxisName:p?[p]:void 0,scale:R?[R]:void 0,min:j?[j]:void 0,max:z?[z]:void 0,dimension:r?[r]:void 0}),P=we(e,t,_,n);return P&&P.series?(P.series.forEach((function(e){V(e,{type:"scatter",symbol:T,symbolSize:N||10,symbolRotate:k,symbolOffset:L,cursor:E,label:H,itemStyle:F})})),P):{}}var D=n.tooltipVisible,$=n.legendVisible,G=Object.keys(t),B=$&&St(G,y),W=D&&At({tooltipTrigger:w,labelMap:g,columns:e,dataType:u,digit:h}),I=Mt({xAxisName:m,axisVisible:A,xAxisType:d,dataLabels:G,dimension:r,rows:t}),Z=Vt({min:j,max:z,scale:R,yAxisName:p,dataType:u,metrics:s,digit:h,axisVisible:A}),J=Tt({rows:t,dataLabels:G,columns:e,metrics:s,dimension:r,label:H,itemStyle:F,symbol:T,symbolSizeMax:M,symbolSize:N,symbolRotate:k,symbolOffset:L,cursor:E});return{legend:B,tooltip:W,xAxis:I,yAxis:Z,series:J}},kt=V({},pe,{name:"VeScatter",data:function(){return this.chartHandler=Nt,{}}}),Lt=[5,10,20,30],Et="日K",jt="#ec0000",zt="#00da3c",Rt=50,Ct=100,Ht={show:!1};function Ft(e){var t=e.showMA,i=e.MA,n=e.legendName,a=e.labelMap,r=[Et];return t&&(r=r.concat(i.map((function(e){return"MA"+e})))),a&&(r=r.map((function(e){return null==a[e]?e:a[e]}))),{data:r,formatter:function(e){return null!=n[e]?n[e]:e}}}function _t(e){var t=e.metrics,i=e.dataType,n=e.digit,a=e.labelMap;return{trigger:"axis",axisPointer:{type:"cross"},position:function(e,t,i,n,a){var r={top:10},o=e[0]<a.viewSize[0]/2?"right":"left";return r[o]=60,r},formatter:function(e){var r=[];return r.push(e[0].axisValue+"<br>"),e.forEach((function(e){var s=e.data,l=e.seriesName,u=e.componentSubType,c=e.color,d=null==a[l]?l:a[l];if(r.push(o(c)+" "+d+": "),"candlestick"===u)r.push("<br>"),t.slice(0,4).forEach((function(e,t){var o=null!=a[e]?a[e]:e,l=$(s[t+1],i,n);r.push("- "+o+": "+l+"<br>")}));else if("line"===u){var m=$(s,i,n);r.push(m+"<br>")}else if("bar"===u){var p=$(s[1],i,n);r.push(p+"<br>")}})),r.join("")}}}function Pt(e){var t=e.downColor,i=e.upColor,n=e.MA,a=e.showMA;return{show:!1,seriesIndex:a?1+n.length:1,dimension:2,pieces:[{value:1,color:t},{value:-1,color:i}]}}function Dt(e){var t=e.showVol;return[{left:"10%",right:"8%",top:"10%",height:t?"50%":"65%",containLabel:!1},{left:"10%",right:"8%",top:"65%",height:"16%",containLabel:!1}]}function $t(e){var t=e.dims,i="category",n=!0,a=!1,r=Ht,o={onZero:!1},s=Ht,l=Ht,u="dataMin",c="dataMax",d=1;return[{type:i,data:t,scale:n,boundaryGap:a,axisLine:o,splitLine:r,min:u,max:c},{type:i,gridIndex:d,data:t,scale:n,boundaryGap:a,axisLine:o,axisTick:s,splitLine:r,axisLabel:l,min:u,max:c}]}function Gt(e){var t=e.dataType,i=e.digit,n=!0,a=1,r=2,o=Ht,s=Ht,l=Ht,u=Ht,c=function(e){return $(e,t,i)};return[{scale:n,axisTick:s,axisLabel:{formatter:c}},{scale:n,gridIndex:a,splitNumber:r,axisLine:o,axisTick:s,splitLine:u,axisLabel:l}]}function Bt(e){var t=e.start,i=e.end;return[{type:"inside",xAxisIndex:[0,1],start:t,end:i},{show:!0,xAxisIndex:[0,1],type:"slider",top:"85%",start:t,end:i}]}function Wt(e){var t=e.values,i=e.volumes,n=e.upColor,a=e.downColor,r=e.showMA,o=e.MA,s=e.showVol,l=e.labelMap,u=e.digit,c=e.itemStyle,d=c||{normal:{color:n,color0:a,borderColor:null,borderColor0:null}},m={normal:{opacity:.5}},p=[{name:null==l[Et]?Et:l[Et],type:"candlestick",data:t,itemStyle:d}];return r&&o.forEach((function(e){var i="MA"+e;p.push({name:null==l[i]?i:l[i],data:It(e,t,u),type:"line",lineStyle:m,smooth:!0})})),s&&p.push({name:"Volume",type:"bar",xAxisIndex:1,yAxisIndex:1,data:i}),p}function It(e,t,i){var n=[];return t.forEach((function(a,r){if(r<e)n.push("-");else{for(var o=0,s=0;s<e;s++)o+=t[r-s][1];n.push(+(o/e).toFixed(i))}})),n}var Zt=function(e,t,i,n){var a=i.dimension,r=void 0===a?e[0]:a,o=i.metrics,s=void 0===o?e.slice(1,6):o,l=i.digit,u=void 0===l?2:l,c=i.itemStyle,d=i.labelMap,m=void 0===d?{}:d,p=i.legendName,f=void 0===p?{}:p,h=i.MA,v=void 0===h?Lt:h,y=i.showMA,b=void 0!==y&&y,g=i.showVol,x=void 0!==g&&g,w=i.showDataZoom,S=void 0!==w&&w,A=i.downColor,O=void 0===A?jt:A,M=i.upColor,V=void 0===M?zt:M,T=i.start,N=void 0===T?Rt:T,k=i.end,L=void 0===k?Ct:k,E=i.dataType,j=n.tooltipVisible,z=n.legendVisible,R=C(t[0]),H=[],F=[],_=[],P=s.slice(0,4),D=s[4];R?t.forEach((function(t){var i=[];H.push(t[e.indexOf(r)]),P.forEach((function(n){i.push(t[e.indexOf(n)])})),F.push(i),D&&_.push(t[e.indexOf(D)])})):t.forEach((function(e,t){var i=[];if(H.push(e[r]),P.forEach((function(t){i.push(e[t])})),F.push(i),D){var n=e[s[0]]>e[s[1]]?1:-1;_.push([t,e[D],n])}}));var $=z&&Ft({showMA:b,MA:v,legendName:f,labelMap:m}),G=j&&_t({metrics:s,dataType:E,digit:u,labelMap:m}),B=x&&Pt({downColor:O,upColor:V,MA:v,showMA:b}),W=S&&Bt({start:N,end:L}),I=Dt({showVol:x}),Z=$t({dims:H}),J=Gt({dataType:E,digit:u}),U=Wt({values:F,volumes:_,upColor:V,downColor:O,showMA:b,MA:v,showVol:x,labelMap:m,digit:u,itemStyle:c}),q={link:{xAxisIndex:"all"}};return{legend:$,tooltip:G,visualMap:B,grid:I,xAxis:Z,yAxis:J,dataZoom:W,series:U,axisPointer:q}},Jt=V({},pe,{name:"VeCandle",data:function(){return this.chartHandler=Zt,{}}});function Ut(e){var t=e.tooltipFormatter,i=e.dataType,n=e.digit;return{formatter:function(e){var a=e.seriesName,r=e.data,o=r.value,s=r.name;if(t)return t.apply(null,arguments);var l=[];return l.push(a+": "),l.push($(o,i[a],n)+" "+s),l.join("")}}}function qt(e){var t=e.rows,i=e.dimension,n=e.metrics,a=e.digit,r=e.dataType,o=e.labelMap,s=e.seriesMap,l=e.dataName,u=t.map((function(e){var t=e[i],u=s[t],c={type:"gauge",name:null!=o[t]?o[t]:t,data:[{name:l[t]||"",value:e[n]}],detail:{formatter:function(e){return $(e,r[t],a)}},axisLabel:{formatter:function(e){return $(e,r[t],a)}}};return u&&Object.keys(u).forEach((function(e){R(c[e])?V(c[e],u[e]):c[e]=u[e]})),c}));return u}var Yt=function(e,t,i,n){var a=i.dimension,r=void 0===a?e[0]:a,o=i.metrics,s=void 0===o?e[1]:o,l=i.digit,u=void 0===l?2:l,c=i.dataType,d=void 0===c?{}:c,m=i.labelMap,p=void 0===m?{}:m,f=i.seriesMap,h=void 0===f?{}:f,v=i.dataName,y=void 0===v?{}:v,b=n.tooltipFormatter,g=n.tooltipVisible,x=g&&Ut({tooltipFormatter:b,dataType:d}),w=qt({rows:t,dimension:r,metrics:s,digit:u,dataType:d,labelMap:p,seriesMap:h,dataName:y});return{tooltip:x,series:w}},Xt=V({},pe,{name:"VeGauge",data:function(){return this.chartHandler=Yt,{}}});function Kt(e){var t=e.dimension,i=e.rows,n=i.map((function(e){return e[t]}));return{data:n}}function Qt(e){var t=e.tooltipFormatter;return{trigger:"item",triggerOn:"mousemove",formatter:t}}function ei(e){var t=e.dimension,i=e.metrics,n=e.rows,a=e.seriesMap,r=[];return n.forEach((function(e){var n=e[t],o=a[n],s={type:"tree",name:e[t],data:e[i]};a[e[t]]&&Object.keys(o).forEach((function(e){R(s[e])?V(s[e],o[e]):s[e]=o[e]})),r.push(s)})),r}var ti=function(e,t,i,n){var a=i.dimension,r=void 0===a?e[0]:a,o=i.metrics,s=void 0===o?e[1]:o,l=i.seriesMap,u=void 0===l?{}:l,c=n.legendVisible,d=n.tooltipFormatter,m=n.tooltipVisible,p=ei({dimension:r,metrics:s,rows:t,seriesMap:u}),f=c&&t.length>1&&Kt({dimension:r,rows:t}),h=m&&Qt({tooltipFormatter:d});return{series:p,legend:f,tooltip:h}},ii=V({},pe,{name:"VeTree",data:function(){return this.chartHandler=ti,{}}});function ni(e){var t=e.tooltipFormatter,i=e.dataType,n=e.digit;return{show:!0,formatter:function(e){var a=e.seriesName,r=e.value;return t?t.apply(null,arguments):[a+": ",$(r,i,n)].join("")}}}function ai(e){var t=e.dimension,i=e.metrics,n=e.seriesMap,a=e.rows,r=e.wave,o=r,s=C(n)?n.length:0;return a.slice().map((function(e,a){var l=[],u={type:"liquidFill"},c=e[t],d=Number(e[i]),m={};return C(n)?m=n[a]?n[a]:n[s-1]:R(n[c])&&(m=n[c]),C(r)&&C(r[0])&&(o=C(r[a])?r[a]:r[r.length-1]),l.push({value:d}),o&&o.length&&(l=l.concat(o.map((function(e){return{value:e}})))),u=V(u,{data:l,name:c},m),u}))}var ri=function(e,t,i,n){var a=i.dimension,r=void 0===a?e[0]:a,o=i.metrics,s=void 0===o?e[1]:o,l=i.seriesMap,u=void 0===l?{}:l,c=i.dataType,d=void 0===c?"percent":c,m=i.digit,p=void 0===m?2:m,f=i.wave,h=void 0===f?[]:f,v=n.tooltipVisible,y=n.tooltipFormatter,b=v&&ni({tooltipFormatter:y,dataType:d,digit:p}),g=ai({rows:t,columns:e,dimension:r,metrics:s,seriesMap:u,wave:h});return{tooltip:b,series:g}},oi=V({},pe,{name:"VeLiquidfill",data:function(){return this.chartHandler=ri,{}}});function si(e){var t=e.dimension,i=e.metrics,n=e.rows,a=e.color,r=e.sizeMax,o=e.sizeMin,s=e.shape,l={type:"wordCloud",textStyle:{normal:{color:!C(a)&&a?a:function(){return"rgb("+[Math.round(160*Math.random()),Math.round(160*Math.random()),Math.round(160*Math.random())].join(",")+")"}}},shape:s,sizeRange:[o,r]},u=C(a)?a.length:0,c=n.slice().map((function(e){var n={name:e[t],value:e[i]};return u>0&&(n.textStyle={normal:{color:a[Math.floor(Math.random()*u)]}}),n}));return l.data=c,[l]}function li(e){var t=e.tooltipFormatter;return{show:!0,formatter:function(e){var i=e.data,n=i.name,a=i.value;return t?t.apply(null,e):n+": "+a}}}var ui=function(e,t,i,n){var a=i.dimension,r=void 0===a?e[0]:a,o=i.metrics,s=void 0===o?e[1]:o,l=i.color,u=void 0===l?"":l,c=i.sizeMax,d=void 0===c?60:c,m=i.sizeMin,p=void 0===m?12:m,f=i.shape,h=void 0===f?"circle":f,v=n.tooltipVisible,y=n.tooltipFormatter,b=si({dimension:r,metrics:s,rows:t,color:u,sizeMax:d,sizeMin:p,shape:h}),g=v&&li({tooltipFormatter:y});return{series:b,tooltip:g}},ci=V({},pe,{name:"VeWordcloud",data:function(){return this.chartHandler=ui,{}}}),di=[fe,he,Se,je,ze,De,Ie,Xe,Ke,rt,st,ut,pt,wt,kt,Jt,Xt,ii,oi,ci];function mi(e,t){di.forEach((function(t){e.component(t.name,t)}))}"undefined"!==typeof window&&window.Vue&&mi(window.Vue);var pi={VeBar:fe,VeHistogram:he,VeRing:ze,VeLine:Se,VePie:je,VeWaterfall:De,VeFunnel:Ie,VeRadar:Xe,VeChart:Ke,VeMap:rt,VeBmap:st,VeAmap:ut,VeSankey:pt,VeScatter:kt,VeCandle:Jt,VeGauge:Xt,VeTree:ii,VeLiquidfill:oi,VeWordcloud:ci,install:mi};return pi}))}}]);