fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

167 lines
731 KiB

/**
* @license almond 0.3.1 Copyright (c) 2011-2014, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/jrburke/almond for details
*/
// Copyright 2006 Google Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*! Hammer.JS - v2.0.7 - 2016-04-22
* http://hammerjs.github.io/
*
* Copyright (c) 2016 Jorik Tangelder;
* Licensed under the MIT license */
//Copyright (c) 2013, Baidu Inc.
// All rights reserved.
//
// Redistribution and use of this software in source and binary forms, with or
// without modification, are permitted provided that the following conditions
//are met:
//
// Redistributions of source code must retain the above copyright notice, this
//list of conditions and the following disclaimer.
//
// Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
//and/or other materials provided with the distribution.
//
// Neither the name of Baidu Inc. nor the names of its contributors may be used
//to endorse or promote products derived from this software without specific
//prior written permission of Baidu Inc.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
//AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
//IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
//DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
//ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
//(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
//ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
//(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
//SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// document.body.appendChild(c);
//
//Copyright (c) 2014 Ga?tan Renaudeau
//
//Permission is hereby granted, free of charge, to any person
//obtaining a copy of this software and associated documentation
//files (the "Software"), to deal in the Software without
//restriction, including without limitation the rights to use,
// copy, modify, merge, publish, distribute, sublicense, and/or sell
//copies of the Software, and to permit persons to whom the
//Software is furnished to do so, subject to the following
//conditions:
//
// The above copyright notice and this permission notice shall be
//included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
//OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
//NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
//HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
// WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
//OTHER DEALINGS IN THE SOFTWARE.
/*
* heatmap.js v2.0.5 | JavaScript Heatmap Library
*
* Copyright 2008-2016 Patrick Wied <heatmapjs@patrick-wied.at> - All rights reserved.
* Dual licensed under MIT and Beerware license
*
* :: 2016-09-05 01:16
*/
/**
* Copyright (c) 2010-2016, Vladimir Agafonkin
Copyright (c) 2010-2011, CloudMade
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are
permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials
provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**/
/*
Copyright (c) JS Foundation and other contributors
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
https://github.com/moment/moment
*/
!function(t,e){"function"==typeof define&&define.amd?define([],e):t.VanCharts=e()}(this,function(){var requirejs,require,define;!function(t){function e(t,e){return v.call(t,e)}function i(t,e){var i,n,r,a,o,s,h,l,u,c,d,f=e&&e.split("/"),p=g.map,m=p&&p["*"]||{};if(t&&"."===t.charAt(0))if(e){for(t=t.split("/"),o=t.length-1,g.nodeIdCompat&&y.test(t[o])&&(t[o]=t[o].replace(y,"")),t=f.slice(0,f.length-1).concat(t),u=0;u<t.length;u+=1)if(d=t[u],"."===d)t.splice(u,1),u-=1;else if(".."===d){if(1===u&&(".."===t[2]||".."===t[0]))break;u>0&&(t.splice(u-1,2),u-=2)}t=t.join("/")}else 0===t.indexOf("./")&&(t=t.substring(2));if((f||m)&&p){for(i=t.split("/"),u=i.length;u>0;u-=1){if(n=i.slice(0,u).join("/"),f)for(c=f.length;c>0;c-=1)if(r=p[f.slice(0,c).join("/")],r&&(r=r[n])){a=r,s=u;break}if(a)break;!h&&m&&m[n]&&(h=m[n],l=u)}!a&&h&&(a=h,s=l),a&&(i.splice(0,s,a),t=i.join("/"))}return t}function n(e,i){return function(){var n=_.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),u.apply(t,n.concat([e,i]))}}function r(t){return function(e){return i(e,t)}}function a(t){return function(e){f[t]=e}}function o(i){if(e(p,i)){var n=p[i];delete p[i],m[i]=!0,l.apply(t,n)}if(!e(f,i)&&!e(m,i))throw new Error("No "+i);return f[i]}function s(t){var e,i=t?t.indexOf("!"):-1;return i>-1&&(e=t.substring(0,i),t=t.substring(i+1,t.length)),[e,t]}function h(t){return function(){return g&&g.config&&g.config[t]||{}}}var l,u,c,d,f={},p={},g={},m={},v=Object.prototype.hasOwnProperty,_=[].slice,y=/\.js$/;c=function(t,e){var n,a=s(t),h=a[0];return t=a[1],h&&(h=i(h,e),n=o(h)),h?t=n&&n.normalize?n.normalize(t,r(e)):i(t,e):(t=i(t,e),a=s(t),h=a[0],t=a[1],h&&(n=o(h))),{f:h?h+"!"+t:t,n:t,pr:h,p:n}},d={require:function(t){return n(t)},exports:function(t){var e=f[t];return"undefined"!=typeof e?e:f[t]={}},module:function(t){return{id:t,uri:"",exports:f[t],config:h(t)}}},l=function(i,r,s,h){var l,u,g,v,_,y,x=[],b=typeof s;if(h=h||i,"undefined"===b||"function"===b){for(r=!r.length&&s.length?["require","exports","module"]:r,_=0;_<r.length;_+=1)if(v=c(r[_],h),u=v.f,"require"===u)x[_]=d.require(i);else if("exports"===u)x[_]=d.exports(i),y=!0;else if("module"===u)l=x[_]=d.module(i);else if(e(f,u)||e(p,u)||e(m,u))x[_]=o(u);else{if(!v.p)throw new Error(i+" missing "+u);v.p.load(v.n,n(h,!0),a(u),{}),x[_]=f[u]}g=s?s.apply(f[i],x):void 0,i&&(l&&l.exports!==t&&l.exports!==f[i]?f[i]=l.exports:g===t&&y||(f[i]=g))}else i&&(f[i]=s)},requirejs=require=u=function(e,i,n,r,a){if("string"==typeof e)return d[e]?d[e](i):o(c(e,i).f);if(!e.splice){if(g=e,g.deps&&u(g.deps,g.callback),!i)return;i.splice?(e=i,i=n,n=null):e=t}return i=i||function(){},"function"==typeof n&&(n=r,r=a),r?l(t,e,i,n):setTimeout(function(){l(t,e,i,n)},4),u},u.config=function(t){return u(t)},requirejs._defined=f,define=function(t,i,n){if("string"!=typeof t)throw new Error("See almond README: incorrect module build, no module name");i.splice||(n=i,i=[]),e(f,t)||e(p,t)||(p[t]=[t,i,n])},define.amd={jQuery:!0}}(),define("almond",function(){}),document.createElement("vancanvas").getContext||!function(){function t(){return this.context_||(this.context_=new l(this))}function e(t,e,i){var n=A.call(arguments,2);return function(){return t.apply(e,n.concat(A.call(arguments)))}}function i(t){var e=t.srcElement;switch(t.propertyName){case"width":e.style.width=e.attributes.width.nodeValue+"px",e.getContext().clearRect();break;case"height":e.style.height=e.attributes.height.nodeValue+"px",e.getContext().clearRect()}}function n(t){var e=t.srcElement;e.firstChild&&(e.firstChild.style.width=e.clientWidth+"px",e.firstChild.style.height=e.clientHeight+"px")}function r(){return[[1,0,0],[0,1,0],[0,0,1]]}function a(t,e){for(var i=r(),n=0;3>n;n++)for(var a=0;3>a;a++){for(var o=0,s=0;3>s;s++)o+=t[n][s]*e[s][a];i[n][a]=o}return i}function o(t,e){e.fillStyle=t.fillStyle,e.lineCap=t.lineCap,e.lineJoin=t.lineJoin,e.lineWidth=t.lineWidth,e.miterLimit=t.miterLimit,e.shadowBlur=t.shadowBlur,e.shadowColor=t.shadowColor,e.shadowOffsetX=t.shadowOffsetX,e.shadowOffsetY=t.shadowOffsetY,e.strokeStyle=t.strokeStyle,e.globalAlpha=t.globalAlpha,e.arcScaleX_=t.arcScaleX_,e.arcScaleY_=t.arcScaleY_,e.lineScale_=t.lineScale_}function s(t){var e,i=1;if(t=String(t),"rgb"==t.substring(0,3)){var n=t.indexOf("(",3),r=t.indexOf(")",n+1),a=t.substring(n+1,r).split(",");e="#";for(var o=0;3>o;o++)e+=L[Number(a[o])];4===a.length&&"a"===t.substr(3,1)&&(i=a[3])}else e=t;return{color:e,alpha:i}}function h(t){switch(t){case"butt":return"flat";case"round":return"round";case"square":default:return"square"}}function l(t){this.m_=r(),this.mStack_=[],this.aStack_=[],this.currentPath_=[],this.strokeStyle="#000",this.fillStyle="#000",this.font="12px sans-serif",this.lineWidth=1,this.lineJoin="miter",this.lineCap="butt",this.miterLimit=1*b,this.globalAlpha=1,this.canvas=t;var e=t.ownerDocument.createElement("div");e.style.width=t.clientWidth+"px",e.style.height=t.clientHeight+"px",e.style.position="absolute",t.appendChild(e),this.element_=e,this.arcScaleX_=1,this.arcScaleY_=1,this.lineScale_=1}function u(t,e,i,n){t.currentPath_.push({type:"bezierCurveTo",cp1x:e.x,cp1y:e.y,cp2x:i.x,cp2y:i.y,x:n.x,y:n.y}),t.currentX_=n.x,t.currentY_=n.y}function c(t){for(var e=0;3>e;e++)for(var i=0;2>i;i++)if(!isFinite(t[e][i])||isNaN(t[e][i]))return!1;return!0}function d(t,e,i){if(c(e)&&(t.m_=e,i)){var n=e[0][0]*e[1][1]-e[0][1]*e[1][0];t.lineScale_=x(y(n))}}function f(t){this.type_=t,this.x0_=0,this.y0_=0,this.r0_=0,this.x1_=0,this.y1_=0,this.r1_=0,this.colors_=[]}function p(){}var g=Math,m=g.round,v=g.sin,_=g.cos,y=g.abs,x=g.sqrt,b=10,T=b/2,A=Array.prototype.slice,C={init:function(t){if(/MSIE/.test(navigator.userAgent)&&!window.opera){var i=t||document;i.createElement("vancanvas"),i.attachEvent("onreadystatechange",e(this.init_,this,i))}},init_:function(t){if(t.namespaces){if(t.namespaces.g_vml_||t.namespaces.add("g_vml_","urn:schemas-microsoft-com:vml","#default#VML"),t.namespaces.g_o_||t.namespaces.add("g_o_","urn:schemas-microsoft-com:office:office","#default#VML"),!t.styleSheets.ex_canvas_){var e=t.createStyleSheet();e.owningElement.id="ex_canvas_",e.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}g_vml_\\:*{behavior:url(#default#VML)}g_o_\\:*{behavior:url(#default#VML)}"}for(var i=t.getElementsByTagName("vancanvas"),n=0;n<i.length;n++)this.initElement(i[n])}},initElement:function(e){if(!e.getContext){e.getContext=t,e.innerHTML="",e.attachEvent("onpropertychange",i),e.attachEvent("onresize",n);var r=e.attributes;r.width&&r.width.specified?e.style.width=r.width.nodeValue+"px":e.width=e.clientWidth,r.height&&r.height.specified?e.style.height=r.height.nodeValue+"px":e.height=e.clientHeight}return e}};C.init();for(var L=[],P=0;16>P;P++)for(var M=0;16>M;M++)L[16*P+M]=P.toString(16)+M.toString(16);var w=l.prototype;w.clearRect=function(){this.element_.innerHTML=""},w.beginPath=function(){this.currentPath_=[]},w.moveTo=function(t,e){var i=this.getCoords_(t,e);this.currentPath_.push({type:"moveTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},w.lineTo=function(t,e){var i=this.getCoords_(t,e);this.currentPath_.push({type:"lineTo",x:i.x,y:i.y}),this.currentX_=i.x,this.currentY_=i.y},w.bezierCurveTo=function(t,e,i,n,r,a){var o=this.getCoords_(r,a),s=this.getCoords_(t,e),h=this.getCoords_(i,n);u(this,s,h,o)},w.quadraticCurveTo=function(t,e,i,n){var r=this.getCoords_(t,e),a=this.getCoords_(i,n),o={x:this.currentX_+2/3*(r.x-this.currentX_),y:this.currentY_+2/3*(r.y-this.currentY_)},s={x:o.x+(a.x-this.currentX_)/3,y:o.y+(a.y-this.currentY_)/3};u(this,o,s,a)},w.arc=function(t,e,i,n,r,a){i*=b;var o=a?"at":"wa",s=t+_(n)*i-T,h=e+v(n)*i-T,l=t+_(r)*i-T,u=e+v(r)*i-T;s!=l||a||(s+=.125);var c=this.getCoords_(t,e),d=this.getCoords_(s,h),f=this.getCoords_(l,u);this.currentPath_.push({type:o,x:c.x,y:c.y,radius:i,xStart:d.x,yStart:d.y,xEnd:f.x,yEnd:f.y})},w.rect=function(t,e,i,n){this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath()},w.strokeRect=function(t,e,i,n){var r=this.currentPath_;this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath(),this.stroke(),this.currentPath_=r},w.fillRect=function(t,e,i,n){var r=this.currentPath_;this.beginPath(),this.moveTo(t,e),this.lineTo(t+i,e),this.lineTo(t+i,e+n),this.lineTo(t,e+n),this.closePath(),this.fill(),this.currentPath_=r},w.createLinearGradient=function(t,e,i,n){var r=new f("gradient");return r.x0_=t,r.y0_=e,r.x1_=i,r.y1_=n,r},w.createRadialGradient=function(t,e,i,n,r,a){var o=new f("gradientradial");return o.x0_=t,o.y0_=e,o.r0_=i,o.x1_=n,o.y1_=r,o.r1_=a,o},w.drawImage=function(t,e){t.getContext&&(this.element_.innerHTML+=t.getContext("2d").element_.innerHTML);var i,n,r,a,o,s,h,l,u=t.runtimeStyle.width,c=t.runtimeStyle.height;t.runtimeStyle.width="auto",t.runtimeStyle.height="auto";var d=t.width,f=t.height;if(t.runtimeStyle.width=u,t.runtimeStyle.height=c,3===arguments.length)i=arguments[1],n=arguments[2],o=s=0,h=r=d,l=a=f;else if(5===arguments.length)i=arguments[1],n=arguments[2],r=arguments[3],a=arguments[4],o=s=0,h=d,l=f;else{if(9!==arguments.length)throw Error("Invalid number of arguments");o=arguments[1],s=arguments[2],h=arguments[3],l=arguments[4],i=arguments[5],n=arguments[6],r=arguments[7],a=arguments[8]}var p=this.getCoords_(i,n),v=[],_=10,y=10;if(v.push(" <g_vml_:group",' coordsize="',b*_,",",b*y,'"',' coordorigin="0,0"',' style="width:',_,"px;height:",y,"px;position:absolute;"),1!==this.m_[0][0]||this.m_[0][1]){var x=[];x.push("M11=",this.m_[0][0],",","M12=",this.m_[1][0],",","M21=",this.m_[0][1],",","M22=",this.m_[1][1],",","Dx=",m(p.x/b),",","Dy=",m(p.y/b),"");var T=p,A=this.getCoords_(i+r,n),C=this.getCoords_(i,n+a),L=this.getCoords_(i+r,n+a);T.x=g.max(T.x,A.x,C.x,L.x),T.y=g.max(T.y,A.y,C.y,L.y),v.push("padding:0 ",m(T.x/b),"px ",m(T.y/b),"px 0;filter:progid:DXImageTransform.Microsoft.Matrix(",x.join(""),", sizingmethod='clip');")}else v.push("top:",m(p.y/b),"px;left:",m(p.x/b),"px;");v.push(' ">','<g_vml_:image src="',t.src,'"',' style="width:',b*r,"px;"," height:",b*a,'px;"',' cropleft="',o/d,'"',' croptop="',s/f,'"',' cropright="',(d-o-h)/d,'"',' cropbottom="',(f-s-l)/f,'"'," />","</g_vml_:group>"),this.element_.insertAdjacentHTML("BeforeEnd",v.join(""))},w.stroke=function(t){var e=[],i=s(t?this.fillStyle:this.strokeStyle),n=i.color,r=i.alpha*this.globalAlpha,a=10,o=10;e.push("<g_vml_:shape",' filled="',!!t,'"',' style="position:absolute;width:',a,"px;height:",o,'px;"',' coordorigin="0 0" coordsize="',b*a," ",b*o,'"',' stroked="',!t,'"',' path="');for(var l={x:null,y:null},u={x:null,y:null},c=0;c<this.currentPath_.length;c++){var d,f=this.currentPath_[c];switch(f.type){case"moveTo":d=f,e.push(" m ",m(f.x),",",m(f.y));break;case"lineTo":e.push(" l ",m(f.x),",",m(f.y));break;case"close":e.push(" x "),f=null;break;case"bezierCurveTo":e.push(" c ",m(f.cp1x),",",m(f.cp1y),",",m(f.cp2x),",",m(f.cp2y),",",m(f.x),",",m(f.y));break;case"at":case"wa":e.push(" ",f.type," ",m(f.x-this.arcScaleX_*f.radius),",",m(f.y-this.arcScaleY_*f.radius)," ",m(f.x+this.arcScaleX_*f.radius),",",m(f.y+this.arcScaleY_*f.radius)," ",m(f.xStart),",",m(f.yStart)," ",m(f.xEnd),",",m(f.yEnd))}f&&((null==l.x||f.x<l.x)&&(l.x=f.x),(null==u.x||f.x>u.x)&&(u.x=f.x),(null==l.y||f.y<l.y)&&(l.y=f.y),(null==u.y||f.y>u.y)&&(u.y=f.y))}if(e.push(' ">'),t)if(this.fillStyle&&"object"==typeof this.fillStyle){var p=this.fillStyle,v=0,_={x:0,y:0},y=0,x=1;if("gradient"==p.type_){var T=p.x0_/this.arcScaleX_,A=p.y0_/this.arcScaleY_,C=p.x1_/this.arcScaleX_,L=p.y1_/this.arcScaleY_,P=this.getCoords_(T,A),M=this.getCoords_(C,L),w=M.x-P.x,E=M.y-P.y;v=180*Math.atan2(w,E)/Math.PI,0>v&&(v+=360),1e-6>v&&(v=0)}else{var P=this.getCoords_(p.x0_,p.y0_),S=u.x-l.x,O=u.y-l.y;_={x:(P.x-l.x)/S,y:(P.y-l.y)/O},S/=this.arcScaleX_*b,O/=this.arcScaleY_*b;var k=g.max(S,O);y=2*p.r0_/k,x=2*p.r1_/k-y}var D=p.colors_;D.sort(function(t,e){return t.offset-e.offset});for(var R=D.length,B=D[0].color,I=D[R-1].color,G=D[0].alpha*this.globalAlpha,N=D[R-1].alpha*this.globalAlpha,H=[],c=0;R>c;c++){var z=D[c];H.push(z.offset*x+y+" "+z.color)}e.push('<g_vml_:fill type="',p.type_,'"',' method="none" focus="100%"',' color="',B,'"',' color2="',I,'"',' colors="',H.join(","),'"',' opacity="',N,'"',' g_o_:opacity2="',G,'"',' angle="',v,'"',' focusposition="',_.x,",",_.y,'" />')}else e.push('<g_vml_:fill color="',n,'" opacity="',r,'" />');else{var U=this.lineScale_*this.lineWidth;1>U&&(r*=U),e.push("<g_vml_:stroke",' opacity="',r,'"',' joinstyle="',this.lineJoin,'"',' miterlimit="',this.miterLimit,'"',' endcap="',h(this.lineCap),'"',' weight="',U,'px"',' color="',n,'" />')}e.push("</g_vml_:shape>"),this.element_.insertAdjacentHTML("beforeEnd",e.join(""))},w.fill=function(){this.stroke(!0)},w.closePath=function(){this.currentPath_.push({type:"close"})},w.getCoords_=function(t,e){var i=this.m_;return{x:b*(t*i[0][0]+e*i[1][0]+i[2][0])-T,y:b*(t*i[0][1]+e*i[1][1]+i[2][1])-T}},w.save=function(){var t={};o(this,t),this.aStack_.push(t),this.mStack_.push(this.m_),this.m_=a(r(),this.m_)},w.restore=function(){o(this.aStack_.pop(),this),this.m_=this.mStack_.pop()},w.translate=function(t,e){var i=[[1,0,0],[0,1,0],[t,e,1]];d(this,a(i,this.m_),!1)},w.rotate=function(t){var e=_(t),i=v(t),n=[[e,i,0],[-i,e,0],[0,0,1]];d(this,a(n,this.m_),!1)},w.scale=function(t,e){this.arcScaleX_*=t,this.arcScaleY_*=e;var i=[[t,0,0],[0,e,0],[0,0,1]];d(this,a(i,this.m_),!0)},w.transform=function(t,e,i,n,r,o){var s=[[t,e,0],[i,n,0],[r,o,1]];d(this,a(s,this.m_),!0)},w.setTransform=function(t,e,i,n,r,a){var o=[[t,e,0],[i,n,0],[r,a,1]];d(this,o,!0)},w.clip=function(){},w.arcTo=function(){},w.createPattern=function(){return new p},w.measureText=function(t){var e=document.createElement("span");e.style.font=this.font,e.innerHTML=t;var i=document.getElementsByTagName("body")[0];i.appendChild(e);var n=e.offsetWidth;return i.removeChild(e),{width:n+1}},w.fillText=function(t,e,i){var n=[],r=this.font.split("px")[0].replace(/(^\s+)|(\s+$)/g,""),a=/^\d+$/.test(r)?parseInt(r):0;n.push('<g_vml_:shape style="font:'+this.font+";"," color:"+this.fillStyle+";"," position:absolute;"," left:"+e+"px;"," top:"+(i-a)+"px;"," width:"+this.measureText(t).width+"px;"," height:"+a+'px;"',' ><g_vml_:textbox inset="0,0,0,0">'+t," </g_vml_:textbox>","</g_vml_:shape>"),this.element_.insertAdjacentHTML("BeforeEnd",n.join(""))},f.prototype.addColorStop=function(t,e){e=s(e),this.colors_.push({offset:t,color:e.color,alpha:e.alpha})},VanCanvasManager=C,CanvasRenderingContext2D=l,CanvasGradient=f,CanvasPattern=p}(),define("excanvas",function(){}),function(t,e,i,n){"use strict";function r(t,e,i){return setTimeout(l(t,i),e)}function a(t,e,i){return Array.isArray(t)?(o(t,i[e],i),!0):!1}function o(t,e,i){var r;if(t)if(t.forEach)t.forEach(e,i);else if(t.length!==n)for(r=0;r<t.length;)e.call(i,t[r],r,t),r++;else for(r in t)t.hasOwnProperty(r)&&e.call(i,t[r],r,t)}function s(e,i,n){var r="DEPRECATED METHOD: "+i+"\n"+n+" AT \n";return function(){var i=new Error("get-stack-trace"),n=i&&i.stack?i.stack.replace(/^[^\(]+?[\n$]/gm,"").replace(/^\s+at\s+/gm,"").replace(/^Object.<anonymous>\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",a=t.console&&(t.console.warn||t.console.log);return a&&a.call(t.console,r,n),e.apply(this,arguments)}}function h(t,e,i){var n,r=e.prototype;n=t.prototype=Object.create(r),n.constructor=t,n._super=r,i&&ct(n,i)}function l(t,e){return function(){return t.apply(e,arguments)}}function u(t,e){return typeof t==pt?t.apply(e?e[0]||n:n,e):t}function c(t,e){return t===n?e:t}function d(t,e,i){return o(m(e),function(e){t.addEventListener?"wheel"===e?t.addEventListener("onwheel"in t?"wheel":"mousewheel",i,!1):t.addEventListener(e,i,!1):t.attachEvent&&("wheel"==e&&(e="mousewheel"),t.attachEvent("on"+e,i))}),this}function f(t,e,i){o(m(e),function(e){t.removeEventListener?"wheel"===e?t.removeEventListener("onwheel"in t?"wheel":"mousewheel",i,!1):t.removeEventListener(e,i,!1):t.detachEvent&&("wheel"==e&&(e="mousewheel"),t.detachEvent("on"+e,i))})}function p(t,e){for(;t;){if(t==e)return!0;t=t.parentNode}return!1}function g(t,e){return t.indexOf(e)>-1}function m(t){return t.trim().split(/\s+/g)}function v(t,e,i){if(t.indexOf&&!i)return t.indexOf(e);for(var n=0;n<t.length;){if(i&&t[n][i]==e||!i&&t[n]===e)return n;n++}return-1}function _(t){return Array.prototype.slice.call(t,0)}function y(t,e,i){for(var n=[],r=[],a=0;a<t.length;){var o=e?t[a][e]:t[a];v(r,o)<0&&n.push(t[a]),r[a]=o,a++}return i&&(n=e?n.sort(function(t,i){return t[e]>i[e]}):n.sort()),n}function x(t,e){for(var i,r,a=e.charAt(0).toUpperCase()+e.slice(1),o=0;o<dt.length;){if(i=dt[o],r=i?i+a:e,r in t)return r;o++}return n}function b(){return Tt++}function T(e){var i=e.ownerDocument||e;return i.defaultView||i.parentWindow||t}function A(t,e){var i=this;this.manager=t,this.callback=e,this.element=t.element,this.target=t.options.inputTarget,this.domHandler=function(e){u(t.options.enable,[t])&&i.handler(e)},this.init()}function C(t){var e,i=t.options.inputClass;return new(e=i?i:Lt?N:Pt?U:Ct?V:G)(t,L)}function L(t,e,i){var n=i.pointers.length,r=i.changedPointers.length,a=e&kt&&n-r===0,o=e&(Rt|Bt)&&n-r===0;i.isFirst=!!a,i.isFinal=!!o,a&&(t.session={}),i.eventType=e,P(t,i),t.emit("hammer.input",i),t.recognize(i),t.session.prevInput=i}function P(t,e){var i=t.session,n=e.pointers,r=n.length;i.firstInput||(i.firstInput=E(e)),r>1&&!i.firstMultiple?i.firstMultiple=E(e):1===r&&(i.firstMultiple=!1);var a=i.firstInput,o=i.firstMultiple,s=o?o.center:a.center,h=e.center=S(n);e.timeStamp=yt(),e.deltaTime=e.timeStamp-a.timeStamp,e.angle=R(s,h),e.distance=D(s,h),M(i,e),e.offsetDirection=k(e.deltaX,e.deltaY);var l=O(e.deltaTime,e.deltaX,e.deltaY);e.overallVelocityX=l.x,e.overallVelocityY=l.y,e.overallVelocity=_t(l.x)>_t(l.y)?l.x:l.y,e.scale=o?I(o.pointers,n):1,e.rotation=o?B(o.pointers,n):0,e.maxPointers=i.prevInput?e.pointers.length>i.prevInput.maxPointers?e.pointers.length:i.prevInput.maxPointers:e.pointers.length,w(i,e);var u=t.element;p(e.srcEvent.target,u)&&(u=e.srcEvent.target),e.target=u}function M(t,e){var i=e.center,n=t.offsetDelta||{},r=t.prevDelta||{},a=t.prevInput||{};(e.eventType===kt||a.eventType===Rt)&&(r=t.prevDelta={x:a.deltaX||0,y:a.deltaY||0},n=t.offsetDelta={x:i.x,y:i.y}),e.deltaX=r.x+(i.x-n.x),e.deltaY=r.y+(i.y-n.y)}function w(t,e){var i,r,a,o,s=t.lastInterval||e,h=e.timeStamp-s.timeStamp;if(e.eventType!=Bt&&(h>Ot||s.velocity===n)){var l=e.deltaX-s.deltaX,u=e.deltaY-s.deltaY,c=O(h,l,u);r=c.x,a=c.y,i=_t(c.x)>_t(c.y)?c.x:c.y,o=k(l,u),t.lastInterval=e}else i=s.velocity,r=s.velocityX,a=s.velocityY,o=s.direction;e.velocity=i,e.velocityX=r,e.velocityY=a,e.direction=o}function E(t){for(var e=[],i=0;i<t.pointers.length;)e[i]={clientX:vt(t.pointers[i].clientX),clientY:vt(t.pointers[i].clientY)},i++;return{timeStamp:yt(),pointers:e,center:S(e),deltaX:t.deltaX,deltaY:t.deltaY}}function S(t){var e=t.length;if(1===e)return{x:vt(t[0].clientX),y:vt(t[0].clientY)};for(var i=0,n=0,r=0;e>r;)i+=t[r].clientX,n+=t[r].clientY,r++;return{x:vt(i/e),y:vt(n/e)}}function O(t,e,i){return{x:e/t||0,y:i/t||0}}function k(t,e){return t===e?It:_t(t)>=_t(e)?0>t?Gt:Nt:0>e?Ht:zt}function D(t,e,i){i||(i=Wt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return Math.sqrt(n*n+r*r)}function R(t,e,i){i||(i=Wt);var n=e[i[0]]-t[i[0]],r=e[i[1]]-t[i[1]];return 180*Math.atan2(r,n)/Math.PI}function B(t,e){return R(e[1],e[0],Xt)+R(t[1],t[0],Xt)}function I(t,e){return D(e[0],e[1],Xt)/D(t[0],t[1],Xt)}function G(){this.evEl=qt,this.evWin=Zt,this.pressed=!1,A.apply(this,arguments)}function N(){this.evEl=Jt,this.evWin=$t,A.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function H(){this.evTarget=ee,this.evWin=ie,this.started=!1,A.apply(this,arguments)}function z(t,e){var i=_(t.touches),n=_(t.changedTouches);return e&(Rt|Bt)&&(i=y(i.concat(n),"identifier",!0)),[i,n]}function U(){this.evTarget=re,this.targetIds={},A.apply(this,arguments)}function F(t,e){var i=_(t.touches),n=this.targetIds;if(e&(kt|Dt)&&1===i.length)return n[i[0].identifier]=!0,[i,i];var r,a,o=_(t.changedTouches),s=[],h=this.target;if(a=i.filter(function(t){return p(t.target,h)}),e===kt)for(r=0;r<a.length;)n[a[r].identifier]=!0,r++;for(r=0;r<o.length;)n[o[r].identifier]&&s.push(o[r]),e&(Rt|Bt)&&delete n[o[r].identifier],r++;return s.length?[y(a.concat(s),"identifier",!0),s]:void 0}function V(){A.apply(this,arguments);var t=l(this.handler,this);this.touch=new U(this.manager,t),this.mouse=new G(this.manager,t),this.primaryTouch=null,this.lastTouches=[]}function W(t,e){t&kt?(this.primaryTouch=e.changedPointers[0].identifier,X.call(this,e)):t&(Rt|Bt)&&X.call(this,e)}function X(t){var e=t.changedPointers[0];if(e.identifier===this.primaryTouch){var i={x:e.clientX,y:e.clientY};this.lastTouches.push(i);var n=this.lastTouches,r=function(){var t=n.indexOf(i);t>-1&&n.splice(t,1)};setTimeout(r,ae)}}function Y(t){for(var e=t.srcEvent.clientX,i=t.srcEvent.clientY,n=0;n<this.lastTouches.length;n++){var r=this.lastTouches[n],a=Math.abs(e-r.x),o=Math.abs(i-r.y);if(oe>=a&&oe>=o)return!0}return!1}function q(t,e){this.manager=t,this.set(e)}function Z(t){if(g(t,de))return de;var e=g(t,fe),i=g(t,pe);return e&&i?ce:e||i?e?fe:pe:g(t,ce)?ce:ue}function j(){if(!he)return!1;var e={},i=t.CSS&&t.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(n){e[n]=i?t.CSS.supports("touch-action",n):!0}),e}function Q(t){this.options=ct({},this.defaults,t||{}),this.id=b(),this.manager=null,this.options.enable=c(this.options.enable,!0),this.state=me,this.simultaneous={},this.requireFail=[]}function K(t){return t&be?"cancel":t&ye?"end":t&_e?"move":t&ve?"start":""}function J(t){return t==zt?"down":t==Ht?"up":t==Gt?"left":t==Nt?"right":""}function $(t,e){var i=e.manager;return i?i.get(t):t}function tt(){Q.apply(this,arguments)}function et(){tt.apply(this,arguments),this.pX=null,this.pY=null}function it(){tt.apply(this,arguments)}function nt(){Q.apply(this,arguments),this._timer=null,this._input=null}function rt(){tt.apply(this,arguments)}function at(){tt.apply(this,arguments)}function ot(){Q.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function st(t,e){return e=e||{},e.recognizers=c(e.recognizers,st.defaults.preset),new ht(t,e)}function ht(t,e){this.options=ct({},st.defaults,e||{}),this.options.inputTarget=this.options.inputTarget||t,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=t,this.input=C(this),this.touchAction=new q(this,this.options.touchAction),lt(this,!0),o(this.options.recognizers,function(t){var e=this.add(new t[0](t[1]));t[2]&&e.recognizeWith(t[2]),t[3]&&e.requireFailure(t[3])},this)}function lt(t,e){var i=t.element;if(i.style){var n;o(t.options.cssProps,function(r,a){n=x(i.style,a),e?(t.oldCssProps[n]=i.style[n],i.style[n]=r):i.style[n]=t.oldCssProps[n]||""}),e||(t.oldCssProps={})}}function ut(t,i){var n=e.createEvent("Event");n.initEvent(t,!0,!0),n.gesture=i,i.target.dispatchEvent(n)}var ct,dt=["","webkit","Moz","MS","ms","o"],ft=e.createElement("div"),pt="function",gt=function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},mt=!t.SVGSVGElement,vt=Math.round,_t=Math.abs,yt=Date.now;ct="function"!=typeof Object.assign?function(t){if(t===n||null===t)throw new TypeError("Cannot convert undefined or null to object");for(var e=Object(t),i=1;i<arguments.length;i++){var r=arguments[i];if(r!==n&&null!==r)for(var a in r)r.hasOwnProperty(a)&&(e[a]=r[a])}return e}:Object.assign;var xt=s(function(t,e,i){for(var r=Object.keys(e),a=0;a<r.length;)(!i||i&&t[r[a]]===n)&&(t[r[a]]=e[r[a]]),a++;return t},"extend","Use `assign`."),bt=s(function(t,e){return xt(t,e,!0)},"merge","Use `assign`."),Tt=1,At=/mobile|tablet|ip(ad|hone|od)|android/i,Ct="ontouchstart"in t,Lt=x(t,"PointerEvent")!==n,Pt=Ct&&At.test(navigator.userAgent),Mt="touch",wt="pen",Et="mouse",St="kinect",Ot=25,kt=1,Dt=2,Rt=4,Bt=8,It=1,Gt=2,Nt=4,Ht=8,zt=16,Ut=Gt|Nt,Ft=Ht|zt,Vt=Ut|Ft,Wt=["x","y"],Xt=["clientX","clientY"];A.prototype={handler:function(){},init:function(){this.evEl&&d(this.element,this.evEl,this.domHandler),this.evTarget&&d(this.target,this.evTarget,this.domHandler),this.evWin&&d(T(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&f(this.element,this.evEl,this.domHandler),this.evTarget&&f(this.target,this.evTarget,this.domHandler),this.evWin&&f(T(this.element),this.evWin,this.domHandler)}};var Yt={mousedown:kt,mousemove:Dt,mouseup:Rt},qt="mousedown mousemove mouseout mouseover wheel",Zt="mousemove mouseup";mt&&(qt="mousedown mousemove mouseout mouseover mouseup wheel",Zt="mousemove"),h(G,A,{handler:function(t){var e={pointers:[t],changedPointers:[t],pointerType:Et,srcEvent:t},i=Yt[t.type],n=mt?1===t.button:0===t.button;if(i&kt&&n&&(this.pressed=!0),i&Dt&&(mt?!this.pressed:1!==t.which)&&(i=Rt),this.pressed)i&Rt&&(this.pressed=!1),this.callback(this.manager,i,e);else{var i=t.type;-1!=i.indexOf("wheel")&&(i="wheel");var r=this.manager.handlers[i]&&this.manager.handlers[i].slice();if(r&&r.length)for(var a=0;a<r.length;)r[a](e),a++}}});var jt={pointerdown:kt,pointermove:Dt,pointerup:Rt,pointercancel:Bt,pointerout:Bt},Qt={2:Mt,3:wt,4:Et,5:St},Kt="mousemove mouseout mouseover wheel",Jt="pointerdown wheel",$t="pointermove pointerup pointercancel mousemove mouseout mouseover";t.MSPointerEvent&&!t.PointerEvent&&(Jt="MSPointerDown mousemove mouseout mouseover wheel",$t="MSPointerMove MSPointerUp MSPointerCancel"),h(N,A,{handler:function(t){var e=this.store,i=!1,n=t.type.toLowerCase().replace("ms",""),r=jt[n],a=Qt[t.pointerType]||t.pointerType,o=a==Mt,s=v(e,t.pointerId,"pointerId");r&kt&&(0===t.button||o)?0>s&&(e.push(t),s=e.length-1):r&(Rt|Bt)&&(i=!0);var h={pointers:e,changedPointers:[t],pointerType:a,srcEvent:t};if(0>s){if(-1!=Kt.indexOf(t.type)){var l=this.manager.handlers[t.type]&&this.manager.handlers[t.type].slice();if(l&&l.length)for(var u=0;u<l.length;)l[u](h),u++}}else e[s]=t,this.callback(this.manager,r,h),i&&e.splice(s,1)}});var te={touchstart:kt,touchmove:Dt,touchend:Rt,touchcancel:Bt},ee="touchstart",ie="touchstart touchmove touchend touchcancel";h(H,A,{handler:function(t){var e=te[t.type];if(e===kt&&(this.started=!0),this.started){var i=z.call(this,t,e);e&(Rt|Bt)&&i[0].length-i[1].length===0&&(this.started=!1),this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}}});var ne={touchstart:kt,touchmove:Dt,touchend:Rt,touchcancel:Bt},re="touchstart touchmove touchend touchcancel";h(U,A,{handler:function(t){var e=ne[t.type],i=F.call(this,t,e);i&&this.callback(this.manager,e,{pointers:i[0],changedPointers:i[1],pointerType:Mt,srcEvent:t})}});var ae=2500,oe=25;h(V,A,{handler:function(t,e,i){var n=i.pointerType==Mt,r=i.pointerType==Et;if(!(r&&i.sourceCapabilities&&i.sourceCapabilities.firesTouchEvents)){if(n)W.call(this,e,i);else if(r&&Y.call(this,i))return;this.callback(t,e,i)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var se=x(ft.style,"touchAction"),he=se!==n,le="compute",ue="auto",ce="manipulation",de="none",fe="pan-x",pe="pan-y",ge=j();q.prototype={set:function(t){t==le&&(t=this.compute()),he&&this.manager.element.style&&ge[t]&&(this._shouldChangeTouchAction=t===ce,this.manager.element.style[se]=t),this.actions=t.toLowerCase().trim()},setTouchActionNone:function(){this._shouldChangeTouchAction&&(this.manager.element.style[se]=de)},recoverTouchAction:function(){this._shouldChangeTouchAction&&(this.manager.element.style[se]=ce)},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var t=[];return o(this.manager.recognizers,function(e){u(e.options.enable,[e])&&(t=t.concat(e.getTouchAction()))}),Z(t.join(" "))},preventDefaults:function(t){var e=t.srcEvent,i=(t.offsetDirection,this.manager.options._handler),n=i&&i.preventDefault(t)&&!i.vanchart.isForceBubble();if(n||this.manager.session.prevented)return void gt(e);var r=this.actions,a=g(r,de)&&!ge[de],o=g(r,pe)&&!ge[pe],s=g(r,fe)&&!ge[fe];if(a){var h=1===t.pointers.length,l=t.distance<2,u=t.deltaTime<250;if(h&&l&&u)return}},preventSrc:function(t){this.manager.session.prevented=!0,gt(t)}};var me=1,ve=2,_e=4,ye=8,xe=ye,be=16,Te=32;Q.prototype={defaults:{},set:function(t){return ct(this.options,t),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(t){if(a(t,"recognizeWith",this))return this;var e=this.simultaneous;return t=$(t,this),e[t.id]||(e[t.id]=t,t.recognizeWith(this)),this},dropRecognizeWith:function(t){return a(t,"dropRecognizeWith",this)?this:(t=$(t,this),delete this.simultaneous[t.id],this)},requireFailure:function(t){if(a(t,"requireFailure",this))return this;var e=this.requireFail;return t=$(t,this),-1===v(e,t)&&(e.push(t),t.requireFailure(this)),this},dropRequireFailure:function(t){if(a(t,"dropRequireFailure",this))return this;t=$(t,this);var e=v(this.requireFail,t);return e>-1&&this.requireFail.splice(e,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(t){return!!this.simultaneous[t.id]},emit:function(t){function e(e){i.manager.emit(e,t)}var i=this,n=this.state;ye>n&&e(i.options.event+K(n)),e(i.options.event),t.additionalEvent&&e(t.additionalEvent),n>=ye&&e(i.options.event+K(n))},tryEmit:function(t){return this.canEmit()?this.emit(t):void(this.state=Te)},canEmit:function(){for(var t=0;t<this.requireFail.length;){if(!(this.requireFail[t].state&(Te|me)))return!1;t++}return!0},recognize:function(t){var e=ct({},t);return u(this.options.enable,[this,e])?(this.state&(xe|be|Te)&&(this.state=me),this.state=this.process(e),void(this.state&(ve|_e|ye|be)&&this.tryEmit(e))):(this.reset(),void(this.state=Te))},process:function(t){},getTouchAction:function(){},reset:function(){}},h(tt,Q,{defaults:{pointers:1},attrTest:function(t){var e=this.options.pointers;return 0===e||t.pointers.length===e},process:function(t){var e=this.state,i=t.eventType,n=e&(ve|_e),r=this.attrTest(t);return n&&(i&Bt||!r)?e|be:n||r?i&Rt?e|ye:e&ve?e|_e:ve:Te}}),h(et,tt,{defaults:{event:"pan",threshold:10,pointers:1,direction:Vt},getTouchAction:function(){var t=this.options.direction,e=[];return t&Ut&&e.push(pe),t&Ft&&e.push(fe),e},directionTest:function(t){var e=this.options,i=!0,n=t.distance,r=t.direction,a=t.deltaX,o=t.deltaY,s=this.manager.options._handler,h=s&&s.preventDefault(t);return r&e.direction||(e.direction&Ut?(r=0===a?It:0>a?Gt:Nt,i=a!=this.pX,n=Math.abs(t.deltaX)):(r=0===o?It:0>o?Ht:zt,i=o!=this.pY,n=Math.abs(t.deltaY))),t.direction=r,h&&i&&n>e.threshold&&r&e.direction},attrTest:function(t){return tt.prototype.attrTest.call(this,t)&&(this.state&ve||!(this.state&ve)&&this.directionTest(t))},emit:function(t){this.pX=t.deltaX,this.pY=t.deltaY;var e=J(t.direction);e&&(t.additionalEvent=this.options.event+e),this._super.emit.call(this,t)}}),h(it,tt,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[de]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&ve)},emit:function(t){if(1!==t.scale){var e=t.scale<1?"in":"out";t.additionalEvent=this.options.event+e}this._super.emit.call(this,t)}}),h(nt,Q,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[ue]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,a=t.deltaTime>e.time;if(this._input=t,!n||!i||t.eventType&(Rt|Bt)&&!a)this.reset();else if(t.eventType&kt)this.reset(),this._timer=r(function(){this.state=xe,this.tryEmit()},e.time,this);else if(t.eventType&Rt)return xe;return Te},reset:function(){clearTimeout(this._timer)},emit:function(t){this.state===xe&&(t&&t.eventType&Rt?this.manager.emit(this.options.event+"up",t):(this._input.timeStamp=yt(),this.manager.emit(this.options.event,this._input)))}}),h(rt,tt,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[de]},attrTest:function(t){return this._super.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&ve)}}),h(at,tt,{defaults:{event:"swipe",
threshold:10,velocity:.3,direction:Ut|Ft,pointers:1},getTouchAction:function(){return et.prototype.getTouchAction.call(this)},attrTest:function(t){var e,i=this.options.direction;return i&(Ut|Ft)?e=t.overallVelocity:i&Ut?e=t.overallVelocityX:i&Ft&&(e=t.overallVelocityY),this._super.attrTest.call(this,t)&&i&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers==this.options.pointers&&_t(e)>this.options.velocity&&t.eventType&Rt},emit:function(t){var e=J(t.offsetDirection);e&&this.manager.emit(this.options.event+e,t),this.manager.emit(this.options.event,t)}}),h(ot,Q,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ce]},process:function(t){var e=this.options,i=t.pointers.length===e.pointers,n=t.distance<e.threshold,a=t.deltaTime<e.time;if(this.reset(),t.eventType&kt&&0===this.count)return this.failTimeout();if(n&&a&&i){if(t.eventType!=Rt)return this.failTimeout();var o=this.pTime?t.timeStamp-this.pTime<e.interval:!0,s=!this.pCenter||D(this.pCenter,t.center)<e.posThreshold;this.pTime=t.timeStamp,this.pCenter=t.center,s&&o?this.count+=1:this.count=1,this._input=t;var h=this.count%e.taps;if(0===h)return this.hasRequireFailures()?(this._timer=r(function(){this.state=xe,this.tryEmit()},e.interval,this),ve):xe}return Te},failTimeout:function(){return this._timer=r(function(){this.state=Te},this.options.interval,this),Te},reset:function(){clearTimeout(this._timer)},emit:function(){this.state==xe&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))}}),st.VERSION="2.0.7",st.defaults={domEvents:!1,touchAction:le,enable:!0,inputTarget:null,inputClass:null,preset:[[rt,{enable:!1}],[it,{enable:!1},["rotate"]],[at,{direction:Ut}],[et,{direction:Ut},["swipe"]],[ot],[ot,{event:"doubletap",taps:2},["tap"]],[nt]],cssProps:{userSelect:"none",touchSelect:"none",touchCallout:"none",contentZooming:"none",userDrag:"none",tapHighlightColor:"rgba(0,0,0,0)"}};var Ae=1,Ce=2;ht.prototype={set:function(t){return ct(this.options,t),t.touchAction&&this.touchAction.update(),t.inputTarget&&(this.input.destroy(),this.input.target=t.inputTarget,this.input.init()),this},stop:function(t){this.session.stopped=t?Ce:Ae},recognize:function(t){var e=this.session;if(!e.stopped){this.touchAction.preventDefaults(t);var i,n=this.recognizers,r=e.curRecognizer;(!r||r&&r.state&xe)&&(r=e.curRecognizer=null);for(var a=0;a<n.length;)i=n[a],e.stopped===Ce||r&&i!=r&&!i.canRecognizeWith(r)?i.reset():i.recognize(t),!r&&i.state&(ve|_e|ye)&&(r=e.curRecognizer=i),a++}},get:function(t){if(t instanceof Q)return t;for(var e=this.recognizers,i=0;i<e.length;i++)if(e[i].options.event==t)return e[i];return null},add:function(t){if(a(t,"add",this))return this;var e=this.get(t.options.event);return e&&this.remove(e),this.recognizers.push(t),t.manager=this,this.touchAction.update(),t},remove:function(t){if(a(t,"remove",this))return this;if(t=this.get(t)){var e=this.recognizers,i=v(e,t);-1!==i&&(e.splice(i,1),this.touchAction.update())}return this},on:function(t,e){if(t!==n&&e!==n){var i=this.handlers;return o(m(t),function(t){i[t]=i[t]||[],i[t].push(e)}),this}},off:function(t,e){if(t!==n){var i=this.handlers;return o(m(t),function(t){e?i[t]&&i[t].splice(v(i[t],e),1):delete i[t]}),this}},emit:function(t,e){this.options.domEvents&&ut(t,e);var i=this.handlers[t]&&this.handlers[t].slice();if(i&&i.length){e.type=t,e.preventDefault=function(){gt(e.srcEvent)};for(var n=0;n<i.length;)i[n](e),n++}},destroy:function(){this.element&&lt(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null}},ct(st,{INPUT_START:kt,INPUT_MOVE:Dt,INPUT_END:Rt,INPUT_CANCEL:Bt,STATE_POSSIBLE:me,STATE_BEGAN:ve,STATE_CHANGED:_e,STATE_ENDED:ye,STATE_RECOGNIZED:xe,STATE_CANCELLED:be,STATE_FAILED:Te,DIRECTION_NONE:It,DIRECTION_LEFT:Gt,DIRECTION_RIGHT:Nt,DIRECTION_UP:Ht,DIRECTION_DOWN:zt,DIRECTION_HORIZONTAL:Ut,DIRECTION_VERTICAL:Ft,DIRECTION_ALL:Vt,Manager:ht,Input:A,TouchAction:q,TouchInput:U,MouseInput:G,PointerEventInput:N,TouchMouseInput:V,SingleTouchInput:H,Recognizer:Q,AttrRecognizer:tt,Tap:ot,Pan:et,Swipe:at,Pinch:it,Rotate:rt,Press:nt,on:d,off:f,each:o,merge:bt,extend:xt,assign:ct,inherit:h,bindFn:l,prefixed:x});var Le="undefined"!=typeof t?t:"undefined"!=typeof self?self:{};Le.Hammer=st,"function"==typeof define&&define.amd?define("hammer",[],function(){return st}):"undefined"!=typeof module&&module.exports?module.exports=st:t[i]=st}(window,document,"Hammer"),define("utils/ColorUtils",[],function(){function t(t){return String(t).replace(/\s+/g,"")}function e(t,e){return t<=e[0]?t=e[0]:t>=e[1]&&(t=e[1]),t}function i(t,e){if("function"!=typeof e)throw new TypeError;for(var i=t?t.length:0,n=0;i>n;n++)t[n]=e(t[n]);return t}function n(n){if(y[n]&&(n=y[n]),x[n])return x[n].slice();if(n=t(n),/^#[\da-f]{3}$/i.test(n)){n=parseInt(n.slice(1),16);var r=(3840&n)<<8,a=(240&n)<<4,o=15&n;n="#"+((1<<24)+(r<<4)+r+(a<<4)+a+(o<<4)+o).toString(16).slice(1)}var r=n.match(T);if(!r)return x[n]=b,b.slice();var s,h,l,u=[];if(r[2])s=r[2].replace("#","").split(""),l=[s[0]+s[1],s[2]+s[3],s[4]+s[5]],u=i(l,function(t){return e(parseInt(t,16),[0,255])});else if(r[4]){var c=r[4].split(",");h=c[3],l=c.slice(0,3),u=i(l,function(t){return t=Math.floor(t.indexOf("%")>0?2.55*parseInt(t,0):t),e(t,[0,255])}),"undefined"!=typeof h&&u.push(e(parseFloat(h),[0,1]))}return 3===u.length&&u.push(1),x[n]=u.slice(),u}function r(t,n){if(n=n||"rgb",t&&(3===t.length||4===t.length)){if(t=i(t,function(t){return t>1?Math.ceil(t):t}),n.indexOf("hex")>-1)return"#"+((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1);if(n.indexOf("hs")>-1){var r=i(t.slice(1,3),function(t){return t+"%"});t[1]=r[0],t[2]=r[1]}return n.indexOf("a")>-1?(3===t.length&&t.push(1),t[3]=e(t[3],[0,1]),n+"("+t.slice(0,4).join(", ")+")"):n+"("+t.slice(0,3).join(", ")+")"}}function a(t){for(var i=n(t),a=[],o=0;3>o;o++){var s=i[o];128>=s?a.push(e(s-(255-s)*(255-2*s)/(2*s),[0,255])):a.push(e(s+s*(2*s-255)/(2*(255-s)),[0,255]))}var h=[];for(o=0;3>o;o++)h.push(Math.round(.65*i[o]+.35*a[o]));return r(h,"rgb")}function o(t,e){var i=n(t);i.length=3;for(var a=0;3>a;a++)i[a]=parseInt(i[a]/e,10);return r(i,"rgb")}function s(t){var e=n(t);e.length=3;for(var i=0;2>i;i++)e[i]=parseInt(.95*e[i],10);return r(e,"rgb")}function h(t,e){var i=n(t);return i[3]=e,r(i,"rgba")}function l(t,e,i,a){var o=n(t),s=d(o[0],o[1],o[2]);s[0]+=e,s[1]+=i,s[2]+=a;var h=u(s[0],s[1],s[2]);return r(h,"rgb")}function u(t,e,i){e=Math.min(1,Math.max(0,e)),i=Math.min(1,Math.max(0,i));var n=0,r=0,a=0;if(0===e)n=r=a=255*i+.5;else{var o=6*(t-Math.floor(t)),s=o-Math.floor(o),h=i*(1-e),l=i*(1-e*s),u=i*(1-e*(1-s));switch(Math.floor(o)){case 0:n=255*i+.5,r=255*u+.5,a=255*h+.5;break;case 1:n=255*l+.5,r=255*i+.5,a=255*h+.5;break;case 2:n=255*h+.5,r=255*i+.5,a=255*u+.5;break;case 3:n=255*h+.5,r=255*l+.5,a=255*i+.5;break;case 4:n=255*u+.5,r=255*h+.5,a=255*i+.5;break;case 5:n=255*i+.5,r=255*h+.5,a=255*l+.5}}var c=[];return c.push(Math.floor(n)),c.push(Math.floor(r)),c.push(Math.floor(a)),c}function c(t,e){t=t||"blue",e=e||1;for(var i=n(t),a=d(i[0],i[1],i[2]),o=[],s=a[0],h=a[1],l=a[2],c=0;e>c;c++){var f=h*(1-c/e),p=l+c*(1-l)/e;o.push(r(u(s,f,p)))}return o}function d(t,e,i){var n,r,a,o=[3],s=t>e?t:e;i>s&&(s=i);var h=e>t?t:e;if(h>i&&(h=i),a=s/255,r=0!==s?(s-h)/s:0,0===r)n=0;else{var l=(s-t)/(s-h),u=(s-e)/(s-h),c=(s-i)/(s-h);n=t==s?c-u:e==s?2+l-c:4+u-l,n/=6,0>n&&(n+=1)}return o[0]=n,o[1]=r,o[2]=a,o}function f(t){return t&&"string"==typeof t&&-1!=t.indexOf("rgba")?n(t)[3]:1}function p(t){return t&&"string"==typeof t&&-1!=t.indexOf("rgba")?f(t):void 0}function g(t){return m(t).hex}function m(t){var e,i,a,o,s=r(n(t),"rgba"),h=/rgba?\((\d{1,3}),(\d{1,3}),(\d{1,3})(,([.\d]+))?\)/,l=s.replace(/\s+/g,"").match(h);return e=(+l[1]).toString(16),e=1===e.length?"0"+e:e,i=(+l[2]).toString(16),i=1===i.length?"0"+i:i,a=(+l[3]).toString(16),a=1===a.length?"0"+a:a,o=+(l[5]?l[5]:1),{hex:"#"+e+i+a,alpha:o}}function v(t,i){if(null==t)return{hex:t,alpha:i};null==i&&(i=1),i=e(parseFloat(i),[0,1]);var n=m(t);return null!=n.alpha&&(i*=n.alpha),{hex:n.hex,alpha:i}}function _(t){return y[t]}var y={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#0ff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000",blanchedalmond:"#ffebcd",blue:"#00f",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#0ff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#f0f",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#789",lightslategrey:"#789",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#0f0",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#f0f",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#f00",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#fff",whitesmoke:"#f5f5f5",yellow:"#ff0",yellowgreen:"#9acd32"},x={},b=[0,0,0,1],T=/^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i,A={hasColorName:_,toColor:r,hsb2rgb:u,rgb2hsb:d,createColorsWithHsb:c,getRGBAColorArray:n,mixColorWithHSB:l,getHighLightColor:a,getColorWithDivider:o,mixColorWithAlpha:h,getColorOpacity:f,getColorOpacityWithoutDefault:p,colorToHex:g,colorToHexAlpha:m,getClickColor:s,getStandardColorAndOpacity:v};return window.ColorUtils=A,A}),define("Constants",[],function(){return{BLANK_VALUE_PERCENTAGE:"\xa0\xa0",INSTANCES_KEY:"vancharts_index_",SELECT_ANIMATION:"select",CHART_HIDE:"vancharts-chart-hide",EXPORT_HIDE:"vancharts-export-hide",GEO:"geographic_co_sys",PLANE:"plane_co_sys",BUTTON:"button",CAROUSEL:"carousel",BAR_CHART:"bar",COLUMN_CHART:"column",LINE_CHART:"line",AREA_CHART:"area",PIE_CHART:"pie",MULTIPIE_CHART:"multiPie",TREEMAP_CHART:"treeMap",SCATTER_CHART:"scatter",BUBBLE_CHART:"bubble",FORCE_BUBBLE_CHART:"forceBubble",GANTT_CHART:"gantt",GAUGE_CHART:"gauge",POINTER_GAUGE:"pointer",POINTER_SEMI_GAUGE:"pointer_semi",SLOT_GAUGE:"slot",THERMOMETER_GAUGE:"thermometer",RING_GAUGE:"ring",RADAR_CHART:"radar",COLUMN_RADAR:"columnRadar",LINE_RADAR:"lineRadar",POINT_MAP:"pointMap",AREA_MAP:"areaMap",HEAT_MAP:"heatMap",LINE_MAP:"lineMap",FUNNEL_CHART:"funnel",WORD_CLOUD_CHART:"wordCloud",STRUCTURE_CHART:"structure",VANCHART:"vanchart",FULL_SCREEN_ICON:"fullScreen",EXPORT_ICON:"toImage",SORT:"sort",MENU_ICON:"vancharts-icon-menu",REFRESH_ICON:"vancharts-icon-refresh",AXIS_GROUP:"vanchart-axis-group",BOTTOM:"bottom",TOP:"top",LEFT:"left",RIGHT:"right",RIGHT_TOP:"right-top",LEFT_TO_RIGHT:"left-to-right",RIGHT_TO_LEFT:"right-to-right",BOTTOM_TO_TOP:"bottom-to-top",TOP_TO_BOTTOM:"top-to-botttom",DISORDER:"disorder",DESCENDING:"descending",ASCENDING:"ascending",CIRCLE:"circle",SQUARE:"square",DIAMOND:"diamond",TRIANGLE:"triangle",STAR:"star",CIRCLE_HOLLOW:"circle_hollow",SQUARE_HOLLOW:"square_hollow",DIAMOND_HOLLOW:"diamond_hollow",TRIANGLE_HOLLOW:"triangle_hollow",NORMAL_ICON:"normal-legend-icon",PIE_ICON:"pie-legend-icon",DONUT_ICON:"donut-legend-icon",BUBBLE_ICON:"bubble-legend-icon",SCATTER_ICON:"scatter-legend-icon",TREEMAP_ICON:"treeMap-legend-icon",DASH_TYPE:{Solid:"none",Dash:"8,6"},SAME_ARC:"sameArc",DIFFERENT_ARC:"differentArc",OUTSIDE:"outside",INSIDE:"inside",CENTER:"center",STYLE_GRADUAL:"gradual",HORIZONTAL_LAYOUT:"horizontal",VERTICAL_LAYOUT:"vertical",POLYGON_RADAR:"polygon",CIRCLE_RADAR:"circle",SIZE_BY_AREA:"area",SIZE_BY_WIDTH:"width",GRADUAL_LIGHTER:"lighter",GRADUAL_DARKER:"darker",STATE_TO_DROP:"to-drop",STATE_DROPPED:"dropped",STATE_TO_SHOW:"to-show",STATE_SHOW:"show",EXPONENTIAL:"exponential",LINEAR:"linear",LOGARITHMIC:"logarithmic",POLYNOMIAL:"polynomial"}}),define("utils/vMap",["require"],function(t){function e(t,i){if(this._=Object.create(null),t){var n=this;if(t instanceof e)t.forEach(function(t,e){n.set(t,e)});else if(Array.isArray(t)){var r,a=-1,o=t.length;if(1===arguments.length)for(;++a<o;)n.set(a,t[a]);else for(;++a<o;)n.set(i.call(t,r=t[a],a),r)}else for(var s in t)n.set(s,t[s])}}function i(t){return(t+="")===l||t[0]===u?u+t:t}function n(t){return(t+="")[0]===u?t.slice(1):t}function r(t){return i(t)in this._}function a(t){return(t=i(t))in this._&&delete this._[t]}function o(){var t=[];for(var e in this._)t.push(n(e));return t}function s(){var t=0;for(var e in this._)++t;return t}function h(){for(var t in this._)return!1;return!0}var l="__proto__",u="\x00";return e.prototype={has:r,get:function(t){return this._[i(t)]},set:function(t,e){return this._[i(t)]=e},remove:a,keys:o,values:function(){var t=[];for(var e in this._)t.push(this._[e]);return t},entries:function(){var t=[];for(var e in this._)t.push({key:n(e),value:this._[e]});return t},size:s,empty:h,forEach:function(t){for(var e in this._)t.call(this,n(e),this._[e])}},e}),define("utils/BaseUtils",["require","./ColorUtils","../Constants","./vMap"],function(require){function initConst(){if(null==utils.isMS&&(utils.isMS="Microsoft Internet Explorer"===navigator.appName||navigator.appVersion.indexOf("Trident")>-1||"Netscape"===navigator.appName&&navigator.appVersion.indexOf("Edge")>-1,utils.transPrefix="-webkit-transform"in document.body.style?"-webkit-":"-moz-transform"in document.body.style?"-moz-":"-ms-transform"in document.body.style?"-ms-":"",DIV_CONTAINER=document.createElement("div"),document.body.appendChild(DIV_CONTAINER),isSupportSVG())){var t=document.createElement("canvas");CANVAS_CTX=t.getContext("2d"),SVG_CONTAINER=document.createElementNS("http://www.w3.org/2000/svg","svg"),document.body.appendChild(SVG_CONTAINER);var e=document.createElementNS("http://www.w3.org/2000/svg","text");SVG_CONTAINER.appendChild(e),SVG_CONTAINER._textNode=e,SVG_CONTAINER.style.visibility="hidden"}}function initPaddingScale(t){SCALE=t||1}function pick(){for(var t,e=arguments.length,i=0;e>i;i++)if(t=arguments[i],"undefined"!=typeof t&&null!==t)return t;return null}function isArray(t){return"[object Array]"===Object.prototype.toString.apply(t)}function toArray(t){return Array.prototype.slice.call(t)}function setTextStyle(t,e){e=cssNormalization(e);for(var i in e)t.style(i,e[i])}function getTextDimension(t,e,i){if(null==t)return{width:0,height:0};if(i)return _getHtmlTextDim(t,e);if(!isSupportSVG())return _getHtmlTextDim(t,e,!1);var n=convertREMtoPX(e.fontSize);return!e["writing-mode"]&&n>=12?{width:_getCanvasTextWidth(t,n+"px",e),height:getTextHeight(e)}:_getSvgTextDim(t,e)}function getTextWrapDimension(t,e,i){var n=extend({"white-space":"normal",whiteSpace:"normal","word-wrap":"break-word",wordWrap:"break-word"},e);return _getHtmlTextDim(t,n,i)}function _getHtmlTextDim(t,e,i){DIV_CONTAINER.style.cssText="",DIV_CONTAINER.style.visibility="hidden",DIV_CONTAINER.style.whiteSpace="nowrap",DIV_CONTAINER.style.position="absolute",DIV_CONTAINER.style.display="";for(var n in e)"function"!=typeof e[n]&&"color"!=n&&(DIV_CONTAINER.style[n]=e[n]);i===!1?DIV_CONTAINER.textContent?DIV_CONTAINER.textContent=t:DIV_CONTAINER.innerText=t:DIV_CONTAINER.innerHTML=t;var r=DIV_CONTAINER.offsetWidth||0,a=DIV_CONTAINER.offsetHeight||0,o={width:r,height:a};return DIV_CONTAINER.style.display="none",o}function _getSvgTextDim(t,e){SVG_CONTAINER.style.display="";var i=SVG_CONTAINER._textNode;i.textContent=t,i.style.cssText="";for(var n in e)"function"!=typeof e[n]&&"color"!=n&&(i.style[n]=e[n]);var r=i.getBBox(),a={width:r.width,height:r.height};return SVG_CONTAINER.style.display="none",a}function _getCanvasTextWidth(t,e,i){if(!CANVAS_CTX)return 0;var n=i.fontStyle||"",r=i.fontWeight||"",a=i.fontFamily||"",o="italic"===n?5:0;return CANVAS_CTX.font=n+" "+r+" "+e+" "+a,CANVAS_CTX.measureText(t).width+o||0}function setDomBackground(t,e){var i=[];if(e.backgroundColor)if("string"==typeof e.backgroundColor)if(isSupportSVG())i.push("background-Color:"+e.backgroundColor);else{var n=ColorUtils.colorToHexAlpha(e.backgroundColor);i.push("background-Color:"+n.hex),i.push("filter:alpha(opacity="+100*n.alpha+")")}else if("object"==typeof e.backgroundColor){var r=e.backgroundColor,a=ColorUtils.colorToHex(r.startColor),o=ColorUtils.colorToHex(r.endColor),s="left",h="left top",l="right top",u=1;r.x1==r.x2&&(s="top",h="left top",l="left bottom",u=0),i.push("background: -ms-linear-gradient("+s+", "+a+", "+o+")"),i.push("background-image: -moz-linear-gradient("+s+", "+a+", "+o+")"),i.push("background-image: -webkit-gradient(linear, "+h+", "+l+", color-stop(0, "+a+"), color-stop(1, "+o+"))"),i.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+a+", endColorstr="+o+", GradientType="+u+")")}e.backgroundImage&&(i.push("background-image:url("+e.backgroundImage+")"),i.push("background-size:100% 100%")),null!=e.borderWidth&&(i.push("border-style:solid"),i.push("border-width:"+e.borderWidth+"px")),null!=e.borderColor&&i.push("border-color:"+e.borderColor),null!=e.borderRadius&&(i.push("border-radius:"+e.borderRadius+"px"),i.push("-moz-border-radius:"+e.borderRadius+"px"),i.push("-webkit-border-radius:"+e.borderRadius+"px"),i.push("-o-border-radius:"+e.borderRadius+"px")),e.shadow&&i.push("box-shadow:1px 1px 2px rgba(0,0,0,0.2)"),t.style.cssText+=i.join(";")+";"}function getTextHeight(t){var e=t.fontSize||"0.75rem";return convertREMtoPX(e)}function stamp(t){return t._vanchart_id=t._vanchart_id||"vancharts"+ ++lastID,t._vanchart_id}function extend(t){var e,i,n,r;for(i=1,n=arguments.length;n>i;i++){r=arguments[i];for(e in r)t[e]=r[e]}return t}function domRotate(t,e){var i=[];i.push("transform:rotate("+e+"deg)"),i.push("-ms-transform:rotate("+e+"deg)"),i.push("-webkit-transform:rotate("+e+"deg)"),i.push("-moz-transform:rotate("+e+"deg)"),i.push("-o-transform:rotate("+e+"deg)");var n=Math.cos(toRadian(e)),r=Math.sin(toRadian(e));if(!isSupportSVG()){var a=e?["progid:DXImageTransform.Microsoft.Matrix(M11=",n,", M12=",-r,", M21=",r,", M22=",n,", sizingMethod='auto expand')"].join(""):"none";i.push("filter:"+a)}t.style.cssText+=i.join(";")+";"}function splitText(t,e,i,n){if(!t)return[];t+="",n=n||0,i-=2*n;for(var r=[],a=0,o=t.length;o>a;){for(var s=a;getTextDimension(t.substring(s,a+1),e,!1).width<i&&(a++,!(a>=o)););if(s==a)return["..."];r.push(t.substring(s,a))}return r}function getTextDimensionWithRotation(t,e,i,n){var r=getTextDimension(t,e,i);return getTextDimRotated(r,n)}function getTextDimRotated(t,e){var i=Math.abs(toRadian(e||0)),n=t.width*Math.cos(i)+t.height*Math.sin(i),r=t.width*Math.sin(i)+t.height*Math.cos(i);return{width:n,height:r}}function clone(t){if("object"==typeof t&&null!==t){var e=t;if(isArray(t)){e=[];for(var i=0,n=t.length;n>i;i++)e[i]=clone(t[i])}else{e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=clone(t[r]))}return e}return t}function cssNormalization(t){var e={};for(var i in t)if(styleToCss[i]&&(e[styleToCss[i]]=t[i]),"color"==i&&(e.color=t[i]),"fontSize"==i){var n=t[i];-1!=n.indexOf("pt")&&(n=4*parseFloat(n)/3,e["font-size"]=n+"px")}return e}function reformCssArray(t){if(!(t instanceof Array))return[t,t,t,t];switch(t.length+""){case"4":return t;case"3":return[t[0],t[1],t[2],t[1]];case"2":return[t[0],t[1],t[0],t[1]];case"1":return[t[0],t[0],t[0],t[0]];case"0":return[0,0,0,0]}}function lineSubPixelOpt(t,e){return e%2===0?Math.round(t):Math.round(t-.5)+.5}function rectSubPixelOpt(){var t,e,i,n,r;return 2===arguments.length?(t=arguments[0].x,e=arguments[0].y,i=arguments[0].width,n=arguments[0].height,r=arguments[1]):(t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3],r=arguments[4]),r=r||0,t=lineSubPixelOpt(t,r),e=lineSubPixelOpt(e,r),i=Math.round(i),n=Math.round(n),{x:t,y:e,width:i,height:n}}function addArray(t,e){var i=[];if(t&&t.length)for(var n=0,r=t.length;r>n;n++)i.push(t[n]);if(e&&e.length)for(var n=0,r=e.length;r>n;n++)i.push(e[n]);return i}function toFront(t){t&&t.parentNode&&t.parentNode.appendChild(t)}function toBack(t){t&&t.parentNode&&t.parentNode.insertBefore(t,t.parentNode.firstChild)}function toFrontOfAll(t){t.ownerSVGElement.appendChild(t)}function toBackOfAll(t){t.ownerSVGElement.appendChild(t,t.ownerSVGElement.firstChild)}function containsRect(t,e){return t.x<=e.x&&t.y<=e.y&&t.x+t.width>=e.x+e.width&&t.y+t.height>=e.y+e.height}function rectangleOverlapped(t,e){if(!t||!e)return!1;var i=Math.max(t.x,e.x),n=Math.max(t.y,e.y),r=Math.min(t.x+t.width,e.x+e.width),a=Math.min(t.y+t.height,e.y+e.height);return r>=i&&a>=n}function outsideRect(t,e){return!containsRect(t,e)&&!rectangleOverlapped(t,e)}function containsPoint(t,e){if(!t||!e)return!1;var i=pick(e.x||e[0]),n=pick(e.y||e[1]);return t.x<i&&t.x+t.width>i&&t.y<n&&t.y+t.height>n}function isSupportSVG(){return!!window.SVGSVGElement}function makeValueInRange(t,e,i){var n=Math.min(t,e),r=Math.max(t,e),a=r-n;return((i-n)%a+a)%a+n}function getValueInDomain(t,e){return Math.min(Math.max(t,e[0]),e[1])}function toRadian(t){return Math.PI*(t/180)}function toDegree(t){return 180*t/Math.PI}function getFormatterFunction(formatter){if(null==formatter||""===formatter)return null;if("string"==typeof formatter){var formatterFunc=new Function("return "+formatter)();return"string"==typeof formatterFunc?(eval("var _tmpFunc = "+formatter),_tmpFunc):formatterFunc}return formatter}function format(t,e){return e=getFormatterFunction(e),"function"==typeof e?e.bind(t)(t):t}function clone(t){if(null==t||"object"!=typeof t)return t;if(t instanceof Date){var e=new Date;return e.setTime(t.getTime()),e}if(t instanceof Array){for(var e=[],i=0,n=t.length;n>i;++i)e[i]=clone(t[i]);return e}if(t instanceof String)return t+"";if(t instanceof Object){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[r]=clone(t[r]));return e}}function isEmpty(t){var e=""===t||null===t||void 0===t;return e}function isNull(t){return void 0==t||null==t}function isIE(){return window.ActiveXObject||"ActiveXObject"in window?!0:!1}function hasNotDefined(t){return null===t||void 0===t}function hasDefined(t){return!hasNotDefined(t)}function makeBounds(){var t=0,e=0,i=0,n=0;if(2===arguments.length){var r=arguments[0],a=arguments[1];t=pick(r.x,r[0]),e=pick(r.y,r[1]),i=pick(a.width,a[0]),n=pick(a.height,a[1])}else 4===arguments.length&&(t=arguments[0],e=arguments[1],i=arguments[2],n=arguments[3]);return{x:t,y:e,width:i,height:n}}function distance(t,e){var i=pick(t.x,t[0]),n=pick(t.y,t[1]),r=pick(e.x,e[0]),a=pick(e.y,e[1]),o=i-r,s=n-a;return Math.sqrt(o*o+s*s)}function isEmptyBounds(t){return t.width<=0||t.height<=0}function log(t,e){return Math.log(e)/Math.log(t)}function getOrder(t){var e=0;if(t>0&&1>t)for(;1>t;)t=accMul(t,10),e--;else if(t>=10)for(;t>=10;)t=accDiv(t,10),e++;return e}function getPercentValue(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0}function getDecimalPlaces(t){var e=(t+"").match(decimalPlacesRegExp);return e?(e[1]?e[1].length:0)+(+e[2]||0):0}function accAdd(t,e){if(t%1===0&&e%1===0)return t+e;var i=getDecimalPlaces(t),n=getDecimalPlaces(e),r=Math.pow(10,Math.max(i,n));return(Math.round(t*r)+Math.round(e*r))/r}function accDiv(t,e){if(t%1===0&&e%1===0)return t/e;var i=t+"",n=e+"",r=-getDecimalPlaces(t);r+=getDecimalPlaces(e);var a=i.replace(decimalRegExp,""),o=n.replace(decimalRegExp,"");return r>0?a/o*Math.pow(10,r):a/o/Math.pow(10,-r)}function accMul(t,e){if(t%1===0&&e%1===0)return t*e;var i=t+"",n=e+"",r=getDecimalPlaces(t);return r+=getDecimalPlaces(e),i.replace(decimalRegExp,"")*n.replace(decimalRegExp,"")/Math.pow(10,r)}function objectToArray(t){if(t.length)return[].slice.call(t);var e=[];for(var i in t)e.push(t[i]);return e}function date2int(t){if(null==t)return null;"string"==typeof t&&(t=new Date(Date.parse(t.replace(/-|\./g,"/"))));var e=new Date("1970/01/01");return"number"==typeof t?t:t.getTime()-e.getTime()}function int2date(t){var e=new Date("1970/01/01");return t=t||0,new Date(t+e.getTime())}function object2date(t){var e=t;return"string"==typeof e?e=new Date(Date.parse(e.replace(/-|\./g,"/"))):"number"==typeof e&&(e=new Date(e)),e}function makeTranslate(t){var e=pick(t.x,t[0]),i=pick(t.y,t[1]);return"translate("+e+","+i+")"}function makeTranslate3d(t){var e=pick(t.x,t[0]),i=pick(t.y,t[1]),n=pick(t.z,t[2],0);return"translate3d("+e+"px,"+i+"px,"+n+"px)"}function isImageMarker(t){var e=Constants.STAR+Constants.CIRCLE+Constants.SQUARE+Constants.DIAMOND+Constants.TRIANGLE+Constants.CIRCLE_HOLLOW+Constants.SQUARE_HOLLOW+Constants.DIAMOND_HOLLOW+Constants.TRIANGLE_HOLLOW;return-1==e.indexOf(t)&&hasDefined(t)}function isNullMarker(t){return hasNotDefined(t.symbol)}function getDefaultMarkerSymbol(t){var e=[Constants.CIRCLE,Constants.CIRCLE_HOLLOW,Constants.SQUARE,Constants.SQUARE_HOLLOW,Constants.DIAMOND,Constants.DIAMOND_HOLLOW,Constants.TRIANGLE,Constants.TRIANGLE_HOLLOW];return e[t%e.length]}function splitWords(t){return t=t.trim?t.trim():t.replace(/^\s+|\s+$/g,""),t.split(/\s+/)}function trim(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function removeEvent(t,e,i){t.removeEventListener?t.removeEventListener(e,i,!1):t.attachEvent&&t.detachEvent("on"+e,i)}function dealFloatPrecision(t){return Math.abs(t)<1e-6?0:t}function getDomWidth(t){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return((t.clientWidth||parseInt(e.width,10))-parseInt(e.paddingLeft,10)-parseInt(e.paddingRight,10)).toFixed(0)-0}function getDomHeight(t){var e=t.currentStyle||document.defaultView.getComputedStyle(t);return((t.clientHeight||parseInt(e.height,10))-parseInt(e.paddingTop,10)-parseInt(e.paddingBottom,10)).toFixed(0)-0}function hasTouch(){var t=window.document;return t&&void 0!==t.documentElement.ontouchstart}function getArcPoint(t,e){return[t*Math.sin(e),-t*Math.cos(e)]}function getArcByPoint(t,e){return(2*Math.PI-(Math.atan2(e,t)-Math.PI/2))%(2*Math.PI)}function calculateAutoMinMaxAndGap(t,e,i){t>e&&(t=0,e=100);var n=accAdd(e,-t),r=getOrder(n),a=Math.pow(10,r);0>=r?(t=accMul(t,Math.pow(10,1-r)),t=accDiv(Math.floor(t),Math.pow(10,1-r))):t=Math.floor(t/a)*a;for(var o=accMul(accDiv(i,10),a),s=0;n>s;)s=accAdd(o,s);for(var h=accDiv(s,i);e>t+h*i;)s=accAdd(o,s),h=accDiv(s,i);return s=accDiv(s,i),e=accAdd(t,accMul(s,i)),[t,e,s]}function indexOf(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}function hasChn(t){return/[\u4E00-\u9FA5]/.test(t)}function convertREMtoPX(t){return t+="",-1!=t.indexOf("rem")?(t=parseFloat(t),t*=getDefaultFontSize()):t=-1!=t.indexOf("pt")?4*parseFloat(t)/3:parseFloat(t),t}function paddingConvertWithScale(t){return Math.round(convertREMtoPX(t)*SCALE)}function getDefaultFontSize(){if(hasNotDefined(utils.defaultFontSize)){var t=document.documentElement.currentStyle||document.defaultView.getComputedStyle(document.documentElement);utils.defaultFontSize=_getDefaultFontSizeToPX(t.fontSize)}return utils.defaultFontSize}function _getDefaultFontSizeToPX(t){return-1!=t.indexOf("px")?parseFloat(t):-1!=t.indexOf("pt")?4*parseFloat(t)/3:16}function convertToREMUseDefault16PX(t){if(t){var e=t.fontSize+"";isSupportSVG()?(e=isNaN(parseFloat(e))?"0.75rem":e,-1!=e.indexOf("rem")?e=16*parseFloat(e):-1!=e.indexOf("pt")&&(e=4*parseFloat(e)/3),t.fontSize=parseFloat(e)/16+"rem"):e&&-1!=e.indexOf("rem")&&(t.fontSize=16*parseFloat(e)+"px")}return t}function toPng(t){var e=document.createElement("a"),i=document.createElement("img");e.style.display="none",e.appendChild(i),i.setAttribute("src",t),document.body.appendChild(e),e.setAttribute("target","_blank"),e.setAttribute("href",t),e.setAttribute("download","export.png"),e.click()}function getPlainText(t){return DIV_CONTAINER.style.cssText="visibility: hidden;",DIV_CONTAINER.innerHTML=t,DIV_CONTAINER.textContent?DIV_CONTAINER.textContent:DIV_CONTAINER.innerText}function computeArc(t,e,i,n,r){var a=Math.asin(r),o=Math.abs(t-i),s=Math.abs(e-n),h=Math.sqrt(o*o+s*s)/2,l=t>i?-1:1,u=l*h/Math.tan(a),c=Math.atan((e-n)/(i-t)),d=u*Math.sin(c),f=u*Math.cos(c),p=(t+i)/2,g=(e+n)/2,m=p+d,v=g+f,_=t-m,y=e-v,x=i-m,b=n-v,T=normalRadian(Math.atan2(y,_)),A=normalRadian(Math.atan2(b,x));return T>A&&(A+=DOUBLE_PI),[m,v,h/r,T,A]}function normalRadian(t){return t%=DOUBLE_PI,0>t&&(t+=DOUBLE_PI),t}function formatNum(t,e){var i=Math.pow(10,e||5);return Math.round(t*i)/i}function wrapNum(t,e,i){var n=e[1],r=e[0],a=n-r;return t===n&&i?t:((t-r)%a+a)%a+r}function bind(t,e){var i=Array.prototype.slice;if(t.bind)return t.bind.apply(t,i.call(arguments,1));var n=i.call(arguments,2);return function(){return t.apply(e,n.length?n.concat(i.call(arguments)):arguments)}}function getParamString(t,e,i){var n=[];for(var r in t)n.push(encodeURIComponent(i?r.toUpperCase():r)+"="+encodeURIComponent(t[r]));return(e&&-1!==e.indexOf("?")?"&":"?")+n.join("&")}function template(t,e){return t.replace(templateRe,function(t,i){var n=e[i];if(void 0===n)throw new Error("No value provided for variable "+t);return"function"==typeof n&&(n=n(e)),n})}function setOptions(t,e){t.hasOwnProperty("options")||(t.options=t.options?Object.create(t.options):{});for(var i in e)t.options[i]=e[i];return t.options}function createOptions(t,e){return e.forEach(function(e){if(e)for(var i in e)hasNotDefined(t[i])&&!skipKeys[i]&&(t[i]=e[i])}),t}function getPrefixed(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}function timeoutDefer(t){var e=+new Date,i=Math.max(0,16-(e-lastTime));return lastTime=e+i,window.setTimeout(t,i)}function requestAnimFrame(t,e,i){return i&&requestFn===timeoutDefer?void t.call(e):requestFn.call(window,bind(t,e))}function cancelAnimFrame(t){t&&cancelFn.call(window,t)}function throttle(t,e,i){var n,r,a,o;return o=function(){n=!1,r&&(a.apply(i,r),r=!1)},a=function(){n?r=arguments:(t.apply(i,arguments),setTimeout(o,e),n=!0)}}function rebind(t,e){for(var i,n=1,r=arguments.length;++n<r;)t[i=arguments[n]]=_rebind(t,e,e[i]);return t}function _rebind(t,e,i){return function(){var n=i.apply(e,arguments);return n===e?t:n}}function bindData(t,e,i){var n,r,a,o,s=t.length,h=e.length,l=[],u=[],c=[],d={},f=[];for(n=-1;++n<s;)a=t[n],r=i?i(a.datum()):n,
d[r]=a,f[n]=r;for(n=-1;++n<h;)o=e[n],r=i?i(o):n,a=d[r],a?a!==!0&&(a.datum(o),c.push(a)):l.push(o),d[r]=!0;for(n=-1;++n<s;)d[f[n]]!==!0&&u.push(t[n]);return{update:c,enter:l,exit:u}}function dispatch(){for(var t=new d3_dispatch,e=-1,i=arguments.length;++e<i;)t[arguments[e]]=d3_dispatch_event(t);return t}function d3_dispatch(){}function d3_dispatch_event(t){function e(){for(var e,n=i,r=-1,a=n.length;++r<a;)(e=n[r].on)&&e.apply(this,arguments);return t}var i=[],n=new vMap;return e.on=function(e,r){var a,o=n.get(e);return arguments.length<2?o&&o.on:(o&&(o.on=null,i=i.slice(0,a=i.indexOf(o)).concat(i.slice(a+1)),n.remove(e)),r&&i.push(n.set(e,{on:r})),t)},e}function falseFn(){return!1}function trueFn(){return!0}function emptyFn(){}var ColorUtils=require("./ColorUtils"),Constants=require("../Constants"),vMap=require("./vMap"),templateRe=/\{ *([\w_\-]+) *\}/g,DIV_CONTAINER,SVG_CONTAINER,CANVAS_CTX,lastID=0,DOUBLE_PI=2*Math.PI,decimalPlacesRegExp=/(?:\d+)(?:\.(\d+))?(?:[eE]-(\d+))?/,decimalRegExp=/\.|[eE]-\d+/g,skipKeys={minSize:!0,maxSize:!0},SCALE=1,styleToCss={color:"fill",font:"font",fontFamily:"font-family",fontSize:"font-size",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",letterSpacing:"letter-spacing",lineHeight:"line-height",quotes:"quotes",textAlign:"text-align",textDecoration:"text-decoration",textIndent:"text-indent",textShadow:"text-shadow",textTransform:"text-transform",whiteSpace:"white-space",wordSpacing:"word-spacing",padding:"padding"},lastTime=0,requestFn=window.requestAnimationFrame||getPrefixed("RequestAnimationFrame")||timeoutDefer,cancelFn=window.cancelAnimationFrame||getPrefixed("CancelAnimationFrame")||getPrefixed("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};d3_dispatch.prototype.on=function(t,e){var i=t.indexOf("."),n="";if(i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),t)return arguments.length<2?this[t].on(n):this[t].on(n,e);if(2===arguments.length){if(null==e)for(t in this)this.hasOwnProperty(t)&&this[t].on(n,null);return this}};var utils={dispatch:dispatch,rebind:rebind,throttle:throttle,requestAnimFrame:requestAnimFrame,cancelAnimFrame:cancelAnimFrame,getParamString:getParamString,template:template,setOptions:setOptions,createOptions:createOptions,formatNum:formatNum,wrapNum:wrapNum,bind:bind,initConst:initConst,initPaddingScale:initPaddingScale,toPng:toPng,getDomWidth:getDomWidth,getDomHeight:getDomHeight,makeTranslate:makeTranslate,makeTranslate3d:makeTranslate3d,clone:clone,date2int:date2int,int2date:int2date,object2date:object2date,log:log,getOrder:getOrder,getPercentValue:getPercentValue,accAdd:accAdd,accDiv:accDiv,accMul:accMul,dealFloatPrecision:dealFloatPrecision,isEmpty:isEmpty,isEmptyBounds:isEmptyBounds,objectToArray:objectToArray,toArray:toArray,pick:pick,isNull:isNull,getTextDimension:getTextDimension,getTextHeight:getTextHeight,splitText:splitText,getTextDimensionWithRotation:getTextDimensionWithRotation,getTextDimRotated:getTextDimRotated,isArray:isArray,indexOf:indexOf,cssNormalization:cssNormalization,reformCssArray:reformCssArray,rectSubPixelOpt:rectSubPixelOpt,lineSubPixelOpt:lineSubPixelOpt,addArray:addArray,toFront:toFront,toBack:toBack,toFrontOfAll:toFrontOfAll,toBackOfAll:toBackOfAll,containsRect:containsRect,rectangleOverlapped:rectangleOverlapped,outsideRect:outsideRect,containsPoint:containsPoint,isSupportSVG:isSupportSVG,setTextStyle:setTextStyle,domRotate:domRotate,makeValueInRange:makeValueInRange,getValueInDomain:getValueInDomain,toRadian:toRadian,toDegree:toDegree,getFormatterFunction:getFormatterFunction,format:format,isIE:isIE,hasTouch:hasTouch,hasNotDefined:hasNotDefined,hasDefined:hasDefined,distance:distance,makeBounds:makeBounds,isImageMarker:isImageMarker,isNullMarker:isNullMarker,getDefaultMarkerSymbol:getDefaultMarkerSymbol,removeEvent:removeEvent,getArcPoint:getArcPoint,getTextWrapDimension:getTextWrapDimension,stamp:stamp,splitWords:splitWords,trim:trim,extend:extend,setDomBackground:setDomBackground,getArcByPoint:getArcByPoint,calculateAutoMinMaxAndGap:calculateAutoMinMaxAndGap,hasChn:hasChn,convertREMtoPX:convertREMtoPX,paddingConvertWithScale:paddingConvertWithScale,getDefaultFontSize:getDefaultFontSize,convertToREMUseDefault16PX:convertToREMUseDefault16PX,getPlainText:getPlainText,computeArc:computeArc,normalRadian:normalRadian,bindData:bindData,falseFn:falseFn,trueFn:trueFn,emptyFn:emptyFn};return window.VanUtils=utils,utils}),define("utils/QueryUtils",["require"],function(t){function e(t,e){if(t&&t.length&&e)for(var i=0;i<t.length;i++){var n=t[i]&&t[i][e];if(void 0!=n)return n}}function i(t,e,n){for(var r in e)if(e.hasOwnProperty(r)){var a=t[r];"object"==typeof a?i(t[r],e[r],n):!n&&r in t&&void 0!=a||(t[r]=e[r])}return t}return{queryList:e,merge:i}}),define("utils/Class",["require","./QueryUtils","./BaseUtils"],function(t){function e(){}var i=(t("./QueryUtils"),t("./BaseUtils"));return e.extend=function(t){var e=function(){this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},n=e.__super__=this.prototype,r=Object.create(n);r.constructor=e,e.prototype=r;for(var a in this)this.hasOwnProperty(a)&&"prototype"!==a&&(e[a]=this[a]);return r.options&&(t.options=i.extend(Object.create(r.options),t.options)),i.extend(r,t),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;e>t;t++)r._initHooks[t].call(this)}},e},e.include=function(t){return i.extend(this.prototype,t),this},e.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this},e}),define("dom/Evented",["require","../utils/BaseUtils","../utils/Class"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/Class"),n=i.extend({on:function(t,i,n){if("object"==typeof t)for(var r in t)this._on(r,t[r],i);else{t=e.splitWords(t);for(var a=0,o=t.length;o>a;a++)this._on(t[a],i,n)}return this},off:function(t,i,n){if(t)if("object"==typeof t)for(var r in t)this._off(r,t[r],i);else{t=e.splitWords(t);for(var a=0,o=t.length;o>a;a++)this._off(t[a],i,n)}else delete this._events;return this},_on:function(t,e,i){if(t&&e){this._events=this._events||{};var n=this._events[t];n||(n=[],this._events[t]=n),i===this&&(i=void 0);for(var r={fn:e,ctx:i},a=n,o=0,s=a.length;s>o;o++)if(a[o].fn===e&&a[o].ctx===i)return;a.push(r),n.count++}},_off:function(t,i,n){var r,a,o;if(this._events&&(r=this._events[t])){if(!i){for(a=0,o=r.length;o>a;a++)r[a].fn=e.falseFn;return void delete this._events[t]}if(n===this&&(n=void 0),r)for(a=0,o=r.length;o>a;a++){var s=r[a];if(s.ctx===n&&s.fn===i)return s.fn=e.falseFn,this._firingCount&&(this._events[t]=r=r.slice()),void r.splice(a,1)}}},fire:function(t,e,i){if(!this.listens(t,i))return this;var n=e;if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var a=0,o=r.length;o>a;a++){var s=r[a];s.fn.call(s.ctx||this,n)}this._firingCount--}}return i&&this._propagateEvent(n),this},listens:function(t,e){var i=this._events&&this._events[t];if(i&&i.length)return!0;if(e)for(var n in this._eventParents)if(this._eventParents[n].listens(t,e))return!0;return!1},once:function(t,i,n){if("object"==typeof t){for(var r in t)this.once(r,t[r],i);return this}var a=e.bind(function(){this.off(t,i,n).off(t,a,n)},this);return this.on(t,i,n).on(t,a,n)},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[e.stamp(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[e.stamp(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.srcEvent.type,t,!0)}});return n}),define("ComponentLibrary",[],function(){function t(t){return n[t]}function e(t,e){n[t]=e}function i(){return n}var n=Object.create(null),r=["tooltip","tools","title","dTools","geo","rangeLegend","legend","zoom","dataSheet","xAxis","yAxis","polar","angleAxis","radiusAxis","gaugeAxis","value","category","datetime","levelBar","processes","timeAxis"];return{TOOLTIP_COMPONENT:"tooltip",TOOLBAR_COMPONENT:"tools",GEO_COMPONENT:"geo",DRILL_TOOLS:"dTools",TITLE_COMPONENT:"title",RANGE_LEGEND_COMPONENT:"rangeLegend",INTERVAL_RANGE_LEGEND:"intervalRangeLegend",GradientRangeLegend:"gradientRangeLegend",LEGEND_COMPONENT:"legend",DATA_SHEET_COMPONENT:"dataSheet",ZOOM_COMPONENT:"zoom",X_AXIS_COMPONENT:"xAxis",Y_AXIS_COMPONENT:"yAxis",POLAR_COMPONENT:"polar",RADIUS_AXIS_COMPONENT:"radiusAxis",ANGLE_AXIS_COMPONENT:"angleAxis",GAUGE_AXIS_COMPONENT:"gaugeAxis",VALUE_AXIS_COMPONENT:"value",CATEGORY_AXIS_COMPONENT:"category",DATE_AXIS_COMPONENT:"datetime",LEVELBAR:"levelBar",PROCESSES:"processes",TIMEAXIS:"timeAxis",ComponentsOrder:r,getRegisteredComponents:i,get:t,register:e}}),define("utils/BoundsManager",["require","./BaseUtils"],function(t){function e(){this.addedBounds=[]}var i=t("./BaseUtils");return e.prototype={constructor:e,addBounds:function(t){this.addedBounds.push(t)},isOverlapped:function(t){for(var e=0,n=this.addedBounds.length;n>e;e++)if(i.rectangleOverlapped(t,this.addedBounds[e]))return!0;return!1},isEmpty:function(){return 0===this.addedBounds.length}},e}),define("utils/BezierEasing",["require","./vMap"],function(t){function e(t,e){return 1-3*e+3*t}function i(t,e){return 3*e-6*t}function n(t){return 3*t}function r(t,r,a){return((e(r,a)*t+i(r,a))*t+n(r))*t}function a(t,r,a){return 3*e(r,a)*t*t+2*i(r,a)*t+n(r)}function o(t,e,i,n,a){var o,s,h=0;do s=e+(i-e)/2,o=r(s,n,a)-t,o>0?i=s:e=s;while(Math.abs(o)>C&&++h<L);return s}function s(t,e,i,n){function s(e,n){for(var o=0;T>o;++o){var s=a(n,t,i);if(0===s)return n;var h=r(n,t,i)-e;n-=h/s}return n}function h(){for(var e=0;P>e;++e)d[e]=r(e*M,t,i)}function l(e){for(var n=0,r=1,h=P-1;r!=h&&d[r]<=e;++r)n+=M;--r;var l=(e-d[r])/(d[r+1]-d[r]),u=n+l*M,c=a(u,t,i);return c>=A?s(e,u):0===c?u:o(e,n,n+M,t,i)}function u(){f=!0,(t!=e||i!=n)&&h()}if(4!==arguments.length)throw new Error("BezierEasing requires 4 arguments.");for(var c=0;4>c;++c)if("number"!=typeof arguments[c]||isNaN(arguments[c])||!isFinite(arguments[c]))throw new Error("BezierEasing arguments should be integers.");if(0>t||t>1||0>i||i>1)throw new Error("BezierEasing x values must be in [0, 1] range.");var d=w?new Float32Array(P):[],f=!1,p=function(a){return f||u(),t===e&&i===n?a:0===a?0:.001>1-a?1:r(l(a),e,n)};p.getControlPoints=function(){return[{x:t,y:e},{x:i,y:n}]};var g=[t,e,i,n],m="BezierEasing("+g+")";return p.toString=function(){return m},p}function h(t){return function(e){return 0>=e?0:e>=1?1:t(e)}}function l(t){return function(e){return 1-t(1-e)}}function u(t){return function(e){return.5*(.5>e?t(2*e):2-t(2-2*e))}}function c(t){return t*t}function d(t){return t*t*t}function f(t){return function(e){return Math.pow(e,t)}}function p(t){return 1-Math.cos(t*half\u03c0)}function g(t){return Math.pow(2,10*(t-1))}function m(t){return 1-Math.sqrt(1-t*t)}function v(t,e){var i;return arguments.length<2&&(e=.45),arguments.length?i=e/E*Math.asin(1/t):(t=1,i=e/4),function(n){return 1+t*Math.pow(2,-10*n)*Math.sin((n-i)*E/e)}}function _(t){return t||(t=1.70158),function(e){return e*e*((t+1)*e-t)}}function y(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}var x=t("./vMap"),b=this,T=4,A=.001,C=1e-7,L=10,P=11,M=1/(P-1),w="Float32Array"in b;s.css={ease:s(.25,.1,.25,1),linear:s(0,0,1,1),"ease-in":s(.42,0,1,1),"ease-out":s(0,0,.58,1),"ease-in-out":s(.42,0,.58,1),"ease-in-out-quad":s(.455,.03,.515,.955),swing:s(.02,.01,.47,1),"ease-in-quart":s(.895,.03,.685,.22),"ease-out-back":s(.175,.885,.32,1.275),"ease-out-quart":s(.165,.84,.44,1),"ease-in-quint":s(.755,.05,.855,.06),"ease-out-quint":s(.23,1,.32,1),"ease-in-quad":s(.55,.085,.68,.53),"ease-out-quad":s(.25,.46,.45,.94)};var E=2*Math.PI,S=function(t){return t},O=function(){return S},k=new x({linear:O,poly:f,quad:function(){return c},cubic:function(){return d},sin:function(){return p},exp:function(){return g},circle:function(){return m},elastic:v,back:_,bounce:function(){return y}}),D=new x({"in":S,out:l,"in-out":u,"out-in":function(t){return u(l(t))}});return s.ease=function(t){var e=t.indexOf("-"),i=e>=0?t.slice(0,e):t,n=e>=0?t.slice(e+1):"in";return i=k.get(i)||O,n=D.get(n)||S,h(n(i.apply(null,Array.prototype.slice.call(arguments,1))))},s}),define("vans/VanChartLayout",["require","../Constants","../utils/BaseUtils","../ComponentLibrary","../utils/BoundsManager","../utils/BezierEasing"],function(t){function e(t){r(t),a(t.seriesOfType(f.WORD_CLOUD_CHART)),o(t,t.seriesOfType(f.BUBBLE_CHART),f.BUBBLE_CHART),o(t,t.seriesOfType(f.SCATTER_CHART),f.SCATTER_CHART),s(t.seriesOfType(f.BUBBLE_CHART)),s(t.seriesOfType(f.FORCE_BUBBLE_CHART))}function i(t){for(var e=new m,i=0,n=t.series.length;n>i;i++){var r=t.series[i];r.visible&&(r.doLayout(),r._calculateLabelPos(e))}}function n(t){e(t),u(t)}function r(t){for(var e={},i=t.series,n=0,r=i.length;r>n;n++){var a=i[n],o=a.type;if(!a.isTreeSeries()&&o!=f.WORD_CLOUD_CHART)if(a.isSeriesAccumulated())if(a._calculatePercentage)a._calculatePercentage();else{var s=a.getTargetKey();l(a.points,s),h(a.points,s)}else a.visible&&a.points.map(function(t){var i=[o,a.stack,t.category].join("-");e[i]||(e[i]=[]),e[i].push(t)})}for(var u in e){var c=e[u],s=c[0].series.getTargetKey();l(c,s),h(c,s)}for(var n=0,r=i.length;r>n;n++){var d=i[n];d.points.forEach(function(t){d.calculateLabelInfo(t)})}}function a(t){if(t&&t.length){var e=[];t.forEach(function(t){e=e.concat(t.points)}),l(e,t[0].getTargetKey())}}function o(t,e,i){var n,r;if(i==f.BUBBLE_CHART)r="swing",n=function(t,e){return e.radius-t.radius};else if(i==f.SCATTER_CHART){var a=t.isInverted();r="exp-in-out",n=function(t,e){return a?t.posY-e.posY:t.posX-e.posX}}var o=[];e.forEach(function(t){o=o.concat(t.points)}),o.sort(n);var s=o.length;s>0&&o.forEach(function(t,e){t.delayTime=800*v.ease(r)(e/s)})}function s(t){t.forEach(function(t){t._calculateMinMax4Radius()}),t.forEach(function(t){t._calculateBubbleRadius()})}function h(t,e){if(t&&t.length)for(var i=t[0].series,n=i.options.stackByPercent,r=i.stack||n,a=i.getStackAxis(),o=a&&a.isLog()?1:0,s=o,h=o,l=0,u=t.length;u>l;l++){var c=t[l],d=c.options;if(r){var f=n?c.percentage:c.getTargetValue();f>=o?(d[e+"0"]=s,s+=f):(d[e+"0"]=h,h+=f)}else d[e+"0"]=o}}function l(t,e){var i=0;t.filter(function(t){return!t.isNull&&t.visible}).forEach(function(t){i+=Math.abs(t[e])}),i=i>0?i:1,t.forEach(function(t){var e=t.series,n=e.getTargetKey(),r=e[e.getBaseAxisType()],a=!e.stack&&r&&r.type!=g.CATEGORY_AXIS_COMPONENT;t.percentage=a?1:Math.abs(t[n])/i})}function u(t){t.bounds=t._getDefaultBounds(),g.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()},this),t.plotBounds=t.bounds,[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisClip()}),d(t),[g.Y_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisSizeAndBounds()});var e=!1;[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(i){e=t.components[i]&&t.components[i].adjustDomain4Radius()||e}),[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT,g.ZOOM_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].fixBoundsByPlot()}),[g.X_AXIS_COMPONENT,g.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].dealOnZero()}),e&&c(t),i(t)}function c(t){t.plotBounds&&(t.bounds=p.makeBounds(t.plotBounds,t.plotBounds)),t.clipPool={},t.axisSize={left:0,right:0,bottom:0,top:0},[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].reCalculateSize()}),[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisClip()}),d(t),[g.Y_AXIS_COMPONENT,g.DATA_SHEET_COMPONENT,g.X_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].updateAxisSizeAndBounds()}),[g.Y_AXIS_COMPONENT,g.X_AXIS_COMPONENT,g.ZOOM_COMPONENT,g.DATA_SHEET_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].fixBoundsByPlot()}),[g.X_AXIS_COMPONENT,g.Y_AXIS_COMPONENT].forEach(function(e){t.components[e]&&t.components[e].dealOnZero()})}function d(t){var e=t.getChartBounds(),i=t.bounds,n=i.x,r=i.y,a=i.width,o=i.height,s=Math.max(t.clipPool[f.LEFT]||0,n),h=Math.max(t.clipPool[f.RIGHT]||0,e.width-(n+a)),l=Math.max(t.clipPool[f.TOP]||0,r),u=Math.max(t.clipPool[f.BOTTOM]||0,e.height-(r+o));i={x:s,y:l,width:e.width-s-h,height:e.height-l-u},t.setPlotBounds(i)}var f=t("../Constants"),p=t("../utils/BaseUtils"),g=t("../ComponentLibrary"),m=t("../utils/BoundsManager"),v=t("../utils/BezierEasing");return{PLANE_SYSTEM_LAYOUT:n,reLayoutPlotBounds:c,calculateBubbleRadius:s,calculateSeries:e,calculateSeriesShapes:i,fixCoordinateSystem:u}}),define("ChartLibrary",["require"],function(t){function e(t){return n[t]}function i(t,e){n[t]=e}var n={};return{get:e,register:i}}),define("utils/Point2D",["require","./BaseUtils"],function(t){var e=t("./BaseUtils"),i=function(t,e,i){this.x=i?Math.round(t):t,this.y=i?Math.round(e):e};return i.prototype={clone:function(){return new i(this.x,this.y)},add:function(t){return this.clone()._add(i.create(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(i.create(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new i(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new i(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},distanceTo:function(t){t=i.create(t);var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return t=i.create(t),t.x===this.x&&t.y===this.y},contains:function(t){return t=i.create(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+e.formatNum(this.x)+", "+e.formatNum(this.y)+")"}},i.create=function(t,n,r){return t instanceof i?t:e.isArray(t)?new i(t[0],t[1]):void 0===t||null===t?t:"object"==typeof t&&"x"in t&&"y"in t?new i(t.x,t.y):new i(t,n,r)},i}),define("dom/Browser",[],function(){var t=navigator.userAgent.toLowerCase(),e=document.documentElement,i="ActiveXObject"in window,n=-1!==t.indexOf("webkit"),r=-1!==t.indexOf("phantom"),a=-1!==t.search("android [23]"),o=-1!==t.indexOf("chrome"),s=-1!==t.indexOf("gecko")&&!n&&!window.opera&&!i,h=0===navigator.platform.indexOf("Win"),l="undefined"!=typeof orientation||-1!==t.indexOf("mobile"),u=!window.PointerEvent&&window.MSPointerEvent,c=window.PointerEvent||u,d=i&&"transition"in e.style,f="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!a,p="MozPerspective"in e.style,g="OTransition"in e.style,m=!window.L_NO_TOUCH&&(c||"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch);return{ie:i,ielt9:i&&!document.addEventListener,edge:"msLaunchUri"in navigator&&!("documentMode"in document),webkit:n,gecko:s,android:-1!==t.indexOf("android"),android23:a,chrome:o,safari:!o&&-1!==t.indexOf("safari"),win:h,ie3d:d,webkit3d:f,gecko3d:p,opera12:g,any3d:(d||f||p)&&!g&&!r,mobile:l,mobileWebkit:l&&n,mobileWebkit3d:l&&f,mobileOpera:l&&window.opera,mobileGecko:l&&s,touch:!!m,msPointer:!!u,pointer:!!c,retina:(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1}}),define("dom/DomUtils",["require","../utils/BaseUtils","../utils/Point2D","./Browser"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/Point2D"),n=t("./Browser"),r={get:function(t){return"string"==typeof t?document.getElementById(t):t},getStyle:function(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i},create:function(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n},remove:function(t){var e=t.parentNode;e&&e.removeChild(t)},empty:function(t){for(;t.firstChild;)t.removeChild(t.firstChild)},toFront:function(t){t.parentNode.appendChild(t)},toBack:function(t){if(t&&t.parentNode){var e=t.parentNode;e.insertBefore(t,e.firstChild)}},hasClass:function(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=r.getClass(t);return i.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(i)},addClass:function(t,i){if(void 0!==t.classList)for(var n=e.splitWords(i),a=0,o=n.length;o>a;a++)t.classList.add(n[a]);else if(!r.hasClass(t,i)){var s=r.getClass(t);r.setClass(t,(s?s+" ":"")+i)}},removeClass:function(t,i){void 0!==t.classList?t.classList.remove(i):r.setClass(t,e.trim((" "+r.getClass(t)+" ").replace(" "+i+" "," ")))},setClass:function(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e},getClass:function(t){return void 0===t.className.baseVal?t.className:t.className.baseVal},setOpacity:function(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&r._setOpacityIE(t,e)},_setOpacityIE:function(t,e){var i=!1,n="DXImageTransform.Microsoft.Alpha";try{i=t.filters.item(n)}catch(r){if(1===e)return}e=Math.round(100*e),i?(i.Enabled=100!==e,i.Opacity=e):t.style.filter+=" progid:"+n+"(opacity="+e+")"},testProp:function(t){for(var e=document.documentElement.style,i=0;i<t.length;i++)if(t[i]in e)return t[i];return!1},setTransform:function(t,e,i){var a=e||{x:0,y:0};t.style[r.TRANSFORM]=(n.ie3d?"translate("+a.x+"px,"+a.y+"px)":"translate3d("+a.x+"px,"+a.y+"px,0)")+(i?" scale("+i+")":"")},setPosition:function(t,e){t._leaflet_pos=e,n.any3d?r.setTransform(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")},getPosition:function(t){return t._leaflet_pos||i.create({x:0,y:0})},getMousePos:function(t,e){t=t.touches?t.touches.length?t.touches[0]:t.changedTouches[0]:t;var n,r,a=document.documentElement,o=e.getBoundingClientRect(),s=o.top+(window.pageYOffset||a.scrollTop)-(a.clientTop||0),h=o.left+(window.pageXOffset||a.scrollLeft)-(a.clientLeft||0);return null==t.pageX?(n=Math.min(t.x,t.clientX-h),r=Math.min(t.y,t.clientY-s)):(n=t.pageX-h,r=t.pageY-s),i.create(n,r)},_wheelPxFactor:n.win&&n.chrome?2:n.gecko?window.devicePixelRatio:1,getWheelDelta:function(t){return n.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/r._wheelPxFactor:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0},preventDefault:function(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this},stopPropagation:function(t){return t.stopPropagation?t.stopPropagation():t.cancelBubble=!0,this},stop:function(t){return r.preventDefault(t).stopPropagation(t)},attr:function(){if(!(arguments.length<2)){var t,i,n=arguments[0],r=arguments[1],a=arguments[2];if("string"==typeof r)e.hasDefined(a)?n.setAttribute(r,a):n&&n.getAttribute&&(i=n.getAttribute(r));else if(e.hasDefined(r)&&"object"==typeof r)for(t in r)n.setAttribute(t,r[t]);return i}}};return function(){r.TRANSFORM=r.testProp(["transform","WebkitTransform","OTransform","MozTransform","msTransform"]),r.TRANSFORM_ORIGIN=r.testProp(["transformOrigin","WebkitTransformOrigin","OTransformOrigin","MozTransformOrigin","msTransformOrigin"]);var t=r.TRANSITION=r.testProp(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);r.TRANSITION_END="webkitTransition"===t||"OTransition"===t?t+"End":"transitionend"}(),r}),define("HammerHandler",["require","./utils/BaseUtils","./dom/DomUtils","./Constants","./dom/Evented","./ComponentLibrary"],function(t){var e,i=t("./utils/BaseUtils"),n=t("./dom/DomUtils"),r=t("./Constants"),a=t("./dom/Evented"),o=t("./ComponentLibrary"),s=i.hasTouch(),h=10,l=40,u=800,c=null,d=1,f=null,p=2,g=4e3,m=a.extend({initialize:function(t,a){function o(i){var o=i.srcEvent,h=i.type||o.type;h=-1!=h.indexOf("wheel")?"wheel":h;var c=o.target||o.srcElement;i.containerPoint=n.getMousePos(o,a);var d="panstart"==h||"panmove"==h||"panend"==h;s&&t.chartType()!==r.GANTT_CHART?"press"==h?l.pressed=!0:"panstart"!=h&&"panmove"!=h&&(l.pressed=!1):l.pressed=!0;var f;if(d&&l.panTarget)f=l.panTarget;else{for(;c&&((f=l._findTargetByBounds(i.containerPoint,h))||(f=t.findInteractiveTarget(c)),!(f&&f.listens(h,!1)||c===l._container));)c=c.parentNode;f=f&&f.listens(h,!1)?f:u}t.force&&!l.panTarget&&(l.forceTarget=t.force.dragFire(i,l._container)),f&&f.listens(h,!1)&&(f.fire(h,i,!0),"panstart"==h?(l.removeAllChosen(i),l.forceTarget||(l.panTarget=f)):"panend"==h&&(l.panTarget=null),s&&"tap"===h&&(clearTimeout(e),e=setTimeout(function(){l.removeAllChosen(i)},g)))}this.vanchart=t,this._container=a,this._state=null;var h=this.hammer=new Hammer.Manager(a,{_handler:this});h.add(new Hammer.Pan({threshold:0})),h.add(new Hammer.Tap),i.isSupportSVG()&&h.add(new Hammer.Press),h.on("panstart panmove panend tap press pressup",o),s||h.on("mouseover mousemove mouseout wheel",o),t.isMap()&&t._zoomEnabled()&&(h.add(new Hammer.Pinch),h.on("pinchmove",o));var l=this,u=t.isMap()?t:l;this.panTarget=null,l.on(l.getEvents())},_findTargetByBounds:function(t,e){var n=this.vanchart,a=(n.series,n.bounds),s=n.getComponent(o.LEGEND_COMPONENT),h=n.getComponent(o.RANGE_LEGEND_COMPONENT);if(s=s||h,"panstart"==e&&s&&s.bounds&&i.containsPoint(s.bounds,t))return s;if(!i.containsPoint(a,t)){var l=n.seriesOfType(r.GAUGE_CHART);if(l&&l.length)for(var u=0,c=l.length;c>u;u++){var d=l[u];if(d.bounds&&i.containsPoint(d.bounds,t))return d}}},cursor:function(t){this._container.style.cursor=t||""},onContainerMouseOver:function(t){},onContainerMouseMove:function(t){var e=this.vanchart.bounds,n=this.vanchart;n.renderer;if(n.chartType()!==r.GANTT_CHART||(n.isResizeEnabled()&&(i.containsPoint(n.resizeBounds,t.containerPoint)?(this.cursor("col-resize"),this._state=d,this.fire("resizeStart",t)):(this.cursor(),this._state=c,this.fire("resizeEnd",t))),this.fire("over",t),this._state!==d))if(i.containsPoint(e,t.containerPoint)){var a=t.srcEvent;a.target||a.srcElement;if(this.cursor(),!this._highlightShared(t)){this._removeHightlight(t);var o;if(n.isLargeMode()&&!n.hoverSeries)o=this._getCanvasClosestPoint(t.containerPoint),o&&(o._events||o.getEvents&&o.on(o.getEvents(),o),n.showTooltip(o,t),n.hoverPoint=o,o.options.click&&this.cursor("pointer"));else if(n.hoverSeries&&(o=n.hoverSeries.getClosestPoint(t.containerPoint))){if(o._events||o.getEvents&&o.on(o.getEvents(),o),o.series.defaultMarker){var s=o.series.defaultMarker;n._targets[i.stamp(s.node())]=o}o.fire("mouseover",t),o.options.click&&this.cursor("pointer")}}}else this.removeAllChosen(t)},removeAllChosen:function(t){var e=this.vanchart;this._removeHightlight(t),e.hoverPoint&&(e.hoverPoint.fire("mouseout",t),e.hoverPoint=null),e.hoverSeries&&e.hoverSeries.fire("mouseout",t);var i=e.getComponent(o.TOOLTIP_COMPONENT);i&&"vanChartMap"!==e.vanChartType&&i.immediateHide(),t&&e.cancelLegendHighlight(t.containerPoint)},_getCanvasClosestPoint:function(t){var e=this.vanchart,i=e.seriesOfType(r.BUBBLE_CHART).concat(e.seriesOfType(r.SCATTER_CHART)),n=e.isMap(),a=e.seriesOfType(r.HEAT_MAP);i=i.concat(a);for(var o=this.vanchart.bounds,s=i.length-1;s>=0;s--)for(var h=i[s],l=h.points.length-1;l>=0;l--){var u=h.points[l],c=n&&u.options.lnglat?e.latLngToContainerPoint(u.getLatLng()):{x:u.posX+o.x,y:u.posY+o.y},d=c.x-t.x,f=c.y-t.y,p=Math.sqrt(d*d+f*f),g=u.radius||u.options.marker&&u.options.marker.radius||4.5;if(g>=p&&u.visible)return u}},onContainerMouseOut:function(t){},onContainerTap:function(t){this.onContainerMouseMove(t);var e=this.vanchart.hoverPoint;e&&e.fire("tap",t)},onContainerPanStart:function(t){if(!this.forceTarget){var e=this.vanchart,n=e.renderer,a=t.containerPoint,s=e.bounds;if(e.chartType()===r.GANTT_CHART)return void(i.containsPoint(e.resizeBounds,a)?(this._state=d,this.fire("resizeStart",t)):!this._state&&i.containsPoint(e.panBounds,a)&&(this._state=p,this.fire("pan",t)));!this.selectRect&&this._supportCoordinateZoom()&&i.containsPoint(s,a)&&(this.selectRect=n.rect().style({fill:"rgb(69,114,167)","fill-opacity":.25}).add(),this.downPos=a,e.hoverPoint&&e.hoverPoint.fire("mouseout"));var h=e.getComponent(o.ZOOM_COMPONENT);this._zoomAsTarget(h,a)&&h._panStart(t,h.centerRect)}},_zoomAsTarget:function(t,e){var n=this.vanchart,r=n.bounds,a=!1,s=n.getComponent(o.DATA_SHEET_COMPONENT);return s&&(a=i.containsPoint(s.bounds,e)),a=a||i.containsPoint(r,e),t&&t.zoomToolEnabled()&&a},onContainerPanMove:function(t){var e=this.vanchart,n=(e.renderer,e.hoverPoint,e.bounds),a=e.options,s=t.containerPoint,h=this.downPos,l=e.isInverted();if(e.chartType()===r.GANTT_CHART)return void(i.containsPoint(this.vanchart.panBounds,s)&&(this._state===d?this.fire("resizeMove",t):this._state===p&&this.fire("pan",t)));if(this.selectRect){var u=a.zoom.zoomType,c=Math.min(s.x,h.x),f=Math.min(s.y,h.y),g=Math.abs(s.x-h.x),m=Math.abs(s.y-h.y),v=-1!=u.indexOf("x"),_=-1!=u.indexOf("y");l&&(v=-1!=u.indexOf("y"),_=-1!=u.indexOf("x")),v&&!_?(f=n.y,m=n.height):_&&!v&&(c=n.x,g=n.width),this.selectRect.attr({x:c,y:f,width:g,height:m})}var y=e.getComponent(o.ZOOM_COMPONENT);y&&y.zoomToolEnabled()&&y._panContainerMove(t)},onContainerPanEnd:function(t){var e=this.vanchart,n=(e.renderer,e.hoverPoint,e.bounds,e.options,t.containerPoint),a=this.downPos,s=e.components[o.TOOLBAR_COMPONENT];if(e.chartType()===r.GANTT_CHART)return void(this._state===d?(this._state=c,this.fire("resizeEnd",t)):this._state===p&&(this._state=f,this.fire("pan",t)));this.selectRect&&(i.distance(a,n)>14&&(e.clearAllEffects(),e.dealAxisZoom(a,n),s&&s.showRefreshIconWhenZoom()),this.selectRect.remove(),this.selectRect=null),this.panTarget=null;var h=e.getComponent(o.ZOOM_COMPONENT);h&&h.zoomToolEnabled()&&h._panEnd()},onContainerWheel:function(t){var e=this.vanchart;e.chartType()===r.GANTT_CHART&&i.containsPoint(e.panBounds,t.containerPoint)&&(t.srcEvent.preventDefault(),t.wheel=this.normalizeWheel(t.srcEvent),this.fire("wheelMove",t))},_highlightShared:function(t){var e=this.vanchart.getSharedAxis();if(e&&e.getPointsInCategory){var i=t.containerPoint,n=e.getPointsInCategory(i);if(n&&n.length)return n[0]._onPointMouseOver.call(n[0],t),e.drawHighlightBackground(n),!0}return!1},_removeHightlight:function(t){var e=this.vanchart,i=e.getSharedAxis(),n=e.hoverPoints;i&&i.removeHighlightBackground&&i.removeHighlightBackground(),n&&n.length&&n[0]._onPointMouseOut.call(n[0],t),e.hoverPoints=null},getEvents:function(){return{mouseover:this.onContainerMouseOver,mousemove:this.onContainerMouseMove,mouseout:this.onContainerMouseOut,tap:this.onContainerTap,panstart:this.onContainerPanStart,panmove:this.onContainerPanMove,panend:this.onContainerPanEnd,wheel:this.onContainerWheel}},_supportCoordinateZoom:function(){var t=this.vanchart.hoverPoint&&"vanChartForceBubble"==this.vanchart.vanChartType,e=this.vanchart.options;return i.isSupportSVG()&&e.zoom&&e.zoom.zoomType&&!t},destroy:function(){this.hammer.destroy()},_inZoomBar:function(t){var e=this.vanchart.getComponent(o.ZOOM_COMPONENT);return e&&e.bounds&&i.containsPoint(e.bounds,t)},preventDefault:function(t){var e=t.srcEvent,a=e.target||e.srcElement,s=n.getMousePos(e,this._container),h=this.pressed||this._inZoomBar(s),l=this.vanchart.getComponent(o.ZOOM_COMPONENT);return!h&&l&&(h=l.target||this._zoomAsTarget(l,s),h=h&&(Math.abs(t.angle)<45||Math.abs(t.angle)>135)),this.vanchart.isMap()&&(h=this.vanchart._zoomEnabled()&&"A"!=a.nodeName),
this.vanchart.chartType()===r.GANTT_CHART&&(h=i.containsPoint(this.vanchart.panBounds,s)),h?this.hammer.touchAction.setTouchActionNone():this.hammer.touchAction.recoverTouchAction(),h},normalizeWheel:function(t){var e=0,i=0,n=0,r=0;return"detail"in t&&(i=t.detail),"wheelDelta"in t&&(i=-t.wheelDelta/120),"wheelDeltaY"in t&&(i=-t.wheelDeltaY/120),"wheelDeltaX"in t&&(e=-t.wheelDeltaX/120),"axis"in t&&t.axis===t.HORIZONTAL_AXIS&&(e=i,i=0),n=e*h,r=i*h,"deltaY"in t&&(r=t.deltaY),"deltaX"in t&&(n=t.deltaX),(n||r)&&t.deltaMode&&(1===t.deltaMode?(n*=l,r*=l):(n*=u,r*=u)),n&&!e&&(e=1>n?-1:1),r&&!i&&(i=1>r?-1:1),{spinX:e,spinY:i,pixelX:n,pixelY:r}}});return m}),define("vector/Layer",["require","../dom/Evented","../utils/BaseUtils"],function(t){var e=t("../dom/Evented"),i=t("../utils/BaseUtils"),n=e.extend({options:{pane:"overlayPane",nonBubblingEvents:[]},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},beforeAdd:function(t){this._renderer=t.getMapRenderer(this)},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e)}},_reset:i.falseFn,_project:i.falseFn,_update:i.falseFn});return n}),define("utils/Bounds",["require","./Point2D"],function(t){var e=t("./Point2D"),i=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;r>n;n++)this.extend(i[n])};return i.prototype={extend:function(t){return t=e.create(t),this.min||this.max?(this.min.x=Math.min(t.x,this.min.x),this.max.x=Math.max(t.x,this.max.x),this.min.y=Math.min(t.y,this.min.y),this.max.y=Math.max(t.y,this.max.y)):(this.min=t.clone(),this.max=t.clone()),this},getCenter:function(t){return new e((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return new e(this.min.x,this.max.y)},getTopRight:function(){return new e(this.max.x,this.min.y)},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var n,r;return t="number"==typeof t[0]||t instanceof e?e.create(t):i.create(t),t instanceof i?(n=t.min,r=t.max):n=r=t,n.x>=this.min.x&&r.x<=this.max.x&&n.y>=this.min.y&&r.y<=this.max.y},intersects:function(t){t=i.create(t);var e=this.min,n=this.max,r=t.min,a=t.max,o=a.x>=e.x&&r.x<=n.x,s=a.y>=e.y&&r.y<=n.y;return o&&s},overlaps:function(t){t=i.create(t);var e=this.min,n=this.max,r=t.min,a=t.max,o=a.x>e.x&&r.x<n.x,s=a.y>e.y&&r.y<n.y;return o&&s},isValid:function(){return!(!this.min||!this.max)}},i.create=function(t,e){return!t||t instanceof i?t:new i(t,e)},i}),define("utils/Timer",["require","./BaseUtils"],function(t){function e(){var t=i(),r=n()-t;r>24?(isFinite(r)&&(clearTimeout(s),s=setTimeout(e,r)),o=0):(o=1,u(e))}function i(){var t=Date.now();for(h=r;h;)t>=h.t&&(h.f=h.c(t-h.t)),h=h.n;return t}function n(){for(var t,e=r,i=1/0;e;)e.f?e=t?t.n=e.n:r=e.n:(e.t<i&&(i=e.t),e=(t=e).n);return a=t,i}var r,a,o,s,h,l=t("./BaseUtils"),u=l.requestAnimFrame,c=function(t,i,n){var h=arguments.length;2>h&&(i=0),3>h&&(n=Date.now());var l=n+i,c={c:t,t:l,f:!1,n:null};a?a.n=c:r=c,a=c,o||(s=clearTimeout(s),o=1,u(e))};return c.flush=function(){i(),n()},c.getActiveTimer=function(){return h},c}),define("utils/Interpolator",["require","./ColorUtils"],function(t){function e(t,e){var i=typeof e;return("string"===i?p.hasColorName(e)||/^(#|rgb\(|hsl\()/.test(e)?n:r:Array.isArray(e)?s:"object"===i&&isNaN(e)?a:o)(t,e)}function i(t){return 16>t?"0"+Math.max(0,t).toString(16):Math.min(255,t).toString(16)}function n(t,e){t="none"==t||""==t?e:t,t=p.getRGBAColorArray(t),e=p.getRGBAColorArray(e);var n=t[0],r=t[1],a=t[2],o=e[0]-n,s=e[1]-r,h=e[2]-a;return function(t){return"#"+i(Math.round(n+o*t))+i(Math.round(r+s*t))+i(Math.round(a+h*t))}}function r(t,e){var i,n,r,a=g.lastIndex=m.lastIndex=0,s=-1,h=[],l=[];for(t+="",e+="";(i=g.exec(t))&&(n=m.exec(e));)(r=n.index)>a&&(r=e.slice(a,r),h[s]?h[s]+=r:h[++s]=r),(i=i[0])===(n=n[0])?h[s]?h[s]+=n:h[++s]=n:(h[++s]=null,l.push({i:s,x:o(i,n)})),a=m.lastIndex;return a<e.length&&(r=e.slice(a),h[s]?h[s]+=r:h[++s]=r),h.length<2?l[0]?(e=l[0].x,function(t){return e(t)+""}):function(){return e}:(e=l.length,function(t){for(var i,n=0;e>n;++n)h[(i=l[n]).i]=i.x(t);return h.join("")})}function a(t,i){var n,r={},a={};for(n in t)n in i?r[n]=e(t[n],i[n]):a[n]=t[n];for(n in i)n in t||(a[n]=i[n]);return function(t){for(n in r)a[n]=r[n](t);return a}}function o(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}}function s(t,i){var n,r=[],a=[],o=t.length,s=i.length,h=Math.min(t.length,i.length);for(n=0;h>n;++n)r.push(e(t[n],i[n]));for(;o>n;++n)a[n]=t[n];for(;s>n;++n)a[n]=i[n];return function(t){for(n=0;h>n;++n)a[n]=r[n](t);return a}}function h(t){var e=document.createElementNS("http://www.w3.org/2000/svg","g");return(h=function(t){if(null!=t){e.setAttribute("transform",t);var i=e.transform.baseVal.consolidate()}return new l(i?i.matrix:v)})(t)}function l(t){var e=[t.a,t.b],i=[t.c,t.d],n=c(e),r=u(e,i),a=c(d(i,e,-r))||0;e[0]*i[1]<i[0]*e[1]&&(e[0]*=-1,e[1]*=-1,n*=-1,r*=-1),this.rotate=180*(n?Math.atan2(e[1],e[0]):Math.atan2(-i[0],i[1]))/Math.PI,this.translate=[t.e,t.f],this.scale=[n,a],this.skew=a?180*Math.atan2(r,a)/Math.PI:0}function u(t,e){return t[0]*e[0]+t[1]*e[1]}function c(t){var e=Math.sqrt(u(t,t));return e&&(t[0]/=e,t[1]/=e),e}function d(t,e,i){return t[0]+=i*e[0],t[1]+=i*e[1],t}function f(t,e){var i,n=[],r=[],a=h(t),s=h(e),l=a.translate,u=s.translate,c=a.rotate,d=s.rotate,f=a.skew,p=s.skew,g=a.scale,m=s.scale;return l[0]!=u[0]||l[1]!=u[1]?(n.push("translate(",null,",",null,")"),r.push({i:1,x:o(l[0],u[0])},{i:3,x:o(l[1],u[1])})):u[0]||u[1]?n.push("translate("+u+")"):n.push(""),c!=d?(c-d>180?d+=360:d-c>180&&(c+=360),r.push({i:n.push(n.pop()+"rotate(",null,")")-2,x:o(c,d)})):d&&n.push(n.pop()+"rotate("+d+")"),f!=p?r.push({i:n.push(n.pop()+"skewX(",null,")")-2,x:o(f,p)}):p&&n.push(n.pop()+"skewX("+p+")"),g[0]!=m[0]||g[1]!=m[1]?(i=n.push(n.pop()+"scale(",null,",",null,")"),r.push({i:i-4,x:o(g[0],m[0])},{i:i-2,x:o(g[1],m[1])})):(1!==m[0]||1!==m[1])&&n.push(n.pop()+"scale("+m+")"),i=r.length,function(t){for(var e,a=-1;++a<i;)n[(e=r[a]).i]=e.x(t);return n.join("")}}var p=t("./ColorUtils"),g=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,m=new RegExp(g.source,"g");l.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var v={a:1,b:0,c:0,d:1,e:0,f:0};return e.identity=function(t){return t},e.interpolateRound=function(t,e){return e-=t,function(i){return Math.round(t+e*i)}},e.uninterpolateNumber=function(t,e){return e=(e-=t=+t)||1/e,function(i){return(i-t)/e}},e.interpolateNumber=function(t,e){return t=+t,e=+e,function(i){return t*(1-i)+e*i}},e.interpolate=e,e.interpolateRgb=n,e.interpolateTransform=f,e.interpolateArray=s,e}),define("vector/Transition",["require","../utils/BaseUtils","../utils/Timer","../utils/vMap","../utils/Interpolator","../utils/BezierEasing"],function(t){function e(t,e,i,n){var r=t.id,a=t.namespace,i=n(i);return t.elW.node()[a][r].tween.set(e,i),t}function i(t,e,i,n){var r=t[e]||(t[e]={active:0,count:0}),a=r[i];if(!a){var l=n.time;a=r[i]={tween:new h,time:l,delay:n.delay,duration:n.duration,ease:n.ease},n=null,++r.count,s(function(n){function h(e){if(r.active>i)return c();var n=r[r.active];n&&(--r.count,delete r[r.active],n.event&&n.event.interrupt.call(t)),r.active=i,a.event&&a.event.start.call(t),a.tween.forEach(function(e,i){(i=i.call(t))&&m.push(i)}),f=a.ease,d=a.duration,s(function(){return g.c=u(e||1)?o.trueFn:u,1},0,l)}function u(e){if(r.active!==i)return 1;for(var n=e/d,o=f(n),s=m.length;s>0;)m[--s].call(t,o);return n>=1?(a.event&&a.event.end.call(t),c()):void 0}function c(){return--r.count?r[i]=void 0:t[e]=void 0,1}var d,f,p=a.delay,g=s.getActiveTimer(),m=[];return g.t=p+l,n>=p?h(n-p):void(g.c=h)},0,l)}}function n(){return++d}function r(t){return null==t?"__transition__":"__transition_"+t+"__"}function a(t){return t&&(t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView)}var o=t("../utils/BaseUtils"),s=t("../utils/Timer"),h=t("../utils/vMap"),l=t("../utils/Interpolator"),u=t("../utils/BezierEasing"),c=o.isSupportSVG(),d=0,f=function(t,e,a,o){var s=n(),h=r(e);a=a||{time:Date.now(),ease:u.ease("linear"),delay:0,duration:250},this.noAnimation=o||!c,o&&(a.time=0),i(t.node(),h,s,a),this.elW=t,this.namespace=h,this.id=s};return o.extend(f.prototype,{setAnimation:function(t){for(var e in t)this[e]&&this[e](t[e]);return this},tween:function(t,e){var i=this.id,n=this.namespace,r=this.elW.node();return arguments.length<2?r[n][i].tween.get(t):(null==e?r[n][i].tween.remove(t):r[n][i].tween.set(t,e),this)},attr:function(t,i){function n(){this.removeAttribute(h)}function r(){this.removeAttributeNS(h.space,h.local)}function a(t){return null==t?n:(t+="",function(){var e,i=this.getAttribute(h);return i!==t&&(e=s(i,t),function(t){this.setAttribute(h,e(t))})})}function o(t){return null==t?r:(t+="",function(){var e,i=this.getAttributeNS(h.space,h.local);return i!==t&&(e=s(i,t),function(t){this.setAttributeNS(h.space,h.local,e(t))})})}if(arguments.length<2){for(i in t)this.attr(i,t[i]);return this}if(this.noAnimation)return this.elW.attr(t,i),this;var s="transform"==t?l.interpolateTransform:l,h=t;return e(this,"attr."+t,i,h.local?o:a)},attrTween:function(t,e){function i(t,i){var n=e.call(this,t,i,this.getAttribute(r));return n&&function(t){this.setAttribute(r,n(t))}}function n(t,i){var n=e.call(this,t,i,this.getAttributeNS(r.space,r.local));return n&&function(t){this.setAttributeNS(r.space,r.local,n(t))}}if(arguments.length<2){for(e in t)this.attrTween(e,t[e]);return this}var r=t;if(this.noAnimation){var a=e.call(this.elW.node());return this.elW.attr(r,a(1)),this}return this.tween("attr."+t,r.local?n:i)},style:function(t,i,n){function r(){this.style.removeProperty(t)}function o(e){return null==e?r:(e+="",function(){var i,r=a(this).getComputedStyle(this,null).getPropertyValue(t);return r!==e&&(i=l(r,e),function(e){this.style.setProperty(t,i(e),n)})})}var s=arguments.length;if(3>s){if("string"!=typeof t){2>s&&(i="");for(n in t)this.style(n,t[n],i);return this}n=""}return this.noAnimation?(this.elW.style(t,i),this):e(this,"style."+t,i,o)},styleTween:function(t,e,i){function n(n,r){var o=e.call(this,n,r,a(this).getComputedStyle(this,null).getPropertyValue(t));return o&&function(e){this.style.setProperty(t,o(e),i)}}if(arguments.length<3&&(i=""),this.noAnimation){var r=e.call(this.elW.node());return this.elW.style(t,r(1)),this}return this.tween("style."+t,n)},remove:function(){var t=this.namespace;return this.each("end.transition",function(){var e;this[t].count<2&&(e=this.parentNode)&&e.removeChild(this)})},each:function(t,e){var i=this.elW.node(),n=this.id,r=this.namespace,a=i[r][n];return(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(t,e),this},ease:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].ease:("function"!=typeof t&&(t=u.ease.apply(null,arguments)),n[i][e].ease=t,this)},delay:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].delay:(t=+t,n[i][e].delay=t,this)},duration:function(t){var e=this.id,i=this.namespace,n=this.elW.node();return arguments.length<1?n[i][e].duration:(t=Math.max(1,t),n[i][e].duration=t,this)},transition:function(t){var e=this.id,i=this.namespace,n=this.elW.node(),r=n[i][e];return new f(this.elW,i,{time:r.time,ease:r.ease,delay:r.delay+r.duration,duration:r.duration},this.noAnimation).setAnimation(t)},animate:function(t){return this.setAnimation(t)}}),f.d3_transitionNamespace=r,f.nextTransitionID=n,f}),define("vector/ElementWrapper",["require","../utils/Class","../dom/DomUtils","./Transition","../utils/BaseUtils"],function(t){var e=t("../utils/Class"),i=t("../dom/DomUtils"),n=t("./Transition"),r=t("../utils/BaseUtils").isArray,a=e.extend({initialize:function(t,e){return this.rawElement=t,this.renderer=e,this},node:function(){return this.rawElement},addTo:function(t){return t=t||this.renderer._container,t.append(this),this},addToBack:function(t){return t=t||this.renderer._container,t=t.node(),t.firstChild?t.insertBefore(this.node(),t.firstChild):t.appendChild(this.node()),this},add:function(){return"div"===this.type?this.addTo(this.renderer._divContainer):this.addTo(this.renderer._container)},append:function(t){return this.node().appendChild(t.node()),t},datum:function(){return arguments.length?(this._datum=arguments[0],this):this._datum},addClass:function(t){return i.addClass(this.node(),t),this},remove:function(){return i.remove(this.node()),this},removed:function(){return!(this.node().parentNode&&this.node().parentNode.tagName)},isVisible:function(){return!this.removed()&&"none"!=this.node().style.display},setType:function(t){return this.type=t,this},vRotate:function(t,e){return this.renderer.vRotate(this,t,e),this},vMiddle:function(){this.renderer.vMiddle(this)},animate:function(t){if(t){if(r(t)){for(var e=this.transition().setAnimation(t[0]),i=1,n=t.length;n>i;i++)e=e.transition(t[i]);return this.setTransitionEnd(e,t[n-1].style)}return this.setTransitionEnd(this.transition().setAnimation(t),t.style)}throw new Error("animate para empty")},setTransitionEnd:function(t,e){var i=this,n=this.renderer.vanchart;return++n.animationCount,t.each("end",function(){e&&i.style(e),n._animationStarted&&(--n.animationCount||(n.animationCount=-1,n.fire("animationEnd")))})},effectTransition:function(){return new n(this)},transition:function(t){return new n(this,t,null,!this.renderer.isAnimation)},interrupt:function(t){var e,i=this.node(),r=n.d3_transitionNamespace(t);return(e=i[r])&&e[e.active]&&(--e.count?delete e[e.active]:delete i[r],e.active+=.5),this}});return a}),define("vector/Renderer",["require","./Layer","../dom/DomUtils","../dom/Browser","../utils/Bounds","../utils/BaseUtils","./ElementWrapper"],function(t){var e=t("./Layer"),i=t("../dom/DomUtils"),n=t("../dom/Browser"),r=t("../utils/Bounds"),a=t("../utils/BaseUtils"),o=t("./ElementWrapper"),s=0,h=e.extend({initialize:function(t,e,i){this.dom=t,this.vanchart=e,this.config=i,this.isSupportSVG=a.isSupportSVG(),this.isAnimation=this.isSupportSVG&&a.pick(this.vanchart.options.plotOptions.animation,!0)},resize:function(){},remove:function(){i.remove(this._container.node()),this.off("update",this._updatePaths,this)},div:function(t){var e=new o(document.createElement("div"),this).setType("div").style({position:"absolute",left:0,top:0});return e.isHtml=t,e},vgroup:function(){var t=this.div(),e=this.group();return{divG:t,renderG:e,type:"vgroup",attr:function(){return this.divG.attr.apply(this.divG,arguments),this.renderG.attr.apply(this.renderG,arguments),this},style:function(){return this.divG.style.apply(this.divG,arguments),this.renderG.style.apply(this.renderG,arguments),this},append:function(i){return"div"===i.type&&i.isHtml?t.append(i):"vgroup"===i.type?(t.append(i.divG),e.append(i.renderG)):e.append(i),i},add:function(t){return t?this.renderG.addTo(t):this.renderG.add(),this.divG.add(),this},remove:function(){this.divG.node()&&this.divG.remove(),this.renderG.node()&&this.renderG.remove()},node:function(){return e.node()},vRotate:function(t){isNaN(t)||(this.divG.vRotate(t),this.renderG.vRotate(t))}}},vtext:function(t){return t||!this.isSupportSVG?this.div(t):this.text()},vtspan:function(t){return t||!this.isSupportSVG?this.div(t):this.tspan()},onAdd:function(){this._conatainer||(this._initContainer(),this._zoomAnimated&&i.addClass(this._container.node(),"leaflet-zoom-animated")),this.dom.appendChild(this._container.node()),this._divContainer&&this.dom.appendChild(this._divContainer.node()),this._update(),this.on("update",this._updatePaths,this)},_update:function(){var t=this.vanchart.getSize();if(this._bounds=new r([0,0],t),this._map){var e=s,i=this._map.containerPointToLayerPoint(t.multiplyBy(-e)).round();this._bounds=new r(i,i.add(t.multiplyBy(1+2*e)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_reset:function(){this._update(),this._updateTransform(this._center,this._zoom);var t=this.vanchart._layers;for(var e in t)t[e]._path&&t[e]._reset()},_onZoomEnd:function(){var t=this.vanchart._layers;for(var e in t)t[e]._path&&t[e]._project()},_updatePaths:function(){var t=this.vanchart._layers;for(var e in t)t[e]._path&&t[e]._update()},_updateTransform:function(t,e){var r=this._container.node(),o=this._map.getZoomScale(e,this._zoom),h=i.getPosition(r),l=this._map.getSize().multiplyBy(.5+s),u=this._map.project(this._center,e),c=this._map.project(t,e),d=c.subtract(u),f=l.multiplyBy(-o).add(h).add(l).subtract(d);n.any3d?i.setTransform(r,f,o):a.isSupportSVG()?i.setPosition(r,f):(r.style.left="0px",r.style.top="0px")}});return h}),define("vector/SvgRenderer",["require","./Renderer","../dom/DomUtils","../utils/BaseUtils","./ElementWrapper"],function(t){function e(t){var e,i;return e=t.match(/translate\(\s*([\d|.|e|-]+)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),e&&e.shift(),i=t.match(/rotate\(\s*([\d|.|e|-]+[degratun]*)(?:[,\s]*)([\d|.|e|-]*)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),i=i&&i[1]||0,{translate:e,rotate:i}}function i(){s||(s=!0,o.include({imageContent:function(t){return this.node().setAttributeNS("http://www.w3.org/1999/xlink","href",t),this},textContent:function(t){return"div"===this.type?this.node().innerHTML=t:this.node().textContent=t,this},attr:function(){return"div"===this.type?this.style.apply(this,arguments):r.attr.apply(null,[this.node()].concat(a.objectToArray(arguments))),this},style:function(t){var i;2===arguments.length?(i={},i[arguments[0]]=arguments[1]):i=arguments[0];var n,r=this.styles,o={},s=this.node(),h="",l=!r;if(i&&i.color&&(i.fill=i.color),i&&i.fill&&"div"===this.type&&(i.color=i.fill),r)for(n in i)i[n]!==r[n]&&(o[n]=i[n],l=!0);if(l){if("div"===this.type){var u={x:"left",y:"top",dx:"margin-left"};for(var c in u){var d;null!=(d=o[c])&&(o[u[c]]=/em/gi.test(d)?d:d+"px",delete o[c])}if(o.transform){var f=e(o.transform.replace(/px/gi,""));f.translate&&(o[a.transPrefix+"transform"]="translate("+f.translate[0]+"px,"+f.translate[1]+"px)")}}r&&(i=a.extend(r,o)),this.styles=i;var p=function(t,e){return"-"+e.toLowerCase()};for(n in i)h+=n.replace(/([A-Z])/g,p)+":"+i[n]+";";s.style.cssText=h,i.fill&&(s.style.fill=i.fill)}return this}}))}var n=t("./Renderer"),r=t("../dom/DomUtils"),a=t("../utils/BaseUtils"),o=t("./ElementWrapper"),s=!1,h=n.extend({_initContainer:function(){i(),this._container=new o(this.create("svg"),this),this.defs=new o(this.create("defs"),this).addTo(this._container),this._divContainer=this.div().style({"white-space":"nowrap","pointer-events":"none"})},resize:function(){var t=this.vanchart.width,e=this.vanchart.height;this._container.style({width:t+"px",height:e+"px"})},_update:function(){if(!(this._map&&this._map._animatingZoom&&this._bounds)){n.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container.node();this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),r.setPosition(i,t.min),this._map&&i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},line:function(t){return new o(this.create("line"),this).attr(t)},rect:function(t){return new o(this.create("rect"),this).attr(t)},circle:function(t){return new o(this.create("circle"),this).attr(t)},path:function(t){return new o(this.create("path"),this).attr(t)},text:function(t){return new o(this.create("text"),this).attr(t)},tspan:function(t){return new o(this.create("tspan"),this).attr(t)},image:function(t){return new o(this.create("image"),this).attr(t)},group:function(t){return new o(this.create("g"),this).attr(t)},colorGradient:function(t,e,i){i=i||"linearGradient";var n=new o(this.create(i),this);t.id=a.stamp(n),n.attr(t),n.stops=[];for(var r=0,s=e.length;s>r;r++)n.stops[r]=new o(this.create("stop"),this).attr(e[r]).addTo(n);return n.addTo(this.defs)},updateColorGradient:function(t,e,i){t.attr(e);for(var n=0,r=i.length;r>n;n++)t.stops[n].attr(i[n])},createClip:function(t,e){e=e||"rect";var i=new o(this.create("clipPath"),this);return i.attr("id",a.stamp(i)),i.setType(e),i[e]=new o(this.create(e),this).attr(t).addTo(i),i.addTo(this.defs),i},clip:function(t,e){t.attr("clip-path","url(#"+a.stamp(e)+")")},updateClip:function(t,e){t&&t[t.type].attr(e)},imagePattern:function(t,e,i){var n=new o(this.create("pattern"),this);return t.id=a.stamp(n),n.attr(t),n.image=new o(this.create("image"),this).addTo(n),n.image.attr(e),n.image.imageContent(i),n.image._imageUrl=i,n.addTo(this.defs),n},updateImagePattern:function(t,e,i,n){t.attr(e),t.image.attr(i),t.image._imageUrl!=n&&(t.image.imageContent(n),t.image._imageUrl=n)},createDropShadowFilter:function(t,e,i,n,r,s,h){r=r||0,s=s||0,h=h||0;var l=new o(this.create("filter"),this),u=a.stamp(l);return l.attr({id:u,x:"-50%",y:"-50%",width:"200%",height:"200%"}),this.updateDropShadowFilter(l,t,e,i,n,r,s,h),l.feBlend=l.feBlend||new o(this.create("feBlend"),this).addTo(l),l.feBlend.attr({"in":"SourceGraphic",in2:"blurOut",mode:"normal"}),l.addTo(this.defs),l},updateDropShadowFilter:function(t,e,i,n,r,a,s,h){a=a||0,s=s||0,h=h||0,t.feOffset=t.feOffset||new o(this.create("feOffset"),this).addTo(t),t.feOffset.attr({"in":"SourceGraphic",dx:e,dy:i,result:"offOut"}),t.feColorMatrix=t.feColorMatrix||new o(this.create("feColorMatrix"),this).addTo(t),t.feColorMatrix.attr({"in":"offOut",type:"matrix",values:a+" 0 0 0 0 0 "+s+" 0 0 0 0 0 "+h+" 0 0 0 0 0 "+n+" 0",result:"matrixOut"}),t.feGaussianBlur=t.feGaussianBlur||new o(this.create("feGaussianBlur"),this).addTo(t),t.feGaussianBlur.attr({"in":"matrixOut",stdDeviation:r,result:"blurOut"})},createInnerShadowFilter:function(t,e,i,n){var r=new o(this.create("filter"),this),s=a.stamp(r);return r.attr({id:s,x:"-50%",y:"-50%",width:"200%",height:"200%"}),r.feComponentTransfer=r.feComponentTransfer||new o(this.create("feComponentTransfer"),this).attr({"in":"SourceAlpha"}).addTo(r),r.feComponentTransfer.feFuncA=r.feComponentTransfer.feFuncA||new o(this.create("feFuncA"),this).attr({type:"table",tableValues:"1 0"}).addTo(r.feComponentTransfer),r.feGaussianBlur=r.feGaussianBlur||new o(this.create("feGaussianBlur"),this).addTo(r),r.feGaussianBlur.attr("stdDeviation",n),r.feOffset=r.feOffset||new o(this.create("feOffset"),this).addTo(r),r.feOffset.attr({dx:t,dy:e,result:"offsetblur"}),r.feFlood=r.feFlood||new o(this.create("feFlood"),this).addTo(r),r.feFlood.attr({"flood-color":"black","flood-opacity":i,result:"color"}),r.feComposite1=r.feComposite1||new o(this.create("feComposite"),this).attr({in2:"offsetblur",operator:"in"}).addTo(r),r.feComposite2=r.feComposite2||new o(this.create("feComposite"),this).attr({in2:"SourceAlpha",operator:"in"}).addTo(r),r.merge=r.merge||new o(this.create("feMerge"),this).addTo(r),r.merge.feMergeNode1=r.merge.feMergeNode1||new o(this.create("feMergeNode"),this).attr("in","SourceGraphic").addTo(r.merge),r.merge.feMergeNode2=r.merge.feMergeNode2||new o(this.create("feMergeNode"),this).addTo(r.merge),r.addTo(this.defs),r},create:function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},vRotate:function(t,i,n){var r,o,s,h=t.node();if("div"===t.type){o=t.styles[a.transPrefix+"transform"]||"",o&&(r=e(o.replace(/px/gi,"")),o="",r.translate&&(o="translate("+r.translate[0]+"px,"+r.translate[1]+"px) ")),s="rotate("+i+"deg)",o+=s;var l=a.transPrefix+"transform";t.styles[l]=o,h.style[l]=o}else{var u=(h.scrollWidth||h.getBBox().width)/2,c=(h.scrollHeight||h.getBBox().height)/2-1;u+=+h.getAttribute("x")||0,c+=+h.getAttribute("y")||0,o=h.getAttribute("transform")||"",o&&(r=e(o),o="",r.translate&&(o="translate("+r.translate[0]+" "+r.translate[1]+") ")),s="rotate("+i+" "+u+" "+c+")",o+=s,n||t.attr("transform",o)}return t.rotateStr=s,this},vMiddle:function(t){if("div"===t.type){var e=t.node(),i=e.offsetWidth;e.style.marginLeft=-i/2+"px"}else t.attr("text-anchor","middle");return this}});return h.include({getEvents:function(){var t=n.prototype.getEvents.call(this);return t.zoomstart=this._onZoomStart,t},_onZoomStart:function(){this._update()}}),h}),define("utils/PathUtils",["require"],function(t){function e(t){var e=/([clmz]),?([^clmz]*)/gi,i={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},n=/[ahqstv]/gi,a=h;if(String(t).match(n)&&(a=r),n=/[clmz]/g,a==h&&!String(t).match(n)){var o=String(t).replace(e,function(t,e,n){var r=[],a="m"==e.toLowerCase(),o=i[e];return n.replace(L,function(t){a&&2===r.length&&(o+=r+i["m"==e?"l":"L"],r=[]),r.push(x(t*w))}),o+r});return o}var s,l,u=a(t);o=[];for(var c=0,d=u.length;d>c;c++){s=u[c],l=u[c][0].toLowerCase(),"z"==l&&(l="x");for(var f=1,p=s.length;p>f;f++)l+=x(s[f]*w)+(f!=p-1?",":M);o.push(l)}return o.join(P)}function i(t){if(!t&&"string"!=typeof t)return null;var e={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return String(t).replace(f,function(t,n,r){var a=[],o=n.toLowerCase();if(r.replace(p,function(t,e){e&&a.push(+e)}),"m"==o&&a.length>2&&(i.push([n][g](a.splice(0,2))),o="l",n="m"==n?"l":"L"),"r"==o)i.push([n][g](a));else for(;a.length>=e[o]&&(i.push([n][g](a.splice(0,e[o]))),e[o]););}),i.toString=n,i}function n(){return this.join(",").replace(C,"$1")}function r(t,e){for(var i=h(t),n=e&&h(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},l={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},u=(function(t,e,i){var n,r,h={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in h)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][g](s[m](0,[e.x,e.y][g](t.slice(1))));break;case"S":"C"==i||"S"==i?(n=2*e.x-e.bx,r=2*e.y-e.by):(n=e.x,r=e.y),t=["C",n,r][g](t.slice(1));break;case"T":"Q"==i||"T"==i?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][g](a(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][g](a(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][g](o(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][g](o(e.x,e.y,t[1],e.y));break;case"V":t=["C"][g](o(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][g](o(e.x,e.y,e.X,e.Y))}return t}),c=function(t,e){if(t[e].length>7){t[e].shift();for(var r=t[e];r.length;)f[e]="A",n&&(p[e]="A"),t.splice(e++,0,["C"][g](r.splice(0,6)));t.splice(e,1),b=_(i.length,n&&n.length||0)}},d=function(t,e,r,a,o){t&&e&&"M"==t[o][0]&&"M"!=e[o][0]&&(e.splice(o,0,["M",a.x,a.y]),r.bx=0,r.by=0,r.x=t[o][1],r.y=t[o][2],b=_(i.length,n&&n.length||0))},f=[],p=[],v="",y="",x=0,b=Math.max(i.length,n&&n.length||0);b>x;x++){i[x]&&(v=i[x][0]),"C"!=v&&(f[x]=v,x&&(y=f[x-1])),i[x]=u(i[x],r,y),"A"!=f[x]&&"C"==v&&(f[x]="C"),c(i,x),n&&(n[x]&&(v=n[x][0]),"C"!=v&&(p[x]=v,x&&(y=p[x-1])),n[x]=u(n[x],l,y),"A"!=p[x]&&"C"==v&&(p[x]="C"),c(n,x)),d(i,n,r,l,x),d(n,i,l,r,x);var T=i[x],A=n&&n[x],C=T.length,L=n&&A.length;r.x=T[C-2],r.y=T[C-1],r.bx=parseFloat(T[C-4])||r.x,r.by=parseFloat(T[C-3])||r.y,l.bx=n&&(parseFloat(A[L-4])||l.x),l.by=n&&(parseFloat(A[L-3])||l.y),l.x=n&&A[L-2],l.y=n&&A[L-1]}return n?[i,n]:i}function a(t,e,i,n,r,a){var o=1/3,s=2/3;return[o*t+s*i,o*e+s*n,o*r+s*i,o*a+s*n,r,a]}function o(t,e,i,n){return[t,e,i,n,i,n]}function s(t,e,i,n,r,a,o,h,l,u){var c,d=120*b/180,f=b/180*(+r||0),p=[],m=function(t,e,i){var n=t*y.cos(i)-e*y.sin(i),r=t*y.sin(i)+e*y.cos(i);return{x:n,y:r}};if(u)E=u[0],S=u[1],M=u[2],w=u[3];else{c=m(t,e,-f),t=c.x,e=c.y,c=m(h,l,-f),h=c.x,l=c.y;var v=(y.cos(b/180*r),y.sin(b/180*r),(t-h)/2),_=(e-l)/2,x=v*v/(i*i)+_*_/(n*n);x>1&&(x=y.sqrt(x),i=x*i,n=x*n);var C=i*i,L=n*n,P=(a==o?-1:1)*y.sqrt(T((C*L-C*_*_-L*v*v)/(C*_*_+L*v*v))),M=P*i*_/n+(t+h)/2,w=P*-n*v/i+(e+l)/2,E=y.asin(((e-w)/n).toFixed(9)),S=y.asin(((l-w)/n).toFixed(9));E=M>t?b-E:E,S=M>h?b-S:S,0>E&&(E=2*b+E),0>S&&(S=2*b+S),o&&E>S&&(E-=2*b),!o&&S>E&&(S-=2*b)}var O=S-E;if(T(O)>d){var k=S,D=h,R=l;S=E+d*(o&&S>E?1:-1),h=M+i*y.cos(S),l=w+n*y.sin(S),p=s(h,l,i,n,r,0,o,D,R,[S,k,M,w])}O=S-E;var B=y.cos(E),I=y.sin(E),G=y.cos(S),N=y.sin(S),H=y.tan(O/4),z=4/3*i*H,U=4/3*n*H,F=[t,e],V=[t+z*I,e-U*B],W=[h+z*N,l-U*G],X=[h,l];if(V[0]=2*F[0]-V[0],V[1]=2*F[1]-V[1],u)return[V,W,X][g](p);p=[V,W,X][g](p).join()[A](",");for(var Y=[],q=0,Z=p.length;Z>q;q++)Y[q]=q%2?m(p[q-1],p[q],f).y:m(p[q],p[q+1],f).x;return Y}function h(t){if("string"==typeof t&&(t=i(t)),!t||!t.length)return[["M",0,0]];var e=[],r=0,a=0,o=0,s=0,h=0;"M"==t[0][0]&&(r=+t[0][1],a=+t[0][2],o=r,s=a,h++,e[0]=["M",r,a]);for(var u,c,d=3===t.length&&"M"===t[0][0]&&"R"===t[1][0].toUpperCase()&&"Z"===t[2][0].toUpperCase(),f=h,p=t.length;p>f;f++){if(e.push(u=[]),c=t[f],c[0]!=v.call(c[0]))switch(u[0]=v.call(c[0]),u[0]){case"A":u[1]=c[1],u[2]=c[2],u[3]=c[3],u[4]=c[4],u[5]=c[5],u[6]=+(c[6]+r),u[7]=+(c[7]+a);break;case"V":u[1]=+c[1]+a;break;case"H":u[1]=+c[1]+r;break;case"R":for(var m=[r,a][g](c.slice(1)),_=2,y=m.length;y>_;_++)m[_]=+m[_]+r,m[++_]=+m[_]+a;e.pop(),e=e[g](l(m,d));break;case"M":o=+c[1]+r,s=+c[2]+a;default:for(_=1,y=c.length;y>_;_++)u[_]=+c[_]+(_%2?r:a)}else if("R"==c[0])m=[r,a][g](c.slice(1)),e.pop(),e=e[g](l(m,d)),u=["R"][g](c.slice(-2));else for(var x=0,b=c.length;b>x;x++)u[x]=c[x];switch(u[0]){case"Z":r=o,a=s;break;case"H":r=u[1];break;case"V":a=u[1];break;case"M":o=u[u.length-2],s=u[u.length-1];default:r=u[u.length-2],a=u[u.length-1]}}return e.toString=n,e}function l(t,e){for(var i=[],n=0,r=t.length;r-2*!e>n;n+=2){var a=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?r-4==n?a[3]={x:+t[0],y:+t[1]}:r-2==n&&(a[2]={x:+t[0],y:+t[1]},a[3]={x:+t[2],y:+t[3]}):a[0]={x:+t[r-2],y:+t[r-1]}:r-4==n?a[3]=a[2]:n||(a[0]={x:+t[n],y:+t[n+1]}),i.push(["C",(-a[0].x+6*a[1].x+a[2].x)/6,(-a[0].y+6*a[1].y+a[2].y)/6,(a[1].x+6*a[2].x-a[3].x)/6,(a[1].y+6*a[2].y-a[3].y)/6,a[2].x,a[2].y])}return i}function u(t,i,n,r,a){return a?[["M",t+a,i],["l",n-2*a,0],["a",a,a,0,0,1,a,a],["l",0,r-2*a],["a",a,a,0,0,1,-a,a],["l",2*a-n,0],["a",a,a,0,0,1,-a,-a],["l",0,2*a-r],["a",a,a,0,0,1,a,-a],["z"]]:e([["M",t,i],["l",n,0],["l",0,r],["l",-n,0],["z"]])}function c(t,i,n){return e([["M",t,i],["m",0,-n],["a",n,n,0,1,1,0,2*n],["a",n,n,0,1,1,0,-2*n],["z"]])}function d(t,i,n,r){return e([["M",t,i],["L",n,r]])}var f=/([achlmrqstvz])[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029,]*((-?\d*\.?\d*(?:e[\-+]?\d+)?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*)+)/gi,p=/(-?\d*\.?\d*(?:e[\-+]?\d+)?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*,?[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029]*/gi,g="concat",m="apply",v=String.prototype.toUpperCase,_=Math.max,y=Math,x=y.round,b=y.PI,T=Math.abs,A="split",C=/,?([achlmqrstvxz]),?/gi,L=/-?\d*\.?\d+(?:[eE][\-+]?\d+)?/g,P=" ",M="",w=1;return window.tmp={path2vml:e,rectPath:u,linePath:d,circlePath:c},window.tmp}),define("vector/VmlRenderer",["require","./Renderer","../utils/PathUtils","../utils/BaseUtils","../utils/ColorUtils","./ElementWrapper","../dom/DomUtils"],function(t){function e(t){var e,i;return e=t.match(/translate\(\s*([\d|.|e|-]+)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),e&&e.shift(),i=t.match(/rotate\(\s*([\d|.|e|-]+[degratun]*)(?:[,\s]*)([\d|.|e|-]*)(?:[,\s]*)([\d|.|e|-]*)\s*\)/i),i=i&&i[1]||0,{translate:e,rotate:i}}function i(){c||(c=!0,s.include({imageContent:function(t){return this.style({src:t}),this},textContent:function(t){return"div"===this.type?this.node().innerHTML=t:this.node().textContent=t,
this},attr:function(){return"div"===this.type?this.style.apply(this,arguments):this.renderer.attr(this,arguments),this},style:function(){var t;return 2===arguments.length?(t={},t[arguments[0]]=arguments[1]):t=arguments[0],this.renderer.style(this,t),this}}))}var n=t("./Renderer"),r=t("../utils/PathUtils"),a=t("../utils/BaseUtils"),o=t("../utils/ColorUtils"),s=t("./ElementWrapper"),h=t("../dom/DomUtils"),l="position:absolute;left:0px;top:0px;width:1px;height:1px;behavior:url(#default#VML);display:inline-block;",u="position:absolute;behavior:url(#default#VML);display:inline-block;",c=!1,d=n.extend({_initContainer:function(){i();var t=this.div().style({"white-space":"nowrap",display:"inline-block"});return h.addClass(t.node(),"van-vml"),this.dom.appendChild(t.node()),this._divContainer=t,this._container=t,t},line:function(t){return this._shapeWithPath(t,"line")},rect:function(t){return this._shapeWithPath(t,"rect")},circle:function(t){return this._shapeWithPath(t,"circle")},path:function(t){return this._shapeWithPath(t,"path")},image:function(t){var e=new s(document.createElement("image"),this).setType("image");return e.attr(t),e},group:function(t){var e=this.div().style({"white-space":"nowrap","pointer-events":"none"});return e.attr(t)},colorGradient:function(t,e,i){return i=i||"linearGradient",{type:i,attrs:t,stops:e,elements:[]}},updateColorGradient:function(t,e,i){t.attrs=e,t.stops=i},_updateGradientFill:function(t,e){var i=t.node(),n=t._fill,r=e.stops,a=e.attrs;if(n){i.removeChild(n),n.on=!0,n.method="none",n.color=r[0]["stop-color"],n.color2=r[r.length-1]["stop-color"];for(var o=[],s=0,h=r.length;h>s;s++){var l=100*r[s].offset+"%";o.push(l+" "+r[s]["stop-color"])}n.type="gradient",n.angle=a.x1==a.x2?0:270,i.appendChild(n)}},textContent:function(t,e){},text:function(){return this.vtext(!1)},tspan:function(){return this.vtspan(!1)},_shapeWithPath:function(t,e){var i=new s(this.create("shape"),this).setType(e),n=i.rawElement;return n.style.cssText=l,n.coordsize="1 1",i.attr(t)},create:function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}}(),createClip:function(t,e){return e&&"rect"!=e?void 0:{x:t.x,y:t.y,width:t.width,height:t.height,clipped:[]}},_getClipStr:function(t,e){var i=e.y||0,n=e.x||0,r=n+e.width,a=i+e.height;if("div"!=t.type){var o=t.isLineChart?t.node().parentNode.firstChild:t.node();i-=o.offsetTop,a-=o.offsetTop}return"rect("+i+"px "+r+"px "+a+"px "+n+"px)"},clip:function(t,e){if(e){var i;t.node&&(i=t.node())&&(i.style.clip=this._getClipStr(t,e),e.clipped.push(t))}},updateClip:function(t,e){var i=this;t&&(a.extend(t,e),t.clipped.forEach(function(e){var n=e.node();n&&(n.style.clip=i._getClipStr(e,t))}))},imagePattern:function(t,e){},createDropShadowFilter:function(){return{}},createInnerShadowFilter:function(){return{}},attr:function(t,i){if(i&&!(i.length<=0)&&i[0]){var n={},o=t.rawElement;2===i.length?n[i[0]]=i[1]:n=i[0];var s=t.attrs,h=t.type;if(n=s?a.extend(s,n):a.extend({},n),t.attrs=n,n.transform){var l=e(n.transform);try{l.translate&&(o.style.left=l.translate[0]+"px",o.style.top=l.translate[1]+"px")}catch(u){}l.rotate}if("image"==h)o.style.position="absolute",o.style.left=n.x+"px",o.style.top=n.y+"px",o.style.width=n.width+"px",o.style.height=n.height+"px";else if("group"!=h){var c="";"rect"==h?c=r.rectPath(n.x||0,n.y||0,n.width,n.height):"line"==h?c=r.linePath(n.x1,n.y1,n.x2,n.y2):"path"==h?c=r.path2vml(n.d):"circle"==h&&(c=r.circlePath(n.cx||0,n.cy||0,n.r)),o.path=c}}},style:function(t,i){var n,r=t.styles,s={},h=t.rawElement;if(i&&i.color&&(i.fill=i.color),i&&i.fill&&"div"===t.type&&(i.color=i.fill),r)for(n in i)i[n]!==r[n]&&(s[n]=i[n]);if("div"===t.type){if(s.transform){var l=e(s.transform.replace(/px/gi,""));l.translate&&(s.transform="",s.x=l.translate[0],s.y=l.translate[1])}var c={x:"left",y:"top",dx:"margin-left"};for(var d in c){var f;null!=(f=s[d])&&(s[c[d]]=/em/gi.test(f)?f:f+"px",delete s[d])}}if(r&&(i=a.extend(r,s)),t.styles=i,"div"===t.type){var p=function(t,e){return"-"+e.toLowerCase()},g=1;if(/rgba/i.test(i.color)){var m=o.colorToHexAlpha(i.color);i.color=m.hex,g=m.alpha}a.hasDefined(i["fill-opacity"])&&(g*=i["fill-opacity"]),1>g&&(i.filter="progid:DXImageTransform.Microsoft.Alpha(Opacity="+100*g+")");var v="";for(n in i)v+=n.replace(/([A-Z])/g,p)+":"+i[n]+";";h.style.cssText=v}else if("group"!=t.type)if("image"==t.type)t.node().src=i.src;else{var _=t._stroke,y=t._fill,x=t.node();x.stroked=!0,x.filled=!!(i.fill&&"none"!=i.fill||"image"==t.type),_||(_=t._stroke=this.create("stroke"),_.style.cssText=u),x.appendChild(_),_.weight=(i["stroke-width"]||0)+"px";var b=i.stroke,T=a.hasDefined(i["stroke-opacity"])?i["stroke-opacity"]:1;if(b&&-1!=b.indexOf("rgba")&&(b=o.colorToHexAlpha(b),T*=b.alpha,b=b.hex),_.color=b,_.opacity=i["stroke-width"]?T:0,i["stroke-dasharray"]?_.dashStyle=i["stroke-dasharray"].replace(/( *, *)/g," "):_.dashStyle="","round"==i["stroke-linecap"]&&(_.endcap="round"),x.filled){y||(y=t._fill=this.create("fill"),y.style.cssText=u),x.appendChild(y);var A=i.fill,C=a.hasDefined(i["fill-opacity"])?i["fill-opacity"]:1;-1!=A.indexOf("rgba")&&(A=o.colorToHexAlpha(A),C*=A.alpha,A=A.hex),y.color=A,y.opacity=C}else y&&(x.removeChild(y),t._fill=null)}"display"in i&&(t.node().style.display=i.display),"cursor"in i&&(t.node().style.cursor=i.cursor)},vRotate:function(t,e){e%=360;var i=t.node();a.domRotate(i,0);var n=i.offsetWidth,r=i.offsetHeight;a.domRotate(i,e);var o=i.offsetWidth,s=i.offsetHeight;i.style.marginLeft=(n-o)/2+"px",i.style.marginTop=(r-s)/2+"px"},vMiddle:function(t){var e=t.node(),i=e.offsetWidth;e.style.marginLeft=-i/2+"px"}});return d}),define("chart/map/LatLng",["require","../../utils/BaseUtils"],function(t){var e=t("../../utils/BaseUtils"),i=function(t,e,i){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==i&&(this.alt=+i)};return i.prototype={equals:function(t,e){if(!t)return!1;t=i.create(t);var n=Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng));return(void 0===e?1e-9:e)>=n},toString:function(t){return"LatLng("+e.formatNum(this.lat,t)+", "+e.formatNum(this.lng,t)+")"},distanceTo:function(t){return L.CRS.Earth.distance(this,i.create(t))},wrap:function(){return L.CRS.Earth.wrapLatLng(this)},clone:function(){return new i(this.lat,this.lng,this.alt)}},i.create=function(t,n,r){return t instanceof i?t:e.isArray(t)&&"object"!=typeof t[0]?3===t.length?new i(t[0],t[1],t[2]):2===t.length?new i(t[0],t[1]):null:void 0===t||null===t?t:"object"==typeof t&&"lat"in t?new i(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===n?null:new i(t,n,r)},i}),define("chart/map/Projection",["require","../../utils/Point2D","../../utils/Bounds","./LatLng"],function(t){var e=t("../../utils/Point2D"),i=t("../../utils/Bounds"),n=t("./LatLng"),r={};return r.LonLat={project:function(t){return new e(t.lng,t.lat)},unproject:function(t){return new n(t.y,t.x)},bounds:i.create([-180,-90],[180,90])},r.SphericalMercator={R:6378137,MAX_LATITUDE:85.0511287798,project:function(t){var i=Math.PI/180,n=this.MAX_LATITUDE,r=Math.max(Math.min(n,t.lat),-n),a=Math.sin(r*i);return new e(this.R*t.lng*i,this.R*Math.log((1+a)/(1-a))/2)},unproject:function(t){var e=180/Math.PI;return new n((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:function(){var t=6378137*Math.PI;return i.create([-t,-t],[t,t])}()},r.Mercator={R:6378137,R_MINOR:6356752.314245179,bounds:i.create([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var i=Math.PI/180,n=this.R,r=t.lat*i,a=this.R_MINOR/n,o=Math.sqrt(1-a*a),s=o*Math.sin(r),h=Math.tan(Math.PI/4-r/2)/Math.pow((1-s)/(1+s),o/2);return r=-n*Math.log(Math.max(h,1e-10)),new e(t.lng*i*n,r)},unproject:function(t){for(var e,i=180/Math.PI,r=this.R,a=this.R_MINOR/r,o=Math.sqrt(1-a*a),s=Math.exp(-t.y/r),h=Math.PI/2-2*Math.atan(s),l=0,u=.1;15>l&&Math.abs(u)>1e-7;l++)e=o*Math.sin(h),e=Math.pow((1-e)/(1+e),o/2),u=Math.PI/2-2*Math.atan(s*e)-h,h+=u;return new n(h*i,t.x*i/r)}},r}),define("chart/map/Transformation",["require","../../utils/Point2D"],function(t){var e=t("../../utils/Point2D"),i=function(t,e,i,n){this._a=t,this._b=e,this._c=i,this._d=n};return i.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,i){return i=i||1,new e((t.x/i-this._b)/this._a,(t.y/i-this._d)/this._c)}},i}),define("chart/map/CRS",["require","../../utils/Bounds","./LatLng","../../utils/BaseUtils","./Projection","./Transformation"],function(t){var e=t("../../utils/Bounds"),i=(t("./LatLng"),t("../../utils/BaseUtils")),n=t("./Projection"),r=t("./Transformation"),a={latLngToPoint:function(t,e){var i=this.projection.project(t),n=this.scale(e);return this.transformation._transform(i,n)},pointToLatLng:function(t,e){var i=this.scale(e),n=this.transformation.untransform(t,i);return this.projection.unproject(n)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var i=this.projection.bounds,n=this.scale(t),r=this.transformation.transform(i.min,n),a=this.transformation.transform(i.max,n);return e.create(r,a)},infinite:!1,wrapLatLng:function(t){var n=this.wrapLng?i.wrapNum(t.lng,this.wrapLng,!0):t.lng,r=this.wrapLat?i.wrapNum(t.lat,this.wrapLat,!0):t.lat,a=t.alt;return e.create(r,n,a)}};return a.Simple=i.extend({},a,{projection:n.LonLat,transformation:new r(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0}),a.Earth=i.extend({},a,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var i=Math.PI/180,n=t.lat*i,r=e.lat*i,a=Math.sin(n)*Math.sin(r)+Math.cos(n)*Math.cos(r)*Math.cos((e.lng-t.lng)*i);return this.R*Math.acos(Math.min(a,1))}}),a.EPSG3857=i.extend({},a.Earth,{code:"EPSG:3857",projection:n.SphericalMercator,transformation:function(){var t=.5/(Math.PI*n.SphericalMercator.R);return new r(t,.5,-t,.5)}()}),a.EPSG900913=i.extend({},a.EPSG3857,{code:"EPSG:900913"}),a.EPSG4326=i.extend({},a.Earth,{code:"EPSG:4326",projection:n.LonLat,transformation:new r(1/180,1,-1/180,.5)}),a.EPSG3395=i.extend({},a.Earth,{code:"EPSG:3395",projection:n.Mercator,transformation:function(){var t=.5/(Math.PI*n.Mercator.R);return new r(t,.5,-t,.5)}()}),a}),define("theme/config",["require","../Constants","../utils/QueryUtils","../utils/BaseUtils","../chart/map/CRS","../dom/Browser"],function(t){function e(){var t={pie:{plotOptions:{rotatable:!0,startAngle:0,endAngle:360,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"inside"},tooltip:a()},options:{colors:A,style:L,legend:d()}},multiPie:{plotOptions:{borderWidth:1,borderColor:"rgb(255,255,255)",rotatable:!0,gradual:"lighter",innerRadius:0,startAngle:0,endAngle:360,drilldown:!0,tooltip:o(),dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"inside"}},options:{colors:A,legend:d()}},treeMap:{plotOptions:{borderWidth:1,borderColor:"rgb(255,255,255)",zoom:!0,tooltip:o(),dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"top"}},options:{colors:A,legend:d()}},bar:{plotOptions:{categoryGap:"20%",gap:"20%",borderRadius:0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"inside"},tooltip:i()},options:{colors:A,style:L,zoom:l(),legend:d(),xAxis:[g()],yAxis:[m()]}},column:{plotOptions:{categoryGap:"20%",gap:"20%",borderRadius:0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"inside"},tooltip:i()},options:{colors:A,style:L,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},line:{plotOptions:{large:!1,connectNulls:!1,lineWidth:2,step:!1,curve:!1,marker:{radius:4.5},dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"outside"},tooltip:i()},options:{colors:A,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},area:{plotOptions:{large:!1,connectNulls:!1,lineWidth:2,step:!1,curve:!1,marker:{radius:4.5},dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"outside"},tooltip:i(),fillColor:!0,fillColorOpacity:.15},options:{colors:A,zoom:l(),legend:d(),xAxis:[f()],yAxis:[p()]}},gauge:{thermometer:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,align:"left",style:{color:"#333333",fontSize:"0.75rem",fontFamily:"Verdana",fontWeight:"bold"},formatter:{identifier:"${PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,align:"left",style:{color:"#bababa",fontSize:"0.75rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}${VALUE}"}},needle:"#ffffff",slotBackgroundColor:"#eeeeee",thermometerLayout:"vertical"},ring:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,style:{fontSize:"1.5rem",fontFamily:"Verdana",fontWeight:"bold"},formatter:{identifier:"${PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,style:{color:"#777777",fontSize:"0.75rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}${VALUE}"}},clockwise:!1,paneBackgroundColor:"#eeeeee",innerPaneBackgroundColor:"#f4f4f4"},pointer:{layout:"horizontal",tooltip:n(),seriesLabel:{enabled:!1,align:y.BOTTOM,useHtml:!1,style:{color:"#333333",fontSize:"0.875rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}"}},valueLabel:{enabled:!1,useHtml:!1,backgroundColor:"#F5F5F7",style:{color:"#333333",fontSize:"0.6875rem",fontFamily:"Verdana"},formatter:{identifier:"${SERIES}${VALUE}"}},needle:"#E5715A",hinge:"#656B6D",hingeBackgroundColor:"#DCF2F9",paneBackgroundColor:"#FCFCFC"},slot:{layout:"horizontal",tooltip:n(),percentageLabel:{enabled:!1,useHtml:!1,style:{fontSize:"2.25rem",fontFamily:"Verdana",fontWeight:"bold",textShadow:"0px 2px 0px rgba(0,0,0,0.08)"},formatter:{identifier:"${PERCENT}"}},valueLabel:{enabled:!1,useHtml:!1,style:{color:"#666666",fontSize:"0.875rem",fontFamily:"Verdana"},formatter:{identifier:"${CATEGORY}${VALUE}"}},needle:"#ffffff",slotBackgroundColor:"#eeeeee"},options:{colors:A,legend:d(),gaugeAxis:[{type:"value",showLabel:!0,step:1,enableTick:!0,tickColor:"#BBBBBB",tickWidth:1,enableMinorTick:!0,minorTickColor:"#e2e2e2",minorTickWidth:1,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.625rem"}}]}},radar:{plotOptions:{fillColorOpacity:.15,columnType:!1,marker:{radius:4.5},lineWidth:2,shape:"circle",dataLabels:{formatter:{identifier:"${Y}"},enabled:!1,align:"outside"},tooltip:i()},options:{colors:A,polar:{},legend:d(),angleAxis:[v()],radiusAxis:[_()]}},scatter:{plotOptions:{large:!1,lineWidth:0,curve:!1,marker:{radius:4.5},opacity:1,tooltip:r(),dataLabels:{formatter:{identifier:"${X}${Y}${SIZE}"},enabled:!1,align:"outside"}},options:{colors:A,zoom:l(),legend:d(),rangeLegend:c(),xAxis:[g()],yAxis:[p()]}},bubble:{plotOptions:{large:!1,displayNegative:!0,shadow:!0,minSize:12,maxSize:60,sizeBy:"area",opacity:.7,tooltip:r(),dataLabels:{formatter:{identifier:"${X}${Y}${SIZE}"},enabled:!1,align:"inside"}},options:{colors:A,zoom:l(),rangeLegend:c(),legend:d(),xAxis:[g()],yAxis:[p()]}},funnel:{plotOptions:{borderColor:"rgb(255,255,255)",borderWidth:1,sort:!0,useSameSlantAngle:!0,dataLabels:{formatter:{identifier:"${VALUE}"},enabled:!1,connectorWidth:1,align:"outside"}},options:{colors:A,legend:d(),style:L}},wordCloud:{plotOptions:{fontFamily:"Microsoft YaHei",maxRotation:0,minRotation:0,tooltip:o(),dataLabels:{enabled:!1}},options:{colors:A,legend:d(),style:L,rangeLegend:c()}},structure:{plotOptions:{layout:"vertical",force:!0,lineColor:"rgb(156,156,156)",lineOpacity:1,borderWidth:1,borderOpacity:1,fillColorOpacity:1,tooltip:o(),dataLabels:{enabled:!1}},options:{colors:A,legend:d(),style:L,rangeLegend:c()}},forceBubble:{plotOptions:{large:!1,displayNegative:!0,shadow:!0,minSize:12,maxSize:60,sizeBy:"area",opacity:1,tooltip:i(),dataLabels:{formatter:{identifier:"{SERIES}"},enabled:!1,align:"inside"}},options:{colors:A,legend:d(),zoom:l(),rangeLegend:c()}},areaMap:{plotOptions:{nullColor:"#cccccc",opacity:.75,borderColor:"#ffffff",borderWidth:1,borderOpacity:1,tooltip:s(),dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"inside"}},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d(),dTools:{style:{fontFamily:"Microsoft Yahei",color:"#b2b2b2",fontSize:"0.75rem",fontWeight:""},currentColor:"#62b2ef",backgroundColor:"white",enabled:!1}}},pointMap:{plotOptions:{opacity:1,icon:{iconUrl:"../../doc/example/marker-icon.png",iconSize:[25,41]},dataLabels:{formatter:{identifier:"${NAME}"},enabled:!1,align:"outside"},tooltip:s()},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d(),dTools:{style:{fontFamily:"Microsoft Yahei",color:"#b2b2b2",fontSize:"0.75rem",fontWeight:""},currentColor:"#62b2ef",backgroundColor:"white",enabled:!1}}},heatMap:{plotOptions:{maxOpacity:1,minOpacity:0,radius:15,blur:.15},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d()}},lineMap:{plotOptions:{lineWidth:.5,curveness:.3,mouseOverColor:"rgb(253,221,49)",opacity:1},options:{geo:{zoom:!0},colors:A,title:h(),rangeLegend:u(),legend:d()}},gantt:{plotOptions:{newLine:!0,borderWidth:1,borderColor:"white",dataLabels:{formatter:{identifier:"${DURATION}${PROGRESS}"},enabled:!1},tooltip:i()},options:{processes:{resize:!0},levelBar:{enabled:!0},timeAxis:{zoom:!0,showWeekends:!0},colors:A,legend:d()}}};return t.MAP_CONFIG=C,t}function i(){return{formatter:{identifier:"${CATEGORY}${SERIES}${VALUE}"},enabled:!0,animation:!0,follow:!1,backgroundColor:"rgba(0,0,0,0.5)",borderColor:null,borderWidth:0,borderRadius:2,shadow:!0,hideDelay:500,shared:!1,padding:5}}function n(){return x.merge(i(),{formatter:{enabled:!1}},!0)}function r(){return x.merge(i(),{formatter:{identifier:"${SERIES}${X}${Y}${SIZE}"}},!0)}function a(){return x.merge(i(),{formatter:{identifier:"${SERIES}${VALUE}"}},!0)}function o(){return x.merge(i(),{formatter:{identifier:"${NAME}${SERIES}${VALUE}",shared:!0}},!0)}function s(){return x.merge(i(),{formatter:{identifier:"${NAME}${SERIES}${VALUE}${SIZE}",shared:!0}},!0)}function h(){return{align:"center",backgroundColor:null,borderRadius:0,floating:!1,x:0,y:0,text:null,style:{color:"#333333",fontSize:"1.375rem",fontFamily:"Verdana"},useHtml:!1}}function l(){return{zoomType:"xy",zoomTool:{enabled:!1,resize:!0}}}function u(){return{visible:!0,enabled:!0,borderColor:"#cccccc",borderWidth:0,hiddenColor:"#cccccc",hoverColor:"#293C55",style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},position:"right",floating:!1,x:0,y:0,layout:"vertical",continuous:!0,margin:10}}function c(){return x.merge(u(),{enabled:!1},!0)}function d(){return{visible:!0,enabled:!1,hiddenColor:"#cccccc",hoverColor:"#293C55",borderRadius:0,borderColor:"#cccccc",borderWidth:0,backgroundColor:null,style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},position:"right",floating:!1,layout:"vertical",x:0,y:0,shadow:!1,margin:10}}function f(){return{type:"category",position:"bottom",onZero:!1,reversed:!1,title:{text:null,align:"center",rotation:0,useHtml:!1,style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"}},lineWidth:1,lineColor:"#cccccc",showArrow:!1,enableTick:!0,enableMinorTick:!1,minorTickColor:"#cccccc",minorTickWidth:1,minorTickLength:2,tickColor:"#cccccc",tickWidth:1,tickLength:4,tickPadding:6,gridLineWidth:0,gridLineColor:"#dddddd",showLabel:!0,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},labelRotation:0,useHtml:!1}}function p(){return{type:"value",position:"left",onZero:!1,reversed:!1,title:{text:null,align:"center",rotation:0,useHtml:!1,style:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"}},lineWidth:0,lineColor:"#cccccc",showArrow:!1,enableTick:!1,enableMinorTick:!1,minorTickColor:"#cccccc",minorTickWidth:1,minorTickLength:2,tickColor:"#cccccc",tickWidth:1,tickLength:4,tickPadding:6,gridLineWidth:1,gridLineColor:"#dddddd",showLabel:!0,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},labelRotation:0,useHtml:!1}}function g(){return x.merge(f(),{type:"value"},!0)}function m(){return x.merge(p(),{type:"category"},!0)}function v(){return{type:"category",lineWidth:1,lineColor:"#cccccc",gridLineWidth:1,gridLineColor:"#dddddd",showLabel:!0,labelStyle:{color:"#666666",fontFamily:"Verdana",fontSize:"0.875rem"},labelRotation:0,useHtml:!1}}function _(){return x.merge(v(),{type:"value"},!0)}var y=t("../Constants"),x=t("../utils/QueryUtils"),b=(t("../utils/BaseUtils"),t("../chart/map/CRS")),T=t("../dom/Browser"),A=["#63b2ee","#76da91","#f8cb7f","#f89588","#7cd6cf","#9192ab","#7898e1","#efa666","#eddd86","#9987ce"],C={crs:b.EPSG3857,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:.5,zoomDelta:.5,trackResize:!0,dragging:!0,inertia:!T.android23,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0,scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60},L="gradual";return e}),define("vans/VanChartLibrary",["require","../Constants"],function(t){function e(t){return r[t]||r[n.VANCHART]}function i(t,e){r[t]=e}var n=t("../Constants"),r={};return{get:e,register:i}}),define("vans/VanChart",["require","./../utils/BaseUtils","./../utils/QueryUtils","../dom/Evented","./VanChartLayout","./../ComponentLibrary","./../ChartLibrary","./../Constants","./../HammerHandler","./../vector/SvgRenderer","./../vector/VmlRenderer","../utils/Point2D","./../theme/config","./VanChartLibrary"],function(t){var e=t("./../utils/BaseUtils"),i=t("./../utils/QueryUtils"),n=t("../dom/Evented"),r=t("./VanChartLayout"),a=t("./../ComponentLibrary"),o=t("./../ChartLibrary"),s=t("./../Constants"),h=t("./../HammerHandler"),l=t("./../vector/SvgRenderer"),u=t("./../vector/VmlRenderer"),c=t("../utils/Point2D"),d=5,f=[a.X_AXIS_COMPONENT,a.Y_AXIS_COMPONENT,a.ANGLE_AXIS_COMPONENT],p=n.extend({vanChartType:"vanChart",initialize:function(t,i,n){this.wrapDom=i,this.width=e.getDomWidth(i),this.height=e.getDomHeight(i),this.vancharts=n,this.series=[],this.components={},this._targets={},this.animationCount=0,this._changeDataState=!1,this.fullScreenChart=null,this.setOptions(t),this.handler=new h(this,i),this._initDomLayout(this.wrapDom),this.update()},setOptions:function(t){t.series=t.series||[],t.series.forEach(function(t){t.data=t.data||[]}),this._mergeThemeConfig(t),t.plotOptions.inverted&&t.dataSheet&&(t.dataSheet.enabled=!1),this.options=t,this.fullScreenChart&&this.fullScreenChart.setData(t)},_initDomLayout:function(t){this.dom=t,this.renderer=e.isSupportSVG()?new l(t,this):new u(t,this),this.renderer.onAdd(),this.on({animationStart:this._animationStart,animationEnd:this._animationEnd})},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.series.forEach(function(t){t._removeDataLabels(),t.render()}),this.animationCount||this.fire("animationEnd")},_animationEnd:function(){this.renderer&&(this._animationStarted=!1,this.series.forEach(function(t){t._animateEnd()}))},_removeChangeDataState:function(t){this._changeDataState&&(this._changeDataSeries=this._changeDataSeries||[],this._changeDataSeries.push(t),this._changeDataSeries.length>=this.series.length&&(this._changeDataState=!1,this._changeDataSeries=[]))},_needShowMoreLabel:function(){return this._changeDataState&&e.hasDefined(this.options.moreLabel)&&!this.isLargeMode()},_clearMoreLabels:function(){this.series.forEach(function(t){t._clearMoreLabels()})},_initIntermediateState:function(){this.colorMap={},this.orderMap={},this.cateMap={},this.scale=1,this.timeQueue=this.clearTimeQueue(),this.clipPool={},this.axisSize={left:0,right:0,bottom:0,top:0},this.layerMap=this.layerIndex=null},refresh:function(t){this.setOptions(t),this.update()},refreshRestore:function(){var t=this,e=t.components;f.forEach(function(i){e[i]&&t._restoreCategoryAxisBasedSeries(e[i])});var i=this.seriesOfType(s.GAUGE_CHART);i.length==this.series.length&&this.series.sort(function(t,e){return t.index-e.index}),this.seriesOfType(s.PIE_CHART).forEach(function(t){var e=t.points.map(function(t){return t.graphic}),i={};t.options.data.forEach(function(t,e){i[t.x]=e}),t.points.sort(function(t,e){return i[t.x]-i[e.x]}),t.points.forEach(function(t,i){t.graphic=e[i]})});var n=this.seriesOfType(s.MULTIPIE_CHART);n.length&&n[0].orderData(null),this.update()},orderData:function(){var t=this,e=t.components;f.forEach(function(i){e[i]&&t._orderCategoryAxisBasedSeries(e[i])});var i=this.orderType==s.ASCENDING,n=i?1:-1,r=this.seriesOfType(s.GAUGE_CHART);r.length==this.series.length&&this.series.sort(function(t,e){var i=t.getSeryTotalValue(),r=e.getSeryTotalValue();return(i-r)*n}),this.seriesOfType(s.PIE_CHART).forEach(function(t){var e=t.points.filter(function(t){return t.visible}).map(function(t){return t.graphic});t.points.sort(function(t,e){return i?t.y-e.y:e.y-t.y});var n=0;t.points.forEach(function(t){t.visible&&(t.graphic=e[n],++n)})});var o=this.seriesOfType(s.MULTIPIE_CHART);o&&o.length&&o[0].orderData(i),this.reRenderSeries(),f.concat([a.ZOOM_COMPONENT,a.DATA_SHEET_COMPONENT,a.POLAR_COMPONENT]).forEach(function(t){e[t]&&e[t].render()})},_restoreCategoryAxisBasedSeries:function(t){for(var i=0,n=t.getAxisCount();n>i;i++){var r=t.getAxis(i),a=r.series;if(r._isBaseAxis()&&r.isCategory()&&this.orderMap&&Object.keys(this.orderMap).length){var o=this.orderMap[r.componentType][i],s={};o.forEach(function(t,e){s[t]=e});for(var h=r._dataDomain,l=0,u=a.length;u>l;l++){var c=[],d=a[l],f=!0;d.points.forEach(function(t){c[e.indexOf(h,t.category)]=t.graphic,t.graphic||(f=!1)}),d.points.forEach(function(t){t.graphic=f?c[s[t.category]]:t.graphic,d.updatePointGraphic(t)})}}}},_orderCategoryAxisBasedSeries:function(t){for(var i=this.orderType==s.ASCENDING?1:-1,n=0,r=t.getAxisCount();r>n;n++){var a=t.getAxis(n);if(this.orderMap[a.componentType]=this.orderMap[a.componentType]||[],this.orderMap[a.componentType][n]||(this.orderMap[a.componentType][n]=a._dataDomain),a._isBaseAxis()&&a.isCategory()){for(var o=a.series,h=[],l=o[0].points,u=0,c=l.length;c>u;u++){var d=l[u],f=0;d.points.forEach(function(t){t.visible&&t.series.visible&&(f+=Math.abs(t.getTargetValue()))}),h.push({key:d.category,value:f})}h.sort(function(t,e){return(t.value-e.value)*i});var p={},g=[];h.forEach(function(t,e){p[t.key]=e,g.push(t.key)});for(var m=a.getOriginalCategories(),u=0,c=o.length;c>u;u++){var v=[],_=o[u],y=!0;_.points.forEach(function(t){v[e.indexOf(m,t.category)]=t.graphic,t.graphic||(y=!1)}),_.points.forEach(function(t){t.graphic=y?v[p[t.category]]:t.graphic,_.updatePointGraphic(t)})}a.setCategories(g)}}},update:function(){this.series=this.layerMap&&this.layerMap.length?this.layerMap[0].series:this.series,this._initIntermediateState();for(var t,i,n=this.options,r=this,h=n.series,l=n.chartType,u=a.getRegisteredComponents(),c=a.ComponentsOrder,d=0,f=c.length;f>d;d++){if(t=c[d],i=u[t],t==a.RANGE_LEGEND_COMPONENT&&n[t]){var p=n[t].continuous?a.GradientRangeLegend:a.INTERVAL_RANGE_LEGEND;this.components[t]&&this.components[t].type!=p&&(this.components[t].remove(),this.components[t]=null),i=a.get(p)}if(i){var g=n[t]&&(e.hasNotDefined(n[t].enabled)||n[t].enabled);g||t!=a.TOOLBAR_COMPONENT||(g=!0,n[t]={enabled:!0,hidden:!1}),n[t]&&g?this.components[t]?this.components[t].refresh(n[t],r):this.components[t]=new i(n[t],t,r):this.components[t]&&(this.components[t].remove(),this.components[t]=null,delete this.components[t])}}var m,v={},_=[];r.series.forEach(function(t){m=t.type,m==s.GAUGE_CHART&&(m+=t.gaugeType+(t.options.thermometerLayout||"")),m==s.RADAR_CHART&&(m=t.columnType?s.COLUMN_RADAR:s.LINE_RADAR),v[t.name+m]=t}),h.forEach(function(t,i){m=t.type||l;var a=e.pick(t.name,"Series"+i),h=o.get(m),u=a+m;if(m==s.GAUGE_CHART){var c=t.style||n.plotOptions.style,d=t.thermometerLayout||n.plotOptions.thermometerLayout||"";h=o.get(c),u=a+m+c+d}else if(m==s.RADAR_CHART){var f=t.columnType||n.plotOptions.columnType;f=f?s.COLUMN_RADAR:s.LINE_RADAR,h=o.get(f),u=a+f}var p=v[u];p=p?p.refresh(t,i):new h(t,r,i),_.push(p),v[u]=null});for(var y in v)v[y]&&v[y].remove();r.series=_;var x=this.components[a.GAUGE_AXIS_COMPONENT];x&&x.initAttributesWithSeries();var b=this.components[a.RANGE_LEGEND_COMPONENT];b&&b.initAttributesWithSeries(),_.forEach(function(t){if(t.type!==s.LINE_MAP||!t.options.large)for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),r.layoutComponentsAndCharts()},layoutComponentsAndCharts:function(){this.hoverPoint=this.hoverSeries=null,r.PLANE_SYSTEM_LAYOUT(this),this.render()},_getDefaultBounds:function(){var t=this.options&&this.options.padding||d,i=this.options&&this.options.borderWidth||0;return t=i+t,e.makeBounds(t,t,Math.max(this.width-2*t,0),Math.max(this.height-2*t,0))},reRenderWholePlot:function(){r.reLayoutPlotBounds(this),r.calculateSeries(this),r.calculateSeriesShapes(this),this.render()},dealAxisZoom:function(t,e){var i=this.options.zoom.zoomType,n=this.components.xAxis,r=this.components.yAxis;n&&-1!==i.indexOf("x")&&n.axisZoom(t,e),r&&-1!==i.indexOf("y")&&r.axisZoom(t,e),this.reRenderWholePlot()},clearAllEffects:function(){this.series.forEach(function(t){t.points.forEach(function(t){t.clearPointEffect()})})},_calculateZoomParas:function(t,e){var i=this.bounds,n=Math.min(t.x,e.x)-i.x,r=Math.min(t.y,e.y)-i.y,a=Math.abs(t.x-e.x),o=Math.abs(t.y-e.y),s=Math.min(i.width/a,i.height/o),h=i.width/s,l=i.height/s,u=(i.width-h)/2-n,c=(i.height-l)/2-r;return{shiftX:u,shiftY:c,scale:s}},_mergeThemeConfig:function(n){var r=t("./../theme/config")(),a={};n.series.forEach(function(t){var o=t.type||n.chartType,h=r[o].plotOptions;if(o==s.GAUGE_CHART){var l=t.style||n.plotOptions.gauge&&n.plotOptions.gauge.style||n.plotOptions.style;l="pointer_semi"==l?"pointer":l,h=r.gauge[l];var u=["seriesLabel","valueLabel","percentageLabel"];u.forEach(function(n){e.hasDefined(t[n])&&i.merge(t[n],h[n],!1)})}a[o]||(a[o]=!0,i.merge(n,r[o].options,!1),n.plotOptions[o]?n.plotOptions[o]=i.merge(n.plotOptions[o],h,!1):n.plotOptions=i.merge(n.plotOptions,h,!1))}),this.isMap()&&(n.xAxis=n.yAxis=n.zoom=void 0,e.extend(n,r.MAP_CONFIG)),n.chartType==s.RADAR_CHART&&(n.polar=n.polar||{}),n.tooltip=n.tooltip||{}},getChartMinMaxValue:function(){var t=Number.MAX_VALUE,e=-t;return this.series.forEach(function(i){i.points.filter(function(t){return!t.isNull&&!isNaN(t.getTargetValue())}).forEach(function(i){var n=i.getTargetValue();e=Math.max(e,n),t=Math.min(t,n)})}),t>e&&(t=0,e=100),[t,e]},getParentDom:function(){return this.dom},getDivParentDom:function(){return this.wrapDom},isInverted:function(){return!!this.options.plotOptions.inverted},setPlotBounds:function(t){this.bounds=t},getPlotClipBounds:function(){var t=0,e=0,i=this.bounds.width,n=this.bounds.height,r={},a=[];return this.components.xAxis&&(a=a.concat(this.components.xAxis._axisList)),this.components.yAxis&&(a=a.concat(this.components.yAxis._axisList)),a.forEach(function(t){var e=t.getPosition();t.isOnZero()||r[e]||(r[e]=t.getLineWidth())}),e=r[s.TOP]?Math.ceil(r[s.TOP]/2):0,n-=e,n=r[s.BOTTOM]?n-Math.ceil(r[s.BOTTOM]/2-.5):n,t=r[s.LEFT]?Math.ceil(r[s.LEFT]/2):0,i-=t,i=r[s.RIGHT]?i-Math.ceil(r[s.RIGHT]/2):i,{x:t+this.bounds.x,y:e+this.bounds.y,width:Math.max(i+1,0),height:Math.max(n+1,0)}},getChartBounds:function(){return e.makeBounds(0,0,this.width,this.height)},xAxis:function(t){t||(t=0);var e=this.components.xAxis;return e?e.getAxis(t):null},yAxis:function(t){t||(t=0);var e=this.components.yAxis;return e?e.getAxis(t):null},polar:function(t){t||(t=0);var e=this.components.polar;return e?e.getAxis(t):null},angleAxis:function(t){t||(t=0);var e=this.components.angleAxis;return e?e.getAxis(t):null},radiusAxis:function(t){t||(t=0);var e=this.components.radiusAxis;
return e?e.getAxis(t):null},gaugeAxis:function(t){t||(t=0);var e=this.components.gaugeAxis;return e?e.getAxis(t):null},getSharedAxis:function(){for(var t=[this.xAxis(),this.yAxis(),this.angleAxis()],e=0;e<t.length;e++){var i=t[e];if(i&&i.isCategory())return i}return null},getComponent:function(t){return this.components[t]},setComponent:function(t,e){this.components[e]=t},getDefaultSeriesColor:function(t){if(t+="",!this.colorMap[t]){var e=this.options.colors,i=0;for(var n in this.colorMap)++i;this.colorMap[t]=e[i%e.length]}return this.colorMap[t]},registerPointsPara:function(t){if(e.hasDefined(t.category)){var i=this.cateMap;return i[t.category]=i[t.category]||[],i[t.category].push(t),i[t.category]}},getValidPointsPara:function(t){var e=this.cateMap[t]||[];return e.filter(function(t){return t.isVisible()&&t.options.tooltip&&t.options.tooltip.shared})},getSharedPoints:function(t){var e=this.cateMap[t]||[];return e&&e.length?e.filter(function(t){return t.options.tooltip&&t.options.tooltip.shared}):[]},showTooltip:function(t,e,i){this.handler.selectRect||this.components[a.TOOLTIP_COMPONENT].showWithPoint(t,e,i)},hideTooltip:function(){this.hoverPoint=null,this.components[a.TOOLTIP_COMPONENT].hide()},set:function(t){"enable"in t&&this.handler&&(t.enable?this.handler.hammer.set({enable:!0}):(this.handler.hammer.set({enable:!1}),this.handler.removeAllChosen()))},_updateSeriesState:function(){for(var t=this.series,e=0,i=t.length;i>e;e++)t[e].state=t[e].state==s.STATE_TO_DROP?s.STATE_DROPPED:t[e].state,t[e].state=t[e].state==s.STATE_TO_SHOW?s.STATE_SHOW:t[e].state},isMap:function(){return"vanChartMap"==this.vanChartType},chartType:function(){return this.options.chartType},isHeatMap:function(){return this.options.chartType==s.HEAT_MAP},isAreaMap:function(){return this.options.chartType==s.AREA_MAP},isForceBubble:function(){return"vanChartForceBubble"==this.vanChartType},isLargeMode:function(){return this.options.plotOptions.large},seriesOfType:function(t){return this.series.filter(function(e){return e.type==t})},pointsOfType:function(t){var e=[];return this.series.forEach(function(i){i.type==t&&(e=e.concat(i.points))}),e},setTimeout:function(t,e,i){this.timeQueue[t]&&window.clearTimeout(this.timeQueue[t]),i?this.timeQueue[t]=window.setTimeout(e,i):(e&&e(),this.timeQueue[t]=null)},clearTimeQueue:function(){var t=this.timeQueue||{};return Object.keys(t).map(function(e){window.clearTimeout(t[e])}),{}},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new c(this.width,this.height),this._sizeChanged=!1),this._size.clone()}});return p.include({render:function(){function t(t){e[t]||(e[t]=i.group().addClass(t).add(),e.isMap()&&e[t].addClass("map-component"))}this.vancharts.endLoading();var e=this,i=this.renderer,n=this.getPlotClipBounds();this.plotClip?i.updateClip(this.plotClip,n):this.plotClip=i.createClip(n),["backGroup","clipSeriesGroup","seriesGroup","seriesTextRenderGroup","frontGroup"].forEach(t),i.clip(e.clipSeriesGroup,e.plotClip),i.clip(e.seriesTextRenderGroup,e.plotClip),this._addDivClipGroup(n),this._renderBackground(),this.renderComponents(),this.renderSeries(),this._consoleDone()},_addDivClipGroup:function(t){var e=this;e.seriesTextDivGroup||(e.seriesTextDivGroup=this.renderer.div().add()),e.seriesTextDivGroup.style({clip:"rect("+[t.y,t.x+t.width,t.y+t.height,t.x].join("px ")+"px)"})},_renderBackground:function(){var t=e.makeBounds(0,0,this.width,this.height),i=this.bounds,n=this.options,r=this.renderer,a={backgroundColor:n.geo?"":n.backgroundColor,backgroundImage:n.geo?"":n.backgroundImage,borderColor:n.borderColor,borderWidth:n.geo?0:n.borderWidth,borderRadius:n.borderRadius,shadow:n.shadow},o={backgroundColor:n.plotBackgroundColor,backgroundImage:n.plotBackgroundImage,borderColor:n.plotBorderColor,borderWidth:n.plotBorderWidth,borderRadius:n.plotBorderRadius,shadow:n.plotShadow};a.shadow&&(t.width-=5,t.height-=5),a.backgroundColor||a.backgroundImage||a.borderColor?this.chartBackgroundGroup=this.chartBackgroundGroup||r.group().addTo(this.backGroup):this.chartBackgroundGroup&&(this.chartBackgroundGroup.remove(),this.chartBackgroundGroup=null),o.backgroundColor||o.backgroundImage||o.borderColor?this.plotBackgroundGroup=this.plotBackgroundGroup||this.renderer.group().addTo(this.backGroup):this.plotBackgroundGroup&&(this.plotBackgroundGroup.remove(),this.plotBackgroundGroup=null),this._renderRectangleBackground(this.chartBackgroundGroup,a,t),this._renderRectangleBackground(this.plotBackgroundGroup,o,i)},renderComponents:function(){for(var t in this.components)this.components[t].render()},renderSeries:function(){this.getComponent(a.TOOLTIP_COMPONENT).immediateHide(),this.fire("animationStart"),this._renderTrendLine(),this._updateSeriesState()},_renderRectangleBackground:function(t,i,n){if(t){var r=i.borderWidth||0,a=this.renderer,o=r/2,s=e.rectSubPixelOpt(n.x+o,n.y+o,Math.max(n.width-r,0),Math.max(n.height-r,0),r);if(s.rx=s.ry=i.borderRadius,i.shadow){var h=e.rectSubPixelOpt(n,1),l=[5,3,1],u=[.05,.1,.15];l.forEach(function(e,n){var r="shadowRect"+n;t[r]=t[r]||a.rect().style({fill:"none",stroke:"black","stroke-width":l[n],"stroke-opacity":u[n]}).addTo(t),t[r].attr(h).attr({rx:i.borderRadius,ry:i.borderRadius,transform:"translate(1, 1)"})})}if(i.backgroundColor&&"object"==typeof i.backgroundColor)if(e.isSupportSVG()){var c=i.backgroundColor,d={x1:c.x1,y1:c.y1,x2:c.x2,y2:c.y2},f={offset:"0%","stop-color":c.startColor},p={offset:"100%","stop-color":c.endColor};t.gradientFill?a.updateColorGradient(t.gradientFill,d,[f,p]):t.gradientFill=a.colorGradient(d,[f,p])}else i.backgroundColor=i.backgroundColor.startColor;(i.backgroundColor||i.borderWidth)&&(t.backgroundColor=t.backgroundColor||a.rect().addTo(t),t.backgroundColor.attr(s).style({fill:i.backgroundColor?"string"==typeof i.backgroundColor?i.backgroundColor:"url(#"+e.stamp(t.gradientFill)+")":"none",stroke:i.borderColor,"stroke-width":e.pick(i.borderWidth,0)})),i.backgroundImage&&(t.backgroundImage=t.backgroundImage||a.image().addTo(t),t.backgroundImage.attr(n).attr("preserveAspectRatio","none").imageContent(i.backgroundImage))}},filterRender:function(){for(var t=0,e=this.series.length;e>t;t++)this.series[t].filterRender()},cancelLegendHighlight:function(t){var i=this.getComponent(a.LEGEND_COMPONENT);i=i||this.getComponent(a.RANGE_LEGEND_COMPONENT),i&&i.highlighted&&!e.containsPoint(i.bounds,t)&&(i.highlighted=!1,this.highlightTarget=null,this._updateSeriesStyle())},makeLegendHighlight:function(t){this.highlightTarget=t,this._updateSeriesStyle()},_updateSeriesStyle:function(){this.series.forEach(function(t){t.isSupportLegendHighlight()&&(t.useCanvas()?t._canvasRender():(t.drawSeries&&t.drawSeries(),t.getDataToDraw().filter(function(t){return t.isVisible()}).forEach(function(e){t._updatePointGraphicStyle(e)})))})},reRenderSeries:function(){r.calculateSeries(this),r.calculateSeriesShapes(this),this.renderSeries()},_consoleDone:function(){window.console&&console.log("done")},removePointGraphics:function(t){t&&t.remove()},registerInteractiveTarget:function(t,i){this._targets[e.stamp(i.node())]=t,t._events=null,t.getEvents&&t.on(t.getEvents(),t)},findInteractiveTarget:function(t){return this._targets[e.stamp(t)]},resize:function(){var t=this.wrapDom;this.width=e.getDomWidth(t),this.height=e.getDomHeight(t),this.renderer.resize(),this.isMap()&&(this.mapRenderer.resize(),this._onResize(),this.components.geo.resize()),this.layoutComponentsAndCharts()},remove:function(){this.force&&this.force.endTick(null).stop(),this.force=null,this.clearAllEffects(),this.clearTimeQueue(),this.renderer.remove(),this.handler&&this.handler.destroy(),this.mainRenderer&&this.mainRenderer.remove(),this.animationRenderer&&this.animationRenderer.remove(),this.mainRenderer=null,this.animationRenderer=null,this.largeSeries&&Object.keys(this.largeSeries).map(function(t){this.largeSeries[t]._canvas&&this.largeSeries[t]._canvas.remove(),this.largeSeries[t]=null},this),this.largeSeries=null,this.renderer=this.plotClip=this._leaflet=this.handler=this.chartBackgroundGroup=this.trendLineGroup=this.seriesGroup=this.clipSeriesGroup=this.seriesTextRenderGroup=this.seriesTextDivGroup=null}}),t("./VanChartLibrary").register(s.VANCHART,p),p}),define("vector/Cut",["require","../utils/BezierEasing"],function(t){var e=t("../utils/BezierEasing"),i=function(t,e){return function(i){return+t+(+e-+t)*i}},n=function(t,e,n){var r=i(t[e],n);return function(i){t[e]=r(i)}},r=function(t){if(!t)throw'animation "targets" empty';null==t.length?this.targets=[t]:this.targets=t,this._needsRemove=!1,this._lastSectionTime=null,this._sections=[],this.onend=null};return r.prototype={step:function(t){this._lastSectionTime||(this._lastSectionTime=t);var e=t-this._lastSectionTime,i=this.targets,n=this._sections[0],r=Math.min(e/n.time,1);if(!(!r>0)){n.easing&&(r=n.easing(r));for(var a=n.tweens,o=i.length,s=0;o>s;s++)for(var h in a)a.hasOwnProperty(h)&&a[h][s](r);return 1===r&&(this._lastSectionTime=t,this._sections.shift(),0===this._sections.length)?(this._needsRemove=!0,"end"):void 0}},_fillTweens:function(t){return this.targets.map(function(e,i){return t(e,i)})},delay:function(t){return this._sections.push({time:t,tweens:{}}),this},duration:function(t){return this._sections.push({time:t,tweens:{}}),this},tween:function(t,e){var i=this._sections.length,r=this._sections[i-1].tweens;return"function"==typeof e?r[t]=this._fillTweens(e):r[t]=this._fillTweens(function(i,r){return n(i,t,e)}),this},attrTween:function(t,e){return this.tween("attr"+t,function(i,n){var r=+i.getAttribute(t),a=e(i,n,r);return function(e){i.setAttribute(t,a(e))}}),this},attr:function(t,e){return this.attrTween(t,function(t,n,r){return"function"==typeof e?i(r,e.call(null,t,n,r)):i(r,e)}),this},end:function(t){return this.onend=t,this},stop:function(){return this._needsRemove=!0,this},ease:function(t){var i=this._sections.length;return this._sections[i-1].easing="string"==typeof t?e.css[t]:t,this}},r}),define("vector/Animation",["require","./Cut"],function(t){var e=t("./Cut"),i=window.requestAnimationFrame||window.msRequestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(t){setTimeout(t,16)},n=function(){this._initTime=null,this._running=!1,this._cuts=[],this._callback=[],this.onframe=null,this.onend=null};return n.prototype={_update:function(){var t=(new Date).getTime(),e=this._cuts,i=e.length;if(!e.length)return!1;for(var n=0;i>n;)e[n]._needsRemove?(e[n]=e[i-1],e.pop(),i--):n++;for(var n=0;i>n;n++){var r=e[n].step(t);r&&e[n]["on"+r]&&this._callback.push(e[n]["on"+r])}this.onframe&&this.onframe();for(var a,n=-1;a=this._callback[++n];)a();return this._callback=[],!0},_startLoop:function(){function t(){e._running&&(e._running=e._update(),i(t))}var e=this;i(t)},frame:function(t){return this.onframe=t,this},start:function(){return this._running||(this._running=!0,this._startLoop()),this},stop:function(){return this._running=!1,this},clear:function(){return this._running=!1,this._cuts=[],this},animate:function(t){var i=new e(t);return i.animation=this,this._cuts.push(i),this.start(),i}},n}),define("vector/shape/Arc",["require","../../utils/BaseUtils","../../dom/Browser"],function(t){var e=t("../../utils/BaseUtils"),i=t("../../dom/Browser").touch,n=i?10:2,r=2*Math.PI,a=Math.max,o=Math.atan2,s=Math.abs,h=Math.sqrt,l=e.normalRadian,u=function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this.style={ox:null,oy:null,r:null,startAngle:null,endAngle:null,lineWidth:null,color:null,fillStyle:"rgba(0, 0, 0, 0)"}};return u.prototype={setStyle:function(t){for(var e in this.style)t.hasOwnProperty(e)&&(this.style[e]=t[e]);return this},drawStyle:function(){var t=this.ctx,e=this.style;return(e.lineWidth&&e.lineWidth!==t.lineWidth||e.color&&e.color!==t.strokeStyle)&&(t.stroke(),t.beginPath(),t.lineWidth=e.lineWidth,t.strokeStyle=e.color),e.fillStyle&&e.fillStyle!==t.fillStyle&&(t.fill(),t.fillStyle=e.fillStyle),this},draw:function(){var t=this.ctx,e=this.style;return e.lineWidth?(t.moveTo(e.ox+e.r*Math.cos(e.startAngle),e.oy+e.r*Math.sin(e.startAngle)),t.arc(e.ox,e.oy,e.r,e.startAngle,e.endAngle),this):this},animate:function(){return this.cut||(this.cut=this.renderer.animation.animate(this.style)),this},delay:function(t){return this.cut.delay(t),this},duration:function(t){return this.cut.duration(t),this},tween:function(t,e){return this.cut.tween(t,e),this},end:function(t){return this.cut.end(t),this},stop:function(){return this.cut.stop(),this},ease:function(t){return this.cut.ease(t),this},remove:function(){this.cut&&this.cut.stop(),this.needToRemove=!0},contain:function(t){var e=t.x,i=t.y,u=this.style,c=a(u.lineWidth,n),d=e-u.ox,f=i-u.oy,p=s(h(d*d+f*f)-u.r);if(p>c)return!1;var g=l(o(f,d));return(g+r-u.startAngle)%r<=u.endAngle-u.startAngle}},u}),define("vector/shape/Circle",["require"],function(t){var e=2*Math.PI,i=function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this.style={ox:null,oy:null,r:null,lineWidth:null,strokeStyle:null,fillStyle:null}};return i.prototype={setStyle:function(t){for(var e in this.style)t.hasOwnProperty(e)&&(this.style[e]=t[e]);return this},drawStyle:function(){var t=this.ctx,e=this.renderer,i=this.style;return(i.lineWidth&&i.lineWidth!==t.lineWidth||i.strokeStyle&&i.strokeStyle!==t.strokeStyle)&&(t.stroke(),t.lineWidth=i.lineWidth,t.strokeStyle=i.strokeStyle),i.fillStyle&&i.fillStyle!==e.fillStyle&&(t.fill(),t.beginPath(),t.fillStyle=i.fillStyle,e.fillStyle=i.fillStyle),this},draw:function(){var t=this.ctx,i=this.style;return t.moveTo(i.r+i.ox,i.oy),t.arc(i.ox,i.oy,i.r,0,e),this}},i}),define("vector/shape/Image",["require"],function(t){var e=function(t){this.renderer=t,this.ctx=t.ctx,this.cut=null,this.style={imagedata:null,dx:null,dy:null,dirtyX:null,dirtyY:null,dirtyWidth:null,dirtyHeight:null}};return e.prototype={setStyle:function(t){for(var e in this.style)t.hasOwnProperty(e)&&(this.style[e]=t[e]);return this},drawStyle:function(){return this},draw:function(){var t=this.style;return this.ctx.putImageData(t.imagedata,t.dx,t.dy),this}},e}),define("vector/CanvasRenderer",["require","./Renderer","../Constants","./Animation","./shape/Arc","./shape/Circle","./shape/Image","./ElementWrapper"],function(t){var e=t("./Renderer"),i=t("../Constants"),n=t("./Animation"),r=t("./shape/Arc"),a=t("./shape/Circle"),o=t("./shape/Image"),s=t("./ElementWrapper"),h=["lineWidth","strokeStyle"],l=e.extend({_initContainer:function(){var t=this.dom,e=this.vanchart,i=this.config,r=i||e.bounds,a=i&&i.dpr||1;this._container=new s(this._createCanvas(t,r,a),this),this.ctx=this._container.node().getContext("2d"),this.ctx.scale(a,a),this.elements=[],this.animation=(new n).frame(this.flush.bind(this))},arc:function(t){return this._create(r,t)},circle:function(t){return this._create(a,t)},image:function(t){return this._create(o,t)},_create:function(t,e){var i=new t(this);return i.rawElement=i,this.elements.push(i),e&&i.setStyle(e),i},style:function(){},_createCanvas:function(t,e,i){var n=document.createElement(window.VAN_CANVAS),r=this.left=e.x,a=this.top=e.y,o=this.width=e.width,s=this.height=e.height;return this.dpr=i,n.style.position="absolute",n.style.left=r+"px",n.style.top=a+"px",n.style.width=o+"px",n.style.height=s+"px",n.width=o*i,n.height=s*i,n.onselectstart=function(){return!1},n.style["-webkit-user-select"]="none",n.style["user-select"]="none",n.style["pointer-events"]="none",n.style["-webkit-touch-callout"]="none",n.style.transform="translateZ(0)",t.appendChild(n),window.VanCanvasManager&&VanCanvasManager.initElement(n),n},flush:function(){this.clearAll(),this.ctx.beginPath();for(var t=this.elements,e=t.length,i=[],n=0;e>n;n++)t[n].needToRemove||(i.push(t[n]),t[n].drawStyle().draw());this.elements=i,this.ctx.stroke(),this.ctx.fill()},_updateCtxStatus:function(){for(var t,e,i=-1;t=h[++i];)this[t]!==this.ctx[t]&&(this[t]=this.ctx[t],e=!0);e&&this.ctx.stroke(),this.fillStyle!==this.ctx.fillStyle&&(this.fillStyle=this.ctx.fillStyle,this.ctx.fill())},clearAll:function(){this.ctx.clearRect(0,0,this.width,this.height)},remove:function(){this.animation.clear(),this.ctx=null,this._container.remove()},addBubbleSeries:function(t){var e=this.ctx;e.save();for(var i=0,n=t.points.length;n>i;i++){var r=t.points[i];r.visible&&!r.isNull&&(e.fillStyle=r.color,e.globalAlpha=this.getPointOpacity(r),e.beginPath(),e.arc(r.posX,r.posY,r.radius,0,2*Math.PI),e.fill())}e.restore()},getPointOpacity:function(t){var e=t.series,i=e.vanchart.highlightTarget;if(i){var n=e.name;return n==i||t._rangeItem==i?1:.3}return t.opacity},addScatterSeries:function(t){var e=this.ctx;e.save();for(var i=0,n=t.points.length;n>i;i++){var r=t.points[i];if(r.visible&&!r.isNull){var a=r.options.marker,o=a.symbol,s=isNaN(a.radius)?4.5:a.radius,h=a.fillColor||r.color;e.translate(r.posX,r.posY),e.fillStyle=h,e.strokeStyle=h,e.globalAlpha=this.getPointOpacity(r),this._drawMarker(e,o,s),e.translate(-r.posX,-r.posY)}}e.restore()},addSeries:function(t){t.visible&&(t.type==i.SCATTER_CHART?this.addScatterSeries(t):this.addBubbleSeries(t))},_drawMarker:function(t,e,n){-1!=e.indexOf(i.CIRCLE)?(t.beginPath(),t.arc(0,0,n,0,2*Math.PI)):-1!=e.indexOf(i.SQUARE)?(t.beginPath(),t.moveTo(-n,-n),t.lineTo(n,-n),t.lineTo(n,n),t.lineTo(-n,n),t.closePath()):-1!=e.indexOf(i.DIAMOND)?(n=2*n/Math.sqrt(2),t.beginPath(),t.moveTo(-n,0),t.lineTo(0,-n),t.lineTo(n,0),t.lineTo(0,n),t.closePath()):-1!=e.indexOf(i.TRIANGLE)?(t.beginPath(),t.moveTo(-n,n/Math.sqrt(3)),t.lineTo(0,-(2*Math.sqrt(3)/3)*n),t.lineTo(n,n/Math.sqrt(3)),t.closePath()):(t.beginPath(),t.arc(0,0,n,0,2*Math.PI)),-1==e.indexOf("hollow")?t.fill():(t.fillStyle="white",t.lineWidth=2,t.fill(),t.stroke())}});return l}),define("chart/map/LineMapLayer",["require","../../utils/BaseUtils","../../dom/DomUtils","../../utils/ColorUtils","../../Constants","../../vector/Layer","../../dom/Browser"],function(t){function e(t,e,i,n){if(!p[t]){var r=document.createElement(window.VAN_CANVAS);r.style.width=e+"px",r.style.height=i+"px",r.width=e*n,r.height=i*n;var a=r.getContext("2d");a.scale(n,n),p[t]=a}return p[t]}function i(t){if(g[t])return g[t];var e=new Image;return e.crossOrigin="Anonymous",e.onload=function(){g[t]=e},e.src=t,!1}function n(t,n,r,a,o){var s=u*Math.max(n,r),h=e(t,s,s,a),l=null;return(l=i(t))?(h.clearRect(0,0,s,s),h.translate(s/2,s/2),h.rotate(o),h.drawImage(l,-n/2,-r/2,n,r),h.rotate(-o),h.translate(-s/2,-s/2),h.getImageData(0,0,s*a,s*a)):null}function r(t,e,i){function r(t){return b=t,this}function o(){return b=[],this}function h(t){l(!0,t)}function l(e,n){var r=b.length;if(r&&b[0]&&b[0].series.options.large){b[0].refreshPointColor();var a=s.mixColorWithAlpha(b[0].color,b[0].opacity)}b.map(function(o){var h=o.series,l=h.options.large,u=o.visible&&h.visible,m=o.graphic,_=o.options,y=_.from.lnglat[0],x=_.from.lnglat[1],b=_.to.lnglat[0],T=_.to.lnglat[1];if(y!==b||x!==T){var A=i.latLngToContainerPoint([x,y]),C=i.latLngToContainerPoint([T,b]);if(o.ax=A.x,o.ay=A.y,o.bx=C.x,o.by=C.y,o.curveness=_.curveness,0===o.curveness&&(o.curveness=.01),u)if(l)t.ctx.globalCompositeOperation="lighter",o._color=a;else{var L=o.opacity;n&&(L*=o.series.name==n||o._rangeItem==n?1:.3),o._color=s.mixColorWithAlpha(o.color,L)}if(u&&!m){var P,M;if(o.graphic=t.arc(),o.graphic.point=o,P=g(o.graphic,o),c&&!e&&!l&&h.options.animation&&o.options.lineWidth&&(o.graphic.style.endAngle=P[3],M=o.graphic.animate().duration(d).ease(f).tween("endAngle",P[4])),c&&!l&&u&&o.options.effect&&o.options.effect.enabled){var w=h.points.indexOf(o);M?M.end(v.bind(this,o,r,w)):v(o,r,w)}}else u&&m?g(o.graphic,o):!u&&m&&(o.graphic.needToRemove=!0,o.graphic=null,p(o))}})}function p(t){t._effect&&(t._effect.stop(),t._effect=null),t._symbol&&(t._symbol.map(function(t){t.needToRemove=!0}),t._symbol=null)}function g(t,e){var i=a.computeArc(e.ax,e.ay,e.bx,e.by,e.curveness);return t.setStyle({ox:i[0],oy:i[1],r:i[2],startAngle:i[3],endAngle:i[4],lineWidth:e.options.lineWidth,color:e._color}),i}function m(){e.clearAll()}function v(t,i,n){if(t.graphic){var r=t.options.effect.period||2e3;t._effect=e.animation.animate(t.graphic.style).delay(r/5*n/i).duration(r).tween("track",function(e){return _(e,t)}).end(v.bind(this,t,i,n))}}function _(t,e){var i=t.startAngle,n=t.endAngle,r=(n-i)/3,a=n-i+r,o=e.options.effect;if(o.symbol){var s=o.symbol,h=o.width,l=o.height,u=window.devicePixelRatio||1;return function(i){e._symbol&&(e._symbol[0].needToRemove=!0),e._symbol=y(a*i,t.ox,t.oy,t.r,t.startAngle,t.endAngle,r,s,h,l,u)}}var c=1.4,d=1.5;return function(i){e._symbol&&e._symbol.map(function(t){t.needToRemove=!0}),e._symbol=x(a*i,t.ox,t.oy,t.r,t.startAngle,t.endAngle,r,d,c,e.color)}}function y(t,i,r,a,o,s,h,l,c,d,f){var p=t-h+o;if(!(t+o>s)){var g=h+p,m=a*Math.cos(g)+i,v=a*Math.sin(g)+r,_=null;if(_=n(l,c,d,f,Math.PI+g)){var y=u*Math.max(c,d);return[e.image({imagedata:_,dx:(m-y/2)*f,dy:(v-y/2)*f})]}}}function x(t,i,n,r,a,o,s,h,l,u){for(var c=t>s?0:s-t,d=o>t+a?s:s-(t+a-o),f=t-s+a,p=[],g=d;g>c;g-=l/r){var m=g+f,v=r*Math.cos(m)+i,_=r*Math.sin(m)+n,y=g/s;p.push(e.circle({ox:v,oy:_,r:y*h,strokeStyle:"rgba(0, 0, 0, 0)",fillStyle:u}))}return p}var b=[];return{data:r,clear:o,draw:l,redraw:h,stop:m,removeEffect:p}}var a=t("../../utils/BaseUtils"),o=t("../../dom/DomUtils"),s=t("../../utils/ColorUtils"),h=(t("../../Constants").LINE_MAP,t("../../vector/Layer")),l=t("../../dom/Browser"),u=Math.SQRT2,c=a.isSupportSVG(),d=800,f="ease-in-out-quad",p={},g={},m=h.extend({options:{mainRenderer:null,animationRenderer:null,vanchart:null},initialize:function(t){a.setOptions(this,t)},setData:function(t){return this._pairs=t,this._draw()},addData:function(t){return this._pairs.push(t),this._draw()},setOptions:function(t){return a.setOptions(this,t),this._lineMap&&this._updateOptions(),this._draw()},redraw:function(){return this._lineMap.redraw(this.options.vanchart.highlightTarget),this.options.mainRenderer.flush(),this},removeEffect:function(t){this._lineMap&&this._lineMap.removeEffect(t)},onAdd:function(t){this._map=t,this._lineMap||this._initRenderer(),t.on("moveend",this._reset,this),t.options.zoomAnimation&&l.any3d&&t.on("zoomanim",this._animateZoom,this),t.on(this._events,this),this._reset()},onRemove:function(t){this.options.pane?(this.getPane().removeChild(this._canvas),this.getPane().removeChild(this._animCanvas)):(t.getPanes().overlayPane.removeChild(this._canvas),t.getPanes().overlayPane.removeChild(this._animCanvas)),t.off("moveend",this._reset,this),t.options.zoomAnimation&&t.off("zoomanim",this._animateZoom,this),t.off(this._events,this)},addTo:function(t){return t.addLayer(this),this},_initRenderer:function(){var t=this._canvas=this.options.mainRenderer._container.node(),e=this._animCanvas=this.options.animationRenderer._container.node(),i=o.TRANSFORM_ORIGIN;t.style[i]=e.style[i]="50% 50%";var n=this._map.options.zoomAnimation&&l.any3d,a="leaflet-zoom-"+(n?"animated":"hide"),s="leaflet-linemap-layer leaflet-layer ";o.addClass(t,s+a),o.addClass(e,s+a),this._lineMap=r(this.options.mainRenderer,this.options.animationRenderer,this._map)},_updateOptions:function(){},_reset:function(){this._lineMap.stop();var t=this._map.containerPointToLayerPoint([0,0]);o.setPosition(this._canvas,t),o.setPosition(this._animCanvas,t),this._draw()},_draw:function(){return this._map&&this._pairs&&this._pairs.length?(this._lineMap.data(this._pairs).draw(),void this.options.mainRenderer.flush()):void this.options.mainRenderer.flush()},_animateZoom:function(t){this._lineMap.stop();var e=this._map.getZoomScale(t.zoom),i=this._map._getCenterOffset(t.center)._multiplyBy(-e).subtract(this._map._getMapPanePos());if(o.setTransform)o.setTransform(this._canvas,i,e),o.setTransform(this._animCanvas,i,e);else{var n=a.makeTranslate(i)+" scale("+e+")";this._canvas.style[o.TRANSFORM]=n,this._animCanvas.style[o.TRANSFORM]=n}},_events:{tap:function(t){var e=this.hoverPoint;e&&e._onPointTap(t)},mousemove:function(t){for(var e,i,n=this.options.mainRenderer,r=this.options.vanchart,a=this,o=n.elements,s=n.elements.length,h=t.containerPoint;e=o[--s];)if(e.contain(h)){i=e;break}var l=i&&i.point,u=l&&l.series.options.large;l?(r.showTooltip(l,t),r.handler.cursor("pointer"),l.mouseOverColor&&!u&&l!==a.hoverPoint&&(i.style.color=i.point.mouseOverColor)):(r.hoverPoint||r.hideTooltip(),r.handler.cursor("")),u||a.hoverPoint==l||(a.hoverPoint&&(a.hoverPoint.graphic.style.color=a.hoverPoint._color),a.hoverPoint=l,n.flush())}}});return function(t){return new m(t)}}),function(t,e,i){"undefined"!=typeof module&&module.exports?module.exports=i():"function"==typeof define&&define.amd?define("chart/map/heatmap",i):e[t]=i()}("h337",this,function(){var t={defaultRadius:40,defaultRenderer:"canvas2d",defaultGradient:{.25:"rgb(0,0,255)",.55:"rgb(0,255,0)",.85:"yellow",1:"rgb(255,0,0)"},defaultMaxOpacity:1,defaultMinOpacity:0,defaultBlur:.85,defaultXField:"x",defaultYField:"y",defaultValueField:"value",plugins:{}},e=function(){var e=function(t){this._coordinator={},this._data=[],this._radi=[],this._min=10,this._max=1,this._xField=t.xField||t.defaultXField,this._yField=t.yField||t.defaultYField,this._valueField=t.valueField||t.defaultValueField,t.radius&&(this._cfgRadius=t.radius)},i=t.defaultRadius;return e.prototype={_organiseData:function(t,e){var n=t[this._xField],r=t[this._yField],a=this._radi,o=this._data,s=this._max,h=this._min,l=t[this._valueField]||1,u=t.radius||this._cfgRadius||i;o[n]||(o[n]=[],a[n]=[]),o[n][r]?o[n][r]+=l:(o[n][r]=l,a[n][r]=u);var c=o[n][r];return c>s?(e?this.setDataMax(c):this._max=c,!1):h>c?(e?this.setDataMin(c):this._min=c,!1):{x:n,y:r,value:l,radius:u,min:h,max:s}},_unOrganizeData:function(){var t=[],e=this._data,i=this._radi;for(var n in e)for(var r in e[n])t.push({x:n,y:r,radius:i[n][r],value:e[n][r]});return{min:this._min,max:this._max,data:t}},_onExtremaChange:function(){this._coordinator.emit("extremachange",{min:this._min,max:this._max})},addData:function(){if(arguments[0].length>0)for(var t=arguments[0],e=t.length;e--;)this.addData.call(this,t[e]);else{var i=this._organiseData(arguments[0],!0);i&&(0===this._data.length&&(this._min=this._max=i.value),this._coordinator.emit("renderpartial",{min:this._min,max:this._max,data:[i]}))}return this},setData:function(t){var e=t.data,i=e.length;this._data=[],this._radi=[];for(var n=0;i>n;n++)this._organiseData(e[n],!1);return this._max=t.max,this._min=t.min||0,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},removeData:function(){},setDataMax:function(t){return this._max=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setDataMin:function(t){return this._min=t,this._onExtremaChange(),this._coordinator.emit("renderall",this._getInternalData()),this},setCoordinator:function(t){this._coordinator=t},_getInternalData:function(){return{max:this._max,min:this._min,data:this._data,radi:this._radi}},getData:function(){return this._unOrganizeData()}},e}(),i=function(){function t(t){var i=t.container,n=this.shadowCanvas=document.createElement(window.VAN_CANVAS),r=this.canvas=t.canvas||document.createElement(window.VAN_CANVAS);window.VanCanvasManager&&VanCanvasManager.initElement(r),window.VanCanvasManager&&VanCanvasManager.initElement(n);var a=(this._renderBoundaries=[1e4,1e4,0,0],t.container.currentStyle||getComputedStyle(t.container)||{});r.className="heatmap-canvas",this._width=r.width=n.width=t.width||+a.width.replace(/px/,""),this._height=r.height=n.height=t.height||+a.height.replace(/px/,""),this.shadowCtx=n.getContext("2d"),this.ctx=r.getContext("2d"),r.style.cssText=n.style.cssText="position:absolute;left:0;top:0;",i.style.position="relative",i.appendChild(r),this._palette=e(t),this._templates={},this._setStyles(t)}var e=function(t){var e=t.gradient||t.defaultGradient,i=document.createElement(window.VAN_CANVAS);if(i.getContext){var n=i.getContext("2d");i.width=256,i.height=1;var r=n.createLinearGradient(0,0,256,1);for(var a in e)r.addColorStop(a,e[a]);return n.fillStyle=r,n.fillRect(0,0,256,1),n.getImageData(0,0,256,1).data}return{}},i=function(t,e){var i=document.createElement(window.VAN_CANVAS),n=i.getContext("2d"),r=t,a=t;if(i.width=i.height=2*t,1===e)n.beginPath(),n.arc(r,a,t,0,2*Math.PI,!1),n.fillStyle="rgba(0,0,0,1)",n.fill();else{var o=n.createRadialGradient(r,a,t*e,r,a,t);o.addColorStop(0,"rgba(0,0,0,1)"),o.addColorStop(1,"rgba(0,0,0,0)"),n.fillStyle=o,n.fillRect(0,0,2*t,2*t)}return i},n=function(t){for(var e=[],i=t.min,n=t.max,r=t.radi,t=t.data,a=Object.keys(t),o=a.length;o--;)for(var s=a[o],h=Object.keys(t[s]),l=h.length;l--;){var u=h[l],c=t[s][u],d=r[s][u];e.push({x:s,y:u,value:c,radius:d})}return{min:i,max:n,data:e}};return t.prototype={renderPartial:function(t){t.data.length>0&&(this.ctx.getImageData?(this._drawAlpha(t),this._colorize()):this._drawPoints(t))},renderAll:function(t){if(this._clear(),t.data.length>0){var t=n(t);this.ctx.getImageData?(this._drawAlpha(t),this._colorize()):this._drawPoints(t)}},_drawPoints:function(t){for(var e=this._min=t.min,i=this._max=t.max,t=t.data||[],n=t.length,r=1-this._blur,a=this.ctx;n--;){var o=t[n],s=+o.radius,h=Math.min(o.value,i),l=+o.x,u=+o.y,c=(h-e)/(i-e);c=isNaN(c)?1:c,a.globalAlpha=.01>c?.01:c;var d=a.createRadialGradient(l,u,s*r,l,u,s),f=this._gradientConfig;for(var p in f)d.addColorStop(+p,f[p]);a.fillStyle=d,a.beginPath(),a.moveTo(l,u),a.arc(l,u,s,0,2*Math.PI,!1),a.fill()}},_updateGradient:function(t){this._palette=e(t)},updateConfig:function(t){t.gradient&&this._updateGradient(t),this._setStyles(t)},setDimensions:function(t,e){this._width=t,this._height=e,this.canvas.width=this.shadowCanvas.width=t,this.canvas.height=this.shadowCanvas.height=e},_clear:function(){this.shadowCtx.clearRect(0,0,this._width,this._height),this.ctx.clearRect(0,0,this._width,this._height)},_setStyles:function(t){this._blur=0===t.blur?0:t.blur||t.defaultBlur,this._gradientConfig=t.gradient||t.defaultGradient,t.backgroundColor&&(this.canvas.style.backgroundColor=t.backgroundColor),this._width=this.canvas.width=this.shadowCanvas.width=t.width||this._width,this._height=this.canvas.height=this.shadowCanvas.height=t.height||this._height,this._opacity=255*(t.opacity||0),this._maxOpacity=255*(t.maxOpacity||t.defaultMaxOpacity),this._minOpacity=255*(t.minOpacity||t.defaultMinOpacity),this._useGradientOpacity=!!t.useGradientOpacity},_drawAlpha:function(t){for(var e=this._min=t.min,n=this._max=t.max,t=t.data||[],r=t.length,a=1-this._blur;r--;){var o,s=t[r],h=s.x,l=s.y,u=s.radius,c=Math.min(s.value,n),d=h-u,f=l-u,p=this.shadowCtx;this._templates[u]?o=this._templates[u]:this._templates[u]=o=i(u,a);var g=(c-e)/(n-e);p.globalAlpha=.01>g?.01:g,p.drawImage(o,d,f),d<this._renderBoundaries[0]&&(this._renderBoundaries[0]=d),f<this._renderBoundaries[1]&&(this._renderBoundaries[1]=f),d+2*u>this._renderBoundaries[2]&&(this._renderBoundaries[2]=d+2*u),f+2*u>this._renderBoundaries[3]&&(this._renderBoundaries[3]=f+2*u)}},_colorize:function(){var t=this._renderBoundaries[0],e=this._renderBoundaries[1],i=this._renderBoundaries[2]-t,n=this._renderBoundaries[3]-e,r=this._width,a=this._height,o=this._opacity,s=this._maxOpacity,h=this._minOpacity,l=this._useGradientOpacity;0>t&&(t=0),0>e&&(e=0),t+i>r&&(i=r-t),e+n>a&&(n=a-e);for(var u=this.shadowCtx.getImageData(t,e,i,n),c=u.data,d=c.length,f=this._palette,p=3;d>p;p+=4){var g=c[p],m=4*g;if(m){var v;v=o>0?o:s>g?h>g?h:g:s,c[p-3]=f[m],c[p-2]=f[m+1],c[p-1]=f[m+2],c[p]=l?f[m+3]:v}}u.data=c,this.ctx.putImageData(u,t,e),this._renderBoundaries=[1e3,1e3,0,0]},getValueAt:function(t){var e,i=this.shadowCtx,n=i.getImageData(t.x,t.y,1,1),r=n.data[3],a=this._max,o=this._min;return e=Math.abs(a-o)*(r/255)>>0},getDataURL:function(){return this.canvas.toDataURL()}},t}(),n=function(){var e=!1;return"canvas2d"===t.defaultRenderer&&(e=i),e}(),r={merge:function(){for(var t={},e=arguments.length,i=0;e>i;i++){var n=arguments[i];for(var r in n)t[r]=n[r]}return t}},a=function(){function i(){var i=this._config=r.merge(t,arguments[0]||{});if(this._coordinator=new a,i.plugin){var s=i.plugin;if(!t.plugins[s])throw new Error("Plugin '"+s+"' not found. Maybe it was not registered.");
var h=t.plugins[s];this._renderer=new h.renderer(i),this._store=new h.store(i)}else this._renderer=new n(i),this._store=new e(i);o(this)}var a=function(){function t(){this.cStore={}}return t.prototype={on:function(t,e,i){var n=this.cStore;n[t]||(n[t]=[]),n[t].push(function(t){return e.call(i,t)})},emit:function(t,e){var i=this.cStore;if(i[t])for(var n=i[t].length,r=0;n>r;r++){var a=i[t][r];a(e)}}},t}(),o=function(t){var e=t._renderer,i=t._coordinator,n=t._store;i.on("renderpartial",e.renderPartial,e),i.on("renderall",e.renderAll,e),i.on("extremachange",function(e){t._config.onExtremaChange&&t._config.onExtremaChange({min:e.min,max:e.max,gradient:t._config.gradient||t._config.defaultGradient})}),n.setCoordinator(i)};return i.prototype={addData:function(){return this._store.addData.apply(this._store,arguments),this},removeData:function(){return this._store.removeData&&this._store.removeData.apply(this._store,arguments),this},setData:function(){return this._store.setData.apply(this._store,arguments),this},setDataMax:function(){return this._store.setDataMax.apply(this._store,arguments),this},setDataMin:function(){return this._store.setDataMin.apply(this._store,arguments),this},configure:function(t){return this._config=r.merge(this._config,t),this._renderer.updateConfig(this._config),this._coordinator.emit("renderall",this._store._getInternalData()),this},repaint:function(){return this._coordinator.emit("renderall",this._store._getInternalData()),this},getData:function(){return this._store.getData()},getDataURL:function(){return this._renderer.getDataURL()},getValueAt:function(t){return this._store.getValueAt?this._store.getValueAt(t):this._renderer.getValueAt?this._renderer.getValueAt(t):null}},i}(),o={create:function(t){return new a(t)},register:function(e,i){t.plugins[e]=i}};return o}),define("chart/map/HeatMapOverlay",["require","./heatmap","../../vector/Layer","../../dom/DomUtils","../../utils/Point2D","../../utils/BaseUtils","./LatLng"],function(t){var e=t("./heatmap"),i=t("../../vector/Layer"),n=t("../../dom/DomUtils"),r=t("../../utils/Point2D"),a=t("../../utils/BaseUtils"),o=t("./LatLng"),s=i.extend({initialize:function(t){this.cfg=t,this._el=n.create("div","leaflet-zoom-hide"),this._el.style.zIndex=201,this._data=[],this._max=1,this._min=0,this.cfg.container=this._el},onAdd:function(t){var i=t.getSize();this._map=t,this._width=i.x,this._height=i.y,this._el.style.width=i.x+"px",this._el.style.height=i.y+"px",this._el.style.position="absolute",this._origin=this._map.layerPointToLatLng(new r(0,0)),t.getPanes().overlayPane.appendChild(this._el),this._heatmap||(this._heatmap=e.create(this.cfg)),t.on("moveend",this._reset,this),t.on(this._events,this),this._draw()},addTo:function(t){return t.addLayer(this),this},onRemove:function(t){t.getPanes().overlayPane.removeChild(this._el),t.off("moveend",this._reset,this),t.off(this._events,this)},_draw:function(){if(this._map){var t=this._map.getPanes().mapPane,e=t._leaflet_pos;a.isSupportSVG()?this._el.style[s.CSS_TRANSFORM]="translate("+-Math.round(e.x)+"px,"+-Math.round(e.y)+"px)":(this._el.style.left=-Math.round(e.x)+"px",this._el.style.bottom=Math.round(e.y)+"px"),this._update()}},_update:function(){var t,e,i,n={max:this._max,min:this._min,data:[]};if(t=this._map.getBounds(),e=this._map.getZoom(),i=Math.pow(2,e),0===this._data.length)return void(this._heatmap&&this._heatmap.setData(n));for(var r=[],a=this.cfg.scaleRadius?i:1,o=0,s=0,h=this.cfg.valueField,l=this._data.length;l--;){var u=this._data[l],c=u[h],d=u.latlng;if(t.contains(d)){o=Math.max(c,o),s=Math.min(c,s);var f=this._map.latLngToContainerPoint(d),p={x:Math.round(f.x),y:Math.round(f.y)};p[h]=c;var g;g=u.radius?u.radius*a:(this.cfg.radius||2)*a,p.radius=g,r.push(p)}}this.cfg.useLocalExtrema&&(n.max=o,n.min=s),n.data=r,this._heatmap.setData(n)},setData:function(t){this._max=t.max||this._max,this._min=t.min||this._min;for(var e=this.cfg.lnglatField||"lnglat",i=this.cfg.valueField||"value",t=t.data,n=t.length,r=[];n--;){var a=t[n].options,s=new o(a[e][1],a[e][0]),h={latlng:s};h[i]=a[i],a.radius&&(h.radius=a.radius),r.push(h)}this._data=r,this._draw()},addData:function(t){if(t.length>0)for(var e=t.length;e--;)this.addData(t[e]);else{var i=this.cfg.lnglatField||"lnglat",n=this.cfg.valueField||"value",r=t,a=new o(r[i][1],r[i][0]),s={latlng:a};s[n]=r[n],this._max=Math.max(this._max,s[n]),this._min=Math.min(this._min,s[n]),r.radius&&(s.radius=r.radius),this._data.push(s),this._draw()}},_reset:function(){this._origin=this._map.layerPointToLatLng(new r(0,0));var t=this._map.getSize();(this._width!==t.x||this._height!==t.y)&&(this._width=t.x,this._height=t.y,this._el.style.width=this._width+"px",this._el.style.height=this._height+"px",this._heatmap._renderer.setDimensions(this._width,this._height)),this._draw()},_events:{tap:function(t){var e=this.hoverPoint;e&&e._onPointTap(t)},mousemove:function(t){var e=this._map,i=e.handler._getCanvasClosestPoint(t.containerPoint);i?(i._events||i.getEvents&&i.on(i.getEvents(),i),e.showTooltip(i,t),e.hoverPoint=i):e.hideTooltip()}}});return s.CSS_TRANSFORM=function(){for(var t=document.createElement("div"),e=["transform","WebkitTransform","MozTransform","OTransform","msTransform"],i=0;i<e.length;i++){var n=e[i];if(void 0!==t.style[n])return n}return e[0]}(),s}),define("chart/map/Icon",["require","../../utils/Class","../../utils/BaseUtils","../../utils/Point2D","../../dom/Browser","../../dom/DomUtils"],function(t){var e=t("../../utils/Class"),i=t("../../utils/BaseUtils"),n=t("../../utils/Point2D"),r=t("../../dom/Browser"),a=t("../../dom/DomUtils"),o=e.extend({initialize:function(t){i.setOptions(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var i=this._getIconUrl(t);if(!i){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var n=this._createImg(i,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(n,t),n},_setIconStyles:function(t,e){var i=this.options,r=i[e+"Size"];"number"==typeof r&&(r=[r,r]);var a=n.create(r),o=n.create("shadow"===e&&i.shadowAnchor||i.iconAnchor||a&&a.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(i.className||""),o&&(t.style.marginLeft=-o.x+"px",t.style.marginTop=-o.y+"px"),a&&(t.style.width=a.x+"px",t.style.height=a.y+"px")},_createImg:function(t,e){return e=e||document.createElement("img"),e.src=t,e},_getIconUrl:function(t){return r.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});return o.Default=o.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return o.Default.imagePath||(o.Default.imagePath=this._detectIconPath()),(this.options.imagePath||o.Default.imagePath)+o.prototype._getIconUrl.call(this,t)},_detectIconPath:function(){var t=a.create("div","leaflet-default-icon-path",document.body),e=a.getStyle(t,"background-image")||a.getStyle(t,"backgroundImage");return document.body.removeChild(t),0===e.indexOf("url")?e.replace(/^url\([\"\']?/,"").replace(/marker-icon\.png[\"\']?\)$/,""):""}}),o}),define("vector/shape/LayerGroup",["require","./../Layer","../../utils/BaseUtils"],function(t){var e=t("./../Layer"),i=t("../../utils/BaseUtils"),n=e.extend({initialize:function(t){this._layers={};var e,i;if(t)for(e=0,i=t.length;i>e;e++)this.addLayer(t[e])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return!!t&&(t in this._layers||this.getLayerId(t)in this._layers)},clearLayers:function(){for(var t in this._layers)this.removeLayer(this._layers[t]);return this},invoke:function(t){var e,i,n=Array.prototype.slice.call(arguments,1);for(e in this._layers)i=this._layers[e],i[t]&&i[t].apply(i,n);return this},onAdd:function(t){for(var e in this._layers)t.addLayer(this._layers[e])},onRemove:function(t){for(var e in this._layers)t.removeLayer(this._layers[e])},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];for(var e in this._layers)t.push(this._layers[e]);return t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return i.stamp(t)}});return n}),define("vector/shape/Path",["require","./../Layer","../../dom/Browser","../../utils/BaseUtils"],function(t){var e=t("./../Layer"),i=t("../../dom/Browser"),n=(t("../../utils/BaseUtils"),e.extend({onAdd:function(){this._path=this._renderer.path().style(this.options),this._reset(),this._path.add()},onRemove:function(){this._path.remove()},redraw:function(){return this._map&&this._reset(),this},setStyle:function(t){return this.options=t||this.options,this._renderer&&this._path.style(this.options),this},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options["stroke-width"]?this.options["stroke-width"]/2:0)+(i.touch?10:0)},node:function(){return this._path.node()}}));return n}),define("chart/map/LatLngBounds",["require","./LatLng"],function(t){var e=t("./LatLng"),i=function(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;r>n;n++)this.extend(i[n])};return i.prototype={extend:function(t){var n,r,a=this._southWest,o=this._northEast;if(t instanceof e)n=t,r=t;else{if(!(t instanceof i))return t?this.extend(e.create(t)||i.create(t)):this;if(n=t._southWest,r=t._northEast,!n||!r)return this}return a||o?(a.lat=Math.min(n.lat,a.lat),a.lng=Math.min(n.lng,a.lng),o.lat=Math.max(r.lat,o.lat),o.lng=Math.max(r.lng,o.lng)):(this._southWest=new e(n.lat,n.lng),this._northEast=new e(r.lat,r.lng)),this},pad:function(t){var n=this._southWest,r=this._northEast,a=Math.abs(n.lat-r.lat)*t,o=Math.abs(n.lng-r.lng)*t;return new i(new e(n.lat-a,n.lng-o),new e(r.lat+a,r.lng+o))},getCenter:function(){return new e((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new e(this.getNorth(),this.getWest())},getSouthEast:function(){return new e(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof e?e.create(t):i.create(t);var n,r,a=this._southWest,o=this._northEast;return t instanceof i?(n=t.getSouthWest(),r=t.getNorthEast()):n=r=t,n.lat>=a.lat&&r.lat<=o.lat&&n.lng>=a.lng&&r.lng<=o.lng},intersects:function(t){t=i.create(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>=e.lat&&r.lat<=n.lat,s=a.lng>=e.lng&&r.lng<=n.lng;return o&&s},overlaps:function(t){t=i.create(t);var e=this._southWest,n=this._northEast,r=t.getSouthWest(),a=t.getNorthEast(),o=a.lat>e.lat&&r.lat<n.lat,s=a.lng>e.lng&&r.lng<n.lng;return o&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t){return t?(t=i.create(t),this._southWest.equals(t.getSouthWest())&&this._northEast.equals(t.getNorthEast())):!1},isValid:function(){return!(!this._southWest||!this._northEast)}},i.create=function(t,e){return t instanceof i?t:new i(t,e)},i}),define("utils/PathGenerator",["require","./vMap","../Constants"],function(t){function e(t){return t>1?K:-1>t?-K:Math.asin(t)}function i(t){return t[0]}function n(t){return t[1]}function r(t){return t}function a(){return!0}function o(){return 0}function s(t){return t.innerRadius}function h(t){return t.outerRadius}function l(t){return t.startAngle}function u(t){return t.endAngle}function c(t){return t&&t.padAngle}function d(t,e,i,n){return(t-i)*e-(e-n)*t>0?0:1}function f(t,e,i,n,r){var a=t[0]-e[0],o=t[1]-e[1],s=(r?n:-n)/Math.sqrt(a*a+o*o),h=s*o,l=-s*a,u=t[0]+h,c=t[1]+l,d=e[0]+h,f=e[1]+l,p=(u+d)/2,g=(c+f)/2,m=d-u,v=f-c,_=m*m+v*v,y=i-n,x=u*f-d*c,b=(0>v?-1:1)*Math.sqrt(y*y*_-x*x),T=(x*v-m*b)/_,A=(-x*m-v*b)/_,C=(x*v+m*b)/_,L=(-x*m+v*b)/_,P=T-p,M=A-g,w=C-p,E=L-g;return P*P+M*M>w*w+E*E&&(T=C,A=L),[[T-h,A-l],[T*i/y,A*i/y]]}function p(t,e,i,n){var r=t[0],a=i[0],o=e[0]-r,s=n[0]-a,h=t[1],l=i[1],u=e[1]-h,c=n[1]-l,d=(s*(h-l)-c*(r-a))/(c*o-s*u);return[r+d*o,h+d*u]}function g(t){return"function"==typeof t?t:function(){return t}}function m(t){function e(e){function i(){a.push("M",h(t(l),u))}for(var n,a=[],l=[],c=-1,d=e.length,f=g(r),p=g(o);++c<d;)s.call(this,n=e[c],c)?l.push([+f.call(this,n,c),+p.call(this,n,c)]):l.length&&(i(),l=[]);return l.length&&i(),a.length?a.join(""):null}var r=i,o=n,s=a,h=v,l=h.key,u=.7;return e.x=function(t){return arguments.length?(r=t,e):r},e.y=function(t){return arguments.length?(o=t,e):o},e.defined=function(t){return arguments.length?(s=t,e):s},e.interpolate=function(t){return arguments.length?(l="function"==typeof t?h=t:(h=et.get(t)||v).key,e):l},e.tension=function(t){return arguments.length?(u=t,e):u},e}function v(t){return t.join("L")}function _(t){return v(t)+"Z"}function y(t){for(var e=0,i=t.length,n=t[0],r=[n[0],",",n[1]];++e<i;)r.push("H",(n[0]+(n=t[e])[0])/2,"V",n[1]);return i>1&&r.push("H",n[0]),r.join("")}function x(t){for(var e=0,i=t.length,n=t[0],r=[n[0],",",n[1]];++e<i;)r.push("V",(n=t[e])[1],"H",n[0]);return r.join("")}function b(t){for(var e=0,i=t.length,n=t[0],r=[n[0],",",n[1]];++e<i;)r.push("H",(n=t[e])[0],"V",n[1]);return r.join("")}function T(t,e){return t.length<4?v(t):t[1]+L(t.slice(1,-1),P(t,e))}function A(t,e){return t.length<3?v(t):t[0]+L((t.push(t[0]),t),P([t[t.length-2]].concat(t,[t[1]]),e))}function C(t,e){return t.length<3?v(t):t[0]+L(t,P(t,e))}function L(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return v(t);var i=t.length!=e.length,n="",r=t[0],a=t[1],o=e[0],s=o,h=1;if(i&&(n+="Q"+(a[0]-2*o[0]/3)+","+(a[1]-2*o[1]/3)+","+a[0]+","+a[1],r=t[1],h=2),e.length>1){s=e[1],a=t[h],h++,n+="C"+(r[0]+o[0])+","+(r[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var l=2;l<e.length;l++,h++)a=t[h],s=e[l],n+="S"+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1]}if(i){var u=t[h];n+="Q"+(a[0]+2*s[0]/3)+","+(a[1]+2*s[1]/3)+","+u[0]+","+u[1]}return n}function P(t,e){for(var i,n=[],r=(1-e)/2,a=t[0],o=t[1],s=1,h=t.length;++s<h;)i=a,a=o,o=t[s],n.push([r*(o[0]-i[0]),r*(o[1]-i[1])]);return n}function M(t){if(t.length<3)return v(t);var e=1,i=t.length,n=t[0],r=n[0],a=n[1],o=[r,r,r,(n=t[1])[0]],s=[a,a,a,n[1]],h=[r,",",a,"L",O(rt,o),",",O(rt,s)];for(t.push(t[i-1]);++e<=i;)n=t[e],o.shift(),o.push(n[0]),s.shift(),s.push(n[1]),k(h,o,s);return t.pop(),h.push("L",n),h.join("")}function w(t){if(t.length<4)return v(t);for(var e,i=[],n=-1,r=t.length,a=[0],o=[0];++n<3;)e=t[n],a.push(e[0]),o.push(e[1]);for(i.push(O(rt,a)+","+O(rt,o)),--n;++n<r;)e=t[n],a.shift(),a.push(e[0]),o.shift(),o.push(e[1]),k(i,a,o);return i.join("")}function E(t){for(var e,i,n=-1,r=t.length,a=r+4,o=[],s=[];++n<4;)i=t[n%r],o.push(i[0]),s.push(i[1]);for(e=[O(rt,o),",",O(rt,s)],--n;++n<a;)i=t[n%r],o.shift(),o.push(i[0]),s.shift(),s.push(i[1]),k(e,o,s);return e.join("")}function S(t,e){var i=t.length-1;if(i)for(var n,r,a=t[0][0],o=t[0][1],s=t[i][0]-a,h=t[i][1]-o,l=-1;++l<=i;)n=t[l],r=l/i,n[0]=e*n[0]+(1-e)*(a+r*s),n[1]=e*n[1]+(1-e)*(o+r*h);return M(t)}function O(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]+t[3]*e[3]}function k(t,e,i){t.push("C",O(it,e),",",O(it,i),",",O(nt,e),",",O(nt,i),",",O(rt,e),",",O(rt,i))}function D(t,e){return(e[1]-t[1])/(e[0]-t[0])}function R(t){for(var e=0,i=t.length-1,n=[],r=t[0],a=t[1],o=n[0]=D(r,a);++e<i;)n[e]=(o+(o=D(r=a,a=t[e+1])))/2;return n[e]=o,n}function B(t){for(var e,i,n,r,a=[],o=R(t),s=-1,h=t.length-1;++s<h;)e=D(t[s],t[s+1]),J(e)<q?o[s]=o[s+1]=0:(i=o[s]/e,n=o[s+1]/e,r=i*i+n*n,r>9&&(r=3*e/Math.sqrt(r),o[s]=r*i,o[s+1]=r*n));for(s=-1;++s<=h;)r=(t[Math.min(h,s+1)][0]-t[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])),a.push([r||0,o[s]*r||0]);return a}function I(t){return t.length<3?v(t):t[0]+L(t,B(t))}function G(t){for(var e,i,n,r=-1,a=t.length;++r<a;)e=t[r],i=e[0],n=e[1]-K,e[0]=i*Math.cos(n),e[1]=i*Math.sin(n);return t}function N(t){function e(e){function i(){m.push("M",u(t(_),p),f,d(t(v.reverse()),p),"Z")}for(var n,a,c,m=[],v=[],_=[],y=-1,x=e.length,b=g(r),T=g(s),A=r===o?function(){return a}:g(o),C=s===h?function(){return c}:g(h);++y<x;)l.call(this,n=e[y],y)?(v.push([a=+b.call(this,n,y),c=+T.call(this,n,y)]),_.push([+A.call(this,n,y),+C.call(this,n,y)])):v.length&&(i(),v=[],_=[]);return v.length&&i(),m.length?m.join(""):null}var r=i,o=i,s=0,h=n,l=a,u=v,c=u.key,d=u,f="L",p=.7;return e.x=function(t){return arguments.length?(r=o=t,e):o},e.x0=function(t){return arguments.length?(r=t,e):r},e.x1=function(t){return arguments.length?(o=t,e):o},e.y=function(t){return arguments.length?(s=h=t,e):h},e.y0=function(t){return arguments.length?(s=t,e):s},e.y1=function(t){return arguments.length?(h=t,e):h},e.defined=function(t){return arguments.length?(l=t,e):l},e.interpolate=function(t){return arguments.length?(c="function"==typeof t?u=t:(u=et.get(t)||v).key,d=u.reverse||u,f=u.closed?"M":"L",e):c},e.tension=function(t){return arguments.length?(p=t,e):p},e}function H(t){return t.source}function z(t){return t.target}function U(t){return[t.x,t.y]}function F(t){return t/180*Math.PI}function V(t){return t*Math.sin(F(18))/(Math.sin(F(36))+Math.sin(F(18))*Math.cos(F(36)))}function W(t,e,i){return[(Math.sin(t)*e).toFixed(i),(-Math.cos(t)*e).toFixed(i)]}var X=t("./vMap"),Y=t("../Constants"),q=1e-6,Z=Math.PI,j=2*Z,Q=j-q,K=Z/2,J=Math.abs,$={};$.arc=function(){function t(){var t=Math.max(0,+a.apply(this,arguments)),o=Math.max(0,+m.apply(this,arguments)),s=y.apply(this,arguments)-K,h=x.apply(this,arguments)-K,l=Math.abs(h-s),u=s>h?0:1;if(t>o&&(c=o,o=t,t=c),l>=Q)return i(o,u)+(t?i(t,1-u):"")+"Z";var c,g,T,A,C,L,P,M,w,E,S,O,k=0,D=0,R=[];if((A=(+b.apply(this,arguments)||0)/2)&&(T=_===tt?Math.sqrt(t*t+o*o):+_.apply(this,arguments),u||(D*=-1),o&&(D=e(T/o*Math.sin(A))),t&&(k=e(T/t*Math.sin(A)))),o){C=o*Math.cos(s+D),L=o*Math.sin(s+D),P=o*Math.cos(h-D),M=o*Math.sin(h-D);var B=Math.abs(h-s-2*D)<=Z?0:1;if(D&&d(C,L,P,M)===u^B){var I=(s+h)/2;C=o*Math.cos(I),L=o*Math.sin(I),P=M=null}}else C=L=0;if(t){w=t*Math.cos(h-k),E=t*Math.sin(h-k),S=t*Math.cos(s+k),O=t*Math.sin(s+k);var G=Math.abs(s-h+2*k)<=Z?0:1;if(k&&d(w,E,S,O)===1-u^G){var N=(s+h)/2;w=t*Math.cos(N),E=t*Math.sin(N),S=O=null}}else w=E=0;if((c=Math.min(Math.abs(o-t)/2,+v.apply(this,arguments)))>.001){g=o>t^u?0:1;var H=null==S?[w,E]:null==P?[C,L]:p([C,L],[S,O],[P,M],[w,E]),z=C-H[0],U=L-H[1],F=P-H[0],V=M-H[1],W=1/Math.sin(Math.acos((z*F+U*V)/(Math.sqrt(z*z+U*U)*Math.sqrt(F*F+V*V)))/2),X=Math.sqrt(H[0]*H[0]+H[1]*H[1]);if(null!=P){var Y=Math.min(c,(o-X)/(W+1)),q=f(null==S?[w,E]:[S,O],[C,L],o,Y,u),j=f([P,M],[w,E],o,Y,u);c===Y?R.push("M",q[0],"A",Y,",",Y," 0 0,",g," ",q[1],"A",o,",",o," 0 ",1-u^d(q[1][0],q[1][1],j[1][0],j[1][1]),",",u," ",j[1],"A",Y,",",Y," 0 0,",g," ",j[0]):R.push("M",q[0],"A",Y,",",Y," 0 1,",g," ",j[0])}else R.push("M",C,",",L);if(null!=S){var J=Math.min(c,(t-X)/(W-1)),$=f([C,L],[S,O],t,-J,u),et=f([w,E],null==P?[C,L]:[P,M],t,-J,u);c===J?R.push("L",et[0],"A",J,",",J," 0 0,",g," ",et[1],"A",t,",",t," 0 ",u^d(et[1][0],et[1][1],$[1][0],$[1][1]),",",1-u," ",$[1],"A",J,",",J," 0 0,",g," ",$[0]):R.push("L",et[0],"A",J,",",J," 0 0,",g," ",$[0])}else n&&R.push("L",w,",",E)}else R.push("M",C,",",L),null!=P&&R.push("A",o,",",o," 0 ",B,",",u," ",P,",",M),n&&R.push("L",w,",",E),null!=S&&R.push("A",t,",",t," 0 ",G,",",1-u," ",S,",",O);return r&&R.push("Z"),R.join("")}function i(t,e){return"M0,"+t+"A"+t+","+t+" 0 1,"+e+" 0,"+-t+"A"+t+","+t+" 0 1,"+e+" 0,"+t}var n=!0,r=!0,a=s,m=h,v=o,_=tt,y=l,x=u,b=c;return t.toCenter=function(e){return arguments.length?(n=!!e,t):n},t.closePath=function(e){return arguments.length?(r=!!e,t):r},t.innerRadius=function(e){return arguments.length?(a=g(e),t):a},t.outerRadius=function(e){return arguments.length?(m=g(e),t):m},t.cornerRadius=function(e){return arguments.length?(v=g(e),t):v},t.padRadius=function(e){return arguments.length?(_=e==tt?tt:g(e),t):_},t.startAngle=function(e){return arguments.length?(y=g(e),t):y},t.endAngle=function(e){return arguments.length?(x=g(e),t):x},t.padAngle=function(e){return arguments.length?(b=g(e),t):b},t.centroid=function(){var t=(+a.apply(this,arguments)+ +m.apply(this,arguments))/2,e=(+y.apply(this,arguments)+ +x.apply(this,arguments))/2-K;return[Math.cos(e)*t,Math.sin(e)*t]},t};var tt="auto";$.line=function(){return m(r)};var et=new X({linear:v,"linear-closed":_,step:y,"step-before":x,"step-after":b,basis:M,"basis-open":w,"basis-closed":E,bundle:S,cardinal:C,"cardinal-open":T,"cardinal-closed":A,monotone:I});et.forEach(function(t,e){e.key=t,e.closed=/-closed$/.test(t)});var it=[0,2/3,1/3,0],nt=[0,1/3,2/3,0],rt=[0,1/6,2/3,1/6];return $.line.radial=function(){var t=m(G);return t.radius=t.x,delete t.x,t.angle=t.y,delete t.y,t},x.reverse=b,b.reverse=x,$.area=function(){return N(r)},$.area.radial=function(){var t=N(G);return t.radius=t.x,delete t.x,t.innerRadius=t.x0,delete t.x0,t.outerRadius=t.x1,delete t.x1,t.angle=t.y,delete t.y,t.startAngle=t.y0,delete t.y0,t.endAngle=t.y1,delete t.y1,t},$.diagonal=function(){function t(t,r){var a=e.call(this,t,r),o=i.call(this,t,r),s=(a.y+o.y)/2,h=[a,{x:a.x,y:s},{x:o.x,y:s},o];return h=h.map(n),"M"+h[0]+"C"+h[1]+" "+h[2]+" "+h[3]}var e=H,i=z,n=U;return t.source=function(i){return arguments.length?(e=g(i),t):e},t.target=function(e){return arguments.length?(i=g(e),t):i},t.projection=function(e){return arguments.length?(n=e,t):n},t},$.getMarkerPath=function(t,e){switch(t){case Y.CIRCLE:case Y.CIRCLE_HOLLOW:return $.arc().outerRadius(e)({startAngle:0,endAngle:2*Math.PI});case Y.SQUARE:case Y.SQUARE_HOLLOW:var i=-e+","+-e,n=e+","+-e,r=e+","+e,a=-e+","+e;return"M"+i+"L"+n+"L"+r+"L"+a+"Z";case Y.DIAMOND:case Y.DIAMOND_HOLLOW:e=2*e/Math.sqrt(2);var o=-e+",0",s="0,"+-e,h=e+",0",l="0,"+e;return"M"+o+"L"+s+"L"+h+"L"+l+"Z";case Y.TRIANGLE:case Y.TRIANGLE_HOLLOW:var u=Math.sqrt(3),o=-2*e/u+","+e,s="0,"+-e,h=2*e/u+","+e;return"M"+o+"L"+s+"L"+h+"Z";case Y.STAR:e*=1.4;for(var c=V(e),d="",f=-1;++f<5;){var p=f*F(72),g=p+F(36),m=W(p,e,3),v=W(g,c,3),_=f?"L":"M";d+=_+m[0]+","+m[1],d+="L"+v[0]+","+v[1]}return d+="z"}},$}),define("vector/shape/CircleMarker",["require","./Path","../../utils/BaseUtils","../../chart/map/LatLng","../../chart/map/LatLngBounds","../../utils/PathGenerator"],function(t){var e=t("./Path"),i=t("../../utils/BaseUtils"),n=t("../../chart/map/LatLng"),r=t("../../chart/map/LatLngBounds"),a=t("../../utils/PathGenerator"),o=e.extend({initialize:function(t,e,r){i.setOptions(this,e),this._latlng=n.create(t),this._radius=r,this._circle=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0)},setLatLng:function(t){return this._latlng=n.create(t),this.redraw(),this.fire("move",{latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this._radius=t,this.redraw()},getRadius:function(){return this._radius},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,i=this._clickTolerance(),n=[t+i,e+i];this._pxBounds=new r(this._point.subtract(n),this._point.add(n))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._path.attr({d:this._circle.outerRadius(this._radius)(),transform:i.makeTranslate(this._point)}),this.setStyle()},_empty:function(){return!this._renderer._bounds.intersects(this._pxBounds)}});return o}),define("chart/map/Marker",["require","./../../vector/Layer","./Icon","../../utils/BaseUtils","./LatLng","../../dom/DomUtils"],function(t){var e=t("./../../vector/Layer"),i=t("./Icon"),n=t("../../utils/BaseUtils"),r=t("./LatLng"),a=t("../../dom/DomUtils"),o=e.extend({options:{icon:new i.Default,interactive:!0,draggable:!1,keyboard:!0,title:"",alt:"",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",nonBubblingEvents:["click","dblclick","mouseover","mouseout","contextmenu"]},initialize:function(t,e){n.setOptions(this,e),this._latlng=r.create(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=r.create(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},update:function(){if(this._icon){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),i=t.icon.createIcon(this._icon),n=!1;i!==this._icon&&(this._icon&&this._removeIcon(),n=!0,t.title&&(i.title=t.title),t.alt&&(i.alt=t.alt)),a.addClass(i,e),t.keyboard&&(i.tabIndex="0"),this._icon=i,n&&this.getPane().appendChild(this._icon)},_removeIcon:function(){a.remove(this._icon),this._icon=null},_setPos:function(t){a.setPosition(this._icon,t),this._shadow&&a.setPosition(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon.style.zIndex=this._zIndex+t},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_resetZIndex:function(){this._updateZIndex(0)},node:function(){return this._icon},setStyle:function(){}});return o}),define("vector/shape/ScatterMarker",["require","./Path","../../utils/BaseUtils","../../chart/map/LatLng","../../utils/PathGenerator"],function(t){var e=t("./Path"),i=t("../../utils/BaseUtils"),n=t("../../chart/map/LatLng"),r=t("../../utils/PathGenerator"),a=e.extend({initialize:function(t,e,r){i.setOptions(this,e),this._latlng=n.create(t),this._marker=r},getLatLng:function(){return this._latlng},_getMarkerPath:function(){var t=this._marker.symbol||"circle",e=this._marker.radius||4.5;return r.getMarkerPath(t,e)},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._path.attr({d:this._getMarkerPath(),transform:i.makeTranslate(this._point)})},_empty:function(){return!this._renderer._bounds.intersects(this._pxBounds)}});return a}),define("vector/shape/TextLayer",["require","../../vector/Layer","../../chart/map/LatLng","../../utils/BaseUtils","../../utils/ColorUtils","../../dom/DomUtils"],function(t){var e=t("../../vector/Layer"),i=t("../../chart/map/LatLng"),n=t("../../utils/BaseUtils"),r=t("../../utils/ColorUtils"),a=t("../../dom/DomUtils"),o=4,s=e.extend({initialize:function(t,e){this._latlng=i.create(t),this._dataPoint=e},setStyle:function(t){this._latlng=t,this.onRemove(),this.onAdd()},beforeAdd:function(t){this._renderer=t.getMapRenderer(this)},onAdd:function(){this._text=document.createElement("div"),this._text.style.position="absolute",this._text.style.zIndex=1001,this._text.style["pointer-events"]="none",this.getPane().appendChild(this._text);var t=this._dataPoint,e=t.labelContent,i=t.options.marker,a=t.series.type,s=-t.labelDim.height/2;if("scatter"==a||"pointMap"==a)if(i&&!n.isImageMarker(i.symbol)){var h=i.radius||4.5;s=-h-t.labelDim.height}else{var l=i?i.height:t.options.icon.iconSize[1];s=-l/2-t.labelDim.height}s-=o;for(var u=0,c=e.length;c>u;u++){var d=e[u],f=d.dim,p=d.text,g=d.style,m=document.createElement("div");m.innerHTML=p,m.style.zIndex=1001,m.style.position="absolute",m.style.left=-f.width/2+"px",m.style.top=s+"px",m.style.overflow="hidden",m.style.whiteSpace="nowrap";for(var v in g)"color"==v&&"inherit"!=g.color?m.style.color=r.colorToHex(g.color):m.style[v]=g[v];this._text.appendChild(m),s+=f.height+2}this._reset()},onRemove:function(){a.remove(this._text)},getEvents:function(){return{zoomend:this._project,moveend:this._update,viewreset:this._reset}},_reset:function(){this._project(),this._update()},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng)},_update:function(){this._map&&(this._text.style.left=this._point.x+"px",this._text.style.top=this._point.y+"px")}});return s}),define("chart/map/PosAnimation",["require","../../dom/Evented","../../dom/DomUtils","../../utils/BaseUtils"],function(t){var e=t("../../dom/Evented"),i=t("../../dom/DomUtils"),n=t("../../utils/BaseUtils"),r=e.extend({run:function(t,e,n,r){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(r||.5,.2),this._startPos=i.getPosition(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=n.requestAnimFrame(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,i=1e3*this._duration;i>e?this._runFrame(this._easeOut(e/i),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),i.setPosition(this._el,n),this.fire("step")},_complete:function(){n.cancelAnimFrame(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}});return r}),define("vans/VanChartBaseMap",["require","./VanChart","../utils/BaseUtils","../dom/DomUtils","../Constants","../dom/Evented","../dom/Browser","../utils/Point2D","../utils/Bounds","../chart/map/LatLng","../chart/map/LatLngBounds","../chart/map/PosAnimation"],function(t){var e=t("./VanChart"),i=t("../utils/BaseUtils"),n=t("../dom/DomUtils"),r=(t("../Constants"),t("../dom/Evented"),t("../dom/Browser")),a=t("../utils/Point2D"),o=t("../utils/Bounds"),s=t("../chart/map/LatLng"),h=t("../chart/map/LatLngBounds"),l=t("../chart/map/PosAnimation"),u=e.extend({setView:function(t,e,n){if(e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(s.create(t),e,this.options.maxBounds),n=n||{},this._stop(),this._loaded&&!n.reset&&n!==!0){void 0!==n.animate&&(n.zoom=i.extend({animate:n.animate},n.zoom),n.pan=i.extend({animate:n.animate,duration:n.duration},n.pan));var r=this._zoom!==e?this._tryAnimatedZoom(t,e,n.zoom):this._tryAnimatedPan(t,n.pan);if(r)return clearTimeout(this._sizeTimer),this}return this._resetView(t,e),this},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(r.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(r.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,i){var n=this.getZoomScale(e),r=this.getSize().divideBy(2),o=t instanceof a?t:this.latLngToContainerPoint(t),s=o.subtract(r).multiplyBy(1-1/n),h=this.containerPointToLatLng(r.add(s));return this.setView(h,e,{zoom:i})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():h.create(t);var i=a.create(e.paddingTopLeft||e.padding||[0,0]),n=a.create(e.paddingBottomRight||e.padding||[0,0]),r=this.getBoundsZoom(t,!1,i.add(n));r="number"==typeof e.maxZoom?Math.min(e.maxZoom,r):r;var o=n.subtract(i).divideBy(2),s=this.project(t.getSouthWest(),r),l=this.project(t.getNorthEast(),r),u=this.unproject(s.add(l).divideBy(2).add(o),r);return{center:u,zoom:r}},fitBounds:function(t,e){if(t=h.create(t),!t.isValid())throw new Error("Bounds are not valid.");var i=this._getBoundsCenterZoom(t,e);return this.setView(i.center,i.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(t=a.create(t).round(),e=e||{},!t.x&&!t.y)return this.fire("moveend");
if(e.animate!==!0&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new l,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),e.animate!==!1){n.addClass(this._mapPane,"leaflet-pan-anim");var i=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,i,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},setMaxBounds:function(t){return t=h.create(t),t.isValid()?(this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this.off("moveend",this._panInsideMaxBounds))},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,h.create(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},invalidateSize:function(t){if(!this._loaded)return this;t=i.extend({animate:!1,pan:!0},t===!0?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),r=e.divideBy(2).round(),a=n.divideBy(2).round(),o=r.subtract(a);return o.x||o.y?(t.animate&&t.pan?this.panBy(o):(t.pan&&this._rawPanBy(o),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(i.bind(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},remove:function(){n.remove(this._mapPane),n.remove(this._controlContainer),this._loaded&&this.fire("unload");for(var t in this._layers)this._layers[t].remove();return e.prototype.remove.call(this),this},createPane:function(t,e){var i="leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),r=n.create("div",i,e||this._mapPane);return t&&(this._panes[t]=r),r},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter:this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds(),e=this.unproject(t.getBottomLeft()),i=this.unproject(t.getTopRight());return new h(e,i)},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=h.create(t),i=a.create(i||[0,0]);var n=this.getZoom()||0,o=this.getMinZoom(),s=this.getMaxZoom(),l=t.getNorthWest(),u=t.getSouthEast(),c=this.getSize().subtract(i),d=this.project(u,n).subtract(this.project(l,n)),f=r.any3d?this.options.zoomSnap:1,p=Math.min(c.x/d.x,c.y/d.y);return n=this.getScaleZoom(p,n),f&&(n=Math.round(n/(f/100))*(f/100),n=e?Math.ceil(n/f)*f:Math.floor(n/f)*f),Math.max(o,Math.min(s,n))},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new o(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(s.create(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(a.create(t),e)},layerPointToLatLng:function(t){var e=a.create(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){var e=this.project(s.create(t))._round();return e._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(s.create(t))},distance:function(t,e){return this.options.crs.distance(s.create(t),s.create(e))},containerPointToLayerPoint:function(t){return a.create(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return a.create(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(a.create(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(s.create(t)))},mouseEventToContainerPoint:function(t){return n.getMousePos(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=n.get(t);n.addClass(e,"leaflet-grab")},addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){function t(t,a){var o=i+t+" "+i+a;e[t+a]=n.create("div",o,r)}var e=this._controlCorners={},i="leaflet-",r=this._controlContainer=n.create("div",i+"control-container",this._container);t("top","left"),t("bottom","right")},_resetView:function(t,e){n.setPosition(this._mapPane,new a(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r)._move(t,e)._moveEnd(r),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t){return t&&this.fire("zoomstart"),this.fire("movestart")},_move:function(t,e,i){void 0===e&&(e=this._zoom);var n=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),(n||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return i.cancelAnimFrame(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){n.setPosition(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_onResize:function(){i.cancelAnimFrame(this._resizeRequest),this._resizeRequest=i.requestAnimFrame(function(){this.invalidateSize({debounceMoveend:!0})},this)},_performZoom:function(){var t=this,e=t.getZoom(),i=this.options.zoomSnap||0;t._stop();var n=this._delta/(4*this.options.wheelPxPerZoomLevel),r=4*Math.log(2/(1+Math.exp(-Math.abs(n))))/Math.LN2,a=i?Math.ceil(r/i)*i:r,o=t._limitZoom(e+(this._delta>0?a:-a))-e;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return n.getPosition(this._mapPane)||new a(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){var i=t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin();return i.subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var i=this.getSize()._divideBy(2);return this.project(t,e)._subtract(i)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return this.project(t,e)._subtract(n)},_latLngBoundsToNewLayerBounds:function(t,e,i){var n=this._getNewPixelOrigin(i,e);return o.create([this.project(t.getSouthWest(),e)._subtract(n),this.project(t.getNorthWest(),e)._subtract(n),this.project(t.getSouthEast(),e)._subtract(n),this.project(t.getNorthEast(),e)._subtract(n)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,i){if(!i)return t;var n=this.project(t,e),r=this.getSize().divideBy(2),a=new o(n.subtract(r),n.add(r)),s=this._getBoundsOffset(a,i,e);return s.round().equals([0,0])?t:this.unproject(n.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new o(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=o.create(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),r=n.min.subtract(t.min),s=n.max.subtract(t.max),h=this._rebound(r.x,-s.x),l=this._rebound(r.y,-s.y);return new a(h,l)},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=r.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){n.removeClass(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._floor();return(e&&e.animate)===!0||this.getSize().contains(i)?(this.panBy(i,e),!0):!1},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||n.animate===!1||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var r=this.getZoomScale(e),a=this._getCenterOffset(t)._divideBy(1-1/r);return n.animate===!0||this.getSize().contains(a)?(i.requestAnimFrame(function(){this._moveStart(!0)._animateZoom(t,e,!0)},this),!0):!1},_animateZoom:function(t,e,r,a){r&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,n.addClass(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:a}),setTimeout(i.bind(this._onZoomTransitionEnd,this),250)},_onZoomTransitionEnd:function(){this._animatingZoom&&(n.removeClass(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom),i.requestAnimFrame(function(){this._moveEnd(!0)},this))},addLayer:function(t){var e=i.stamp(t);return this._layers[e]?this:(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t),this)},removeLayer:function(t){var e=i.stamp(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return!!t&&i.stamp(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addZoomLimit:function(t){(isNaN(t.options.maxZoom)||!isNaN(t.options.minZoom))&&(this._zoomBoundLayers[i.stamp(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=i.stamp(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-(1/0);this._getZoomSpan();for(var i in this._zoomBoundLayers){var n=this._zoomBoundLayers[i].options;t=void 0===n.minZoom?t:Math.min(t,n.minZoom),e=void 0===n.maxZoom?e:Math.max(e,n.maxZoom)}this._layersMaxZoom=e===-(1/0)?void 0:e,this._layersMinZoom=t===1/0?void 0:t,void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});return u}),define("vans/VanChartMap",["require","../vector/SvgRenderer","../vector/VmlRenderer","../vector/CanvasRenderer","./VanChartLayout","../ChartLibrary","../ComponentLibrary","../chart/map/LineMapLayer","../chart/map/HeatMapOverlay","../chart/map/Icon","../utils/QueryUtils","../utils/BaseUtils","../dom/DomUtils","../dom/Browser","../Constants","../utils/BoundsManager","../chart/map/CRS","../utils/Point2D","../chart/map/LatLng","../vector/shape/LayerGroup","../vector/shape/CircleMarker","../chart/map/Marker","../vector/shape/ScatterMarker","../vector/shape/TextLayer","./VanChartBaseMap","./VanChartLibrary","./VanChartLibrary","./VanChartLibrary","./VanChartLibrary"],function(t){var e=t("../vector/SvgRenderer"),i=t("../vector/VmlRenderer"),n=t("../vector/CanvasRenderer"),r=t("./VanChartLayout"),a=t("../ChartLibrary"),o=t("../ComponentLibrary"),s=t("../chart/map/LineMapLayer"),h=t("../chart/map/HeatMapOverlay"),l=t("../chart/map/Icon"),u=(t("../utils/QueryUtils"),t("../utils/BaseUtils")),c=t("../dom/DomUtils"),d=t("../dom/Browser"),f=t("../Constants"),p=t("../utils/BoundsManager"),g=(t("../chart/map/CRS"),t("../utils/Point2D")),m=t("../chart/map/LatLng"),v=t("../vector/shape/LayerGroup"),_=t("../vector/shape/CircleMarker"),y=t("../chart/map/Marker"),x=t("../vector/shape/ScatterMarker"),b=t("../vector/shape/TextLayer"),T=t("./VanChartBaseMap"),A=T.extend({vanChartType:"vanChartMap",_initDomLayout:function(t){var e=this.options;this._initContainer(t),this._initLayout(),this.on(this.getEvents(),this),this.dom=this._controlCorners.topleft,e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(m.create(e.center),e.zoom,{reset:!0}),this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._zoomAnimated=c.TRANSITION&&d.any3d&&!d.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated,T.prototype._initDomLayout.call(this,this._controlCorners.topleft)},setOptions:function(t){T.prototype.setOptions.call(this,t),t=this.options,(t.backgroundImage||t.backgroundColor)&&u.setDomBackground(this.wrapDom,{backgroundImage:t.backgroundImage,backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,borderRadius:t.borderRadius,shadow:t.shadow}),0!==this.layerIndex&&this.layerMap&&this.layerMap.length&&(this.series.forEach(function(t){t.remove()}),this.components.geo.remove(),this.series=this.layerMap[0].series,this.components.geo=this.layerMap[0].geo)},getMapRenderer:function(){var t=this._panes.overlayPane;return this.mapRenderer||(this.mapRenderer=u.isSupportSVG()?new e(t,this):new i(t,this),this.addLayer(this.mapRenderer)),this.mapRenderer},getEvents:function(){return{mousemove:this._onMouseMove,scroll:this._onScroll,panstart:this._onPanStart,panmove:this._onPanMove,panend:this._onPanEnd,wheel:this._onWheelScroll,pinchmove:this._onPinch,zoom:this._onZoom}},registerInteractiveTarget:function(t,e){T.prototype.registerInteractiveTarget.call(this,t,e),t.addEventParent(this)},_zoomEnabled:function(){return this.options.geo.zoom},_onMouseMove:function(t){this.cancelLegendHighlight(t.containerPoint)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onPanStart:function(t){this._zoomEnabled()&&(this._initPos=c.getPosition(this._mapPane),this._startPoint=t.containerPoint,this._stop())},_onPanMove:function(t){if(this._zoomEnabled()){u.cancelAnimFrame(this._animRequest);var e=t.containerPoint.subtract(this._startPoint);this._newPos=this._initPos.add(e),this._animRequest=u.requestAnimFrame(function(){c.setPosition(this._mapPane,this._newPos)},this,!0),c.addClass(document.body,"leaflet-dragging")}},_onPanEnd:function(){if(this._zoomEnabled()){this.fire("moveend"),c.removeClass(document.body,"leaflet-dragging");var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())}},_onPinch:function(t){if(this._zoomEnabled()){var e=this;this._pinchZoom=e._limitZoom(e.getZoom()+t.scale-1),this._pinchCenter=t.center,this._pinchStartTime||(this._pinchStartTime=+new Date);var i=this.options.wheelDebounceTime,n=Math.max(i-(+new Date-this._pinchStartTime),0);clearTimeout(this._pinchTimer),this._pinchTimer=setTimeout(function(){e._stop(),e._pinchStartTime=null,e.setZoomAround(g.create(e._pinchCenter),e._pinchZoom)},n)}},_onWheelScroll:function(t){if(this._zoomEnabled()){t=t.srcEvent;var e=c.getWheelDelta(t),i=this.options.wheelDebounceTime;this._delta=u.pick(this._delta,0),this._delta+=e,this._lastMousePos=this.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var n=Math.max(i-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(u.bind(this._performZoom,this),n),c.stop(t)}},_animationEnd:function(){this.series.forEach(function(t){t._drawEffectPoints()})},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.animationCount||this.fire("animationEnd")},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&d.any3d,c.addClass(t,"leaflet-container"+(d.touch?" leaflet-touch":"")+(d.retina?" leaflet-retina":"")+(d.ielt9?" leaflet-oldie":"")+(d.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=c.getStyle(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos()},_initPanes:function(){var t=this._panes={};this._mapPane=this.createPane("mapPane",this._container),c.setPosition(this._mapPane,new g(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("markerPane"),this.options.markerZoomAnimation||c.addClass(t.markerPane,"leaflet-zoom-hide")},layoutComponentsAndCharts:function(){this.initLayerInfo();var t=this;t.bounds=t._getDefaultBounds(),o.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()},this),this.reRenderSeries()},filterRender:function(){this.renderSeries()},_updateSeriesStyle:function(){this.validPoints.forEach(function(t){if(t.layers){var e=t.series._getDynamicStyle(t);t.layers.forEach(function(t){t.setStyle(e)})}})},reRenderWholePlot:function(){var t=this.components[o.LEGEND_COMPONENT];t&&t.render(),this.reRenderSeries()},refreshRestore:function(){this._initIntermediateState();for(var t in this.components)this.components[t].refresh();this.series.forEach(function(t,e){t.refresh(t.options,e)});var e=this.components[o.RANGE_LEGEND_COMPONENT];e&&e.initAttributesWithSeries(),this.series.forEach(function(t){if(t.type!==f.LINE_MAP||!t.options.large)for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),this.layoutComponentsAndCharts()},reRenderSeries:function(){this.hoverPoint=this.hoverSeries=null,this.calculateMapSeries(),this.render()},calculateMapSeries:function(){var t=this;t.hoverPoint=null,t.hoverSeries=null;var e=t.seriesOfType(f.BUBBLE_CHART);r.calculateBubbleRadius(e);for(var i={},n={},a=this.series,o=0,s=a.length;s>o;o++){var h=0,l=a[o],c=l.type,d=l.points;d.forEach(function(t){h=u.accAdd(h,Math.abs(t.getTargetValue()))}),d.forEach(function(t){t.percentage=Math.abs(t.getTargetValue()/h);var e=t.options.lnglat?t.options.lnglat.join("-"):t.name;e+=c;var r=t.isNull?n:i;r[e]=r[e]||[],r[e].push(t)})}for(var p in i){var g=i[p].concat(n[p]||[]);g.forEach(function(t){if(c!==f.LINE_MAP){if(t.points=g,!t.options.drilldown)for(var e=g.length-1;e>=0;e--)g[e].options.drilldown&&(t.options.drilldown=g[e].options.drilldown,t.geo=g[e].geo);t.series.calculateLabelInfo(t)}})}this.validPoints=this._getMapPoints()},_getMapPoints:function(){var t=this,e={},i=[],n=t.getCurrentGeo(),r=this.getComponent(o.LEGEND_COMPONENT);return t.series.forEach(function(a,o){var s=a.points,h=a.type;if(h!==f.LINE_MAP&&h!==f.HEAT_MAP)for(var l=0,u=s.length;u>l;l++){var c=s[l];if(t.isMapPointVisible(c)){if(0!==o||!c.isNull||!c.options.drilldown){var d=n.getFeaturesByName(c.name,h);if(d||c.options.lnglat){var p=h==f.AREA_MAP?c.name:n.getDataPointLngLat(c,d&&d[0]).join("-");!e[p]||r&&h==f.BUBBLE_CHART?(i.push(c),e[p]=!0):t.removePointGraphics(c)}}}else t.removePointGraphics(c)}}),i},isMapPointVisible:function(t){var e=this.getComponent(o.RANGE_LEGEND_COMPONENT);if(e&&t.points&&t.points.length&&(t=t.points[0]),t.isNull){var i=t.series.type,n=t.options.marker,r=n&&u.isImageMarker(n.symbol),a=i==f.AREA_MAP?t.options.drilldown:i==f.POINT_MAP||r;return t&&t.visible&&t.series.visible&&a}return t.isVisible()},initLayerInfo:function(){if(!this.layerMap){this.layerMap=[],this.layerIndex=0;var t=this.getComponent(o.GEO_COMPONENT),e=this.series;this.layerMap=[{series:e,geo:t,layerIndex:this.layerIndex,drillUpDataPoint:e[0]&&e[0].points[0]}];var i=this.options.initDrillPath;if(i&&i.length>1)for(var n=1;n<i.length;n++){for(var r=i[n],a=null,s=0;s<e.length;s++){for(var h=e[s].points,l=0;l<h.length;l++)if(h[l].options.drilldown&&h[l].options.drilldown.geo.name==r){a=h[l];break}if(a)break}if(a){this._createChildSeriesWhenLoaded(a),this.layerMap[this.layerIndex].drillUpDataPoint=a,this.series=e=a.childSeries;var u=this.getComponent(o.RANGE_LEGEND_COMPONENT);u&&u.initAttributesWithSeries(),e.forEach(function(t){for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),this.layerIndex++,t=a.geo,this.layerMap[this.layerIndex]={geo:t,series:e,layerIndex:this.layerIndex},this.setComponent(t,o.GEO_COMPONENT)}}}},_createChildSeriesWhenLoaded:function(t){if(!t.childSeries){var e=[],i=this;i.parentPoint=t,t.options.drilldown.series.forEach(function(t,n){var r=t.type||i.options.chartType,o=a.get(r);e.push(new o(t,i,n))}),t.childSeries=e}},drillDown:function(t){var e=this.layerMap[this.layerIndex-1];if(t.options.drilldown&&t.options.drilldown.series&&(!e||e.drillUpDataPoint!=t)){var i=this.layerMap[this.layerIndex].geo;this._createChildSeriesWhenLoaded(t),this.layerMap[this.layerIndex].drillUpDataPoint=t,this._setNewGeoAndSeries(t.geo,i,t.childSeries,++this.layerIndex)}},drillUp:function(t){var e=this;if(t.series!=e.series){var i=this.layerMap[t.layerIndex+1].geo;this._setNewGeoAndSeries(t.geo,i,t.series,t.layerIndex)}},_setNewGeoAndSeries:function(t,e,i,n){for(var r=this,a=0,s=r.series.length;s>a;a++){var h=r.series[a],l=h.type,u=h.points;u.forEach(function(t){r.removePointGraphics(t,l)})}r.series=i;var c=r.getComponent(o.RANGE_LEGEND_COMPONENT);c&&c.initAttributesWithSeries(),i.forEach(function(t){for(var e=0,i=t.points.length;i>e;e++)t.points[e].refreshPointColor()}),this.layerMap[n]={geo:t,series:i,layerIndex:n,drillUpDataPoint:i[0]&&i[0].points[0]},this.layerIndex=n,this.layerMap=this.layerMap.slice(0,n+1),e&&e.remove(),this.setComponent(t,o.GEO_COMPONENT),this.layoutComponentsAndCharts()},cancelLegendHighlight:function(t){var e=this.highlightTarget;T.prototype.cancelLegendHighlight.call(this,t),this._lineMapLayer&&e&&this._lineMapLayer.redraw()},makeLegendHighlight:function(t){T.prototype.makeLegendHighlight.call(this,t),this._lineMapLayer&&this._lineMapLayer.redraw()},getEffectLayer:function(){var t=this;return t._effectLayer||(t._effectLayer=(new v).addTo(t)),t._effectLayer},renderSeries:function(){this.getComponent(o.TOOLTIP_COMPONENT).immediateHide();var t=this,e=(t.series,t.getComponent(o.GEO_COMPONENT));this._pointLayer=this._pointLayer||(new v).addTo(this);var i=[f.SCATTER_CHART,f.BUBBLE_CHART];this.largeSeries=i.reduce(function(t,e){return t[e]=t[e]||{visible:!0,type:e},t[e].points=[],t},this.largeSeries||{});var n=this.largeSeries;this.validPoints.forEach(function(i){var r=t.isMapPointVisible(i),a=i.series.type;if(i.series.options.large&&n[a]){if(!r)return;n[a].points.push(i)}else if(r){var o=i.series.getStyle(i),s=e.getFeaturesByName(i.name,a);i.layers?i.layers.forEach(function(e){e.setStyle(o),t.registerInteractiveTarget(i,e)}):(i.layers=[],s=i.options.lnglat?["null"]:s,s.forEach(function(n){var r;a==f.AREA_MAP?(r=e.getLayerByFeature(n),r.setStyle(o)):r=t.createPointLayer(n,i,o),i.layers.push(r),t.registerInteractiveTarget(i,r)}))}else t.removePointGraphics(i,a)}),i.map(function(e){n[e].points.length&&t._renderCanvas(n[e])}),this._renderHeatMap(),this._renderLineMap(),this.updateLabel(),this.fire("animationStart")},_renderCanvas:function(t){var e=this;if(!t._canvas){var i=e.getSize(),r={width:i.x,height:i.y,x:0,y:0,dpr:window.devicePixelRatio||1};t._canvas=new n(e._panes.overlayPane,e,r),t._canvas.onAdd(),e.on("moveend",e._resetCanvas.bind(e,t),e),e.options.zoomAnimation&&d.any3d&&e.on("zoomanim",e._resetCanvas.bind(e,t),e),e.on({tap:function(t){var i=e.hoverPoint;i&&i._onPointTap(t)},mousemove:function(t){var i=e.handler._getCanvasClosestPoint(t.containerPoint);i?(i._events||i.getEvents&&i.on(i.getEvents(),i),e.showTooltip(i,t),e.hoverPoint=i,i.options.click&&e.handler.cursor("pointer")):e.hoverPoint||(e.hideTooltip(),e.handler.cursor(""))}})}e._resetCanvas(t)},_resetCanvas:function(t){var e=this,i=e.getComponent(o.GEO_COMPONENT);t.points.map(function(n){var r=i.getFeaturesByName(n.name,t.type);r=n.options.lnglat?["null"]:r,r.map(function(t){var i=n.getLatLng(t),r=e.latLngToLayerPoint(i);n.posX=r.x,n.posY=r.y})}),t._canvas.clearAll(),t._canvas.addSeries(t)},_onZoom:function(){var t=this,e=t.hoverPoint,i=t.getZoom();if(e&&e.geo){var n=e.geo.getZoomListener();if(n&&i>=n)return void t.drillDown(e)}var r=t.layerMap[t.layerIndex-1];r&&r.geo.getZoomListener()>i&&t.drillUp(r),clearTimeout(this.labelRelaoutTimeOut),this.labelRelaoutTimeOut=setTimeout(function(){t.updateLabel()},200)},updateLabel:function(){if(this._fixConflictLabel(),!this._needShowMoreLabel()||this.layerIndex>0)return void this._updateNormalLabel();var t=this;t._moreLabelTimeOut&&clearTimeout(t._moreLabelTimeOut),t._removeNormalLabels(),t._updateMoreLabels(),t._moreLabelTimeOut=setTimeout(function(){t._changeDataState=!1,t._clearMoreLabels(),t._updateNormalLabel()},1e3)},_updateMoreLabels:function(){var t=this;this.validPoints&&this.validPoints.filter(function(t){return t.series.type!=f.LINE_CHART&&t.series.type!=f.HEAT_MAP}).forEach(function(e){var i=e.getLatLng();if(t.isMapPointVisible(e)&&i){var n=t.latLngToLayerPoint(i),r=n.y,a=null;e.series.type==f.POINT_MAP&&(r-=e.options.icon.iconSize[1]/2,a=function(t,e){return t-e/2-5}),e.moreLabelG=t.getMapRenderer().text().add(),e.series._showAndExitMoreLabel(e,n.x,r,null,a,e.moreLabelG)}})},_removeNormalLabels:function(){var t=this.validPoints.concat(this._getHeatMapPoints()),e=this._textGroup;t.forEach(function(t){t.textLayers&&(t.textLayers.forEach(function(t){e.removeLayer(t)}),t.textLayers=null)})},_updateNormalLabel:function(){var t=this,e=t.getCurrentGeo(),i=this.validPoints.concat(this._getHeatMapPoints());this._textGroup=this._textGroup||(new v).addTo(t);var n=this._textGroup;i.forEach(function(i){var r=i.series.type,a=e.getFeaturesByName(i.name,r);a=i.options.lnglat?["null"]:a,i.labelPos&&i.labelContent&&a?a.forEach(function(e,n){i.labelPos[n]&&(i.textLayers=i.textLayers||[],i.textLayers[n]?i.textLayers[n].setStyle(i.getLatLng(e)):i.textLayers[n]=new b(i.getLatLng(e),i).addTo(t._textGroup))}):i.textLayers&&(i.textLayers.forEach(function(t){n.removeLayer(t)}),i.textLayers=null)})},_fixConflictLabel:function(){var t=this,e=new p,i=t.getCurrentGeo(),n=this.validPoints.concat(this._getHeatMapPoints());n.forEach(function(n){var r=n.series.type;if(n.labelPos=null,t.isMapPointVisible(n)&&r==f.AREA_MAP&&n.labelContent){var a=i.getFeaturesByName(n.name,r);a.forEach(function(i,r){if(n.labelPos=n.labelPos||[],i.properties.center){var a=t._getTextBounds(n,i);n.labelPos[r]=a,e.addBounds(a)}else n.labelPos[r]=null}),n.labelPos&&!n.labelPos.filter(function(t){return!!t}).length&&(n.labelPos=null)}}),n.forEach(function(n){if(n.labelContent&&t.isMapPointVisible(n)){var r=n.series.type,a=i.getFeaturesByName(n.name,r);a=n.options.lnglat?["null"]:a,a&&a.forEach(function(i,r){if(!n.labelPos||!n.labelPos[r]){var a=t._getTextBounds(n,i);e.isOverlapped(a)?(n.labelPos=n.labelPos||[],n.labelPos[r]=null):(n.labelPos=n.labelPos||[],n.labelPos[r]=a,e.addBounds(a))}n.labelPos&&!n.labelPos.filter(function(t){return!!t}).length&&(n.labelPos=null)})}})},_getTextBounds:function(t,e){var i=this,n=t.getLatLng(e),r=i.latLngToContainerPoint(n),a=r.y,o=t.series.type,s=t.options.marker,h=t.options.icon;if(o==f.AREA_MAP||o==f.BUBBLE_CHART||o==f.HEAT_MAP)a-=t.labelDim.height/2;else if(s&&!u.isImageMarker(s.symbol)){var l=s.radius||4.5;a-=l+t.labelDim.height}else{var c=h?h.iconSize[1]:s.height;a-=c/2+t.labelDim.height}return u.makeBounds([r.x,a],t.labelDim)},createPointLayer:function(t,e,i){var n,r=e.series.type,a=e.getLatLng(t);switch(r){case f.BUBBLE_CHART:n=new _(a,i,e.radius).addTo(this._pointLayer);break;case f.POINT_MAP:n=new y(a,{icon:new l(e.options.icon)}).addTo(this._pointLayer);break;case f.SCATTER_CHART:var o=e.options.marker,s=u.isImageMarker(o.symbol);s&&(i={icon:new l({iconSize:[o.width,o.height],iconUrl:o.symbol})}),n=s?new y(a,i):new x(a,i,e.options.marker),n.addTo(this._pointLayer)}return n},getCurrentGeo:function(){return this.layerMap?this.layerMap[this.layerMap.length-1].geo:this.components.geo},_getHeatMapPoints:function(){var t=this.seriesOfType(f.HEAT_MAP),e=this,i=[],n=e.getComponent(o.GEO_COMPONENT);if(t&&t.length)for(var r=0,a=t.length;a>r;r++)t[r].points.forEach(function(t){if(!t.options.lnglat){var r=n.getFeaturesByName(t.name,f.HEAT_MAP);t.options.lnglat=n.getDataPointLngLat(t,r&&r[0])}!t.isNull&&t.visible&&t.options.lnglat?i.push(t):e.removePointGraphics(t,f.HEAT_MAP)});return i},_renderHeatMap:function(){var t=this.seriesOfType(f.HEAT_MAP),e=this.getComponent(o.RANGE_LEGEND_COMPONENT);if(t&&t.length&&e){var i={min:e._getMin(),max:e._getMax(),data:this._getHeatMapPoints()};if(!this._heatMapOverlay){var n=t[0].options,r={maxOpacity:n.maxOpacity,minOpacity:n.minOpacity,radius:n.radius,blur:n.blur,gradient:e._getGradient(),valueField:"value"};this._heatMapOverlay=new h(r).addTo(this)}this._heatMapOverlay.setData(i)}},removePointGraphics:function(t,e){if(t){e=e||t.series.type;var i=this.getCurrentGeo();if(e===f.LINE_MAP&&(this._lineMapLayer.removeEffect(t),t.remove()),t.layers)if(e==f.AREA_MAP)t.layers.forEach(function(t){t.setStyle(i.defaultAreaStyle())});else{var n=this._pointLayer;t.layers.forEach(function(t){n.removeLayer(t)}),t.layers=null}var r=this._textGroup;t.textLayers&&(t.textLayers.forEach(function(t){r.removeLayer(t)}),t.textLayers=null,t.labelPos=null),t.clearPointEffect()}},_renderLineMap:function(){var t=this.seriesOfType(f.LINE_MAP),e=t.reduce(function(t,e){return t.concat(e.points)},[]);if(!t.length||!e.length)return void(this._lineMapLayer&&this._lineMapLayer.setData([]));if(!this._lineMapLayer){var i=this,r=this.getSize(),a={width:r.x,height:r.y,x:0,y:0,dpr:window.devicePixelRatio||1},o=this.mainRenderer=new n(this._panes.overlayPane,this,a),h=this.animationRenderer=new n(this._panes.overlayPane,this,a);o.onAdd(),h.onAdd(),this._lineMapLayer=s({mainRenderer:o,animationRenderer:h,vanchart:i}).addTo(this)}this._lineMapLayer.setData(e)}});return t("./VanChartLibrary").register(f.POINT_MAP,A),t("./VanChartLibrary").register(f.AREA_MAP,A),t("./VanChartLibrary").register(f.LINE_MAP,A),t("./VanChartLibrary").register(f.HEAT_MAP,A),A}),define("utils/QuadTree",[],function(){function t(t){return t[0]}function e(t){return t[1]}function i(t){return"function"==typeof t?t:function(){return t}}function n(n,u,c,d,f){function p(t){function e(t,e,i,r,a,o,s,h){if(!isNaN(i)&&!isNaN(r))if(t.leaf){var u=t.x,c=t.y;if(null!=u)if(l(u-i)+l(c-r)<.01)n(t,e,i,r,a,o,s,h);else{var d=t.point;t.x=t.y=t.point=null,n(t,d,u,c,a,o,s,h),n(t,e,i,r,a,o,s,h)}else t.x=i,t.y=r,t.point=e}else n(t,e,i,r,a,o,s,h)}function n(t,i,n,r,a,s,h,l){var u=.5*(a+h),c=.5*(s+l),d=n>=u,f=r>=c,p=f<<1|d;t.leaf=!1,t=t.nodes[p]||(t.nodes[p]=o()),d?a=u:h=u,f?s=c:l=c,e(t,i,n,r,a,s,h,l)}var r,a,p,_,y,x,b,T,A,C=i(m),L=i(v);if(null!=u)x=u,b=c,T=d,A=f;else if(T=A=-(x=b=1/0),a=[],p=[],y=t.length,g)for(_=0;y>_;++_)r=t[_],r.x<x&&(x=r.x),r.y<b&&(b=r.y),r.x>T&&(T=r.x),r.y>A&&(A=r.y),a.push(r.x),p.push(r.y);else for(_=0;y>_;++_){var P=+C(r=t[_],_),M=+L(r,_);x>P&&(x=P),b>M&&(b=M),P>T&&(T=P),M>A&&(A=M),a.push(P),p.push(M)}var w=T-x,E=A-b;w>E?A=b+w:T=x+E;var S=o();if(S.add=function(t){e(S,t,+C(t,++_),+L(t,_),x,b,T,A)},S.visit=function(t){s(t,S,x,b,T,A);
},S.find=function(t){return h(S,t[0],t[1],x,b,T,A)},_=-1,null==u){for(;++_<y;)e(S,t[_],a[_],p[_],x,b,T,A);--_}else t.forEach(S.add);return a=p=t=r=null,S}var g,m=t,v=e;return(g=arguments.length)?(m=r,v=a,3===g&&(f=c,d=u,c=u=0),p(n)):(p.x=function(t){return arguments.length?(m=t,p):m},p.y=function(t){return arguments.length?(v=t,p):v},p.extent=function(t){return arguments.length?(null==t?u=c=d=f=null:(u=+t[0][0],c=+t[0][1],d=+t[1][0],f=+t[1][1]),p):null==u?null:[[u,c],[d,f]]},p.size=function(t){return arguments.length?(null==t?u=c=d=f=null:(u=c=0,d=+t[0],f=+t[1]),p):null==u?null:[d-u,f-c]},p)}function r(t){return t.x}function a(t){return t.y}function o(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function s(t,e,i,n,r,a){if(!t(e,i,n,r,a)){var o=.5*(i+r),h=.5*(n+a),l=e.nodes;l[0]&&s(t,l[0],i,n,o,h),l[1]&&s(t,l[1],o,n,r,h),l[2]&&s(t,l[2],i,h,o,a),l[3]&&s(t,l[3],o,h,r,a)}}function h(t,e,i,n,r,a,o){var s,h=1/0;return function l(t,u,c,d,f){if(!(u>a||c>o||n>d||r>f)){if(p=t.point){var p,g=e-t.x,m=i-t.y,v=g*g+m*m;if(h>v){var _=Math.sqrt(h=v);n=e-_,r=i-_,a=e+_,o=i+_,s=p}}for(var y=t.nodes,x=.5*(u+d),b=.5*(c+f),T=e>=x,A=i>=b,C=A<<1|T,L=C+4;L>C;++C)if(t=y[3&C])switch(3&C){case 0:l(t,u,c,x,b);break;case 1:l(t,x,c,d,b);break;case 2:l(t,u,b,x,f);break;case 3:l(t,x,b,d,f)}}}(t,n,r,a,o),s}var l=Math.abs;return n}),define("vans/ForceLayout",["require","../utils/QuadTree","../utils/Timer","../utils/BaseUtils"],function(t){function e(t,e,i){for(var n;e;){if(n=t[c.stamp(e)])return n;if(e===i)return null;e=e.parentNode}}function i(){return{mouseover:o,mouseout:s,panstart:r,panmove:n,panend:a}}function n(t,e,i){var n=i.containerPoint.x-e.currentPoint.x,r=i.containerPoint.y-e.currentPoint.y;e.currentPoint=i.containerPoint,t.px+=n,t.py+=r,e.resume()}function r(t,e,i){t.fixed|=2,e.panTarget=t,e.currentPoint=i.containerPoint}function a(t,e){t.fixed&=-7,e.panTarget=null}function o(t){t.fixed|=4,t.px=t.x,t.py=t.y}function s(t){t.fixed&=-5}function h(t,e,i){var n=0,r=0;if(t.charge=0,!t.leaf)for(var a,o=t.nodes,s=o.length,l=-1;++l<s;)a=o[l],null!=a&&(h(a,e,i),t.charge+=a.charge,n+=a.charge*a.cx,r+=a.charge*a.cy);if(t.point){t.leaf||(t.point.x+=Math.random()-.5,t.point.y+=Math.random()-.5);var u=e*i[t.point.index];t.charge+=t.pointCharge=u,n+=u*t.point.x,r+=u*t.point.y}t.cx=n/t.charge,t.cy=r/t.charge}var l=t("../utils/QuadTree"),u=t("../utils/Timer"),c=t("../utils/BaseUtils"),d=20,f=1,p=1/0,g=function(){function t(t){return function(e,i,n,r){if(e.point!==t){var a=e.cx-t.x,o=e.cy-t.y,s=r-i,h=a*a+o*o;if(h>s*s/L){if(A>h){var l=e.charge/h;t.px-=a*l,t.py-=o*l}return!0}if(e.point&&h&&A>h){var l=e.pointCharge/h;t.px-=a*l,t.py-=o*l}}return!e.charge}}var n,r,a,o,s,g,m,v={},_=[1,1],y=.9,x=d,b=f,T=-30,A=p,C=.1,L=.64,P=[],M=[],w=1,E={};return v.tick=function(){if((n*=.99)<.005)return n=0,g&&g(),!0;var e,i,u,c,d,f,p,m,v,x=P.length,b=M.length;for(i=0;b>i;++i)u=M[i],c=u.source,d=u.target,m=d.x-c.x,v=d.y-c.y,(f=m*m+v*v)&&(f=n*a[i]*((f=Math.sqrt(f))-r[i]*w)/f,m*=f,v*=f,d.x-=m*(p=c.weight/(d.weight+c.weight)),d.y-=v*p,c.x+=m*(p=1-p),c.y+=v*p);if((p=n*C)&&(m=_[0]/2,v=_[1]/2,i=-1,p))for(;++i<x;)u=P[i],u.x+=(m-u.x)*p,u.y+=(v-u.y)*p;if(T)for(h(e=l(P),n,o),i=-1;++i<x;)(u=P[i]).fixed||e.visit(t(u));for(i=-1;++i<x;)u=P[i],u.fixed?(u.x=u.px,u.y=u.py):(u.x-=(u.px-(u.px=u.x))*y,u.y-=(u.py-(u.py=u.y))*y);s&&s({alpha:n})},v.nodes=function(t){return arguments.length?(P=t,v):P},v.links=function(t){return arguments.length?(M=t,v):M},v.eachTick=function(t){return arguments.length?(s=t,v):s},v.endTick=function(t){return arguments.length?(g=t,v):g},v.size=function(t){return arguments.length?(_=t,v):_},v.scale=function(t){return arguments.length?(w=t,v):w},v.linkDistance=function(t){return arguments.length?(x="function"==typeof t?t:+t,v):x},v.distance=v.linkDistance,v.linkStrength=function(t){return arguments.length?(b="function"==typeof t?t:+t,v):b},v.friction=function(t){return arguments.length?(y=+t,v):y},v.charge=function(t){return arguments.length?(T="function"==typeof t?t:+t,v):T},v.chargeDistance=function(t){return arguments.length?(A=t*t,v):Math.sqrt(A)},v.gravity=function(t){return arguments.length?(C=+t,v):C},v.theta=function(t){return arguments.length?(L=t*t,v):Math.sqrt(L)},v.alpha=function(t){return arguments.length?(t=+t,n?n=t>0?t:0:t>0&&(n=t,u(v.tick)),v):n},v.start=function(){return v.preparePara(),v.resume()},v.simulateForce=function(){for(v.preparePara(),v.alpha(.1);v.alpha()>=.005;)v.tick();return g&&g(),v},v.simpleSimulateForce=function(){v.preparePara();for(var t=.1,e=.005,i=2,n=2,r=.5,a=.02,o=.9,s=t;s>=e;s-=s>.07?.001:5e-4){var h,l,u,c,d,f=P.length;if((u=s*a)&&(c=_[0]/2,d=_[1]/2,h=-1,u))for(;++h<f;)l=P[h],l.x+=(c-l.x)*u,l.y+=(d-l.y)*u;for(h=-1;++h<f;)l=P[h],l.x-=(l.px-(l.px=l.x))*o,l.y-=(l.py-(l.py=l.y))*o;P.forEach(function(t){var e=t.series.cluster;if(e&&e!=t){var i=t.x-e.x,n=t.y-e.y,r=Math.sqrt(i*i+n*n),a=t.radius+e.radius;r!=a&&(r=(r-a)/r*s,t.x-=i*=r,t.y-=n*=r,e.x+=i,e.y+=n)}});for(var h=0;f>h;h++)for(var p=P[h],m=0;f>m;m++){var y=P[m];if(y!==p){var c=p.x-y.x,d=p.y-y.y,x=Math.sqrt(c*c+d*d),b=p.radius+y.radius+(p.series.cluster===y.series.cluster?i:n);b>x&&(x=(x-b)/x*r,p.x-=c*=x,p.y-=d*=x,y.x+=c,y.y+=d)}}}return g&&g(),v},v.preparePara=function(){function t(t,n){if(!i){for(i=[],l=0;s>l;++l)i[l]=[];for(l=0;h>l;++l){var r=M[l];i[r.source.index].push(r.target),i[r.target.index].push(r.source)}}for(var a,o=i[e],l=-1,u=o.length;++l<u;)if(!isNaN(a=o[l][t]))return a;return Math.random()*n}var e,i,n,s=P.length,h=M.length,l=_[0],u=_[1];for(e=0;s>e;++e)(n=P[e]).index=e,n.weight=0;for(e=0;h>e;++e)n=M[e],"number"==typeof n.source&&(n.source=P[n.source]),"number"==typeof n.target&&(n.target=P[n.target]),++n.source.weight,++n.target.weight;for(e=0;s>e;++e)n=P[e],isNaN(n.x)&&(n.x=t("x",l)),isNaN(n.y)&&(n.y=t("y",u)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof x)for(e=0;h>e;++e)r[e]=+x.call(this,M[e],e);else for(e=0;h>e;++e)r[e]=x;if(a=[],"function"==typeof b)for(e=0;h>e;++e)a[e]=+b.call(this,M[e],e);else for(e=0;h>e;++e)a[e]=b;if(o=[],"function"==typeof T)for(e=0;s>e;++e)o[e]=+T.call(this,P[e],e);else for(e=0;s>e;++e)o[e]=T;return v},v.resume=function(){return v.alpha(.1)},v.stop=function(){return v.alpha(0)},v.registerDragTarget=function(t,e){m||(m=i()),E[c.stamp(e.node())]=t},v.dragFire=function(t,i){if(m){var n,r=t.srcEvent,a=t.type||r.type,o="panstart"===a||"panmove"===a||"panend"===a;if(o&&v.panTarget)n=v.panTarget;else{var s=r.target||r.srcElement;n=e(E,s,i)}return n&&m[a]?(m[a](n,v,t),n):void 0}},v};return g}),define("vans/VanChartForceBubble",["require","./VanChart","./../utils/BaseUtils","./../Constants","./ForceLayout","../utils/QuadTree","./VanChartLibrary"],function(t){function e(t){return function(e){var i=e.series.cluster;if(i&&i!==e){var n=e.x-i.x,r=e.y-i.y,a=Math.sqrt(n*n+r*r),o=e.radius+i.radius;a!=o&&(a=(a-o)/a*t,e.x-=n*=a,e.y-=r*=a,i.x+=n,i.y+=r)}}}function i(t,e,i){var n=s(e);return function(e){var r=e.radius+i+Math.max(h,l),a=e.x-r,o=e.x+r,s=e.y-r,u=e.y+r;n.visit(function(i,n,r,c,d){if(i.point&&i.point!==e){var f=e.x-i.point.x,p=e.y-i.point.y,g=Math.sqrt(f*f+p*p),m=e.radius+i.point.radius+(e.series.cluster===i.point.series.cluster?h:l);m>g&&(g=(g-m)/g*t,e.x-=f*=g,e.y-=p*=g,i.point.x+=f,i.point.y+=p)}return n>o||a>c||r>u||s>d})}}var n=t("./VanChart"),r=t("./../utils/BaseUtils"),a=t("./../Constants"),o=t("./ForceLayout"),s=t("../utils/QuadTree"),h=2,l=4,u=500,c=n.extend({vanChartType:"vanChartForceBubble",renderSeries:function(){function t(t){s._animationStarted&&t.alpha<.05&&n.prototype._animationEnd.bind(s)();var r=e(10*t.alpha*t.alpha),a=i(.5,l,s.maxRadius);l.forEach(function(t){r(t)}),l.forEach(function(t){a(t)}),s._updateGraphics()}function a(){s._updateGraphics(),n.prototype._animationEnd.bind(s)()}n.prototype.renderSeries.call(this);var s=this,h=s.bounds,l=this.nodes=[];this.maxRadius=0;var u=s.renderer.isAnimation;s.force&&s.force.stop(),s.force=s.force||o(),this.series.forEach(function(t){var e;t.points.forEach(function(t){t.isVisible()&&(t.x=s._changeDataState&&r.hasDefined(t._posX)?t._posX:s.validPosXY(t.x,0,h.width),t.y=s._changeDataState&&r.hasDefined(t._posY)?t._posY:s.validPosXY(t.y,0,h.height),u&&s.force.registerDragTarget(t,t.graphic),l.push(t),s.maxRadius=Math.max(s.maxRadius,t.radius),e=e||t,e=t.radius>e.radius?t:e)}),t.cluster=e}),s.force.nodes(l).size([h.width,h.height]).gravity(.05).charge(0).eachTick(t),r.isSupportSVG()?u?s.force.start():s.force.simulateForce():s.force.endTick(a).simpleSimulateForce()},_updateGraphics:function(){var t=this;t.nodes&&t.nodes.forEach(function(e){e._posX=e.x,e._posY=e.y,t._calculateLabelPos(e),e.textGraphic&&e.textGraphic.attr("transform",r.makeTranslate(e.labelPos)),e.graphic.attr(e.series.getPointUpdateAnimationAttr(e))})},_animationEnd:function(){},validPosXY:function(t,e,i){return t=+t,t>e&&i>t?t:void 0},dealAxisZoom:function(t,e){var i=this,n=i.bounds;i.force&&i.force.stop();var a=i._calculateZoomParas(t,e),o=a.shiftX,s=a.shiftY,h=a.scale;i.nodes.forEach(function(t){t.radius*=h;var e=t.x+o,r=t.y+s;e-=n.width/2,r-=n.height/2,t.x=e*h+n.width/2-o,t.y=r*h+n.height/2-s,i._calculateLabelPos(t),i._updatePointTextGraphic(t);var a=t.series,l=a.getPointUpdateAnimationAttr(t);t.graphic.animate({duration:u,ease:"back-out",attr:l})}),this.scale=h*r.pick(this.scale,1)},refreshRestore:function(){this.scale=1,this.update()},_calculateLabelPos:function(t){if(t.labelContent&&t.labelDim){var e=t.radius;t.labelDim.width>2*e||t.labelDim.height>2*e?t.labelPos=null:t.labelPos={x:-t.labelDim.width/2+t.x,y:-t.labelDim.height/2+t.y}}},orderData:function(){},_updatePointTextGraphic:function(t){t.textGraphic?t.labelPos?t.textGraphic.attr("transform",r.makeTranslate(t.labelPos)):(t.textGraphic.remove(),t.textGraphic=null):t.series._createTextGraphic(t)}});return t("./VanChartLibrary").register(a.FORCE_BUBBLE_CHART,c),c}),define("utils/Scale",["require","./BaseUtils","./Interpolator","./vMap"],function(t){function e(t){var e=t[0],i=t[t.length-1];return i>e?[e,i]:[i,e]}function i(t,e,i,n){var r=i(t[0],t[1]),a=n(e[0],e[1]);return function(t){return a(r(t))}}function n(t,e,i,n){var a=[],o=[],s=0,h=Math.min(t.length,e.length)-1;for(t[h]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<=h;)a.push(i(t[s-1],t[s])),o.push(n(e[s-1],e[s]));return function(e){var i=r(t,e,1,h)-1;return o[i](a[i](e))}}function r(t,e,i,n){for(arguments.length<3&&(i=0),arguments.length<4&&(n=t.length);n>i;){var r=i+n>>>1;a(t[r],e)>0?n=r:i=r+1}return i}function a(t,e){return e>t?-1:t>e?1:t>=e?0:NaN}function o(t,e){return g.rebind(t,e,"range","rangeRound","interpolate")}function s(t,e,r,a){function o(){var o=Math.min(t.length,e.length)>2?n:i;return l=o(t,e,a,r),u=o(e,t,a,r),h}function h(t){return l(t)}var l,u;return h.invert=function(t){return u(t)},h.domain=function(e){return arguments.length?(t=e.map(Number),o()):t},h.range=function(t){return arguments.length?(e=t,o()):e},h.rangeRound=function(t){return h.range(t).interpolate(m.interpolateRound)},h.interpolate=function(t){return arguments.length?(r=t,o()):r},h.uninterpolate=function(t){return arguments.length?(a=t,o()):a},h.copy=function(){return s(t,e,r,a)},o()}function h(t,e,i,n){function r(t){return(i?Math.log(0>t?0:t):-Math.log(t>0?0:-t))/Math.log(e)}function a(t){return i?Math.pow(e,t):-Math.pow(e,-t)}function s(e){return t(r(e))}return s.invert=function(e){return a(t.invert(e))},s.domain=function(e){return arguments.length?(i=e[0]>=0,t.domain((n=e.map(Number)).map(r)),s):n},s.base=function(i){return arguments.length?(e=+i,t.domain(n.map(r)),s):e},s.copy=function(){return h(t.copy(),e,i,n)},o(s,t)}function l(t,i){function n(e){return o[((a.get(e)||("range"===i.t?a.set(e,t.push(e)):NaN))-1)%o.length]}function r(e,i){for(var n=[],r=t.length,a=0;r>a;a++)n.push(e+i*a);return n}var a,o,s;return n.domain=function(e){if(!arguments.length)return t;t=[],a=new v;for(var r,o=-1,s=e.length;++o<s;)a.has(r=e[o])||a.set(r,t.push(r));return n[i.t].apply(n,i.a)},n.range=function(t){return arguments.length?(o=t,s=0,i={t:"range",a:arguments},n):o},n.rangePoints=function(e,a){arguments.length<2&&(a=0);var h=e[0],l=e[1],u=t.length<2?(h=(h+l)/2,0):(l-h)/(t.length-1+a);return o=r(h+u*a/2,u),s=0,i={t:"rangePoints",a:arguments},n},n.rangeRoundPoints=function(e,a){arguments.length<2&&(a=0);var h=e[0],l=e[1],u=t.length<2?(h=l=Math.round((h+l)/2),0):(l-h)/(t.length-1+a)|0;return o=r(h+Math.round(u*a/2+(l-h-(t.length-1+a)*u)/2),u),s=0,i={t:"rangeRoundPoints",a:arguments},n},n.rangeBands=function(e,a,h){arguments.length<2&&(a=0),arguments.length<3&&(h=a);var l=e[1]<e[0],u=e[l-0],c=e[1-l],d=(c-u)/(t.length-a+2*h);return o=r(u+d*h,d),l&&o.reverse(),s=d*(1-a),i={t:"rangeBands",a:arguments},n},n.rangeRoundBands=function(e,a,h){arguments.length<2&&(a=0),arguments.length<3&&(h=a);var l=e[1]<e[0],u=e[l-0],c=e[1-l],d=Math.floor((c-u)/(t.length-a+2*h));return o=r(u+Math.round((c-u-(t.length-a)*d)/2),d),l&&o.reverse(),s=Math.round(d*(1-a)),i={t:"rangeRoundBands",a:arguments},n},n.rangeBand=function(){return s},n.rangeExtent=function(){return e(i.a[0])},n.copy=function(){return l(t,i)},n.domain(t)}function u(t,e,i){function n(e){return i[Math.max(0,Math.min(o,Math.floor(a*(e-t))))]}function r(){return a=i.length/(e-t),o=i.length-1,n}var a,o;return n.domain=function(i){return arguments.length?(t=+i[0],e=+i[i.length-1],r()):[t,e]},n.range=function(t){return arguments.length?(i=t,r()):i},n.invertExtent=function(e){return e=i.indexOf(e),e=0>e?NaN:e/a+t,[e,e+1/a]},n.copy=function(){return u(t,e,i)},r()}function c(){return s([0,1],[0,1],m.interpolateNumber,m.uninterpolateNumber)}function d(){return h(c().domain([0,1]),10,!0,[1,10])}function f(){return u(0,1,[0,1])}function p(){return l([],{t:"range",a:[[]]})}var g=t("./BaseUtils"),m=t("./Interpolator"),v=t("./vMap");return{linear:c,quantize:f,log:d,quantize:f,ordinal:p}}),define("vans/CloudLayout",["require","./../utils/BaseUtils"],function(t){function e(t){return t.text}function i(){return"serif"}function n(){return"normal"}function r(t){return Math.sqrt(t.value)}function a(){return 30*(~~(6*Math.random())-3)}function o(){return 1}function s(t,e,i,n,r){if(!e.sprite){var a=t.context,o=t.ratio;a.clearRect(0,0,(v<<5)/o,_/o);var s=0,h=0,l=0,u=i.length;for(--n;++n<u;){e=i[n],a.save(),a.font=e.style+" "+e.weight+" "+~~((e.size+1)/o)+"px "+e.font;var c=a.measureText(e.text+"m").width*o,d=e.size<<1;if(e.rotate){var f=Math.sin(e.rotate*m),p=Math.cos(e.rotate*m),g=c*p,y=c*f,x=d*p,b=d*f;c=Math.max(Math.abs(g+b),Math.abs(g-b))+31>>5<<5,d=~~Math.max(Math.abs(y+x),Math.abs(y-x))}else c=c+31>>5<<5;if(d>l&&(l=d),s+c>=v<<5&&(s=0,h+=l,l=0),h+d>=_&&!r)break;a.translate((s+(c>>1))/o,(h+(d>>1))/o),e.rotate&&a.rotate(e.rotate*m),a.fillText(e.text,0,0),e.padding&&!r&&(a.lineWidth=2*e.padding,a.strokeText(e.text,0,0)),a.restore(),e.width=c,e.height=d,e.xoff=s,e.yoff=h,e.x1=c>>1,e.y1=d>>1,e.x0=-e.x1,e.y0=-e.y1,e.hasText=!0,s+=c}if(!r)for(var T=a.getImageData(0,0,(v<<5)/o,_/o).data,A=[];--n>=0;)if(e=i[n],e.hasText){for(var c=e.width,C=c>>5,d=e.y1-e.y0,L=0;d*C>L;L++)A[L]=0;if(s=e.xoff,null==s)return;h=e.yoff;for(var P=0,M=-1,w=0;d>w;w++){for(var L=0;c>L;L++){var E=C*w+(L>>5),S=T[(h+w)*(v<<5)+(s+L)<<2]?1<<31-L%32:0;A[E]|=S,P|=S}P?M=w:(e.y0++,d--,w--,h++)}e.y1=e.y0+M,e.sprite=A.slice(0,(e.y1-e.y0)*C)}}}function h(t,e,i){i>>=5;for(var n,r=t.sprite,a=t.width>>5,o=t.x-(a<<4),s=127&o,h=32-s,l=t.y1-t.y0,u=(t.y+t.y0)*i+(o>>5),c=0;l>c;c++){n=0;for(var d=0;a>=d;d++)if((n<<h|(a>d?(n=r[c*a+d])>>>s:0))&e[u+d])return!0;u+=i}return!1}function l(t,e){var i=t[0],n=t[1];e.x+e.x0<i.x&&(i.x=e.x+e.x0),e.y+e.y0<i.y&&(i.y=e.y+e.y0),e.x+e.x1>n.x&&(n.x=e.x+e.x1),e.y+e.y1>n.y&&(n.y=e.y+e.y1)}function u(t,e){return t.x+t.x1>e[0].x&&t.x+t.x0<e[1].x&&t.y+t.y1>e[0].y&&t.y+t.y0<e[1].y}function c(t){var e=t[0]/t[1];return function(t){return[e*(t*=.1)*Math.cos(t),t*Math.sin(t)]}}function d(t){for(var e=[],i=-1;++i<t;)e[i]=0;return e}function f(){var t=document.createElement(window.VAN_CANVAS);return window.VanCanvasManager&&VanCanvasManager.initElement(t),t}function p(t){return"function"==typeof t?t:function(){return t}}var g=t("./../utils/BaseUtils"),m=Math.PI/180,v=64,_=2048;return function(){function t(){return k&&!D}function m(t,e){var i=t.context,n=t.ratio,r=(A[0]>>5)/n,a=A[1]/n;i.clearRect(0,0,r,a);var o=new Image;o.src=k,o.onload=function(){i.drawImage(o,0,0,r,a);var t=i.getImageData(0,0,r,a).data;i.clearRect(0,0,r,a);for(var n=t.length,s=[],h=0;n>h;h+=4)s[h/4]=t[h+3]?0:1;e(s)}}function x(t){t.width=t.height=1;var e=t.getContext("2d"),i=D?1:Math.sqrt(e.getImageData(0,0,1,1).data.length>>2);return t.width=(v<<5)/i,t.height=_/i,e.fillStyle=e.strokeStyle="red",e.textAlign="center",{context:e,ratio:i}}function b(t,e){for(var i=t.x+t.x0,n=t.x+t.x1,r=t.y+t.y0,a=t.y+t.y1,o=0,s=e.length;s>o;o++){var h=e[o],l=h.x+h.x0,u=h.x+h.x1,c=h.y+h.y0,d=h.y+h.y1,f=Math.max(i,l),p=Math.min(n,u),g=Math.max(r,c),m=Math.min(a,d);if(p>f&&m>g)return!0}return!1}function T(t,e,i){for(var n,r,a,o=([{x:0,y:0},{x:A[0],y:A[1]}],e.x),s=e.y,l=Math.sqrt(A[0]*A[0]+A[1]*A[1]),c=O(A),d=N()<.5?1:-1,f=-d;(n=c(f+=d))&&(r=~~n[0],a=~~n[1],!(Math.min(Math.abs(r),Math.abs(a))>=l));)if(e.x=o+r,e.y=s+a,!(e.x+e.x0<0||e.y+e.y0<0||e.x+e.x1>A[0]||e.y+e.y1>A[1]))if(D){if(!i||!b(e,i))return!0}else if((!i&&!k||!h(e,t,A[0]))&&(!i||u(e,i))){for(var p,g=e.sprite,m=e.width>>5,v=A[0]>>5,_=e.x-(m<<4),y=127&_,x=32-y,T=e.y1-e.y0,C=(e.y+e.y0)*v+(_>>5),L=0;T>L;L++){p=0;for(var P=0;m>=P;P++)t[C+P]|=p<<x|(m>P?(p=g[L*m+P])>>>y:0);C+=v}return delete e.sprite,!0}return!1}var A=[256,256],C=e,L=i,P=r,M=n,w=n,E=a,S=o,O=c,k=null,D=!g.isSupportSVG(),R=null,B=[],I=1/0,G=null,N=Math.random,H={},z=f;return H.canvas=function(t){return arguments.length?(z=p(t),H):z},H.start=function(){function e(t){D?n(t):(G&&clearInterval(G),G=setInterval(i,0),i(t))}function i(t){function e(){return n.hasText&&T(a,n,o)?(c.push(n),o?l(o,n):o=[{x:n.x+n.x0,y:n.y+n.y0},{x:n.x+n.x1,y:n.y+n.y1}],n.x-=A[0]>>1,n.y-=A[1]>>1,!0):!1}a=t?t:a;for(var i=Date.now();Date.now()-i<I&&++u<h&&G;){var n=f[u];n.x=A[0]*(N()+.5)>>1,n.y=A[1]*(N()+.5)>>1,s(r,n,f,u,D),e()||e()}u>=h&&(H.stop(),R())}function n(t){for(;++u<h;){var e=f[u];e.x=A[0]*(N()+.5)>>1,e.y=A[1]*(N()+.5)>>1;var i=g.getTextDimension(e.text,{fontSize:e.size+"px",fontFamily:e.fontFamily},!1);e.height=i.height,e.y0=-e.height>>1,e.y1=-e.y0,e.width=i.width,e.x0=-e.width>>1,e.x1=-e.x0,T(a,e,o)&&(c.push(e),o?o.push({x:e.x,y:e.y,x0:e.x0,y0:e.y0,x1:e.x1,y1:e.y1}):o=[{x:e.x,y:e.y,x0:e.x0,y0:e.y0,x1:e.x1,y1:e.y1}],e.x-=A[0]>>1,e.y-=A[1]>>1,e.x-=e.width>>1,e.y-=e.height>>1)}u>=h&&(H.stop(),R())}var r=x(z()),a=t()?m(r,e):D?[]:d((A[0]>>5)*A[1]),o=null,h=B.length,u=-1,c=[],f=B.map(function(t,e){return t.text=C.call(this,t,e),t.font=L.call(this,t,e),t.style=M.call(this,t,e),t.weight=w.call(this,t,e),t.rotate=E.call(this,t,e),t.size=~~P.call(this,t,e),t.padding=S.call(this,t,e),t}).sort(function(t,e){return e.size-t.size});return t()||e(),H},H.stop=function(){return G&&(clearInterval(G),G=null),H},H.timeInterval=function(t){return arguments.length?(I=null==t?1/0:t,H):I},H.words=function(t){return arguments.length?(B=t,H):B},H.path=function(t){return arguments.length?(k=t,H):k},H.renderFun=function(t){return arguments.length?(R=t,H):R},H.size=function(t){return arguments.length?(A=[+t[0],+t[1]],H):A},H.font=function(t){return arguments.length?(L=p(t),H):L},H.fontStyle=function(t){return arguments.length?(M=p(t),H):M},H.fontWeight=function(t){return arguments.length?(w=p(t),H):w},H.rotate=function(t){return arguments.length?(E=p(t),H):E},H.text=function(t){return arguments.length?(C=p(t),H):C},H.spiral=function(t){return arguments.length?(O=y[t]||t,H):O},H.fontSize=function(t){return arguments.length?(P=p(t),H):P},H.padding=function(t){return arguments.length?(S=p(t),H):S},H.random=function(t){return arguments.length?(N=t,H):N},H};var y}),define("vans/VanChartWordCloud",["require","./VanChart","./../Constants","./../utils/BaseUtils","../utils/Scale","./CloudLayout","./VanChartLibrary"],function(t){var e=t("./VanChart"),i=t("./../Constants"),n=t("./../utils/BaseUtils"),r=t("../utils/Scale"),a=t("./CloudLayout"),o=e.extend({vanChartType:"vanChartWordCloud",dealAxisZoom:function(t,e){var i=this,r=i.series,a=i._calculateZoomParas(t,e),o=a.shiftX,s=a.shiftY,h=a.scale;r.forEach(function(t){t.points.forEach(function(e){if(e.word){var i=e.word.x,n=e.word.y;e.word.x=(i+o)*h-o,e.word.y=(n+s)*h-s,e.word.size*=h,t._drawUpdatePoints(e)}})}),this.scale=h*n.pick(this.scale,1)},_getTranslate:function(){var t=this.bounds;return[t.x+t.width/2,t.y+t.height/2]},renderSeries:function(){function t(){e.group||(e.group=o.group().addTo(e.clipSeriesGroup),e.mouseOverGroup=o.group().addTo(e.clipSeriesGroup)),e.group.attr("transform",n.makeTranslate(e._getTranslate())),e.mouseOverGroup.attr("transform",n.makeTranslate(e._getTranslate()));var t=e.seriesOfType(i.WORD_CLOUD_CHART);if(t&&t.length){var r=t[0];e.registerInteractiveTarget(r,e.group),m.forEach(function(t){var e=t.word;e&&(t.labelDim=n.getTextDimension(e.text,{fontSize:e.size+"px",fontFamily:e.fontFamily},!1)),r.drawPoint(t)}),e.setTimeout("effect",function(){m.forEach(function(t){r.drawPointEffect(t)})},800)}e._updateSeriesState(),window.console&&console.log("done")}var e=this,o=e.renderer,s=e.options.plotOptions,h=e.bounds,l=h.width,u=h.height,c=s.minRotation,d=s.maxRotation,f=s.fontFamily,p=s.minFontSize,g=s.maxFontSize,m=e.pointsOfType(i.WORD_CLOUD_CHART).filter(function(t){return!t.isNull}).sort(function(t,e){return Math.abs(e.value)-Math.abs(t.value)});if(0!==m.length){p=n.hasDefined(p)?p:10,g=n.hasDefined(g)?g:e._calculateNiceMaxFontSize(l,u,m[0].name,f),e.minFontSize=Math.min(parseFloat(p),parseFloat(g)),e.maxFontSize=Math.max(parseFloat(p),parseFloat(g));var v=r.linear().domain([Math.abs(m[m.length-1].value),Math.abs(m[0].value)]).range([e.minFontSize,e.maxFontSize]),_=a().size([l,u]).words(m.filter(function(t){return t.visible}).map(function(t){var i={text:t.name,size:v(Math.abs(t.value))*e.scale,point:t,fontFamily:f};return t.word=i,i})).path(s.path).padding(5).rotate(function(){return c+Math.random()*(d-c)}).font(f).fontSize(function(t){return t.size}).renderFun(t);_.start()}},_consoleDone:function(){},_calculateNiceMaxFontSize:function(t,e,i,r){for(var a={min:0,max:100},o=function(){return a.max-a.min>2},s={fontSize:a.max+"px",fontFamily:r},h=n.getTextDimension(i,s,!1);o()&&(h.width>t||h.height>e);){var l=Math.ceil(a.min+(a.max-a.min)/2);s.fontSize=l+"px";var u=n.getTextDimension(i,s,!1);u.width>t||u.height>e?(a.max=l,h=u):a.min=l}return o()?a.max:a.min}});return t("./VanChartLibrary").register(i.WORD_CLOUD_CHART,o),o}),define("vans/TreeMapLayout",["require","../utils/BaseUtils"],function(t){function e(t,e){return m.rebind(t,e,"sort","children","value"),t.nodes=t,t.links=s,t}function i(t,e){for(var i=[t];null!=(t=i.pop());)if(e(t),(r=t.children)&&(n=r.length))for(var n,r;--n>=0;)i.push(r[n])}function n(t,e){for(var i=[t],n=[];null!=(t=i.pop());)if(n.push(t),(a=t.children)&&(r=a.length))for(var r,a,o=-1;++o<r;)i.push(a[o]);for(;null!=(t=n.pop());)e(t)}function r(t){return t.children}function a(t){return t.value}function o(t,e){return e.value-t.value}function s(t){return d3.merge(t.map(function(t){return(t.children||[]).map(function(e){return{source:t,target:e}})}))}function h(t,e){return t.parent==e.parent?1:2}function l(t){var e=t.children;return e.length?e[0]:t.t}function u(t){var e,i=t.children;return(e=i.length)?i[e-1]:t.t}function c(t,e,i){var n=i/(e.i-t.i);e.c-=n,e.s+=i,t.c+=n,e.z+=i,e.m+=i}function d(t){for(var e,i=0,n=0,r=t.children,a=r.length;--a>=0;)e=r[a],e.z+=i,e.m+=i,i+=e.s+(n+=e.c)}function f(t,e,i){return t.a.parent===e.parent?t.a:i}function p(t){return{x:t.x,y:t.y,dx:t.dx,dy:t.dy}}function g(t,e){var i=t.x+e[3],n=t.y+e[0],r=t.dx-e[1]-e[3],a=t.dy-e[0]-e[2];return 0>r&&(i+=r/2,r=0),0>a&&(n+=a/2,a=0),{x:i,y:n,dx:r,dy:a}}var m=t("../utils/BaseUtils"),v=function(){function t(i){var r,a=[i],o=[];for(i.depth=0;null!=(r=a.pop());)if(o.push(r),(u=s.call(t,r,r.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=r,c.depth=r.depth+1;h&&(r.value=0),r.children=u}else h&&(r.value=+h.call(t,r,r.depth)||0),delete r.children;return n(i,function(t){var i,n;e&&(i=t.children)&&i.sort(e),h&&(n=t.parent)&&(n.value+=t.value)}),o}var e=o,s=r,h=a;return t.sort=function(i){return arguments.length?(e=i,t):e},t.children=function(e){return arguments.length?(s=e,t):s},t.value=function(e){return arguments.length?(h=e,t):h},t.revalue=function(e){return h&&(i(e,function(t){t.children&&(t.value=0)}),n(e,function(e){var i;e.children||(e.value=+h.call(t,e,e.depth)||0),(i=e.parent)&&(i.value+=e.value)})),e},t},_=function(){function t(t,e){var s=g.call(this,t,e),h=s[0],l=r(h);if(n(l,a),l.parent.m=-l.z,i(l,o),y)i(h,p);else{var u=h,c=h,d=h;i(h,function(t){t.x<u.x&&(u=t),t.x>c.x&&(c=t),t.depth>d.depth&&(d=t)});var f=m(u,c)/2-u.x,v=_[0]/(c.x+m(c,u)/2+f),x=_[1]/(d.depth||1);i(h,function(t){t.x=(t.x+f)*v,t.y=t.depth*x})}return s}function r(t){for(var e,i={A:null,children:[t]},n=[i];null!=(e=n.pop());)for(var r,a=e.children,o=0,s=a.length;s>o;++o)n.push((a[o]=r={_:a[o],parent:e,children:(r=a[o].children)&&r.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:o}).a=r);return i.children[0]}function a(t){var e=t.children,i=t.parent.children,n=t.i?i[t.i-1]:null;if(e.length){d(t);var r=(e[0].z+e[e.length-1].z)/2;n?(t.z=n.z+m(t._,n._),t.m=t.z-r):t.z=r}else n&&(t.z=n.z+m(t._,n._));t.parent.A=s(t,n,t.parent.A||i[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t,e,i){if(e){for(var n,r=t,a=t,o=e,s=r.parent.children[0],h=r.m,d=a.m,p=o.m,g=s.m;o=u(o),r=l(r),o&&r;)s=l(s),a=u(a),a.a=t,n=o.z+p-r.z-h+m(o._,r._),n>0&&(c(f(o,t,i),t,n),h+=n,d+=n),p+=o.m,h+=r.m,g+=s.m,d+=a.m;o&&!u(a)&&(a.t=o,a.m+=p-d),r&&!l(s)&&(s.t=r,s.m+=h-g,i=t)}return i}function p(t){t.x*=_[0],t.y=t.depth*_[1]}var g=v().sort(null).value(null),m=h,_=[1,1],y=null;return t.separation=function(e){return arguments.length?(m=e,t):m},t.size=function(e){return arguments.length?(y=null==(_=e)?p:null,t):y?null:_},t.nodeSize=function(e){return arguments.length?(y=null==(_=e)?null:p,t):y?_:null},e(t,g)},y=function(){function t(t,e){for(var i,n,r=-1,a=t.length;++r<a;)n=(i=t[r]).value*(0>e?0:e),i.area=isNaN(n)||0>=n?0:n}function i(e){var n=e.children;if(n&&n.length){var o,s,h,l=d(e),u=[],c=n.slice(),f=1/0,p="slice"===m?l.dx:"dice"===m?l.dy:"slice-dice"===m?1&e.depth?l.dy:l.dx:Math.min(l.dx,l.dy);for(t(c,l.dx*l.dy/e.value),u.area=0;(h=c.length)>0;)u.push(o=c[h-1]),u.area+=o.area,"squarify"!==m||(s=r(u,p))<=f?(c.pop(),f=s):(u.area-=u.pop().area,a(u,p,l,!1),p=Math.min(l.dx,l.dy),u.length=u.area=0,f=1/0);u.length&&(a(u,p,l,!0),u.length=u.area=0),n.forEach(i)}}function n(e){var i=e.children;if(i&&i.length){var r,o=d(e),s=i.slice(),h=[];for(t(s,o.dx*o.dy/e.value),h.area=0;r=s.pop();)h.push(r),h.area+=r.area,null!=r.z&&(a(h,r.z?o.dx:o.dy,o,!s.length),h.length=h.area=0);i.forEach(n)}}function r(t,e){for(var i,n=t.area,r=0,a=1/0,o=-1,s=t.length;++o<s;)(i=t[o].area)&&(a>i&&(a=i),i>r&&(r=i));return n*=n,e*=e,n?Math.max(e*r*_/n,n/(e*a*_)):1/0}function a(t,e,i,n){var r,a=-1,o=t.length,s=i.x,h=i.y,u=e?l(t.area/e):0;if(e==i.dx){for((n||u>i.dy)&&(u=i.dy);++a<o;)r=t[a],r.x=s,r.y=h,r.dy=u,s+=r.dx=Math.min(i.x+i.dx-s,u?l(r.area/u):0);r.z=!0,r.dx+=i.x+i.dx-s,i.y+=u,i.dy-=u}else{for((n||u>i.dx)&&(u=i.dx);++a<o;)r=t[a],r.x=s,r.y=h,r.dx=u,h+=r.dy=Math.min(i.y+i.dy-h,u?l(r.area/u):0);r.z=!1,r.dy+=i.y+i.dy-h,i.x+=u,i.dx-=u}}function o(e){var r=s||h(e),a=r[0];return a.x=0,a.y=0,a.dx=u[0],a.dy=u[1],s&&h.revalue(a),t([a],a.dx*a.dy/a.value),(s?n:i)(a),f&&(s=r),r}var s,h=v(),l=Math.round,u=[1,1],c=null,d=p,f=!1,m="squarify",_=.5*(1+Math.sqrt(5));return o.size=function(t){return arguments.length?(u=t,o):u},o.padding=function(t){function e(e){var i=t.call(o,e,e.depth);return null==i?p(e):g(e,"number"==typeof i?[i,i,i,i]:i)}function i(e){return g(e,t)}if(!arguments.length)return c;var n;return d=null==(c=t)?p:"function"==(n=typeof t)?e:"number"===n?(t=[t,t,t,t],i):i,o},o.round=function(t){return arguments.length?(l=t?Math.round:Number,o):l!=Number},o.sticky=function(t){return arguments.length?(f=t,s=null,o):f},o.ratio=function(t){return arguments.length?(_=t,o):_},o.mode=function(t){return arguments.length?(m=t+"",o):m},e(o,h)};return{treeLayout:_,treemapLayout:y}}),define("dom/EventObject",["require","../dom/Evented"],function(t){var e=t("../dom/Evented"),i=e.extend({initialize:function(t){this.events=t},getEvents:function(){return this.events}});return i}),define("vans/VanChartStructure",["require","./VanChart","./../Constants","./../utils/BaseUtils","./../utils/BezierEasing","./../utils/BoundsManager","./TreeMapLayout","./ForceLayout","../utils/Scale","../utils/PathGenerator","../dom/EventObject","./VanChartLibrary"],function(t){function e(t,e){return t.radius=t.options.radius?t.options.radius:(9+3*(e-t.level))/2}function i(t){if(0===t)return[0];for(var e=[],i=0,n=0,a=2-Math.pow(2,-(t-1));t>=i;)e[i]=m*r(n/a),n+=Math.pow(2,-i),i++;return e}function n(t){if(0===t)return[0];for(var e=[],i=0;t>=i;)e[i]=m*r(i/t),i++;return e}function r(t){var e=y(.5);return t>e?1-Math.sqrt((1-t)/2):Math.sqrt(t/2)}function a(t,e){return e-t.source.level}var o=t("./VanChart"),s=t("./../Constants"),h=t("./../utils/BaseUtils"),l=t("./../utils/BezierEasing"),u=t("./../utils/BoundsManager"),c=t("./TreeMapLayout").treeLayout,d=t("./ForceLayout"),f=t("../utils/Scale"),p=t("../utils/PathGenerator"),g=t("../dom/EventObject"),m=800,v=300,_=500,y=l.css["ease-in-out-quad"],x=l.css.swing,b=2,T=o.extend({vanChartType:"vanChartStructure",dealAxisZoom:function(t,e){var i=this,n=i.bounds,r=i._horizontalLayout(),a=i._radialLayout(),o=i._calculateZoomParas(t,e),s=o.shiftX,l=o.shiftY,u=o.scale;i.nodes.forEach(function(t){var e=t.posX+s,a=t.posY+l;e-=n.width/2,a-=n.height/2,t.posX=e*u+n.width/2-s,t.posY=a*u+n.height/2-l,t.x=r?t.posY:t.posX,t.y=r?t.posX:t.posY,t.radius*=u,t.labelPos=i._labelPos(t);var o=i._nodeAttrs(t),c={transform:h.makeTranslate(t.labelPos)},d="translate("+t.posX+","+t.posY+")";t.graphic.animate({duration:_,attr:{transform:d}}),t.graphic.nodeGraphic.animate({duration:_,attr:o}),t.textGraphic&&t.textGraphic.animate({duration:_,attr:c})}),i.edges.forEach(function(t){var e=a?i._forceLinkAttrs(t):{d:i._treeLinkPath(t)};t.linkGraphic.animate({duration:_,attr:e})}),i._forceDragEnabled()&&i.force.scale(u),this.scale=u*h.pick(this.scale,1)},renderSeries:function(){this.fire("animationStart");var t=this,e=t.renderer,i=t.bounds,n=t.seriesOfType(s.STRUCTURE_CHART);t.nodes&&n&&n.length&&(t.layout=t.options.plotOptions.layout,t.animation=t.options.plotOptions.animation,t.lineWidth=t.options.plotOptions.lineWidth,h.hasNotDefined(t.lineWidth)&&(t.lineWidth=null),t.linkGroup||(t.linkGroup=e.group().addTo(t.clipSeriesGroup),t.nodeGroup=e.group().addTo(t.clipSeriesGroup)),t.linkGroup.attr("transform",h.makeTranslate(i)),t.nodeGroup.attr("transform",h.makeTranslate(i)),t.groupTrans=null,t.registerInteractiveTarget(n[0],t.linkGroup),t._radialLayout()?t._forceRenderer():t._treeRenderer(),this.animationCount||this.fire("animationEnd"))},_animationStart:function(){this._animationStarted=!0,this.animationCount=0,this.series.forEach(function(t){t._removeDataLabels()})},_forceDragEnabled:function(){return this.animation&&this._radialLayout()&&this.options.plotOptions.force},_treeDragEnabled:function(){return this.animation&&!this._radialLayout()&&this.options.plotOptions.force},_verticalLayout:function(){return"vertical"===this.layout},_horizontalLayout:function(){return"horizontal"===this.layout},_radialLayout:function(){return"radial"===this.layout},_validPosition:function(t,e,i,n){return Math.min(n-i,Math.max(t,e))},_forceRenderer:function(){function t(t){return f*Math.pow(2,-t.source.level)}function n(){r(!0)}function r(t){var i=t?o.ancestor.x-p:0,n=t?o.ancestor.y-g:0;l.forEach(function(t){t.x-=i,t.y-=n,t.labelPos=o._labelPos(t),e(t,o.maxLevel);var r=t.radius,a=t.radius,l=t.radius,u=t.radius;t.hasValidDataLabel()&&(r=Math.max(r,t.x-t.labelPos.x),a=Math.max(a,t.labelPos.x+t.labelDim.width-t.x),l=Math.max(l,t.y-t.labelPos.y),u=Math.max(u,t.labelPos.y+t.labelDim.height-t.y)),
t.x=o._validPosition(t.x,r,a,s.width),t.y=o._validPosition(t.y,l,u,s.height),t.labelPos=o._labelPos(t),t.posX=t.x,t.posY=t.y,t.graphic&&t.graphic.attr("transform",h.makeTranslate(t)),t.textGraphic&&t.textGraphic.attr("transform",h.makeTranslate(t.labelPos))}),u.forEach(function(t){t.linkGraphic&&t.linkGraphic.attr("x1",t.source.x).attr("y1",t.source.y).attr("x2",t.target.x).attr("y2",t.target.y)})}function a(){r(!1)}var o=this,s=o.bounds,l=o.nodes,u=o.edges,c=o.maxLevel,f=Math.min(s.width,s.height)/4,p=s.width/2,g=s.height/2;o.force&&o.force.stop(),o.force=d().nodes(l).links(u).size([s.width,s.height]).linkDistance(t).gravity(0).charge(-150).eachTick(n).simulateForce();var m=i(c);o._rendererNodes(m),o._renderForceLink(m),o.force.eachTick(a)},_renderForceLink:function(t){var e=this,i=e.renderer;e.edges.forEach(function(n){n.linkGraphic&&n.linkGraphic.remove(),n.linkGraphic=null;var r=e._forceLinkAttrs(n),o=e.options.plotOptions,s={fill:"none",stroke:o.lineColor,"stroke-opacity":o.lineOpacity,"stroke-width":null==e.lineWidth?a(n,e.maxLevel):e.lineWidth};if(n.linkGraphic=i.line(r).style(s).addTo(e.linkGroup),n.linkGraphic.datum(n),e.animation){var h=t[n.source.level],l=t[n.target.level],u=h/m,c=l/m,d=y(u),p=y(c),g=f.linear().domain([0,1]).range([u,c]),v=f.linear().domain([d,p]).range([0,1]);n.linkGraphic.attr("x2",r.x1).attr("y2",r.y1).animate({delay:h,ease:"linear",duration:l-h,attrTween:{x2:function(){return function(t){return r.x1+(r.x2-r.x1)*v(y(g(t)))}},y2:function(){return function(t){return r.y1+(r.y2-r.y1)*v(y(g(t)))}}}})}})},_forceLinkAttrs:function(t){return{x1:t.source.x,x2:t.target.x,y1:t.source.y,y2:t.target.y}},_treeRenderer:function(){var t=this,e=t.bounds,i=t.maxLevel,r=t._verticalLayout()?[e.width,e.height]:[e.height,e.width],a=c().size(r),o=a.nodes(t.ancestor).reverse();t._adjustTreeSize(a,r,o,i);var s=n(i);t._rendererNodes(s),t._renderTreeLink()},_adjustTreeSize:function(t,i,n,r){var a=this,o=a._verticalLayout(),h=0,l=i[0],u=0,c=i[1];n.forEach(function(t){var i=e(t,r);i+=t.options.borderWidth||0;var n=t.options.dataLabels,a=t.labelDim;if(n&&n.enabled){var d=a.width,f=a.height,p=n.align==s.OUTSIDE;o?(h=Math.min(h,t.x-d/2),l=Math.max(l,t.x+d/2),u=Math.min(u,t.y-(p?f+b+i:f/2)),c=Math.max(c,t.y+(p?0:f/2))):(h=Math.min(h,t.x-(p?0:f/2)),l=Math.max(l,t.x+(p?i+b+f:f/2)),u=Math.min(u,t.y-d/2),c=Math.max(c,t.y+d/2))}h=Math.min(h,t.x-i),l=Math.max(l,t.x+i),u=Math.min(u,t.y-i),c=Math.max(c,t.y+i)}),h=-h,l-=i[0],u=-u,c-=i[1],i=[i[0]-h-l,i[1]-u-c],t.size(i),t.nodes(a.ancestor).reverse(),n.forEach(function(t){t.x=t.x+h,t.y=t.y+u})},_treeLinkPath:function(t){var e=this,i=e.maxLevel,n=e._verticalLayout()?function(t){return[t.x,t.y]}:function(t){return[t.y,t.x]};if(e.lineWidth){var r=p.diagonal().projection(n);return r(t)}var o=t.source,s=t.target,h=a(t,i),l=h/2,u=o.x,c=o.y,d=s.x,f=s.y,g=(c+f)/2,m=u-l,v=Math.min(d-.25,d-l+.5),_=u+l,y=Math.max(d+.25,d+l-.5),x=[{x:m,y:c},{x:m,y:g},{x:v,y:g},{x:v,y:f},{x:y,y:f},{x:y,y:g},{x:_,y:g},{x:_,y:c}];return x=x.map(n),"M"+x[0]+"C"+x[1]+" "+x[2]+" "+x[3]+"L"+x[4]+"C"+x[5]+" "+x[6]+" "+x[7]},_renderTreeLink:function(){var t,e=this,i=e.renderer,n=e.bounds,r=e.options.plotOptions;if(t=null==e.lineWidth?{fill:r.lineColor,"fill-opacity":r.lineOpacity}:{fill:"none",stroke:r.lineColor,"stroke-opacity":r.lineOpacity,"stroke-width":e.lineWidth},e.edges.forEach(function(n){n.linkGraphic&&n.linkGraphic.remove(),n.linkGraphic=null,n.linkGraphic=i.path().addTo(e.linkGroup),n.linkGraphic.attr("d",e._treeLinkPath(n)).style(t),n.linkGraphic.datum(n)}),e.animation&&h.isSupportSVG()){var a={x:0,y:0,width:n.width,height:n.height};e.linkGroup.clipG?i.updateClip(e.linkGroup.clipG,a):(e.linkGroup.clipG=i.createClip(a),i.clip(e.linkGroup,e.linkGroup.clipG));var o=e._verticalLayout()?"height":"width",s={};s[o]=n[o],e.linkGroup.clipG.rect.attr(o,0).animate({ease:y,duration:m,attr:s})}},_rendererNodes:function(t){var i=this,n=i.renderer,r=i.maxLevel;i.nodes.forEach(function(a){function o(){var t=new g(i.getEvents());return t.vanchart=i,t}function s(t,e){e&&i.registerInteractiveTarget(t,e)}a._events=null,a.graphic&&a.graphic.remove(),a.graphic=null;var h=(e(a,r),t[a.level]);a.posX=i._horizontalLayout()?a.y:a.x,a.posY=i._horizontalLayout()?a.x:a.y;var l=i._nodeAttrs(a),u=a.series.getStyle(a);a.graphic=n.group().attr("transform","translate("+a.posX+","+a.posY+")").addTo(i.nodeGroup),a.options.image?a.graphic.nodeGraphic=n.image(l).imageContent(a.options.image).addTo(a.graphic):a.graphic.nodeGraphic=n.circle(l).style(u).addTo(a.graphic),s(a,a.graphic),s(o(),a.graphic.nodeGraphic),a.graphic.attr("transform","translate("+a.posX+","+a.posY+") scale(0.01)").animate({delay:h,ease:x,duration:v/2,attr:{transform:"translate("+a.posX+","+a.posY+") scale(1.5)"},transition:{ease:x,duration:v/2,attr:{transform:"translate("+a.posX+","+a.posY+") scale(1)"}}}),i._forceDragEnabled()&&i.force.registerDragTarget(a,a.graphic)})},_nodeAttrs:function(t){var e=t.radius;return t.options.image?{preserveAspectRatio:"none",x:-e,y:-e,width:2*e,height:2*e}:{cx:0,cy:0,r:e}},_labelPos:function(t){if(t.labelDim){var e=t.options.dataLabels,i=t.labelDim,n=e.align==s.INSIDE;return n?{x:t.posX-i.width/2,y:t.posY-i.height/2}:{x:t.posX-i.width/2,y:t.posY-t.radius-b-i.height}}},_animationEnd:function(){this._renderLabels()},_renderLabels:function(){var t=new u,e=this;e.nodes&&e.nodes.forEach(function(i){i.textGraphic&&i.textGraphic.remove(),i.textGraphic=null;var n=i.options.dataLabels,r=i.series;if(n&&n.enabled){var a=e._labelPos(i);n.autoAdjust&&(a=r._calculateAutoLabelPos(i,a,e._horizontalLayout(),t)),a&&(i.labelPos=a,t.addBounds(h.makeBounds(i.labelPos,i.labelDim))),r._createTextGraphic(i)}})},_onPanStart:function(t){var e=this,i=e.vanchart;i.groupTrans=i.groupTrans||i.bounds,i.currentPoint=t.containerPoint},_onPanMove:function(t){var e=this,i=e.vanchart,n=t.containerPoint.x-i.currentPoint.x,r=t.containerPoint.y-i.currentPoint.y;i.groupTrans.x+=n,i.groupTrans.y+=r,i.currentPoint=t.containerPoint;var a=h.makeTranslate(i.groupTrans);i.linkGroup.attr("transform",a),i.nodeGroup.attr("transform",a),i.ancestor.series.textGraphicGroup&&i.ancestor.series.textGraphicGroup.attr("transform",a)},_onPanEnd:function(t){var e=this,i=e.vanchart;i.handler.panTarget=null},getEvents:function(){var t=this;return t._treeDragEnabled()?{panstart:t._onPanStart,panmove:t._onPanMove,panend:t._onPanEnd}:{}}});return t("./VanChartLibrary").register(s.STRUCTURE_CHART,T),T}),define("locale/localeText",["require","../utils/BaseUtils"],function(t){function e(t){return r[t]}var i=t("../utils/BaseUtils").extend,n="en",r={startTime:"start ",finishTime:"finish ",duration:"duration ",progress:"progress "};return e.setLocale=function(t){i(r,t),n=t._locale},e.getTextMap=function(){return r},e.normalizeLocale=function(t){return t?t.toLowerCase().replace("_","-"):t},e}),define("chart/Point",["require","../utils/QueryUtils","../utils/BaseUtils","../utils/ColorUtils","../Constants","../ComponentLibrary","../dom/Evented"],function(t){var e=(t("../utils/QueryUtils"),t("../utils/BaseUtils")),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("../dom/Evented"),o="rgb(138, 138, 138)",s=a.extend({vanChartType:"point",initialize:function(t,e){this.series=e,this.refresh(t||{})},refresh:function(t){var i=this.series,a=i.vanchart;this.originalColor=t.color,this.originalMarkerFillColor=t.marker&&t.marker.fillColor,t=this.options=e.createOptions(t,[i.options]);var o=i.isSeriesAccumulated(),s=i.type==n.BAR_CHART?t.y:t.x,h=i.name;if(this.category=o?h:s,this.seriesName=o?s:h,this.value=this.getTargetValue(),this.name=e.pick(this.options.x,this.options.name),this.x=t.x,this.y=t.y,this.size=t.size,this.visible=!0,this.isNull=i.isNullValue(this),this.points=o?i.points:a.registerPointsPara(this),!i.options.large){if(t.drilldown&&t.drilldown.geo){var l=r.get(r.GEO_COMPONENT);this.geo=new l(t.drilldown.geo,r.GEO_COMPONENT,a)}e.convertToREMUseDefault16PX(t.dataLabels&&t.dataLabels.style),e.convertToREMUseDefault16PX(t.tooltip&&t.tooltip.style),this.jsonHyperlink=t.jsonHyperlink,this.drillUpLink=t.drillUpLink,this.hyperlink=t.hyperlink}},refreshPointColor:function(){var t=this,a=t.options,s=t.series,h=s.vanchart;if(!s.isTreeSeries()){var l,u=a.opacity,c=a.opacity;l=s.type==n.STRUCTURE_CHART?this.level:s.isSeriesAccumulated()?e.pick(a.x,a.name):s.name;var d=h.getDefaultSeriesColor(l),f=d;if(a.marker&&(a.marker=e.clone(a.marker),f=a.marker.fillColor||f),s.type!==n.LINE_MAP||!s.options.large){var p=h.getComponent(r.RANGE_LEGEND_COMPONENT);p&&(d=p.getColorWithSize(this.getTargetValue()),f=d,this.visible=!!d)}if(f=s.originalColor||f,f=s.originalMarkerFillColor||f,d=this.originalColor||s.originalColor||d,f=this.originalColor||f,f=this.originalMarkerFillColor||f,s.type!=n.BUBBLE_CHART&&s.type!=n.FORCE_BUBBLE_CHART||p||(t.getTargetValue()<0&&t.options.displayNegative?d=o:t.getTargetValue()<0&&(d=null)),d){var g=i.getStandardColorAndOpacity(d,u);d=g.hex,u=g.alpha}if(f){var g=i.getStandardColorAndOpacity(f,c);f=g.hex,c=g.alpha}var m=a.marker;m&&(m.fillColor=f,m.fillColorOpacity=c,m.radius=isNaN(m.radius)?4.5:m.radius,m.symbol=m.symbol||s.marker&&s.marker.symbol||""),d&&(this.color=d,this.opacity=u,this.mouseOverColor=this.options.mouseOverColor||i.getHighLightColor(d),this.clickColor=i.getClickColor(d),this.clickOpacity=.95*u),this.borderColor=this.options.borderColor,this.borderOpacity=this.options.borderOpacity}},getTargetValue:function(){var t=this.options[this.series.getTargetKey()];return isNaN(+t)?this.series.isNullValue(this)?0:t:+t},getLatLng:function(t){var e=this.options.lnglat;if(!e){var i=this.series.vanchart.getCurrentGeo();t||(t=i.getFeaturesByName(this.name,this.series.type),t=t&&t[0]),t&&(e=i.getDataPointLngLat(this,t))}return e?[e[1],e[0]]:null}});return s.include({_onPointMouseOver:function(t){var e=this,i=e.options,n=this.series,r=n.vanchart,a=(r.renderer,r.hoverPoint),o=r.hoverSeries,s=r.hoverPoints,h=r.getSharedAxis();if(a!==e){if(n.isTreeSeries())return n.vanchart.showTooltip(e,t),void n.fire("pointMouseOver",e);if(a&&a.fire("mouseout",t),i.tooltip&&i.tooltip.shared&&e.points&&h&&e.series.supportTooltipShared()){var l=r.getValidPointsPara(e.category),u=l.reduce(function(t,e){return e.series._onPointMouseOver.call(e,e),t?e.getTargetValue()>t.getTargetValue()?e:t:e},0);s&&s.length&&s[0]!=l[0]&&s[0]._onPointMouseOut.call(s[0],t),h&&l.length&&h.drawHighlightBackground(l),n.vanchart.showTooltip(u,t,r.getSharedPoints(e.category)[0]),r.hoverPoints=l}else n.vanchart.showTooltip(e,t),n.fire("pointMouseOver",e),o!=e.series&&(o&&o.fire("mouseout",t),e.series.fire("mouseover",t)),r.hoverSeries=e.series,r.hoverPoint=e}},_onPointMouseMove:function(t){var e=this.series.vanchart;e.showTooltip(e.hoverPoint,t)},_onPointMouseOut:function(t){var e=this,i=e.options.tooltip,n=this.series,r=n.vanchart.getSharedAxis();return n.isTreeSeries()?void n.fire("pointMouseOut",e):(i&&i.shared&&e.points&&e.points.length&&r?e.points.forEach(function(e){e.graphic&&e.series.fire("pointMouseOut",e),e.series.fire("mouseout",t)}):e.series.fire("pointMouseOut",e),void n.vanchart.hideTooltip())},_onPointTap:function(t){var i=this,n=(i.options,this.series),r=n.vanchart,a=r.isMap()?r.isMapPointVisible(i):i.isVisible();if(a){n.isTreeSeries()&&n.onPointTap(i);var o=t.srcEvent;o=o.touches?o.touches.length?o.touches[0]:o.changedTouches[0]:o,i.onClick(o),e.hasTouch()&&i.fire("mouseover",t),r.drillDown&&r.drillDown(i)}},hasValidDataLabel:function(){var t=this,e=t.labelPos&&!isNaN(t.labelPos.x)&&!isNaN(t.labelPos.y)&&t.options.dataLabels&&t.options.dataLabels.enabled;return t.series.visible&&!t.isNull&&t.visible&&e},clearPointEffect:function(){var t=this;clearInterval(t.effectInterval),t.effectGraphic&&t.effectGraphic.remove(),t.effectGraphic=null},isVisible:function(){var t=this;return t&&t.visible&&t.series.visible&&!t.isNull},getEffectTime:function(){var t=this;return e.isSupportSVG()&&t.isVisible()&&t.options.effect&&t.options.effect.enabled?t.series._getEffectTime(t):0},hasEffect:function(){return this.getEffectTime()>0},autoLabelColor:function(t){var e=this,i=e.options,r=e.series,t=t||i.dataLabels,a=t.align,o=a==n.TOP||a==n.BOTTOM||a==n.OUTSIDE;return r.type==n.BUBBLE_CHART||r.type==n.TREEMAP_CHART||r.type==n.FORCE_BUBBLE_CHART||r.columnType?o=!1:(r.type==n.SCATTER_CHART||r.type==n.POINT_MAP)&&(o=!0),o?i.marker&&i.marker.fillColor||e.color:"#ffffff"},_onPointPress:function(t){var e=this,i=this.series,n=i.vanchart,r=n.hoverPoint;r&&i.onPointPress.call(e,t)},_onPointPressUp:function(t){var e=this,i=this.series,n=i.vanchart,r=n.hoverPoint;r&&(i.onPointPressUp.call(e,t),r._onPointTap(t))},onClick:function(t){var i=this,n=i.options,r=n.click||n.onClick;r&&e.getFormatterFunction(r).call(i,t)},getEvents:function(){return{mouseover:this._onPointMouseOver,mouseout:this._onPointMouseOut,mousemove:this._onPointMouseMove,tap:this._onPointTap,press:this._onPointPress,pressup:this._onPointPressUp}},remove:function(){this.visible=!1,this.graphic&&this.graphic.remove(),this.textGraphic&&this.textGraphic.remove(),this.leadLine&&this.leadLine.remove(),this.moreLabelG&&this.moreLabelG.remove(),this.graphic=this.textGraphic=this.moreLabelG=this.leadLine=null},clearChild:function(){var t=this;if(t.parent){var i=t.parent.children;i&&i.splice(e.indexOf(i,t),1)}if(t.children)for(var n=t.children.length;--n>-1;)t.children[n].clearChild();t.remove()},getTooltipRect:function(){var t=this.series.vanchart.getComponent(r.TOOLTIP_COMPONENT);return t?t._tooltipRect:void 0}}),s}),define("component/FormattedText",["require","../utils/BaseUtils","../Constants","../ComponentLibrary"],function(t){function e(t,e,i){var n=t.options,r=h.format(n.x,e.XFormat),a=h.format(n.y,e.YFormat),o="-"==n.size?"-":h.format(n.size,e.sizeFormat),s="";return(-1!=i.indexOf(g)||-1!=i.indexOf(m))&&(s="(",-1!=i.indexOf(g)?(s+=r,-1!=i.indexOf(m)&&(s=s+","+a),s+=")"):(s+=a,s+=")"),s+=l.BLANK_VALUE_PERCENTAGE),-1!=i.indexOf(_)&&"-"!=o&&(s+=o),s}function i(t,e){var i=t&&(t.nameLabelContent||t.valueLabelContent);if(i&&"funnel"==e.series.type)return n(e,t);var r=0,a=0;if(t&&t.length){for(var o=0,s=t.length;s>o;o++){var h=t[o].dim;r=Math.max(r,h.width),a+=h.height}a+=(s-1)*D}return{width:r,height:a}}function n(t,e){var i=0,n=0,r=0;if(e.nameLabelContent){var a=e.nameLabelContent.dim;i+=a.width,n=Math.max(n,a.height)}if(e.valueLabelContent){var a=e.valueLabelContent.dim;i+=a.width,n=Math.max(n,a.height)}if(e.nameLabelContent&&e.valueLabelContent){var o=t.series,s=o.vanchart,h=s.bounds;r=h.width*c,i+=r}return{width:i,height:n,nameValueGap:r}}function r(t,e){if(!t)return"";if("object"==typeof t){var i="",n=t.identifier,r=h.format(h.pick(e.category,""),t.categoryFormat),a=h.format(h.pick(e.seriesName,""),t.seriesFormat);if((-1!=n.indexOf(p)||-1!=n.indexOf(f))&&(i+=-1!=n.indexOf(p)&&-1!=n.indexOf(f)?r+" "+a:-1!=n.indexOf(p)?r:a),!e.isNull&&-1!=n.indexOf(y)||-1!=n.indexOf(x)){h.isEmpty(i)||(i+=":");var o=h.format(e[e.series.getTargetKey()],t.valueFormat),s=h.format(e.percentage,t.percentFormat);i+=-1!=n.indexOf(y)&&-1!=n.indexOf(x)?o+" "+s:-1!=n.indexOf(y)?o:s}return i}return h.getFormatterFunction(t).call(e)}function a(t,e){if(!t)return[];if("object"==typeof t){var i=[],n=t.identifier,r=h.format(e.category,t.categoryFormat),a=h.format(e.seriesName,t.seriesFormat),o=h.format(e.value,t.valueFormat),s=h.format(e.percentage,t.percentFormat);return-1!=n.indexOf(p)&&i.push(r),-1!=n.indexOf(f)&&i.push(a),-1!=n.indexOf(y)&&i.push(o),-1!=n.indexOf(x)&&i.push(s),i}return[h.getFormatterFunction(t).call(e)]}function o(){function t(t,e){return e=e||t&&t.options&&t.options.dataLabels,e&&e.enabled&&e.formatter&&t.isVisible()}function n(e,n){if(!t(e,n))return void(e.labelDim={width:0,height:0});n=n||e.options.dataLabels;var r=n.formatter;e.labelContent="object"==typeof r?s(e,n):a(e,n),e.labelDim=i(e.labelContent,e)}function r(t,e){return e=e||t.options.dataLabels,e.style||h.convertToREMUseDefault16PX({fontSize:"0.75rem",fontFamily:"Verdana",textShadow:"1px 1px 1px rgba(0,0,0,0.15)",color:t.autoLabelColor(e)})}function a(t,e){e=e||t.options.dataLabels;var i=e.formatter,n="";try{n=h.getFormatterFunction(i).call(t)}catch(a){}var o=e.style||r(t),s=h.getTextDimension(n,o,e.useHtml);return e.useHtml&&(s.width=isNaN(parseFloat(e.labelWidth))?s.width:parseFloat(e.labelWidth),s.height=isNaN(parseFloat(e.labelHeight))?s.height:parseFloat(e.labelHeight)),[{text:n,style:o,dim:s}]}function o(t,e){return e=e||t.options.dataLabels,e.style||h.convertToREMUseDefault16PX({color:t.autoLabelColor(e),fontSize:"0.75rem",fontFamily:"Verdana",textShadow:"1px 1px 1px rgba(0,0,0, 0.15)",fontWeight:"bold"})}function s(t,e){var i=t.series,n=i.type;return i.vanchart.isMap()?b(t,e):n==l.BUBBLE_CHART||n==l.SCATTER_CHART?u(t):n==l.FUNNEL_CHART?c(t):d(t,e)}function u(t){var i=t.options.dataLabels,n=i.formatter,a=n.identifier,s=[];if(-1!=a.indexOf(f)){var l=h.format(t.seriesName,n.seriesFormat),u=i.style||o(t),c=h.getTextDimension(l,u,i.useHtml);s.push({text:l,style:u,dim:c})}if(-1!=a.indexOf(g)||-1!=a.indexOf(m)||-1!=a.indexOf(_)){var d=e(t,n,a),p=i.style||r(t),v=h.getTextDimension(d,p,i.useHtml);s.push({text:d,style:p,dim:v})}return s}function c(t){var e=t.options.dataLabels,i=e.formatter,n=i.identifier;if(e.align==l.INSIDE)return d(t);var a=t.series,s=[];if(-1!=n.indexOf(v)){var u=h.format(t.name,i.nameFormat),c=o(t),f=h.getTextDimension(u,c,e.useHtml);s.nameLabelContent={text:u,style:c,dim:f},a.maxNameLabelWidth||(a.maxNameLabelWidth=0),a.maxNameLabelWidth=Math.max(a.maxNameLabelWidth,f.width)}if(-1!=n.indexOf(y)||-1!=n.indexOf(x)){var p="";-1!=n.indexOf(y)&&(p+=h.format(t.value,i.valueFormat),-1!=n.indexOf(x)&&(p+=l.BLANK_VALUE_PERCENTAGE)),-1!=n.indexOf(x)&&(p+=h.format(t.percentage,i.percentFormat));var g=r(t),m=h.getTextDimension(p,g,e.useHtml);s.valueLabelContent={text:p,style:g,dim:m},a.maxValueLabelWidth||(a.maxValueLabelWidth=0),a.maxValueLabelWidth=Math.max(a.maxValueLabelWidth,m.width)}return s}function d(t,e){function i(t){return t.map(n).filter(a)}function n(e){if(-1!==d.indexOf(e)){var i=E[e][0],n=E[e][1],r=u._formatValue?u._formatValue(t,i):t[i],a=c[n]||u._getLabelFormatFn&&u._getLabelFormatFn(i),o=h.format(r,a);return u._postLabel?u._postLabel(o,i):o}return null}function a(t){return null!==t}function s(i,n,r){if(n.length){var a=n.join(l.BLANK_VALUE_PERCENTAGE),o=r(t,e),s=h.getTextDimension(a,o,e.useHtml);i.push({text:a,style:o,dim:s})}}e=e||t.options.dataLabels;var u=t.series,c=e.formatter,d=c.identifier,g=[v,p,f],m=[y,x,w],_=o,b=r;u.type===l.TREEMAP_CHART?(m.unshift(g.shift()),b=_):u.type===l.GANTT_CHART&&(g=[],m=[A,f,C,L,P,M]);var T=[];return s(T,i(g),_),s(T,i(m),b),T}function b(t,e){if(!t||t.isNull||!e||!e.enabled)return{};var i=e.formatter,n=e.useHtml,a=t.series.type,s=(a==l.SCATTER_CHART||a==l.POINT_MAP?l.OUTSIDE:l.INSIDE,[]);if("object"==typeof i){var u=i.identifier;if(-1!=u.indexOf(v)){var c=h.format(t.name,i.nameFormat),d=o(t,e),p=h.getTextDimension(c,d,n);s.push({text:c,style:d,dim:p})}var g="",m=-1!=u.indexOf(f),b=-1!=u.indexOf(y)||-1!=u.indexOf(_),T=-1!=u.indexOf(x),A=h.format(t.seriesName,i.seriesFormat),C=h.format(t.getTargetValue(),i.valueFormat),L=h.format(t.percentage,i.percentFormat);if(m&&(g+=A,(b||T)&&(g+=":")),b&&(g+=C,T&&(g+=" ")),T&&(g+=L),g){var d=r(t,e),p=h.getTextDimension(g,d,n);s.push({text:g,style:d,dim:p})}}return s}return n}function s(){function t(t){var e=t.options.tooltip;return e&&e.enabled&&t.isVisible()}function i(e){var i=e.options.tooltip;return t(e)&&i.shared}function n(e){var i=e.series,n=i.type,a=e.options.tooltip,o=a.formatter;if(!t(e)&&!a.shared)return"";if("object"!=typeof o)try{return h.getFormatterFunction(o).call(e)}catch(u){return""}var d;switch(n){case l.BUBBLE_CHART:case l.SCATTER_CHART:d=i.vanchart.isMap()?D:r;break;case l.TREEMAP_CHART:d=s;break;case l.GANTT_CHART:d=c;break;case l.LINE_MAP:d=I;break;default:d=D}return d(e,a)}function r(t,e){var i=(t.series,e.formatter),n=e.style,r=i.identifier,s="";return s+=a(t,r,n,i),s+=o(t,r,n,i)}function a(t,e,i,n){var r="";if(-1!=e.indexOf(f)){var a=h.format(t.seriesName,n.seriesFormat);r+=(i?"<span >":O)+a+"</span>",r+="<br />"}return r}function o(t,i,n,r){var a="";if(-1!=i.indexOf(g)||-1!=i.indexOf(m)||-1!=i.indexOf(_)){var o=e(t,r,i);a+=(n?"<span>":k)+o+"</span>"}return a}function s(t,e){var i=e.style,n=e.formatter,r=n.identifier,a="";if(e.shared){if(-1!=r.indexOf(v)){for(var o,s=t,h=[t.name];(o=s.parent)&&o.depth;)s=o,h.unshift(o.name);a+=(i?"<span>":S)+h.join(" / ")+"</span><br>"}a+=B(t,r,i,n)}else a+=R(t,r,i,n),a+=B(t,r,i,n);return a}function c(t,e){function i(e){if(-1!==a.indexOf(e)){var i=E[e][0],n=E[e][1],s=o._formatValue?o._formatValue(t,i):t[i],l=r[n]||o._getTooltipFormatFn&&o._getTooltipFormatFn(i),u=h.format(s,l);return o._postTooltip?o._postTooltip(u,i):u}return null}var n=e.style,r=e.formatter,a=r.identifier,o=t.series,s=[A,f,C,L,P,M],l="";return s.map(function(t){var e=i(t);null!=e&&(l+=(n?"<span>":O)+e+"</span><br>")}),l}function D(t,e){var n=t.series,r=n.vanchart,a=t.points,o=e.formatter,s=o.identifier,h=e.style,l="";if(e.shared&&a&&a.length){var c=r.isMap(),f=r.getComponent(u.RANGE_LEGEND_COMPONENT);l+=R(t,s,h,o),a.filter(i).forEach(function(t){var e=c&&f?a[0].color:t.color,i=t.options.tooltip;l+='<span style="font-size:'+(d?"0.75rem":"12px")+";font-style:normal; color: "+e+";opacity:"+t.opacity+'">&#9679 </span>',l+=B(t,s,h,i.formatter),l+="<br />"})}else l+=R(t,s,h,o),l+=B(t,s,h,o);return l}function R(t,e,i,n){var r="",a=t.series.type;return a===l.MULTIPIE_CHART?-1!=e.indexOf(f)&&(r=h.format(t.seriesName,n.seriesFormat)):(-1!=e.indexOf(p)&&(r=h.format(t.category,n.categoryFormat)),-1!=e.indexOf(v)&&a!==l.WORD_CLOUD_CHART&&(r=h.format(t.name,n.nameFormat))),r&&(r=(i?"<span>":S)+r+"</span>",r+="<br />"),r}function B(t,e,i,n){var r,a="",o=t.series.type,s=h.format(t.value,n.valueFormat),u=h.format(t.percentage,n.percentFormat),c=h.format(t.level,n.levelFormat),d={};d[_]=s,d[y]=s,d[x]=u,d[w]=c,o===l.MULTIPIE_CHART||o===l.WORD_CLOUD_CHART?-1!=e.indexOf(v)&&(r=h.format(t.name,n.nameFormat)):-1!=e.indexOf(f)&&(r=h.format(t.seriesName,n.seriesFormat));var p=[y,x,w];(o==l.BUBBLE_CHART||o==l.SCATTER_CHART)&&(p=[_,x,w]);var g=p.filter(function(t){return-1!==e.indexOf(t)&&!h.isEmpty(d[t])}).map(function(t){return d[t]}).join(" ");return r&&g&&(r+=":"),r&&(a+=(i?"<span >":O)+r+"</span>"),g&&(a+=(i?"<span>":k)+g+"</span>"),a}function I(t,e){if(e&&e.enabled){var i=e.formatter,n="";if("object"==typeof i){var r=e.style,a=i.identifier;n+=G(t,a,r,i),n+=N(t,a,r,i)}else n=h.getFormatterFunction(i).call(t);return n}}function G(t,e,i,n){var r="";if(-1!=e.indexOf(f)){var a=h.format(t.seriesName,n.seriesFormat);r+=(i?"<span >":O)+a+"</span>",r+="<br />"}return r}function N(t,e,i,n){var r="",a=function(t){return-1!==e.indexOf(t)},o=[],s=t.options;a(b)&&s.from.name&&o.push(s.from.name),a(T)&&s.to.name&&o.push(s.to.name),o.length&&(r+=(i?"<span>":O)+o.join("\u2192")+"</span>&nbsp;");var l=[];if(a(y)){var u=h.format(t[t.series.getTargetKey()],n.valueFormat);u&&l.push(u)}if(a(x)){var c=h.format(t.percentage,n.percentFormat);c&&l.push(c)}return l.length&&(r+=(i?"<span>":k)+l.join("&nbsp;&nbsp;")+"</span>"),r}return n}var h=t("../utils/BaseUtils"),l=t("../Constants"),u=t("../ComponentLibrary"),c=.02,d=h.isSupportSVG(),f="{SERIES}",p="{CATEGORY}",g="{X}",m="{Y}",v="{NAME}",_="{SIZE}",y="{VALUE}",x="{PERCENT}",b="{FROM.NAME}",T="{TO.NAME}",A="{PROCESSES}",C="{STARTTIME}",L="{FINISHTIME}",P="{DURATION}",M="{PROGRESS}",w="{LEVEL}",E={};["name","category","value","processes","startTime","finishTime","duration","progress","level"].map(function(t){var e="{"+t.toUpperCase()+"}";E[e]=[t,t+"Format"]}),E[f]=["seriesName","seriesFormat"],E[x]=["percentage","percentFormat"];var S='<span style="font-size:'+(d?"1rem":"16px")+';font-family:Verdana;color:white;">',O='<span style="font-size:'+(d?"0.875rem":"14px")+';font-family:Verdana;color:white">',k='<span style="font-size:'+(d?"0.875rem":"14px")+';font-family:Verdana;font-weight:bold;color:white">',D=2;return{calculateSingleLineLabelContent:r,createMultiLineLabelContent:a,calculateTextDim:i,dataLabelGenerator:o(),tooltipGenerator:s()}}),define("chart/Series",["require","../utils/BaseUtils","../utils/QueryUtils","../utils/ColorUtils","../Constants","./Point","../dom/Evented","../utils/BezierEasing","../utils/PathGenerator","../ComponentLibrary","../vector/CanvasRenderer","../component/FormattedText","../utils/Timer"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/QueryUtils"),n=t("../utils/ColorUtils"),r=t("../Constants"),a=t("./Point"),o=t("../dom/Evented"),s=t("../utils/BezierEasing"),h=t("../utils/PathGenerator"),l=(t("../ComponentLibrary"),t("../vector/CanvasRenderer")),u=t("../component/FormattedText"),c=(t("../utils/Timer"),250),d=500,f=250,p=1e3,g=600,m="quad-out",v=o.extend({initialize:function(t,e,i){this.vanchart=e,this.points=[],this.refresh(t,i)},refresh:function(t,a){var o=this.vanchart,s=t.type||o.options.chartType,h=o.options.plotOptions,l=[t,h[s],h];this.minSize=i.queryList(l,"minSize"),this.maxSize=i.queryList(l,"maxSize"),this.originalColor=t.color,this.originalMarkerFillColor=t.marker&&t.marker.fillColor,this.interpolate=this._getSeriesInterpolate(l),t=this.options=e.createOptions(t,[h[s],h]),this.type=s,this.stack=t.stack,this.index=a,this.className="vancharts-series-"+a,this.name=e.pick(t.name,"Series"+a),this.visible=e.pick(t.visible,!0),this.state=this.visible?r.STATE_SHOW:r.STATE_DROPPED;var u;if(!this.isSeriesAccumulated()&&this.type!=r.STRUCTURE_CHART){var c=this.options.color||o.getDefaultSeriesColor(this.name),d=t.opacity;u=n.getStandardColorAndOpacity(c,d),c=u.hex,d=u.alpha;var f=this.options.fillColor;f=f===!0?c:f;var p=+t.fillColorOpacity;p=isNaN(p)?this._getDefaultFillColorOpacity():p,u=n.getStandardColorAndOpacity(f,p),f=u.hex,p=u.alpha;var g=t.marker=e.clone(t.marker);if(e.hasDefined(g)){var m=this._getMarkerColorAlpha();g.fillColor=m.markerColor,g.fillColorOpacity=m.markerOpacity,this.type==r.SCATTER_CHART&&e.isNullMarker(g)&&(t.marker.symbol=e.getDefaultMarkerSymbol(a))}this.color=c,this.opacity=d,this.fillColor=f,this.fillColorOpacity=p,this.marker=g}if(e.hasDefined(this.options.startAngle)){var v=this.options.startAngle,_=this.options.endAngle;v>_?v-=360:v===_&&(_=v+360),this.startAngle=e.toRadian(v),this.endAngle=e.toRadian(_)}if(this._bindAxis(),this._loadData)var y=this._loadData(t.data);else var y=t.data||[];return this.isTreeSeries()||this._dealData(y),this},_dealData:function(t){var e=[],i=this,n={},r=this.vanchart,o=this.type;this.points.forEach(function(t){var e=i._getPointKey(t);n[e]=n[e]||[],n[e].push(t)});for(var s=0,h=t.length;h>s;s++){var l=i._getPointKey(t[s]),u=n[l],c=null;if(u){for(var d=0,f=u.length;f>d;d++)if(c=u[d]){u[d]=null;break}c&&(c._lastValue=c.options[i.getTargetKey()],c.drillSeries=null,c.geo=null,c.moreLabelG&&c.moreLabelG.remove(),c.moreLabelG=null,c.refresh(t[s]))}c||(c=new a(t[s],this)),e.push(c)}for(var l in n)n[l]&&n[l].forEach(function(t){r.removePointGraphics(t,o)});this.options.sort&&(e=e.filter(function(t){return!t.isNull}).sort(function(t,e){return Math.abs(e.getTargetValue())-Math.abs(t.getTargetValue())})),this.points=e},_getPointKey:function(t){return t.x},_getDefaultFillColorOpacity:function(){return 1},getStackAxis:function(){return this[this.getTargetKey()+"Axis"]},isNullValue:function(t){var i=t.options[t.series.getTargetKey()];return"-"==i||e.hasNotDefined(i)},_getMarkerColorAlpha:function(){var t=this.vanchart,i=this.options,r=t.options.plotOptions,a=r[this.type],o=a&&a.marker||r.marker,s=i.opacity,h=i.marker,l=h&&h.fillColor||this.options.color||o&&o.fillColor||t.getDefaultSeriesColor(this.name),u=s;if(e.hasDefined(l)){var c=n.getStandardColorAndOpacity(l,s);l=c.hex,u=c.alpha}return{markerColor:l,markerOpacity:u}},_bindAxis:function(){var t=this,e=t.options,i=t.vanchart;t._getAxisTypes().forEach(function(n){if(i[n]){var r=i[n](e[n]);r&&(r.series.push(t),t[n]=r)}})},supportTooltipShared:function(){return this.xAxis||this.yAxis||this.angleAxis},_getAxisTypes:function(){return["xAxis","yAxis"]},getTargetKey:function(){return"y"},getBaseAxisType:function(){return"xAxis"},_calculateAutoLabelPos:function(t,i,n,r){function a(t,n,a,o){for(var s=t;0>a?s>n:n>s;s+=a){var h={x:i.x,y:s};if(!r.isOverlapped(e.makeBounds(h,o)))return h}}function o(t,n,a,o){for(var s=t;0>a?s>n:n>s;s+=a){var h={x:s,y:i.y};if(!r.isOverlapped(e.makeBounds(h,o)))return h}}var s,h=3,l=t.labelDim,u=this.vanchart.bounds;if(n){var c,d;c=Math.max(0,i.y),d=u.height-l.height,s=a(c,d,h,l),s||(d=0,c=Math.min(i.y,u.height-l.height),s=a(c,d,-h,l))}else{var f,p;f=Math.max(0,i.x),p=u.width-l.width,s=o(f,p,h,l),s||(p=0,f=Math.min(i.x,u.width-l.width),s=o(f,p,-h,l))}return s?s:i},_getArcPoint:function(t,e){return[this._dealWithFloat(t*Math.sin(e)),this._dealWithFloat(-t*Math.cos(e))]},_getNormalTrendLineXYValues:function(t){var e=[],i=[],n=this.vanchart.isInverted()?"posY":"posX",a=this.vanchart.isInverted()?r.LEFT:r.BOTTOM;return t.points.sort(function(t,e){return t[n]-e[n]}),t.points.forEach(function(t){t.isNull||(e.push(t.posX),i.push(t.posY))}),[e,i,a]},_getSeriesInterpolate:function(t){var e=i.queryList(t,"step"),n=i.queryList(t,"curve"),r=t[0],a="linear";return r.step||e&&!r.curve?a="step-after":(r.curve||n&&!r.step)&&(a="cardinal"),a},_getAngle:function(t,e){return e=e||{x:0,y:0},Math.atan2(t.y-e.y,t.x-e.x)/(Math.PI/180)},_getBackgroundColor:function(){var t=this.vanchart.options,e="string"==typeof t.plotBackgroundColor,i="string"==typeof t.backgroundColor,r=e?t.plotBackgroundColor:i?t.backgroundColor:"white";return n.colorToHex(r)},getSeryTotalValue:function(){var t=0;return this.points.forEach(function(e){t+=e.getTargetValue()}),t},getLegendKey:function(t){return this.isSeriesAccumulated()?t.name:this.name},calculateLabelInfo:function(t){u.dataLabelGenerator(t)},_getPercentValue:function(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0},isSupportLegendHighlight:function(){return!0},isSeriesAccumulated:function(){return!1},isTreeSeries:function(){return!1}});return v.include({getClosestPoint:function(){return null},getTooltipPos:function(t,e,i){var n;if(t.options.tooltip.follow){var r=i.containerPoint;n=[r.x+10,r.y+10]}else n=this._getFixedPos(t,e);if(n){var a=this.vanchart.getChartBounds(),o=a.y,s=a.x,h=a.y+a.height,l=a.x+a.width,u=n[0],c=n[1];return s>u?u+=s-u:u+e.width>l&&(u-=u+e.width-l),o>c?c+=o-c:c+e.height>h&&(c-=c+e.height-h),[u,c]}},getFillFilter:function(t){return t},filterRender:function(){this.useCanvas()?this._canvasRender():this._svgFilterRender()},render:function(){this.useCanvas()?this._canvasRender():this._svgRender()},useCanvas:e.falseFn,_createGroup:function(t,e){return t.group().addTo(e.clipSeriesGroup)},_svgRender:function(){this.initialAnimationMoving=!this.group;var t=this.vanchart,i=t.renderer;this.group||(this.group=this._createGroup(i,t).style("cursor",this._pointerStyle()).attr("transform",e.makeTranslate(this._getTranslate())).attr("class",this.className+" "+this.type)),this.type==r.GAUGE_CHART?this.group.animate({duration:g,ease:m,attr:{transform:e.makeTranslate(this._getTranslate())}}):this.group.attr("transform",e.makeTranslate(this._getTranslate())),this.drawSeries&&this.drawSeries(),this.drawPoints()},_svgFilterRender:function(){var t=this;t.getDataToDraw().forEach(function(e){e.isVisible()?(e.graphic&&e.graphic.style({display:"inline"}),e.textGraphic||t._createTextGraphic(e),e.effectGraphic||t.drawPointEffect(e)):(e.graphic&&e.graphic.style({display:"none"}),e.textGraphic&&e.textGraphic.remove(),e.textGraphic=null,e.clearPointEffect())})},_canvasRender:function(){this._canvas||(this._canvas=new l(this.vanchart.dom,this.vanchart),this._canvas.onAdd()),this._canvas.clearAll(),this._canvas.addSeries(this)},_pointerStyle:function(){return this.points[0]&&this.points[0].options.click?"pointer":""},getDataToDraw:function(){return this.points},getTextDataToDraw:function(){return this.getDataToDraw()},updatePointGraphic:function(t){},_updateMarkerPointGraphic:function(t){
var i=t.graphic,n=t.options.marker,r=n.symbol;i&&(e.isImageMarker(r)&&!i.image?(i.strokePath&&i.strokePath.remove(),i.fillPath&&i.fillPath.remove(),i.markerPath&&i.markerPath.remove(),i.strokePath=i.fillPath=i.markerPath=null,this._createMarker(n,i)):!e.isImageMarker(r)&&i.image&&(i.image&&i.image.remove(),i.image=null,this._createMarker(n,i)))},drawPoints:function(){var t=this,e=t.vanchart,i=this._getPointGraphicGroup();e.registerInteractiveTarget(this,i),this.initialAnimationMoving&&this.initialAnimation&&this.initialAnimation();for(var n=this._calculateAnimationDelay(),r=t.getDataToDraw(),a=0,o=r.length;o>a;a++)t.drawPoint(r[a],n)},_drawEffectPoints:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t.drawPointEffect(e)})},drawPointEffect:function(t){var e=t.series;t.clearPointEffect();var i=t.getEffectTime();i&&(e.effectAnimation(t),t.effectInterval=setInterval(function(){e.effectAnimation(t)},i))},effectAnimation:function(){},_drawUpdatePoints:function(t,e){this._updatePointGraphicStyle(t),t.graphic.animate(this.getPointUpdateAnimationAttr(t,e)),this.vanchart.registerInteractiveTarget(t,t.graphic)},_drawEnterPoints:function(t){var e=this,i=e._getPointGraphicGroup(),n=t.graphic=this._createPointGraphic(t);e._updatePointGraphicStyle(t);var r=e.getPointInitAttr&&e.getPointInitAttr(t),a=e.getPointInitStyle&&e.getPointInitStyle(t);t.hasEffect()?n.addTo(i):n.addToBack(i),n.attr(r||{}).style(a||{}).animate(e.getPointInitAnimationAttr(t)),e.vanchart.registerInteractiveTarget(t,n)},_drawExitPoints:function(t){var e=t.series;e.getPointDropAnimationAttr?t.graphic.animate(e.getPointDropAnimationAttr(t)).remove():t.graphic.remove()},drawPoint:function(t,e){e=e||0;var i=t.isVisible(),n=t.graphic&&t.graphic.isVisible();i===n?t.graphic&&this._drawUpdatePoints(t,e):i&&!n?t.graphic&&!t.graphic.removed()?(t.graphic.style("display","inline"),this._drawUpdatePoints(t,e)):this._drawEnterPoints(t):!i&&n&&this._drawExitPoints(t)},_getEffectTime:function(t){return isNaN(t.options.effect.period)?t.series.getDefaultEffectTime():t.options.effect.period},_getPointEffectGroup:function(t){var e=t.series,i=e.vanchart.renderer;return t.effectGraphic=t.effectGraphic||i.group().addTo(e._getPointGraphicGroup()).style("pointer-events","none")},_createPointGraphic:function(t){var e=this.getPointGraphicKey(t),i=this.vanchart.renderer;return i[e]()},getStyle:function(t){var e=t.options,i=t.series;return{fill:i.getFillFilter(t.color,t),"fill-opacity":e.image?1:t.opacity,stroke:t.borderColor,"stroke-opacity":t.borderOpacity,"stroke-width":e.borderWidth,filter:"none"}},_getDynamicStyle:function(t){var e=this.getStyle(t),i=this.vanchart.highlightTarget;if(null!=i&&this.isSupportLegendHighlight()){var n=this.getLegendKey(t),r=n==i||t._rangeItem==i?1:.3;e["fill-opacity"]=e["stroke-opacity"]=r}return e},_updatePointGraphicStyle:function(t,e){e=e||t.series._getDynamicStyle(t),t.graphic&&t.graphic.style(e)},_createMarker:function(t,i){var n=t.symbol,a=t.radius,o=this.vanchart.renderer,i=i||o.group();if(e.isImageMarker(n)){var s=t.width,l=t.height;i.image=o.image({preserveAspectRatio:"none",x:-s/2,y:-l/2,width:s,height:l}).imageContent(n).addTo(i)}else{var u=this._isHollowMarker(n),c=this.type==r.LINE_CHART;u&&c?(i.strokePath=o.path({d:h.getMarkerPath(n,a+2)}).addTo(i),i.fillPath=o.path({d:h.getMarkerPath(n,a-1)}).addTo(i)):i.markerPath=o.path({d:h.getMarkerPath(n,a)}).addTo(i)}return i},_updateMarker:function(t,i,n){i=i||t.graphic,n=n||t.options.marker;var a=n.fillColorOpacity,o=this.vanchart.highlightTarget;if(o){var s=this.getLegendKey(t);a=s==o||t._rangeItem==o?1:.3}var h=n.symbol,l=this._getBackgroundColor();if(e.isImageMarker(h));else{var u=this._isHollowMarker(h),c=this.type==r.LINE_CHART;u&&c?(i.strokePath.style({fill:n.fillColor,"fill-opacity":a,stroke:l,"stroke-width":2}),i.fillPath.style({fill:l})):u?i.markerPath.style({stroke:n.fillColor,"stroke-opacity":a,"stroke-width":2,fill:l}):c?i.markerPath.style({fill:n.fillColor,"fill-opacity":a,"stroke-width":2,stroke:l}):i.markerPath.style({fill:n.fillColor,"fill-opacity":a})}},_onMarkerPressed:function(t){if(t.graphic){var i=t.options.marker,n=i.symbol,a=(t.series,{fill:t.clickColor,"fill-opacity":t.clickOpacity});if(!e.isImageMarker(n)){var o=this._isHollowMarker(n),s=this.type==r.LINE_CHART;o&&s?t.graphic.strokePath.style(a):t.graphic.markerPath.style(a)}}},_onMarkerMouseOver:function(t){if(t.graphic){var i=t.options.marker,n=i.symbol,a=(t.series.animation,i.radius+2);if(e.isImageMarker(n)){var o=i.width+4,s=i.height+4;t.graphic.image.attr({x:-o/2,y:-s/2,width:o,height:s})}else{var l=this._isHollowMarker(n),u=this.type==r.LINE_CHART;l&&u?(t.graphic.strokePath.attr({d:h.getMarkerPath(n,a+2)}),t.graphic.fillPath.attr({d:h.getMarkerPath(n,a-1)})):t.graphic.markerPath.attr({d:h.getMarkerPath(n,a)})}}else{var i=this._getDefaultMarker(t);t.series.vanchart.renderer;t.series.defaultMarker=t.series.defaultMarker||this._createMarker(i).addTo(this.group),t.series.defaultMarker.attr("transform",e.makeTranslate([t.posX,t.posY])),this._updateMarker(t,t.series.defaultMarker,i)}},_onMarkerMouseOut:function(t){var i=t.options.marker,n=i.symbol,a=(t.series.animation,i.radius);if(t.graphic)if(e.isImageMarker(n)){var o=i.width,s=i.height;t.graphic.image.attr({x:-o/2,y:-s/2,width:o,height:s})}else{var l=this._isHollowMarker(n),u=this.type==r.LINE_CHART;l&&u?(t.graphic.strokePath.attr({d:h.getMarkerPath(n,a+2)}),t.graphic.fillPath.attr({d:h.getMarkerPath(n,a-1)})):t.graphic.markerPath.attr({d:h.getMarkerPath(n,a)})}},_getDefaultMarker:function(t){return{symbol:r.CIRCLE,fillColor:t.options.marker.fillColor,fillColorOpacity:t.options.marker.fillColorOpacity,radius:4.5,enabled:!0}},_calculateAnimationDelay:function(){return 0},_isHollowMarker:function(t){return t&&-1!=t.indexOf("hollow")},_animateEnd:function(){this._showLabels(),this._drawEffectPoints()},_showLabels:function(){var t=this,e=t.vanchart,i=0;e._needShowMoreLabel()&&(t.getTextDataToDraw().forEach(function(e){e.visible&&t._showAndExitMoreLabel(e)}),i=p),e.setTimeout(t.className+"more_label_animate",function(){e._removeChangeDataState(t),t._clearMoreLabels(),t._removeDataLabels(),t._updateDataLabels();var i=t._getPointTextLabelGroup();i.renderG.style({opacity:0}).transition().animate({transition:"linear",duration:400,style:{opacity:1}})},i)},_clearMoreLabels:function(){this.getTextDataToDraw().forEach(function(t){t.moreLabelG&&t.moreLabelG.remove(),t.moreLabelG=null})},_getMoreLabelStyle:function(){var t=this.vanchart.options.moreLabel;return t.style||{fontFamily:"verdana",fontSize:"9pt"}},_showAndExitMoreLabel:function(t,i,r,a,o,h){if(0!==t.depth){var l=this,u=l.vanchart,p=u.renderer,g=t._lastValue||0,m=e.accAdd(t.options[l.getTargetKey()],-g),v=u.options.moreLabel,_=0>m?v.minusColor||"#f4b145":v.plusColor||"#52d1b8";if(m>0)m="+"+m;else if(!(0>m))return;var y=l._getMoreLabelStyle(),x=e.getTextDimension(m,y);if(e.hasNotDefined(i)||e.hasNotDefined(r)){var b=l._getMoreLabelDefaultCenter(t,x);i=b.centerX,r=b.centerY,e.hasDefined(t.labelPos)&&e.hasDefined(t.labelDim)&&(i=t.labelPos.x+t.labelDim.width/2,r=t.labelPos.y+t.labelDim.height/2)}a&&(i=a(i,x.width)),o&&(r=o(r,x.height)),t.moreLabelG=h||p.text().addTo(l.group),y["white-space"]="nowrap";var T=r-x.height/2;t.moreLabelG.textContent(m).attr({x:i-x.width/2,y:T+5,opacity:0}).style(y).style({color:n.colorToHex(_)}).animate({duration:c,ease:"back-out",attr:{y:T},attrTween:{opacity:function(){return function(t){return s.css.swing(t)}}},transition:{delay:d,duration:f,ease:"back-in",attr:{y:T+5},attrTween:{opacity:function(){return function(t){return 1-s.css.swing(t)}}}}})}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.x+t.width/2,centerY:t.y-e.height/2}},_updateDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t._createTextGraphic(e)})},_removeDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(t){t.textGraphic&&(t.textGraphic.remove(),t.textGraphic=null),t.leadLine&&(t.leadLine.remove(),t.leadLine=null)})},_createTextGraphic:function(t){var i=this;if(t.hasValidDataLabel()){var n=i.vanchart,a=n.renderer,o=t.labelContent,s=t.labelPos.x,h=t.labelPos.y,l=t.options.dataLabels,u=l.useHtml,c=this._getPointTextLabelGroup(),d=a.vtext(u).attr("transform",e.makeTranslate([s,h])).style({"pointer-events":"none"});h=0;for(var f=0,p=o.length;p>f;f++){var g,m=o[f],v=m.dim,_=m.text,y=m.style;switch(t.options.dataLabels._align){case r.LEFT:g=0;break;case r.RIGHT:g=t.labelDim.width-v.width;break;case r.CENTER:default:g=(t.labelDim.width-v.width)/2}a.vtspan(u).style({width:l.labelWidth+"px",height:l.labelHeight+"px"}).attr("y",h).attr("x",0).attr("dy",.85*v.height).attr("dx",g).textContent(_).style(y).addTo(d),h+=v.height+2}t.textGraphic=c.append(d),t.labelPos.startPos&&(t.leadLine=c.append(this._getLeadLine(t)))}},_getLeadLine:function(t){return this.vanchart.renderer.path().attr("d",this._getLeadLinePath(t)).style({fill:"none",stroke:t.options.dataLabels.connectorColor||t.color,"stroke-width":t.options.dataLabels.connectorWidth||0})},_getLeadLinePath:function(t){var e=t.labelPos.startPos,i=t.labelPos.midPos,n=t.labelPos.endPos,r=this._dealWithFloat;return"M"+r(e.x)+","+r(e.y)+"L"+r(i.x)+","+r(i.y)+"L"+r(n.x)+","+r(n.y)},_dealWithFloat:function(t){return Math.abs(t)<1e-6?0:t},_getPointGraphicGroup:function(){return this.group},_getPointTextLabelGroup:function(){if(this.textGraphicGroup)this.textGraphicGroup.attr("transform",e.makeTranslate(this._getTranslate()));else{var t=this.vanchart,i=t.seriesTextRenderGroup,n=t.seriesTextDivGroup;this.textGraphicGroup=t.renderer.vgroup(),i.append(this.textGraphicGroup.renderG),n.append(this.textGraphicGroup.divG),this.textGraphicGroup.attr("transform",e.makeTranslate(this._getTranslate()))}return this.textGraphicGroup},_getTranslate:function(){return this.vanchart.bounds},getEvents:function(){return{mouseover:this._onSeriesMouseOver,mouseout:this._onSeriesMouseOut,pointMouseOver:this._onPointMouseOver,pointMouseOut:this._onPointMouseOut,tap:this._onSeriesTap}},_onSeriesMouseOver:function(t){var e=this,i=e.vanchart,n=i.hoverSeries,r=i.hoverPoint;n!=e&&(n&&n.fire("mouseout",t),i.hoverSeries=e);var a=e.getClosestPoint(t.containerPoint);a&&a!=r&&(r&&r.fire("mouseout",t),a._events||a.getEvents&&a.on(a.getEvents(),a),a.fire("mouseover",t))},_onSeriesTap:function(t){e.hasTouch()&&this.fire("mouseover",t)},getPressedStyle:function(){return null},onPointPress:function(){var t=this,e=t.series,i=e.getPressedStyle(t);i&&t.graphic&&t.graphic.style(i)},onPointPressUp:function(){var t=this,e=t.series,i=e.getHighLightStyle(t);i&&t.graphic&&t.graphic.style(i)},remove:function(){var t=this.vanchart;this.points.forEach(function(e){t.removePointGraphics(e,this.type)}),this._canvas&&this._canvas.remove(),this.textGraphicGroup&&this.textGraphicGroup.remove(),this.group&&this.group.remove(),this.textGraphicGroup=this._canvas=this.group=null}}),v}),define("chart/gantt/GanttSeries",["require","../Series","../../utils/BaseUtils","../../Constants","../../utils/BezierEasing","../../locale/localeText","../../ChartLibrary"],function(t){function e(t){return t.format("YYYY-MM-dd")}function i(t){return t.format("YYYY-MM-dd HH:mm")}function n(t){return 100*t+"%"}function r(t){return t.map(function(t){return t.name}).join(" ")}var a=t("../Series"),o=t("../../utils/BaseUtils"),s=t("../../Constants"),h=t("../../utils/BezierEasing"),l=t("../../locale/localeText"),u=2,c=.1,d=3,f=800,p=800,g=800,m="ease-out-back",v=7,_=o.isSupportSVG(),y=a.extend({doLayout:function(){var t=this,e=t.vanchart,i=e.getTimeAxis(),n=i.scale,r=e.getProcesses(),a=(r.procMap,r.cateMap),s=r.tableDims.rowHeight,h=e.options.plotOptions.newLine,l=this._getSeriesOffsetAndHeight(s,h);this.getDataToDraw().forEach(function(t){var e=t.options,i=e.borderWidth,r=e.processesId,h=n(+t.startTime),c=n(+t.finishTime),d={};d.x=h,d.y=a[r]*s+l.offset,d.width=c-h,d.height=l.height,d=o.rectSubPixelOpt(d,i),d.rx=d.ry=u,t.rect=d,t.initRect={x:d.x,y:d.y,width:0,height:d.height},t.leftRect={x:d.x,y:d.y,width:d.width*t.progress,height:d.height},t.rightRect={x:d.x+t.leftRect.width,y:d.y,width:d.width*(1-t.progress),height:d.height}})},_getSeriesOffsetAndHeight:function(t,e){var i=0,n=t*c,r=this._getVisibles(),a=e?r.length:1,o=e?r.indexOf(this.index):0;return i=t*(1-c*(a+1))/a,n+=o*(i+t*c),{height:i,offset:n}},_getVisibles:function(){return this.vanchart.seriesOfType(this.type).filter(function(t){return t.visible}).map(function(t){return t.index})},getDataToDraw:function(){var t=this.vanchart.getProcesses().procMap;return this.points.filter(function(e){return t[e.options.processesId]&&!e.isNull})},isNullValue:o.falseFn,_getTranslate:function(){return[0,0]},_calculateLabelPos:function(){this.getDataToDraw().forEach(function(t){var e=t.options.dataLabels;if(e&&e.enabled){var i=t.rect,n=t.labelDim,r=i.width*t.progress,a={y:i.y+i.height/2-n.height/2};e.align===s.RIGHT?a.x=i.x+r-n.width-d:a.x=i.x+r/2-n.width/2,t.labelPos=a}})},getFillFilter:function(t,e){var i=this.vanchart.renderer,n={x1:0,y1:0,x2:1,y2:0},r=e.progress,a=[{offset:r,"stop-color":t},{offset:r,"stop-color":t,"stop-opacity":"0.5"}];return e.colorGradient?i.updateColorGradient(e.colorGradient,n,a):e.colorGradient=i.colorGradient(n,a),"url(#"+o.stamp(e.colorGradient)+")"},getPointGraphicKey:function(){return"rect"},getPointInitAttr:function(t){return t.initRect},getPointInitAnimationAttr:function(t){return{ease:h.css[m],duration:f,attr:t.rect}},getPointUpdateAnimationAttr:function(t){return{ease:h.css[m],duration:g,attr:t.rect}},getPointDropAnimationAttr:function(t){return{ease:h.ease("exp-out"),duration:p,attr:t.initRect}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.style(i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.style(i)},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,fill:t.series.getFillFilter(t.mouseOverColor,t)}},getPressedStyle:function(t){return{stroke:t.clickColor,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity}},_formatFn:function(t){switch(t){case"processes":return r;case"startTime":case"finishTime":return this.vanchart.getTimeAxis().initLevel<v?e:i;case"progress":return n;default:return null}},_postLabel:function(t,e){switch(e){case"duration":case"progress":case"startTime":case"finishTime":return l(e)+t;default:return t}},_postTooltip:function(t,e){switch(e){case"duration":case"progress":case"startTime":case"finishTime":return l(e).trim()+": "+t;default:return t}}});return y.prototype._getLabelFormatFn=y.prototype._formatFn,y.prototype._getTooltipFormatFn=y.prototype._formatFn,_||y.include({getFillFilter:function(t){return t},_drawUpdatePoints:function(t){this._updatePointGraphicStyle(t),this._updateAttr(t),this.vanchart.registerInteractiveTarget(t,t.graphic)},_drawEnterPoints:function(t){var e=this,i=e._getPointGraphicGroup(),n=this.vanchart.renderer,r=t.graphic=n.group();r.outerRect=n.rect(),r.leftRect=n.rect(),r.rightRect=n.rect(),this._updateAttr(t);var a=e.getStyle(t);this._updatePointGraphicStyle(t,a),r.append(r.outerRect),r.append(r.leftRect),r.append(r.rightRect),i.append(r),e.vanchart.registerInteractiveTarget(t,r)},_updateAttr:function(t){var e=t.graphic;e.outerRect.attr(t.rect),e.leftRect.attr(t.leftRect),e.rightRect.attr(t.rightRect)},_drawExitPoints:function(t){t.graphic.remove()},_updatePointGraphicStyle:function(t,e){var i=e||t.series._getDynamicStyle(t);t.graphic.outerRect.style({"stroke-width":(i["stroke-width"]||0)+1,stroke:i.stroke}),i["stroke-width"]=0,t.graphic.leftRect.style(o.clone(i)),i["fill-opacity"]=i["fill-opacity"]||1,i["fill-opacity"]*=.5,t.graphic.rightRect.style(i)},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e._updatePointGraphicStyle(t,i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);e._updatePointGraphicStyle(t,i)}}),t("../../ChartLibrary").register(s.GANTT_CHART,y),y}),define("component/LegendIconFactory",["require","../Constants"],function(t){function e(t){return a[t]}function i(t){return o[t]?o[t]:o[r.NORMAL_ICON]}function n(t){return a[t]}var r=t("../Constants"),a={},o={};return a[r.PIE_ICON]="M15.795,7.943L7.909,12.5L0.205,8.052C1.756,5.333,4.68,3.5,8.032,3.5C11.338,3.5,14.23,5.287,15.795,7.943z",o[r.PIE_ICON]={width:16,height:16},a[r.TREEMAP_ICON]="M9,12H3c-1.6,0-3-1.4-3-3l0-6c0-1.6,1.3-3,3-3l6,0c1.7,0,3,1.4,3,3v6C12,10.6,10.6,12,9,12z",o[r.TREEMAP_ICON]={width:12,height:12},a[r.DONUT_ICON]="M8.945,11.107c1.671,0,3.181,0.684,4.269,1.786l4.271-4.271c-4.686-4.686-12.284-4.686-16.971,0l4.216,4.216C5.815,11.768,7.302,11.107,8.945,11.107z",o[r.DONUT_ICON]={width:18,height:18},a[r.NORMAL_ICON]="M0,0L12,0L12,12L0,12Z",o[r.NORMAL_ICON]={width:12,height:12},a[r.BUBBLE_ICON]="M6,11.5c-1.47,0-2.851-0.572-3.889-1.611C1.072,8.851,0.5,7.47,0.5,6s0.572-2.851,1.611-3.889C3.149,1.072,4.53,0.5,6,0.5s2.851,0.572,3.889,1.611C10.928,3.149,11.5,4.53,11.5,6s-0.572,2.851-1.611,3.889C8.851,10.928,7.47,11.5,6,11.5z",o[r.BUBBLE_ICON]={width:11,height:11},a[r.NULL_MARKER]="M1,8L1,8c0-0.552,0.448-1,1-1h12c0.552,0,1,0.448,1,1v0c0,0.552-0.448,1-1,1H2C1.448,9,1,8.552,1,8z",o[r.NULL_MARKER]={width:16,height:16},a[r.CIRCLE]="M11,8c0,1.657-1.343,3-3,3S5,9.657,5,8s1.343-3,3-3S11,6.343,11,8z M14,7h-2.142C11.942,7.322,12,7.653,12,8s-0.058,0.678-0.142,1H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M4,8c0-0.347,0.058-0.678,0.142-1H2C1.448,7,1,7.448,1,8c0,0.552,0.448,1,1,1h2.142C4.058,8.678,4,8.347,4,8z",o[r.CIRCLE]={width:16,height:16},a[r.SCATTER_ICON+r.NULL_MARKER]="M0,0L12,0L12,12L0,12Z",o[r.SCATTER_ICON+r.NULL_MARKER]={width:12,height:12},a[r.SCATTER_ICON+r.NORMAL_ICON]="M0,0L12,0L12,12L0,12Z",o[r.SCATTER_ICON+r.NORMAL_ICON]={width:12,height:12},a[r.SCATTER_ICON+r.CIRCLE]="M4,8C2.897,8,1.897,7.551,1.173,6.827S0,5.103,0,4s0.449-2.103,1.173-2.827S2.897,0,4,0s2.103,0.449,2.827,1.173S8,2.897,8,4S7.551,6.103,6.827,6.827S5.103,8,4,8",o[r.SCATTER_ICON+r.CIRCLE]={width:8,height:8},a[r.SQUARE]="M11,11H5V5h6V11z M14,7h-2v2h2c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M4,7H2C1.448,7,1,7.448,1,8c0,0.552,0.448,1,1,1h2V7z",o[r.SQUARE]={width:16,height:16},a[r.SCATTER_ICON+r.SQUARE]="M0,0h8c0,0,0,3.889,0,8C4,8,0,8,0,8V0z",o[r.SCATTER_ICON+r.SQUARE]={width:8,height:8},a[r.DIAMOND]="M8,11L5,8l3-3l3,3L8,11z M14,7h-2.586l1,1l-1,1H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M3.586,8l1-1H2C1.448,7,1,7.448,1,8c0,0.552,0.448,1,1,1h2.586L3.586,8z",o[r.DIAMOND]={width:16,height:16},a[r.SCATTER_ICON+r.DIAMOND]="M0,4.5L4.502,0l4.5,4.5c0,0,0,0-4.5,4.5C0,4.5,0,4.5,0,4.5z",o[r.SCATTER_ICON+r.DIAMOND]={width:9,height:9},a[r.TRIANGLE]="M5,10l3-5.196L11,10H5z M14,7h-3.577l1.155,2H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M5.577,7H2C1.448,7,1,7.448,1,8c0,0.552,0.448,1,1,1h2.423L5.577,7z",o[r.TRIANGLE]={width:16,height:16},a[r.SCATTER_ICON+r.TRIANGLE]="M4.5,0L9,8c0,0-4.617,0-9,0L4.5,0z",o[r.SCATTER_ICON+r.TRIANGLE]={width:9,height:8},a[r.CIRCLE_HOLLOW]="M4.142,9H2C1.448,9,1,8.552,1,8c0-0.552,0.448-1,1-1h2.142C4.058,7.322,4,7.653,4,8S4.058,8.678,4.142,9zM14,7h-2.142C11.942,7.322,12,7.653,12,8s-0.058,0.678-0.142,1H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M8,7C7.449,7,7,7.449,7,8s0.449,1,1,1s1-0.449,1-1S8.551,7,8,7 M8,5c1.657,0,3,1.343,3,3s-1.343,3-3,3S5,9.657,5,8S6.343,5,8,5L8,5z",o[r.CIRCLE_HOLLOW]={width:16,height:16},a[r.SCATTER_ICON+r.CIRCLE_HOLLOW]="M4,2c1.102,0,2,0.898,2,2S5.102,6,4,6S2,5.102,2,4S2.898,2,4,2 M4,0C1.791,0,0,1.791,0,4s1.791,4,4,4s4-1.791,4-4S6.209,0,4,0",o[r.SCATTER_ICON+r.CIRCLE_HOLLOW]={width:8,height:8},a[r.SQUARE_HOLLOW]="M4,9H2C1.448,9,1,8.552,1,8c0-0.552,0.448-1,1-1h2V9z M14,7h-2v2h2c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M9,7H7v2h2V7 M11,5v6H5V5H11L11,5z",o[r.SQUARE_HOLLOW]={width:16,height:16},a[r.SCATTER_ICON+r.SQUARE_HOLLOW]="M6,6H2V2h4V6z M8,0H0v8h8V0z",o[r.SCATTER_ICON+r.SQUARE_HOLLOW]={width:8,height:8},a[r.DIAMOND_HOLLOW]="M4.157,9H2C1.448,9,1,8.552,1,8c0-0.552,0.448-1,1-1h2.157l-1,1L4.157,9z M14,7h-2.157l1,1l-1,1H14c0.552,0,1-0.448,1-1C15,7.448,14.552,7,14,7z M8,5.986L5.986,8L8,10.014L10.014,8L8,5.986 M8,4.571L11.429,8L8,11.429L4.571,8L8,4.571L8,4.571z",o[r.DIAMOND_HOLLOW]={width:16,height:16},a[r.SCATTER_ICON+r.DIAMOND_HOLLOW]="M2.121,4.999L5,2.121l2.878,2.878L5,7.879L2.121,4.999z M5,0L0,4.999L5,10l4.999-5.001L5,0z",o[r.SCATTER_ICON+r.DIAMOND_HOLLOW]={width:10,height:10},a[r.TRIANGLE_HOLLOW]="M4.5,9H2C1.448,9,1,8.552,1,8s0.448-1,1-1h3.655L4.5,9z M14,7h-3.655L11.5,9H14c0.552,0,1-0.448,1-1S14.552,7,14,7z M8,6.938L6.232,10h3.536L8,6.938 M8,4.938L11.5,11h-7L8,4.938L8,4.938z",o[r.TRIANGLE_HOLLOW]={width:16,height:16},a[r.SCATTER_ICON+r.TRIANGLE_HOLLOW]="M5.001,3.34L7.402,7.5H2.598L5.001,3.34z M5.001,0.34L0,9h10L5.001,0.34z",o[r.SCATTER_ICON+r.TRIANGLE_HOLLOW]={width:10,height:9},{getLegendIconPath:e,getLegendIconSize:i,hasIcon:n}}),define("component/Base",["require","../utils/BaseUtils","../utils/ColorUtils","../Constants","../dom/Evented","../utils/QueryUtils","./LegendIconFactory","../utils/Class"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../dom/Evented"),a=(t("../utils/QueryUtils"),t("./LegendIconFactory"),t("../utils/Class"),4.5),o=r.extend({initialize:function(t,e,i){this.componentType=e,this.vanchart=i,this.refresh(t)},refresh:function(t){this.options=t||this.options,t=this.options,e.extend(this,{isFloat:t.floating,_floatX:this._getPercentValue(t.x,this.vanchart.width),_floatY:this._getPercentValue(t.y,this.vanchart.height)}),e.convertToREMUseDefault16PX(t.style),this._refresh&&this._refresh(t)},createComponentGroup:function(){return this.vanchart.renderer.group().addTo(this.getComponentParentGroup())},getComponentParentGroup:function(){return this.isFloat?this.vanchart.frontGroup:this.vanchart.backGroup},useHtmlLabel:function(){return this.options.useHtml||!e.isSupportSVG()},_getLegendType:function(t){var i=t.options.marker,r="";switch(t.type){case n.MULTIPIE_CHART:case n.PIE_CHART:var a=t.options.innerRadius;return a&&parseFloat(a)>0?n.DONUT_ICON:n.PIE_ICON;case n.RADAR_CHART:if(t.options.columnType)return n.NORMAL_ICON;break;case n.FORCE_BUBBLE_CHART:case n.BUBBLE_CHART:return n.BUBBLE_ICON;case n.TREEMAP_CHART:return n.TREEMAP_ICON;case n.LINE_MAP:return n.NULL_MARKER;default:r=n.NORMAL_ICON}return t.type==n.POINT_MAP&&t.options.icon?t.options.icon.iconUrl:(t.options.image&&e.isSupportSVG()?r=t.options.image:i&&(r=i.symbol,t.type!=n.SCATTER_CHART||e.isImageMarker(r)||(r=n.SCATTER_ICON+i.symbol)),r)},_getPercentValue:function(t,e){return t?(t+="",-1!=t.indexOf("%")&&(t=parseFloat(t)*e/100),parseFloat(t)):0},_setComponentBounds:function(t,e){this.isFloat||this.options&&this.options.onZero?this._updateFloatBounds(t,e):this._updateComponentBounds(t,e)},isHorizontal:function(){var t=this.getPosition();return t==n.TOP||t==n.BOTTOM},isVertical:function(){return!this.isHorizontal()},getPosition:function(){return this.options.position},_updateFloatBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=this._floatX,a=this._floatY,o=i.x+i.width-r,s=i.y+i.height-a;switch(t){case n.TOP:this.bounds={x:r,y:a,width:o,height:e};break;case n.BOTTOM:this.bounds={x:r,y:a,width:o,height:e};break;case n.LEFT:this.bounds={x:r,y:a,width:e,height:s};break;case n.RIGHT_TOP:case n.RIGHT:this.bounds={x:r,y:a,width:e,height:s}}},_updateComponentBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=i.x,a=i.y,o=i.width,s=i.height;switch(t){case n.TOP:this.bounds={x:r,y:a,width:o,height:e};break;case n.BOTTOM:this.bounds={x:r,y:a+s-e,width:o,height:e};break;case n.LEFT:this.bounds={x:r,y:a,width:e,height:s};break;case n.RIGHT_TOP:case n.RIGHT:this.bounds={x:r+o-e,y:a,width:e,height:s}}this.vanchart.setPlotBounds(i),this._clipPlotBounds(t,e)},_clipPlotBounds:function(t,e){e=Math.ceil(e);var i=this.vanchart.bounds,r=i.x,a=i.y,o=i.width,s=i.height;switch(t){case n.TOP:i={x:r,y:a+e,width:o,height:s-e};break;case n.BOTTOM:i={x:r,y:a,width:o,height:s-e};break;case n.LEFT:i={x:r+e,y:a,width:o-e,height:s};break;case n.RIGHT_TOP:case n.RIGHT:i={x:r,y:a,width:o-e,height:s}}this.vanchart.setPlotBounds(i)},_recordForPlotBounds:function(t,e){e=Math.ceil(e),t===n.RIGHT_TOP&&(t=n.RIGHT),this.vanchart.clipPool[t]=Math.max(this.vanchart.clipPool[t]||0,e)},_getBackgroundColor:function(){var t=this.option,e="string"==typeof t.plotBackgroundColor,n="string"==typeof t.backgroundColor,r=e?t.plotBackgroundColor:n?t.backgroundColor:"white";return i.colorToHex(r)},_maxHeight:function(t){var e=this.vanchart.height;return t||this.options.maxHeight?this._getPercentValue(this.options.maxHeight,e):e},_maxWidth:function(t){var e=this.vanchart.width;return t||this.options.maxWidth?this._getPercentValue(this.options.maxWidth,e):e},_getTickContent:function(t,i){return i?e.format(t,i):t},getDefaultMarkerRadius:function(){return a},getPlotBounds:function(){return this.vanchart.bounds},getChartBounds:function(){return this.vanchart.getChartBounds()},getParentDom:function(){return this.vanchart.getParentDom()},getDivParentDom:function(){return this.vanchart.getDivParentDom()},getTooltipComponent:function(){return this.vanchart.components.tooltip},remove:function(){},_bindData:e.bindData,invisible:function(){return e.hasDefined(this.options.visible)&&this.options.visible===!1},_innerClip:function(t){var i=this,n=i.bounds,r=i.vanchart,a=r.renderer,o=e.makeBounds(0,0,n.width,n.height);if(this._clip?a.updateClip(this._clip,o):this._clip=a.createClip(o),"vgroup"===t.type){var s=0,h=0,l=h+o.width,u=s+o.height;t.divG.style({clip:"rect("+s+"px "+l+"px "+u+"px "+h+"px)"}),a.clip(t.renderG,this._clip)}else a.clip(t,this._clip)}});return o}),define("chart/gantt/defaultValues",["require"],function(t){return{PADDING:"0.25rem",WEEKEND_COLOR:"rgba(169, 195, 200, 0.1)",OUTLINE:{fill:"none",stroke:"rgba(207, 207, 207, 1)","stroke-width":1},TWEENLINE:{fill:"none",stroke:"rgba(207, 207, 207, 0.6)","stroke-width":1},INNERLINE:{fill:"none",stroke:"rgba(207, 207, 207, 0.6)","stroke-width":.5},MINUS_PATH:{size:[7.5,7.5],graphics:[{fill:"#F2F2F2",d:"M0,12.7c2,0,3.6,1.6,3.6,3.6S2,19.9,0,19.9s-3.6-1.6-3.6-3.6S-2,12.7,0,12.7z"},{fill:"#727171",d:"M0,20c-2.1,0-3.8-1.7-3.8-3.8s1.7-3.7,3.8-3.7s3.8,1.7,3.8,3.8S2.1,20,0,20z M0,12.8c-1.9,0-3.4,1.5-3.4,3.4 s1.5,3.4,3.4,3.4s3.4-1.5,3.4-3.4S1.9,12.8,0,12.8z M2.1,16h-4.3v0.3h4.3V16z"}]},PLUS_PATH:{size:[7.5,7.5],graphics:[{fill:"#F2F2F2",d:"M0,12.7c2,0,3.6,1.6,3.6,3.6S2,19.9,0,19.9s-3.6-1.6-3.6-3.6S-2,12.7,0,12.7z"},{fill:"#727171",d:"M0,20c-2.1,0-3.8-1.7-3.8-3.8s1.7-3.7,3.8-3.7s3.8,1.7,3.8,3.8S2.1,20,0,20z M0,12.8c-1.9,0-3.4,1.5-3.4,3.4 s1.5,3.4,3.4,3.4s3.4-1.5,3.4-3.4S1.9,12.8,0,12.8z M2.1,16H0.2v-1.9h-0.3V16h-2v0.3h2v2h0.3v-2h1.9C2.1,16.3,2.1,16,2.1,16z"}]},THUMB_PATH:{size:[4.6,7.1],graphics:[{fill:"#F2F2F2",d:"M-0.008,13.717h-2.1v4.5l2.2,2.2l0,0l2.1-2.2v-4.5H-0.008"},{fill:"#727171",d:"M-0.008,20.617l-2.3-2.4v-4.7h4.6v4.7L-0.008,20.617z M-2.008,18.117l2,2l2-2v-4.3h-4V18.117z"}]}}}),define("chart/gantt/levelDomain",["require"],function(t){function e(t){return l[t][0]}function i(t){return l[t][1]}function n(t,e){return u*t*Math.pow(2,e)}var r=1e3,a=60*r,o=60*a,s=24*o,h=181*s,l=[["year","halfYear"],["year","halfYear"],["year","quarter"],["halfYear","month"],["quarter","month"],["quarter","month"],["month","week"],["week","day"],["month","date"],["month","date"],["date","meridiem"],["date","qDay"],["date","hour"]],u=3/h;return{r0:u,LEN:l.length,Ratio:n,upUnit:e,subUnit:i}}),define("chart/gantt/helper",[],function(){function t(t,e,i,n,r,a,o){return o||(o=e.append(t.line().style(i))),o.attr({x1:n,y1:a,x2:r,y2:a})}function e(t,e,i,n,r,a,o){return o||(o=e.append(t.line().style(i))),o.attr({x1:a,y1:n,x2:a,y2:r})}function i(t,e,i,n,r,a,o,s){return s||(s=e.append(t.rect().style(i))),s.attr({x:n,y:r,width:a,height:o})}function n(t,e,i,n){function r(t,a,o,s,h){i&&i(t,a,o,s,h);var l,u=t[e];u&&(l=u.length)&&u.map(function(e,i){r(e,a+1,l,i,t)}),n&&n(t,a,o,s,h)}r(t,0,0,0,null)}function r(t){return t.reduce(function(t,e){return t+e},0)}function a(t,e){var i=r(t);return t.map(function(t){return t/i*e})}function o(t){var e=t;return e>=0&&1>=e?e:1}return{lineH:t,lineV:e,rect:i,traverse:n,sum:r,distribValues:a,getValidProgress:o}}),define("chart/gantt/LevelBar",["require","../../component/Base","../../Constants","../../utils/BaseUtils","../../ComponentLibrary","./defaultValues","../../dom/EventObject","./levelDomain","./helper"],function(t){var e=t("../../component/Base"),i=t("../../Constants"),n=t("../../utils/BaseUtils"),r=t("../../ComponentLibrary"),a=t("./defaultValues"),o=t("../../dom/EventObject"),s=t("./levelDomain").LEN,h=t("./helper"),l=(h.lineV,h.lineH),u=a.MINUS_PATH,c=a.PLUS_PATH,d=a.THUMB_PATH,f=d.size[0],p=12,g=12,m=64,v=m-f,_=v/(s-1),y=e.extend({doLayout:function(){this._setComponentBounds(i.BOTTOM,p);var t=this.vanchart.bounds;this.bounds={x:t.x,y:t.y+t.height,height:p,width:t.width}},render:function(){if(!this.group){var t=this.vanchart.renderer;this.group=t.group().add(),this.group.attr("transform",n.makeTranslate(this.bounds)).attr("class","level-bar"),this._bar(t),this._slider(t)}},isEnabled:function(){return this.enabled&&this.vanchart.getTimeAxis().isZoomEnabled()},setLevel:function(t){null!=t&&(this.enabled=!0,this._setThumbLevel(t))},_setThumbLevel:function(t){var e=f/2+_*t;this.thumbG.attr("transform",n.makeTranslate({x:e,y:-17}))},_bar:function(t){this.group.append(t.rect().attr({x:0,y:0,width:this.bounds.width,height:this.bounds.height}).style({stroke:"none",fill:this._gradient(t)}))},_gradient:function(t){if(!n.isSupportSVG())return"rgb(220, 220, 220)";var e={x1:0,y1:0,x2:0,y2:1},i=[{offset:"0%","stop-color":"rgb(220, 220, 220)"},{offset:"75%","stop-color":"rgb(181, 181, 181)"},{offset:"100%","stop-color":"rgb(137, 137, 137)"}],r=t.colorGradient(e,i);return"url(#"+n.stamp(r)+")"},_slider:function(t){var e=this.group.append(t.group());e.attr("transform",n.makeTranslate({x:this._getLineStartX(),y:p/2})),l(t,e,{fill:"none",stroke:"#727171","stroke-width":.5},0,m,0),this.minusG=this._getIconGroup(t,u,-u.size[0]/2),this.plusG=this._getIconGroup(t,c,m+c.size[0]/2),this.thumbG=this._getIconGroup(t,d,m/2),["minus","plus","thumb"].map(function(t){var i=this[t+"G"];e.append(i);var n=new o(this.iconEvents(t));n.control=this,this.vanchart.registerInteractiveTarget(n,i)},this)},_getLineStartX:function(){return this.bounds.width-m-g},eventsMap:{minus:["tap"],plus:["tap"],thumb:["panstart","panmove","panend"]},iconEvents:function(t){var e=this.eventsMap[t],i={};return e.map(function(e){i[e]=this["on"+t+e]},this),i},onminustap:function(t){this.control._changeLevel(-1)},onplustap:function(t){this.control._changeLevel(1)},onthumbpanstart:function(t){},onthumbpanmove:function(t){var e=this.control,i=e.bounds,n=t.containerPoint,r=n.x-i.x-e._getLineStartX()-f/2;r=Math.min(Math.max(0,r),v);var a=Math.round(r/_);e._changeToLevel(a)},onthumbpanend:function(t){},_changeToLevel:function(t){this.isEnabled()&&(this.vanchart.changeToLevel(t),this._setThumbLevel(this.vanchart.getTimeAxis().getLevel()))},_changeLevel:function(t){var e=this.vanchart.getTimeAxis().getLevel()+t;this._changeToLevel(e)},_getIconGroup:function(t,e,i){var r=t.group();return r.attr("transform",n.makeTranslate({x:i,y:-17})),r.append(t.path().attr(e.graphics[0])),r.append(t.path().attr(e.graphics[1])),r}});return r.register(r.LEVELBAR,y),y}),define("chart/gantt/Table",["require","../../component/Base"],function(t){var e=t("../../component/Base");return e.extend({_getHeader:function(){return this.options.header},_getBody:function(){return this.options.body}})}),define("chart/gantt/ScrollbarItem",["require","../../dom/Evented","../../utils/BaseUtils"],function(t){var e=t("../../dom/Evented"),i=t("../../utils/BaseUtils"),n=(i.isSupportSVG(),12),r="rgba(233, 233, 233, 0.6)",a="rgba(207, 207, 207, 0.6)",o=.5,s=6,h="rgba(160, 160, 160, 0.6)",l="rgba(88, 88, 88, 0.6)",u=s/2,c=e.extend({initialize:function(t){this.opt=t,this.pos={x:0,y:0};var e=t.manager.vanchart,l=t.manager.renderer;this.group=t.group.append(l.group()),this.group.style("transition","opacity 0.3s"),this.group.attr("transform",i.makeTranslate([t.x,t.y]));
var c,d,f,p,g;"x"===t.dir?(c=this.opt.length,d=n,f=this.opt.barLength,p=s,g="y"):(c=n,d=this.opt.length,f=s,p=this.opt.barLength,g="x"),this.background=this.group.append(l.rect().attr({width:c,height:d}).style({fill:r,stroke:a,"stroke-width":o}));var m={rx:u,ry:u,width:f,height:p};m[g]=(n-s)/2,this.bar=this.group.append(l.rect().attr(m).style("fill",h)),e.registerInteractiveTarget(this,this.bar)},show:function(t){t!==this._showed&&(this._showed=t,i.isSupportSVG()?this.group.style("opacity",t?"1":"0"):this.group.style("display",t?"":"none"))},remove:function(){this.group.remove()},setPos:function(t,e){(t!==this.opt.x||e!==this.opt.y)&&(this.group.attr("transform",i.makeTranslate([t,e])),this.opt.x=t,this.opt.y=e)},setSize:function(t,e){if(t!==this.opt.length||e!==this.opt.barLength){(e>t||0>t||0>e)&&(t=e=0);var i="x"===this.opt.dir?"width":"height";this.background.attr(i,t),this.bar.attr(i,e),this.opt.length=t,this.opt.barLength=e}},setPct:function(t){this.setBarPos(this._getRemainLength()*t)},getBarPos:function(){return this.pos[this.opt.dir]},setBarPos:function(t){t=Math.max(0,Math.min(t,this._getRemainLength())),this.getBarPos()!==t&&(this.pos[this.opt.dir]=t,this.bar.attr("transform",i.makeTranslate(this.pos)))},_getRemainLength:function(){return this.opt.length-this.opt.barLength},getEvents:function(){return{mouseover:this.onMouseOver,mouseout:this.onMouseOut,panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd}},onMouseOver:function(){this.bar.attr({fill:l})},onMouseOut:function(){this.bar.attr({fill:h})},onPanStart:function(t){this.initPos=this.getBarPos(),this.initPointPos=t.containerPoint},onPanMove:function(t){var e=t.containerPoint[this.opt.dir]-this.initPointPos[this.opt.dir];this.setBarPos(this.initPos+e),this.opt.manager["on"+this.opt.dir](this.getBarPos()/this._getRemainLength())},onPanEnd:function(){this.opt.manager.vanchart.handler.panTarget=null}});return c.SIZE=n,c}),define("chart/gantt/Scrollbar",["require","../../dom/Evented","../../utils/BaseUtils","./ScrollbarItem"],function(t){function e(t){return+t.toFixed(3)}var i=t("../../dom/Evented"),n=t("../../utils/BaseUtils"),r=t("./ScrollbarItem"),a=20;return i.extend({initialize:function(t){this.view=t.view,this.vanchart=t.view.vanchart,this.renderer=t.view.renderer,this.group=t.group,this.options=t,this.options.autoHide=t.autoHide!==!1,this.x=this.y=0,this._isScrollX(t)&&(this.barX=this._barBottom()),this._isScrollY(t)&&(this.barY=this._barRight());var e=t.onChangeName||"innerChange",i=t.onResizeName||"resize",n=t.onOverName||"mouseover";this.view.on(e,this.setPos,this).on(i,this.setSize,this),t.autoHide&&(this.barX&&this.barX.show(!1),this.barY&&this.barY.show(!1),this.view.on(n,this.show,this))},show:function(t){this.barX&&this.barX.show(t),this.barY&&this.barY.show(t)},setPos:function(t){if(t.initiator!==this){if(this.barX&&null!=t.x){var e=t.x/(this.options.width-this.options.innerWidth);this.barX.setPct(e)}if(this.barY&&null!=t.y){var i=t.y/(this.options.height-this.options.innerHeight);this.barY.setPct(i)}}},setSize:function(t){if(t.scrollX=this.options.scrollX,t.scrollY=this.options.scrollY,this.options.scrollX){var e=this._isScrollX(t);if(e&&!this.barX&&(this.barX=this._barBottom()),!e&&this.barX&&(this.barX.remove(),this.barX=null),e&&this.barX){var i=this._getLengths(t,"width");this.barX.setPos(0,t.height-r.SIZE),this.barX.setSize(i.length,i.barLength)}}if(this.options.scrollY){var a=this._isScrollY(t);if(a&&!this.barY&&(this.barY=this._barBottom()),!a&&this.barY&&(this.barY.remove(),this.barX=null),a&&this.barY){var i=this._getLengths(t,"height");this.barY.setPos(t.width-r.SIZE,0),this.barY.setSize(i.length,i.barLength)}}n.extend(this.options,t)},_barBottom:function(){var t=this._getLengths(this.options,"width");return this._bar("x",0,this.options.height-r.SIZE,t.length,t.barLength)},_barRight:function(){var t=this._getLengths(this.options,"height");return this._bar("y",this.options.width-r.SIZE,0,t.length,t.barLength)},_getLengths:function(t,e){var i=t[e],n="width"===e?t.innerWidth:t.innerHeight,o=i-(this._isScrollBoth(t)?r.SIZE:0);return{length:o,barLength:Math.max(i/n*o,a)}},_bar:function(t,e,i,n,a){return new r({manager:this,group:this.group,x:e,y:i,length:n,barLength:a,dir:t})},onx:function(t){this.fire("scrollX",{initiator:this,x:t*(this.options.width-this.options.innerWidth)})},ony:function(t){this.fire("scrollY",{initiator:this,y:t*(this.options.height-this.options.innerHeight)})},_isScrollX:function(t){return t.scrollX&&e(t.width)<e(t.innerWidth)},_isScrollY:function(t){return t.scrollY&&e(t.height)<e(t.innerHeight)},_isScrollBoth:function(t){return this._isScrollX(t)&&this._isScrollY(t)}})}),define("chart/gantt/TableView",["require","../../dom/Evented","../../utils/BaseUtils","../../utils/ColorUtils","../../dom/DomUtils","../../Constants","./Scrollbar","./helper"],function(t){var e=t("../../dom/Evented"),i=t("../../utils/BaseUtils"),n=t("../../utils/ColorUtils"),r=t("../../dom/DomUtils").toBack,a=(t("../../Constants"),t("./Scrollbar")),o=t("./helper"),s=(o.sum,i.makeTranslate),h=i.isEmpty,l=n.mixColorWithAlpha,u=Math.min,c=Math.max;return e.extend({_parts:["header","body","outline","scrollbar"],_eventNames:["wheelMove","resizeStart","resizeMove","over","pan"],initialize:function(t,e){this.model=t,this.vanchart=e,this.renderer=e.renderer;var i=this.G={},n=this.className;["","body","inner-body"].map(function(t){i[t||n]=e[t?n+"-"+t:n]}),this.innerPosX=this.innerPosY=0;var r=this.model.tableDims.rowHeight*this.model.tableDims.rowNum;this.visibleBodyHeight=this.model.bounds.height-this.model.tableDims.headerHeight,this.innerBodyHeight=c(r,this.visibleBodyHeight)},_getInnerWidth:function(){return this.model.innerWidth},render:function(){var t=this.renderer,e=this.model.bounds;this.clip=t.createClip({width:e.width,height:e.height});var i=this._getGroup().attr("transform",s(e));t.clip(i,this.clip),this._parts.map(function(t){this["_"+t]()},this),this._eventNames.map(function(t){this.vanchart.handler.on(t,this["on"+t],this)},this)},_prepareBody:function(){var t=this.renderer,e=this._getGroup("body"),n=this._getGroup("inner-body"),a=this._addGroup("inner-body-back",n);r(a.node()),e.attr("transform",i.makeTranslate({x:0,y:this.model.tableDims.headerHeight})),this.bodyClip=t.createClip({width:this.vanchart.bounds.width,height:this.vanchart.bounds.height}),t.clip(e,this.bodyClip),this._bodyEles={hLines:[],vLines:[],rects:[]},this._bodyEles.gs=[]},_buildScrollbar:function(t){this.scrollbar=new a(i.extend({view:this,group:this._getGroup("body"),width:this.model.bounds.width,height:this.visibleBodyHeight,innerWidth:this._getInnerWidth(),innerHeight:this.innerBodyHeight},t)),this.scrollbar.on("scrollX",this.onScrollX,this).on("scrollY",this.vanchart.onScrollY,this.vanchart),this.vanchart.on("moveY",this.onScrollY,this)},_addGroup:function(t,e){var i=this.renderer.group(),n=t?this.className+"-"+t:this.className;return i.attr("class",n),this.G[t||this.className]=i,e&&e.append(i),i},_getGroup:function(t){return this.G[t||this.className]},_getOptionsColor:function(t){return h(t.opacity)?t.backgroundColor:l(t.backgroundColor,t.opacity)},changeInner:function(t){var e;(e=this._setInnerPos(t))&&this.fire("innerChange",e)},onwheelMove:function(t){var e={x:null,y:null};this._shouldYMove(t.containerPoint)&&(e.y=this.innerPosY-t.wheel.pixelY),this._shouldXMove(t.containerPoint)&&(e.x=this.innerPosX-t.wheel.pixelX),this.changeInner(e)},onpan:function(t){switch(t.type){case"panstart":this._initInnerPos={x:this.innerPosX,y:this.innerPosY},this._initPoint=t.containerPoint;break;case"panmove":var e={x:null,y:null};this._shouldYMove(this._initPoint)&&(e.y=this._initInnerPos.y+t.deltaY),this._shouldXMove(this._initPoint)&&(e.x=this._initInnerPos.x+t.deltaX);var i;(i=this._setInnerPos(e))&&this.fire("innerChange",i);break;case"panend":}},_shouldYMove:function(t){return t.y>this.model.bounds.y+this.model.tableDims.headerHeight},_shouldXMove:function(t){return i.containsPoint(this.model.bounds,t)},onScrollX:function(t){this._setInnerPos(t)},onScrollY:function(t){this._setInnerPos(t)},_setInnerPos:function(t){var e,n;return t&&(null!=t.x&&(e=t.x),null!=t.y&&(n=t.y)),null==e&&(e=this.innerPosX),null==n&&(n=this.innerPosY),e=u(c(this.model.bounds.width-this._getInnerWidth(),e),0),n=u(c(this.visibleBodyHeight-this.innerBodyHeight,n),0),e!==this.innerPosX||n!==this.innerPosY?(this._showShadow&&this._showShadow(0!==e),this._getGroup("header").attr("transform",i.makeTranslate([e,0])),this._getGroup("inner-body").attr("transform",i.makeTranslate([e,n])),this.innerPosX=e,this.innerPosY=n,{x:e,y:n}):!1},onresizeStart:function(t){this._initX=this.model.bounds.x,this._initWidth=this.model.bounds.width,this._initPointX=t.containerPoint.x},onresizeMove:function(){this.update(),this._fireResize()},_fireResize:function(){this.fire("resize",{width:this.model.bounds.width,height:this.visibleBodyHeight,innerWidth:this._getInnerWidth(),innerHeight:this.innerBodyHeight}),this._setInnerPos()},onover:function(t){this.fire("mouseover",i.containsPoint(this.model.bounds,t.containerPoint))}})}),define("chart/gantt/ProcessesView",["require","./TableView","../../utils/BaseUtils","./Scrollbar","../../dom/DomUtils","./helper","./defaultValues"],function(t){var e=t("./TableView"),i=(t("../../utils/BaseUtils"),t("./Scrollbar"),t("../../dom/DomUtils").toBack),n=t("./helper"),r=t("./defaultValues"),a=n.lineV,o=n.lineH,s=n.rect,h=n.traverse,l=n.sum,u=r.OUTLINE,c=r.INNERLINE,d=r.TWEENLINE;return e.extend({className:"processesGroup",update:function(){var t=this.renderer,e=this.model.bounds;t.updateClip(this.clip,{width:e.width,height:e.height}),this._header(),this._body(),this._outline()},_getInnerWidth:function(){return l(this.model.tableDims.widths)},_header:function(){var t=this.renderer,e=this._getGroup(),i=this.model.tableDims.widths,n=this.model.tableDims.headerHeight,r=this.model._getHeader(),h=this._getGroup("header");h||(h=this._addGroup("header",e),this._headerEles={},this._headerEles.gs=[]);var l=a.bind(null,t,h),u=o.bind(null,t,h),c=s.bind(null,t,h),f=this._headerEles.gs,p=-1,g=0;i.map(function(t,e){f[++p]=c({fill:this._getOptionsColor(r[e])},g,0,t,n,f[p]),e&&(f[++p]=l(d,0,n,g,f[p])),f[++p]=this._drawText(h,r[e].style,n/2,g+t/2,r[e].text,f[p]),g+=t},this);var m=d["stroke-width"]/2;f[++p]=u(d,0,g,n-m,f[p])},_body:function(){this._bodyEles||this._prepareBody();var t=this.renderer,e=this._getGroup("inner-body-back"),n=this._bodyEles.gs,r=-1,l=a.bind(null,t,e),u=o.bind(null,t,e),f=s.bind(null,t,e),p=this.model._getBody(),g=this.model.tableDims.widths,m=[],v=g.reduce(function(t,e,i){return m[i]=t,t+e},0),_=this.model.tableDims.rowNum,y=this.model.tableDims.rowHeight,x=0,b=g.map(function(){return 0}),T=this._drawText.bind(this);h(this.model._getCateRoot(),"categories",null,function(t,i,a,o){if(i){var s=i-1,h=b[s],l=x+1;if(a-1>o){++x;var f=1===i?d:c;n[++r]=u(f,m[s],v,y*x,n[r]);for(var _=b.length;--_>=s;)b[_]=x}var A=t.name;null!=A&&""!==A&&(n[++r]=T(e,p[s].style,y*(h+l)/2,m[s]+g[s]/2,A,n[r]))}}),++x;for(var A=x;_>=A;){var C=A===x?d:c;n[++r]=u(C,0,v,y*A,n[r]),++A}var L=0,P=this.innerBodyHeight;g.map(function(a,o){p[o]&&(++r,n[r]||(n[r]=e.append(t.rect()),n[r].style({fill:this._getOptionsColor(p[o])}),i(n[r].node())),f(null,L,0,a,P,n[r])),o&&(n[++r]=l(d,0,P,L,n[r])),L+=a},this)},_outline:function(){var t=this.renderer,e=this._getGroup(),i=this.model.bounds;if(!this._outlineEles){var n=u["stroke-width"]/2,r=a.bind(null,t,e,u),s=o.bind(null,t,e,u);r(0,i.height,n),s(0,this.vanchart.bounds.width,n),s(0,this.vanchart.bounds.width,i.height-n)}this._outlineEles=a(t,e,c,0,i.height,i.width-c["stroke-width"]/2,this._outlineEles)},_scrollbar:function(){this._buildScrollbar({scrollX:!0,scrollY:!1})},_drawText:function(t,e,i,n,r,a){return a||(a=t.append(this.renderer.text().style(e).textContent(r))),a.attr({x:n,y:i,dy:".35em","margin-top":"-0.5em"}).vMiddle(),a},onresizeMove:function(t){var i=this.model.bounds,n=t.containerPoint.x-this._initPointX;i.width=this._initWidth+n||0,this.model.expandPanelWidth(i.width),e.prototype.onresizeMove.call(this)}})}),define("chart/gantt/Processes",["require","./Table","../../utils/BaseUtils","../../ComponentLibrary","./ProcessesView","./helper","./defaultValues"],function(t){var e=t("./Table"),i=t("../../utils/BaseUtils"),n=t("../../ComponentLibrary"),r=t("./ProcessesView"),a=t("./helper"),o=a.traverse,s=a.sum,h=a.distribValues,l=t("./defaultValues").PADDING,u=0,c=3,d=i.getTextDimension,f=Math.max,p=e.extend({_refresh:function(){u=i.paddingConvertWithScale(l)},doLayout:function(){},getInitPanelDims:function(){return this.tableDims=this._calcTableDims(),{width:this._calcPanelWidth(),headerHeight:this.tableDims.headerHeight,rowHeight:this.tableDims.rowHeight,rowNum:this.tableDims.rowNum}},setPanelDims:function(t){this.tableDims.headerHeight=t.headerHeight,this.tableDims.rowNum=t.rowNum,this.bounds={x:t.x,y:t.y,width:t.pWidth,height:t.height}},_calcPanelWidth:function(){var t,e,i=s(this.tableDims.widths);if(t=this.options.width){var n=this.vanchart.bounds;e=n.width*t,e>i&&this.expandPanelWidth(e)}else e=i;return e},expandPanelWidth:function(t){t<=s(this.tightWidths)||(this.tableDims.widths=h(this.tableDims.widths,t))},_calcTableDims:function(){var t=this._getHeader(),e=this._getBody(),i=this._getCateRoot(),n=this._calcHeaderDim(t),r=this._calcRowDim(n.widths,e,i);return{headerHeight:n.height,rowHeight:r.height,widths:r.widths,rowNum:r.num}},_calcHeaderDim:function(t){if(!t||!t.length)return{height:0,widths:[]};var e=0,i=t.map(function(t){var i=d(t.text,t.style,!1);return e=f(e,i.height*c),i.width+2*u});return{height:e,widths:i}},_calcRowDim:function(t,e,i){var n=this.procMap={},r=this.cateMap={},a=0,s=0;return o(i,"categories",function(i,o,h,l,u){if(o){var p=o-1,g=d(i.name,e[p].style,!1);t[p]=f(t[p],g.width);var m=i.categories;m&&m.length>1||(a=f(a,g.height*c),r[i.processesId]=s),m&&m.length||++s,n[i.processesId]={options:i,parent:n[u.processesId]}}}),t=t.map(function(t){return t+2*u}),this.tightWidths=t.slice(),{num:s,height:a,widths:t}},_getCateRoot:function(){return this.options},render:function(){Object.keys(this.procMap).length&&(this.view||(this.view=new r(this,this.vanchart)),this.view.render())}});return n.register(n.PROCESSES,p),p}),define("dateUnits/dateFormat",["require"],function(t){function e(t,e,i){var n=""+Math.abs(t),r=e-n.length,a=t>=0;return(a?i?"+":"":"-")+Math.pow(10,Math.max(0,r)).toString().substr(1)+n}function i(t,i,n,r){var a=r;"string"==typeof r&&(a=function(){return this[r]()}),t&&(f[t]=a),i&&(f[i[0]]=function(){return e(a.apply(this,arguments),i[1],i[2])})}function n(t){return t.match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"")}function r(t){var e,i,r=t.match(c);for(e=0,i=r.length;i>e;e++)f[r[e]]?r[e]=f[r[e]]:r[e]=n(r[e]);return function(e){var n,a="";for(n=0;i>n;n++)a+=r[n]instanceof Function?r[n].call(e,t):r[n];return a}}function a(t,e){return d[e]=d[e]||r(e),d[e](t)}function o(t,e){return t=t.toString().split("e"),t=Math.round(+(t[0]+"e"+(t[1]?+t[1]-e:-e))),t=t.toString().split("e"),+(t[0]+"e"+(t[1]?+t[1]+e:e))}function s(t,e){return o(e.get(t),-2)+u.duration[t]}function h(t,e){return null==p[e]&&("string"==typeof u.duration[e]?p[e]=s.bind(null,e):p[e]=u.duration[e]),p[e](t)}function l(t){for(var e in t)"_"!==e.charAt(0)&&("base"===e?t.base(i,u):u[e]=t[e])}var u={duration:{year:"years",month:"months",day:"days",hour:"hours",minute:"minutes",second:"seconds"},halfYears:["H1","H2"],quarters:"Q1_Q2_Q3_Q4".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),meridiem:["am","pm"],qDay:"0h~6h_6h~12h_12h~18h_18h~24h".split("_")},c=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w{1,3}|wo|W[o|W]?|Q{2,3}|Qo?|[yY]{2,6}|gg(ggg?)?|GG(GGG?)?|e{2,6}|E|a|A|hh?|HH?H?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,d={},f={},p={},g=i;return g("y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),g(0,["yy",2],0,function(){return this.year()%100}),g(0,["yyyy",4],0,"year"),g("Y",0,0,function(){var t=this.year();return 9999>=t?""+t:"+"+t}),g(0,["YY",2],0,function(){return this.year()%100}),g(0,["YYYY",4],0,"year"),g(0,["yyyyy",5],0,"year"),g(0,["yyyyyy",6,!0],0,"year"),g("N",0,0,function(){return u.halfYears[this.halfYear()-1]}),g("Q",["QQ",2],0,"quarter"),g("QQQ",0,0,function(){return u.quarters[this.quarter()-1]}),g("M",["MM",2],"Mo",function(){return this.month()+1}),g("MMM",0,0,function(){return u.monthsShort[this.month()]}),g("MMMM",0,0,function(){return u.months[this.month()]}),g("w",["ww",2],0,"week"),g("www",0,0,function(){return"Week"+this.week()}),g("e",["ee",2],0,"day"),g("eee",0,0,function(){return u.weekdaysShort[this.day()]}),g("eeee",0,0,function(){return u.weekdays[this.day()]}),g("eeeeee",0,0,function(){return u.weekdaysMin[this.day()]}),g("d",["dd",2],0,"date"),g("a",0,0,function(){return u.meridiem[this.meridiem()-1]}),g("I",0,0,function(){return u.qDay[this.qDay()-1]}),g("H",["HH",2],0,"hour"),g("HHH",0,0,function(){return this.hour()+"h"}),g("m",["mm",2],0,"minute"),g("s",["ss",2],0,"second"),{formatDate:a,formatDuration:h,setLocale:l}}),define("dateUnits/dateDuration",["require","./dateFormat"],function(t){var e=t("./dateFormat").formatDuration,i=1e3,n=60*i,r=60*n,a=24*r,o=365*a,s=30*a,h=function(t){this._ms=+t},l=(h.prototype={valueOf:function(){return this._ms},as:function(t){return e(this,t)},get:function(t){var e=this._ms;switch(t){case"millisecond":break;case"second":e/=i;break;case"hour":e/=r;break;case"minute":e/=n;break;case"day":e/=a;break;case"month":e/=s;break;case"year":e/=o;break;default:throw new Error("Unknown unit "+t)}return e}},function(t){return new h(t)});return l}),define("dateUnits/dateUnits",["require","./dateFormat","./dateDuration"],function(t){function e(t,e,i){var n=Math.floor((t-e)/(i-e+1)),r=t-(i-e+1)*n;return{c:n,r:r}}function i(t){return t%4===0&&t%100!==0||t%400===0}function n(t){return i(t)?366:365}function r(t){var e=new Date(t,0,4).getDay()||7;return 4-e}function a(t){var e=r(t),i=r(t+1);return(n(t)-e+i)/7}var o=t("./dateFormat"),s=t("./dateDuration"),h=o.formatDate,l=864e5,u=["year","month","halfYear","quarter","week","day","date","meridiem","qDay","hour","minute","second","millisecond"],c={};u.map(function(t){c[t+"s"]=t});var d=function(t){this._d=t},f=d.prototype={valueOf:function(){return+this._d},year:function(t){return null!=t?(this._d.setFullYear(t),this):this._d.getFullYear()},month:function(t){return null!=t?(this._d.setMonth(t),this):this._d.getMonth()},halfYear:function(t){if(null!=t){var i=e(t,1,2);return i.c&&this.year(this.year()+i.c),this.month(1===i.r?0:6),this}return this.month()<6?1:2},quarter:function(t){if(null!=t){var i=e(t,1,4);return i.c&&this.year(this.year()+i.c),this.month(3*(i.r-1)),this}return Math.ceil((this.month()+1)/3)},dayOfYear:function(){return Math.floor((this._d-new Date(this.year(),0,1))/l)+1},weekOfYear:function(){var t=Math.floor((this.dayOfYear()-(this.day()||7)+10)/7),e=this.year();return 1>t?(e-=1,t=a(e)):t>a(e)&&(t-=a(e),e+=1),{week:t,year:e}},week:function(){return this.weekOfYear().week},day:function(t){if(null!=t){var e=t-(this.day()||7);return this._d.setDate(this.date()+e),this}return this._d.getDay()},date:function(t){return null!=t?(this._d.setDate(t),this):this._d.getDate()},meridiem:function(t){if(null!=t){var i=e(t,1,2);return i.c&&this.date(this.date()+i.c),this.hours(1===i.r?0:12),this}return this.hours()<12?1:2},qDay:function(t){if(null!=t){var i=e(t,1,4);return i.c&&this.date(this.date()+i.c),this.hour(6*(i.r-1)),this}return Math.ceil((this.hour()+1)/6)},hour:function(t){return null!=t?(this._d.setHours(t),this):this._d.getHours()},minute:function(t){return null!=t?(this._d.setMinutes(t),this):this._d.getMinutes()},second:function(t){return null!=t?(this._d.setSeconds(t),this):this._d.getSeconds()},millisecond:function(t){return null!=t?(this._d.setMilliseconds(t),this):this._d.getMilliseconds()},startOf:function(t){switch(t){case"year":this.month(0);case"halfYear":case"quarter":case"month":this.date(1);case"week":case"day":case"date":this.hours(0);case"hour":case"meridiem":case"qDay":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===t?this.day(1):-1!==["quarter","halfYear","meridiem","qDay"].indexOf(t)&&this[t](this[t]()),this},endOf:function(t){return t&&"millisecond"!==t?this.add(1,t).startOf(t).add(-1,"millisecond"):this},add:function(t,e){if(e=c[e]||e,"halfYear"===e)this.add(6*t,"month");else if("quarter"===e)this.add(3*t,"month");else if("week"===e)this.add(7*t,"date");else if("meridiem"===e)this.add(12*t,"hour");else if("qDay"===e)this.add(6*t,"hour");else{"day"===e&&(e="date");var i=this.get(e);this[e](i+t)}return this},isWeekend:function(){var t=this.day();return 6===t||0===t}};u.map(function(t){f[t+"s"]=f[t]}),f.get=function(t){return this[t]()},f.format=function(t){return h(this,t)};var p=function(t){var e;return e=t instanceof d?new Date(t._d):t?new Date(t):new Date,new d(e)};return p.isLeapYear=i,p.daysInYear=n,p.firstWeekOffset=r,p.weeksInYear=a,p.setLocale=o.setLocale,p.duration=s,p}),define("chart/gantt/TimeAxisView",["require","./TableView","../../utils/BaseUtils","./levelDomain","../../dateUnits/dateUnits","./helper","./defaultValues"],function(t){function e(t,e){for(var i=-1,n=t.length;++i<n;)if(e(t[i]))return i}var i=t("./TableView"),n=t("../../utils/BaseUtils"),r=(t("./levelDomain"),t("../../dateUnits/dateUnits"),t("./helper")),a=r.lineV,o=r.lineH,s=r.rect,h=r.sum,l=t("./defaultValues"),u=l.OUTLINE,c=l.INNERLINE,d=l.TWEENLINE,f=n.getTextDimension,p=n.bindData;return i.extend({className:"timeaxisGroup",update:function(){var t=this.renderer,e=this.model.bounds;this._getGroup().attr("transform",n.makeTranslate(e)),t.updateClip(this.clip,{width:e.width,height:e.height}),this._header(),this._body(),this._outline()},updateContent:function(){this._header(),this._body(),this.leftUp=null,this._fireResize()},_setInnerPos:function(t){t=i.prototype._setInnerPos.call(this,t);var n=this.model._headerData;if(!this.leftUp){var r=this.l.bind(null,-this.innerPosX),a=this.r.bind(null,-this.innerPosX+this.model.bounds.width);this.leftUp={i:e(n.upTexts,r),data:n.upTexts},this.leftSub={i:e(n.subTexts,r),data:n.subTexts},this.rightUp={i:e(n.upTexts,a),data:n.upTexts},this.rightSub={i:e(n.subTexts,a),data:n.subTexts}}return this._checkTextBounds("left",this.leftUp),this._checkTextBounds("left",this.leftSub),this._checkTextBounds("right",this.rightUp),this._checkTextBounds("right",this.rightSub),t},l:function(t,e){return t>=e.left},r:function(t,e){return t<=e.right},_checkTextBounds:function(t,e){var i,n,r,a=e.data[e.i],o=-this.innerPosX,s=-this.innerPosX+this.model.bounds.width;"left"===t?(i=o,n=i,r=Math.min(a.right,s)):(i=s,n=Math.max(a.left,o),r=i);var h=this.l(i,a),l=this.r(i,a);h&&l?(a.width||(a.width=f(a.content,a.style).width),r-n>=a.width?a.ele.attr("x",(n+r)/2).vMiddle():a.ele.attr("x",-100)):(a.ele.attr("x",a.x).vMiddle(),h?l||++e.i:--e.i)},_header:function(){var t=this.renderer,e=this._getGroup(),i=this.model,n=i.bounds.width,r=i.tableDims.heights,a=h(r),l=i._getHeader();this._headerEles||(this._headerEles={upLines:[],upTexts:[],subLines:[],subTexts:[]},this._headerEles.gs=[]);var u=this._headerEles.gs,f=-1,g=this._headerEles,m=this.model._headerData;u[++f]=s(t,e,{fill:this._getOptionsColor(l[0])},0,0,n,r[0],u[f]),u[++f]=s(t,e,{fill:this._getOptionsColor(l[1])},0,r[0],n,r[1],u[f]);var v=d["stroke-width"]/2;u[++f]=o(t,e,d,0,n,r[0]-v,u[f]),u[++f]=o(t,e,d,0,n,a-v,u[f]);var _=this._getGroup("header")||this._addGroup("header",e);["upLines","subLines"].map(function(e){var i=p(g[e],m[e]);i.exit.map(function(t){t.remove()});var n=i.enter.map(function(e){return _.append(t.line().datum(e).style(c))});g[e]=n.concat(i.update).map(function(t){return t.attr(t.datum())})}),["upTexts","subTexts"].map(function(e){var i=p(g[e],m[e]);i.exit.map(function(t){t.remove()});var n=i.enter.map(function(e){return _.append(t.text().datum(e).style(e.style))});g[e]=n.concat(i.update).map(function(t){var e=t.datum();return e.ele=t,t.textContent(e.content).attr({x:e.x,y:e.y,dy:".35em","margin-top":"-0.5em"}).vMiddle(),t})})},_body:function(){this._bodyEles||(this._prepareBody(),this._shadow()),this._bodyData={hLines:[],vLines:[],rects:[]};var t=this._bodyEles,e=this._bodyData,i=this.renderer,n=this._getGroup("inner-body-back"),r=this.model.tableDims.rowHeight,a=this.model.tableDims.rowNum,o=this.innerBodyHeight;e.rects=this.model._weekendsWidths;var s=p(t.rects,e.rects);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return n.append(i.rect().datum(t).style({fill:l.WEEKEND_COLOR}))});t.rects=h.concat(s.update).map(function(t){var e=t.datum();return t.attr({x:e.from,y:0,width:e.to-e.from,height:o})}),e.vLines=this.model._headerData.subLines;var s=p(t.vLines,e.vLines);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return n.append(i.line().datum(t).style(c))});t.vLines=h.concat(s.update).map(function(t){var e=t.datum();return t.attr({x1:e.x1,y1:0,x2:e.x2,y2:o})});for(var u=0;++u<=a;)e.hLines.push({x1:0,y1:u*r,x2:this._getInnerWidth(),y2:u*r});var s=p(t.hLines,e.hLines);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return n.append(i.line().datum(t).style(c))});t.hLines=h.concat(s.update).map(function(t){return t.attr(t.datum())})},_outline:function(){var t=this.renderer,e=this._getGroup(),i=this.model.bounds,r=a.bind(null,t,e,u),s=u["stroke-width"]/2;if(!this._outlineEles){var h=o.bind(null,t,e,u);h(0,this.vanchart.bounds.width,s),h(0,this.vanchart.bounds.width,i.height-s)}var l=i.width-s;n.isSupportSVG()||(l=Math.floor(l)),this._outlineEles=r(0,i.height,l,this._outlineEles)},_scrollbar:function(){this._buildScrollbar({scrollX:!0,scrollY:!0})},_shadow:function(){var t={x1:0,y1:0,x2:1,y2:0},e=[{offset:"0%","stop-color":"rgb(62, 62, 62)","stop-opacity":"0.2"},{offset:"75%","stop-color":"rgb(62, 62, 62)","stop-opacity":"0"}],i=this.renderer.colorGradient(t,e),r="url(#"+n.stamp(i)+")";this._shadowRect=this._getGroup("body").append(this.renderer.rect()).style("transition","opacity 0.2s").attr({x:0,y:0,width:10,height:this.model.bounds.height,fill:r}),this._showShadow(!1)},_showShadow:function(t){t!==this._shadowShowed&&(this._shadowShowed=t,this._shadowRect.style("opacity",t?"1":"0"))},onresizeMove:function(t){var e=this.model.bounds,n=this._initPointX-t.containerPoint.x;e.x=this._initX-n,e.width=this._initWidth+n||0,i.prototype.onresizeMove.call(this)}})}),define("chart/gantt/levelText",["require","../../locale/localeText"],function(t){function e(){return r("ganttLevels")||a}function i(t,i){return t.format(e()[i][0])}function n(t,i){return t.format(e()[i][1])}var r=t("../../locale/localeText"),a=[["yyyy","N"],["yyyy","N"],["yyyy","QQQ"],["N[,]yyyy","MMM"],["QQQ[,]yyyy","MMM"],["QQQ[,]yyyy","MMM"],["MMM[,]yyyy","www"],["d[,]MMM[,]yyyy","eee"],["MMM[,]yyyy","d"],["MMM","d"],["d[,]MMM","a"],["d[,]MMM","I"],["d[,]MMM","HHH"]];return{getUpText:i,getSubText:n}}),define("chart/gantt/TimeAxis",["require","./Table","../../utils/BaseUtils","../../ComponentLibrary","./TimeAxisView","./levelDomain","../../dateUnits/dateUnits","../../utils/Scale","./helper","./levelText","./levelText","./defaultValues"],function(t){function e(t,e,i,n,r){t.add(1,e);var a=(t-i)*n;return r.push(a),a}var i=t("./Table"),n=t("../../utils/BaseUtils"),r=t("../../ComponentLibrary"),a=t("./TimeAxisView"),o=t("./levelDomain"),s=t("../../dateUnits/dateUnits"),h=t("../../utils/Scale"),l=t("./helper"),u=l.sum,c=l.distribValues,d=t("./levelText").getUpText,f=t("./levelText").getSubText,p=t("./defaultValues").PADDING,g=0,m=3,v=o.upUnit,_=o.subUnit,y=o.LEN,x=o.Ratio,b=n.getTextDimension,T=n.getTextHeight,A=n.object2date,C=n.isEmpty,L=Math.max,P=Math.min,M=i.extend({_refresh:function(){g=n.paddingConvertWithScale(p),this.lastScale=this.scale,this.scale=h.linear()},doLayout:function(){},getInitPanelDims:function(){return this.tableDims=this._calcTableDims(),{headerHeight:u(this.tableDims.heights)}},setPanelDims:function(t){var e=t.headerHeight;this.tableDims.headerHeight=e,this.tableDims.rowHeight=t.rowHeight,this.tableDims.rowNum=t.rowNum;var i=u(this.tableDims.heights);e>i&&(this.tableDims.heights=c(this.tableDims.heights,e)),this.bounds={x:t.x+t.pWidth,y:t.y,width:t.tWidth,height:t.height}},_calcTableDims:function(){var t=this._getHeaderHeights();return{heights:t}},_getHeaderHeights:function(){return this._getHeader().map(function(t){return T(t.style)*m})},calcSeries:function(t,e){var i=Number.MAX_VALUE,n=0,r={},a={},o=[];t.map(function(t){t.points.map(function(t){var h=t.options,u=A(h.startTime),c=A(h.finishTime),d=A(h.markTime);if(isNaN(u.getTime())||isNaN(c.getTime()))return void(t.isNull=!0);var f=t.options.processesId;if(null!=e[f]){if(t.progress=l.getValidProgress(h.progress),h.tooltip.follow=!0,!t.processes){var p=f,g=e[p];for(t.processes=[g.options];g=g.parent;)t.processes.unshift(g.options)}C(t.options.id)||(a[h.id]=t);var m=r[f]=r[f]||{min:Number.MAX_VALUE,max:0};d&&!isNaN(d.getTime())&&(o.push(t),m.min=P(m.min,d),m.max=L(m.max,d)),m.min=P(m.min,u,c),m.max=L(m.max,u,c),i=P(m.min,i),n=L(m.max,n),t.startTime=s(u),t.finishTime=s(c),t.markTime=s(d),t.duration=s.duration(c-u)}})}),this.domainMap=r,this.dateDomain=[i,n],this.idMap=a,this.markArray=o,i>n&&(this.dateDomain=[])},render:function(){if(this.dateDomain.length)if(this.view)this.view.render();else{this.view=new a(this,this.vanchart),this.view.render();var t=this._calcFirstViewMovement();this.view.changeInner({x:t})}},_calcFirstViewMovement:function(){var t=s(this.dateDomain[0]),e=_(this.level),i=+t.startOf(e),n=+t.add(-1,e);return this.scale(n)-this.scale(i)},renderContent:function(){this.dateDomain.length&&this.view.updateContent()},calcScale:function(){function t(t){if(p){var e=D[D.length-1];P.isWeekend()&&!t?(!e||e&&e.finish)&&D.push({from:w,finish:!1}):e&&!e.finish&&(e.to=w,e.finish=!0)}}if(this.dateDomain.length){var i=this._headerData={upLines:[],upTexts:[],subLines:[],subTexts:[]},n=this.tableDims.heights,r=u(n),a=this._getHeader(),o=this.dateDomain,h=this._getEm(),l=this.getLevel(),c=x(h,l),p=this.shouldShowWeekends(),g=v(l),m=_(l),y=s(o[0]),b=s(o[1]),T=s(y).startOf(m).add(-1,m),A=s(b).endOf(m).add(1,m),C=s(T).startOf(g),L=s(C),P=s(T),M=(L-T)*c,w=(P-T)*c,E=[M],S=[w],O=e.bind(null,L,g,T,c,E),k=e.bind(null,P,m,T,c,S),D=this._weekendsWidths=[],R=(A-T)*c;for(this.scale.domain([T,A]).range([0,R]),this.innerWidth=Math.max(R,this.bounds.width);w<this.innerWidth;){t();var B,I;P>=L?(i.upLines.push({x1:M,y1:0,x2:M,y2:n[0]}),i.subLines.push({x1:w,y1:n[0],x2:w,y2:r}),B=d(L,l),I=O(),i.upTexts.push({style:a[0].style,left:M,right:I,x:(I+M)/2,y:n[0]/2,content:B}),M=I):i.subLines.push({x1:w,y1:n[0],x2:w,y2:r}),B=f(P,l),I=k(),i.subTexts.push({style:a[1].style,left:w,right:I,x:(I+w)/2,y:n[0]+n[1]/2,content:B}),w=I}t(!0)}},getLevel:function(){if(null==this.level){if(!this.dateDomain.length)return;var t=this.setLevel(this.options.zoomLevel);t||this.setLevel(this._guessLevel()),this.initLevel=this.level}return this.level},setLevel:function(t){return null==t||0>t||t>y-1?!1:(this.level=t,!0)},_guessLevel:function(){for(var t=this.dateDomain,e=this._getEm(),i=this.bounds.width,n=i/(t[1]-t[0]),r=y;--r>-1;){var a=x(e,r);if(n>a)break}return Math.max(0,r)},_getEm:function(){var t=this._getHeader(),e=s(),i=b(d(e,0),t[0].style).width+2*g,n=6*b(f(e,0),t[1].style).width,r=n/6;return i>n&&(r=i/6),r},isZoomEnabled:function(){return this.options.zoom},shouldShowWeekends:function(){return this.level>6&&this.options.showWeekends}});return r.register(r.TIMEAXIS,M),M}),define("chart/gantt/Link",["require","../../vans/VanChart","../../utils/PathGenerator","../../Constants"],function(t){function e(t,e){return t.filter(function(t){
return t.type&&f[t.type.toLowerCase()]&&t.lineWidth&&e[t.from]&&e[t.from].isVisible()&&e[t.to]&&e[t.to].isVisible()}).map(function(t){return i(t,e)},this)}function i(t,e){var i=n(t,e),r={d:i.line},a={fill:"none",stroke:t.lineColor,"stroke-width":t.lineWidth,"stroke-dasharray":h.DASH_TYPE[t.dashStyle||"Solid"]},o={d:i.arrow},s={fill:t.lineColor,stroke:"none"};return{lineAttr:r,lineStyle:a,arrowAttr:o,arrowStyle:s}}function n(t,e){var i=t.type.toLowerCase(),n=r(i,0,e[t.from]),o=r(i,1,e[t.to]),s=n[1],h=o[0],d=s[0],f=h[0],p=l,g=[null,(s[1]+h[1])/2];if(s[1]===h[1])g=[s[0],s[1]-e[t.from].rect.height/2-c],p=u;else switch(i){case"fs":d>f&&(g[0]=f);break;case"ff":f>d&&(p=u);break;case"ss":d>f&&(p=u);break;case"sf":default:f>d&&(g[0]=f)}var m=n;return null!=g[0]&&m.push(g),m=m.concat(o),{line:p(m),arrow:a(o[1],i.charAt(1))}}function r(t,e,i){var n,r=t.charAt(e),a=i.rect,o=a.y+a.height/2,s=Math.max(a.height/2,2*d),h=["s"===r?a.x:a.x+a.width,o],l=[h[0]+("s"===r?-s:s),o];return n=e?[l,h]:[h,l]}function a(t,e){var i="M"+t[0]+","+t[1]+"l",n=d;return"s"===e&&(i+="-"),i+=n+","+n+"v-"+2*n+"z"}var o=t("../../vans/VanChart"),s=t("../../utils/PathGenerator"),h=t("../../Constants"),l=s.line().interpolate("step-before"),u=s.line().interpolate("step-after"),c=2,d=3,f={};f.fs=f.ff=f.sf=f.ss=!0,o.include({renderLinks:function(){this._linksGroup&&this._linksGroup.remove(),this._linksGroup=this._links=null;var t=this.options.plotOptions.links;if(t&&t.length&&(this._linksGroup||(this._linksGroup=this.renderer.group().addTo(this.clipSeriesGroup)),!this._links)){this._links=e(t,this.getTimeAxis().idMap);var i=this._linksGroup,n=this.renderer;this._links.map(function(t){t._line=i.append(n.path().attr(t.lineAttr).style(t.lineStyle)),t._arrow=i.append(n.path().attr(t.arrowAttr).style(t.arrowStyle))})}}})}),define("chart/gantt/Mark",["require","../../vans/VanChart","../../utils/PathGenerator","../../Constants","../../utils/BaseUtils"],function(t){function e(t,e,i,n,s){var h=t.group().attr("transform",o(e));if(r.isImageMarker(n)){var l=i,u=i;h.image=t.image({preserveAspectRatio:"none",x:-l/2,y:-u/2,width:l,height:u}),h.image.imageContent(n),h.append(h.image)}else{var c=a(n,i/2);h.append(t.path().attr("d",c).style({stroke:"none",fill:s}))}return h}var i=t("../../vans/VanChart"),n=t("../../utils/PathGenerator"),r=(t("../../Constants"),t("../../utils/BaseUtils")),a=n.getMarkerPath,o=r.makeTranslate;i.include({renderMarks:function(){if(this._marksGroup&&this._marksGroup.remove(),this._marksGroup=this._marks=null,this._marksGroup||(this._marksGroup=this.renderer.group().addTo(this.clipSeriesGroup)),!this._marks){var t=this.getTimeAxis(),i=t.markArray,n=t.scale,r=this._marksGroup,a=this.renderer;i.map(function(t){if(t.visible&&t.series.visible){var i=t.rect.height,o=n(t.markTime),s=t.rect.y+.5*i;r.append(e(a,[o,s],i,t.options.markType,t.options.markColor))}})}}})}),define("dateUnits/locale/zh-cn",[],function(){return{_locale:"zh-cn",duration:{year:"\u5e74",month:"\u6708",day:"\u5929",hour:"\u5c0f\u65f6",minute:"\u5206\u949f",second:"\u79d2"},halfYears:["\u4e0a","\u4e0b"],quarters:"\u4e00\u5b63\u5ea6_\u4e8c\u5b63\u5ea6_\u4e09\u5b63\u5ea6_\u56db\u5b63\u5ea6".split("_"),months:"\u4e00\u6708_\u4e8c\u6708_\u4e09\u6708_\u56db\u6708_\u4e94\u6708_\u516d\u6708_\u4e03\u6708_\u516b\u6708_\u4e5d\u6708_\u5341\u6708_\u5341\u4e00\u6708_\u5341\u4e8c\u6708".split("_"),monthsShort:"1\u6708_2\u6708_3\u6708_4\u6708_5\u6708_6\u6708_7\u6708_8\u6708_9\u6708_10\u6708_11\u6708_12\u6708".split("_"),weekdays:"\u661f\u671f\u65e5_\u661f\u671f\u4e00_\u661f\u671f\u4e8c_\u661f\u671f\u4e09_\u661f\u671f\u56db_\u661f\u671f\u4e94_\u661f\u671f\u516d".split("_"),weekdaysShort:"\u5468\u65e5_\u5468\u4e00_\u5468\u4e8c_\u5468\u4e09_\u5468\u56db_\u5468\u4e94_\u5468\u516d".split("_"),weekdaysMin:"\u65e5_\u4e00_\u4e8c_\u4e09_\u56db_\u4e94_\u516d".split("_"),meridiem:["\u4e0a\u5348","\u4e0b\u5348"],qDay:"0~6\u70b9_6~12\u70b9_12~18\u70b9_18~24\u70b9".split("_"),base:function(t,e){t("www",0,0,function(){return this.week()+"\u5468"})}}}),define("locale/zh-cn",["require"],function(t){return{_locale:"zh-cn",startTime:"\u5f00\u59cb",finishTime:"\u7ed3\u675f",duration:"\u6301\u7eed",progress:"\u8fdb\u5ea6",ganttLevels:[["yyyy[\u5e74]","N"],["yyyy[\u5e74]","N"],["yyyy[\u5e74]","QQQ"],["yyyy[,]N","MM"],["yyyy[,]QQQ","MMM"],["yyyy[,]QQQ","MMM"],["yyyy[\u5e74]MM[\u6708]","www"],["yyyy[\u5e74]MM[\u6708]dd[\u65e5]","eeeeee"],["yyyy[\u5e74]MM[\u6708]","d"],["MMM","d"],["MM[\u6708]dd[\u65e5]","a"],["MM[\u6708]dd[\u65e5]","I"],["MM[\u6708]dd[\u65e5]","H"]]}}),define("chart/gantt/Gantt",["require","../../Constants","../../vans/VanChart","../../vans/VanChartLayout","../../ComponentLibrary","../../utils/BaseUtils","../../locale/localeText","./GanttSeries","./LevelBar","./Processes","./TimeAxis","./Link","./Mark","../../dateUnits/locale/zh-cn","../../locale/zh-cn","../../dateUnits/dateUnits","../../vans/VanChartLibrary"],function(t){var e=t("../../Constants"),i=t("../../vans/VanChart"),n=t("../../vans/VanChartLayout"),r=t("../../ComponentLibrary"),a=t("../../utils/BaseUtils"),o=t("../../locale/localeText");t("./GanttSeries"),t("./LevelBar"),t("./Processes"),t("./TimeAxis"),t("./Link"),t("./Mark"),t("../../dateUnits/locale/zh-cn"),t("../../locale/zh-cn");var s=r.PROCESSES,h=r.TIMEAXIS,l=r.LEVELBAR,u=Math.max,c=10,d=i.extend({vanChartType:e.GANTT_CHART,initialize:function(e){if(e.language){var n=o.normalizeLocale(e.language);if(!/^en/.test(n)){var r=t("../../dateUnits/dateUnits"),a=t("../../dateUnits/locale/"+n);r.setLocale(a);var s=t("../../locale/"+n);o.setLocale(s)}}i.prototype.initialize.apply(this,arguments),this.handler.on("resizeEnd",this.onResizeEnd,this)},refresh:function(t){if(this.getTimeAxis()){this.remove();var e=this;e.panBounds=e.backGroup=e.processesGroup=e.timeaxisGroup=e.frontGroup=null,r.ComponentsOrder.map(function(t){t in e.components&&(e.components[t].remove(),e.components[t]=null)}),e.components={},this.initialize(t,this.wrapDom,this.vancharts)}else i.prototype.refresh.call(this,t)},resize:function(){this.refresh(this.options)},layoutComponentsAndCharts:function(){var t=this;t.bounds=t._getDefaultBounds(),r.ComponentsOrder.map(function(e){e in t.components&&t.components[e].doLayout()});var e=this.getProcesses(),i=this.getTimeAxis();if(!this.panBounds){var a=this._calcDims(e,i);this.panBounds=this._calcPanBounds(a),this.resizeBounds=this._calcResizeBounds(a),e.setPanelDims(a),i.setPanelDims(a)}i.calcSeries(this.series,e.procMap),i.calcScale(),n.calculateSeries(this),n.calculateSeriesShapes(this),this.render()},render:function(){this.vancharts.endLoading();var t=this,e=this.renderer;["backGroup","processesGroup","timeaxisGroup","frontGroup"].forEach(function(i){if(!t[i]){var n=t[i]=e.group().addClass(i).add();if("processesGroup"===i||"timeaxisGroup"===i){var r=i+"-body";n=t[r]=n.append(e.group().addClass(r)),r=i+"-inner-body",t[r]=n.append(e.group().addClass(r))}}});var i=t["timeaxisGroup-inner-body"];["clipSeriesGroup","seriesGroup","seriesTextRenderGroup"].forEach(function(n){t[n]||(t[n]=i.append(e.group().addClass(n)))});var n=this.getTimeAxis();this._addDivClipGroup({x:0,y:0,width:n.bounds.width,height:n.bounds.height-n.tableDims.headerHeight}),this.seriesTextDivGroup.attr("transform",a.makeTranslate([n.bounds.x+this.bounds.x,n.tableDims.headerHeight+this.bounds.y])),this._renderBackground(),this.renderSeries(),this.renderLinks(),this.renderMarks(),this.renderComponents();var r=this.getComponent(l);r&&r.setLevel(this.getTimeAxis().getLevel()),this._consoleDone()},changeToLevel:function(t){var e=this.getTimeAxis(),i=e.getLevel();t!==i&&(e.setLevel(t),e.calcScale(),e.renderContent(),this.reRenderWholePlot())},reRenderWholePlot:function(){n.calculateSeriesShapes(this),this.renderSeries(),this.renderLinks(),this.renderMarks(),this.getComponent(r.LEGEND_COMPONENT).render()},_calcDims:function(t,e){var i=this.bounds,n=i.width,r=t.getInitPanelDims(),a=r.width,o=r.headerHeight,s=e.getInitPanelDims(),h=n-a;o=u(o,s.headerHeight);var l=r.rowHeight*r.rowNum,c=i.height-o,d=r.rowNum;return c>l&&(d=Math.floor(c/r.rowHeight)),{x:i.x,y:i.y,pWidth:a,tWidth:h,height:i.height,headerHeight:o,rowHeight:r.rowHeight,rowNum:d}},getProcesses:function(){return this.getComponent(s)},getTimeAxis:function(){return this.getComponent(h)},isResizeEnabled:function(){return this.getComponent(s).options.resize},_calcPanBounds:function(t){return{x:t.x,y:t.y,width:t.pWidth+t.tWidth,height:t.height}},_calcResizeBounds:function(t){return{x:t.x+t.pWidth-c/2,y:t.y,width:c,height:t.height}},onResizeEnd:function(){this.resizeBounds.x=this.getTimeAxis().bounds.x-c/2},onScrollY:function(t){this.fire("moveY",t)}});return t("../../vans/VanChartLibrary").register(e.GANTT_CHART,d),d}),define("utils/LoadingUtils",[],function(){function t(t,e){if(e=e||"loading-div-id",e+=" loading-div-id",!i[e]&&!document.getElementById(e)){var n=document.createElement("div"),r=document.createElement("div");n.id=e,n.style.backgroundColor="white",n.style.opacity=.75,n.style.filter="alpha(opacity=75)",n.style.position="absolute",n.style.width="100%",n.style.height="100%",n.style.left=0,n.style.top=0,n.style.zIndex=9999,(void 0!=r.style.animation||void 0!=r.style.webkitAnimation)&&(r.style.left="50%",r.style.top="50%",r.className="loader-inner ball-scale-ripple-multiple",r.innerHTML="<div></div><div></div><div></div>"),n.appendChild(r),t.appendChild(n),i[e]=n}}function e(t,e){if(e=e||"loading-div-id",e+=" loading-div-id",i[e])t.removeChild(i[e]),i[e]=null;else{var n=document.getElementById(e);n&&t.removeChild(n)}}var i={};return{startLoading:t,endLoading:e}}),define("component/Tooltip",["require","./Base","../utils/BaseUtils","../Constants","../utils/ColorUtils","../ComponentLibrary","./FormattedText"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=(t("../Constants"),t("../utils/ColorUtils")),r=t("../ComponentLibrary"),a=t("./FormattedText"),o=.4,s=e.extend({_gCssText:"position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:2000;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;pointer-events:none;",_style:function(t){if(!t)return"";var e=[];if(t.animation&&!t.follow){var r="left "+o+"s,top "+o+"s";e.push("transition:"+r),e.push("-moz-transition:"+r),e.push("-webkit-transition:"+r),e.push("-o-transition:"+r)}if(t.style){var a=i.cssNormalization(t.style);for(var s in a)"color"==s?e.push(s+":"+n.colorToHex(a[s])):e.push(s+":"+a[s])}if(t.backgroundColor)if("string"==typeof t.backgroundColor)if(i.isSupportSVG())e.push("background-Color:"+t.backgroundColor);else{var h=n.colorToHexAlpha(t.backgroundColor),l="#"+("0"+(255*h.alpha|0).toString(16)).slice(-2)+h.hex.replace("#","");e.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+l+", endColorstr="+l+", GradientType=0)")}else if("object"==typeof t.backgroundColor){var u=t.backgroundColor,c=n.colorToHex(u.startColor),d=n.colorToHex(u.endColor),f="left",p="left top",g="right top",m=1;u.x1==u.x2&&(f="top",p="left top",g="left bottom",m=0),e.push("background: -ms-linear-gradient("+f+", "+c+", "+d+")"),e.push("background-image: -moz-linear-gradient("+f+", "+c+", "+d+")"),e.push("background-image: -webkit-gradient(linear, "+p+", "+g+", color-stop(0, "+c+"), color-stop(1, "+d+"))"),e.push("filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="+c+", endColorstr="+d+", GradientType="+m+")")}null!=t.borderWidth&&e.push("border-width:"+t.borderWidth+"px"),null!=t.borderColor&&e.push("border-color:"+t.borderColor),null!=t.borderRadius&&(e.push("border-radius:"+t.borderRadius+"px"),e.push("-moz-border-radius:"+t.borderRadius+"px"),e.push("-webkit-border-radius:"+t.borderRadius+"px"),e.push("-o-border-radius:"+t.borderRadius+"px")),t.shadow&&e.push("box-shadow:1px 1px 2px rgba(0,0,0,0.2)");var v=t.padding;return null!=v&&void 0!=v&&(v=i.reformCssArray(v),e.push("padding:"+v[0]+"px "+v[1]+"px "+v[2]+"px "+v[3]+"px")),e=e.join(";")+";"},doLayout:function(t){this._tDom||(t=t||this.vanchart.getDivParentDom(),this._tDom=document.createElement("div"),this._hiddenDom=document.createElement("div"),this._tDom.onselectstart=function(){return!1},this._tDom.style.position="absolute",this._hiddenDom.style.visibility="hidden",t.appendChild(this._tDom),t.appendChild(this._hiddenDom),this._tooltipHideTick=null)},remove:function(){if(this._tDom){var t=this.vanchart.getDivParentDom();t.removeChild(this._tDom),t.removeChild(this._hiddenDom)}},showWithPoint:function(t,e,n){if(t&&t.options.tooltip&&t.series.vanchart.renderer){var r=n||t,o=r.options.tooltip,s=t.series,h=a.tooltipGenerator(r),l=this.calculateTooltipDivDim(o,h),u=s.getTooltipPos(t,l,e);u&&(this._show(u,o,h),this._tooltipRect=i.makeBounds(u,l))}},_getTooltipText:function(){var t=window.navigator.userAgent,e=t.indexOf("MSIE ");return t.indexOf("Trident/7.0")>0||t.indexOf("Edge/")>0||e>0&&10===parseInt(t.substring(e+5,t.indexOf(".",e)),10)?function(t){t+="";for(var e,i="",n=!0,r=-1,a=t.length;++r<a;)e=t.charAt(r),n&&"-"===e?e="&#150;":"<"===e?n=!1:">"===e&&(n=!0),i+=e;return i}:function(t){return t}}(),_show:function(t,e,i){t&&e&&i&&!this.vanchart.isMouseDown&&(clearTimeout(this._tooltipHideTick),this._tDom.innerHTML=this._getTooltipText(i),this._tDom.style.cssText=this._gCssText+this._style(e)+"left:"+t[0]+"px;top:"+t[1]+"px;")},hide:function(){clearTimeout(this._tooltipHideTick),this._tooltipHideTick=setTimeout(function(){this._tDom.style.display="none"}.bind(this),400)},immediateHide:function(){this._tDom.style.display="none"},calculateTooltipDivDim:function(t,e){t=t||"";var i=this._hiddenDom;i.innerHTML=e,i.style.cssText=this._gCssText+this._style(t)+"visibility:hidden;";var n=i.offsetWidth,r=i.offsetHeight;return{width:n,height:r}},render:function(){}});return r.register(r.TOOLTIP_COMPONENT,s),s}),define("Carousel",["require","./utils/BaseUtils","./utils/QueryUtils","./dom/DomUtils","./utils/ColorUtils","./utils/PathUtils","./Constants","./utils/BezierEasing","./vector/SvgRenderer","./vector/VmlRenderer","./component/Tooltip"],function(t){function e(t){var e=t.title;return e.text&&e.useHtml?c.getPlainText(e.text):e.text||""}function i(t,e){Object.keys(e).map(function(i){"string"==typeof e[i]&&(t.style[i]=e[i])})}function n(t){var e=p.getRGBAColorArray(t),i=p.rgb2hsb(e[0],e[1],e[2]);return p.toColor(p.hsb2rgb(i[0],.85*i[1],100*(i[2]+.15)/115),"hex")}function r(t){var e=p.getRGBAColorArray(t),i=p.rgb2hsb(e[0],e[1],e[2]);return p.toColor(p.hsb2rgb(i[0],.75*i[1],100*(i[2]+.25)/125),"hex")}function a(t,e){var i=t.className.split(" ");-1===i.indexOf(e)&&(t.className+=" "+e)}function o(t,e){var i=t.className.split(" "),n=i.indexOf(e);-1!==n&&(i.splice(n,n),t.className=i.join(" "))}function s(t,e,i){if(c.isSupportSVG()){var n="<svg width=22 height=22><g>"+C[e]+"</g></svg>";t.innerHTML=n,t.querySelector("g").setAttribute("fill",i),e===m.RADAR_CHART&&t.querySelector("g").setAttribute("stroke",i)}else t.innerHTML='<img width="22" height="22" src="data:image/png;base64,'+L[e]+'">'}function h(t,e){if(c.isSupportSVG())t.style.background=e,t.innerHTML='<svg width=30 height=30><path fill="none" stroke="#FFFFFF" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M11.1,21.5L20.9 15 11.1 8.5 M11.1,21.5z"></path></svg>';else{var i=u("shape");i.path=g.circlePath(15,15,15),i.stroked="False",i.fillcolor=e;var n=u("fill");n.color=e,n.opacity=.5,i.appendChild(n),t.appendChild(i);var r=u("shape");r.path=/vanchart-arrow-left/.test(t.className)?"m19,22 l9,15 l19,9 e":"m11,22 l21,15 l11,9 e",r.filled="False",r.strokecolor="#ffffff",t.appendChild(r),Hammer.on(t,"mouseover",function(){n.opacity=.2}),Hammer.on(t,"mouseout",function(){n.opacity=.5})}}function l(t){var e=u("shape");e.style.width="100%",e.style.height="100%",e.coordsize="10 10",e.path=g.circlePath(5,5,5),e.stroked="False",e.fillcolor="#7f7f7f";var i=u("fill");i.color="#7f7f7f",i.opacity=.5,e.appendChild(i),t.appendChild(e)}function u(t){var e=_.prototype.create(t);return e.style.cssText=P,e.coordsize="1 1",e}var c=t("./utils/BaseUtils"),d=t("./utils/QueryUtils"),f=t("./dom/DomUtils"),p=t("./utils/ColorUtils"),g=t("./utils/PathUtils"),m=t("./Constants"),v=t("./utils/BezierEasing"),_=(t("./vector/SvgRenderer"),t("./vector/VmlRenderer")),y=t("./component/Tooltip"),x=3.4375,b={type:m.BUTTON,color:"#7f7f7f",interval:1e3,style:{fontSize:"16px",color:"#ffffff"}},T={borderWidth:1,borderColor:"#000000",borderRadius:2,backgroundColor:"rgba(255, 255, 255, 0.5)",padding:5,shadow:!0,animation:!0,style:{fontSize:"12px",fontFamily:"MicrosoftYaHei, sans-serif",color:"#515151"}},A=function(t){function u(i,n){var r=e(i),a=N[n];return a.mText&&(a.mText.textContent?a.mText.textContent=r:a.mText.innerText=r,R(a)),a._title=r,w(i,t.charts[n],Y[n],n)}function g(t,e,o){t&&t.switchStyle||D();var s=t.options,l=d.merge(b,t.switchStyle,!0);c.isSupportSVG()||l.style.color&&(l.style.color=p.colorToHex(l.style.color)),I=o,B=l.type,Z=s.length,G=G||f.create("div","vanchart-menu",o),U=U||f.create("div","vanchart-cc",o),o.style.overflow="hidden",$.doLayout(o);var u=l.color;switch(e.splice(Z).map(function(t){t.remove()}),N.splice(Z).map(function(t){f.remove(t)}),Y.splice(Z).map(function(t){f.remove(t)}),a(U,"van-ani"),q=q>=Z?0:q,B){case m.CAROUSEL:G.style.bottom=0,G.style.height="18px",G.style.width="100%",G.mWrap=G.mWrap||f.create("div","vanchart-menu-wrap",G),U.style.cssText="top:0;bottom: 18px;left:"+100*-q+"%;width:"+100*Z+"%",c.isSupportSVG()||(U.style.height=I.clientHeight-18+"px"),H=H||f.create("div","vanchart-arrow-wrap",o),z=z||f.create("div","vanchart-arrow-wrap",o),z.style.right=0;var g=H.arrowLeft=H.arrowLeft||f.create("div","vanchart-arrow vanchart-arrow-left",H),v=z.arrowRight=z.arrowRight||f.create("div","vanchart-arrow vanchart-arrow-right",z);h(g,u),h(v,u);var y=l.interval;return J.left&&J.left.off("tap"),J.left=J.left||new Hammer(g),J.left.on("tap",function(t){t.preventDefault(),D(y);var e=(Z+q-1)%Z;S(e,m.LEFT),O(e)}),J.right&&J.right.off("tap"),J.right=J.right||new Hammer(v),J.right.on("tap",function(t){t.preventDefault(),D(y);var e=(q+1)%Z;S(e,m.RIGHT),O(e)}),J.dom&&J.dom.off(o,"mouseover mouseout"),J.dom=Hammer.on(o,"mouseover",function(){D()}).on(o,"mouseout",function(){D(y)}),D(y),_(s,e);case m.BUTTON:default:var T=n(u),A="width:100%;top:0;background-color:"+u+";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="+T+", endColorstr="+p.colorToHex(u)+", GradientType=0);";A+="background-image: -webkit-gradient(linear, left top, left bottom, from("+T+"), to("+u+"));",A+="background-image: -moz-linear-gradient(top"+T+", "+u+");",A+="background-image: -webkit-linear-gradient(top"+T+", "+u+");",A+="background-image: linear-gradient(to bottom"+T+", "+u+");",G.style.cssText=A,i(G,l.style),K=c.getTextHeight(l.style);var C=K*x;return U.style.cssText="left:"+100*-q+"%;top:"+C+"px;bottom: 0;width:"+100*Z+"%",c.isSupportSVG()||(U.style.height=I.clientHeight-C+"px"),L(s,e,l.style.color,r(u))}}function _(t,e){F=F||f.create("div","vanchart-chart",U),F.style.width=100/Z+"%",F.style.marginLeft=-100/Z+"%",et&&(F.style.width=I.clientWidth+"px",F.style.marginLeft=-I.clientWidth+"px");var i=t.map(function(t,i){return A(t,i),w(t,e[i],Y[i],i)});return W=W||f.create("div","vanchart-chart",U),W.style.width=100/Z+"%",W.style.marginRight=-100/Z+"%",et&&(W.style.width=I.clientWidth+"px",W.style.marginLeft=-I.clientWidth+"px"),i}function A(t,i){var n=e(t),r=N[i];if(!Y[i]){if(Y[i]=f.create("div","vanchart-chart",U),N[i]=r=f.create("div","vanchart-menu-dot",G.mWrap),!c.isSupportSVG()){r.style.background="none";var o=f.create("div","vanchart-menu-dot-ie",r);l(o)}i||a(r,"van-on")}r._title=n,r.i=i,Hammer.on(r,"mouseover",function(){C(r)}),Hammer.on(r,"mouseout",function(){$.immediateHide()}),new Hammer(r).on("tap",function(t){t.preventDefault(),S(i),O(i)})}function C(t){var e=$.calculateTooltipDivDim(T,t._title),i=[I.clientWidth/2-(Z-1)/2*16+16*t.i-e.width/2,I.clientHeight-18-e.height];i[0]=Math.min(Math.max(i[0],0),I.clientWidth-e.width),$._show(i,T,t._title)}function L(t,e,i,n){return t.map(function(t,r){return P(t,r,i,n),w(t,e[r],Y[r],r)})}function P(t,i,n,r){var a=e(t),o=N[i];if(Y[i]||(Y[i]=f.create("div","vanchart-chart",U),N[i]=o=f.create("div","vanchart-menu-btn",G),o.mIcon=f.create("span","vanchart-menu-icon",o),o.mText=f.create("span","vanchart-menu-text",o),c.isSupportSVG()||o.insertAdjacentHTML("afterBegin",'<span class="vanchart-menu-btn_before"></span>'),i||(o.style.background=r)),s(o.mIcon,t.chartType,n),o.style.width=100/Z+"%",!c.isSupportSVG()){var h=I.clientWidth/Z;et&&(h-=2*K+1),o.style.width=h+"px",0!==o.offsetTop&&(o.style.width=h-1+"px")}o.mText.textContent?o.mText.textContent=a:o.mText.innerText=a,o._title=a,o.i=i,R(o),Hammer.on(o,"mouseover",function(){o.style.background=r,M(o)}),Hammer.on(o,"mouseout",function(){q!==i&&(o.style.background=""),$.immediateHide()}),new Hammer(o).on("tap",function(t){t.preventDefault(),N[q].style.background="",N[i].style.background=r,O(i)})}function M(t){var e=!1;if(e=c.isSupportSVG()?t.scrollWidth>t.clientWidth:t.scrollWidth>=t.clientWidth,e||""===t.mText.innerHTML){var i=$.calculateTooltipDivDim(T,t._title),n=[I.clientWidth*(t.i+.5)/Z-i.width/2,t.offsetHeight];n[0]=Math.min(Math.max(n[0],0),I.clientWidth-i.width),$._show(n,T,t._title)}}function w(e,i,n,r){if(n.style.width=100/Z+"%",!c.isSupportSVG()||n.offsetLeft<I.clientWidth*r){var a=I.clientWidth*r-n.offsetLeft;n.style.width=I.clientWidth+a+"px"}var o,s=n;return r===Z-1?(V||(V=E(n)),s=V):0===r&&(X||(X=E(n)),s=X),o=t._initSingle(e,i,s),r!==q&&o.set({enable:!1}),o}function E(t){var e=f.create("div","vanchart-chart-wrap",t);return e.style.cssText="width:100%;height:100%",e}function S(t,e){var i;e===m.RIGHT&&q===Z-1&&0===t?(Y[0].appendChild(X),F.appendChild(V),o(U,"van-ani"),U.style.left="100%",i=U.clientWidth):e===m.LEFT&&0===q&&t===Z-1?(Y[Z-1].appendChild(V),W.appendChild(X),o(U,"van-ani"),U.style.left=100*-Z+"%",i=U.clientWidth):(Y[0].appendChild(X),Y[Z-1].appendChild(V)),a(U,"van-ani")}function O(e){if(o(N[q],"van-on"),t.charts[q].set({enable:!1}),a(N[e],"van-on"),t.charts[e].set({enable:!0}),tt)U.style.left=100*-e+"%";else{var i=v.css.swing;k(U,"left",100*-e+"%",500,i)}q=e}function k(t,e,i,n,r){function a(){c>=n?(u=h,t.style[e]=u+l):(u=o+(h-o)*r(c/n),t.style[e]=u+l,c+=d,Q=window.setTimeout(a,d))}window.clearTimeout(Q);var o=parseFloat(t.style[e])||0,s=i.match(/([\d.E-]+)(.*)/i),h=+s[1],l=s[2],u=o,c=0,d=17;a()}function D(t){window.clearInterval(j),t&&(j=window.setInterval(function(){var t=(q+1)%Z;S(t,m.RIGHT),O(t)},t))}function R(t){t.clientWidth<=22+3*K&&(t.mText.innerHTML="",t.mText.style.marginLeft=0,et||(t.style.padding=0))}var B=null,I=null,G=null,N=[],H=null,z=null,U=null,F=null,V=null,W=null,X=null,Y=[],q=0,Z=0,j=null,Q=null,K=0,J={left:null,right:null,dom:null},$=new y({},m.TOOLBAR_COMPONENT,{}),tt="transition"in document.getElementsByTagName("body")[0].style,et=/MSIE 7/.test(navigator.userAgent);return{init:g,refresh:u}},C={};C[m.PIE_CHART]='<path d="M12,0.266v10.041l9.519-1.314C20.642,4.339,17,0.742,12,0.266z"/> <path d="M21.744,10.061l-7.309,1.009L11,11.511V11v-0.545V9.651V0.208C5.04,0.208,0.208,5.04,0.208,11 c0,5.96,4.832,10.792,10.792,10.792c0,0,1.214,0,1.602-0.12l0.006-0.012c5.195-0.778,9.183-5.247,9.183-10.659 C21.792,10.683,21.771,10.371,21.744,10.061z"/>',C[m.BAR_CHART]='<rect x="0.937" y="6.794" width="8.112" height="2.704"/> <rect x="0.938" y="12.502" width="13.52" height="2.704"/> <rect x="0.938" y="18.211" width="17.125" height="2.704"/> <rect x="0.937" y="1.086" width="6.309" height="2.704"/>',C[m.COLUMN_CHART]='<rect x="0.625" y="11.943" width="2.83" height="9.432"/> <rect x="6.284" y="8.17" width="2.83" height="13.205"/> <rect x="12.886" y="4.398" width="2.83" height="16.977"/> <rect x="18.545" y="0.625" width="2.83" height="20.75"/>',C[m.LINE_CHART]='<path d="M20.527,2.742c-0.813,0-1.473,0.659-1.473,1.473c0,0.308,0.095,0.593,0.256,0.83l-4.155,7.48 c-0.005,0-0.01-0.002-0.016-0.002c-0.296,0-0.571,0.089-0.802,0.24l-5.74-3.399c0.005-0.05,0.015-0.098,0.015-0.149 c0-0.814-0.66-1.473-1.473-1.473S5.667,8.402,5.667,9.215c0,0.154,0.03,0.299,0.074,0.439L1.987,13.84 c-0.161-0.06-0.333-0.097-0.514-0.097C0.66,13.742,0,14.402,0,15.215s0.66,1.473,1.473,1.473s1.473-0.659,1.473-1.473 c0-0.265-0.076-0.511-0.198-0.726l3.614-4.028c0.227,0.142,0.492,0.227,0.778,0.227c0.399,0,0.76-0.16,1.025-0.418l5.572,3.299 c-0.042,0.136-0.07,0.277-0.07,0.427c0,0.814,0.66,1.473,1.473,1.473s1.473-0.659,1.473-1.473c0-0.445-0.202-0.84-0.514-1.11 l4.033-7.259c0.126,0.035,0.257,0.06,0.395,0.06C21.34,5.688,22,5.029,22,4.215S21.34,2.742,20.527,2.742z"/>',C[m.AREA_CHART]='<path d="M15.255,15.935c0.045,0.075,0.079,0.159,0.079,0.253c0,0.276-0.224,0.5-0.5,0.5s-0.5-0.224-0.5-0.5 c0-0.106,0.041-0.199,0.097-0.28l-7.79-8.953C6.571,6.993,6.493,7.021,6.406,7.021c-0.106,0-0.199-0.04-0.28-0.097L1,12.315V21h21 V9.832L15.255,15.935z"/> <path d="M6.642,6.955C6.797,6.87,6.906,6.711,6.906,6.521c0-0.276-0.224-0.5-0.5-0.5s-0.5,0.224-0.5,0.5 c0,0.17,0.09,0.313,0.22,0.403C6.208,6.981,6.3,7.021,6.406,7.021C6.493,7.021,6.571,6.993,6.642,6.955z"/> <path d="M14.834,16.688c0.276,0,0.5-0.224,0.5-0.5c0-0.094-0.033-0.178-0.079-0.253c-0.087-0.145-0.24-0.247-0.421-0.247 c-0.17,0-0.312,0.09-0.403,0.22c-0.057,0.081-0.097,0.174-0.097,0.28C14.334,16.464,14.558,16.688,14.834,16.688z"/> <polygon points="1,12.315 1,0 0,0 0,22 0.088,22 22,22 22,21 1,21 "/>',C[m.GAUGE_CHART]='<path d="M11,1.149c-6.042,0-10.958,4.916-10.958,10.958c0,2.103,0.597,4.146,1.729,5.908l1.845-1.184 c-0.904-1.408-1.381-3.042-1.381-4.724c0-4.834,3.933-8.766,8.766-8.766s8.766,3.933,8.766,8.766c0,1.682-0.477,3.315-1.38,4.723 l1.845,1.184c1.13-1.762,1.728-3.804,1.728-5.907C21.958,6.065,17.042,1.149,11,1.149z"/> <path d="M11.49,12.11L11,4.273l-0.49,7.837c-0.236,0.16-0.4,0.417-0.4,0.724c0,0.492,0.398,0.89,0.89,0.89s0.89-0.399,0.89-0.89 C11.89,12.527,11.726,12.27,11.49,12.11z"/>',C[m.RADAR_CHART]='<polygon fill="none" stroke-miterlimit="10" points="6.828,20.531 1.417,13.746 3.348,5.286 11.167,1.521 18.985,5.286 20.916,13.746 15.506,20.531 "/> <polyline fill="none" stroke-miterlimit="10" points="3.38,5.38 11.042,10.885 15.506,20.531 "/> <polyline fill="none" stroke-miterlimit="10" points="18.985,5.286 11.057,10.87 1.417,13.746 "/> <line fill="none" stroke-miterlimit="10" x1="11.026" y1="10.885" x2="20.916" y2="13.746"/> <line fill="none" stroke-miterlimit="10" x1="11.167" y1="1.521" x2="11.042" y2="10.901"/> <line fill="none" stroke-miterlimit="10" x1="11.042" y1="10.885" x2="6.835" y2="20.539"/>',C[m.SCATTER_CHART]='<circle cx="14.625" cy="12.158" r="0.916"/> <circle cx="14.625" cy="7.383" r="1.291"/> <circle cx="7.958" cy="12.699" r="0.916"/> <circle cx="21.293" cy="3.702" r="0.707"/> <circle cx="2.041" cy="16.965" r="2.041"/>',C[m.BUBBLE_CHART]=C[m.FORCE_BUBBLE_CHART]='<circle cx="3.521" cy="14.938" r="3.521"/> <circle cx="11.927" cy="5.5" r="1.958"/> <circle cx="20.667" cy="10.219" r="1.333"/>',C[""]='<rect x="2" y="12" width="3" height="9"/> <rect x="7" y="8" width="3" height="13"/> <rect x="12" y="9" width="3" height="12"/> <rect x="17" y="5" width="3" height="16"/> <path d="M20.172,0.911c-0.507,0-0.917,0.411-0.917,0.917c0,0.056,0.022,0.105,0.032,0.158l-4.522,3.532 c-0.156-0.121-0.342-0.205-0.554-0.205c-0.404,0-0.737,0.266-0.859,0.629L8.582,5.56C8.425,5.278,8.135,5.079,7.79,5.079 c-0.507,0-0.917,0.411-0.917,0.917c0,0.053,0.021,0.1,0.031,0.151L2.395,9.78C2.238,9.654,2.046,9.567,1.828,9.567 c-0.506,0-0.917,0.411-0.917,0.917s0.411,0.917,0.917,0.917c0.507,0,0.917-0.411,0.917-0.917c0-0.121-0.026-0.236-0.069-0.342 l4.42-3.563c0.168,0.2,0.411,0.335,0.693,0.335c0.495,0,0.893-0.394,0.91-0.884l4.627,0.372c0.082,0.422,0.437,0.747,0.883,0.747 c0.507,0,0.917-0.411,0.917-0.917c0-0.127-0.026-0.248-0.073-0.358l4.428-3.457c0.168,0.197,0.41,0.329,0.689,0.329 c0.506,0,0.917-0.411,0.917-0.917C21.089,1.322,20.678,0.911,20.172,0.911z"/>',C[m.MULTIPIE_CHART]='<path d="M5.267,10.754c0,0.009-0.002,0.018-0.002,0.028c0,2.918,2.276,5.356,5.194,5.356l0.017-0.002 C7.585,16.12,5.291,13.643,5.267,10.754z"/> <path d="M10.499,18.487l0.003,0c2.997,0,5.568-1.763,6.804-4.219C16.071,16.724,13.5,18.486,10.499,18.487z"/> <path d="M2.916,10.745c0,0.012-0.002,0.025-0.002,0.037c0,4.215,3.329,7.705,7.544,7.705 c0.008,0,0.015-0.001,0.022-0.001C6.288,18.474,2.935,14.937,2.916,10.745z"/> <path fill-opacity = "0.2" d="M18.856,10h2.233C20.546,5,16,0.396,11,0.212v2.213C15,2.604,18.326,6,18.856,10z"/> <path fill-opacity = "0.6" d="M16.104,10h2.752C18.326,6,15,2.604,11,2.424v2.724C13,5.318,15.603,8,16.104,10z"/> <path d="M11,5.149V10h5.104C15.603,8,13,5.318,11,5.149z"/> <path fill-opacity = "0.2" d="M17.752,13.176c-0.119,0.376-0.269,0.741-0.445,1.092c-1.236,2.456-3.807,4.219-6.804,4.219l-0.003,0 l-0.004,0c0,0-0.007-0.001-0.015-0.001c-0.008,0-0.015,0.001-0.022,0.001c-4.215,0-7.544-3.49-7.544-7.705 c0-0.012,0.002-0.025,0.002-0.037c0-0.012-0.002-0.024-0.002-0.036C2.914,6.708,6,3.432,10,3.109V1.2 c-5,0.329-8.994,4.454-8.994,9.509c0,5.269,4.227,9.686,9.496,9.686c5.27,0,9.497-4.395,9.497-9.395h-1.908 C18.091,11.75,17.972,12.482,17.752,13.176z"/> <path fill-opacity = "0.6" d="M2.914,10.709c0,0.012,0.002,0.024,0.002,0.036c0.019,4.192,3.372,7.729,7.564,7.741 c0.007,0,0.015,0.001,0.015,0.001l0.004,0c3-0.001,5.572-1.764,6.808-4.219c0.177-0.351,0.326-0.716,0.445-1.092 c0.22-0.694,0.339-1.426,0.339-2.176h-2.349c0,3-2.321,5.138-5.239,5.138c-0.009,0-0.019-0.001-0.028-0.002l-0.017,0.002 c-2.917,0-5.194-2.438-5.194-5.356c0-0.009,0.002-0.018,0.002-0.028c0-0.015-0.002-0.03-0.002-0.045C5.264,8.007,7,5.783,10,5.468 V3.109C6,3.432,2.914,6.708,2.914,10.709z"/> <path d="M5.264,10.709c0,0.015,0.002,0.03,0.002,0.045c0.024,2.889,2.319,5.366,5.208,5.382c0.009,0,0.019,0.002,0.028,0.002 c2.918,0,5.239-2.138,5.239-5.138H10V5.468C7,5.783,5.264,8.007,5.264,10.709z"/>',C[m.AREA_MAP]=C[m.HEAT_MAP]=C[m.POINT_MAP]='<path d="M28.12 36.6h.03-.05z"/><path d="M19.53 15.7l.04-.02v-.04c0-.08-.1-.16-.2-.13h-.1c-.05 0-.1 0-.12.1 0 0 0 .1-.02.1-.07 0-.14.1-.17.2l-.1.2-.07.1-.1.1-.1.3v.2h-.1v.1h-.1l-.1.1v.5c0 .1 0 .4.1.4l.1-.1v.1h.2v.1h.2v-.2s-.1-.3.1-.5v-.9zM13-8.66h-.05.04zm7.2 16.68L20.18 8h-.1s-.03 0-.04.02h.18zM14.77 18v-.02s-.02.02 0 .02z"/><path d="M21.9 5.6c.05-.05-.02-.12-.05-.17 0 0-.04 0-.03-.02 0 0 .02-.1 0-.1h-.04v-.2c.02-.1 0-.1 0-.1.07 0 .1-.1.1-.1.05-.1 0-.2-.05-.2h.02c.05 0 .04-.1.04-.1l-.1-.1-.2.2h-.1c-.1 0-.1.1-.2.1l-.2.1c-.1 0-.1.1-.2.1l-.1.1c-.1 0-.1.1-.1.1l-.1.2s0 .1-.1.1-.2-.1-.2 0c-.1 0-.3 0-.4-.1V5c0-.1.2-.2.1-.24l.1-.1-.1-.05v.1l-.2-.1h-.4l-.1.1h-.2c.1-.1 0-.1 0-.1V4c0-.15-.1-.24-.2-.26v-.4l-.1-.05V3c0-.1-.1-.1-.1-.1 0-.1 0-.1-.1-.1h-.1c-.1-.1-.2 0-.2 0l-.3-.1-.1-.1v.14h-.5.1c0-.04.1 0 .1-.04L17 3v-.02l-.02-.1v.07-.02V3h-.07.1v.03s-.1 0-.1.02l-.1.04c0 .1-.1.1-.1.1l-.1.1s-.2 0-.2.1h.7-.2v.1l-.1-.1c.1 0 .1.1.1.1v.1h.1v.5c-.1.1-.3.1-.3.2l-.1.1v.2s-.1-.1-.1 0l-.1-.1H16c-.03 0-.1 0-.2.3l-.06.2h-.05c-.1 0-.1.1-.1.1h.1-.1c0 .1 0 .1.1.2 0 0 0 .1.1.1h.4s0 .1.1.1l.2-.2h.1l.1.1h.1l.2.2V6h-.2c-.1 0-.2 0-.2.03-.1 0-.2 0-.2.02l-.1.04c-.1 0-.2.4-.2.5V7H16c-.2 0-.3-.2-.3-.08-.07.1-.17-.04-.2-.02-.2 0-.28-.1-.35 0 0 .06-.03.05-.03.1s-.1.1-.1.1H15s-.04 0 0 0l-.4-.1-.1-.05c-.16 0-.25.2-.27.26-.04.1-.06.2-.05.2.04.2.15.3.2.3h-.06c-.3.2-.36.3-.36.3 0 .1-.1.1-.14.1h-.24s-.03-.1-.2-.1h-.05c-.04 0-.23.2-.3.2l-.1.1h-.03l-.02.1-.43.2-.37.4-.1.3h-.1s0-.2-.02-.2c0 0-.05-.1-.1-.1v-.2.2c-.04 0-.1.2-.16.2h-.1c-.1 0-.25-.3-.3-.4v-.1h-.04c-.2 0-.24-.2-.24-.2v-.1l-.6-.1H9l.03-.1-.08-.1.03.1c-.03-.1-.04 0-.03 0h-.02l.24-.7-.35.5-.06-.1-.04-.1c-.02 0-.03 0-.04-.1 0 0-.04-.2-.07-.2v-.1h-.2L8.3 7c0-.05-.2-.2-.2-.2-.1-.07-.2-.1-.4-.1h-.1l-.1-.04h-.2l-.1-.05s0 .2-.02.2V7H7.1v-.15c0-.02 0-.12-.03-.15v-.1c.05-.05.12-.1.14-.17l.1-.1v-.68l-.1-.1v-.03.3c0-.04 0 .2-.1.2H7c-.04 0-.06-.33-.1-.33s-.06-.2-.1-.2v-.4L6.5 5H6s.2-.05.17-.1l.1-.03c.03-.05.08-.06.08-.08 0-.1-.05-.1-.1-.1l-.12-.1H5.9c-.1 0-.1.1-.1.1V5h-.2c-.1 0-.1 0-.1.04l-.1.06c0 .02-.1.04-.1.07v.36l-.1.03c-.1 0-.1.2-.1.2L5 6s0-.3-.02-.3c0 0 0 .1-.1.1-.03 0-.1.1-.14.1l-.07-.3s0-.2-.05-.2c-.08 0-.1-.1-.1-.1 0-.05-.1-.1-.14-.1s-.1 0-.12.05v.05l-.07.04-.1.13-.1.05-.1.1c-.1 0-.1.03-.1.05v.08s-.1.1-.1.15V6l-.1-.04H3c-.03 0-.1.04-.13.1v.1c.03.07.1.1.14.1v.8s-.5 0-.5.04-.5.15-.5.15v.08l.4.03.1.04c-.1 0 0 .02-.1.03l-.1.03-.1.04H2c-.05 0-.1.03-.1.06-.05 0-.1 0-.1.03h-.1c0-.1-.04-.1-.1-.1h-.3s-.03 0-.05.1c-.04 0-.08.1-.1.1V8v-.2l-.02-.1c0-.04 0-.12-.1-.12 0 0-.1 0-.1.02v.2S1 8 .93 8H.8v-.16c-.03 0-.05-.1-.06-.1-.02 0-.04-.05-.07-.04 0 0 0-.03-.03-.03L.6 7.65H.5c-.06 0-.1.06-.1.07H.3c0 .02-.02.03-.03.04-.05.04-.05.1-.04.12H.15l-.02.02c-.06.04-.06.14-.02.2v.02l.1.02c0 .02-.1.06-.1.12 0 .04 0 .12.1.15v.1c.1.1.1.1.2.1h.1l.1.1.1.1V9s-.1.1 0 .2v-.05H.1c-.02.08 0 .18.06.2l.12.07H.3l.07.03H.4v.16h.1H0h.3c-.02.1.1.1.1.1-.06.1 0 .1 0 .1 0 .1.04.1.1.1 0 .1 0 .1.02.1l.03.1H.7l.04.1s.1.1.17.1H1l.1.1.2.1v.4l.3.1.1.1-.05.1h-.1s-.05 0-.06.1c-.1 0-.1.1-.1.1l-.2.1h-.1.1v.1l-.1.1v.1c-.1.1-.1.1-.1.2-.1 0-.1.1-.1.2v.1s-.1.1 0 .2v.1c-.1 0 0 0 0 .1-.1 0-.1 0-.1.1v.2l.1.1h.2l.1.1.1.1v.1h.1l.1.1h.1s.1 0 .1-.1V13H2v.1c0 .05.06.1.1.1h.1v.1l.1.1c0 .04 0 .04.03.05h.05v.14s.04.1.12.1H3v.1s.03.1.06.1h.05l.1.1h.2c0 .1 0 .1.1.2h.3l.1-.1H4c.05 0 .07.1.1.1 0 0 .03.1.07.1h.15v.3s.2.4.3.4h.05l.1-.3c.1 0 .1-.1.2-.2v-.1l.1-.07.04-.06v.15s0 .1.1.16c0 .1.1.1.2.1h.1c.1 0 .1-.1.1-.1v-.1h.1l.1-.1H6l.1.06h.2l.1.02H6v.1c0 .05.04.1.07.1h.16c-.04 0-.07.06-.07.1v.1c.03.1.17.1.2.1l.22.04H7c.02-.02.08-.03.1-.12l.03-.03.08-.07h.4l.1-.06h.1c.1-.05.1-.1.1-.1l.1-.04h.2l.2.1h.1c.1 0 .2.1.2.1h.2c.1-.05.1-.14.1-.2 0 .04.2.06.2.06v.1H9s-.03.04 0 .1v.2s0 .03.05.05c0 .1.05.1.08.1 0 .1.05.1.05.1v.1h.03v.4H9v.1h-.03c-.03 0-.04.1-.05.1h-.1v.2h-.1l-.1.1v.1l-.02.1v.1l.07.1-.1.1v.1c.04.1.07.1.1.1h.4s.03.1.05.1c0 0 0 .1.03.1-.03.02-.03.04 0 .06V17h.02l.1.28v.06c0 .05 0 .14.04.2H9l.15.03.04.02v.4-.5h.3v.2s0-.1.1-.1v-.2.1s0 .1.1.1h.2s.1 0 .1-.1v-.3l.1-.2v-.1c0 .1.1.1.1.1h.2l.1-.1s0 .3.1.3v.3h.1v-.6l.1-.1.1-.1c.1 0 .1-.1.1-.1h.2v.4l.1.5c.1 0 .2-.4.2-.4s.1 0 .1-.1v.1-.1.1h.1s0 .1.1.1c0 0 0 .1.2.1l.1-.1v-.1h.3v-.05h.4v.1c-.1 0-.2.2-.2.2-.1 0-.1.1-.1.2l-.1.1-.1.04v.1c-.07 0-.07 0-.07.1l.1.2c-.1 0 0 .1 0 .1s0 .1.1.1h.4l.1.02v-.05h.1l.1-.08h.06s.1.03.1 0l.1-.08V18h.1l.1-.2.2-.1-.1-.1c-.1-.1-.1-.1-.2-.14l-.3-.1H13h1v.1-.1h.1v-.14h.2s.1 0 .1-.1c.1.07.1.1.2 0h.1V17s.1-.1.18-.1.1.1.1.1c.1 0 .2-.04.2-.14v.6h.2c.08 0 .1-.4.1-.4V17l.1-.1v-.1l.1-.06c.1 0 .1 0 .1-.1v.4c.1.07.1.5.2.5l.1-.4V17h.1l.04-.03.02-.02c.1 0 .2-.04.2-.12l-.1-.05-.1-.05.2-.02h.2l.3.1-.1-.1h.23s.1 0 .1-.1v-.1h.3l.1-.1V16s.1 0 .1-.05l.1-.02.03-.04v-.1c.1 0 .1-.1.1-.1h.1v-.1c.08-.1.07-.2 0-.2v-.2h.05v-.4l.04-.1h.1l-.1-.1v-.5h.2v-.25c0-.1 0-.1-.03-.1l-.53-.1h.6l.1-.1.06-.08s.08-.1 0-.1l.07-.1V13h-.3c-.1-.06-.1-.07-.2-.07l.1-.1h.1l.1-.07-.1-.1v-.27c-.06-.1-.15-.2-.3-.2l-.06-.1s-.1-.1-.2-.1v-.1c0-.1 0-.1-.1-.2l-.1-.1v-.2c0-.1 0-.1-.03-.1l-.1-.2c-.1-.2-.1-.2-.1-.1-.1 0-.1-.1-.2 0-.1-.1-.4-.1-.5-.1l.3-.1h.2l.1-.1.6-.5-.46.1c0-.1.1-.1.1-.1.07 0 .17-.1.2-.1s.05-.1.04-.1l.1-.1v.2c.03 0 .04.2.05.2l.04-.3.1-.1c.06 0 .1-.1.1-.1l-.7-.1H17h.4l.1.1h.2l.1.1h.6c.1-.08.1-.28.1-.3l.1-.17c.1 0 .1-.1.1-.1v-.1h.1s.1 0 .1-.04l.1-.1c.1 0 .1 0 .1-.1.1 0 .1-.1.1-.1h.4l-.04-.1c-.1-.1 0-.1 0-.1v-.1c.1-.1.1-.1.1-.2.1 0 .17-.1.18-.1l.04-.1.05-.1.1-.1c0-.1.1-.2.1-.2l.06-.1h.3c0-.1.2-.1.2-.1v-.1l.3-.1c.1-.1.3-.2.3-.3s-.1-.1 0-.1v-.1s.1 0 .1-.1v-.3c0-.1 0-.2-.1-.2l-.1-.2c0-.1-.1-.1-.1-.1v-.1c.1-.1.1-.1.1-.2h.5c0-.1.1-.2.1-.3 0-.1-.1-.1-.1-.2zM1.25 11.5zm12.8 6.8h.04-.1z"/><path d="M17.38 10h.04"/><path d="M16 3.5h.23H16zm2.32 6.5l-.04-.02V10h.04zM21 7.34h.05L21 7.3v.03zm-4.4 5.4s-.02-.07-.1-.07h-.02v.15l-.03.14h-.03c-.03 0-.06-.13-.07-.13l-.02-.1c-.05 0-.1.08-.14.1-.1 0-.1.1-.1.1h.3c.1 0 .1.05.1.03v-.18l-.1-.05z"/>',
C[m.TREEMAP_CHART]='<polygon fill-opacity = "0.6" points="11,0 11,10 11,13 11,14 11,16 11,22 22,22 22,16 22,14 22,13 22,10 22,0 "/> <rect y="14" fill-opacity = "0.2" width="10" height="8"/> <rect width="10" height="13"/>',C[m.FUNNEL_CHART]='<polygon points="20.06,6.533 1.989,6.533 1.082,1.656 20.966,1.656 "/> <polygon points="17.949,14.412 4.005,14.412 2.051,8.409 19.888,8.409 "/> <polygon points="14.963,20.79 6.944,20.79 4.271,15.912 17.933,15.912 "/>',C[m.GANTT_CHART]='<path d="M8.38.95V4.42h-7A.48.48,0,0,1,.83,4V1.37a.47.47,0,0,1,.5-.43ZM2.67,6.48a.47.47,0,0,0-.5.43V9.53a.47.47,0,0,0,.5.43H13.12V6.48ZM20.49,12H8.58a.47.47,0,0,0-.5.43v2.62a.47.47,0,0,0,.5.43H20.49a.47.47,0,0,0,.5-.43V12.43A.48.48,0,0,0,20.49,12ZM4,17.53a.47.47,0,0,0-.5.43v2.63A.47.47,0,0,0,4,21H14.44V17.53Z"/> <path fill-opacity="0.5" d="M11.58,1.37V4a.48.48,0,0,1-.5.43H8.38V.95h2.7A.47.47,0,0,1,11.58,1.37Zm3,5.1H13.12V10h1.46a.47.47,0,0,0,.5-.43V6.9A.48.48,0,0,0,14.58,6.48Zm4.49,11.06H14.44V21h4.63c.32,0,.6-.19.6-.43V18C19.67,17.73,19.39,17.53,19.07,17.53Z"/>',C[m.STRUCTURE_CHART]='<path d="M20.4,18c-1,1-2.5,1-3.5,0.1c-0.7-0.6-0.9-1.6-0.7-2.4l-4-1.7c-0.1,0.1-0.2,0.2-0.3,0.3c-1.4,1.5-3.6,1.6-5.2,0.4l-1,1 c0.7,1,0.6,2.3-0.2,3.2c-1,1-2.5,1-3.5,0.1c-1-1-1-2.5-0.1-3.5c0.9-0.9,2.4-1,3.4-0.2l1-1c-1.3-1.5-1.3-3.8,0.1-5.3 c0,0,0.1-0.1,0.1-0.1l-1.5-3C4,6.3,2.8,6.2,2,5.4c-1-1-1-2.5-0.1-3.5c1-1,2.5-1,3.5-0.1c1,1,1,2.5,0.1,3.5c0,0,0,0,0,0l1.5,3 c1.4-0.9,3.4-0.8,4.7,0.4l2.1-2.1c-0.6-0.9-0.5-2.2,0.3-3.1c1-1,2.5-1,3.5-0.1s1,2.5,0.1,3.5c-0.9,1-2.4,1-3.4,0.1l-2,2 c0.9,1.2,1.1,2.8,0.4,4.2l3.8,1.6c0.1-0.2,0.2-0.3,0.4-0.5c1-1,2.5-1,3.5-0.1C21.3,15.4,21.4,17,20.4,18z"/>';var L={};L[m.PIE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAMFBMVEUAAAD///////////////////////////////////////////////////////////87TQQwAAAAD3RSTlMAEM/vv4Bgr59AcFAg348jFhddAAAAjElEQVQY02MAArGSDx6JDGDAav//w//PASAmo/5/IPv/JwEgW/g/mP1fEcjWh7I/AVX/h7L/L2AQhrMvMOTD2b8Z6uHsfwz+ULZK1ByG/2B25smtLfYQ9hewLEQNRACoFwZ+AM2EgW9Au2DAkIEVzg6AuO0/xG1wRYpgv0CEBaB+/A/2I8Tv/zVAfgcA4kmspsM258YAAAAASUVORK5CYII=",L[m.BAR_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAElBMVEUAAAD///////////////////8+Uq06AAAABXRSTlMAQIAgEDB5ccoAAAA+SURBVBjTY0AGoqGhgTjZBICjoKCgCFw9SAMm20hJSUkZlwFwNWAgANELBgrobEdBMDDAZQZEPRQI4GQjAwAQhxXw9o2YjgAAAABJRU5ErkJggg==",L[m.COLUMN_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAG1BMVEUAAAD////////////////////////////////rTT7CAAAACHRSTlMAgEC/IGCPMNAZ/cwAAAAuSURBVBjTY4ADRSEEW6KRALvYDMHWaCbAtmgiwHZSgbOBiG5skJcDRRgcRYEMADB5J9shBWGXAAAAAElFTkSuQmCC",L[m.LINE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMA74C/IM9AEN+vYDCfcFCP7HfXwgAAAG9JREFUGNPNjzsOxDAIRA0Yf+J1du5/2siKIQ1dmlA9PQ2gSa8nHznSBIo0gOgGlAPdm+M4HQuK4Qn8jEU88QdoZw6MZ0+lQ/Li5muDFpYGrokpu9UbJjUmtqaqdQeqAN2aYln7hx41nbwzLDN9Yi4tRQMa2y+S7gAAAABJRU5ErkJggg==",L[m.AREA_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAgklEQVR42mL4DwQMtACjBg8zg4FCBhRbiMPg+f8hIIFqBiMZCgMGFBuMxVAQeE+q4UD1AnCDgVT/f9zgPlgxcYaC4uc8Ayws/xMG5wkZDjX0Pdix/0kD8/EY6gAzlByDsRqOzcfkGIySDHEFIyMFGWEClC7AJslIqyw9avAQNhggwABVPsGVrLOsUQAAAABJRU5ErkJggg==",L[m.GAUGE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWBAMAAAA2mnEIAAAAMFBMVEUAAAD///////////////////////////////////////////////////////////87TQQwAAAAD3RSTlMAgL9A3zAQn89wII/vr2A5/8HrAAAAnUlEQVQY02NAA5kq/52mQZjZ/0FgG4jJ6v/fXbDk/5cAIDvmvzJDKIPR/6MMDGz+HxkYjBkY5L8kMLD/FwCzGf8XMKz/xABmM+j/Ytj/GUjPBGL73wz9DUBaEIg5fjAAlYPYIA0M/ydA2ZxA9gMgfQaI+f5D1NyFqOm/AHUh7w+G/b+g7PXfGeK/Q9n1XxmYtKDsRQoMbHAvJTAQAQCj4DRASabatgAAAABJRU5ErkJggg==",L[m.RADAR_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAEO+A32DPr7+fQFAwIHCP1A0rdQAAAMpJREFUGNOFUFlyRCEIlEXcfdz/tAHxVSr5mOmyQJu2UdI39Mob/pOjcuOK9KeQmbPJbd3CS3oqblWQVpiqnEx00tYnjlXqemlo+ISqZHhwBN25AOih0aQDGxhNuI2QbmGh16ByKSLT9w/FAw6aar0v89zItKMhqzJan3tf8i4qe3aWvHxLE81LQ5IKZU7nImu2Y3gvhcQjvBGsLHTat9srTZ0n+V8Ap4fuYd+h4rxCMkNp6YIEwhZwNfkdeWG+fxIfxQsQfdHTB/wA4h0GZUKWX6QAAAAASUVORK5CYII=",L[m.SCATTER_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAgUlEQVR42mJgGAVA8P//fwFaGFoAxP8ZaWCwAZByGHRhCPYuEKyntsH7oQb/x6WGhUyzF0LpCyMnoRtAkw+6uAMQnwdFIrlhfB5Ko6d3BSA2IDuMgS6aD8T9eDICeV6mNBzn/0eA+dQ0GB1QxeVMtExSDTQJCljBDMQKI7t6AggwAFyzgSCZYutPAAAAAElFTkSuQmCC",L[m.BUBBLE_CHART]=L[m.FORCE_BUBBLE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAnUlEQVR42mJgGAVQwEiswv///ysAqQQodwIjI+MHqrgAaPD7/wiwn1qGOvxHA1QLM1JdzEKC2YbIYUz31AANNgFqG9oPDar3TFR2sAGUFoCnUSCeD4oUKG1AposNgHg9ECdgTUpQEEBpuNzHYfB9Sg3GBwzINZdQ5H0YlEFhgJZd/0P5BhQXm9CckgBNfyDvbwAWiw9GaxWqAIAAAwA2evfwKvysMwAAAABJRU5ErkJggg==",L[""]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAM1BMVEUAAAD///////////////////////////////////////////////////////////////+3leKCAAAAEHRSTlMAQL/PMBBwgCDvn49gUN+vfvzE8AAAAGJJREFUGNPdjUEOgDAIBFkordpW+f9rNdqUQ3mBeyBhMiwURBNFYQu4HsK60E1aUNAlA+7sUgpQmdXMZh/vDORyPs8cJ+l4T7dEjhsPB8DE+bh0LD4IJkRO3K7Agj/xTzjKDUJoCsaJEKt8AAAAAElFTkSuQmCC",L[m.MULTIPIE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAe1BMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////NgkbwAAAAKHRSTlMAMpkDn0AnIBSz24Dmv4dKOhoQCuzKrJqMLfnyuaZ5dGZaUkIN0pRsCVisMQAAAOZJREFUGNN90dtygyAUhWHWEhA0Gg8xappz0pb3f8LKdkrTXvS/45s9DHtQL8G6TP0qcxYKS3n2gm0UVX9ugblPatFca63IsX4AfdLtB0nF2BbIhHPcNVkV6jBo8Txqj2bkfheCCmG3eA08ZfhC/RYii483GZ9BDkF4qSBLYGE8NDeJw4mUx+DGlU2ssdY9ZeWrFl7bkHcI48gicUHdCFt4+sRHTrCRHcoT33+GL3Cy+wxPVvHlh4Hcfy/fwXi9nL0ntTfo1JqDmSrGqglxxeQw57Iszwbx4lSWYy3/+2td27ad4D99Ae8gE70h03waAAAAAElFTkSuQmCC",L[m.AREA_MAP]=L[m.HEAT_MAP]=L[m.POINT_MAP]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAA5ElEQVR42mJgGHHg////AkDsAMQK1DZ4/38IeE/QcJACIDYgwlAHqIH/kQxvAOLz2BTPB0kA8X1CLoC6FtlgOEBXiA76QWGIx1cO/7GDfpCCAqjzcYH76MEC4hNQr8CAyys4QANUIzqAmbEe7kMcCkkF76HxooCeDqkB1mNLMtQAAdhyznkqGHwfawoikDKIBQ64EnwA1Ob9aLFNLFBgIDK7CpAQByDHNMD0s+AymJGR8QDUgngiyqIHQHwQiPlJLcHeIwXRe7QI+w/1mQLOMCZU7iKxQWXIfVoU7uS5blADgAADACOwXahZ5pbvAAAAAElFTkSuQmCC",L[m.TREEMAP_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAYAAADEtGw7AAAAOUlEQVR42mL8DwQMRABGIAAqnclAJGBioBEYNXjU4FGDh5XBLEDMRyuD1YhUe3Y08kYNHqQGAwQYAL9YCMfrIWhGAAAAAElFTkSuQmCC",L[m.FUNNEL_CHART]="iVBORw0KGgoAAAANSUhEUgAAABcAAAAXBAMAAAASBMmTAAAAKlBMVEUAAAD///////////////////////////////////////////////////+Gu8ovAAAADXRSTlMAQMCAIGAw0FAQ8HCwS1BQUgAAAHVJREFUGNNjwA2Y78LAZQYGDjjnKgMDC5xzDahuLYxzAcjRhXEKgJxEQShIAHIcYRwHIGcvTFkAkOML40wActih7DsgJ3Aj7ETYehPsuloIRwHT3UlKYNAAZMKMuzUBzGFEGAZxKkJ/LojjAOWwGhsbW2CYCwC1z2uuESf9qgAAAABJRU5ErkJggg==",L[m.GANTT_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAeFBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////GqOSsAAAAJ3RSTlMABOgQCPvZzN3OhMOofnrCZD03jzDs0ryWiXNsXyUjDd9TUkQqHhgfRKpZAAAAmElEQVQY043P2Q6DIBRF0SsiKMrgXKfamf//w1qxQJo0uh73y8kBmEMDYxyA9SI1WrGB310+R9o4ie7mZW1zeXU5bBuaLKhQfQ4HBB7bgKOGbOJuqL45007G8p3MahJvLmVfLcXAjtncE8BEE3NrZXOhfXv5gXxgzaEH/nu2qZQyXUiajUqNavpdQ5wxVuafXEWWJoJzwYo3Z10TfT0w3LEAAAAASUVORK5CYII=",L[m.STRUCTURE_CHART]="iVBORw0KGgoAAAANSUhEUgAAABYAAAAWCAMAAADzapwJAAAAhFBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////8g2+bRAAAAK3RSTlMAA/v3JXcSB9yNRSycF/Dsu7akmJSCTTMOC9HEwKWIWTof4taqoH1wZ1Ydf35d9gAAAO1JREFUGNNVUAlygzAMlA+wMZAQroTc6d3q///rYkHcahikWe+sdkVSitbhOQ2vOyu4/KUyZj4+0ft+gc9sNJdCnBrmSuCCNfuDkDPMHCIlbzS/k1MoUIzhG+D5s/UlKjr6wp6XHJhsHysVxh8K1b3vxJV4bTfM277LV5fSc88aywqalORZHRiGiW2UTfAFGErP9pVbnhz1wvZxT7rSnhEVS6+WqMzGiE7h8TiBzV1Z+fYTUwHcejan2mZDmCN/MPQ2NVEbu+g5oiPkNLQauaBTEvkKtR2mm/R0/3MR7/n9Nhz+xPifP0GL93SGVL8LLRIgop0Y4gAAAABJRU5ErkJggg==";var P="position:absolute;width:1px;height:1px;behavior:url(#default#VML);";return A}),define("VanCharts",["require","./vans/VanChart","./vans/VanChartMap","./vans/VanChartForceBubble","./vans/VanChartWordCloud","./vans/VanChartStructure","./chart/gantt/Gantt","./utils/BaseUtils","./Constants","./utils/LoadingUtils","./Carousel","./vans/VanChartLibrary"],function(t){function e(t){s.initConst();var e=t.getAttribute(h.INSTANCES_KEY);e||(e=h.INSTANCES_KEY+d++,t.setAttribute(h.INSTANCES_KEY,e));var n=f[e]||new i(t);return f[e]=n,n}function i(t){this.dom=t,this.charts=[],this.carousel=u&&u(this),this.dom.style.cssText+=";overflow:hidden;-ms-user-select:none;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;",this.dom.onselectstart=this.dom.ondrag=function(){return!1}}function n(t){s.initPaddingScale(t)}function r(t,i){var n,r,o=t.options;try{r=window.top.document,n=window.top}catch(h){n=window,r=n.document}var l=r.body,u=7998;if(null==i)for(var c,d=-1,f=document.body.children.length;++d<f;)c=document.body.children[d],"none"!==(c.style.display||"").toLowerCase()&&(u=Math.max(u,c.style.zIndex));else u=i-1;var p=r.createElement("div");p.style.cssText="position: fixed;top:0;left:0;width:100%;height:100%;z-index:"+(u+1)+";",s.isSupportSVG()?p.style.background="rgba(0,0,0,0.3)":(p.style.background="#000000",p.style.filter="alpha(opacity=30)"),l.appendChild(p);var g=r.createElement("div");g.style.cssText="position: fixed;top:5%;left:10%;width:80%;height:90%;z-index:"+(u+2)+";background:#ffffff;box-shadow:0px 4px 50px rgba(0,0,0,0.5);";try{g.style.setExpression("top","( ignoreMe = document.body.scrollTop + this.previousSibling.clientHeight * 0.05) + 'px' "),p.style.setExpression("top","( ignoreMe = document.body.scrollTop ) + 'px' "),g.style.position="absolute",p.style.position="absolute"}catch(h){}l.appendChild(g);var m=e(g);m.fullScreenFather=t,m.setOptions(o),t.set({enable:!1}),t.fullScreenChart=m,g.boxDiv=p,p.onclick=function(){a(g,t)},g.onclick=function(t){t=t||n.event,t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}}function a(t,e){var i=t.parentNode;i&&(i.removeChild(t),t.boxDiv&&i.removeChild(t.boxDiv)),e.set({enable:!0}),e.fullScreenChart=null}function o(t){return t&&"point"===t.vanChartType}t("./vans/VanChart"),t("./vans/VanChartMap"),t("./vans/VanChartForceBubble"),t("./vans/VanChartWordCloud"),t("./vans/VanChartStructure"),t("./chart/gantt/Gantt");var s=t("./utils/BaseUtils"),h=t("./Constants"),l=t("./utils/LoadingUtils"),u=t("./Carousel"),c=t("./vans/VanChartLibrary");window.VAN_CANVAS=s.isSupportSVG()?"canvas":"vancanvas";var d=0,f=Object.create(null);return i.prototype={constructor:i,setOptions:function(t){this.options=t||this.options,t&&s.isArray(t.options)?this.charts=this.carousel.init(t,this.charts,this.dom):this.charts=[this._initSingle(t,this.charts[0],this.dom)]},showLightBox:function(t){r(t)},hideLightBox:function(t,e){a(t,e)},_initSingle:function(t,e,i){var n=c.get(t.chartType);return e&&e.vanChartType===n.prototype.vanChartType?(e._changeDataState=!0,e.refresh(t),e):(e&&e.remove(),new n(t,i,this))},setData:function(t,e){null!=e?this.charts[e]=this.carousel.refresh(t,e):this.setOptions(t)},eachVanChart:function(t){this.charts.forEach(function(e){t.call(null,e)})},refreshRestore:function(){this.eachVanChart(function(t){t.refreshRestore()})},resize:function(t){t?this.setOptions(t):this.charts.forEach(function(t){t.resize()})},getChart:function(t){return this.charts[t]},clear:function(){for(var t=0,e=this.charts.length;e>t;t++)this.charts[t].remove(),this.charts[t]=null},startLoading:function(){this.dom&&l.startLoading(this.dom,this.dom.getAttribute(h.INSTANCES_KEY))},endLoading:function(){this.dom&&l.endLoading(this.dom,this.dom.getAttribute(h.INSTANCES_KEY))}},window.VanCharts={version:"8.5.0",buildTime:"5/9/2017 09:08:58 GMT+0800 (CST)",showLightBox:r,hideLightBox:a,init:e,initPaddingScale:n,acceptPoint:o,instances:f}}),define("chart/Bar",["require","../utils/BaseUtils","../utils/ColorUtils","../Constants","../utils/BezierEasing","./Series","../ComponentLibrary","../dom/Browser","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../utils/BaseUtils"),i=t("../utils/ColorUtils"),n=t("../Constants"),r=t("../utils/BezierEasing"),a=t("./Series"),o=(t("../ComponentLibrary"),t("../dom/Browser"),400),s=150,h=250,l=6,u=.35,c=1,d=3,f=2,p=a.extend({doLayout:function(){var t=this.getSeriesOffsetAndWidth(),i=this,r=i.vanchart,a=i.type==n.COLUMN_CHART,o=r.isInverted(),s="x",h="y";a||(s="y",h="x");var l=a&&!o||!a&&o,u=i[s+"Axis"],c=i[h+"Axis"],d=c.getZeroPos(),f=0;u.isOnZero()&&(f=u.options.lineWidth),this.points.forEach(function(n){var r=n.options,p=u.scale(u.getAxisValue(r[s],n)),g=c.scale(r[h+"0"]),m=c.getAxisValue(r[h],n)+r[h+"0"],v=c.scale(m-c.getStartPosValue());g===1/0&&(g=c.scale.range()[0]);var _,y,x,b;_=p+t.offset-t.width/2,y=Math.min(g,v),x=t.width,b=Math.abs(g-v),y===d?(y+=f/2,b-=f/2):y+b===d&&(b-=f/2),b=Math.max(b,0);var T={};l?(T.x=_,T.y=y,T.width=x,T.height=b):(T.x=y,T.y=_,T.width=b,T.height=x),n.rect=e.rectSubPixelOpt(T,r.borderWidth),n.rect.rx=n.rect.ry=n.options.borderRadius,n.isNull||i._calculateAnimationInitRect(n,a,o)})},getSeriesOffsetAndWidth:function(){var t=this,i=t.options,n=0,r={},a=0,o=0,s=this.vanchart.seriesOfType(this.type),h=this.getBaseAxisType();s.forEach(function(e){e[h]==t[h]&&e.visible&&(e.stack&&!r[e.stack]?(n++,r[e.stack]=!0,t.stack&&t.stack==e.stack&&(a=n-1)):e.stack||(n++,t==e&&(a=n-1))),e[h]==t[h]&&(o+=e.points.length)});var l=t[h],u=0,c=0;if(l.isCategory()){var d=i.categoryGap,p=i.gap,g=l.getTickLength();d=e.getPercentValue(d,g),u=(g-d)/n,c=d/2+u*(a+.5),p=e.getPercentValue(p,u),u-=p}else{var m=l._getRange();m=Math.abs(m[1]-m[0]),u=m/o/3,c=0}return{width:e.hasDefined(i.width)?i.width:Math.max(u,f),offset:c}},_getPointKey:function(t){return this.type==n.BAR_CHART?t.y:t.x},getTargetKey:function(){return this.type==n.BAR_CHART?"x":"y"},getBaseAxisType:function(){return this.type==n.COLUMN_CHART?"xAxis":"yAxis"},getTrendLineXYValues:function(t){for(var e=[],i=[],r=t.points,a=t.type==n.COLUMN_CHART?t.yAxis:t.xAxis,o=t.type==n.COLUMN_CHART?t.xAxis:t.yAxis,s=o.isHorizontal(),h=a.isAxisReversed(),l=[],u=0,c=r.length;c>u;u++){var d=r[u];!d.isNull&&d.rect&&l.push(d.rect)}return l.sort(function(t,e){return s?t.x-e.x:t.y-e.y}),l.forEach(function(t){var n,r;s?(n=t.x+t.width/2,r=h?t.y+t.height:t.y):(n=h?t.x:t.x+t.width,r=t.y+t.height/2),e.push(n),i.push(r)}),[e,i,o.getPosition()]},_calculateAnimationInitRect:function(t,e,i){var r,a,o=e?"y":"x",s=t.options,h=t.series[o+"Axis"],l=h.getAxisValue(s[o],t),u=h.getStartPos(),c=l>=0,d=e&&!i||!e&&i;d?c^h.isAxisReversed()?(r=n.BOTTOM_TO_TOP,a={x:t.rect.x,y:u,width:t.rect.width,height:0}):(r=n.TOP_TO_BOTTOM,a={x:t.rect.x,y:t.rect.y,width:t.rect.width,height:0}):c^h.isAxisReversed()?(r=n.LEFT_TO_RIGHT,a={x:t.rect.x,y:t.rect.y,width:0,height:t.rect.height}):(r=n.RIGHT_TO_LEFT,a={x:t.rect.x+t.rect.width,y:t.rect.y,width:0,height:t.rect.height}),t.location=r,t.initRect=a},_calculateLabelPos:function(t){var i=this,r=i.points.filter(function(t){return t.visible});r.forEach(function(r){var a=r.options.dataLabels;if(a&&a.enabled){var o;a.align&&(o=i._calculateAlignLabelPos(r,a.align));var s=r.location==n.TOP_TO_BOTTOM||r.location==n.BOTTOM_TO_TOP;a.autoAdjust&&(o=i._calculateAutoLabelPos(r,o,s,t)),o&&(r.labelPos=o,t.addBounds(e.makeBounds(r.labelPos,r.labelDim)))}})},_calculateAlignLabelPos:function(t,e){var i=t.labelDim,r=t.rect,a=this.vanchart.bounds,o=(a.width,a.height,t.location==n.TOP_TO_BOTTOM||t.location==n.BOTTOM_TO_TOP),s=t.location==n.BOTTOM_TO_TOP||t.location==n.LEFT_TO_RIGHT,h=r.x+r.width/2,l=r.y+r.height/2;if(i){var u,c;switch(e){case n.CENTER:u=h-i.width/2,c=l-i.height/2;break;case n.INSIDE:o?(u=h-i.width/2,c=s?r.y+d:r.y+r.height-d-i.height):(c=l-i.height/2,u=s?r.x+r.width-d-i.width:r.x+d);break;case n.OUTSIDE:o?(u=h-i.width/2,c=s?r.y-d-i.height:r.y+r.height+d):(c=l-i.height/2,u=s?r.x+r.width+d:r.x-d-i.width)}return{x:u,y:c}}},_getMoreLabelDefaultCenter:function(t,e){var i=this.type==n.COLUMN_CHART,r=this.vanchart.isInverted();return i&&!r||!i&&r?{centerX:t.rect.x+t.rect.width/2,centerY:t.rect.y-e.height/2}:{centerX:t.rect.x+t.rect.width+e.width/2,centerY:t.rect.y+t.rect.height/2}}});return p.include({_getFixedPos:function(t,e){var i,r,a=this.vanchart.bounds,o=t.rect;return 0===t.initRect.height?(i=a.x+o.x+o.width+c,r=t.location==n.BOTTOM_TO_TOP?a.y+o.y:a.y+o.y+o.height):(r=a.y+o.y+o.height+c,i=t.location==n.LEFT_TO_RIGHT?a.x+o.x+o.width-e.width:a.x+o.x-e.width),[i,r]},getPointGraphicKey:function(){return"rect"},getFillFilter:function(t,r){if(e.isSupportSVG()){var a=this,o=r.options,s=a.vanchart,h=s.renderer;if(o.image){var l,u,c=r.rect;switch(r.location){case n.BOTTOM_TO_TOP:l=c.x,u=c.y+c.height%o.imageHeight;break;case n.TOP_TO_BOTTOM:case n.LEFT_TO_RIGHT:l=c.x,u=c.y;break;case n.RIGHT_TO_LEFT:l=c.x+c.width%o.imageWidth,u=c.y}var d={x:l,y:u,width:o.imageWidth,height:o.imageHeight,patternUnits:"userSpaceOnUse"},f={x:0,y:0,width:o.imageWidth,height:o.imageHeight};return r.imagePattern?h.updateImagePattern(r.imagePattern,d,f,r.options.image):r.imagePattern=h.imagePattern(d,f,r.options.image),"url(#"+e.stamp(r.imagePattern)+")"}if(s.options.style==n.STYLE_GRADUAL){var p,g,m,v;switch(p=g=m=v="0%",r.location){case n.BOTTOM_TO_TOP:g="100%";break;case n.TOP_TO_BOTTOM:v="100%";break;case n.LEFT_TO_RIGHT:m="100%";break;case n.RIGHT_TO_LEFT:p="100%"}var _={x1:p,y1:g,x2:m,y2:v},y={offset:"0%","stop-color":t},x={offset:"100%","stop-color":i.getColorWithDivider(t,.9)};return r.colorGradient?h.updateColorGradient(r.colorGradient,_,[y,x]):r.colorGradient=h.colorGradient(_,[y,x]),"url(#"+e.stamp(r.colorGradient)+")"}}return t},_calculateAnimationDelay:function(){if(this.stack)return 0;if(this.state==n.STATE_SHOW){for(var t=this.vanchart.seriesOfType(this.type),e=0,i=t.length;i>e;e++)if(t[e].state==n.STATE_TO_DROP)return s}else if(this.state==n.STATE_TO_SHOW)return h;return 0},getPointInitAttr:function(t){return t.initRect},getPointInitAnimationAttr:function(t){return{ease:r.css.swing,duration:o,attr:t.rect}},getPointUpdateAnimationAttr:function(t){return{ease:r.css.swing,duration:h,attr:t.rect}},getPointDropAnimationAttr:function(t){return{ease:r.css.swing,duration:s,attr:t.initRect}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:100,ease:"ease-out-in",style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:100,ease:"ease-out-in",style:i})},effectAnimation:function(t){function e(){return l.rect().addTo(u).attr(c).style(d)}function i(t){return.5*f*t}function r(t){return 0>t?0:t}function a(t,e,n){t.style(d).effectTransition().delay(e).ease("linear").duration(n).styleTween("stroke-opacity",function(){return function(t){return.8*(1-t)}}).styleTween("stroke-width",function(){return i}).attrTween("x",function(){return function(t){return c.x-i(t)/2+1}}).attrTween("y",function(){return function(t){return c.y-i(t)/2+1}}).attrTween("width",function(){return function(t){return r(c.width+i(t)-2)}}).attrTween("height",function(){return function(t){return r(c.height+i(t)-2)}})}var o=t.options,s=t.series,h=s.vanchart,l=h.renderer;if(!o.image){var u=s._getPointEffectGroup(t),c=t.rect,d={fill:"none",stroke:t.color,"stroke-opacity":0,"stroke-width":0},f=t.location===n.BOTTOM_TO_TOP||t.location===n.TOP_TO_BOTTOM?c.width:c.height,p=u.firstG=u.firstG||e(),g=u.secondG=u.secondG||e(),m=u.thirdG=u.thirdG||e(),v=s._getEffectTime(t),_=v/s.getDefaultEffectTime();a(p,0,1600*_),a(g,600*_,1600*_),a(m,1200*_,1600*_)}},getDefaultEffectTime:function(){return 2800},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,fill:t.series.getFillFilter(t.mouseOverColor,t),"fill-opacity":t.opacity,"stroke-width":l,"stroke-opacity":0===t.opacity?0:u}},getPressedStyle:function(t){return{stroke:t.clickColor,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,"stroke-width":l,"stroke-opacity":0===t.opacity?0:u}}}),t("../ChartLibrary").register(n.BAR_CHART,p),t("../ChartLibrary").register(n.COLUMN_CHART,p),p}),define("chart/PieSeries",["require","../utils/BaseUtils","./Series"],function(t){var e=t("../utils/BaseUtils"),i=t("./Series"),n=2,r=[.9,.85,.8,.75,.7,.65,.6,.55,.5],a="right-top",o="right-bottom",s="left-top",h="left-bottom",l=Math.PI/180;return{calcOutsideLabel:function(t,e,i,n){var a=this,o={};if(t.map(function(t){var e=a.getLocByArc(a.getCenterAngle(t));o[e]=o[e]||[],o[e].push(t)}),n)return o=a.ignoreMin(o,n),a.placeOutSideLabels(o,n),n;n=Math.min(i[0]-e.x,e.x+e.width-i[0],i[1]-e.y,e.y+e.height-i[1]);for(var s=0,h=r.length;h>s;s++){var l=n*r[s],u=a.ignoreMin(o,l);if(a.placeOutSideLabels(u,l),a.testWithinBounds(u,i,e))break}return l},calculateInsideLabelBounds:function(t){var e=this;t.map(function(i,n){var r=t[n],a=e.getCenterAngle(r),o=e._getInnerRadius(r),s=e._getOuterRadius(r),h=o+(s-o)/2,l=e._getArcPoint(h,a),u=l[0]-r.labelDim.width/2,c=l[1]-r.labelDim.height/2;r.labelPos={x:u,y:c}})},calculateLeadLineStartPos:function(t){var e=this;t.map(function(t){var i=e._getOuterRadius(t),n=e.getCenterAngle(t);t.labelPos&&(t.labelPos.startPos={x:(i+1)*Math.sin(n),y:(i+1)*Math.cos(n+Math.PI)})})},getCenterAngle:function(t){var i=this.chartInfo.rotate||0,n=i+(this._getStartAngle(t)+this._getEndAngle(t))/2;return e.makeValueInRange(0,2*Math.PI,n)},getLocByArc:function(t){return t%=2*Math.PI,t<Math.PI/2?a:t<Math.PI?o:t<3*Math.PI/2?h:s},ignoreMin:function(t,e){var i={};for(var n in t)t[n].map(function(t){t.labelPos=null}),i[n]=this._ignoreMinArcLabel(e,t[n]);return i},_ignoreMinArcLabel:function(t,e){for(var i=0,n=0,r=e.length;r>n;n++){var a=e[n].labelDim;i+=a.height}if(i>1.2*t){var o=i-1.2*t;e.sort(function(t,e){return t.value-e.value});for(var n=0,r=e.length;r>n&&!(0>o);n++){var s=e[n].labelDim.height;o-=s}e=e.slice(n,e.length)}var h=this;return e.sort(function(t,e){return h.getCenterAngle(t)-h.getCenterAngle(e)}),e},placeOutSideLabels:function(t,e){var i=this;Object.keys(t).map(function(n){i.findNiceBounds(!0,t[n],e,n)||i.findNiceBounds(!1,t[n],e,n)})},findNiceBounds:function(t,e,i,n){var r,s,h=1.2*i,u=.1*i,c=this._getStartAndEndAngle(n),d=t?c.endAngle:c.startAngle,f=t?l:-l;e.map(function(t){t.labelPos=null});for(var p=0,g=e.length;g>p;p++){var m=t?p:g-p-1,v=t?Math.max:Math.min,_=e[m],y=_.labelDim,x=this.getCenterAngle(_);x=s?v(x,s):x;for(var b=!1,T=x;t?d>T:T>d;T+=f){var A=h*Math.sin(T),C=h*Math.cos(T+Math.PI),L=this._getLabelBounds(n,A,C,u,y);if(r?!this._isOverlapOrShadow(r,L):!0){b=!0,s=T;break}}if(!b)return!1;var P,M={x:A,y:C};P=n==a||n==o?{x:A+u,y:C}:{x:A-u,y:C},r=L,_.labelPos={x:L.x,y:L.y,midPos:M,endPos:P}}return!0},_getStartAndEndAngle:function(t){switch(t){case a:return{startAngle:0,endAngle:Math.PI/2};case o:return{startAngle:Math.PI/2,endAngle:Math.PI};case h:return{startAngle:Math.PI,endAngle:3*Math.PI/2};case s:return{startAngle:3*Math.PI/2,endAngle:2*Math.PI}}},_getLabelBounds:function(t,e,i,r,s){var h,l;return h=t==a||t==o?e+r+n:e-r-n-s.width,l=i-s.height/2,{x:h,y:l,width:s.width,height:s.height}},_isOverlapOrShadow:function(t,i){var n=Math.max(t.y,i.y),r=Math.min(t.y+t.height/2,i.y+i.height/2),a=Math.max(t.y+t.height/2,i.y+i.height/2),o=Math.min(t.y+t.height,i.y+i.height);return e.rectangleOverlapped(t,i)||r>=n||o>=a},testWithinBounds:function(t,i,n){for(var r in t){var l,u,c,d,f;switch(u=c=0,r){case a:case o:c=n.y-i[1],d=n.width+n.x-i[0],f=n.height;break;case h:case s:u=n.x-i[0],c=n.y-i[1],d=-u,f=n.height}l={x:u,y:c,width:d,height:f};for(var p=0;p<t[r].length;p++){var g=t[r][p];if(g.labelPos){var m={x:g.labelPos.x,y:g.labelPos.y,width:g.labelDim.width,height:g.labelDim.height};if(!e.containsRect(l,m))return!1}}}return!0},_getInnerRadius:function(t){return t.innerRadius},_getOuterRadius:function(t){return t.outerRadius},_getStartAngle:function(t){return t.startAngle},_getEndAngle:function(t){return t.endAngle},_getPositionInPie:function(t){var e=t.x-this.chartInfo.centerX,i=t.y-this.chartInfo.centerY;return{x:e,y:i}},_isRotatable:function(){return e.isSupportSVG()&&this.options.rotatable},onPanStart:function(t){this._isRotatable()&&(this.initPos=t.containerPoint,this.initRotate=e.toDegree(this.chartInfo.rotate))},onPanMove:function(t){if(this._isRotatable()){var i=this._getAngle(this._getPositionInPie(this.initPos)),n=this._getAngle(this._getPositionInPie(t.containerPoint)),r=n-i+this.initRotate;this.pathGroup.attr("transform","rotate("+r+")"),this.chartInfo.rotate=e.toRadian(r),this._calculateLabelPosWhenRadiusFixed(),this._rotateLabels()}},onPanEnd:function(t){this.vanchart.handler.panTarget=null},getEvents:function(){return e.extend(i.prototype.getEvents.call(this),{panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd})},_rotateLabels:function(){var t=this,i=t.vanchart;i.renderer,this.textLabelGroup;t.getDataToDraw().forEach(function(i){i.textGraphic&&!i.labelPos?(i.textGraphic.remove(),i.leadLine&&i.leadLine.remove(),i.textGraphic=null,i.leadLine=null):i.textGraphic&&i.labelPos?(i.textGraphic.attr("transform",e.makeTranslate(i.labelPos)),i.labelPos.startPos&&(i.leadLine?i.leadLine.attr("d",t._getLeadLinePath(i)):i.leadLine=t._getLeadLine(i))):!i.textGraphic&&i.labelPos&&t._createTextGraphic(i)})}}}),define("EffectHelper",["require","./utils/BaseUtils","./utils/PathGenerator","./utils/BezierEasing","./vector/Transition","./vector/shape/Path","./vector/shape/LayerGroup"],function(t){function e(t,e){function i(){return function(t){return u.makeTranslate3d({x:l.x,y:l.y-25*t})}}function n(){return function(t){return u.makeTranslate3d({x:l.x,y:l.y-25*(1-t)})}}function r(){return(new p).addTo(_)._path.style(v).attr("d",m)}function a(t,e,i){t.style(v).attr("transform",T),t.effectTransition().delay(e).ease("linear").duration(i).attrTween("transform",function(){return function(t){return b+"scale("+(x+1.4*x*t)+")"}}).styleTween("fill-opacity",function(){return function(t){return.6*(1-t)}})}var o=e.series,s=o.vanchart,h=e.getLatLng(),l=s.latLngToLayerPoint(h),c=o._getEffectTime(e);new f({node:function(){return t._icon}},"point-map-effect").ease(d.css["ease-out-quint"]).duration(.25*c).styleTween("transform",i).transition().ease(d.css["ease-in-quint"]).duration(.25*c).styleTween("transform",n).transition().ease(d.css["ease-out-quint"]).duration(.25*c).styleTween("transform",i).transition().ease(d.css["ease-in-quint"]).duration(.25*c).styleTween("transform",n);var v={"fill-opacity":0,fill:e.color},_=e.effectGraphic=e.effectGraphic||(new g).addTo(s.getEffectLayer()),y=e.options.icon.iconSize,x=y[0]/90,b=u.makeTranslate({x:l.x,y:l.y}),T=b+" scale("+x+")",A=_.firstG=_.firstG||r(),C=_.secondG=_.secondG||r(),L=_.thirdG=_.thirdG||r(),P=c/o.getDefaultEffectTime();a(A,0,2e3*P),a(C,600*P,2e3*P),a(L,1200*P,2e3*P)}function i(t,e,i){var n=r(t,e,i);t.graphic.attr("transform-origin","center").effectTransition().ease(d.css["ease-out-quad"]).duration(.5*n.period).attrTween("filter",n.firstTweenFun).attr("transform",n.translate+"scale(1.05)").transition().ease(d.css["ease-in-quad"]).duration(.5*n.period).attrTween("filter",n.secondTweenFun).attr("transform",n.translate+"scale(1)")}function n(t,e){var i=r(e);t._path.style("transform",i.translate+"scale(1)").style("transform-origin","center").effectTransition().ease(d.css["ease-out-quad"]).duration(.5*i.period).attrTween("filter",i.firstTweenFun).style("transform",i.translate+"scale(1.05)").transition().ease(d.css["ease-in-quad"]).duration(.5*i.period).attrTween("filter",i.secondTweenFun).style("transform",i.translate+"scale(1)")}function r(t,e,i){function n(){return function(e){return s.updateDropShadowFilter&&s.updateDropShadowFilter(t.effectShadowFilter,3*e,3*e,.75*e,5*e,91/255,91/255,91/255),h}}function r(){return function(e){return s.updateDropShadowFilter&&s.updateDropShadowFilter(t.effectShadowFilter,3*(1-e),3*(1-e),.75*(1-e),5*(1-e),91/255,91/255,91/255),h}}var a=t.series,o=a.vanchart,s=o.renderer;t.effectShadowFilter=t.effectShadowFilter||s.createDropShadowFilter(3,3,.75,5,91/255,91/255,91/255);var h="url(#"+u.stamp(t.effectShadowFilter)+")",l=a._getEffectTime(t),c=isNaN(e)||isNaN(i)?"":u.makeTranslate({x:e,y:i});return{period:l,translate:c,firstTweenFun:n,secondTweenFun:r}}function a(t,e){o(t,null,e)}function o(t,e,i){function n(e){return a({outerRadius:t.radius+e*t.radius*1.5})}var r={"fill-opacity":0,stroke:"none",fill:t.color},a=c.arc().innerRadius(t.radius).startAngle(0).endAngle(360);l(t,{isMap:i,initStyle:r,pathFun:n,trans:e})}function s(t,e){function i(t){return t*o*2.5}function n(t){return c.getMarkerPath(a,o+i(t)/2-1)}var r=t.options.marker;if(r&&r.symbol){var a=r.symbol,o=r.radius;if(u.isImageMarker(a))return;var s={fill:"none",stroke:r.fillColor,"stroke-width":0,"stroke-opacity":0};l(t,{isMap:e,initStyle:s,opacityKey:"stroke-opacity",pathFun:n,borderFun:i})}else h(t,e)}function h(t,e){function i(t){return o({outerRadius:t*r*3.5})}var n=t.options.marker,r=n.radius,a={"fill-opacity":0,stroke:"none",fill:n.fillColor},o=c.arc().innerRadius(0).startAngle(0).endAngle(360);l(t,{isMap:e,initStyle:a,pathFun:i})}function l(t,e){function i(t,i,n){t.style(h).effectTransition().delay(i).ease("linear").duration(n).styleTween("stroke-width",function(){return e.borderFun}).styleTween(e.opacityKey||"fill-opacity",function(){return function(t){return.3*(1-t)}}).attrTween("d",function(){return e.pathFun})}var n,r,a=t.series,o=a.vanchart,s=o.renderer,h=e.initStyle,l=e.trans||{x:t.posX,y:t.posY};if(e.isMap){var c=t.getLatLng(),d=o.latLngToLayerPoint(c);l=d,n=t.effectGraphic=t.effectGraphic||(new g).addTo(o.getEffectLayer()),r=function(){return(new p).addTo(n)._path.style(h).attr("transform",u.makeTranslate(l))}}else n=a._getPointEffectGroup(t).attr("transform",u.makeTranslate(l)),r=function(){return s.path().addTo(n).style(h)};var f=n.firstG=n.firstG||r(),m=n.secondG=n.secondG||r(),v=n.thirdG=n.thirdG||r(),_=a._getEffectTime(t),y=_/a.getDefaultEffectTime();i(f,0,1600*y),i(m,440*y,1600*y),i(v,880*y,1600*y)}var u=t("./utils/BaseUtils"),c=t("./utils/PathGenerator"),d=t("./utils/BezierEasing"),f=t("./vector/Transition"),p=t("./vector/shape/Path"),g=t("./vector/shape/LayerGroup"),m="M-56,0a56,16 0 1,0 112,0a56,16 0 1,0 -112,0";return{MARKER_EFFECT_TIME:2560,markerEffectAnimation:s,bubbleEffectAnimation:a,AREA_STYLE_EFFECT_TIME:2e3,areaStyleEffectAnimation:i,areaMapEffectAnimation:n,POINT_MAP_EFFECT_TIME:3200,pointMapEffectAnimation:e,forceBubbleEffectAnimation:o}}),define("chart/Pie",["require","../Constants","../utils/BaseUtils","../utils/ColorUtils","./Series","./PieSeries","../utils/BoundsManager","../utils/BezierEasing","../EffectHelper","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){function e(){function t(a){var o=a.map(function(i,n){var a=+e.call(t,i,n);return r+=a,a}),s=i,h=n-s,l=h/r;a.forEach(function(t,e){t.startAngle=isNaN(s)?0:s,t.endAngle=s+=isNaN(o[e]*l)?0:o[e]*l})}var e=Number,i=0,n=2*Math.PI,r=0;return t.value=function(i){return arguments.length?(e=i,t):e},t.startAngle=function(e){return arguments.length?(i=e,t):i},t.endAngle=function(e){return arguments.length?(n=e,t):n},t}var i=t("../Constants"),n=t("../utils/BaseUtils"),r=t("../utils/ColorUtils"),a=t("./Series"),o=t("./PieSeries"),s=(t("../utils/BoundsManager"),t("../utils/BezierEasing")),h=t("../EffectHelper"),l=t("../utils/PathGenerator"),u=t("../utils/Interpolator"),c=2*Math.PI,d=1.1,f=3,p=1e3,g="bounce",m=s.css.swing,v=400,_=a.extend({_getAxisTypes:function(){return[]},doLayout:function(){var t=this._calculateSeriesBounds(),n=this;if(!t&&!this.options.radius&&!this.options.center)throw new Error("pie has no bounds");var r,a,o;t?(o=this.options.radius||Math.min(t.width/2,t.height/2),r=t.x+t.width/2,a=t.y+t.height/2,this.bounds=t):(o=this.options.radius,r=this._getPercentValue(this.options.center[0],this.vanchart.width),a=this._getPercentValue(this.options.center[1],this.vanchart.height));var s=this.chartInfo&&this.chartInfo.rotate||0;this.chartInfo={radius:o,centerX:r,centerY:a,rotate:s};var h=e().value(function(t){return n.options.roseType==i.SAME_ARC?1:Math.abs(t.getTargetValue());
}).startAngle(n.startAngle).endAngle(n.endAngle),l=this.points.filter(function(t){return t.isVisible()}),u=this;l.forEach(function(t){t.lastShape=u._getArcData(t)}),h(l)},_getFixedPos:function(t,e){var i=(this.vanchart.bounds,t.series.chartInfo),n=i.centerX,r=i.centerY,a=this.getCenterAngle(t),o=t.outerRadius*d,s=o*Math.sin(a)+n,h=o*Math.cos(a+Math.PI)+r;return a<Math.PI/2?h-=e.height:a>=Math.PI&&a<3*Math.PI/2?s-=e.width:a>=3*Math.PI/2&&c>a&&(h-=e.height,s-=e.width),[s,h]},_calculateLabelPos:function(){for(var t=this.options.roseType,e=this.points.filter(function(t){return t.visible}),n=[],r=[],a=0,o=e.length;o>a;a++){var s=e[a],h=s.options.dataLabels;s.visible&&h&&h.enabled&&(h.align==i.OUTSIDE?n.push(s):r.push(s))}this._calculateOutsideLabelBounds(n),this.options.radius||(r.length&&!n.length||!r.length&&!n.length)&&(this.chartInfo.radius=this.chartInfo.radius/d-f);var l=this.options.innerRadius,u=this.chartInfo.radius;if(l&&(l="string"==typeof l&&-1!=l.indexOf("%")?parseFloat(l)*u/100:parseFloat(l)),this.chartInfo.innerRadius=l,this.points.forEach(function(t){t.innerRadius=l}),t){var c=u-l,p=0;e.forEach(function(t){p=Math.max(p,Math.abs(t.getTargetValue()))});var g=c/p;(isNaN(g)||!isFinite(g))&&(g=0),e.forEach(function(t){t.outerRadius=l+g*Math.abs(t.getTargetValue())})}else e.forEach(function(t){t.outerRadius=u});this.calculateLeadLineStartPos(n),this.calculateInsideLabelBounds(r)},_calculateLabelPosWhenRadiusFixed:function(){for(var t=this.points.filter(function(t){return t.visible}),e=[],n=[],r=0,a=t.length;a>r;r++){var o=t[r],s=o.options.dataLabels;s&&s.enabled&&(s.align==i.OUTSIDE?e.push(o):n.push(o))}this._calculateLabelBoundsForFixed([this.chartInfo.centerX,this.chartInfo.centerY],this.chartInfo.radius,e),this.calculateLeadLineStartPos(e),this.calculateInsideLabelBounds(n)},_calculateOutsideLabelBounds:function(t){if(t.length){t.forEach(function(t){t.labelPos=null});var e=this.chartInfo,i=e.radius,n=[e.centerX,e.centerY];this.options.radius?this.calcOutsideLabel(t,this.bounds,n,i):this.chartInfo.radius=this.calcOutsideLabel(t,this.bounds,n)}},_calculateLabelBoundsForFixed:function(t,e,i){var n=this.chartInfo,e=n.radius,t=[n.centerX,n.centerY];this.calcOutsideLabel(i,this.bounds,t,e)},_calculateSeriesBounds:function(){for(var t=this.vanchart.seriesOfType(i.PIE_CHART),e=this.vanchart.bounds,n=0,r=0,a=t.length;a>r;r++)t[r].options.center&&t[r].options.radius&&n++;for(var o=e.width/Math.max(1,t.length-n),r=0,a=t.length;a>r;r++)if(t[r]==this&&!this.options.center)return{x:e.x+r*o,y:e.y,width:o,height:e.height}},_getTranslate:function(){return[this.chartInfo.centerX,this.chartInfo.centerY]},_getArcData:function(t){return n.hasDefined(t.startAngle)?{startAngle:t.startAngle,endAngle:t.endAngle,outerRadius:t.outerRadius}:void 0},_getMoreLabelDefaultCenter:function(t,e){var i=this.getCenterAngle(t),n=t.series.chartInfo.innerRadius+(t.outerRadius-t.series.chartInfo.innerRadius)/2,r=this._getArcPoint(n,i);return{centerX:r[0],centerY:r[1]}},effectAnimation:function(t){h.areaStyleEffectAnimation(t)},getDefaultEffectTime:function(){return h.AREA_STYLE_EFFECT_TIME},getHighLightStyle:function(t){return{fill:t.series.getFillFilter(t.mouseOverColor||t.color,t),"fill-opacity":t.opacity,stroke:t.borderColor||t.mouseOverColor||t.color,"stroke-width":t.options.borderWidth,"stroke-opacity":t.borderOpacity}},getPressedStyle:function(t){return{fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,stroke:t.borderColor||t.mouseOverColor||t.color,"stroke-width":t.options.borderWidth,"stroke-opacity":t.borderOpacity}},getAttrs:function(t){var e=l.arc().innerRadius(t.innerRadius);return{d:e(this._getArcData(t))}},getPointGraphicKey:function(){return"path"},_calculateAnimationDelay:function(){for(var t=0,e=0,i=0,n=this.points.length;n>i;i++){var r=this.points[i];r.visible&&r.series.visible&&t++,r.graphic&&e++}return e==t?0:1},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},getPointInitAnimationAttr:function(t){var e=t.series,i=l.arc().innerRadius(e.chartInfo.innerRadius);return{ease:g,duration:p,attrTween:{d:function(){var n={startAngle:e.startAngle,endAngle:e.startAngle,outerRadius:t.outerRadius};if(!e.initialAnimationMoving){var r=e.getPreVisiblePoint(t);if("first"!=r&&r.lastShape){var a=Math.abs(r.lastShape.endAngle-r.endAngle),o=t.startAngle+a;n={startAngle:o,endAngle:o,outerRadius:t.outerRadius}}}var s=u(n,e._getArcData(t));return this._current_=s(1),function(t){return i(s(t))}}}}},getPointUpdateAnimationAttr:function(t,e){var i=t.series,n=l.arc().innerRadius(i.chartInfo.innerRadius),r=g,a=p;return e||(r=m,a=v),{ease:r,duration:a,attrTween:{d:function(){var e=i._getArcData(t),r=this._current_||e,a=u(r,e);return this._current_=a(1),function(t){return n(a(t))}}}}},getPointDropAnimationAttr:function(t){var e=t.series,i=(e.options,e.startAngle),n=l.arc().innerRadius(e.chartInfo.innerRadius);return{ease:g,duration:p,attrTween:{d:function(){var r=this._current_,a=e.getPreVisiblePoint(t),o=i;if("first"!=a&&a.lastShape){var s=Math.abs(a.lastShape.endAngle-a.endAngle);o=t.startAngle+s}var h={startAngle:o,endAngle:o,outerRadius:r.outerRadius},l=u(r,h);return this._current_=l(1),function(t){return n(l(t))}}}}},getPreVisiblePoint:function(t){for(var e=t.series.points,i="first",n=0,r=e.length;r>n;n++){if(e[n]==t)return i;e[n].visible&&(i=e[n])}return i},getFillFilter:function(t,e){var a=this,o=a.vanchart.options;if(o.style==i.STYLE_GRADUAL&&n.isSupportSVG()){var a=this,s=a.vanchart,h=s.renderer,l={cx:"0%",cy:"0%",r:Math.max(e.outerRadius,0)+"px",gradientUnits:"userSpaceOnUse"},u={offset:e.innerRadius/Math.max(e.outerRadius,1)*100+"%","stop-color":r.getColorWithDivider(t,.8)},c={offset:"100%","stop-color":t};return e.colorGradient?h.updateColorGradient(e.colorGradient,l,[u,c]):e.colorGradient=h.colorGradient(l,[u,c],"radialGradient"),"url(#"+n.stamp(e.colorGradient)+")"}return t},_onPointMouseOver:function(t){this._onState(t,!0)},_onPointMouseOut:function(t){this._onState(t,!1)},_onState:function(t,e){var n=this,r=l.arc().innerRadius(t.innerRadius),a=e?n.getHighLightStyle(t):n.getStyle(t),o=t.outerRadius*d,s=t.outerRadius;e&&(o=t.outerRadius,s=t.outerRadius*d);var h=u(o,s),c={startAngle:t.startAngle,endAngle:t.endAngle};t.graphic.style(a).interrupt(i.SELECT_ANIMATION).transition(i.SELECT_ANIMATION).animate({ease:"elastic",duration:800,attrTween:{d:function(){return function(t){return r.outerRadius(h(t))(c)}}}})},_getPointGraphicGroup:function(){return this.pathGroup||(this.pathGroup=this.vanchart.renderer.group().addTo(this.group)),this.pathGroup},_getPointTextLabelGroup:function(){return this.textLabelGroup||(this.textLabelGroup=this.vanchart.renderer.vgroup().add(),this.group.append(this.textLabelGroup.renderG),this.textLabelGroup.divG.attr("transform",n.makeTranslate(this._getTranslate()))),this.textLabelGroup},isSeriesAccumulated:function(){return!0}});return _.include(o),t("../ChartLibrary").register(i.PIE_CHART,_),_}),define("chart/Line",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","./Series","../utils/Class","../utils/BezierEasing","../utils/ColorUtils","../dom/DomUtils","../EffectHelper","../utils/PathGenerator","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("./Series")),r=t("../utils/Class"),a=t("../utils/BezierEasing"),o=t("../utils/ColorUtils"),s=t("../dom/DomUtils"),h=t("../EffectHelper"),l=t("../utils/PathGenerator"),u=2,c=800,d=250,f=.65,p="quad-in-out",g=a.css.swing,m=function(t){var e=t.indexFromLeft/t.series.points.length;return c*(.5>e?Math.sqrt(e/2):1-Math.sqrt(2-2*e)/2)},v=n.extend({doLayout:function(){var t,e=this,i=e.vanchart,n=e.xAxis,r=e.yAxis,a=e.options.connectNulls,o=n.scale.rangeBand?n.scale.rangeBand()/2:0,s=i.isInverted(),h=s?"posY":"posX",u=r.getStartPosValue(),c=[];if(this.options.large){var d={},f={};e.points.forEach(function(e){t=e.options;var i=n.scale(n.getAxisValue(t.x,e))+o,a=r.scale(r.getAxisValue(t.y,e)+t.y0-u),h=r.scale(t.y0);isFinite(a)||(e.isNull=!0),s?(e.posX=a,e.posY=i,e.posX0=h):(e.posX=i,e.posY=a,e.posY0=h),d[e.posX]&&f[e.posY]||(d[e.posX]=!0,f[e.posY]=!0,c.push(e))},this)}else c=e.points;var p=!0,g=[];e.y0=Number.MAX_VALUE,e.y=-Number.MAX_VALUE,c.forEach(function(i,l){if(t=i.options,this.options.large)c=i.posX,d=i.posY;else{var c=n.scale(n.getAxisValue(t.x,i))+o,d=r.scale(r.getAxisValue(t.y,i)+t.y0-u),f=r.scale(t.y0);s?(i.posX=d,i.posY=c,i.posX0=f):(i.posX=c,i.posY=d,i.posY0=f)}i.indexFromLeft=l,(!a||a&&!i.isNull)&&(g.length>0&&(p=p&&g[g.length-1][h]<=(s?d:c)),g.push(i)),Math.abs(t.y0)<Math.abs(e.y0)&&(e.y0=Math.abs(t.y0)),Math.abs(t.y+t.y0)>e.y&&(e.y=Math.abs(t.y+t.y0))},this),p||(g.sort(function(t,e){return t[h]-e[h]}),g.forEach(function(t,e){t.indexFromLeft=e}));var m=l.line().interpolate(e.interpolate).x(function(t){return t.posX}).y(function(t){return t.posY}).defined(function(t){return!t.isNull}),v=l.area().interpolate(e.interpolate);v=s?v.y(function(t){return t.posY}).x0(function(t){var i=e._getPreviousStackingPoint(t);return i?i.posX:t.posX0}).x1(function(t){return t.posX}):v.x(function(t){return t.posX}).y0(function(t){var i=e._getPreviousStackingPoint(t);return i?i.posY:t.posY0}).y1(function(t){return t.posY}),v=v.defined(function(t){return!t.isNull}),this.linePath=m(g),this.areaPath=v(g),this.dataBands=this._calculateDataBands()},_getPreviousStackingPoint:function(t){if(i.hasDefined(t.series.stack))for(var e=t.points,n=0,r=e.length;r>n;n++){var a=e[n].series;if(a.stack==t.series.stack&&a.visible&&e[n+1]==t)return e[n]}},_calculateDataBands:function(){var t=this.vanchart.bounds,e=this,i=this.options.bands||[],n=e.color,r=e.opacity,a=e.fillColor,o=e.fillColorOpacity,s=e.yAxis,h=s.scale.domain(),l=s.isHorizontal(),u=t.width,c=t.height,d=[];if(d.push({clipBounds:{x:0,y:0,width:u,height:c},color:n,fillColor:a,fillColorOpacity:o}),!i||!i.length)return d;for(var f=0,p=i.length;p>f;f++){var g=Math.max(h[0],i[f].from),m=Math.min(h[1],i[f].to);g=s.scale(g),m=s.scale(m);var v={x:0,y:Math.min(g,m),width:u,height:Math.abs(g-m)};l&&(v={x:Math.min(g,m),y:0,width:Math.abs(g-m),height:c}),d.push({clipBounds:v,color:i[f].color||n,opacity:i[f].opacity||r,fillColor:i[f].fillColor||a,fillColorOpacity:i[f].fillColorOpacity||o})}return d},_getFixedPos:function(t){var e=t.options.marker.radius||4.5,i=this.vanchart.bounds,n=i.x+t.posX+e,r=i.y+t.posY+e;return[n,r]},_calculateLabelPos:function(t){var n=this,r=this.vanchart.isInverted(),a=(n.points.length,this.vanchart.bounds);n.points.forEach(function(o,s){var h=o.options.dataLabels;if(h&&h.enabled){var l,c,d,f=h.align==e.TOP,p=o.labelDim,g=u;if(!p)return;var m=o.options.marker;m&&m.symbol&&(g+=m.radius||4.5),r?(c=f?o.posX+g:o.posX-g-p.width,d=o.posY-p.height/2,0>=d?d=o.posY:d+p.height>=a.height&&(d=o.posY-p.height)):(c=o.posX-p.width/2,d=f?o.posY-g-p.height:o.posY+g,0>=c?c=o.posX:c+p.width>=a.width&&(c=o.posX-p.width)),l={x:c,y:d},h.autoAdjust&&(l=n._calculateAutoLabelPos(o,l,!r,t)),l&&(o.labelPos=l,t.addBounds(i.makeBounds(o.labelPos,o.labelDim)))}})},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},getAttrs:function(t){return{transform:i.makeTranslate([t.posX,t.posY])}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.options.marker.radius/2,centerY:t.posY-e.height/2-t.options.marker.radius/2}},effectAnimation:function(t){h.markerEffectAnimation(t)},getDefaultEffectTime:function(){return h.MARKER_EFFECT_TIME},getHighLightStyle:function(){},getDataToDraw:function(){return this.points.filter(function(t){return t.options.marker&&t.options.marker.symbol})},getTextDataToDraw:function(){return this.points},_updatePointGraphicStyle:function(t){this._updateMarker(t)},updatePointGraphic:function(t){this._updateMarkerPointGraphic(t)},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},onPointPress:function(){var t=this,e=t.series;e._onMarkerPressed(t)},onPointPressUp:function(){var t=this,e=t.series;e._updateMarker(t)},_onPointMouseOver:function(t){t.series._onMarkerMouseOver(t)},_onPointMouseOut:function(t){t.series._onMarkerMouseOut(t)},getPointInitAttr:function(t){return{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}},getPointInitAnimationAttr:function(t){return[{delay:m(t),ease:"ease-out-in",duration:150,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1.5)"}},{duration:150,ease:"ease-out-in",attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}]},getPointUpdateAnimationAttr:function(t){return{ease:g,duration:d,attr:{transform:"translate("+t.posX+","+t.posY+")"}}},getClosestPoint:function(t){var e,i=this.vanchart.isInverted(),n=i?"y":"x",r=i?"posY":"posX",a=Number.MAX_VALUE,o=this.vanchart.hoverSeries,s=this.vanchart.bounds,h=s[n]-(i?t.y:t.x);return o.points.forEach(function(t){var i=Math.abs(t[r]+h);a>i&&!t.isNull&&(e=t,a=i)}),e},_onSeriesMouseOver:function(t){n.prototype._onSeriesMouseOver.call(this,t),this.dataBandsGraphic.forEach(function(t){t._onSeriesMouseOver()}),i.toFront(this.group.node())},_onSeriesMouseOut:function(t){this.dataBandsGraphic.forEach(function(t){t._onSeriesMouseOut()}),this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null},drawPoints:function(){n.prototype.drawPoints.call(this);for(var t=this.dataBandsGraphic.length-1;t>=0;t--)this.dataBandsGraphic[t].toBack()},drawSeries:function(){var t,e,i=this,n=this.vanchart,r=(n.renderer,this.dataBands);for(this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null,this.dataBandsGraphic=this.dataBandsGraphic||[],t=r.length,e=this.dataBandsGraphic.length;e>t;t++)this.dataBandsGraphic[t].remove(),this.dataBandsGraphic[t]=null;for(t=0,e=r.length;e>t;t++)this.dataBandsGraphic[t]?this.dataBandsGraphic[t].refresh(r[t]):this.dataBandsGraphic[t]=new _(r[t],i);this.dataBandsGraphic.length=r.length}}),_=r.extend({initialize:function(t,e){this.series=e,this.refresh(t)},refresh:function(t){this.options=t,this.render()},render:function(){var t=this.options,n=this.series,r=n.group,a=n.vanchart,o=a.renderer,s=this._getLineStyle(n,t),h=this._getAreaStyle(n,t),l=i.isSupportSVG(),u=t.clipBounds,f=n.type==e.AREA_CHART,m=!this.linePath||this.linePath.removed();return this.clipRect?o.updateClip(this.clipRect,u):this.clipRect=o.createClip({x:u.x,y:u.y,width:u.width,height:u.height}),n.visible?(this.linePath=this.linePath||o.path().attr("d",n.linePath).addTo(r),this.linePath.style(s),this.linePath.isLineChart=!0,l&&o.clip(this.linePath,this.clipRect),f&&(this.areaPath=this.areaPath||o.path().attr("d",n.areaPath),this.areaPath.style(h).addTo(r),this.areaPath.isLineChart=!0,l&&o.clip(this.areaPath,this.clipRect)),void(m?(this.linePath.attr("d",n.linePath),this.areaPath&&this.areaPath.attr("d",n.areaPath),l&&this.clipRect.rect.attr(a.isInverted()?"height":"width",0).animate({ease:p,duration:c,attr:u})):(this.linePath.animate({ease:g,duration:d,attr:{d:n.linePath}}),this.areaPath&&this.areaPath.animate({ease:g,duration:d,attr:{d:n.areaPath}}),l&&this.clipRect.rect.animate({ease:g,duration:d,attr:u})))):(this.linePath&&this.linePath.remove(),this.areaPath&&this.areaPath.remove(),void(this.linePath=this.areaPath=null))},toBack:function(){s.toBack(this.linePath&&this.linePath.node()),s.toBack(this.areaPath&&this.areaPath.node())},_getAreaStyle:function(t,i){var n,r,a=t.vanchart.highlightTarget;return a?(n=i.fillColor,r=a==t.name?1:.3):(n=this._getFillFilter(i.fillColor,t),r=t.vanchart.options.style==e.STYLE_GRADUAL?1:i.fillColorOpacity),{fill:n,"fill-opacity":r}},_getLineStyle:function(t,e){var i=e.opacity,n=t.vanchart.highlightTarget;return n&&(i=n==t.name?1:.3),{fill:"none",stroke:e.color,"stroke-width":t.options.lineWidth,"stroke-opacity":i}},_getFillFilter:function(t,n){if(i.isSupportSVG()){var r=n.vanchart,a=r.renderer,o=n.vanchart.options;if(o.style==e.STYLE_GRADUAL){var s,h,l,u;s=h=l=u="0%";var c=Math.abs(n.y)/Math.abs(n.y-n.y0)||0;r.isInverted()===!0?(s=100*(1-c)+"%",l="100%"):h=100*c+"%";var d={x1:s,y1:h,x2:l,y2:u},f={offset:"0%","stop-color":t,"stop-opacity":0},p={offset:"100%","stop-color":t,"stop-opacity":.8};return this.colorGradient?a.updateColorGradient(this.colorGradient,d,[f,p]):this.colorGradient=a.colorGradient(d,[f,p]),"url(#"+i.stamp(this.colorGradient)+")"}}return t},_onSeriesMouseOver:function(){this.linePath.style({stroke:o.getHighLightColor(this.options.color),"stroke-width":this.series.options.lineWidth+1}),this.series.type==e.AREA_CHART&&this.areaPath.style({fill:o.getHighLightColor(this.options.fillColor),"fill-opacity":0===this.options.fillColorOpacity?0:f})},_onSeriesMouseOut:function(){this.linePath&&this.linePath.style(this._getLineStyle(this.series,this.options)),this.areaPath&&this.areaPath.style(this._getAreaStyle(this.series,this.options))},remove:function(){this.linePath&&this.linePath.remove(),this.areaPath&&this.areaPath.remove(),this.clipRect&&this.clipRect.remove(),this.linePath=this.areaPath=this.clipRect=null}});return t("../ChartLibrary").register(e.LINE_CHART,v),t("../ChartLibrary").register(e.AREA_CHART,v),v}),define("chart/Radar",["require","./Series","../utils/BaseUtils","../utils/QueryUtils","../utils/BoundsManager"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../utils/BoundsManager"),e.extend({refresh:function(t,i){return e.prototype.refresh.call(this,t,i),this.columnType=this.options.columnType,this.stack=this.columnType?"radar-column"+this.options.stack:this.options.stack,this},_getAxisTypes:function(){return["angleAxis","radiusAxis","polar"]},getBaseAxisType:function(){return"angleAxis"},_bindAxis:function(){var t=this,e=t.options,i=t.vanchart;t._getAxisTypes().forEach(function(n){if(i[n]){var r=i[n](e.polar);r&&(r.series.push(t),t[n]=r)}})},_getDefaultFillColorOpacity:function(){return this.options.columnType?1:.15},_getTranslate:function(){return this.getCenter()},getCenter:function(){return this.polar&&this.polar.center},getRadius:function(){return this.polar&&this.polar.radius},doLayout:function(){var t=this,e=t.polar,i=e.radiusAxis,n=e.angleAxis,r=(this.getCenter(),this.getRadius(),n.piece),a=i.scale,o=n.scale,s=i.indicator,h=function(t){return isNaN(a(t))?0:a(t)};t.points.sort(function(t,e){return o(t.category)-o(e.category)});var l;t.points.forEach(function(e){l=e.options;var n=e.category,a=l.y0,u=e.value+l.y0;e.innerRadius=s?t._cateValueScale(n,a):h(a),e.outerRadius=s?t._cateValueScale(n,u):h(u),e.animateInitRadius=i.getStartPos(),e.radian=o(e.category)*r;var c=t._getArcPoint(e.outerRadius,e.radian);e.posX=c[0],e.posY=c[1],this._calcLabelPos(e)},this),t.pathSegment=t._getPathSegment(t.points,t.options.connectNulls)},_calculateLabelPos:function(){},getTargetKey:function(){return"y"},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},_getPathSegment:function(t,e){var i=this,n=i.polar,r=n.angleAxis,a=r.scale;t=[].concat(t),t.sort(function(t,e){return a(t.category)-a(e.category)});var o=[],s=[];if(e)o.push(s),t.forEach(function(t){t.isNull||s.push([t.posX,t.posY])});else{for(var h=0,l=t.length,u=l-1;u>0;u--){var c=t[u],d=t[u-1];!c.isNull&&d.isNull&&(h=u)}for(var u=0;l>u;u++){var f=t[(u+h)%l];f.isNull&&s.length?(s.length>1&&o.push(s),s=[]):f.isNull||s.push([f.posX,f.posY])}s.length&&o.push(s)}return o},_getRadarSeriesPath:function(t,e,n){var r="",a=[];if(1===t.length){a=t[0];var o=a.length==this.angleAxis.getCategoryCount()||e;n=!o&&n,r=n?"M0,0":"";for(var s=0,h=a.length;h>s;s++){var l=s||n?"L":"M";r+=l+i.dealFloatPrecision(a[s][0])+","+i.dealFloatPrecision(a[s][1])}r+=o||n?"Z":""}else t.forEach(function(t){r+=n?"M0,0":"",t.forEach(function(t,e){r+=(e||n?"L":"M")+i.dealFloatPrecision(t[0])+","+i.dealFloatPrecision(t[1])}),r+=n?"Z":""});return r},_getInitPathSegment:function(t){var e=[];return t.forEach(function(t){var i=[];e.push(i),t.forEach(function(){i.push([0,0])})}),e},_cateValueScale:function(t,e){var i,n=this,r=n.radiusAxis,a=r._cateScale;return r._cateDomain.forEach(function(e){e.name===t&&(i=e.domain)}),a.domain(i),isNaN(a(e))?0:a(e)}}));return n}),define("chart/LineRadar",["require","../utils/BaseUtils","../dom/DomUtils","../EffectHelper","../utils/Interpolator","../Constants","./Radar","../ChartLibrary"],function(t){var e=t("../utils/BaseUtils"),i=t("../dom/DomUtils"),n=t("../EffectHelper"),r=t("../utils/Interpolator"),a=t("../Constants"),o=t("./Radar"),s=500,h="back-out",l=500,u="exp-out",c="radar-top",d="radar-bottom",f="radar-left",p="radar-right",g=8,m=o.extend({columnType:!1,_calcLabelPos:function(t){if(t.labelDim){var e=this.polar.angleAxis._getPolarPosition(t.category),i=this._getArcPoint(t.outerRadius+g,t.radian),n=t.labelDim;switch(e){case c:t.labelPos={x:-n.width/2,y:i[1]-n.height};break;case p:t.labelPos={x:i[0],y:i[1]-n.height/2};break;case d:t.labelPos={x:-n.width/2,y:i[1]};break;case f:t.labelPos={x:i[0]-n.width,y:i[1]-n.height/2}}}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.options.marker.radius/2,centerY:t.posY-e.height/2-t.options.marker.radius/2}},drawPoints:function(){o.prototype.drawPoints.call(this),i.toBack(this.radarPath&&this.radarPath.node())},drawSeries:function(){this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null;var t=this,e=t.vanchart,i=e.renderer,n=t.fillColor&&t.fillColorOpacity,a=this._getRadarPathStyle();t.visible?(this.radarPath=this.radarPath||i.path().addTo(t.group),this.radarPath.style(a),this.radarPath.animate({duration:s,ease:h,attrTween:{d:function(){var e=!!this._pathSegment_;if(e&&this._pathSegment_.length==t.pathSegment.length)for(var i=this._pathSegment_,a=0,o=i.length;o>a&&e;a++)i[a].length!=t.pathSegment[a].length&&(e=!1);var s=e?this._pathSegment_:t._getInitPathSegment(t.pathSegment),h=r.interpolateArray(s,t.pathSegment);return this._pathSegment_=t.pathSegment,function(e){return t._getRadarSeriesPath(h(e),t.options.connectNulls,n)}}}})):(this.radarPath&&this.radarPath.animate({duration:l,ease:u,attrTween:{d:function(){var e=t._getInitPathSegment(t.pathSegment),i=r.interpolateArray(t.pathSegment,e);return function(e){return t._getRadarSeriesPath(i(e),t.options.connectNulls,n)}}}}).remove(),this.radarPath=null)},_getRadarPathStyle:function(){var t=this,e=t.fillColor&&t.fillColorOpacity,i=t.fillColorOpacity,n=t.opacity,r=t.vanchart.highlightTarget;return r&&(i=r==t.name?1:.3,n=r==t.name?1:.3),{fill:e?t.fillColor:"none","fill-opacity":i,stroke:t.color,"stroke-width":t.options.lineWidth,"stroke-opacity":n}},getStyle:function(){return{}},effectAnimation:function(t){n.markerEffectAnimation(t)},getDefaultEffectTime:function(){return n.MARKER_EFFECT_TIME},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},_updatePointGraphicStyle:function(t){this._updateMarker(t)},getDataToDraw:function(){return this.points.filter(function(t){return t.options.marker&&t.options.marker.symbol})},getTextDataToDraw:function(){return this.points},onPointPress:function(){var t=this,e=t.series;e._onMarkerPressed(t)},onPointPressUp:function(){var t=this,e=t.series;e._updateMarker(t)},_calculateLabelPos:function(){},_getFixedPos:function(t){var e,i,n=isNaN(t.options.marker.radius)?4.5:t.options.marker.radius,r=this.getCenter();return e=r[0]+t.posX+n,i=r[1]+t.posY+n,[e,i]},_onSeriesMouseOver:function(t){o.prototype._onSeriesMouseOver.call(this,t);var i=this;i.radarPath&&i.radarPath.style({"stroke-width":i.options.lineWidth+1}),e.toFront(i.group.node())},_onSeriesMouseOut:function(){var t=this;this.defaultMarker&&this.defaultMarker.remove(),this.defaultMarker=null,t.radarPath&&t.radarPath.style(t._getRadarPathStyle())},_onPointMouseOver:function(t){t.series._onMarkerMouseOver(t)},_onPointMouseOut:function(t){t.series._onMarkerMouseOut(t)},getPointInitAttr:function(){return{transform:"translate(0, 0) scale(0.01)"}},getPointInitAnimationAttr:function(t){return{duration:s,ease:h,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){return{ease:h,duration:s,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},updatePointGraphic:function(t){this._updateMarkerPointGraphic(t)},getClosestPoint:function(t){var e,i=this.getCenter(),n=Number.MAX_VALUE;return this.points.forEach(function(r){var a=r.posX+i[0]-t.x,o=r.posY+i[1]-t.y,s=Math.sqrt(a*a+o*o);n>s&&!r.isNull&&(e=r,n=s)}),e}});return t("../ChartLibrary").register(a.LINE_RADAR,m),m}),define("chart/ColumnRadar",["require","../EffectHelper","../utils/Interpolator","../utils/PathGenerator","../Constants","./Radar","../ChartLibrary"],function(t){var e=t("../EffectHelper"),i=t("../utils/Interpolator"),n=t("../utils/PathGenerator"),r=t("../Constants"),a=t("./Radar"),o=500,s="back-out",h=500,l="exp-out",u=6,c=.35,d="radar-top",f="radar-bottom",p="radar-left",g="radar-right",m=8,v=a.extend({columnType:!0,_calcLabelPos:function(t){if(t.labelDim){var e=this.polar.angleAxis._getPolarPosition(t.category),i=this._getArcPoint(t.outerRadius-m,t.radian),n=t.labelDim;switch(e){case d:t.labelPos={x:-n.width/2,y:i[1]};break;case g:t.labelPos={x:i[0]-n.width,y:i[1]-n.height/2};break;case f:t.labelPos={x:-n.width/2,y:i[1]-n.height};break;case p:t.labelPos={x:i[0],y:i[1]-n.height/2}}}},_getMoreLabelDefaultCenter:function(t){var e=this._getArcPoint(t.outerRadius/2,t.radian);return{centerX:e[0],centerY:e[1]}},effectAnimation:function(t){e.areaStyleEffectAnimation(t)},getDefaultEffectTime:function(){return e.AREA_STYLE_EFFECT_TIME},getStyle:function(t){return{fill:t.color,"fill-opacity":t.opacity,stroke:t.borderColor,"stroke-width":t.options.borderWidth,"stroke-opacity":1}},getHighLightStyle:function(t){return{stroke:t.mouseOverColor||t.color,fill:t.color,"fill-opacity":1,"stroke-width":u,"stroke-opacity":c}},getPressedStyle:function(t){return{fill:t.clickColor,"fill-opacity":t.clickOpacity}},getPointGraphicKey:function(){return"path"},_getRadarColumnPath:function(t,e,i){var r=.375*this.polar.angleAxis.piece,a=i-r,o=i+r,s=n.arc().innerRadius(t).outerRadius(e).startAngle(a).endAngle(o);return s()},getPointInitAnimationAttr:function(t){var e=this;return{ease:s,duration:o,attrTween:{d:function(){this._innerRadius_=t.innerRadius,this._outerRadius_=t.outerRadius;var n=i(t.animateInitRadius,t.innerRadius),r=i(t.animateInitRadius,t.outerRadius);return function(i){return e._getRadarColumnPath(n(i),r(i),t.radian)}}}}},getPointUpdateAnimationAttr:function(t){var e=this;return{ease:l,duration:h,attrTween:{d:function(){var n=i(this._innerRadius_,t.innerRadius),r=i(this._outerRadius_,t.outerRadius);return this._innerRadius_=t.innerRadius,this._outerRadius_=t.outerRadius,function(i){return e._getRadarColumnPath(n(i),r(i),t.radian)}}}}},getPointDropAnimationAttr:function(t){var e=this;return{ease:l,duration:h,attrTween:{d:function(){var n=i(t.outerRadius,t.innerRadius);return function(i){return e._getRadarColumnPath(t.innerRadius,n(i),t.radian)}}}}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.animate({duration:100,ease:"ease-out-in",style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.animate({duration:100,ease:"ease-out-in",style:i})},_getFixedPos:function(t,e){var i=t.radian,n=this.getCenter(),r=t.posX+n[0],a=t.posY+n[1];return i<Math.PI/2?a-=e.height:i>=Math.PI&&i<3*Math.PI/2?r-=e.width:i>=3*Math.PI/2&&i<2*Math.PI&&(a-=e.height,r-=e.width),[r,a]}});return t("../ChartLibrary").register(r.COLUMN_RADAR,v),v}),define("chart/Bubble",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../ComponentLibrary","../EffectHelper","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../ComponentLibrary"),t("../EffectHelper")),a=500,o=500,s=300,h=300,l=e.extend({doLayout:function(){this._calculateBubblePosition()},useCanvas:function(){return this.options.large},getTargetKey:function(){return"size"},isNullValue:function(t){var e=t.options;return this.vanchart.isMap()?"-"==e.size||i.hasNotDefined(e.size):"-"==e.x||"-"==e.y||"-"==e.size||i.hasNotDefined(e.size)},_getPointKey:function(t){var e=t.options||t;return this.vanchart.isMap()?t.name:""+e.x+e.y},_calculateLabelPos:function(){},_calculateMinMax4Radius:function(){for(var t=this,e=t.points,i=Number.MAX_VALUE,n=-Number.MAX_VALUE,r=0,a=e.length;a>r;r++){var o=e[r],s=o.getTargetValue();o.visible&&!o.isNull&&(0>s&&!o.options.displayNegative||o.options.minSize||o.options.maxSize||(n=Math.max(n,isNaN(s)?0:Math.abs(s)),i=Math.min(i,isNaN(s)?0:Math.abs(s))))}t.seriesAbsMinValue=i,t.seriesAbsMaxValue=n},_calculateBubbleRadius:function(){var t=this,e=t.options,r=Math.max(t.maxSize,t.minSize),a=Math.min(t.minSize,t.maxSize),o=e.sizeBy==n.SIZE_BY_AREA,s=this.seriesAbsMaxValue,h=this.seriesAbsMinValue;if(!this._sizeByCurrentSeries()){var l=this._calculateChartMinMax();s=i.pick(l.max,l[1]),h=i.pick(l.min,l[0])}var u=s-h,c=o?(r*r-a*a)/u:(r-a)/u;c=isFinite(c)?c:0;var d=i.pick(this.vanchart.scale,1),f=this.getTargetKey();this.points.forEach(function(t){var e=c*(Math.abs(t.value)-h),i=o?Math.sqrt(a*a+e):a+e;if(t.options.minSize||t.options.maxSize){var n=isNaN(t.options.minSize)?t.options.maxSize:t.options.minSize;i=o?2*Math.sqrt(n):n}i=t[f]<0&&!t.options.displayNegative?0:i,t.radius=i/2*d})},_sizeByCurrentSeries:function(){return i.hasDefined(this.options.minSize)&&i.hasDefined(this.options.maxSize)},_calculateChartMinMax:function(){var t=this.vanchart.seriesOfType(this.type),e=Number.MAX_VALUE,i=-e;return t.forEach(function(t){t._sizeByCurrentSeries()||(e=Math.min(e,t.seriesAbsMinValue),i=Math.max(i,t.seriesAbsMaxValue))}),{min:e,max:i}},_calculateBubblePosition:function(){var t=this.vanchart.isInverted(),e=this.xAxis,i=this.yAxis;this.points.forEach(function(n){var r=n.options,a=e.scale.rangeBand?e.scale.rangeBand()/2:0,o=e.scale(e.getAxisValue(r.x))+a,s=i.scale(i.getAxisValue(r.y));n.posX=t?s:o,n.posY=t?o:s;var h=n.labelDim&&!n.isNull&&!(n.getTargetValue()<0&&!r.displayNegative);h&&r.dataLabels&&r.dataLabels.enabled&&(n.labelPos={x:n.posX-n.labelDim.width/2,y:n.posY-n.labelDim.height/2})})},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},_getFixedPos:function(t){var e,i=this.vanchart,n=i.bounds,r=t.radius||0;if(i.isMap()){var a=t.getLatLng();if(!a)return;e=i.latLngToContainerPoint(a)}else e={x:n.x+t.posX,y:n.y+t.posY};return r=(r+1)/1.414,[e.x+r,e.y+r]},_getMoreLabelDefaultCenter:function(t){return{centerX:t.posX,centerY:t.posY}},getPointGraphicKey:function(){return"circle"},effectAnimation:function(t){r.bubbleEffectAnimation(t,this.vanchart.isMap())},getDefaultEffectTime:function(){return r.MARKER_EFFECT_TIME},getPointInitAttr:function(t){return{transform:i.makeTranslate([t.posX,t.posY]),r:0}},getPointInitAnimationAttr:function(t){return{delay:t.delayTime||0,ease:"bounce",duration:this.state==n.STATE_TO_SHOW?h:a,attr:{r:t.radius}}},getPointUpdateAnimationAttr:function(t){return{ease:"back-out",duration:o,attr:{r:t.radius,transform:i.makeTranslate({x:t.posX,y:t.posY})}}},getPointDropAnimationAttr:function(){return{ease:"back-in",duration:s,attr:{r:0}}},_getShadowFilter:function(){var t=this,e=t.vanchart,n=e.renderer;return e.bubbleShadowFilter=e.bubbleShadowFilter||n.createDropShadowFilter(0,0,.2,2),"url(#"+i.stamp(e.bubbleShadowFilter)+")"},getStyle:function(t){var e=t.series,n={stroke:t.color,"stroke-opacity":1,"stroke-width":0,fill:t.color,"fill-opacity":t.opacity};return t.options.shadow&&!i.isMS&&(n.filter=e._getShadowFilter()),n},getHighLightStyle:function(t){return{stroke:t.mouseOverColor,"stroke-opacity":.35,"stroke-width":6,fill:t.mouseOverColor,"fill-opacity":1}},getPressedStyle:function(t){return{stroke:t.mouseOverColor,"stroke-opacity":.35,"stroke-width":6,fill:t.clickColor,"fill-opacity":t.clickOpacity}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);e.vanchart.isLargeMode()||t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({ease:"back-out",duration:200,style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);e.vanchart.isLargeMode()||t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({
ease:"back-out",duration:0,style:i})}});return t("../ChartLibrary").register(n.BUBBLE_CHART,l),l}),define("chart/Scatter",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../ComponentLibrary","../EffectHelper","../utils/PathGenerator","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../ComponentLibrary"),t("../EffectHelper")),a=t("../utils/PathGenerator"),o=300,s=500,h=2,l=e.extend({doLayout:function(){var t=this.vanchart.isInverted(),e=this.xAxis,i=this.yAxis;this.points.forEach(function(n){var r=e.scale.rangeBand?e.scale.rangeBand()/2:0,a=e.scale(e.getAxisValue(n.options.x))+r,o=i.scale(i.getAxisValue(n.options.y));n.posX=t?o:a,n.posY=t?a:o,n.labelDim&&(n.labelPos={x:n.posX-n.labelDim.width/2,y:n.posY-n.options.marker.radius-h-n.labelDim.height})});var n=this,r=a.line().interpolate(n.interpolate).x(function(t){return t.posX}).y(function(t){return t.posY}).defined(function(t){return!t.isNull});this.points.sort(function(t,e){return t.posX-e.posX}),this.linePath=r(this.points)},useCanvas:function(){return this.options.large},getTargetKey:function(){return"size"},isNullValue:function(t){var e=t.options;return this.vanchart.isMap()?"-"==e.size||i.hasNotDefined(e.size):"-"==e.x||"-"==e.y||i.hasNotDefined(e.y)},_calculateLabelPos:function(t){},getTrendLineXYValues:function(t){return this._getNormalTrendLineXYValues(t)},_getFixedPos:function(t){var e,i=this.vanchart,n=i.bounds,r=t.options.marker&&t.options.marker.radius||0;if("vanChartMap"==i.vanChartType){var a=t.getLatLng();if(!a)return;e=i.latLngToContainerPoint(a)}else e={x:n.x+t.posX,y:n.y+t.posY};return r=(r+1)/1.414,[e.x+r,e.y+r]},_animateEnd:function(){this._showLabels(),this._drawEffectPoints();var t=this,e=t.vanchart,n=e.renderer;t.group||(t.group=t._createGroup(n,e).attr("transform",i.makeTranslate(t._getTranslate())).attr("class",t.className+" "+t.type)),t.lineGraphic=t.lineGraphic||n.path({d:t.linePath}).addTo(t.group).style({fill:"none","pointer-events":"none","stroke-width":t.options.lineWidth,stroke:t.color})},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.options.marker.radius/2,centerY:t.posY-e.height/2-t.options.marker.radius/2}},effectAnimation:function(t){r.markerEffectAnimation(t,this.vanchart.isMap())},getDefaultEffectTime:function(){return r.MARKER_EFFECT_TIME},_getPointKey:function(t){var e=t.options||t;return this.vanchart.isMap()?t.name:""+e.x+e.y},getAttrs:function(t){return{transform:i.makeTranslate({x:t.posX,y:t.posY})}},_updatePointGraphicStyle:function(t){this._updateMarker(t)},_createPointGraphic:function(t){return t.graphic=this._createMarker(t.options.marker)},getPointInitAttr:function(t){return{transform:"translate("+t.posX+","+t.posY+") scale(0.01)"}},getPointInitAnimationAttr:function(t){return{delay:t.delayTime,ease:"back-out",duration:o,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){return{ease:"back-out",duration:s,attr:{transform:"translate("+t.posX+","+t.posY+") scale(1)"}}},getPointDropAnimationAttr:function(t){return{ease:"back-in",duration:o,attr:{transform:"translate("+t.posX+","+t.posY+") scale(0)"}}},drawSeries:function(){var t=this;t.visible&&t.lineGraphic&&t.lineGraphic.animate({duration:s,ease:"back-out",d:t.linePath}),t.visible||t.lineGraphic&&t.lineGraphic.remove()},getStyle:function(t){var e=t.options.marker,i=this._isHollowMarker(e.symbol);return i?{fill:"none",stroke:e.fillColor,"stroke-opacity":e.fillColorOpacity,"stroke-width":2}:{fill:e.fillColor,"fill-opacity":e.fillColorOpacity,stroke:"none"}},_onPointMouseOver:function(t){var e=t.series;e.vanchart.isLargeMode()||e._onMarkerMouseOver(t)},_onPointMouseOut:function(t){var e=t.series;e.vanchart.isLargeMode()||e._onMarkerMouseOut(t)}});return t("../ChartLibrary").register(n.SCATTER_CHART,l),l}),define("chart/Gauge",["require","../Constants","../utils/BaseUtils","./Series","../utils/QueryUtils","../utils/BoundsManager","../utils/ColorUtils","../component/FormattedText"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("./Series"),r=(t("../utils/QueryUtils"),t("../utils/BoundsManager"),t("../utils/ColorUtils")),a=t("../component/FormattedText"),o=n.extend({DEFAULT_PADDING:5,LINE_GAP:.3,VERTICAL_GAP:.3,HORIZONTAL_GAP:.8,ANIMATION_TIME:1e3,EASE_TYPE:"quad-out",refresh:function(t,e){return n.prototype.refresh.call(this,t,e),t=this.options,this.gaugeType=t.style,this.center=null,t.center&&(this.center=[this._getPercentValue(t.center[0],this.vanchart.width),this._getPercentValue(t.center[1],this.vanchart.height)]),i.convertToREMUseDefault16PX(t.seriesLabel&&t.seriesLabel.style),i.convertToREMUseDefault16PX(t.valueLabel&&t.valueLabel.style),i.convertToREMUseDefault16PX(t.percentageLabel&&t.percentageLabel.style),this},doLayout:function(){var t=this._calculateGaugeBounds(),e=this,i=e.options;if(!t&&!i.radius&&!e.center)throw new Error("gauge has no bounds");this.bounds=t,this._calculatePercentage(),e.defaultBands=(i.bands||[]).concat(e._getDefaultBands(e.gaugeAxis.scale.domain())),e.points.forEach(function(t){var i=e._getColorFromBands(t.getTargetValue(),e.defaultBands);i&&(i=r.getStandardColorAndOpacity(i),t.color=i.hex,t.opacity=i.alpha),t.mouseOverColor=r.getHighLightColor(t.color),t.clickColor=r.getClickColor(t.color)}),this._doLayout()},_doLayout:function(){this._dealPercentLabel(),this._dealValueLabel(),this._fixCenterAndRadius()},calculateLabelInfo:function(t){},_createGroup:function(t,e){return t.group().addTo(e.seriesGroup)},_getAxisTypes:function(){return["gaugeAxis"]},getDataToDraw:function(){return[]},_calculatePercentage:function(){if(this.points.length){var t=this.gaugeAxis,e=t.scale.domain(),i=this.points;i.forEach(function(t){t.points=i,t.percentage=(t.value-e[0])/(e[1]-e[0])})}},_calculateLabelPos:function(){},_getTranslate:function(){return[Math.round(this.centerX),Math.round(this.centerY)]},_validPoint:function(){var t=this.points.filter(function(t){return!t.isNull});return t[0]||this.points[0]},_dealSeriesLabel:function(){var t=this,e=t.options;if(t.seriesLabelContent="",t.seriesLabelDim={width:0,height:0},e.seriesLabel&&e.seriesLabel.enabled){var i=e.seriesLabel.style,n=t._validPoint();a.dataLabelGenerator(n,e.seriesLabel);var r=n.labelContent,o=n.labelDim;t.seriesLabelContent=r&&r[0]?r[0].text:"",t.seriesLabelStyle=i,t.seriesLabelDim=o}},_dealPercentLabel:function(){var t=this,e=t.options,n=e.percentageLabel;t.percentageLabelContent="",t.percentageLabelDim={width:0,height:0};var r=t.points[0];if(r&&!r.isNull&&n&&n.enabled){var o=i.clone(n.style);o.color||(o.color=r.color),a.dataLabelGenerator(r,n);var s=r.labelContent,h=r.labelDim;t.percentageLabelContent=s&&s[0]?s[0].text:"",t.percentageLabelStyle=o,t.percentageLabelDim=h}},_dealValueLabel:function(){var t=this,e=t.options,n=e.valueLabel,r=n.style,o=n.useHtml,s=n.formatter;if(t.valueLabelContent="",t.valueLabelDim={width:0,height:0},n&&n.enabled){for(var h=[],l=0,u=t.points.length;u>l;l++){var c=t.points[l];if(!c.isNull){var d=a.calculateSingleLineLabelContent(s,c),f=i.getTextDimension(d,r,o);h.push({labelContent:d,labelDim:f,labelStyle:r})}}t.valueLabelContent=h}},_getDefaultBands:function(t){var e=this.options.color,n=[];if(e)n.push({from:t[0],to:t[1],color:e});else{var r=t[0],a=t[1],o=i.accDiv(a-r,3),s=i.accAdd(r,o),h=i.accAdd(s,o),l=this.vanchart.options.colors;n=[{from:r,to:s,color:l[0]},{from:s,to:h,color:l[1]},{from:h,to:a,color:l[2]}]}return n},_getColorFromBands:function(t,e){if(e&&e.length)for(var i=0,n=e.length;n>i;i++){var r=e[i],a=Math.min(r.from,r.to),o=Math.max(r.from,r.to);if(t>=a&&o>=t)return r.color}},_calculateGaugeBounds:function(){for(var t=this.vanchart.seriesOfType(e.GAUGE_CHART),i=this.vanchart.bounds,n=0,r=0,a=t.length;a>r;r++)t[r].center&&t[r].options.radius&&n++;for(var o=this.options.layout==e.HORIZONTAL_LAYOUT,s=o?"width":"height",h=i[s]/Math.max(1,t.length-n),r=0,a=t.length;a>r;r++)if(t[r]==this&&!this.center)return o?{x:i.x+r*h,y:i.y,width:h,height:i.height}:{x:i.x,y:i.y+r*h,width:i.width,height:h};return{x:0,y:0,width:0,height:0}},_getFixedPos:function(t,e){var i,n,r=t.series,a=r.style;return"pointer_semi"==a?(i=r.centerX-e.width/2,n=r.centerY+.14*r.radius+10):(i=r.centerX+r.radius+10,n=r.centerY-e.height/2),[i,n]},_animateEnd:function(){},_getPointTextLabelGroup:function(){if(!this.textGraphicGroup){var t=this.vanchart,e=(t.seriesTextRenderGroup,t.seriesTextDivGroup);this.textGraphicGroup=t.renderer.vgroup(),this.textGraphicGroup.renderG.addTo(this.group),e.append(this.textGraphicGroup.divG)}return this.textGraphicGroup.divG.attr("transform",i.makeTranslate(this._getTranslate())),this.textGraphicGroup},_drawGaugeLabels:function(t){var e=this,i=e.vanchart;e._removeNormalLabels(t);var n=0;i._needShowMoreLabel()&&e.visible&&(e._drawDiffMoreLabels(),n=1e3),i.setTimeout(e.className+"more_label_animate",function(){i._removeChangeDataState(e),e._clearMoreLabels(),e._drawNormalLabels(t)},n)},_drawDiffMoreLabels:function(){var t=this.points[0];t&&!t.isNull&&this._showAndExitMoreLabel(t,0,0)},_removeNormalLabels:function(t){for(var e=t.labels||[],i=0,n=e.length;n>i;i++)e[i]&&e[i].remove(),e[i]=null},_drawNormalLabels:function(t){var e=this,n=e.options,a=e.vanchart,o=a.renderer;if(t.labels=[],e.seriesLabelContent&&e._drawLabel(t,e.seriesLabelContent,e.seriesLabelPos,e.seriesLabelDim,e.seriesLabelStyle,n.seriesLabel.useHtml),e.percentageLabelContent&&e._drawLabel(t,e.percentageLabelContent,e.percentageLabelPos,e.percentageLabelDim,e.percentageLabelStyle,n.percentageLabel.useHtml),e.valueLabelContent&&e.valueLabelContent.length){if(e.valueLabelBackground){var s=i.rectSubPixelOpt(e.valueLabelBackground,0);s.rx=s.rx=.02*e.radius;var h=e.options.valueLabel;t.labels.push(t.append(o.rect(s).style({fill:h.backgroundColor,"fill-opacity":r.getColorOpacity(h.backgroundColor),filter:"url(#"+i.stamp(e.innerFilter)+")"})))}for(var l=0,u=e.valueLabelContent.length;u>l;l++){var h=e.valueLabelContent[l];e._drawLabel(t,h.labelContent,h.labelPos,h.labelDim,h.labelStyle,n.valueLabel.useHtml)}}},_drawLabel:function(t,e,n,r,a,o){if(n){var s=this,h=s.vanchart,l=h.renderer,u=i.getTextHeight(a);t.labels.push(t.append(l.vtext(o).attr({x:n.x,y:n.y,dy:.85*u}).textContent(e).style(a)))}},_onSinglePointerTap:function(t){this.points&&1===this.points.length&&this.points[0].onClick(t.srcEvent)},_onSeriesMouseOver:function(t){this.points&&1===this.points.length&&this.vanchart.showTooltip(this.points[0],t)},_onSeriesMouseOut:function(){this.vanchart.hideTooltip()},getClosestPoint:function(){return 1===this.points.length?this.points[0]:null},_getStroke:function(t){return i.isSupportSVG()?"url(#"+i.stamp(t)+")":t},getEvents:function(){return{mousemove:this._onSeriesMouseOver,mouseout:this._onSeriesMouseOut,tap:this._onSinglePointerTap,press:this.onSeriesPress,pressup:this.onSeriesPressUp}},isSupportLegendHighlight:function(){return!1},isSeriesAccumulated:function(){return!0}});return o}),define("chart/PointerGauge",["require","../Constants","../utils/BaseUtils","../utils/ColorUtils","../utils/BoundsManager","../utils/PathGenerator","../utils/Interpolator","../utils/Scale","./Gauge","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../utils/ColorUtils"),r=t("../utils/BoundsManager"),a=t("../utils/PathGenerator"),o=t("../utils/Interpolator"),s=t("../utils/Scale"),h=t("./Gauge"),l=150,u=90,c=h.extend({gaugeType:e.POINTER_GAUGE,_doLayout:function(){this._dealSeriesLabel(),this._dealValueLabel(),"pointer"==this.options.style?this._fixPointerCenter():this._fixPointerSemiCenter()},_drawDiffMoreLabels:function(){var t=this,e=t.points,n=i.getTextHeight(t._getMoreLabelStyle()),r=n*e.length+n/2*(e.length-1),a=Math.max(0,(t.radius-r)/2),o="pointer"==t.options.style?a:-t.radius+a;e.forEach(function(e){t._showAndExitMoreLabel(e,0,o+n/2),o+=n+n/2})},getDataToDraw:function(){return this.points},_fixPointerCenter:function(){var t=this,i=t.options,n=i.radius,r=t.center,a=i.seriesLabel.align||e.BOTTOM;if(r)t.centerX=r[0],t.centerY=r[1],t.radius=n;else{var o=t.bounds,s=20+t.seriesLabelDim.height,h=o.height-s,l=o.x+o.width/2,u=o.y+o.height/2;if(n=n||Math.min(o.width,h)/2-t.DEFAULT_PADDING,a==e.BOTTOM){if(u+n+s>o.y+o.height){var c=o.height-(2*n+s);c>=0&&(u=o.y+n+c/2)}}else if(u-n-s<o.y){var c=o.height-(2*n+s);c>=0&&(u=o.y+n+s+c/2)}t.centerX=l,t.centerY=u,t.radius=n}if(t.seriesLabelContent){var d=t.seriesLabelDim;t.seriesLabelPos={x:-d.width/2,y:a==e.BOTTOM?n+20:-n-20-d.height}}t.valueLabelContent&&this._dealValueLabelContent(t,n)},_fixPointerSemiCenter:function(){var t=this,i=t.options,n=i.radius,r=i.seriesLabel.align;if(t.center)t.centerX=t.center[0],t.centerY=t.center[1],t.radius=n;else{var a=t.bounds,o=20+t.seriesLabelDim.height,s=a.height-o;n=n||Math.min(a.width/2,s/1.14)-t.DEFAULT_PADDING;var h=a.x+a.width/2,l=a.y+a.height/2+n/2;if(r==e.BOTTOM){if(l+.14*n+o>a.y+a.height){var u=a.height-(1.14*n+o);u>=0&&(l=a.y+n+u/2)}}else if(l-n-o<a.y){var u=a.height-(1.14*n+o);u>=0&&(l=a.y+n+o+u/2)}t.centerX=h,t.centerY=l,t.radius=n}if(t.seriesLabelContent){var c=t.seriesLabelDim;t.seriesLabelPos={x:-c.width/2,y:r==e.BOTTOM?.14*n+20:-n-20-c.height}}t.valueLabelContent&&this._dealSemiValueLabelContent(t,n)},_dealValueLabelContent:function(t,e){for(var n=t.options,r=t.gaugeAxis,a=r.options,o=r.scale.domain(),h=s.linear().domain(o).range([i.toRadian(-150),i.toRadian(150)]),l=i.getTextHeight(a.labelStyle),u=.16*e+l/2,c=n.valueLabel.style,d=n.valueLabel.useHtml,f=i.getTextHeight(c),p=this._getPointerTickBoundsManager(r,e,h,l),g=p.heightBoundsManager,m=p.widthBoundsManager,v=0,_=u,y=Number.MAX_VALUE,x=0,b=t.valueLabelContent.length;b>x;x++){var T=t.valueLabelContent[x],A=Math.min(-T.labelDim.width/2-f/4,y),C={x:A,y:_,width:2*Math.abs(A),height:u+f*(1+this.LINE_GAP)-_},L=T.labelContent,P=!1;if(!t._boundsInCircle(C))break;if(g.isOverlapped(C))break;for(;m.isOverlapped(C)&&L.length;){L=L.substr(0,Math.floor(.9*L.length));var M=i.getTextDimension(L+"...",c,d);A=Math.min(-M.width/2-f/4,y),C={x:A,y:_,width:2*Math.abs(A),height:u+f*(1+this.LINE_GAP)-_},P=!0}P&&(T.labelContent=L+"...",T.labelDim=i.getTextDimension(T.labelContent,c,d),A=Math.min(-T.labelDim.width/2-f/4,y)),T.labelPos={x:-T.labelDim.width/2,y:u+f/2},u+=f*(1+this.LINE_GAP),y=A,v++}t.valueLabelContent.length=v,t.valueLabelBackground={x:y,y:_,width:2*Math.abs(y),height:f*(1+this.LINE_GAP)*v+f}},_dealSemiValueLabelContent:function(t,e){for(var n=t.options,r=t.gaugeAxis,a=r.options,o=r.scale.domain(),h=s.linear().domain(o).range([i.toRadian(-90),i.toRadian(90)]),l=n.valueLabel.style,u=n.valueLabel.useHtml,c=i.getTextHeight(l),d=i.getTextHeight(a.labelStyle),f=-(.11*e+d/2)-c,p=this._getPointerTickBoundsManager(r,e,h,d),g=p.heightBoundsManager,m=p.widthBoundsManager,v=0,_=f,y=Number.MAX_VALUE,x=0,b=t.valueLabelContent.length;b>x;x++){var T=t.valueLabelContent[x];_-=c*(1+this.LINE_GAP);var A=Math.min(-T.labelDim.width/2-c/4,y),C={x:A,y:_,width:2*Math.abs(A),height:f-_},L=T.labelContent,P=!1;if(!t._boundsInCircle(C)){_+=c*(1+this.LINE_GAP);break}if(g.isOverlapped(C)){_+=c*(1+this.LINE_GAP);break}for(;m.isOverlapped(C)&&L.length;){L=L.substr(0,Math.floor(.9*L.length));var M=i.getTextDimension(L+"...",l,u);A=Math.min(-M.width/2-c/4,y),C={x:A,y:_,width:2*Math.abs(A),height:f-_},P=!0}P&&(T.labelContent=L+"...",T.labelDim=i.getTextDimension(T.labelContent,l,u),A=Math.min(-T.labelDim.width/2-c/4,y)),y=A,v++}t.valueLabelContent.length=v;for(var x=0;v>x;x++){var T=t.valueLabelContent[x];T.labelPos={x:-T.labelDim.width/2,y:_+c/2+x*c*(1+this.LINE_GAP)}}t.valueLabelBackground={x:y,y:_,width:2*Math.abs(y),height:c*(1+this.LINE_GAP)*v+c}},_boundsInCircle:function(t){for(var e=this.radius,i=[{x:t.x,y:t.y},{x:t.x+t.width,y:t.y},{x:t.x,y:t.y+t.height},{x:t.x+t.width,y:t.y+t.height}],n=0;4>n;n++){var r=i[n],a=Math.abs(r.x),o=Math.abs(r.y);if(Math.pow(a*a+o*o,.5)>e)return!1}return!0},_getPointerTickBoundsManager:function(t,e,i,n){var a=new r,o=new r,s=.84*e,h=t.tickData,l=this,u=.5*n;h.forEach(function(t){var e=i(t.tickValue),n=l._getPointerTickCenter(t,s,i);l._addToBoundsManager(e,{x:n.x-t.tickDim.width/2-u,y:n.y-t.tickDim.height/2-u,width:t.tickDim.width+u,height:t.tickDim.height+u},a,o)});var c=t.getMinorTickData()||[],d=.85*e,f=.1*e;return c.forEach(function(t){var e,n,r=i(t),s=l._getArcPoint(d,r);r<Math.PI?(e=s[0],n=s[1]):(e=s[0]-f,n=s[1]),l._addToBoundsManager(r,{x:e,y:n,width:f,height:f},a,o)}),{widthBoundsManager:a,heightBoundsManager:o}},_addToBoundsManager:function(t,e,i,n){t>-Math.PI/4&&t<Math.PI/4&&n.addBounds(e),(t<3*-Math.PI/4||t>3*-Math.PI/4)&&n.addBounds(e),i.addBounds(e)},_getPointerTickCenter:function(t,e,i){var n,r,a=i(t.tickValue),o=this._getArcPoint(e,a),s=o[0],h=o[1],l=t.tickDim,u=Math.atan(l.width/l.height);if(Math.abs(a)<u){var c=l.height/2;n=s+c*s/h,r=h+c}else if(a>=u&&a<=Math.PI-u){var c=l.width/2;n=s-c,r=h-c*h/s}else if(a>=u-Math.PI&&-u>=a){var c=l.width/2;n=s+c,r=h+c*h/s}else{var c=l.height/2;n=s-c*s/h,r=h-c}return{x:n,y:r}},drawSeries:function(){var t=this,e=t.vanchart,i=e.renderer,n=t.group;this.backgruondPath||(this.backgruondPath=i.path().addTo(n),this.hingePath=i.path().addTo(n),this.labelGroup=this._getPointTextLabelGroup(),this.axisGroup=this.labelGroup,this.needleGroup=i.group().addTo(n),this.pointerHingePath=i.path().addTo(n)),e.registerInteractiveTarget(this,n),this.labelGroup=this._getPointTextLabelGroup(),this.dropFilter||(this.dropFilter=i.createDropShadowFilter(0,2,.1,2),this.innerFilter=i.createInnerShadowFilter(0,2,.1,2)),"pointer"==this.options.style?this._drawPointer(180,.16,.07):this._drawPointer(98,.11,.055)},onSeriesPress:function(){var t=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),e="pointer"==this.options.style?.16:.11,i="pointer"==this.options.style?.07:.055;t.outerRadius(e*this.radius*1.25),this.hingePath.attr("d",t()),t.outerRadius(i*this.radius*1.25),this.pointerHingePath.attr("d",t())},onSeriesPressUp:function(){var t=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),e="pointer"==this.options.style?.16:.11,i="pointer"==this.options.style?.07:.055;t.outerRadius(e*this.radius),this.hingePath.attr("d",t()),t.outerRadius(i*this.radius),this.pointerHingePath.attr("d",t())},_getScale:function(){var t=this,e=t.options.style,n="pointer"==e?l:u,r=t.gaugeAxis.scale.domain();return s.linear().domain(r).range([i.toRadian(-n),i.toRadian(n)])},getStyle:function(t){var e=t.options;return{fill:e.needle,"fill-opacity":n.getColorOpacity(e.needle)}},getPointGraphicKey:function(){return"path"},_getPointGraphicGroup:function(){return this.needleGroup},getPointInitAnimationAttr:function(t){var e=t.series,n=e._getScale();return{duration:e.ANIMATION_TIME,ease:e.EASE_TYPE,attrTween:{d:function(){var r=this._current_||n.domain()[0];this._current_=i.getValueInDomain(t.value,n.domain());var a=o(r,this._current_);return function(t){return e._getArrowPath(a(t))}}}}},getPointUpdateAnimationAttr:function(t){return this.getPointInitAnimationAttr(t)},_getArrowPath:function(t){var e=this._getScale()(t),i=this.radius,n=this._getArcPoint(.9*i,e),r=this._getArcPoint(.02*i,e+Math.PI/2),a=this._getArcPoint(.02*i,e-Math.PI/2);return"M"+n[0]+","+n[1]+"L"+r[0]+","+r[1]+"L"+a[0]+","+a[1]+"Z"},_drawPointer:function(t,e,r){var o=this,s=o.options,h=o.radius,l=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0),u=a.arc().startAngle(i.toRadian(-t)).endAngle(i.toRadian(t)).innerRadius(0).outerRadius(h).toCenter(!1);o.backgruondPath.attr("d",u()).style({fill:s.paneBackgroundColor,"fill-opacity":n.getColorOpacity(s.paneBackgroundColor),filter:"url(#"+i.stamp(o.dropFilter)+")"}),l.outerRadius(e*h),o.hingePath.attr("d",l()).style({fill:s.hingeBackgroundColor,"fill-opacity":n.getColorOpacity(s.hingeBackgroundColor),filter:"url(#"+i.stamp(o.innerFilter)+")"}),this._drawPointerTicks(),this._drawGaugeLabels(o.labelGroup),l.outerRadius(r*h),o.pointerHingePath.attr("d",l()).style({fill:s.hinge,"fill-opacity":n.getColorOpacity(s.hinge),filter:"url(#"+i.stamp(o.dropFilter)+")"})},_drawPointerTicks:function(){var t=this,e=t.defaultBands,n=t.vanchart,r=t.gaugeAxis,a=n.renderer,o=this.axisGroup,s=r.getTickData(),h=r.getMinorTickData(),l=r.options,u=l.labelStyle,c=l.useHtml,d=.95*t.radius,f=.84*t.radius,p=this._getScale();this.ticks=this.ticks||[];var g,m,v=r._bindData(this.ticks,s,function(t){return p(t.tickValue)}),_=[];for(v.exit.map(function(t){t.text&&t.text.remove(),t.remove()}),_=v.enter.map(function(t){var e=o.append(a.line().datum(t));return i.hasDefined(t.tickContent)&&(e.text=o.append(a.vtext(c))),e}),this.ticks=_=_.concat(v.update),g=0,m=_.length;m>g;g++){var y=_[g],x=y.datum(),b=p(x.tickValue),T=t._getArcPoint(d,b),A=t._getArcPoint(d-.1*t.radius,b),C=t._getColorFromBands(x.tickValue,e);y.attr("x1",T[0]).attr("y1",T[1]).attr("x2",A[0]).attr("y2",A[1]).style({stroke:C,"stroke-width":1});var L=t._getPointerTickCenter(x,f,p);y.text&&y.text.textContent(x.tickContent).style(u).attr({x:L.x-x.tickDim.width/2,y:L.y-x.tickDim.height/2,dy:".85em"})}this.minorTics=this.minorTics||[];var g,m,v=r._bindData(this.minorTics,h),_=[];for(g=0,m=v.exit.length;m>g;g++)v.exit[g].remove();for(g=0,m=v.enter.length;m>g;g++)_.push(o.append(a.line().datum(v.enter[g])));for(this.minorTics=_=_.concat(v.update),g=0,m=_.length;m>g;g++){var P=_[g],M=P.datum(),b=p(M),T=t._getArcPoint(d,b),A=t._getArcPoint(d-.05*t.radius,b),C=t._getColorFromBands(M,e);P.attr("x1",T[0]).attr("y1",T[1]).attr("x2",A[0]).attr("y2",A[1]).style({stroke:C,"stroke-width":1})}}});return t("../ChartLibrary").register(e.POINTER_GAUGE,c),t("../ChartLibrary").register(e.POINTER_SEMI_GAUGE,c),c}),define("chart/SlotGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","../utils/PathGenerator","../utils/Scale","./Gauge","../utils/Interpolator","../component/FormattedText","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("../utils/PathGenerator"),a=t("../utils/Scale"),o=t("./Gauge"),s=t("../utils/Interpolator"),h=t("../component/FormattedText"),l=o.extend({gaugeType:e.SLOT_GAUGE,_getFixedPos:function(t,e){var i=t.series,n=i.centerX+1.08*i.radius+10,r=i.centerY-e.height/2;return[n,r]},_dealValueLabel:function(){var t=this,e=t.options,i=t.points[0];if(i&&!i.isNull){for(var r=e.valueLabel,a=r.useHtml,o=r.formatter,s=h.createMultiLineLabelContent(o,i),l=r.style,u=[],c=0,d=s.length;d>c;c++)u.push({labelContent:s[c],labelStyle:l,labelDim:n.getTextDimension(s[c],l,a)});t.valueLabelContent=u}},_fixCenterAndRadius:function(){var t=this,e=t.options,i=e.radius;if(t.center)t.centerX=t.center[0],t.centerY=t.center[1],t.radius=i;else{var r=t.bounds;i||(i=Math.min(r.width/2,r.height/2),i=i/1.08-t.DEFAULT_PADDING);var a=r.x+r.width/2,o=r.y+r.height/2;t.centerX=a,t.centerY=o,t.radius=i}if(t.percentageLabelContent&&t.valueLabelContent&&t.valueLabelContent.length>0){t.percentageLabelPos={x:-t.percentageLabelDim.width/2,y:-t.percentageLabelDim.height*(1+t.LINE_GAP)};for(var s=0,h=0,l=t.valueLabelContent.length;l>h;h++){var u=t.valueLabelContent[h];u.labelPos={x:-u.labelDim.width/2,y:s},s+=u.labelDim.height*(1+t.LINE_GAP)}}else if(t.percentageLabelContent)t.percentageLabelPos={x:-t.percentageLabelDim.width/2,y:-t.percentageLabelDim.height/2};else if(t.valueLabelContent&&t.valueLabelContent.length>0)for(var c=n.getTextHeight(e.valueLabel.style),d=t.valueLabelContent.length,f=c*d+c*(d-1)/2,s=-f/2,h=0;d>h;h++){var u=t.valueLabelContent[h];u.labelPos={x:-u.labelDim.width/2,y:s},s+=c*(1+t.LINE_GAP)}},drawSeries:function(){var t=this,e=t.options,o=t.points[0],h=t.vanchart,l=h.renderer,u=t.group;this.backgruondPath||(this.backgruondPath=l.path().addTo(u),this.slotBackground=l.path().addTo(u),this.needlePath=l.circle().addTo(u)),this.labelGroup=this._getPointTextLabelGroup(),this.innderShadow||(this.innderShadow=l.createInnerShadowFilter(0,2,.05,0),this.dropShadow=l.createDropShadowFilter(0,2,.05,0));var c=r.arc().startAngle(n.toRadian(-135)).endAngle(n.toRadian(135)).innerRadius(0).outerRadius(t.radius).toCenter(!1).closePath(!1),d=r.arc().startAngle(n.toRadian(-135)).endAngle(n.toRadian(135)).innerRadius(0).outerRadius(t.radius).toCenter(!1).closePath(!1),f=t.gaugeAxis.scale.domain(),p=a.linear().domain(f).range([n.toRadian(-135),n.toRadian(135)]);if(t.backgruondPath.attr("d",d()).style({fill:"none",stroke:e.slotBackgroundColor,"stroke-linecap":"round","stroke-width":.16*t.radius,filter:"url(#"+n.stamp(this.innderShadow)+")"}),o&&!o.isNull){var g=p(f[0]),m=p(n.getValueInDomain(o.value,f)),v=n.toDegree(m-g),_=(t._getColorFromBands(f[0],t.defaultBands),o.color);t.slotBackground.style({fill:"none",stroke:i.colorToHex(_),"stroke-linecap":"round","stroke-width":.16*t.radius});var y=this._getArcPoint(t.radius,g);if(t.needlePath.attr("cx",y[0]).attr("cy",y[1]).attr("r",.048*t.radius).style({fill:e.needle,"fill-opacity":i.getColorOpacity(e.needle),filter:"url(#"+n.stamp(this.dropShadow)+")"}),t.vanchart.renderer.isAnimation)t.slotBackground.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{d:function(){this._lastRadian_=this._lastRadian_||g;var t=s(this._lastRadian_,m);return this._lastRadian_=m,function(e){return c.endAngle(t(e))()}}}}),t.needlePath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{transform:function(){this._lastRotate_=this._lastRotate_||0;var t=s(this._lastRotate_,v);return this._lastRotate_=v,function(e){return"rotate("+t(e)+")"}}}});else{var x=c.endAngle(m)(),b=t._getArcPoint(t.radius,m),T=b[0],A=b[1],C=.008*t.radius;if(Math.abs(m-g)<1e-6){var c="a"+C+","+C+" 0 1,0 ";x="M"+(T-C)+","+A+c+2*C+",0 "+c+2*-C+",0 "}t.slotBackground.attr("d",x),t.needlePath.attr({cx:b[0],cy:b[1]})}this._drawGaugeLabels(this.labelGroup)}},_onSeriesMouseOver:function(t){o.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];if(e){var n=i.getHighLightColor(e.color),r=i.getHighLightColor(this.options.needle);this.slotBackground.style({stroke:i.colorToHex(n)}),this.needlePath.style({fill:r})}},_onSeriesMouseOut:function(t){o.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this.slotBackground.style({stroke:e.color}),this.needlePath.style({fill:e.options.needle}))},onSeriesPress:function(){var t=this.points[0];if(t){var e=i.getColorWithDivider(t.color,1/.95),n=i.getColorWithDivider(this.options.needle,1/.95);this.slotBackground.style({stroke:i.colorToHex(e)}),this.needlePath.style({fill:n})}},onSeriesPressUp:function(){this._onSeriesMouseOver()}});return t("../ChartLibrary").register(e.SLOT_GAUGE,l),l}),define("chart/RingGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","./Gauge","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("./Gauge"),a=t("../utils/PathGenerator"),o=t("../utils/Interpolator"),s=r.extend({gaugeType:e.RING_GAUGE,_fixCenterAndRadius:function(){var t,e,i=this,n=i.options,r=n.radius;if(i.center)t=i.center[0],e=i.center[1];else{var a=i.bounds;r=r||Math.min(a.width/2,a.height/2)-i.DEFAULT_PADDING,t=a.x+a.width/2,e=a.y+a.height/2}i.centerX=t,i.centerY=e,i.radius=r;var o=0,s=i.valueLabelContent?i.valueLabelContent[0]:null;i.percentageLabelContent&&s?o=i.percentageLabelDim.height*(1+i.LINE_GAP)+s.labelDim.height:i.percentageLabelContent?o=i.percentageLabelDim.height:s&&(o=s.labelDim.height);var h=-o/2;i.percentageLabelContent&&(i.percentageLabelPos={x:-i.percentageLabelDim.width/2,y:h},h+=i.percentageLabelDim.height*(1+i.LINE_GAP)),s&&(s.labelPos={x:-s.labelDim.width/2,y:h})},drawSeries:function(){var t=this,e=t.options,r=t.vanchart,s=r.renderer,h=t.group;if(this.backgruondPath||(this.backgruondPath=s.path().addTo(h),this.ringPath=s.path().addTo(h),this.innerBackgroundPath=s.path().addTo(h),this.innerStroke=s.path().addTo(h),this.outerStroke=s.path().addTo(h)),this.labelGroup=this._getPointTextLabelGroup(),!this.colorGradient){var l={x1:"0%",y1:"0%",x2:"0%",y2:"100%"},u={offset:"0%","stop-color":"#ffffff"},c={offset:"100%","stop-color":"#dddddd"};this.colorGradient=s.colorGradient(l,[u,c]),u["stop-color"]="#dddddd",c["stop-color"]="#ffffff",this.clickedGradient=s.colorGradient(l,[u,c]),n.isSupportSVG()||(this.colorGradient="#ffffff",this.clickedGradient="#dddddd")}var d=a.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0).outerRadius(t.radius),f=t.gaugeAxis.scale.domain(),p=(t._getColorFromBands(f[0],t.defaultBands),.8*t.radius),g=p+2,m=p-1.5;this.backgruondPath.attr("d",d()).style({fill:e.paneBackgroundColor,"fill-opacity":i.getColorOpacity(e.paneBackgroundColor)});var v=t.points[0];if(v){var _=a.arc().startAngle(0).innerRadius(0).outerRadius(t.radius),y=v.color,x=Math.max(v.percentage,0),b=2*Math.PI*x*(e.clockwise?1:-1);this.ringPath.style({fill:i.colorToHex(y),"fill-opacity":i.getColorOpacity(y)}),this.ringPath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attrTween:{d:function(){this._lastRadian_=this._lastRadian_||0;var t=o(this._lastRadian_,b);return this._lastRadian_=b,function(e){return _.endAngle(t(e))()}}}})}this.innerBackgroundPath.attr("d",d.outerRadius(p)()).style({fill:e.innerPaneBackgroundColor,"fill-opacity":i.getColorOpacity(e.innerPaneBackgroundColor)}),this.outerStroke.attr("d",d.outerRadius(g)()).style({fill:"none",stroke:"#000000","stroke-opacity":.05,"stroke-width":4}),this.innerStroke.attr("d",d.outerRadius(m)()).style({fill:"none",stroke:this._getStroke(this.colorGradient),"stroke-width":3}),this._drawGaugeLabels(this.labelGroup)},_onSeriesMouseOver:function(t){r.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];e&&(this.innerStroke.style({stroke:this._getStroke(this.colorGradient)}),this.ringPath.style({fill:e.mouseOverColor}))},_onSeriesMouseOut:function(t){r.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this.innerStroke.style({stroke:this._getStroke(this.colorGradient)}),this.ringPath.style({fill:e.color}))},onSeriesPress:function(){var t=this.points[0];t&&(this.innerStroke.style({stroke:this._getStroke(this.clickedGradient)}),this.ringPath.style({fill:t.clickColor}))},onSeriesPressUp:function(){this._onSeriesMouseOver()}});return t("../ChartLibrary").register(e.RING_GAUGE,s),s}),define("chart/ThermometerGauge",["require","../Constants","../utils/ColorUtils","../utils/BaseUtils","../utils/Scale","./Gauge","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/ColorUtils"),n=t("../utils/BaseUtils"),r=t("../utils/Scale"),a=t("./Gauge"),o=6,s=4,h=5,l=.001,u=a.extend({gaugeType:e.THERMOMETER_GAUGE,_drawDiffMoreLabels:function(){function t(t,e){return t-e/2}var i=this.points[0];if(i&&!i.isNull){var n=this.gaugeAxis.scale.domain(),a=this.options.thermometerLayout==e.VERTICAL_LAYOUT,o=r.linear().domain(n).range(a?[this.radius,-this.radius]:[-this.radius,this.radius]),s=o(i.y),l=a?0-2*h:s,u=a?s:0-2*h;this._showAndExitMoreLabel(i,l,u,t,t)}},_fixCenterAndRadius:function(){var t=(this.points[0],this),i=t.options.thermometerLayout==e.HORIZONTAL_LAYOUT?this._fixHorizontalThermometerCenter():this._fixVerticalThermometerCenter(),n=i.centerX,r=i.centerY,a=i.radius,o=t.valueLabelContent?t.valueLabelContent[0]:null;if(t.percentageLabelContent&&(t.percentageLabelPos.x-=n,t.percentageLabelPos.y-=r,t.percentageLabelPos.y=Math.min(t.percentageLabelPos.y,a-t.percentageLabelDim.height)),o){o.labelPos.x-=n,o.labelPos.y-=r;var s=a-o.labelDim.height-o.labelPos.y;0>s&&(o.labelPos.y+=s,t.percentageLabelContent&&(t.percentageLabelPos.y+=s))}t.centerX=n,t.centerY=r,t.radius=a},_fixHorizontalThermometerCenter:function(){var t,i,n,r=this,a=r.options,l=r.gaugeAxis,u=a.percentageLabel,c=a.valueLabel,d=r.valueLabelContent?r.valueLabelContent[0]:null,f=r.options.radius,p=this._getThermometerSize();if(r.center)t=r.center[0],i=r.center[1],n=i;else{var g=r.bounds;n=g.y+(g.height-p)/2,t=g.x+g.width/2,f=f||g.width/2-l.getMaxTickWidth()-r.DEFAULT_PADDING}return(r.percentageLabelContent||d)&&(r.percentageLabelContent&&d&&u.align==e.TOP&&c.align==e.TOP?(r.center&&(n-=r.percentageLabelDim.height*(1+r.LINE_GAP),
n-=d.labelDim.height*(1+r.HORIZONTAL_GAP),n-=l.getTickHeight()+s+o+s+h),r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageLabelDim.height*(1+r.LINE_GAP),d.labelPos={x:-d.labelDim.width/2+t,y:n},n+=d.labelDim.height*(1+r.HORIZONTAL_GAP)):(r.percentageLabelContent&&u.align==e.TOP&&(r.center&&(n-=r.percentageLabelDim.height*(1+r.HORIZONTAL_GAP),n-=l.getTickHeight()+s+o+s+h),r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageLabelDim.height*(1+r.HORIZONTAL_GAP)),d&&c.align==e.TOP&&(r.center&&(n-=d.labelDim.height*(1+r.HORIZONTAL_GAP),n-=l.getTickHeight()+s+o+s+h),d.labelPos={x:-d.labelDim.width/2+t,y:n},n+=d.labelDim.height*(1+r.HORIZONTAL_GAP)))),r.center?n=i+5:(n+=l.getTickHeight()+s+o+s+2*h,i=n-5),(r.percentageLabelContent||d)&&(r.percentageLabelContent&&d&&u.align==e.BOTTOM&&c.align==e.BOTTOM?(n+=r.percentageLabelDim.height*r.HORIZONTAL_GAP,r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n},n+=r.percentageLabelDim.height*(1+r.LINE_GAP),d.labelPos={x:-d.labelDim.width/2+t,y:n}):(r.percentageLabelContent&&u.align==e.BOTTOM&&(n+=r.percentageLabelDim.height*r.HORIZONTAL_GAP,r.percentageLabelPos={x:-r.percentageLabelDim.width/2+t,y:n}),d&&c.align==e.BOTTOM&&(n+=d.labelDim.height*r.HORIZONTAL_GAP,d.labelPos={x:-d.labelDim.width/2+t,y:n}))),{centerX:t,centerY:i,radius:f}},_fixVerticalThermometerCenter:function(){var t,i,a,l=this,u=l.options,c=l.gaugeAxis,d=u.percentageLabel,f=u.valueLabel,p=u.radius,g=l.points[0],m=c.scale.domain(),v=l.valueLabelContent?l.valueLabelContent[0]:null,_=this._getThermometerSize();if(l.center)t=l.center[0],i=l.center[1],a=t-2*h;else{var y=l.bounds;a=y.x+(y.width-_)/2,i=y.y+y.height/2,p=p||y.height/2-c.getTickHeight()-l.DEFAULT_PADDING}var x=r.linear().domain(m).range([p,-p]),b=i+x(n.getValueInDomain(g.value,m));return l.percentageLabelDim&&(b-=l.percentageLabelDim.height/3),(l.percentageLabelContent||v)&&(l.percentageLabelContent&&v&&d.align==e.LEFT&&f.align==e.LEFT?(l.center||(a+=Math.max(l.percentageLabelDim.width,v.labelDim.width),t=a+h),l.percentageLabelPos={x:a-l.percentageLabelDim.width,y:b},v.labelPos={x:a-v.labelDim.width,y:b+l.percentageLabelDim.height*(1+l.LINE_GAP)},a+=l.LINE_GAP*Math.max(l.percentageLabelDim.height,v.labelDim.height)):(l.percentageLabelContent&&d.align==e.LEFT&&(l.center&&(a-=l.percentageLabelDim.width+l.LINE_GAP*l.percentageLabelDim.height),l.percentageLabelPos={x:a,y:b},a+=l.percentageLabelDim.width+l.LINE_GAP*l.percentageLabelDim.height),v&&f.align==e.LEFT&&(l.center&&(a-=v.labelDim.width+l.LINE_GAP*v.labelDim.height),v.labelPos={x:a,y:b},a+=v.labelDim.width+l.LINE_GAP*v.labelDim.height))),l.center?a=t-h:t=a+h,a+=2*h+s+o+s+c.getMaxTickWidth(),(l.percentageLabelContent||v)&&(l.percentageLabelContent&&v&&d.align==e.RIGHT&&f.align==e.RIGHT?(a+=l.LINE_GAP*Math.max(l.percentageLabelDim.height,v.labelDim.height),l.percentageLabelPos={x:a,y:b},v.labelPos={x:a,y:b+l.percentageLabelDim.height*(1+l.LINE_GAP)}):(l.percentageLabelContent&&d.align==e.RIGHT&&(l.percentageLabelPos={x:a+l.LINE_GAP*l.percentageLabelDim.height,y:b}),v&&f.align==e.RIGHT&&(v.labelPos={x:a+l.LINE_GAP*v.labelDim.height,y:b}))),{centerX:t,centerY:i,radius:p}},_getThermometerSize:function(){var t=this,i=t.options,n=i.valueLabel,r=t.gaugeAxis,a=t.valueLabelContent?t.valueLabelContent[0]:null,l=i.percentageLabel;if(t.options.thermometerLayout==e.HORIZONTAL_LAYOUT){var u=0;return t.percentageLabelContent&&a?l.align==n.align&&(u+=t.percentageLabelDim.height+a.labelDim.height,u+=t.LINE_GAP*t.percentageLabelDim.height,u+=t.HORIZONTAL_GAP*(n.align==e.TOP?a.labelDim.height:t.percentageLabelDim.height)):t.percentageLabelContent?u+=(1+t.HORIZONTAL_GAP)*t.percentageLabelDim.height:a&&(u+=(1+t.HORIZONTAL_GAP)*a.labelDim.height),u+=2*h+s+o+s+r.getTickHeight()}var c=0;return t.percentageLabelContent&&a?l.align==n.align?(c+=Math.max(t.percentageLabelDim.width,a.labelDim.width),c+=t.VERTICAL_GAP*Math.max(t.percentageLabelDim.height,a.labelDim.height)):(c+=t.percentageLabelDim.width+a.labelDim.width,c+=t.VERTICAL_GAP*(t.percentageLabelDim.height+a.labelDim.height)):t.percentageLabelContent?c+=t.percentageLabelDim.width+t.VERTICAL_GAP*t.percentageLabelDim.height:a&&(c+=a.labelDim.width+t.VERTICAL_GAP*a.labelDim.height),c+=r.getMaxTickWidth(),c+=2*h+s+o+s},drawSeries:function(){var t=this,a=t.options,o=t.points[0],s=t.vanchart,u=s.renderer,c=t.group,d=t.gaugeAxis,f=d.scale.domain(),p=t.options.thermometerLayout==e.VERTICAL_LAYOUT,g=n.getValueInDomain(o.value,f),m=o.color,v=t.radius;if(!this.backgruondLine){this.backgruondLine=u.line().addTo(c),this.thermometerLine=u.line().addTo(c),this.needlePath=u.circle().addTo(c),this.axisGroup=u.group().addTo(c);var _=m,y=i.mixColorWithHSB(_,0,-.1,.1),x=i.getStandardColorAndOpacity(_).alpha;1>x&&(y=i.mixColorWithAlpha(y,x));var b="0%",T="0%";p?T="100%":b="100%";var A={offset:"0%","stop-color":p?_:y},C={offset:"100%","stop-color":p?y:_};this.colorGradient=u.colorGradient({x1:"0%",y1:"0%",x2:b,y2:T},[A,C]);var L=i.getColorWithDivider(_,1/.95),P=i.mixColorWithHSB(_,0,-.1,.1);A={offset:"0%","stop-color":p?L:P},C={offset:"100%","stop-color":p?P:L},this.clickedColorGradient=u.colorGradient({x1:"0%",y1:"0%",x2:b,y2:T},[A,C]);var M=i.getColorWithDivider(o.mouseOverColor,1/.95),w=i.mixColorWithHSB(o.mouseOverColor,0,-.1,.1);A={offset:"0%","stop-color":p?M:w},C={offset:"100%","stop-color":p?w:M},this.mouseOverColorGradient=u.colorGradient({x1:"0%",y1:"0%",x2:b,y2:T},[A,C]),n.isSupportSVG()||(this.colorGradient=_,this.clickedColorGradient=L,this.mouseOverColorGradient=M)}this.labelGroup=this._getPointTextLabelGroup();var E=r.linear().domain(f).range([-v,v]),S="x1",O="y1",b="x2",T="y2",k="cx",D="cy",R=E(g),B=-v;p&&(S="y1",O="x1",b="y2",T="x2",k="cy",D="cx",B=v,R=E.range([v,-v])(g));var I=n.pick(t.thermometerLine.node()._lastX_,B);if(t.thermometerLine.node()._lastX_=R,t.backgruondLine.attr(S,-v).attr(O,0).attr(b,v).attr(T,l).style({fill:"none",stroke:a.slotBackgroundColor,"stroke-width":2*h,"stroke-linecap":"round"}),!o.isNull){t.thermometerLine.attr(S,B).attr(O,0).attr(T,l).attr(b,I).style({stroke:t._getStroke(t.colorGradient),"stroke-width":2*h,"stroke-linecap":"round"}),t.needlePath.attr("r",.9*h).attr(k,I).attr(D,0).style({fill:a.needle,"fill-opacity":i.getColorOpacity(a.needle),"stroke-width":.6*h,stroke:t._needleStrokeColor(o)});var G={};G[b]=R,t.thermometerLine.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attr:G}),G={},G[k]=R,t.needlePath.animate({duration:t.ANIMATION_TIME,ease:t.EASE_TYPE,attr:G})}this._drawGaugeLabels(this.labelGroup),this._drawThermometerTicks(E)},_needleStrokeColor:function(t){return i.mixColorWithHSB(t.color,0,.1,-.1)},_drawThermometerTicks:function(t){var i=this,r=(i.options.bands,i.vanchart),a=i.gaugeAxis,o=r.renderer,s=this.labelGroup,h=a.getTickData(),l=a.getMinorTickData(),u=a.options,c=u.labelStyle,d=u.useHtml,f="x1",p="y1",g="x2",m="y2",v=-9,_=-15,y=-13,x=-19,b=function(t,e){return{x:e-t.tickDim.width/2,y:x-.85*t.tickDim.height,dy:"0.85em"}};i.options.thermometerLayout==e.VERTICAL_LAYOUT&&(f="y1",p="x1",g="y2",m="x2",v=9,_=15,y=13,x=19,b=function(t,e){return{x:x,y:e-t.tickDim.height/2,dy:".85em"}}),this.ticks=this.ticks||[];var T,A,C=a._bindData(this.ticks,h,function(e){return t(e.tickValue)}),L=[];for(C.exit.map(function(t){t.text&&t.text.remove(),t.remove()}),L=C.enter.map(function(t){var e=s.append(o.line().datum(t));return n.hasDefined(t.tickContent)&&(e.text=s.append(o.vtext(d))),e}),this.ticks=L=L.concat(C.update),T=0,A=L.length;A>T;T++){var P=L[T],M=P.datum(),w=n.lineSubPixelOpt(t(M.tickValue),1);P.attr(f,w).attr(p,v).attr(g,w).attr(m,_).style({stroke:u.tickColor,"stroke-width":u.tickWidth}),P.text&&P.text.textContent(M.tickContent).style(c).attr(b(M,w))}this.minorTics=this.minorTics||[];var T,A,C=a._bindData(this.minorTics,l),L=[];for(T=0,A=C.exit.length;A>T;T++)C.exit[T].remove();for(T=0,A=C.enter.length;A>T;T++)L.push(s.append(o.line().datum(C.enter[T])));for(this.minorTics=L=L.concat(C.update),T=0,A=L.length;A>T;T++){var E=L[T],S=E.datum(),w=n.lineSubPixelOpt(t(S),1);E.attr(f,w).attr(p,v).attr(g,w).attr(m,y).style({stroke:u.minorTickColor,"stroke-width":u.minorTickWidth})}},_getFixedPos:function(t,i){var n,r,a=t.series,l=a.options,u=a.options.thermometerLayout,c=a.percentageLabelContent,d=a.valueLabelContent;if(u==e.HORIZONTAL_LAYOUT){n=a.centerX-i.width/2;var f=a.centerY;if(r=f+h+10,c&&c.length&&l.percentageLabel.align==e.BOTTOM&&(r=f+a.percentageLabelPos.y+a.percentageLabelDim.height+10),d&&d.length&&l.valueLabel.align==e.BOTTOM){var p=a.valueLabelContent[0];r=f+p.labelPos.y+p.labelDim.height+10}}else{r=a.centerY-i.height/2;var g=a.gaugeAxis.getMaxTickWidth(),m=a.centerX;if(n=m+h+s+o+s+g+10,c&&c.length&&l.percentageLabel.align==e.RIGHT&&(n=m+a.percentageLabelPos.x+a.percentageLabelDim.width+10),d&&d.length&&l.valueLabel.align==e.RIGHT){var p=a.valueLabelContent[0];n=Math.max(n,m+p.labelPos.x+p.labelDim.width+10)}}return[n,r]},_onSeriesMouseOver:function(t){a.prototype._onSeriesMouseOver.call(this,t);var e=this.points[0];e&&(this.thermometerLine.style("stroke",this._getStroke(this.mouseOverColorGradient)),this.needlePath.style({stroke:i.getHighLightColor(i.mixColorWithHSB(e.color,0,.1,-.1)),fill:i.getHighLightColor(this.options.needle)}))},_onSeriesMouseOut:function(t){a.prototype._onSeriesMouseOut.call(this,t);var e=this.points[0];e&&(this.thermometerLine.style("stroke",this._getStroke(this.colorGradient)),this.needlePath.style({stroke:this._needleStrokeColor(e),fill:this.options.needle}))},onSeriesPress:function(){var t=this.points[0];t&&(this.thermometerLine.style("stroke",this._getStroke(this.clickedColorGradient)),this.needlePath.style({stroke:i.getClickColor(t.color),fill:i.getClickColor(this.options.needle)}))},onSeriesPressUp:function(){this._onSeriesMouseOver()}});return t("../ChartLibrary").register(e.THERMOMETER_GAUGE,u),u}),define("chart/TreeSeries",["require","./Series","../utils/BaseUtils","../utils/QueryUtils","../Constants","./Point","../dom/Evented"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../Constants"),t("./Point")),r=(t("../dom/Evented"),e.extend({refresh:function(t,i){return e.prototype.refresh.call(this,t,i),this._refresh(),this._initChildren(),this},_initChildren:function(){this.traverseInitData(this.visitBefore,null),this.points=this.root.children,this.root.options.tooltip=null},_getPointKey:function(t){return t.name},getTargetKey:function(){return"value"},_getChildrenKey:function(){return"children"},traverseData:function(t,e,i){function r(o,s,h,l){o.children||(o.children=o.options[a._getChildrenKey()]);var u=o.children;if(o.parent=h,o.depth=s,o.level=s,o.height=0,o.ancestor=l,e&&e.call(a,o),u&&(c=u.length))for(var c,d=-1;++d<c;)u[d]instanceof n||(u[d]=new n(u[d],t.series)),0===s&&(l=u[d]),r(u[d],s+1,o,l),o.height=Math.max(o.height,u[d].visible?u[d].height+1:0);i&&i.call(a,o)}var a=this;r(t,0,null,null)},traverseInitData:function(t,e){function r(o,s,h,l,u){var c=s[a._getChildrenKey()];if(o.parent=l,o.depth=h,o.level=h,o.height=0,o.ancestor=u,o.seriesName=a.name,o.children=o.children||[],t&&t.call(a,o),i.hasDefined(c)){for(var d=[],f=0,p=c.length;p>f;f++){var g,m=!1;o.children.forEach(function(t){var e=a._getPointKey(t);i.hasDefined(e)&&e==a._getPointKey(c[f])&&(t._lastValue=t[a.getTargetKey()],t.refresh(c[f]),m=!0,g=t,d.push(t))}),m||(g=new n(c[f],a),d.push(g)),0===h&&(u=g),g.index=f,r(g,c[f],h+1,o,u),o.height=Math.max(o.height,g.visible?g.height+1:0)}for(var v=0,_=o.children.length;_>v;)-1===i.indexOf(d,o.children[v])?(o.children[v].clearChild(),_--):v++;o.children=d}else for(var p=o.children.length;--p>-1;)o.children[p].clearChild();e&&e.call(a,o)}var a=this,o={children:this.options.data,name:this.name};this.root?this.root.refresh(o):this.root=new n(o,a),r(this.root,o,0,null,null)},visitBefore:function(t){1===t.depth&&(t.color=this.vanchart.getDefaultSeriesColor(t.name))},visitAfter:function(){},drawPoint:function(t,e){e=e||0;var i=t.isVisible(),n=t.graphic&&t.graphic.isVisible();i===n?t.graphic&&this._drawUpdatePoints(t,e):i&&!n?this._drawEnterPoints(t):!i&&n&&this._drawExitPoints(t)},_calculatePercentage:function(t,e){var i=0;t.forEach(function(t){i+=Math.abs(t[e])}),i=i>0?i:1,t.forEach(function(t){t.percentage=Math.abs(t[e])/i})},_onPointMouseOver:function(t){var e=t.series,i=e.vanchart,n=i.hoverPoint;n&&this._onPointMouseOut(n),t.depth&&(e.onPointMouseOver(t),i.hoverPoint=t)},_onPointMouseOut:function(t){var e=t.series;e.onPointMouseOut(t),e.vanchart.hideTooltip()},isSeriesAccumulated:function(){return!0},getLegendKey:function(t){for(var e=t.parent;e&&e.parent!=this.root;)e=e.parent;return e?e.name:""},isTreeSeries:function(){return!0}}));return r}),define("chart/MultiPie",["require","../Constants","../utils/BaseUtils","../utils/Scale","./TreeSeries","./PieSeries","../utils/QueryUtils","../utils/ColorUtils","../utils/BoundsManager","./Point","../utils/BezierEasing","../EffectHelper","../utils/PathGenerator","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("../utils/Scale"),r=t("./TreeSeries"),a=t("./PieSeries"),o=t("../utils/QueryUtils"),s=t("../utils/ColorUtils"),h=(t("../utils/BoundsManager"),t("./Point"),t("../utils/BezierEasing")),l=t("../EffectHelper"),u=t("../utils/PathGenerator"),c=t("../utils/Interpolator"),d=2/3,f=15,p=5,g=2*Math.PI,m=1e-10,v=1e3,_=300,y=400,x="bounce",b=h.css.swing,T=h.css.swing,A=r.extend(a).extend({arc:u.arc().startAngle(function(t){return t.x}).endAngle(function(t){return t.x+t.dx}).innerRadius(function(t){return t.y}).outerRadius(function(t){return t.y+t.dy}),_refresh:function(){this.chartInfo={rotate:0},this.sx=n.linear(),this.sy=n.linear()},visitAfter:function(t){var e=t.children,i=t.options.value;if(i=isNaN(i)?0:i,t.chSum=i,e&&(n=e.length)){var n,r=0,a=-1;for(this._calculatePercentage(e,"value");++a<n;)r+=Math.abs(e[a].chSum);var o=this.orderType;e.sort(function(t,e){return o&&null!=t.value&&null!=e.value?o*(Math.abs(t.value)-Math.abs(e.value)):t.index-e.index}),t.chSum=Math.max(r,Math.abs(i||0))}t.value=i||t.chSum||0,t.visible||(t.value=0,t.chSum=0)},_visitBefore:function(t){t.isNull=!1,t.depth&&(1===t.depth?t.points=[t]:(t.points=t.parent.points.slice(),t.points.push(t)))},doLayout:function(){var t,e=this,i=[],n=this.vanchart.bounds,r=e.options;r.center&&0!==r.center.length?(i[0]=this._getPercentValue(r.center[0],this.vanchart.width),i[1]=this._getPercentValue(r.center[1],this.vanchart.height)):i=[n.width/2+n.x,n.height/2+n.y],t={x:n.x,y:n.y,width:n.width,height:n.height},e.chartInfo.innerRadius=r.innerRadius,e.chartInfo.center=i,e.chartInfo.bounds=t,this.traverseData(this.root,this._visitBefore,this.visitAfter),this._initData(e),this.drilldownNow=this.root},_initData:function(t){t.nodes=t._bfsTraverseData(t.root);var i=t.graphics;this._isOrderChanged()&&i&&i.length===t.nodes.length&&t.nodes.map(function(t,e){t._view=i[e]});var n=t.chartInfo,r=t.options,a=n.radius||r.radius;if(a)t._calcData(t.root),t._calculateLabelPos();else{var o=n.bounds,s=n.center;n.radius=Math.min(s[0]-o.x,o.x+o.width-s[0],s[1]-o.y,o.y+o.height-s[1]),t._calcData(t.root);var h=t.nodes.filter(function(t){return t.depth&&t.dx&&t.options.dataLabels&&t.options.dataLabels.enabled&&t.options.dataLabels.align===e.OUTSIDE});h.length&&(n.radius=t.calcOutsideLabel(h,n.bounds,n.center)),t._calcData(t.root),t._calculateLabelPos()}t.sx=this.sx.range([this.startAngle,this.endAngle]).domain([this.startAngle,this.endAngle]),t.sy=this.sy.range([0,this.innerRadius,this.radius]).domain([0,this.innerRadius,this.radius])},getDataToDraw:function(){return this.nodes},orderData:function(t){this.orderType=t===!0?1:t===!1?-1:null,this._saveLastView()},_saveLastView:function(){this.graphics=this.nodes.map(function(t){return t._view})},_bfsTraverseData:function(t){var e=[],i=[];for(e.push(t);n=e.shift();){var n;i.push(n);var r=n.children;if(r&&(a=r.length))for(var a,o=-1;++o<a;)e.push(r[o])}return i},_calcData:function(t){function n(t,a,o,h,l,c,d){var f=t.children;if(t.x1=t.x,t.y1=t.y,t.dx1=t.dx,t.dy1=t.dy,t.x=a,t.y=(t.depth-2)*l+c+d,t.dx=o,t.hdx=h,t.dy=l,t.depth){1!==t.depth||c||(t.y=0,t.dy=d);var p=t.options;p.dataLabels&&p.dataLabels.enabled&&(p.dataLabels._align||p.dataLabels.align!==e.OUTSIDE||(p.dataLabels=i.clone(p.dataLabels),p.dataLabels._align=p.dataLabels._align||p.dataLabels.align),p.dataLabels._align===e.OUTSIDE&&(t.depth===s?p.dataLabels.align=e.OUTSIDE:p.dataLabels.align=e.INSIDE)),r._setColor(t,u,s),r.calculateLabelInfo(t)}else t.y=-1,t.dy=c+1;if(t._x=t.x,t._dx=t.dx,t._hdx=t.hdx,t._y=t.y,t._dy=t.dy,f&&(g=f.length)){var g,m,v,_,y=-1;for(o=t.value?o/Math.abs(t.value):0,h=t.chSum?h/Math.abs(t.chSum):0;++y<g;)m=f[y],v=Math.abs(m.value)*o,_=Math.abs(m.chSum)*h,n(m,a,v,_,l,c,d),a+=_}}var r=this;r.chartInfo.radius&&r.options.innerRadius&&(r.chartInfo.innerRadius=this._getPercentValue(r.options.innerRadius,r.chartInfo.radius));var a,o,s=t.height,h=r.chartInfo.radius,l=r.chartInfo.innerRadius,u=r.options.gradual,c=r.startAngle,f=r.endAngle,p=f-c;l?(a=s?(h-l)/s:0,o=a):(a=s>1?h*(1-d)/(s-1):0,o=s>1?h*d:h),n(t,c,p,p,a,l,o)},_setColor:function(t,i,n){if(t&&i&&n){if(t.options.color)t.color=t.options.color;else{var r,a,o=s.getRGBAColorArray(t.ancestor.color),h=s.rgb2hsb(o[0],o[1],o[2]),l=(t.depth-1)/n;i===e.GRADUAL_LIGHTER?(r=-h[1]*l,a=(1-h[2])*l):(r=(1-h[1])*l,a=-h[2]*l),t.color=s.mixColorWithHSB(t.ancestor.color,0,r,a)}if(t.options.mouseOverColor)t.mouseOverColor=t.options.mouseOverColor;else{var r,a;i===e.GRADUAL_LIGHTER?(r=.1,a=-.05):(r=-.1,a=.05),t.mouseOverColor=s.mixColorWithHSB(t.options.tooltip&&t.options.tooltip.enabled&&t.options.tooltip.shared?t.ancestor.color:t.color,0,r,a)}var u=s.getStandardColorAndOpacity(t.color,t.options.opacity);t.color=u.hex,t.opacity=u.alpha}},_calculateLabelPos:function(){var t=this,i=[],n=[];t.nodes.map(function(r){r.labelPos=null,r.dx<m||r.name&&r.depth&&r.dx&&r.dy&&(t.drilldownNow?r!==t.drilldownNow.parent:!0)&&r.options.dataLabels&&r.options.dataLabels.enabled&&(r.options.dataLabels.align===e.OUTSIDE?i.push(r):n.push(r))},t);var r=t.chartInfo;t.calcOutsideLabel(i,r.bounds,r.center,r.radius),t.calculateLeadLineStartPos(i),t.calculateInsideLabelBounds(n)},_getInnerRadius:function(t){return t.y},_getOuterRadius:function(t){return t.y+t.dy},_getStartAngle:function(t){return t.x},_getEndAngle:function(t){return t.x+t.dx},_getPositionInPie:function(t){var e=t.x-this.chartInfo.center[0],i=t.y-this.chartInfo.center[1];return{x:e,y:i}},_getFixedPos:function(t,e){var i=this.chartInfo.center[0],n=this.chartInfo.center[1],r=this.getCenterAngle(t),a=t.y+t.dy,o=a*Math.sin(r)+i,s=a*Math.cos(r+Math.PI)+n;return r<Math.PI/2?s-=e.height:r>=Math.PI&&r<3*Math.PI/2?o-=e.width:r>=3*Math.PI/2&&g>r&&(s-=e.height,o-=e.width),[o,s]},drillDown:function(t){function i(t){var e=t.children,n=t;if(e&&(r=e.length))for(var r,a=-1;++a<r;){var o=i(e[a]);o.depth>n.depth&&(n=o)}return n}if(this.drilldownNow!==t){for(var n,r=t;(n=r.parent)&&n.depth;)if(r=n,!n.name)return;this.drilldownNow=t;var a,s,h=this.chartInfo.radius,l=this.chartInfo.innerRadius;if(t.depth){var u=t.ancestor.parent.height;if(0===t.height)a=[t.parent._y,t._y,t._y+t._dy],s=[0,f,h];else if(t.height+t.depth!==u){var c=i(t);a=[t.parent._y,t._y,t._y+t._dy,c._y+c._dy,h],s=[0,f,h/2,h,h]}else a=[t.parent._y,t._y,t._y+t._dy,h],s=[0,f,h/2,h]}else a=[0,l,h],s=[0,l,h];var d=t.depth+t.height;this.sx.domain([t._x,t._x+t._dx]),this.sy.domain(a).range(s),this.nodes.map(function(t){t.depth&&t.dataLabels&&t.dataLabels.enabled&&t.dataLabels._align===e.OUTSIDE&&(t.depth===d?t.dataLabels.align=e.OUTSIDE:t.dataLabels.align=e.INSIDE,o.merge(t,this.calculateLabelInfo(t),!0)),t.x=this.safeAngle(t._x),t.dx=this.safeAngle(t._x+t._dx)-t.x,t.y=this.safeRadius(t._y),t.dy=this.safeRadius(t._y+t._dy)-t.y,t===this.drilldownNow.parent&&(t.dx=this.safeAngle(7))},this),this._calculateLabelPos(),this.drawDrillDown(t)}},safeAngle:function(t){return Math.max(this.startAngle,Math.min(this.endAngle,this.sx(t)))},safeRadius:function(t){return Math.max(0,this.sy(t))},_getTranslate:function(){return this.chartInfo.center},_getMoreLabelDefaultCenter:function(t,e){var i=t.rotate||0,n=i+t.x+t.dx/2,r=t.y+t.dy/2,a=this._getArcPoint(r,n);return{centerX:a[0],centerY:a[1]}},effectAnimation:function(t,e){l.areaStyleEffectAnimation(t,e)},getDefaultEffectTime:function(){return l.AREA_STYLE_EFFECT_TIME},getStyle:function(t){return{display:t.name||!t.depth?"":"none",fill:t.color,"fill-opacity":t.depth?t.opacity:0,stroke:t.options.borderColor,"stroke-opacity":t.options.borderOpacity,"stroke-width":t.options.borderWidth}},getAttrs:function(t){return{d:this.arc(t)}},getPointGraphicKey:function(){return"path"},getChartNodes:function(){return this.nodes},getCenter:function(){return this.center},getRadius:function(){return this.radius},getDrilldown:function(){return this.options.drilldown},_getPointGraphicGroup:function(){return this.wrapGroup||(this.wrapGroup=this.group.append(this.vanchart.renderer.group()),this.pathGroup=this.wrapGroup.append(this.vanchart.renderer.group()),this.drawRing()),this.pathGroup},drawRing:function(){this.ringPath||(this.ringPath=this.group.append(this.vanchart.renderer.path()),this.ringPath.attr({d:u.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(f).outerRadius(f+p)()}).style({display:"none",fill:"rgba(0,0,0,0.1)","pointer-events":"none"}))},drawDrillDown:function(t){var e=this,n=e.vanchart.renderer.isAnimation;e._removeDataLabels();var r=e.arc;if(n){var a=0;e.nodes.filter(function(t){return t.graphic}).map(function(i){i.graphic.transition().ease("cubic-in-out").each("start",function(){++a}).duration(v).style("fill",function(){return i.color}).attrTween("d",function(){var t=c(i._view,{x:i.x,y:i.y,dx:i.dx,dy:i.dy});return function(e){var n=t(e);return i._view=n,r(n)}}).attrTween("opacity",function(){return function(t){return i.depth&&i._view.y+i._view.dy>=f?1:0}}).each("end",function(){i.graphic.attr("opacity",i.depth&&i.dx&&i.y+i.dy>f?1:0),--a||(e._animateEnd(),e.ringPath.style("display",t&&t.depth?"":"none"))})}),t.depth||e.ringPath.transition().style("display","none")}else e.nodes.map(function(t){t.graphic.attr({d:r(t),opacity:t.depth&&t.dx&&t.y+t.dy>f?1:0})}),e._animateEnd(t),i.isSupportSVG()||e.root.graphic.style({fill:"rgba(0,0,0,0)"}),e.ringPath.style("display",t.depth?"":"none")},_animateEnd:function(){this.vanchart.renderer&&(this.ordered=this.orderType,this._showLabels(),this._drawEffectPoints())},_isOrderChanged:function(){return this.ordered!==this.orderType},initialAnimation:function(){this.wrapGroup.animate({duration:550,ease:"linear",attrTween:{transform:function(){var t=c(-180,0);return function(e){var i=t(e);return"rotate("+i+")"}}}}),this.pathGroup.animate([{duration:400,ease:"linear",attrTween:{transform:function(){var t=c(0,.9);return function(e){var i=t(e);return"scale("+i+")"}}}},{duration:1e3,ease:"elastic",attrTween:{transform:function(){var t=c(.9,1);return function(e){var i=t(e);return"scale("+i+")"}}}}])},getPointUpdateAnimationAttr:function(t){var e=this.arc,i=this._isOrderChanged(),n=i?T:x,r=i?y:v;return t.graphic.attr("opacity",t.depth?1:0),this.ringPath.style("display",this.drilldownNow.depth?"":"none"),{ease:n,duration:r,attrTween:{d:function(){var i=c(t._view,{x:t.x,y:t.y,dx:t.dx,dy:t.dy});return function(n){var r=i(n);return t._view=r,e(r)}}}}},getPointInitAnimationAttr:function(t){var e,i;i=this.initialAnimationMoving?{x:t.x,y:t.y,dx:t.dx,dy:t.dy}:{x:t.x1,y:t.y1,dx:t.dx1,dy:t.dy1},e=this.arc(i),t._view=i;var n={d:e,opacity:t.depth?1:0};return this.initialAnimationMoving?{attr:n}:(t.graphic.attr(n),this.getPointUpdateAnimationAttr(t))},getPointDropAnimationAttr:function(t){return this.getPointUpdateAnimationAttr(t)},onPointMouseOver:function(t){this._onState(t,!0)},onPointMouseOut:function(t){this._onState(t,!1)},_onState:function(t,e){if(t.options.tooltip&&t.options.tooltip.shared)for(var i,n=t;(i=n.parent)&&i.depth&&i.y+i.dy!==f;)n=i,i.series._onSingleState(i,e);t.series._onSingleState(t,e)},_onSingleState:function(t,n){var r=t.series,a=r.options.animation,o={},s={};t.depth&&t._view.y1+t._view.dy1===f?s={opacity:n?1:0}:o={"fill-opacity":n?1:t.opacity,fill:n?t.mouseOverColor:t.color},a?(t.graphic.style(o),t.graphic.interrupt(e.SELECT_ANIMATION).transition(e.SELECT_ANIMATION).duration(_).ease(b).attr(s)):(t.graphic.attr(s).style(o),t.depth||i.isSupportSVG()||t.graphic.style("fill","rgba(0,0,0,0)"))},onPointTap:function(t){this.getDrilldown()&&this.drillDown(t)},isSupportLegendHighlight:function(){return!1}});return A.prototype._calculateLabelPosWhenRadiusFixed=A.prototype._calculateLabelPos,t("../ChartLibrary").register(e.MULTIPIE_CHART,A),A}),define("chart/TreeMap",["require","../Constants","../utils/BaseUtils","./TreeSeries","../utils/QueryUtils","../utils/ColorUtils","../utils/BoundsManager","./Point","../EffectHelper","../vans/TreeMapLayout","../utils/Scale","../utils/Interpolator","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=t("./TreeSeries"),r=(t("../utils/QueryUtils"),t("../utils/ColorUtils")),a=(t("../utils/BoundsManager"),t("./Point"),t("../EffectHelper")),o=t("../vans/TreeMapLayout").treemapLayout,s=t("../utils/Scale"),h=t("../utils/Interpolator"),l=6,u=800,c="out-bounce",d=1e3,f=800,p=100,g=n.extend({nodes:[],root:null,zoomNow:null,sx:null,sy:null,zoom:null,_refresh:function(){this.sx=s.linear(),this.sy=s.linear()},visitBefore:function(t){this._setColor(t)},visitAfter:function(t){var e=t.children,i=t.options.value;if(i=isNaN(i)?0:i,t.chSum=i,e&&(n=e.length)){var n,r=0,a=-1;for(this._calculatePercentage(e,"value");++a<n;)r+=Math.abs(e[a].chSum);t.chSum=r}t.value=i||t.chSum||0,t.ancestor&&!t.ancestor.visible&&(t.value=0)},doLayout:function(){function t(t){t._dx=t.dx,t._dy=t.dy,t._x=t.x,t._y=t.y}this.traverseData(this.root,null,this.visitAfter);var e=this.vanchart.bounds;this.sx.range([0,e.width]).domain([0,e.width]),this.sy.range([0,e.height]).domain([0,e.height]);var i=o().value(function(t){return Math.abs(t.value)}).size([e.width,e.height]);this.nodes=i.nodes(this.root).filter(function(t){return!t.children&&t.depth}).map(function(i){return i.value=i.chSum,i.visible=i.ancestor.visible,i.visible&&this._setVanishPos(i,e),this.calculateLabelInfo(i),this._calcLabelPos(i),t(i),i},this)},getDataToDraw:function(){return this.nodes},_setVanishPos:function(t,e){t.vanishPos=[Math.round((t.ancestor.x+t.ancestor.dx/2)/e.width)*e.width,Math.round((t.ancestor.y+t.ancestor.dy/2)/e.height)*e.height]},_setColor:function(t){1===t.depth&&(t.color=t.options.color||this.vanchart.getDefaultSeriesColor(t.name),t.mouseOverColor=t.options.mouseOverColor||r.getHighLightColor(t.color),t.clickColor=t.options.clickColor||r.getClickColor(t.color)),t.depth>1&&!t.options.children&&(t.options.color?t.color=t.options.color:t.color=t.ancestor.color,t.options.mouseOverColor?t.mouseOverColor=t.options.mouseOverColor:t.options.color?t.mouseOverColor=r.getHighLightColor(t.options.color):t.mouseOverColor=t.ancestor.mouseOverColor,t.options.clickColor?t.clickColor=t.options.clickColor:t.options.color?t.clickColor=r.getClickColor(t.options.color):t.clickColor=t.ancestor.clickColor);var e=r.getStandardColorAndOpacity(t.color,t.options.opacity);t.color=e.hex,t.opacity=e.alpha,t.borderColor=t.options.borderColor,t.borderOpacity=t.options.borderOpacity},_calculateLabelPos:function(){},_calcLabelPos:function(t){var n=t.options.dataLabels;if(n&&n.enabled){switch(n.align){case e.CENTER:n._align=e.CENTER,t.labelPos={x:t.x+(t.dx-t.labelDim.width)/2,y:t.y+(t.dy-t.labelDim.height)/2};break;case e.TOP:default:n._align=e.LEFT,t.labelPos={x:t.x+l,y:t.y+l}}var r={x:t.x,y:t.y,width:t.dx,height:t.dy},a={x:t.labelPos.x,y:t.labelPos.y,width:t.labelDim.width,height:t.labelDim.height};i.containsRect(r,a)||(t.labelPos=null)}},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.x+t.dx/2,centerY:t.y+t.dy/2}},effectAnimation:function(t){a.areaStyleEffectAnimation(t,t.x+t.dx/2,t.y+t.dy/2)},getDefaultEffectTime:function(){return a.AREA_STYLE_EFFECT_TIME},getPointGraphicKey:function(){return"rect"},_getFixedPos:function(t){var e=this.vanchart.bounds,i=e.x+t.x+t.dx,n=e.y+t.y;return[i,n]},zoomTo:function(t){t=this.zoomNow===t.parent?this.root:t.parent;var e=this.sx.domain([t.x,t.x+t.dx]),i=this.sy.domain([t.y,t.y+t.dy]),n=this.vanchart.bounds,r=n.width/t.dx,a=n.height/t.dy;this.nodes.map(function(t){t.dx=r*t._dx,t.dy=a*t._dy,t.x=e(t._x),t.y=i(t._y),this._calcLabelPos(t),t.clearPointEffect(),t.graphic.interrupt()},this),this.vanchart.fire("animationStart"),this.zoomNow=t},getChartNodes:function(){return this.nodes},getZoom:function(){return this.options.zoom},_getPointGraphicGroup:function(){return this.pathGroup||(this.pathGroup=this.group.append(this.vanchart.renderer.group())),this.pathGroup},initialAnimation:function(){var t=this._getPointGraphicGroup(),e=this.vanchart.bounds,i=e.width/2,n=e.height/2;t.animate({duration:u,ease:c,attrTween:{transform:function(){var t=h(0,1);return function(e){var r=t(e);return"matrix("+r+",0,0,"+r+","+(i-r*i)+","+(n-r*n)+")"}}}})},_pointExpandAttr:function(t){return{x:-t.dx/2,y:-t.dy/2,width:t.dx,height:t.dy,transform:"translate("+(t.x+t.dx/2)+","+(t.y+t.dy/2)+")"}},_pointContractAttr:function(t){return{x:0,y:0,width:0,height:0,transform:"translate("+t.vanishPos[0]+","+t.vanishPos[1]+")"}},getPointInitAttr:function(t){return this.initialAnimationMoving?this._pointExpandAttr(t):this._pointContractAttr(t)},getPointUpdateAnimationAttr:function(t){var e=this;return t.visible?{ease:"quad-in-out",duration:d,attr:this._pointExpandAttr(t)}:e.getPointDropAnimationAttr(t)},getPointInitAnimationAttr:function(t){return this.initialAnimationMoving?{}:this.getPointUpdateAnimationAttr(t)},getPointDropAnimationAttr:function(t){return{ease:"quad-in-out",duration:f,attr:{width:0,height:0,transform:"translate("+t.vanishPos[0]+","+t.vanishPos[1]+")"}}},onPointMouseOver:function(t){t.series._onState.call(t,!0)},onPointMouseOut:function(t){t.series._onState.call(t,!1)},_onState:function(t){var i=this,n=i.series,r=n.animation,a={"fill-opacity":t?1:i.opacity,fill:t?i.mouseOverColor:i.color};r?i.graphic.interrupt(e.SELECT_ANIMATION).transition(e.SELECT_ANIMATION).duration(p).style(a):i.graphic.style(a)},onPointTap:function(t){t.series.getZoom()&&t.series.zoomTo(t)}});t("../ChartLibrary").register(e.TREEMAP_CHART,g)}),define("chart/Funnel",["require","./Series","../utils/BaseUtils","../Constants","../utils/QueryUtils","../utils/BezierEasing","../EffectHelper","../component/FormattedText","../utils/ColorUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=(t("../utils/QueryUtils"),t("../utils/BezierEasing")),a=t("../EffectHelper"),o=t("../component/FormattedText"),s=t("../utils/ColorUtils"),h=.03,l=.05,u=.03,c=.05,d=u+c,f=.4,p=6,g=.35,m=400,v=400,_=500,y=500,x=e.extend({_getAxisTypes:function(){return[]},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},_calculatePercentage:function(){var t,e=this.points.filter(function(t){return t._bottomPoint=null,!t.isNull&&t.visible}),i=e.length;e.forEach(function(e,n){t?(t._bottomPoint=e,e.percentage=Math.abs(e.value/(t.value||1))):e.percentage=1,e.delayTime=m*Math.sqrt(n/i),t=e})},calculateLabelInfo:function(){},_outSideSpecialLabel:function(t){var e=t.labelContent;return e&&(e.nameLabelContent||e.valueLabelContent)},doLayout:function(){var t=this;t.points.forEach(function(t){o.dataLabelGenerator(t)}),this._calculatePosAndSize()},_calculateTotalValue:function(t,e){var i=0;return this.points.filter(t).forEach(function(t){i+=Math.abs(t[e])}),i},_calculateSeriesMaxValue:function(t,e){var i=0;return this.points.filter(t).forEach(function(t){i=Math.max(i,Math.abs(t[e]))}),i},_calculatePosAndSize:function(){var t=this,e=t.vanchart,i=e.bounds,n=function(t){return!t.isNull&&t.visible},r=t.getTargetKey(),a=i.width,o=i.height,s=a*(1-2*h),u=o*(1-2*l),c=t._calculateTotalLabelSize();s-=c.useWidth>0?c.useWidth+i.width*d:0,t.useCurveConnectorLine=!1;var f,p=t.points.filter(n),g=p.length;
if(!(1>g)){var m=p[0],v=p[g-1],_=m.labelDim?m.labelDim.height:0,y=v.labelDim?v.labelDim.height:0;if(t.options.useSameSlantAngle){var x=t._calculateTotalValue(n,r),b=Math.abs(m[r])*u/x,T=Math.abs(v[r])*u/x,A=Math.max(0,_-b)/2;u-=A,u-=Math.max(0,y-T)/2,p.forEach(function(e){e.posX=Math.round(A*s/2/u),e.width=Math.round(s-2*e.posX),e.posY=Math.round(A),e.height=Math.round(Math.abs(e[r])*u/x),A+=e.height,t._calculateInsideLabelPos(e,f),f=e})}else{var C=t._calculateSeriesMaxValue(n,r),L=u/g,P=Math.max(0,_-L)/2;u-=P,u-=Math.max(0,y-L)/2,p.forEach(function(e,i){e.width=Math.round(s*Math.abs(e[r])/C),e.posX=Math.round((s-e.width)/2),e.posY=Math.round(P+i*L),e.height=Math.round(L),t._calculateInsideLabelPos(e,f),f=e})}t._calculateOutSideLabelPos(n,c.useWidth,c.useHeight)}},_calculateInsideLabelPos:function(t,e){var i=t.options.dataLabels;i&&i.enabled&&(i.align==n.INSIDE?t.labelPos={x:t.posX+t.width/2-t.labelDim.width/2,y:t.posY+t.height/2-t.labelDim.height/2}:e&&(this.useCurveConnectorLine=this.useCurveConnectorLine||t.height+e.height<t.labelDim.height+e.labelDim.height))},_calculateOutSideLabelPos:function(t,e,i){var r=this,a=r.vanchart,o=a.bounds,s=o.width*c,u=o.height*(1-2*l),d=Math.max(1,this.points.filter(t).length-1),f=Math.max(0,(u-i)/d),p=o.width*(1-2*h)-e,g=0;this.points.filter(t).forEach(function(t){var i=t.options.dataLabels;if(i&&i.enabled&&i.align==n.OUTSIDE&&u>g){var a=t.labelContent,o=t.labelDim,h=o.height,l=r.useCurveConnectorLine?g:t.posY+t.height/2-h/2,c=t._bottomPoint,d=((c?c.width:0)-t.width)/4,m={x:p,y:l+h/2},v={x:p-s,y:l+h/2},_={x:t.posX+t.width+d,y:t.posY+t.height/2};if(t.labelPos={x:p,y:l,endPos:m,midPos:v,startPos:_},g+=t.labelDim.height+f,r._outSideSpecialLabel(t)){var y=a.nameLabelContent,x=a.valueLabelContent,b=o.nameValueGap,T=Math.min(e,r.maxValueLabelWidth);if(y){var A=y.dim,C=y.text,L=e-b-T;C=r._omitLabel(C,L,y.style),y.text=C,y.x=0,y.y=(h-A.height)/2}if(x){var P=x.dim,M=x.text;M=r._omitLabel(M,T,x.style),x.text=M,x.x=e-T,x.y=(h-P.height)/2}}}})},_omitLabel:function(t,e,n){for(var r=i.getTextDimension(t,n,!1),a=!1;r.width>e&&t.length;)t=t.substr(0,Math.floor(.9*t.length)),r=i.getTextDimension(t+"...",n,!1),a=!0;return a&&t&&(t+="..."),t},_calculateTotalLabelSize:function(){var t=this,e=t.vanchart,i=e.bounds,r=0,a=0;return t.points.filter(function(t){return!t.isNull&&t.visible&&t.options.dataLabels&&t.options.dataLabels.enabled}).forEach(function(e){e.options.dataLabels.align==n.OUTSIDE&&(r=+t.maxNameLabelWidth||+t.maxValueLabelWidth?Math.max(r,(t.maxNameLabelWidth||0)+(t.maxValueLabelWidth||0)+e.labelDim.nameValueGap):Math.max(r,e.labelDim.width),a+=e.labelDim.height)}),r=Math.min(r,i.width*f),{useWidth:r,useHeight:a}},_calculateLabelPos:function(){},_getFixedPos:function(t){var e=t.series._getTranslate();return[e[0]+t.posX+t.width/2,e[1]+t.posY+t.height/2]},_getMoreLabelDefaultCenter:function(t,e){return{centerX:t.posX+t.width/2,centerY:t.posY+t.height/2}},getFillFilter:function(t,e){var r=e.series,a=r.vanchart,o=a.options;if(o.style==n.STYLE_GRADUAL&&i.isSupportSVG()){var h=a.renderer,l={x1:"0%",y1:"0%",x2:"100%",y2:"0%"},u={offset:"0%","stop-color":s.getColorWithDivider(t,.9)},c={offset:"100%","stop-color":t};return e.colorGradient?h.updateColorGradient(e.colorGradient,l,[u,c]):e.colorGradient=h.colorGradient(l,[u,c]),"url(#"+i.stamp(e.colorGradient)+")"}return t},_getPointPath:function(t){var e=t._bottomPoint,i=-t.width/2+","+-t.height/2,n=t.width/2+","+-t.height/2;if(e){var r=e.width/2+","+t.height/2,a=-e.width/2+","+t.height/2;return"M"+i+"L"+n+"L"+r+"L"+a+"Z"}var o="0,"+t.height/2;return"M"+i+"L"+n+"L"+o+"L"+o+"Z"},getPointGraphicKey:function(){return"path"},getHighLightStyle:function(t){return{stroke:t.mouseOverColor||t.color,fill:t.series.getFillFilter(t.mouseOverColor||t.color,t),"fill-opacity":t.opacity,"stroke-width":p,"stroke-opacity":0===t.opacity?0:g}},getPressedStyle:function(t){return{stroke:t.clickColor||t.color,fill:t.series.getFillFilter(t.clickColor,t),"fill-opacity":t.clickOpacity,"stroke-width":p,"stroke-opacity":0===t.opacity?0:g}},effectAnimation:function(t){a.areaStyleEffectAnimation(t,t.posX+t.width/2,t.posY+t.height/2)},getDefaultEffectTime:function(){return a.AREA_STYLE_EFFECT_TIME},getPointInitAttr:function(t){return{transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+") scale(0.01)"}},getPointInitAnimationAttr:function(t){var e=t.series,i=e.initialAnimationMoving;return{delay:i?t.delayTime:0,ease:i?r.css["ease-out-quart"]:r.css.swing,duration:i?v:y,attr:{d:e._getPointPath(t),transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+") scale(1)"}}},getPointUpdateAnimationAttr:function(t){var e=t.series;return{ease:r.css.swing,duration:_,attr:{d:e._getPointPath(t),transform:"translate("+(t.posX+t.width/2)+","+(t.posY+t.height/2)+")"}}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:200,ease:"back-out",style:i})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.graphic.interrupt(n.SELECT_ANIMATION).transition(n.SELECT_ANIMATION).animate({duration:0,ease:"back-out",style:i})},_getTranslate:function(){var t=this.vanchart.bounds;return[t.x+t.width*h,t.y+t.height*l]},_updateDataLabels:function(){var t=this;t.getTextDataToDraw().forEach(function(e){t._outSideSpecialLabel(e)?t._createOutSideTextGraphic(e):t._createTextGraphic(e)})},_createOutSideTextGraphic:function(t){var e=t.series,n=t.options.dataLabels,r=function(t){return e.visible&&!t.isNull&&t.visible&&t.labelPos&&!isNaN(t.labelPos.x)&&!isNaN(t.labelPos.y)&&n&&n.enabled};if(r(t)){var a=e.vanchart,o=a.renderer,s=t.labelContent,h=t.labelPos.x,l=t.labelPos.y,u=n.useHtml,c=this._getPointTextLabelGroup(),d=o.vtext(u).attr("transform",i.makeTranslate([h,l])).style({"pointer-events":"none"}),f=function(t){if(t){var e=t.dim,i=t.text,r=t.style;o.vtspan(u).style({width:n.labelWidth+"px",height:n.labelHeight+"px"}).attr("y",t.y).attr("x",t.x).attr("dy",.85*e.height).attr("dx",0).textContent(i).style(r).addTo(d)}};f(s.nameLabelContent),f(s.valueLabelContent),t.textGraphic=c.append(d),t.labelPos.startPos&&(t.leadLine=c.append(this._getLeadLine(t)))}},isSeriesAccumulated:function(){return!0}});return t("../ChartLibrary").register(n.FUNNEL_CHART,x),x}),define("chart/WordCloud",["require","./Series","../Constants","../utils/BezierEasing","../EffectHelper","../utils/BaseUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("../Constants"),n=t("../utils/BezierEasing"),r=(t("../EffectHelper"),t("../utils/BaseUtils")),a=800,o=600,s=320,h=320,l=e.extend({isNullValue:function(t){var e=t.options.value;return"-"==e||r.hasNotDefined(e)||r.hasNotDefined(t.name)},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},doLayout:function(){},_calculateLabelPos:function(){},_getFixedPos:function(t,e){var i=t.word,n=t.labelDim,a=t.series._getTranslate(),o=n.width/2,s=n.height/2,h=r.toRadian(i.rotate),l=h===Math.PI/2?s:o*Math.cos(h)-s*Math.sin(h),u=o*Math.sin(h)+s*Math.cos(h),c=.35*n.height*Math.cos(h),d=.35*n.height*Math.sin(h);return r.isSupportSVG()?[a[0]+i.x+l+d,a[1]+i.y+u-c]:[a[0]+i.x+n.width,a[1]+i.y+n.height]},_getTranslate:function(){var t=this.vanchart.bounds;return[t.x+t.width/2,t.y+t.height/2]},effectAnimation:function(t){var e=t.word,i=t.series,r=i._getEffectTime(t);t.graphic.style("text-shadow","rgba(91,91,91,0.75) 0px 0px 0px").effectTransition().ease(n.css["ease-out-quint"]).duration(.5*r).style("font-size",1.2*e.size+"px").style("text-shadow","rgba(91,91,91,0.75) 3px 3px 5px").transition().ease(n.css["ease-in-quint"]).duration(.5*r).style("font-size",e.size+"px").style("text-shadow","rgba(91,91,91,0.75) 0px 0px 0px")},getDefaultEffectTime:function(){return 2e3},_showLabels:function(){},_getPointGraphicGroup:function(){return this.vanchart.group},_createPointGraphic:function(t){var e=this.getPointGraphicKey(t),i=this.vanchart.renderer;return t.graphic=i[e](),t.graphic.textContent(t.word.text),t.graphic},getPointGraphicKey:function(){return"text"},getStyle:function(t){var e=t.word;return e?{"font-size":e.size+"px","font-family":e.fontFamily,fill:t.color,"text-shadow":"","stroke-width":0,"stroke-opacity":1,"fill-opacity":t.opacity,filter:""}:{}},getHighLightStyle:function(t){function e(){for(var t=[0,15,35,50,65,85,1/0],e=[2,4,6,8,10,12],i=0,r=e.length;r>i;i++)if(n>t[i]&&n<=t[i+1])return e[i]}var i=t.word,n=i.size,a={"font-size":n+"px","font-family":i.fontFamily,fill:t.color,stroke:"white","stroke-opacity":1,"stroke-width":e(),"text-shadow":"rgba(91,91,91,0.75) 3px 3px 4px"};if(r.isMS){var o=t.series,s=o.vanchart,h=s.renderer;s.wordCloudShadowFilter=s.wordCloudShadowFilter||h.createDropShadowFilter(3,3,.75,4),a.filter="url(#"+r.stamp(s.wordCloudShadowFilter)+")"}return a},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t),n=e.vanchart,a=n.renderer;t.effectInterval&&(clearInterval(t.effectInterval),t.graphic.interrupt()),!t.mouseOverGraphic&&r.isSupportSVG()&&(t.mouseOverGraphic=a.text().attr("class","mouseOverGraphic").style("pointer-events","none").textContent(t.name).addTo(n.mouseOverGroup)),t.mouseOverGraphic&&t.mouseOverGraphic.attr(e.getPointInitAttr(t)).style(e.getStyle(t)).style("fill-opacity",1),t.graphic.style(i)},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.mouseOverGraphic&&t.mouseOverGraphic.style("fill-opacity",0),t.graphic.style(i),e.drawPointEffect(t)},_getInitFontSize:function(){var t=this,e=t.vanchart;return e.minFontSize/2+"px"},getPointInitAttr:function(t){var e=t.word;return e?{"text-anchor":"middle",transform:"translate("+[e.x,e.y]+")rotate("+e.rotate+")"}:{}},getPointInitStyle:function(){return{"font-size":this._getInitFontSize()}},getPointInitAnimationAttr:function(t){var e=t.series,i=e.initialAnimationMoving,r=t.word;return{ease:n.css["ease-out-quart"],duration:i?a:h,style:{"font-size":r.size+"px"}}},getPointUpdateAnimationAttr:function(t){var e=t.word;return{ease:n.css["ease-out-quart"],duration:o,style:{"font-size":e.size+"px"},attr:{transform:"translate("+[e.x,e.y]+")rotate("+e.rotate+")"}}},getPointDropAnimationAttr:function(t){return{ease:n.css["ease-in-quart"],duration:s,style:{"font-size":"0px"}}},isSeriesAccumulated:function(){return!0}});return t("../ChartLibrary").register(i.WORD_CLOUD_CHART,l),l}),define("chart/Structure",["require","./Series","./Point","../Constants","../utils/BezierEasing","../EffectHelper","../utils/BaseUtils","../ChartLibrary"],function(t){var e=t("./Series"),i=t("./Point"),n=t("../Constants"),r=(t("../utils/BezierEasing"),t("../EffectHelper"),t("../utils/BaseUtils")),a=e.extend({getTargetKey:function(){return"value"},_getPointKey:function(t,e,i){return e=t.parent||e,i=t.level||i||0,(e?e.name:"")+t.name+i},isNullValue:function(t){return!1},_dealData:function(t){function e(t,a,o,s){var c,d=n._getPointKey(a,t,o),f=s[d];if(f?(f._lastValue=f[n.getTargetKey()],f.moreLabelG&&f.moreLabelG.remove(),f.moreLabelG=null,f.refresh(a),c=f,s[d]=null):c=new i(a,n),c.level=o,u=Math.max(o,u),t&&(c.parent=t,t.children=t.children||[],-1==r.indexOf(t.children,c)&&t.children.push(c)),h.push(c),t&&l.push({source:t,target:c}),a.children){var s={};c.children&&c.children.forEach(function(t){s[n._getPointKey(t)]=t}),a.children.forEach(function(t){e(c,t,o+1,s)});for(var d in s)s[d]&&s[d].clearChild()}return c}var n=this,a=n.vanchart,o=t[0],s=a.ancestor;if(a.nodes&&a.nodes.forEach(function(t){t._events=null,t.graphic&&t.graphic.remove(),t.textGraphic&&t.textGraphic.remove(),t.textGraphic=t.graphic=null}),a.edges&&a.edges.forEach(function(t){t.linkGraphic&&t.linkGraphic.remove(),t.linkGraphic=null}),o){var h=[],l=[],u=0,c={};s&&(c[n._getPointKey(s)]=s),s=e(null,o,0,c);for(var d in c)c[d]&&c[d].remove();a.ancestor=s,a.maxLevel=u,a.nodes=h,a.edges=l,n.points=h}},doLayout:function(){},_calculateLabelPos:function(){},_getFixedPos:function(t,e){var i=this.vanchart,n=i.bounds,r=(t.radius+1)/1.414;return[n.x+t.posX+r,n.y+t.posY+r]},getStyle:function(t){var e=t.options;return{fill:t.color,"fill-opacity":e.fillColorOpacity,stroke:t.borderColor||t.color,"stroke-opacity":t.borderOpacity,"stroke-width":e.borderWidth}},getHighLightStyle:function(t){var e=t.options;return{fill:t.mouseOverColor||t.color,"fill-opacity":e.fillColorOpacity,"stroke-width":e.borderWidth,"stroke-opacity":t.borderOpacity,stroke:t.borderColor||t.color}},getPressedStyle:function(t){var e=t.options;return{fill:t.clickColor||t.color,"fill-opacity":e.fillColorOpacity,"stroke-width":e.borderWidth,"stroke-opacity":t.borderOpacity,stroke:t.borderColor||t.color}},_onPointMouseOver:function(t){var e=t.series,i=e.getHighLightStyle(t);t.options.image||t.graphic.nodeGraphic.animate({duration:200,ease:"back-out",style:i,attr:{r:t.radius+2}})},_onPointMouseOut:function(t){var e=t.series,i=e.getStyle(t);t.options.image||t.graphic.nodeGraphic.style(i).attr("r",t.radius)}});return t("../ChartLibrary").register(n.STRUCTURE_CHART,a),a}),define("chart/ForceBubble",["require","./Bubble","../Constants","../utils/BaseUtils","../EffectHelper","../ChartLibrary"],function(t){var e=t("./Bubble"),i=t("../Constants"),n=t("../utils/BaseUtils"),r=t("../EffectHelper"),a=e.extend({_calculateBubblePosition:function(){},_getFixedPos:function(t){var e=t.radius||0,i=this.vanchart.bounds,n=i.x+t.x+e,r=i.y+t.y+e;return[n,r]},_getAxisTypes:function(){return[]},getTargetKey:function(){return"y"},_getMoreLabelDefaultCenter:function(t){return{centerX:t.x,centerY:t.y}},isNullValue:function(t){var e=t.options;return"-"==e.x||"-"==e.y},_getPointKey:function(t){return""+(t.options?t.options.x:t.x)},effectAnimation:function(t){r.forceBubbleEffectAnimation(t,t)},getPointInitAttr:function(t){return{r:t.radius,transform:n.makeTranslate({x:0,y:0})}},getPointInitAnimationAttr:function(t){return{}},getPointUpdateAnimationAttr:function(t){return{r:t.radius,transform:n.makeTranslate({x:t.x,y:t.y})}},remove:function(){this.points.forEach(function(t){t.graphic&&(t.graphic.remove(),t.graphic=null)}),this.textGraphicGroup&&this.textGraphicGroup.remove(),this.group&&this.group.remove(),this.textGraphicGroup=this._canvas=this.group=null}});return t("../ChartLibrary").register(i.FORCE_BUBBLE_CHART,a),a}),define("chart/Map",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","./Series","../EffectHelper","../ChartLibrary","../ChartLibrary","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("./Series")),r=t("../EffectHelper"),a=n.extend({initialize:function(t,e,i){n.prototype.initialize.call(this,t,e,i),this.on(this.getEvents(),this)},getTargetKey:function(){return"value"},_getPointKey:function(t){return t.name},effectAnimation:function(t){var i=this.type===e.POINT_MAP?r.pointMapEffectAnimation:r.areaMapEffectAnimation;t.layers.forEach(function(e){i(e,t)})},getDefaultEffectTime:function(){return this.type==e.POINT_MAP?r.POINT_MAP_EFFECT_TIME:r.AREA_STYLE_EFFECT_TIME},_getFixedPos:function(t){var i=t.series.vanchart,n=t.series.type,r=t.getLatLng();if(r){var a=i.latLngToContainerPoint(r);if(n==e.AREA_MAP){var o=0,s=0;return t.options.dataLabels&&t.labelDim&&t.labelPos&&(o=t.labelDim.width/2,s=t.labelDim.height/2),[a.x+o,a.y+s]}return[a.x,a.y]}},getHighLightStyle:function(t){return{stroke:t.borderColor,fill:t.mouseOverColor,"fill-opacity":t.opacity,"stroke-width":2,"stroke-opacity":t.borderOpacity,filter:this._getShadowFilter()}},getStyle:function(t){var e=t.series.vanchart.getCurrentGeo();return t.isNull?e.defaultAreaStyle():n.prototype.getStyle.call(this,t)},_getShadowFilter:function(){var t=this,e=t.vanchart,n=e.mapRenderer;return e.mapShadowFilter=e.mapShadowFilter||n.createDropShadowFilter(0,1,.5,2),"url(#"+i.stamp(e.mapShadowFilter)+")"},_onPointMouseOver:function(t){if(this.type==e.AREA_MAP){var i=t.series.vanchart;if(i.isMapPointVisible(t)&&t.layers){var n=this.getHighLightStyle(t);t.layers&&t.layers.forEach(function(t){t.setStyle(n)})}}},_onPointMouseOut:function(t){if(this.type==e.AREA_MAP){var i=t.series.vanchart;if(i.isMapPointVisible(t)&&t.layers){var n=this.getStyle(t);t.layers&&t.layers.forEach(function(t){t.setStyle(n)})}}}});return t("../ChartLibrary").register(e.POINT_MAP,a),t("../ChartLibrary").register(e.AREA_MAP,a),t("../ChartLibrary").register(e.HEAT_MAP,a),a}),define("chart/map/LineMapDataNormalizer",["require","../../utils/BaseUtils"],function(t){function e(t,e){var i=t.name||t,n=e.getFeaturesByName(i);return n&&n.length?n.map(function(t){return{name:i,lnglat:t.geometry.coordinates}}):void 0}function i(t,e,i,r){if(t&&e){var a=0,o=t[0]||t;do{var s=0,h=e[0]||e;do{var l={};n(l,i),l.from=o,l.to=h,r.push(l)}while(h=e[++s])}while(o=t[++a])}}var n=t("../../utils/BaseUtils").extend;return function(t,n){n._loadGeo();for(var r,a=[],o=-1;r=t[++o];){var s,h,l=r.from&&r.from.lnglat,u=r.to&&r.to.lnglat;l&&u?a.push(r):(s=l?r.from:e(r.from,n),h=u?r.to:e(r.to,n),i(s,h,r,a))}return a}}),define("chart/LineMap",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","../ComponentLibrary","./Series","./map/LineMapDataNormalizer","../ChartLibrary"],function(t){var e=t("../Constants"),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../ComponentLibrary")),r=t("./Series"),a=t("./map/LineMapDataNormalizer"),o=6,s=Math.PI,h=r.extend({doLayout:i.emptyFn,_calculateLabelPos:i.emptyFn,_loadData:function(t){var e=this.vanchart.getComponent(n.GEO_COMPONENT);return a(t,e)},useCanvas:i.trueFn,getTargetKey:function(){return"value"},_getPointKey:function(t){return t=t.options||t,t.from.lnglat.join()+t.to.lnglat.join()},_getFixedPos:function(t,e){var n=i.computeArc(t.ax,t.ay,t.bx,t.by,t.curveness),r=(n[3]+n[4])/2;r%=2*s;var a=n[2]+o,h=a*Math.cos(r)+n[0],l=a*Math.sin(r)+n[1];return s/2>=r||(s>=r?h-=e.width:1.5*s>=r?(h-=e.width,l-=e.height):l-=e.height),[h,l]},remove:function(){this.points.map(function(t){t.remove()}),this.points=[]},isSupportLegendHighlight:function(){return!1}});return t("../ChartLibrary").register(e.LINE_MAP,h),h}),define("component/BaseAxis",["require","../Constants","../utils/BaseUtils","../utils/QueryUtils","../ComponentLibrary","../utils/BoundsManager","./Base","../utils/BezierEasing"],function(t){var e,i,n=t("../Constants"),r=t("../utils/BaseUtils"),a=(t("../utils/QueryUtils"),t("../ComponentLibrary")),o=(t("../utils/BoundsManager"),t("./Base")),s=t("../utils/BezierEasing"),h=400,l=s.css.swing,u=function(){return null==e&&(e=r.paddingConvertWithScale("0.1875rem")),e},c=5,d=function(){return null==i&&(i=r.paddingConvertWithScale("0.3125rem")),i},f=5,p=4,g=100,m=5,v="main",_="minor",y=15,x=o.extend({labelRotation:0,_refresh:function(){this.series=[],this.isRangePoints=!0,this.piece=null,this.forecast=[0,0],this._zoomDomain=this._dataDomain=this._domain=this._tickStart=this._step=0,this.initScale();var t=this.options,e=t.title;r.convertToREMUseDefault16PX(t.labelStyle),r.convertToREMUseDefault16PX(e&&e.style),t.tickPadding=isNaN(t.tickPadding)?6:t.tickPadding,t.tickLength=t.enableTick?isNaN(t.tickLength)?4:t.tickLength:0,t.minorTickLength=t.enableMinorTick?isNaN(t.minorTickLength)?2:t.minorTickLength:0},_calculateSize:function(t){var e=this.options;this.tickLabelLength=this._getTickLabelLength(t);var i=this._getAxisTitleLength();i+=i>0?d():0;var n=this.tickLabelLength+i,r=this.isHorizontal(),a=this.vanchart.isInverted();if(r){var o=a?e.maxWidth:e.maxHeight;n=o?Math.min(this._maxHeight(o),n):n}else{var o=a?e.maxHeight:e.maxWidth;n=o?Math.min(this._maxWidth(o),n):n}this._size=Math.round(n)},_recordAxisSize:function(){this.isOnZero()||(this.vanchart.axisSize[this.getPosition()]+=this._size)},calculateDomainFromData:function(t){if(!t){var e=this.series;if(this.byPercent=!1,!this._isBaseAxis())for(var i=0,n=e.length;n>i&&!this.byPercent;i++)this.byPercent=e[i].options.stackByPercent;t=this._getDomainFromData()}this.indicator&&this._calculateCateDomainData(),this._dataDomain=t;var r=this.vanchart.getComponent(a.ZOOM_COMPONENT),o=this._zoomDomain||r&&r.getZoomInitDomain(this);if(this._isBaseAxis()&&o){var s=parseFloat(o[0]),h=parseFloat(o[1]);if(!isNaN(s)&&!isNaN(h)){var l=s;s=Math.min(s,h),h=Math.max(l,h)}this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],isNaN(s)?null:s,isNaN(h)?null:h)}else{var u=this.options;this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],u.min,u.max)}this._calculateDateFormat&&this._calculateDateFormat()},_calculateNiceDomain:function(t,e,i,n){var r=this.options;return r.log?this._calculateLogNiceDomain(t,e,i,n):this.byPercent?this._calculatePercentValueDomain(t,e,i,n):this._calculateValueNiceDomain(t,e,i,n)},calculateDomainFromZoom:function(){var t=this._zoomDomain,e=this.options;if(this._isBaseAxis())this._calculateNiceDomain(this._dataDomain[0],this._dataDomain[1],t[0],t[1]);else{var i=r.hasDefined(e.min)?Math.max(e.min,t[0]):t[0],n=r.hasDefined(e.max)?Math.min(e.max,t[1]):t[1];if(i>n)return;var o=this.type==a.VALUE_AXIS_COMPONENT&&r.hasNotDefined(e.min),s=this.isLog()?1:0;i=o?Math.min(s,i):i,this._calculateNiceDomain(t[0],t[1],i,n)}},isCategory:function(){return this.type==a.CATEGORY_AXIS_COMPONENT},zoomRefresh:function(t){this._zoomDomain=t,this.calculateDomainFromZoom()},axisZoom:function(t,e){var i,n,o=this.type==a.DATE_AXIS_COMPONENT,s=o?1e3:1e-11,h=this.vanchart.bounds;this.isHorizontal()?(i=Math.min(t.x,e.x)-h.x,n=Math.max(t.x,e.x)-h.x,i=Math.max(i,0),n=Math.min(n,h.width)):(i=Math.min(t.y,e.y)-h.y,n=Math.max(t.y,e.y)-h.y,i=Math.max(i,0),n=Math.min(n,h.height));var l=this.scale.invert(i),u=this.scale.invert(n);o&&(l=r.date2int(l),u=r.date2int(u)),Math.abs(l-u)<s||this.zoomRefresh([Math.min(l,u),Math.max(l,u)])},getAxisValue:function(t){return t},getTrendLineForecast:function(t){var e=t.options.trendLine;if(e&&e.period&&2===e.period.length){var i=e.period;this.forecast[0]=Math.min(0,i[0]),this.forecast[1]=Math.max(0,i[1])}},_getStartAndEndTick:function(){return this._domain},updateClipBounds:function(t){var e,i,r,a,o=this.isHorizontal(),s=this.isAxisReversed(),h=this.options;if(this.options.showLabel){var l=this._getStartAndEndTick(),u=this._getTickDim(this._getTickContent(l[0],h.formatter)),c=this._getTickDim(this._getTickContent(l[1],h.formatter));s?(r=c,a=u):(r=u,a=c),e=o?r.width:r.height,i=o?a.width:a.height,e=Math.round(e/2)+m,i=Math.round(i/2)+m,this.showArrow()&&(i=Math.max(i,y))}else e=0,i=this.showArrow()?y:0;var d=this.vanchart.bounds;if(o){var f=this.vanchart.axisSize,p=d.x+f.left+m,g=f.right+m;if(this.isCategory()&&!this.isRangePoints){var v=this._zoomDomain||this._dataDomain,_=(d.width-f.left-f.right)/v.length;p+=Math.round(_/2),g+=Math.round(_/2)}this.options.labelRotation<=-15?e=Math.round(2*(e-m)):this.options.labelRotation>=15&&(i=Math.round(2*(i-m))),e=Math.max(e-p,0)+m,i=Math.max(i-g,0)+m,t[n.LEFT]=Math.max(t[n.LEFT]||0,e),t[n.RIGHT]=Math.max(t[n.RIGHT]||0,i)}else t[n.TOP]=Math.max(t[n.TOP]||0,i),t[n.BOTTOM]=Math.max(t[n.BOTTOM]||0,e)},updateAxisSizeAndBounds:function(){this._setComponentBounds(this.getPosition(),this._size)},fixScaleAndTickData:function(){this.scale.domain(this._domain).rangeRound(this._getRange()),this._updateOriginTickData(),this._calculateTickPosAndStep()},dealOnZero:function(){var t=this.options;if(t.onZero){var e=t.onZero===!0?0:t.onZero,i=this.componentType==a.X_AXIS_COMPONENT?a.Y_AXIS_COMPONENT:a.X_AXIS_COMPONENT;i=this.vanchart.getComponent(i).getAxis(e);var r,o,s,h,l=i.getZeroPos(),u=this.vanchart.bounds;this.isHorizontal()?(r=u.x,o=l+u.y-(this.getPosition()==n.TOP?this.bounds.height:0),s=u.width,h=this.bounds.height):(r=l+u.x-(this.getPosition()==n.LEFT?this.bounds.width:0),o=u.y,s=this.bounds.width,h=u.height),this.bounds={x:r,y:o,width:s,height:h}}},_getTickLabelLength:function(t){var e=this.options,i=0,n=0,r=this.isHorizontal();if(e.showLabel&&(i=isNaN(+e.tickPadding)?u():e.tickPadding),e.enableTick&&(i+=isNaN(+e.tickLength)?c:e.tickLength),t)t.forEach(function(t){var e=t.tickDim;n=Math.max(n,r?e.height:e.width)});else for(var a=this._getTickValues(),o=0,s=a.length;s>o;o++){var h=this._getTickDim(this._getTickContent(a[o],e.formatter));n=Math.max(r?h.height:h.width,n)}return i+(e.showLabel?n:0)},_getTickDim:function(t){var e=this.options,i=e.useHtml,n=e.labelRotation||0,a=e.labelStyle||{};return r.getTextDimensionWithRotation(t,a,i,n)},_updateOriginTickData:function(){var t=this._getTickValues(),e=this.options,i=e.formatter,n=e.useHtml;isNaN(e.labelRotation)?e.autoRotate?this.labelRotation=this.getLabelAutoRotation(t,e,i):this.labelRotation=0:this.labelRotation=e.labelRotation,this.tickData=[];for(var o=e.labelStyle||{},s=r.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},o),h=0,l=t.length;l>h;h++){var u=t[h],c=this._getTickContent(u,i);this.type===a.CATEGORY_AXIS_COMPONENT&&c&&(c=c.trim());var d,f,p=o,g=this.labelRotation;90===Math.abs(g)&&r.hasChn(c)&&(g=360,p=s),d=r.getTextDimension(c,p,n),f=r.getTextDimRotated(d,g),n&&(f.width=isNaN(parseFloat(e.labelWidth))?f.width:parseFloat(e.labelWidth),f.height=isNaN(parseFloat(e.labelHeight))?f.height:parseFloat(e.labelHeight)),this.tickData.push({tickValue:u,tickContent:c,tickDim:f,tickRectDim:d,labelRotation:g})}},_isBaseAxis:function(){return this.series.length?this.componentType==this.series[0].getBaseAxisType():!1},getLabelAutoRotation:function(){return 0},_getAxisTitleLength:function(){var t=this.options.title,e=0;if(t){var i,n;this.titleRotation=t.rotation,r.hasChn(t.text)&&90===Math.abs(t.rotation)&&(this.titleRotation=360,t.style=r.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},t.style)),i=r.getTextDimension(t.text,t.style,t.useHtml),n=r.getTextDimRotated(i,this.titleRotation),this.titleRectDim=i,this.titleDim=n,e=this.isHorizontal()?n.height:n.width}return e},getAxisTitleBounds:function(){var t=this.bounds,e=this.tickLabelLength+d(),i=this.getPosition(),r=t.x,a=t.y,o=t.width,s=t.height;switch(i){case n.LEFT:o-=e;break;case n.BOTTOM:a+=e,s-=e;break;case n.RIGHT:r+=e,o-=e;break;case n.TOP:s-=e}return{x:r,y:a,width:Math.max(o,0),height:Math.max(s,0)}},getTickLength:function(){var t=this.scale.range();return Math.abs(t[0]-t[1])/Math.max(this.tickData.length,1)},adjustDomain4Radius:function(){if(this.type===a.VALUE_AXIS_COMPONENT||this.type===a.DATE_AXIS_COMPONENT){var t=this._domain,e=this.type==a.DATE_AXIS_COMPONENT,i=this._getRange(),o=this._dataDomain,s=Math.max((t[0]+"").length,(t[1]+"").length);e&&(t=[r.int2date(t[0]),r.int2date(t[1])]);var h=this.scale.domain(t).range(i),l=this,u=this._isBaseAxis(),c=this.componentType===a.X_AXIS_COMPONENT?"x":"y",d=Number.MAX_VALUE,f=-Number.MAX_VALUE;if(this.series.map(function(t){if(t.visible&&((t.type===n.BUBBLE_CHART||t.type===n.SCATTER_CHART)&&t.points.map(function(t){var e=h(l.getAxisValue(t[c],t));if(t.visible&&!t.isNull&&!isNaN(e)){var i=r.pick(t.radius,t.options.marker&&t.options.marker.radius);d=Math.min(d,e-i),f=Math.max(f,e+i)}}),u&&(t.type===n.COLUMN_CHART||t.type===n.BAR_CHART||t.type===n.LINE_CHART||t.type===n.AREA_CHART))){var e=t.points;if(!e.length)return;var i,a=h(o[0]),s=h(o[1]),p=Math.min(a,s),g=Math.max(a,s);i=t.type===n.COLUMN_CHART||t.type===n.BAR_CHART?t.getSeriesOffsetAndWidth().width/2:e[0].options.marker&&e[0].options.marker.radius||1,isNaN(p)||(d=Math.min(d,p-i)),isNaN(g)||(f=Math.max(f,g+i))}}),d===Number.MAX_VALUE||f===-Number.MAX_VALUE)return;var p=h.invert(d),g=h.invert(f);e&&(p=r.date2int(p),g=r.date2int(g)),this.calculateDomainFromData([Math.min(Math.min(p,g),o[0]),Math.max(Math.max(p,g),o[1])]);var m=Math.max((this._domain[0]+"").length,(this._domain[1]+"").length);if(m>s)return!0}},_getRange:function(){return this._getPlotRange()},_getPlotRange:function(){var t=this.vanchart.bounds;return this.isHorizontal()?this.isAxisReversed()?[t.width,0]:[0,t.width]:this.isAxisReversed()?[0,t.height]:[t.height,0]},_getPlotBands:function(){var t=this.options.plotBands,e=this.scale,i=!(!e.rangeBand||!e.rangeBand());if("string"==typeof t){var n=t;t=[];for(var a=this._getTickValuesWithEndValue(),o=i?-1:0,s=a.length-1;s>o;s-=2)t.push({color:n,from:i?a[s]:a[s-1],to:a[s]})}else{t=t||[];for(var h=[],l=0,u=t.length;u>l;l++){var c=t[l];r.hasDefined(c.from)&&r.hasDefined(c.to)&&h.push(c)}t=h}return t},_getTickValuesWithEndValue:function(){var t=this._getTickValues(),e=this._domain[1],i=this.type==a.DATE_AXIS_COMPONENT;if(t.length){var n=t[t.length-1];i?r.date2int(n)<e&&t.push(r.int2date(e)):e>n&&t.push(e)}return t},getTickData:function(){return this.tickData},getMinorTickData:function(){var t=[],e=this.options,i=this._step;if(this.options.enableMinorTick&&this.tickData.length)if(this.type==a.CATEGORY_AXIS_COMPONENT){var n=Math.round(this.getTickLength()/5),o=this.tickData.length;o=this.isRangePoints?o-1:o;for(var s=0;o>s;s++)for(var h=this.tickData[s].tickPos,l=1;5>l;l++)t.push(h+n*l)}else{for(var u=e.minorTickInterval?e.minorTickInterval:i/5,s=0,c=this.tickData.length;c-1>s;s++){var d=this.tickData[s].tickValue,f=this.tickData[s+1].tickValue,p=d instanceof Date&&f instanceof Date;d=p?r.date2int(d):d,f=p?r.date2int(f):f;for(var g=r.accAdd(d,u);f>g;g=r.accAdd(g,u))t.push(p?r.int2date(g):g)}var m=this.tickData[this.tickData.length-1].tickValue,v=this.scale.domain()[1],p=m instanceof Date&&v instanceof Date;if(m=p?r.date2int(m):m,v=p?r.date2int(v):v,v>m)for(var g=m+u;v>=g;g+=u)t.push(p?r.int2date(g):g);var _=this.tickData[0].tickValue,y=this.scale.domain()[0];if(p=_ instanceof Date&&y instanceof Date,_=p?r.date2int(_):_,y=p?r.date2int(y):y,_>y)for(g=_-u;g>=y;g-=u)t.push(p?r.int2date(g):g)}return t},getMaxTickWidth:function(){var t=0;return this.tickData.forEach(function(e){t=Math.max(t,e.tickDim.width)}),t},getTickHeight:function(){return this.options.labelStyle&&this.options.showLabel?r.getTextHeight(this.options.labelStyle):0},_calculateTickPosAndStep:function(){var t=this.options,e=this.scale,i=this.getTickLength(),n=e.rangeBand?e.rangeBand()/2:0;if(this.tickData.forEach(function(t){t.tickPos=e(t.tickValue),t.tickLabelPos=t.tickPos+n}),t.showLabel)if(t.step){var a=0;this.tickData.forEach(function(e){a++%t.step&&(e.tickContent="")})}else{var o,s=this.isHorizontal(),h=1,l=1,u=Math.abs(Math.abs(this.labelRotation)-(s?0:90)),c=u>=15&&90!==u;o=r.toRadian(u);var d,f,p,g,m=-1,v=Math.sin(o);this.tickData.forEach(function(t){if(""!==t.tickContent)if(c)g=t.tickRectDim.height,f=Math.abs(t.tickPos-d),p=(g+m)/2,f*v>p||-1===m?(h=1,d=t.tickPos,m=g):(h++,l=Math.max(l,h));else{var e=s?t.tickDim.width:t.tickDim.height;i&&(l=Math.max(l,Math.ceil(e/i)))}});var a=0;this.tickData.forEach(function(t){a++%l&&(t.tickContent="")})}else this.tickData.forEach(function(t){t.tickContent=""})},_getAxisOriginPoint:function(){var t,e,i=this.bounds,r=this.getPosition();switch(r){case n.TOP:t=i.x,e=i.y+i.height;break;case n.BOTTOM:t=i.x,e=i.y;break;case n.LEFT:t=i.x+i.width,e=i.y;break;case n.RIGHT:t=i.x,e=i.y}return{x:t,y:e}},getPosition:function(){var t=this.componentType==a.X_AXIS_COMPONENT?"bottom":"left",e=this.options.position||t;if(!this.vanchart.isInverted())return e;switch(e){case n.TOP:return n.RIGHT;case n.RIGHT:return n.BOTTOM;case n.BOTTOM:return n.LEFT;case n.LEFT:return n.TOP}},isAxisReversed:function(){return this.componentType===a.X_AXIS_COMPONENT&&this.vanchart.isInverted()?!this.options.reversed:this.options.reversed},isOnZero:function(){return this.options.onZero},getLineWidth:function(){return this.options.lineWidth},showArrow:function(){return this.options.showArrow},getTitleAlign:function(){var t=this.options.title;if(!t)return null;var e=t.align||"center";if(this.vanchart.isInverted())switch(e){case n.TOP:return n.RIGHT;case n.RIGHT:return n.BOTTOM;case n.BOTTOM:return n.LEFT;case n.LEFT:return n.TOP}return e},_calculateLogNiceDomain:function(t,e,i,n){var a=this.options,o=a.log,s=parseInt(r.pick(a.tickInterval,1));t=t>=1?1:t,t=0>=t?1:t,t=r.pick(i,t),e=r.pick(n,e),t=Math.pow(o,Math.floor(r.log(o,t))),e=Math.pow(o,Math.ceil(r.log(o,e))),this._domain=[t,e],this._tickStart=t,this._step=s},_calculatePercentValueDomain:function(t,e,i,n){var a=this.options,o=r.pick(i,0),s=r.pick(n,1),h=r.pick(a.tickInterval,.25);
this._domain=[o,s],this._tickStart=o,this._step=h},_calculateValueNiceDomain:function(t,e,i,n){var o=this.type==a.VALUE_AXIS_COMPONENT&&!this._isBaseAxis(),s=this.options;o&&(t>0?t=0:0>e&&(e=0)),t=r.hasDefined(i)?i:t,e=r.hasDefined(n)?n:e,t>=e&&(e=t+g*(this.type===a.DATE_AXIS_COMPONENT?1e3:1));var h=s.tickInterval||this._linearTickInterval(t,e),l=this._linearNiceDomain(t,e,h);t=r.hasDefined(i)?i:l[0],e=r.hasDefined(n)?n:l[1],t>=e&&(e=t+g*(this.type===a.DATE_AXIS_COMPONENT?1e3:1));var u=l[0];if(r.hasDefined(i)){var c=r.accMul(Math.ceil(r.accDiv(r.accAdd(i,-u),h)),h);u=r.accAdd(u,c)}this._domain=[t,e],this._tickStart=u,this._step=h},_linearTickInterval:function(t,e,i){i=i||this._getDefaultTickCount();var n=e-t,r=Math.pow(10,Math.floor(Math.log(n/i)/Math.LN10)),o=i/n*r;return.15>=o?r*=10:.35>=o?r*=5:.75>=o&&(r*=2),this.type===a.DATE_AXIS_COMPONENT&&(r=Math.max(r,1e3)),r},_linearNiceDomain:function(t,e,i){return t=r.accMul(Math.floor(t/i),i),e=r.accMul(Math.ceil(e/i),i),[t,e]},_getDefaultTickCount:function(){return this.vanchart.options.chartType==n.RADAR_CHART?p:f},getIndexByPosition:function(t){var e,i=this.getPlotBounds(),n=this.scale,o=n(this.isAxisReversed()?n.domain()[n.domain().length-1]:n.domain()[0]);e=this.isHorizontal()?t[0]-i.x-o:t[1]-i.y-o;var s;switch(this.type){case a.DATE_AXIS_COMPONENT:s=r.date2int(n.invert(e));break;default:s=n.invert(e)}return s=Math.round(s)},_valueInDomain:function(){return!0},render:function(){this.lastScale=this.scale&&this.scale.copy();var t=this.vanchart,e=t.renderer;this.axisGroup||(this.axisGroup=this.createComponentGroup(),e.clip(this.clipAxisGroup=this.createComponentGroup(),t.plotClip));var i=this.bounds,n={x:i.x,y:i.y,width:i.width,height:i.height};this.isHorizontal()?(n.x=0,n.width=t.width):(n.y=0,n.height=t.height),this.axisGroupClip?e.updateClip(this.axisGroupClip,n):(this.axisGroupClip=e.createClip(n),e.clip(this.axisGroup,this.axisGroupClip)),this.axisLineGroup||(this.axisLineGroup=e.group().addTo(t.seriesGroup)),0!==this.series.length&&(this._drawPlotBands(),this._drawGridLine(),this._drawTickLine(),this._drawTickLabel(),this._drawPlotLines(),this._drawAxisTitle(),this._drawAxisLine())},isLog:function(){return this.options.log},getZeroPos:function(){switch(this.type){case a.VALUE_AXIS_COMPONENT:return this.isLog()?this.scale(1):this.scale(0);case a.DATE_AXIS_COMPONENT:return this.scale(r.int2date(0));case a.CATEGORY_AXIS_COMPONENT:return 0}},_drawPlotBands:function(){var t,e,i,n,a,o=this._getPlotBands(),s=this.scale,u=s.rangeBand,c=u?s.rangeBand():0,d=this.vanchart.renderer,f=this.vanchart.bounds,p=this,g=p.isHorizontal(),m=0,v=0,_=f.width,y=f.height;for(this.plotBandsGroup||(this.plotBandsGroup=d.group().addTo(this.clipAxisGroup),this.plotBands=[]),this.plotBandsGroup.attr({transform:r.makeTranslate(f)}),t=o.length;t<this.plotBands.length;t++)this.plotBands[t]&&this.plotBands[t].remove(),this.plotBands[t]=null;for(this.plotBands.length=o.length,t=0,e=o.length;e>t;t++){var x=o[t],b=s(x.from),T=s(x.to);i=Math.min(b,T),n=Math.max(b+c,T+c),i=Math.max(g?m:v,i),n=Math.min(g?_:y,n),a=g?{x:i,y:v,width:Math.max(n-i,0),height:y}:{x:m,y:i,width:_,height:Math.max(n-i,0)},this.plotBands[t]=this.plotBands[t]||d.rect(a).addTo(this.plotBandsGroup),this.plotBands[t].style({fill:x.color}).animate({duration:h,ease:l,attr:a})}},_drawAxisLine:function(){var t=this.options,e=t.lineWidth,i=t.lineColor,n=this.getPlotBounds(),a=this._getAxisOriginPoint(),o="x1",s="y1",h="x2",l="y2",u=n.width,c=this.vanchart.renderer;this.isHorizontal()||(o="y1",s="x1",h="y2",l="x2",u=n.height);var d=r.lineSubPixelOpt(0,e);this.axisLine||(this.axisLine=c.line().addTo(this.axisLineGroup));var f={};if(f[o]=0,f[h]=u,f[s]=f[l]=d,f.transform=r.makeTranslate(a),this.axisLine.attr(f).style({stroke:i,"stroke-width":e}),this.showArrow()){this.arrowGroup||(this.arrowGroup=c.group().addTo(this.axisLineGroup));var p=this.arrowGroup.line||c.line().addTo(this.arrowGroup),g=this.arrowGroup.path||c.path().addTo(this.arrowGroup);this.arrowGroup.line=p,this.arrowGroup.path=g,this.isHorizontal()?(this.arrowGroup.attr("transform",r.makeTranslate([a.x+n.width,a.y])),p.attr({x1:0,y1:d,x2:6,y2:d}).style({stroke:i,"stroke-width":e}),g.attr({d:"M2,-4 L10,0 L2,4 L6,0 L2,-4"}).style({fill:i})):(this.arrowGroup.attr("transform",r.makeTranslate(a)),p.attr({x1:d,y1:0,x2:d,y2:-6}).style({stroke:i,"stroke-width":e}),g.attr({d:"M-4,-2 L0,-10 L4,-2 L0,-6 L-4,-2"}).style({fill:i}))}else this.arrowGroup&&this.arrowGroup.remove()},_drawGridLine:function(){var t=this.options,e=this.getPlotBounds(),i=this.getTickData(),o=this.scale,s=this.lastScale||o,u=t.gridLineColor,c=t.gridLineWidth;0===c&&(u="");var d=r.lineSubPixelOpt(0,c),f=this.vanchart.renderer,p="x1",g="y1",m="x2",v="y2",_=e.height;this.isHorizontal()||(p="y1",g="x1",m="y2",v="x2",_=e.width),this.gridLinesGroup||(this.gridLinesGroup=f.group().addTo(this.clipAxisGroup),this.gridLines=[]),this.gridLinesGroup.attr("transform",r.makeTranslate(e));for(var y=this.type==a.CATEGORY_AXIS_COMPONENT?[{tickPos:this.getPosition()==n.BOTTOM?e.width:e.height-1}]:[],x=this._bindData(this.gridLines,i.concat(y),function(t){return t.tickValue}),b=[],T=0,A=x.exit.length;A>T;T++){var C=x.exit[T].datum(),L=o(C.tickValue),P={};P[p]=L,P[m]=L,x.exit[T].animate({duration:h,ease:l,attr:P,style:{opacity:0}}).remove()}for(var T=0,A=x.enter.length;A>T;T++){var C=x.enter[T],M=f.line().style({stroke:u,"stroke-width":c}).addTo(this.gridLinesGroup),w=s(C.tickValue)+d,L=C.tickPos+d;w=isNaN(w)?L:w,M.attr(p,w).attr(m,w).attr(g,0).attr(v,_);var P={};P[p]=L,P[m]=L,P[g]=0,P[v]=_,M.animate({attr:P,duration:h,ease:l}),M.datum(C),b.push(M)}b=b.concat(x.update);for(var T=0,A=b.length;A>T;T++){var M=b[T].style({stroke:u,"stroke-width":c}),C=M.datum(),L=C.tickPos+d,P={};P[p]=L,P[m]=L,P[g]=0,P[v]=_,M.animate({attr:P,duration:h,ease:l})}this.gridLines=b},_drawTickLine:function(){function t(t,e,n){var o,s,h=m._bindData(t,e),l=[];for(o=0,s=h.exit.length;s>o;o++)h.exit[o].remove();for(o=0,s=h.enter.length;s>o;o++)l.push(g.line().datum(h.enter[o]).addTo(m.tickLinesGroup));for(l=l.concat(h.update),o=0,s=l.length;s>o;o++){var u,c=l[o].datum(),d={};u=r.hasDefined(c.tickPos)?c.tickPos:m.type==a.CATEGORY_AXIS_COMPONENT?c:m.scale(c);var f=i.x,p=i.y;m.isHorizontal()||(f=i.y,p=i.x),d[y]=u+n.det+f,d[b]=d[y],d[x]=p,d[T]=(A*n.tickLength||0)+p,l[o].attr(d).style({stroke:n.tickColor,"stroke-width":n.tickWidth})}return l}var e=this.options,i=this._getAxisOriginPoint(),o=this.getPosition(),s=this.getTickData(),h=e.enableTick?e.tickLength||0:0,l=e.tickWidth||1,u=e.tickColor,c=this.getMinorTickData(),d=e.enableMinorTick?e.minorTickLength||0:0,f=e.minorTickColor,p=e.minorTickWidth||1,g=this.vanchart.renderer,m=this,y="x1",x="y1",b="x2",T="y2";this.isHorizontal()||(y="y1",x="x1",b="y2",T="x2");var A=o==n.TOP||o==n.LEFT?-1:1,C=r.lineSubPixelOpt(0,l),L=r.lineSubPixelOpt(0,p);this.tickLinesGroup||(this.tickLinesGroup=g.group().addTo(this.axisGroup),this.tickLines={},this.tickLines[v]=[],this.tickLines[_]=[]),this.tickLines[v]=t(this.tickLines[v],s,{det:C,tickWidth:l,tickLength:h,tickColor:u}),this.tickLines[_]=t(this.tickLines[_],c,{det:L,tickWidth:p,tickLength:d,tickColor:f})},_drawPlotLines:function(){function t(t){return{stroke:t.color,"stroke-width":t.width,"stroke-dasharray":t.dataArray}}function e(t){return f.text().textContent(t.text).style(t.style).attr({x:t.textX,y:t.textY,"text-anchor":"left",dy:.85*t.textDim.height})}function i(t,i){i._textG&&(i._textG.remove(),i._textG=null),t.text&&t.textDim&&(i._textG=e(t).addTo(i))}var o=this.options.plotLines||[],s=(this.getPosition(),this.vanchart.bounds),h=this.scale,l=this.type==a.DATE_AXIS_COMPONENT,c=[],d=this,f=this.vanchart.renderer;o.forEach(function(t){if(!r.isEmpty(t.value)){var e,i,a,o,f=h(l?r.object2date(t.value):t.value)+(h.rangeBand?h.rangeBand()/2:0),p=r.lineSubPixelOpt(f,t.width);if(d.isHorizontal()){if(0>f||f>s.width)return;e=i=p,a=0,o=s.height}else{if(0>f||f>s.height)return;e=0,i=s.width,a=o=p}var g,m,v,_;if(t.label&&t.label.text&&t.label.style){_=t.label.style,v=t.label.text;var y=t.label.align,x=r.getTextDimension(v,_,t.label.useHtml);switch(y){case n.TOP:g=e-x.width,m=a;break;case n.BOTTOM:g=e-x.width,m=o-x.height;break;case n.LEFT:g=e,m=a-x.height-u();break;case n.RIGHT:g=i-x.width,m=o-x.height-u()}}c.push({color:t.color,line:{x1:e,y1:a,x2:i,y2:o},width:t.width,dataArray:n.DASH_TYPE[t.dashStyle],text:v,textDim:x,style:_,textX:g,textY:m})}}),this.plotLinesGroup||(this.plotLinesGroup=f.group().addTo(this.vanchart.backGroup),this.plotLines=[]),this.plotLinesGroup.attr("transform",r.makeTranslate(s));var p,g,m=this._bindData(this.plotLines,c);for(this.plotLines=[],p=0,g=m.exit.length;g>p;p++)m.exit[p].remove();for(p=0,g=m.enter.length;g>p;p++){var v=m.enter[p],_=f.group();this.plotLines.push(_),_._lineG=_.append(f.line(v.line).style(t(v))),i(v,_),_.addTo(this.plotLinesGroup)}for(p=0,g=m.update.length;g>p;p++){var _=m.update[p],v=_.datum();_._lineG.attr(v.line).style(t(v)),i(v,_),this.plotLines.push(_)}},_drawTickLabel:function(){this._drawSvgTickLabel()},_drawSvgTickLabel:function(){var t=this,e=this.vanchart,i=e.renderer,n=this.scale,a=this.lastScale||n,o=this.options,s=o.labelStyle,u=o.useHtml,c=this.getTickData().filter(function(t){return""!==t.tickContent});this.tickLabelsGroup||(this.tickLabelsGroup=i.vgroup().add(),this.axisGroup.append(this.tickLabelsGroup.renderG),this.tickLabels=[]);var d,f,p=this._bindData(this.tickLabels,c,function(t){return t.tickValue}),g=[],m={duration:h,ease:l,style:{opacity:0}};for(d=0,f=p.exit.length;f>d;d++){var v=p.exit[d].datum(),_=n(v.tickValue);p.exit[d].animate(r.extend({},m,t.isHorizontal()?{x:_}:{y:_}))}for(d=0,f=p.enter.length;f>d;d++){var v=p.enter[d],y=this._getLabelAttr(a,v),x=this.tickLabelsGroup.append(i.vtext(u).textContent(v.tickContent).style({opacity:0})),b=v.labelRotation%360?x.vRotate(v.labelRotation,!0).rotateStr:"";y.transform+=b,x.attr(y),x.datum(v),g.push(x)}for(g=g.concat(p.update),d=0,f=g.length;f>d;d++){var x=g[d],v=x.datum();x.textContent(v.tickContent).style(s);var y=this._getLabelAttr(n,v),T=this._valueInDomain(v.tickValue)?1:0;if(this.useHtmlLabel())x.attr(y).style({opacity:T}),x.vRotate(v.labelRotation);else{var b=v.labelRotation%360?x.vRotate(v.labelRotation,!0).rotateStr:"";y.transform+=b,x.animate({ease:l,duration:h,attr:y,style:{opacity:T}})}}this.tickLabels=g},_getLabelAttr:function(t,e){var i,a,o=this._getAxisOriginPoint(),s=t.rangeBand?t.rangeBand()/2:0,h=t(e.tickValue)+s,l=this.options,u=this.isHorizontal(),c=l.enableTick?l.tickLength:0,d=l.tickPadding+c||0,f=e.labelRotation||0,p=(l.labelStyle,l.useHtml),g=this.getPosition(),m=g==n.TOP||g==n.LEFT?-1:1,v=e.tickRectDim,_=e.tickDim,y=0,x=0,b=0,T=.85*v.height,A=r.toRadian(f);360===f&&(b=p||r.isMS?0:.85*v.width/2,T=0,a="tb-rl"),u?(i=Math.abs(f%90)<15?0:f>0?1:-1,x+=m*(_.height-v.height)/2,y+=m*i*(_.width-Math.abs(v.height*Math.sin(A)))/2,g===n.TOP&&(x-=v.height),x+=m*d,y+=o.x+h-v.width/2,x+=o.y):(i=Math.abs(f%90)>85?0:f>0?1:-1,y+=m*(_.width-v.width)/2,x+=m*i*(_.height-v.height*Math.cos(A))/2,g===n.LEFT&&(y-=v.width),y+=m*d,y+=o.x,x+=o.y+h-v.height/2);var C=p?"px":"",L="translate("+y+C+" "+x+C+")",P={transform:L,dy:T,dx:b,writingMode:a,"writing-mode":a};return p&&a&&(P["-webkit-writing-mode"]="vertical-rl"),P},_drawAxisTitle:function(){var t=this.options,e=t.title;if(!e||!e.text)return this.titleGroup&&this.titleGroup.remove(),void(this.titleGroup=null);var i=this.vanchart.renderer,a=this.axisGroup,o=e.useHtml,s=this.titleRotation,h=this.getTitleAlign(),l=e.text,u=e.style,c=this.titleDim,d=this.titleRectDim,f=this.getAxisTitleBounds();this.titleGroup||(this.titleGroup=i.vgroup().add(),a.append(this.titleGroup.renderG)),this.titleGroup.attr({transform:r.makeTranslate(f)});var p=this.titleGroup;p.text||(p.text=p.append(i.vtext(o)));var g=0,m=0,v=0,_=.85*d.height;switch(h){case n.TOP:m=0;break;case n.BOTTOM:m=f.height-c.height;break;case n.LEFT:g=0;break;case n.RIGHT:g=f.width-c.width;break;case n.CENTER:default:this.isHorizontal()?g=(f.width-c.width)/2:m=(f.height-c.height)/2}360===this.titleRotation?(v=o||r.isMS?0:.85*d.width/2,_=0):(g+=(c.width-d.width)/2,m+=(c.height-d.height)/2),p.text.textContent(l).attr({x:g,y:m,dy:_,dx:v}).style(u),s%360&&p.text.vRotate(s)},remove:function(){this.axisGroup&&this.axisGroup.remove(),this.clipAxisGroup&&this.clipAxisGroup.remove(),this.axisGroup=this.clipAxisGroup=null,this.axisLineGroup&&this.axisLineGroup.remove(),this.axisLineGroup=null,this.tickLabelsGroup&&this.tickLabelsGroup.remove(),this.tickLabelsGroup=null}});return x}),define("component/CategoryAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale"],function(t){var e,i=(t("./Base"),t("./BaseAxis")),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=t("../utils/Scale"),s=function(){return null==e&&(e=n.paddingConvertWithScale("0.1875rem")),e},h=i.extend({type:a.CATEGORY_AXIS_COMPONENT,initScale:function(){this.lastScale=this.scale,this.scale=o.ordinal()},calculateDomainFromData:function(){this._dataDomain=this._getDomainFromData();var t=this.vanchart.getComponent(a.ZOOM_COMPONENT);this._zoomDomain=this._zoomDomain||t&&t.getZoomDomain(this),this._domain=this._zoomDomain||this._dataDomain},calculateDomainFromZoom:function(){this._domain=this._zoomDomain},_getStartAndEndTick:function(){return[this._domain[0],this._domain[this._domain.length-1]]},_getDomainFromData:function(){var t=this.options,e=this.series,i=this,n={},a=t.categories||[];return a.forEach(function(t){n[t]=!0}),e.forEach(function(t){this.getTrendLineForecast(t);for(var e=0,o=t.points.length;o>e;e++){var s=t.points[e].category;n[s]||(n[s]=!0,a.push(s))}t.type!==r.AREA_CHART&&(i.isRangePoints=!1)},this),this.addTrendLineCategories(a)},setCategories:function(t){var e=this._dataDomain;this._dataDomain=this.addTrendLineCategories(t);var i=this.vanchart.getComponent(a.ZOOM_COMPONENT);if(this._isBaseAxis()&&i&&i.zoomToolEnabled()){i.updateRangeLeftAndRight(this,e,t);var n=i&&i.getZoomDomain(this);this._zoomDomain=n,this.calculateDomainFromZoom()}else this._domain=this._dataDomain,this._zoomDomain=null;this.fixScaleAndTickData()},addTrendLineCategories:function(t){function e(t,e){return Array.apply(null,Array(t)).map(e)}if(this.forecast&&(this.forecast[0]||this.forecast[1])){var i=0;t=e(-this.forecast[0],function(){return Array(2+i++).join(" ")}).concat(t).concat(e(this.forecast[1],function(){return Array(2+i++).join(" ")}))}return t},getOriginalCategories:function(){return this.forecast&&(this.forecast[0]||this.forecast[1])?this._dataDomain.slice(-this.forecast[0],this._dataDomain.length-this.forecast[1]):this._dataDomain},updateAxisSizeAndBounds:function(){this._updateOriginTickData(),this._calculateSize(this.tickData),this._setComponentBounds(this.getPosition(),this._size)},_getTickValuesWithEndValue:function(){return this._getTickValues()},fixScaleAndTickData:function(){this.scale.domain(this._dataDomain),this.isRangePoints?this.scale.rangePoints(this._getRange()):this.scale.rangeBands(this._getRange()),this._updateOriginTickData(),this._calculateTickPosAndStep()},_getRange:function(){var t=this._getPlotRange();if(this._dataDomain.length==this._domain.length)return t;var e,i=Math.abs(t[1]-t[0]);e=this.isRangePoints?i/Math.max(this._domain.length-1,1):i/this._domain.length;var r=n.indexOf(this._dataDomain,this._domain[0]),a=this._dataDomain.length-n.indexOf(this._dataDomain,this._domain[this._domain.length-1])-1;if(!(this.isAxisReversed()^this.isHorizontal())){var o=r;r=a,a=o}var s=-r*e,h=i+a*e;return this.isHorizontal()?this.isAxisReversed()?[h,s]:[s,h]:this.isAxisReversed()?[s,h]:[h,s]},getLabelAutoRotation:function(t,e,i){if(e.autoRotate&&!e.labelRotation){var r,a,o=this.vanchart.isInverted(),h=t.reduce(function(t,e){return n.getTextDimension(t).width>n.getTextDimension(e).width?t:e}),l=this._getTickContent(h,i),u=n.getTextDimensionWithRotation(l,e.labelStyle,e.useHtml,e.labelRotation),c=Math.max.apply(null,this._getPlotRange())/this._domain.length-s();o?(r=u.height,a=u.width):(r=u.width,a=u.height);var d=Math.sqrt(r*r+a*a);if(a>c)return-90;if(r>c){var f=Math.acos(c/d),p=Math.atan(a/r),g=f+p;return-n.toDegree(g)}}},getCategoryCount:function(){return this._dataDomain.length},indexOfLabel:function(t){return n.indexOf(this._dataDomain,t)},getTickLength:function(){var t=this.scale.domain(),e=this.scale.rangeExtent(),i=Math.abs(e[1]-e[0]);return this.isRangePoints&&t.length<=1?i:this.isRangePoints?i/(t.length-1):this.scale.rangeBand()},_getTickValues:function(){return this._domain},getCategories:function(){return this._dataDomain},axisZoom:function(t,e){var i,r,a=this.vanchart.bounds;this.isHorizontal()?(i=Math.min(t.x,e.x)-a.x,r=Math.max(t.x,e.x)-a.x):(i=Math.min(t.y,e.y)-a.y,r=Math.max(t.y,e.y)-a.y);var s=this.scale.domain(),h=this._getRange(),l=o.quantize().domain(h).range(s),u=n.indexOf(this._dataDomain,l(i)),c=n.indexOf(this._dataDomain,l(r));this.zoomRefresh(this._dataDomain.slice(Math.min(u,c),Math.max(u,c)+1))},getIndexByPosition:function(t){return this._getIndexByXYCoordinate(t)},_getIndexByXYCoordinate:function(t){var e,i=this.getPlotBounds(),n=this.scale,r=this.isHorizontal(),a=this.isAxisReversed()^!r,o=n(a?n.domain()[n.domain().length-1]:n.domain()[0]);e=r?t[0]-i.x-o:t[1]-i.y-o;var s,h=this.getCategories();if(h.length>1){var l=Math.abs(n(n.domain()[1])-n(n.domain()[0]));s=a?h.length-1-e/l:e/l}else s=0;return s=this.isRangePoints?Math.round(s):a?Math.ceil(s):Math.floor(s)},getPointsInCategory:function(t){var e=this.vanchart.bounds,i=this.scale.domain(),n=this._getRange(),r=o.quantize().domain(n).range(i),a=r(this.isHorizontal()?t.x-e.x:t.y-e.y);return this.vanchart.getValidPointsPara(a)},drawHighlightBackground:function(t){var e=t[0].category,i="line";t.map(function(t){var e=t.series;(e.type===r.BAR_CHART||e.type===r.COLUMN_CHART)&&(i="band")});var a=this.getPlotBounds(),o=this.isHorizontal(),s=this.scale,h=s.rangeBand?s.rangeBand():0,l=s(e),u=l+h,c=this.vanchart.renderer,d="x",f="y",p="width",g="height",m=a.height,v="x1",_="x2",y="y1",x="y2";switch(o||(d="y",f="x",p="height",g="width",m=a.width,v="y1",_="y2",y="x1",x="x2"),i){case"band":this.highlightBand||(this.highlightBand=c.rect().style({fill:"rgb(98,179,240)","fill-opacity":.2}).addTo(this.clipAxisGroup)),this.highlightBand.attr("transform",n.makeTranslate(a)).attr(d,l).attr(f,0).attr(p,Math.abs(l-u)).attr(g,m),this.highlightLine&&this.highlightLine.remove(),this.highlightLine=null;break;case"line":default:h&&(l=(l+u)/2),this.highlightLine||(this.highlightLine=c.line().style({stroke:"rgb(140,140,140)","stroke-width":1}).addTo(this.clipAxisGroup)),this.highlightLine.attr("transform",n.makeTranslate(a)).attr(v,l).attr(y,0).attr(_,l).attr(x,m),this.highlightBand&&this.highlightBand.remove(),this.highlightBand=null}},removeHighlightBackground:function(){this.highlightBand&&this.highlightBand.remove(),this.highlightLine&&this.highlightLine.remove(),this.highlightBand=null,this.highlightLine=null}});return a.register(a.CATEGORY_AXIS_COMPONENT,h),h}),define("component/ValueAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../utils/QueryUtils","../Constants","../ComponentLibrary","../utils/Scale"],function(t){var e=(t("./Base"),t("./BaseAxis")),i=t("../utils/BaseUtils"),n=(t("../utils/QueryUtils"),t("../Constants"),t("../ComponentLibrary")),r=t("../utils/Scale"),a=e.extend({type:n.VALUE_AXIS_COMPONENT,initScale:function(){this.lastScale=this.scale,this.scale=this.options.log?r.log().base(this.options.log):r.linear()},getAxisValue:function(t,e){return this.byPercent?e.percentage:+t},_valueInDomain:function(t){var e=this.scale.domain();return t>=Math.min(e[0],e[1])&&t<=Math.max(e[0],e[1])},_getDomainFromData:function(){for(var t=Number.MAX_VALUE,e=-t,i=!0,n=this.series,r={},a=!1,o=0,s=n.length;s>o&&!a;o++)a=n[o].visible;for(var o=0,s=n.length;s>o;o++)(n[o].visible||!a)&&(this._getSeriesValue(r,n[o]),this.getTrendLineForecast(n[o]));var h=0;for(var l in r){var u=r[l];h=u[1]-u[0]||0;for(var c=0,d=u.length;d>c;c++)isNaN(u[c])||this.options.log&&u[c]<=0||(t=Math.min(t,u[c]),e=Math.max(e,u[c]),i=!1)}return this._isBaseAxis()&&h&&this.forecast&&(t+=h*this.forecast[0],e+=h*this.forecast[1]),i&&(t=0,e=100),[t,e]},_getSeriesValue:function(t,e){var r=e.name||"",a=this.componentType==n.X_AXIS_COMPONENT?"x":"y";if(i.hasNotDefined(e.stack)||this._isBaseAxis())t[r]=t[r]||[],e.points.forEach(function(e){!e.isNull&&e.visible&&t[r].push(e.options[a])});else{var o=e.stack+e.type+"STACK_POSITIVE",s=e.stack+e.type+"STACK_NEGATIVE";t[o]=t[o]||[],t[s]=t[s]||[],e.points.forEach(function(e,i){if(!e.isNull&&e.visible){var n=+e.options[a];n>0?null!=t[o][i]&&void 0!=t[o][i]?t[o][i]+=n:t[o][i]=n:null!=t[s][i]&&void 0!=t[s][i]?t[s][i]+=n:t[s][i]=n}})}},getStartPos:function(){return this.scale(this.getStartPosValue())},getStartPosValue:function(){var t=this.options;return t.log&&1!==t.log?1:0},_getTickValues:function(){var t=[];if(this.options.log)for(var e,n=0;(e=this._tickStart*Math.pow(this.options.log,n))<=this._domain[1];)t.push(e),n+=this._step;else for(var r=this._tickStart;r<=this._domain[1];r=i.accAdd(r,this._step))t.push(r);return t}});return n.register(n.VALUE_AXIS_COMPONENT,a),a}),define("component/DateAxis",["require","./Base","./BaseAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale"],function(t){var e=(t("./Base"),t("./BaseAxis")),i=t("../utils/BaseUtils"),n=(t("../Constants"),t("../ComponentLibrary")),r=t("../utils/Scale"),a=1e3,o=60*a,s=60*o,h=24*s,l=31*h,u=12*l,c=e.extend({type:n.DATE_AXIS_COMPONENT,getAxisValue:function(t){return i.object2date(t)},fixScaleAndTickData:function(){var t=[i.int2date(this._domain[0]),i.int2date(this._domain[1])];this.scale.domain(t).rangeRound(this._getRange()),this._calculateDateFormat(),this._updateOriginTickData(),this._calculateTickPosAndStep()},_calculateDateFormat:function(){var t=this._step,e="Dyyyy";a>=t?e="Dss":o>=t?e="Dmm:ss":s>=t?e="Dhh:mm":h>=t?e="Ddd-hh":l>=t?e="DMM-dd":u>=t&&(e="Dyyyy-MM"),this.dateFormat=e},_getTickContent:function(t,e){function n(t){return window.FR&&window.FR.contentFormat(t,r)||t}var r=this.dateFormat;return e=e||n,i.format(t,e)},initScale:function(){this.lastScale=this.scale,this.scale=r.linear()},_getStartAndEndTick:function(){return[i.int2date(this._domain[0]),i.int2date(this._domain[1])]},_getTickValues:function(){for(var t=[],e=this._tickStart;e<=this._domain[1];e=i.accAdd(e,this._step))t.push(i.int2date(e));return t},_valueInDomain:function(t){var e=this.scale.domain();return t>=Math.min(e[0],e[1])&&t<=Math.max(e[0],e[1])},_getDomainFromData:function(){for(var t=Math.ceil(Number.MAX_VALUE),e=-t,n=this.series,r=!1,a=0,o=0,s=n.length;s>o;o++){var h=n[o],l=h[this.componentType];if(l==this&&h.visible){this.getTrendLineForecast(n[o]);var u=h.points;u.length>1&&(a=this.getValueFromData(u[1])-this.getValueFromData(u[0])||0);for(var o=0,s=u.length;s>o;o++){var c=this.getValueFromData(u[o]);c.getTime&&(r=!0,c=i.date2int(c),t=Math.min(t,c),e=Math.max(e,c))}}}return this._isBaseAxis()&&a&&this.forecast&&(t+=a*this.forecast[0],e+=a*this.forecast[1]),r||(t=e=(new Date).getTime()),e=t>=e?t+1e3:e,[t,e]},getValueFromData:function(t){var e=this.componentType==n.X_AXIS_COMPONENT?0:1,r=this.componentType==n.X_AXIS_COMPONENT?"x":"y",a=i.isArray(t)?t[e]:t[r];return i.object2date(a)}});return n.register(n.DATE_AXIS_COMPONENT,c),c}),define("component/Axis",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary","./CategoryAxis","./ValueAxis","./DateAxis"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("../ComponentLibrary"),a=t("./CategoryAxis"),o=t("./ValueAxis"),s=t("./DateAxis"),h=e.extend({_refresh:function(){this._axisList=this._axisList||[];var t=this.options;t=i.isArray(t)?t:[t];for(var e=t.length,n=e;n<this._axisList.length;n++)this._axisList[n].remove(),this._axisList[n]=null;this._axisList.length=e;for(var n=e-1;n>=0;n--)if(t[n].axisIndex=n,this._axisList[n]&&this._axisList[n].type!=t[n].type&&(this._axisList[n].remove(),this._axisList[n]=null),this._axisList[n])this._axisList[n].refresh(t[n]);else{var h,l=t[n].type||r.VALUE_AXIS_COMPONENT;l==r.VALUE_AXIS_COMPONENT?h=o:l==r.CATEGORY_AXIS_COMPONENT?h=a:l==r.DATE_AXIS_COMPONENT&&(h=s),this._axisList[n]=new h(t[n],this.componentType,this.vanchart)}},doLayout:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e].calculateDomainFromData(),this._axisList[e]._calculateSize(),this._axisList[e]._recordAxisSize()},reCalculateSize:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e]._calculateSize(),this._axisList[e]._recordAxisSize()},updateAxisClip:function(){for(var t={},e=this._axisList.length,i=e-1;i>=0;i--)this._axisList[i].updateClipBounds(t);this._recordForPlotBounds(n.LEFT,t[n.LEFT]||0),this._recordForPlotBounds(n.RIGHT,t[n.RIGHT]||0),this._recordForPlotBounds(n.TOP,t[n.TOP]||0),this._recordForPlotBounds(n.BOTTOM,t[n.BOTTOM]||0)},updateAxisSizeAndBounds:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e].updateAxisSizeAndBounds()},adjustDomain4Radius:function(){for(var t=!1,e=this._axisList.length,i=e-1;i>=0;i--)t=this._axisList[i].adjustDomain4Radius()||t;return t},fixBoundsByPlot:function(){for(var t=this.vanchart.bounds,e={},r=0,a=this._axisList.length;a>r;r++){var o=this._axisList[r],s=o.getPosition();o.isOnZero()?(l?o.bounds.width=t.width:o.bounds.height=t.height,o.fixScaleAndTickData()):(e[s]=e[s]||[],e[s].push(o))}for(var s in e)for(var h=e[s],l=s==n.TOP||s==n.BOTTOM,r=0,u=h.length;u>r;r++){var o=h[r],c=o.bounds,d=h[r-1]&&h[r-1].bounds||t;if(l){var f=s==n.TOP?d.y-c.height:d.y+d.height;o.bounds=i.makeBounds(d.x,f,d.width,c.height)}else{var p=s==n.LEFT?d.x-c.width:d.x+d.width;o.bounds=i.makeBounds(p,d.y,c.width,d.height)}o.fixScaleAndTickData()}},getAxis:function(t){return t>=this._axisList.length&&(t=0),this._axisList[t]},getAxisCount:function(){return this._axisList.length},axisZoom:function(t,e){this._axisList.forEach(function(i){i.axisZoom(t,e)})},dealOnZero:function(){this._axisList.forEach(function(t){t.dealOnZero()})},render:function(){for(var t=0,e=this._axisList.length;e>t;t++)this._axisList[t].render()}});return r.register(r.X_AXIS_COMPONENT,h),r.register(r.Y_AXIS_COMPONENT,h),h}),define("component/GaugeAxis",["require","../Constants","./Axis","../ComponentLibrary"],function(t){var e=(t("../Constants"),t("./Axis")),i=t("../ComponentLibrary"),n=e.extend({initAttributesWithSeries:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--){var i=this._axisList[e];i.calculateDomainFromData(),i.scale.domain(i._domain),i._updateOriginTickData(),i.options.showLabel||i.tickData.forEach(function(t){t.tickContent=""})}},doLayout:function(){},render:function(){}});return i.register(i.GAUGE_AXIS_COMPONENT,n),n}),define("component/LegendItem",["require","../dom/Evented","../Constants","../utils/BaseUtils","./LegendIconFactory","../ComponentLibrary"],function(t){var e,i=t("../dom/Evented"),n=t("../Constants"),r=t("../utils/BaseUtils"),a=t("./LegendIconFactory"),o=t("../ComponentLibrary"),s=function(){return null==e&&(e=r.paddingConvertWithScale("0.5rem")),e},h=i.extend({initialize:function(t,e){this.legendX=0,this.legendY=0,this.legend=t,this.refresh(e)},refresh:function(t){this.options=t,t.renderItem=this},render:function(){var t=this.legend,e=t.vanchart,i=e.renderer,o=t.options.style;this.graphic||(this.graphic=t.legendItemsGroup.append(i.group()),this.options.isTrendLine||this.graphic.style({cursor:"pointer"})),e.registerInteractiveTarget(this,this.graphic);var h=this.graphic,l=this.options,u=l.visible?l.color:l.hiddenColor,c=a.getLegendIconSize(l.legendIconType),d=r.getTextDimension(l.itemName,o,t.options.useHtml),f=Math.max(c.height,d.height);this.graphic.attr({transform:r.makeTranslate([this.legendX,Math.round(this.legendY+f/2)])}),a.hasIcon(l.legendIconType)?(h.image&&h.image.remove(),h.image=null,h.path=h.path||i.path().addTo(h),h.path.attr("d",a.getLegendIconPath(l.legendIconType)).attr("transform",r.makeTranslate([0,-c.height/2])).style({fill:u,"fill-opacity":l.opacity}),l.series.type==n.BUBBLE_CHART&&h.path.style("stroke",u).style("stroke-width",1)):(h.path&&h.path.remove(),h.path=null,h.image=h.image||i.image().addTo(h),h.image.attr({x:0,y:-c.height/2,width:12,height:12,preserveAspectRatio:"none"}).imageContent(l.legendIconType));var p=r.isSupportSVG()?{dy:"0.32em"}:{};h.text=h.text||h.append(i.vtext()),h.text.textContent(l.itemName||"").style("margin-top","-0.7em").attr(p).attr("x",c.width+s()).style({cursor:this.options.isTrendLine?"default":"pointer","white-space":"nowrap"}).style(o).style({fill:l.visible?o.color:l.hiddenColor})},getEvents:function(){return this.options.isTrendLine?{}:{mouseover:this.onMouseOver,mouseout:this.onMouseOut,tap:this.onTap}},onMouseOver:function(){this.legend.options.hover?r.getFormatterFunction(this.legend.options.hover)():(this.graphic&&this.graphic.text&&this.graphic.text.style({fill:this.options.hoverColor}),this.legend.options.highlight&&(this.legend.highlighted=!0,this.legend.vanchart.makeLegendHighlight(this.options.itemName)))},onMouseOut:function(t){var e=this,i=e.legend,n=e.options,r=n.visible?i.options.style.color:n.hiddenColor;this.graphic&&this.graphic.text&&this.graphic.text.style({fill:r})},onTap:function(){if(this.legend.options.click)return void r.getFormatterFunction(this.legend.options.click)();for(var t=this.options.bindName,e=this.legend.vanchart,i=e.series,a={},s=0,h=i.length;h>s;s++){var l=i[s];if(l.isSeriesAccumulated()){var u="name";l.points.map(function(e){e[u]==t&&(e.visible=!e.visible)})}else l.name===t&&(l.visible=!l.visible,l.state=l.visible?n.STATE_TO_SHOW:n.STATE_TO_DROP,l._getAxisTypes().forEach(function(t){var e=l[t];!e||e._isBaseAxis()||a[r.stamp(e)]||(a[r.stamp(e)]=!0,e.calculateDomainFromData(),e.componentType===o.X_AXIS_COMPONENT||e.componentType===o.Y_AXIS_COMPONENT?e.adjustDomain4Radius():e.fixScaleAndTickData())}))}this.options.visible=!this.options.visible,this.options.pairLegendOpt&&(this.options.pairLegendOpt.visible=this.options.visible,this.options.pairLegendOpt.renderItem.render(),this.options.pairLegendOpt.renderItem.onMouseOut()),e.reRenderWholePlot()},remove:function(){this.graphic&&this.graphic.remove(),this.graphic=null}});return h}),define("component/Legend",["require","./Base","../utils/BaseUtils","../Constants","./LegendIconFactory","./LegendItem","../dom/Evented","../utils/BezierEasing","../ComponentLibrary"],function(t){var e,i,n,r,a=t("./Base"),o=t("../utils/BaseUtils"),s=t("../Constants"),h=t("./LegendIconFactory"),l=t("./LegendItem"),u=t("../dom/Evented"),c=t("../utils/BezierEasing"),d=t("../ComponentLibrary"),f=function(){return null==e&&(e=o.paddingConvertWithScale("0.312rem")),e},p=function(){return null==i&&(i=o.paddingConvertWithScale("0.5rem")),i},g=12,m=function(){return null==n&&(n=o.paddingConvertWithScale("0.25rem")),n},v=function(){return null==r&&(r=o.paddingConvertWithScale("1rem")),r},_="rgb(67,67,72)",y="rgb(204,204,204)",x=a.extend({doLayout:function(){return this.invisible()?void this.remove():(this.items=this.items||[],this.yPanEnabled=!1,this.xPanEnabled=!1,this.hasPages=!1,this._updateLegendItems(),void this._layoutLegendItemBounds())},_updateLegendItems:function(){var t,e,i=this.vanchart.series,n={},r={},a=this,o=this.vanchart,h=[];for(t=0,e=i.length;e>t;t++){var u=i[t],c=u.type;if(c!=s.GAUGE_CHART)if(u.isSeriesAccumulated()){var d="name";u.points.map(function(t){if(!n[t[d]]){var e={color:o.getDefaultSeriesColor(t[d]),opacity:t.opacity,bindName:t[d],itemName:t[d],visible:t.visible};a._mergeCommonLegendAttr(u,e),n[t[d]]=!0,h.push(e)}})}else{if(!n[u.name]){var f={color:u.color,opacity:u.opacity,bindName:u.name,itemName:u.name,visible:u.visible};a._mergeCommonLegendAttr(u,f),n[u.name]=f,h.push(f)}if(u.options.trendLine&&!r[u.name]){var f={isTrendLine:!0,color:u.options.trendLine.color,opacity:u.opacity,bindName:u.name,itemName:u.options.trendLine.name,visible:u.visible};a._mergeCommonLegendAttr(u,f),
f.legendIconType=void 0,n[u.name].pairLegendOpt=f,f.pairLegendOpt=n[u.name],r[u.name]=f,h.push(f)}}}for(t=h.length,e=this.items.length;e>t;t++)this.items[t].remove(),this.items[t]=null;for(t=0,e=h.length;e>t;t++)this.items[t]?this.items[t].refresh(h[t]):this.items[t]=new l(a,h[t]);this.items.length=h.length},_mergeCommonLegendAttr:function(t,e){var i=this.options,n=i.hiddenColor,r=i.hoverColor||i.style.color;o.extend(e,{series:t,hiddenColor:n,hoverColor:r,legendIconType:this._getLegendType(t),lineIndex:0})},_layoutLegendItemBounds:function(){var t=this.options,e=t.position||s.RIGHT;if(this.items.length)if(e==s.TOP||e==s.BOTTOM){var i=this._layoutHorizontalLegendItemBounds(),n=i.height,r=this._maxHeight();this.yPanEnabled=t.maxHeight&&n>r,this.maxYPan=-i.height+20;var a=(this.yPanEnabled?r:n)+2*f();this._setComponentBounds(e,a);var o=this.bounds.x+f(),h=this.bounds.y+f(),l=this.bounds.height-2*f()+2*(this.options.borderWidth||0),u=this.bounds.width-2*f(),c=i.width-2*f();o+=(u-c)/2,this.bounds={x:o,y:h,width:c,height:l}}else{var p=0;if((e==s.RIGHT||e==s.RIGHT_TOP)&&!this.isFloat){var v=this.vanchart.getComponent(d.TOOLBAR_COMPONENT);v&&(p=37);var _=this.vanchart.getComponent(d.TITLE_COMPONENT);_&&_.bounds&&!_.isFloat&&(p-=_.bounds.height)}var i=this._layoutVerticalLegendItemBounds(),n=i.width,y=this._maxWidth(),l=this.vanchart.bounds.height-(this.isFloat?0:2*f())-p;if(this.hasPages=i.height-m()>l,this.hasPages){l-=g+f(),this.pageIndex=this.pageIndex||0,this.translateMap=[0];for(var x=0,b=0,T=this.items.length;T>b;b++){var A=this.items[b].legendY;A-x>l&&(x=A-m(),this.translateMap.push(-A))}this.pageCount=this.translateMap.length,n=Math.max(n,this._getPageButtonWidth(this.pageCount))}this.yPanEnabled=this.hasPages,this.xPanEnabled=t.maxWidth&&n>y,this.maxYPan=-i.height+20,this.maxXPan=y-n;var C=(this.xPanEnabled?y:n)+(this.isFloat?0:2*f());this._setComponentBounds(e,C);var o=this.bounds.x+(this.isFloat?0:f()),h=this.bounds.y+(this.isFloat?0:f()),u=this.bounds.width-(this.isFloat?0:2*f()),l=this.bounds.height-(this.isFloat?0:2*f())-p,L=Math.min(i.height,l);h=Math.max(p,h),this.isFloat||e==s.RIGHT_TOP||(h+=Math.round((l-L)/2)),this.bounds={x:o,y:h,width:u,height:L}}},_getPageButtonWidth:function(t){var e={fontFamily:this.options.style.fontFamily||"Verdana",fontSize:"14px"},i=t+"/"+t,n=(f(),o.getTextDimension(i,e,!1));return 2*g+n.width},_layoutVerticalLegendItemBounds:function(){for(var t=0,e=f(),i=this.options.borderWidth||0,n=0,r=this.items.length;r>n;n++){var a=this.items[n],s=a.options,l=o.getTextDimension(s.itemName,this.options.style,this.options.useHtml),u=h.getLegendIconSize(this.items[n].legendIconType);t=Math.max(l.width+p()+u.width,t),a.legendX=f()+i/2,a.legendY=e,e+=Math.max(l.height,u.height)+m()}return{width:2*f()+t,height:e+f()}},_layoutHorizontalLegendItemBounds:function(){for(var t=this.vanchart.bounds,e=t.width-4*f(),i=f(),n=f(),r=i,a=[],s=[],l=0,u=0,c=this.items.length;c>u;u++){var d=this.items[u],g=d.options,m=h.getLegendIconSize(g.legendIconType),_=o.getTextDimension(g.itemName,this.options.style,this.options.useHtml),y=Math.min(m.width+p()+_.width,e-1);e>i+y?(d.legendX=i,d.legendY=n):(a.push({items:s,usedWidth:i}),l=0,i=f(),n+=Math.max(_.height,m.height),d.legendX=i,d.legendY=n,s=[]),s.push(d),l=Math.max(l,_.height),i+=y+v(),r=Math.max(i,r)}return a.push({items:s,usedWidth:i}),a.forEach(function(t){var e=t.usedWidth,i=t.items,n=Math.max((r-e)/2,0);i.forEach(function(t){t.legendX+=n})}),n+=l,{width:Math.round(r)+f(),height:Math.round(n)+f()}},render:function(){if(!this.invisible()&&this.items.length){var t=this.bounds,e=this,i=e.vanchart,n=i.renderer;this.legendGroup||(this.legendGroup=this.createComponentGroup(),this.backgroundGroup=n.group().addTo(this.legendGroup),this.clipGroup=n.group().addTo(this.legendGroup),this.legendItemsGroup=n.group().addTo(this.clipGroup),i.registerInteractiveTarget(this,this.legendGroup)),this.legendGroup.attr("transform",o.makeTranslate(t)),i._renderRectangleBackground(this.backgroundGroup,this.options,o.makeBounds(0,0,t.width,t.height));for(var r=0,a=this.items.length;a>r;r++)this.items[r].render();var s={x:0,y:0,width:t.width,height:t.height};this.hasPages?(s.height-=g,this.pageButton=this.pageButton||new b(e),this.pageButton.refresh()):this.pageButton&&(this.pageButton.remove(),this.pageButton=null),this.verticalClip?n.updateClip(this.verticalClip,s):(this.verticalClip=n.createClip(s),n.clip(this.clipGroup,this.verticalClip))}},getEvents:function(){return{mouseout:this.mouseOut,panstart:this.onPanStart,panmove:this.onPanMove,panend:this.onPanEnd}},mouseOut:function(){this.highlighted&&this.vanchart.cancelLegendHighlight()},onWheel:function(t){var e=t.srcEvent;e.preventDefault(),this.getLegendPos(),this.moveLegend(-e.deltaX,-e.deltaY)},onPanStart:function(t){this.initPos=t.containerPoint,this.getLegendPos()},onPanMove:function(t){var e=t.containerPoint.x-this.initPos.x,i=t.containerPoint.y-this.initPos.y;this.moveLegend(e,i)},onPanEnd:function(){this.vanchart.handler.panTarget=null},getLegendPos:function(){var t=this.legendItemsGroup.trans||[0,0];this.initTranslateX=t[0],this.initTranslateY=t[1]},moveLegend:function(t,e){var i=0,n=0;if(this.xPanEnabled&&(i=t+this.initTranslateX,i=Math.max(this.maxXPan,Math.min(0,i))),this.yPanEnabled&&(n=e+this.initTranslateY,n=Math.max(this.maxYPan,Math.min(0,n))),this.hasPages&&this.pageButton){for(var r=this.translateMap.length-1,a=0,s=this.translateMap.length-1;s>a;a++){var h=this.translateMap[a],l=this.translateMap[a+1];h>=n&&n>l&&(r=a)}this.pageIndex!=r&&(this.pageIndex=r,this.pageButton.updatePage())}this.legendItemsGroup.attr("transform",o.makeTranslate([i,n])),this.legendItemsGroup.trans=[i,n]},remove:function(){this.legendGroup&&this.legendGroup.remove(),this.legendGroup=null,this.items&&(this.items.length=0)}}),b=u.extend({initialize:function(t){this.legend=t},refresh:function(){var t=this.legend,e=t.vanchart,i=e.renderer,n=t.bounds,r=t._getPageButtonWidth(t.pageCount),a=n.height,s=a-g,h=(n.width-r)/2;this.pageGroup||(this.pageGroup=i.group().addTo(t.legendGroup),e.registerInteractiveTarget(this,this.pageGroup),this.leftButton=i.path().style({cursor:"pointer"}).addTo(this.pageGroup),this.rightButton=i.path().style({cursor:"pointer"}).addTo(this.pageGroup),this.pageText=i.text().style({fontFamily:t.options.style.fontFamily||"Verdana",fontSize:"14px"}).addTo(this.pageGroup));var l=r-g,u=h+(r-l)/2,c=h+(r+l)/2,d=h+r/2;this.pageGroup.attr("transform",o.makeTranslate([0,s])),this.leftButton.attr("d",this._prePageButtonPath(u)),this.rightButton.attr("d",this._nextPageButtonPath(c)),this.pageText.attr({x:d,y:"-.14em",dy:".85em"}).attr("text-anchor","middle"),this.updatePage()},remove:function(){this.pageGroup&&(this.pageGroup.remove(),this.pageGroup=null)},updatePage:function(){var t=this.legend,e=t.pageIndex,i=t.pageCount;this.leftButton.style({fill:0>=e?y:_}),this.rightButton.style({fill:i-1>e?_:y});var n=e+1+"/"+i;this.pageText.textContent(n),this.pageText.vMiddle()},_prePageButtonPath:function(t){var e=12,i=0,n=t-e/2,r=e/2*Math.sqrt(3),a=t+e/2,o=r;return"M"+t+","+i+"L"+n+","+r+"L"+a+","+o+"Z"},_nextPageButtonPath:function(t){var e=12,i=0,n=t-e/2,r=i,a=t+e/2,o=i,s=t,h=e/2*Math.sqrt(3);return"M"+n+","+r+"L"+a+","+o+"L"+s+","+h+"Z"},onTap:function(t){var e=t.srcEvent,i=e.target||e.srcElement,n=this.legend;if(this.leftButton.node()==i){if(n.pageIndex<=0)return;n.pageIndex--}else if(this.rightButton.node()==i){if(n.pageIndex==n.pageCount-1)return;n.pageIndex++}n.legendItemsGroup.animate({duration:500,ease:c.css.swing,attr:{transform:"translate(0,"+n.translateMap[n.pageIndex]+")"}}),n.legendItemsGroup.trans=[0,n.translateMap[n.pageIndex]],this.updatePage()},getEvents:function(){return{tap:this.onTap}}});return d.register(d.LEGEND_COMPONENT,x),x}),define("component/Zoom",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale","../utils/PathGenerator","../ComponentLibrary"],function(t){var e,i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=t("../utils/Scale"),s=t("../utils/PathGenerator"),h=30,l=10,u="none",c="left-to-right",d="right-to-left",f=function(){return null==e&&(e=n.paddingConvertWithScale("0.3125rem")),e},p=i.extend({_refresh:function(){this.rangeLeftTop=this.rangeRightBottom=null},doLayout:function(){if(this.byAxisType=this.vanchart.chartType()==r.BAR_CHART?"yAxis":"xAxis",this.byAxis=this.vanchart[this.byAxisType](),this.zoomToolEnabled()){var t=this.vanchart.getComponent(a.DATA_SHEET_COMPONENT),e=0,i=this.byAxis.getPosition();(t||i==r.TOP||i==r.RIGHT||this.byAxis.isOnZero())&&(e=f()),this._setComponentBounds(this.byAxis.isHorizontal()?r.BOTTOM:r.LEFT,h+e)}},fixBoundsByPlot:function(){if(this.zoomToolEnabled()){for(var t,e=this.vanchart.components[this.byAxisType],i=e.getAxisCount(),o=0;i>o;o++){var s=e.getAxis(o),h=s.getPosition();(h==r.BOTTOM||h==r.LEFT)&&(t=s)}t=t||this.byAxis,h=t.getPosition();var l=this.vanchart.bounds;if(t.isHorizontal()){var u,c=this.vanchart.getComponent(a.DATA_SHEET_COMPONENT);u=c?c.bounds.y+c.bounds.height+f():t.isOnZero()||h==r.TOP?l.y+l.height+f():t.bounds.y+t.bounds.height,this.bounds=n.makeBounds(l.x,u,l.width,this.bounds.height)}else{var d;d=t.isOnZero()||h==r.RIGHT?l.x-this.bounds.width:t.bounds.x-this.bounds.width,this.bounds=n.makeBounds(d,l.y,this.bounds.width,l.height)}}},initToolDomain:function(t){var e=this.options.zoomTool;e.from=n.hasDefined(e.from)&&""!==e.from?e.from:null,e.to=n.hasDefined(e.to)&&""!==e.to?e.to:null,t.type===a.DATE_AXIS_COMPONENT&&(e.from=n.date2int(n.object2date(e.from)),e.to=n.date2int(n.object2date(e.to)))},getZoomInitDomain:function(t){var e=this.byAxis;if(this.zoomToolEnabled()&&e._isBaseAxis()&&t==e){var i=this.options.zoomTool;return this.initToolDomain(e),[i.from,i.to]}},getZoomDomain:function(t){var e=this.byAxis,i=t.isCategory()?e._dataDomain:e._domain;if(this.zoomToolEnabled()&&e._isBaseAxis()&&t==e){var r=this.options.zoomTool;this.initToolDomain(e);var a=n.pick(this.rangeLeftTop,r.from,i[0]),o=n.pick(this.rangeRightBottom,r.to,i[i.length-1]);return this._getValidDomain(a,o,i,e.isCategory())}},getMinAndMaxPos:function(){var t=this.getZoomDomain(this.byAxis),e=this.axisScale,i=e(t[0]),n=e(t[t.length-1]);return[Math.min(i,n),Math.max(i,n)+(e.rangeBand?e.rangeBand():0)]},updateRangeLeftAndRight:function(t,e,i){var r=n.indexOf(e,this.rangeLeftTop),a=n.indexOf(e,this.rangeRightBottom),o=i.slice(Math.min(r,a),Math.max(r,a)+1);t.isAxisReversed()^t.isHorizontal()?(this.rangeLeftTop=o[0],this.rangeRightBottom=o[o.length-1]):(this.rangeLeftTop=o[o.length-1],this.rangeRightBottom=o[0])},_getValidDomain:function(t,e,i,r){var a;if(r){var o=i.length-1,s=0;return t=n.indexOf(i,t),e=n.indexOf(i,e),t=Math.min(Math.max(t,s),o),e=Math.min(Math.max(e,s),o),t>e&&(a=e,e=t,t=a),i.slice(t,e+1)}return t=parseFloat(t),e=parseFloat(e),t>e&&(a=e,e=t,t=a),[t,e]},zoomToolEnabled:function(){var t=this.options;return this.vanchart.series.length&&t&&t.zoomTool&&t.zoomTool.enabled&&n.isSupportSVG()},_getAxisScale:function(){var t=this.byAxis,e=t.scale.copy();if(t.type==a.CATEGORY_AXIS_COMPONENT)e.rangeBand?e.rangeBands(t._getPlotRange()):e.range(t._getPlotRange());else{var i=t._dataDomain,r=this.getZoomDomain(t),o=Math.min(i[0],r[0]),s=Math.max(i[1],r[1]);t.type==a.DATE_AXIS_COMPONENT&&(o=n.int2date(o),s=n.int2date(s)),e.domain([o,s])}return e},render:function(){if(this.remove(),!this.zoomBarGroup&&this.zoomToolEnabled()){this.axisScale=this._getAxisScale();var t=this,e=t.bounds,i=t.vanchart,r=(i.renderer,this.getMinAndMaxPos()),a=this.byAxis.isVertical(),o=r[0],s=r[1];this.zoomBarGroup||(this.zoomBarGroup=this.createComponentGroup().attr("transform",n.makeTranslate(e)).style("cursor",a?"ns-resize ":"ew-resize"),i.registerInteractiveTarget(this,this.zoomBarGroup)),this._createLines(),this.leftTopRect=this._createSideRect(a,o,!0),this.rightBottomRect=this._createSideRect(a,s,!1),this.centerRect=this._createCenterRect(a,o,s),this.leftTopButton=this._createButton(a,o,!0),this.rightBottomButton=this._createButton(a,s,!1);var h=this.leftTopButton.pos,u=this.rightBottomButton.pos;this.rangeLeftTop=this._getValueByPosition(h),this.rangeRightBottom=this._getValueByPosition(u+l)}},_createLines:function(){var t=this.axisScale,e=this.byAxisType,i=this.vanchart,r=i.renderer,l=(i.series,t.rangeBand?t.rangeBand()/2:0),u=i.cateMap,c=[],d=Number.MAX_VALUE,f=-Number.MAX_VALUE,p=this.byAxis.isHorizontal(),g=this.byAxis.type===a.DATE_AXIS_COMPONENT;for(var m in u){var v=u[m];if(v[0].series[e]){var _=0;v.forEach(function(t){_+=t.getTargetValue()})}v[0].isNull||c.push({x:t(g?n.object2date(m):m)+l,y:_}),d=Math.min(d,_),f=Math.max(f,_)}var y=p?[h,0]:[0,h],x=o.linear().domain([d,f]).range(y),b=s.line().interpolate("linear").x(function(t){return p?t.x:x(t.y)}).y(function(t){return p?x(t.y):t.x});c.sort(function(t,e){return t.x-e.x}),this._line=this._line||r.path().style({fill:"none",stroke:"black","stroke-width":1}),this._line.attr("d",b(c)).addTo(this.zoomBarGroup),this._innerClip(this._line)},_createSideRect:function(t,e,i){var n=this.vanchart.renderer,r="x",a="y",o="width",s="height",l=this.bounds.width;t&&(r="y",a="x",o="height",s="width",l=this.bounds.height);var u,c;return i?(u=0,c=e):(u=e,c=Math.abs(l-u)),n.rect().attr(r,u).attr(a,0).attr(o,c).attr(s,h).style({fill:"rgba(220,221,221,0.4)"}).addTo(this.zoomBarGroup)},_createCenterRect:function(t,e,i){var n=this.vanchart.renderer,r="x",a="y",o="width",s="height";return t&&(r="y",a="x",o="height",s="width"),n.rect().attr(r,e+l).attr(a,0).attr(o,i-e-2*l).attr(s,h).style({fill:"rgba(255,255,255,0)",stroke:"#29ABE2","stroke-width":1}).addTo(this.zoomBarGroup)},_createButton:function(t,e,i){e=i?e:e-l;var n,r=this.vanchart.renderer,a=r.group().attr("transform",this._getButtonTranslate(t,e)),o={fill:"#FFFFFF",stroke:"#7ADAF4","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round","stroke-miterlimit":10};n=i?t?"M30,4v6H0L0,4C0,1.791,1.791,0,4,0h22C28.209,0,30,1.791,30,4z":"M4,30h6V0L4,0C1.791,0,0,1.791,0,4v22C0,28.209,1.791,30,4,30z":t?"M30,6V0H0v6c0,2.209,1.791,4,4,4h22C28.209,10,30,8.209,30,6z":"M6,30H0V0h6c2.209,0,4,1.791,4,4v22C10,28.209,8.209,30,6,30z",r.path().attr("d",n).style({fill:"#29ABE2"}).addTo(a);var s="x1",h="y1",u="x2",c="y2";return t&&(s="y1",h="x1",u="y2",c="x2"),r.line().attr(s,3).attr(h,11).attr(u,3).attr(c,18).style(o).addTo(a),r.line().attr(s,7).attr(h,11).attr(u,7).attr(c,18).style(o).addTo(a),a.pos=e,a.addTo(this.zoomBarGroup),a},_findDraggingTarget:function(t){for(var e,i=t.srcEvent,n=i.target||i.srcElement,r=this.byAxis.isHorizontal()?t.containerPoint.x-this.bounds.x:t.containerPoint.y-this.bounds.y,a=this._resizeable();n;){var o=this.leftTopButton.pos-r,s=r-(this.rightBottomButton.pos+l);if(o>0&&10>o&&a&&(e=this.leftTopButton),s>0&&10>s&&a&&(e=this.rightBottomButton),e)break;if(n==this.leftTopButton.node()&&a?e=this.leftTopButton:n==this.rightBottomButton.node()&&a?e=this.rightBottomButton:(n==this.centerRect.node()||n==this.zoomBarGroup.node())&&(e=this.centerRect),e)break;n=n.parentNode}return e},_panStart:function(t,e){this.target=e||this._findDraggingTarget(t),this.target&&(this.downPos=this.byAxis.isHorizontal()?t.containerPoint.x:t.containerPoint.y,this.initPos=this.target.pos,this.initTranslate=0)},_panContainerMove:function(t){if(this.target){var e=this.byAxis.isHorizontal()?t.containerPoint.x:t.containerPoint.y,i=e<this.downPos?c:d;this._centerRectMove(this.downPos,this.downPos+this.downPos-e),this._zoomRefresh(i)}},_panMove:function(t){var e=u,i=this.byAxis.isHorizontal()?t.containerPoint.x:t.containerPoint.y;if(this.target&&this.downPos!=i){switch(this.target){case this.leftTopButton:this._leftButtonMove(this.downPos,this.initPos,i);break;case this.rightBottomButton:this._rightButtonMove(this.downPos,this.initPos,i);break;case this.centerRect:e=this._centerRectMove(this.downPos,i)}this._zoomRefresh(e)}},_leftButtonMove:function(t,e,i){var n=0,r=this.rightBottomButton.pos-l,a=e+i-t,o=this.byAxis.isVertical();a=Math.max(Math.min(a,r),n),this.leftTopButton.pos=a;var s="width",h="x";o&&(s="height",h="y"),this.leftTopButton.attr("transform",this._getButtonTranslate(o,a)),this.leftTopRect.attr(s,a),this.centerRect.attr(h,a+l).attr(s,r-a)},_rightButtonMove:function(t,e,i){var n=this.bounds.width,r="x",a="width",o=this.byAxis.isVertical();o&&(n=this.bounds.height,r="y",a="height");var s=n-l,h=this.leftTopButton.pos+l,u=e+i-t;u=Math.max(Math.min(u,s),h),this.rightBottomButton.pos=u,this.rightBottomButton.attr("transform",this._getButtonTranslate(o,u)),this.rightBottomRect.attr(r,u+l).attr(a,n-(u+l)),this.centerRect.attr(a,u-h)},_centerRectMove:function(t,e){var i=this.bounds.width,n=e-t-this.initTranslate,r="x",a="width",o=this.byAxis.isVertical();if(o&&(i=this.bounds.height,r="y",a="height"),this.initTranslate=e-t,this.leftTopButton.pos+n>=0&&this.rightBottomButton.pos+l+n<=i){var s=this.leftTopButton.pos+n;this.leftTopButton.pos=s,this.leftTopButton.attr("transform",this._getButtonTranslate(o,s)),this.leftTopRect.attr(a,s);var h=this.rightBottomButton.pos+n;this.rightBottomButton.pos=h,this.rightBottomButton.attr("transform",this._getButtonTranslate(o,h)),this.rightBottomRect.attr(r,h+l).attr(a,i-(h+l)),this.centerRect.attr(r,s+l)}return this.initTranslate>0?c:d},_getValueByPosition:function(t){var e=this.byAxis,i=this.axisScale;switch(e.type){case a.CATEGORY_AXIS_COMPONENT:for(var r=i.domain(),o=i.range(),s=0,h=o.length-1;h>s;s++){if(t>=o[s]&&t<o[s+1])return r[s];if(t<o[s]&&t>=o[s+1])return r[s+1]}return o[0]>o[o.length-1]?r[0]:r[r.length-1];case a.DATE_AXIS_COMPONENT:return n.date2int(this.axisScale.invert(t));default:return this.axisScale.invert(t)}},_getButtonTranslate:function(t,e){var i=t?[0,e]:[e,0];return"translate("+i+")"},_zoomRefresh:function(t){var e,i=this.leftTopButton.pos,r=this.rightBottomButton.pos+l,o=this._getValueByPosition(i),s=this._getValueByPosition(r),h=this.vanchart,f=this.byAxis,p=f._dataDomain,g=n.indexOf,m=h.getComponent(a.DATA_SHEET_COMPONENT);if(f.isCategory()){if(t==u)e=this._getValidDomain(o,s,p,!0);else{var v=g(p,this.rangeLeftTop)-g(p,this.rangeRightBottom);if(v=Math.abs(v)+1,t==c&&s!=this.rangeRightBottom)if(f.isAxisReversed()^f.isHorizontal()){var _=g(p,s),y=_-v+1;o=p[y],s=p[_],e=p.slice(y,_+1)}else{var y=g(p,s),_=y+v-1;o=p[_],s=p[y],e=p.slice(y,_+1)}else if(t==d&&o!=this.rangeLeftTop)if(f.isAxisReversed()^f.isHorizontal()){var y=g(p,o),_=y+v-1;o=p[y],s=p[_],e=p.slice(y,_+1)}else{var _=g(p,o),y=_-v+1;o=p[_],s=p[y],e=p.slice(y,_+1)}else o=this.rangeLeftTop,s=this.rangeRightBottom}(this.rangeLeftTop!=o||this.rangeRightBottom!=s)&&(this.rangeLeftTop=o,this.rangeRightBottom=s,f.zoomRefresh(e),f.fixScaleAndTickData(),f.render(),m&&m.zoomRefresh(),h.reRenderSeries())}else e=this._getValidDomain(o,s,p,!1),this.rangeLeftTop=o,this.rangeRightBottom=s,f.zoomRefresh(e),f.fixScaleAndTickData(),f.render(),h.reRenderSeries()},_panEnd:function(){this.target=null},_resizeable:function(){return this.options&&this.options.zoomTool&&this.options.zoomTool.resize},getEvents:function(){return{panstart:this._panStart,panmove:this._panMove,panend:this._panEnd}},remove:function(){this.zoomBarGroup&&this.zoomBarGroup.remove(),this.zoomBarGroup=null}});return t("../ComponentLibrary").register(a.ZOOM_COMPONENT,p),p}),define("component/ToolbarIcon",["require","./Base","../utils/BaseUtils","../Constants","../dom/Evented"],function(t){function e(){return{fill:"black","fill-opacity":.05}}function i(){return{fill:"black","fill-opacity":.1}}function n(){return{fill:"black","fill-opacity":0}}function r(){return{fill:"black","fill-opacity":.05}}var a=2,o=32,s=(t("./Base"),t("../utils/BaseUtils")),h=t("../Constants"),l=t("../dom/Evented"),u=l.extend({initialize:function(t,e,i,n){this.iconType=t,this.toolbar=e,this.visible=n,this.pos=i,this.currentPos={x:i.x,y:i.y}},render:function(){var t=this.toolbar,i=t.vanchart,r=i.renderer,s=this;this.iconG||(this.iconG=r.group().style({cursor:"pointer"}).addTo(t.toolbarGroup)),i.registerInteractiveTarget(this,this.iconG),this.iconG.attr("transform","translate("+s.pos.x+","+s.pos.y+")").style({display:this.visible?"":"none"}),this.iconG.rect=this.iconG.rect||r.rect().attr("width",o).attr("height",o).attr("rx",a).attr("ry",a).addTo(this.iconG),this.iconG.rect.style(t.hidden?n():e()),this.iconG.path=this.iconG.path||this._getIconPathGraphic(i,r,s)},_getIconPathGraphic:function(t,e,i){switch(this.iconType){case h.REFRESH_ICON:return e.path().attr("d",i.getRefreshIconPath()).style({fill:"#FF9933"}).addTo(this.iconG);case h.SORT:return t.orderType==h.ASCENDING?e.path().attr("d",i.getDecreaseIconPath()).style({fill:"#33CCFF"}).addTo(this.iconG):e.path().attr("d",i.getIncreaseIconPath()).style({fill:"#33CCFF"}).addTo(this.iconG);case h.EXPORT_ICON:return e.path().attr("d",i.getExportIconPath()).style({fill:"#6666CC"}).addTo(this.iconG);case h.FULL_SCREEN_ICON:return t.vancharts.fullScreenFather?e.path().attr("d",i.getMinIconPath()).style({fill:"#33CC66"}).addTo(this.iconG):e.path().attr("d",i.getMaxIconPath()).style({fill:"#33CC66"}).addTo(this.iconG);case h.MENU_ICON:return e.path().attr("d",i.getMenuIconPath()).style({"stroke-width":2,stroke:"#AAAAAA"}).addTo(this.iconG)}},refreshMove:function(t,e){var i=this.pos,n=this.currentPos,r=n.x-t,a=r+e;this.iconG.animate({ease:"circle-out",duration:220,attr:{transform:"translate("+r+","+i.y+")"}}).transition({ease:"circle-in",duration:220,attr:{transform:"translate("+a+","+i.y+")"}}),this.currentPos.x=a},refreshMoveWithoutAnimation:function(t,e){var i=this.currentPos.x-t+e;this.iconG.attr("transform","translate("+i+","+this.pos.y+")"),this.currentPos.x=i},showIcon:function(){this.visible=!0,arguments.length?this._iconAnimation(arguments[0],arguments[1]):this.iconG.style({display:""})},hideIcon:function(){this.visible=!1,arguments.length?this._iconAnimation(arguments[0],arguments[1]):(this.iconG.style({display:"none"}),this.iconG.attr("transform","translate("+this.pos.x+","+this.pos.y+")"),this.currentPos.x=this.pos.x)},_iconAnimation:function(t,i){var r=this.iconG,a=this.pos,o=this.visible;s.isSupportSVG()?setTimeout(function(){r.style({display:o?"":"none"});var i=4*t,s=a.x-i;r.animate([{ease:"circle-out",duration:100,attr:{transform:"translate("+s+","+a.y+")"}},{ease:"circle-in",duration:100,attr:{transform:"translate("+a.x+","+a.y+")"}}]),r.rect.style(o?n():e()).animate({ease:"linear",duration:200,style:o?e():n()})},i):(r.attr("transform","translate("+a.x+","+a.y+")").style({display:o?"":"none"}),r.rect.style(o?e():n())),this.currentPos.x=this.pos.x},onMouseOver:function(){this.iconG.rect.style(this.toolbar.hidden?r():i())},onMouseOut:function(){this.iconG.rect.style(this.toolbar.hidden?n():e())},onTap:function(){var t=this.toolbar,e=t.vanchart,i=(e.renderer,this),n=e.getDivParentDom();switch(i.iconType){case h.REFRESH_ICON:e.clearAllEffects(),e.refreshRestore(),i.hideIcon();break;case h.SORT:e.orderType==h.ASCENDING?(e.orderType=h.DESCENDING,i.iconG.path.attr({d:i.getIncreaseIconPath()})):(e.orderType=h.ASCENDING,i.iconG.path.attr({d:i.getDecreaseIconPath()})),t.refreshEnabled()&&t.refreshIcon.showIcon(),e.orderData();break;case h.EXPORT_ICON:var r=this.toolbar.options.toImage;r&&r.imageUrl&&s.toPng(r.imageUrl);break;case h.FULL_SCREEN_ICON:e.vancharts.fullScreenFather?e.vancharts.hideLightBox(n,e.vancharts.fullScreenFather):e.vancharts.showLightBox(e);break;case h.MENU_ICON:t.showOrHide()}},getEvents:function(){return{mouseover:this.onMouseOver,mouseout:this.onMouseOut,tap:this.onTap}},getMaxIconPath:function(){return"M24,8v6.5L21.5,12l-3,3L17,13.5l3-3L17.5,8H24z M15,18.5l-3,3l2.5,2.5H8v-6.5l2.5,2.5l3-3L15,18.5z"},getMinIconPath:function(){return"M15,17v6.5L12.5,21l-3,3L8,22.5l3-3L8.5,17H15z M24,9.5l-3,3l2.5,2.5H17V8.5l2.5,2.5l3-3L24,9.5z"},getIncreaseIconPath:function(){return"M8,20h16v2H8V20z M10,16h2v3h-2V16z M13,14h2v5h-2V14z M16,12h2v7h-2V12z M19,9h2v10h-2V9z"},getDecreaseIconPath:function(){return"M8,20h16v2H8V20z M10,9h2v10h-2V9z M13,12h2v7h-2V12z M16,15h2v4h-2V15z M19,16h2v3h-2V16z"},getExportIconPath:function(){return"M22,8H8v16h16V10L22,8z M16,10h2v4h-2V10z M22,22H10V10h1v5h9v-5h1.171L22,10.829V22z"},getRefreshIconPath:function(){return"M21.656,10.344C20.209,8.896,18.209,8,16,8c-3.43,0-6.354,2.158-7.492,5.19l1.873,0.703C11.234,11.619,13.428,10,16,10c1.657,0,3.156,0.672,4.243,1.757L18,14h6V8L21.656,10.344z M16,22c-1.657,0-3.156-0.671-4.243-1.757L14,18H8v6l2.344-2.344C11.791,23.104,13.791,24,16,24c3.43,0,6.354-2.158,7.492-5.19l-1.873-0.703C20.766,20.381,18.572,22,16,22z"},getMenuIconPath:function(){return"M8,10L24,10 M8,15L24,15 M8,20L24,20"}});return u}),define("component/ToolBar",["require","./Base","../utils/BaseUtils","../Constants","./ToolbarIcon","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../Constants"),r=t("./ToolbarIcon"),a=t("../ComponentLibrary"),o=32,s=1,h=5,l=[n.GANTT_CHART,n.TREEMAP_CHART,n.WORD_CLOUD_CHART,n.FUNNEL_CHART,n.STRUCTURE_CHART,n.SCATTER_CHART,n.BUBBLE_CHART,n.FORCE_BUBBLE_CHART,n.AREA_MAP,n.POINT_MAP,n.LINE_MAP,n.HEAT_MAP],u=e.extend({doLayout:function(){var t=this.options,e=t.hidden,i=this.sortEnable()?["sort","toImage","fullScreen"]:["toImage","fullScreen"],a=[n.REFRESH_ICON];i.forEach(function(e){t[e]&&t[e].enabled&&a.push(e)}),e&&a.push(n.MENU_ICON);var l=o+s,u=a.length*l+h;if(this.startX=this.vanchart.width-u,!this.toolbarGroup){this.toolbarIcons=[],this.hidden=e;for(var c=0,d=a.length;d>c;c++){var f={x:c*l,y:h},p=a[c],g=!e;p==n.MENU_ICON?this.menuIcon=new r(p,this,f,!0):p==n.REFRESH_ICON?this.refreshIcon=new r(p,this,f,!1):this.toolbarIcons.push(new r(p,this,f,g))}this.isFloat=!0}},sortEnable:function(){var t,e=!0,i=this.vanchart.options,n=i.series;return i.chartType&&(t=i.chartType),n&&n.forEach(function(i){if(i.type){if(t&&t!=i.type)return void(e=!1);t=i.type}}),e&&-1==l.indexOf(t)},render:function(){this.vanchart.renderer;return this.toolbarGroup?void this.toolbarGroup.attr("transform",i.makeTranslate([this.startX,0])):(this.toolbarGroup=this.createComponentGroup().attr("transform",i.makeTranslate([this.startX,0])),this.toolbarIcons.forEach(function(t){t.render()}),this.menuIcon&&this.menuIcon.render(),void(this.refreshIcon&&this.refreshIcon.render()))},showOrHide:function(){this.hidden?this.show():this.hide(),this.hidden=!this.hidden},hide:function(){for(var t=this.toolbarIcons,e=t.length,i=[],n=0;e>n;n++)i.push(100+80*n);for(var n=0;e>n;n++){var r=e-n;t[n].hideIcon(r,i[n])}var a=4*(e+1),o=4*(e+1)+33*e;this.refreshIcon.visible&&this.refreshIcon.refreshMove(a,o)},show:function(){for(var t=[0],e=this.toolbarIcons,i=e.length,n=0;i-1>n;n++)t.push(100+80*n);for(var n=0;i>n;n++){var r=i-n;e[n].showIcon(r,t[n])}var a=4*(i+1)+33*i,o=4*(i+1);this.refreshIcon.visible&&this.refreshIcon.refreshMove(a,o)},showRefreshIconWhenZoom:function(){if(!this.refreshIcon.visible&&this.refreshEnabled())if(this.menuIcon)if(this.hidden){var t=this.toolbarIcons.length,e=4*(t+1),i=4*(t+1)+33*t;this.refreshIcon.refreshMoveWithoutAnimation(e,i),this.refreshIcon.showIcon()}else this.refreshIcon.showIcon();else this.refreshIcon.showIcon()},refreshEnabled:function(){return!(this.options.refresh&&this.options.refresh.enabled===!1)},getToolBarInitWidth:function(){return this.options.enabled?this.options.hidden?o+h:this.toolbarIcons.length*(o+s)-s+h:0},remove:function(){this.toolbarGroup&&this.toolbarGroup.remove(),this.toolbarGroup=null}});return a.register(a.TOOLBAR_COMPONENT,u),u}),define("component/RangeLegend",["require","./Base","../utils/BaseUtils","../Constants","../utils/ColorUtils","../ComponentLibrary"],function(t){var e,i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../Constants"),a=(t("../utils/ColorUtils"),t("../ComponentLibrary")),o=function(){return null==e&&(e=n.paddingConvertWithScale("0.625rem")),e},s=i.extend({doLayout:function(){if(this.invisible())return void this.remove();var t=this.options,e=t.position||r.RIGHT,i=o()*(this.isFloat?2:4);if(e==r.TOP||e==r.BOTTOM?this._layoutHorizontal(e,i):this._layoutVertical(e,i),!this.isFloat){var n=this.options.borderWidth+2*o();if(this.bounds.x+=n/2,this.bounds.y+=n/2,this.bounds.width-=n,this.bounds.height-=n,e==r.BOTTOM){var s=this.vanchart.getComponent(a.ZOOM_COMPONENT);s&&s.zoomToolEnabled()&&s.bounds&&(this.bounds.y+=s.bounds.height||0)}if(e==r.RIGHT_TOP){var h=this.vanchart.getComponent(a.TOOLBAR_COMPONENT);h&&(this.bounds.y=Math.max(37,this.bounds.y))}}},_layoutHorizontal:function(t,e){var i=this.calculateHorizontalDim(),n=i.height+e;n=this.options.maxHeight?Math.min(n,this._maxHeight()):n,this._setComponentBounds(t,n);var r=i.width+e;this.isFloat||(this.bounds.x+=Math.max((this.bounds.width-r)/2,0)),this.bounds.width=r},_layoutVertical:function(t,e){var i=this.calculateVerticalDim(),n=i.width+e;n=this.options.maxWidth?Math.min(n,this._maxWidth()):n,this._setComponentBounds(t,n);var a=i.height+e;this.isFloat||t==r.RIGHT_TOP||(this.bounds.y+=Math.max((this.bounds.height-a)/2,0)),this.bounds.height=a},render:function(){if(!this.invisible()){var t=this.bounds,e=this,i=e.vanchart,r=i.renderer;this.group||(this.backgroundGroup=r.group().addTo(this.getComponentParentGroup()),this.group=r.vgroup().add(this.getComponentParentGroup()),this.legendGroup=this.group.append(r.vgroup()));var a;a=this.useHtmlLabel()?this.legendGroup.divG:this.legendGroup.renderG,i.registerInteractiveTarget(this,a),this._innerClip(this.group),this.group.attr("transform",n.makeTranslate(t)),i._renderRectangleBackground(this.backgroundGroup,this.options,t),this.renderBody(this.legendGroup,t)}},getEvents:function(){return{mouseout:this.mouseOut}},mouseOut:function(){this.highlighted&&this.vanchart.cancelLegendHighlight()},remove:function(){this.group&&this.group.remove(),this.group=null}});return s}),define("component/IntervalRangeLegend",["require","../utils/BaseUtils","../Constants","../utils/ColorUtils","../dom/EventObject","./RangeLegend","../ComponentLibrary"],function(t){var e,i,n,r=t("../utils/BaseUtils"),a=t("../Constants"),o=t("../utils/ColorUtils"),s=t("../dom/EventObject"),h=t("./RangeLegend"),l=t("../ComponentLibrary"),u=function(){return null==e&&(e=r.paddingConvertWithScale("0.625rem")),e},c=15,d=function(){return null==i&&(i=r.paddingConvertWithScale("0.3125rem")),i},f=25,p=function(){return null==n&&(n=r.paddingConvertWithScale("0.125rem")),n},g=h.extend({type:l.INTERVAL_RANGE_LEGEND,initAttributesWithSeries:function(){var t=this.options,e=t.range||{};if(!r.isArray(e)){var i=e.splitNumber||5,n=e.color||this.vanchart.options.colors[0],a=this.vanchart.isHeatMap()?["rgb(0,0,255)","rgb(0,255,0)","rgb(255,255,0)","rgb(255,0,0)"]:o.createColorsWithHsb(n,i),h=this.vanchart.getChartMinMaxValue(),l=r.calculateAutoMinMaxAndGap(h[0],h[1],i),u=l[0],c=l[2];if(e=[],this.vanchart.isHeatMap())for(var d=[0,.25,.55,.85,1],f=r.accMul(c,i),p=1;5>p;p++)e.push({from:r.accAdd(u,r.accMul(f,d[p-1])),to:r.accAdd(u,r.accMul(f,d[p])),color:a[p-1]});else for(var p=0;i>p;p++)e.push({from:r.accAdd(u,r.accMul(c,i-p-1)),to:r.accAdd(u,r.accMul(c,i-p)),color:a[p]})}this.items=this.items||[];for(var g=e.length,m=this.items.length,v=g;m>v;v++)this.items[v].graphic&&this.items[v].graphic.remove(),this.items[v]=null;for(var _=t.formatter,y=0;g>y;y++){var x=this.items[y]||new s(this.getItemEvents());this.items[y]=x;var b=e[y];x.from=b.from,x.to=b.to,x.color=b.color,x.label=this._getIntervalLabelContent(b.from,b.to,_),x.visible=!0,x.hiddenColor=t.hiddenColor,x.hoverColor=t.hoverColor,x.points=[],x.legend=this}this.items.length=g;var T=this,A=this.vanchart.series;this.items.sort(function(t,e){var i=Math.min(t.from,t.to),n=Math.min(e.from,e.to);return T.isHorizontal()?i-n:n-i});for(var p=0,C=A.length;C>p;p++){var L=A[p],P=L.getTargetKey(),M=L.points;M.forEach(function(t){var e=t[P],i=T._getPointItem(e);i&&(i.points.push(t),t._rangeItem=i)})}},_getMin:function(){var t=this.isHorizontal()?0:this.items.length-1;return this.items[t].from},_getMax:function(){var t=this.isHorizontal()?this.items.length-1:0;return this.items[t].to},_getGradient:function(){for(var t={0:"white"},e=this._getMin(),i=this._getMax(),n=i-e,r=this.items.length-1;r>=0;r--){
var a=this.items[r];t[(a.to-e)/n]=a.color}return t},_getIntervalLabelContent:function(t,e,i){return i?r.format({from:t,to:e},i):t+"-"+e},_getPointItem:function(t){for(var e=0,i=this.items.length;i>e;e++){var n=this.items[e],r=Math.min(n.from,n.to),a=Math.max(n.from,n.to);if(t>=r&&a>=t)return n}},calculateHorizontalDim:function(){var t=this.items.length,e=0,i=0;if(t>0){var n=r.getTextDimension(this.items[0].label,this.options.style,this.options.useHtml),a=r.getTextDimension(this.items[t-1].label,this.options.style,this.options.useHtml),o=Math.max(0,n.width-f,a.width-f);e=t*f+(t-1)*p()+o,i=c+2*d()+2*n.height}return{width:e,height:i}},calculateVerticalDim:function(){var t=this.items.length,e=0,i=0,n=this.options.style,a=this;return this.items.forEach(function(t){var o=r.getTextDimension(t.label,n,a.options.useHtml);e=Math.max(e,o.width),i=Math.max(0,o.height-f)}),{width:e+c+d(),height:t*f+(t-1)*p()+i}},getColorWithSize:function(t){var e=this._getPointItem(t);return e&&e.color},renderBody:function(t,e){this.isHorizontal()?this._renderHorizontalInterval(t,e):this._renderVerticalInterval(t,e)},_renderHorizontalInterval:function(t,e){var i=this.items,n=(e.width-i.length*f-(i.length-1)*p())/2;t.attr("transform",r.makeTranslate([n,u()])),this._absX=e.x+n,this._absY=e.y+u();var a=this.options.style,o=this.vanchart,s=o.renderer,h=this.useHtmlLabel(),l=0,g=this;i.forEach(function(e,i){e.graphic=e.graphic||t.append(s.vgroup().style({cursor:"pointer"}));var n=e.graphic;o.registerInteractiveTarget(e,h?n.divG:n.renderG);var u=e.label,m=r.getTextDimension(u,a,g.options.useHtml),v=m.height,_=v+d(),y=_+c+d();n.rect=n.rect||n.append(s.rect()),n.rect.style(g._getItemIconStyle(e)).attr("rx",2).attr("ry",2).attr("x",l).attr("y",_).attr("width",f).attr("height",c);var x=l+f/2-m.width/2,b=i%2===0?0:y;g._renderItemLabel(e,n,x,b,m,i),l+=f+p()})},_renderVerticalInterval:function(t,e){var i=this.items,n=this.vanchart,a=(e.height-i.length*f-(i.length-1)*p())/2;t.attr("transform",r.makeTranslate([u(),a])),this._absX=e.x+u(),this._absY=e.y+a;var o=this.options.style,s=this.vanchart.renderer,h=this.useHtmlLabel(),l=0,g=this;i.forEach(function(e,i){e.graphic=e.graphic||t.append(s.vgroup().style({cursor:"pointer"}));var a=e.graphic;n.registerInteractiveTarget(e,h?a.divG:a.renderG);var u=r.getTextDimension(e.label,o,h);a.rect=a.rect||a.append(s.rect()),a.rect.style(g._getItemIconStyle(e)).attr("rx",2).attr("ry",2).attr("x",0).attr("y",l).attr("width",c).attr("height",f);var m=Math.round(c+d()),v=Math.round(l+f/2-u.height/2);g._renderItemLabel(e,a,m,v,u,i),l+=f+p()})},_renderItemLabel:function(t,e,i,n,a,o){var s=this,h=s.vanchart,l=h.renderer,u=s.options,c=t.label,d=u.style,f=this.useHtmlLabel(),p=t.visible?d.color:t.hiddenColor;d=r.extend({},d),d.color=p,e.text=e.text||e.append(l.vtext(f)),e.text.textContent(c).attr("dy",".88em").attr("transform",r.makeTranslate({x:i,y:n})).style(d)},_getItemIconStyle:function(t){return{fill:t.visible?t.color:t.hiddenColor,"fill-opacity":1,stroke:"none"}},getItemEvents:function(){return{mouseover:this.onItemMouseOver,mousemove:this.onItemMouseMove,mouseout:this.onItemMouseOut,tap:this.onItemTap}},onItemMouseOver:function(t){var e=this,i=e.legend,n=e.graphic&&e.graphic.text;i.useHtmlLabel()?n.style("color",o.colorToHex(e.hoverColor)):n.style({fill:e.hoverColor}),this.legend.options.highlight&&(this.legend.highlighted=!0,this.legend.vanchart.makeLegendHighlight(e))},onItemMouseMove:function(t){},onItemMouseOut:function(t){var e=this,i=e.legend,n=i.options,r=e.graphic&&e.graphic.text,a=n.style.color,s=e.visible?a:e.hiddenColor;i.useHtmlLabel()?r.style("color",o.colorToHex(s)):r.style({fill:s})},onItemTap:function(t){var e=this,i=e.legend,n=i.options,r=i.vanchart,s=e.graphic&&e.graphic.text,h=e.graphic&&e.graphic.rect;e.visible=!e.visible;var l=n.style.color,u=e.visible?e.color:e.hiddenColor,c=e.visible?l:e.hiddenColor;if(h.style({fill:u}),i.useHtmlLabel()?s.style("color",o.colorToHex(c)):s.style({fill:c}),e.points&&e.points.length>0){var d="vanChartMap"==r.vanChartType;e.points.forEach(function(t){var i=t.series.type===a.LINE_MAP;if((!d||d&&t.points&&t.points[0]==t||i)&&(t.visible=e.visible,d&&!i))for(var n=t.points,r=1,o=n.length;o>r;r++)n[r].visible=t.visible}),r.filterRender()}}});return l.register(l.INTERVAL_RANGE_LEGEND,g),g}),define("component/GradientRangeLegend",["require","../utils/BaseUtils","../Constants","../utils/ColorUtils","./RangeLegend","../ComponentLibrary","../utils/Scale","../utils/Interpolator"],function(t){var e,i,n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../utils/ColorUtils"),o=t("./RangeLegend"),s=t("../ComponentLibrary"),h=t("../utils/Scale"),l=t("../utils/Interpolator"),u=function(){return null==e&&(e=n.paddingConvertWithScale("0.625rem")),e},c=15,d=100,f=15,p=10,g=function(){return null==i&&(i=n.paddingConvertWithScale("0.3125rem")),i},m="M7.236,10H13c1.105,0,2-0.895,2-2V2c0-1.105-0.895-2-2-2L2.618,0C1.875,0,1.391,0.782,1.724,1.447l3.724,7.447C5.786,9.572,6.479,10,7.236,10z",v="M7.236,0L13,0c1.105,0,2,0.895,2,2v6c0,1.105-0.895,2-2,2H2.618c-0.743,0-1.227-0.782-0.894-1.447l3.724-7.447C5.786,0.428,6.479,0,7.236,0z",_="M0,7.236V13c0,1.105,0.895,2,2,2h6c1.105,0,2-0.895,2-2V2.618c0-0.743-0.782-1.227-1.447-0.894L1.106,5.447C0.428,5.786,0,6.479,0,7.236z",y="M10,7.236V13c0,1.105-0.895,2-2,2H2c-1.105,0-2-0.895-2-2L0,2.618c0-0.743,0.782-1.227,1.447-0.894l7.447,3.724C9.572,5.786,10,6.479,10,7.236z",x=o.extend({type:s.GradientRangeLegend,initAttributesWithSeries:function(){var t=this.options,e=t.range||{};this.valueAndColors=e.color||this._getDefaultValueAndColors();var i=e.min,r=e.max;if(n.hasNotDefined(i)&&n.hasNotDefined(r)){var a=this.vanchart.getChartMinMaxValue(),o=n.calculateAutoMinMaxAndGap(a[0],a[1],Math.max(2,this.valueAndColors.length-1));i=o[0],r=o[1]}this.min=n.pick(e.min,i),this.max=n.pick(e.max,r),this.minPos=0,this.maxPos=d,this.valueAndColors.sort(function(t,e){return t[0]-e[0]});for(var s=[],u=[],c=0,f=this.valueAndColors.length;f>c;c++)s[c]=this.valueAndColors[c][0],u[c]=this.valueAndColors[c][1];this.valueScale=h.linear().domain([this.min,this.max]).range([0,1]),this.colorScale=h.linear().domain(s).range(u).interpolate(l.interpolate).interpolate(l.interpolate)},_getMin:function(){return this.min},_getMax:function(){return this.max},_getGradient:function(){var t={};return this.valueAndColors.forEach(function(e){t[e[0]]=e[1]}),t},_getDefaultValueAndColors:function(){var t=a.createColorsWithHsb(this.vanchart.options.colors[0],3);return[[0,t[2]],[.5,t[1]],[1,t[0]]]},calculateHorizontalDim:function(){var t=n.getTextDimension(this._getGradientMinLabelContent(),this.options.style,this.options.useHtml),e=n.getTextDimension(this._getGradientMaxLabelContent(),this.options.style,this.options.useHtml),i=Math.max(t.width,e.width,p),r=d+2*i,a=c+f+g()+t.height;return{width:r,height:a}},calculateVerticalDim:function(){var t=n.getTextDimension(this._getGradientMinLabelContent(),this.options.style,this.options.useHtml),e=n.getTextDimension(this._getGradientMaxLabelContent(),this.options.style,this.options.useHtml),i=c+f+g()+Math.max(t.width,e.width),r=2*Math.max(t.height/2,p/2),a=d+2*r;return{width:i,height:a}},getColorWithSize:function(t){return t>=this.min&&t<=this.max?this.colorScale(this.valueScale(t)):null},_getGradientMinLabelContent:function(){return this._getGradientLabelWithFormatter(this.min)},_getGradientMaxLabelContent:function(){return this._getGradientLabelWithFormatter(this.max)},_getGradientLabelWithFormatter:function(t){var e=this.options.formatter;return e?n.format(t,e):t},_getGradientLabelContent:function(t){return this._getGradientLabelWithFormatter(this._gradientScale(t))},_gradientScale:function(t){var e=n.accDiv(n.accAdd(this.max,-this.min),d);return t=n.accMul(e,this.isHorizontal()?t:d-t),t=n.accAdd(t,this.min)},_getBarBackgroundStyle:function(){return{fill:"#eaeaea","stroke-width":0}},_getGradientFillColor:function(t,e){var i={x1:"0%",y1:t?"0%":"100%",x2:t?"100%":"0%",y2:"0%"},r=[];return this.valueAndColors.forEach(function(t){var e=t[0],i=t[1];r.push({offset:e,"stop-color":i})}),this._bar.colorGradient?e.updateColorGradient(this._bar.colorGradient,i,r):this._bar.colorGradient=e.colorGradient(i,r),"url(#"+n.stamp(this._bar.colorGradient)+")"},_updateHorizontalGradientClipRect:function(){var t=this,e=t.vanchart,i=e.renderer,n={x:this.minPos,y:0,width:this.maxPos-this.minPos,height:c};this._bar.clipG?i.updateClip(this._bar.clipG,n):(this._bar.clipG=i.createClip(n),i.clip(this._bar,this._bar.clipG))},_updateVerticalGradientClipRect:function(){var t=this,e=t.vanchart,i=e.renderer,n={x:0,y:this.minPos,width:c,height:this.maxPos-this.minPos};this._bar.clipG?i.updateClip(this._bar.clipG,n):(this._bar.clipG=i.createClip(n),i.clip(this._bar,this._bar.clipG))},renderBody:function(t,e){var i=this,r=i.vanchart,a=r.renderer,o=(r.bounds,i.isHorizontal()),s=o?(e.width-d)/2:u(),h=o?u():(e.height-d)/2;t.attr("transform",n.makeTranslate([s,h])),this._absX=e.x+s,this._absY=e.y+h,this._barBackground=this._barBackground||t.append(a.rect()),this._bar=this._bar||t.append(a.rect()),this._minButton=this._minButton||t.append(a.path().style({cursor:"pointer"})),this._maxButton=this._maxButton||t.append(a.path().style({cursor:"pointer"})),this._minLabel=this._minLabel||t.append(a.vtext(this.useHtmlLabel())),this._maxLabel=this._maxLabel||t.append(a.vtext(this.useHtmlLabel()));var l={rx:2,ry:2,x:0,y:0,width:o?d:c,height:o?c:d};this._barBackground.style(this._getBarBackgroundStyle()).attr(l),this._bar.attr(l).style({fill:this._getGradientFillColor(o,a),"stroke-width":0}),n.isSupportSVG()||a._updateGradientFill(this._bar,this._bar.colorGradient),this._minButton.attr("d",o?_:m),this._maxButton.attr("d",o?y:v),this._minLabel.attr("dy",".85em").style(this.options.style),this._maxLabel.attr("dy",".85em").style(this.options.style),this._updateMax(),this._updateMin()},_updateMin:function(){this.isHorizontal()?this._updateHorizontalMinBar():this._updateVerticalMinBar()},_updateMax:function(){this.isHorizontal()?this._updateHorizontalMaxBar():this._updateVerticalMaxBar()},_updateVerticalMinBar:function(){this._minButton.attr("transform","translate("+c+","+this.maxPos+")").style({fill:this.colorScale((d-this.maxPos)/d)});var t=this._getGradientLabelContent(this.maxPos),e=n.getTextDimension(t,this.options.style,!0),i=Math.round(c+f+g()),r=Math.round(this.maxPos+p/2-e.height/2);this._minLabel.textContent(t).attr("transform",n.makeTranslate({x:i,y:r})),this._updateVerticalGradientClipRect()},_updateHorizontalMinBar:function(){var t=this.minPos-p;this._minButton.attr("transform","translate("+t+","+c+")").style({fill:this.colorScale(this.minPos/d)});var e=this._getGradientLabelContent(this.minPos),i=n.getTextDimension(e,this.options.style,!0),r=Math.round(this.minPos-i.width),a=Math.round(c+f+g());this._minLabel.textContent(e).attr("transform",n.makeTranslate({x:r,y:a})),this._updateHorizontalGradientClipRect()},_updateVerticalMaxBar:function(){var t=this.minPos-p;this._maxButton.attr("transform","translate("+c+","+t+")").style({fill:this.colorScale((d-this.minPos)/d)});var e=this._getGradientLabelContent(this.minPos),i=n.getTextDimension(e,this.options.style,!0),r=Math.round(c+f+g()),a=Math.round(this.minPos-p/2-i.height/2);this._maxLabel.textContent(e).attr("transform",n.makeTranslate({x:r,y:a})),this._updateVerticalGradientClipRect()},_updateHorizontalMaxBar:function(){this._maxButton.attr("transform","translate("+this.maxPos+","+c+")").style({fill:this.colorScale(this.maxPos/d)});var t=this._getGradientLabelContent(this.maxPos),e=Math.round(this.maxPos),i=Math.round(c+f+g());this._maxLabel.textContent(t).attr("transform",n.makeTranslate({x:e,y:i})),this._updateHorizontalGradientClipRect()},getEvents:function(){return{panstart:this._panStart,panmove:this._panMove,panend:this._panEnd}},_panStart:function(t){var e=this.options.position;this.currentX=t.containerPoint.x,this.currentY=t.containerPoint.y,this.eventTarget=e==r.TOP||e==r.BOTTOM?this._findHorizontalTarget():this._findVerticalTarget()},_findHorizontalTarget:function(){var t=(this.maxPos-this.minPos)/5;return this.currentX<this._absX+this.minPos+t?this._minButton:this.currentX>this._absX+this.maxPos-t?this._maxButton:void 0},_findVerticalTarget:function(){var t=(this.maxPos-this.minPos)/5;return this.currentY<this._absY+this.minPos+t?this._maxButton:this.currentY>this._absY+this.maxPos-t?this._minButton:void 0},_panMove:function(t){this.eventTarget==this._minButton?this._minButtonMove(this.currentX,this.currentY,t.containerPoint.x,t.containerPoint.y):this.eventTarget==this._maxButton&&this._maxButtonMove(this.currentX,this.currentY,t.containerPoint.x,t.containerPoint.y)},_minButtonMove:function(t,e,i,n){var r=0;if(this.isHorizontal()){var a=this.minPos;this.minPos+=Math.round(i-t),this.minPos=Math.max(this.minPos,0),this.minPos=Math.min(this.minPos,this.maxPos),r=this.minPos-a}else{var a=this.maxPos;this.maxPos+=Math.round(n-e),this.maxPos=Math.min(this.maxPos,d),this.maxPos=Math.max(this.maxPos,this.minPos),r=this.maxPos-a}Math.abs(r)>=1&&(this.currentX=i,this.currentY=n,this._updateMin(),this.refreshPoints())},_maxButtonMove:function(t,e,i,n){var r=0;if(this.isHorizontal()){var a=this.maxPos;this.maxPos+=Math.round(i-t),this.maxPos=Math.min(this.maxPos,d),this.maxPos=Math.max(this.maxPos,this.minPos),r=this.maxPos-a}else{var a=this.minPos;this.minPos+=Math.round(n-e),this.minPos=Math.max(this.minPos,0),this.minPos=Math.min(this.minPos,this.maxPos),r=this.minPos-a}Math.abs(r)>=1&&(this.currentX=i,this.currentY=n,this._updateMax(),this.refreshPoints())},_panEnd:function(t){this.eventTarget=null},refreshPoints:function(){for(var t,e=this._gradientScale(this.minPos),i=this._gradientScale(this.maxPos),n=this.vanchart,a=n.series,o=!1,s="vanChartMap"==n.vanChartType,h=0,l=a.length;l>h;h++){var u=a[h];u.points.forEach(function(n){var a=n.series.type===r.LINE_MAP;if(!s||s&&n.points&&n.points[0]==n||a){var h=n.visible,l=n.getTargetValue();if(n.visible=l>=e&&i>=l||l>=i&&e>=l,o=o||h!=n.visible,s&&!a){t=n.points;for(var u=1,c=t.length;c>u;u++)t[u].visible=n.visible}}})}o&&n.filterRender()}});return s.register(s.GradientRangeLegend,x),x}),define("component/Polar",["require","../Constants","../utils/BaseUtils","./Base","../ComponentLibrary"],function(t){var e=(t("../Constants"),t("../utils/BaseUtils")),i=t("./Base"),n=(t("../ComponentLibrary"),i.extend({_refresh:function(){this.series=[]},_isBaseAxis:function(){return!0},doLayout:function(){var t=this.options,i=t.radius,n=t.center;if(!n||0===n.length){var r=this.vanchart.bounds;n=[r.width/2+r.x,r.height/2+r.y]}this.setCenter(n),e.hasDefined(i)?this.setRadius(i):this.radius=null;var a=this.vanchart.options.plotOptions,o=a.radar&&a.radar.shape||a.shape;this.shape=o||this.shape},setRadius:function(t){t&&(this.radius=this._getPercentValue(t,Math.min(this.vanchart.width,this.vanchart.height)/2))},setCenter:function(t){t&&(this.center=[],this.center[0]=this._getPercentValue(t[0],this.vanchart.width),this.center[1]=this._getPercentValue(t[1],this.vanchart.height))},render:function(){var t=this.vanchart.renderer,e=this.radiusAxis,i={d:e._getRadiusGridPath(e.scale.domain()[1])};this.clip?t.updateClip(this.clip,i):this.clip=t.createClip(i,"path"),this.radiusAxis.render(),this.angleAxis.render()}}));return n}),define("component/AngleAxis",["require","./Base","./CategoryAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/Scale","../utils/PathGenerator"],function(t){var e,i=(t("./Base"),t("./CategoryAxis")),n=t("../utils/BaseUtils"),r=(t("../Constants"),t("../ComponentLibrary"),t("../utils/Scale")),a=t("../utils/PathGenerator"),o=function(){return null==e&&(e=n.paddingConvertWithScale("0.625rem")),e},s="radar-top",h="radar-bottom",l="radar-left",u="radar-right",c=i.extend({_refresh:function(t){this.series=[],this.piece=null,this.initScale(),this.refreshPolar(t)},refreshPolar:function(t){this.polar=this.vanchart.polar(t.axisIndex),this.polar.angleAxis=this},doLayout:function(){this.calculateDomainFromData(),this.scale.domain(this._dataDomain).rangePoints([0,this._dataDomain.length-1]),this.piece=2*Math.PI/Math.max(this._dataDomain.length,1),this._updateOriginTickData(),this._updatePolarBounds(),this._calculateTickData()},fixScaleAndTickData:function(){this.scale.domain(this._dataDomain).rangePoints([0,this._dataDomain.length-1]),this._updateOriginTickData(),this._calculateTickData()},_calculateTickData:function(){var t,e=this.polar.radius;this.isBreakLabels&&(t=this._getTestBoundsAndRadius().testBounds),this.tickData.map(function(i){this._getCateLabelBounds(e,i,t)},this)},_getTestBoundsAndRadius:function(){var t=this.vanchart.bounds,e=this.polar.center,i=[e[1]-t.y,t.x+t.width-e[0],t.y+t.height-e[1],e[0]-t.x],n=Math.min.apply(null,i);n-=o();var r={x:-i[3],y:-i[0],width:t.width,height:t.height};return{testBounds:r,radius:n}},_updatePolarBounds:function(){if(!this.polar.radius){var t=this._getTestBoundsAndRadius(),e=t.radius,i=t.testBounds;this.options.showLabel&&(this._testRadius(e,i)||(e=this._findNiceRadius(i),this._testRadius(e,i))),this.polar.setRadius(e)}},getIndexByPosition:function(t){return this._getIndexByPolarCoordinate(t)},_getIndexByPolarCoordinate:function(t){var e=this.polar.center,i=this.polar.radius,r=this.isAxisReversed(),a=t[0]-e[0],o=e[1]-t[1];if(a*a+o*o>i*i)return-1;var s,h=n.getArcByPoint(a,o),l=this.getCategories();if(l.length>1){var u=2*Math.PI/l.length;s=r?l.length-1-h/u:h/u}else s=0;return s=Math.round(s),s%=l.length},getAngleGridLineData:function(){var t=[],e=this.polar.angleAxis,i=e.scale.domain(),r=this;return i.forEach(function(i){var a=e.scale(i)*e.piece,o=r.polar.radius;t.push(n.getArcPoint(o,a))}),t=t.length?t:[n.getArcPoint(this.polar.radius,0)]},getCateAngleGridLineData:function(){var t=this.getAngleGridLineData(),e=this.polar.angleAxis.scale.domain();return t.map(function(t,i){return{name:e[i],pos:t}})},_testRadius:function(t,e){for(var i=0,r=this.tickData.length;r>i;i++){var a=this.tickData[i],o=this._getCateLabelBounds(t,a);if(!n.containsRect(e,o))return!1}return!0},_getCateLabelBounds:function(t,e,i){var r,a=e.tickValue,c=e.tickRectDim,d=this.scale.domain(),f=d.indexOf(a),p=n.getArcPoint(t+o(),f*this.piece),g=this.options,m=this._getPolarPosition(a),v=n.extend({width:"","white-space":"","text-align":""},g.labelStyle);switch(m){case s:r={style:v,x:-c.width/2,y:-t-.65*c.height-o()};break;case u:if(r={style:v,x:p[0],y:p[1]-c.height/2},i&&this.isBreakLabels&&r.x+c.width>i.x+i.width){var _=i.x+i.width-p[0],y=n.extend({width:_+"px","white-space":"normal","text-align":"left"},g.labelStyle);c=n.getTextWrapDimension(e.tickContent,y),r={style:y,x:p[0],y:p[1]-c.height/2}}break;case h:r={style:v,x:-c.width/2,y:t+o()};break;case l:if(r={style:v,x:p[0]-c.width,y:p[1]-c.height/2},i&&this.isBreakLabels&&r.x<i.x){var _=p[0]-i.x,y=n.extend({width:_+"px","white-space":"normal","text-align":"right"},g.labelStyle);c=n.getTextWrapDimension(e.tickContent,y),r={style:y,x:p[0]-c.width,y:p[1]-c.height/2}}}return e.tickPos=r,n.makeBounds(r,c)},_getPolarPosition:function(t){var e=this.scale.domain(),i=e.indexOf(t),n=e.length/2;return 0===i?s:i>0&&n>i?u:i==n?h:i>n?l:void 0},_findNiceRadius:function(t){var e=[-t.y,t.width+t.x,t.height+t.y,-t.x],i=Math.min.apply(null,e),n=i,r=this.scale.domain(),a=this;return this.tickData.forEach(function(t){if(t.tickContent){var i,o=t.tickValue,c=t.tickDim,d=r.indexOf(o),f=a._getPolarPosition(o);switch(f){case s:i=e[0]-c.height;break;case u:i=(e[1]-c.width)/Math.abs(Math.sin(d*a.piece));break;case h:i=e[2]-c.height;break;case l:i=(e[3]-c.width)/Math.abs(Math.sin(d*a.piece))}n=Math.min(n,i)}}),2*i/3>n&&(n=2*i/3,this.options.labelRotation||this.options.useHtml||(this.isBreakLabels=!0)),n-o()},getPointsInCategory:function(t){var e=this.polar.center,i=this.polar.radius,a=t.x-e[0],o=e[1]-t.y;if(a*a+o*o>i*i)return null;var s=n.getArcByPoint(a,o),h=this.scale.domain(),l=this.scale.rangeExtent(),u=r.quantize().domain(l).range(h),c=h.length,d=Math.round(s/(2*Math.PI)*c)%c,f=u(d);return this.vanchart.getValidPointsPara(f)},render:function(){var t=this.vanchart,e=t.renderer;this.axisGroup||(this.axisGroup=e.vgroup().add(t.backGroup)),this.axisGroup.attr("transform",n.makeTranslate(this.polar.center)),this._drawAxisLine(this.axisGroup),this._drawGridLine(this.axisGroup),this._drawTickLabel(this.axisGroup)},_drawAxisLine:function(t){var e=this.vanchart.renderer,i=this.polar.radiusAxis,n=this,r=n.options.lineWidth,a=n.options.lineColor,o=i.scale.domain()[1];this.axisLine||(this.axisLine=t.append(e.path())),this.axisLine.attr({d:i._getRadiusGridPath(o)}).style({fill:"none",stroke:a,"stroke-width":r})},_drawGridLine:function(t){var e=this.vanchart.renderer,i=this.polar.radiusAxis.options,n=i.lineWidth,r=i.lineColor;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var a=this.gridLinesGroup,o=this.getAngleGridLineData(),s=this._bindData(this.gridLines,o);s.exit.map(function(t){t.remove()});var h=s.enter.map(function(t){return a.append(e.line()).datum(t)});this.gridLines=h.concat(s.update).map(function(t){var e=t.datum();return t.style({stroke:r,"stroke-width":n}).attr({x1:0,y1:0,x2:e[0],y2:e[1]})})},_drawTickLabel:function(t){this._drawSvgTickLabel(t)},_drawSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.options,r=this.isBreakLabels,a=n.useHtml||r,o=i.tickData;this.tickLabelsGroup||(this.tickLabelsGroup=t.append(e.vgroup()),this.tickLabels=[]),a&&this.tickLabels.length&&"div"!==this.tickLabels[0].type&&(this.tickLabels.map(function(t){t.remove()}),this.tickLabels=[]);var s=this.tickLabelsGroup,h=this._bindData(this.tickLabels,o,function(t){return t.tickValue});if(h.exit.map(function(t){t.remove()}),n.showLabel){var l=h.enter.map(function(t){return s.append(e.vtext(a).datum(t))});this.tickLabels=l.concat(h.update).filter(function(t){return t.datum().tickPos}).map(function(t){var e=t.datum(),i=e.tickPos.x,n=e.tickPos.y,r="div"===t.type?"px":"",a={transform:"translate("+i+r+" "+n+r+")",dy:"0.85em"};return t.textContent(e.tickContent).style(e.tickPos.style).attr(a),t.vRotate(e.labelRotation),t})}},drawHighlightBackground:function(t){var e=t[0].category,i=this.scale,r=this.series[0]&&this.series[0].options.columnType||!1,o=this.vanchart.renderer,s=i.domain(),h=this.polar.radius,l=i(e)/s.length*2*Math.PI;if(r){var u=1/s.length*2*Math.PI*.5,c=l-u,d=l+u,f=a.arc().innerRadius(0).outerRadius(h).startAngle(c).endAngle(d);this.highlightBand||(this.highlightBand=this.axisGroup.append(o.path().style({fill:"rgba(98,179,240,0.2)"}))),this.highlightBand.attr("d",f())}else{var p=n.getArcPoint(h,l);this.highlightLine||(this.highlightLine=this.axisGroup.append(o.line({stroke:"rgb(140,140,140)","stroke-width":"1"}))),this.highlightLine.attr("x2",p[0]).attr("y2",p[1])}},remove:function(){this.axisGroup&&this.axisGroup.remove(),this.axisGroup=null}});return c}),define("component/RadiusAxis",["require","./Base","./ValueAxis","../utils/BaseUtils","../Constants","../ComponentLibrary","../utils/PathGenerator","../utils/Interpolator","../utils/Scale"],function(t){var e,i=(t("./Base"),t("./ValueAxis")),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=t("../utils/PathGenerator"),s=t("../utils/Interpolator"),h=t("../utils/Scale"),l=function(){return null==e&&(e=n.paddingConvertWithScale("0.125rem")),e},u=i.extend({_refresh:function(t){this.series=[],this.initScale(),this.refreshPolar(t)},refreshPolar:function(t){this.polar=this.vanchart.polar(t.axisIndex),this.polar.radiusAxis=this},doLayout:function(){var t=this.series;this.indicator=t.length&&t[0].options.indicator&&t[0].options.indicator.enabled,this.calculateDomainFromData(),this.scale.domain(this._domain).range([0,this.polar.radius]),this._initCateScale(this._domain,[0,this.polar.radius]),this._updateOriginTickData()},_initCateScale:function(t,e){var i=h.linear().domain(t).range(e);this._cateScale=i},_calculateCateDomainData:function(){var t,e=this,i=e.series,r=(i.vanchart,i.length&&i[0].options),o=r.indicator,s=this.type==a.VALUE_AXIS_COMPONENT&&!this._isBaseAxis(),h=Number.MAX_VALUE,l=-h,u={};this._cateDataDomain=[],o.data&&o.data.length&&(t=o.data.map(function(t){return{name:t.name,domain:[t.min,t.max]}}));for(var c=!1,d=0,f=i.length;f>d&&!c;d++)c=i[d].visible;i.forEach(function(t){if(t.visible||!c){var i=!(n.hasNotDefined(t.stack)||e._isBaseAxis());t.points.forEach(function(t){var e=t.category,n=t.value;!t.isNull&&t.visible&&(i?(u[e]=u[e]||[0,0],n>=0?u[e][1]+=n:u[e][0]+=n):(u[e]=u[e]||[h,l],u[e][0]=Math.min(u[e][0],n),u[e][1]=Math.max(u[e][1],n)))})}});for(key in u)this._cateDataDomain.push({useIndicator:!1,name:key,domain:u[key]});var p=function(t){s&&(t[0]>0?t[0]=0:t[1]<0&&(t[1]=0))};t&&t.forEach(function(t){var i=t.name,n=t.domain[0],r=t.domain[1];e._cateDataDomain.forEach(function(t){if(i===t.name){if(null==n&&null==r)return;if(null!=n&&null!=r&&n>=r)return;var e=t.domain[0],a=t.domain[1],o=n||(s&&e>0?0:e),h=r||(s&&0>a?0:a),l=!1,u=!1;n&&(l=!0),r&&(u=!0),l&&!u?h=o>=h?o+100:h:u&&!l&&(o=o>h?h-100:o),t.useIndicator=!0,t.domain=[o,h]}})}),this._cateDataDomain.forEach(function(t){t.useIndicator||p(t.domain)}),this._calculateCateNiceDomain(),this._updateCategoryTickData()},_calculateCateNiceDomain:function(){var t=this,e=t.series;e.vanchart;this._cateTickStart=[],this._cateStep=[],this._cateDomain=[];var i=!1,n=this._getDefaultTickCount();if(this._cateDataDomain.forEach(function(e){var r,a,o,s=e.name,h=e.domain,l=e.useIndicator;e.useIndicator?(i=!0,o=h[0],a=[h[0],h[1]],r=parseFloat((h[1]-h[0])/n)):(r=t._linearTickInterval(h[0],h[1]),a=t._linearNiceDomain(h[0],h[1],r),o=a[0]),t._cateTickStart.push(o),t._cateDomain.push({useIndicator:l,name:s,domain:a}),t._cateStep.push(r)}),!i){var r=this._getCateTickValues().map(function(t){return t.labels.length});n=Math.max.apply(Math,r)}this._cateDomain.forEach(function(e,i){var r=e.domain[0],a=e.domain[1],o=e.useIndicator;o||(_step=Math.ceil((a-r)/n),e.domain[1]=r+_step*n,t._cateStep[i]=_step)})},_updateCategoryTickData:function(){var t=this,e=this._getCateTickValues();this.cateTickData=[];for(var i=0,n=e.length;n>i;i++){for(var r=e[i].name,a=e[i].labels,o=[],s=0,h=a.length;h>s;s++)o.push(t._labelInfoFormatter(a[s]));t.cateTickData.push({name:r,tickData:o})}},_labelInfoFormatter:function(t){var e=this,i=this.options,r=i.formatter,o=i.useHtml,s=i.labelStyle||{},h=n.extend({writingMode:"tb-rl","writing-mode":"tb-rl","-webkit-writing-mode":"vertical-rl"},s),l=e._getTickContent(t,r);e.type===a.CATEGORY_AXIS_COMPONENT&&(l=l.trim());var u,c,d=s,f=e.labelRotation;return 90===Math.abs(f)&&n.hasChn(l)&&(f=360,d=h),u=n.getTextDimension(l,d,o),c=n.getTextDimRotated(u,f),o&&(c.width=isNaN(parseFloat(i.labelWidth))?c.width:parseFloat(i.labelWidth),c.height=isNaN(parseFloat(i.labelHeight))?c.height:parseFloat(i.labelHeight)),{tickValue:t,tickContent:l,tickDim:c,tickRectDim:u,labelRotation:f}},_getCateTickValues:function(){if(!this._cateDataDomain)return[];var t=[],e=this;return this._cateDomain.forEach(function(i,r){for(var a=[],o=e._cateTickStart[r],s=e._cateStep[r],h=i.domain[1];h>=o;o=n.accAdd(o,s))a.push(o);t.push({name:i.name,labels:a})}),t},fixScaleAndTickData:function(){this.scale.domain(this._domain).range([0,this.polar.radius]),this._updateOriginTickData()},getRadiusPlotBands:function(){var t=this._getPlotBands(),e=[],i=this;return t.forEach(function(t){e.push({path:i._getRadiusPlotBandsPath(t.from,t.to),color:t.color})}),e},_getRadiusPlotBandsPath:function(t,e){var i=this.polar.shape;if(i===r.POLYGON_RADAR)return this._getRadiusGridPath(Math.min(t,e))+this._getRadiusGridPath(Math.max(t,e),!0);var n=o.arc().startAngle(0).endAngle(2*Math.PI);return n.innerRadius(this.scale(Math.min(t,e))).outerRadius(this.scale(Math.max(t,e)))()},getPlotLines:function(){var t=this.options.plotLines||[],e=this,i=[];return t.forEach(function(t){var n,a,o;t.label&&t.label.text&&t.label.style&&(n=t.label.text,a=t.label.style,o=t.label.align),i.push({color:t.color,value:t.value,width:t.width,dataArray:r.DASH_TYPE[t.dashStyle],text:n,baseY:-e.scale(t.value),textAnchor:o==r.LEFT?"end":"start",style:a})}),i},_getRadiusGridPath:function(t,e){var i=this._getRadiusGridData(t,e);return this._getRadiusGridPathByData(i)},_getRadiusGridData:function(t,e,i){var a=i||this.scale,o=this.polar.angleAxis,s=this.polar.shape;if(s===r.POLYGON_RADAR){var h=[],l=o.scale,u=l.domain();return u.forEach(function(e){var i=l(e)*o.piece,r=a(t);h.push(n.getArcPoint(r,i))}),e&&h.reverse(),h}return a(t)},_getRadiusGridPathByData:function(t){if(n.isArray(t)){var e="";if(t.length){for(var i=0,r=t.length;r>i;i++){var a=i?"L":"M";e+=a+n.dealFloatPrecision(t[i][0])+","+n.dealFloatPrecision(t[i][1])}e+="Z"}return e}var s=o.arc().startAngle(0).endAngle(2*Math.PI).innerRadius(0);return s.outerRadius(t)()},render:function(){var t=this.vanchart,e=t.renderer;this.axisGroup||(this.axisGroup=e.vgroup().add(t.backGroup),e.clip(this.axisGroup.renderG,this.polar.clip)),this.axisGroup.attr("transform",n.makeTranslate(this.polar.center)),this._drawPlotBands(this.axisGroup),this.indicator?this._drawCateGridLine(this.axisGroup):this._drawGridLine(this.axisGroup),this._drawPlotLines(this.axisGroup),this._drawTickLabel(this.axisGroup)},_drawGridLine:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i.scale,r=i.options,a=i.getTickData(),o=r.gridLineColor,h=r.gridLineWidth;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var l=this.gridLinesGroup,u=this._bindData(this.gridLines,a);u.exit.map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue,!1,n),a=i._getRadiusGridData(e.tickValue);t.animate({attrTween:{d:function(){var t=s(r,a);return function(e){return i._getRadiusGridPathByData(t(e))}}}}).remove()});var c=u.enter.map(function(t){return l.append(e.path()).datum(t)});this.gridLines=c.concat(u.update).map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue);t.style({fill:"none",stroke:o,"stroke-width":h,opacity:1});var a=i._getRadiusGridData(e.tickValue,!1,n);return t.animate({attrTween:{d:function(){var t=s(a,r);return function(e){return i._getRadiusGridPathByData(t(e))}}}}),t})},_drawCateGridLine:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i._cateScale,r=i.options,a=i.cateTickData[0].tickData,o=r.gridLineColor,h=r.gridLineWidth,l=i._cateDomain[0].domain;this.gridLinesGroup||(this.gridLinesGroup=t.append(e.group()),this.gridLines=[]);var u=this.gridLinesGroup,c=this._bindData(this.gridLines,a);c.exit.map(function(t){var e=t.datum(),r=i._getRadiusGridData(e.tickValue,!1,n),a=i._getRadiusGridData(e.tickValue,!1,n);t.animate({attrTween:{d:function(){var t=s(r,a);return function(e){return i._getRadiusGridPathByData(t(e))}}}}).remove()});var d=c.enter.map(function(t){return u.append(e.path()).datum(t)});this.gridLines=d.concat(c.update).map(function(t){var e=t.datum();n.domain(l);var r=i._getRadiusGridData(e.tickValue,!1,n);t.style({fill:"none",stroke:o,"stroke-width":h,opacity:1});var a=i._getRadiusGridData(e.tickValue,!1,n);return t.animate({attrTween:{d:function(){var t=s(a,r);return function(e){return i._getRadiusGridPathByData(t(e))}}}}),t})},_drawPlotLines:function(t){var e=this.vanchart.renderer,i=this.getPlotLines();this.plotLinesGroup||(this.plotLinesGroup=t.append(e.vgroup()),this.plotLines=[]);var n=this.plotLinesGroup,r=this._bindData(this.plotLines,i);r.exit.map(function(t){t.text&&t.text.remove(),t.remove()});var a=r.enter.map(function(t){var i=n.append(e.path().datum(t));return t.text&&(i.text=n.append(e.vtext())),i});this.plotLines=a.concat(r.update).map(function(t){var e=t.datum(),i=this._getRadiusGridPath(e.value);return t.style({fill:"none",stroke:e.color,"stroke-width":e.width,"stroke-dasharray":e.dataArray}).animate({attr:{d:i}}),t.text&&t.text.textContent(e.text).style(e.style).attr({y:e.baseY}),t},this)},_drawPlotBands:function(t){var e=this.vanchart.renderer,i=this.getRadiusPlotBands();this.plotBandsGroup||(this.plotBandsGroup=t.append(e.group()),this.plotBands=[]);var n=this.plotBandsGroup,r=this._bindData(this.plotBands,i);
r.exit.map(function(t){t.remove()});var a=r.enter.map(function(t){return n.append(e.path()).datum(t)});this.plotBands=a.concat(r.update).map(function(t){var e=t.datum();return t.style("fill",e.color).animate({attr:{d:e.path}}),t},this)},_drawTickLabel:function(t){this.indicator?this._drawCateSvgTickLabel(t):this._drawSvgTickLabel(t)},_drawSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.scale,r=i.lastScale||i.scale,a=i.options,o=i.getTickData().slice(0,-1),s=a.labelStyle,h=a.useHtml;this.tickLabelsGroup||(this.tickLabelsGroup=t.append(e.vgroup()),this.tickLabels=[]);var u=this.tickLabelsGroup,c=this._bindData(this.tickLabels,o,function(t){return t.tickValue});if(c.exit.map(function(t){t.remove()}),a.showLabel){var d=c.enter.map(function(t){return u.append(e.vtext(h).datum(t))});this.tickLabels=d.concat(c.update).map(function(t){var e=t.datum();t.textContent(e.tickContent).style(s);var i=-(e.tickRectDim.width+e.tickDim.width)/2-l(),a=-n(e.tickValue)-(e.tickRectDim.height+e.tickDim.height)/2,o={transform:"translate("+i+" "+a+")",dy:"0.85em"};if(h)t.attr(o),t.vRotate(e.labelRotation);else{var u=e.labelRotation%360?t.vRotate(e.labelRotation).rotateStr:"";o.transform+=u;var c=-(e.tickRectDim.width+e.tickDim.width)/2-l(),d=-r(e.tickValue)-(e.tickRectDim.height+e.tickDim.height)/2,f={transform:"translate("+c+" "+d+")",dy:"0.85em"};f.transform+=u,t.attr(f).animate({attr:o})}return t})}},_drawCateSvgTickLabel:function(t){var e=this.vanchart.renderer,i=this,n=i.lastScale||i._cateScale,r=i.options,a=(i.getTickData().slice(0,-1),r.labelStyle),o=r.useHtml;this.cateTickLabelsGroup||(this.cateTickLabelsGroup=t.append(e.vgroup()),this.cateTickLabels=[],this._cateDataDomain.forEach(function(){i.cateTickLabels.push([])}));var s=this.cateTickLabelsGroup,h=function(t,e){var i=t>=0?"RIGHT":"LEFT",n=e>=0?"BOTTOM":"TOP";return i+"_"+n},u=function(t,e,i,n,r,a,o){var s=l(),h=(n+a)/2,u=(r+o)/2;switch(t){case"LEFT_TOP":_x=e+s,_y=i+s;break;case"RIGHT_TOP":_x=e-h-s,_y=i+s;break;case"RIGHT_BOTTOM":_x=e+-h-s,_y=i-u-s;break;case"LEFT_BOTTOM":_x=e+s,_y=i-u-s}return{x:_x,y:_y}},c=this.series[0].angleAxis.getCateAngleGridLineData(),d=(this.cateTickData.map(function(t){return t.tickData.length}),n.domain()),f=n.range();this.cateTickData.forEach(function(t,l){var d,f=t.name,p=i._bindData(i.cateTickLabels[l],t.tickData,function(t){return t.tickValue});c.forEach(function(t){t.name==f&&(d=t.pos)}),p.exit.map(function(t){t.remove()});var g=d[0],m=d[1],v=h(g,m);if(r.showLabel){var _=p.enter.map(function(t){return s.append(e.vtext(o).datum(t))});i.cateTickLabels[l]=_.concat(p.update).map(function(t,e,r){var s=t.datum();t.textContent(s.tickContent).style(a),n.domain(i._cateDomain[l].domain),n.range([0,g]);var h=n(s.tickValue);n.range([0,m]);var c=n(s.tickValue),d=u(v,h,c,s.tickRectDim.width,s.tickRectDim.height,s.tickDim.width,s.tickDim.height),f=d.x,p=d.y,_={transform:"translate("+f+" "+p+")",dy:"0.85em"};if(o)t.attr(_),t.vRotate(s.labelRotation);else{var y=s.labelRotation%360?t.vRotate(s.labelRotation).rotateStr:"";_.transform+=y;var x=f,b=p,T={transform:"translate("+x+" "+b+")",dy:"0.85em"};T.transform+=y,t.attr(T).animate({attr:_})}return t})}}),n.range(f).domain(d)}});return u}),define("component/PolarAxis",["require","./Base","../utils/BaseUtils","../Constants","./Axis","./Polar","./AngleAxis","./RadiusAxis","../ComponentLibrary"],function(t){var e=(t("./Base"),t("../utils/BaseUtils")),i=(t("../Constants"),t("./Axis")),n=t("./Polar"),r=t("./AngleAxis"),a=t("./RadiusAxis"),o=t("../ComponentLibrary"),s=i.extend({_refresh:function(){this._axisList=this._axisList||[];var t=this.options;t=e.isArray(t)?t:[t];for(var i=t.length,s=i;s<this._axisList.length;s++)this._axisList[s].remove(),this._axisList[s]=null;this._axisList.length=i;for(var s=i-1;s>=0;s--)if(t[s].axisIndex=s,this._axisList[s]&&this._axisList[s].type!=t[s].type&&(this._axisList[s].remove(),this._axisList[s]=null),this._axisList[s])this._axisList[s].refresh(t[s]);else{var h;if(this.componentType===o.POLAR_COMPONENT)h=n;else{var l=t[s].type||o.VALUE_AXIS_COMPONENT;l==o.VALUE_AXIS_COMPONENT?h=a:l==o.CATEGORY_AXIS_COMPONENT&&(h=r)}this._axisList[s]=new h(t[s],this.componentType,this.vanchart)}},doLayout:function(){for(var t=this._axisList.length,e=t-1;e>=0;e--)this._axisList[e].doLayout()},render:function(){this._axisList.map(function(t){t.componentType===o.POLAR_COMPONENT&&t.render()})}});return o.register(o.RADIUS_AXIS_COMPONENT,s),o.register(o.ANGLE_AXIS_COMPONENT,s),o.register(o.POLAR_COMPONENT,s),s}),define("component/Title",["require","./Base","../utils/BaseUtils","../Constants","../ComponentLibrary"],function(t){var e,i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=function(){return null==e&&(e=n.paddingConvertWithScale("0.3125rem")),e},s=i.extend({doLayout:function(){var t=this.options;if(t.text){var e,i=this.vanchart.bounds,s=i.width,h=i.height;if(this.isFloat)s-=this._floatX-i.x,h-=this._floatY-i.y;else{var l=this.vanchart.components[a.TOOLBAR_COMPONENT];this.initBarWidth=l&&l.getToolBarInitWidth()||0,s-=this.initBarWidth,"center"===t.align&&(s-=this.initBarWidth)}if(s-=2*o(),h-=2*o(),e=n.getTextDimension(t.text,t.style,t.useHtml),e.width>s){var u=n.clone(t.style);u.width=Math.max(s,0)+"px",e=n.getTextWrapDimension(t.text,u,t.useHtml)}else e.width+=.5;if(e.height=Math.min(this._maxHeight(),h,e.height),this.isFloat)this.bounds={x:this._floatX,y:this._floatY,width:e.width+2*o(),height:e.height+2*o()};else{var c=e.height+2*o();this._setComponentBounds(r.TOP,c)}if(this.isFloat)this.textBounds={x:o(),y:o(),width:e.width,height:e.height};else{var d;switch(t.align){case"right":d=s-e.width;break;case"center":d=this.bounds.width/2-e.width/2;break;case"left":default:d=this.bounds.x+o()}this.textBounds={x:d,y:o(),width:e.width,height:e.height}}if(t.useHtml)this.labels=[],this.labels.push({text:t.text,dim:e,style:t.style});else{var f=n.splitText(t.text,t.style,this.textBounds.width);this.labels=f.map(function(e){return{text:e,dim:n.getTextDimension(e,t.style,t.useHtml),style:t.style}})}}},render:function(){if(!this.textBounds||this.textBounds.width<0||this.textBounds.height<0)return void this.remove();var t=this.vanchart,e=t.renderer;this.titleGroup||(this.titleGroup=e.vgroup(),this.titleGroup.renderG.addTo(this.isFloat?t.frontGroup:t.backGroup),this.titleGroup.divG.add(),this.titleGroup.divG.style("pointer-events","auto")),this.titleGroup.attr("transform",n.makeTranslate([this.bounds.x,this.bounds.y])),this._innerClip(this.titleGroup),this.drawBackground(this.titleGroup.renderG),this.drawTitle(this.titleGroup)},drawBackground:function(t){var e=this.options,i=this.bounds;e.backgroundColor&&this.vanchart._renderRectangleBackground(t,e,{x:0,y:0,width:i.width,height:i.height})},drawTitle:function(t){this.text&&(this.text.remove(),this.text=null);var e=this.vanchart.renderer,i=this.options,a=this.textBounds,o=i.useHtml,s=i.align,h=e.vtext(o).attr({transform:n.makeTranslate([a.x,a.y]),width:a.width+"px","text-align":s,"white-space":"normal"});this.text=h;var l=o?{}:n.isMS?{dy:"1em"}:{"dominant-baseline":"central",dy:a.height/this.labels.length/2},u=0;this.labels.map(function(t){var i,n=t.dim;switch(s){case r.LEFT:i=0;break;case r.RIGHT:i=a.width-n.width;break;case r.CENTER:default:i=(a.width-n.width)/2}h.append(e.vtspan(o).attr({y:u,x:0,dx:i}).attr(l).textContent(t.text).style(t.style)),u+=n.height}),t.append(h)},remove:function(){this.titleGroup&&this.titleGroup.remove(),this._clip&&this._clip.remove(),this.titleGroup=this._clip=null}});return a.register(a.TITLE_COMPONENT,s),s}),define("utils/GeoUtils",["require","./Bounds"],function(t){function e(t,e){t&&l.hasOwnProperty(t.type)&&l[t.type](t,e)}function i(t,e){for(var i,n=-1,r=t.length;++n<r;)i=t[n],e.push(i)}function n(t,e){for(var n=-1,r=t.length;++n<r;)i(t[n],e)}function r(t){var i=[];return t&&h.hasOwnProperty(t.type)?h[t.type](t,i):e(t,i),i}function a(t,e){for(var i=t.features,n=0,a=i.length;a>n;n++){var o=i[n].properties.center;o&&(o[0]*=e,o[1]*=e)}for(var s=r(t),n=0,a=s.length;a>n;n++)s[n][0]*=e,s[n][1]*=e}function o(t){var e=new s(r(t));return[[e.min.x,e.min.y],[e.max.x,e.max.y]]}var s=t("./Bounds"),h={Feature:function(t,i){e(t.geometry,i)},FeatureCollection:function(t,i){for(var n=t.features,r=-1,a=n.length;++r<a;)e(n[r].geometry,i)}},l={Point:function(t,e){e.push(t.coordinates)},MultiPoint:function(t,e){for(var i=t.coordinates,n=-1,r=i.length;++n<r;)t=i[n],e.push(t)},LineString:function(t,e){i(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,a=n.length;++r<a;)i(n[r],e)},Polygon:function(t,e){n(t.coordinates,e)},MultiPolygon:function(t,e){for(var i=t.coordinates,r=-1,a=i.length;++r<a;)n(i[r],e)},GeometryCollection:function(t,i){for(var n=t.geometries,r=-1,a=n.length;++r<a;)e(n[r],i)}};return{getAllPoints:r,scaleGeo:a,bounds:o}}),define("chart/map/layer/ImageOverlay",["require","./../../../vector/Layer","../LatLngBounds","../../../utils/BaseUtils","../../../dom/DomUtils","../../../utils/Bounds"],function(t){var e=t("./../../../vector/Layer"),i=t("../LatLngBounds"),n=t("../../../utils/BaseUtils"),r=t("../../../dom/DomUtils"),a=t("../../../utils/Bounds"),o=e.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1},initialize:function(t,e,r){this._url=t,this._bounds=i.create(e),n.setOptions(this,r)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){r.remove(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&r.toFront(this._image),this},bringToBack:function(){return this._map&&r.toBack(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=t,this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},getBounds:function(){return this._bounds},_initImage:function(){var t=this._image=r.create("img","leaflet-image-layer "+(this._zoomAnimated?"leaflet-zoom-animated":""));t.onselectstart=n.falseFn,t.onmousemove=n.falseFn,t.onload=n.bind(this.fire,this,"load"),this.options.crossOrigin&&(t.crossOrigin=""),t.src=this._url,t.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;r.setTransform(this._image,i,e)},_reset:function(){var t=this._image,e=new a(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();r.setPosition(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){r.setOpacity(this._image,this.options.opacity)}});return o}),define("chart/map/layer/GridLayer",["require","./../../../vector/Layer","../../../utils/BaseUtils","../../../dom/DomUtils","../../../dom/Browser","../../../utils/Point2D","../../../utils/Bounds","../LatLngBounds"],function(t){var e=t("./../../../vector/Layer"),i=t("../../../utils/BaseUtils"),n=t("../../../dom/DomUtils"),r=t("../../../dom/Browser"),a=t("../../../utils/Point2D"),o=t("../../../utils/Bounds"),s=t("../LatLngBounds"),h=e.extend({options:{tileSize:256,opacity:1,updateWhenIdle:r.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){i.setOptions(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView(),this._update()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),n.remove(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=null},bringToFront:function(){return this._map&&(n.toFront(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(n.toBack(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){return this._map&&(this._removeAllTiles(),this._update()),this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,panend:this._onPanEnd};return this.options.updateWhenIdle||(this._onPanMove||(this._onPanMove=i.throttle(this._onPanEnd,this.options.updateInterval,this)),t.panmove=this._onPanMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof a?t:new a(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,i=this.getPane().children,n=-t(-(1/0),1/0),r=0,a=i.length;a>r;r++)e=i[r].style.zIndex,i[r]!==this._container&&e&&(n=t(n,+e));isFinite(n)&&(this.options.zIndex=n+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!r.ielt9){n.setOpacity(this._container,this.options.opacity);var t=+new Date,e=!1,a=!1;for(var o in this._tiles){var s=this._tiles[o];if(s.current&&s.loaded){var h=Math.min(1,(t-s.loaded)/200);n.setOpacity(s.el,h),1>h?e=!0:(s.active&&(a=!0),s.active=!0)}}a&&!this._noPrune&&this._pruneTiles(),e&&(i.cancelAnimFrame(this._fadeFrame),this._fadeFrame=i.requestAnimFrame(this._updateOpacity,this))}},_initContainer:function(){this._container||(this._container=n.create("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var r in this._levels)this._levels[r].el.children.length||r===t?this._levels[r].el.style.zIndex=e-Math.abs(t-r):(n.remove(this._levels[r].el),this._removeTilesAtZoom(r),delete this._levels[r]);var a=this._levels[t],o=this._map;return a||(a=this._levels[t]={},a.el=n.create("div","leaflet-tile-container leaflet-zoom-animated",this._container),a.el.style.zIndex=e,a.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),a.zoom=t,this._setZoomTransform(a,o.getCenter(),o.getZoom()),i.falseFn(a.el.offsetWidth)),this._level=a,a}},_pruneTiles:function(){if(this._map){var t,e,i=this._map.getZoom();if(i>this.options.maxZoom||i<this.options.minZoom)return void this._removeAllTiles();for(t in this._tiles)e=this._tiles[t],e.retain=e.current;for(t in this._tiles)if(e=this._tiles[t],e.current&&!e.active){var n=e.coords;this._retainParent(n.x,n.y,n.z,n.z-5)||this._retainChildren(n.x,n.y,n.z,n.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)n.remove(this._levels[t].el),delete this._levels[t];this._removeAllTiles(),this._tileZoom=null},_retainParent:function(t,e,i,n){var r=Math.floor(t/2),o=Math.floor(e/2),s=i-1,h=new a(+r,+o);h.z=+s;var l=this._tileCoordsToKey(h),u=this._tiles[l];return u&&u.active?(u.retain=!0,!0):(u&&u.loaded&&(u.retain=!0),s>n?this._retainParent(r,o,s,n):!1)},_retainChildren:function(t,e,i,n){for(var r=2*t;2*t+2>r;r++)for(var o=2*e;2*e+2>o;o++){var s=new a(r,o);s.z=i+1;var h=this._tileCoordsToKey(s),l=this._tiles[h];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n>i+1&&this._retainChildren(r,o,i+1,n))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_setView:function(t,e,i,n){var r=Math.round(e);(void 0!==this.options.maxZoom&&r>this.options.maxZoom||void 0!==this.options.minZoom&&r<this.options.minZoom)&&(r=void 0);var a=this.options.updateWhenZooming&&r!==this._tileZoom;(!n||a)&&(this._tileZoom=r,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==r&&this._update(t),i||this._pruneTiles(),this._noPrune=!!i),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var i in this._levels)this._setZoomTransform(this._levels[i],t,e)},_setZoomTransform:function(t,e,i){var a=this._map.getZoomScale(i,t.zoom),o=t.origin.multiplyBy(a).subtract(this._map._getNewPixelOrigin(e,i)).round();r.any3d?n.setTransform(t.el,o,a):n.setPosition(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,i=this._tileSize=this.getTileSize(),n=this._tileZoom,r=this._map.getPixelWorldBounds(this._tileZoom);r&&(this._globalTileRange=this._pxBoundsToTileRange(r)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],n).x/i.x),Math.ceil(t.project([0,e.wrapLng[1]],n).x/i.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],n).y/i.x),Math.ceil(t.project([e.wrapLat[1],0],n).y/i.y)]},_onPanEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,i=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),n=e.getZoomScale(i,this._tileZoom),r=e.project(t,this._tileZoom).floor(),a=e.getSize().divideBy(2*n);return new o(r.subtract(a),r.add(a))},_update:function(t){var e=this._map;if(e){var i=e.getZoom();if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var n=this._getTiledPixelBounds(t),r=this._pxBoundsToTileRange(n),s=r.getCenter(),h=[],l=this.options.keepBuffer,u=new o(r.getBottomLeft().subtract([l,-l]),r.getTopRight().add([l,-l]));for(var c in this._tiles){var d=this._tiles[c].coords;d.z===this._tileZoom&&u.contains(new a(d.x,d.y))||(this._tiles[c].current=!1)}if(Math.abs(i-this._tileZoom)>1)return void this._setView(t,i);for(var f=r.min.y;f<=r.max.y;f++)for(var p=r.min.x;p<=r.max.x;p++){var g=new a(p,f);if(g.z=this._tileZoom,this._isValidTile(g)){var m=this._tiles[this._tileCoordsToKey(g)];m?m.current=!0:h.push(g)}}if(h.sort(function(t,e){return t.distanceTo(s)-e.distanceTo(s)}),0!==h.length){this._loading||(this._loading=!0,this.fire("loading"));var v=document.createDocumentFragment();for(p=0;p<h.length;p++)this._addTile(h[p],v);this._level.el.appendChild(v)}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var i=this._globalTileRange;if(!e.wrapLng&&(t.x<i.min.x||t.x>i.max.x)||!e.wrapLat&&(t.y<i.min.y||t.y>i.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return s.create(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToBounds:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i),a=e.unproject(n,t.z),o=e.unproject(r,t.z);return this.options.noWrap||(a=e.wrapLatLng(a),o=e.wrapLatLng(o)),new s(a,o)},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new a(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(n.remove(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){n.addClass(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=i.falseFn,t.onmousemove=i.falseFn,r.ielt9&&this.options.opacity<1&&n.setOpacity(t,this.options.opacity),r.android&&!r.android23&&(t.style.WebkitBackfaceVisibility="hidden")},_addTile:function(t,e){var r=this._getTilePos(t),a=this._tileCoordsToKey(t),o=this.createTile(this._wrapCoords(t),i.bind(this._tileReady,this,t));this._initTile(o),this.createTile.length<2&&i.requestAnimFrame(i.bind(this._tileReady,this,t,null,o)),n.setPosition(o,r),this._tiles[a]={el:o,coords:t,current:!0},e.appendChild(o),this.fire("tileloadstart",{tile:o,coords:t})},_tileReady:function(t,e,a){if(this._map){e&&this.fire("tileerror",{error:e,tile:a,coords:t});var o=this._tileCoordsToKey(t);a=this._tiles[o],a&&(a.loaded=+new Date,this._map._fadeAnimated?(n.setOpacity(a.el,0),i.cancelAnimFrame(this._fadeFrame),this._fadeFrame=i.requestAnimFrame(this._updateOpacity,this)):(a.active=!0,this._pruneTiles()),e||(n.addClass(a.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:a.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),r.ielt9||!this._map._fadeAnimated?i.requestAnimFrame(this._pruneTiles,this):setTimeout(i.bind(this._pruneTiles,this),250)))}},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new a(this._wrapX?i.wrapNum(t.x,this._wrapX):t.x,this._wrapY?i.wrapNum(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new o(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});return h}),define("chart/map/layer/TileLayer",["require","./GridLayer","../../../utils/BaseUtils","../../../dom/DomUtils","../CRS","../../../dom/Browser"],function(t){var e=t("./GridLayer"),i=t("../../../utils/BaseUtils"),n=t("../../../dom/DomUtils"),r=t("../CRS"),a=t("../../../dom/Browser"),o="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=",s=e.extend({options:{minZoom:0,maxZoom:18,maxNativeZoom:null,minNativeZoom:null,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1},initialize:function(t,e){this._url=t,e=i.setOptions(this,e),e.detectRetina&&a.retina&&e.maxZoom>0&&(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom++):(e.zoomOffset++,e.maxZoom--),e.minZoom=Math.max(0,e.minZoom)),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split(""))},setUrl:function(t,e){return this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return Hammer.on(n,"load",i.bind(this._tileOnLoad,this,e,n)),Hammer.on(n,"error",i.bind(this._tileOnError,this,e,n)),this.options.crossOrigin&&(n.crossOrigin=""),n.alt="",n.setAttribute("role","presentation"),n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:a.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=n),e["-y"]=n}return i.template(this._url,i.extend(e,this.options))},_tileOnLoad:function(t,e){a.ielt9?setTimeout(i.bind(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&(e.src=n),t(i,e)},getTileSize:function(){var t=this._map,i=e.prototype.getTileSize.call(this),n=this._tileZoom+this.options.zoomOffset,r=this.options.minNativeZoom,a=this.options.maxNativeZoom;return null!==r&&r>n?i.divideBy(t.getZoomScale(r,n)).round():null!==a&&n>a?i.divideBy(t.getZoomScale(a,n)).round():i},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset,r=this.options.minNativeZoom,a=this.options.maxNativeZoom;return i&&(t=e-t),t+=n,null!==r&&r>t?r:null!==a&&t>a?a:t},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)this._tiles[t].coords.z!==this._tileZoom&&(e=this._tiles[t].el,e.onload=i.falseFn,e.onerror=i.falseFn,e.complete||(e.src=o,n.remove(e)))}});return s.WMS=s.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var n=i.extend({},this.defaultWmsParams);for(var r in e)r in this.options||(n[r]=e[r]);e=i.setOptions(this,e),n.width=n.height=e.tileSize*(e.detectRetina&&a.retina?2:1),this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,s.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToBounds(t),n=this._crs.project(e.getNorthWest()),a=this._crs.project(e.getSouthEast()),o=(this._wmsVersion>=1.3&&this._crs===r.EPSG4326?[a.y,n.x,n.y,a.x]:[n.x,a.y,a.x,n.y]).join(","),h=s.prototype.getTileUrl.call(this,t);return h+i.getParamString(this.wmsParams,h,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+o},setParams:function(t,e){return i.extend(this.wmsParams,t),e||this.redraw(),this}}),s}),define("chart/map/layer/Control",["require","../../../utils/Class","../../../utils/BaseUtils","../../../dom/DomUtils"],function(t){var e=t("../../../utils/Class"),i=t("../../../utils/BaseUtils"),n=t("../../../dom/DomUtils"),r=e.extend({options:{position:"bottomleft"},initialize:function(t){i.setOptions(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),r=t._controlCorners[i];return n.addClass(e,"leaflet-control"),-1!==i.indexOf("bottom")?r.insertBefore(e,r.firstChild):r.appendChild(e),this},remove:function(){return this._map?(n.remove(this._container),this.onRemove&&this.onRemove(this._map),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}});return r.Attribution=r.extend({options:{position:"bottomright",prefix:""},initialize:function(t){i.setOptions(this,t),this._attributions={}},onAdd:function(t){return t.attributionControl=this,this._container=n.create("div","leaflet-control-attribution"),this._update(),this._container},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(" | ")}}}),r.Zoom=r.extend({options:{position:"topleft",zoomInText:"+",zoomInTitle:"Zoom in",zoomOutText:"-",zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=n.create("div",e+" leaflet-bar"),r=this.options;return this._zoomInButton=this._createButton(r.zoomInText,r.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(r.zoomOutText,r.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i.style.position="absolute",i.style.left=r._topLeft.x+"px",i.style.top=r._topLeft.y+"px",i.style["z-index"]=800,i.style["pointer-events"]="auto",i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,r,a){var o=n.create("a",i,r);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),Hammer.on(o,"mousedown dblclick",n.stopPropagation).on(o,"click",n.stop).on(o,"click",a.bind(this)).on(o,"click",this._refocusOnMap.bind(this)),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";n.removeClass(this._zoomInButton,e),n.removeClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMinZoom())&&n.addClass(this._zoomOutButton,e),(this._disabled||t._zoom===t.getMaxZoom())&&n.addClass(this._zoomInButton,e)}}),r}),define("chart/map/layer/FeatureGroup",["require","./../../../vector/shape/LayerGroup","../LatLngBounds"],function(t){var e=t("./../../../vector/shape/LayerGroup"),i=t("../LatLngBounds"),n=e.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),e.prototype.addLayer.call(this,t),this)},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),e.prototype.removeLayer.call(this,t),this):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new i;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}});return n}),define("utils/LineUtils",["require","./Point2D"],function(t){var e=t("./Point2D");return{simplify:function(t,e){if(!e||!t.length)return t.slice();var i=e*e;return t=this._reducePoints(t,i),t=this._simplifyDP(t,i)},pointToSegmentDistance:function(t,e,i){return Math.sqrt(this._sqClosestPointOnSegment(t,e,i,!0))},closestPointOnSegment:function(t,e,i){return this._sqClosestPointOnSegment(t,e,i)},_simplifyDP:function(t,e){var i=t.length,n=typeof Uint8Array!=void 0+""?Uint8Array:Array,r=new n(i);r[0]=r[i-1]=1,this._simplifyDPStep(t,r,e,0,i-1);var a,o=[];for(a=0;i>a;a++)r[a]&&o.push(t[a]);return o},_simplifyDPStep:function(t,e,i,n,r){var a,o,s,h=0;for(o=n+1;r-1>=o;o++)s=this._sqClosestPointOnSegment(t[o],t[n],t[r],!0),s>h&&(a=o,h=s);h>i&&(e[a]=1,this._simplifyDPStep(t,e,i,n,a),this._simplifyDPStep(t,e,i,a,r))},_reducePoints:function(t,e){for(var i=[t[0]],n=1,r=0,a=t.length;a>n;n++)this._sqDist(t[n],t[r])>e&&(i.push(t[n]),r=n);return a-1>r&&i.push(t[a-1]),i},clipSegment:function(t,e,i,n,r){var a,o,s,h=n?this._lastCode:this._getBitCode(t,i),l=this._getBitCode(e,i);for(this._lastCode=l;;){if(!(h|l))return[t,e];if(h&l)return!1;a=h||l,o=this._getEdgeIntersection(t,e,a,i,r),s=this._getBitCode(o,i),a===h?(t=o,h=s):(e=o,l=s)}},_getEdgeIntersection:function(t,i,n,r,a){var o,s,h=i.x-t.x,l=i.y-t.y,u=r.min,c=r.max;return 8&n?(o=t.x+h*(c.y-t.y)/l,s=c.y):4&n?(o=t.x+h*(u.y-t.y)/l,s=u.y):2&n?(o=c.x,s=t.y+l*(c.x-t.x)/h):1&n&&(o=u.x,s=t.y+l*(u.x-t.x)/h),new e(o,s,a)},_getBitCode:function(t,e){var i=0;return t.x<e.min.x?i|=1:t.x>e.max.x&&(i|=2),t.y<e.min.y?i|=4:t.y>e.max.y&&(i|=8),i},_sqDist:function(t,e){var i=e.x-t.x,n=e.y-t.y;return i*i+n*n},_sqClosestPointOnSegment:function(t,i,n,r){var a,o=i.x,s=i.y,h=n.x-o,l=n.y-s,u=h*h+l*l;return u>0&&(a=((t.x-o)*h+(t.y-s)*l)/u,a>1?(o=n.x,s=n.y):a>0&&(o+=h*a,s+=l*a)),h=t.x-o,l=t.y-s,r?h*h+l*l:new e(o,s)},clipPolygon:function(t,e,i){var n,r,a,o,s,h,l,u,c,d=[1,4,2,8];for(r=0,l=t.length;l>r;r++)t[r]._code=this._getBitCode(t[r],e);for(o=0;4>o;o++){for(u=d[o],n=[],r=0,l=t.length,a=l-1;l>r;a=r++)s=t[r],h=t[a],s._code&u?h._code&u||(c=this._getEdgeIntersection(h,s,u,e,i),c._code=this._getBitCode(c,e),n.push(c)):(h._code&u&&(c=this._getEdgeIntersection(h,s,u,e,i),c._code=this._getBitCode(c,e),n.push(c)),n.push(s));t=n}return t}}}),define("chart/map/layer/GeoJSON",["require","./FeatureGroup","../../../utils/BaseUtils","../../../utils/Point2D","../../../utils/Bounds","../LatLng","../LatLngBounds","../Marker","../../../vector/shape/Path","../../../utils/LineUtils"],function(t){var e=t("./FeatureGroup"),i=t("../../../utils/BaseUtils"),n=t("../../../utils/Point2D"),r=t("../../../utils/Bounds"),a=t("../LatLng"),o=t("../LatLngBounds"),s=(t("../Marker"),
t("../../../vector/shape/Path")),h=t("../../../utils/LineUtils"),l=e.extend({initialize:function(t,e){i.setOptions(this,e),this._layers={},this._featureLayerMap={},t&&this.addData(t)},addData:function(t){var e,n,r,a=i.isArray(t)?t:t.features;if(a){for(e=0,n=a.length;n>e;e++)r=a[e],(r.geometries||r.geometry||r.features||r.coordinates)&&this.addData(r);return this}var o=this.options;if(o.filter&&!o.filter(t))return this;var s=this.geometryToLayer(t,o);return s?(s.options=i.extend({},this.options),this._featureLayerMap[i.stamp(t)]=s,this.addLayer(s)):this},getLayerByFeature:function(t){return this._featureLayerMap[i.stamp(t)]},geometryToLayer:function(t,i){var n,r,a,o="Feature"===t.type?t.geometry:t,s=o?o.coordinates:null,h=[],l=i&&i.coordsToLatLng||this.coordsToLatLng;if(!s&&!o)return null;switch(o.type){case"Polygon":case"MultiPolygon":return n=this.coordsToLatLngs(s,"Polygon"===o.type?1:2,l),new c(n,i);case"GeometryCollection":for(r=0,a=o.geometries.length;a>r;r++){var u=this.geometryToLayer({geometry:o.geometries[r],type:"Feature",properties:t.properties},i);u&&h.push(u)}return new e(h)}},coordsToLatLng:function(t){return new a(t[1],t[0],t[2])},coordsToLatLngs:function(t,e,i){for(var n,r=[],a=0,o=t.length;o>a;a++)n=e?this.coordsToLatLngs(t[a],e-1,i):(i||this.coordsToLatLng)(t[a]),r.push(n);return r},latLngToCoords:function(t){return void 0!==t.alt?[t.lng,t.lat,t.alt]:[t.lng,t.lat]},latLngsToCoords:function(t,e,i){for(var n=[],r=0,a=t.length;a>r;r++)n.push(e?l.latLngsToCoords(t[r],e-1,i):l.latLngToCoords(t[r]));return!e&&i&&n.push(n[0]),n},asFeature:function(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}}),u=s.extend({initialize:function(t,e){i.setOptions(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,i,n=1/0,r=null,a=h._sqClosestPointOnSegment,o=0,s=this._parts.length;s>o;o++)for(var l=this._parts[o],u=1,c=l.length;c>u;u++){e=l[u-1],i=l[u];var d=a(t,e,i,!0);n>d&&(n=d,r=a(t,e,i))}return r&&(r.distance=Math.sqrt(n)),r},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,a,o,s=this._rings[0],h=s.length;if(!h)return null;for(t=0,e=0;h-1>t;t++)e+=s[t].distanceTo(s[t+1])/2;if(0===e)return this._map.layerPointToLatLng(s[0]);for(t=0,n=0;h-1>t;t++)if(r=s[t],a=s[t+1],i=r.distanceTo(a),n+=i,n>e)return o=(n-e)/i,this._map.layerPointToLatLng([a.x-o*(a.x-r.x),a.y-o*(a.y-r.y)])},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=a.create(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new o,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return u._flat(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],i=u._flat(t),n=0,r=t.length;r>n;n++)i?(e[n]=a.create(t[n]),this._bounds.extend(e[n])):e[n]=this._convertLatLngs(t[n]);return e},_project:function(){var t=new r;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t);var e=this._clickTolerance(),i=new n(e,e);this._bounds.isValid()&&t.isValid()&&(t.min._subtract(i),t.max._add(i),this._pxBounds=t)},_projectLatlngs:function(t,e,i){var n,r,o=t[0]instanceof a,s=t.length;if(o){for(r=[],n=0;s>n;n++)r[n]=this._map.latLngToLayerPoint(t[n]),i.extend(r[n]);e.push(r)}else for(n=0;s>n;n++)this._projectLatlngs(t[n],e,i)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);var e,i,n,r,a,o,s,l=this._parts;for(e=0,n=0,r=this._rings.length;r>e;e++)for(s=this._rings[e],i=0,a=s.length;a-1>i;i++)o=h.clipSegment(s[i],s[i+1],t,i,!0),o&&(l[n]=l[n]||[],l[n].push(o[0]),(o[1]!==s[i+1]||i===a-2)&&(l[n].push(o[1]),n++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,i=0,n=t.length;n>i;i++)t[i]=h.simplify(t[i],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._updatePoly()},_updatePoly:function(t){this._path.attr("d",this.pointsToPath(this._parts,t))},pointsToPath:function(t,e){var i,n,r,a,o,s,h="";for(i=0,r=t.length;r>i;i++){for(o=t[i],n=0,a=o.length;a>n;n++)s=o[n],h+=(n?"L":"M")+s.x+" "+s.y;h+=e?"z":""}return h||"M0 0"},_containsPoint:function(t,e){var i,n,r,a,o,s,l=this._clickTolerance();if(!this._pxBounds.contains(t))return!1;for(i=0,a=this._parts.length;a>i;i++)for(s=this._parts[i],n=0,o=s.length,r=o-1;o>n;r=n++)if((e||0!==n)&&h.pointToSegmentDistance(t,s[r],s[n])<=l)return!0;return!1}});u._flat=function(t){return!i.isArray(t[0])||"object"!=typeof t[0][0]&&"undefined"!=typeof t[0][0]};var c=u.extend({isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");var t,e,i,n,r,a,o,s,h,l=this._rings[0],u=l.length;if(!u)return null;for(a=o=s=0,t=0,e=u-1;u>t;e=t++)i=l[t],n=l[e],r=i.y*n.x-n.y*i.x,o+=(i.x+n.x)*r,s+=(i.y+n.y)*r,a+=3*r;return h=0===a?l[0]:[o/a,s/a],this._map.layerPointToLatLng(h)},_convertLatLngs:function(t){var e=u.prototype._convertLatLngs.call(this,t),i=e.length;return i>=2&&e[0]instanceof a&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){u.prototype._setLatLngs.call(this,t),u._flat(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return u._flat(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options["stroke-width"],i=new n(e,e);if(t=new r(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip)return void(this._parts=this._rings);for(var a,o=0,s=this._rings.length;s>o;o++)a=h.clipPolygon(this._rings[o],t,!0),a.length&&this._parts.push(a)}},_updatePath:function(){this._updatePoly(!0)},_containsPoint:function(t){var e,i,n,r,a,o,s,h,l=!1;if(!this._pxBounds.contains(t))return!1;for(r=0,s=this._parts.length;s>r;r++)for(e=this._parts[r],a=0,h=e.length,o=h-1;h>a;o=a++)i=e[a],n=e[o],i.y>t.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(l=!l);return l||u.prototype._containsPoint.call(this,t,!0)}});return l}),define("utils/getJson",["require","./BaseUtils"],function(t){function e(t){var e=t.responseType;return e&&"text"!==e?t.response:t.responseText}function i(t){return 1===t.length?function(e,i){t(null==e?i:null)}:t}function n(t,n,r,o){function s(){var t,i=c.status;(!i&&e(c)||i>=200&&300>i||304===i)&&(t=r.call(h,c),o(t))}var h={},l=a.dispatch("beforesend","progress","load","error"),u={},c=new XMLHttpRequest,d=null;return!this.XDomainRequest||"withCredentials"in c||!/^(http(s)?:)?\/\//.test(t)||(c=new XDomainRequest),"onload"in c?c.onload=c.onerror=s:c.onreadystatechange=function(){c.readyState>3&&s()},h.header=function(t,e){return t=(t+"").toLowerCase(),arguments.length<2?u[t]:(null==e?delete u[t]:u[t]=e+"",h)},h.mimeType=function(t){return arguments.length?(n=null==t?null:t+"",h):n},h.responseType=function(t){return arguments.length?(d=t,h):d},h.response=function(t){return r=t,h},["get","post"].forEach(function(t){h[t]=function(){return h.send.apply(h,[t].concat(a.toArray(arguments)))}}),h.send=function(e,i,r){if(2===arguments.length&&"function"==typeof i&&(r=i,i=null),c.open(e,t,!1),null==n||"accept"in u||(u.accept=n+",*/*"),c.setRequestHeader)for(var a in u)c.setRequestHeader(a,u[a]);return null!=n&&c.overrideMimeType&&c.overrideMimeType(n),null!=d&&(c.responseType=d),null!=r&&h.on("error",r).on("load",function(t){r(null,t)}),l.beforesend.call(h,c),c.send(null==i?null:i),h},h.abort=function(){return c.abort(),h},a.rebind(h,l,"on"),null==o?h:h.get(i(o))}function r(t){return JSON.parse(t.responseText)}var a=t("./BaseUtils");return function(t,e){return n(t,"application/json",r,e)}}),define("component/Geo",["require","./Base","../utils/BaseUtils","../utils/QueryUtils","../utils/GeoUtils","../Constants","../ComponentLibrary","../chart/map/layer/ImageOverlay","../chart/map/layer/TileLayer","../chart/map/layer/Control","../chart/map/layer/GeoJSON","../utils/getJson","../chart/map/CRS","../chart/map/LatLngBounds"],function(t){function e(t){var e;return t&&"object"==typeof t?e=t:window.FR&&window.FR.ajax?FR.ajax({type:"GET",url:t,dataType:"json",async:!1,success:function(t){e=t}}):f(t,function(t){e=t}),e}var i=t("./Base"),n=t("../utils/BaseUtils"),r=t("../utils/QueryUtils"),a=t("../utils/GeoUtils"),o=t("../Constants"),s=t("../ComponentLibrary"),h={},l=t("../chart/map/layer/ImageOverlay"),u=t("../chart/map/layer/TileLayer"),c=t("../chart/map/layer/Control"),d=t("../chart/map/layer/GeoJSON"),f=t("../utils/getJson"),p=t("../chart/map/CRS"),g=t("../chart/map/LatLngBounds"),m="Point",v="LineString",_="MultiLineString",y=i.extend({_refresh:function(){this._loaded=!1;var t=n.stamp(this.vanchart);h[t]=h[t]||{}},doLayout:function(){this._loadGeo();var t,e=this.vanchart,i=this.options;n.hasDefined(i.zoomListener)?t=i.zoomListener:n.hasDefined(i.zoomLevel)&&(t=i.zoomLevel);var r=i.viewCenter?[i.viewCenter[1],i.viewCenter[0]]:null;if(!isNaN(+t)&&r)e.setView(r,t);else{if(isNaN(+t))e.fitBounds(this._getFitBounds());else{e.fitBounds(this._getFitBounds(),{animate:!1});var r=e.getCenter();e.setView(r,t)}r&&e.panTo(r)}this._topLeft={x:0,y:e.bounds.y}},render:function(){var t=this.options,e=this.jsonData,i=n.stamp(this.vanchart),r=t.tileLayer||this.vanchart.options.geo.tileLayer,a=t.attribution||this.vanchart.options.geo.attribution||"",o=t.wmsUrl||this.vanchart.options.geo.wmsUrl,s=t.wmsLayer||this.vanchart.options.geo.wmsLayer,d=this._imageBackgroundLayer||this._tileLayer||this._wmsLayer;if(this._imageBackgroundLayer=this._tileLayer=this._wmsLayer=null,this._isImageMap()&&(t.imageUrl||e.imageString)){var f=t.imageUrl||"data:image/"+e.imageSuffix+";base64,"+e.imageString,p=[[0,0],[e.imageHeight*this.scale,e.imageWidth*this.scale]];this._imageBackgroundLayer=new l(f,p).addTo(this.vanchart)}else r?(this._attribution=h[i][a]||(new c.Attribution).addAttribution(a),h[i][a]=this._attribution,this._tileLayer=h[i][r]||new u(r),h[i][r]=this._tileLayer,h[i][r].addTo(this.vanchart),h[i][a].addTo(this.vanchart)):o&&(this._wmsLayer=h[i][o]||new u.WMS(o,{layers:s.join(",")}),h[i][o]=this._wmsLayer,h[i][o].addTo(this.vanchart));this.renderAreaFeatures(),t.control&&(t._topLeft=this._topLeft,this._zoomControl=new c.Zoom(t).addTo(this.vanchart));var g=this._imageBackgroundLayer||this._tileLayer||this._wmsLayer;d&&d!=g&&this.vanchart.removeLayer(d)},needsNullArea:function(){var t=this.vanchart;return t.isAreaMap()||t.isHeatMap()||t.seriesOfType(o.AREA_MAP).length},renderAreaFeatures:function(){if(this.needsNullArea()){var t=this.defaultAreaStyle();this.geoJsonLayer=this.geoJsonLayer||new d(this.jsonData,t),this.geoJsonLayer.addTo(this.vanchart)}},getLayerByFeature:function(t){return this.geoJsonLayer.getLayerByFeature(t)},defaultAreaStyle:function(){var t=this.vanchart.options.plotOptions,e=[t[o.AREA_MAP],t];return{fill:n.pick(r.queryList(e,"nullColor"),"#cccccc"),"fill-opacity":n.pick(r.queryList(e,"opacity"),.75),"stroke-width":n.pick(r.queryList(e,"borderWidth"),1),stroke:n.pick(r.queryList(e,"borderColor"),"#ffffff"),"stroke-opacity":n.pick(r.queryList(e,"borderOpacity"),1)}},geoName:function(){return this.options.name},_loadGeo:function(){if(this._loaded||this._dataUrl==this.options.data)return void(this._loaded=!0);this._loaded=!0,this._dataUrl=this.options.data,this.geoJsonLayer&&this.geoJsonLayer.remove(),this.geoJsonLayer=null;var t=this.options,i=this,n=this.vanchart;i._validPointName={},i._validAreaName={},i._extendedLineFeature=[],t.data?i.jsonData=e(t.data):i.jsonData={};for(var r=i.jsonData&&i.jsonData.features||[],o=0,s=r.length;s>o;o++){var h=r[o],l=h.geometry;l.type==m?(i._validPointName[h.properties.name]=i._validPointName[h.properties.name]||[],i._validPointName[h.properties.name].push(h)):l.type==v||l.type==_?i._extendedLineFeature.push(h):(i._validAreaName[h.properties.name]=i._validAreaName[h.properties.name]||[],i._validAreaName[h.properties.name].push(h))}if(this.scale=1,this._isImageMap()){var u=n.width,c=n.height,d=u/i.jsonData.imageWidth,f=c/i.jsonData.imageHeight;this.scale=Math.min(d,f),a.scaleGeo(i.jsonData,i.scale)}n.options.crs=this._isImageMap()?p.Simple:p.EPSG3857},getDataPointLngLat:function(t,e){if(!e||t.options.lnglat)return t.options.lnglat;var i=t.series&&t.series.type==o.AREA_MAP?e.properties.center:e.geometry.coordinates;if(!i)if(this._isImageMap()){var n=this.jsonData.imageWidth,r=0,s=this.jsonData.imageHeight,h=0,l=a.getAllPoints(e);l.forEach(function(t){isNaN(t[0])||isNaN(t[1])||(n=Math.min(n,t[0]),r=Math.max(r,t[0]),s=Math.min(s,t[1]),h=Math.max(h,t[1]))}),i=[(r+n)/2,(h+s)/2]}else{var u=a.bounds(e),c=(u[0][0]+u[1][0])/2,d=(u[0][1]+u[1][1])/2;i=[c,d]}return i},getZoomListener:function(){return this.options.zoomListener||this.options.zoomLevel},getFeaturesByName:function(t,e){return this._loadGeo(),this._validAreaName&&this._validPointName?e==o.AREA_MAP?this._validAreaName[t]:this._validPointName[t]:void 0},_isImageMap:function(){return this.jsonData&&this.jsonData.imageWidth},_getFitBounds:function(){function t(t){var a=t.lnglat||t.options.lnglat;if(a)e=!1;else{var o=i.getFeaturesByName(t.name,t.series.type);a=i.getDataPointLngLat(t,o&&o[0])}a&&(n=Math.min(n,a[0]),r=Math.max(r,a[0]),s=Math.min(s,a[1]),h=Math.max(h,a[1]))}var e=!0,i=this,n=180,r=-180,s=90,h=-90;if(this._isImageMap())n=this.jsonData.imageWidth*this.scale,r=0,s=this.jsonData.imageHeight*this.scale,h=0;else{for(var l=this.vanchart.series,u=0,c=l.length;c>u;u++)l[u].visible&&l[u].type!=o.AREA_MAP&&(l[u].type===o.LINE_MAP?l[u].points.forEach(function(e){t(e.options.from),t(e.options.to)}):l[u].points.forEach(t));if(e&&this.jsonData){var d=a.bounds(this.jsonData),f=d[0],p=d[1];return[[f[1],f[0]],[p[1],p[0]]]}}return[[s,n],[h,r]]},remove:function(){this.geoJsonLayer&&this.geoJsonLayer.remove(),this._imageBackgroundLayer&&this.vanchart.removeLayer(this._imageBackgroundLayer),this._attribution&&this._attribution.remove(),this._tileLayer&&this._tileLayer.remove(),this._wmsLayer&&this._wmsLayer.remove(),this._imageBackgroundLayer=this._attribution=this._tileLayer=this._wmsLayer},resize:function(){if(this._isImageMap()){var t=(this.options,this.jsonData),e=this.scale,i=this.vanchart,n=i.width,r=i.height,s=n/t.imageWidth,h=r/t.imageHeight;if(this.scale=Math.min(s,h),a.scaleGeo(t,this.scale/e),this._imageBackgroundLayer){var l=[[0,0],[t.imageHeight*this.scale,t.imageWidth*this.scale]];this._imageBackgroundLayer.setBounds(g.create(l))}this.geoJsonLayer&&(this.geoJsonLayer.remove(),this.geoJsonLayer=null,i.validPoints.forEach(function(t){t.series.type==o.AREA_MAP&&(t.layers=null)}))}}});return s.register(s.GEO_COMPONENT,y),y}),define("component/DrillTools",["require","./Base","../utils/BaseUtils","../utils/ColorUtils","../Constants","../ComponentLibrary"],function(t){var e=t("./Base"),i=t("../utils/BaseUtils"),n=t("../utils/ColorUtils"),r=t("../Constants"),a=t("../ComponentLibrary"),o=.417,s=.583,h=.25,l=.333,u=.1665,c=e.extend({_refresh:function(){this.iconData=[]},doLayout:function(){var t=i.getTextDimension("test",this.options.style);this._setComponentBounds(r.TOP,t.height*(2*u+1))},getBookMarkPath:function(t){var e=this.options.style,n=t.layerIndex,r=i.getTextDimension(t.geo.geoName(),e),a=(0===n?o:s)+h;a=r.height*a+r.width;var c=r.height*l,d=(1+2*u)*r.height,f=[0,0],p=[a,0],g=[a+c,d/2],m=[a,d],v=[0,d];return"M"+f+"L"+p+"L"+g+"L"+m+"L"+v+"Z"},isCurrent:function(t){var e=this.iconData[this.iconData.length-1];return e.series==t.series},textColor:function(t){return this.isCurrent(t)?this.options.currentColor:this.options.style.color},mouseOverColor:function(t){var e;if(!(e=this.options.mouseOverColor)){var i=this.textColor(t),r=n.getRGBAColorArray(i),a=n.rgb2hsb(r[0],r[1],r[2]),o=n.hsb2rgb(a[0],a[1]/2,(a[2]+1)/2);e=n.toColor(o,"rgb")}return e},leftPadding:function(t){return 0===t.layerIndex?o:s},calculateExitAnimation:function(t){for(var e=600,i=0,n=t.length;n>i;i++)t[i].time=e,e=Math.max(e-100,0);var r=0;for(i=n-1;i>=0;i--)t[i].time?(t[i].delay=r,r+=200):t[i].delay=0},getMarkPos:function(t){for(var e=0,i=0;i<t.layerIndex;i++)e+=this.getBookMarkLength(this.iconData[i],i);return e},getMarkAnimationStartPos:function(t){var e=t.layerIndex;return 0===e?0:this.getMarkPos(this.iconData[e-1])-this.getBookMarkLength(t,e)},getBookMarkLength:function(t,e){var n=i.getTextDimension(t.geo.geoName(),this.options.style).height,r=i.getTextDimension(t.geo.geoName(),this.options.style).width,a=(0===e?o:s)+h;return r+a*n},render:function(){var t=this,e=t.vanchart,n=e.renderer,r={x:0,y:0,width:this.bounds.width,height:this.bounds.height};this.dToolsGroup||(this.dToolsGroup=this.createComponentGroup(),this.clip=n.createClip(r),this.shadow=n.createDropShadowFilter(0,0,.15,1),n.clip(this.dToolsGroup,this.clip),this.drillItems=[],e.registerInteractiveTarget(this,this.dToolsGroup)),this.iconData=this.vanchart.layerMap,this.dToolsGroup.attr("transform",i.makeTranslate([this.bounds.x,this.bounds.y])),n.updateClip(this.clip,r);for(var a=this.iconData.length-1;a>=0;a--){var o=this.iconData[a];if(this.drillItems[a]){var s=this.drillItems[a];s.path.attr({d:t.getBookMarkPath(o)}),s.text.style({fill:this.textColor(o)}).textContent(o.geo.geoName())}else o.aniStart=this.getMarkAnimationStartPos(o),o.aniEnd=this.getMarkPos(o),this.drillItems[a]=this._createItem(o)}var h=this.drillItems.splice(this.iconData.length,this.drillItems.length);this.calculateExitAnimation(h);for(var a=0,l=h.length;l>a;a++){var o=h[a];o.animate({duration:o.time,delay:o.delay,ease:"quad-in",attr:{transform:i.makeTranslate([o.datum().aniStart,0]),opacity:0}}).remove()}this.drillItems.length=this.iconData.length},_createItem:function(t){var e=this,n=e.vanchart,r=n.renderer,a=this.options,o=i.getTextDimension(t.geo.geoName(),a.style).height,s=r.group().style({cursor:"pointer"}).datum(t);return s.path=r.path({d:e.getBookMarkPath(t)}).style({fill:a.backgroundColor,filter:"url(#"+i.stamp(this.shadow)+")"}).addTo(s),s.text=r.text().attr({x:e.leftPadding(t)*o,y:u*o,dy:".85em"}).style(a.style).style({fill:this.textColor(t)}).textContent(t.geo.geoName()).addTo(s),s.attr("transform",i.makeTranslate([t.aniStart,0])).addTo(this.dToolsGroup).animate({duration:500,ease:"cubic-out",attr:{transform:i.makeTranslate([t.aniEnd,0])}}),i.toBack(s.node()),s},_findDrillTarget:function(t){for(var e,i=t.srcEvent,n=i.target||i.srcElement;n;){for(var r=this.drillItems.length-1;r>=0;r--)this.drillItems[r].node()==n&&(e=this.drillItems[r]);if(e||n==this.dToolsGroup.node())break;n=n.parentNode}return e},onTap:function(t){var e=this._findDrillTarget(t),n=this.drillItems.indexOf(e),r=this.vanchart.layerMap[n];if(e&&r){var r=e.datum();if(this.options.click&&r.drillUpDataPoint){var a=i.getFormatterFunction(this.options.click);a(r.drillUpDataPoint,t.srcEvent)}this.vanchart.drillUp(r)}},onMouseOver:function(t){var e=this._findDrillTarget(t);e&&e.text.style({fill:this.mouseOverColor(e.datum())})},onMouseOut:function(t){var e=this._findDrillTarget(t);e&&e.text.style({fill:this.textColor(e.datum())})},getEvents:function(){return{tap:this.onTap,mouseover:this.onMouseOver,mouseout:this.onMouseOut}},remove:function(){this.dToolsGroup&&this.dToolsGroup.remove(),this.dToolsGroup=null,this.iconData=this.drillItems=[]}});return a.register(a.DRILL_TOOLS,c),c}),define("component/DataSheet",["require","./Base","../utils/BaseUtils","../Constants","./LegendIconFactory","../ComponentLibrary","../utils/BezierEasing"],function(t){var e,i,n=t("./Base"),r=t("../utils/BaseUtils"),a=t("../Constants"),o=t("./LegendIconFactory"),s=t("../ComponentLibrary"),h=t("../utils/BezierEasing"),l=400,u=h.css.swing,c=function(){return null==e&&(e=r.paddingConvertWithScale("0.25rem")),e},d=function(){return null==i&&(i=r.paddingConvertWithScale("0.125rem")),i},f=18,p={color:"#666666",fontSize:"14px",fontFamily:"Verdana"},g=n.extend({doLayout:function(){this._recordForPlotBounds(a.LEFT,Math.round(this.getSeriesNameLength()))},reCalculateSize:function(){this.doLayout()},updateAxisSizeAndBounds:function(){this.maxCateLineHeight=this.maxSeriesLineHeight=null,this._setComponentBounds(a.BOTTOM,this._calculateLineHeight())},_calculateLineHeight:function(){this.calculateShowText();var t=this._categoryStyle(),e=0,i=r.getTextHeight(this._seriesStyle()),n=r.getTextHeight(this._valueStyle());this.maxCateLineHeight=2*c()+this.maxCateLine*r.getTextHeight(t)+(this.maxCateLine-1)*c(),this.maxSeriesLineHeight=[];for(var a=0,o=this.seriesNames.length;o>a;a++){var s=this.maxSeriesLine[a],h=2*c()+s*i+(s-1)*c(),l=this.maxValueLine[a],u=2*c()+l*n+(l-1)*c();this.maxSeriesLineHeight[a]=Math.max(h,u),e+=this.maxSeriesLineHeight[a]}return this.sheetHeight=Math.ceil(this.maxCateLineHeight+e),this.sheetHeight},calculateShowText:function(){this.maxCateLine=0,this.maxValueLine=[],this.showTextMap=this.showTextMap||{};var t=this.vanchart.xAxis(),e=t._dataDomain,i=t._domain,n=this._categoryStyle(),a=r.getTextHeight(n)+c(),o=this.vanchart.bounds.width/i.length,s=this;e.forEach(function(t){var e=r.splitText(t,n,o,c());if(s.maxCateLineHeight){var h=Math.min(parseInt(s.maxCateLineHeight/a,10),e.length);e=e.slice(0,h)}-1!=r.indexOf(i,t)&&(s.maxCateLine=Math.max(s.maxCateLine,e.length)),s.showTextMap[t]=s.showTextMap[t]||{},s.showTextMap[t].categoryArray=e});var h=this._valueStyle(),l=r.getTextHeight(h)+c(),u=this.options.formatter,d=this.vanchart.series;d.forEach(function(t,e){for(var n=t.points,a=0,d=n.length;d>a;a++){var f=n[a],p=f.getTargetValue(),g=f.category,m=f.isNull?"-":s._getTickContent(p,u),v=r.splitText(m,h,o,c());if(s.maxSeriesLineHeight&&s.maxSeriesLineHeight[e]){var _=Math.min(parseInt(s.maxSeriesLineHeight[e]/l,10),v.length);v=v.slice(0,_)}s.showTextMap[g].value=s.showTextMap[g].value||[],s.showTextMap[g].value[e]=s.showTextMap[g].value[e]||{},s.showTextMap[g].value[e].valueArray=v,-1!=r.indexOf(i,g)&&(s.maxValueLine[e]=Math.max(s.maxValueLine[e]||0,v.length))}})},fixBoundsByPlot:function(){var t=this.vanchart.bounds,e=this.vanchart.getComponent(s.X_AXIS_COMPONENT),i=t.y+t.height;e&&e._axisList.length&&e._axisList.forEach(function(t){t.getPosition()==a.BOTTOM&&(i=Math.max(i,t.bounds.y+t.bounds.height))}),this.bounds={x:t.x-this.maxSeriesWidth,y:i,width:this.maxSeriesWidth+t.width,height:this.sheetHeight}},getSeriesNameLength:function(){this.seriesNames=[],this.maxSeriesLine=[],this.seriesIconType=[];var t=this,e=t.vanchart,i=e.series,n=this._seriesStyle(),a=e.getChartBounds().width/4-(f+2*d()),s=0,h=0;return i.forEach(function(e){var i=r.getTextDimension(e.name,n,!1).width+2*c();if(i>a){var l=r.splitText(e.name,n,a,c());t.maxSeriesLine.push(l.length),t.seriesNames.push(l),s=a}else t.maxSeriesLine.push(1),t.seriesNames.push([e.name]),s=Math.max(i,s);var u=t._getLegendType(e);t.seriesIconType.push(u),h=Math.max(h,o.getLegendIconSize(u).width)}),this.maxSeriesWidth=Math.ceil(s+2*d()+h),this.maxSeriesWidth+c()},_categoryStyle:function(){var t=this.vanchart.xAxis(),e=t?t.options.labelStyle:p;return r.convertToREMUseDefault16PX(e)},_seriesStyle:function(){var t=this.vanchart.getComponent(s.LEGEND_COMPONENT),e=t?t.options.style:p;return r.convertToREMUseDefault16PX(e)},_valueStyle:function(){return r.convertToREMUseDefault16PX(this.options.style)},getTextPadding:function(){return c()},render:function(){if(this.remove(),this.vanchart.series.length){this.calculateShowText();var t=this.vanchart,e=this.bounds,i=t.renderer,n={x:this.maxSeriesWidth,y:0,width:e.width-this.maxSeriesWidth,height:e.height};this.animationClip=i.createClip(n),this.dataSheetGroup=this.createComponentGroup().attr("transform",r.makeTranslate(this.bounds)),this.animationGroup=i.group().addTo(this.dataSheetGroup),i.clip(this.animationGroup,this.animationClip),this._drawBaseTable(),this._drawTableContent()}},_drawBaseTable:function(){var t=this.options,e=this.maxSeriesWidth,i=this.maxCateLineHeight,n=this.vanchart,r=n.renderer,a=this.dataSheetGroup,o=this.bounds.width,s=this.bounds.height,h={fill:"none",stroke:t.borderColor,"stroke-width":t.borderWidth};r.path().attr("d","M"+e+",0L"+o+",0L"+o+" "+s+"L0,"+s+"L0,"+i).style(h).addTo(a);for(var l=0,u=this.seriesNames.length;u>l;l++)r.line().attr("x1",0).attr("y1",i).attr("x2",o).attr("y2",i).style(h).addTo(a),i+=this.maxSeriesLineHeight[l];this._drawSeries()},_drawTableContent:function(){for(var t=this.vanchart,e=t.xAxis(),i=t.renderer,n=e._domain,a=e._dataDomain,o=this.getPlotBounds().width,s=o/n.length,h=-r.indexOf(a,n[0])*s+this.maxSeriesWidth,c={fill:"none",stroke:this.options.borderColor,"stroke-width":this.options.borderWidth},d=0,f=a.length;f>d;d++){var p=this.showTextMap[a[d]],g=h+s*d;this._drawCategory(p,g,s),this._drawValues(p,g,s);var m={x1:g,y1:0,x2:g,y2:this.bounds.height};p._line=p._line||i.line(m).style(c).addTo(this.animationGroup),p._line.animate({duration:l,ease:u,attr:{x1:g,x2:g}})}},zoomRefresh:function(){this.calculateShowText(),this._drawTableContent()},_drawCategory:function(t,e,i){var n=t.categoryArray,a=this.vanchart.renderer;t._category=t._category||[];for(var o,s,h=this._categoryStyle(),c=r.getTextHeight(h),d=this.getTextPadding(),f=this._getStartY(n,h,this.maxCateLineHeight),p=0;p<n.length;p++)o=e+i/2,s=f+(c+d)*p+c/2,t._category[p]=t._category[p]||a.text().attr({"text-anchor":"middle",dy:".32em",x:o,y:s}).style("margin-top","-0.53em").style(h).addTo(this.animationGroup),t._category[p].textContent(n[p]).animate({attr:{x:o,y:s},duration:l,ease:u}),t._category[p].textContent(n[p]).vMiddle();for(var p=n.length;p<t._category.length;p++)t._category[p].remove();t._category.length=n.length},_drawValues:function(t,e,i){var n=this.vanchart.renderer,a=this._valueStyle(),o=r.getTextHeight(a),s=this.getTextPadding(),h=this.maxCateLineHeight;if(!t.value){t.value=[];for(var c=0,d=this.vanchart.series.length;d>c;c++)t.value.push({valueArray:[""]})}for(var f,p,g=0;g<t.value.length;g++){var m=t.value[g],v=this.maxSeriesLineHeight[g],_=m.valueArray;m._value=m._value||[];for(var y=h+this._getStartY(_,a,v),c=0;c<_.length;c++)f=e+i/2,p=y+(o+s)*c+o/2,m._value[c]=m._value[c]||n.text().attr({"text-anchor":"middle",dy:".32em",x:f,y:p}).style("margin-top","-0.53em").style(a).addTo(this.animationGroup),m._value[c].textContent(_[c]).animate({duration:l,ease:u,attr:{x:f,y:p}}),m._value[c].textContent(_[c]).vMiddle();for(var c=_.length;c<m._value.length;c++)m._value[c].remove();m._value.length=_.length,h+=v}},_drawSeries:function(){for(var t=this.vanchart.renderer,e=t.group().addTo(this.dataSheetGroup),i=this.seriesNames,n=this.maxSeriesWidth,a=this.maxCateLineHeight,s=16,h=a,l=this._seriesStyle(),u=r.getTextHeight(l),c=this.getTextPadding(),d=this.vanchart.series,f=(n+s)/2,p=0,g=i.length;g>p;p++){for(var m=i[p],v=this.maxSeriesLineHeight[p],_=h+this._getStartY(m,l,v)+.85*u,y=0;y<m.length;y++)t.text().attr("x",f).attr("text-anchor","middle").attr("y",_+(u+c)*y).textContent(m[y]).style(l).style("margin-top","-1em").addTo(e).vMiddle();var x=this.seriesIconType[p],b=o.getLegendIconSize(x).height;o.hasIcon(x)?t.path().addTo(e).attr("d",o.getLegendIconPath(x)).attr("transform","translate(2,"+((v-b)/2+h)+")").style({fill:d[p].color}):t.image({preserveAspectRatio:"none",x:2,y:(v-b)/2+h,width:12,height:12}).imageContent(x).addTo(e),h+=v}},_getStartY:function(t,e,i){var n=this.getTextPadding(),a=t.length,o=r.getTextHeight(e)*a+(a-1)*n;return(i-o)/2},remove:function(){this.dataSheetGroup&&this.dataSheetGroup.remove(),this.dataSheetGroup=null,this.showTextMap=null}});return s.register(s.DATA_SHEET_COMPONENT,g),g}),define("component/TrendLine",["require","../utils/BaseUtils","../utils/ColorUtils","../Constants","../vans/VanChart","../utils/PathGenerator"],function(t){function e(t){return t===r.LEFT||t===r.RIGHT}function i(t,e){var i=function(t,e){return t+e},n=1*t.reduce(i)/t.length,r=1*e.reduce(i)/e.length,a=t.map(function(t){return Math.pow(t-n,2)}).reduce(i),o=(e.map(function(t){return Math.pow(t-r,2)}).reduce(i),t.map(function(t,i){return(t-n)*(e[i]-r)}).reduce(i)),s=o/a,h=r-n*s;return[s,h]}var n=t("../utils/BaseUtils"),r=(t("../utils/ColorUtils"),t("../Constants")),a=t("../vans/VanChart"),o=t("../utils/PathGenerator");a.include({trendLines:[],calcTrendLines:function(){for(var t=[],i=this,n=i.series,a=0,s=n.length;s>a;a++){var h=n[a],l=h.options.trendLine;if(l&&h.visible){var u;switch(l.type){case r.LINEAR:u=i.linear;break;case r.LOGARITHMIC:u=i.logarithmic;break;case r.POLYNOMIAL:u=i.polynomial;break;default:case r.EXPONENTIAL:u=i.exponential}var c=h.getTrendLineXYValues(h);if(!(c[0].length<=1)){var d,f,p=e(c[2]);p?(f=c[0],d=c[1]):(d=c[0],f=c[1]);var g=u(d,f,this.extendXs(d,l.period)),m=o.line().interpolate("cardinal");p&&m.x(function(t){return t[1]}).y(function(t){return t[0]});var v={d:m(g),trendLine:l};t.push(v)}}}this.trendLines=t},extendXs:function(t,e){function i(t,e){return Array.apply(null,Array(t)).map(e)}if(e&&2===e.length&&t.length>1){var n=t[1]-t[0];return i(-e[0],function(e,i){return t[0]-(i+1)*n}).reverse().concat(t).concat(i(e[1],function(e,i){return t[t.length-1]+(i+1)*n}))}return t},linear:function(t,e,n){var r,a,o,s,h=i(t,e);return r=n[0],o=h[0]*r+h[1],a=n[n.length-1],s=h[0]*a+h[1],[[r,o],[a,s]]},logarithmic:function(t,e,n){var r=[],a=[],o=Math.min.apply(null,n);t.map(function(t,i){0>=o&&(t+=-o+1),r.push(Math.log(t)),a.push(e[i])});var s=i(r,a);return n.map(function(t){var e=t;return 0>=o&&(t+=-o+1),[e,s[0]*Math.log(t)+s[1]]})},exponential:function(t,e,n){var r=[],a=[],o=Math.min.apply(null,e);t.map(function(t,i){0>=o&&(e[i]+=-o+1),r.push(t),a.push(Math.log(e[i]))});var s=i(r,a),h=s[0];return s[0]=Math.exp(s[1]),s[1]=h,n.map(function(t){var e=s[0]*Math.exp(t*s[1]);return 0>=o&&(e-=-o+1),[t,e]})},polynomial:function(t,e,i){var n=Math.min(t.length-1,6);n++;for(var r,a=[],o=[],s=0;n>s;s++)a[s]=[],o[s]=[];var s,h,l,u,c=[],d=[],f=[];for(s=0;n>s;s++)for(h=0;h<t.length;h++){for(r=1,u=0;s>u;u++)r*=t[h];a[s][h]=r}for(s=0;n>s;s++)for(l=0;n>l;l++){for(r=0,h=0;h<t.length;h++)r+=a[s][h]*a[l][h];o[s][l]=r}for(s=0;n>s;s++){for(r=0,h=0;h<t.length;h++)r+=e[h]*a[s][h];c[s]=r}for(s=1;n>s;s++)o[s][0]=o[s][0]/o[0][0];for(s=1;n>s;s++)for(h=s;n>h;h++){var p=0;for(l=0;s>l;l++)p+=o[l][h]*o[s][l];if(o[s][h]=o[s][h]-p,h+1!=n){var g=0;for(l=0;s>l;l++)g+=o[l][s]*o[h+1][l];o[h+1][s]=(o[h+1][s]-g)/o[s][s]}}for(d[0]=c[0],s=1;n>s;s++){for(r=0,h=0;s>h;h++)r+=o[s][h]*d[h];d[s]=c[s]-r}for(f[n-1]=d[n-1]/o[n-1][n-1],s=n-2;s>=0;s--){for(r=0,h=s+1;n>h;h++)r+=o[s][h]*f[h];f[s]=(d[s]-r)/o[s][s]}return i.map(function(t){return[t,f.reduce(function(e,i,n){return e+i*Math.pow(t,n)},0)]})},_renderTrendLine:function(){this.calcTrendLines();var t=this.trendLines,e=this.bounds,i=this.renderer;if(!this.trendLineGroup){if(!this.trendLines||!this.trendLines.length)return;this.trendLineGroup=this.seriesGroup.append(i.group()),i.clip(this.trendLineGroup,this.plotClip)}this.trendLineGroup.trendLines=this.trendLineGroup.trendLines||[];for(var a=this.trendLineGroup.trendLines,o=0,s=t.length;s>o;o++){var h=t[o],l={d:h.d},u={fill:"none",stroke:h.trendLine.color,"stroke-width":h.trendLine.width,"stroke-dasharray":r.DASH_TYPE[h.trendLine.dashStyle]};a[o]?a[o].attr(l).style(u):a[o]=i.path(l).style(u).addTo(this.trendLineGroup),a[o].attr("transform",n.makeTranslate(e))}for(var o=t.length;o<a.length;o++)a[o].remove(),a[o]=null;return a.length=t.length,this.trendLineGroup}})}),define("FullChartTypes",["require","./VanCharts","./Carousel","./chart/Bar","./chart/Pie","./chart/Line","./chart/LineRadar","./chart/ColumnRadar","./chart/Bubble","./chart/Scatter","./chart/PointerGauge","./chart/SlotGauge","./chart/RingGauge","./chart/ThermometerGauge","./chart/MultiPie","./chart/TreeMap","./chart/Funnel","./chart/WordCloud","./chart/Structure","./chart/ForceBubble","./chart/Map","./chart/LineMap","./chart/gantt/Gantt","./component/Tooltip","./component/Axis","./component/GaugeAxis","./component/Legend","./component/Zoom","./component/ToolBar","./component/IntervalRangeLegend","./component/GradientRangeLegend","./component/Polar","./component/PolarAxis","./component/Title","./component/Geo","./component/DrillTools","./component/DataSheet","./component/TrendLine"],function(t){
t("./VanCharts"),t("./Carousel"),t("./chart/Bar"),t("./chart/Pie"),t("./chart/Line"),t("./chart/LineRadar"),t("./chart/ColumnRadar"),t("./chart/Bubble"),t("./chart/Scatter"),t("./chart/PointerGauge"),t("./chart/SlotGauge"),t("./chart/RingGauge"),t("./chart/ThermometerGauge"),t("./chart/MultiPie"),t("./chart/TreeMap"),t("./chart/Funnel"),t("./chart/WordCloud"),t("./chart/Structure"),t("./chart/ForceBubble"),t("./chart/Map"),t("./chart/LineMap"),t("./chart/gantt/Gantt"),t("./component/Tooltip"),t("./component/Axis"),t("./component/GaugeAxis"),t("./component/Legend"),t("./component/Zoom"),t("./component/ToolBar"),t("./component/IntervalRangeLegend"),t("./component/GradientRangeLegend"),t("./component/Polar"),t("./component/PolarAxis"),t("./component/Title"),t("./component/Geo"),t("./component/DrillTools"),t("./component/DataSheet"),t("./component/TrendLine")});var VanCharts=require("VanCharts");return require("./Carousel"),require("./chart/Bar"),require("./chart/Pie"),require("./chart/Line"),require("./chart/LineRadar"),require("./chart/ColumnRadar"),require("./chart/TreeMap"),require("./chart/Bubble"),require("./chart/ForceBubble"),require("./chart/Scatter"),require("./chart/MultiPie"),require("./chart/PointerGauge"),require("./chart/SlotGauge"),require("./chart/RingGauge"),require("./chart/ThermometerGauge"),require("./chart/Map"),require("./chart/Funnel"),require("./chart/WordCloud"),require("./chart/LineMap"),require("./chart/Structure"),require("./component/Tooltip"),require("./component/Axis"),require("./component/GaugeAxis"),require("./component/Legend"),require("./component/Zoom"),require("./component/ToolBar"),require("./component/IntervalRangeLegend"),require("./component/GradientRangeLegend"),require("./component/Polar"),require("./component/PolarAxis"),require("./component/Title"),require("./component/Geo"),require("./component/DrillTools"),require("./component/DataSheet"),require("./component/TrendLine"),VanCharts});