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

8 years ago
/**
* @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
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,AttrR
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,hasCh
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),
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
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.chartBackgroundG
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),
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:func
},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=funct
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.
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})}},_onMarkerPress
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)
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"
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.
}).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
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){va
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.hei
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.areaStyl
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("transfor
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;
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
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_C
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)},_up
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});