@yelingfeng/pandora2 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +88 -0
- package/dist/packages/components/PdCharts/index.d.ts +7 -0
- package/dist/packages/components/PdCharts/src/charts/pie/index.d.ts +2 -0
- package/dist/packages/components/PdCharts/src/charts/pie/pie01.d.ts +6 -0
- package/dist/packages/components/PdCharts/src/charts/pie/pie02.d.ts +6 -0
- package/dist/packages/components/PdCharts/src/constant/index.d.ts +21 -0
- package/dist/packages/components/PdCharts/src/hooks/index.d.ts +5 -0
- package/dist/packages/components/PdCharts/src/hooks/useApi.d.ts +7 -0
- package/dist/packages/components/PdCharts/src/hooks/useAutosize.d.ts +4 -0
- package/dist/packages/components/PdCharts/src/hooks/useCharts.d.ts +2 -0
- package/dist/packages/components/PdCharts/src/hooks/useEventListener.d.ts +7 -0
- package/dist/packages/components/PdCharts/src/hooks/useLoading.d.ts +4 -0
- package/dist/packages/components/PdCharts/src/props/index.d.ts +40 -0
- package/dist/packages/components/PdCharts/src/transform/index.d.ts +18 -0
- package/dist/packages/components/PdCharts/src/transform/seriesHelper.d.ts +31 -0
- package/dist/packages/components/PdCharts/src/types/chart.d.ts +19 -0
- package/dist/packages/components/PdCharts/src/types/index.d.ts +94 -0
- package/dist/packages/components/PdCharts/src/types/props.d.ts +31 -0
- package/dist/packages/components/PdCharts/src/utils/core.d.ts +7 -0
- package/dist/packages/components/PdCharts/src/utils/defaultOpt.d.ts +100 -0
- package/dist/packages/components/PdCharts/src/utils/index.d.ts +18 -0
- package/dist/packages/components/PdCharts/src/utils/wc.d.ts +5 -0
- package/dist/packages/components/PdForm/index.d.ts +14 -0
- package/dist/packages/components/PdForm/src/componentsMap.d.ts +6 -0
- package/dist/packages/components/PdForm/src/helper.d.ts +14 -0
- package/dist/packages/components/PdForm/src/hooks/useAdvanced.d.ts +15 -0
- package/dist/packages/components/PdForm/src/hooks/useAutoFocus.d.ts +10 -0
- package/dist/packages/components/PdForm/src/hooks/useComponentRegister.d.ts +3 -0
- package/dist/packages/components/PdForm/src/hooks/useForm.d.ts +4 -0
- package/dist/packages/components/PdForm/src/hooks/useFormContext.d.ts +8 -0
- package/dist/packages/components/PdForm/src/hooks/useFormEvents.d.ts +28 -0
- package/dist/packages/components/PdForm/src/hooks/useFormValues.d.ts +13 -0
- package/dist/packages/components/PdForm/src/props/index.d.ts +112 -0
- package/dist/packages/components/PdForm/src/types/formItem.d.ts +81 -0
- package/dist/packages/components/PdForm/src/types/hooks.d.ts +6 -0
- package/dist/packages/components/PdForm/src/types/index.d.ts +133 -0
- package/dist/packages/components/PdPageLayout/index.d.ts +6 -0
- package/dist/packages/components/PdTable/index.d.ts +5 -0
- package/dist/packages/components/PdTable/src/hooks/useTable.d.ts +4 -0
- package/dist/packages/components/PdTable/src/pagination/config.d.ts +8 -0
- package/dist/packages/components/PdTable/src/props/index.d.ts +20 -0
- package/dist/packages/components/PdTable/src/props/useTableProps.d.ts +381 -0
- package/dist/packages/components/PdTable/src/render/column.d.ts +11 -0
- package/dist/packages/components/PdTable/src/render/pager.d.ts +5 -0
- package/dist/packages/components/PdTable/src/sort/index.d.ts +12 -0
- package/dist/packages/components/PdTable/src/sort/sortService.d.ts +91 -0
- package/dist/packages/components/PdTable/src/types/element-type.d.ts +226 -0
- package/dist/packages/components/PdTable/src/types/index.d.ts +90 -0
- package/dist/packages/components/index.d.ts +4 -0
- package/dist/packages/hooks/index.d.ts +1 -0
- package/dist/packages/index.d.ts +6 -0
- package/dist/packages/pandora/component.d.ts +3 -0
- package/dist/packages/pandora/defaults.d.ts +4 -0
- package/dist/packages/pandora/make-installer.d.ts +4 -0
- package/dist/packages/pandora/plugin.d.ts +3 -0
- package/dist/pandora2.css +1 -0
- package/dist/pandora2.es.js +52230 -0
- package/dist/pandora2.umd.js +78 -0
- package/dist/src/_utils/create/index.d.ts +1 -0
- package/dist/src/_utils/dateUtil.d.ts +7 -0
- package/dist/src/_utils/env.d.ts +26 -0
- package/dist/src/_utils/helper/index.d.ts +4 -0
- package/dist/src/_utils/helper/tsxHelper.d.ts +13 -0
- package/dist/src/_utils/index.d.ts +8 -0
- package/dist/src/_utils/is/index.d.ts +21 -0
- package/dist/src/_utils/log/index.d.ts +2 -0
- package/dist/src/_utils/propTypes.d.ts +9 -0
- package/dist/src/_utils/props/index.d.ts +2 -0
- package/dist/src/_utils/vue/index.d.ts +3 -0
- package/dist/src/_utils/vue/install.d.ts +5 -0
- package/dist/src/_utils/vue/refs.d.ts +3 -0
- package/dist/src/_utils/vue/typescript.d.ts +5 -0
- package/dist/src/enums/breakpointEnum.d.ts +18 -0
- package/dist/src/hooks/component/useFormItem.d.ts +2 -0
- package/dist/src/hooks/core/useAttrs.d.ts +9 -0
- package/dist/src/hooks/core/useContext.d.ts +11 -0
- package/dist/src/hooks/event/useBreakpoint.d.ts +22 -0
- package/dist/src/hooks/event/useEventListener.d.ts +14 -0
- package/dist/src/types/axios.d.ts +53 -0
- package/dist/src/types/config.d.ts +25 -0
- package/dist/src/types/global.d.ts +107 -0
- package/dist/src/vue-sfc-shim.d.ts +19 -0
- package/package.json +129 -0
- package/volar.d.ts +9 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
(function(U,G){typeof exports=="object"&&typeof module<"u"?G(exports,require("vue"),require("element-plus")):typeof define=="function"&&define.amd?define(["exports","vue","element-plus"],G):(U=typeof globalThis<"u"?globalThis:U||self,G(U.pandora2={},U.Vue,U.ElementPlus))})(this,(function(exports,vue,elementPlus){"use strict";const makeInstaller=(U=[])=>({install:H=>{U.forEach(W=>H.use(W))}}),withInstall=(U,G)=>{if(U.install=H=>{for(const W of[U,...Object.values(G??{})])H.component(W.name,W)},G)for(const[H,W]of Object.entries(G))U[H]=W;return U},withNoopInstall=U=>(U.install=()=>{},U),toString$1=Object.prototype.toString;function is(U,G){return toString$1.call(U)===`[object ${G}]`}function isDef$1(U){return typeof U<"u"}function isUnDef(U){return!isDef$1(U)}function isObject$6(U){return U!==null&&is(U,"Object")}function isNull(U){return U===null}function isNullOrUnDef(U){return isUnDef(U)||isNull(U)}function isNumber$1(U){return is(U,"Number")}function isString$1(U){return is(U,"String")}function isFunction$2(U){return typeof U=="function"}function isBoolean(U){return is(U,"Boolean")}function isArray$3(U){return U&&Array.isArray(U)}function createNamespace(U){return[`Pd${U}`]}var freeGlobal=typeof global=="object"&&global&&global.Object===Object&&global,freeSelf=typeof self=="object"&&self&&self.Object===Object&&self,root=freeGlobal||freeSelf||Function("return this")(),Symbol$2=root.Symbol,objectProto$g=Object.prototype,hasOwnProperty$d=objectProto$g.hasOwnProperty,nativeObjectToString$1=objectProto$g.toString,symToStringTag$1=Symbol$2?Symbol$2.toStringTag:void 0;function getRawTag(U){var G=hasOwnProperty$d.call(U,symToStringTag$1),H=U[symToStringTag$1];try{U[symToStringTag$1]=void 0;var W=!0}catch{}var Z=nativeObjectToString$1.call(U);return W&&(G?U[symToStringTag$1]=H:delete U[symToStringTag$1]),Z}var objectProto$f=Object.prototype,nativeObjectToString=objectProto$f.toString;function objectToString(U){return nativeObjectToString.call(U)}var nullTag="[object Null]",undefinedTag="[object Undefined]",symToStringTag=Symbol$2?Symbol$2.toStringTag:void 0;function baseGetTag(U){return U==null?U===void 0?undefinedTag:nullTag:symToStringTag&&symToStringTag in Object(U)?getRawTag(U):objectToString(U)}function isObjectLike(U){return U!=null&&typeof U=="object"}var symbolTag$3="[object Symbol]";function isSymbol(U){return typeof U=="symbol"||isObjectLike(U)&&baseGetTag(U)==symbolTag$3}function arrayMap(U,G){for(var H=-1,W=U==null?0:U.length,Z=Array(W);++H<W;)Z[H]=G(U[H],H,U);return Z}var isArray$2=Array.isArray,symbolProto$2=Symbol$2?Symbol$2.prototype:void 0,symbolToString=symbolProto$2?symbolProto$2.toString:void 0;function baseToString(U){if(typeof U=="string")return U;if(isArray$2(U))return arrayMap(U,baseToString)+"";if(isSymbol(U))return symbolToString?symbolToString.call(U):"";var G=U+"";return G=="0"&&1/U==-1/0?"-0":G}function isObject$5(U){var G=typeof U;return U!=null&&(G=="object"||G=="function")}function identity$1(U){return U}var asyncTag="[object AsyncFunction]",funcTag$2="[object Function]",genTag$1="[object GeneratorFunction]",proxyTag="[object Proxy]";function isFunction$1(U){if(!isObject$5(U))return!1;var G=baseGetTag(U);return G==funcTag$2||G==genTag$1||G==asyncTag||G==proxyTag}var coreJsData=root["__core-js_shared__"],maskSrcKey=(function(){var U=/[^.]+$/.exec(coreJsData&&coreJsData.keys&&coreJsData.keys.IE_PROTO||"");return U?"Symbol(src)_1."+U:""})();function isMasked(U){return!!maskSrcKey&&maskSrcKey in U}var funcProto$2=Function.prototype,funcToString$2=funcProto$2.toString;function toSource(U){if(U!=null){try{return funcToString$2.call(U)}catch{}try{return U+""}catch{}}return""}var reRegExpChar=/[\\^$.*+?()[\]{}|]/g,reIsHostCtor=/^\[object .+?Constructor\]$/,funcProto$1=Function.prototype,objectProto$e=Object.prototype,funcToString$1=funcProto$1.toString,hasOwnProperty$c=objectProto$e.hasOwnProperty,reIsNative=RegExp("^"+funcToString$1.call(hasOwnProperty$c).replace(reRegExpChar,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function baseIsNative(U){if(!isObject$5(U)||isMasked(U))return!1;var G=isFunction$1(U)?reIsNative:reIsHostCtor;return G.test(toSource(U))}function getValue(U,G){return U?.[G]}function getNative(U,G){var H=getValue(U,G);return baseIsNative(H)?H:void 0}var WeakMap$1=getNative(root,"WeakMap"),objectCreate=Object.create,baseCreate=(function(){function U(){}return function(G){if(!isObject$5(G))return{};if(objectCreate)return objectCreate(G);U.prototype=G;var H=new U;return U.prototype=void 0,H}})();function apply(U,G,H){switch(H.length){case 0:return U.call(G);case 1:return U.call(G,H[0]);case 2:return U.call(G,H[0],H[1]);case 3:return U.call(G,H[0],H[1],H[2])}return U.apply(G,H)}function noop$2(){}function copyArray(U,G){var H=-1,W=U.length;for(G||(G=Array(W));++H<W;)G[H]=U[H];return G}var HOT_COUNT=800,HOT_SPAN=16,nativeNow=Date.now;function shortOut(U){var G=0,H=0;return function(){var W=nativeNow(),Z=HOT_SPAN-(W-H);if(H=W,Z>0){if(++G>=HOT_COUNT)return arguments[0]}else G=0;return U.apply(void 0,arguments)}}function constant(U){return function(){return U}}var defineProperty=(function(){try{var U=getNative(Object,"defineProperty");return U({},"",{}),U}catch{}})(),baseSetToString=defineProperty?function(U,G){return defineProperty(U,"toString",{configurable:!0,enumerable:!1,value:constant(G),writable:!0})}:identity$1,setToString=shortOut(baseSetToString);function arrayEach(U,G){for(var H=-1,W=U==null?0:U.length;++H<W&&G(U[H],H,U)!==!1;);return U}function baseFindIndex(U,G,H,W){for(var Z=U.length,X=H+-1;++X<Z;)if(G(U[X],X,U))return X;return-1}function baseIsNaN(U){return U!==U}function strictIndexOf(U,G,H){for(var W=H-1,Z=U.length;++W<Z;)if(U[W]===G)return W;return-1}function baseIndexOf(U,G,H){return G===G?strictIndexOf(U,G,H):baseFindIndex(U,baseIsNaN,H)}function arrayIncludes(U,G){var H=U==null?0:U.length;return!!H&&baseIndexOf(U,G,0)>-1}var MAX_SAFE_INTEGER$2=9007199254740991,reIsUint=/^(?:0|[1-9]\d*)$/;function isIndex(U,G){var H=typeof U;return G=G??MAX_SAFE_INTEGER$2,!!G&&(H=="number"||H!="symbol"&&reIsUint.test(U))&&U>-1&&U%1==0&&U<G}function baseAssignValue(U,G,H){G=="__proto__"&&defineProperty?defineProperty(U,G,{configurable:!0,enumerable:!0,value:H,writable:!0}):U[G]=H}function eq(U,G){return U===G||U!==U&&G!==G}var objectProto$d=Object.prototype,hasOwnProperty$b=objectProto$d.hasOwnProperty;function assignValue(U,G,H){var W=U[G];(!(hasOwnProperty$b.call(U,G)&&eq(W,H))||H===void 0&&!(G in U))&&baseAssignValue(U,G,H)}function copyObject(U,G,H,W){var Z=!H;H||(H={});for(var X=-1,K=G.length;++X<K;){var Q=G[X],ee=void 0;ee===void 0&&(ee=U[Q]),Z?baseAssignValue(H,Q,ee):assignValue(H,Q,ee)}return H}var nativeMax=Math.max;function overRest(U,G,H){return G=nativeMax(G===void 0?U.length-1:G,0),function(){for(var W=arguments,Z=-1,X=nativeMax(W.length-G,0),K=Array(X);++Z<X;)K[Z]=W[G+Z];Z=-1;for(var Q=Array(G+1);++Z<G;)Q[Z]=W[Z];return Q[G]=H(K),apply(U,this,Q)}}function baseRest(U,G){return setToString(overRest(U,G,identity$1),U+"")}var MAX_SAFE_INTEGER$1=9007199254740991;function isLength(U){return typeof U=="number"&&U>-1&&U%1==0&&U<=MAX_SAFE_INTEGER$1}function isArrayLike$1(U){return U!=null&&isLength(U.length)&&!isFunction$1(U)}function isIterateeCall(U,G,H){if(!isObject$5(H))return!1;var W=typeof G;return(W=="number"?isArrayLike$1(H)&&isIndex(G,H.length):W=="string"&&G in H)?eq(H[G],U):!1}function createAssigner(U){return baseRest(function(G,H){var W=-1,Z=H.length,X=Z>1?H[Z-1]:void 0,K=Z>2?H[2]:void 0;for(X=U.length>3&&typeof X=="function"?(Z--,X):void 0,K&&isIterateeCall(H[0],H[1],K)&&(X=Z<3?void 0:X,Z=1),G=Object(G);++W<Z;){var Q=H[W];Q&&U(G,Q,W,X)}return G})}var objectProto$c=Object.prototype;function isPrototype(U){var G=U&&U.constructor,H=typeof G=="function"&&G.prototype||objectProto$c;return U===H}function baseTimes(U,G){for(var H=-1,W=Array(U);++H<U;)W[H]=G(H);return W}var argsTag$3="[object Arguments]";function baseIsArguments(U){return isObjectLike(U)&&baseGetTag(U)==argsTag$3}var objectProto$b=Object.prototype,hasOwnProperty$a=objectProto$b.hasOwnProperty,propertyIsEnumerable$1=objectProto$b.propertyIsEnumerable,isArguments=baseIsArguments((function(){return arguments})())?baseIsArguments:function(U){return isObjectLike(U)&&hasOwnProperty$a.call(U,"callee")&&!propertyIsEnumerable$1.call(U,"callee")};function stubFalse(){return!1}var freeExports$2=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$2=freeExports$2&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$2=freeModule$2&&freeModule$2.exports===freeExports$2,Buffer$2=moduleExports$2?root.Buffer:void 0,nativeIsBuffer=Buffer$2?Buffer$2.isBuffer:void 0,isBuffer=nativeIsBuffer||stubFalse,argsTag$2="[object Arguments]",arrayTag$2="[object Array]",boolTag$3="[object Boolean]",dateTag$3="[object Date]",errorTag$2="[object Error]",funcTag$1="[object Function]",mapTag$5="[object Map]",numberTag$3="[object Number]",objectTag$4="[object Object]",regexpTag$3="[object RegExp]",setTag$5="[object Set]",stringTag$3="[object String]",weakMapTag$2="[object WeakMap]",arrayBufferTag$3="[object ArrayBuffer]",dataViewTag$4="[object DataView]",float32Tag$2="[object Float32Array]",float64Tag$2="[object Float64Array]",int8Tag$2="[object Int8Array]",int16Tag$2="[object Int16Array]",int32Tag$2="[object Int32Array]",uint8Tag$2="[object Uint8Array]",uint8ClampedTag$2="[object Uint8ClampedArray]",uint16Tag$2="[object Uint16Array]",uint32Tag$2="[object Uint32Array]",typedArrayTags={};typedArrayTags[float32Tag$2]=typedArrayTags[float64Tag$2]=typedArrayTags[int8Tag$2]=typedArrayTags[int16Tag$2]=typedArrayTags[int32Tag$2]=typedArrayTags[uint8Tag$2]=typedArrayTags[uint8ClampedTag$2]=typedArrayTags[uint16Tag$2]=typedArrayTags[uint32Tag$2]=!0,typedArrayTags[argsTag$2]=typedArrayTags[arrayTag$2]=typedArrayTags[arrayBufferTag$3]=typedArrayTags[boolTag$3]=typedArrayTags[dataViewTag$4]=typedArrayTags[dateTag$3]=typedArrayTags[errorTag$2]=typedArrayTags[funcTag$1]=typedArrayTags[mapTag$5]=typedArrayTags[numberTag$3]=typedArrayTags[objectTag$4]=typedArrayTags[regexpTag$3]=typedArrayTags[setTag$5]=typedArrayTags[stringTag$3]=typedArrayTags[weakMapTag$2]=!1;function baseIsTypedArray(U){return isObjectLike(U)&&isLength(U.length)&&!!typedArrayTags[baseGetTag(U)]}function baseUnary(U){return function(G){return U(G)}}var freeExports$1=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule$1=freeExports$1&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports$1=freeModule$1&&freeModule$1.exports===freeExports$1,freeProcess=moduleExports$1&&freeGlobal.process,nodeUtil=(function(){try{var U=freeModule$1&&freeModule$1.require&&freeModule$1.require("util").types;return U||freeProcess&&freeProcess.binding&&freeProcess.binding("util")}catch{}})(),nodeIsTypedArray=nodeUtil&&nodeUtil.isTypedArray,isTypedArray$1=nodeIsTypedArray?baseUnary(nodeIsTypedArray):baseIsTypedArray,objectProto$a=Object.prototype,hasOwnProperty$9=objectProto$a.hasOwnProperty;function arrayLikeKeys(U,G){var H=isArray$2(U),W=!H&&isArguments(U),Z=!H&&!W&&isBuffer(U),X=!H&&!W&&!Z&&isTypedArray$1(U),K=H||W||Z||X,Q=K?baseTimes(U.length,String):[],ee=Q.length;for(var te in U)(G||hasOwnProperty$9.call(U,te))&&!(K&&(te=="length"||Z&&(te=="offset"||te=="parent")||X&&(te=="buffer"||te=="byteLength"||te=="byteOffset")||isIndex(te,ee)))&&Q.push(te);return Q}function overArg(U,G){return function(H){return U(G(H))}}var nativeKeys=overArg(Object.keys,Object),objectProto$9=Object.prototype,hasOwnProperty$8=objectProto$9.hasOwnProperty;function baseKeys(U){if(!isPrototype(U))return nativeKeys(U);var G=[];for(var H in Object(U))hasOwnProperty$8.call(U,H)&&H!="constructor"&&G.push(H);return G}function keys$1(U){return isArrayLike$1(U)?arrayLikeKeys(U):baseKeys(U)}function nativeKeysIn(U){var G=[];if(U!=null)for(var H in Object(U))G.push(H);return G}var objectProto$8=Object.prototype,hasOwnProperty$7=objectProto$8.hasOwnProperty;function baseKeysIn(U){if(!isObject$5(U))return nativeKeysIn(U);var G=isPrototype(U),H=[];for(var W in U)W=="constructor"&&(G||!hasOwnProperty$7.call(U,W))||H.push(W);return H}function keysIn(U){return isArrayLike$1(U)?arrayLikeKeys(U,!0):baseKeysIn(U)}var reIsDeepProp=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,reIsPlainProp=/^\w*$/;function isKey(U,G){if(isArray$2(U))return!1;var H=typeof U;return H=="number"||H=="symbol"||H=="boolean"||U==null||isSymbol(U)?!0:reIsPlainProp.test(U)||!reIsDeepProp.test(U)||G!=null&&U in Object(G)}var nativeCreate=getNative(Object,"create");function hashClear(){this.__data__=nativeCreate?nativeCreate(null):{},this.size=0}function hashDelete(U){var G=this.has(U)&&delete this.__data__[U];return this.size-=G?1:0,G}var HASH_UNDEFINED$2="__lodash_hash_undefined__",objectProto$7=Object.prototype,hasOwnProperty$6=objectProto$7.hasOwnProperty;function hashGet(U){var G=this.__data__;if(nativeCreate){var H=G[U];return H===HASH_UNDEFINED$2?void 0:H}return hasOwnProperty$6.call(G,U)?G[U]:void 0}var objectProto$6=Object.prototype,hasOwnProperty$5=objectProto$6.hasOwnProperty;function hashHas(U){var G=this.__data__;return nativeCreate?G[U]!==void 0:hasOwnProperty$5.call(G,U)}var HASH_UNDEFINED$1="__lodash_hash_undefined__";function hashSet(U,G){var H=this.__data__;return this.size+=this.has(U)?0:1,H[U]=nativeCreate&&G===void 0?HASH_UNDEFINED$1:G,this}function Hash(U){var G=-1,H=U==null?0:U.length;for(this.clear();++G<H;){var W=U[G];this.set(W[0],W[1])}}Hash.prototype.clear=hashClear,Hash.prototype.delete=hashDelete,Hash.prototype.get=hashGet,Hash.prototype.has=hashHas,Hash.prototype.set=hashSet;function listCacheClear(){this.__data__=[],this.size=0}function assocIndexOf(U,G){for(var H=U.length;H--;)if(eq(U[H][0],G))return H;return-1}var arrayProto$1=Array.prototype,splice=arrayProto$1.splice;function listCacheDelete(U){var G=this.__data__,H=assocIndexOf(G,U);if(H<0)return!1;var W=G.length-1;return H==W?G.pop():splice.call(G,H,1),--this.size,!0}function listCacheGet(U){var G=this.__data__,H=assocIndexOf(G,U);return H<0?void 0:G[H][1]}function listCacheHas(U){return assocIndexOf(this.__data__,U)>-1}function listCacheSet(U,G){var H=this.__data__,W=assocIndexOf(H,U);return W<0?(++this.size,H.push([U,G])):H[W][1]=G,this}function ListCache(U){var G=-1,H=U==null?0:U.length;for(this.clear();++G<H;){var W=U[G];this.set(W[0],W[1])}}ListCache.prototype.clear=listCacheClear,ListCache.prototype.delete=listCacheDelete,ListCache.prototype.get=listCacheGet,ListCache.prototype.has=listCacheHas,ListCache.prototype.set=listCacheSet;var Map$1=getNative(root,"Map");function mapCacheClear(){this.size=0,this.__data__={hash:new Hash,map:new(Map$1||ListCache),string:new Hash}}function isKeyable(U){var G=typeof U;return G=="string"||G=="number"||G=="symbol"||G=="boolean"?U!=="__proto__":U===null}function getMapData(U,G){var H=U.__data__;return isKeyable(G)?H[typeof G=="string"?"string":"hash"]:H.map}function mapCacheDelete(U){var G=getMapData(this,U).delete(U);return this.size-=G?1:0,G}function mapCacheGet(U){return getMapData(this,U).get(U)}function mapCacheHas(U){return getMapData(this,U).has(U)}function mapCacheSet(U,G){var H=getMapData(this,U),W=H.size;return H.set(U,G),this.size+=H.size==W?0:1,this}function MapCache(U){var G=-1,H=U==null?0:U.length;for(this.clear();++G<H;){var W=U[G];this.set(W[0],W[1])}}MapCache.prototype.clear=mapCacheClear,MapCache.prototype.delete=mapCacheDelete,MapCache.prototype.get=mapCacheGet,MapCache.prototype.has=mapCacheHas,MapCache.prototype.set=mapCacheSet;var FUNC_ERROR_TEXT="Expected a function";function memoize(U,G){if(typeof U!="function"||G!=null&&typeof G!="function")throw new TypeError(FUNC_ERROR_TEXT);var H=function(){var W=arguments,Z=G?G.apply(this,W):W[0],X=H.cache;if(X.has(Z))return X.get(Z);var K=U.apply(this,W);return H.cache=X.set(Z,K)||X,K};return H.cache=new(memoize.Cache||MapCache),H}memoize.Cache=MapCache;var MAX_MEMOIZE_SIZE=500;function memoizeCapped(U){var G=memoize(U,function(W){return H.size===MAX_MEMOIZE_SIZE&&H.clear(),W}),H=G.cache;return G}var rePropName=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,reEscapeChar=/\\(\\)?/g,stringToPath=memoizeCapped(function(U){var G=[];return U.charCodeAt(0)===46&&G.push(""),U.replace(rePropName,function(H,W,Z,X){G.push(Z?X.replace(reEscapeChar,"$1"):W||H)}),G});function toString(U){return U==null?"":baseToString(U)}function castPath(U,G){return isArray$2(U)?U:isKey(U,G)?[U]:stringToPath(toString(U))}function toKey(U){if(typeof U=="string"||isSymbol(U))return U;var G=U+"";return G=="0"&&1/U==-1/0?"-0":G}function baseGet(U,G){G=castPath(G,U);for(var H=0,W=G.length;U!=null&&H<W;)U=U[toKey(G[H++])];return H&&H==W?U:void 0}function get$1(U,G,H){var W=U==null?void 0:baseGet(U,G);return W===void 0?H:W}function arrayPush(U,G){for(var H=-1,W=G.length,Z=U.length;++H<W;)U[Z+H]=G[H];return U}var spreadableSymbol=Symbol$2?Symbol$2.isConcatSpreadable:void 0;function isFlattenable(U){return isArray$2(U)||isArguments(U)||!!(spreadableSymbol&&U&&U[spreadableSymbol])}function baseFlatten(U,G,H,W,Z){var X=-1,K=U.length;for(H||(H=isFlattenable),Z||(Z=[]);++X<K;){var Q=U[X];H(Q)?arrayPush(Z,Q):Z[Z.length]=Q}return Z}function flatten(U){var G=U==null?0:U.length;return G?baseFlatten(U):[]}function flatRest(U){return setToString(overRest(U,void 0,flatten),U+"")}var getPrototype=overArg(Object.getPrototypeOf,Object),objectTag$3="[object Object]",funcProto=Function.prototype,objectProto$5=Object.prototype,funcToString=funcProto.toString,hasOwnProperty$4=objectProto$5.hasOwnProperty,objectCtorString=funcToString.call(Object);function isPlainObject$1(U){if(!isObjectLike(U)||baseGetTag(U)!=objectTag$3)return!1;var G=getPrototype(U);if(G===null)return!0;var H=hasOwnProperty$4.call(G,"constructor")&&G.constructor;return typeof H=="function"&&H instanceof H&&funcToString.call(H)==objectCtorString}function baseSlice(U,G,H){var W=-1,Z=U.length;G<0&&(G=-G>Z?0:Z+G),H=H>Z?Z:H,H<0&&(H+=Z),Z=G>H?0:H-G>>>0,G>>>=0;for(var X=Array(Z);++W<Z;)X[W]=U[W+G];return X}function castSlice(U,G,H){var W=U.length;return H=H===void 0?W:H,!G&&H>=W?U:baseSlice(U,G,H)}var rsAstralRange$1="\\ud800-\\udfff",rsComboMarksRange$1="\\u0300-\\u036f",reComboHalfMarksRange$1="\\ufe20-\\ufe2f",rsComboSymbolsRange$1="\\u20d0-\\u20ff",rsComboRange$1=rsComboMarksRange$1+reComboHalfMarksRange$1+rsComboSymbolsRange$1,rsVarRange$1="\\ufe0e\\ufe0f",rsZWJ$1="\\u200d",reHasUnicode=RegExp("["+rsZWJ$1+rsAstralRange$1+rsComboRange$1+rsVarRange$1+"]");function hasUnicode(U){return reHasUnicode.test(U)}function asciiToArray(U){return U.split("")}var rsAstralRange="\\ud800-\\udfff",rsComboMarksRange="\\u0300-\\u036f",reComboHalfMarksRange="\\ufe20-\\ufe2f",rsComboSymbolsRange="\\u20d0-\\u20ff",rsComboRange=rsComboMarksRange+reComboHalfMarksRange+rsComboSymbolsRange,rsVarRange="\\ufe0e\\ufe0f",rsAstral="["+rsAstralRange+"]",rsCombo="["+rsComboRange+"]",rsFitz="\\ud83c[\\udffb-\\udfff]",rsModifier="(?:"+rsCombo+"|"+rsFitz+")",rsNonAstral="[^"+rsAstralRange+"]",rsRegional="(?:\\ud83c[\\udde6-\\uddff]){2}",rsSurrPair="[\\ud800-\\udbff][\\udc00-\\udfff]",rsZWJ="\\u200d",reOptMod=rsModifier+"?",rsOptVar="["+rsVarRange+"]?",rsOptJoin="(?:"+rsZWJ+"(?:"+[rsNonAstral,rsRegional,rsSurrPair].join("|")+")"+rsOptVar+reOptMod+")*",rsSeq=rsOptVar+reOptMod+rsOptJoin,rsSymbol="(?:"+[rsNonAstral+rsCombo+"?",rsCombo,rsRegional,rsSurrPair,rsAstral].join("|")+")",reUnicode=RegExp(rsFitz+"(?="+rsFitz+")|"+rsSymbol+rsSeq,"g");function unicodeToArray(U){return U.match(reUnicode)||[]}function stringToArray(U){return hasUnicode(U)?unicodeToArray(U):asciiToArray(U)}function createCaseFirst(U){return function(G){G=toString(G);var H=hasUnicode(G)?stringToArray(G):void 0,W=H?H[0]:G.charAt(0),Z=H?castSlice(H,1).join(""):G.slice(1);return W[U]()+Z}}var upperFirst=createCaseFirst("toUpperCase");function stackClear(){this.__data__=new ListCache,this.size=0}function stackDelete(U){var G=this.__data__,H=G.delete(U);return this.size=G.size,H}function stackGet(U){return this.__data__.get(U)}function stackHas(U){return this.__data__.has(U)}var LARGE_ARRAY_SIZE$1=200;function stackSet(U,G){var H=this.__data__;if(H instanceof ListCache){var W=H.__data__;if(!Map$1||W.length<LARGE_ARRAY_SIZE$1-1)return W.push([U,G]),this.size=++H.size,this;H=this.__data__=new MapCache(W)}return H.set(U,G),this.size=H.size,this}function Stack(U){var G=this.__data__=new ListCache(U);this.size=G.size}Stack.prototype.clear=stackClear,Stack.prototype.delete=stackDelete,Stack.prototype.get=stackGet,Stack.prototype.has=stackHas,Stack.prototype.set=stackSet;function baseAssign(U,G){return U&©Object(G,keys$1(G),U)}function baseAssignIn(U,G){return U&©Object(G,keysIn(G),U)}var freeExports=typeof exports=="object"&&exports&&!exports.nodeType&&exports,freeModule=freeExports&&typeof module=="object"&&module&&!module.nodeType&&module,moduleExports=freeModule&&freeModule.exports===freeExports,Buffer$1=moduleExports?root.Buffer:void 0,allocUnsafe=Buffer$1?Buffer$1.allocUnsafe:void 0;function cloneBuffer(U,G){if(G)return U.slice();var H=U.length,W=allocUnsafe?allocUnsafe(H):new U.constructor(H);return U.copy(W),W}function arrayFilter(U,G){for(var H=-1,W=U==null?0:U.length,Z=0,X=[];++H<W;){var K=U[H];G(K,H,U)&&(X[Z++]=K)}return X}function stubArray(){return[]}var objectProto$4=Object.prototype,propertyIsEnumerable=objectProto$4.propertyIsEnumerable,nativeGetSymbols$1=Object.getOwnPropertySymbols,getSymbols=nativeGetSymbols$1?function(U){return U==null?[]:(U=Object(U),arrayFilter(nativeGetSymbols$1(U),function(G){return propertyIsEnumerable.call(U,G)}))}:stubArray;function copySymbols(U,G){return copyObject(U,getSymbols(U),G)}var nativeGetSymbols=Object.getOwnPropertySymbols,getSymbolsIn=nativeGetSymbols?function(U){for(var G=[];U;)arrayPush(G,getSymbols(U)),U=getPrototype(U);return G}:stubArray;function copySymbolsIn(U,G){return copyObject(U,getSymbolsIn(U),G)}function baseGetAllKeys(U,G,H){var W=G(U);return isArray$2(U)?W:arrayPush(W,H(U))}function getAllKeys(U){return baseGetAllKeys(U,keys$1,getSymbols)}function getAllKeysIn(U){return baseGetAllKeys(U,keysIn,getSymbolsIn)}var DataView$1=getNative(root,"DataView"),Promise$1=getNative(root,"Promise"),Set=getNative(root,"Set"),mapTag$4="[object Map]",objectTag$2="[object Object]",promiseTag="[object Promise]",setTag$4="[object Set]",weakMapTag$1="[object WeakMap]",dataViewTag$3="[object DataView]",dataViewCtorString=toSource(DataView$1),mapCtorString=toSource(Map$1),promiseCtorString=toSource(Promise$1),setCtorString=toSource(Set),weakMapCtorString=toSource(WeakMap$1),getTag=baseGetTag;(DataView$1&&getTag(new DataView$1(new ArrayBuffer(1)))!=dataViewTag$3||Map$1&&getTag(new Map$1)!=mapTag$4||Promise$1&&getTag(Promise$1.resolve())!=promiseTag||Set&&getTag(new Set)!=setTag$4||WeakMap$1&&getTag(new WeakMap$1)!=weakMapTag$1)&&(getTag=function(U){var G=baseGetTag(U),H=G==objectTag$2?U.constructor:void 0,W=H?toSource(H):"";if(W)switch(W){case dataViewCtorString:return dataViewTag$3;case mapCtorString:return mapTag$4;case promiseCtorString:return promiseTag;case setCtorString:return setTag$4;case weakMapCtorString:return weakMapTag$1}return G});var objectProto$3=Object.prototype,hasOwnProperty$3=objectProto$3.hasOwnProperty;function initCloneArray(U){var G=U.length,H=new U.constructor(G);return G&&typeof U[0]=="string"&&hasOwnProperty$3.call(U,"index")&&(H.index=U.index,H.input=U.input),H}var Uint8Array$1=root.Uint8Array;function cloneArrayBuffer(U){var G=new U.constructor(U.byteLength);return new Uint8Array$1(G).set(new Uint8Array$1(U)),G}function cloneDataView(U,G){var H=G?cloneArrayBuffer(U.buffer):U.buffer;return new U.constructor(H,U.byteOffset,U.byteLength)}var reFlags=/\w*$/;function cloneRegExp(U){var G=new U.constructor(U.source,reFlags.exec(U));return G.lastIndex=U.lastIndex,G}var symbolProto$1=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf$1=symbolProto$1?symbolProto$1.valueOf:void 0;function cloneSymbol(U){return symbolValueOf$1?Object(symbolValueOf$1.call(U)):{}}function cloneTypedArray(U,G){var H=G?cloneArrayBuffer(U.buffer):U.buffer;return new U.constructor(H,U.byteOffset,U.length)}var boolTag$2="[object Boolean]",dateTag$2="[object Date]",mapTag$3="[object Map]",numberTag$2="[object Number]",regexpTag$2="[object RegExp]",setTag$3="[object Set]",stringTag$2="[object String]",symbolTag$2="[object Symbol]",arrayBufferTag$2="[object ArrayBuffer]",dataViewTag$2="[object DataView]",float32Tag$1="[object Float32Array]",float64Tag$1="[object Float64Array]",int8Tag$1="[object Int8Array]",int16Tag$1="[object Int16Array]",int32Tag$1="[object Int32Array]",uint8Tag$1="[object Uint8Array]",uint8ClampedTag$1="[object Uint8ClampedArray]",uint16Tag$1="[object Uint16Array]",uint32Tag$1="[object Uint32Array]";function initCloneByTag(U,G,H){var W=U.constructor;switch(G){case arrayBufferTag$2:return cloneArrayBuffer(U);case boolTag$2:case dateTag$2:return new W(+U);case dataViewTag$2:return cloneDataView(U,H);case float32Tag$1:case float64Tag$1:case int8Tag$1:case int16Tag$1:case int32Tag$1:case uint8Tag$1:case uint8ClampedTag$1:case uint16Tag$1:case uint32Tag$1:return cloneTypedArray(U,H);case mapTag$3:return new W;case numberTag$2:case stringTag$2:return new W(U);case regexpTag$2:return cloneRegExp(U);case setTag$3:return new W;case symbolTag$2:return cloneSymbol(U)}}function initCloneObject(U){return typeof U.constructor=="function"&&!isPrototype(U)?baseCreate(getPrototype(U)):{}}var mapTag$2="[object Map]";function baseIsMap(U){return isObjectLike(U)&&getTag(U)==mapTag$2}var nodeIsMap=nodeUtil&&nodeUtil.isMap,isMap=nodeIsMap?baseUnary(nodeIsMap):baseIsMap,setTag$2="[object Set]";function baseIsSet(U){return isObjectLike(U)&&getTag(U)==setTag$2}var nodeIsSet=nodeUtil&&nodeUtil.isSet,isSet=nodeIsSet?baseUnary(nodeIsSet):baseIsSet,CLONE_DEEP_FLAG$2=1,CLONE_FLAT_FLAG$1=2,CLONE_SYMBOLS_FLAG$2=4,argsTag$1="[object Arguments]",arrayTag$1="[object Array]",boolTag$1="[object Boolean]",dateTag$1="[object Date]",errorTag$1="[object Error]",funcTag="[object Function]",genTag="[object GeneratorFunction]",mapTag$1="[object Map]",numberTag$1="[object Number]",objectTag$1="[object Object]",regexpTag$1="[object RegExp]",setTag$1="[object Set]",stringTag$1="[object String]",symbolTag$1="[object Symbol]",weakMapTag="[object WeakMap]",arrayBufferTag$1="[object ArrayBuffer]",dataViewTag$1="[object DataView]",float32Tag="[object Float32Array]",float64Tag="[object Float64Array]",int8Tag="[object Int8Array]",int16Tag="[object Int16Array]",int32Tag="[object Int32Array]",uint8Tag="[object Uint8Array]",uint8ClampedTag="[object Uint8ClampedArray]",uint16Tag="[object Uint16Array]",uint32Tag="[object Uint32Array]",cloneableTags={};cloneableTags[argsTag$1]=cloneableTags[arrayTag$1]=cloneableTags[arrayBufferTag$1]=cloneableTags[dataViewTag$1]=cloneableTags[boolTag$1]=cloneableTags[dateTag$1]=cloneableTags[float32Tag]=cloneableTags[float64Tag]=cloneableTags[int8Tag]=cloneableTags[int16Tag]=cloneableTags[int32Tag]=cloneableTags[mapTag$1]=cloneableTags[numberTag$1]=cloneableTags[objectTag$1]=cloneableTags[regexpTag$1]=cloneableTags[setTag$1]=cloneableTags[stringTag$1]=cloneableTags[symbolTag$1]=cloneableTags[uint8Tag]=cloneableTags[uint8ClampedTag]=cloneableTags[uint16Tag]=cloneableTags[uint32Tag]=!0,cloneableTags[errorTag$1]=cloneableTags[funcTag]=cloneableTags[weakMapTag]=!1;function baseClone(U,G,H,W,Z,X){var K,Q=G&CLONE_DEEP_FLAG$2,ee=G&CLONE_FLAT_FLAG$1,te=G&CLONE_SYMBOLS_FLAG$2;if(H&&(K=Z?H(U,W,Z,X):H(U)),K!==void 0)return K;if(!isObject$5(U))return U;var re=isArray$2(U);if(re){if(K=initCloneArray(U),!Q)return copyArray(U,K)}else{var ae=getTag(U),ne=ae==funcTag||ae==genTag;if(isBuffer(U))return cloneBuffer(U,Q);if(ae==objectTag$1||ae==argsTag$1||ne&&!Z){if(K=ee||ne?{}:initCloneObject(U),!Q)return ee?copySymbolsIn(U,baseAssignIn(K,U)):copySymbols(U,baseAssign(K,U))}else{if(!cloneableTags[ae])return Z?U:{};K=initCloneByTag(U,ae,Q)}}X||(X=new Stack);var ie=X.get(U);if(ie)return ie;X.set(U,K),isSet(U)?U.forEach(function(le){K.add(baseClone(le,G,H,le,U,X))}):isMap(U)&&U.forEach(function(le,ue){K.set(ue,baseClone(le,G,H,ue,U,X))});var oe=te?ee?getAllKeysIn:getAllKeys:ee?keysIn:keys$1,se=re?void 0:oe(U);return arrayEach(se||U,function(le,ue){se&&(ue=le,le=U[ue]),assignValue(K,ue,baseClone(le,G,H,ue,U,X))}),K}var CLONE_DEEP_FLAG$1=1,CLONE_SYMBOLS_FLAG$1=4;function cloneDeep(U){return baseClone(U,CLONE_DEEP_FLAG$1|CLONE_SYMBOLS_FLAG$1)}var HASH_UNDEFINED="__lodash_hash_undefined__";function setCacheAdd(U){return this.__data__.set(U,HASH_UNDEFINED),this}function setCacheHas(U){return this.__data__.has(U)}function SetCache(U){var G=-1,H=U==null?0:U.length;for(this.__data__=new MapCache;++G<H;)this.add(U[G])}SetCache.prototype.add=SetCache.prototype.push=setCacheAdd,SetCache.prototype.has=setCacheHas;function arraySome(U,G){for(var H=-1,W=U==null?0:U.length;++H<W;)if(G(U[H],H,U))return!0;return!1}function cacheHas(U,G){return U.has(G)}var COMPARE_PARTIAL_FLAG$3=1,COMPARE_UNORDERED_FLAG$1=2;function equalArrays(U,G,H,W,Z,X){var K=H&COMPARE_PARTIAL_FLAG$3,Q=U.length,ee=G.length;if(Q!=ee&&!(K&&ee>Q))return!1;var te=X.get(U),re=X.get(G);if(te&&re)return te==G&&re==U;var ae=-1,ne=!0,ie=H&COMPARE_UNORDERED_FLAG$1?new SetCache:void 0;for(X.set(U,G),X.set(G,U);++ae<Q;){var oe=U[ae],se=G[ae];if(W)var le=K?W(se,oe,ae,G,U,X):W(oe,se,ae,U,G,X);if(le!==void 0){if(le)continue;ne=!1;break}if(ie){if(!arraySome(G,function(ue,ce){if(!cacheHas(ie,ce)&&(oe===ue||Z(oe,ue,H,W,X)))return ie.push(ce)})){ne=!1;break}}else if(!(oe===se||Z(oe,se,H,W,X))){ne=!1;break}}return X.delete(U),X.delete(G),ne}function mapToArray(U){var G=-1,H=Array(U.size);return U.forEach(function(W,Z){H[++G]=[Z,W]}),H}function setToArray(U){var G=-1,H=Array(U.size);return U.forEach(function(W){H[++G]=W}),H}var COMPARE_PARTIAL_FLAG$2=1,COMPARE_UNORDERED_FLAG=2,boolTag="[object Boolean]",dateTag="[object Date]",errorTag="[object Error]",mapTag="[object Map]",numberTag="[object Number]",regexpTag="[object RegExp]",setTag="[object Set]",stringTag="[object String]",symbolTag="[object Symbol]",arrayBufferTag="[object ArrayBuffer]",dataViewTag="[object DataView]",symbolProto=Symbol$2?Symbol$2.prototype:void 0,symbolValueOf=symbolProto?symbolProto.valueOf:void 0;function equalByTag(U,G,H,W,Z,X,K){switch(H){case dataViewTag:if(U.byteLength!=G.byteLength||U.byteOffset!=G.byteOffset)return!1;U=U.buffer,G=G.buffer;case arrayBufferTag:return!(U.byteLength!=G.byteLength||!X(new Uint8Array$1(U),new Uint8Array$1(G)));case boolTag:case dateTag:case numberTag:return eq(+U,+G);case errorTag:return U.name==G.name&&U.message==G.message;case regexpTag:case stringTag:return U==G+"";case mapTag:var Q=mapToArray;case setTag:var ee=W&COMPARE_PARTIAL_FLAG$2;if(Q||(Q=setToArray),U.size!=G.size&&!ee)return!1;var te=K.get(U);if(te)return te==G;W|=COMPARE_UNORDERED_FLAG,K.set(U,G);var re=equalArrays(Q(U),Q(G),W,Z,X,K);return K.delete(U),re;case symbolTag:if(symbolValueOf)return symbolValueOf.call(U)==symbolValueOf.call(G)}return!1}var COMPARE_PARTIAL_FLAG$1=1,objectProto$2=Object.prototype,hasOwnProperty$2=objectProto$2.hasOwnProperty;function equalObjects(U,G,H,W,Z,X){var K=H&COMPARE_PARTIAL_FLAG$1,Q=getAllKeys(U),ee=Q.length,te=getAllKeys(G),re=te.length;if(ee!=re&&!K)return!1;for(var ae=ee;ae--;){var ne=Q[ae];if(!(K?ne in G:hasOwnProperty$2.call(G,ne)))return!1}var ie=X.get(U),oe=X.get(G);if(ie&&oe)return ie==G&&oe==U;var se=!0;X.set(U,G),X.set(G,U);for(var le=K;++ae<ee;){ne=Q[ae];var ue=U[ne],ce=G[ne];if(W)var fe=K?W(ce,ue,ne,G,U,X):W(ue,ce,ne,U,G,X);if(!(fe===void 0?ue===ce||Z(ue,ce,H,W,X):fe)){se=!1;break}le||(le=ne=="constructor")}if(se&&!le){var he=U.constructor,ve=G.constructor;he!=ve&&"constructor"in U&&"constructor"in G&&!(typeof he=="function"&&he instanceof he&&typeof ve=="function"&&ve instanceof ve)&&(se=!1)}return X.delete(U),X.delete(G),se}var COMPARE_PARTIAL_FLAG=1,argsTag="[object Arguments]",arrayTag="[object Array]",objectTag="[object Object]",objectProto$1=Object.prototype,hasOwnProperty$1=objectProto$1.hasOwnProperty;function baseIsEqualDeep(U,G,H,W,Z,X){var K=isArray$2(U),Q=isArray$2(G),ee=K?arrayTag:getTag(U),te=Q?arrayTag:getTag(G);ee=ee==argsTag?objectTag:ee,te=te==argsTag?objectTag:te;var re=ee==objectTag,ae=te==objectTag,ne=ee==te;if(ne&&isBuffer(U)){if(!isBuffer(G))return!1;K=!0,re=!1}if(ne&&!re)return X||(X=new Stack),K||isTypedArray$1(U)?equalArrays(U,G,H,W,Z,X):equalByTag(U,G,ee,H,W,Z,X);if(!(H&COMPARE_PARTIAL_FLAG)){var ie=re&&hasOwnProperty$1.call(U,"__wrapped__"),oe=ae&&hasOwnProperty$1.call(G,"__wrapped__");if(ie||oe){var se=ie?U.value():U,le=oe?G.value():G;return X||(X=new Stack),Z(se,le,H,W,X)}}return ne?(X||(X=new Stack),equalObjects(U,G,H,W,Z,X)):!1}function baseIsEqual(U,G,H,W,Z){return U===G?!0:U==null||G==null||!isObjectLike(U)&&!isObjectLike(G)?U!==U&&G!==G:baseIsEqualDeep(U,G,H,W,baseIsEqual,Z)}function baseProperty(U){return function(G){return G?.[U]}}function basePropertyDeep(U){return function(G){return baseGet(G,U)}}function property(U){return isKey(U)?baseProperty(toKey(U)):basePropertyDeep(U)}function baseIteratee(U){return property(U)}function createBaseFor(U){return function(G,H,W){for(var Z=-1,X=Object(G),K=W(G),Q=K.length;Q--;){var ee=K[++Z];if(H(X[ee],ee,X)===!1)break}return G}}var baseFor=createBaseFor();function assignMergeValue(U,G,H){(H!==void 0&&!eq(U[G],H)||H===void 0&&!(G in U))&&baseAssignValue(U,G,H)}function isArrayLikeObject(U){return isObjectLike(U)&&isArrayLike$1(U)}function safeGet(U,G){if(!(G==="constructor"&&typeof U[G]=="function")&&G!="__proto__")return U[G]}function toPlainObject(U){return copyObject(U,keysIn(U))}function baseMergeDeep(U,G,H,W,Z,X,K){var Q=safeGet(U,H),ee=safeGet(G,H),te=K.get(ee);if(te){assignMergeValue(U,H,te);return}var re=X?X(Q,ee,H+"",U,G,K):void 0,ae=re===void 0;if(ae){var ne=isArray$2(ee),ie=!ne&&isBuffer(ee),oe=!ne&&!ie&&isTypedArray$1(ee);re=ee,ne||ie||oe?isArray$2(Q)?re=Q:isArrayLikeObject(Q)?re=copyArray(Q):ie?(ae=!1,re=cloneBuffer(ee,!0)):oe?(ae=!1,re=cloneTypedArray(ee,!0)):re=[]:isPlainObject$1(ee)||isArguments(ee)?(re=Q,isArguments(Q)?re=toPlainObject(Q):(!isObject$5(Q)||isFunction$1(Q))&&(re=initCloneObject(ee))):ae=!1}ae&&(K.set(ee,re),Z(re,ee,W,X,K),K.delete(ee)),assignMergeValue(U,H,re)}function baseMerge(U,G,H,W,Z){U!==G&&baseFor(G,function(X,K){if(Z||(Z=new Stack),isObject$5(X))baseMergeDeep(U,G,K,H,baseMerge,W,Z);else{var Q=W?W(safeGet(U,K),X,K+"",U,G,Z):void 0;Q===void 0&&(Q=X),assignMergeValue(U,K,Q)}},keysIn)}function last(U){var G=U==null?0:U.length;return G?U[G-1]:void 0}function parent(U,G){return G.length<2?U:baseGet(U,baseSlice(G,0,-1))}function isEqual(U,G){return baseIsEqual(U,G)}var merge$1=createAssigner(function(U,G,H){baseMerge(U,G,H)}),objectProto=Object.prototype,hasOwnProperty=objectProto.hasOwnProperty;function baseUnset(U,G){G=castPath(G,U);var H=-1,W=G.length;if(!W)return!0;for(var Z=U==null||typeof U!="object"&&typeof U!="function";++H<W;){var X=G[H];if(typeof X=="string"){if(X==="__proto__"&&!hasOwnProperty.call(U,"__proto__"))return!1;if(X==="constructor"&&H+1<W&&typeof G[H+1]=="string"&&G[H+1]==="prototype"){if(Z&&H===0)continue;return!1}}}var K=parent(U,G);return K==null||delete K[toKey(last(G))]}function customOmitClone(U){return isPlainObject$1(U)?void 0:U}var CLONE_DEEP_FLAG=1,CLONE_FLAT_FLAG=2,CLONE_SYMBOLS_FLAG=4,omit=flatRest(function(U,G){var H={};if(U==null)return H;var W=!1;G=arrayMap(G,function(X){return X=castPath(X,U),W||(W=X.length>1),X}),copyObject(U,getAllKeysIn(U),H),W&&(H=baseClone(H,CLONE_DEEP_FLAG|CLONE_FLAT_FLAG|CLONE_SYMBOLS_FLAG,customOmitClone));for(var Z=G.length;Z--;)baseUnset(H,G[Z]);return H});function baseSet(U,G,H,W){if(!isObject$5(U))return U;G=castPath(G,U);for(var Z=-1,X=G.length,K=X-1,Q=U;Q!=null&&++Z<X;){var ee=toKey(G[Z]),te=H;if(ee==="__proto__"||ee==="constructor"||ee==="prototype")return U;if(Z!=K){var re=Q[ee];te=void 0,te===void 0&&(te=isObject$5(re)?re:isIndex(G[Z+1])?[]:{})}assignValue(Q,ee,te),Q=Q[ee]}return U}function set$2(U,G,H){return U==null?U:baseSet(U,G,H)}var INFINITY=1/0,createSet=Set&&1/setToArray(new Set([,-0]))[1]==INFINITY?function(U){return new Set(U)}:noop$2,LARGE_ARRAY_SIZE=200;function baseUniq(U,G,H){var W=-1,Z=arrayIncludes,X=U.length,K=!0,Q=[],ee=Q;if(X>=LARGE_ARRAY_SIZE){var te=G?null:createSet(U);if(te)return setToArray(te);K=!1,Z=cacheHas,ee=new SetCache}else ee=G?[]:Q;e:for(;++W<X;){var re=U[W],ae=G?G(re):re;if(re=re!==0?re:0,K&&ae===ae){for(var ne=ee.length;ne--;)if(ee[ne]===ae)continue e;G&&ee.push(ae),Q.push(re)}else Z(ee,ae,H)||(ee!==Q&&ee.push(ae),Q.push(re))}return Q}function uniqBy(U,G){return U&&U.length?baseUniq(U,baseIteratee(G)):[]}const tableProps={data:{type:Array,default(){return[]}},columns:{type:Array,default(){return[]}},sortConfig:{type:Object,default(){return{}}},tableConfig:{type:Object,default(){return{}}}},trim$2=function(U){return(U||"").replace(/^[\s\uFEFF]+|[\s\uFEFF]+$/g,"")};function hasClass(U,G){return!!U.className.match(new RegExp("(\\s|^)"+G+"(\\s|$)"))}function addClass(U,G){hasClass(U,G)||(U.className=trim$2(U.className)+" "+G)}function removeClass(U,G){hasClass(U,G)&&(U.className=U.className.replace(new RegExp("(\\s|^)"+G+"(\\s|$)")," "))}const ASC="ascending",DESC="descending",DEFAULT_SORT="descending",SINGLE="single",SORT_ARR=[ASC,DESC];class SortService{activeSort={};defaultSortObj={};_oldActiveSort={};option={sortMode:SINGLE};constructor(G){this.option=G}init(){const G=this.option.userColumnOrder;this._initDefSortObj();for(const H in G)this.defaultSortObj[H]&&(G[H]=this.defaultSortObj[H]);this._oldActiveSort=Object.assign({},G),this.activeSort=Object.assign({},G),this.initIconSort()}initSort(){this._clearSortOrderService(),this._initDefSortObj(),this.sortChange()}_initDefSortObj(){this.option.defaultSorts&&this.option.defaultSorts.forEach(G=>{this.defaultSortObj[G.prop]=G.order})}_getDefaultOrder(G){let H="";return this._oldActiveSort[G]?H=this._oldActiveSort[G]:H=this.option.defaultOrder||DEFAULT_SORT,H}getSortColDom(G){const H=this.option.tableInstance?.value;return H?H.$el.querySelectorAll(`div[relid=${G}]`):[]}initIconSort(){for(const G in this.activeSort)this.getSortColDom(G).forEach(W=>{addClass(W.parentNode.parentNode,this.activeSort[G])})}getTargetSortKey(G){const H=SORT_ARR.findIndex(W=>W!==G);return SORT_ARR[H]}getCurrentSortKey(G){let H="";const W=`${ASC}|${DESC}`;for(let Z=0;Z<G.length;Z++)new RegExp(W).test(G[Z])&&(H=trim$2(G[Z]));return H}_isSingleModel(G){return SINGLE===G}getTargetNode(G){const H=G.target;let W;return H.className==="caret-wrapper"?W=H.parentNode.parentNode.parentNode:H.nodeName==="I"?W=H.parentNode.parentNode.parentNode.parentNode:H.nodeName==="DIV"&&H.attributes.getNamedItem("relid")?W=H.parentNode.parentNode:H.nodeName==="DIV"&&H.className=="cell"&&(W=H.parentNode),W}isNeedOrderChange(G){return this._oldActiveSort[G]}sortOrderService(G,H){this.activeSort[G]=H}_clearSortOrderService(){for(const G in this.activeSort)this.activeSort[G]="",this.clearSortOrderCls(G)}clearSortOrderCls(G){this.getSortColDom(G).forEach(W=>{this.removeAllSortOrderCls(W.parentNode.parentNode)})}changeSortOrderClass(G,H){this.removeAllSortOrderCls(G),addClass(G,H)}removeAllSortOrderCls(G){SORT_ARR.forEach(H=>{removeClass(G,H)})}sortIconClick(G,H,W){const Z=this.getTargetNode(G);this._isSingleModel(this.option.sortMode)&&this._clearSortOrderService(),this.changeSortOrderClass(Z,W),this.sortOrderService(H.property,W),this.sortChange(),G.stopPropagation(),G.preventDefault()}sortChange(){this.option.sortChange&&isFunction$2(this.option.sortChange)&&this.option.sortChange(this.getActiveSortValue())}getActiveSortValue(){const G=Object.create(null);for(const H in this.activeSort)this.activeSort[H]!==""&&(G[H]=this.activeSort[H]);return G}executeHeaderClick(G,H){const W=G.property;if(!this.isNeedOrderChange(W))return;const Z=this.getTargetNode(H),X=this.getCurrentSortKey(Z.classList);let K="";this._isSingleModel(this.option.sortMode)&&this._clearSortOrderService(),X!==""?K=this.getTargetSortKey(X):K=this._getDefaultOrder(W),this.changeSortOrderClass(Z,K),this.sortOrderService(W,K),this.sortChange()}}function useSortService(U,G,H){const W=()=>{const X=Object.create([]);return G.map(K=>{K.sortable&&K.sortable!==void 0&&(X[K.value]="")}),X};return U.userColumnOrder=W(),U.tableInstance=H,new SortService(U)}const useTableProps=U=>{const G=vue.ref(),H=vue.ref(U.data),W=U.tableConfig,Z=vue.ref(U.columns),{sortConfig:X,columns:K}=U,Q=()=>{const ae=(U.tableConfig||{}).selection,ne=ae?(U.columns||[]).filter(ie=>ie.type!=="selection"):[...U.columns||[]];if(ae){const ie={type:"selection",width:55,align:"center"};typeof ae=="object"?(ae.selectable&&(ie.selectable=ae.selectable),(ae.selectionPos||"top")==="end"?ne.push(ie):ne.unshift(ie)):ne.unshift(ie)}Z.value=ne};vue.watch([()=>U.columns,()=>U.tableConfig],()=>{Q()},{deep:!0,immediate:!0});const ee=useSortService(X,K,G),te=(re,ae)=>{ee.executeHeaderClick(re,ae)};return vue.watch(()=>U.data,()=>{H.value=U.data,ee.init()}),{tableInstance:G,tableConfig:W,currentData:H,columnsProps:Z,$sortService:ee,handleHeaderClick:te}};function _isSlot$1(U){return typeof U=="function"||Object.prototype.toString.call(U)==="[object Object]"&&!vue.isVNode(U)}function renderColumnProp(U,G){const{prop:H,value:W,label:Z,name:X,sortable:K,render:Q,...ee}=U,te={prop:H||W,label:Z||X,...ee};let re;return K&&(re={header:ae=>{const ne=ae.column;return vue.createVNode("div",{relId:ne.property,style:{cursor:"pointer",display:"inline-flex",alignItems:"center"}},[ne.label,vue.createVNode("span",{class:"caret-wrapper"},[vue.createVNode("i",{class:"sort-caret ascending","on-click":oe=>G.sortIconClick(oe,ne,"ascending")},null),vue.createVNode("i",{class:"sort-caret descending","on-click":oe=>G.sortIconClick(oe,ne,"descending")},null)])])}}),Q&&isFunction$2(Q)&&(re={default:ae=>Q(vue.toRaw(ae.row),ae.column,ae.$index)}),{columnProps:te,slots:re}}function getColumnVNode(U,G,H=null){const{columnProps:W,slots:Z}=renderColumnProp(U,G);if(W.key||(W.key=W.prop||W.type||W.label||Math.random().toString(36).slice(2)),H)return vue.createVNode(elementPlus.ElTableColumn,W,_isSlot$1(H)?H:{default:()=>[H]});const X=Z?.default||Z?.header?Z:"";return vue.createVNode(elementPlus.ElTableColumn,{...W},X)}function useColumnRender(U,G){return U.map(W=>{let Z;return W?.columns&&W?.columns.length?(Z=W?.columns.map(X=>getColumnVNode(X,G)),getColumnVNode(W,G,Z)):getColumnVNode(W,G)})}const PAGE_HEIGHT=50,defaultOption$2={height:PAGE_HEIGHT,currentPage:1,total:200,pageCount:7,pageSizes:[10,20,30,40,50],pageSize:10,layout:"total, sizes, prev, pager, next, jumper"},getPagerProps=()=>({option:{type:Object,default(){return cloneDeep(defaultOption$2)}}}),[name$2]=createNamespace("Pagination"),_sfc_main$b=vue.defineComponent({name:name$2,inheritAttrs:!1,props:getPagerProps(),setup(U,{emit:G}){return{handleSizeChange:Z=>{G("handleSizeChange",Z)},handleCurrentChange:Z=>{G("handleCurrentChange",Z)}}}}),_export_sfc=(U,G)=>{const H=U.__vccOpts||U;for(const[W,Z]of G)H[W]=Z;return H},_hoisted_1$3={class:"vpandora-pagination"};function _sfc_render$4(U,G,H,W,Z,X){const K=vue.resolveComponent("el-pagination");return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$3,[vue.createVNode(K,{onSizeChange:U.handleSizeChange,onCurrentChange:U.handleCurrentChange,currentPage:U.option.currentPage,"onUpdate:currentPage":G[0]||(G[0]=Q=>U.option.currentPage=Q),"page-sizes":U.option.pageSizes,"page-size":U.option.pageSize,"onUpdate:pageSize":G[1]||(G[1]=Q=>U.option.pageSize=Q),"pager-count":U.option.pageCount,layout:U.option.layout,total:U.option.total},null,8,["onSizeChange","onCurrentChange","currentPage","page-sizes","page-size","pager-count","layout","total"])])}const Pagination=_export_sfc(_sfc_main$b,[["render",_sfc_render$4]]),usePagerRender=(U,G,H)=>{let W=null;const X={ref:vue.ref(null),option:U,onHandleSizeChange:G,onHandleCurrentChange:H};return W=vue.createVNode(Pagination,X,null),W};function _isSlot(U){return typeof U=="function"||Object.prototype.toString.call(U)==="[object Object]"&&!vue.isVNode(U)}const[name$1]=createNamespace("Table"),_sfc_main$a=vue.defineComponent({name:name$1,inheritAttrs:!1,props:tableProps,emits:["register","handleSizePageChange","handleCurrentPageChange"],setup(U,{attrs:G,emit:H}){const W=vue.ref({}),Z=vue.reactive({...U});vue.watch([()=>U,()=>W.value],()=>{const ve=merge$1({},vue.unref(U),vue.unref(W));"data"in ve&&(Z.data=ve.data),"columns"in ve&&(Z.columns=ve.columns),"tableConfig"in ve&&(Z.tableConfig=ve.tableConfig)},{deep:!0,immediate:!0});const{tableInstance:X,currentData:K,columnsProps:Q,$sortService:ee,handleHeaderClick:te}=useTableProps(Z),re=()=>Z.tableConfig||{},ae=vue.computed(()=>re().pagination),ne=vue.computed(()=>re().pageOpt),ie=vue.computed(()=>{const ve=re().selection;return!ve||typeof ve!="object"?"":ve.selectionMode||""}),oe=vue.computed(()=>(Q.value||[]).map(de=>de.type||de.prop||de.value||de.label||de.name||"").join("|")),se=vue.computed(()=>{const{pagination:ve,pageOpt:de,selection:pe,...ge}=re();let me={};return Object.keys(ge).map(_e=>{me[_e]=vue.unref(ge[_e])}),me}),le=vue.ref(!1),ue=ve=>{const de=G.onSelectionChange;if(le.value){de&&de(ve);return}if(vue.unref(ie)==="single"&&Array.isArray(ve)&&ve.length>1){const pe=ve[ve.length-1];le.value=!0,vue.nextTick(()=>{const ge=X.value;ge&&ge.clearSelection&&ge.toggleRowSelection&&(ge.clearSelection(),ge.toggleRowSelection(pe,!0)),le.value=!1}),de&&de([pe]);return}de&&de(ve)},ce={setProps:async ve=>{W.value=merge$1({},vue.unref(W)||{},ve),await vue.nextTick()},setColumns:async ve=>{const de={columns:ve};W.value=merge$1({},vue.unref(W)||{},de),await vue.nextTick()},setData:async ve=>{const de={data:ve};W.value=merge$1({},vue.unref(W)||{},de),await vue.nextTick()},reload:async ve=>{},getSelectRows:()=>{const ve=X.value;return ve&&ve.getSelectionRows?ve.getSelectionRows()||[]:[]},clearSelection:()=>{const ve=X.value;ve&&ve.clearSelection&&ve.clearSelection()}};vue.onMounted(()=>{vue.nextTick(()=>{ee.init()}),H("register",ce)});const fe=ve=>{H("handleSizePageChange",ve)},he=ve=>{H("handleCurrentPageChange",ve)};return()=>{const ve=Object.assign({ref:X,key:vue.unref(oe),onHeaderClick:te,onSelectionChange:ue,data:K.value,...G},se.value),de=useColumnRender(Q.value,ee);let pe=null;return vue.unref(ae)&&(pe=usePagerRender(vue.unref(ne),fe,he)),vue.createVNode("div",{class:"vpandora-table"},[vue.createVNode(elementPlus.ElTable,ve,_isSlot(de)?de:{default:()=>[de]}),pe])}}});function isObject$4(U){return Object.prototype.toString.call(U)==="[object Object]"}function isPlainObject(U){var G,H;return isObject$4(U)===!1?!1:(G=U.constructor,G===void 0?!0:(H=G.prototype,!(isObject$4(H)===!1||H.hasOwnProperty("isPrototypeOf")===!1)))}function t(){return t=Object.assign?Object.assign.bind():function(U){for(var G=1;G<arguments.length;G++){var H=arguments[G];for(var W in H)Object.prototype.hasOwnProperty.call(H,W)&&(U[W]=H[W])}return U},t.apply(this,arguments)}function r(U,G){if(U==null)return{};var H,W,Z={},X=Object.keys(U);for(W=0;W<X.length;W++)G.indexOf(H=X[W])>=0||(Z[H]=U[H]);return Z}const n={silent:!1,logLevel:"warn"},i$1=["validator"],o=Object.prototype,a=o.toString,s=o.hasOwnProperty,u=/^\s*function (\w+)/;function l(U){var G;const H=(G=U?.type)!==null&&G!==void 0?G:U;if(H){const W=H.toString().match(u);return W?W[1]:""}return""}const c=isPlainObject,f=U=>U;let d=f;process.env.NODE_ENV!=="production"&&(d=typeof console<"u"?function(G,H=n.logLevel){n.silent===!1&&console[H](`[VueTypes warn]: ${G}`)}:f);const p=(U,G)=>s.call(U,G),y=Number.isInteger||function(U){return typeof U=="number"&&isFinite(U)&&Math.floor(U)===U},v=Array.isArray||function(U){return a.call(U)==="[object Array]"},h=U=>a.call(U)==="[object Function]",b=U=>c(U)&&p(U,"_vueTypes_name"),g=U=>c(U)&&(p(U,"type")||["_vueTypes_name","validator","default","required"].some(G=>p(U,G)));function O(U,G){return Object.defineProperty(U.bind(G),"__original",{value:U})}function m$1(U,G,H=!1){let W,Z=!0,X="";W=c(U)?U:{type:U};const K=b(W)?W._vueTypes_name+" - ":"";if(g(W)&&W.type!==null){if(W.type===void 0||W.type===!0||!W.required&&G===void 0)return Z;v(W.type)?(Z=W.type.some(Q=>m$1(Q,G,!0)===!0),X=W.type.map(Q=>l(Q)).join(" or ")):(X=l(W),Z=X==="Array"?v(G):X==="Object"?c(G):X==="String"||X==="Number"||X==="Boolean"||X==="Function"?(function(Q){if(Q==null)return"";const ee=Q.constructor.toString().match(u);return ee?ee[1]:""})(G)===X:G instanceof W.type)}if(!Z){const Q=`${K}value "${G}" should be of type "${X}"`;return H===!1?(d(Q),!1):Q}if(p(W,"validator")&&h(W.validator)){const Q=d,ee=[];if(d=te=>{ee.push(te)},Z=W.validator(G),d=Q,!Z){const te=(ee.length>1?"* ":"")+ee.join(`
|
|
2
|
+
* `);return ee.length=0,H===!1?(d(te),Z):te}}return Z}function j(U,G){const H=Object.defineProperties(G,{_vueTypes_name:{value:U,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(Z){return Z===void 0?(p(this,"default")&&delete this.default,this):h(Z)||m$1(this,Z,!0)===!0?(this.default=v(Z)?()=>[...Z]:c(Z)?()=>Object.assign({},Z):Z,this):(d(`${this._vueTypes_name} - invalid default value: "${Z}"`),this)}}}),{validator:W}=H;return h(W)&&(H.validator=O(W,H)),H}function _(U,G){const H=j(U,G);return Object.defineProperty(H,"validate",{value(W){return h(this.validator)&&d(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
|
|
3
|
+
${JSON.stringify(this)}`),this.validator=O(W,this),this}})}function T(U,G,H){const W=(function(ee){const te={};return Object.getOwnPropertyNames(ee).forEach(re=>{te[re]=Object.getOwnPropertyDescriptor(ee,re)}),Object.defineProperties({},te)})(G);if(W._vueTypes_name=U,!c(H))return W;const{validator:Z}=H,X=r(H,i$1);if(h(Z)){let{validator:ee}=W;ee&&(ee=(Q=(K=ee).__original)!==null&&Q!==void 0?Q:K),W.validator=O(ee?function(te){return ee.call(this,te)&&Z.call(this,te)}:Z,W)}var K,Q;return Object.assign(W,X)}function $(U){return U.replace(/^(?!\s*$)/gm," ")}const w=()=>_("any",{}),P=()=>_("function",{type:Function}),x=()=>_("boolean",{type:Boolean}),E=()=>_("string",{type:String}),N=()=>_("number",{type:Number}),q=()=>_("array",{type:Array}),A=()=>_("object",{type:Object}),V=()=>j("integer",{type:Number,validator:U=>y(U)}),S=()=>j("symbol",{validator:U=>typeof U=="symbol"});function D(U,G="custom validation failed"){if(typeof U!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return j(U.name||"<<anonymous function>>",{type:null,validator(H){const W=U(H);return W||d(`${this._vueTypes_name} - ${G}`),W}})}function L(U){if(!v(U))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const G=`oneOf - value should be one of "${U.join('", "')}".`,H=U.reduce((W,Z)=>{if(Z!=null){const X=Z.constructor;W.indexOf(X)===-1&&W.push(X)}return W},[]);return j("oneOf",{type:H.length>0?H:void 0,validator(W){const Z=U.indexOf(W)!==-1;return Z||d(G),Z}})}function F(U){if(!v(U))throw new TypeError("[VueTypes error]: You must provide an array as argument");let G=!1,H=[];for(let Z=0;Z<U.length;Z+=1){const X=U[Z];if(g(X)){if(b(X)&&X._vueTypes_name==="oneOf"&&X.type){H=H.concat(X.type);continue}if(h(X.validator)&&(G=!0),X.type===!0||!X.type){d('oneOfType - invalid usage of "true" or "null" as types.');continue}H=H.concat(X.type)}else H.push(X)}H=H.filter((Z,X)=>H.indexOf(Z)===X);const W=H.length>0?H:null;return j("oneOfType",G?{type:W,validator(Z){const X=[],K=U.some(Q=>{const ee=m$1(b(Q)&&Q._vueTypes_name==="oneOf"?Q.type||null:Q,Z,!0);return typeof ee=="string"&&X.push(ee),ee===!0});return K||d(`oneOfType - provided value does not match any of the ${X.length} passed-in validators:
|
|
4
|
+
${$(X.join(`
|
|
5
|
+
`))}`),K}}:{type:W})}function Y(U){return j("arrayOf",{type:Array,validator(G){let H="";const W=G.every(Z=>(H=m$1(U,Z,!0),H===!0));return W||d(`arrayOf - value validation error:
|
|
6
|
+
${$(H)}`),W}})}function B(U){return j("instanceOf",{type:U})}function I(U){return j("objectOf",{type:Object,validator(G){let H="";const W=Object.keys(G).every(Z=>(H=m$1(U,G[Z],!0),H===!0));return W||d(`objectOf - value validation error:
|
|
7
|
+
${$(H)}`),W}})}function J(U){const G=Object.keys(U),H=G.filter(Z=>{var X;return!((X=U[Z])===null||X===void 0||!X.required)}),W=j("shape",{type:Object,validator(Z){if(!c(Z))return!1;const X=Object.keys(Z);if(H.length>0&&H.some(K=>X.indexOf(K)===-1)){const K=H.filter(Q=>X.indexOf(Q)===-1);return d(K.length===1?`shape - required property "${K[0]}" is not defined.`:`shape - required properties "${K.join('", "')}" are not defined.`),!1}return X.every(K=>{if(G.indexOf(K)===-1)return this._vueTypes_isLoose===!0||(d(`shape - shape definition does not include a "${K}" property. Allowed keys: "${G.join('", "')}".`),!1);const Q=m$1(U[K],Z[K],!0);return typeof Q=="string"&&d(`shape - "${K}" property validation error:
|
|
8
|
+
${$(Q)}`),Q===!0})}});return Object.defineProperty(W,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(W,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),W}const M=["name","validate","getter"],R=(()=>{var U;return(U=class{static get any(){return w()}static get func(){return P().def(this.defaults.func)}static get bool(){return x().def(this.defaults.bool)}static get string(){return E().def(this.defaults.string)}static get number(){return N().def(this.defaults.number)}static get array(){return q().def(this.defaults.array)}static get object(){return A().def(this.defaults.object)}static get integer(){return V().def(this.defaults.integer)}static get symbol(){return S()}static get nullable(){return{type:null}}static extend(G){if(v(G))return G.forEach(ee=>this.extend(ee)),this;const{name:H,validate:W=!1,getter:Z=!1}=G,X=r(G,M);if(p(this,H))throw new TypeError(`[VueTypes error]: Type "${H}" already defined`);const{type:K}=X;if(b(K))return delete X.type,Object.defineProperty(this,H,Z?{get:()=>T(H,K,X)}:{value(...ee){const te=T(H,K,X);return te.validator&&(te.validator=te.validator.bind(te,...ee)),te}});let Q;return Q=Z?{get(){const ee=Object.assign({},X);return W?_(H,ee):j(H,ee)},enumerable:!0}:{value(...ee){const te=Object.assign({},X);let re;return re=W?_(H,te):j(H,te),te.validator&&(re.validator=te.validator.bind(re,...ee)),re},enumerable:!0},Object.defineProperty(this,H,Q)}}).defaults={},U.sensibleDefaults=void 0,U.config=n,U.custom=D,U.oneOf=L,U.instanceOf=B,U.oneOfType=F,U.arrayOf=Y,U.objectOf=I,U.shape=J,U.utils={validate:(G,H)=>m$1(H,G,!0)===!0,toType:(G,H,W=!1)=>W?_(G,H):j(G,H)},U})();function z(U={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var G;return(G=class extends R{static get sensibleDefaults(){return t({},this.defaults)}static set sensibleDefaults(H){this.defaults=H!==!1?t({},H!==!0?H:U):{}}}).defaults=t({},U),G}class C extends z(){}const propTypes=z({func:void 0,bool:void 0,string:void 0,number:void 0,object:void 0,integer:void 0});propTypes.extend([{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VNodeChild",getter:!0,type:void 0}]);function getDynamicProps(U){const G={};return Object.keys(U).map(H=>{G[H]=vue.unref(U[H])}),G}function deepMerge(U={},G={}){let H;for(H in G)U[H]=isObject$6(U[H])?deepMerge(U[H],G[H]):U[H]=G[H];return U}const projectName="Pandora 2.0";function error$1(U){throw new Error(`[${projectName} error]:${U}`)}function isProdMode(){return!0}function useTable(U){const G=vue.ref(null),H=vue.ref(!1);async function W(){const K=vue.unref(G);return K||error$1("The table instance has not been obtained, please make sure that the table has been rendered when performing the table operation!"),await vue.nextTick(),K}return[K=>{vue.onUnmounted(()=>{G.value=null,H.value=null}),!(vue.unref(H)&&isProdMode()&&K===vue.unref(G))&&(G.value=K,H.value=!0,vue.watch(()=>U,()=>{U&&K.setProps(getDynamicProps(U))},{immediate:!0,deep:!0}))},{setProps:async K=>{(await W()).setProps(K)},setColumns:async K=>{(await W()).setColumns(K)},setData:async K=>{(await W()).setData(K)},reload:async K=>(await W()).reload(K),getSelectRows:()=>{const K=vue.unref(G);return K&&K.getSelectRows?K.getSelectRows()||[]:[]},clearSelection:async()=>{(await W()).clearSelection()}}]}const PdTable=withInstall(_sfc_main$a);function getDefaultExportFromCjs(U){return U&&U.__esModule&&Object.prototype.hasOwnProperty.call(U,"default")?U.default:U}var dayjs_min$1={exports:{}},dayjs_min=dayjs_min$1.exports,hasRequiredDayjs_min;function requireDayjs_min(){return hasRequiredDayjs_min||(hasRequiredDayjs_min=1,(function(U,G){(function(H,W){U.exports=W()})(dayjs_min,(function(){var H=1e3,W=6e4,Z=36e5,X="millisecond",K="second",Q="minute",ee="hour",te="day",re="week",ae="month",ne="quarter",ie="year",oe="date",se="Invalid Date",le=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,ue=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,ce={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(Te){var be=["th","st","nd","rd"],Ae=Te%100;return"["+Te+(be[(Ae-20)%10]||be[Ae]||be[0])+"]"}},fe=function(Te,be,Ae){var we=String(Te);return!we||we.length>=be?Te:""+Array(be+1-we.length).join(Ae)+Te},he={s:fe,z:function(Te){var be=-Te.utcOffset(),Ae=Math.abs(be),we=Math.floor(Ae/60),Ce=Ae%60;return(be<=0?"+":"-")+fe(we,2,"0")+":"+fe(Ce,2,"0")},m:function Te(be,Ae){if(be.date()<Ae.date())return-Te(Ae,be);var we=12*(Ae.year()-be.year())+(Ae.month()-be.month()),Ce=be.clone().add(we,ae),Ee=Ae-Ce<0,Me=be.clone().add(we+(Ee?-1:1),ae);return+(-(we+(Ae-Ce)/(Ee?Ce-Me:Me-Ce))||0)},a:function(Te){return Te<0?Math.ceil(Te)||0:Math.floor(Te)},p:function(Te){return{M:ae,y:ie,w:re,d:te,D:oe,h:ee,m:Q,s:K,ms:X,Q:ne}[Te]||String(Te||"").toLowerCase().replace(/s$/,"")},u:function(Te){return Te===void 0}},ve="en",de={};de[ve]=ce;var pe="$isDayjsObject",ge=function(Te){return Te instanceof xe||!(!Te||!Te[pe])},me=function Te(be,Ae,we){var Ce;if(!be)return ve;if(typeof be=="string"){var Ee=be.toLowerCase();de[Ee]&&(Ce=Ee),Ae&&(de[Ee]=Ae,Ce=Ee);var Me=be.split("-");if(!Ce&&Me.length>1)return Te(Me[0])}else{var De=be.name;de[De]=be,Ce=De}return!we&&Ce&&(ve=Ce),Ce||!we&&ve},ye=function(Te,be){if(ge(Te))return Te.clone();var Ae=typeof be=="object"?be:{};return Ae.date=Te,Ae.args=arguments,new xe(Ae)},_e=he;_e.l=me,_e.i=ge,_e.w=function(Te,be){return ye(Te,{locale:be.$L,utc:be.$u,x:be.$x,$offset:be.$offset})};var xe=(function(){function Te(Ae){this.$L=me(Ae.locale,null,!0),this.parse(Ae),this.$x=this.$x||Ae.x||{},this[pe]=!0}var be=Te.prototype;return be.parse=function(Ae){this.$d=(function(we){var Ce=we.date,Ee=we.utc;if(Ce===null)return new Date(NaN);if(_e.u(Ce))return new Date;if(Ce instanceof Date)return new Date(Ce);if(typeof Ce=="string"&&!/Z$/i.test(Ce)){var Me=Ce.match(le);if(Me){var De=Me[2]-1||0,Le=(Me[7]||"0").substring(0,3);return Ee?new Date(Date.UTC(Me[1],De,Me[3]||1,Me[4]||0,Me[5]||0,Me[6]||0,Le)):new Date(Me[1],De,Me[3]||1,Me[4]||0,Me[5]||0,Me[6]||0,Le)}}return new Date(Ce)})(Ae),this.init()},be.init=function(){var Ae=this.$d;this.$y=Ae.getFullYear(),this.$M=Ae.getMonth(),this.$D=Ae.getDate(),this.$W=Ae.getDay(),this.$H=Ae.getHours(),this.$m=Ae.getMinutes(),this.$s=Ae.getSeconds(),this.$ms=Ae.getMilliseconds()},be.$utils=function(){return _e},be.isValid=function(){return this.$d.toString()!==se},be.isSame=function(Ae,we){var Ce=ye(Ae);return this.startOf(we)<=Ce&&Ce<=this.endOf(we)},be.isAfter=function(Ae,we){return ye(Ae)<this.startOf(we)},be.isBefore=function(Ae,we){return this.endOf(we)<ye(Ae)},be.$g=function(Ae,we,Ce){return _e.u(Ae)?this[we]:this.set(Ce,Ae)},be.unix=function(){return Math.floor(this.valueOf()/1e3)},be.valueOf=function(){return this.$d.getTime()},be.startOf=function(Ae,we){var Ce=this,Ee=!!_e.u(we)||we,Me=_e.p(Ae),De=function(Re,Ne){var Oe=_e.w(Ce.$u?Date.UTC(Ce.$y,Ne,Re):new Date(Ce.$y,Ne,Re),Ce);return Ee?Oe:Oe.endOf(te)},Le=function(Re,Ne){return _e.w(Ce.toDate()[Re].apply(Ce.toDate("s"),(Ee?[0,0,0,0]:[23,59,59,999]).slice(Ne)),Ce)},Pe=this.$W,Ie=this.$M,$e=this.$D,Ve="set"+(this.$u?"UTC":"");switch(Me){case ie:return Ee?De(1,0):De(31,11);case ae:return Ee?De(1,Ie):De(0,Ie+1);case re:var Fe=this.$locale().weekStart||0,ke=(Pe<Fe?Pe+7:Pe)-Fe;return De(Ee?$e-ke:$e+(6-ke),Ie);case te:case oe:return Le(Ve+"Hours",0);case ee:return Le(Ve+"Minutes",1);case Q:return Le(Ve+"Seconds",2);case K:return Le(Ve+"Milliseconds",3);default:return this.clone()}},be.endOf=function(Ae){return this.startOf(Ae,!1)},be.$set=function(Ae,we){var Ce,Ee=_e.p(Ae),Me="set"+(this.$u?"UTC":""),De=(Ce={},Ce[te]=Me+"Date",Ce[oe]=Me+"Date",Ce[ae]=Me+"Month",Ce[ie]=Me+"FullYear",Ce[ee]=Me+"Hours",Ce[Q]=Me+"Minutes",Ce[K]=Me+"Seconds",Ce[X]=Me+"Milliseconds",Ce)[Ee],Le=Ee===te?this.$D+(we-this.$W):we;if(Ee===ae||Ee===ie){var Pe=this.clone().set(oe,1);Pe.$d[De](Le),Pe.init(),this.$d=Pe.set(oe,Math.min(this.$D,Pe.daysInMonth())).$d}else De&&this.$d[De](Le);return this.init(),this},be.set=function(Ae,we){return this.clone().$set(Ae,we)},be.get=function(Ae){return this[_e.p(Ae)]()},be.add=function(Ae,we){var Ce,Ee=this;Ae=Number(Ae);var Me=_e.p(we),De=function(Ie){var $e=ye(Ee);return _e.w($e.date($e.date()+Math.round(Ie*Ae)),Ee)};if(Me===ae)return this.set(ae,this.$M+Ae);if(Me===ie)return this.set(ie,this.$y+Ae);if(Me===te)return De(1);if(Me===re)return De(7);var Le=(Ce={},Ce[Q]=W,Ce[ee]=Z,Ce[K]=H,Ce)[Me]||1,Pe=this.$d.getTime()+Ae*Le;return _e.w(Pe,this)},be.subtract=function(Ae,we){return this.add(-1*Ae,we)},be.format=function(Ae){var we=this,Ce=this.$locale();if(!this.isValid())return Ce.invalidDate||se;var Ee=Ae||"YYYY-MM-DDTHH:mm:ssZ",Me=_e.z(this),De=this.$H,Le=this.$m,Pe=this.$M,Ie=Ce.weekdays,$e=Ce.months,Ve=Ce.meridiem,Fe=function(Ne,Oe,Be,ze){return Ne&&(Ne[Oe]||Ne(we,Ee))||Be[Oe].slice(0,ze)},ke=function(Ne){return _e.s(De%12||12,Ne,"0")},Re=Ve||function(Ne,Oe,Be){var ze=Ne<12?"AM":"PM";return Be?ze.toLowerCase():ze};return Ee.replace(ue,(function(Ne,Oe){return Oe||(function(Be){switch(Be){case"YY":return String(we.$y).slice(-2);case"YYYY":return _e.s(we.$y,4,"0");case"M":return Pe+1;case"MM":return _e.s(Pe+1,2,"0");case"MMM":return Fe(Ce.monthsShort,Pe,$e,3);case"MMMM":return Fe($e,Pe);case"D":return we.$D;case"DD":return _e.s(we.$D,2,"0");case"d":return String(we.$W);case"dd":return Fe(Ce.weekdaysMin,we.$W,Ie,2);case"ddd":return Fe(Ce.weekdaysShort,we.$W,Ie,3);case"dddd":return Ie[we.$W];case"H":return String(De);case"HH":return _e.s(De,2,"0");case"h":return ke(1);case"hh":return ke(2);case"a":return Re(De,Le,!0);case"A":return Re(De,Le,!1);case"m":return String(Le);case"mm":return _e.s(Le,2,"0");case"s":return String(we.$s);case"ss":return _e.s(we.$s,2,"0");case"SSS":return _e.s(we.$ms,3,"0");case"Z":return Me}return null})(Ne)||Me.replace(":","")}))},be.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},be.diff=function(Ae,we,Ce){var Ee,Me=this,De=_e.p(we),Le=ye(Ae),Pe=(Le.utcOffset()-this.utcOffset())*W,Ie=this-Le,$e=function(){return _e.m(Me,Le)};switch(De){case ie:Ee=$e()/12;break;case ae:Ee=$e();break;case ne:Ee=$e()/3;break;case re:Ee=(Ie-Pe)/6048e5;break;case te:Ee=(Ie-Pe)/864e5;break;case ee:Ee=Ie/Z;break;case Q:Ee=Ie/W;break;case K:Ee=Ie/H;break;default:Ee=Ie}return Ce?Ee:_e.a(Ee)},be.daysInMonth=function(){return this.endOf(ae).$D},be.$locale=function(){return de[this.$L]},be.locale=function(Ae,we){if(!Ae)return this.$L;var Ce=this.clone(),Ee=me(Ae,we,!0);return Ee&&(Ce.$L=Ee),Ce},be.clone=function(){return _e.w(this.$d,this)},be.toDate=function(){return new Date(this.valueOf())},be.toJSON=function(){return this.isValid()?this.toISOString():null},be.toISOString=function(){return this.$d.toISOString()},be.toString=function(){return this.$d.toUTCString()},Te})(),Se=xe.prototype;return ye.prototype=Se,[["$ms",X],["$s",K],["$m",Q],["$H",ee],["$W",te],["$M",ae],["$y",ie],["$D",oe]].forEach((function(Te){Se[Te[1]]=function(be){return this.$g(be,Te[0],Te[1])}})),ye.extend=function(Te,be){return Te.$i||(Te(be,xe,ye),Te.$i=!0),ye},ye.locale=me,ye.isDayjs=ge,ye.unix=function(Te){return ye(1e3*Te)},ye.en=de[ve],ye.Ls=de,ye.p={},ye}))})(dayjs_min$1)),dayjs_min$1.exports}var dayjs_minExports=requireDayjs_min();const dayjs=getDefaultExportFromCjs(dayjs_minExports),dateUtil=dayjs;var _a$1;const isClient=typeof window<"u",noop$1=()=>{};isClient&&((_a$1=window?.navigator)!=null&&_a$1.userAgent)&&/iP(ad|hone|od)/.test(window.navigator.userAgent);function resolveUnref(U){return typeof U=="function"?U():vue.unref(U)}function createFilterWrapper(U,G){function H(...W){return new Promise((Z,X)=>{Promise.resolve(U(()=>G.apply(this,W),{fn:G,thisArg:this,args:W})).then(Z).catch(X)})}return H}function debounceFilter(U,G={}){let H,W,Z=noop$1;const X=Q=>{clearTimeout(Q),Z(),Z=noop$1};return Q=>{const ee=resolveUnref(U),te=resolveUnref(G.maxWait);return H&&X(H),ee<=0||te!==void 0&&te<=0?(W&&(X(W),W=null),Promise.resolve(Q())):new Promise((re,ae)=>{Z=G.rejectOnCancel?ae:re,te&&!W&&(W=setTimeout(()=>{H&&X(H),W=null,re(Q())},te)),H=setTimeout(()=>{W&&X(W),W=null,re(Q())},ee)})}}function useDebounceFn(U,G=200,H={}){return createFilterWrapper(debounceFilter(G,H),U)}function tryOnUnmounted(U){vue.getCurrentInstance()&&vue.onUnmounted(U)}const prefixCls="pandora-basic-arrow",_sfc_main$9=vue.defineComponent({__name:"BasicArrow",props:{expand:{type:Boolean},up:{type:Boolean},down:{type:Boolean},inset:{type:Boolean}},setup(U){const G=U,H=vue.computed(()=>{const{expand:W,up:Z,down:X,inset:K}=G;return[prefixCls,{[`${prefixCls}--active`]:W,up:Z,inset:K,down:X}]});return(W,Z)=>{const X=vue.resolveComponent("ArrowDown");return vue.openBlock(),vue.createElementBlock("span",{class:vue.normalizeClass(H.value)},[vue.createVNode(X,{style:vue.normalizeStyle(W.$attrs.iconStyle)},null,8,["style"])],2)}}}),BasicArrow=_export_sfc(_sfc_main$9,[["__scopeId","data-v-b5173730"]]);function createContext(U,G=Symbol(),H={}){const{readonly:W=!0,createProvider:Z=!1,native:X=!1}=H,K=vue.reactive(U),Q=W?vue.readonly(K):K;return!Z&&vue.provide(G,X?U:Q),{state:K}}function useContext(U=Symbol(),G){return vue.inject(U,{})}const key$1=Symbol();function createFormContext(U){return createContext(U,key$1)}function useFormContext(){return useContext(key$1)}const _sfc_main$8=vue.defineComponent({name:"BasicFormAction",components:{BasicArrow,ElCol:elementPlus.ElCol,ElButton:elementPlus.ElButton},props:{showActionButtonGroup:propTypes.bool.def(!0),showResetButton:propTypes.bool.def(!0),showSubmitButton:propTypes.bool.def(!0),showAdvancedButton:propTypes.bool.def(!0),actionColStyle:{type:Object,default:()=>({})},resetButtonOptions:{type:Object,default:()=>({})},submitButtonOptions:{type:Object,default:()=>({})},actionColOptions:{type:Object,default:()=>({})},actionSpan:propTypes.number.def(6),isAdvanced:propTypes.bool,hideAdvanceBtn:propTypes.bool.def(!1)},emits:["toggle-advanced"],setup(U,{emit:G}){const H=vue.computed(()=>{const{showAdvancedButton:Q,actionSpan:ee,actionColOptions:te}=U,re=24-ee,ae=Q?{span:re<6?24:re}:{};return{span:Q?6:4,...ae,...te}}),W=vue.computed(()=>{const{actionColStyle:Q}=U;return{width:"100%","text-align":Q.textAlign?Q.textAlign:"right"}}),Z=vue.computed(()=>Object.assign({label:"重置"},U.resetButtonOptions)),X=vue.computed(()=>Object.assign({label:"查询"},U.submitButtonOptions));function K(){G("toggle-advanced")}return{actionColOpt:H,getResetBtnOptions:Z,getSubmitBtnOptions:X,toggleAdvanced:K,getActionStyle:W,...useFormContext()}}});function _sfc_render$3(U,G,H,W,Z,X){const K=vue.resolveComponent("el-button"),Q=vue.resolveComponent("BasicArrow"),ee=vue.resolveComponent("el-col");return U.showActionButtonGroup?(vue.openBlock(),vue.createBlock(ee,vue.normalizeProps(vue.mergeProps({key:0},U.actionColOpt)),{default:vue.withCtx(()=>[vue.createElementVNode("div",{style:vue.normalizeStyle(U.getActionStyle)},[vue.renderSlot(U.$slots,"resetBefore"),U.showResetButton?(vue.openBlock(),vue.createBlock(K,vue.mergeProps({key:0,type:"default"},U.getResetBtnOptions,{onClick:U.resetAction}),{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(U.getResetBtnOptions.label),1)]),_:1},16,["onClick"])):vue.createCommentVNode("",!0),vue.renderSlot(U.$slots,"submitBefore"),U.showSubmitButton?(vue.openBlock(),vue.createBlock(K,vue.mergeProps({key:1,type:"primary"},U.getSubmitBtnOptions,{onClick:U.submitAction}),{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(U.getSubmitBtnOptions.label),1)]),_:1},16,["onClick"])):vue.createCommentVNode("",!0),vue.renderSlot(U.$slots,"advanceBefore"),U.showAdvancedButton&&!U.hideAdvanceBtn?(vue.openBlock(),vue.createBlock(K,{key:2,type:"text",size:"small",onClick:U.toggleAdvanced},{default:vue.withCtx(()=>[vue.createTextVNode(vue.toDisplayString(U.isAdvanced?"收起":"展开")+" ",1),vue.createVNode(Q,{class:"ml-1",expand:!U.isAdvanced,up:""},null,8,["expand"])]),_:1},8,["onClick"])):vue.createCommentVNode("",!0),vue.renderSlot(U.$slots,"advanceAfter")],4)]),_:3},16)):vue.createCommentVNode("",!0)}const FormAction=_export_sfc(_sfc_main$8,[["render",_sfc_render$3]]);function getSlot(U,G="default",H){if(!U||!Reflect.has(U,G))return null;if(!isFunction$2(U[G]))return console.error(`${G} is not a function!`),null;const W=U[G];return W?W(H):null}function useRuleFormItem(U,G="value",H="change",W){const X=vue.getCurrentInstance()?.emit,K=vue.reactive({value:U[G]}),Q=vue.readonly(K),ee=re=>{K.value=re};return vue.watchEffect(()=>{K.value=U[G]}),[vue.computed({get(){return K.value},set(re){isEqual(re,Q.value)||(K.value=re,vue.nextTick(()=>{X?.(H,re,...vue.toRaw(vue.unref(W))||[])}))}}),ee,Q]}const DEFAULT_EXCLUDE_KEYS=["class","style"],LISTENER_PREFIX=/^on[A-Z]/;function entries(U){return Object.keys(U).map(G=>[G,U[G]])}function useAttrs(U={}){const G=vue.getCurrentInstance();if(!G)return{};const{excludeListeners:H=!1,excludeKeys:W=[],excludeDefaultKeys:Z=!0}=U,X=vue.shallowRef({}),K=W.concat(Z?DEFAULT_EXCLUDE_KEYS:[]);return G.attrs=vue.reactive(G.attrs),vue.watchEffect(()=>{const Q=entries(G.attrs).reduce((ee,[te,re])=>(!K.includes(te)&&!(H&&LISTENER_PREFIX.test(te))&&(ee[te]=re),ee),{});X.value=Q}),X}const _sfc_main$7=vue.defineComponent({name:"ApiSelect",components:{ElSelect:elementPlus.ElSelect},inheritAttrs:!1,props:{value:[Array,Object,String,Number],numberToString:propTypes.bool,api:{type:Function,default:null},params:{type:Object,default:()=>({})},resultField:propTypes.string.def(""),labelField:propTypes.string.def("label"),valueField:propTypes.string.def("value"),immediate:propTypes.bool.def(!0),alwaysLoad:propTypes.bool.def(!1)},emits:["options-change","change"],setup(U,{emit:G}){const H=vue.ref([]),W=vue.ref(!1),Z=vue.ref(!0),X=vue.ref([]),K=useAttrs(),[Q]=useRuleFormItem(U,"value","change",X),ee=vue.computed(()=>{const{labelField:ie,valueField:oe,numberToString:se}=U;return vue.unref(H).reduce((le,ue)=>{if(ue){const ce=ue[oe];le.push({...omit(ue,[ie,oe]),label:ue[ie],value:se?`${ce}`:ce})}return le},[])});vue.watchEffect(()=>{U.immediate&&!U.alwaysLoad&&te()}),vue.watch(()=>U.params,()=>{!vue.unref(Z)&&te()},{deep:!0});async function te(){const ie=U.api;if(!(!ie||!isFunction$2(ie))){H.value=[];try{W.value=!0;const oe=await ie(U.params);if(Array.isArray(oe)){H.value=oe,ae();return}U.resultField&&(H.value=get$1(oe,U.resultField)||[]),ae()}catch(oe){console.warn(oe)}finally{W.value=!1}}}async function re(ie){ie&&(U.alwaysLoad?await te():!U.immediate&&vue.unref(Z)&&(await te(),Z.value=!1))}function ae(){G("options-change",vue.unref(ee))}function ne(ie,...oe){X.value=oe}return{state:Q,attrs:K,getOptions:ee,loading:W,handleFetch:re,handleChange:ne}}});function _sfc_render$2(U,G,H,W,Z,X){const K=vue.resolveComponent("el-option"),Q=vue.resolveComponent("Loading"),ee=vue.resolveComponent("el-select");return vue.openBlock(),vue.createBlock(ee,vue.mergeProps({onVisibleChange:U.handleFetch},U.$attrs,{onChange:U.handleChange,value:U.state,"onUpdate:value":G[0]||(G[0]=te=>U.state=te)}),vue.createSlots({default:vue.withCtx(()=>[(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(U.getOptions,te=>(vue.openBlock(),vue.createBlock(K,{key:te.value,label:te.label,value:te.value},null,8,["label","value"]))),128))]),_:2},[U.loading?{name:"suffixIcon",fn:vue.withCtx(()=>[vue.createVNode(Q)]),key:"0"}:void 0,U.loading?{name:"notFoundContent",fn:vue.withCtx(()=>[vue.createElementVNode("span",null,[vue.createVNode(Q),G[1]||(G[1]=vue.createTextVNode(" 没有发现数据 ",-1))])]),key:"1"}:void 0]),1040,["onVisibleChange","onChange","value"])}const ApiSelect=_export_sfc(_sfc_main$7,[["render",_sfc_render$2]]),componentMap=new Map;componentMap.set("Autocomplete",elementPlus.ElAutocomplete),componentMap.set("Button",elementPlus.ElButton),componentMap.set("Checkbox",elementPlus.ElCheckbox),componentMap.set("CheckboxGroup",elementPlus.ElCheckboxGroup),componentMap.set("Cascader",elementPlus.ElCascader),componentMap.set("DatePicker",elementPlus.ElDatePicker),componentMap.set("Input",elementPlus.ElInput),componentMap.set("InputNumber",elementPlus.ElInputNumber),componentMap.set("TimePicker",elementPlus.ElTimePicker),componentMap.set("TimeSelect",elementPlus.ElTimeSelect),componentMap.set("Slider",elementPlus.ElSlider),componentMap.set("Select",elementPlus.ElSelect),componentMap.set("SelectOption",elementPlus.ElOption),componentMap.set("Switch",elementPlus.ElSwitch),componentMap.set("Radio",elementPlus.ElRadio),componentMap.set("RadioGroup",elementPlus.ElRadioGroup),componentMap.set("Rate",elementPlus.ElRate),componentMap.set("Divider",elementPlus.ElDivider),componentMap.set("ApiSelect",ApiSelect);function add$1(U,G){componentMap.set(U,G)}function del(U){componentMap.delete(U)}function createPlaceholderMessage(U){return U.includes("Input")||U.includes("Complete")?"请输入内容":U.includes("Picker")||U.includes("Select")||U.includes("Cascader")||U.includes("Checkbox")||U.includes("Radio")||U.includes("Switch")?"请选择内容":""}const DATE_TYPE=["DatePicker","MonthPicker","WeekPicker","TimePicker"];function genType(){return[...DATE_TYPE,"RangePicker"]}function handleInputNumberValue(U,G){return U&&["Input","InputPassword","InputSearch","InputTextArea"].includes(U)&&G&&isNumber$1(G)?`${G}`:G}const dateItemType=genType(),defaultValueComponents=["Input","InputPassword","InputSearch","InputTextArea"];var _sfc_main8=vue.defineComponent({name:"ArrowLeft",__name:"arrow-left",setup(U){return(G,H)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.59 30.59 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.59 30.59 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0"})]))}}),arrow_left_default=_sfc_main8,_sfc_main10=vue.defineComponent({name:"ArrowRight",__name:"arrow-right",setup(U){return(G,H)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M340.864 149.312a30.59 30.59 0 0 0 0 42.752L652.736 512 340.864 831.872a30.59 30.59 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"})]))}}),arrow_right_default=_sfc_main10,_sfc_main288=vue.defineComponent({name:"Warning",__name:"warning",setup(U){return(G,H)=>(vue.openBlock(),vue.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[vue.createElementVNode("path",{fill:"currentColor",d:"M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768m48-176a48 48 0 1 1-96 0 48 48 0 0 1 96 0m-48-464a32 32 0 0 1 32 32v288a32 32 0 0 1-64 0V288a32 32 0 0 1 32-32"})]))}}),warning_default=_sfc_main288;const props={color:{type:String,default:"#ffffff"},fontSize:{type:String,default:"14px"},tabindex:{type:Boolean},placement:{type:String,default:"right"},content:{type:[Array,String]}},_sfc_main$6=vue.defineComponent({name:"BasicHelp",components:{ElTooltip:elementPlus.ElTooltip},props,setup(U,{slots:G}){const H="pandora-basic-help",W=()=>`<div style="color: ${U.color};fontSize: ${U.fontSize};">${U.content}</div>`;return()=>vue.createVNode(elementPlus.ElTooltip,{content:W(),rawContent:!0,placement:U.placement},{default:()=>[vue.createVNode("span",{class:H},[getSlot(G)||vue.createVNode(warning_default,null,null)])]})}}),_sfc_main$5=vue.defineComponent({name:"PandoraBasicFormItem",inheritAttrs:!1,props:{schema:{type:Object,default:()=>({})},formModel:{type:Object,default:()=>({})},formProps:{type:Object,default:()=>({})},setFormModel:{type:Function,default:null},allDefaultValues:{type:Object,default:()=>({})},tableAction:{type:Object},formActionType:{type:Object}},setup(U,{slots:G}){const{schema:H}=vue.toRefs(U),W=vue.computed(()=>{const{schema:ae,tableAction:ne,formModel:ie,formActionType:oe}=U,{componentProps:se={}}=ae;return isFunction$2(se)?se({schema:ae,tableAction:ne,formModel:ie,formActionType:oe})??{}:se}),Z=vue.computed(()=>{const{allDefaultValues:ae,formModel:ne,schema:ie}=U,{mergeDynamicData:oe}=U.formProps;return{field:ie.field,model:ne,values:{...oe,...ae,...ne},schema:ie}}),X=vue.computed(()=>{const{disabled:ae}=U.formProps,{dynamicDisabled:ne}=U.schema,{disabled:ie=!1}=vue.unref(W);let oe=!!ae||ie;return isBoolean(ne)&&(oe=ne),isFunction$2(ne)&&(oe=ne(vue.unref(Z))),oe});function K(){const{show:ae,ifShow:ne}=U.schema,{showAdvancedButton:ie}=U.formProps,oe=ie&&isBoolean(U.schema.isAdvanced)?U.schema.isAdvanced:!0;let se=!0,le=!0;return isBoolean(ae)&&(se=ae),isBoolean(ne)&&(le=ne),isFunction$2(ae)&&(se=ae(vue.unref(Z))),isFunction$2(ne)&&(le=ne(vue.unref(Z))),se=se&&oe,{isShow:se,isIfShow:le}}const Q=ae=>{const{schema:ne,tableAction:ie,formModel:oe,formActionType:se}=U;let{componentProps:le={}}=vue.unref(ne)||{};isFunction$2(le)&&(le=le({schema:ne,tableAction:ie,formModel:oe,formActionType:se})??{});const ue=le&&le.options||[];if(Array.isArray(ue)){if(ae==="CheckboxGroup"){const ce=componentMap.get("Checkbox");return ue.map(({label:fe,value:he})=>vue.h(ce,{label:he,key:he},()=>fe))}if(ae==="Select"){const ce=componentMap.get("SelectOption");return ue.map(({label:fe,value:he})=>vue.h(ce,{label:fe,value:he,key:he},()=>fe))}if(ae==="RadioGroup"){const ce=componentMap.get("Radio");return ue.map(({label:fe,value:he})=>vue.h(ce,{label:he,key:he},()=>fe))}}},ee=()=>{const{renderComponentContent:ae,component:ne,field:ie,changeEvent:oe="change",valueField:se}=U.schema,le=ne&&["Switch","Checkbox"].includes(ne),ue=`on${upperFirst(oe)}`,ce={[ue]:(...me)=>{const[ye]=me;he[ue]&&he[ue](...me);const _e=ye?ye.target:null,xe=_e?le?_e.checked:_e.value:ye;U.setFormModel(ie,xe)}},fe=componentMap.get(ne),he={getPopupContainer:me=>me.parentNode,...vue.unref(W),disabled:vue.unref(X)},{autoSetPlaceHolder:ve}=U.formProps;!he.disabled&&ve&&ne&&(he.placeholder=vue.unref(W)?.placeholder||createPlaceholderMessage(ne)),he.placeholder=vue.unref(W)?.placeholder,he.codeField=ie,he.formValues=vue.unref(Z);const pe={[se||(le?"checked":"value")]:U.formModel[ie]},ge={...he,...ce,...pe};if(!fe)return null;if(!ae){const me=Q(ne);return vue.h(fe,ge,()=>me)}if(isFunction$2(ae)){const me=ae(vue.unref(Z))||{};return me&&typeof me=="object"?vue.h(fe,ge,me):vue.h(fe,ge,{default:()=>me})}return vue.h(fe,ge,{default:()=>ae})},te=()=>{const{label:ae,helpMessage:ne,helpComponentProps:ie,subLabel:oe}=U.schema,se=oe?vue.h("span",null,[ae," ",vue.h("span",{class:"text-secondary"},oe)]):vue.h("span",null,ae),le=isFunction$2(ne)?ne(vue.unref(Z)):ne;return le!==void 0||Array.isArray(le)&&le.length>0?vue.h("span",null,[se,vue.h(_sfc_main$6,{placement:"top",content:le,...ie||{}})]):vue.h("span",null,[se])},re=()=>{const{label:ae,slot:ne,rules:ie,render:oe,field:se,suffix:le,itemProps:ue,component:ce}=U.schema;if(ce==="Divider"){const fe=deepMerge({contentPosition:"left"},{...vue.unref(W)});return vue.h(elementPlus.ElCol,{span:24},()=>vue.h(elementPlus.ElDivider,fe,()=>te()))}else{const fe=vue.unref(Z),he=()=>ne?getSlot(G,ne,fe):oe?oe(fe):ee(),ve=!!le,de=isFunction$2(le)?le(vue.unref(Z)):le,pe={default:()=>vue.h("div",{style:"display:flex;width:100%;"},[vue.h("div",{style:"flex:1;"},[he()]),ve?vue.h("span",{class:"suffix"},String(de)):null]),label:()=>te()};return vue.h(elementPlus.ElFormItem,{prop:se,label:ae,rules:ie,...ue||{}},pe)}};return vue.onMounted(()=>{const{field:ae,defaultValue:ne=""}=vue.unref(H)||{};ae&&U.setFormModel(ae,ne)}),()=>{const{colProps:ae={},colSlot:ne,renderColContent:ie,component:oe}=U.schema;if(!componentMap.has(oe))return console.error(`FormItem component:${oe} is an unregistered component Key`),null;const{baseColProps:se={}}=U.formProps,le={...se,...ae},{isShow:ue}=K(),ce=vue.unref(Z),fe=()=>ne?getSlot(G,ne,ce):ie?ie(ce):re();return vue.withDirectives(vue.h(elementPlus.ElCol,{...le},()=>fe()),[[vue.vShow,ue]])}}});var screenEnum=(U=>(U[U.XS=480]="XS",U[U.SM=576]="SM",U[U.MD=768]="MD",U[U.LG=992]="LG",U[U.XL=1200]="XL",U[U.XXL=1600]="XXL",U))(screenEnum||{});const screenMap=new Map;screenMap.set("XS",480),screenMap.set("SM",576),screenMap.set("MD",768),screenMap.set("LG",992),screenMap.set("XL",1200),screenMap.set("XXL",1600);let globalScreenRef,globalWidthRef,globalRealWidthRef;function useBreakpoint(){return{screenRef:vue.computed(()=>vue.unref(globalScreenRef)),widthRef:globalWidthRef,screenEnum,realWidthRef:globalRealWidthRef}}const BASIC_COL_LEN=24;function useAdvanced({advanceState:U,emit:G,getProps:H,getSchema:W,formModel:Z,defaultValueRef:X}){const K=vue.getCurrentInstance(),{realWidthRef:Q,screenEnum:ee,screenRef:te}=useBreakpoint(),re=vue.computed(()=>{if(!U.isAdvanced)return 0;const se=vue.unref(H).emptySpan||0;if(isNumber$1(se))return se;if(isObject$6(se)){const{span:le=0}=se,ue=vue.unref(te);return se[ue.toLowerCase()]||le||0}return 0}),ae=useDebounceFn(ie,30);vue.watch([()=>vue.unref(W),()=>U.isAdvanced,()=>vue.unref(Q)],()=>{const{showAdvancedButton:se}=vue.unref(H);se&&ae()},{immediate:!0});function ne(se,le=0,ue=!1){const ce=vue.unref(Q),fe=parseInt(se.md)||parseInt(se.xs)||parseInt(se.sm)||se.span||BASIC_COL_LEN,he=parseInt(se.lg)||fe,ve=parseInt(se.xl)||he,de=parseInt(se.xxl)||ve;if(ce<=ee.MD?le+=fe:ce<ee.LG?le+=he:ce<ee.XL?le+=ve:le+=de,ue){U.hideAdvanceBtn=!1;const pe=vue.unref(H).alwaysShowLines||1;return le<=BASIC_COL_LEN*pe?(U.hideAdvanceBtn=!0,U.isAdvanced=!0):le>BASIC_COL_LEN*pe&&le<=BASIC_COL_LEN*(vue.unref(H).autoAdvancedLine||3)?U.hideAdvanceBtn=!1:U.isLoad||(U.isLoad=!0,U.isAdvanced=!U.isAdvanced),{isAdvanced:U.isAdvanced,itemColSum:le}}return le>BASIC_COL_LEN*(vue.unref(H).alwaysShowLines||1)?{isAdvanced:U.isAdvanced,itemColSum:le}:{isAdvanced:!0,itemColSum:le}}function ie(){let se=0,le=0;const{baseColProps:ue={}}=vue.unref(H);for(const ce of vue.unref(W)){const{show:fe,colProps:he}=ce;let ve=!0;if(isBoolean(fe)&&(ve=fe),isFunction$2(fe)&&(ve=fe({schema:ce,model:Z,field:ce.field,values:{...vue.unref(X),...Z}})),ve&&(he||ue)){const{itemColSum:de,isAdvanced:pe}=ne({...ue,...he},se);se=de||0,pe&&(le=se),ce.isAdvanced=pe}}K?.proxy?.$forceUpdate(),U.actionSpan=le%BASIC_COL_LEN+vue.unref(re),ne(vue.unref(H).actionColOptions||{span:BASIC_COL_LEN},se,!0),G("advanced-change")}function oe(){U.isAdvanced=!U.isAdvanced}return{handleToggleAdvanced:oe}}async function useAutoFocus({getSchema:U,getProps:G,formElRef:H,isInitedDefault:W}){vue.watchEffect(async()=>{if(vue.unref(W)||!vue.unref(G).autoFocusFirstItem)return;await vue.nextTick();const Z=vue.unref(U),X=vue.unref(H),K=X?.$el;if(!X||!K||!Z||Z.length===0||!Z[0].component.includes("Input"))return;const ee=K.querySelector(".ant-row:first-child input");ee&&ee?.focus()})}function useFormEvents({emit,getProps,formModel,getSchema,defaultValueRef,formElRef,schemaRef,handleFormValues}){async function resetFields(){const{resetFunc:U,submitOnReset:G}=vue.unref(getProps);U&&isFunction$2(U)&&await U(),vue.unref(formElRef)&&(Object.keys(formModel).forEach(W=>{const Z=vue.unref(getSchema).find(Q=>Q.field===W),X=Z?.component&&defaultValueComponents.includes(Z.component),K=cloneDeep(defaultValueRef.value[W]);formModel[W]=X?K||"":K}),vue.nextTick(()=>clearValidate()),emit("reset",vue.toRaw(formModel)),G&&handleSubmit())}async function setFieldsValue(values){const fields=vue.unref(getSchema).map(U=>U.field).filter(Boolean),delimiter=".",nestKeyArray=fields.filter(U=>U.indexOf(delimiter)>=0),validKeys=[];Object.keys(values).forEach(key=>{const schema=vue.unref(getSchema).find(U=>U.field===key);let value=values[key];const hasKey=Reflect.has(values,key);if(value=handleInputNumberValue(schema?.component,value),hasKey&&fields.includes(key)){if(itemIsDateType(key))if(Array.isArray(value)){const U=[];for(const G of value)U.push(G?dateUtil(G):null);formModel[key]=U}else{const{componentProps:U}=schema||{};let G=U;typeof U=="function"&&(G=G({formModel})),formModel[key]=value?G?.valueFormat?value:dateUtil(value):null}else formModel[key]=value;validKeys.push(key)}else nestKeyArray.forEach(nestKey=>{try{const value=eval("values"+delimiter+nestKey);isDef$1(value)&&(formModel[nestKey]=value,validKeys.push(nestKey))}catch(U){isDef$1(defaultValueRef.value[nestKey])&&(formModel[nestKey]=cloneDeep(defaultValueRef.value[nestKey]))}})}),validateFields(validKeys).catch(U=>{})}async function removeSchemaByFiled(U){const G=cloneDeep(vue.unref(getSchema));if(!U)return;let H=isString$1(U)?[U]:U;isString$1(U)&&(H=[U]);for(const W of H)_removeSchemaByFiled(W,G);schemaRef.value=G}function _removeSchemaByFiled(U,G){if(isString$1(U)){const H=G.findIndex(W=>W.field===U);H!==-1&&(delete formModel[U],G.splice(H,1))}}async function appendSchemaByField(U,G,H=!1){const W=cloneDeep(vue.unref(getSchema)),Z=W.findIndex(X=>X.field===G);if(!G||Z===-1||H){H?W.unshift(U):W.push(U),schemaRef.value=W,_setDefaultValue(U);return}Z!==-1&&W.splice(Z+1,0,U),_setDefaultValue(U),schemaRef.value=W}async function resetSchema(U){let G=[];if(isObject$6(U)&&G.push(U),isArray$3(U)&&(G=[...U]),!G.every(W=>W.component==="Divider"||Reflect.has(W,"field")&&W.field)){error$1("All children of the form Schema array that need to be updated must contain the `field` field");return}schemaRef.value=G}async function updateSchema(U){let G=[];if(isObject$6(U)&&G.push(U),isArray$3(U)&&(G=[...U]),!G.every(Z=>Z.component==="Divider"||Reflect.has(Z,"field")&&Z.field)){error$1("All children of the form Schema array that need to be updated must contain the `field` field");return}const W=[];G.forEach(Z=>{vue.unref(getSchema).forEach(X=>{if(X.field===Z.field){const K=deepMerge(X,Z);W.push(K)}else W.push(X)})}),_setDefaultValue(W),schemaRef.value=uniqBy(W,"field")}function _setDefaultValue(U){let G=[];isObject$6(U)&&G.push(U),isArray$3(U)&&(G=[...U]);const H={},W=getFieldsValue();G.forEach(Z=>{Z.component!="Divider"&&Reflect.has(Z,"field")&&Z.field&&!isNullOrUnDef(Z.defaultValue)&&!(Z.field in W)&&(H[Z.field]=Z.defaultValue)}),setFieldsValue(H)}function getFieldsValue(){return vue.unref(formElRef)?handleFormValues(vue.toRaw(vue.unref(formModel))):{}}function itemIsDateType(U){return vue.unref(getSchema).some(G=>G.field===U?dateItemType.includes(G.component):!1)}async function validateFields(U,G){return vue.unref(formElRef)?.validateFields(U,G)}async function validate(U){return await vue.unref(formElRef)?.validate(U)}async function clearValidate(U){await vue.unref(formElRef)?.clearValidate(U)}async function scrollToField(U,G){await vue.unref(formElRef)?.scrollToField(U,G)}async function handleSubmit(U){U&&U.preventDefault();const{submitFunc:G}=vue.unref(getProps);if(G&&isFunction$2(G)){await G();return}vue.unref(formElRef)&&await validate(function(W,Z){if(W){console.log("submit!");const X=handleFormValues(vue.toRaw(vue.unref(formModel)));emit("submit",X)}else console.error("error submit!",Z)})}return{handleSubmit,clearValidate,validate,validateFields,getFieldsValue,updateSchema,resetSchema,appendSchemaByField,removeSchemaByFiled,resetFields,setFieldsValue,scrollToField}}function tryDeconstructArray(U,G,H){const W=/^\[(.+)\]$/;if(W.test(U)){const Z=U.match(W);if(Z&&Z[1]){const X=Z[1].split(",");return G=Array.isArray(G)?G:[G],X.forEach((K,Q)=>{set$2(H,K.trim(),G[Q])}),!0}}}function tryDeconstructObject(U,G,H){const W=/^\{(.+)\}$/;if(W.test(U)){const Z=U.match(W);if(Z&&Z[1]){const X=Z[1].split(",");return G=isObject$6(G)?G:{},X.forEach(K=>{set$2(H,K.trim(),G[K.trim()])}),!0}}}function useFormValues({defaultValueRef:U,getSchema:G,getProps:H,formModel:W}){function Z(Q){if(!isObject$6(Q))return{};const ee={};for(const te of Object.entries(Q)){let[,re]=te;const[ae]=te;if(!ae||isArray$3(re)&&re.length===0||isFunction$2(re))continue;const ne=vue.unref(H).transformDateFunc;isObject$6(re)&&(re=ne?.(re)),isArray$3(re)&&re[0]?.format&&re[1]?.format&&(re=re.map(ie=>ne?.(ie))),isString$1(re)&&(re=re.trim()),!tryDeconstructArray(ae,re,ee)&&!tryDeconstructObject(ae,re,ee)&&set$2(ee,ae,re)}return X(ee)}function X(Q){const ee=vue.unref(H).fieldMapToTime;if(!ee||!Array.isArray(ee))return Q;for(const[te,[re,ae],ne="YYYY-MM-DD"]of ee){if(!te||!re||!ae||!Q[te])continue;const[ie,oe]=Q[te];Q[re]=dateUtil(ie).format(ne),Q[ae]=dateUtil(oe).format(ne),Reflect.deleteProperty(Q,te)}return Q}function K(){const Q=vue.unref(G),ee={};Q.forEach(te=>{const{defaultValue:re}=te;isNullOrUnDef(re)||(ee[te.field]=re,W[te.field]=re,W[te.field]===void 0&&(W[te.field]=re))}),U.value=cloneDeep(ee)}return{handleFormValues:Z,initDefault:K}}const FormBasicProps={model:{type:Object,default:{}},labelWidth:{type:[Number,String],default:0},fieldMapToTime:{type:Array,default:()=>[]},schemas:{type:[Array],default:()=>[]},mergeDynamicData:{type:Object,default:null},baseRowStyle:{type:Object},baseColProps:{type:Object},autoSetPlaceHolder:propTypes.bool.def(!0),autoSubmitOnEnter:propTypes.bool.def(!1),submitOnReset:propTypes.bool,submitOnChange:propTypes.bool,size:propTypes.oneOf(["large","default","small"]).def("default"),disabled:propTypes.bool,emptySpan:{type:[Number,Object],default:0},showAdvancedButton:propTypes.bool.def(!1),transformDateFunc:{type:Function,default:U=>U?.format?.("YYYY-MM-DD HH:mm:ss")??U},rulesMessageJoinLabel:propTypes.bool.def(!0),autoAdvancedLine:propTypes.number.def(3),alwaysShowLines:propTypes.number.def(1),showActionButtonGroup:propTypes.bool.def(!0),actionColOptions:Object,showResetButton:propTypes.bool.def(!0),autoFocusFirstItem:propTypes.bool,resetButtonOptions:Object,showSubmitButton:propTypes.bool.def(!0),submitButtonOptions:Object,resetFunc:Function,submitFunc:Function,hideRequiredMark:propTypes.bool,labelAlign:propTypes.string,rowProps:Object,rules:Object},[name]=createNamespace("Form"),_sfc_main$4=vue.defineComponent({name,inheritAttrs:!1,props:FormBasicProps,components:{ElForm:elementPlus.ElForm,ElRow:elementPlus.ElRow,FormItem:_sfc_main$5,FormAction},emits:["advanced-change","reset","submit","register","field-value-change"],setup(U,{emit:G,attrs:H}){const W=vue.inject("isInPageLayout",!1),Z=vue.reactive({}),X=vue.ref({}),K=vue.ref({}),Q=vue.ref(null),ee=vue.ref(null),te=vue.ref(!1),re=vue.reactive({isAdvanced:!0,hideAdvanceBtn:!1,isLoad:!1,actionSpan:6}),ae=vue.computed(()=>{const Ee={...U,...vue.unref(X)};return W&&(Ee.alwaysShowLines===1&&(Ee.alwaysShowLines=.75),Ee.autoAdvancedLine===3&&(Ee.autoAdvancedLine=1),Ee.showAdvancedButton===!1&&(Ee.showAdvancedButton=!0)),Ee}),ne=vue.computed(()=>{const{baseRowStyle:Ee={},rowProps:Me}=vue.unref(ae);return{style:Ee,...Me}}),ie=vue.computed(()=>{const{rules:Ee={}}=vue.unref(ae);return Ee}),oe=vue.computed(()=>({...H,...U,...vue.unref(ae)})),se=vue.computed(()=>{const Ee=vue.unref(Q)||vue.unref(ae).schemas;for(const Me of Ee){const{defaultValue:De,component:Le}=Me;if(De&&dateItemType.includes(Le))if(!Array.isArray(De))Me.defaultValue=dateUtil(De);else{const Pe=[];De.forEach(Ie=>{Pe.push(dateUtil(Ie))}),Me.defaultValue=Pe}}return vue.unref(ae).showAdvancedButton?cloneDeep(Ee.filter(Me=>Me.component!=="Divider")):cloneDeep(Ee)}),{initDefault:le,handleFormValues:ue}=useFormValues({getProps:ae,defaultValueRef:K,getSchema:se,formModel:Z}),{handleSubmit:ce,setFieldsValue:fe,clearValidate:he,validate:ve,validateFields:de,getFieldsValue:pe,updateSchema:ge,resetSchema:me,appendSchemaByField:ye,removeSchemaByFiled:_e,resetFields:xe,scrollToField:Se}=useFormEvents({emit:G,getProps:ae,formModel:Z,getSchema:se,defaultValueRef:K,formElRef:ee,schemaRef:Q,handleFormValues:ue});createFormContext({resetAction:xe,submitAction:ce}),vue.watch(()=>vue.unref(ae).model,()=>{const{model:Ee}=vue.unref(ae);Ee&&fe(Ee)},{immediate:!0}),vue.watch(()=>vue.unref(ae).schemas,Ee=>{me(Ee??[])}),vue.watch(()=>se.value,Ee=>{vue.unref(te)||Ee?.length&&(le(),te.value=!0)}),vue.watch(()=>Z,useDebounceFn(()=>{vue.unref(ae).submitOnChange&&ce()},300),{deep:!0});async function Te(Ee){X.value=deepMerge(vue.unref(X)||{},Ee)}function be(Ee,Me){Z[Ee]=Me;const{validateTrigger:De}=vue.unref(oe);(!De||De==="change")&&de([Ee]).catch(()=>{}),G("field-value-change",Ee,Me)}function Ae(Ee){const{autoSubmitOnEnter:Me}=vue.unref(ae);if(Me&&Ee.key==="Enter"&&Ee.target&&Ee.target instanceof HTMLElement){const De=Ee.target;De&&De.tagName&&De.tagName.toUpperCase()=="INPUT"&&ce()}}const we={getFieldsValue:pe,setFieldsValue:fe,resetFields:xe,updateSchema:ge,resetSchema:me,setProps:Te,removeSchemaByFiled:_e,appendSchemaByField:ye,clearValidate:he,validateFields:de,validate:ve,submit:ce,scrollToField:Se};useAutoFocus({getSchema:se,getProps:ae,isInitedDefault:te,formElRef:ee}),vue.onMounted(()=>{le(),G("register",we)});const{handleToggleAdvanced:Ce}=useAdvanced({advanceState:re,emit:G,getProps:ae,getSchema:se,formModel:Z,defaultValueRef:K});return{getBindValue:oe,handleToggleAdvanced:Ce,handleEnterPress:Ae,formModel:Z,defaultValueRef:K,advanceState:re,getRow:ne,getProps:ae,getRules:ie,formRef:ee,getSchema:se,formActionType:we,setFormModel:be,getFormActionBindProps:vue.computed(()=>({...ae.value,...re})),...we}}});function _sfc_render$1(U,G,H,W,Z,X){const K=vue.resolveComponent("FormItem"),Q=vue.resolveComponent("FormAction"),ee=vue.resolveComponent("el-row"),te=vue.resolveComponent("el-Form");return vue.openBlock(),vue.createElementBlock("div",{class:vue.normalizeClass(["vpandora-form",{collapsed:!U.advanceState.isAdvanced}])},[vue.createVNode(te,vue.mergeProps(U.getBindValue,{rules:U.getRules,ref:"formRef",model:U.formModel,onKeypress:vue.withKeys(U.handleEnterPress,["enter"])}),{default:vue.withCtx(()=>[vue.createVNode(ee,vue.normalizeProps(vue.guardReactiveProps(U.getRow)),{default:vue.withCtx(()=>[vue.renderSlot(U.$slots,"formHeader"),(vue.openBlock(!0),vue.createElementBlock(vue.Fragment,null,vue.renderList(U.getSchema,re=>(vue.openBlock(),vue.createBlock(K,{key:re.field,formActionType:U.formActionType,schema:re,formProps:U.getProps,allDefaultValues:U.defaultValueRef,formModel:U.formModel,setFormModel:U.setFormModel},vue.createSlots({_:2},[vue.renderList(Object.keys(U.$slots),ae=>({name:ae,fn:vue.withCtx(ne=>[vue.renderSlot(U.$slots,ae,vue.mergeProps({ref_for:!0},ne||{}))])}))]),1032,["formActionType","schema","formProps","allDefaultValues","formModel","setFormModel"]))),128)),vue.createVNode(Q,vue.mergeProps(U.getFormActionBindProps,{onToggleAdvanced:U.handleToggleAdvanced}),vue.createSlots({_:2},[vue.renderList(["resetBefore","submitBefore","advanceBefore","advanceAfter"],re=>({name:re,fn:vue.withCtx(ae=>[vue.renderSlot(U.$slots,re,vue.normalizeProps(vue.guardReactiveProps(ae||{})))])}))]),1040,["onToggleAdvanced"]),vue.renderSlot(U.$slots,"formFooter")]),_:3},16)]),_:3},16,["rules","model","onKeypress"])],2)}const Form=_export_sfc(_sfc_main$4,[["render",_sfc_render$1]]);function useComponentRegister(U,G){add$1(U,G),tryOnUnmounted(()=>{del(U)})}function useForm(U){const G=vue.ref(null),H=vue.ref(!1);async function W(){const K=vue.unref(G);return K||error$1("The form instance has not been obtained, please make sure that the form has been rendered when performing the form operation!"),await vue.nextTick(),K}return[K=>{vue.onUnmounted(()=>{G.value=null,H.value=null}),!(vue.unref(H)&&isProdMode()&&K===vue.unref(G))&&(G.value=K,H.value=!0,vue.watch(()=>U,()=>{U&&K.setProps(getDynamicProps(U))},{immediate:!0,deep:!0}))},{setProps:async K=>{(await W()).setProps(K)},updateSchema:async K=>{(await W()).updateSchema(K)},resetSchema:async K=>{(await W()).resetSchema(K)},clearValidate:async K=>{(await W()).clearValidate(K)},resetFields:async()=>{W().then(async K=>{await K.resetFields()})},removeSchemaByFiled:async K=>{vue.unref(G)?.removeSchemaByFiled(K)},getFieldsValue:()=>vue.unref(G)?.getFieldsValue(),setFieldsValue:async K=>{(await W()).setFieldsValue(K)},appendSchemaByField:async(K,Q,ee)=>{(await W())?.appendSchemaByField(K,Q,ee)},submit:async()=>(await W()).submit(),validate:async K=>(await W()).validate(K),validateFields:async(K,Q)=>(await W()).validateFields(K,Q),scrollToField:async(K,Q)=>(await W()).scrollToField(K,Q)}]}const PdForm=withInstall(Form,{FormItem:_sfc_main$5}),PdFormItem=withNoopInstall(_sfc_main$5),Components=[PdTable,PdForm],_sfc_main$3={name:"LoadCom",components:{},props:{}},_hoisted_1$2={class:"next-loading"};function _sfc_render(U,G,H,W,Z,X){return vue.openBlock(),vue.createElementBlock("div",_hoisted_1$2,[...G[0]||(G[0]=[vue.createStaticVNode('<div class="next-loading-masker"></div><div class="next-loading-tip"><span class="next-loading-fusion-reactor"><span class="next-loading-dot"></span><span class="next-loading-dot"></span><span class="next-loading-dot"></span><span class="next-loading-dot"></span></span></div>',2)])])}const LoadCom=_export_sfc(_sfc_main$3,[["render",_sfc_render]]),_hoisted_1$1={class:"pandora-form-content"},_sfc_main$2=vue.defineComponent({name:"PdPageLayout",__name:"index",props:{height:{type:[Number,String],default:"calc(100vh - 124px)"},baseTableHeight:{type:Number,default:400},tableLoading:{type:Boolean,default:!1},style:{type:[String,Object],default:()=>({})}},setup(U){vue.provide("isInPageLayout",!0);const G=U,H=vue.ref(null),W=vue.ref(G.baseTableHeight);let Z=null;const X=()=>{if(H.value){const ee=H.value.offsetHeight,ae=window.innerHeight-ee-144;W.value=Math.max(ae,200)}},K=()=>{X()},Q=()=>{K()};return vue.onMounted(()=>{K(),H.value&&(Z=new ResizeObserver(()=>{K()}),Z.observe(H.value)),window.addEventListener("resize",Q)}),vue.onBeforeUnmount(()=>{window.removeEventListener("resize",Q),Z&&(Z.disconnect(),Z=null)}),(ee,te)=>(vue.openBlock(),vue.createElementBlock("div",{class:"pandora-page-layout",style:vue.normalizeStyle([{height:typeof U.height=="number"?U.height+"px":U.height},U.style])},[U.tableLoading?(vue.openBlock(),vue.createBlock(LoadCom,{key:0})):vue.createCommentVNode("",!0),vue.createElementVNode("div",{class:"pandora-form-section",ref_key:"formSectionRef",ref:H},[vue.createElementVNode("div",_hoisted_1$1,[vue.renderSlot(ee.$slots,"form",{},void 0,!0)])],512),vue.createElementVNode("div",{class:"pandora-table-section",style:vue.normalizeStyle({height:`${W.value}px`})},[vue.renderSlot(ee.$slots,"table",{height:W.value},void 0,!0)],4)],4))}}),index=_export_sfc(_sfc_main$2,[["__scopeId","data-v-e8e3119d"]]),_hoisted_1={class:"pandora-sidebar-inner"},_hoisted_2={key:0,class:"pandora-sidebar-header"},_hoisted_3={class:"pandora-sidebar-content"},_sfc_main$1=vue.defineComponent({name:"PdPageTreeLayout",__name:"tree",props:{showLeftArrow:{type:Boolean,default:!0},sidebarWidth:{type:Number,default:240},sidebarCollapsedWidth:{type:Number,default:0},initialCollapsed:{type:Boolean,default:!1},height:{type:[Number,String],default:"calc(100vh - 124px)"},baseTableHeight:{type:Number,default:400},tableLoading:{type:Boolean,default:!1},pageLayoutStyle:{type:[String,Object],default:()=>({})}},emits:["sidebar-toggle"],setup(U,{emit:G}){const H=U,W=G,Z=vue.ref(H.initialCollapsed),X=vue.computed(()=>Z.value?H.sidebarCollapsedWidth:H.sidebarWidth),K=()=>{Z.value=!Z.value,W("sidebar-toggle",Z.value)};return(Q,ee)=>(vue.openBlock(),vue.createElementBlock("div",{class:"pandora-page-tree-layout",style:vue.normalizeStyle({height:typeof U.height=="number"?U.height+"px":U.height})},[vue.createElementVNode("div",{class:vue.normalizeClass(["pandora-sidebar",{collapsed:Z.value}]),style:vue.normalizeStyle({width:X.value+"px"})},[vue.createElementVNode("div",_hoisted_1,[Q.$slots["sidebar-header"]?(vue.openBlock(),vue.createElementBlock("div",_hoisted_2,[vue.renderSlot(Q.$slots,"sidebar-header",{},void 0,!0)])):vue.createCommentVNode("",!0),vue.createElementVNode("div",_hoisted_3,[vue.renderSlot(Q.$slots,"sidebar",{},void 0,!0)])]),U.showLeftArrow?(vue.openBlock(),vue.createElementBlock("div",{key:0,class:"pandora-sidebar-handle",onClick:K},[vue.createVNode(vue.unref(elementPlus.ElIcon),{size:16,color:"#3a3a3a"},{default:vue.withCtx(()=>[Z.value?(vue.openBlock(),vue.createBlock(vue.unref(arrow_right_default),{key:0})):(vue.openBlock(),vue.createBlock(vue.unref(arrow_left_default),{key:1}))]),_:1})])):vue.createCommentVNode("",!0)],6),vue.createElementVNode("div",{class:"pandora-content",style:vue.normalizeStyle({width:`calc(100% - ${X.value}px)`})},[vue.createVNode(index,{height:"100%",baseTableHeight:U.baseTableHeight,tableLoading:U.tableLoading,style:vue.normalizeStyle(U.pageLayoutStyle)},{form:vue.withCtx(()=>[vue.renderSlot(Q.$slots,"form",{},void 0,!0)]),table:vue.withCtx(({height:te})=>[vue.renderSlot(Q.$slots,"table",{height:te},void 0,!0)]),_:3},8,["baseTableHeight","tableLoading","style"])],4)],4))}}),tree=_export_sfc(_sfc_main$1,[["__scopeId","data-v-1cfd0561"]]),PdPageLayout=withInstall(index),PdPageTreeLayout=withInstall(tree),Plugins=[PdPageLayout],installer=makeInstaller([...Components,...Plugins]);var extendStatics=function(U,G){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(H,W){H.__proto__=W}||function(H,W){for(var Z in W)Object.prototype.hasOwnProperty.call(W,Z)&&(H[Z]=W[Z])},extendStatics(U,G)};function __extends(U,G){if(typeof G!="function"&&G!==null)throw new TypeError("Class extends value "+String(G)+" is not a constructor or null");extendStatics(U,G);function H(){this.constructor=U}U.prototype=G===null?Object.create(G):(H.prototype=G.prototype,new H)}var Browser=(function(){function U(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return U})(),Env=(function(){function U(){this.browser=new Browser,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return U})(),env=new Env;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(env.wxa=!0,env.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?env.worker=!0:!env.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(env.node=!0,env.svgSupported=!0):detect(navigator.userAgent,env);function detect(U,G){var H=G.browser,W=U.match(/Firefox\/([\d.]+)/),Z=U.match(/MSIE\s([\d.]+)/)||U.match(/Trident\/.+?rv:(([\d.]+))/),X=U.match(/Edge?\/([\d.]+)/),K=/micromessenger/i.test(U);W&&(H.firefox=!0,H.version=W[1]),Z&&(H.ie=!0,H.version=Z[1]),X&&(H.edge=!0,H.version=X[1],H.newEdge=+X[1].split(".")[0]>18),K&&(H.weChat=!0),G.svgSupported=typeof SVGRect<"u",G.touchEventsSupported="ontouchstart"in window&&!H.ie&&!H.edge,G.pointerEventsSupported="onpointerdown"in window&&(H.edge||H.ie&&+H.version>=11);var Q=G.domSupported=typeof document<"u";if(Q){var ee=document.documentElement.style;G.transform3dSupported=(H.ie&&"transition"in ee||H.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in ee)&&!("OTransition"in ee),G.transformSupported=G.transform3dSupported||H.ie&&+H.version>=9}}var DEFAULT_FONT_SIZE=12,DEFAULT_FONT_FAMILY="sans-serif",DEFAULT_FONT=DEFAULT_FONT_SIZE+"px "+DEFAULT_FONT_FAMILY,OFFSET=20,SCALE=100,defaultWidthMapStr="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function getTextWidthMap(U){var G={};if(typeof JSON>"u")return G;for(var H=0;H<U.length;H++){var W=String.fromCharCode(H+32),Z=(U.charCodeAt(H)-OFFSET)/SCALE;G[W]=Z}return G}var DEFAULT_TEXT_WIDTH_MAP=getTextWidthMap(defaultWidthMapStr),platformApi={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var U,G;return function(H,W){if(!U){var Z=platformApi.createCanvas();U=Z&&Z.getContext("2d")}if(U)return G!==W&&(G=U.font=W||DEFAULT_FONT),U.measureText(H);H=H||"",W=W||DEFAULT_FONT;var X=/((?:\d+)?\.?\d*)px/.exec(W),K=X&&+X[1]||DEFAULT_FONT_SIZE,Q=0;if(W.indexOf("mono")>=0)Q=K*H.length;else for(var ee=0;ee<H.length;ee++){var te=DEFAULT_TEXT_WIDTH_MAP[H[ee]];Q+=te==null?K:te*K}return{width:Q}}})(),loadImage:function(U,G,H){var W=new Image;return W.onload=G,W.onerror=H,W.src=U,W}},BUILTIN_OBJECT=reduce(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(U,G){return U["[object "+G+"]"]=!0,U},{}),TYPED_ARRAY=reduce(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(U,G){return U["[object "+G+"Array]"]=!0,U},{}),objToString=Object.prototype.toString,arrayProto=Array.prototype,nativeForEach=arrayProto.forEach,nativeFilter=arrayProto.filter,nativeSlice=arrayProto.slice,nativeMap=arrayProto.map,ctorFunction=(function(){}).constructor,protoFunction=ctorFunction?ctorFunction.prototype:null,protoKey="__proto__",idStart=2311;function guid(){return idStart++}function logError(){for(var U=[],G=0;G<arguments.length;G++)U[G]=arguments[G];typeof console<"u"&&console.error.apply(console,U)}function clone$4(U){if(U==null||typeof U!="object")return U;var G=U,H=objToString.call(U);if(H==="[object Array]"){if(!isPrimitive(U)){G=[];for(var W=0,Z=U.length;W<Z;W++)G[W]=clone$4(U[W])}}else if(TYPED_ARRAY[H]){if(!isPrimitive(U)){var X=U.constructor;if(X.from)G=X.from(U);else{G=new X(U.length);for(var W=0,Z=U.length;W<Z;W++)G[W]=U[W]}}}else if(!BUILTIN_OBJECT[H]&&!isPrimitive(U)&&!isDom(U)){G={};for(var K in U)U.hasOwnProperty(K)&&K!==protoKey&&(G[K]=clone$4(U[K]))}return G}function merge(U,G,H){if(!isObject$3(G)||!isObject$3(U))return H?clone$4(G):U;for(var W in G)if(G.hasOwnProperty(W)&&W!==protoKey){var Z=U[W],X=G[W];isObject$3(X)&&isObject$3(Z)&&!isArray$1(X)&&!isArray$1(Z)&&!isDom(X)&&!isDom(Z)&&!isBuiltInObject(X)&&!isBuiltInObject(Z)&&!isPrimitive(X)&&!isPrimitive(Z)?merge(Z,X,H):(H||!(W in U))&&(U[W]=clone$4(G[W]))}return U}function mergeAll(U,G){for(var H=U[0],W=1,Z=U.length;W<Z;W++)H=merge(H,U[W],G);return H}function extend(U,G){if(Object.assign)Object.assign(U,G);else for(var H in G)G.hasOwnProperty(H)&&H!==protoKey&&(U[H]=G[H]);return U}function defaults(U,G,H){for(var W=keys(G),Z=0,X=W.length;Z<X;Z++){var K=W[Z];(H?G[K]!=null:U[K]==null)&&(U[K]=G[K])}return U}function indexOf(U,G){if(U){if(U.indexOf)return U.indexOf(G);for(var H=0,W=U.length;H<W;H++)if(U[H]===G)return H}return-1}function inherits(U,G){var H=U.prototype;function W(){}W.prototype=G.prototype,U.prototype=new W;for(var Z in H)H.hasOwnProperty(Z)&&(U.prototype[Z]=H[Z]);U.prototype.constructor=U,U.superClass=G}function mixin(U,G,H){if(U="prototype"in U?U.prototype:U,G="prototype"in G?G.prototype:G,Object.getOwnPropertyNames)for(var W=Object.getOwnPropertyNames(G),Z=0;Z<W.length;Z++){var X=W[Z];X!=="constructor"&&(H?G[X]!=null:U[X]==null)&&(U[X]=G[X])}else defaults(U,G,H)}function isArrayLike(U){return!U||typeof U=="string"?!1:typeof U.length=="number"}function each$f(U,G,H){if(U&&G)if(U.forEach&&U.forEach===nativeForEach)U.forEach(G,H);else if(U.length===+U.length)for(var W=0,Z=U.length;W<Z;W++)G.call(H,U[W],W,U);else for(var X in U)U.hasOwnProperty(X)&&G.call(H,U[X],X,U)}function map$1(U,G,H){if(!U)return[];if(!G)return slice(U);if(U.map&&U.map===nativeMap)return U.map(G,H);for(var W=[],Z=0,X=U.length;Z<X;Z++)W.push(G.call(H,U[Z],Z,U));return W}function reduce(U,G,H,W){if(U&&G){for(var Z=0,X=U.length;Z<X;Z++)H=G.call(W,H,U[Z],Z,U);return H}}function filter(U,G,H){if(!U)return[];if(!G)return slice(U);if(U.filter&&U.filter===nativeFilter)return U.filter(G,H);for(var W=[],Z=0,X=U.length;Z<X;Z++)G.call(H,U[Z],Z,U)&&W.push(U[Z]);return W}function find(U,G,H){if(U&&G){for(var W=0,Z=U.length;W<Z;W++)if(G.call(H,U[W],W,U))return U[W]}}function keys(U){if(!U)return[];if(Object.keys)return Object.keys(U);var G=[];for(var H in U)U.hasOwnProperty(H)&&G.push(H);return G}function bindPolyfill(U,G){for(var H=[],W=2;W<arguments.length;W++)H[W-2]=arguments[W];return function(){return U.apply(G,H.concat(nativeSlice.call(arguments)))}}var bind$1=protoFunction&&isFunction(protoFunction.bind)?protoFunction.call.bind(protoFunction.bind):bindPolyfill;function curry$1(U){for(var G=[],H=1;H<arguments.length;H++)G[H-1]=arguments[H];return function(){return U.apply(this,G.concat(nativeSlice.call(arguments)))}}function isArray$1(U){return Array.isArray?Array.isArray(U):objToString.call(U)==="[object Array]"}function isFunction(U){return typeof U=="function"}function isString(U){return typeof U=="string"}function isStringSafe(U){return objToString.call(U)==="[object String]"}function isNumber(U){return typeof U=="number"}function isObject$3(U){var G=typeof U;return G==="function"||!!U&&G==="object"}function isBuiltInObject(U){return!!BUILTIN_OBJECT[objToString.call(U)]}function isTypedArray(U){return!!TYPED_ARRAY[objToString.call(U)]}function isDom(U){return typeof U=="object"&&typeof U.nodeType=="number"&&typeof U.ownerDocument=="object"}function isGradientObject(U){return U.colorStops!=null}function isImagePatternObject(U){return U.image!=null}function isRegExp(U){return objToString.call(U)==="[object RegExp]"}function eqNaN(U){return U!==U}function retrieve(){for(var U=[],G=0;G<arguments.length;G++)U[G]=arguments[G];for(var H=0,W=U.length;H<W;H++)if(U[H]!=null)return U[H]}function retrieve2(U,G){return U??G}function retrieve3(U,G,H){return U??G??H}function slice(U){for(var G=[],H=1;H<arguments.length;H++)G[H-1]=arguments[H];return nativeSlice.apply(U,G)}function normalizeCssArray$1(U){if(typeof U=="number")return[U,U,U,U];var G=U.length;return G===2?[U[0],U[1],U[0],U[1]]:G===3?[U[0],U[1],U[2],U[1]]:U}function assert(U,G){if(!U)throw new Error(G)}function trim$1(U){return U==null?null:typeof U.trim=="function"?U.trim():U.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var primitiveKey="__ec_primitive__";function setAsPrimitive(U){U[primitiveKey]=!0}function isPrimitive(U){return U[primitiveKey]}var MapPolyfill=(function(){function U(){this.data={}}return U.prototype.delete=function(G){var H=this.has(G);return H&&delete this.data[G],H},U.prototype.has=function(G){return this.data.hasOwnProperty(G)},U.prototype.get=function(G){return this.data[G]},U.prototype.set=function(G,H){return this.data[G]=H,this},U.prototype.keys=function(){return keys(this.data)},U.prototype.forEach=function(G){var H=this.data;for(var W in H)H.hasOwnProperty(W)&&G(H[W],W)},U})(),isNativeMapSupported=typeof Map=="function";function maybeNativeMap(){return isNativeMapSupported?new Map:new MapPolyfill}var HashMap=(function(){function U(G){var H=isArray$1(G);this.data=maybeNativeMap();var W=this;G instanceof U?G.each(Z):G&&each$f(G,Z);function Z(X,K){H?W.set(X,K):W.set(K,X)}}return U.prototype.hasKey=function(G){return this.data.has(G)},U.prototype.get=function(G){return this.data.get(G)},U.prototype.set=function(G,H){return this.data.set(G,H),H},U.prototype.each=function(G,H){this.data.forEach(function(W,Z){G.call(H,W,Z)})},U.prototype.keys=function(){var G=this.data.keys();return isNativeMapSupported?Array.from(G):G},U.prototype.removeKey=function(G){this.data.delete(G)},U})();function createHashMap(U){return new HashMap(U)}function concatArray(U,G){for(var H=new U.constructor(U.length+G.length),W=0;W<U.length;W++)H[W]=U[W];for(var Z=U.length,W=0;W<G.length;W++)H[W+Z]=G[W];return H}function createObject(U,G){var H;if(Object.create)H=Object.create(U);else{var W=function(){};W.prototype=U,H=new W}return G&&extend(H,G),H}function disableUserSelect(U){var G=U.style;G.webkitUserSelect="none",G.userSelect="none",G.webkitTapHighlightColor="rgba(0,0,0,0)",G["-webkit-touch-callout"]="none"}function hasOwn(U,G){return U.hasOwnProperty(G)}function noop(){}var RADIAN_TO_DEGREE=180/Math.PI;function create$2(U,G){return U==null&&(U=0),G==null&&(G=0),[U,G]}function copy$1(U,G){return U[0]=G[0],U[1]=G[1],U}function clone$3(U){return[U[0],U[1]]}function set$1(U,G,H){return U[0]=G,U[1]=H,U}function add(U,G,H){return U[0]=G[0]+H[0],U[1]=G[1]+H[1],U}function scaleAndAdd$1(U,G,H,W){return U[0]=G[0]+H[0]*W,U[1]=G[1]+H[1]*W,U}function sub(U,G,H){return U[0]=G[0]-H[0],U[1]=G[1]-H[1],U}function len(U){return Math.sqrt(lenSquare(U))}function lenSquare(U){return U[0]*U[0]+U[1]*U[1]}function scale$2(U,G,H){return U[0]=G[0]*H,U[1]=G[1]*H,U}function normalize$3(U,G){var H=len(G);return H===0?(U[0]=0,U[1]=0):(U[0]=G[0]/H,U[1]=G[1]/H),U}function distance(U,G){return Math.sqrt((U[0]-G[0])*(U[0]-G[0])+(U[1]-G[1])*(U[1]-G[1]))}var dist$1=distance;function distanceSquare(U,G){return(U[0]-G[0])*(U[0]-G[0])+(U[1]-G[1])*(U[1]-G[1])}var distSquare=distanceSquare;function lerp$1(U,G,H,W){return U[0]=G[0]+W*(H[0]-G[0]),U[1]=G[1]+W*(H[1]-G[1]),U}function applyTransform$1(U,G,H){var W=G[0],Z=G[1];return U[0]=H[0]*W+H[2]*Z+H[4],U[1]=H[1]*W+H[3]*Z+H[5],U}function min$1(U,G,H){return U[0]=Math.min(G[0],H[0]),U[1]=Math.min(G[1],H[1]),U}function max$1(U,G,H){return U[0]=Math.max(G[0],H[0]),U[1]=Math.max(G[1],H[1]),U}var Param=(function(){function U(G,H){this.target=G,this.topTarget=H&&H.topTarget}return U})(),Draggable=(function(){function U(G){this.handler=G,G.on("mousedown",this._dragStart,this),G.on("mousemove",this._drag,this),G.on("mouseup",this._dragEnd,this)}return U.prototype._dragStart=function(G){for(var H=G.target;H&&!H.draggable;)H=H.parent||H.__hostTarget;H&&(this._draggingTarget=H,H.dragging=!0,this._x=G.offsetX,this._y=G.offsetY,this.handler.dispatchToElement(new Param(H,G),"dragstart",G.event))},U.prototype._drag=function(G){var H=this._draggingTarget;if(H){var W=G.offsetX,Z=G.offsetY,X=W-this._x,K=Z-this._y;this._x=W,this._y=Z,H.drift(X,K,G),this.handler.dispatchToElement(new Param(H,G),"drag",G.event);var Q=this.handler.findHover(W,Z,H).target,ee=this._dropTarget;this._dropTarget=Q,H!==Q&&(ee&&Q!==ee&&this.handler.dispatchToElement(new Param(ee,G),"dragleave",G.event),Q&&Q!==ee&&this.handler.dispatchToElement(new Param(Q,G),"dragenter",G.event))}},U.prototype._dragEnd=function(G){var H=this._draggingTarget;H&&(H.dragging=!1),this.handler.dispatchToElement(new Param(H,G),"dragend",G.event),this._dropTarget&&this.handler.dispatchToElement(new Param(this._dropTarget,G),"drop",G.event),this._draggingTarget=null,this._dropTarget=null},U})(),Eventful=(function(){function U(G){G&&(this._$eventProcessor=G)}return U.prototype.on=function(G,H,W,Z){this._$handlers||(this._$handlers={});var X=this._$handlers;if(typeof H=="function"&&(Z=W,W=H,H=null),!W||!G)return this;var K=this._$eventProcessor;H!=null&&K&&K.normalizeQuery&&(H=K.normalizeQuery(H)),X[G]||(X[G]=[]);for(var Q=0;Q<X[G].length;Q++)if(X[G][Q].h===W)return this;var ee={h:W,query:H,ctx:Z||this,callAtLast:W.zrEventfulCallAtLast},te=X[G].length-1,re=X[G][te];return re&&re.callAtLast?X[G].splice(te,0,ee):X[G].push(ee),this},U.prototype.isSilent=function(G){var H=this._$handlers;return!H||!H[G]||!H[G].length},U.prototype.off=function(G,H){var W=this._$handlers;if(!W)return this;if(!G)return this._$handlers={},this;if(H){if(W[G]){for(var Z=[],X=0,K=W[G].length;X<K;X++)W[G][X].h!==H&&Z.push(W[G][X]);W[G]=Z}W[G]&&W[G].length===0&&delete W[G]}else delete W[G];return this},U.prototype.trigger=function(G){for(var H=[],W=1;W<arguments.length;W++)H[W-1]=arguments[W];if(!this._$handlers)return this;var Z=this._$handlers[G],X=this._$eventProcessor;if(Z)for(var K=H.length,Q=Z.length,ee=0;ee<Q;ee++){var te=Z[ee];if(!(X&&X.filter&&te.query!=null&&!X.filter(G,te.query)))switch(K){case 0:te.h.call(te.ctx);break;case 1:te.h.call(te.ctx,H[0]);break;case 2:te.h.call(te.ctx,H[0],H[1]);break;default:te.h.apply(te.ctx,H);break}}return X&&X.afterTrigger&&X.afterTrigger(G),this},U.prototype.triggerWithContext=function(G){for(var H=[],W=1;W<arguments.length;W++)H[W-1]=arguments[W];if(!this._$handlers)return this;var Z=this._$handlers[G],X=this._$eventProcessor;if(Z)for(var K=H.length,Q=H[K-1],ee=Z.length,te=0;te<ee;te++){var re=Z[te];if(!(X&&X.filter&&re.query!=null&&!X.filter(G,re.query)))switch(K){case 0:re.h.call(Q);break;case 1:re.h.call(Q,H[0]);break;case 2:re.h.call(Q,H[0],H[1]);break;default:re.h.apply(Q,H.slice(1,K-1));break}}return X&&X.afterTrigger&&X.afterTrigger(G),this},U})(),LN2=Math.log(2);function determinant(U,G,H,W,Z,X){var K=W+"-"+Z,Q=U.length;if(X.hasOwnProperty(K))return X[K];if(G===1){var ee=Math.round(Math.log((1<<Q)-1&~Z)/LN2);return U[H][ee]}for(var te=W|1<<H,re=H+1;W&1<<re;)re++;for(var ae=0,ne=0,ie=0;ne<Q;ne++){var oe=1<<ne;oe&Z||(ae+=(ie%2?-1:1)*U[H][ne]*determinant(U,G-1,re,te,Z|oe,X),ie++)}return X[K]=ae,ae}function buildTransformer(U,G){var H=[[U[0],U[1],1,0,0,0,-G[0]*U[0],-G[0]*U[1]],[0,0,0,U[0],U[1],1,-G[1]*U[0],-G[1]*U[1]],[U[2],U[3],1,0,0,0,-G[2]*U[2],-G[2]*U[3]],[0,0,0,U[2],U[3],1,-G[3]*U[2],-G[3]*U[3]],[U[4],U[5],1,0,0,0,-G[4]*U[4],-G[4]*U[5]],[0,0,0,U[4],U[5],1,-G[5]*U[4],-G[5]*U[5]],[U[6],U[7],1,0,0,0,-G[6]*U[6],-G[6]*U[7]],[0,0,0,U[6],U[7],1,-G[7]*U[6],-G[7]*U[7]]],W={},Z=determinant(H,8,0,0,0,W);if(Z!==0){for(var X=[],K=0;K<8;K++)for(var Q=0;Q<8;Q++)X[Q]==null&&(X[Q]=0),X[Q]+=((K+Q)%2?-1:1)*determinant(H,7,K===0?1:0,1<<K,1<<Q,W)/Z*G[K];return function(ee,te,re){var ae=te*X[6]+re*X[7]+1;ee[0]=(te*X[0]+re*X[1]+X[2])/ae,ee[1]=(te*X[3]+re*X[4]+X[5])/ae}}}var EVENT_SAVED_PROP="___zrEVENTSAVED",_calcOut$1=[];function transformLocalCoord(U,G,H,W,Z){return transformCoordWithViewport(_calcOut$1,G,W,Z,!0)&&transformCoordWithViewport(U,H,_calcOut$1[0],_calcOut$1[1])}function transformLocalCoordClear(U,G){U&&H(U),G&&H(G);function H(W){var Z=W[EVENT_SAVED_PROP];Z&&(Z.clearMarkers&&Z.clearMarkers(),delete W[EVENT_SAVED_PROP])}}function transformCoordWithViewport(U,G,H,W,Z){if(G.getBoundingClientRect&&env.domSupported&&!isCanvasEl(G)){var X=G[EVENT_SAVED_PROP]||(G[EVENT_SAVED_PROP]={}),K=prepareCoordMarkers(G,X),Q=preparePointerTransformer(K,X,Z);if(Q)return Q(U,H,W),!0}return!1}function prepareCoordMarkers(U,G){var H=G.markers;if(H)return H;H=G.markers=[];for(var W=["left","right"],Z=["top","bottom"],X=0;X<4;X++){var K=document.createElement("div"),Q=K.style,ee=X%2,te=(X>>1)%2;Q.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",W[ee]+":0",Z[te]+":0",W[1-ee]+":auto",Z[1-te]+":auto",""].join("!important;"),U.appendChild(K),H.push(K)}return G.clearMarkers=function(){each$f(H,function(re){re.parentNode&&re.parentNode.removeChild(re)})},H}function preparePointerTransformer(U,G,H){for(var W=H?"invTrans":"trans",Z=G[W],X=G.srcCoords,K=[],Q=[],ee=!0,te=0;te<4;te++){var re=U[te].getBoundingClientRect(),ae=2*te,ne=re.left,ie=re.top;K.push(ne,ie),ee=ee&&X&&ne===X[ae]&&ie===X[ae+1],Q.push(U[te].offsetLeft,U[te].offsetTop)}return ee&&Z?Z:(G.srcCoords=K,G[W]=H?buildTransformer(Q,K):buildTransformer(K,Q))}function isCanvasEl(U){return U.nodeName.toUpperCase()==="CANVAS"}var replaceReg=/([&<>"'])/g,replaceMap={"&":"&","<":"<",">":">",'"':""","'":"'"};function encodeHTML(U){return U==null?"":(U+"").replace(replaceReg,function(G,H){return replaceMap[H]})}var MOUSE_EVENT_REG=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_calcOut=[],firefoxNotSupportOffsetXY=env.browser.firefox&&+env.browser.version.split(".")[0]<39;function clientToLocal(U,G,H,W){return H=H||{},W?calculateZrXY(U,G,H):firefoxNotSupportOffsetXY&&G.layerX!=null&&G.layerX!==G.offsetX?(H.zrX=G.layerX,H.zrY=G.layerY):G.offsetX!=null?(H.zrX=G.offsetX,H.zrY=G.offsetY):calculateZrXY(U,G,H),H}function calculateZrXY(U,G,H){if(env.domSupported&&U.getBoundingClientRect){var W=G.clientX,Z=G.clientY;if(isCanvasEl(U)){var X=U.getBoundingClientRect();H.zrX=W-X.left,H.zrY=Z-X.top;return}else if(transformCoordWithViewport(_calcOut,U,W,Z)){H.zrX=_calcOut[0],H.zrY=_calcOut[1];return}}H.zrX=H.zrY=0}function getNativeEvent(U){return U||window.event}function normalizeEvent(U,G,H){if(G=getNativeEvent(G),G.zrX!=null)return G;var W=G.type,Z=W&&W.indexOf("touch")>=0;if(Z){var K=W!=="touchend"?G.targetTouches[0]:G.changedTouches[0];K&&clientToLocal(U,K,G,H)}else{clientToLocal(U,G,G,H);var X=getWheelDeltaMayPolyfill(G);G.zrDelta=X?X/120:-(G.detail||0)/3}var Q=G.button;return G.which==null&&Q!==void 0&&MOUSE_EVENT_REG.test(G.type)&&(G.which=Q&1?1:Q&2?3:Q&4?2:0),G}function getWheelDeltaMayPolyfill(U){var G=U.wheelDelta;if(G)return G;var H=U.deltaX,W=U.deltaY;if(H==null||W==null)return G;var Z=Math.abs(W!==0?W:H),X=W>0?-1:W<0?1:H>0?-1:1;return 3*Z*X}function addEventListener(U,G,H,W){U.addEventListener(G,H,W)}function removeEventListener(U,G,H,W){U.removeEventListener(G,H,W)}var stop=function(U){U.preventDefault(),U.stopPropagation(),U.cancelBubble=!0};function isMiddleOrRightButtonOnMouseUpDown(U){return U.which===2||U.which===3}var GestureMgr=(function(){function U(){this._track=[]}return U.prototype.recognize=function(G,H,W){return this._doTrack(G,H,W),this._recognize(G)},U.prototype.clear=function(){return this._track.length=0,this},U.prototype._doTrack=function(G,H,W){var Z=G.touches;if(Z){for(var X={points:[],touches:[],target:H,event:G},K=0,Q=Z.length;K<Q;K++){var ee=Z[K],te=clientToLocal(W,ee,{});X.points.push([te.zrX,te.zrY]),X.touches.push(ee)}this._track.push(X)}},U.prototype._recognize=function(G){for(var H in recognizers)if(recognizers.hasOwnProperty(H)){var W=recognizers[H](this._track,G);if(W)return W}},U})();function dist(U){var G=U[1][0]-U[0][0],H=U[1][1]-U[0][1];return Math.sqrt(G*G+H*H)}function center$1(U){return[(U[0][0]+U[1][0])/2,(U[0][1]+U[1][1])/2]}var recognizers={pinch:function(U,G){var H=U.length;if(H){var W=(U[H-1]||{}).points,Z=(U[H-2]||{}).points||W;if(Z&&Z.length>1&&W&&W.length>1){var X=dist(W)/dist(Z);!isFinite(X)&&(X=1),G.pinchScale=X;var K=center$1(W);return G.pinchX=K[0],G.pinchY=K[1],{type:"pinch",target:U[0].target,event:G}}}}};function create$1(){return[1,0,0,1,0,0]}function identity(U){return U[0]=1,U[1]=0,U[2]=0,U[3]=1,U[4]=0,U[5]=0,U}function copy(U,G){return U[0]=G[0],U[1]=G[1],U[2]=G[2],U[3]=G[3],U[4]=G[4],U[5]=G[5],U}function mul(U,G,H){var W=G[0]*H[0]+G[2]*H[1],Z=G[1]*H[0]+G[3]*H[1],X=G[0]*H[2]+G[2]*H[3],K=G[1]*H[2]+G[3]*H[3],Q=G[0]*H[4]+G[2]*H[5]+G[4],ee=G[1]*H[4]+G[3]*H[5]+G[5];return U[0]=W,U[1]=Z,U[2]=X,U[3]=K,U[4]=Q,U[5]=ee,U}function translate(U,G,H){return U[0]=G[0],U[1]=G[1],U[2]=G[2],U[3]=G[3],U[4]=G[4]+H[0],U[5]=G[5]+H[1],U}function rotate(U,G,H,W){W===void 0&&(W=[0,0]);var Z=G[0],X=G[2],K=G[4],Q=G[1],ee=G[3],te=G[5],re=Math.sin(H),ae=Math.cos(H);return U[0]=Z*ae+Q*re,U[1]=-Z*re+Q*ae,U[2]=X*ae+ee*re,U[3]=-X*re+ae*ee,U[4]=ae*(K-W[0])+re*(te-W[1])+W[0],U[5]=ae*(te-W[1])-re*(K-W[0])+W[1],U}function scale$1(U,G,H){var W=H[0],Z=H[1];return U[0]=G[0]*W,U[1]=G[1]*Z,U[2]=G[2]*W,U[3]=G[3]*Z,U[4]=G[4]*W,U[5]=G[5]*Z,U}function invert(U,G){var H=G[0],W=G[2],Z=G[4],X=G[1],K=G[3],Q=G[5],ee=H*K-X*W;return ee?(ee=1/ee,U[0]=K*ee,U[1]=-X*ee,U[2]=-W*ee,U[3]=H*ee,U[4]=(W*Q-K*Z)*ee,U[5]=(X*Z-H*Q)*ee,U):null}function clone$2(U){var G=create$1();return copy(G,U),G}var Point=(function(){function U(G,H){this.x=G||0,this.y=H||0}return U.prototype.copy=function(G){return this.x=G.x,this.y=G.y,this},U.prototype.clone=function(){return new U(this.x,this.y)},U.prototype.set=function(G,H){return this.x=G,this.y=H,this},U.prototype.equal=function(G){return G.x===this.x&&G.y===this.y},U.prototype.add=function(G){return this.x+=G.x,this.y+=G.y,this},U.prototype.scale=function(G){this.x*=G,this.y*=G},U.prototype.scaleAndAdd=function(G,H){this.x+=G.x*H,this.y+=G.y*H},U.prototype.sub=function(G){return this.x-=G.x,this.y-=G.y,this},U.prototype.dot=function(G){return this.x*G.x+this.y*G.y},U.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},U.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},U.prototype.normalize=function(){var G=this.len();return this.x/=G,this.y/=G,this},U.prototype.distance=function(G){var H=this.x-G.x,W=this.y-G.y;return Math.sqrt(H*H+W*W)},U.prototype.distanceSquare=function(G){var H=this.x-G.x,W=this.y-G.y;return H*H+W*W},U.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},U.prototype.transform=function(G){if(G){var H=this.x,W=this.y;return this.x=G[0]*H+G[2]*W+G[4],this.y=G[1]*H+G[3]*W+G[5],this}},U.prototype.toArray=function(G){return G[0]=this.x,G[1]=this.y,G},U.prototype.fromArray=function(G){this.x=G[0],this.y=G[1]},U.set=function(G,H,W){G.x=H,G.y=W},U.copy=function(G,H){G.x=H.x,G.y=H.y},U.len=function(G){return Math.sqrt(G.x*G.x+G.y*G.y)},U.lenSquare=function(G){return G.x*G.x+G.y*G.y},U.dot=function(G,H){return G.x*H.x+G.y*H.y},U.add=function(G,H,W){G.x=H.x+W.x,G.y=H.y+W.y},U.sub=function(G,H,W){G.x=H.x-W.x,G.y=H.y-W.y},U.scale=function(G,H,W){G.x=H.x*W,G.y=H.y*W},U.scaleAndAdd=function(G,H,W,Z){G.x=H.x+W.x*Z,G.y=H.y+W.y*Z},U.lerp=function(G,H,W,Z){var X=1-Z;G.x=X*H.x+Z*W.x,G.y=X*H.y+Z*W.y},U})(),mathMin$b=Math.min,mathMax$b=Math.max,mathAbs$5=Math.abs,XY$3=["x","y"],WH$3=["width","height"],lt=new Point,rb=new Point,lb=new Point,rt=new Point,_intersectCtx$1=createIntersectContext(),_minTv$1=_intersectCtx$1.minTv,_maxTv$1=_intersectCtx$1.maxTv,_lenMinMax=[0,0],BoundingRect=(function(){function U(G,H,W,Z){U.set(this,G,H,W,Z)}return U.set=function(G,H,W,Z,X){return Z<0&&(H=H+Z,Z=-Z),X<0&&(W=W+X,X=-X),G.x=H,G.y=W,G.width=Z,G.height=X,G},U.prototype.union=function(G){var H=mathMin$b(G.x,this.x),W=mathMin$b(G.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=mathMax$b(G.x+G.width,this.x+this.width)-H:this.width=G.width,isFinite(this.y)&&isFinite(this.height)?this.height=mathMax$b(G.y+G.height,this.y+this.height)-W:this.height=G.height,this.x=H,this.y=W},U.prototype.applyTransform=function(G){U.applyTransform(this,this,G)},U.prototype.calculateTransform=function(G){var H=this,W=G.width/H.width,Z=G.height/H.height,X=create$1();return translate(X,X,[-H.x,-H.y]),scale$1(X,X,[W,Z]),translate(X,X,[G.x,G.y]),X},U.prototype.intersect=function(G,H,W){return U.intersect(this,G,H,W)},U.intersect=function(G,H,W,Z){W&&Point.set(W,0,0);var X=Z&&Z.outIntersectRect||null,K=Z&&Z.clamp;if(X&&(X.x=X.y=X.width=X.height=NaN),!G||!H)return!1;G instanceof U||(G=U.set(_tmpIntersectA,G.x,G.y,G.width,G.height)),H instanceof U||(H=U.set(_tmpIntersectB,H.x,H.y,H.width,H.height));var Q=!!W;_intersectCtx$1.reset(Z,Q);var ee=_intersectCtx$1.touchThreshold,te=G.x+ee,re=G.x+G.width-ee,ae=G.y+ee,ne=G.y+G.height-ee,ie=H.x+ee,oe=H.x+H.width-ee,se=H.y+ee,le=H.y+H.height-ee;if(te>re||ae>ne||ie>oe||se>le)return!1;var ue=!(re<ie||oe<te||ne<se||le<ae);return(Q||X)&&(_lenMinMax[0]=1/0,_lenMinMax[1]=0,intersectOneDim(te,re,ie,oe,0,Q,X,K),intersectOneDim(ae,ne,se,le,1,Q,X,K),Q&&Point.copy(W,ue?_intersectCtx$1.useDir?_intersectCtx$1.dirMinTv:_minTv$1:_maxTv$1)),ue},U.contain=function(G,H,W){return H>=G.x&&H<=G.x+G.width&&W>=G.y&&W<=G.y+G.height},U.prototype.contain=function(G,H){return U.contain(this,G,H)},U.prototype.clone=function(){return new U(this.x,this.y,this.width,this.height)},U.prototype.copy=function(G){U.copy(this,G)},U.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},U.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},U.prototype.isZero=function(){return this.width===0||this.height===0},U.create=function(G){return new U(G.x,G.y,G.width,G.height)},U.copy=function(G,H){return G.x=H.x,G.y=H.y,G.width=H.width,G.height=H.height,G},U.applyTransform=function(G,H,W){if(!W){G!==H&&U.copy(G,H);return}if(W[1]<1e-5&&W[1]>-1e-5&&W[2]<1e-5&&W[2]>-1e-5){var Z=W[0],X=W[3],K=W[4],Q=W[5];G.x=H.x*Z+K,G.y=H.y*X+Q,G.width=H.width*Z,G.height=H.height*X,G.width<0&&(G.x+=G.width,G.width=-G.width),G.height<0&&(G.y+=G.height,G.height=-G.height);return}lt.x=lb.x=H.x,lt.y=rt.y=H.y,rb.x=rt.x=H.x+H.width,rb.y=lb.y=H.y+H.height,lt.transform(W),rt.transform(W),rb.transform(W),lb.transform(W),G.x=mathMin$b(lt.x,rb.x,lb.x,rt.x),G.y=mathMin$b(lt.y,rb.y,lb.y,rt.y);var ee=mathMax$b(lt.x,rb.x,lb.x,rt.x),te=mathMax$b(lt.y,rb.y,lb.y,rt.y);G.width=ee-G.x,G.height=te-G.y},U})(),_tmpIntersectA=new BoundingRect(0,0,0,0),_tmpIntersectB=new BoundingRect(0,0,0,0);function intersectOneDim(U,G,H,W,Z,X,K,Q){var ee=mathAbs$5(G-H),te=mathAbs$5(W-U),re=mathMin$b(ee,te),ae=XY$3[Z],ne=XY$3[1-Z],ie=WH$3[Z];G<H||W<U?ee<te?(X&&(_maxTv$1[ae]=-ee),Q&&(K[ae]=G,K[ie]=0)):(X&&(_maxTv$1[ae]=te),Q&&(K[ae]=U,K[ie]=0)):(K&&(K[ae]=mathMax$b(U,H),K[ie]=mathMin$b(G,W)-K[ae]),X&&(re<_lenMinMax[0]||_intersectCtx$1.useDir)&&(_lenMinMax[0]=mathMin$b(re,_lenMinMax[0]),(ee<te||!_intersectCtx$1.bidirectional)&&(_minTv$1[ae]=ee,_minTv$1[ne]=0,_intersectCtx$1.useDir&&_intersectCtx$1.calcDirMTV()),(ee>=te||!_intersectCtx$1.bidirectional)&&(_minTv$1[ae]=-te,_minTv$1[ne]=0,_intersectCtx$1.useDir&&_intersectCtx$1.calcDirMTV())))}function createIntersectContext(){var U=0,G=new Point,H=new Point,W={minTv:new Point,maxTv:new Point,useDir:!1,dirMinTv:new Point,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(X,K){W.touchThreshold=0,X&&X.touchThreshold!=null&&(W.touchThreshold=mathMax$b(0,X.touchThreshold)),W.negativeSize=!1,K&&(W.minTv.set(1/0,1/0),W.maxTv.set(0,0),W.useDir=!1,X&&X.direction!=null&&(W.useDir=!0,W.dirMinTv.copy(W.minTv),H.copy(W.minTv),U=X.direction,W.bidirectional=X.bidirectional==null||!!X.bidirectional,W.bidirectional||G.set(Math.cos(U),Math.sin(U))))},calcDirMTV:function(){var X=W.minTv,K=W.dirMinTv,Q=X.y*X.y+X.x*X.x,ee=Math.sin(U),te=Math.cos(U),re=ee*X.y+te*X.x;if(Z(re)){Z(X.x)&&Z(X.y)&&K.set(0,0);return}if(H.x=Q*te/re,H.y=Q*ee/re,Z(H.x)&&Z(H.y)){K.set(0,0);return}(W.bidirectional||G.dot(H)>0)&&H.len()<K.len()&&K.copy(H)}};function Z(X){return mathAbs$5(X)<1e-10}return W}var SILENT="silent";function makeEventPacket(U,G,H){return{type:U,event:H,target:G.target,topTarget:G.topTarget,cancelBubble:!1,offsetX:H.zrX,offsetY:H.zrY,gestureEvent:H.gestureEvent,pinchX:H.pinchX,pinchY:H.pinchY,pinchScale:H.pinchScale,wheelDelta:H.zrDelta,zrByTouch:H.zrByTouch,which:H.which,stop:stopEvent}}function stopEvent(){stop(this.event)}var EmptyProxy=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.handler=null,H}return G.prototype.dispose=function(){},G.prototype.setCursor=function(){},G})(Eventful),HoveredResult=(function(){function U(G,H){this.x=G,this.y=H}return U})(),handlerNames=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],tmpRect$1=new BoundingRect(0,0,0,0),Handler=(function(U){__extends(G,U);function G(H,W,Z,X,K){var Q=U.call(this)||this;return Q._hovered=new HoveredResult(0,0),Q.storage=H,Q.painter=W,Q.painterRoot=X,Q._pointerSize=K,Z=Z||new EmptyProxy,Q.proxy=null,Q.setHandlerProxy(Z),Q._draggingMgr=new Draggable(Q),Q}return G.prototype.setHandlerProxy=function(H){this.proxy&&this.proxy.dispose(),H&&(each$f(handlerNames,function(W){H.on&&H.on(W,this[W],this)},this),H.handler=this),this.proxy=H},G.prototype.mousemove=function(H){var W=H.zrX,Z=H.zrY,X=isOutsideBoundary(this,W,Z),K=this._hovered,Q=K.target;Q&&!Q.__zr&&(K=this.findHover(K.x,K.y),Q=K.target);var ee=this._hovered=X?new HoveredResult(W,Z):this.findHover(W,Z),te=ee.target,re=this.proxy;re.setCursor&&re.setCursor(te?te.cursor:"default"),Q&&te!==Q&&this.dispatchToElement(K,"mouseout",H),this.dispatchToElement(ee,"mousemove",H),te&&te!==Q&&this.dispatchToElement(ee,"mouseover",H)},G.prototype.mouseout=function(H){var W=H.zrEventControl;W!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",H),W!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:H})},G.prototype.resize=function(){this._hovered=new HoveredResult(0,0)},G.prototype.dispatch=function(H,W){var Z=this[H];Z&&Z.call(this,W)},G.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},G.prototype.setCursorStyle=function(H){var W=this.proxy;W.setCursor&&W.setCursor(H)},G.prototype.dispatchToElement=function(H,W,Z){H=H||{};var X=H.target;if(!(X&&X.silent)){for(var K="on"+W,Q=makeEventPacket(W,H,Z);X&&(X[K]&&(Q.cancelBubble=!!X[K].call(X,Q)),X.trigger(W,Q),X=X.__hostTarget?X.__hostTarget:X.parent,!Q.cancelBubble););Q.cancelBubble||(this.trigger(W,Q),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(ee){typeof ee[K]=="function"&&ee[K].call(ee,Q),ee.trigger&&ee.trigger(W,Q)}))}},G.prototype.findHover=function(H,W,Z){var X=this.storage.getDisplayList(),K=new HoveredResult(H,W);if(setHoverTarget(X,K,H,W,Z),this._pointerSize&&!K.target){for(var Q=[],ee=this._pointerSize,te=ee/2,re=new BoundingRect(H-te,W-te,ee,ee),ae=X.length-1;ae>=0;ae--){var ne=X[ae];ne!==Z&&!ne.ignore&&!ne.ignoreCoarsePointer&&(!ne.parent||!ne.parent.ignoreCoarsePointer)&&(tmpRect$1.copy(ne.getBoundingRect()),ne.transform&&tmpRect$1.applyTransform(ne.transform),tmpRect$1.intersect(re)&&Q.push(ne))}if(Q.length)for(var ie=4,oe=Math.PI/12,se=Math.PI*2,le=0;le<te;le+=ie)for(var ue=0;ue<se;ue+=oe){var ce=H+le*Math.cos(ue),fe=W+le*Math.sin(ue);if(setHoverTarget(Q,K,ce,fe,Z),K.target)return K}}return K},G.prototype.processGesture=function(H,W){this._gestureMgr||(this._gestureMgr=new GestureMgr);var Z=this._gestureMgr;W==="start"&&Z.clear();var X=Z.recognize(H,this.findHover(H.zrX,H.zrY,null).target,this.proxy.dom);if(W==="end"&&Z.clear(),X){var K=X.type;H.gestureEvent=K;var Q=new HoveredResult;Q.target=X.target,this.dispatchToElement(Q,K,X.event)}},G})(Eventful);each$f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(U){Handler.prototype[U]=function(G){var H=G.zrX,W=G.zrY,Z=isOutsideBoundary(this,H,W),X,K;if((U!=="mouseup"||!Z)&&(X=this.findHover(H,W),K=X.target),U==="mousedown")this._downEl=K,this._downPoint=[G.zrX,G.zrY],this._upEl=K;else if(U==="mouseup")this._upEl=K;else if(U==="click"){if(this._downEl!==this._upEl||!this._downPoint||dist$1(this._downPoint,[G.zrX,G.zrY])>4)return;this._downPoint=null}this.dispatchToElement(X,U,G)}});function isHover(U,G,H){if(U[U.rectHover?"rectContain":"contain"](G,H)){for(var W=U,Z=void 0,X=!1;W;){if(W.ignoreClip&&(X=!0),!X){var K=W.getClipPath();if(K&&!K.contain(G,H))return!1}W.silent&&(Z=!0);var Q=W.__hostTarget;W=Q?W.ignoreHostSilent?null:Q:W.parent}return Z?SILENT:!0}return!1}function setHoverTarget(U,G,H,W,Z){for(var X=U.length-1;X>=0;X--){var K=U[X],Q=void 0;if(K!==Z&&!K.ignore&&(Q=isHover(K,H,W))&&(!G.topTarget&&(G.topTarget=K),Q!==SILENT)){G.target=K;break}}}function isOutsideBoundary(U,G,H){var W=U.painter;return G<0||G>W.getWidth()||H<0||H>W.getHeight()}var DEFAULT_MIN_MERGE=32,DEFAULT_MIN_GALLOPING=7;function minRunLength(U){for(var G=0;U>=DEFAULT_MIN_MERGE;)G|=U&1,U>>=1;return U+G}function makeAscendingRun(U,G,H,W){var Z=G+1;if(Z===H)return 1;if(W(U[Z++],U[G])<0){for(;Z<H&&W(U[Z],U[Z-1])<0;)Z++;reverseRun(U,G,Z)}else for(;Z<H&&W(U[Z],U[Z-1])>=0;)Z++;return Z-G}function reverseRun(U,G,H){for(H--;G<H;){var W=U[G];U[G++]=U[H],U[H--]=W}}function binaryInsertionSort(U,G,H,W,Z){for(W===G&&W++;W<H;W++){for(var X=U[W],K=G,Q=W,ee;K<Q;)ee=K+Q>>>1,Z(X,U[ee])<0?Q=ee:K=ee+1;var te=W-K;switch(te){case 3:U[K+3]=U[K+2];case 2:U[K+2]=U[K+1];case 1:U[K+1]=U[K];break;default:for(;te>0;)U[K+te]=U[K+te-1],te--}U[K]=X}}function gallopLeft(U,G,H,W,Z,X){var K=0,Q=0,ee=1;if(X(U,G[H+Z])>0){for(Q=W-Z;ee<Q&&X(U,G[H+Z+ee])>0;)K=ee,ee=(ee<<1)+1,ee<=0&&(ee=Q);ee>Q&&(ee=Q),K+=Z,ee+=Z}else{for(Q=Z+1;ee<Q&&X(U,G[H+Z-ee])<=0;)K=ee,ee=(ee<<1)+1,ee<=0&&(ee=Q);ee>Q&&(ee=Q);var te=K;K=Z-ee,ee=Z-te}for(K++;K<ee;){var re=K+(ee-K>>>1);X(U,G[H+re])>0?K=re+1:ee=re}return ee}function gallopRight(U,G,H,W,Z,X){var K=0,Q=0,ee=1;if(X(U,G[H+Z])<0){for(Q=Z+1;ee<Q&&X(U,G[H+Z-ee])<0;)K=ee,ee=(ee<<1)+1,ee<=0&&(ee=Q);ee>Q&&(ee=Q);var te=K;K=Z-ee,ee=Z-te}else{for(Q=W-Z;ee<Q&&X(U,G[H+Z+ee])>=0;)K=ee,ee=(ee<<1)+1,ee<=0&&(ee=Q);ee>Q&&(ee=Q),K+=Z,ee+=Z}for(K++;K<ee;){var re=K+(ee-K>>>1);X(U,G[H+re])<0?ee=re:K=re+1}return ee}function TimSort(U,G){var H=DEFAULT_MIN_GALLOPING,W,Z,X=0,K=[];W=[],Z=[];function Q(ie,oe){W[X]=ie,Z[X]=oe,X+=1}function ee(){for(;X>1;){var ie=X-2;if(ie>=1&&Z[ie-1]<=Z[ie]+Z[ie+1]||ie>=2&&Z[ie-2]<=Z[ie]+Z[ie-1])Z[ie-1]<Z[ie+1]&&ie--;else if(Z[ie]>Z[ie+1])break;re(ie)}}function te(){for(;X>1;){var ie=X-2;ie>0&&Z[ie-1]<Z[ie+1]&&ie--,re(ie)}}function re(ie){var oe=W[ie],se=Z[ie],le=W[ie+1],ue=Z[ie+1];Z[ie]=se+ue,ie===X-3&&(W[ie+1]=W[ie+2],Z[ie+1]=Z[ie+2]),X--;var ce=gallopRight(U[le],U,oe,se,0,G);oe+=ce,se-=ce,se!==0&&(ue=gallopLeft(U[oe+se-1],U,le,ue,ue-1,G),ue!==0&&(se<=ue?ae(oe,se,le,ue):ne(oe,se,le,ue)))}function ae(ie,oe,se,le){var ue=0;for(ue=0;ue<oe;ue++)K[ue]=U[ie+ue];var ce=0,fe=se,he=ie;if(U[he++]=U[fe++],--le===0){for(ue=0;ue<oe;ue++)U[he+ue]=K[ce+ue];return}if(oe===1){for(ue=0;ue<le;ue++)U[he+ue]=U[fe+ue];U[he+le]=K[ce];return}for(var ve=H,de,pe,ge;;){de=0,pe=0,ge=!1;do if(G(U[fe],K[ce])<0){if(U[he++]=U[fe++],pe++,de=0,--le===0){ge=!0;break}}else if(U[he++]=K[ce++],de++,pe=0,--oe===1){ge=!0;break}while((de|pe)<ve);if(ge)break;do{if(de=gallopRight(U[fe],K,ce,oe,0,G),de!==0){for(ue=0;ue<de;ue++)U[he+ue]=K[ce+ue];if(he+=de,ce+=de,oe-=de,oe<=1){ge=!0;break}}if(U[he++]=U[fe++],--le===0){ge=!0;break}if(pe=gallopLeft(K[ce],U,fe,le,0,G),pe!==0){for(ue=0;ue<pe;ue++)U[he+ue]=U[fe+ue];if(he+=pe,fe+=pe,le-=pe,le===0){ge=!0;break}}if(U[he++]=K[ce++],--oe===1){ge=!0;break}ve--}while(de>=DEFAULT_MIN_GALLOPING||pe>=DEFAULT_MIN_GALLOPING);if(ge)break;ve<0&&(ve=0),ve+=2}if(H=ve,H<1&&(H=1),oe===1){for(ue=0;ue<le;ue++)U[he+ue]=U[fe+ue];U[he+le]=K[ce]}else{if(oe===0)throw new Error;for(ue=0;ue<oe;ue++)U[he+ue]=K[ce+ue]}}function ne(ie,oe,se,le){var ue=0;for(ue=0;ue<le;ue++)K[ue]=U[se+ue];var ce=ie+oe-1,fe=le-1,he=se+le-1,ve=0,de=0;if(U[he--]=U[ce--],--oe===0){for(ve=he-(le-1),ue=0;ue<le;ue++)U[ve+ue]=K[ue];return}if(le===1){for(he-=oe,ce-=oe,de=he+1,ve=ce+1,ue=oe-1;ue>=0;ue--)U[de+ue]=U[ve+ue];U[he]=K[fe];return}for(var pe=H;;){var ge=0,me=0,ye=!1;do if(G(K[fe],U[ce])<0){if(U[he--]=U[ce--],ge++,me=0,--oe===0){ye=!0;break}}else if(U[he--]=K[fe--],me++,ge=0,--le===1){ye=!0;break}while((ge|me)<pe);if(ye)break;do{if(ge=oe-gallopRight(K[fe],U,ie,oe,oe-1,G),ge!==0){for(he-=ge,ce-=ge,oe-=ge,de=he+1,ve=ce+1,ue=ge-1;ue>=0;ue--)U[de+ue]=U[ve+ue];if(oe===0){ye=!0;break}}if(U[he--]=K[fe--],--le===1){ye=!0;break}if(me=le-gallopLeft(U[ce],K,0,le,le-1,G),me!==0){for(he-=me,fe-=me,le-=me,de=he+1,ve=fe+1,ue=0;ue<me;ue++)U[de+ue]=K[ve+ue];if(le<=1){ye=!0;break}}if(U[he--]=U[ce--],--oe===0){ye=!0;break}pe--}while(ge>=DEFAULT_MIN_GALLOPING||me>=DEFAULT_MIN_GALLOPING);if(ye)break;pe<0&&(pe=0),pe+=2}if(H=pe,H<1&&(H=1),le===1){for(he-=oe,ce-=oe,de=he+1,ve=ce+1,ue=oe-1;ue>=0;ue--)U[de+ue]=U[ve+ue];U[he]=K[fe]}else{if(le===0)throw new Error;for(ve=he-(le-1),ue=0;ue<le;ue++)U[ve+ue]=K[ue]}}return{mergeRuns:ee,forceMergeRuns:te,pushRun:Q}}function sort$2(U,G,H,W){H||(H=0),W||(W=U.length);var Z=W-H;if(!(Z<2)){var X=0;if(Z<DEFAULT_MIN_MERGE){X=makeAscendingRun(U,H,W,G),binaryInsertionSort(U,H,W,H+X,G);return}var K=TimSort(U,G),Q=minRunLength(Z);do{if(X=makeAscendingRun(U,H,W,G),X<Q){var ee=Z;ee>Q&&(ee=Q),binaryInsertionSort(U,H,H+ee,H+X,G),X=ee}K.pushRun(H,X),K.mergeRuns(),Z-=X,H+=X}while(Z!==0);K.forceMergeRuns()}}var REDRAW_BIT=1,STYLE_CHANGED_BIT=2,SHAPE_CHANGED_BIT=4,invalidZErrorLogged=!1;function logInvalidZError(){invalidZErrorLogged||(invalidZErrorLogged=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function shapeCompareFunc(U,G){return U.zlevel===G.zlevel?U.z===G.z?U.z2-G.z2:U.z-G.z:U.zlevel-G.zlevel}var Storage=(function(){function U(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=shapeCompareFunc}return U.prototype.traverse=function(G,H){for(var W=0;W<this._roots.length;W++)this._roots[W].traverse(G,H)},U.prototype.getDisplayList=function(G,H){H=H||!1;var W=this._displayList;return(G||!W.length)&&this.updateDisplayList(H),W},U.prototype.updateDisplayList=function(G){this._displayListLen=0;for(var H=this._roots,W=this._displayList,Z=0,X=H.length;Z<X;Z++)this._updateAndAddDisplayable(H[Z],null,G);W.length=this._displayListLen,sort$2(W,shapeCompareFunc)},U.prototype._updateAndAddDisplayable=function(G,H,W){if(!(G.ignore&&!W)){G.beforeUpdate(),G.update(),G.afterUpdate();var Z=G.getClipPath(),X=H&&H.length,K=0,Q=G.__clipPaths;if(!G.ignoreClip&&(X||Z)){if(Q||(Q=G.__clipPaths=[]),X)for(var ee=0;ee<H.length;ee++)Q[K++]=H[ee];for(var te=Z,re=G;te;)te.parent=re,te.updateTransform(),Q[K++]=te,re=te,te=te.getClipPath()}if(Q&&(Q.length=K),G.childrenRef){for(var ae=G.childrenRef(),ne=0;ne<ae.length;ne++){var ie=ae[ne];G.__dirty&&(ie.__dirty|=REDRAW_BIT),this._updateAndAddDisplayable(ie,Q,W)}G.__dirty=0}else{var oe=G;isNaN(oe.z)&&(logInvalidZError(),oe.z=0),isNaN(oe.z2)&&(logInvalidZError(),oe.z2=0),isNaN(oe.zlevel)&&(logInvalidZError(),oe.zlevel=0),this._displayList[this._displayListLen++]=oe}var se=G.getDecalElement&&G.getDecalElement();se&&this._updateAndAddDisplayable(se,Q,W);var le=G.getTextGuideLine();le&&this._updateAndAddDisplayable(le,Q,W);var ue=G.getTextContent();ue&&this._updateAndAddDisplayable(ue,Q,W)}},U.prototype.addRoot=function(G){G.__zr&&G.__zr.storage===this||this._roots.push(G)},U.prototype.delRoot=function(G){if(G instanceof Array){for(var H=0,W=G.length;H<W;H++)this.delRoot(G[H]);return}var Z=indexOf(this._roots,G);Z>=0&&this._roots.splice(Z,1)},U.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},U.prototype.getRoots=function(){return this._roots},U.prototype.dispose=function(){this._displayList=null,this._roots=null},U})(),requestAnimationFrame$1;requestAnimationFrame$1=env.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(U){return setTimeout(U,16)};var easingFuncs={linear:function(U){return U},quadraticIn:function(U){return U*U},quadraticOut:function(U){return U*(2-U)},quadraticInOut:function(U){return(U*=2)<1?.5*U*U:-.5*(--U*(U-2)-1)},cubicIn:function(U){return U*U*U},cubicOut:function(U){return--U*U*U+1},cubicInOut:function(U){return(U*=2)<1?.5*U*U*U:.5*((U-=2)*U*U+2)},quarticIn:function(U){return U*U*U*U},quarticOut:function(U){return 1- --U*U*U*U},quarticInOut:function(U){return(U*=2)<1?.5*U*U*U*U:-.5*((U-=2)*U*U*U-2)},quinticIn:function(U){return U*U*U*U*U},quinticOut:function(U){return--U*U*U*U*U+1},quinticInOut:function(U){return(U*=2)<1?.5*U*U*U*U*U:.5*((U-=2)*U*U*U*U+2)},sinusoidalIn:function(U){return 1-Math.cos(U*Math.PI/2)},sinusoidalOut:function(U){return Math.sin(U*Math.PI/2)},sinusoidalInOut:function(U){return .5*(1-Math.cos(Math.PI*U))},exponentialIn:function(U){return U===0?0:Math.pow(1024,U-1)},exponentialOut:function(U){return U===1?1:1-Math.pow(2,-10*U)},exponentialInOut:function(U){return U===0?0:U===1?1:(U*=2)<1?.5*Math.pow(1024,U-1):.5*(-Math.pow(2,-10*(U-1))+2)},circularIn:function(U){return 1-Math.sqrt(1-U*U)},circularOut:function(U){return Math.sqrt(1- --U*U)},circularInOut:function(U){return(U*=2)<1?-.5*(Math.sqrt(1-U*U)-1):.5*(Math.sqrt(1-(U-=2)*U)+1)},elasticIn:function(U){var G,H=.1,W=.4;return U===0?0:U===1?1:(!H||H<1?(H=1,G=W/4):G=W*Math.asin(1/H)/(2*Math.PI),-(H*Math.pow(2,10*(U-=1))*Math.sin((U-G)*(2*Math.PI)/W)))},elasticOut:function(U){var G,H=.1,W=.4;return U===0?0:U===1?1:(!H||H<1?(H=1,G=W/4):G=W*Math.asin(1/H)/(2*Math.PI),H*Math.pow(2,-10*U)*Math.sin((U-G)*(2*Math.PI)/W)+1)},elasticInOut:function(U){var G,H=.1,W=.4;return U===0?0:U===1?1:(!H||H<1?(H=1,G=W/4):G=W*Math.asin(1/H)/(2*Math.PI),(U*=2)<1?-.5*(H*Math.pow(2,10*(U-=1))*Math.sin((U-G)*(2*Math.PI)/W)):H*Math.pow(2,-10*(U-=1))*Math.sin((U-G)*(2*Math.PI)/W)*.5+1)},backIn:function(U){var G=1.70158;return U*U*((G+1)*U-G)},backOut:function(U){var G=1.70158;return--U*U*((G+1)*U+G)+1},backInOut:function(U){var G=2.5949095;return(U*=2)<1?.5*(U*U*((G+1)*U-G)):.5*((U-=2)*U*((G+1)*U+G)+2)},bounceIn:function(U){return 1-easingFuncs.bounceOut(1-U)},bounceOut:function(U){return U<1/2.75?7.5625*U*U:U<2/2.75?7.5625*(U-=1.5/2.75)*U+.75:U<2.5/2.75?7.5625*(U-=2.25/2.75)*U+.9375:7.5625*(U-=2.625/2.75)*U+.984375},bounceInOut:function(U){return U<.5?easingFuncs.bounceIn(U*2)*.5:easingFuncs.bounceOut(U*2-1)*.5+.5}},mathPow$2=Math.pow,mathSqrt$3=Math.sqrt,EPSILON$4=1e-8,EPSILON_NUMERIC=1e-4,THREE_SQRT=mathSqrt$3(3),ONE_THIRD=1/3,_v0=create$2(),_v1=create$2(),_v2=create$2();function isAroundZero$1(U){return U>-EPSILON$4&&U<EPSILON$4}function isNotAroundZero$1(U){return U>EPSILON$4||U<-EPSILON$4}function cubicAt(U,G,H,W,Z){var X=1-Z;return X*X*(X*U+3*Z*G)+Z*Z*(Z*W+3*X*H)}function cubicDerivativeAt(U,G,H,W,Z){var X=1-Z;return 3*(((G-U)*X+2*(H-G)*Z)*X+(W-H)*Z*Z)}function cubicRootAt(U,G,H,W,Z,X){var K=W+3*(G-H)-U,Q=3*(H-G*2+U),ee=3*(G-U),te=U-Z,re=Q*Q-3*K*ee,ae=Q*ee-9*K*te,ne=ee*ee-3*Q*te,ie=0;if(isAroundZero$1(re)&&isAroundZero$1(ae))if(isAroundZero$1(Q))X[0]=0;else{var oe=-ee/Q;oe>=0&&oe<=1&&(X[ie++]=oe)}else{var se=ae*ae-4*re*ne;if(isAroundZero$1(se)){var le=ae/re,oe=-Q/K+le,ue=-le/2;oe>=0&&oe<=1&&(X[ie++]=oe),ue>=0&&ue<=1&&(X[ie++]=ue)}else if(se>0){var ce=mathSqrt$3(se),fe=re*Q+1.5*K*(-ae+ce),he=re*Q+1.5*K*(-ae-ce);fe<0?fe=-mathPow$2(-fe,ONE_THIRD):fe=mathPow$2(fe,ONE_THIRD),he<0?he=-mathPow$2(-he,ONE_THIRD):he=mathPow$2(he,ONE_THIRD);var oe=(-Q-(fe+he))/(3*K);oe>=0&&oe<=1&&(X[ie++]=oe)}else{var ve=(2*re*Q-3*K*ae)/(2*mathSqrt$3(re*re*re)),de=Math.acos(ve)/3,pe=mathSqrt$3(re),ge=Math.cos(de),oe=(-Q-2*pe*ge)/(3*K),ue=(-Q+pe*(ge+THREE_SQRT*Math.sin(de)))/(3*K),me=(-Q+pe*(ge-THREE_SQRT*Math.sin(de)))/(3*K);oe>=0&&oe<=1&&(X[ie++]=oe),ue>=0&&ue<=1&&(X[ie++]=ue),me>=0&&me<=1&&(X[ie++]=me)}}return ie}function cubicExtrema(U,G,H,W,Z){var X=6*H-12*G+6*U,K=9*G+3*W-3*U-9*H,Q=3*G-3*U,ee=0;if(isAroundZero$1(K)){if(isNotAroundZero$1(X)){var te=-Q/X;te>=0&&te<=1&&(Z[ee++]=te)}}else{var re=X*X-4*K*Q;if(isAroundZero$1(re))Z[0]=-X/(2*K);else if(re>0){var ae=mathSqrt$3(re),te=(-X+ae)/(2*K),ne=(-X-ae)/(2*K);te>=0&&te<=1&&(Z[ee++]=te),ne>=0&&ne<=1&&(Z[ee++]=ne)}}return ee}function cubicSubdivide(U,G,H,W,Z,X){var K=(G-U)*Z+U,Q=(H-G)*Z+G,ee=(W-H)*Z+H,te=(Q-K)*Z+K,re=(ee-Q)*Z+Q,ae=(re-te)*Z+te;X[0]=U,X[1]=K,X[2]=te,X[3]=ae,X[4]=ae,X[5]=re,X[6]=ee,X[7]=W}function cubicProjectPoint(U,G,H,W,Z,X,K,Q,ee,te,re){var ae,ne=.005,ie=1/0,oe,se,le,ue;_v0[0]=ee,_v0[1]=te;for(var ce=0;ce<1;ce+=.05)_v1[0]=cubicAt(U,H,Z,K,ce),_v1[1]=cubicAt(G,W,X,Q,ce),le=distSquare(_v0,_v1),le<ie&&(ae=ce,ie=le);ie=1/0;for(var fe=0;fe<32&&!(ne<EPSILON_NUMERIC);fe++)oe=ae-ne,se=ae+ne,_v1[0]=cubicAt(U,H,Z,K,oe),_v1[1]=cubicAt(G,W,X,Q,oe),le=distSquare(_v1,_v0),oe>=0&&le<ie?(ae=oe,ie=le):(_v2[0]=cubicAt(U,H,Z,K,se),_v2[1]=cubicAt(G,W,X,Q,se),ue=distSquare(_v2,_v0),se<=1&&ue<ie?(ae=se,ie=ue):ne*=.5);return re&&(re[0]=cubicAt(U,H,Z,K,ae),re[1]=cubicAt(G,W,X,Q,ae)),mathSqrt$3(ie)}function cubicLength(U,G,H,W,Z,X,K,Q,ee){for(var te=U,re=G,ae=0,ne=1/ee,ie=1;ie<=ee;ie++){var oe=ie*ne,se=cubicAt(U,H,Z,K,oe),le=cubicAt(G,W,X,Q,oe),ue=se-te,ce=le-re;ae+=Math.sqrt(ue*ue+ce*ce),te=se,re=le}return ae}function quadraticAt$1(U,G,H,W){var Z=1-W;return Z*(Z*U+2*W*G)+W*W*H}function quadraticDerivativeAt(U,G,H,W){return 2*((1-W)*(G-U)+W*(H-G))}function quadraticRootAt(U,G,H,W,Z){var X=U-2*G+H,K=2*(G-U),Q=U-W,ee=0;if(isAroundZero$1(X)){if(isNotAroundZero$1(K)){var te=-Q/K;te>=0&&te<=1&&(Z[ee++]=te)}}else{var re=K*K-4*X*Q;if(isAroundZero$1(re)){var te=-K/(2*X);te>=0&&te<=1&&(Z[ee++]=te)}else if(re>0){var ae=mathSqrt$3(re),te=(-K+ae)/(2*X),ne=(-K-ae)/(2*X);te>=0&&te<=1&&(Z[ee++]=te),ne>=0&&ne<=1&&(Z[ee++]=ne)}}return ee}function quadraticExtremum(U,G,H){var W=U+H-2*G;return W===0?.5:(U-G)/W}function quadraticSubdivide(U,G,H,W,Z){var X=(G-U)*W+U,K=(H-G)*W+G,Q=(K-X)*W+X;Z[0]=U,Z[1]=X,Z[2]=Q,Z[3]=Q,Z[4]=K,Z[5]=H}function quadraticProjectPoint(U,G,H,W,Z,X,K,Q,ee){var te,re=.005,ae=1/0;_v0[0]=K,_v0[1]=Q;for(var ne=0;ne<1;ne+=.05){_v1[0]=quadraticAt$1(U,H,Z,ne),_v1[1]=quadraticAt$1(G,W,X,ne);var ie=distSquare(_v0,_v1);ie<ae&&(te=ne,ae=ie)}ae=1/0;for(var oe=0;oe<32&&!(re<EPSILON_NUMERIC);oe++){var se=te-re,le=te+re;_v1[0]=quadraticAt$1(U,H,Z,se),_v1[1]=quadraticAt$1(G,W,X,se);var ie=distSquare(_v1,_v0);if(se>=0&&ie<ae)te=se,ae=ie;else{_v2[0]=quadraticAt$1(U,H,Z,le),_v2[1]=quadraticAt$1(G,W,X,le);var ue=distSquare(_v2,_v0);le<=1&&ue<ae?(te=le,ae=ue):re*=.5}}return ee&&(ee[0]=quadraticAt$1(U,H,Z,te),ee[1]=quadraticAt$1(G,W,X,te)),mathSqrt$3(ae)}function quadraticLength(U,G,H,W,Z,X,K){for(var Q=U,ee=G,te=0,re=1/K,ae=1;ae<=K;ae++){var ne=ae*re,ie=quadraticAt$1(U,H,Z,ne),oe=quadraticAt$1(G,W,X,ne),se=ie-Q,le=oe-ee;te+=Math.sqrt(se*se+le*le),Q=ie,ee=oe}return te}var regexp=/cubic-bezier\(([0-9,\.e ]+)\)/;function createCubicEasingFunc(U){var G=U&®exp.exec(U);if(G){var H=G[1].split(","),W=+trim$1(H[0]),Z=+trim$1(H[1]),X=+trim$1(H[2]),K=+trim$1(H[3]);if(isNaN(W+Z+X+K))return;var Q=[];return function(ee){return ee<=0?0:ee>=1?1:cubicRootAt(0,W,X,1,ee,Q)&&cubicAt(0,Z,K,1,Q[0])}}}var Clip=(function(){function U(G){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=G.life||1e3,this._delay=G.delay||0,this.loop=G.loop||!1,this.onframe=G.onframe||noop,this.ondestroy=G.ondestroy||noop,this.onrestart=G.onrestart||noop,G.easing&&this.setEasing(G.easing)}return U.prototype.step=function(G,H){if(this._inited||(this._startTime=G+this._delay,this._inited=!0),this._paused){this._pausedTime+=H;return}var W=this._life,Z=G-this._startTime-this._pausedTime,X=Z/W;X<0&&(X=0),X=Math.min(X,1);var K=this.easingFunc,Q=K?K(X):X;if(this.onframe(Q),X===1)if(this.loop){var ee=Z%W;this._startTime=G-ee,this._pausedTime=0,this.onrestart()}else return!0;return!1},U.prototype.pause=function(){this._paused=!0},U.prototype.resume=function(){this._paused=!1},U.prototype.setEasing=function(G){this.easing=G,this.easingFunc=isFunction(G)?G:easingFuncs[G]||createCubicEasingFunc(G)},U})(),Entry=(function(){function U(G){this.value=G}return U})(),LinkedList=(function(){function U(){this._len=0}return U.prototype.insert=function(G){var H=new Entry(G);return this.insertEntry(H),H},U.prototype.insertEntry=function(G){this.head?(this.tail.next=G,G.prev=this.tail,G.next=null,this.tail=G):this.head=this.tail=G,this._len++},U.prototype.remove=function(G){var H=G.prev,W=G.next;H?H.next=W:this.head=W,W?W.prev=H:this.tail=H,G.next=G.prev=null,this._len--},U.prototype.len=function(){return this._len},U.prototype.clear=function(){this.head=this.tail=null,this._len=0},U})(),LRU=(function(){function U(G){this._list=new LinkedList,this._maxSize=10,this._map={},this._maxSize=G}return U.prototype.put=function(G,H){var W=this._list,Z=this._map,X=null;if(Z[G]==null){var K=W.len(),Q=this._lastRemovedEntry;if(K>=this._maxSize&&K>0){var ee=W.head;W.remove(ee),delete Z[ee.key],X=ee.value,this._lastRemovedEntry=ee}Q?Q.value=H:Q=new Entry(H),Q.key=G,W.insertEntry(Q),Z[G]=Q}return X},U.prototype.get=function(G){var H=this._map[G],W=this._list;if(H!=null)return H!==W.tail&&(W.remove(H),W.insertEntry(H)),H.value},U.prototype.clear=function(){this._list.clear(),this._map={}},U.prototype.len=function(){return this._list.len()},U})(),kCSSColorTable={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function clampCssByte(U){return U=Math.round(U),U<0?0:U>255?255:U}function clampCssAngle(U){return U=Math.round(U),U<0?0:U>360?360:U}function clampCssFloat(U){return U<0?0:U>1?1:U}function parseCssInt(U){var G=U;return G.length&&G.charAt(G.length-1)==="%"?clampCssByte(parseFloat(G)/100*255):clampCssByte(parseInt(G,10))}function parseCssFloat(U){var G=U;return G.length&&G.charAt(G.length-1)==="%"?clampCssFloat(parseFloat(G)/100):clampCssFloat(parseFloat(G))}function cssHueToRgb(U,G,H){return H<0?H+=1:H>1&&(H-=1),H*6<1?U+(G-U)*H*6:H*2<1?G:H*3<2?U+(G-U)*(2/3-H)*6:U}function lerpNumber(U,G,H){return U+(G-U)*H}function setRgba(U,G,H,W,Z){return U[0]=G,U[1]=H,U[2]=W,U[3]=Z,U}function copyRgba(U,G){return U[0]=G[0],U[1]=G[1],U[2]=G[2],U[3]=G[3],U}var colorCache=new LRU(20),lastRemovedArr=null;function putToCache(U,G){lastRemovedArr&©Rgba(lastRemovedArr,G),lastRemovedArr=colorCache.put(U,lastRemovedArr||G.slice())}function parse(U,G){if(U){G=G||[];var H=colorCache.get(U);if(H)return copyRgba(G,H);U=U+"";var W=U.replace(/ /g,"").toLowerCase();if(W in kCSSColorTable)return copyRgba(G,kCSSColorTable[W]),putToCache(U,G),G;var Z=W.length;if(W.charAt(0)==="#"){if(Z===4||Z===5){var X=parseInt(W.slice(1,4),16);if(!(X>=0&&X<=4095)){setRgba(G,0,0,0,1);return}return setRgba(G,(X&3840)>>4|(X&3840)>>8,X&240|(X&240)>>4,X&15|(X&15)<<4,Z===5?parseInt(W.slice(4),16)/15:1),putToCache(U,G),G}else if(Z===7||Z===9){var X=parseInt(W.slice(1,7),16);if(!(X>=0&&X<=16777215)){setRgba(G,0,0,0,1);return}return setRgba(G,(X&16711680)>>16,(X&65280)>>8,X&255,Z===9?parseInt(W.slice(7),16)/255:1),putToCache(U,G),G}return}var K=W.indexOf("("),Q=W.indexOf(")");if(K!==-1&&Q+1===Z){var ee=W.substr(0,K),te=W.substr(K+1,Q-(K+1)).split(","),re=1;switch(ee){case"rgba":if(te.length!==4)return te.length===3?setRgba(G,+te[0],+te[1],+te[2],1):setRgba(G,0,0,0,1);re=parseCssFloat(te.pop());case"rgb":if(te.length>=3)return setRgba(G,parseCssInt(te[0]),parseCssInt(te[1]),parseCssInt(te[2]),te.length===3?re:parseCssFloat(te[3])),putToCache(U,G),G;setRgba(G,0,0,0,1);return;case"hsla":if(te.length!==4){setRgba(G,0,0,0,1);return}return te[3]=parseCssFloat(te[3]),hsla2rgba(te,G),putToCache(U,G),G;case"hsl":if(te.length!==3){setRgba(G,0,0,0,1);return}return hsla2rgba(te,G),putToCache(U,G),G;default:return}}setRgba(G,0,0,0,1)}}function hsla2rgba(U,G){var H=(parseFloat(U[0])%360+360)%360/360,W=parseCssFloat(U[1]),Z=parseCssFloat(U[2]),X=Z<=.5?Z*(W+1):Z+W-Z*W,K=Z*2-X;return G=G||[],setRgba(G,clampCssByte(cssHueToRgb(K,X,H+1/3)*255),clampCssByte(cssHueToRgb(K,X,H)*255),clampCssByte(cssHueToRgb(K,X,H-1/3)*255),1),U.length===4&&(G[3]=U[3]),G}function rgba2hsla(U){if(U){var G=U[0]/255,H=U[1]/255,W=U[2]/255,Z=Math.min(G,H,W),X=Math.max(G,H,W),K=X-Z,Q=(X+Z)/2,ee,te;if(K===0)ee=0,te=0;else{Q<.5?te=K/(X+Z):te=K/(2-X-Z);var re=((X-G)/6+K/2)/K,ae=((X-H)/6+K/2)/K,ne=((X-W)/6+K/2)/K;G===X?ee=ne-ae:H===X?ee=1/3+re-ne:W===X&&(ee=2/3+ae-re),ee<0&&(ee+=1),ee>1&&(ee-=1)}var ie=[ee*360,te,Q];return U[3]!=null&&ie.push(U[3]),ie}}function lift(U,G){var H=parse(U);if(H){for(var W=0;W<3;W++)G<0?H[W]=H[W]*(1-G)|0:H[W]=(255-H[W])*G+H[W]|0,H[W]>255?H[W]=255:H[W]<0&&(H[W]=0);return stringify(H,H.length===4?"rgba":"rgb")}}function fastLerp(U,G,H){if(!(!(G&&G.length)||!(U>=0&&U<=1))){H=H||[];var W=U*(G.length-1),Z=Math.floor(W),X=Math.ceil(W),K=G[Z],Q=G[X],ee=W-Z;return H[0]=clampCssByte(lerpNumber(K[0],Q[0],ee)),H[1]=clampCssByte(lerpNumber(K[1],Q[1],ee)),H[2]=clampCssByte(lerpNumber(K[2],Q[2],ee)),H[3]=clampCssFloat(lerpNumber(K[3],Q[3],ee)),H}}function lerp(U,G,H){if(!(!(G&&G.length)||!(U>=0&&U<=1))){var W=U*(G.length-1),Z=Math.floor(W),X=Math.ceil(W),K=parse(G[Z]),Q=parse(G[X]),ee=W-Z,te=stringify([clampCssByte(lerpNumber(K[0],Q[0],ee)),clampCssByte(lerpNumber(K[1],Q[1],ee)),clampCssByte(lerpNumber(K[2],Q[2],ee)),clampCssFloat(lerpNumber(K[3],Q[3],ee))],"rgba");return H?{color:te,leftIndex:Z,rightIndex:X,value:W}:te}}function modifyHSL(U,G,H,W){var Z=parse(U);if(U)return Z=rgba2hsla(Z),G!=null&&(Z[0]=clampCssAngle(isFunction(G)?G(Z[0]):G)),H!=null&&(Z[1]=parseCssFloat(isFunction(H)?H(Z[1]):H)),W!=null&&(Z[2]=parseCssFloat(isFunction(W)?W(Z[2]):W)),stringify(hsla2rgba(Z),"rgba")}function modifyAlpha(U,G){var H=parse(U);if(H&&G!=null)return H[3]=clampCssFloat(G),stringify(H,"rgba")}function stringify(U,G){if(!(!U||!U.length)){var H=U[0]+","+U[1]+","+U[2];return(G==="rgba"||G==="hsva"||G==="hsla")&&(H+=","+U[3]),G+"("+H+")"}}function lum(U,G){var H=parse(U);return H?(.299*H[0]+.587*H[1]+.114*H[2])*H[3]/255+(1-H[3])*G:0}var liftedColorCache=new LRU(100);function liftColor(U){if(isString(U)){var G=liftedColorCache.get(U);return G||(G=lift(U,-.1),liftedColorCache.put(U,G)),G}else if(isGradientObject(U)){var H=extend({},U);return H.colorStops=map$1(U.colorStops,function(W){return{offset:W.offset,color:lift(W.color,-.1)}}),H}return U}var mathRound$1=Math.round;function normalizeColor(U){var G;if(!U||U==="transparent")U="none";else if(typeof U=="string"&&U.indexOf("rgba")>-1){var H=parse(U);H&&(U="rgb("+H[0]+","+H[1]+","+H[2]+")",G=H[3])}return{color:U,opacity:G??1}}var EPSILON$3=1e-4;function isAroundZero(U){return U<EPSILON$3&&U>-EPSILON$3}function round3(U){return mathRound$1(U*1e3)/1e3}function round4(U){return mathRound$1(U*1e4)/1e4}function getMatrixStr(U){return"matrix("+round3(U[0])+","+round3(U[1])+","+round3(U[2])+","+round3(U[3])+","+round4(U[4])+","+round4(U[5])+")"}var TEXT_ALIGN_TO_ANCHOR={left:"start",right:"end",center:"middle",middle:"middle"};function adjustTextY$1(U,G,H){return H==="top"?U+=G/2:H==="bottom"&&(U-=G/2),U}function hasShadow(U){return U&&(U.shadowBlur||U.shadowOffsetX||U.shadowOffsetY)}function getShadowKey(U){var G=U.style,H=U.getGlobalScale();return[G.shadowColor,(G.shadowBlur||0).toFixed(2),(G.shadowOffsetX||0).toFixed(2),(G.shadowOffsetY||0).toFixed(2),H[0],H[1]].join(",")}function isImagePattern(U){return U&&!!U.image}function isSVGPattern(U){return U&&!!U.svgElement}function isPattern(U){return isImagePattern(U)||isSVGPattern(U)}function isLinearGradient(U){return U.type==="linear"}function isRadialGradient(U){return U.type==="radial"}function isGradient(U){return U&&(U.type==="linear"||U.type==="radial")}function getIdURL(U){return"url(#"+U+")"}function getPathPrecision(U){var G=U.getGlobalScale(),H=Math.max(G[0],G[1]);return Math.max(Math.ceil(Math.log(H)/Math.log(10)),1)}function getSRTTransformString(U){var G=U.x||0,H=U.y||0,W=(U.rotation||0)*RADIAN_TO_DEGREE,Z=retrieve2(U.scaleX,1),X=retrieve2(U.scaleY,1),K=U.skewX||0,Q=U.skewY||0,ee=[];return(G||H)&&ee.push("translate("+G+"px,"+H+"px)"),W&&ee.push("rotate("+W+")"),(Z!==1||X!==1)&&ee.push("scale("+Z+","+X+")"),(K||Q)&&ee.push("skew("+mathRound$1(K*RADIAN_TO_DEGREE)+"deg, "+mathRound$1(Q*RADIAN_TO_DEGREE)+"deg)"),ee.join(" ")}var encodeBase64=(function(){return env.hasGlobalWindow&&isFunction(window.btoa)?function(U){return window.btoa(unescape(encodeURIComponent(U)))}:typeof Buffer<"u"?function(U){return Buffer.from(U).toString("base64")}:function(U){return process.env.NODE_ENV!=="production"&&logError("Base64 isn't natively supported in the current environment."),null}})(),arraySlice=Array.prototype.slice;function interpolateNumber$1(U,G,H){return(G-U)*H+U}function interpolate1DArray(U,G,H,W){for(var Z=G.length,X=0;X<Z;X++)U[X]=interpolateNumber$1(G[X],H[X],W);return U}function interpolate2DArray(U,G,H,W){for(var Z=G.length,X=Z&&G[0].length,K=0;K<Z;K++){U[K]||(U[K]=[]);for(var Q=0;Q<X;Q++)U[K][Q]=interpolateNumber$1(G[K][Q],H[K][Q],W)}return U}function add1DArray(U,G,H,W){for(var Z=G.length,X=0;X<Z;X++)U[X]=G[X]+H[X]*W;return U}function add2DArray(U,G,H,W){for(var Z=G.length,X=Z&&G[0].length,K=0;K<Z;K++){U[K]||(U[K]=[]);for(var Q=0;Q<X;Q++)U[K][Q]=G[K][Q]+H[K][Q]*W}return U}function fillColorStops(U,G){for(var H=U.length,W=G.length,Z=H>W?G:U,X=Math.min(H,W),K=Z[X-1]||{color:[0,0,0,0],offset:0},Q=X;Q<Math.max(H,W);Q++)Z.push({offset:K.offset,color:K.color.slice()})}function fillArray(U,G,H){var W=U,Z=G;if(!(!W.push||!Z.push)){var X=W.length,K=Z.length;if(X!==K){var Q=X>K;if(Q)W.length=K;else for(var ee=X;ee<K;ee++)W.push(H===1?Z[ee]:arraySlice.call(Z[ee]))}for(var te=W[0]&&W[0].length,ee=0;ee<W.length;ee++)if(H===1)isNaN(W[ee])&&(W[ee]=Z[ee]);else for(var re=0;re<te;re++)isNaN(W[ee][re])&&(W[ee][re]=Z[ee][re])}}function cloneValue(U){if(isArrayLike(U)){var G=U.length;if(isArrayLike(U[0])){for(var H=[],W=0;W<G;W++)H.push(arraySlice.call(U[W]));return H}return arraySlice.call(U)}return U}function rgba2String(U){return U[0]=Math.floor(U[0])||0,U[1]=Math.floor(U[1])||0,U[2]=Math.floor(U[2])||0,U[3]=U[3]==null?1:U[3],"rgba("+U.join(",")+")"}function guessArrayDim(U){return isArrayLike(U&&U[0])?2:1}var VALUE_TYPE_NUMBER=0,VALUE_TYPE_1D_ARRAY=1,VALUE_TYPE_2D_ARRAY=2,VALUE_TYPE_COLOR=3,VALUE_TYPE_LINEAR_GRADIENT=4,VALUE_TYPE_RADIAL_GRADIENT=5,VALUE_TYPE_UNKOWN=6;function isGradientValueType(U){return U===VALUE_TYPE_LINEAR_GRADIENT||U===VALUE_TYPE_RADIAL_GRADIENT}function isArrayValueType(U){return U===VALUE_TYPE_1D_ARRAY||U===VALUE_TYPE_2D_ARRAY}var tmpRgba=[0,0,0,0],Track=(function(){function U(G){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=G}return U.prototype.isFinished=function(){return this._finished},U.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},U.prototype.needsAnimate=function(){return this.keyframes.length>=1},U.prototype.getAdditiveTrack=function(){return this._additiveTrack},U.prototype.addKeyframe=function(G,H,W){this._needsSort=!0;var Z=this.keyframes,X=Z.length,K=!1,Q=VALUE_TYPE_UNKOWN,ee=H;if(isArrayLike(H)){var te=guessArrayDim(H);Q=te,(te===1&&!isNumber(H[0])||te===2&&!isNumber(H[0][0]))&&(K=!0)}else if(isNumber(H)&&!eqNaN(H))Q=VALUE_TYPE_NUMBER;else if(isString(H))if(!isNaN(+H))Q=VALUE_TYPE_NUMBER;else{var re=parse(H);re&&(ee=re,Q=VALUE_TYPE_COLOR)}else if(isGradientObject(H)){var ae=extend({},ee);ae.colorStops=map$1(H.colorStops,function(ie){return{offset:ie.offset,color:parse(ie.color)}}),isLinearGradient(H)?Q=VALUE_TYPE_LINEAR_GRADIENT:isRadialGradient(H)&&(Q=VALUE_TYPE_RADIAL_GRADIENT),ee=ae}X===0?this.valType=Q:(Q!==this.valType||Q===VALUE_TYPE_UNKOWN)&&(K=!0),this.discrete=this.discrete||K;var ne={time:G,value:ee,rawValue:H,percent:0};return W&&(ne.easing=W,ne.easingFunc=isFunction(W)?W:easingFuncs[W]||createCubicEasingFunc(W)),Z.push(ne),ne},U.prototype.prepare=function(G,H){var W=this.keyframes;this._needsSort&&W.sort(function(se,le){return se.time-le.time});for(var Z=this.valType,X=W.length,K=W[X-1],Q=this.discrete,ee=isArrayValueType(Z),te=isGradientValueType(Z),re=0;re<X;re++){var ae=W[re],ne=ae.value,ie=K.value;ae.percent=ae.time/G,Q||(ee&&re!==X-1?fillArray(ne,ie,Z):te&&fillColorStops(ne.colorStops,ie.colorStops))}if(!Q&&Z!==VALUE_TYPE_RADIAL_GRADIENT&&H&&this.needsAnimate()&&H.needsAnimate()&&Z===H.valType&&!H._finished){this._additiveTrack=H;for(var oe=W[0].value,re=0;re<X;re++)Z===VALUE_TYPE_NUMBER?W[re].additiveValue=W[re].value-oe:Z===VALUE_TYPE_COLOR?W[re].additiveValue=add1DArray([],W[re].value,oe,-1):isArrayValueType(Z)&&(W[re].additiveValue=Z===VALUE_TYPE_1D_ARRAY?add1DArray([],W[re].value,oe,-1):add2DArray([],W[re].value,oe,-1))}},U.prototype.step=function(G,H){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var W=this._additiveTrack!=null,Z=W?"additiveValue":"value",X=this.valType,K=this.keyframes,Q=K.length,ee=this.propName,te=X===VALUE_TYPE_COLOR,re,ae=this._lastFr,ne=Math.min,ie,oe;if(Q===1)ie=oe=K[0];else{if(H<0)re=0;else if(H<this._lastFrP){var se=ne(ae+1,Q-1);for(re=se;re>=0&&!(K[re].percent<=H);re--);re=ne(re,Q-2)}else{for(re=ae;re<Q&&!(K[re].percent>H);re++);re=ne(re-1,Q-2)}oe=K[re+1],ie=K[re]}if(ie&&oe){this._lastFr=re,this._lastFrP=H;var le=oe.percent-ie.percent,ue=le===0?1:ne((H-ie.percent)/le,1);oe.easingFunc&&(ue=oe.easingFunc(ue));var ce=W?this._additiveValue:te?tmpRgba:G[ee];if((isArrayValueType(X)||te)&&!ce&&(ce=this._additiveValue=[]),this.discrete)G[ee]=ue<1?ie.rawValue:oe.rawValue;else if(isArrayValueType(X))X===VALUE_TYPE_1D_ARRAY?interpolate1DArray(ce,ie[Z],oe[Z],ue):interpolate2DArray(ce,ie[Z],oe[Z],ue);else if(isGradientValueType(X)){var fe=ie[Z],he=oe[Z],ve=X===VALUE_TYPE_LINEAR_GRADIENT;G[ee]={type:ve?"linear":"radial",x:interpolateNumber$1(fe.x,he.x,ue),y:interpolateNumber$1(fe.y,he.y,ue),colorStops:map$1(fe.colorStops,function(pe,ge){var me=he.colorStops[ge];return{offset:interpolateNumber$1(pe.offset,me.offset,ue),color:rgba2String(interpolate1DArray([],pe.color,me.color,ue))}}),global:he.global},ve?(G[ee].x2=interpolateNumber$1(fe.x2,he.x2,ue),G[ee].y2=interpolateNumber$1(fe.y2,he.y2,ue)):G[ee].r=interpolateNumber$1(fe.r,he.r,ue)}else if(te)interpolate1DArray(ce,ie[Z],oe[Z],ue),W||(G[ee]=rgba2String(ce));else{var de=interpolateNumber$1(ie[Z],oe[Z],ue);W?this._additiveValue=de:G[ee]=de}W&&this._addToTarget(G)}}},U.prototype._addToTarget=function(G){var H=this.valType,W=this.propName,Z=this._additiveValue;H===VALUE_TYPE_NUMBER?G[W]=G[W]+Z:H===VALUE_TYPE_COLOR?(parse(G[W],tmpRgba),add1DArray(tmpRgba,tmpRgba,Z,1),G[W]=rgba2String(tmpRgba)):H===VALUE_TYPE_1D_ARRAY?add1DArray(G[W],G[W],Z,1):H===VALUE_TYPE_2D_ARRAY&&add2DArray(G[W],G[W],Z,1)},U})(),Animator=(function(){function U(G,H,W,Z){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=G,this._loop=H,H&&Z){logError("Can' use additive animation on looped animation.");return}this._additiveAnimators=Z,this._allowDiscrete=W}return U.prototype.getMaxTime=function(){return this._maxTime},U.prototype.getDelay=function(){return this._delay},U.prototype.getLoop=function(){return this._loop},U.prototype.getTarget=function(){return this._target},U.prototype.changeTarget=function(G){this._target=G},U.prototype.when=function(G,H,W){return this.whenWithKeys(G,H,keys(H),W)},U.prototype.whenWithKeys=function(G,H,W,Z){for(var X=this._tracks,K=0;K<W.length;K++){var Q=W[K],ee=X[Q];if(!ee){ee=X[Q]=new Track(Q);var te=void 0,re=this._getAdditiveTrack(Q);if(re){var ae=re.keyframes,ne=ae[ae.length-1];te=ne&&ne.value,re.valType===VALUE_TYPE_COLOR&&te&&(te=rgba2String(te))}else te=this._target[Q];if(te==null)continue;G>0&&ee.addKeyframe(0,cloneValue(te),Z),this._trackKeys.push(Q)}ee.addKeyframe(G,cloneValue(H[Q]),Z)}return this._maxTime=Math.max(this._maxTime,G),this},U.prototype.pause=function(){this._clip.pause(),this._paused=!0},U.prototype.resume=function(){this._clip.resume(),this._paused=!1},U.prototype.isPaused=function(){return!!this._paused},U.prototype.duration=function(G){return this._maxTime=G,this._force=!0,this},U.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var G=this._doneCbs;if(G)for(var H=G.length,W=0;W<H;W++)G[W].call(this)},U.prototype._abortedCallback=function(){this._setTracksFinished();var G=this.animation,H=this._abortedCbs;if(G&&G.removeClip(this._clip),this._clip=null,H)for(var W=0;W<H.length;W++)H[W].call(this)},U.prototype._setTracksFinished=function(){for(var G=this._tracks,H=this._trackKeys,W=0;W<H.length;W++)G[H[W]].setFinished()},U.prototype._getAdditiveTrack=function(G){var H,W=this._additiveAnimators;if(W)for(var Z=0;Z<W.length;Z++){var X=W[Z].getTrack(G);X&&(H=X)}return H},U.prototype.start=function(G){if(!(this._started>0)){this._started=1;for(var H=this,W=[],Z=this._maxTime||0,X=0;X<this._trackKeys.length;X++){var K=this._trackKeys[X],Q=this._tracks[K],ee=this._getAdditiveTrack(K),te=Q.keyframes,re=te.length;if(Q.prepare(Z,ee),Q.needsAnimate())if(!this._allowDiscrete&&Q.discrete){var ae=te[re-1];ae&&(H._target[Q.propName]=ae.rawValue),Q.setFinished()}else W.push(Q)}if(W.length||this._force){var ne=new Clip({life:Z,loop:this._loop,delay:this._delay||0,onframe:function(ie){H._started=2;var oe=H._additiveAnimators;if(oe){for(var se=!1,le=0;le<oe.length;le++)if(oe[le]._clip){se=!0;break}se||(H._additiveAnimators=null)}for(var le=0;le<W.length;le++)W[le].step(H._target,ie);var ue=H._onframeCbs;if(ue)for(var le=0;le<ue.length;le++)ue[le](H._target,ie)},ondestroy:function(){H._doneCallback()}});this._clip=ne,this.animation&&this.animation.addClip(ne),G&&ne.setEasing(G)}else this._doneCallback();return this}},U.prototype.stop=function(G){if(this._clip){var H=this._clip;G&&H.onframe(1),this._abortedCallback()}},U.prototype.delay=function(G){return this._delay=G,this},U.prototype.during=function(G){return G&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(G)),this},U.prototype.done=function(G){return G&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(G)),this},U.prototype.aborted=function(G){return G&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(G)),this},U.prototype.getClip=function(){return this._clip},U.prototype.getTrack=function(G){return this._tracks[G]},U.prototype.getTracks=function(){var G=this;return map$1(this._trackKeys,function(H){return G._tracks[H]})},U.prototype.stopTracks=function(G,H){if(!G.length||!this._clip)return!0;for(var W=this._tracks,Z=this._trackKeys,X=0;X<G.length;X++){var K=W[G[X]];K&&!K.isFinished()&&(H?K.step(this._target,1):this._started===1&&K.step(this._target,0),K.setFinished())}for(var Q=!0,X=0;X<Z.length;X++)if(!W[Z[X]].isFinished()){Q=!1;break}return Q&&this._abortedCallback(),Q},U.prototype.saveTo=function(G,H,W){if(G){H=H||this._trackKeys;for(var Z=0;Z<H.length;Z++){var X=H[Z],K=this._tracks[X];if(!(!K||K.isFinished())){var Q=K.keyframes,ee=Q[W?0:Q.length-1];ee&&(G[X]=cloneValue(ee.rawValue))}}}},U.prototype.__changeFinalValue=function(G,H){H=H||keys(G);for(var W=0;W<H.length;W++){var Z=H[W],X=this._tracks[Z];if(X){var K=X.keyframes;if(K.length>1){var Q=K.pop();X.addKeyframe(Q.time,G[Z]),X.prepare(this._maxTime,X.getAdditiveTrack())}}}},U})();function getTime(){return new Date().getTime()}var Animation=(function(U){__extends(G,U);function G(H){var W=U.call(this)||this;return W._running=!1,W._time=0,W._pausedTime=0,W._pauseStart=0,W._paused=!1,H=H||{},W.stage=H.stage||{},W}return G.prototype.addClip=function(H){H.animation&&this.removeClip(H),this._head?(this._tail.next=H,H.prev=this._tail,H.next=null,this._tail=H):this._head=this._tail=H,H.animation=this},G.prototype.addAnimator=function(H){H.animation=this;var W=H.getClip();W&&this.addClip(W)},G.prototype.removeClip=function(H){if(H.animation){var W=H.prev,Z=H.next;W?W.next=Z:this._head=Z,Z?Z.prev=W:this._tail=W,H.next=H.prev=H.animation=null}},G.prototype.removeAnimator=function(H){var W=H.getClip();W&&this.removeClip(W),H.animation=null},G.prototype.update=function(H){for(var W=getTime()-this._pausedTime,Z=W-this._time,X=this._head;X;){var K=X.next,Q=X.step(W,Z);Q&&(X.ondestroy(),this.removeClip(X)),X=K}this._time=W,H||(this.trigger("frame",Z),this.stage.update&&this.stage.update())},G.prototype._startLoop=function(){var H=this;this._running=!0;function W(){H._running&&(requestAnimationFrame$1(W),!H._paused&&H.update())}requestAnimationFrame$1(W)},G.prototype.start=function(){this._running||(this._time=getTime(),this._pausedTime=0,this._startLoop())},G.prototype.stop=function(){this._running=!1},G.prototype.pause=function(){this._paused||(this._pauseStart=getTime(),this._paused=!0)},G.prototype.resume=function(){this._paused&&(this._pausedTime+=getTime()-this._pauseStart,this._paused=!1)},G.prototype.clear=function(){for(var H=this._head;H;){var W=H.next;H.prev=H.next=H.animation=null,H=W}this._head=this._tail=null},G.prototype.isFinished=function(){return this._head==null},G.prototype.animate=function(H,W){W=W||{},this.start();var Z=new Animator(H,W.loop);return this.addAnimator(Z),Z},G})(Eventful),TOUCH_CLICK_DELAY=300,globalEventSupported=env.domSupported,localNativeListenerNames=(function(){var U=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],G=["touchstart","touchend","touchmove"],H={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},W=map$1(U,function(Z){var X=Z.replace("mouse","pointer");return H.hasOwnProperty(X)?X:Z});return{mouse:U,touch:G,pointer:W}})(),globalNativeListenerNames={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},wheelEventSupported=!1;function isPointerFromTouch(U){var G=U.pointerType;return G==="pen"||G==="touch"}function setTouchTimer(U){U.touching=!0,U.touchTimer!=null&&(clearTimeout(U.touchTimer),U.touchTimer=null),U.touchTimer=setTimeout(function(){U.touching=!1,U.touchTimer=null},700)}function markTouch(U){U&&(U.zrByTouch=!0)}function normalizeGlobalEvent(U,G){return normalizeEvent(U.dom,new FakeGlobalEvent(U,G),!0)}function isLocalEl(U,G){for(var H=G,W=!1;H&&H.nodeType!==9&&!(W=H.domBelongToZr||H!==G&&H===U.painterRoot);)H=H.parentNode;return W}var FakeGlobalEvent=(function(){function U(G,H){this.stopPropagation=noop,this.stopImmediatePropagation=noop,this.preventDefault=noop,this.type=H.type,this.target=this.currentTarget=G.dom,this.pointerType=H.pointerType,this.clientX=H.clientX,this.clientY=H.clientY}return U})(),localDOMHandlers={mousedown:function(U){U=normalizeEvent(this.dom,U),this.__mayPointerCapture=[U.zrX,U.zrY],this.trigger("mousedown",U)},mousemove:function(U){U=normalizeEvent(this.dom,U);var G=this.__mayPointerCapture;G&&(U.zrX!==G[0]||U.zrY!==G[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",U)},mouseup:function(U){U=normalizeEvent(this.dom,U),this.__togglePointerCapture(!1),this.trigger("mouseup",U)},mouseout:function(U){U=normalizeEvent(this.dom,U);var G=U.toElement||U.relatedTarget;isLocalEl(this,G)||(this.__pointerCapturing&&(U.zrEventControl="no_globalout"),this.trigger("mouseout",U))},wheel:function(U){wheelEventSupported=!0,U=normalizeEvent(this.dom,U),this.trigger("mousewheel",U)},mousewheel:function(U){wheelEventSupported||(U=normalizeEvent(this.dom,U),this.trigger("mousewheel",U))},touchstart:function(U){U=normalizeEvent(this.dom,U),markTouch(U),this.__lastTouchMoment=new Date,this.handler.processGesture(U,"start"),localDOMHandlers.mousemove.call(this,U),localDOMHandlers.mousedown.call(this,U)},touchmove:function(U){U=normalizeEvent(this.dom,U),markTouch(U),this.handler.processGesture(U,"change"),localDOMHandlers.mousemove.call(this,U)},touchend:function(U){U=normalizeEvent(this.dom,U),markTouch(U),this.handler.processGesture(U,"end"),localDOMHandlers.mouseup.call(this,U),+new Date-+this.__lastTouchMoment<TOUCH_CLICK_DELAY&&localDOMHandlers.click.call(this,U)},pointerdown:function(U){localDOMHandlers.mousedown.call(this,U)},pointermove:function(U){isPointerFromTouch(U)||localDOMHandlers.mousemove.call(this,U)},pointerup:function(U){localDOMHandlers.mouseup.call(this,U)},pointerout:function(U){isPointerFromTouch(U)||localDOMHandlers.mouseout.call(this,U)}};each$f(["click","dblclick","contextmenu"],function(U){localDOMHandlers[U]=function(G){G=normalizeEvent(this.dom,G),this.trigger(U,G)}});var globalDOMHandlers={pointermove:function(U){isPointerFromTouch(U)||globalDOMHandlers.mousemove.call(this,U)},pointerup:function(U){globalDOMHandlers.mouseup.call(this,U)},mousemove:function(U){this.trigger("mousemove",U)},mouseup:function(U){var G=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",U),G&&(U.zrEventControl="only_globalout",this.trigger("mouseout",U))}};function mountLocalDOMEventListeners(U,G){var H=G.domHandlers;env.pointerEventsSupported?each$f(localNativeListenerNames.pointer,function(W){mountSingleDOMEventListener(G,W,function(Z){H[W].call(U,Z)})}):(env.touchEventsSupported&&each$f(localNativeListenerNames.touch,function(W){mountSingleDOMEventListener(G,W,function(Z){H[W].call(U,Z),setTouchTimer(G)})}),each$f(localNativeListenerNames.mouse,function(W){mountSingleDOMEventListener(G,W,function(Z){Z=getNativeEvent(Z),G.touching||H[W].call(U,Z)})}))}function mountGlobalDOMEventListeners(U,G){env.pointerEventsSupported?each$f(globalNativeListenerNames.pointer,H):env.touchEventsSupported||each$f(globalNativeListenerNames.mouse,H);function H(W){function Z(X){X=getNativeEvent(X),isLocalEl(U,X.target)||(X=normalizeGlobalEvent(U,X),G.domHandlers[W].call(U,X))}mountSingleDOMEventListener(G,W,Z,{capture:!0})}}function mountSingleDOMEventListener(U,G,H,W){U.mounted[G]=H,U.listenerOpts[G]=W,addEventListener(U.domTarget,G,H,W)}function unmountDOMEventListeners(U){var G=U.mounted;for(var H in G)G.hasOwnProperty(H)&&removeEventListener(U.domTarget,H,G[H],U.listenerOpts[H]);U.mounted={}}var DOMHandlerScope=(function(){function U(G,H){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=G,this.domHandlers=H}return U})(),HandlerDomProxy=(function(U){__extends(G,U);function G(H,W){var Z=U.call(this)||this;return Z.__pointerCapturing=!1,Z.dom=H,Z.painterRoot=W,Z._localHandlerScope=new DOMHandlerScope(H,localDOMHandlers),globalEventSupported&&(Z._globalHandlerScope=new DOMHandlerScope(document,globalDOMHandlers)),mountLocalDOMEventListeners(Z,Z._localHandlerScope),Z}return G.prototype.dispose=function(){unmountDOMEventListeners(this._localHandlerScope),globalEventSupported&&unmountDOMEventListeners(this._globalHandlerScope)},G.prototype.setCursor=function(H){this.dom.style&&(this.dom.style.cursor=H||"default")},G.prototype.__togglePointerCapture=function(H){if(this.__mayPointerCapture=null,globalEventSupported&&+this.__pointerCapturing^+H){this.__pointerCapturing=H;var W=this._globalHandlerScope;H?mountGlobalDOMEventListeners(this,W):unmountDOMEventListeners(W)}},G})(Eventful),dpr=1;env.hasGlobalWindow&&(dpr=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var devicePixelRatio=dpr,DARK_MODE_THRESHOLD=.4,DARK_LABEL_COLOR="#333",LIGHT_LABEL_COLOR="#ccc",LIGHTER_LABEL_COLOR="#eee",mIdentity=identity,EPSILON$2=5e-5;function isNotAroundZero(U){return U>EPSILON$2||U<-EPSILON$2}var scaleTmp=[],tmpTransform=[],originTransform=create$1(),abs=Math.abs,Transformable=(function(){function U(){}return U.prototype.getLocalTransform=function(G){return U.getLocalTransform(this,G)},U.prototype.setPosition=function(G){this.x=G[0],this.y=G[1]},U.prototype.setScale=function(G){this.scaleX=G[0],this.scaleY=G[1]},U.prototype.setSkew=function(G){this.skewX=G[0],this.skewY=G[1]},U.prototype.setOrigin=function(G){this.originX=G[0],this.originY=G[1]},U.prototype.needLocalTransform=function(){return isNotAroundZero(this.rotation)||isNotAroundZero(this.x)||isNotAroundZero(this.y)||isNotAroundZero(this.scaleX-1)||isNotAroundZero(this.scaleY-1)||isNotAroundZero(this.skewX)||isNotAroundZero(this.skewY)},U.prototype.updateTransform=function(){var G=this.parent&&this.parent.transform,H=this.needLocalTransform(),W=this.transform;if(!(H||G)){W&&(mIdentity(W),this.invTransform=null);return}W=W||create$1(),H?this.getLocalTransform(W):mIdentity(W),G&&(H?mul(W,G,W):copy(W,G)),this.transform=W,this._resolveGlobalScaleRatio(W)},U.prototype._resolveGlobalScaleRatio=function(G){var H=this.globalScaleRatio;if(H!=null&&H!==1){this.getGlobalScale(scaleTmp);var W=scaleTmp[0]<0?-1:1,Z=scaleTmp[1]<0?-1:1,X=((scaleTmp[0]-W)*H+W)/scaleTmp[0]||0,K=((scaleTmp[1]-Z)*H+Z)/scaleTmp[1]||0;G[0]*=X,G[1]*=X,G[2]*=K,G[3]*=K}this.invTransform=this.invTransform||create$1(),invert(this.invTransform,G)},U.prototype.getComputedTransform=function(){for(var G=this,H=[];G;)H.push(G),G=G.parent;for(;G=H.pop();)G.updateTransform();return this.transform},U.prototype.setLocalTransform=function(G){if(G){var H=G[0]*G[0]+G[1]*G[1],W=G[2]*G[2]+G[3]*G[3],Z=Math.atan2(G[1],G[0]),X=Math.PI/2+Z-Math.atan2(G[3],G[2]);W=Math.sqrt(W)*Math.cos(X),H=Math.sqrt(H),this.skewX=X,this.skewY=0,this.rotation=-Z,this.x=+G[4],this.y=+G[5],this.scaleX=H,this.scaleY=W,this.originX=0,this.originY=0}},U.prototype.decomposeTransform=function(){if(this.transform){var G=this.parent,H=this.transform;G&&G.transform&&(G.invTransform=G.invTransform||create$1(),mul(tmpTransform,G.invTransform,H),H=tmpTransform);var W=this.originX,Z=this.originY;(W||Z)&&(originTransform[4]=W,originTransform[5]=Z,mul(tmpTransform,H,originTransform),tmpTransform[4]-=W,tmpTransform[5]-=Z,H=tmpTransform),this.setLocalTransform(H)}},U.prototype.getGlobalScale=function(G){var H=this.transform;return G=G||[],H?(G[0]=Math.sqrt(H[0]*H[0]+H[1]*H[1]),G[1]=Math.sqrt(H[2]*H[2]+H[3]*H[3]),H[0]<0&&(G[0]=-G[0]),H[3]<0&&(G[1]=-G[1]),G):(G[0]=1,G[1]=1,G)},U.prototype.transformCoordToLocal=function(G,H){var W=[G,H],Z=this.invTransform;return Z&&applyTransform$1(W,W,Z),W},U.prototype.transformCoordToGlobal=function(G,H){var W=[G,H],Z=this.transform;return Z&&applyTransform$1(W,W,Z),W},U.prototype.getLineScale=function(){var G=this.transform;return G&&abs(G[0]-1)>1e-10&&abs(G[3]-1)>1e-10?Math.sqrt(abs(G[0]*G[3]-G[2]*G[1])):1},U.prototype.copyTransform=function(G){copyTransform(this,G)},U.getLocalTransform=function(G,H){H=H||[];var W=G.originX||0,Z=G.originY||0,X=G.scaleX,K=G.scaleY,Q=G.anchorX,ee=G.anchorY,te=G.rotation||0,re=G.x,ae=G.y,ne=G.skewX?Math.tan(G.skewX):0,ie=G.skewY?Math.tan(-G.skewY):0;if(W||Z||Q||ee){var oe=W+Q,se=Z+ee;H[4]=-oe*X-ne*se*K,H[5]=-se*K-ie*oe*X}else H[4]=H[5]=0;return H[0]=X,H[3]=K,H[1]=ie*X,H[2]=ne*K,te&&rotate(H,H,te),H[4]+=W+re,H[5]+=Z+ae,H},U.initDefaultProps=(function(){var G=U.prototype;G.scaleX=G.scaleY=G.globalScaleRatio=1,G.x=G.y=G.originX=G.originY=G.skewX=G.skewY=G.rotation=G.anchorX=G.anchorY=0})(),U})(),TRANSFORMABLE_PROPS=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function copyTransform(U,G){for(var H=0;H<TRANSFORMABLE_PROPS.length;H++){var W=TRANSFORMABLE_PROPS[H];U[W]=G[W]}}function ensureFontMeasureInfo(U){_fontMeasureInfoCache||(_fontMeasureInfoCache=new LRU(100)),U=U||DEFAULT_FONT;var G=_fontMeasureInfoCache.get(U);return G||(G={font:U,strWidthCache:new LRU(500),asciiWidthMap:null,asciiWidthMapTried:!1,stWideCharWidth:platformApi.measureText("国",U).width,asciiCharWidth:platformApi.measureText("a",U).width},_fontMeasureInfoCache.put(U,G)),G}var _fontMeasureInfoCache;function tryCreateASCIIWidthMap(U){if(!(_getASCIIWidthMapLongCount>=GET_ASCII_WIDTH_LONG_COUNT_MAX)){U=U||DEFAULT_FONT;for(var G=[],H=+new Date,W=0;W<=127;W++)G[W]=platformApi.measureText(String.fromCharCode(W),U).width;var Z=+new Date-H;return Z>16?_getASCIIWidthMapLongCount=GET_ASCII_WIDTH_LONG_COUNT_MAX:Z>2&&_getASCIIWidthMapLongCount++,G}}var _getASCIIWidthMapLongCount=0,GET_ASCII_WIDTH_LONG_COUNT_MAX=5;function measureCharWidth(U,G){return U.asciiWidthMapTried||(U.asciiWidthMap=tryCreateASCIIWidthMap(U.font),U.asciiWidthMapTried=!0),0<=G&&G<=127?U.asciiWidthMap!=null?U.asciiWidthMap[G]:U.asciiCharWidth:U.stWideCharWidth}function measureWidth(U,G){var H=U.strWidthCache,W=H.get(G);return W==null&&(W=platformApi.measureText(G,U.font).width,H.put(G,W)),W}function innerGetBoundingRect(U,G,H,W){var Z=measureWidth(ensureFontMeasureInfo(G),U),X=getLineHeight(G),K=adjustTextX(0,Z,H),Q=adjustTextY(0,X,W),ee=new BoundingRect(K,Q,Z,X);return ee}function getBoundingRect(U,G,H,W){var Z=((U||"")+"").split(`
|
|
9
|
+
`),X=Z.length;if(X===1)return innerGetBoundingRect(Z[0],G,H,W);for(var K=new BoundingRect(0,0,0,0),Q=0;Q<Z.length;Q++){var ee=innerGetBoundingRect(Z[Q],G,H,W);Q===0?K.copy(ee):K.union(ee)}return K}function adjustTextX(U,G,H,W){return H==="right"?W?U+=G:U-=G:H==="center"&&(W?U+=G/2:U-=G/2),U}function adjustTextY(U,G,H,W){return H==="middle"?W?U+=G/2:U-=G/2:H==="bottom"&&(W?U+=G:U-=G),U}function getLineHeight(U){return ensureFontMeasureInfo(U).stWideCharWidth}function parsePercent$1(U,G){return typeof U=="string"?U.lastIndexOf("%")>=0?parseFloat(U)/100*G:parseFloat(U):U}function calculateTextPosition(U,G,H){var W=G.position||"inside",Z=G.distance!=null?G.distance:5,X=H.height,K=H.width,Q=X/2,ee=H.x,te=H.y,re="left",ae="top";if(W instanceof Array)ee+=parsePercent$1(W[0],H.width),te+=parsePercent$1(W[1],H.height),re=null,ae=null;else switch(W){case"left":ee-=Z,te+=Q,re="right",ae="middle";break;case"right":ee+=Z+K,te+=Q,ae="middle";break;case"top":ee+=K/2,te-=Z,re="center",ae="bottom";break;case"bottom":ee+=K/2,te+=X+Z,re="center";break;case"inside":ee+=K/2,te+=Q,re="center",ae="middle";break;case"insideLeft":ee+=Z,te+=Q,ae="middle";break;case"insideRight":ee+=K-Z,te+=Q,re="right",ae="middle";break;case"insideTop":ee+=K/2,te+=Z,re="center";break;case"insideBottom":ee+=K/2,te+=X-Z,re="center",ae="bottom";break;case"insideTopLeft":ee+=Z,te+=Z;break;case"insideTopRight":ee+=K-Z,te+=Z,re="right";break;case"insideBottomLeft":ee+=Z,te+=X-Z,ae="bottom";break;case"insideBottomRight":ee+=K-Z,te+=X-Z,re="right",ae="bottom";break}return U=U||{},U.x=ee,U.y=te,U.align=re,U.verticalAlign=ae,U}var PRESERVED_NORMAL_STATE="__zr_normal__",PRIMARY_STATES_KEYS$1=TRANSFORMABLE_PROPS.concat(["ignore"]),DEFAULT_ANIMATABLE_MAP=reduce(TRANSFORMABLE_PROPS,function(U,G){return U[G]=!0,U},{ignore:!1}),tmpTextPosCalcRes={},tmpBoundingRect=new BoundingRect(0,0,0,0),tmpInnerTextTrans=[],Element=(function(){function U(G){this.id=guid(),this.animators=[],this.currentStates=[],this.states={},this._init(G)}return U.prototype._init=function(G){this.attr(G)},U.prototype.drift=function(G,H,W){switch(this.draggable){case"horizontal":H=0;break;case"vertical":G=0;break}var Z=this.transform;Z||(Z=this.transform=[1,0,0,1,0,0]),Z[4]+=G,Z[5]+=H,this.decomposeTransform(),this.markRedraw()},U.prototype.beforeUpdate=function(){},U.prototype.afterUpdate=function(){},U.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},U.prototype.updateInnerText=function(G){var H=this._textContent;if(H&&(!H.ignore||G)){this.textConfig||(this.textConfig={});var W=this.textConfig,Z=W.local,X=H.innerTransformable,K=void 0,Q=void 0,ee=!1;X.parent=Z?this:null;var te=!1;X.copyTransform(H);var re=W.position!=null,ae=W.autoOverflowArea,ne=void 0;if((ae||re)&&(ne=tmpBoundingRect,W.layoutRect?ne.copy(W.layoutRect):ne.copy(this.getBoundingRect()),Z||ne.applyTransform(this.transform)),re){this.calculateTextPosition?this.calculateTextPosition(tmpTextPosCalcRes,W,ne):calculateTextPosition(tmpTextPosCalcRes,W,ne),X.x=tmpTextPosCalcRes.x,X.y=tmpTextPosCalcRes.y,K=tmpTextPosCalcRes.align,Q=tmpTextPosCalcRes.verticalAlign;var ie=W.origin;if(ie&&W.rotation!=null){var oe=void 0,se=void 0;ie==="center"?(oe=ne.width*.5,se=ne.height*.5):(oe=parsePercent$1(ie[0],ne.width),se=parsePercent$1(ie[1],ne.height)),te=!0,X.originX=-X.x+oe+(Z?0:ne.x),X.originY=-X.y+se+(Z?0:ne.y)}}W.rotation!=null&&(X.rotation=W.rotation);var le=W.offset;le&&(X.x+=le[0],X.y+=le[1],te||(X.originX=-le[0],X.originY=-le[1]));var ue=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(ae){var ce=ue.overflowRect=ue.overflowRect||new BoundingRect(0,0,0,0);X.getLocalTransform(tmpInnerTextTrans),invert(tmpInnerTextTrans,tmpInnerTextTrans),BoundingRect.copy(ce,ne),ce.applyTransform(tmpInnerTextTrans)}else ue.overflowRect=null;var fe=W.inside==null?typeof W.position=="string"&&W.position.indexOf("inside")>=0:W.inside,he=void 0,ve=void 0,de=void 0;fe&&this.canBeInsideText()?(he=W.insideFill,ve=W.insideStroke,(he==null||he==="auto")&&(he=this.getInsideTextFill()),(ve==null||ve==="auto")&&(ve=this.getInsideTextStroke(he),de=!0)):(he=W.outsideFill,ve=W.outsideStroke,(he==null||he==="auto")&&(he=this.getOutsideFill()),(ve==null||ve==="auto")&&(ve=this.getOutsideStroke(he),de=!0)),he=he||"#000",(he!==ue.fill||ve!==ue.stroke||de!==ue.autoStroke||K!==ue.align||Q!==ue.verticalAlign)&&(ee=!0,ue.fill=he,ue.stroke=ve,ue.autoStroke=de,ue.align=K,ue.verticalAlign=Q,H.setDefaultTextStyle(ue)),H.__dirty|=REDRAW_BIT,ee&&H.dirtyStyle(!0)}},U.prototype.canBeInsideText=function(){return!0},U.prototype.getInsideTextFill=function(){return"#fff"},U.prototype.getInsideTextStroke=function(G){return"#000"},U.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?LIGHT_LABEL_COLOR:DARK_LABEL_COLOR},U.prototype.getOutsideStroke=function(G){var H=this.__zr&&this.__zr.getBackgroundColor(),W=typeof H=="string"&&parse(H);W||(W=[255,255,255,1]);for(var Z=W[3],X=this.__zr.isDarkMode(),K=0;K<3;K++)W[K]=W[K]*Z+(X?0:255)*(1-Z);return W[3]=1,stringify(W,"rgba")},U.prototype.traverse=function(G,H){},U.prototype.attrKV=function(G,H){G==="textConfig"?this.setTextConfig(H):G==="textContent"?this.setTextContent(H):G==="clipPath"?this.setClipPath(H):G==="extra"?(this.extra=this.extra||{},extend(this.extra,H)):this[G]=H},U.prototype.hide=function(){this.ignore=!0,this.markRedraw()},U.prototype.show=function(){this.ignore=!1,this.markRedraw()},U.prototype.attr=function(G,H){if(typeof G=="string")this.attrKV(G,H);else if(isObject$3(G))for(var W=G,Z=keys(W),X=0;X<Z.length;X++){var K=Z[X];this.attrKV(K,G[K])}return this.markRedraw(),this},U.prototype.saveCurrentToNormalState=function(G){this._innerSaveToNormal(G);for(var H=this._normalState,W=0;W<this.animators.length;W++){var Z=this.animators[W],X=Z.__fromStateTransition;if(!(Z.getLoop()||X&&X!==PRESERVED_NORMAL_STATE)){var K=Z.targetName,Q=K?H[K]:H;Z.saveTo(Q)}}},U.prototype._innerSaveToNormal=function(G){var H=this._normalState;H||(H=this._normalState={}),G.textConfig&&!H.textConfig&&(H.textConfig=this.textConfig),this._savePrimaryToNormal(G,H,PRIMARY_STATES_KEYS$1)},U.prototype._savePrimaryToNormal=function(G,H,W){for(var Z=0;Z<W.length;Z++){var X=W[Z];G[X]!=null&&!(X in H)&&(H[X]=this[X])}},U.prototype.hasState=function(){return this.currentStates.length>0},U.prototype.getState=function(G){return this.states[G]},U.prototype.ensureState=function(G){var H=this.states;return H[G]||(H[G]={}),H[G]},U.prototype.clearStates=function(G){this.useState(PRESERVED_NORMAL_STATE,!1,G)},U.prototype.useState=function(G,H,W,Z){var X=G===PRESERVED_NORMAL_STATE,K=this.hasState();if(!(!K&&X)){var Q=this.currentStates,ee=this.stateTransition;if(!(indexOf(Q,G)>=0&&(H||Q.length===1))){var te;if(this.stateProxy&&!X&&(te=this.stateProxy(G)),te||(te=this.states&&this.states[G]),!te&&!X){logError("State "+G+" not exists.");return}X||this.saveCurrentToNormalState(te);var re=!!(te&&te.hoverLayer||Z);re&&this._toggleHoverLayerFlag(!0),this._applyStateObj(G,te,this._normalState,H,!W&&!this.__inHover&&ee&&ee.duration>0,ee);var ae=this._textContent,ne=this._textGuide;return ae&&ae.useState(G,H,W,re),ne&&ne.useState(G,H,W,re),X?(this.currentStates=[],this._normalState={}):H?this.currentStates.push(G):this.currentStates=[G],this._updateAnimationTargets(),this.markRedraw(),!re&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~REDRAW_BIT),te}}},U.prototype.useStates=function(G,H,W){if(!G.length)this.clearStates();else{var Z=[],X=this.currentStates,K=G.length,Q=K===X.length;if(Q){for(var ee=0;ee<K;ee++)if(G[ee]!==X[ee]){Q=!1;break}}if(Q)return;for(var ee=0;ee<K;ee++){var te=G[ee],re=void 0;this.stateProxy&&(re=this.stateProxy(te,G)),re||(re=this.states[te]),re&&Z.push(re)}var ae=Z[K-1],ne=!!(ae&&ae.hoverLayer||W);ne&&this._toggleHoverLayerFlag(!0);var ie=this._mergeStates(Z),oe=this.stateTransition;this.saveCurrentToNormalState(ie),this._applyStateObj(G.join(","),ie,this._normalState,!1,!H&&!this.__inHover&&oe&&oe.duration>0,oe);var se=this._textContent,le=this._textGuide;se&&se.useStates(G,H,ne),le&&le.useStates(G,H,ne),this._updateAnimationTargets(),this.currentStates=G.slice(),this.markRedraw(),!ne&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~REDRAW_BIT)}},U.prototype.isSilent=function(){for(var G=this;G;){if(G.silent)return!0;var H=G.__hostTarget;G=H?G.ignoreHostSilent?null:H:G.parent}return!1},U.prototype._updateAnimationTargets=function(){for(var G=0;G<this.animators.length;G++){var H=this.animators[G];H.targetName&&H.changeTarget(this[H.targetName])}},U.prototype.removeState=function(G){var H=indexOf(this.currentStates,G);if(H>=0){var W=this.currentStates.slice();W.splice(H,1),this.useStates(W)}},U.prototype.replaceState=function(G,H,W){var Z=this.currentStates.slice(),X=indexOf(Z,G),K=indexOf(Z,H)>=0;X>=0?K?Z.splice(X,1):Z[X]=H:W&&!K&&Z.push(H),this.useStates(Z)},U.prototype.toggleState=function(G,H){H?this.useState(G,!0):this.removeState(G)},U.prototype._mergeStates=function(G){for(var H={},W,Z=0;Z<G.length;Z++){var X=G[Z];extend(H,X),X.textConfig&&(W=W||{},extend(W,X.textConfig))}return W&&(H.textConfig=W),H},U.prototype._applyStateObj=function(G,H,W,Z,X,K){var Q=!(H&&Z);H&&H.textConfig?(this.textConfig=extend({},Z?this.textConfig:W.textConfig),extend(this.textConfig,H.textConfig)):Q&&W.textConfig&&(this.textConfig=W.textConfig);for(var ee={},te=!1,re=0;re<PRIMARY_STATES_KEYS$1.length;re++){var ae=PRIMARY_STATES_KEYS$1[re],ne=X&&DEFAULT_ANIMATABLE_MAP[ae];H&&H[ae]!=null?ne?(te=!0,ee[ae]=H[ae]):this[ae]=H[ae]:Q&&W[ae]!=null&&(ne?(te=!0,ee[ae]=W[ae]):this[ae]=W[ae])}if(!X)for(var re=0;re<this.animators.length;re++){var ie=this.animators[re],oe=ie.targetName;ie.getLoop()||ie.__changeFinalValue(oe?(H||W)[oe]:H||W)}te&&this._transitionState(G,ee,K)},U.prototype._attachComponent=function(G){if(G.__zr&&!G.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(G===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var H=this.__zr;H&&G.addSelfToZr(H),G.__zr=H,G.__hostTarget=this},U.prototype._detachComponent=function(G){G.__zr&&G.removeSelfFromZr(G.__zr),G.__zr=null,G.__hostTarget=null},U.prototype.getClipPath=function(){return this._clipPath},U.prototype.setClipPath=function(G){this._clipPath&&this._clipPath!==G&&this.removeClipPath(),this._attachComponent(G),this._clipPath=G,this.markRedraw()},U.prototype.removeClipPath=function(){var G=this._clipPath;G&&(this._detachComponent(G),this._clipPath=null,this.markRedraw())},U.prototype.getTextContent=function(){return this._textContent},U.prototype.setTextContent=function(G){var H=this._textContent;if(H!==G){if(H&&H!==G&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&G.__zr&&!G.__hostTarget)throw new Error("Text element has been added to zrender.");G.innerTransformable=new Transformable,this._attachComponent(G),this._textContent=G,this.markRedraw()}},U.prototype.setTextConfig=function(G){this.textConfig||(this.textConfig={}),extend(this.textConfig,G),this.markRedraw()},U.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},U.prototype.removeTextContent=function(){var G=this._textContent;G&&(G.innerTransformable=null,this._detachComponent(G),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},U.prototype.getTextGuideLine=function(){return this._textGuide},U.prototype.setTextGuideLine=function(G){this._textGuide&&this._textGuide!==G&&this.removeTextGuideLine(),this._attachComponent(G),this._textGuide=G,this.markRedraw()},U.prototype.removeTextGuideLine=function(){var G=this._textGuide;G&&(this._detachComponent(G),this._textGuide=null,this.markRedraw())},U.prototype.markRedraw=function(){this.__dirty|=REDRAW_BIT;var G=this.__zr;G&&(this.__inHover?G.refreshHover():G.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},U.prototype.dirty=function(){this.markRedraw()},U.prototype._toggleHoverLayerFlag=function(G){this.__inHover=G;var H=this._textContent,W=this._textGuide;H&&(H.__inHover=G),W&&(W.__inHover=G)},U.prototype.addSelfToZr=function(G){if(this.__zr!==G){this.__zr=G;var H=this.animators;if(H)for(var W=0;W<H.length;W++)G.animation.addAnimator(H[W]);this._clipPath&&this._clipPath.addSelfToZr(G),this._textContent&&this._textContent.addSelfToZr(G),this._textGuide&&this._textGuide.addSelfToZr(G)}},U.prototype.removeSelfFromZr=function(G){if(this.__zr){this.__zr=null;var H=this.animators;if(H)for(var W=0;W<H.length;W++)G.animation.removeAnimator(H[W]);this._clipPath&&this._clipPath.removeSelfFromZr(G),this._textContent&&this._textContent.removeSelfFromZr(G),this._textGuide&&this._textGuide.removeSelfFromZr(G)}},U.prototype.animate=function(G,H,W){var Z=G?this[G]:this;if(process.env.NODE_ENV!=="production"&&!Z){logError('Property "'+G+'" is not existed in element '+this.id);return}var X=new Animator(Z,H,W);return G&&(X.targetName=G),this.addAnimator(X,G),X},U.prototype.addAnimator=function(G,H){var W=this.__zr,Z=this;G.during(function(){Z.updateDuringAnimation(H)}).done(function(){var X=Z.animators,K=indexOf(X,G);K>=0&&X.splice(K,1)}),this.animators.push(G),W&&W.animation.addAnimator(G),W&&W.wakeUp()},U.prototype.updateDuringAnimation=function(G){this.markRedraw()},U.prototype.stopAnimation=function(G,H){for(var W=this.animators,Z=W.length,X=[],K=0;K<Z;K++){var Q=W[K];!G||G===Q.scope?Q.stop(H):X.push(Q)}return this.animators=X,this},U.prototype.animateTo=function(G,H,W){animateTo(this,G,H,W)},U.prototype.animateFrom=function(G,H,W){animateTo(this,G,H,W,!0)},U.prototype._transitionState=function(G,H,W,Z){for(var X=animateTo(this,H,W,Z),K=0;K<X.length;K++)X[K].__fromStateTransition=G},U.prototype.getBoundingRect=function(){return null},U.prototype.getPaintRect=function(){return null},U.initDefaultProps=(function(){var G=U.prototype;G.type="element",G.name="",G.ignore=G.silent=G.ignoreHostSilent=G.isGroup=G.draggable=G.dragging=G.ignoreClip=G.__inHover=!1,G.__dirty=REDRAW_BIT;var H={};function W(X,K,Q){H[X+K+Q]||(console.warn("DEPRECATED: '"+X+"' has been deprecated. use '"+K+"', '"+Q+"' instead"),H[X+K+Q]=!0)}function Z(X,K,Q,ee){Object.defineProperty(G,X,{get:function(){if(process.env.NODE_ENV!=="production"&&W(X,Q,ee),!this[K]){var re=this[K]=[];te(this,re)}return this[K]},set:function(re){process.env.NODE_ENV!=="production"&&W(X,Q,ee),this[Q]=re[0],this[ee]=re[1],this[K]=re,te(this,re)}});function te(re,ae){Object.defineProperty(ae,0,{get:function(){return re[Q]},set:function(ne){re[Q]=ne}}),Object.defineProperty(ae,1,{get:function(){return re[ee]},set:function(ne){re[ee]=ne}})}}Object.defineProperty&&(Z("position","_legacyPos","x","y"),Z("scale","_legacyScale","scaleX","scaleY"),Z("origin","_legacyOrigin","originX","originY"))})(),U})();mixin(Element,Eventful),mixin(Element,Transformable);function animateTo(U,G,H,W,Z){H=H||{};var X=[];animateToShallow(U,"",U,G,H,W,X,Z);var K=X.length,Q=!1,ee=H.done,te=H.aborted,re=function(){Q=!0,K--,K<=0&&(Q?ee&&ee():te&&te())},ae=function(){K--,K<=0&&(Q?ee&&ee():te&&te())};K||ee&&ee(),X.length>0&&H.during&&X[0].during(function(oe,se){H.during(se)});for(var ne=0;ne<X.length;ne++){var ie=X[ne];re&&ie.done(re),ae&&ie.aborted(ae),H.force&&ie.duration(H.duration),ie.start(H.easing)}return X}function copyArrShallow(U,G,H){for(var W=0;W<H;W++)U[W]=G[W]}function is2DArray(U){return isArrayLike(U[0])}function copyValue(U,G,H){if(isArrayLike(G[H]))if(isArrayLike(U[H])||(U[H]=[]),isTypedArray(G[H])){var W=G[H].length;U[H].length!==W&&(U[H]=new G[H].constructor(W),copyArrShallow(U[H],G[H],W))}else{var Z=G[H],X=U[H],K=Z.length;if(is2DArray(Z))for(var Q=Z[0].length,ee=0;ee<K;ee++)X[ee]?copyArrShallow(X[ee],Z[ee],Q):X[ee]=Array.prototype.slice.call(Z[ee]);else copyArrShallow(X,Z,K);X.length=Z.length}else U[H]=G[H]}function isValueSame(U,G){return U===G||isArrayLike(U)&&isArrayLike(G)&&is1DArraySame(U,G)}function is1DArraySame(U,G){var H=U.length;if(H!==G.length)return!1;for(var W=0;W<H;W++)if(U[W]!==G[W])return!1;return!0}function animateToShallow(U,G,H,W,Z,X,K,Q){for(var ee=keys(W),te=Z.duration,re=Z.delay,ae=Z.additive,ne=Z.setToFinal,ie=!isObject$3(X),oe=U.animators,se=[],le=0;le<ee.length;le++){var ue=ee[le],ce=W[ue];if(ce!=null&&H[ue]!=null&&(ie||X[ue]))if(isObject$3(ce)&&!isArrayLike(ce)&&!isGradientObject(ce)){if(G){Q||(H[ue]=ce,U.updateDuringAnimation(G));continue}animateToShallow(U,ue,H[ue],ce,Z,X&&X[ue],K,Q)}else se.push(ue);else Q||(H[ue]=ce,U.updateDuringAnimation(G),se.push(ue))}var fe=se.length;if(!ae&&fe)for(var he=0;he<oe.length;he++){var ve=oe[he];if(ve.targetName===G){var de=ve.stopTracks(se);if(de){var pe=indexOf(oe,ve);oe.splice(pe,1)}}}if(Z.force||(se=filter(se,function(_e){return!isValueSame(W[_e],H[_e])}),fe=se.length),fe>0||Z.force&&!K.length){var ge=void 0,me=void 0,ye=void 0;if(Q){me={},ne&&(ge={});for(var he=0;he<fe;he++){var ue=se[he];me[ue]=H[ue],ne?ge[ue]=W[ue]:H[ue]=W[ue]}}else if(ne){ye={};for(var he=0;he<fe;he++){var ue=se[he];ye[ue]=cloneValue(H[ue]),copyValue(H,W,ue)}}var ve=new Animator(H,!1,!1,ae?filter(oe,function(xe){return xe.targetName===G}):null);ve.targetName=G,Z.scope&&(ve.scope=Z.scope),ne&&ge&&ve.whenWithKeys(0,ge,se),ye&&ve.whenWithKeys(0,ye,se),ve.whenWithKeys(te??500,Q?me:W,se).delay(re||0),U.addAnimator(ve,G),K.push(ve)}}var Group$3=(function(U){__extends(G,U);function G(H){var W=U.call(this)||this;return W.isGroup=!0,W._children=[],W.attr(H),W}return G.prototype.childrenRef=function(){return this._children},G.prototype.children=function(){return this._children.slice()},G.prototype.childAt=function(H){return this._children[H]},G.prototype.childOfName=function(H){for(var W=this._children,Z=0;Z<W.length;Z++)if(W[Z].name===H)return W[Z]},G.prototype.childCount=function(){return this._children.length},G.prototype.add=function(H){if(H&&(H!==this&&H.parent!==this&&(this._children.push(H),this._doAdd(H)),process.env.NODE_ENV!=="production"&&H.__hostTarget))throw"This elemenet has been used as an attachment";return this},G.prototype.addBefore=function(H,W){if(H&&H!==this&&H.parent!==this&&W&&W.parent===this){var Z=this._children,X=Z.indexOf(W);X>=0&&(Z.splice(X,0,H),this._doAdd(H))}return this},G.prototype.replace=function(H,W){var Z=indexOf(this._children,H);return Z>=0&&this.replaceAt(W,Z),this},G.prototype.replaceAt=function(H,W){var Z=this._children,X=Z[W];if(H&&H!==this&&H.parent!==this&&H!==X){Z[W]=H,X.parent=null;var K=this.__zr;K&&X.removeSelfFromZr(K),this._doAdd(H)}return this},G.prototype._doAdd=function(H){H.parent&&H.parent.remove(H),H.parent=this;var W=this.__zr;W&&W!==H.__zr&&H.addSelfToZr(W),W&&W.refresh()},G.prototype.remove=function(H){var W=this.__zr,Z=this._children,X=indexOf(Z,H);return X<0?this:(Z.splice(X,1),H.parent=null,W&&H.removeSelfFromZr(W),W&&W.refresh(),this)},G.prototype.removeAll=function(){for(var H=this._children,W=this.__zr,Z=0;Z<H.length;Z++){var X=H[Z];W&&X.removeSelfFromZr(W),X.parent=null}return H.length=0,this},G.prototype.eachChild=function(H,W){for(var Z=this._children,X=0;X<Z.length;X++){var K=Z[X];H.call(W,K,X)}return this},G.prototype.traverse=function(H,W){for(var Z=0;Z<this._children.length;Z++){var X=this._children[Z],K=H.call(W,X);X.isGroup&&!K&&X.traverse(H,W)}return this},G.prototype.addSelfToZr=function(H){U.prototype.addSelfToZr.call(this,H);for(var W=0;W<this._children.length;W++){var Z=this._children[W];Z.addSelfToZr(H)}},G.prototype.removeSelfFromZr=function(H){U.prototype.removeSelfFromZr.call(this,H);for(var W=0;W<this._children.length;W++){var Z=this._children[W];Z.removeSelfFromZr(H)}},G.prototype.getBoundingRect=function(H){for(var W=new BoundingRect(0,0,0,0),Z=H||this._children,X=[],K=null,Q=0;Q<Z.length;Q++){var ee=Z[Q];if(!(ee.ignore||ee.invisible)){var te=ee.getBoundingRect(),re=ee.getLocalTransform(X);re?(BoundingRect.applyTransform(W,te,re),K=K||W.clone(),K.union(W)):(K=K||te.clone(),K.union(te))}}return K||W},G})(Element);Group$3.prototype.type="group";var painterCtors={},instances$1={};function delInstance(U){delete instances$1[U]}function isDarkMode(U){if(!U)return!1;if(typeof U=="string")return lum(U,1)<DARK_MODE_THRESHOLD;if(U.colorStops){for(var G=U.colorStops,H=0,W=G.length,Z=0;Z<W;Z++)H+=lum(G[Z].color,1);return H/=W,H<DARK_MODE_THRESHOLD}return!1}var ZRender=(function(){function U(G,H,W){var Z=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,W=W||{},this.dom=H,this.id=G;var X=new Storage,K=W.renderer||"canvas";if(painterCtors[K]||(K=keys(painterCtors)[0]),process.env.NODE_ENV!=="production"&&!painterCtors[K])throw new Error("Renderer '"+K+"' is not imported. Please import it first.");W.useDirtyRect=W.useDirtyRect==null?!1:W.useDirtyRect;var Q=new painterCtors[K](H,X,W,G),ee=W.ssr||Q.ssrOnly;this.storage=X,this.painter=Q;var te=!env.node&&!env.worker&&!ee?new HandlerDomProxy(Q.getViewportRoot(),Q.root):null,re=W.useCoarsePointer,ae=re==null||re==="auto"?env.touchEventsSupported:!!re,ne=44,ie;ae&&(ie=retrieve2(W.pointerSize,ne)),this.handler=new Handler(X,Q,te,Q.root,ie),this.animation=new Animation({stage:{update:ee?null:function(){return Z._flush(!0)}}}),ee||this.animation.start()}return U.prototype.add=function(G){this._disposed||!G||(this.storage.addRoot(G),G.addSelfToZr(this),this.refresh())},U.prototype.remove=function(G){this._disposed||!G||(this.storage.delRoot(G),G.removeSelfFromZr(this),this.refresh())},U.prototype.configLayer=function(G,H){this._disposed||(this.painter.configLayer&&this.painter.configLayer(G,H),this.refresh())},U.prototype.setBackgroundColor=function(G){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(G),this.refresh(),this._backgroundColor=G,this._darkMode=isDarkMode(G))},U.prototype.getBackgroundColor=function(){return this._backgroundColor},U.prototype.setDarkMode=function(G){this._darkMode=G},U.prototype.isDarkMode=function(){return this._darkMode},U.prototype.refreshImmediately=function(G){this._disposed||(G||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},U.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},U.prototype.flush=function(){this._disposed||this._flush(!1)},U.prototype._flush=function(G){var H,W=getTime();this._needsRefresh&&(H=!0,this.refreshImmediately(G)),this._needsRefreshHover&&(H=!0,this.refreshHoverImmediately());var Z=getTime();H?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:Z-W})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},U.prototype.setSleepAfterStill=function(G){this._sleepAfterStill=G},U.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},U.prototype.refreshHover=function(){this._needsRefreshHover=!0},U.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},U.prototype.resize=function(G){this._disposed||(G=G||{},this.painter.resize(G.width,G.height),this.handler.resize())},U.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},U.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},U.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},U.prototype.setCursorStyle=function(G){this._disposed||this.handler.setCursorStyle(G)},U.prototype.findHover=function(G,H){if(!this._disposed)return this.handler.findHover(G,H)},U.prototype.on=function(G,H,W){return this._disposed||this.handler.on(G,H,W),this},U.prototype.off=function(G,H){this._disposed||this.handler.off(G,H)},U.prototype.trigger=function(G,H){this._disposed||this.handler.trigger(G,H)},U.prototype.clear=function(){if(!this._disposed){for(var G=this.storage.getRoots(),H=0;H<G.length;H++)G[H]instanceof Group$3&&G[H].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},U.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,delInstance(this.id))},U})();function init$2(U,G){var H=new ZRender(guid(),U,G);return instances$1[H.id]=H,H}function registerPainter(U,G){painterCtors[U]=G}var ssrDataGetter;function getElementSSRData(U){if(typeof ssrDataGetter=="function")return ssrDataGetter(U)}function registerSSRDataGetter(U){ssrDataGetter=U}var RADIAN_EPSILON=1e-4,ROUND_SUPPORTED_PRECISION_MAX=20;function _trim(U){return U.replace(/^\s+|\s+$/g,"")}var mathMin$a=Math.min,mathMax$a=Math.max,mathAbs$4=Math.abs;function linearMap$2(U,G,H,W){var Z=G[0],X=G[1],K=H[0],Q=H[1],ee=X-Z,te=Q-K;if(ee===0)return te===0?K:(K+Q)/2;if(W)if(ee>0){if(U<=Z)return K;if(U>=X)return Q}else{if(U>=Z)return K;if(U<=X)return Q}else{if(U===Z)return K;if(U===X)return Q}return(U-Z)/ee*te+K}var parsePercent=parsePositionOption;function parsePositionOption(U,G,H){switch(U){case"center":case"middle":U="50%";break;case"left":case"top":U="0%";break;case"right":case"bottom":U="100%";break}return parsePositionSizeOption(U,G,H)}function parsePositionSizeOption(U,G,H){return isString(U)?_trim(U).match(/%$/)?parseFloat(U)/100*G+(H||0):parseFloat(U):U==null?NaN:+U}function round$4(U,G,H){return G==null&&(G=10),G=Math.min(Math.max(0,G),ROUND_SUPPORTED_PRECISION_MAX),U=(+U).toFixed(G),H?U:+U}function asc$2(U){return U.sort(function(G,H){return G-H}),U}function getPrecision(U){if(U=+U,isNaN(U))return 0;if(U>1e-14){for(var G=1,H=0;H<15;H++,G*=10)if(Math.round(U*G)/G===U)return H}return getPrecisionSafe(U)}function getPrecisionSafe(U){var G=U.toString().toLowerCase(),H=G.indexOf("e"),W=H>0?+G.slice(H+1):0,Z=H>0?H:G.length,X=G.indexOf("."),K=X<0?0:Z-1-X;return Math.max(0,K-W)}function getPixelPrecision(U,G){var H=Math.log,W=Math.LN10,Z=Math.floor(H(U[1]-U[0])/W),X=Math.round(H(mathAbs$4(G[1]-G[0]))/W),K=Math.min(Math.max(-Z+X,0),20);return isFinite(K)?K:20}function getPercentSeats(U,G){var H=reduce(U,function(ie,oe){return ie+(isNaN(oe)?0:oe)},0);if(H===0)return[];for(var W=Math.pow(10,G),Z=map$1(U,function(ie){return(isNaN(ie)?0:ie)/H*W*100}),X=W*100,K=map$1(Z,function(ie){return Math.floor(ie)}),Q=reduce(K,function(ie,oe){return ie+oe},0),ee=map$1(Z,function(ie,oe){return ie-K[oe]});Q<X;){for(var te=Number.NEGATIVE_INFINITY,re=null,ae=0,ne=ee.length;ae<ne;++ae)ee[ae]>te&&(te=ee[ae],re=ae);++K[re],ee[re]=0,++Q}return map$1(K,function(ie){return ie/W})}function addSafe(U,G){var H=Math.max(getPrecision(U),getPrecision(G)),W=U+G;return H>ROUND_SUPPORTED_PRECISION_MAX?W:round$4(W,H)}var MAX_SAFE_INTEGER=9007199254740991;function remRadian(U){var G=Math.PI*2;return(U%G+G)%G}function isRadianAroundZero(U){return U>-RADIAN_EPSILON&&U<RADIAN_EPSILON}var TIME_REG=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function parseDate(U){if(U instanceof Date)return U;if(isString(U)){var G=TIME_REG.exec(U);if(!G)return new Date(NaN);if(G[8]){var H=+G[4]||0;return G[8].toUpperCase()!=="Z"&&(H-=+G[8].slice(0,3)),new Date(Date.UTC(+G[1],+(G[2]||1)-1,+G[3]||1,H,+(G[5]||0),+G[6]||0,G[7]?+G[7].substring(0,3):0))}else return new Date(+G[1],+(G[2]||1)-1,+G[3]||1,+G[4]||0,+(G[5]||0),+G[6]||0,G[7]?+G[7].substring(0,3):0)}else if(U==null)return new Date(NaN);return new Date(Math.round(U))}function quantity(U){return Math.pow(10,quantityExponent(U))}function quantityExponent(U){if(U===0)return 0;var G=Math.floor(Math.log(U)/Math.LN10);return U/Math.pow(10,G)>=10&&G++,G}function nice(U,G){var H=quantityExponent(U),W=Math.pow(10,H),Z=U/W,X;return Z<1.5?X=1:Z<2.5?X=2:Z<4?X=3:Z<7?X=5:X=10,U=X*W,H>=-20?+U.toFixed(H<0?-H:0):U}function quantile(U,G){var H=(U.length-1)*G+1,W=Math.floor(H),Z=+U[W-1],X=H-W;return X?Z+X*(U[W]-Z):Z}function reformIntervals(U){U.sort(function(ee,te){return Q(ee,te,0)?-1:1});for(var G=-1/0,H=1,W=0;W<U.length;){for(var Z=U[W].interval,X=U[W].close,K=0;K<2;K++)Z[K]<=G&&(Z[K]=G,X[K]=K?1:1-H),G=Z[K],H=X[K];Z[0]===Z[1]&&X[0]*X[1]!==1?U.splice(W,1):W++}return U;function Q(ee,te,re){return ee.interval[re]<te.interval[re]||ee.interval[re]===te.interval[re]&&(ee.close[re]-te.close[re]===(re?-1:1)||!re&&Q(ee,te,1))}}function numericToNumber(U){var G=parseFloat(U);return G==U&&(G!==0||!isString(U)||U.indexOf("x")<=0)?G:NaN}function isNumeric(U){return!isNaN(numericToNumber(U))}function getRandomIdBase(){return Math.round(Math.random()*9)}function getGreatestCommonDividor(U,G){return G===0?U:getGreatestCommonDividor(G,U%G)}function getLeastCommonMultiple(U,G){return U==null?G:G==null?U:U*G/getGreatestCommonDividor(U,G)}var ECHARTS_PREFIX="[ECharts] ",storedLogs={},hasConsole=typeof console<"u"&&console.warn&&console.log;function outputLog(U,G,H){if(hasConsole){if(H){if(storedLogs[G])return;storedLogs[G]=!0}console[U](ECHARTS_PREFIX+G)}}function log(U,G){outputLog("log",U,G)}function warn(U,G){outputLog("warn",U,G)}function error(U,G){outputLog("error",U,G)}function deprecateLog(U){process.env.NODE_ENV!=="production"&&outputLog("warn","DEPRECATED: "+U,!0)}function deprecateReplaceLog(U,G,H){process.env.NODE_ENV!=="production"&&deprecateLog((H?"["+H+"]":"")+(U+" is deprecated; use "+G+" instead."))}function makePrintable(){for(var U=[],G=0;G<arguments.length;G++)U[G]=arguments[G];var H="";if(process.env.NODE_ENV!=="production"){var W=function(Z){return Z===void 0?"undefined":Z===1/0?"Infinity":Z===-1/0?"-Infinity":eqNaN(Z)?"NaN":Z instanceof Date?"Date("+Z.toISOString()+")":isFunction(Z)?"function () { ... }":isRegExp(Z)?Z+"":null};H=map$1(U,function(Z){if(isString(Z))return Z;var X=W(Z);if(X!=null)return X;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(Z,function(K,Q){var ee=W(Q);return ee??Q})}catch{return"?"}else return"?"}).join(" ")}return H}function throwError(U){throw new Error(U)}function interpolateNumber(U,G,H){return(G-U)*H+U}var DUMMY_COMPONENT_NAME_PREFIX="series\0",INTERNAL_COMPONENT_ID_PREFIX="\0_ec_\0";function normalizeToArray(U){return U instanceof Array?U:U==null?[]:[U]}function defaultEmphasis(U,G,H){if(U){U[G]=U[G]||{},U.emphasis=U.emphasis||{},U.emphasis[G]=U.emphasis[G]||{};for(var W=0,Z=H.length;W<Z;W++){var X=H[W];!U.emphasis[G].hasOwnProperty(X)&&U[G].hasOwnProperty(X)&&(U.emphasis[G][X]=U[G][X])}}}var TEXT_STYLE_OPTIONS=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function getDataItemValue(U){return isObject$3(U)&&!isArray$1(U)&&!(U instanceof Date)?U.value:U}function isDataItemOption(U){return isObject$3(U)&&!(U instanceof Array)}function mappingToExists(U,G,H){var W=H==="normalMerge",Z=H==="replaceMerge",X=H==="replaceAll";U=U||[],G=(G||[]).slice();var K=createHashMap();each$f(G,function(ee,te){if(!isObject$3(ee)){G[te]=null;return}process.env.NODE_ENV!=="production"&&(ee.id!=null&&!isValidIdOrName(ee.id)&&warnInvalidateIdOrName(ee.id),ee.name!=null&&!isValidIdOrName(ee.name)&&warnInvalidateIdOrName(ee.name))});var Q=prepareResult(U,K,H);return(W||Z)&&mappingById(Q,U,K,G),W&&mappingByName(Q,G),W||Z?mappingByIndex(Q,G,Z):X&&mappingInReplaceAllMode(Q,G),makeIdAndName(Q),Q}function prepareResult(U,G,H){var W=[];if(H==="replaceAll")return W;for(var Z=0;Z<U.length;Z++){var X=U[Z];X&&X.id!=null&&G.set(X.id,Z),W.push({existing:H==="replaceMerge"||isComponentIdInternal(X)?null:X,newOption:null,keyInfo:null,brandNew:null})}return W}function mappingById(U,G,H,W){each$f(W,function(Z,X){if(!(!Z||Z.id==null)){var K=makeComparableKey(Z.id),Q=H.get(K);if(Q!=null){var ee=U[Q];assert(!ee.newOption,'Duplicated option on id "'+K+'".'),ee.newOption=Z,ee.existing=G[Q],W[X]=null}}})}function mappingByName(U,G){each$f(G,function(H,W){if(!(!H||H.name==null))for(var Z=0;Z<U.length;Z++){var X=U[Z].existing;if(!U[Z].newOption&&X&&(X.id==null||H.id==null)&&!isComponentIdInternal(H)&&!isComponentIdInternal(X)&&keyExistAndEqual("name",X,H)){U[Z].newOption=H,G[W]=null;return}}})}function mappingByIndex(U,G,H){each$f(G,function(W){if(W){for(var Z,X=0;(Z=U[X])&&(Z.newOption||isComponentIdInternal(Z.existing)||Z.existing&&W.id!=null&&!keyExistAndEqual("id",W,Z.existing));)X++;Z?(Z.newOption=W,Z.brandNew=H):U.push({newOption:W,brandNew:H,existing:null,keyInfo:null}),X++}})}function mappingInReplaceAllMode(U,G){each$f(G,function(H){U.push({newOption:H,brandNew:!0,existing:null,keyInfo:null})})}function makeIdAndName(U){var G=createHashMap();each$f(U,function(H){var W=H.existing;W&&G.set(W.id,H)}),each$f(U,function(H){var W=H.newOption;assert(!W||W.id==null||!G.get(W.id)||G.get(W.id)===H,"id duplicates: "+(W&&W.id)),W&&W.id!=null&&G.set(W.id,H),!H.keyInfo&&(H.keyInfo={})}),each$f(U,function(H,W){var Z=H.existing,X=H.newOption,K=H.keyInfo;if(isObject$3(X)){if(K.name=X.name!=null?makeComparableKey(X.name):Z?Z.name:DUMMY_COMPONENT_NAME_PREFIX+W,Z)K.id=makeComparableKey(Z.id);else if(X.id!=null)K.id=makeComparableKey(X.id);else{var Q=0;do K.id="\0"+K.name+"\0"+Q++;while(G.get(K.id))}G.set(K.id,H)}})}function keyExistAndEqual(U,G,H){var W=convertOptionIdName(G[U],null),Z=convertOptionIdName(H[U],null);return W!=null&&Z!=null&&W===Z}function makeComparableKey(U){if(process.env.NODE_ENV!=="production"&&U==null)throw new Error;return convertOptionIdName(U,"")}function convertOptionIdName(U,G){return U==null?G:isString(U)?U:isNumber(U)||isStringSafe(U)?U+"":G}function warnInvalidateIdOrName(U){process.env.NODE_ENV!=="production"&&warn("`"+U+"` is invalid id or name. Must be a string or number.")}function isValidIdOrName(U){return isStringSafe(U)||isNumeric(U)}function isNameSpecified(U){var G=U.name;return!!(G&&G.indexOf(DUMMY_COMPONENT_NAME_PREFIX))}function isComponentIdInternal(U){return U&&U.id!=null&&makeComparableKey(U.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX)===0}function makeInternalComponentId(U){return INTERNAL_COMPONENT_ID_PREFIX+U}function setComponentTypeToKeyInfo(U,G,H){each$f(U,function(W){var Z=W.newOption;isObject$3(Z)&&(W.keyInfo.mainType=G,W.keyInfo.subType=determineSubType(G,Z,W.existing,H))})}function determineSubType(U,G,H,W){var Z=G.type?G.type:H?H.subType:W.determineSubType(U,G);return Z}function compressBatches(U,G){var H={},W={};return Z(U||[],H),Z(G||[],W,H),[X(H),X(W)];function Z(K,Q,ee){for(var te=0,re=K.length;te<re;te++){var ae=convertOptionIdName(K[te].seriesId,null);if(ae==null)return;for(var ne=normalizeToArray(K[te].dataIndex),ie=ee&&ee[ae],oe=0,se=ne.length;oe<se;oe++){var le=ne[oe];ie&&ie[le]?ie[le]=null:(Q[ae]||(Q[ae]={}))[le]=1}}}function X(K,Q){var ee=[];for(var te in K)if(K.hasOwnProperty(te)&&K[te]!=null)if(Q)ee.push(+te);else{var re=X(K[te],!0);re.length&&ee.push({seriesId:te,dataIndex:re})}return ee}}function queryDataIndex(U,G){if(G.dataIndexInside!=null)return G.dataIndexInside;if(G.dataIndex!=null)return isArray$1(G.dataIndex)?map$1(G.dataIndex,function(H){return U.indexOfRawIndex(H)}):U.indexOfRawIndex(G.dataIndex);if(G.name!=null)return isArray$1(G.name)?map$1(G.name,function(H){return U.indexOfName(H)}):U.indexOfName(G.name)}function makeInner(){var U="__ec_inner_"+innerUniqueIndex++;return function(G){return G[U]||(G[U]={})}}var innerUniqueIndex=getRandomIdBase();function parseFinder$1(U,G,H){var W=preParseFinder(G,H),Z=W.mainTypeSpecified,X=W.queryOptionMap,K=W.others,Q=K,ee=H?H.defaultMainType:null;return!Z&&ee&&X.set(ee,{}),X.each(function(te,re){var ae=queryReferringComponents(U,re,te,{useDefault:ee===re,enableAll:H&&H.enableAll!=null?H.enableAll:!0,enableNone:H&&H.enableNone!=null?H.enableNone:!0});Q[re+"Models"]=ae.models,Q[re+"Model"]=ae.models[0]}),Q}function preParseFinder(U,G){var H;if(isString(U)){var W={};W[U+"Index"]=0,H=W}else H=U;var Z=createHashMap(),X={},K=!1;return each$f(H,function(Q,ee){if(ee==="dataIndex"||ee==="dataIndexInside"){X[ee]=Q;return}var te=ee.match(/^(\w+)(Index|Id|Name)$/)||[],re=te[1],ae=(te[2]||"").toLowerCase();if(!(!re||!ae||G&&G.includeMainTypes&&indexOf(G.includeMainTypes,re)<0)){K=K||!!re;var ne=Z.get(re)||Z.set(re,{});ne[ae]=Q}}),{mainTypeSpecified:K,queryOptionMap:Z,others:X}}var SINGLE_REFERRING={useDefault:!0,enableAll:!1,enableNone:!1},MULTIPLE_REFERRING={useDefault:!1,enableAll:!0,enableNone:!0};function queryReferringComponents(U,G,H,W){W=W||SINGLE_REFERRING;var Z=H.index,X=H.id,K=H.name,Q={models:null,specified:Z!=null||X!=null||K!=null};if(!Q.specified){var ee=void 0;return Q.models=W.useDefault&&(ee=U.getComponent(G))?[ee]:[],Q}if(Z==="none"||Z===!1){if(W.enableNone)return Q.models=[],Q;process.env.NODE_ENV!=="production"&&error('`"none"` or `false` is not a valid value on index option.'),Z=-1}return Z==="all"&&(W.enableAll?Z=X=K=null:(process.env.NODE_ENV!=="production"&&error('`"all"` is not a valid value on index option.'),Z=-1)),Q.models=U.queryComponents({mainType:G,index:Z,id:X,name:K}),Q}function setAttribute(U,G,H){U.setAttribute?U.setAttribute(G,H):U[G]=H}function getAttribute(U,G){return U.getAttribute?U.getAttribute(G):U[G]}function getTooltipRenderMode(U){return U==="auto"?env.domSupported?"html":"richText":U||"html"}function groupData(U,G){var H=createHashMap(),W=[];return each$f(U,function(Z){var X=G(Z);(H.get(X)||(W.push(X),H.set(X,[]))).push(Z)}),{keys:W,buckets:H}}function interpolateRawValues(U,G,H,W,Z){var X=G==null||G==="auto";if(W==null)return W;if(isNumber(W)){var K=interpolateNumber(H||0,W,Z);return round$4(K,X?Math.max(getPrecision(H||0),getPrecision(W)):G)}else{if(isString(W))return Z<1?H:W;for(var Q=[],ee=H,te=W,re=Math.max(ee?ee.length:0,te.length),ae=0;ae<re;++ae){var ne=U.getDimensionInfo(ae);if(ne&&ne.type==="ordinal")Q[ae]=(Z<1&&ee?ee:te)[ae];else{var ie=ee&&ee[ae]?ee[ae]:0,oe=te[ae],K=interpolateNumber(ie,oe,Z);Q[ae]=round$4(K,X?Math.max(getPrecision(ie),getPrecision(oe)):G)}}return Q}}var ListIterator=(function(){function U(){}return U.prototype.reset=function(G,H,W,Z){return this._list=G,this._step=Z=Z||1,this._idx=H,this._end=W??(Z>0?G.length:0),this.item=null,this.key=NaN,this},U.prototype.next=function(){return(this._step>0?this._idx<this._end:this._idx>=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},U})();function clearTmpModel(U){U.option=U.parentModel=U.ecModel=null}var TYPE_DELIMITER=".",IS_CONTAINER="___EC__COMPONENT__CONTAINER___",IS_EXTENDED_CLASS="___EC__EXTENDED_CLASS___";function parseClassType(U){var G={main:"",sub:""};if(U){var H=U.split(TYPE_DELIMITER);G.main=H[0]||"",G.sub=H[1]||""}return G}function checkClassType(U){assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(U),'componentType "'+U+'" illegal')}function isExtendedClass(U){return!!(U&&U[IS_EXTENDED_CLASS])}function enableClassExtend(U,G){U.$constructor=U,U.extend=function(H){process.env.NODE_ENV!=="production"&&each$f(G,function(X){H[X]||console.warn("Method `"+X+"` should be implemented"+(H.type?" in "+H.type:"")+".")});var W=this,Z;return isESClass(W)?Z=(function(X){__extends(K,X);function K(){return X.apply(this,arguments)||this}return K})(W):(Z=function(){(H.$constructor||W).apply(this,arguments)},inherits(Z,this)),extend(Z.prototype,H),Z[IS_EXTENDED_CLASS]=!0,Z.extend=this.extend,Z.superCall=superCall,Z.superApply=superApply,Z.superClass=W,Z}}function isESClass(U){return isFunction(U)&&/^class\s/.test(Function.prototype.toString.call(U))}function mountExtend(U,G){U.extend=G.extend}var classBase=Math.round(Math.random()*10);function enableClassCheck(U){var G=["__\0is_clz",classBase++].join("_");U.prototype[G]=!0,process.env.NODE_ENV!=="production"&&assert(!U.isInstance,'The method "is" can not be defined.'),U.isInstance=function(H){return!!(H&&H[G])}}function superCall(U,G){for(var H=[],W=2;W<arguments.length;W++)H[W-2]=arguments[W];return this.superClass.prototype[G].apply(U,H)}function superApply(U,G,H){return this.superClass.prototype[G].apply(U,H)}function enableClassManagement(U){var G={};U.registerClass=function(W){var Z=W.type||W.prototype.type;if(Z){checkClassType(Z),W.prototype.type=Z;var X=parseClassType(Z);if(!X.sub)process.env.NODE_ENV!=="production"&&G[X.main]&&console.warn(X.main+" exists."),G[X.main]=W;else if(X.sub!==IS_CONTAINER){var K=H(X);K[X.sub]=W}}return W},U.getClass=function(W,Z,X){var K=G[W];if(K&&K[IS_CONTAINER]&&(K=Z?K[Z]:null),X&&!K)throw new Error(Z?"Component "+W+"."+(Z||"")+" is used but not imported.":W+".type should be specified.");return K},U.getClassesByMainType=function(W){var Z=parseClassType(W),X=[],K=G[Z.main];return K&&K[IS_CONTAINER]?each$f(K,function(Q,ee){ee!==IS_CONTAINER&&X.push(Q)}):X.push(K),X},U.hasClass=function(W){var Z=parseClassType(W);return!!G[Z.main]},U.getAllClassMainTypes=function(){var W=[];return each$f(G,function(Z,X){W.push(X)}),W},U.hasSubTypes=function(W){var Z=parseClassType(W),X=G[Z.main];return X&&X[IS_CONTAINER]};function H(W){var Z=G[W.main];return(!Z||!Z[IS_CONTAINER])&&(Z=G[W.main]={},Z[IS_CONTAINER]=!0),Z}}function makeStyleMapper(U,G){for(var H=0;H<U.length;H++)U[H][1]||(U[H][1]=U[H][0]);return G=G||!1,function(W,Z,X){for(var K={},Q=0;Q<U.length;Q++){var ee=U[Q][1];if(!(Z&&indexOf(Z,ee)>=0||X&&indexOf(X,ee)<0)){var te=W.getShallow(ee,G);te!=null&&(K[U[Q][0]]=te)}}return K}}var AREA_STYLE_KEY_MAP=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],getAreaStyle=makeStyleMapper(AREA_STYLE_KEY_MAP),AreaStyleMixin=(function(){function U(){}return U.prototype.getAreaStyle=function(G,H){return getAreaStyle(this,G,H)},U})(),globalImageCache=new LRU(50);function findExistImage(U){if(typeof U=="string"){var G=globalImageCache.get(U);return G&&G.image}else return U}function createOrUpdateImage(U,G,H,W,Z){if(U)if(typeof U=="string"){if(G&&G.__zrImageSrc===U||!H)return G;var X=globalImageCache.get(U),K={hostEl:H,cb:W,cbPayload:Z};return X?(G=X.image,!isImageReady(G)&&X.pending.push(K)):(G=platformApi.loadImage(U,imageOnLoad,imageOnLoad),G.__zrImageSrc=U,globalImageCache.put(U,G.__cachedImgObj={image:G,pending:[K]})),G}else return U;else return G}function imageOnLoad(){var U=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var G=0;G<U.pending.length;G++){var H=U.pending[G],W=H.cb;W&&W(this,H.cbPayload),H.hostEl.dirty()}U.pending.length=0}function isImageReady(U){return U&&U.width&&U.height}var STYLE_REG=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function truncateText2(U,G,H,W,Z,X){if(!H){U.text="",U.isTruncated=!1;return}var K=(G+"").split(`
|
|
10
|
+
`);X=prepareTruncateOptions(H,W,Z,X);for(var Q=!1,ee={},te=0,re=K.length;te<re;te++)truncateSingleLine(ee,K[te],X),K[te]=ee.textLine,Q=Q||ee.isTruncated;U.text=K.join(`
|
|
11
|
+
`),U.isTruncated=Q}function prepareTruncateOptions(U,G,H,W){W=W||{};var Z=extend({},W);H=retrieve2(H,"..."),Z.maxIterations=retrieve2(W.maxIterations,2);var X=Z.minChar=retrieve2(W.minChar,0),K=Z.fontMeasureInfo=ensureFontMeasureInfo(G),Q=K.asciiCharWidth;Z.placeholder=retrieve2(W.placeholder,"");for(var ee=U=Math.max(0,U-1),te=0;te<X&&ee>=Q;te++)ee-=Q;var re=measureWidth(K,H);return re>ee&&(H="",re=0),ee=U-re,Z.ellipsis=H,Z.ellipsisWidth=re,Z.contentWidth=ee,Z.containerWidth=U,Z}function truncateSingleLine(U,G,H){var W=H.containerWidth,Z=H.contentWidth,X=H.fontMeasureInfo;if(!W){U.textLine="",U.isTruncated=!1;return}var K=measureWidth(X,G);if(K<=W){U.textLine=G,U.isTruncated=!1;return}for(var Q=0;;Q++){if(K<=Z||Q>=H.maxIterations){G+=H.ellipsis;break}var ee=Q===0?estimateLength(G,Z,X):K>0?Math.floor(G.length*Z/K):0;G=G.substr(0,ee),K=measureWidth(X,G)}G===""&&(G=H.placeholder),U.textLine=G,U.isTruncated=!0}function estimateLength(U,G,H){for(var W=0,Z=0,X=U.length;Z<X&&W<G;Z++)W+=measureCharWidth(H,U.charCodeAt(Z));return Z}function parsePlainText(U,G,H,W){var Z=formatText(U),X=G.overflow,K=G.padding,Q=K?K[1]+K[3]:0,ee=K?K[0]+K[2]:0,te=G.font,re=X==="truncate",ae=getLineHeight(te),ne=retrieve2(G.lineHeight,ae),ie=G.lineOverflow==="truncate",oe=!1,se=G.width;se==null&&H!=null&&(se=H-Q);var le=G.height;le==null&&W!=null&&(le=W-ee);var ue;se!=null&&(X==="break"||X==="breakAll")?ue=Z?wrapText(Z,G.font,se,X==="breakAll",0).lines:[]:ue=Z?Z.split(`
|
|
12
|
+
`):[];var ce=ue.length*ne;if(le==null&&(le=ce),ce>le&&ie){var fe=Math.floor(le/ne);oe=oe||ue.length>fe,ue=ue.slice(0,fe),ce=ue.length*ne}if(Z&&re&&se!=null)for(var he=prepareTruncateOptions(se,te,G.ellipsis,{minChar:G.truncateMinChar,placeholder:G.placeholder}),ve={},de=0;de<ue.length;de++)truncateSingleLine(ve,ue[de],he),ue[de]=ve.textLine,oe=oe||ve.isTruncated;for(var pe=le,ge=0,me=ensureFontMeasureInfo(te),de=0;de<ue.length;de++)ge=Math.max(measureWidth(me,ue[de]),ge);se==null&&(se=ge);var ye=se;return pe+=ee,ye+=Q,{lines:ue,height:le,outerWidth:ye,outerHeight:pe,lineHeight:ne,calculatedLineHeight:ae,contentWidth:ge,contentHeight:ce,width:se,isTruncated:oe}}var RichTextToken=(function(){function U(){}return U})(),RichTextLine=(function(){function U(G){this.tokens=[],G&&(this.tokens=G)}return U})(),RichTextContentBlock=(function(){function U(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return U})();function parseRichText(U,G,H,W,Z){var X=new RichTextContentBlock,K=formatText(U);if(!K)return X;var Q=G.padding,ee=Q?Q[1]+Q[3]:0,te=Q?Q[0]+Q[2]:0,re=G.width;re==null&&H!=null&&(re=H-ee);var ae=G.height;ae==null&&W!=null&&(ae=W-te);for(var ne=G.overflow,ie=(ne==="break"||ne==="breakAll")&&re!=null?{width:re,accumWidth:0,breakAll:ne==="breakAll"}:null,oe=STYLE_REG.lastIndex=0,se;(se=STYLE_REG.exec(K))!=null;){var le=se.index;le>oe&&pushTokens(X,K.substring(oe,le),G,ie),pushTokens(X,se[2],G,ie,se[1]),oe=STYLE_REG.lastIndex}oe<K.length&&pushTokens(X,K.substring(oe,K.length),G,ie);var ue=[],ce=0,fe=0,he=ne==="truncate",ve=G.lineOverflow==="truncate",de={};function pe(Ve,Fe,ke){Ve.width=Fe,Ve.lineHeight=ke,ce+=ke,fe=Math.max(fe,Fe)}e:for(var ge=0;ge<X.lines.length;ge++){for(var me=X.lines[ge],ye=0,_e=0,xe=0;xe<me.tokens.length;xe++){var Se=me.tokens[xe],Te=Se.styleName&&G.rich[Se.styleName]||{},be=Se.textPadding=Te.padding,Ae=be?be[1]+be[3]:0,we=Se.font=Te.font||G.font;Se.contentHeight=getLineHeight(we);var Ce=retrieve2(Te.height,Se.contentHeight);if(Se.innerHeight=Ce,be&&(Ce+=be[0]+be[2]),Se.height=Ce,Se.lineHeight=retrieve3(Te.lineHeight,G.lineHeight,Ce),Se.align=Te&&Te.align||Z,Se.verticalAlign=Te&&Te.verticalAlign||"middle",ve&&ae!=null&&ce+Se.lineHeight>ae){var Ee=X.lines.length;xe>0?(me.tokens=me.tokens.slice(0,xe),pe(me,_e,ye),X.lines=X.lines.slice(0,ge+1)):X.lines=X.lines.slice(0,ge),X.isTruncated=X.isTruncated||X.lines.length<Ee;break e}var Me=Te.width,De=Me==null||Me==="auto";if(typeof Me=="string"&&Me.charAt(Me.length-1)==="%")Se.percentWidth=Me,ue.push(Se),Se.contentWidth=measureWidth(ensureFontMeasureInfo(we),Se.text);else{if(De){var Le=Te.backgroundColor,Pe=Le&&Le.image;Pe&&(Pe=findExistImage(Pe),isImageReady(Pe)&&(Se.width=Math.max(Se.width,Pe.width*Ce/Pe.height)))}var Ie=he&&re!=null?re-_e:null;Ie!=null&&Ie<Se.width?!De||Ie<Ae?(Se.text="",Se.width=Se.contentWidth=0):(truncateText2(de,Se.text,Ie-Ae,we,G.ellipsis,{minChar:G.truncateMinChar}),Se.text=de.text,X.isTruncated=X.isTruncated||de.isTruncated,Se.width=Se.contentWidth=measureWidth(ensureFontMeasureInfo(we),Se.text)):Se.contentWidth=measureWidth(ensureFontMeasureInfo(we),Se.text)}Se.width+=Ae,_e+=Se.width,Te&&(ye=Math.max(ye,Se.lineHeight))}pe(me,_e,ye)}X.outerWidth=X.width=retrieve2(re,fe),X.outerHeight=X.height=retrieve2(ae,ce),X.contentHeight=ce,X.contentWidth=fe,X.outerWidth+=ee,X.outerHeight+=te;for(var ge=0;ge<ue.length;ge++){var Se=ue[ge],$e=Se.percentWidth;Se.width=parseInt($e,10)/100*X.width}return X}function pushTokens(U,G,H,W,Z){var X=G==="",K=Z&&H.rich[Z]||{},Q=U.lines,ee=K.font||H.font,te=!1,re,ae;if(W){var ne=K.padding,ie=ne?ne[1]+ne[3]:0;if(K.width!=null&&K.width!=="auto"){var oe=parsePercent$1(K.width,W.width)+ie;Q.length>0&&oe+W.accumWidth>W.width&&(re=G.split(`
|
|
13
|
+
`),te=!0),W.accumWidth=oe}else{var se=wrapText(G,ee,W.width,W.breakAll,W.accumWidth);W.accumWidth=se.accumWidth+ie,ae=se.linesWidths,re=se.lines}}re||(re=G.split(`
|
|
14
|
+
`));for(var le=ensureFontMeasureInfo(ee),ue=0;ue<re.length;ue++){var ce=re[ue],fe=new RichTextToken;if(fe.styleName=Z,fe.text=ce,fe.isLineHolder=!ce&&!X,typeof K.width=="number"?fe.width=K.width:fe.width=ae?ae[ue]:measureWidth(le,ce),!ue&&!te){var he=(Q[Q.length-1]||(Q[0]=new RichTextLine)).tokens,ve=he.length;ve===1&&he[0].isLineHolder?he[0]=fe:(ce||!ve||X)&&he.push(fe)}else Q.push(new RichTextLine([fe]))}}function isAlphabeticLetter(U){var G=U.charCodeAt(0);return G>=32&&G<=591||G>=880&&G<=4351||G>=4608&&G<=5119||G>=7680&&G<=8303}var breakCharMap=reduce(",&?/;] ".split(""),function(U,G){return U[G]=!0,U},{});function isWordBreakChar(U){return isAlphabeticLetter(U)?!!breakCharMap[U]:!0}function wrapText(U,G,H,W,Z){for(var X=[],K=[],Q="",ee="",te=0,re=0,ae=ensureFontMeasureInfo(G),ne=0;ne<U.length;ne++){var ie=U.charAt(ne);if(ie===`
|
|
15
|
+
`){ee&&(Q+=ee,re+=te),X.push(Q),K.push(re),Q="",ee="",te=0,re=0;continue}var oe=measureCharWidth(ae,ie.charCodeAt(0)),se=W?!1:!isWordBreakChar(ie);if(X.length?re+oe>H:Z+re+oe>H){re?(Q||ee)&&(se?(Q||(Q=ee,ee="",te=0,re=te),X.push(Q),K.push(re-te),ee+=ie,te+=oe,Q="",re=te):(ee&&(Q+=ee,ee="",te=0),X.push(Q),K.push(re),Q=ie,re=oe)):se?(X.push(ee),K.push(te),ee=ie,te=oe):(X.push(ie),K.push(oe));continue}re+=oe,se?(ee+=ie,te+=oe):(ee&&(Q+=ee,ee="",te=0),Q+=ie)}return ee&&(Q+=ee),Q&&(X.push(Q),K.push(re)),X.length===1&&(re+=Z),{accumWidth:re,lines:X,linesWidths:K}}function calcInnerTextOverflowArea(U,G,H,W,Z,X){if(U.baseX=H,U.baseY=W,U.outerWidth=U.outerHeight=null,!!G){var K=G.width*2,Q=G.height*2;BoundingRect.set(tmpCITCTextRect,adjustTextX(H,K,Z),adjustTextY(W,Q,X),K,Q),BoundingRect.intersect(G,tmpCITCTextRect,null,tmpCITCIntersectRectOpt);var ee=tmpCITCIntersectRectOpt.outIntersectRect;U.outerWidth=ee.width,U.outerHeight=ee.height,U.baseX=adjustTextX(ee.x,ee.width,Z,!0),U.baseY=adjustTextY(ee.y,ee.height,X,!0)}}var tmpCITCTextRect=new BoundingRect(0,0,0,0),tmpCITCIntersectRectOpt={outIntersectRect:{},clamp:!0};function formatText(U){return U!=null?U+="":U=""}function tSpanCreateBoundingRect(U){var G=formatText(U.text),H=U.font,W=measureWidth(ensureFontMeasureInfo(H),G),Z=getLineHeight(H);return tSpanCreateBoundingRect2(U,W,Z,null)}function tSpanCreateBoundingRect2(U,G,H,W){var Z=new BoundingRect(adjustTextX(U.x||0,G,U.textAlign),adjustTextY(U.y||0,H,U.textBaseline),G,H),X=W??(tSpanHasStroke(U)?U.lineWidth:0);return X>0&&(Z.x-=X/2,Z.y-=X/2,Z.width+=X,Z.height+=X),Z}function tSpanHasStroke(U){var G=U.stroke;return G!=null&&G!=="none"&&U.lineWidth>0}var STYLE_MAGIC_KEY="__zr_style_"+Math.round(Math.random()*10),DEFAULT_COMMON_STYLE={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},DEFAULT_COMMON_ANIMATION_PROPS={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};DEFAULT_COMMON_STYLE[STYLE_MAGIC_KEY]=!0;var PRIMARY_STATES_KEYS=["z","z2","invisible"],PRIMARY_STATES_KEYS_IN_HOVER_LAYER=["invisible"],Displayable=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype._init=function(H){for(var W=keys(H),Z=0;Z<W.length;Z++){var X=W[Z];X==="style"?this.useStyle(H[X]):U.prototype.attrKV.call(this,X,H[X])}this.style||this.useStyle({})},G.prototype.beforeBrush=function(){},G.prototype.afterBrush=function(){},G.prototype.innerBeforeBrush=function(){},G.prototype.innerAfterBrush=function(){},G.prototype.shouldBePainted=function(H,W,Z,X){var K=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&isDisplayableCulled(this,H,W)||K&&!K[0]&&!K[3])return!1;if(Z&&this.__clipPaths&&this.__clipPaths.length){for(var Q=0;Q<this.__clipPaths.length;++Q)if(this.__clipPaths[Q].isZeroArea())return!1}if(X&&this.parent)for(var ee=this.parent;ee;){if(ee.ignore)return!1;ee=ee.parent}return!0},G.prototype.contain=function(H,W){return this.rectContain(H,W)},G.prototype.traverse=function(H,W){H.call(W,this)},G.prototype.rectContain=function(H,W){var Z=this.transformCoordToLocal(H,W),X=this.getBoundingRect();return X.contain(Z[0],Z[1])},G.prototype.getPaintRect=function(){var H=this._paintRect;if(!this._paintRect||this.__dirty){var W=this.transform,Z=this.getBoundingRect(),X=this.style,K=X.shadowBlur||0,Q=X.shadowOffsetX||0,ee=X.shadowOffsetY||0;H=this._paintRect||(this._paintRect=new BoundingRect(0,0,0,0)),W?BoundingRect.applyTransform(H,Z,W):H.copy(Z),(K||Q||ee)&&(H.width+=K*2+Math.abs(Q),H.height+=K*2+Math.abs(ee),H.x=Math.min(H.x,H.x+Q-K),H.y=Math.min(H.y,H.y+ee-K));var te=this.dirtyRectTolerance;H.isZero()||(H.x=Math.floor(H.x-te),H.y=Math.floor(H.y-te),H.width=Math.ceil(H.width+1+te*2),H.height=Math.ceil(H.height+1+te*2))}return H},G.prototype.setPrevPaintRect=function(H){H?(this._prevPaintRect=this._prevPaintRect||new BoundingRect(0,0,0,0),this._prevPaintRect.copy(H)):this._prevPaintRect=null},G.prototype.getPrevPaintRect=function(){return this._prevPaintRect},G.prototype.animateStyle=function(H){return this.animate("style",H)},G.prototype.updateDuringAnimation=function(H){H==="style"?this.dirtyStyle():this.markRedraw()},G.prototype.attrKV=function(H,W){H!=="style"?U.prototype.attrKV.call(this,H,W):this.style?this.setStyle(W):this.useStyle(W)},G.prototype.setStyle=function(H,W){return typeof H=="string"?this.style[H]=W:extend(this.style,H),this.dirtyStyle(),this},G.prototype.dirtyStyle=function(H){H||this.markRedraw(),this.__dirty|=STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},G.prototype.dirty=function(){this.dirtyStyle()},G.prototype.styleChanged=function(){return!!(this.__dirty&STYLE_CHANGED_BIT)},G.prototype.styleUpdated=function(){this.__dirty&=~STYLE_CHANGED_BIT},G.prototype.createStyle=function(H){return createObject(DEFAULT_COMMON_STYLE,H)},G.prototype.useStyle=function(H){H[STYLE_MAGIC_KEY]||(H=this.createStyle(H)),this.__inHover?this.__hoverStyle=H:this.style=H,this.dirtyStyle()},G.prototype.isStyleObject=function(H){return H[STYLE_MAGIC_KEY]},G.prototype._innerSaveToNormal=function(H){U.prototype._innerSaveToNormal.call(this,H);var W=this._normalState;H.style&&!W.style&&(W.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(H,W,PRIMARY_STATES_KEYS)},G.prototype._applyStateObj=function(H,W,Z,X,K,Q){U.prototype._applyStateObj.call(this,H,W,Z,X,K,Q);var ee=!(W&&X),te;if(W&&W.style?K?X?te=W.style:(te=this._mergeStyle(this.createStyle(),Z.style),this._mergeStyle(te,W.style)):(te=this._mergeStyle(this.createStyle(),X?this.style:Z.style),this._mergeStyle(te,W.style)):ee&&(te=Z.style),te)if(K){var re=this.style;if(this.style=this.createStyle(ee?{}:re),ee)for(var ae=keys(re),ne=0;ne<ae.length;ne++){var ie=ae[ne];ie in te&&(te[ie]=te[ie],this.style[ie]=re[ie])}for(var oe=keys(te),ne=0;ne<oe.length;ne++){var ie=oe[ne];this.style[ie]=this.style[ie]}this._transitionState(H,{style:te},Q,this.getAnimationStyleProps())}else this.useStyle(te);for(var se=this.__inHover?PRIMARY_STATES_KEYS_IN_HOVER_LAYER:PRIMARY_STATES_KEYS,ne=0;ne<se.length;ne++){var ie=se[ne];W&&W[ie]!=null?this[ie]=W[ie]:ee&&Z[ie]!=null&&(this[ie]=Z[ie])}},G.prototype._mergeStates=function(H){for(var W=U.prototype._mergeStates.call(this,H),Z,X=0;X<H.length;X++){var K=H[X];K.style&&(Z=Z||{},this._mergeStyle(Z,K.style))}return Z&&(W.style=Z),W},G.prototype._mergeStyle=function(H,W){return extend(H,W),H},G.prototype.getAnimationStyleProps=function(){return DEFAULT_COMMON_ANIMATION_PROPS},G.initDefaultProps=(function(){var H=G.prototype;H.type="displayable",H.invisible=!1,H.z=0,H.z2=0,H.zlevel=0,H.culling=!1,H.cursor="pointer",H.rectHover=!1,H.incremental=!1,H._rect=null,H.dirtyRectTolerance=0,H.__dirty=REDRAW_BIT|STYLE_CHANGED_BIT})(),G})(Element),tmpRect=new BoundingRect(0,0,0,0),viewRect=new BoundingRect(0,0,0,0);function isDisplayableCulled(U,G,H){return tmpRect.copy(U.getBoundingRect()),U.transform&&tmpRect.applyTransform(U.transform),viewRect.width=G,viewRect.height=H,!tmpRect.intersect(viewRect)}var mathMin$9=Math.min,mathMax$9=Math.max,mathSin$4=Math.sin,mathCos$4=Math.cos,PI2$8=Math.PI*2,start=create$2(),end=create$2(),extremity=create$2();function fromPoints(U,G,H){if(U.length!==0){for(var W=U[0],Z=W[0],X=W[0],K=W[1],Q=W[1],ee=1;ee<U.length;ee++)W=U[ee],Z=mathMin$9(Z,W[0]),X=mathMax$9(X,W[0]),K=mathMin$9(K,W[1]),Q=mathMax$9(Q,W[1]);G[0]=Z,G[1]=K,H[0]=X,H[1]=Q}}function fromLine(U,G,H,W,Z,X){Z[0]=mathMin$9(U,H),Z[1]=mathMin$9(G,W),X[0]=mathMax$9(U,H),X[1]=mathMax$9(G,W)}var xDim=[],yDim=[];function fromCubic(U,G,H,W,Z,X,K,Q,ee,te){var re=cubicExtrema,ae=cubicAt,ne=re(U,H,Z,K,xDim);ee[0]=1/0,ee[1]=1/0,te[0]=-1/0,te[1]=-1/0;for(var ie=0;ie<ne;ie++){var oe=ae(U,H,Z,K,xDim[ie]);ee[0]=mathMin$9(oe,ee[0]),te[0]=mathMax$9(oe,te[0])}ne=re(G,W,X,Q,yDim);for(var ie=0;ie<ne;ie++){var se=ae(G,W,X,Q,yDim[ie]);ee[1]=mathMin$9(se,ee[1]),te[1]=mathMax$9(se,te[1])}ee[0]=mathMin$9(U,ee[0]),te[0]=mathMax$9(U,te[0]),ee[0]=mathMin$9(K,ee[0]),te[0]=mathMax$9(K,te[0]),ee[1]=mathMin$9(G,ee[1]),te[1]=mathMax$9(G,te[1]),ee[1]=mathMin$9(Q,ee[1]),te[1]=mathMax$9(Q,te[1])}function fromQuadratic(U,G,H,W,Z,X,K,Q){var ee=quadraticExtremum,te=quadraticAt$1,re=mathMax$9(mathMin$9(ee(U,H,Z),1),0),ae=mathMax$9(mathMin$9(ee(G,W,X),1),0),ne=te(U,H,Z,re),ie=te(G,W,X,ae);K[0]=mathMin$9(U,Z,ne),K[1]=mathMin$9(G,X,ie),Q[0]=mathMax$9(U,Z,ne),Q[1]=mathMax$9(G,X,ie)}function fromArc(U,G,H,W,Z,X,K,Q,ee){var te=min$1,re=max$1,ae=Math.abs(Z-X);if(ae%PI2$8<1e-4&&ae>1e-4){Q[0]=U-H,Q[1]=G-W,ee[0]=U+H,ee[1]=G+W;return}if(start[0]=mathCos$4(Z)*H+U,start[1]=mathSin$4(Z)*W+G,end[0]=mathCos$4(X)*H+U,end[1]=mathSin$4(X)*W+G,te(Q,start,end),re(ee,start,end),Z=Z%PI2$8,Z<0&&(Z=Z+PI2$8),X=X%PI2$8,X<0&&(X=X+PI2$8),Z>X&&!K?X+=PI2$8:Z<X&&K&&(Z+=PI2$8),K){var ne=X;X=Z,Z=ne}for(var ie=0;ie<X;ie+=Math.PI/2)ie>Z&&(extremity[0]=mathCos$4(ie)*H+U,extremity[1]=mathSin$4(ie)*W+G,te(Q,extremity,Q),re(ee,extremity,ee))}var CMD$4={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},tmpOutX=[],tmpOutY=[],min=[],max=[],min2=[],max2=[],mathMin$8=Math.min,mathMax$8=Math.max,mathCos$3=Math.cos,mathSin$3=Math.sin,mathAbs$3=Math.abs,PI$8=Math.PI,PI2$7=PI$8*2,hasTypedArray=typeof Float32Array<"u",tmpAngles=[];function modPI2(U){var G=Math.round(U/PI$8*1e8)/1e8;return G%2*PI$8}function normalizeArcAngles(U,G){var H=modPI2(U[0]);H<0&&(H+=PI2$7);var W=H-U[0],Z=U[1];Z+=W,!G&&Z-H>=PI2$7?Z=H+PI2$7:G&&H-Z>=PI2$7?Z=H-PI2$7:!G&&H>Z?Z=H+(PI2$7-modPI2(H-Z)):G&&H<Z&&(Z=H-(PI2$7-modPI2(Z-H))),U[0]=H,U[1]=Z}var PathProxy=(function(){function U(G){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,G&&(this._saveData=!1),this._saveData&&(this.data=[])}return U.prototype.increaseVersion=function(){this._version++},U.prototype.getVersion=function(){return this._version},U.prototype.setScale=function(G,H,W){W=W||0,W>0&&(this._ux=mathAbs$3(W/devicePixelRatio/G)||0,this._uy=mathAbs$3(W/devicePixelRatio/H)||0)},U.prototype.setDPR=function(G){this.dpr=G},U.prototype.setContext=function(G){this._ctx=G},U.prototype.getContext=function(){return this._ctx},U.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},U.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},U.prototype.moveTo=function(G,H){return this._drawPendingPt(),this.addData(CMD$4.M,G,H),this._ctx&&this._ctx.moveTo(G,H),this._x0=G,this._y0=H,this._xi=G,this._yi=H,this},U.prototype.lineTo=function(G,H){var W=mathAbs$3(G-this._xi),Z=mathAbs$3(H-this._yi),X=W>this._ux||Z>this._uy;if(this.addData(CMD$4.L,G,H),this._ctx&&X&&this._ctx.lineTo(G,H),X)this._xi=G,this._yi=H,this._pendingPtDist=0;else{var K=W*W+Z*Z;K>this._pendingPtDist&&(this._pendingPtX=G,this._pendingPtY=H,this._pendingPtDist=K)}return this},U.prototype.bezierCurveTo=function(G,H,W,Z,X,K){return this._drawPendingPt(),this.addData(CMD$4.C,G,H,W,Z,X,K),this._ctx&&this._ctx.bezierCurveTo(G,H,W,Z,X,K),this._xi=X,this._yi=K,this},U.prototype.quadraticCurveTo=function(G,H,W,Z){return this._drawPendingPt(),this.addData(CMD$4.Q,G,H,W,Z),this._ctx&&this._ctx.quadraticCurveTo(G,H,W,Z),this._xi=W,this._yi=Z,this},U.prototype.arc=function(G,H,W,Z,X,K){this._drawPendingPt(),tmpAngles[0]=Z,tmpAngles[1]=X,normalizeArcAngles(tmpAngles,K),Z=tmpAngles[0],X=tmpAngles[1];var Q=X-Z;return this.addData(CMD$4.A,G,H,W,W,Z,Q,0,K?0:1),this._ctx&&this._ctx.arc(G,H,W,Z,X,K),this._xi=mathCos$3(X)*W+G,this._yi=mathSin$3(X)*W+H,this},U.prototype.arcTo=function(G,H,W,Z,X){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(G,H,W,Z,X),this},U.prototype.rect=function(G,H,W,Z){return this._drawPendingPt(),this._ctx&&this._ctx.rect(G,H,W,Z),this.addData(CMD$4.R,G,H,W,Z),this},U.prototype.closePath=function(){this._drawPendingPt(),this.addData(CMD$4.Z);var G=this._ctx,H=this._x0,W=this._y0;return G&&G.closePath(),this._xi=H,this._yi=W,this},U.prototype.fill=function(G){G&&G.fill(),this.toStatic()},U.prototype.stroke=function(G){G&&G.stroke(),this.toStatic()},U.prototype.len=function(){return this._len},U.prototype.setData=function(G){if(this._saveData){var H=G.length;!(this.data&&this.data.length===H)&&hasTypedArray&&(this.data=new Float32Array(H));for(var W=0;W<H;W++)this.data[W]=G[W];this._len=H}},U.prototype.appendPath=function(G){if(this._saveData){G instanceof Array||(G=[G]);for(var H=G.length,W=0,Z=this._len,X=0;X<H;X++)W+=G[X].len();var K=this.data;if(hasTypedArray&&(K instanceof Float32Array||!K)&&(this.data=new Float32Array(Z+W),Z>0&&K))for(var Q=0;Q<Z;Q++)this.data[Q]=K[Q];for(var X=0;X<H;X++)for(var ee=G[X].data,Q=0;Q<ee.length;Q++)this.data[Z++]=ee[Q];this._len=Z}},U.prototype.addData=function(G,H,W,Z,X,K,Q,ee,te){if(this._saveData){var re=this.data;this._len+arguments.length>re.length&&(this._expandData(),re=this.data);for(var ae=0;ae<arguments.length;ae++)re[this._len++]=arguments[ae]}},U.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},U.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var G=[],H=0;H<this._len;H++)G[H]=this.data[H];this.data=G}},U.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var G=this.data;G instanceof Array&&(G.length=this._len,hasTypedArray&&this._len>11&&(this.data=new Float32Array(G)))}},U.prototype.getBoundingRect=function(){min[0]=min[1]=min2[0]=min2[1]=Number.MAX_VALUE,max[0]=max[1]=max2[0]=max2[1]=-Number.MAX_VALUE;var G=this.data,H=0,W=0,Z=0,X=0,K;for(K=0;K<this._len;){var Q=G[K++],ee=K===1;switch(ee&&(H=G[K],W=G[K+1],Z=H,X=W),Q){case CMD$4.M:H=Z=G[K++],W=X=G[K++],min2[0]=Z,min2[1]=X,max2[0]=Z,max2[1]=X;break;case CMD$4.L:fromLine(H,W,G[K],G[K+1],min2,max2),H=G[K++],W=G[K++];break;case CMD$4.C:fromCubic(H,W,G[K++],G[K++],G[K++],G[K++],G[K],G[K+1],min2,max2),H=G[K++],W=G[K++];break;case CMD$4.Q:fromQuadratic(H,W,G[K++],G[K++],G[K],G[K+1],min2,max2),H=G[K++],W=G[K++];break;case CMD$4.A:var te=G[K++],re=G[K++],ae=G[K++],ne=G[K++],ie=G[K++],oe=G[K++]+ie;K+=1;var se=!G[K++];ee&&(Z=mathCos$3(ie)*ae+te,X=mathSin$3(ie)*ne+re),fromArc(te,re,ae,ne,ie,oe,se,min2,max2),H=mathCos$3(oe)*ae+te,W=mathSin$3(oe)*ne+re;break;case CMD$4.R:Z=H=G[K++],X=W=G[K++];var le=G[K++],ue=G[K++];fromLine(Z,X,Z+le,X+ue,min2,max2);break;case CMD$4.Z:H=Z,W=X;break}min$1(min,min,min2),max$1(max,max,max2)}return K===0&&(min[0]=min[1]=max[0]=max[1]=0),new BoundingRect(min[0],min[1],max[0]-min[0],max[1]-min[1])},U.prototype._calculateLength=function(){var G=this.data,H=this._len,W=this._ux,Z=this._uy,X=0,K=0,Q=0,ee=0;this._pathSegLen||(this._pathSegLen=[]);for(var te=this._pathSegLen,re=0,ae=0,ne=0;ne<H;){var ie=G[ne++],oe=ne===1;oe&&(X=G[ne],K=G[ne+1],Q=X,ee=K);var se=-1;switch(ie){case CMD$4.M:X=Q=G[ne++],K=ee=G[ne++];break;case CMD$4.L:{var le=G[ne++],ue=G[ne++],ce=le-X,fe=ue-K;(mathAbs$3(ce)>W||mathAbs$3(fe)>Z||ne===H-1)&&(se=Math.sqrt(ce*ce+fe*fe),X=le,K=ue);break}case CMD$4.C:{var he=G[ne++],ve=G[ne++],le=G[ne++],ue=G[ne++],de=G[ne++],pe=G[ne++];se=cubicLength(X,K,he,ve,le,ue,de,pe,10),X=de,K=pe;break}case CMD$4.Q:{var he=G[ne++],ve=G[ne++],le=G[ne++],ue=G[ne++];se=quadraticLength(X,K,he,ve,le,ue,10),X=le,K=ue;break}case CMD$4.A:var ge=G[ne++],me=G[ne++],ye=G[ne++],_e=G[ne++],xe=G[ne++],Se=G[ne++],Te=Se+xe;ne+=1,oe&&(Q=mathCos$3(xe)*ye+ge,ee=mathSin$3(xe)*_e+me),se=mathMax$8(ye,_e)*mathMin$8(PI2$7,Math.abs(Se)),X=mathCos$3(Te)*ye+ge,K=mathSin$3(Te)*_e+me;break;case CMD$4.R:{Q=X=G[ne++],ee=K=G[ne++];var be=G[ne++],Ae=G[ne++];se=be*2+Ae*2;break}case CMD$4.Z:{var ce=Q-X,fe=ee-K;se=Math.sqrt(ce*ce+fe*fe),X=Q,K=ee;break}}se>=0&&(te[ae++]=se,re+=se)}return this._pathLen=re,re},U.prototype.rebuildPath=function(G,H){var W=this.data,Z=this._ux,X=this._uy,K=this._len,Q,ee,te,re,ae,ne,ie=H<1,oe,se,le=0,ue=0,ce,fe=0,he,ve;if(!(ie&&(this._pathSegLen||this._calculateLength(),oe=this._pathSegLen,se=this._pathLen,ce=H*se,!ce)))e:for(var de=0;de<K;){var pe=W[de++],ge=de===1;switch(ge&&(te=W[de],re=W[de+1],Q=te,ee=re),pe!==CMD$4.L&&fe>0&&(G.lineTo(he,ve),fe=0),pe){case CMD$4.M:Q=te=W[de++],ee=re=W[de++],G.moveTo(te,re);break;case CMD$4.L:{ae=W[de++],ne=W[de++];var me=mathAbs$3(ae-te),ye=mathAbs$3(ne-re);if(me>Z||ye>X){if(ie){var _e=oe[ue++];if(le+_e>ce){var xe=(ce-le)/_e;G.lineTo(te*(1-xe)+ae*xe,re*(1-xe)+ne*xe);break e}le+=_e}G.lineTo(ae,ne),te=ae,re=ne,fe=0}else{var Se=me*me+ye*ye;Se>fe&&(he=ae,ve=ne,fe=Se)}break}case CMD$4.C:{var Te=W[de++],be=W[de++],Ae=W[de++],we=W[de++],Ce=W[de++],Ee=W[de++];if(ie){var _e=oe[ue++];if(le+_e>ce){var xe=(ce-le)/_e;cubicSubdivide(te,Te,Ae,Ce,xe,tmpOutX),cubicSubdivide(re,be,we,Ee,xe,tmpOutY),G.bezierCurveTo(tmpOutX[1],tmpOutY[1],tmpOutX[2],tmpOutY[2],tmpOutX[3],tmpOutY[3]);break e}le+=_e}G.bezierCurveTo(Te,be,Ae,we,Ce,Ee),te=Ce,re=Ee;break}case CMD$4.Q:{var Te=W[de++],be=W[de++],Ae=W[de++],we=W[de++];if(ie){var _e=oe[ue++];if(le+_e>ce){var xe=(ce-le)/_e;quadraticSubdivide(te,Te,Ae,xe,tmpOutX),quadraticSubdivide(re,be,we,xe,tmpOutY),G.quadraticCurveTo(tmpOutX[1],tmpOutY[1],tmpOutX[2],tmpOutY[2]);break e}le+=_e}G.quadraticCurveTo(Te,be,Ae,we),te=Ae,re=we;break}case CMD$4.A:var Me=W[de++],De=W[de++],Le=W[de++],Pe=W[de++],Ie=W[de++],$e=W[de++],Ve=W[de++],Fe=!W[de++],ke=Le>Pe?Le:Pe,Re=mathAbs$3(Le-Pe)>.001,Ne=Ie+$e,Oe=!1;if(ie){var _e=oe[ue++];le+_e>ce&&(Ne=Ie+$e*(ce-le)/_e,Oe=!0),le+=_e}if(Re&&G.ellipse?G.ellipse(Me,De,Le,Pe,Ve,Ie,Ne,Fe):G.arc(Me,De,ke,Ie,Ne,Fe),Oe)break e;ge&&(Q=mathCos$3(Ie)*Le+Me,ee=mathSin$3(Ie)*Pe+De),te=mathCos$3(Ne)*Le+Me,re=mathSin$3(Ne)*Pe+De;break;case CMD$4.R:Q=te=W[de],ee=re=W[de+1],ae=W[de++],ne=W[de++];var Be=W[de++],ze=W[de++];if(ie){var _e=oe[ue++];if(le+_e>ce){var Ge=ce-le;G.moveTo(ae,ne),G.lineTo(ae+mathMin$8(Ge,Be),ne),Ge-=Be,Ge>0&&G.lineTo(ae+Be,ne+mathMin$8(Ge,ze)),Ge-=ze,Ge>0&&G.lineTo(ae+mathMax$8(Be-Ge,0),ne+ze),Ge-=Be,Ge>0&&G.lineTo(ae,ne+mathMax$8(ze-Ge,0));break e}le+=_e}G.rect(ae,ne,Be,ze);break;case CMD$4.Z:if(ie){var _e=oe[ue++];if(le+_e>ce){var xe=(ce-le)/_e;G.lineTo(te*(1-xe)+Q*xe,re*(1-xe)+ee*xe);break e}le+=_e}G.closePath(),te=Q,re=ee}}},U.prototype.clone=function(){var G=new U,H=this.data;return G.data=H.slice?H.slice():Array.prototype.slice.call(H),G._len=this._len,G},U.prototype.canSave=function(){return!!this._saveData},U.CMD=CMD$4,U.initDefaultProps=(function(){var G=U.prototype;G._saveData=!0,G._ux=0,G._uy=0,G._pendingPtDist=0,G._version=0})(),U})();function containStroke$4(U,G,H,W,Z,X,K){if(Z===0)return!1;var Q=Z,ee=0,te=U;if(K>G+Q&&K>W+Q||K<G-Q&&K<W-Q||X>U+Q&&X>H+Q||X<U-Q&&X<H-Q)return!1;if(U!==H)ee=(G-W)/(U-H),te=(U*W-H*G)/(U-H);else return Math.abs(X-U)<=Q/2;var re=ee*X-K+te,ae=re*re/(ee*ee+1);return ae<=Q/2*Q/2}function containStroke$3(U,G,H,W,Z,X,K,Q,ee,te,re){if(ee===0)return!1;var ae=ee;if(re>G+ae&&re>W+ae&&re>X+ae&&re>Q+ae||re<G-ae&&re<W-ae&&re<X-ae&&re<Q-ae||te>U+ae&&te>H+ae&&te>Z+ae&&te>K+ae||te<U-ae&&te<H-ae&&te<Z-ae&&te<K-ae)return!1;var ne=cubicProjectPoint(U,G,H,W,Z,X,K,Q,te,re,null);return ne<=ae/2}function containStroke$2(U,G,H,W,Z,X,K,Q,ee){if(K===0)return!1;var te=K;if(ee>G+te&&ee>W+te&&ee>X+te||ee<G-te&&ee<W-te&&ee<X-te||Q>U+te&&Q>H+te&&Q>Z+te||Q<U-te&&Q<H-te&&Q<Z-te)return!1;var re=quadraticProjectPoint(U,G,H,W,Z,X,Q,ee,null);return re<=te/2}var PI2$6=Math.PI*2;function normalizeRadian(U){return U%=PI2$6,U<0&&(U+=PI2$6),U}var PI2$5=Math.PI*2;function containStroke$1(U,G,H,W,Z,X,K,Q,ee){if(K===0)return!1;var te=K;Q-=U,ee-=G;var re=Math.sqrt(Q*Q+ee*ee);if(re-te>H||re+te<H)return!1;if(Math.abs(W-Z)%PI2$5<1e-4)return!0;if(X){var ae=W;W=normalizeRadian(Z),Z=normalizeRadian(ae)}else W=normalizeRadian(W),Z=normalizeRadian(Z);W>Z&&(Z+=PI2$5);var ne=Math.atan2(ee,Q);return ne<0&&(ne+=PI2$5),ne>=W&&ne<=Z||ne+PI2$5>=W&&ne+PI2$5<=Z}function windingLine(U,G,H,W,Z,X){if(X>G&&X>W||X<G&&X<W||W===G)return 0;var K=(X-G)/(W-G),Q=W<G?1:-1;(K===1||K===0)&&(Q=W<G?.5:-.5);var ee=K*(H-U)+U;return ee===Z?1/0:ee>Z?Q:0}var CMD$3=PathProxy.CMD,PI2$4=Math.PI*2,EPSILON$1=1e-4;function isAroundEqual$1(U,G){return Math.abs(U-G)<EPSILON$1}var roots=[-1,-1,-1],extrema=[-1,-1];function swapExtrema(){var U=extrema[0];extrema[0]=extrema[1],extrema[1]=U}function windingCubic(U,G,H,W,Z,X,K,Q,ee,te){if(te>G&&te>W&&te>X&&te>Q||te<G&&te<W&&te<X&&te<Q)return 0;var re=cubicRootAt(G,W,X,Q,te,roots);if(re===0)return 0;for(var ae=0,ne=-1,ie=void 0,oe=void 0,se=0;se<re;se++){var le=roots[se],ue=le===0||le===1?.5:1,ce=cubicAt(U,H,Z,K,le);ce<ee||(ne<0&&(ne=cubicExtrema(G,W,X,Q,extrema),extrema[1]<extrema[0]&&ne>1&&swapExtrema(),ie=cubicAt(G,W,X,Q,extrema[0]),ne>1&&(oe=cubicAt(G,W,X,Q,extrema[1]))),ne===2?le<extrema[0]?ae+=ie<G?ue:-ue:le<extrema[1]?ae+=oe<ie?ue:-ue:ae+=Q<oe?ue:-ue:le<extrema[0]?ae+=ie<G?ue:-ue:ae+=Q<ie?ue:-ue)}return ae}function windingQuadratic(U,G,H,W,Z,X,K,Q){if(Q>G&&Q>W&&Q>X||Q<G&&Q<W&&Q<X)return 0;var ee=quadraticRootAt(G,W,X,Q,roots);if(ee===0)return 0;var te=quadraticExtremum(G,W,X);if(te>=0&&te<=1){for(var re=0,ae=quadraticAt$1(G,W,X,te),ne=0;ne<ee;ne++){var ie=roots[ne]===0||roots[ne]===1?.5:1,oe=quadraticAt$1(U,H,Z,roots[ne]);oe<K||(roots[ne]<te?re+=ae<G?ie:-ie:re+=X<ae?ie:-ie)}return re}else{var ie=roots[0]===0||roots[0]===1?.5:1,oe=quadraticAt$1(U,H,Z,roots[0]);return oe<K?0:X<G?ie:-ie}}function windingArc(U,G,H,W,Z,X,K,Q){if(Q-=G,Q>H||Q<-H)return 0;var ee=Math.sqrt(H*H-Q*Q);roots[0]=-ee,roots[1]=ee;var te=Math.abs(W-Z);if(te<1e-4)return 0;if(te>=PI2$4-1e-4){W=0,Z=PI2$4;var re=X?1:-1;return K>=roots[0]+U&&K<=roots[1]+U?re:0}if(W>Z){var ae=W;W=Z,Z=ae}W<0&&(W+=PI2$4,Z+=PI2$4);for(var ne=0,ie=0;ie<2;ie++){var oe=roots[ie];if(oe+U>K){var se=Math.atan2(Q,oe),re=X?1:-1;se<0&&(se=PI2$4+se),(se>=W&&se<=Z||se+PI2$4>=W&&se+PI2$4<=Z)&&(se>Math.PI/2&&se<Math.PI*1.5&&(re=-re),ne+=re)}}return ne}function containPath(U,G,H,W,Z){for(var X=U.data,K=U.len(),Q=0,ee=0,te=0,re=0,ae=0,ne,ie,oe=0;oe<K;){var se=X[oe++],le=oe===1;switch(se===CMD$3.M&&oe>1&&(H||(Q+=windingLine(ee,te,re,ae,W,Z))),le&&(ee=X[oe],te=X[oe+1],re=ee,ae=te),se){case CMD$3.M:re=X[oe++],ae=X[oe++],ee=re,te=ae;break;case CMD$3.L:if(H){if(containStroke$4(ee,te,X[oe],X[oe+1],G,W,Z))return!0}else Q+=windingLine(ee,te,X[oe],X[oe+1],W,Z)||0;ee=X[oe++],te=X[oe++];break;case CMD$3.C:if(H){if(containStroke$3(ee,te,X[oe++],X[oe++],X[oe++],X[oe++],X[oe],X[oe+1],G,W,Z))return!0}else Q+=windingCubic(ee,te,X[oe++],X[oe++],X[oe++],X[oe++],X[oe],X[oe+1],W,Z)||0;ee=X[oe++],te=X[oe++];break;case CMD$3.Q:if(H){if(containStroke$2(ee,te,X[oe++],X[oe++],X[oe],X[oe+1],G,W,Z))return!0}else Q+=windingQuadratic(ee,te,X[oe++],X[oe++],X[oe],X[oe+1],W,Z)||0;ee=X[oe++],te=X[oe++];break;case CMD$3.A:var ue=X[oe++],ce=X[oe++],fe=X[oe++],he=X[oe++],ve=X[oe++],de=X[oe++];oe+=1;var pe=!!(1-X[oe++]);ne=Math.cos(ve)*fe+ue,ie=Math.sin(ve)*he+ce,le?(re=ne,ae=ie):Q+=windingLine(ee,te,ne,ie,W,Z);var ge=(W-ue)*he/fe+ue;if(H){if(containStroke$1(ue,ce,he,ve,ve+de,pe,G,ge,Z))return!0}else Q+=windingArc(ue,ce,he,ve,ve+de,pe,ge,Z);ee=Math.cos(ve+de)*fe+ue,te=Math.sin(ve+de)*he+ce;break;case CMD$3.R:re=ee=X[oe++],ae=te=X[oe++];var me=X[oe++],ye=X[oe++];if(ne=re+me,ie=ae+ye,H){if(containStroke$4(re,ae,ne,ae,G,W,Z)||containStroke$4(ne,ae,ne,ie,G,W,Z)||containStroke$4(ne,ie,re,ie,G,W,Z)||containStroke$4(re,ie,re,ae,G,W,Z))return!0}else Q+=windingLine(ne,ae,ne,ie,W,Z),Q+=windingLine(re,ie,re,ae,W,Z);break;case CMD$3.Z:if(H){if(containStroke$4(ee,te,re,ae,G,W,Z))return!0}else Q+=windingLine(ee,te,re,ae,W,Z);ee=re,te=ae;break}}return!H&&!isAroundEqual$1(te,ae)&&(Q+=windingLine(ee,te,re,ae,W,Z)||0),Q!==0}function contain$2(U,G,H){return containPath(U,0,!1,G,H)}function containStroke(U,G,H,W){return containPath(U,G,!0,H,W)}var DEFAULT_PATH_STYLE=defaults({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},DEFAULT_COMMON_STYLE),DEFAULT_PATH_ANIMATION_PROPS={style:defaults({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},DEFAULT_COMMON_ANIMATION_PROPS.style)},pathCopyParams=TRANSFORMABLE_PROPS.concat(["invisible","culling","z","z2","zlevel","parent"]),Path=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.update=function(){var H=this;U.prototype.update.call(this);var W=this.style;if(W.decal){var Z=this._decalEl=this._decalEl||new G;Z.buildPath===G.prototype.buildPath&&(Z.buildPath=function(ee){H.buildPath(ee,H.shape)}),Z.silent=!0;var X=Z.style;for(var K in W)X[K]!==W[K]&&(X[K]=W[K]);X.fill=W.fill?W.decal:null,X.decal=null,X.shadowColor=null,W.strokeFirst&&(X.stroke=null);for(var Q=0;Q<pathCopyParams.length;++Q)Z[pathCopyParams[Q]]=this[pathCopyParams[Q]];Z.__dirty|=REDRAW_BIT}else this._decalEl&&(this._decalEl=null)},G.prototype.getDecalElement=function(){return this._decalEl},G.prototype._init=function(H){var W=keys(H);this.shape=this.getDefaultShape();var Z=this.getDefaultStyle();Z&&this.useStyle(Z);for(var X=0;X<W.length;X++){var K=W[X],Q=H[K];K==="style"?this.style?extend(this.style,Q):this.useStyle(Q):K==="shape"?extend(this.shape,Q):U.prototype.attrKV.call(this,K,Q)}this.style||this.useStyle({})},G.prototype.getDefaultStyle=function(){return null},G.prototype.getDefaultShape=function(){return{}},G.prototype.canBeInsideText=function(){return this.hasFill()},G.prototype.getInsideTextFill=function(){var H=this.style.fill;if(H!=="none"){if(isString(H)){var W=lum(H,0);return W>.5?DARK_LABEL_COLOR:W>.2?LIGHTER_LABEL_COLOR:LIGHT_LABEL_COLOR}else if(H)return LIGHT_LABEL_COLOR}return DARK_LABEL_COLOR},G.prototype.getInsideTextStroke=function(H){var W=this.style.fill;if(isString(W)){var Z=this.__zr,X=!!(Z&&Z.isDarkMode()),K=lum(H,0)<DARK_MODE_THRESHOLD;if(X===K)return W}},G.prototype.buildPath=function(H,W,Z){},G.prototype.pathUpdated=function(){this.__dirty&=~SHAPE_CHANGED_BIT},G.prototype.getUpdatedPathProxy=function(H){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,H),this.path},G.prototype.createPathProxy=function(){this.path=new PathProxy(!1)},G.prototype.hasStroke=function(){var H=this.style,W=H.stroke;return!(W==null||W==="none"||!(H.lineWidth>0))},G.prototype.hasFill=function(){var H=this.style,W=H.fill;return W!=null&&W!=="none"},G.prototype.getBoundingRect=function(){var H=this._rect,W=this.style,Z=!H;if(Z){var X=!1;this.path||(X=!0,this.createPathProxy());var K=this.path;(X||this.__dirty&SHAPE_CHANGED_BIT)&&(K.beginPath(),this.buildPath(K,this.shape,!1),this.pathUpdated()),H=K.getBoundingRect()}if(this._rect=H,this.hasStroke()&&this.path&&this.path.len()>0){var Q=this._rectStroke||(this._rectStroke=H.clone());if(this.__dirty||Z){Q.copy(H);var ee=W.strokeNoScale?this.getLineScale():1,te=W.lineWidth;if(!this.hasFill()){var re=this.strokeContainThreshold;te=Math.max(te,re??4)}ee>1e-10&&(Q.width+=te/ee,Q.height+=te/ee,Q.x-=te/ee/2,Q.y-=te/ee/2)}return Q}return H},G.prototype.contain=function(H,W){var Z=this.transformCoordToLocal(H,W),X=this.getBoundingRect(),K=this.style;if(H=Z[0],W=Z[1],X.contain(H,W)){var Q=this.path;if(this.hasStroke()){var ee=K.lineWidth,te=K.strokeNoScale?this.getLineScale():1;if(te>1e-10&&(this.hasFill()||(ee=Math.max(ee,this.strokeContainThreshold)),containStroke(Q,ee/te,H,W)))return!0}if(this.hasFill())return contain$2(Q,H,W)}return!1},G.prototype.dirtyShape=function(){this.__dirty|=SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},G.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},G.prototype.animateShape=function(H){return this.animate("shape",H)},G.prototype.updateDuringAnimation=function(H){H==="style"?this.dirtyStyle():H==="shape"?this.dirtyShape():this.markRedraw()},G.prototype.attrKV=function(H,W){H==="shape"?this.setShape(W):U.prototype.attrKV.call(this,H,W)},G.prototype.setShape=function(H,W){var Z=this.shape;return Z||(Z=this.shape={}),typeof H=="string"?Z[H]=W:extend(Z,H),this.dirtyShape(),this},G.prototype.shapeChanged=function(){return!!(this.__dirty&SHAPE_CHANGED_BIT)},G.prototype.createStyle=function(H){return createObject(DEFAULT_PATH_STYLE,H)},G.prototype._innerSaveToNormal=function(H){U.prototype._innerSaveToNormal.call(this,H);var W=this._normalState;H.shape&&!W.shape&&(W.shape=extend({},this.shape))},G.prototype._applyStateObj=function(H,W,Z,X,K,Q){U.prototype._applyStateObj.call(this,H,W,Z,X,K,Q);var ee=!(W&&X),te;if(W&&W.shape?K?X?te=W.shape:(te=extend({},Z.shape),extend(te,W.shape)):(te=extend({},X?this.shape:Z.shape),extend(te,W.shape)):ee&&(te=Z.shape),te)if(K){this.shape=extend({},this.shape);for(var re={},ae=keys(te),ne=0;ne<ae.length;ne++){var ie=ae[ne];typeof te[ie]=="object"?this.shape[ie]=te[ie]:re[ie]=te[ie]}this._transitionState(H,{shape:re},Q)}else this.shape=te,this.dirtyShape()},G.prototype._mergeStates=function(H){for(var W=U.prototype._mergeStates.call(this,H),Z,X=0;X<H.length;X++){var K=H[X];K.shape&&(Z=Z||{},this._mergeStyle(Z,K.shape))}return Z&&(W.shape=Z),W},G.prototype.getAnimationStyleProps=function(){return DEFAULT_PATH_ANIMATION_PROPS},G.prototype.isZeroArea=function(){return!1},G.extend=function(H){var W=(function(X){__extends(K,X);function K(Q){var ee=X.call(this,Q)||this;return H.init&&H.init.call(ee,Q),ee}return K.prototype.getDefaultStyle=function(){return clone$4(H.style)},K.prototype.getDefaultShape=function(){return clone$4(H.shape)},K})(G);for(var Z in H)typeof H[Z]=="function"&&(W.prototype[Z]=H[Z]);return W},G.initDefaultProps=(function(){var H=G.prototype;H.type="path",H.strokeContainThreshold=5,H.segmentIgnoreThreshold=0,H.subPixelOptimize=!1,H.autoBatch=!1,H.__dirty=REDRAW_BIT|STYLE_CHANGED_BIT|SHAPE_CHANGED_BIT})(),G})(Displayable),DEFAULT_TSPAN_STYLE=defaults({strokeFirst:!0,font:DEFAULT_FONT,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},DEFAULT_PATH_STYLE),TSpan=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.hasStroke=function(){return tSpanHasStroke(this.style)},G.prototype.hasFill=function(){var H=this.style,W=H.fill;return W!=null&&W!=="none"},G.prototype.createStyle=function(H){return createObject(DEFAULT_TSPAN_STYLE,H)},G.prototype.setBoundingRect=function(H){this._rect=H},G.prototype.getBoundingRect=function(){return this._rect||(this._rect=tSpanCreateBoundingRect(this.style)),this._rect},G.initDefaultProps=(function(){var H=G.prototype;H.dirtyRectTolerance=10})(),G})(Displayable);TSpan.prototype.type="tspan";var DEFAULT_IMAGE_STYLE=defaults({x:0,y:0},DEFAULT_COMMON_STYLE),DEFAULT_IMAGE_ANIMATION_PROPS={style:defaults({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},DEFAULT_COMMON_ANIMATION_PROPS.style)};function isImageLike$1(U){return!!(U&&typeof U!="string"&&U.width&&U.height)}var ZRImage=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.createStyle=function(H){return createObject(DEFAULT_IMAGE_STYLE,H)},G.prototype._getSize=function(H){var W=this.style,Z=W[H];if(Z!=null)return Z;var X=isImageLike$1(W.image)?W.image:this.__image;if(!X)return 0;var K=H==="width"?"height":"width",Q=W[K];return Q==null?X[H]:X[H]/X[K]*Q},G.prototype.getWidth=function(){return this._getSize("width")},G.prototype.getHeight=function(){return this._getSize("height")},G.prototype.getAnimationStyleProps=function(){return DEFAULT_IMAGE_ANIMATION_PROPS},G.prototype.getBoundingRect=function(){var H=this.style;return this._rect||(this._rect=new BoundingRect(H.x||0,H.y||0,this.getWidth(),this.getHeight())),this._rect},G})(Displayable);ZRImage.prototype.type="image";function buildPath$2(U,G){var H=G.x,W=G.y,Z=G.width,X=G.height,K=G.r,Q,ee,te,re;Z<0&&(H=H+Z,Z=-Z),X<0&&(W=W+X,X=-X),typeof K=="number"?Q=ee=te=re=K:K instanceof Array?K.length===1?Q=ee=te=re=K[0]:K.length===2?(Q=te=K[0],ee=re=K[1]):K.length===3?(Q=K[0],ee=re=K[1],te=K[2]):(Q=K[0],ee=K[1],te=K[2],re=K[3]):Q=ee=te=re=0;var ae;Q+ee>Z&&(ae=Q+ee,Q*=Z/ae,ee*=Z/ae),te+re>Z&&(ae=te+re,te*=Z/ae,re*=Z/ae),ee+te>X&&(ae=ee+te,ee*=X/ae,te*=X/ae),Q+re>X&&(ae=Q+re,Q*=X/ae,re*=X/ae),U.moveTo(H+Q,W),U.lineTo(H+Z-ee,W),ee!==0&&U.arc(H+Z-ee,W+ee,ee,-Math.PI/2,0),U.lineTo(H+Z,W+X-te),te!==0&&U.arc(H+Z-te,W+X-te,te,0,Math.PI/2),U.lineTo(H+re,W+X),re!==0&&U.arc(H+re,W+X-re,re,Math.PI/2,Math.PI),U.lineTo(H,W+Q),Q!==0&&U.arc(H+Q,W+Q,Q,Math.PI,Math.PI*1.5)}var round$3=Math.round;function subPixelOptimizeLine$1(U,G,H){if(G){var W=G.x1,Z=G.x2,X=G.y1,K=G.y2;U.x1=W,U.x2=Z,U.y1=X,U.y2=K;var Q=H&&H.lineWidth;return Q&&(round$3(W*2)===round$3(Z*2)&&(U.x1=U.x2=subPixelOptimize$1(W,Q,!0)),round$3(X*2)===round$3(K*2)&&(U.y1=U.y2=subPixelOptimize$1(X,Q,!0))),U}}function subPixelOptimizeRect$1(U,G,H){if(G){var W=G.x,Z=G.y,X=G.width,K=G.height;U.x=W,U.y=Z,U.width=X,U.height=K;var Q=H&&H.lineWidth;return Q&&(U.x=subPixelOptimize$1(W,Q,!0),U.y=subPixelOptimize$1(Z,Q,!0),U.width=Math.max(subPixelOptimize$1(W+X,Q,!1)-U.x,X===0?0:1),U.height=Math.max(subPixelOptimize$1(Z+K,Q,!1)-U.y,K===0?0:1)),U}}function subPixelOptimize$1(U,G,H){if(!G)return U;var W=round$3(U*2);return(W+round$3(G))%2===0?W/2:(W+(H?1:-1))/2}var RectShape=(function(){function U(){this.x=0,this.y=0,this.width=0,this.height=0}return U})(),subPixelOptimizeOutputShape$1={},Rect$2=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultShape=function(){return new RectShape},G.prototype.buildPath=function(H,W){var Z,X,K,Q;if(this.subPixelOptimize){var ee=subPixelOptimizeRect$1(subPixelOptimizeOutputShape$1,W,this.style);Z=ee.x,X=ee.y,K=ee.width,Q=ee.height,ee.r=W.r,W=ee}else Z=W.x,X=W.y,K=W.width,Q=W.height;W.r?buildPath$2(H,W):H.rect(Z,X,K,Q)},G.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},G})(Path);Rect$2.prototype.type="rect";var DEFAULT_RICH_TEXT_COLOR={fill:"#000"},DEFAULT_STROKE_LINE_WIDTH=2,tmpCITOverflowAreaOut={},DEFAULT_TEXT_ANIMATION_PROPS={style:defaults({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},DEFAULT_COMMON_ANIMATION_PROPS.style)},ZRText=(function(U){__extends(G,U);function G(H){var W=U.call(this)||this;return W.type="text",W._children=[],W._defaultStyle=DEFAULT_RICH_TEXT_COLOR,W.attr(H),W}return G.prototype.childrenRef=function(){return this._children},G.prototype.update=function(){U.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var H=0;H<this._children.length;H++){var W=this._children[H];W.zlevel=this.zlevel,W.z=this.z,W.z2=this.z2,W.culling=this.culling,W.cursor=this.cursor,W.invisible=this.invisible}},G.prototype.updateTransform=function(){var H=this.innerTransformable;H?(H.updateTransform(),H.transform&&(this.transform=H.transform)):U.prototype.updateTransform.call(this)},G.prototype.getLocalTransform=function(H){var W=this.innerTransformable;return W?W.getLocalTransform(H):U.prototype.getLocalTransform.call(this,H)},G.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),U.prototype.getComputedTransform.call(this)},G.prototype._updateSubTexts=function(){this._childCursor=0,normalizeTextStyle(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},G.prototype.addSelfToZr=function(H){U.prototype.addSelfToZr.call(this,H);for(var W=0;W<this._children.length;W++)this._children[W].__zr=H},G.prototype.removeSelfFromZr=function(H){U.prototype.removeSelfFromZr.call(this,H);for(var W=0;W<this._children.length;W++)this._children[W].__zr=null},G.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var H=new BoundingRect(0,0,0,0),W=this._children,Z=[],X=null,K=0;K<W.length;K++){var Q=W[K],ee=Q.getBoundingRect(),te=Q.getLocalTransform(Z);te?(H.copy(ee),H.applyTransform(te),X=X||H.clone(),X.union(H)):(X=X||ee.clone(),X.union(ee))}this._rect=X||H}return this._rect},G.prototype.setDefaultTextStyle=function(H){this._defaultStyle=H||DEFAULT_RICH_TEXT_COLOR},G.prototype.setTextContent=function(H){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},G.prototype._mergeStyle=function(H,W){if(!W)return H;var Z=W.rich,X=H.rich||Z&&{};return extend(H,W),Z&&X?(this._mergeRich(X,Z),H.rich=X):X&&(H.rich=X),H},G.prototype._mergeRich=function(H,W){for(var Z=keys(W),X=0;X<Z.length;X++){var K=Z[X];H[K]=H[K]||{},extend(H[K],W[K])}},G.prototype.getAnimationStyleProps=function(){return DEFAULT_TEXT_ANIMATION_PROPS},G.prototype._getOrCreateChild=function(H){var W=this._children[this._childCursor];return(!W||!(W instanceof H))&&(W=new H),this._children[this._childCursor++]=W,W.__zr=this.__zr,W.parent=this,W},G.prototype._updatePlainTexts=function(){var H=this.style,W=H.font||DEFAULT_FONT,Z=H.padding,X=this._defaultStyle,K=H.x||0,Q=H.y||0,ee=H.align||X.align||"left",te=H.verticalAlign||X.verticalAlign||"top";calcInnerTextOverflowArea(tmpCITOverflowAreaOut,X.overflowRect,K,Q,ee,te),K=tmpCITOverflowAreaOut.baseX,Q=tmpCITOverflowAreaOut.baseY;var re=getStyleText(H),ae=parsePlainText(re,H,tmpCITOverflowAreaOut.outerWidth,tmpCITOverflowAreaOut.outerHeight),ne=needDrawBackground(H),ie=!!H.backgroundColor,oe=ae.outerHeight,se=ae.outerWidth,le=ae.lines,ue=ae.lineHeight;this.isTruncated=!!ae.isTruncated;var ce=K,fe=adjustTextY(Q,ae.contentHeight,te);if(ne||Z){var he=adjustTextX(K,se,ee),ve=adjustTextY(Q,oe,te);ne&&this._renderBackground(H,H,he,ve,se,oe)}fe+=ue/2,Z&&(ce=getTextXForPadding(K,ee,Z),te==="top"?fe+=Z[0]:te==="bottom"&&(fe-=Z[2]));for(var de=0,pe=!1,ge=!1,me=getFill("fill"in H?H.fill:(ge=!0,X.fill)),ye=getStroke("stroke"in H?H.stroke:!ie&&(!X.autoStroke||ge)?(de=DEFAULT_STROKE_LINE_WIDTH,pe=!0,X.stroke):null),_e=H.textShadowBlur>0,xe=0;xe<le.length;xe++){var Se=this._getOrCreateChild(TSpan),Te=Se.createStyle();Se.useStyle(Te),Te.text=le[xe],Te.x=ce,Te.y=fe,Te.textAlign=ee,Te.textBaseline="middle",Te.opacity=H.opacity,Te.strokeFirst=!0,_e&&(Te.shadowBlur=H.textShadowBlur||0,Te.shadowColor=H.textShadowColor||"transparent",Te.shadowOffsetX=H.textShadowOffsetX||0,Te.shadowOffsetY=H.textShadowOffsetY||0),Te.stroke=ye,Te.fill=me,ye&&(Te.lineWidth=H.lineWidth||de,Te.lineDash=H.lineDash,Te.lineDashOffset=H.lineDashOffset||0),Te.font=W,setSeparateFont(Te,H),fe+=ue,Se.setBoundingRect(tSpanCreateBoundingRect2(Te,ae.contentWidth,ae.calculatedLineHeight,pe?0:null))}},G.prototype._updateRichTexts=function(){var H=this.style,W=this._defaultStyle,Z=H.align||W.align,X=H.verticalAlign||W.verticalAlign,K=H.x||0,Q=H.y||0;calcInnerTextOverflowArea(tmpCITOverflowAreaOut,W.overflowRect,K,Q,Z,X),K=tmpCITOverflowAreaOut.baseX,Q=tmpCITOverflowAreaOut.baseY;var ee=getStyleText(H),te=parseRichText(ee,H,tmpCITOverflowAreaOut.outerWidth,tmpCITOverflowAreaOut.outerHeight,Z),re=te.width,ae=te.outerWidth,ne=te.outerHeight,ie=H.padding;this.isTruncated=!!te.isTruncated;var oe=adjustTextX(K,ae,Z),se=adjustTextY(Q,ne,X),le=oe,ue=se;ie&&(le+=ie[3],ue+=ie[0]);var ce=le+re;needDrawBackground(H)&&this._renderBackground(H,H,oe,se,ae,ne);for(var fe=!!H.backgroundColor,he=0;he<te.lines.length;he++){for(var ve=te.lines[he],de=ve.tokens,pe=de.length,ge=ve.lineHeight,me=ve.width,ye=0,_e=le,xe=ce,Se=pe-1,Te=void 0;ye<pe&&(Te=de[ye],!Te.align||Te.align==="left");)this._placeToken(Te,H,ge,ue,_e,"left",fe),me-=Te.width,_e+=Te.width,ye++;for(;Se>=0&&(Te=de[Se],Te.align==="right");)this._placeToken(Te,H,ge,ue,xe,"right",fe),me-=Te.width,xe-=Te.width,Se--;for(_e+=(re-(_e-le)-(ce-xe)-me)/2;ye<=Se;)Te=de[ye],this._placeToken(Te,H,ge,ue,_e+Te.width/2,"center",fe),_e+=Te.width,ye++;ue+=ge}},G.prototype._placeToken=function(H,W,Z,X,K,Q,ee){var te=W.rich[H.styleName]||{};te.text=H.text;var re=H.verticalAlign,ae=X+Z/2;re==="top"?ae=X+H.height/2:re==="bottom"&&(ae=X+Z-H.height/2);var ne=!H.isLineHolder&&needDrawBackground(te);ne&&this._renderBackground(te,W,Q==="right"?K-H.width:Q==="center"?K-H.width/2:K,ae-H.height/2,H.width,H.height);var ie=!!te.backgroundColor,oe=H.textPadding;oe&&(K=getTextXForPadding(K,Q,oe),ae-=H.height/2-oe[0]-H.innerHeight/2);var se=this._getOrCreateChild(TSpan),le=se.createStyle();se.useStyle(le);var ue=this._defaultStyle,ce=!1,fe=0,he=!1,ve=getFill("fill"in te?te.fill:"fill"in W?W.fill:(ce=!0,ue.fill)),de=getStroke("stroke"in te?te.stroke:"stroke"in W?W.stroke:!ie&&!ee&&(!ue.autoStroke||ce)?(fe=DEFAULT_STROKE_LINE_WIDTH,he=!0,ue.stroke):null),pe=te.textShadowBlur>0||W.textShadowBlur>0;le.text=H.text,le.x=K,le.y=ae,pe&&(le.shadowBlur=te.textShadowBlur||W.textShadowBlur||0,le.shadowColor=te.textShadowColor||W.textShadowColor||"transparent",le.shadowOffsetX=te.textShadowOffsetX||W.textShadowOffsetX||0,le.shadowOffsetY=te.textShadowOffsetY||W.textShadowOffsetY||0),le.textAlign=Q,le.textBaseline="middle",le.font=H.font||DEFAULT_FONT,le.opacity=retrieve3(te.opacity,W.opacity,1),setSeparateFont(le,te),de&&(le.lineWidth=retrieve3(te.lineWidth,W.lineWidth,fe),le.lineDash=retrieve2(te.lineDash,W.lineDash),le.lineDashOffset=W.lineDashOffset||0,le.stroke=de),ve&&(le.fill=ve),se.setBoundingRect(tSpanCreateBoundingRect2(le,H.contentWidth,H.contentHeight,he?0:null))},G.prototype._renderBackground=function(H,W,Z,X,K,Q){var ee=H.backgroundColor,te=H.borderWidth,re=H.borderColor,ae=ee&&ee.image,ne=ee&&!ae,ie=H.borderRadius,oe=this,se,le;if(ne||H.lineHeight||te&&re){se=this._getOrCreateChild(Rect$2),se.useStyle(se.createStyle()),se.style.fill=null;var ue=se.shape;ue.x=Z,ue.y=X,ue.width=K,ue.height=Q,ue.r=ie,se.dirtyShape()}if(ne){var ce=se.style;ce.fill=ee||null,ce.fillOpacity=retrieve2(H.fillOpacity,1)}else if(ae){le=this._getOrCreateChild(ZRImage),le.onload=function(){oe.dirtyStyle()};var fe=le.style;fe.image=ee.image,fe.x=Z,fe.y=X,fe.width=K,fe.height=Q}if(te&&re){var ce=se.style;ce.lineWidth=te,ce.stroke=re,ce.strokeOpacity=retrieve2(H.strokeOpacity,1),ce.lineDash=H.borderDash,ce.lineDashOffset=H.borderDashOffset||0,se.strokeContainThreshold=0,se.hasFill()&&se.hasStroke()&&(ce.strokeFirst=!0,ce.lineWidth*=2)}var he=(se||le).style;he.shadowBlur=H.shadowBlur||0,he.shadowColor=H.shadowColor||"transparent",he.shadowOffsetX=H.shadowOffsetX||0,he.shadowOffsetY=H.shadowOffsetY||0,he.opacity=retrieve3(H.opacity,W.opacity,1)},G.makeFont=function(H){var W="";return hasSeparateFont(H)&&(W=[H.fontStyle,H.fontWeight,parseFontSize(H.fontSize),H.fontFamily||"sans-serif"].join(" ")),W&&trim$1(W)||H.textFont||H.font},G})(Displayable),VALID_TEXT_ALIGN={left:!0,right:1,center:1},VALID_TEXT_VERTICAL_ALIGN={top:1,bottom:1,middle:1},FONT_PARTS=["fontStyle","fontWeight","fontSize","fontFamily"];function parseFontSize(U){return typeof U=="string"&&(U.indexOf("px")!==-1||U.indexOf("rem")!==-1||U.indexOf("em")!==-1)?U:isNaN(+U)?DEFAULT_FONT_SIZE+"px":U+"px"}function setSeparateFont(U,G){for(var H=0;H<FONT_PARTS.length;H++){var W=FONT_PARTS[H],Z=G[W];Z!=null&&(U[W]=Z)}}function hasSeparateFont(U){return U.fontSize!=null||U.fontFamily||U.fontWeight}function normalizeTextStyle(U){return normalizeStyle(U),each$f(U.rich,normalizeStyle),U}function normalizeStyle(U){if(U){U.font=ZRText.makeFont(U);var G=U.align;G==="middle"&&(G="center"),U.align=G==null||VALID_TEXT_ALIGN[G]?G:"left";var H=U.verticalAlign;H==="center"&&(H="middle"),U.verticalAlign=H==null||VALID_TEXT_VERTICAL_ALIGN[H]?H:"top";var W=U.padding;W&&(U.padding=normalizeCssArray$1(U.padding))}}function getStroke(U,G){return U==null||G<=0||U==="transparent"||U==="none"?null:U.image||U.colorStops?"#000":U}function getFill(U){return U==null||U==="none"?null:U.image||U.colorStops?"#000":U}function getTextXForPadding(U,G,H){return G==="right"?U-H[1]:G==="center"?U+H[3]/2-H[1]/2:U+H[3]}function getStyleText(U){var G=U.text;return G!=null&&(G+=""),G}function needDrawBackground(U){return!!(U.backgroundColor||U.lineHeight||U.borderWidth&&U.borderColor)}var getECData=makeInner(),setCommonECData=function(U,G,H,W){if(W){var Z=getECData(W);Z.dataIndex=H,Z.dataType=G,Z.seriesIndex=U,Z.ssrType="chart",W.type==="group"&&W.traverse(function(X){var K=getECData(X);K.seriesIndex=U,K.dataIndex=H,K.dataType=G,K.ssrType="chart"})}},_highlightNextDigit=1,_highlightKeyMap={},getSavedStates=makeInner(),getComponentStates=makeInner(),HOVER_STATE_NORMAL=0,HOVER_STATE_BLUR=1,HOVER_STATE_EMPHASIS=2,SPECIAL_STATES=["emphasis","blur","select"],DISPLAY_STATES=["normal","emphasis","blur","select"],Z2_EMPHASIS_LIFT=10,Z2_SELECT_LIFT=9,HIGHLIGHT_ACTION_TYPE="highlight",DOWNPLAY_ACTION_TYPE="downplay",SELECT_ACTION_TYPE="select",UNSELECT_ACTION_TYPE="unselect",TOGGLE_SELECT_ACTION_TYPE="toggleSelect",SELECT_CHANGED_EVENT_TYPE="selectchanged";function hasFillOrStroke(U){return U!=null&&U!=="none"}function doChangeHoverState(U,G,H){U.onHoverStateChange&&(U.hoverState||0)!==H&&U.onHoverStateChange(G),U.hoverState=H}function singleEnterEmphasis(U){doChangeHoverState(U,"emphasis",HOVER_STATE_EMPHASIS)}function singleLeaveEmphasis(U){U.hoverState===HOVER_STATE_EMPHASIS&&doChangeHoverState(U,"normal",HOVER_STATE_NORMAL)}function singleEnterBlur(U){doChangeHoverState(U,"blur",HOVER_STATE_BLUR)}function singleLeaveBlur(U){U.hoverState===HOVER_STATE_BLUR&&doChangeHoverState(U,"normal",HOVER_STATE_NORMAL)}function singleEnterSelect(U){U.selected=!0}function singleLeaveSelect(U){U.selected=!1}function updateElementState(U,G,H){G(U,H)}function traverseUpdateState(U,G,H){updateElementState(U,G,H),U.isGroup&&U.traverse(function(W){updateElementState(W,G,H)})}function setStatesFlag(U,G){switch(G){case"emphasis":U.hoverState=HOVER_STATE_EMPHASIS;break;case"normal":U.hoverState=HOVER_STATE_NORMAL;break;case"blur":U.hoverState=HOVER_STATE_BLUR;break;case"select":U.selected=!0}}function getFromStateStyle(U,G,H,W){for(var Z=U.style,X={},K=0;K<G.length;K++){var Q=G[K],ee=Z[Q];X[Q]=ee??(W&&W[Q])}for(var K=0;K<U.animators.length;K++){var te=U.animators[K];te.__fromStateTransition&&te.__fromStateTransition.indexOf(H)<0&&te.targetName==="style"&&te.saveTo(X,G)}return X}function createEmphasisDefaultState(U,G,H,W){var Z=H&&indexOf(H,"select")>=0,X=!1;if(U instanceof Path){var K=getSavedStates(U),Q=Z&&K.selectFill||K.normalFill,ee=Z&&K.selectStroke||K.normalStroke;if(hasFillOrStroke(Q)||hasFillOrStroke(ee)){W=W||{};var te=W.style||{};te.fill==="inherit"?(X=!0,W=extend({},W),te=extend({},te),te.fill=Q):!hasFillOrStroke(te.fill)&&hasFillOrStroke(Q)?(X=!0,W=extend({},W),te=extend({},te),te.fill=liftColor(Q)):!hasFillOrStroke(te.stroke)&&hasFillOrStroke(ee)&&(X||(W=extend({},W),te=extend({},te)),te.stroke=liftColor(ee)),W.style=te}}if(W&&W.z2==null){X||(W=extend({},W));var re=U.z2EmphasisLift;W.z2=U.z2+(re??Z2_EMPHASIS_LIFT)}return W}function createSelectDefaultState(U,G,H){if(H&&H.z2==null){H=extend({},H);var W=U.z2SelectLift;H.z2=U.z2+(W??Z2_SELECT_LIFT)}return H}function createBlurDefaultState(U,G,H){var W=indexOf(U.currentStates,G)>=0,Z=U.style.opacity,X=W?null:getFromStateStyle(U,["opacity"],G,{opacity:1});H=H||{};var K=H.style||{};return K.opacity==null&&(H=extend({},H),K=extend({opacity:W?Z:X.opacity*.1},K),H.style=K),H}function elementStateProxy(U,G){var H=this.states[U];if(this.style){if(U==="emphasis")return createEmphasisDefaultState(this,U,G,H);if(U==="blur")return createBlurDefaultState(this,U,H);if(U==="select")return createSelectDefaultState(this,U,H)}return H}function setDefaultStateProxy(U){U.stateProxy=elementStateProxy;var G=U.getTextContent(),H=U.getTextGuideLine();G&&(G.stateProxy=elementStateProxy),H&&(H.stateProxy=elementStateProxy)}function enterEmphasisWhenMouseOver(U,G){!shouldSilent(U,G)&&!U.__highByOuter&&traverseUpdateState(U,singleEnterEmphasis)}function leaveEmphasisWhenMouseOut(U,G){!shouldSilent(U,G)&&!U.__highByOuter&&traverseUpdateState(U,singleLeaveEmphasis)}function enterEmphasis(U,G){U.__highByOuter|=1<<(G||0),traverseUpdateState(U,singleEnterEmphasis)}function leaveEmphasis(U,G){!(U.__highByOuter&=~(1<<(G||0)))&&traverseUpdateState(U,singleLeaveEmphasis)}function enterBlur(U){traverseUpdateState(U,singleEnterBlur)}function leaveBlur(U){traverseUpdateState(U,singleLeaveBlur)}function enterSelect(U){traverseUpdateState(U,singleEnterSelect)}function leaveSelect(U){traverseUpdateState(U,singleLeaveSelect)}function shouldSilent(U,G){return U.__highDownSilentOnTouch&&G.zrByTouch}function allLeaveBlur(U){var G=U.getModel(),H=[],W=[];G.eachComponent(function(Z,X){var K=getComponentStates(X),Q=Z==="series",ee=Q?U.getViewOfSeriesModel(X):U.getViewOfComponentModel(X);!Q&&W.push(ee),K.isBlured&&(ee.group.traverse(function(te){singleLeaveBlur(te)}),Q&&H.push(X)),K.isBlured=!1}),each$f(W,function(Z){Z&&Z.toggleBlurSeries&&Z.toggleBlurSeries(H,!1,G)})}function blurSeries(U,G,H,W){var Z=W.getModel();H=H||"coordinateSystem";function X(te,re){for(var ae=0;ae<re.length;ae++){var ne=te.getItemGraphicEl(re[ae]);ne&&leaveBlur(ne)}}if(U!=null&&!(!G||G==="none")){var K=Z.getSeriesByIndex(U),Q=K.coordinateSystem;Q&&Q.master&&(Q=Q.master);var ee=[];Z.eachSeries(function(te){var re=K===te,ae=te.coordinateSystem;ae&&ae.master&&(ae=ae.master);var ne=ae&&Q?ae===Q:re;if(!(H==="series"&&!re||H==="coordinateSystem"&&!ne||G==="series"&&re)){var ie=W.getViewOfSeriesModel(te);if(ie.group.traverse(function(le){le.__highByOuter&&re&&G==="self"||singleEnterBlur(le)}),isArrayLike(G))X(te.getData(),G);else if(isObject$3(G))for(var oe=keys(G),se=0;se<oe.length;se++)X(te.getData(oe[se]),G[oe[se]]);ee.push(te),getComponentStates(te).isBlured=!0}}),Z.eachComponent(function(te,re){if(te!=="series"){var ae=W.getViewOfComponentModel(re);ae&&ae.toggleBlurSeries&&ae.toggleBlurSeries(ee,!0,Z)}})}}function blurComponent(U,G,H){if(!(U==null||G==null)){var W=H.getModel().getComponent(U,G);if(W){getComponentStates(W).isBlured=!0;var Z=H.getViewOfComponentModel(W);!Z||!Z.focusBlurEnabled||Z.group.traverse(function(X){singleEnterBlur(X)})}}}function blurSeriesFromHighlightPayload(U,G,H){var W=U.seriesIndex,Z=U.getData(G.dataType);if(!Z){process.env.NODE_ENV!=="production"&&error("Unknown dataType "+G.dataType);return}var X=queryDataIndex(Z,G);X=(isArray$1(X)?X[0]:X)||0;var K=Z.getItemGraphicEl(X);if(!K)for(var Q=Z.count(),ee=0;!K&&ee<Q;)K=Z.getItemGraphicEl(ee++);if(K){var te=getECData(K);blurSeries(W,te.focus,te.blurScope,H)}else{var re=U.get(["emphasis","focus"]),ae=U.get(["emphasis","blurScope"]);re!=null&&blurSeries(W,re,ae,H)}}function findComponentHighDownDispatchers(U,G,H,W){var Z={focusSelf:!1,dispatchers:null};if(U==null||U==="series"||G==null||H==null)return Z;var X=W.getModel().getComponent(U,G);if(!X)return Z;var K=W.getViewOfComponentModel(X);if(!K||!K.findHighDownDispatchers)return Z;for(var Q=K.findHighDownDispatchers(H),ee,te=0;te<Q.length;te++)if(process.env.NODE_ENV!=="production"&&!isHighDownDispatcher(Q[te])&&error("param should be highDownDispatcher"),getECData(Q[te]).focus==="self"){ee=!0;break}return{focusSelf:ee,dispatchers:Q}}function handleGlobalMouseOverForHighDown(U,G,H){process.env.NODE_ENV!=="production"&&!isHighDownDispatcher(U)&&error("param should be highDownDispatcher");var W=getECData(U),Z=findComponentHighDownDispatchers(W.componentMainType,W.componentIndex,W.componentHighDownName,H),X=Z.dispatchers,K=Z.focusSelf;X?(K&&blurComponent(W.componentMainType,W.componentIndex,H),each$f(X,function(Q){return enterEmphasisWhenMouseOver(Q,G)})):(blurSeries(W.seriesIndex,W.focus,W.blurScope,H),W.focus==="self"&&blurComponent(W.componentMainType,W.componentIndex,H),enterEmphasisWhenMouseOver(U,G))}function handleGlobalMouseOutForHighDown(U,G,H){process.env.NODE_ENV!=="production"&&!isHighDownDispatcher(U)&&error("param should be highDownDispatcher"),allLeaveBlur(H);var W=getECData(U),Z=findComponentHighDownDispatchers(W.componentMainType,W.componentIndex,W.componentHighDownName,H).dispatchers;Z?each$f(Z,function(X){return leaveEmphasisWhenMouseOut(X,G)}):leaveEmphasisWhenMouseOut(U,G)}function toggleSelectionFromPayload(U,G,H){if(isSelectChangePayload(G)){var W=G.dataType,Z=U.getData(W),X=queryDataIndex(Z,G);isArray$1(X)||(X=[X]),U[G.type===TOGGLE_SELECT_ACTION_TYPE?"toggleSelect":G.type===SELECT_ACTION_TYPE?"select":"unselect"](X,W)}}function updateSeriesElementSelection(U){var G=U.getAllData();each$f(G,function(H){var W=H.data,Z=H.type;W.eachItemGraphicEl(function(X,K){U.isSelected(K,Z)?enterSelect(X):leaveSelect(X)})})}function getAllSelectedIndices(U){var G=[];return U.eachSeries(function(H){var W=H.getAllData();each$f(W,function(Z){Z.data;var X=Z.type,K=H.getSelectedDataIndices();if(K.length>0){var Q={dataIndex:K,seriesIndex:H.seriesIndex};X!=null&&(Q.dataType=X),G.push(Q)}})}),G}function enableHoverEmphasis(U,G,H){setAsHighDownDispatcher(U,!0),traverseUpdateState(U,setDefaultStateProxy),enableHoverFocus(U,G,H)}function disableHoverEmphasis(U){setAsHighDownDispatcher(U,!1)}function toggleHoverEmphasis(U,G,H,W){W?disableHoverEmphasis(U):enableHoverEmphasis(U,G,H)}function enableHoverFocus(U,G,H){var W=getECData(U);G!=null?(W.focus=G,W.blurScope=H):W.focus&&(W.focus=null)}var OTHER_STATES=["emphasis","blur","select"],defaultStyleGetterMap={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function setStatesStylesFromModel(U,G,H,W){H=H||"itemStyle";for(var Z=0;Z<OTHER_STATES.length;Z++){var X=OTHER_STATES[Z],K=G.getModel([X,H]),Q=U.ensureState(X);Q.style=W?W(K):K[defaultStyleGetterMap[H]]()}}function setAsHighDownDispatcher(U,G){var H=G===!1,W=U;U.highDownSilentOnTouch&&(W.__highDownSilentOnTouch=U.highDownSilentOnTouch),(!H||W.__highDownDispatcher)&&(W.__highByOuter=W.__highByOuter||0,W.__highDownDispatcher=!H)}function isHighDownDispatcher(U){return!!(U&&U.__highDownDispatcher)}function enableComponentHighDownFeatures(U,G,H){var W=getECData(U);W.componentMainType=G.mainType,W.componentIndex=G.componentIndex,W.componentHighDownName=H}function getHighlightDigit(U){var G=_highlightKeyMap[U];return G==null&&_highlightNextDigit<=32&&(G=_highlightKeyMap[U]=_highlightNextDigit++),G}function isSelectChangePayload(U){var G=U.type;return G===SELECT_ACTION_TYPE||G===UNSELECT_ACTION_TYPE||G===TOGGLE_SELECT_ACTION_TYPE}function isHighDownPayload(U){var G=U.type;return G===HIGHLIGHT_ACTION_TYPE||G===DOWNPLAY_ACTION_TYPE}function savePathStates(U){var G=getSavedStates(U);G.normalFill=U.style.fill,G.normalStroke=U.style.stroke;var H=U.states.select||{};G.selectFill=H.style&&H.style.fill||null,G.selectStroke=H.style&&H.style.stroke||null}var CMD$2=PathProxy.CMD,points$2=[[],[],[]],mathSqrt$2=Math.sqrt,mathAtan2=Math.atan2;function transformPath(U,G){if(G){var H=U.data,W=U.len(),Z,X,K,Q,ee,te,re=CMD$2.M,ae=CMD$2.C,ne=CMD$2.L,ie=CMD$2.R,oe=CMD$2.A,se=CMD$2.Q;for(K=0,Q=0;K<W;){switch(Z=H[K++],Q=K,X=0,Z){case re:X=1;break;case ne:X=1;break;case ae:X=3;break;case se:X=2;break;case oe:var le=G[4],ue=G[5],ce=mathSqrt$2(G[0]*G[0]+G[1]*G[1]),fe=mathSqrt$2(G[2]*G[2]+G[3]*G[3]),he=mathAtan2(-G[1]/fe,G[0]/ce);H[K]*=ce,H[K++]+=le,H[K]*=fe,H[K++]+=ue,H[K++]*=ce,H[K++]*=fe,H[K++]+=he,H[K++]+=he,K+=2,Q=K;break;case ie:te[0]=H[K++],te[1]=H[K++],applyTransform$1(te,te,G),H[Q++]=te[0],H[Q++]=te[1],te[0]+=H[K++],te[1]+=H[K++],applyTransform$1(te,te,G),H[Q++]=te[0],H[Q++]=te[1]}for(ee=0;ee<X;ee++){var ve=points$2[ee];ve[0]=H[K++],ve[1]=H[K++],applyTransform$1(ve,ve,G),H[Q++]=ve[0],H[Q++]=ve[1]}}U.increaseVersion()}}var mathSqrt$1=Math.sqrt,mathSin$2=Math.sin,mathCos$2=Math.cos,PI$7=Math.PI;function vMag(U){return Math.sqrt(U[0]*U[0]+U[1]*U[1])}function vRatio(U,G){return(U[0]*G[0]+U[1]*G[1])/(vMag(U)*vMag(G))}function vAngle(U,G){return(U[0]*G[1]<U[1]*G[0]?-1:1)*Math.acos(vRatio(U,G))}function processArc(U,G,H,W,Z,X,K,Q,ee,te,re){var ae=ee*(PI$7/180),ne=mathCos$2(ae)*(U-H)/2+mathSin$2(ae)*(G-W)/2,ie=-1*mathSin$2(ae)*(U-H)/2+mathCos$2(ae)*(G-W)/2,oe=ne*ne/(K*K)+ie*ie/(Q*Q);oe>1&&(K*=mathSqrt$1(oe),Q*=mathSqrt$1(oe));var se=(Z===X?-1:1)*mathSqrt$1((K*K*(Q*Q)-K*K*(ie*ie)-Q*Q*(ne*ne))/(K*K*(ie*ie)+Q*Q*(ne*ne)))||0,le=se*K*ie/Q,ue=se*-Q*ne/K,ce=(U+H)/2+mathCos$2(ae)*le-mathSin$2(ae)*ue,fe=(G+W)/2+mathSin$2(ae)*le+mathCos$2(ae)*ue,he=vAngle([1,0],[(ne-le)/K,(ie-ue)/Q]),ve=[(ne-le)/K,(ie-ue)/Q],de=[(-1*ne-le)/K,(-1*ie-ue)/Q],pe=vAngle(ve,de);if(vRatio(ve,de)<=-1&&(pe=PI$7),vRatio(ve,de)>=1&&(pe=0),pe<0){var ge=Math.round(pe/PI$7*1e6)/1e6;pe=PI$7*2+ge%2*PI$7}re.addData(te,ce,fe,K,Q,he,pe,ae,X)}var commandReg=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,numberReg$1=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function createPathProxyFromString(U){var G=new PathProxy;if(!U)return G;var H=0,W=0,Z=H,X=W,K,Q=PathProxy.CMD,ee=U.match(commandReg);if(!ee)return G;for(var te=0;te<ee.length;te++){for(var re=ee[te],ae=re.charAt(0),ne=void 0,ie=re.match(numberReg$1)||[],oe=ie.length,se=0;se<oe;se++)ie[se]=parseFloat(ie[se]);for(var le=0;le<oe;){var ue=void 0,ce=void 0,fe=void 0,he=void 0,ve=void 0,de=void 0,pe=void 0,ge=H,me=W,ye=void 0,_e=void 0;switch(ae){case"l":H+=ie[le++],W+=ie[le++],ne=Q.L,G.addData(ne,H,W);break;case"L":H=ie[le++],W=ie[le++],ne=Q.L,G.addData(ne,H,W);break;case"m":H+=ie[le++],W+=ie[le++],ne=Q.M,G.addData(ne,H,W),Z=H,X=W,ae="l";break;case"M":H=ie[le++],W=ie[le++],ne=Q.M,G.addData(ne,H,W),Z=H,X=W,ae="L";break;case"h":H+=ie[le++],ne=Q.L,G.addData(ne,H,W);break;case"H":H=ie[le++],ne=Q.L,G.addData(ne,H,W);break;case"v":W+=ie[le++],ne=Q.L,G.addData(ne,H,W);break;case"V":W=ie[le++],ne=Q.L,G.addData(ne,H,W);break;case"C":ne=Q.C,G.addData(ne,ie[le++],ie[le++],ie[le++],ie[le++],ie[le++],ie[le++]),H=ie[le-2],W=ie[le-1];break;case"c":ne=Q.C,G.addData(ne,ie[le++]+H,ie[le++]+W,ie[le++]+H,ie[le++]+W,ie[le++]+H,ie[le++]+W),H+=ie[le-2],W+=ie[le-1];break;case"S":ue=H,ce=W,ye=G.len(),_e=G.data,K===Q.C&&(ue+=H-_e[ye-4],ce+=W-_e[ye-3]),ne=Q.C,ge=ie[le++],me=ie[le++],H=ie[le++],W=ie[le++],G.addData(ne,ue,ce,ge,me,H,W);break;case"s":ue=H,ce=W,ye=G.len(),_e=G.data,K===Q.C&&(ue+=H-_e[ye-4],ce+=W-_e[ye-3]),ne=Q.C,ge=H+ie[le++],me=W+ie[le++],H+=ie[le++],W+=ie[le++],G.addData(ne,ue,ce,ge,me,H,W);break;case"Q":ge=ie[le++],me=ie[le++],H=ie[le++],W=ie[le++],ne=Q.Q,G.addData(ne,ge,me,H,W);break;case"q":ge=ie[le++]+H,me=ie[le++]+W,H+=ie[le++],W+=ie[le++],ne=Q.Q,G.addData(ne,ge,me,H,W);break;case"T":ue=H,ce=W,ye=G.len(),_e=G.data,K===Q.Q&&(ue+=H-_e[ye-4],ce+=W-_e[ye-3]),H=ie[le++],W=ie[le++],ne=Q.Q,G.addData(ne,ue,ce,H,W);break;case"t":ue=H,ce=W,ye=G.len(),_e=G.data,K===Q.Q&&(ue+=H-_e[ye-4],ce+=W-_e[ye-3]),H+=ie[le++],W+=ie[le++],ne=Q.Q,G.addData(ne,ue,ce,H,W);break;case"A":fe=ie[le++],he=ie[le++],ve=ie[le++],de=ie[le++],pe=ie[le++],ge=H,me=W,H=ie[le++],W=ie[le++],ne=Q.A,processArc(ge,me,H,W,de,pe,fe,he,ve,ne,G);break;case"a":fe=ie[le++],he=ie[le++],ve=ie[le++],de=ie[le++],pe=ie[le++],ge=H,me=W,H+=ie[le++],W+=ie[le++],ne=Q.A,processArc(ge,me,H,W,de,pe,fe,he,ve,ne,G);break}}(ae==="z"||ae==="Z")&&(ne=Q.Z,G.addData(ne),H=Z,W=X),K=ne}return G.toStatic(),G}var SVGPath=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.applyTransform=function(H){},G})(Path);function isPathProxy(U){return U.setData!=null}function createPathOptions(U,G){var H=createPathProxyFromString(U),W=extend({},G);return W.buildPath=function(Z){var X=isPathProxy(Z);if(X&&Z.canSave()){Z.appendPath(H);var K=Z.getContext();K&&Z.rebuildPath(K,1)}else{var K=X?Z.getContext():Z;K&&H.rebuildPath(K,1)}},W.applyTransform=function(Z){transformPath(H,Z),this.dirtyShape()},W}function createFromString(U,G){return new SVGPath(createPathOptions(U,G))}function extendFromString(U,G){var H=createPathOptions(U,G),W=(function(Z){__extends(X,Z);function X(K){var Q=Z.call(this,K)||this;return Q.applyTransform=H.applyTransform,Q.buildPath=H.buildPath,Q}return X})(SVGPath);return W}function mergePath$1(U,G){for(var H=[],W=U.length,Z=0;Z<W;Z++){var X=U[Z];H.push(X.getUpdatedPathProxy(!0))}var K=new Path(G);return K.createPathProxy(),K.buildPath=function(Q){if(isPathProxy(Q)){Q.appendPath(H);var ee=Q.getContext();ee&&Q.rebuildPath(ee,1)}},K}function clonePath(U,G){G=G||{};var H=new Path;return U.shape&&H.setShape(U.shape),H.setStyle(U.style),G.bakeTransform?transformPath(H.path,U.getComputedTransform()):G.toLocal?H.setLocalTransform(U.getComputedTransform()):H.copyTransform(U),H.buildPath=U.buildPath,H.applyTransform=H.applyTransform,H.z=U.z,H.z2=U.z2,H.zlevel=U.zlevel,H}var CircleShape=(function(){function U(){this.cx=0,this.cy=0,this.r=0}return U})(),Circle=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultShape=function(){return new CircleShape},G.prototype.buildPath=function(H,W){H.moveTo(W.cx+W.r,W.cy),H.arc(W.cx,W.cy,W.r,0,Math.PI*2)},G})(Path);Circle.prototype.type="circle";var EllipseShape=(function(){function U(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return U})(),Ellipse=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultShape=function(){return new EllipseShape},G.prototype.buildPath=function(H,W){var Z=.5522848,X=W.cx,K=W.cy,Q=W.rx,ee=W.ry,te=Q*Z,re=ee*Z;H.moveTo(X-Q,K),H.bezierCurveTo(X-Q,K-re,X-te,K-ee,X,K-ee),H.bezierCurveTo(X+te,K-ee,X+Q,K-re,X+Q,K),H.bezierCurveTo(X+Q,K+re,X+te,K+ee,X,K+ee),H.bezierCurveTo(X-te,K+ee,X-Q,K+re,X-Q,K),H.closePath()},G})(Path);Ellipse.prototype.type="ellipse";var PI$6=Math.PI,PI2$3=PI$6*2,mathSin$1=Math.sin,mathCos$1=Math.cos,mathACos=Math.acos,mathATan2=Math.atan2,mathAbs$2=Math.abs,mathSqrt=Math.sqrt,mathMax$7=Math.max,mathMin$7=Math.min,e=1e-4;function intersect(U,G,H,W,Z,X,K,Q){var ee=H-U,te=W-G,re=K-Z,ae=Q-X,ne=ae*ee-re*te;if(!(ne*ne<e))return ne=(re*(G-X)-ae*(U-Z))/ne,[U+ne*ee,G+ne*te]}function computeCornerTangents(U,G,H,W,Z,X,K){var Q=U-H,ee=G-W,te=(K?X:-X)/mathSqrt(Q*Q+ee*ee),re=te*ee,ae=-te*Q,ne=U+re,ie=G+ae,oe=H+re,se=W+ae,le=(ne+oe)/2,ue=(ie+se)/2,ce=oe-ne,fe=se-ie,he=ce*ce+fe*fe,ve=Z-X,de=ne*se-oe*ie,pe=(fe<0?-1:1)*mathSqrt(mathMax$7(0,ve*ve*he-de*de)),ge=(de*fe-ce*pe)/he,me=(-de*ce-fe*pe)/he,ye=(de*fe+ce*pe)/he,_e=(-de*ce+fe*pe)/he,xe=ge-le,Se=me-ue,Te=ye-le,be=_e-ue;return xe*xe+Se*Se>Te*Te+be*be&&(ge=ye,me=_e),{cx:ge,cy:me,x0:-re,y0:-ae,x1:ge*(Z/ve-1),y1:me*(Z/ve-1)}}function normalizeCornerRadius(U){var G;if(isArray$1(U)){var H=U.length;if(!H)return U;H===1?G=[U[0],U[0],0,0]:H===2?G=[U[0],U[0],U[1],U[1]]:H===3?G=U.concat(U[2]):G=U}else G=[U,U,U,U];return G}function buildPath$1(U,G){var H,W=mathMax$7(G.r,0),Z=mathMax$7(G.r0||0,0),X=W>0,K=Z>0;if(!(!X&&!K)){if(X||(W=Z,Z=0),Z>W){var Q=W;W=Z,Z=Q}var ee=G.startAngle,te=G.endAngle;if(!(isNaN(ee)||isNaN(te))){var re=G.cx,ae=G.cy,ne=!!G.clockwise,ie=mathAbs$2(te-ee),oe=ie>PI2$3&&ie%PI2$3;if(oe>e&&(ie=oe),!(W>e))U.moveTo(re,ae);else if(ie>PI2$3-e)U.moveTo(re+W*mathCos$1(ee),ae+W*mathSin$1(ee)),U.arc(re,ae,W,ee,te,!ne),Z>e&&(U.moveTo(re+Z*mathCos$1(te),ae+Z*mathSin$1(te)),U.arc(re,ae,Z,te,ee,ne));else{var se=void 0,le=void 0,ue=void 0,ce=void 0,fe=void 0,he=void 0,ve=void 0,de=void 0,pe=void 0,ge=void 0,me=void 0,ye=void 0,_e=void 0,xe=void 0,Se=void 0,Te=void 0,be=W*mathCos$1(ee),Ae=W*mathSin$1(ee),we=Z*mathCos$1(te),Ce=Z*mathSin$1(te),Ee=ie>e;if(Ee){var Me=G.cornerRadius;Me&&(H=normalizeCornerRadius(Me),se=H[0],le=H[1],ue=H[2],ce=H[3]);var De=mathAbs$2(W-Z)/2;if(fe=mathMin$7(De,ue),he=mathMin$7(De,ce),ve=mathMin$7(De,se),de=mathMin$7(De,le),me=pe=mathMax$7(fe,he),ye=ge=mathMax$7(ve,de),(pe>e||ge>e)&&(_e=W*mathCos$1(te),xe=W*mathSin$1(te),Se=Z*mathCos$1(ee),Te=Z*mathSin$1(ee),ie<PI$6)){var Le=intersect(be,Ae,Se,Te,_e,xe,we,Ce);if(Le){var Pe=be-Le[0],Ie=Ae-Le[1],$e=_e-Le[0],Ve=xe-Le[1],Fe=1/mathSin$1(mathACos((Pe*$e+Ie*Ve)/(mathSqrt(Pe*Pe+Ie*Ie)*mathSqrt($e*$e+Ve*Ve)))/2),ke=mathSqrt(Le[0]*Le[0]+Le[1]*Le[1]);me=mathMin$7(pe,(W-ke)/(Fe+1)),ye=mathMin$7(ge,(Z-ke)/(Fe-1))}}}if(!Ee)U.moveTo(re+be,ae+Ae);else if(me>e){var Re=mathMin$7(ue,me),Ne=mathMin$7(ce,me),Oe=computeCornerTangents(Se,Te,be,Ae,W,Re,ne),Be=computeCornerTangents(_e,xe,we,Ce,W,Ne,ne);U.moveTo(re+Oe.cx+Oe.x0,ae+Oe.cy+Oe.y0),me<pe&&Re===Ne?U.arc(re+Oe.cx,ae+Oe.cy,me,mathATan2(Oe.y0,Oe.x0),mathATan2(Be.y0,Be.x0),!ne):(Re>0&&U.arc(re+Oe.cx,ae+Oe.cy,Re,mathATan2(Oe.y0,Oe.x0),mathATan2(Oe.y1,Oe.x1),!ne),U.arc(re,ae,W,mathATan2(Oe.cy+Oe.y1,Oe.cx+Oe.x1),mathATan2(Be.cy+Be.y1,Be.cx+Be.x1),!ne),Ne>0&&U.arc(re+Be.cx,ae+Be.cy,Ne,mathATan2(Be.y1,Be.x1),mathATan2(Be.y0,Be.x0),!ne))}else U.moveTo(re+be,ae+Ae),U.arc(re,ae,W,ee,te,!ne);if(!(Z>e)||!Ee)U.lineTo(re+we,ae+Ce);else if(ye>e){var Re=mathMin$7(se,ye),Ne=mathMin$7(le,ye),Oe=computeCornerTangents(we,Ce,_e,xe,Z,-Ne,ne),Be=computeCornerTangents(be,Ae,Se,Te,Z,-Re,ne);U.lineTo(re+Oe.cx+Oe.x0,ae+Oe.cy+Oe.y0),ye<ge&&Re===Ne?U.arc(re+Oe.cx,ae+Oe.cy,ye,mathATan2(Oe.y0,Oe.x0),mathATan2(Be.y0,Be.x0),!ne):(Ne>0&&U.arc(re+Oe.cx,ae+Oe.cy,Ne,mathATan2(Oe.y0,Oe.x0),mathATan2(Oe.y1,Oe.x1),!ne),U.arc(re,ae,Z,mathATan2(Oe.cy+Oe.y1,Oe.cx+Oe.x1),mathATan2(Be.cy+Be.y1,Be.cx+Be.x1),ne),Re>0&&U.arc(re+Be.cx,ae+Be.cy,Re,mathATan2(Be.y1,Be.x1),mathATan2(Be.y0,Be.x0),!ne))}else U.lineTo(re+we,ae+Ce),U.arc(re,ae,Z,te,ee,ne)}U.closePath()}}}var SectorShape=(function(){function U(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return U})(),Sector=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultShape=function(){return new SectorShape},G.prototype.buildPath=function(H,W){buildPath$1(H,W)},G.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},G})(Path);Sector.prototype.type="sector";var RingShape=(function(){function U(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return U})(),Ring=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultShape=function(){return new RingShape},G.prototype.buildPath=function(H,W){var Z=W.cx,X=W.cy,K=Math.PI*2;H.moveTo(Z+W.r,X),H.arc(Z,X,W.r,0,K,!1),H.moveTo(Z+W.r0,X),H.arc(Z,X,W.r0,0,K,!0)},G})(Path);Ring.prototype.type="ring";function smoothBezier(U,G,H,W){var Z=[],X=[],K=[],Q=[],ee,te,re,ae;if(W){re=[1/0,1/0],ae=[-1/0,-1/0];for(var ne=0,ie=U.length;ne<ie;ne++)min$1(re,re,U[ne]),max$1(ae,ae,U[ne]);min$1(re,re,W[0]),max$1(ae,ae,W[1])}for(var ne=0,ie=U.length;ne<ie;ne++){var oe=U[ne];if(H)ee=U[ne?ne-1:ie-1],te=U[(ne+1)%ie];else if(ne===0||ne===ie-1){Z.push(clone$3(U[ne]));continue}else ee=U[ne-1],te=U[ne+1];sub(X,te,ee),scale$2(X,X,G);var se=distance(oe,ee),le=distance(oe,te),ue=se+le;ue!==0&&(se/=ue,le/=ue),scale$2(K,X,-se),scale$2(Q,X,le);var ce=add([],oe,K),fe=add([],oe,Q);W&&(max$1(ce,ce,re),min$1(ce,ce,ae),max$1(fe,fe,re),min$1(fe,fe,ae)),Z.push(ce),Z.push(fe)}return H&&Z.push(Z.shift()),Z}function buildPath(U,G,H){var W=G.smooth,Z=G.points;if(Z&&Z.length>=2){if(W){var X=smoothBezier(Z,W,H,G.smoothConstraint);U.moveTo(Z[0][0],Z[0][1]);for(var K=Z.length,Q=0;Q<(H?K:K-1);Q++){var ee=X[Q*2],te=X[Q*2+1],re=Z[(Q+1)%K];U.bezierCurveTo(ee[0],ee[1],te[0],te[1],re[0],re[1])}}else{U.moveTo(Z[0][0],Z[0][1]);for(var Q=1,ae=Z.length;Q<ae;Q++)U.lineTo(Z[Q][0],Z[Q][1])}H&&U.closePath()}}var PolygonShape=(function(){function U(){this.points=null,this.smooth=0,this.smoothConstraint=null}return U})(),Polygon=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultShape=function(){return new PolygonShape},G.prototype.buildPath=function(H,W){buildPath(H,W,!0)},G})(Path);Polygon.prototype.type="polygon";var PolylineShape=(function(){function U(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return U})(),Polyline$1=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},G.prototype.getDefaultShape=function(){return new PolylineShape},G.prototype.buildPath=function(H,W){buildPath(H,W,!1)},G})(Path);Polyline$1.prototype.type="polyline";var subPixelOptimizeOutputShape={},LineShape=(function(){function U(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return U})(),Line$1=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},G.prototype.getDefaultShape=function(){return new LineShape},G.prototype.buildPath=function(H,W){var Z,X,K,Q;if(this.subPixelOptimize){var ee=subPixelOptimizeLine$1(subPixelOptimizeOutputShape,W,this.style);Z=ee.x1,X=ee.y1,K=ee.x2,Q=ee.y2}else Z=W.x1,X=W.y1,K=W.x2,Q=W.y2;var te=W.percent;te!==0&&(H.moveTo(Z,X),te<1&&(K=Z*(1-te)+K*te,Q=X*(1-te)+Q*te),H.lineTo(K,Q))},G.prototype.pointAt=function(H){var W=this.shape;return[W.x1*(1-H)+W.x2*H,W.y1*(1-H)+W.y2*H]},G})(Path);Line$1.prototype.type="line";var out=[],BezierCurveShape=(function(){function U(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return U})();function someVectorAt(U,G,H){var W=U.cpx2,Z=U.cpy2;return W!=null||Z!=null?[(H?cubicDerivativeAt:cubicAt)(U.x1,U.cpx1,U.cpx2,U.x2,G),(H?cubicDerivativeAt:cubicAt)(U.y1,U.cpy1,U.cpy2,U.y2,G)]:[(H?quadraticDerivativeAt:quadraticAt$1)(U.x1,U.cpx1,U.x2,G),(H?quadraticDerivativeAt:quadraticAt$1)(U.y1,U.cpy1,U.y2,G)]}var BezierCurve=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},G.prototype.getDefaultShape=function(){return new BezierCurveShape},G.prototype.buildPath=function(H,W){var Z=W.x1,X=W.y1,K=W.x2,Q=W.y2,ee=W.cpx1,te=W.cpy1,re=W.cpx2,ae=W.cpy2,ne=W.percent;ne!==0&&(H.moveTo(Z,X),re==null||ae==null?(ne<1&&(quadraticSubdivide(Z,ee,K,ne,out),ee=out[1],K=out[2],quadraticSubdivide(X,te,Q,ne,out),te=out[1],Q=out[2]),H.quadraticCurveTo(ee,te,K,Q)):(ne<1&&(cubicSubdivide(Z,ee,re,K,ne,out),ee=out[1],re=out[2],K=out[3],cubicSubdivide(X,te,ae,Q,ne,out),te=out[1],ae=out[2],Q=out[3]),H.bezierCurveTo(ee,te,re,ae,K,Q)))},G.prototype.pointAt=function(H){return someVectorAt(this.shape,H,!1)},G.prototype.tangentAt=function(H){var W=someVectorAt(this.shape,H,!0);return normalize$3(W,W)},G})(Path);BezierCurve.prototype.type="bezier-curve";var ArcShape=(function(){function U(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return U})(),Arc=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},G.prototype.getDefaultShape=function(){return new ArcShape},G.prototype.buildPath=function(H,W){var Z=W.cx,X=W.cy,K=Math.max(W.r,0),Q=W.startAngle,ee=W.endAngle,te=W.clockwise,re=Math.cos(Q),ae=Math.sin(Q);H.moveTo(re*K+Z,ae*K+X),H.arc(Z,X,K,Q,ee,!te)},G})(Path);Arc.prototype.type="arc";var CompoundPath=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type="compound",H}return G.prototype._updatePathDirty=function(){for(var H=this.shape.paths,W=this.shapeChanged(),Z=0;Z<H.length;Z++)W=W||H[Z].shapeChanged();W&&this.dirtyShape()},G.prototype.beforeBrush=function(){this._updatePathDirty();for(var H=this.shape.paths||[],W=this.getGlobalScale(),Z=0;Z<H.length;Z++)H[Z].path||H[Z].createPathProxy(),H[Z].path.setScale(W[0],W[1],H[Z].segmentIgnoreThreshold)},G.prototype.buildPath=function(H,W){for(var Z=W.paths||[],X=0;X<Z.length;X++)Z[X].buildPath(H,Z[X].shape,!0)},G.prototype.afterBrush=function(){for(var H=this.shape.paths||[],W=0;W<H.length;W++)H[W].pathUpdated()},G.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Path.prototype.getBoundingRect.call(this)},G})(Path),Gradient=(function(){function U(G){this.colorStops=G||[]}return U.prototype.addColorStop=function(G,H){this.colorStops.push({offset:G,color:H})},U})(),LinearGradient=(function(U){__extends(G,U);function G(H,W,Z,X,K,Q){var ee=U.call(this,K)||this;return ee.x=H??0,ee.y=W??0,ee.x2=Z??1,ee.y2=X??0,ee.type="linear",ee.global=Q||!1,ee}return G})(Gradient),RadialGradient=(function(U){__extends(G,U);function G(H,W,Z,X,K){var Q=U.call(this,X)||this;return Q.x=H??.5,Q.y=W??.5,Q.r=Z??.5,Q.type="radial",Q.global=K||!1,Q}return G})(Gradient),mathMin$6=Math.min,mathMax$6=Math.max,mathAbs$1=Math.abs,_extent=[0,0],_extent2=[0,0],_intersectCtx=createIntersectContext(),_minTv=_intersectCtx.minTv,_maxTv=_intersectCtx.maxTv,OrientedBoundingRect=(function(){function U(G,H){this._corners=[],this._axes=[],this._origin=[0,0];for(var W=0;W<4;W++)this._corners[W]=new Point;for(var W=0;W<2;W++)this._axes[W]=new Point;G&&this.fromBoundingRect(G,H)}return U.prototype.fromBoundingRect=function(G,H){var W=this._corners,Z=this._axes,X=G.x,K=G.y,Q=X+G.width,ee=K+G.height;if(W[0].set(X,K),W[1].set(Q,K),W[2].set(Q,ee),W[3].set(X,ee),H)for(var te=0;te<4;te++)W[te].transform(H);Point.sub(Z[0],W[1],W[0]),Point.sub(Z[1],W[3],W[0]),Z[0].normalize(),Z[1].normalize();for(var te=0;te<2;te++)this._origin[te]=Z[te].dot(W[0])},U.prototype.intersect=function(G,H,W){var Z=!0,X=!H;return H&&Point.set(H,0,0),_intersectCtx.reset(W,!X),!this._intersectCheckOneSide(this,G,X,1)&&(Z=!1,X)||!this._intersectCheckOneSide(G,this,X,-1)&&(Z=!1,X)||!X&&!_intersectCtx.negativeSize&&Point.copy(H,Z?_intersectCtx.useDir?_intersectCtx.dirMinTv:_minTv:_maxTv),Z},U.prototype._intersectCheckOneSide=function(G,H,W,Z){for(var X=!0,K=0;K<2;K++){var Q=G._axes[K];if(G._getProjMinMaxOnAxis(K,G._corners,_extent),G._getProjMinMaxOnAxis(K,H._corners,_extent2),_intersectCtx.negativeSize||_extent[1]<_extent2[0]||_extent[0]>_extent2[1]){if(X=!1,_intersectCtx.negativeSize||W)return X;var ee=mathAbs$1(_extent2[0]-_extent[1]),te=mathAbs$1(_extent[0]-_extent2[1]);mathMin$6(ee,te)>_maxTv.len()&&(ee<te?Point.scale(_maxTv,Q,-ee*Z):Point.scale(_maxTv,Q,te*Z))}else if(!W){var ee=mathAbs$1(_extent2[0]-_extent[1]),te=mathAbs$1(_extent[0]-_extent2[1]);(_intersectCtx.useDir||mathMin$6(ee,te)<_minTv.len())&&((ee<te||!_intersectCtx.bidirectional)&&(Point.scale(_minTv,Q,ee*Z),_intersectCtx.useDir&&_intersectCtx.calcDirMTV()),(ee>=te||!_intersectCtx.bidirectional)&&(Point.scale(_minTv,Q,-te*Z),_intersectCtx.useDir&&_intersectCtx.calcDirMTV()))}}return X},U.prototype._getProjMinMaxOnAxis=function(G,H,W){for(var Z=this._axes[G],X=this._origin,K=H[0].dot(Z)+X[G],Q=K,ee=K,te=1;te<H.length;te++){var re=H[te].dot(Z)+X[G];Q=mathMin$6(re,Q),ee=mathMax$6(re,ee)}W[0]=Q+_intersectCtx.touchThreshold,W[1]=ee-_intersectCtx.touchThreshold,_intersectCtx.negativeSize=W[1]<W[0]},U})(),m=[],IncrementalDisplayable=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.notClear=!0,H.incremental=!0,H._displayables=[],H._temporaryDisplayables=[],H._cursor=0,H}return G.prototype.traverse=function(H,W){H.call(W,this)},G.prototype.useStyle=function(){this.style={}},G.prototype.getCursor=function(){return this._cursor},G.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},G.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},G.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},G.prototype.addDisplayable=function(H,W){W?this._temporaryDisplayables.push(H):this._displayables.push(H),this.markRedraw()},G.prototype.addDisplayables=function(H,W){W=W||!1;for(var Z=0;Z<H.length;Z++)this.addDisplayable(H[Z],W)},G.prototype.getDisplayables=function(){return this._displayables},G.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},G.prototype.eachPendingDisplayable=function(H){for(var W=this._cursor;W<this._displayables.length;W++)H&&H(this._displayables[W]);for(var W=0;W<this._temporaryDisplayables.length;W++)H&&H(this._temporaryDisplayables[W])},G.prototype.update=function(){this.updateTransform();for(var H=this._cursor;H<this._displayables.length;H++){var W=this._displayables[H];W.parent=this,W.update(),W.parent=null}for(var H=0;H<this._temporaryDisplayables.length;H++){var W=this._temporaryDisplayables[H];W.parent=this,W.update(),W.parent=null}},G.prototype.getBoundingRect=function(){if(!this._rect){for(var H=new BoundingRect(1/0,1/0,-1/0,-1/0),W=0;W<this._displayables.length;W++){var Z=this._displayables[W],X=Z.getBoundingRect().clone();Z.needLocalTransform()&&X.applyTransform(Z.getLocalTransform(m)),H.union(X)}this._rect=H}return this._rect},G.prototype.contain=function(H,W){var Z=this.transformCoordToLocal(H,W),X=this.getBoundingRect();if(X.contain(Z[0],Z[1]))for(var K=0;K<this._displayables.length;K++){var Q=this._displayables[K];if(Q.contain(H,W))return!0}return!1},G})(Displayable),transitionStore=makeInner();function getAnimationConfig(U,G,H,W,Z){var X;if(G&&G.ecModel){var K=G.ecModel.getUpdatePayload();X=K&&K.animation}var Q=G&&G.isAnimationEnabled(),ee=U==="update";if(Q){var te=void 0,re=void 0,ae=void 0;W?(te=retrieve2(W.duration,200),re=retrieve2(W.easing,"cubicOut"),ae=0):(te=G.getShallow(ee?"animationDurationUpdate":"animationDuration"),re=G.getShallow(ee?"animationEasingUpdate":"animationEasing"),ae=G.getShallow(ee?"animationDelayUpdate":"animationDelay")),X&&(X.duration!=null&&(te=X.duration),X.easing!=null&&(re=X.easing),X.delay!=null&&(ae=X.delay)),isFunction(ae)&&(ae=ae(H,Z)),isFunction(te)&&(te=te(H));var ne={duration:te||0,delay:ae,easing:re};return ne}else return null}function animateOrSetProps(U,G,H,W,Z,X,K){var Q=!1,ee;isFunction(Z)?(K=X,X=Z,Z=null):isObject$3(Z)&&(X=Z.cb,K=Z.during,Q=Z.isFrom,ee=Z.removeOpt,Z=Z.dataIndex);var te=U==="leave";te||G.stopAnimation("leave");var re=getAnimationConfig(U,W,Z,te?ee||{}:null,W&&W.getAnimationDelayParams?W.getAnimationDelayParams(G,Z):null);if(re&&re.duration>0){var ae=re.duration,ne=re.delay,ie=re.easing,oe={duration:ae,delay:ne||0,easing:ie,done:X,force:!!X||!!K,setToFinal:!te,scope:U,during:K};Q?G.animateFrom(H,oe):G.animateTo(H,oe)}else G.stopAnimation(),!Q&&G.attr(H),K&&K(1),X&&X()}function updateProps$1(U,G,H,W,Z,X){animateOrSetProps("update",U,G,H,W,Z,X)}function initProps(U,G,H,W,Z,X){animateOrSetProps("enter",U,G,H,W,Z,X)}function isElementRemoved(U){if(!U.__zr)return!0;for(var G=0;G<U.animators.length;G++){var H=U.animators[G];if(H.scope==="leave")return!0}return!1}function removeElement(U,G,H,W,Z,X){isElementRemoved(U)||animateOrSetProps("leave",U,G,H,W,Z,X)}function fadeOutDisplayable(U,G,H,W){U.removeTextContent(),U.removeTextGuideLine(),removeElement(U,{style:{opacity:0}},G,H,W)}function removeElementWithFadeOut(U,G,H){function W(){U.parent&&U.parent.remove(U)}U.isGroup?U.traverse(function(Z){Z.isGroup||fadeOutDisplayable(Z,G,H,W)}):fadeOutDisplayable(U,G,H,W)}function saveOldStyle(U){transitionStore(U).oldStyle=U.style}function getOldStyle(U){return transitionStore(U).oldStyle}var _customShapeMap={},XY$2=["x","y"],WH$2=["width","height"];function extendShape(U){return Path.extend(U)}var extendPathFromString=extendFromString;function extendPath(U,G){return extendPathFromString(U,G)}function registerShape(U,G){_customShapeMap[U]=G}function getShapeClass(U){if(_customShapeMap.hasOwnProperty(U))return _customShapeMap[U]}function makePath(U,G,H,W){var Z=createFromString(U,G);return H&&(W==="center"&&(H=centerGraphic(H,Z.getBoundingRect())),resizePath(Z,H)),Z}function makeImage(U,G,H){var W=new ZRImage({style:{image:U,x:G.x,y:G.y,width:G.width,height:G.height},onload:function(Z){if(H==="center"){var X={width:Z.width,height:Z.height};W.setStyle(centerGraphic(G,X))}}});return W}function centerGraphic(U,G){var H=G.width/G.height,W=U.height*H,Z;W<=U.width?Z=U.height:(W=U.width,Z=W/H);var X=U.x+U.width/2,K=U.y+U.height/2;return{x:X-W/2,y:K-Z/2,width:W,height:Z}}var mergePath=mergePath$1;function resizePath(U,G){if(U.applyTransform){var H=U.getBoundingRect(),W=H.calculateTransform(G);U.applyTransform(W)}}function subPixelOptimizeLine(U,G){return subPixelOptimizeLine$1(U,U,{lineWidth:G}),U}function subPixelOptimizeRect(U,G){return subPixelOptimizeRect$1(U,U,G),U}var subPixelOptimize=subPixelOptimize$1;function getTransform$1(U,G){for(var H=identity([]);U&&U!==G;)mul(H,U.getLocalTransform(),H),U=U.parent;return H}function applyTransform(U,G,H){return G&&!isArrayLike(G)&&(G=Transformable.getLocalTransform(G)),H&&(G=invert([],G)),applyTransform$1([],U,G)}function transformDirection(U,G,H){var W=G[4]===0||G[5]===0||G[0]===0?1:mathAbs$4(2*G[4]/G[0]),Z=G[4]===0||G[5]===0||G[2]===0?1:mathAbs$4(2*G[4]/G[2]),X=[U==="left"?-W:U==="right"?W:0,U==="top"?-Z:U==="bottom"?Z:0];return X=applyTransform(X,G,H),mathAbs$4(X[0])>mathAbs$4(X[1])?X[0]>0?"right":"left":X[1]>0?"bottom":"top"}function isNotGroup(U){return!U.isGroup}function isPath$1(U){return U.shape!=null}function groupTransition(U,G,H){if(!U||!G)return;function W(K){var Q={};return K.traverse(function(ee){isNotGroup(ee)&&ee.anid&&(Q[ee.anid]=ee)}),Q}function Z(K){var Q={x:K.x,y:K.y,rotation:K.rotation};return isPath$1(K)&&(Q.shape=clone$4(K.shape)),Q}var X=W(U);G.traverse(function(K){if(isNotGroup(K)&&K.anid){var Q=X[K.anid];if(Q){var ee=Z(K);K.attr(Z(Q)),updateProps$1(K,ee,H,getECData(K).dataIndex)}}})}function clipPointsByRect(U,G){return map$1(U,function(H){var W=H[0];W=mathMax$a(W,G.x),W=mathMin$a(W,G.x+G.width);var Z=H[1];return Z=mathMax$a(Z,G.y),Z=mathMin$a(Z,G.y+G.height),[W,Z]})}function clipRectByRect(U,G){var H=mathMax$a(U.x,G.x),W=mathMin$a(U.x+U.width,G.x+G.width),Z=mathMax$a(U.y,G.y),X=mathMin$a(U.y+U.height,G.y+G.height);if(W>=H&&X>=Z)return{x:H,y:Z,width:W-H,height:X-Z}}function createIcon(U,G,H){var W=extend({rectHover:!0},G),Z=W.style={strokeNoScale:!0};if(H=H||{x:-1,y:-1,width:2,height:2},U)return U.indexOf("image://")===0?(Z.image=U.slice(8),defaults(Z,H),new ZRImage(W)):makePath(U.replace("path://",""),W,H,"center")}function linePolygonIntersect(U,G,H,W,Z){for(var X=0,K=Z[Z.length-1];X<Z.length;X++){var Q=Z[X];if(lineLineIntersect$1(U,G,H,W,Q[0],Q[1],K[0],K[1]))return!0;K=Q}}function lineLineIntersect$1(U,G,H,W,Z,X,K,Q){var ee=H-U,te=W-G,re=K-Z,ae=Q-X,ne=crossProduct2d$1(re,ae,ee,te);if(nearZero(ne))return!1;var ie=U-Z,oe=G-X,se=crossProduct2d$1(ie,oe,ee,te)/ne;if(se<0||se>1)return!1;var le=crossProduct2d$1(ie,oe,re,ae)/ne;return!(le<0||le>1)}function crossProduct2d$1(U,G,H,W){return U*W-H*G}function nearZero(U){return U<=1e-6&&U>=-1e-6}function expandOrShrinkRect(U,G,H,W,Z){return G==null||(isNumber(G)?_tmpExpandRectDelta[0]=_tmpExpandRectDelta[1]=_tmpExpandRectDelta[2]=_tmpExpandRectDelta[3]=G:(process.env.NODE_ENV!=="production"&&assert(G.length===4),_tmpExpandRectDelta[0]=G[0],_tmpExpandRectDelta[1]=G[1],_tmpExpandRectDelta[2]=G[2],_tmpExpandRectDelta[3]=G[3]),W&&(_tmpExpandRectDelta[0]=mathMax$a(0,_tmpExpandRectDelta[0]),_tmpExpandRectDelta[1]=mathMax$a(0,_tmpExpandRectDelta[1]),_tmpExpandRectDelta[2]=mathMax$a(0,_tmpExpandRectDelta[2]),_tmpExpandRectDelta[3]=mathMax$a(0,_tmpExpandRectDelta[3])),H&&(_tmpExpandRectDelta[0]=-_tmpExpandRectDelta[0],_tmpExpandRectDelta[1]=-_tmpExpandRectDelta[1],_tmpExpandRectDelta[2]=-_tmpExpandRectDelta[2],_tmpExpandRectDelta[3]=-_tmpExpandRectDelta[3]),expandRectOnOneDimension(U,_tmpExpandRectDelta,"x","width",3,1,Z&&Z[0]||0),expandRectOnOneDimension(U,_tmpExpandRectDelta,"y","height",0,2,Z&&Z[1]||0)),U}var _tmpExpandRectDelta=[0,0,0,0];function expandRectOnOneDimension(U,G,H,W,Z,X,K){var Q=G[X]+G[Z],ee=U[W];U[W]+=Q,K=mathMax$a(0,mathMin$a(K,ee)),U[W]<K?(U[W]=K,U[H]+=G[Z]>=0?-G[Z]:G[X]>=0?ee+G[X]:mathAbs$4(Q)>1e-8?(ee-K)*G[Z]/Q:0):U[H]-=G[Z]}function setTooltipConfig(U){var G=U.itemTooltipOption,H=U.componentModel,W=U.itemName,Z=isString(G)?{formatter:G}:G,X=H.mainType,K=H.componentIndex,Q={componentType:X,name:W,$vars:["name"]};Q[X+"Index"]=K;var ee=U.formatterParamsExtra;ee&&each$f(keys(ee),function(re){hasOwn(Q,re)||(Q[re]=ee[re],Q.$vars.push(re))});var te=getECData(U.el);te.componentMainType=X,te.componentIndex=K,te.tooltipConfig={name:W,option:defaults({content:W,encodeHTMLContent:!0,formatterParams:Q},Z)}}function traverseElement(U,G){var H;U.isGroup&&(H=G(U)),H||U.traverse(G)}function traverseElements(U,G){if(U)if(isArray$1(U))for(var H=0;H<U.length;H++)traverseElement(U[H],G);else traverseElement(U,G)}function isBoundingRectAxisAligned(U){return!U||mathAbs$4(U[1])<AXIS_ALIGN_EPSILON&&mathAbs$4(U[2])<AXIS_ALIGN_EPSILON||mathAbs$4(U[0])<AXIS_ALIGN_EPSILON&&mathAbs$4(U[3])<AXIS_ALIGN_EPSILON}var AXIS_ALIGN_EPSILON=1e-5;function ensureCopyRect(U,G){return U?BoundingRect.copy(U,G):G.clone()}function ensureCopyTransform(U,G){return G?copy(U||create$1(),G):void 0}function retrieveZInfo(U){return{z:U.get("z")||0,zlevel:U.get("zlevel")||0}}function calcZ2Range(U){var G=-1/0,H=1/0;traverseElement(U,function(X){W(X),W(X.getTextContent()),W(X.getTextGuideLine())});function W(X){if(!(!X||X.isGroup)){var K=X.currentStates;if(K.length)for(var Q=0;Q<K.length;Q++)Z(X.states[K[Q]]);Z(X)}}function Z(X){if(X){var K=X.z2;K>G&&(G=K),K<H&&(H=K)}}return H>G&&(H=G=0),{min:H,max:G}}function traverseUpdateZ(U,G,H){doUpdateZ(U,G,H,-1/0)}function doUpdateZ(U,G,H,W){if(U.ignoreModelZ)return W;var Z=U.getTextContent(),X=U.getTextGuideLine(),K=U.isGroup;if(K)for(var Q=U.childrenRef(),ee=0;ee<Q.length;ee++)W=mathMax$a(doUpdateZ(Q[ee],G,H,W),W);else U.z=G,U.zlevel=H,W=mathMax$a(U.z2||0,W);if(Z&&(Z.z=G,Z.zlevel=H,isFinite(W)&&(Z.z2=W+2)),X){var te=U.textGuideLineConfig;X.z=G,X.zlevel=H,isFinite(W)&&(X.z2=W+(te&&te.showAbove?1:-1))}return W}registerShape("circle",Circle),registerShape("ellipse",Ellipse),registerShape("sector",Sector),registerShape("ring",Ring),registerShape("polygon",Polygon),registerShape("polyline",Polyline$1),registerShape("rect",Rect$2),registerShape("line",Line$1),registerShape("bezierCurve",BezierCurve),registerShape("arc",Arc);const graphic=Object.freeze(Object.defineProperty({__proto__:null,Arc,BezierCurve,BoundingRect,Circle,CompoundPath,Ellipse,Group:Group$3,Image:ZRImage,IncrementalDisplayable,Line:Line$1,LinearGradient,OrientedBoundingRect,Path,Point,Polygon,Polyline:Polyline$1,RadialGradient,Rect:Rect$2,Ring,Sector,Text:ZRText,WH:WH$2,XY:XY$2,applyTransform,calcZ2Range,clipPointsByRect,clipRectByRect,createIcon,ensureCopyRect,ensureCopyTransform,expandOrShrinkRect,extendPath,extendShape,getShapeClass,getTransform:getTransform$1,groupTransition,initProps,isBoundingRectAxisAligned,isElementRemoved,lineLineIntersect:lineLineIntersect$1,linePolygonIntersect,makeImage,makePath,mergePath,registerShape,removeElement,removeElementWithFadeOut,resizePath,retrieveZInfo,setTooltipConfig,subPixelOptimize,subPixelOptimizeLine,subPixelOptimizeRect,transformDirection,traverseElements,traverseUpdateZ,updateProps:updateProps$1},Symbol.toStringTag,{value:"Module"}));var EMPTY_OBJ={};function setLabelText(U,G){for(var H=0;H<SPECIAL_STATES.length;H++){var W=SPECIAL_STATES[H],Z=G[W],X=U.ensureState(W);X.style=X.style||{},X.style.text=Z}var K=U.currentStates.slice();U.clearStates(!0),U.setStyle({text:G.normal}),U.useStates(K,!0)}function getLabelText(U,G,H){var W=U.labelFetcher,Z=U.labelDataIndex,X=U.labelDimIndex,K=G.normal,Q;W&&(Q=W.getFormattedLabel(Z,"normal",null,X,K&&K.get("formatter"),H!=null?{interpolatedValue:H}:null)),Q==null&&(Q=isFunction(U.defaultText)?U.defaultText(Z,U,H):U.defaultText);for(var ee={normal:Q},te=0;te<SPECIAL_STATES.length;te++){var re=SPECIAL_STATES[te],ae=G[re];ee[re]=retrieve2(W?W.getFormattedLabel(Z,re,null,X,ae&&ae.get("formatter")):null,Q)}return ee}function setLabelStyle(U,G,H,W){H=H||EMPTY_OBJ;for(var Z=U instanceof ZRText,X=!1,K=0;K<DISPLAY_STATES.length;K++){var Q=G[DISPLAY_STATES[K]];if(Q&&Q.getShallow("show")){X=!0;break}}var ee=Z?U:U.getTextContent();if(X){Z||(ee||(ee=new ZRText,U.setTextContent(ee)),U.stateProxy&&(ee.stateProxy=U.stateProxy));var te=getLabelText(H,G),re=G.normal,ae=!!re.getShallow("show"),ne=createTextStyle(re,W&&W.normal,H,!1,!Z);ne.text=te.normal,Z||U.setTextConfig(createTextConfig(re,H,!1));for(var K=0;K<SPECIAL_STATES.length;K++){var ie=SPECIAL_STATES[K],Q=G[ie];if(Q){var oe=ee.ensureState(ie),se=!!retrieve2(Q.getShallow("show"),ae);if(se!==ae&&(oe.ignore=!se),oe.style=createTextStyle(Q,W&&W[ie],H,!0,!Z),oe.style.text=te[ie],!Z){var le=U.ensureState(ie);le.textConfig=createTextConfig(Q,H,!0)}}}ee.silent=!!re.getShallow("silent"),ee.style.x!=null&&(ne.x=ee.style.x),ee.style.y!=null&&(ne.y=ee.style.y),ee.ignore=!ae,ee.useStyle(ne),ee.dirty(),H.enableTextSetter&&(labelInner(ee).setLabelText=function(ue){var ce=getLabelText(H,G,ue);setLabelText(ee,ce)})}else ee&&(ee.ignore=!0);U.dirty()}function getLabelStatesModels(U,G){G=G||"label";for(var H={normal:U.getModel(G)},W=0;W<SPECIAL_STATES.length;W++){var Z=SPECIAL_STATES[W];H[Z]=U.getModel([Z,G])}return H}function createTextStyle(U,G,H,W,Z){var X={};return setTextStyleCommon(X,U,H,W,Z),G&&extend(X,G),X}function createTextConfig(U,G,H){G=G||{};var W={},Z,X=U.getShallow("rotate"),K=retrieve2(U.getShallow("distance"),H?null:5),Q=U.getShallow("offset");return Z=U.getShallow("position")||(H?null:"inside"),Z==="outside"&&(Z=G.defaultOutsidePosition||"top"),Z!=null&&(W.position=Z),Q!=null&&(W.offset=Q),X!=null&&(X*=Math.PI/180,W.rotation=X),K!=null&&(W.distance=K),W.outsideFill=U.get("color")==="inherit"?G.inheritColor||null:"auto",G.autoOverflowArea!=null&&(W.autoOverflowArea=G.autoOverflowArea),G.layoutRect!=null&&(W.layoutRect=G.layoutRect),W}function setTextStyleCommon(U,G,H,W,Z){H=H||EMPTY_OBJ;var X=G.ecModel,K=X&&X.option.textStyle,Q=getRichItemNames(G),ee;if(Q){ee={};var te="richInheritPlainLabel",re=retrieve2(G.get(te),X?X.get(te):void 0);for(var ae in Q)if(Q.hasOwnProperty(ae)){var ne=G.getModel(["rich",ae]);setTokenTextStyle(ee[ae]={},ne,K,G,re,H,W,Z,!1,!0)}}ee&&(U.rich=ee);var ie=G.get("overflow");ie&&(U.overflow=ie);var oe=G.get("lineOverflow");oe&&(U.lineOverflow=oe);var se=U,le=G.get("minMargin");if(le!=null)le=isNumber(le)?le/2:0,se.margin=[le,le,le,le],se.__marginType=LabelMarginType.minMargin;else{var ue=G.get("textMargin");ue!=null&&(se.margin=normalizeCssArray$1(ue),se.__marginType=LabelMarginType.textMargin)}setTokenTextStyle(U,G,K,null,null,H,W,Z,!0,!1)}function getRichItemNames(U){for(var G;U&&U!==U.ecModel;){var H=(U.option||EMPTY_OBJ).rich;if(H){G=G||{};for(var W=keys(H),Z=0;Z<W.length;Z++){var X=W[Z];G[X]=1}}U=U.parentModel}return G}var TEXT_PROPS_WITH_GLOBAL=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],TEXT_PROPS_SELF=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],TEXT_PROPS_BOX=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function setTokenTextStyle(U,G,H,W,Z,X,K,Q,ee,te){H=!K&&H||EMPTY_OBJ;var re=X&&X.inheritColor,ae=G.getShallow("color"),ne=G.getShallow("textBorderColor"),ie=retrieve2(G.getShallow("opacity"),H.opacity);(ae==="inherit"||ae==="auto")&&(process.env.NODE_ENV!=="production"&&ae==="auto"&&deprecateReplaceLog("color: 'auto'","color: 'inherit'"),re?ae=re:ae=null),(ne==="inherit"||ne==="auto")&&(process.env.NODE_ENV!=="production"&&ne==="auto"&&deprecateReplaceLog("color: 'auto'","color: 'inherit'"),re?ne=re:ne=null),Q||(ae=ae||H.color,ne=ne||H.textBorderColor),ae!=null&&(U.fill=ae),ne!=null&&(U.stroke=ne);var oe=retrieve2(G.getShallow("textBorderWidth"),H.textBorderWidth);oe!=null&&(U.lineWidth=oe);var se=retrieve2(G.getShallow("textBorderType"),H.textBorderType);se!=null&&(U.lineDash=se);var le=retrieve2(G.getShallow("textBorderDashOffset"),H.textBorderDashOffset);le!=null&&(U.lineDashOffset=le),!K&&ie==null&&!te&&(ie=X&&X.defaultOpacity),ie!=null&&(U.opacity=ie),!K&&!Q&&U.fill==null&&X.inheritColor&&(U.fill=X.inheritColor);for(var ue=0;ue<TEXT_PROPS_WITH_GLOBAL.length;ue++){var ce=TEXT_PROPS_WITH_GLOBAL[ue],fe=Z!==!1&&W?retrieve3(G.getShallow(ce),W.getShallow(ce),H[ce]):retrieve2(G.getShallow(ce),H[ce]);fe!=null&&(U[ce]=fe)}for(var ue=0;ue<TEXT_PROPS_SELF.length;ue++){var ce=TEXT_PROPS_SELF[ue],fe=G.getShallow(ce);fe!=null&&(U[ce]=fe)}if(U.verticalAlign==null){var he=G.getShallow("baseline");he!=null&&(U.verticalAlign=he)}if(!ee||!X.disableBox){for(var ue=0;ue<TEXT_PROPS_BOX.length;ue++){var ce=TEXT_PROPS_BOX[ue],fe=G.getShallow(ce);fe!=null&&(U[ce]=fe)}var ve=G.getShallow("borderType");ve!=null&&(U.borderDash=ve),(U.backgroundColor==="auto"||U.backgroundColor==="inherit")&&re&&(process.env.NODE_ENV!=="production"&&U.backgroundColor==="auto"&&deprecateReplaceLog("backgroundColor: 'auto'","backgroundColor: 'inherit'"),U.backgroundColor=re),(U.borderColor==="auto"||U.borderColor==="inherit")&&re&&(process.env.NODE_ENV!=="production"&&U.borderColor==="auto"&&deprecateReplaceLog("borderColor: 'auto'","borderColor: 'inherit'"),U.borderColor=re)}}function getFont(U,G){var H=G&&G.getModel("textStyle");return trim$1([U.fontStyle||H&&H.getShallow("fontStyle")||"",U.fontWeight||H&&H.getShallow("fontWeight")||"",(U.fontSize||H&&H.getShallow("fontSize")||12)+"px",U.fontFamily||H&&H.getShallow("fontFamily")||"sans-serif"].join(" "))}var labelInner=makeInner();function setLabelValueAnimation(U,G,H,W){if(U){var Z=labelInner(U);Z.prevValue=Z.value,Z.value=H;var X=G.normal;Z.valueAnimation=X.get("valueAnimation"),Z.valueAnimation&&(Z.precision=X.get("precision"),Z.defaultInterpolatedText=W,Z.statesModels=G)}}function animateLabelValue(U,G,H,W,Z){var X=labelInner(U);if(!X.valueAnimation||X.prevValue===X.value)return;var K=X.defaultInterpolatedText,Q=retrieve2(X.interpolatedValue,X.prevValue),ee=X.value;function te(re){var ae=interpolateRawValues(H,X.precision,Q,ee,re);X.interpolatedValue=re===1?null:ae;var ne=getLabelText({labelDataIndex:G,labelFetcher:Z,defaultText:K?K(ae):ae+""},X.statesModels,ae);setLabelText(U,ne)}U.percent=0,(X.prevValue==null?initProps:updateProps$1)(U,{percent:1},W,G,null,te)}var LabelMarginType={minMargin:1,textMargin:2},PATH_COLOR=["textStyle","color"],textStyleParams=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],tmpText=new ZRText,TextStyleMixin=(function(){function U(){}return U.prototype.getTextColor=function(G){var H=this.ecModel;return this.getShallow("color")||(!G&&H?H.get(PATH_COLOR):null)},U.prototype.getFont=function(){return getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},U.prototype.getTextRect=function(G){for(var H={text:G,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},W=0;W<textStyleParams.length;W++)H[textStyleParams[W]]=this.getShallow(textStyleParams[W]);return tmpText.useStyle(H),tmpText.update(),tmpText.getBoundingRect()},U})(),LINE_STYLE_KEY_MAP=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],getLineStyle=makeStyleMapper(LINE_STYLE_KEY_MAP),LineStyleMixin=(function(){function U(){}return U.prototype.getLineStyle=function(G){return getLineStyle(this,G)},U})(),ITEM_STYLE_KEY_MAP=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],getItemStyle=makeStyleMapper(ITEM_STYLE_KEY_MAP),ItemStyleMixin=(function(){function U(){}return U.prototype.getItemStyle=function(G,H){return getItemStyle(this,G,H)},U})(),Model=(function(){function U(G,H,W){this.parentModel=H,this.ecModel=W,this.option=G}return U.prototype.init=function(G,H,W){},U.prototype.mergeOption=function(G,H){merge(this.option,G,!0)},U.prototype.get=function(G,H){return G==null?this.option:this._doGet(this.parsePath(G),!H&&this.parentModel)},U.prototype.getShallow=function(G,H){var W=this.option,Z=W==null?W:W[G];if(Z==null&&!H){var X=this.parentModel;X&&(Z=X.getShallow(G))}return Z},U.prototype.getModel=function(G,H){var W=G!=null,Z=W?this.parsePath(G):null,X=W?this._doGet(Z):this.option;return H=H||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(Z)),new U(X,H,this.ecModel)},U.prototype.isEmpty=function(){return this.option==null},U.prototype.restoreData=function(){},U.prototype.clone=function(){var G=this.constructor;return new G(clone$4(this.option))},U.prototype.parsePath=function(G){return typeof G=="string"?G.split("."):G},U.prototype.resolveParentPath=function(G){return G},U.prototype.isAnimationEnabled=function(){if(!env.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},U.prototype._doGet=function(G,H){var W=this.option;if(!G)return W;for(var Z=0;Z<G.length&&!(G[Z]&&(W=W&&typeof W=="object"?W[G[Z]]:null,W==null));Z++);return W==null&&H&&(W=H._doGet(this.resolveParentPath(G),H.parentModel)),W},U})();enableClassExtend(Model),enableClassCheck(Model),mixin(Model,LineStyleMixin),mixin(Model,ItemStyleMixin),mixin(Model,AreaStyleMixin),mixin(Model,TextStyleMixin);var base=Math.round(Math.random()*10);function getUID(U){return[U||"",base++].join("_")}function enableSubTypeDefaulter(U){var G={};U.registerSubTypeDefaulter=function(H,W){var Z=parseClassType(H);G[Z.main]=W},U.determineSubType=function(H,W){var Z=W.type;if(!Z){var X=parseClassType(H).main;U.hasSubTypes(H)&&G[X]&&(Z=G[X](W))}return Z}}function enableTopologicalTravel(U,G){U.topologicalTravel=function(X,K,Q,ee){if(!X.length)return;var te=H(K),re=te.graph,ae=te.noEntryList,ne={};for(each$f(X,function(ce){ne[ce]=!0});ae.length;){var ie=ae.pop(),oe=re[ie],se=!!ne[ie];se&&(Q.call(ee,ie,oe.originalDeps.slice()),delete ne[ie]),each$f(oe.successor,se?ue:le)}each$f(ne,function(){var ce="";throw process.env.NODE_ENV!=="production"&&(ce=makePrintable("Circular dependency may exists: ",ne,X,K)),new Error(ce)});function le(ce){re[ce].entryCount--,re[ce].entryCount===0&&ae.push(ce)}function ue(ce){ne[ce]=!0,le(ce)}};function H(X){var K={},Q=[];return each$f(X,function(ee){var te=W(K,ee),re=te.originalDeps=G(ee),ae=Z(re,X);te.entryCount=ae.length,te.entryCount===0&&Q.push(ee),each$f(ae,function(ne){indexOf(te.predecessor,ne)<0&&te.predecessor.push(ne);var ie=W(K,ne);indexOf(ie.successor,ne)<0&&ie.successor.push(ee)})}),{graph:K,noEntryList:Q}}function W(X,K){return X[K]||(X[K]={predecessor:[],successor:[]}),X[K]}function Z(X,K){var Q=[];return each$f(X,function(ee){indexOf(K,ee)>=0&&Q.push(ee)}),Q}}function inheritDefaultOption(U,G){return merge(merge({},U,!0),G,!0)}const langEN={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},langZH={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var LOCALE_ZH="ZH",LOCALE_EN="EN",DEFAULT_LOCALE=LOCALE_EN,localeStorage={},localeModels={},SYSTEM_LANG=env.domSupported?(function(){var U=(document.documentElement.lang||navigator.language||navigator.browserLanguage||DEFAULT_LOCALE).toUpperCase();return U.indexOf(LOCALE_ZH)>-1?LOCALE_ZH:DEFAULT_LOCALE})():DEFAULT_LOCALE;function registerLocale(U,G){U=U.toUpperCase(),localeModels[U]=new Model(G),localeStorage[U]=G}function createLocaleObject(U){if(isString(U)){var G=localeStorage[U.toUpperCase()]||{};return U===LOCALE_ZH||U===LOCALE_EN?clone$4(G):merge(clone$4(G),clone$4(localeStorage[DEFAULT_LOCALE]),!1)}else return merge(clone$4(U),clone$4(localeStorage[DEFAULT_LOCALE]),!1)}function getLocaleModel(U){return localeModels[U]}function getDefaultLocaleModel(){return localeModels[DEFAULT_LOCALE]}registerLocale(LOCALE_EN,langEN),registerLocale(LOCALE_ZH,langZH);var _impl$1=null;function registerScaleBreakHelperImpl(U){_impl$1||(_impl$1=U)}function getScaleBreakHelper(){return _impl$1}var ONE_SECOND=1e3,ONE_MINUTE=ONE_SECOND*60,ONE_HOUR=ONE_MINUTE*60,ONE_DAY=ONE_HOUR*24,ONE_YEAR=ONE_DAY*365,primaryTimeUnitFormatterMatchers={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},defaultFormatterSeed={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},defaultFullFormatter="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",fullDayFormatter="{yyyy}-{MM}-{dd}",fullLeveledFormatter={year:"{yyyy}",month:"{yyyy}-{MM}",day:fullDayFormatter,hour:fullDayFormatter+" "+defaultFormatterSeed.hour,minute:fullDayFormatter+" "+defaultFormatterSeed.minute,second:fullDayFormatter+" "+defaultFormatterSeed.second,millisecond:defaultFullFormatter},primaryTimeUnits=["year","month","day","hour","minute","second","millisecond"],timeUnits=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function parseTimeAxisLabelFormatter(U){return!isString(U)&&!isFunction(U)?parseTimeAxisLabelFormatterDictionary(U):U}function parseTimeAxisLabelFormatterDictionary(U){U=U||{};var G={},H=!0;return each$f(primaryTimeUnits,function(W){H&&(H=U[W]==null)}),each$f(primaryTimeUnits,function(W,Z){var X=U[W];G[W]={};for(var K=null,Q=Z;Q>=0;Q--){var ee=primaryTimeUnits[Q],te=isObject$3(X)&&!isArray$1(X)?X[ee]:X,re=void 0;isArray$1(te)?(re=te.slice(),K=re[0]||""):isString(te)?(K=te,re=[K]):(K==null?K=defaultFormatterSeed[W]:primaryTimeUnitFormatterMatchers[ee].test(K)||(K=G[ee][ee][0]+" "+K),re=[K],H&&(re[1]="{primary|"+K+"}")),G[W][ee]=re}}),G}function pad(U,G){return U+="","0000".substr(0,G-U.length)+U}function getPrimaryTimeUnit(U){switch(U){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return U}}function isPrimaryTimeUnit(U){return U===getPrimaryTimeUnit(U)}function getDefaultFormatPrecisionOfInterval(U){switch(U){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function format(U,G,H,W){var Z=parseDate(U),X=Z[fullYearGetterName(H)](),K=Z[monthGetterName(H)]()+1,Q=Math.floor((K-1)/3)+1,ee=Z[dateGetterName(H)](),te=Z["get"+(H?"UTC":"")+"Day"](),re=Z[hoursGetterName(H)](),ae=(re-1)%12+1,ne=Z[minutesGetterName(H)](),ie=Z[secondsGetterName(H)](),oe=Z[millisecondsGetterName(H)](),se=re>=12?"pm":"am",le=se.toUpperCase(),ue=W instanceof Model?W:getLocaleModel(W||SYSTEM_LANG)||getDefaultLocaleModel(),ce=ue.getModel("time"),fe=ce.get("month"),he=ce.get("monthAbbr"),ve=ce.get("dayOfWeek"),de=ce.get("dayOfWeekAbbr");return(G||"").replace(/{a}/g,se+"").replace(/{A}/g,le+"").replace(/{yyyy}/g,X+"").replace(/{yy}/g,pad(X%100+"",2)).replace(/{Q}/g,Q+"").replace(/{MMMM}/g,fe[K-1]).replace(/{MMM}/g,he[K-1]).replace(/{MM}/g,pad(K,2)).replace(/{M}/g,K+"").replace(/{dd}/g,pad(ee,2)).replace(/{d}/g,ee+"").replace(/{eeee}/g,ve[te]).replace(/{ee}/g,de[te]).replace(/{e}/g,te+"").replace(/{HH}/g,pad(re,2)).replace(/{H}/g,re+"").replace(/{hh}/g,pad(ae+"",2)).replace(/{h}/g,ae+"").replace(/{mm}/g,pad(ne,2)).replace(/{m}/g,ne+"").replace(/{ss}/g,pad(ie,2)).replace(/{s}/g,ie+"").replace(/{SSS}/g,pad(oe,3)).replace(/{S}/g,oe+"")}function leveledFormat(U,G,H,W,Z){var X=null;if(isString(H))X=H;else if(isFunction(H)){var K={time:U.time,level:U.time.level},Q=getScaleBreakHelper();Q&&Q.makeAxisLabelFormatterParamBreak(K,U.break),X=H(U.value,G,K)}else{var ee=U.time;if(ee){var te=H[ee.lowerTimeUnit][ee.upperTimeUnit];X=te[Math.min(ee.level,te.length-1)]||""}else{var re=getUnitFromValue(U.value,Z);X=H[re][re][0]}}return format(new Date(U.value),X,Z,W)}function getUnitFromValue(U,G){var H=parseDate(U),W=H[monthGetterName(G)]()+1,Z=H[dateGetterName(G)](),X=H[hoursGetterName(G)](),K=H[minutesGetterName(G)](),Q=H[secondsGetterName(G)](),ee=H[millisecondsGetterName(G)](),te=ee===0,re=te&&Q===0,ae=re&&K===0,ne=ae&&X===0,ie=ne&&Z===1,oe=ie&&W===1;return oe?"year":ie?"month":ne?"day":ae?"hour":re?"minute":te?"second":"millisecond"}function roundTime(U,G,H){switch(G){case"year":U[monthSetterName(H)](0);case"month":U[dateSetterName(H)](1);case"day":U[hoursSetterName(H)](0);case"hour":U[minutesSetterName(H)](0);case"minute":U[secondsSetterName(H)](0);case"second":U[millisecondsSetterName(H)](0)}return U}function fullYearGetterName(U){return U?"getUTCFullYear":"getFullYear"}function monthGetterName(U){return U?"getUTCMonth":"getMonth"}function dateGetterName(U){return U?"getUTCDate":"getDate"}function hoursGetterName(U){return U?"getUTCHours":"getHours"}function minutesGetterName(U){return U?"getUTCMinutes":"getMinutes"}function secondsGetterName(U){return U?"getUTCSeconds":"getSeconds"}function millisecondsGetterName(U){return U?"getUTCMilliseconds":"getMilliseconds"}function fullYearSetterName(U){return U?"setUTCFullYear":"setFullYear"}function monthSetterName(U){return U?"setUTCMonth":"setMonth"}function dateSetterName(U){return U?"setUTCDate":"setDate"}function hoursSetterName(U){return U?"setUTCHours":"setHours"}function minutesSetterName(U){return U?"setUTCMinutes":"setMinutes"}function secondsSetterName(U){return U?"setUTCSeconds":"setSeconds"}function millisecondsSetterName(U){return U?"setUTCMilliseconds":"setMilliseconds"}function addCommas(U){if(!isNumeric(U))return isString(U)?U:"-";var G=(U+"").split(".");return G[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(G.length>1?"."+G[1]:"")}function toCamelCase(U,G){return U=(U||"").toLowerCase().replace(/-(.)/g,function(H,W){return W.toUpperCase()}),G&&U&&(U=U.charAt(0).toUpperCase()+U.slice(1)),U}var normalizeCssArray=normalizeCssArray$1;function makeValueReadable(U,G,H){var W="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function Z(re){return re&&trim$1(re)?re:"-"}function X(re){return!!(re!=null&&!isNaN(re)&&isFinite(re))}var K=G==="time",Q=U instanceof Date;if(K||Q){var ee=K?parseDate(U):U;if(isNaN(+ee)){if(Q)return"-"}else return format(ee,W,H)}if(G==="ordinal")return isStringSafe(U)?Z(U):isNumber(U)&&X(U)?U+"":"-";var te=numericToNumber(U);return X(te)?addCommas(te):isStringSafe(U)?Z(U):typeof U=="boolean"?U+"":"-"}var TPL_VAR_ALIAS=["a","b","c","d","e","f","g"],wrapVar=function(U,G){return"{"+U+(G??"")+"}"};function formatTpl(U,G,H){isArray$1(G)||(G=[G]);var W=G.length;if(!W)return"";for(var Z=G[0].$vars||[],X=0;X<Z.length;X++){var K=TPL_VAR_ALIAS[X];U=U.replace(wrapVar(K),wrapVar(K,0))}for(var Q=0;Q<W;Q++)for(var ee=0;ee<Z.length;ee++){var te=G[Q][Z[ee]];U=U.replace(wrapVar(TPL_VAR_ALIAS[ee],Q),H?encodeHTML(te):te)}return U}function formatTplSimple(U,G,H){return each$f(G,function(W,Z){U=U.replace("{"+Z+"}",W)}),U}function getTooltipMarker(U,G){var H=isString(U)?{color:U,extraCssText:G}:U||{},W=H.color,Z=H.type;G=H.extraCssText;var X=H.renderMode||"html";if(!W)return"";if(X==="html")return Z==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+encodeHTML(W)+";"+(G||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+encodeHTML(W)+";"+(G||"")+'"></span>';var K=H.markerId||"markerX";return{renderMode:X,content:"{"+K+"|} ",style:Z==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:W}:{width:10,height:10,borderRadius:5,backgroundColor:W}}}function convertToColorString(U,G){return G=G||"transparent",isString(U)?U:isObject$3(U)&&U.colorStops&&(U.colorStops[0]||{}).color||G}function windowOpen(U,G){if(G==="_blank"||G==="blank"){var H=window.open();H.opener=null,H.location.href=U}else window.open(U,G)}var nonSeriesBoxCoordSysCreators={},normalCoordSysCreators={},CoordinateSystemManager=(function(){function U(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return U.prototype.create=function(G,H){this._nonSeriesBoxMasterList=W(nonSeriesBoxCoordSysCreators,!0),this._normalMasterList=W(normalCoordSysCreators,!1);function W(Z,X){var K=[];return each$f(Z,function(Q,ee){var te=Q.create(G,H);K=K.concat(te||[]),process.env.NODE_ENV!=="production"&&X&&each$f(te,function(re){return assert(!re.update)})}),K}},U.prototype.update=function(G,H){each$f(this._normalMasterList,function(W){W.update&&W.update(G,H)})},U.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},U.register=function(G,H){if(G==="matrix"||G==="calendar"){nonSeriesBoxCoordSysCreators[G]=H;return}normalCoordSysCreators[G]=H},U.get=function(G){return normalCoordSysCreators[G]||nonSeriesBoxCoordSysCreators[G]},U})();function canBeNonSeriesBoxCoordSys(U){return!!nonSeriesBoxCoordSysCreators[U]}var BoxCoordinateSystemCoordFrom={coord:1,coord2:2};function registerLayOutOnCoordSysUsage(U){process.env.NODE_ENV!=="production"&&assert(!coordSysUseMap.get(U.fullType)),coordSysUseMap.set(U.fullType,{getCoord2:void 0}).getCoord2=U.getCoord2}var coordSysUseMap=createHashMap();function getCoordForBoxCoordSys(U){var G=U.getShallow("coord",!0),H=BoxCoordinateSystemCoordFrom.coord;if(G==null){var W=coordSysUseMap.get(U.type);W&&W.getCoord2&&(H=BoxCoordinateSystemCoordFrom.coord2,G=W.getCoord2(U))}return{coord:G,from:H}}var CoordinateSystemUsageKind={none:0,dataCoordSys:1,boxCoordSys:2};function decideCoordSysUsageKind(U,G){var H=U.getShallow("coordinateSystem"),W=U.getShallow("coordinateSystemUsage",!0),Z=W!=null,X=CoordinateSystemUsageKind.none;if(H){var K=U.mainType==="series";W==null&&(W=K?"data":"box"),W==="data"?(X=CoordinateSystemUsageKind.dataCoordSys,K||(process.env.NODE_ENV!=="production"&&Z&&G&&error('coordinateSystemUsage "data" is not supported in non-series components.'),X=CoordinateSystemUsageKind.none)):W==="box"&&(X=CoordinateSystemUsageKind.boxCoordSys,!K&&!canBeNonSeriesBoxCoordSys(H)&&(process.env.NODE_ENV!=="production"&&Z&&G&&error('coordinateSystem "'+H+'" cannot be used'+(' as coordinateSystemUsage "box" for "'+U.type+'" yet.')),X=CoordinateSystemUsageKind.none))}return{coordSysType:H,kind:X}}function injectCoordSysByOption(U){var G=U.targetModel,H=U.coordSysType,W=U.coordSysProvider,Z=U.isDefaultDataCoordSys,X=U.allowNotFound;process.env.NODE_ENV!=="production"&&assert(!!H);var K=decideCoordSysUsageKind(G,!0),Q=K.kind,ee=K.coordSysType;if(Z&&Q!==CoordinateSystemUsageKind.dataCoordSys&&(Q=CoordinateSystemUsageKind.dataCoordSys,ee=H),Q===CoordinateSystemUsageKind.none||ee!==H)return!1;var te=W(H,G);return te?(Q===CoordinateSystemUsageKind.dataCoordSys?(process.env.NODE_ENV!=="production"&&assert(G.mainType==="series"),G.coordinateSystem=te):G.boxCoordinateSystem=te,!0):(process.env.NODE_ENV!=="production"&&(X||error(H+" cannot be found for"+(" "+G.type+" (index: "+G.componentIndex+")."))),!1)}var simpleCoordSysInjectionProvider=function(U,G){var H=G.getReferringComponents(U,SINGLE_REFERRING).models[0];return H&&H.coordinateSystem},each$e=each$f,LOCATION_PARAMS=["left","right","top","bottom","width","height"],HV_NAMES=[["width","left","right"],["height","top","bottom"]];function boxLayout(U,G,H,W,Z){var X=0,K=0;W==null&&(W=1/0),Z==null&&(Z=1/0);var Q=0;G.eachChild(function(ee,te){var re=ee.getBoundingRect(),ae=G.childAt(te+1),ne=ae&&ae.getBoundingRect(),ie,oe;if(U==="horizontal"){var se=re.width+(ne?-ne.x+re.x:0);ie=X+se,ie>W||ee.newline?(X=0,ie=se,K+=Q+H,Q=re.height):Q=Math.max(Q,re.height)}else{var le=re.height+(ne?-ne.y+re.y:0);oe=K+le,oe>Z||ee.newline?(X+=Q+H,K=0,oe=le,Q=re.width):Q=Math.max(Q,re.width)}ee.newline||(ee.x=X,ee.y=K,ee.markRedraw(),U==="horizontal"?X=ie+H:K=oe+H)})}var box=boxLayout;curry$1(boxLayout,"vertical"),curry$1(boxLayout,"horizontal");function getBoxLayoutParams(U,G){return{left:U.getShallow("left",G),top:U.getShallow("top",G),right:U.getShallow("right",G),bottom:U.getShallow("bottom",G),width:U.getShallow("width",G),height:U.getShallow("height",G)}}function getViewRectAndCenterForCircleLayout(U,G){var H=createBoxLayoutReference(U,G,{enableLayoutOnlyByCenter:!0}),W=U.getBoxLayoutParams(),Z,X;if(H.type===BoxLayoutReferenceType.point)X=H.refPoint,Z=getLayoutRect(W,{width:G.getWidth(),height:G.getHeight()});else{var K=U.get("center"),Q=isArray$1(K)?K:[K,K];Z=getLayoutRect(W,H.refContainer),X=H.boxCoordFrom===BoxCoordinateSystemCoordFrom.coord2?H.refPoint:[parsePercent(Q[0],Z.width)+Z.x,parsePercent(Q[1],Z.height)+Z.y]}return{viewRect:Z,center:X}}function getCircleLayout(U,G){var H=getViewRectAndCenterForCircleLayout(U,G),W=H.viewRect,Z=H.center,X=U.get("radius");isArray$1(X)||(X=[0,X]);var K=parsePercent(W.width,G.getWidth()),Q=parsePercent(W.height,G.getHeight()),ee=Math.min(K,Q),te=parsePercent(X[0],ee/2),re=parsePercent(X[1],ee/2);return{cx:Z[0],cy:Z[1],r0:te,r:re,viewRect:W}}function getLayoutRect(U,G,H){H=normalizeCssArray(H||0);var W=G.width,Z=G.height,X=parsePercent(U.left,W),K=parsePercent(U.top,Z),Q=parsePercent(U.right,W),ee=parsePercent(U.bottom,Z),te=parsePercent(U.width,W),re=parsePercent(U.height,Z),ae=H[2]+H[0],ne=H[1]+H[3],ie=U.aspect;switch(isNaN(te)&&(te=W-Q-ne-X),isNaN(re)&&(re=Z-ee-ae-K),ie!=null&&(isNaN(te)&&isNaN(re)&&(ie>W/Z?te=W*.8:re=Z*.8),isNaN(te)&&(te=ie*re),isNaN(re)&&(re=te/ie)),isNaN(X)&&(X=W-Q-te-ne),isNaN(K)&&(K=Z-ee-re-ae),U.left||U.right){case"center":X=W/2-te/2-H[3];break;case"right":X=W-te-ne;break}switch(U.top||U.bottom){case"middle":case"center":K=Z/2-re/2-H[0];break;case"bottom":K=Z-re-ae;break}X=X||0,K=K||0,isNaN(te)&&(te=W-ne-X-(Q||0)),isNaN(re)&&(re=Z-ae-K-(ee||0));var oe=new BoundingRect((G.x||0)+X+H[3],(G.y||0)+K+H[0],te,re);return oe.margin=H,oe}function applyPreserveAspect(U,G,H){var W=U.getShallow("preserveAspect",!0);if(!W)return G;var Z=G.width/G.height;if(Math.abs(Math.atan(H)-Math.atan(Z))<1e-9)return G;var X=U.getShallow("preserveAspectAlign",!0),K=U.getShallow("preserveAspectVerticalAlign",!0),Q={width:G.width,height:G.height},ee=W==="cover";return Z>H&&!ee||Z<H&&ee?(Q.width=G.height*H,X==="left"?Q.left=0:X==="right"?Q.right=0:Q.left="center"):(Q.height=G.width/H,K==="top"?Q.top=0:K==="bottom"?Q.bottom=0:Q.top="middle"),getLayoutRect(Q,G)}var BoxLayoutReferenceType={rect:1,point:2};function createBoxLayoutReference(U,G,H){var W,Z,X,K=U.boxCoordinateSystem,Q;if(K){var ee=getCoordForBoxCoordSys(U),te=ee.coord,re=ee.from;if(K.dataToLayout){X=BoxLayoutReferenceType.rect,Q=re;var ae=K.dataToLayout(te);W=ae.contentRect||ae.rect}else H&&H.enableLayoutOnlyByCenter&&K.dataToPoint?(X=BoxLayoutReferenceType.point,Q=re,Z=K.dataToPoint(te)):process.env.NODE_ENV!=="production"&&error(U.type+"["+U.componentIndex+"]"+(" layout based on "+K.type+" is not supported."))}return X==null&&(X=BoxLayoutReferenceType.rect),X===BoxLayoutReferenceType.rect&&(W||(W={x:0,y:0,width:G.getWidth(),height:G.getHeight()}),Z=[W.x+W.width/2,W.y+W.height/2]),{type:X,refContainer:W,refPoint:Z,boxCoordFrom:Q}}function positionElement(U,G,H,W,Z,X){var K=!Z||!Z.hv||Z.hv[0],Q=!Z||!Z.hv||Z.hv[1],ee=Z&&Z.boundingMode||"all";if(X=X||U,X.x=U.x,X.y=U.y,!K&&!Q)return!1;var te;if(ee==="raw")te=U.type==="group"?new BoundingRect(0,0,+G.width||0,+G.height||0):U.getBoundingRect();else if(te=U.getBoundingRect(),U.needLocalTransform()){var re=U.getLocalTransform();te=te.clone(),te.applyTransform(re)}var ae=getLayoutRect(defaults({width:te.width,height:te.height},G),H,W),ne=K?ae.x-te.x:0,ie=Q?ae.y-te.y:0;return ee==="raw"?(X.x=ne,X.y=ie):(X.x+=ne,X.y+=ie),X===U&&U.markRedraw(),!0}function sizeCalculable(U,G){return U[HV_NAMES[G][0]]!=null||U[HV_NAMES[G][1]]!=null&&U[HV_NAMES[G][2]]!=null}function fetchLayoutMode(U){var G=U.layoutMode||U.constructor.layoutMode;return isObject$3(G)?G:G?{type:G}:null}function mergeLayoutParam(U,G,H){var W=H&&H.ignoreSize;!isArray$1(W)&&(W=[W,W]);var Z=K(HV_NAMES[0],0),X=K(HV_NAMES[1],1);ee(HV_NAMES[0],U,Z),ee(HV_NAMES[1],U,X);function K(te,re){var ae={},ne=0,ie={},oe=0,se=2;if(each$e(te,function(ce){ie[ce]=U[ce]}),each$e(te,function(ce){hasOwn(G,ce)&&(ae[ce]=ie[ce]=G[ce]),Q(ae,ce)&&ne++,Q(ie,ce)&&oe++}),W[re])return Q(G,te[1])?ie[te[2]]=null:Q(G,te[2])&&(ie[te[1]]=null),ie;if(oe===se||!ne)return ie;if(ne>=se)return ae;for(var le=0;le<te.length;le++){var ue=te[le];if(!hasOwn(ae,ue)&&hasOwn(U,ue)){ae[ue]=U[ue];break}}return ae}function Q(te,re){return te[re]!=null&&te[re]!=="auto"}function ee(te,re,ae){each$e(te,function(ne){re[ne]=ae[ne]})}}function getLayoutParams(U){return copyLayoutParams({},U)}function copyLayoutParams(U,G){return G&&U&&each$e(LOCATION_PARAMS,function(H){hasOwn(G,H)&&(U[H]=G[H])}),U}var inner$n=makeInner(),ComponentModel=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this,H,W,Z)||this;return X.uid=getUID("ec_cpt_model"),X}return G.prototype.init=function(H,W,Z){this.mergeDefaultAndTheme(H,Z)},G.prototype.mergeDefaultAndTheme=function(H,W){var Z=fetchLayoutMode(this),X=Z?getLayoutParams(H):{},K=W.getTheme();merge(H,K.get(this.mainType)),merge(H,this.getDefaultOption()),Z&&mergeLayoutParam(H,X,Z)},G.prototype.mergeOption=function(H,W){merge(this.option,H,!0);var Z=fetchLayoutMode(this);Z&&mergeLayoutParam(this.option,H,Z)},G.prototype.optionUpdated=function(H,W){},G.prototype.getDefaultOption=function(){var H=this.constructor;if(!isExtendedClass(H))return H.defaultOption;var W=inner$n(this);if(!W.defaultOption){for(var Z=[],X=H;X;){var K=X.prototype.defaultOption;K&&Z.push(K),X=X.superClass}for(var Q={},ee=Z.length-1;ee>=0;ee--)Q=merge(Q,Z[ee],!0);W.defaultOption=Q}return W.defaultOption},G.prototype.getReferringComponents=function(H,W){var Z=H+"Index",X=H+"Id";return queryReferringComponents(this.ecModel,H,{index:this.get(Z,!0),id:this.get(X,!0)},W)},G.prototype.getBoxLayoutParams=function(){return getBoxLayoutParams(this,!1)},G.prototype.getZLevelKey=function(){return""},G.prototype.setZLevel=function(H){this.option.zlevel=H},G.protoInitialize=(function(){var H=G.prototype;H.type="component",H.id="",H.name="",H.mainType="",H.subType="",H.componentIndex=0})(),G})(Model);mountExtend(ComponentModel,Model),enableClassManagement(ComponentModel),enableSubTypeDefaulter(ComponentModel),enableTopologicalTravel(ComponentModel,getDependencies);function getDependencies(U){var G=[];return each$f(ComponentModel.getClassesByMainType(U),function(H){G=G.concat(H.dependencies||H.prototype.dependencies||[])}),G=map$1(G,function(H){return parseClassType(H).main}),U!=="dataset"&&indexOf(G,"dataset")<=0&&G.unshift("dataset"),G}var tokens={color:{},darkColor:{},size:{}},color$1=tokens.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};extend(color$1,{primary:color$1.neutral80,secondary:color$1.neutral70,tertiary:color$1.neutral60,quaternary:color$1.neutral50,disabled:color$1.neutral20,border:color$1.neutral30,borderTint:color$1.neutral20,borderShade:color$1.neutral40,background:color$1.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:color$1.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:color$1.neutral70,axisLineTint:color$1.neutral40,axisTick:color$1.neutral70,axisTickMinor:color$1.neutral60,axisLabel:color$1.neutral70,axisSplitLine:color$1.neutral15,axisMinorSplitLine:color$1.neutral05});for(var key in color$1)if(color$1.hasOwnProperty(key)){var hex=color$1[key];key==="theme"?tokens.darkColor.theme=color$1.theme.slice():key==="highlight"?tokens.darkColor.highlight="rgba(255,231,130,0.4)":key.indexOf("accent")===0?tokens.darkColor[key]=modifyHSL(hex,null,function(U){return U*.5},function(U){return Math.min(1,1.3-U)}):tokens.darkColor[key]=modifyHSL(hex,null,function(U){return U*.9},function(U){return 1-Math.pow(U,1.5)})}tokens.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var platform="";typeof navigator<"u"&&(platform=navigator.platform||"");var decalColor="rgba(0, 0, 0, 0.2)",themeColor=tokens.color.theme[0],lightThemeColor=modifyHSL(themeColor,null,null,.9);const globalDefault={darkMode:"auto",colorBy:"series",color:tokens.color.theme,gradientColor:[lightThemeColor,themeColor],aria:{decal:{decals:[{color:decalColor,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:decalColor,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:decalColor,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:decalColor,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:decalColor,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:decalColor,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:platform.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var VISUAL_DIMENSIONS=createHashMap(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),SOURCE_FORMAT_ORIGINAL="original",SOURCE_FORMAT_ARRAY_ROWS="arrayRows",SOURCE_FORMAT_OBJECT_ROWS="objectRows",SOURCE_FORMAT_KEYED_COLUMNS="keyedColumns",SOURCE_FORMAT_TYPED_ARRAY="typedArray",SOURCE_FORMAT_UNKNOWN="unknown",SERIES_LAYOUT_BY_COLUMN="column",SERIES_LAYOUT_BY_ROW="row",BE_ORDINAL={Must:1,Might:2,Not:3},innerGlobalModel=makeInner();function resetSourceDefaulter(U){innerGlobalModel(U).datasetMap=createHashMap()}function makeSeriesEncodeForAxisCoordSys(U,G,H){var W={},Z=querySeriesUpstreamDatasetModel(G);if(!Z||!U)return W;var X=[],K=[],Q=G.ecModel,ee=innerGlobalModel(Q).datasetMap,te=Z.uid+"_"+H.seriesLayoutBy,re,ae;U=U.slice(),each$f(U,function(se,le){var ue=isObject$3(se)?se:U[le]={name:se};ue.type==="ordinal"&&re==null&&(re=le,ae=oe(ue)),W[ue.name]=[]});var ne=ee.get(te)||ee.set(te,{categoryWayDim:ae,valueWayDim:0});each$f(U,function(se,le){var ue=se.name,ce=oe(se);if(re==null){var fe=ne.valueWayDim;ie(W[ue],fe,ce),ie(K,fe,ce),ne.valueWayDim+=ce}else if(re===le)ie(W[ue],0,ce),ie(X,0,ce);else{var fe=ne.categoryWayDim;ie(W[ue],fe,ce),ie(K,fe,ce),ne.categoryWayDim+=ce}});function ie(se,le,ue){for(var ce=0;ce<ue;ce++)se.push(le+ce)}function oe(se){var le=se.dimsDef;return le?le.length:1}return X.length&&(W.itemName=X),K.length&&(W.seriesName=K),W}function makeSeriesEncodeForNameBased(U,G,H){var W={},Z=querySeriesUpstreamDatasetModel(U);if(!Z)return W;var X=G.sourceFormat,K=G.dimensionsDefine,Q;(X===SOURCE_FORMAT_OBJECT_ROWS||X===SOURCE_FORMAT_KEYED_COLUMNS)&&each$f(K,function(re,ae){(isObject$3(re)?re.name:re)==="name"&&(Q=ae)});var ee=(function(){for(var re={},ae={},ne=[],ie=0,oe=Math.min(5,H);ie<oe;ie++){var se=doGuessOrdinal(G.data,X,G.seriesLayoutBy,K,G.startIndex,ie);ne.push(se);var le=se===BE_ORDINAL.Not;if(le&&re.v==null&&ie!==Q&&(re.v=ie),(re.n==null||re.n===re.v||!le&&ne[re.n]===BE_ORDINAL.Not)&&(re.n=ie),ue(re)&&ne[re.n]!==BE_ORDINAL.Not)return re;le||(se===BE_ORDINAL.Might&&ae.v==null&&ie!==Q&&(ae.v=ie),(ae.n==null||ae.n===ae.v)&&(ae.n=ie))}function ue(ce){return ce.v!=null&&ce.n!=null}return ue(re)?re:ue(ae)?ae:null})();if(ee){W.value=[ee.v];var te=Q??ee.n;W.itemName=[te],W.seriesName=[te]}return W}function querySeriesUpstreamDatasetModel(U){var G=U.get("data",!0);if(!G)return queryReferringComponents(U.ecModel,"dataset",{index:U.get("datasetIndex",!0),id:U.get("datasetId",!0)},SINGLE_REFERRING).models[0]}function queryDatasetUpstreamDatasetModels(U){return!U.get("transform",!0)&&!U.get("fromTransformResult",!0)?[]:queryReferringComponents(U.ecModel,"dataset",{index:U.get("fromDatasetIndex",!0),id:U.get("fromDatasetId",!0)},SINGLE_REFERRING).models}function guessOrdinal(U,G){return doGuessOrdinal(U.data,U.sourceFormat,U.seriesLayoutBy,U.dimensionsDefine,U.startIndex,G)}function doGuessOrdinal(U,G,H,W,Z,X){var K,Q=5;if(isTypedArray(U))return BE_ORDINAL.Not;var ee,te;if(W){var re=W[X];isObject$3(re)?(ee=re.name,te=re.type):isString(re)&&(ee=re)}if(te!=null)return te==="ordinal"?BE_ORDINAL.Must:BE_ORDINAL.Not;if(G===SOURCE_FORMAT_ARRAY_ROWS){var ae=U;if(H===SERIES_LAYOUT_BY_ROW){for(var ne=ae[X],ie=0;ie<(ne||[]).length&&ie<Q;ie++)if((K=he(ne[Z+ie]))!=null)return K}else for(var ie=0;ie<ae.length&&ie<Q;ie++){var oe=ae[Z+ie];if(oe&&(K=he(oe[X]))!=null)return K}}else if(G===SOURCE_FORMAT_OBJECT_ROWS){var se=U;if(!ee)return BE_ORDINAL.Not;for(var ie=0;ie<se.length&&ie<Q;ie++){var le=se[ie];if(le&&(K=he(le[ee]))!=null)return K}}else if(G===SOURCE_FORMAT_KEYED_COLUMNS){var ue=U;if(!ee)return BE_ORDINAL.Not;var ne=ue[ee];if(!ne||isTypedArray(ne))return BE_ORDINAL.Not;for(var ie=0;ie<ne.length&&ie<Q;ie++)if((K=he(ne[ie]))!=null)return K}else if(G===SOURCE_FORMAT_ORIGINAL)for(var ce=U,ie=0;ie<ce.length&&ie<Q;ie++){var le=ce[ie],fe=getDataItemValue(le);if(!isArray$1(fe))return BE_ORDINAL.Not;if((K=he(fe[X]))!=null)return K}function he(ve){var de=isString(ve);if(ve!=null&&Number.isFinite(Number(ve))&&ve!=="")return de?BE_ORDINAL.Might:BE_ORDINAL.Not;if(de&&ve!=="-")return BE_ORDINAL.Must}return BE_ORDINAL.Not}var internalOptionCreatorMap=createHashMap();function registerInternalOptionCreator(U,G){assert(internalOptionCreatorMap.get(U)==null&&G),internalOptionCreatorMap.set(U,G)}function concatInternalOptions(U,G,H){var W=internalOptionCreatorMap.get(G);if(!W)return H;var Z=W(U);if(!Z)return H;if(process.env.NODE_ENV!=="production")for(var X=0;X<Z.length;X++)assert(isComponentIdInternal(Z[X]));return H.concat(Z)}var innerColor=makeInner(),innerDecal=makeInner(),PaletteMixin=(function(){function U(){}return U.prototype.getColorFromPalette=function(G,H,W){var Z=normalizeToArray(this.get("color",!0)),X=this.get("colorLayer",!0);return getFromPalette(this,innerColor,Z,X,G,H,W)},U.prototype.clearColorPalette=function(){clearPalette(this,innerColor)},U})();function getDecalFromPalette(U,G,H,W){var Z=normalizeToArray(U.get(["aria","decal","decals"]));return getFromPalette(U,innerDecal,Z,null,G,H,W)}function getNearestPalette(U,G){for(var H=U.length,W=0;W<H;W++)if(U[W].length>G)return U[W];return U[H-1]}function getFromPalette(U,G,H,W,Z,X,K){X=X||U;var Q=G(X),ee=Q.paletteIdx||0,te=Q.paletteNameMap=Q.paletteNameMap||{};if(te.hasOwnProperty(Z))return te[Z];var re=K==null||!W?H:getNearestPalette(W,K);if(re=re||H,!(!re||!re.length)){var ae=re[ee];return Z&&(te[Z]=ae),Q.paletteIdx=(ee+1)%re.length,ae}}function clearPalette(U,G){G(U).paletteIdx=0,G(U).paletteNameMap={}}var reCreateSeriesIndices,assertSeriesInitialized,initBase,OPTION_INNER_KEY="\0_ec_inner",OPTION_INNER_VALUE=1,BUITIN_COMPONENTS_MAP={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",matrix:"MatrixComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},BUILTIN_CHARTS_MAP={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",chord:"ChordChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},componetsMissingLogPrinted={};function checkMissingComponents(U){each$f(U,function(G,H){if(!ComponentModel.hasClass(H)){var W=BUITIN_COMPONENTS_MAP[H];W&&!componetsMissingLogPrinted[W]&&(error("Component "+H+` is used but not imported.
|
|
16
|
+
import { `+W+` } from 'echarts/components';
|
|
17
|
+
echarts.use([`+W+"]);"),componetsMissingLogPrinted[W]=!0)}})}var GlobalModel=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.init=function(H,W,Z,X,K,Q){X=X||{},this.option=null,this._theme=new Model(X),this._locale=new Model(K),this._optionManager=Q},G.prototype.setOption=function(H,W,Z){process.env.NODE_ENV!=="production"&&(assert(H!=null,"option is null/undefined"),assert(H[OPTION_INNER_KEY]!==OPTION_INNER_VALUE,"please use chart.getOption()"));var X=normalizeSetOptionInput(W);this._optionManager.setOption(H,Z,X),this._resetOption(null,X)},G.prototype.resetOption=function(H,W){return this._resetOption(H,normalizeSetOptionInput(W))},G.prototype._resetOption=function(H,W){var Z=!1,X=this._optionManager;if(!H||H==="recreate"){var K=X.mountOption(H==="recreate");process.env.NODE_ENV!=="production"&&checkMissingComponents(K),!this.option||H==="recreate"?initBase(this,K):(this.restoreData(),this._mergeOption(K,W)),Z=!0}if((H==="timeline"||H==="media")&&this.restoreData(),!H||H==="recreate"||H==="timeline"){var Q=X.getTimelineOption(this);Q&&(Z=!0,this._mergeOption(Q,W))}if(!H||H==="recreate"||H==="media"){var ee=X.getMediaOption(this);ee.length&&each$f(ee,function(te){Z=!0,this._mergeOption(te,W)},this)}return Z},G.prototype.mergeOption=function(H){this._mergeOption(H,null)},G.prototype._mergeOption=function(H,W){var Z=this.option,X=this._componentsMap,K=this._componentsCount,Q=[],ee=createHashMap(),te=W&&W.replaceMergeMainTypeMap;resetSourceDefaulter(this),each$f(H,function(ae,ne){ae!=null&&(ComponentModel.hasClass(ne)?ne&&(Q.push(ne),ee.set(ne,!0)):Z[ne]=Z[ne]==null?clone$4(ae):merge(Z[ne],ae,!0))}),te&&te.each(function(ae,ne){ComponentModel.hasClass(ne)&&!ee.get(ne)&&(Q.push(ne),ee.set(ne,!0))}),ComponentModel.topologicalTravel(Q,ComponentModel.getAllClassMainTypes(),re,this);function re(ae){var ne=concatInternalOptions(this,ae,normalizeToArray(H[ae])),ie=X.get(ae),oe=ie?te&&te.get(ae)?"replaceMerge":"normalMerge":"replaceAll",se=mappingToExists(ie,ne,oe);setComponentTypeToKeyInfo(se,ae,ComponentModel),Z[ae]=null,X.set(ae,null),K.set(ae,0);var le=[],ue=[],ce=0,fe,he;each$f(se,function(ve,de){var pe=ve.existing,ge=ve.newOption;if(!ge)pe&&(pe.mergeOption({},this),pe.optionUpdated({},!1));else{var me=ae==="series",ye=ComponentModel.getClass(ae,ve.keyInfo.subType,!me);if(!ye){if(process.env.NODE_ENV!=="production"){var _e=ve.keyInfo.subType,xe=BUILTIN_CHARTS_MAP[_e];componetsMissingLogPrinted[_e]||(componetsMissingLogPrinted[_e]=!0,error(xe?"Series "+_e+` is used but not imported.
|
|
18
|
+
import { `+xe+` } from 'echarts/charts';
|
|
19
|
+
echarts.use([`+xe+"]);":"Unknown series "+_e))}return}if(ae==="tooltip"){if(fe){process.env.NODE_ENV!=="production"&&(he||(warn("Currently only one tooltip component is allowed."),he=!0));return}fe=!0}if(pe&&pe.constructor===ye)pe.name=ve.keyInfo.name,pe.mergeOption(ge,this),pe.optionUpdated(ge,!1);else{var Se=extend({componentIndex:de},ve.keyInfo);pe=new ye(ge,this,this,Se),extend(pe,Se),ve.brandNew&&(pe.__requireNewView=!0),pe.init(ge,this,this),pe.optionUpdated(null,!0)}}pe?(le.push(pe.option),ue.push(pe),ce++):(le.push(void 0),ue.push(void 0))},this),Z[ae]=le,X.set(ae,ue),K.set(ae,ce),ae==="series"&&reCreateSeriesIndices(this)}this._seriesIndices||reCreateSeriesIndices(this)},G.prototype.getOption=function(){var H=clone$4(this.option);return each$f(H,function(W,Z){if(ComponentModel.hasClass(Z)){for(var X=normalizeToArray(W),K=X.length,Q=!1,ee=K-1;ee>=0;ee--)X[ee]&&!isComponentIdInternal(X[ee])?Q=!0:(X[ee]=null,!Q&&K--);X.length=K,H[Z]=X}}),delete H[OPTION_INNER_KEY],H},G.prototype.setTheme=function(H){this._theme=new Model(H),this._resetOption("recreate",null)},G.prototype.getTheme=function(){return this._theme},G.prototype.getLocaleModel=function(){return this._locale},G.prototype.setUpdatePayload=function(H){this._payload=H},G.prototype.getUpdatePayload=function(){return this._payload},G.prototype.getComponent=function(H,W){var Z=this._componentsMap.get(H);if(Z){var X=Z[W||0];if(X)return X;if(W==null){for(var K=0;K<Z.length;K++)if(Z[K])return Z[K]}}},G.prototype.queryComponents=function(H){var W=H.mainType;if(!W)return[];var Z=H.index,X=H.id,K=H.name,Q=this._componentsMap.get(W);if(!Q||!Q.length)return[];var ee;return Z!=null?(ee=[],each$f(normalizeToArray(Z),function(te){Q[te]&&ee.push(Q[te])})):X!=null?ee=queryByIdOrName("id",X,Q):K!=null?ee=queryByIdOrName("name",K,Q):ee=filter(Q,function(te){return!!te}),filterBySubType(ee,H)},G.prototype.findComponents=function(H){var W=H.query,Z=H.mainType,X=Q(W),K=X?this.queryComponents(X):filter(this._componentsMap.get(Z),function(te){return!!te});return ee(filterBySubType(K,H));function Q(te){var re=Z+"Index",ae=Z+"Id",ne=Z+"Name";return te&&(te[re]!=null||te[ae]!=null||te[ne]!=null)?{mainType:Z,index:te[re],id:te[ae],name:te[ne]}:null}function ee(te){return H.filter?filter(te,H.filter):te}},G.prototype.eachComponent=function(H,W,Z){var X=this._componentsMap;if(isFunction(H)){var K=W,Q=H;X.each(function(ae,ne){for(var ie=0;ae&&ie<ae.length;ie++){var oe=ae[ie];oe&&Q.call(K,ne,oe,oe.componentIndex)}})}else for(var ee=isString(H)?X.get(H):isObject$3(H)?this.findComponents(H):null,te=0;ee&&te<ee.length;te++){var re=ee[te];re&&W.call(Z,re,re.componentIndex)}},G.prototype.getSeriesByName=function(H){var W=convertOptionIdName(H,null);return filter(this._componentsMap.get("series"),function(Z){return!!Z&&W!=null&&Z.name===W})},G.prototype.getSeriesByIndex=function(H){return this._componentsMap.get("series")[H]},G.prototype.getSeriesByType=function(H){return filter(this._componentsMap.get("series"),function(W){return!!W&&W.subType===H})},G.prototype.getSeries=function(){return filter(this._componentsMap.get("series"),function(H){return!!H})},G.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},G.prototype.eachSeries=function(H,W){assertSeriesInitialized(this),each$f(this._seriesIndices,function(Z){var X=this._componentsMap.get("series")[Z];H.call(W,X,Z)},this)},G.prototype.eachRawSeries=function(H,W){each$f(this._componentsMap.get("series"),function(Z){Z&&H.call(W,Z,Z.componentIndex)})},G.prototype.eachSeriesByType=function(H,W,Z){assertSeriesInitialized(this),each$f(this._seriesIndices,function(X){var K=this._componentsMap.get("series")[X];K.subType===H&&W.call(Z,K,X)},this)},G.prototype.eachRawSeriesByType=function(H,W,Z){return each$f(this.getSeriesByType(H),W,Z)},G.prototype.isSeriesFiltered=function(H){return assertSeriesInitialized(this),this._seriesIndicesMap.get(H.componentIndex)==null},G.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},G.prototype.filterSeries=function(H,W){assertSeriesInitialized(this);var Z=[];each$f(this._seriesIndices,function(X){var K=this._componentsMap.get("series")[X];H.call(W,K,X)&&Z.push(X)},this),this._seriesIndices=Z,this._seriesIndicesMap=createHashMap(Z)},G.prototype.restoreData=function(H){reCreateSeriesIndices(this);var W=this._componentsMap,Z=[];W.each(function(X,K){ComponentModel.hasClass(K)&&Z.push(K)}),ComponentModel.topologicalTravel(Z,ComponentModel.getAllClassMainTypes(),function(X){each$f(W.get(X),function(K){K&&(X!=="series"||!isNotTargetSeries(K,H))&&K.restoreData()})})},G.internalField=(function(){reCreateSeriesIndices=function(H){var W=H._seriesIndices=[];each$f(H._componentsMap.get("series"),function(Z){Z&&W.push(Z.componentIndex)}),H._seriesIndicesMap=createHashMap(W)},assertSeriesInitialized=function(H){if(process.env.NODE_ENV!=="production"&&!H._seriesIndices)throw new Error("Option should contains series.")},initBase=function(H,W){H.option={},H.option[OPTION_INNER_KEY]=OPTION_INNER_VALUE,H._componentsMap=createHashMap({series:[]}),H._componentsCount=createHashMap();var Z=W.aria;isObject$3(Z)&&Z.enabled==null&&(Z.enabled=!0),mergeTheme(W,H._theme.option),merge(W,globalDefault,!1),H._mergeOption(W,null)}})(),G})(Model);function isNotTargetSeries(U,G){if(G){var H=G.seriesIndex,W=G.seriesId,Z=G.seriesName;return H!=null&&U.componentIndex!==H||W!=null&&U.id!==W||Z!=null&&U.name!==Z}}function mergeTheme(U,G){var H=U.color&&!U.colorLayer;each$f(G,function(W,Z){Z==="colorLayer"&&H||Z==="color"&&U.color||ComponentModel.hasClass(Z)||(typeof W=="object"?U[Z]=U[Z]?merge(U[Z],W,!1):clone$4(W):U[Z]==null&&(U[Z]=W))})}function queryByIdOrName(U,G,H){if(isArray$1(G)){var W=createHashMap();return each$f(G,function(X){if(X!=null){var K=convertOptionIdName(X,null);K!=null&&W.set(X,!0)}}),filter(H,function(X){return X&&W.get(X[U])})}else{var Z=convertOptionIdName(G,null);return filter(H,function(X){return X&&Z!=null&&X[U]===Z})}}function filterBySubType(U,G){return G.hasOwnProperty("subType")?filter(U,function(H){return H&&H.subType===G.subType}):U}function normalizeSetOptionInput(U){var G=createHashMap();return U&&each$f(normalizeToArray(U.replaceMerge),function(H){process.env.NODE_ENV!=="production"&&assert(ComponentModel.hasClass(H),'"'+H+'" is not valid component main type in "replaceMerge"'),G.set(H,!0)}),{replaceMergeMainTypeMap:G}}mixin(GlobalModel,PaletteMixin);var availableMethods=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],ExtensionAPI=(function(){function U(G){each$f(availableMethods,function(H){this[H]=bind$1(G[H],G)},this)}return U})(),QUERY_REG=/^(min|max)?(.+)$/,OptionManager=(function(){function U(G){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=G}return U.prototype.setOption=function(G,H,W){G&&(each$f(normalizeToArray(G.series),function(K){K&&K.data&&isTypedArray(K.data)&&setAsPrimitive(K.data)}),each$f(normalizeToArray(G.dataset),function(K){K&&K.source&&isTypedArray(K.source)&&setAsPrimitive(K.source)})),G=clone$4(G);var Z=this._optionBackup,X=parseRawOption(G,H,!Z);this._newBaseOption=X.baseOption,Z?(X.timelineOptions.length&&(Z.timelineOptions=X.timelineOptions),X.mediaList.length&&(Z.mediaList=X.mediaList),X.mediaDefault&&(Z.mediaDefault=X.mediaDefault)):this._optionBackup=X},U.prototype.mountOption=function(G){var H=this._optionBackup;return this._timelineOptions=H.timelineOptions,this._mediaList=H.mediaList,this._mediaDefault=H.mediaDefault,this._currentMediaIndices=[],clone$4(G?H.baseOption:this._newBaseOption)},U.prototype.getTimelineOption=function(G){var H,W=this._timelineOptions;if(W.length){var Z=G.getComponent("timeline");Z&&(H=clone$4(W[Z.getCurrentIndex()]))}return H},U.prototype.getMediaOption=function(G){var H=this._api.getWidth(),W=this._api.getHeight(),Z=this._mediaList,X=this._mediaDefault,K=[],Q=[];if(!Z.length&&!X)return Q;for(var ee=0,te=Z.length;ee<te;ee++)applyMediaQuery(Z[ee].query,H,W)&&K.push(ee);return!K.length&&X&&(K=[-1]),K.length&&!indicesEquals(K,this._currentMediaIndices)&&(Q=map$1(K,function(re){return clone$4(re===-1?X.option:Z[re].option)})),this._currentMediaIndices=K,Q},U})();function parseRawOption(U,G,H){var W=[],Z,X,K=U.baseOption,Q=U.timeline,ee=U.options,te=U.media,re=!!U.media,ae=!!(ee||Q||K&&K.timeline);K?(X=K,X.timeline||(X.timeline=Q)):((ae||re)&&(U.options=U.media=null),X=U),re&&(isArray$1(te)?each$f(te,function(ie){process.env.NODE_ENV!=="production"&&ie&&!ie.option&&isObject$3(ie.query)&&isObject$3(ie.query.option)&&error("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),ie&&ie.option&&(ie.query?W.push(ie):Z||(Z=ie))}):process.env.NODE_ENV!=="production"&&error("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),ne(X),each$f(ee,function(ie){return ne(ie)}),each$f(W,function(ie){return ne(ie.option)});function ne(ie){each$f(G,function(oe){oe(ie,H)})}return{baseOption:X,timelineOptions:ee||[],mediaDefault:Z,mediaList:W}}function applyMediaQuery(U,G,H){var W={width:G,height:H,aspectratio:G/H},Z=!0;return each$f(U,function(X,K){var Q=K.match(QUERY_REG);if(!(!Q||!Q[1]||!Q[2])){var ee=Q[1],te=Q[2].toLowerCase();compare(W[te],X,ee)||(Z=!1)}}),Z}function compare(U,G,H){return H==="min"?U>=G:H==="max"?U<=G:U===G}function indicesEquals(U,G){return U.join(",")===G.join(",")}var each$d=each$f,isObject$2=isObject$3,POSSIBLE_STYLES=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function compatEC2ItemStyle(U){var G=U&&U.itemStyle;if(G)for(var H=0,W=POSSIBLE_STYLES.length;H<W;H++){var Z=POSSIBLE_STYLES[H],X=G.normal,K=G.emphasis;X&&X[Z]&&(process.env.NODE_ENV!=="production"&&deprecateReplaceLog("itemStyle.normal."+Z,Z),U[Z]=U[Z]||{},U[Z].normal?merge(U[Z].normal,X[Z]):U[Z].normal=X[Z],X[Z]=null),K&&K[Z]&&(process.env.NODE_ENV!=="production"&&deprecateReplaceLog("itemStyle.emphasis."+Z,"emphasis."+Z),U[Z]=U[Z]||{},U[Z].emphasis?merge(U[Z].emphasis,K[Z]):U[Z].emphasis=K[Z],K[Z]=null)}}function convertNormalEmphasis(U,G,H){if(U&&U[G]&&(U[G].normal||U[G].emphasis)){var W=U[G].normal,Z=U[G].emphasis;W&&(process.env.NODE_ENV!=="production"&&deprecateLog("'normal' hierarchy in "+G+" has been removed since 4.0. All style properties are configured in "+G+" directly now."),H?(U[G].normal=U[G].emphasis=null,defaults(U[G],W)):U[G]=W),Z&&(process.env.NODE_ENV!=="production"&&deprecateLog(G+".emphasis has been changed to emphasis."+G+" since 4.0"),U.emphasis=U.emphasis||{},U.emphasis[G]=Z,Z.focus&&(U.emphasis.focus=Z.focus),Z.blurScope&&(U.emphasis.blurScope=Z.blurScope))}}function removeEC3NormalStatus(U){convertNormalEmphasis(U,"itemStyle"),convertNormalEmphasis(U,"lineStyle"),convertNormalEmphasis(U,"areaStyle"),convertNormalEmphasis(U,"label"),convertNormalEmphasis(U,"labelLine"),convertNormalEmphasis(U,"upperLabel"),convertNormalEmphasis(U,"edgeLabel")}function compatTextStyle(U,G){var H=isObject$2(U)&&U[G],W=isObject$2(H)&&H.textStyle;if(W){process.env.NODE_ENV!=="production"&&deprecateLog("textStyle hierarchy in "+G+" has been removed since 4.0. All textStyle properties are configured in "+G+" directly now.");for(var Z=0,X=TEXT_STYLE_OPTIONS.length;Z<X;Z++){var K=TEXT_STYLE_OPTIONS[Z];W.hasOwnProperty(K)&&(H[K]=W[K])}}}function compatEC3CommonStyles(U){U&&(removeEC3NormalStatus(U),compatTextStyle(U,"label"),U.emphasis&&compatTextStyle(U.emphasis,"label"))}function processSeries(U){if(isObject$2(U)){compatEC2ItemStyle(U),removeEC3NormalStatus(U),compatTextStyle(U,"label"),compatTextStyle(U,"upperLabel"),compatTextStyle(U,"edgeLabel"),U.emphasis&&(compatTextStyle(U.emphasis,"label"),compatTextStyle(U.emphasis,"upperLabel"),compatTextStyle(U.emphasis,"edgeLabel"));var G=U.markPoint;G&&(compatEC2ItemStyle(G),compatEC3CommonStyles(G));var H=U.markLine;H&&(compatEC2ItemStyle(H),compatEC3CommonStyles(H));var W=U.markArea;W&&compatEC3CommonStyles(W);var Z=U.data;if(U.type==="graph"){Z=Z||U.nodes;var X=U.links||U.edges;if(X&&!isTypedArray(X))for(var K=0;K<X.length;K++)compatEC3CommonStyles(X[K]);each$f(U.categories,function(te){removeEC3NormalStatus(te)})}if(Z&&!isTypedArray(Z))for(var K=0;K<Z.length;K++)compatEC3CommonStyles(Z[K]);if(G=U.markPoint,G&&G.data)for(var Q=G.data,K=0;K<Q.length;K++)compatEC3CommonStyles(Q[K]);if(H=U.markLine,H&&H.data)for(var ee=H.data,K=0;K<ee.length;K++)isArray$1(ee[K])?(compatEC3CommonStyles(ee[K][0]),compatEC3CommonStyles(ee[K][1])):compatEC3CommonStyles(ee[K]);U.type==="gauge"?(compatTextStyle(U,"axisLabel"),compatTextStyle(U,"title"),compatTextStyle(U,"detail")):U.type==="treemap"?(convertNormalEmphasis(U.breadcrumb,"itemStyle"),each$f(U.levels,function(te){removeEC3NormalStatus(te)})):U.type==="tree"&&removeEC3NormalStatus(U.leaves)}}function toArr(U){return isArray$1(U)?U:U?[U]:[]}function toObj(U){return(isArray$1(U)?U[0]:U)||{}}function globalCompatStyle(U,G){each$d(toArr(U.series),function(W){isObject$2(W)&&processSeries(W)});var H=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];G&&H.push("valueAxis","categoryAxis","logAxis","timeAxis"),each$d(H,function(W){each$d(toArr(U[W]),function(Z){Z&&(compatTextStyle(Z,"axisLabel"),compatTextStyle(Z.axisPointer,"label"))})}),each$d(toArr(U.parallel),function(W){var Z=W&&W.parallelAxisDefault;compatTextStyle(Z,"axisLabel"),compatTextStyle(Z&&Z.axisPointer,"label")}),each$d(toArr(U.calendar),function(W){convertNormalEmphasis(W,"itemStyle"),compatTextStyle(W,"dayLabel"),compatTextStyle(W,"monthLabel"),compatTextStyle(W,"yearLabel")}),each$d(toArr(U.radar),function(W){compatTextStyle(W,"name"),W.name&&W.axisName==null&&(W.axisName=W.name,delete W.name,process.env.NODE_ENV!=="production"&&deprecateLog("name property in radar component has been changed to axisName")),W.nameGap!=null&&W.axisNameGap==null&&(W.axisNameGap=W.nameGap,delete W.nameGap,process.env.NODE_ENV!=="production"&&deprecateLog("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&each$d(W.indicator,function(Z){Z.text&&deprecateReplaceLog("text","name","radar.indicator")})}),each$d(toArr(U.geo),function(W){isObject$2(W)&&(compatEC3CommonStyles(W),each$d(toArr(W.regions),function(Z){compatEC3CommonStyles(Z)}))}),each$d(toArr(U.timeline),function(W){compatEC3CommonStyles(W),convertNormalEmphasis(W,"label"),convertNormalEmphasis(W,"itemStyle"),convertNormalEmphasis(W,"controlStyle",!0);var Z=W.data;isArray$1(Z)&&each$f(Z,function(X){isObject$3(X)&&(convertNormalEmphasis(X,"label"),convertNormalEmphasis(X,"itemStyle"))})}),each$d(toArr(U.toolbox),function(W){convertNormalEmphasis(W,"iconStyle"),each$d(W.feature,function(Z){convertNormalEmphasis(Z,"iconStyle")})}),compatTextStyle(toObj(U.axisPointer),"label"),compatTextStyle(toObj(U.tooltip).axisPointer,"label")}function get(U,G){for(var H=G.split(","),W=U,Z=0;Z<H.length&&(W=W&&W[H[Z]],W!=null);Z++);return W}function set(U,G,H,W){for(var Z=G.split(","),X=U,K,Q=0;Q<Z.length-1;Q++)K=Z[Q],X[K]==null&&(X[K]={}),X=X[K];X[Z[Q]]==null&&(X[Z[Q]]=H)}function compatLayoutProperties(U){U&&each$f(LAYOUT_PROPERTIES,function(G){G[0]in U&&!(G[1]in U)&&(U[G[1]]=U[G[0]])})}var LAYOUT_PROPERTIES=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],COMPATITABLE_COMPONENTS=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],BAR_ITEM_STYLE_MAP=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function compatBarItemStyle(U){var G=U&&U.itemStyle;if(G)for(var H=0;H<BAR_ITEM_STYLE_MAP.length;H++){var W=BAR_ITEM_STYLE_MAP[H][1],Z=BAR_ITEM_STYLE_MAP[H][0];G[W]!=null&&(G[Z]=G[W],process.env.NODE_ENV!=="production"&&deprecateReplaceLog(W,Z))}}function compatPieLabel(U){U&&U.alignTo==="edge"&&U.margin!=null&&U.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&deprecateReplaceLog("label.margin","label.edgeDistance","pie"),U.edgeDistance=U.margin)}function compatSunburstState(U){U&&U.downplay&&!U.blur&&(U.blur=U.downplay,process.env.NODE_ENV!=="production"&&deprecateReplaceLog("downplay","blur","sunburst"))}function compatGraphFocus(U){U&&U.focusNodeAdjacency!=null&&(U.emphasis=U.emphasis||{},U.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&deprecateReplaceLog("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),U.emphasis.focus="adjacency"))}function traverseTree(U,G){if(U)for(var H=0;H<U.length;H++)G(U[H]),U[H]&&traverseTree(U[H].children,G)}function globalBackwardCompat(U,G){globalCompatStyle(U,G),U.series=normalizeToArray(U.series),each$f(U.series,function(H){if(isObject$3(H)){var W=H.type;if(W==="line")H.clipOverflow!=null&&(H.clip=H.clipOverflow,process.env.NODE_ENV!=="production"&&deprecateReplaceLog("clipOverflow","clip","line"));else if(W==="pie"||W==="gauge"){H.clockWise!=null&&(H.clockwise=H.clockWise,process.env.NODE_ENV!=="production"&&deprecateReplaceLog("clockWise","clockwise")),compatPieLabel(H.label);var Z=H.data;if(Z&&!isTypedArray(Z))for(var X=0;X<Z.length;X++)compatPieLabel(Z[X]);H.hoverOffset!=null&&(H.emphasis=H.emphasis||{},(H.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&deprecateReplaceLog("hoverOffset","emphasis.scaleSize"),H.emphasis.scaleSize=H.hoverOffset))}else if(W==="gauge"){var K=get(H,"pointer.color");K!=null&&set(H,"itemStyle.color",K)}else if(W==="bar"){compatBarItemStyle(H),compatBarItemStyle(H.backgroundStyle),compatBarItemStyle(H.emphasis);var Z=H.data;if(Z&&!isTypedArray(Z))for(var X=0;X<Z.length;X++)typeof Z[X]=="object"&&(compatBarItemStyle(Z[X]),compatBarItemStyle(Z[X]&&Z[X].emphasis))}else if(W==="sunburst"){var Q=H.highlightPolicy;Q&&(H.emphasis=H.emphasis||{},H.emphasis.focus||(H.emphasis.focus=Q,process.env.NODE_ENV!=="production"&&deprecateReplaceLog("highlightPolicy","emphasis.focus","sunburst"))),compatSunburstState(H),traverseTree(H.data,compatSunburstState)}else W==="graph"||W==="sankey"?compatGraphFocus(H):W==="map"&&(H.mapType&&!H.map&&(process.env.NODE_ENV!=="production"&&deprecateReplaceLog("mapType","map","map"),H.map=H.mapType),H.mapLocation&&(process.env.NODE_ENV!=="production"&&deprecateLog("`mapLocation` is not used anymore."),defaults(H,H.mapLocation)));H.hoverAnimation!=null&&(H.emphasis=H.emphasis||{},H.emphasis&&H.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&deprecateReplaceLog("hoverAnimation","emphasis.scale"),H.emphasis.scale=H.hoverAnimation)),compatLayoutProperties(H)}}),U.dataRange&&(U.visualMap=U.dataRange),each$f(COMPATITABLE_COMPONENTS,function(H){var W=U[H];W&&(isArray$1(W)||(W=[W]),each$f(W,function(Z){compatLayoutProperties(Z)}))})}function dataStack(U){var G=createHashMap();U.eachSeries(function(H){var W=H.get("stack");if(W){var Z=G.get(W)||G.set(W,[]),X=H.getData(),K={stackResultDimension:X.getCalculationInfo("stackResultDimension"),stackedOverDimension:X.getCalculationInfo("stackedOverDimension"),stackedDimension:X.getCalculationInfo("stackedDimension"),stackedByDimension:X.getCalculationInfo("stackedByDimension"),isStackedByIndex:X.getCalculationInfo("isStackedByIndex"),data:X,seriesModel:H};if(!K.stackedDimension||!(K.isStackedByIndex||K.stackedByDimension))return;Z.push(K)}}),G.each(function(H){if(H.length!==0){var W=H[0].seriesModel,Z=W.get("stackOrder")||"seriesAsc";Z==="seriesDesc"&&H.reverse(),each$f(H,function(X,K){X.data.setCalculationInfo("stackedOnSeries",K>0?H[K-1].seriesModel:null)}),calculateStack(H)}})}function calculateStack(U){each$f(U,function(G,H){var W=[],Z=[NaN,NaN],X=[G.stackResultDimension,G.stackedOverDimension],K=G.data,Q=G.isStackedByIndex,ee=G.seriesModel.get("stackStrategy")||"samesign";K.modify(X,function(te,re,ae){var ne=K.get(G.stackedDimension,ae);if(isNaN(ne))return Z;var ie,oe;Q?oe=K.getRawIndex(ae):ie=K.get(G.stackedByDimension,ae);for(var se=NaN,le=H-1;le>=0;le--){var ue=U[le];if(Q||(oe=ue.data.rawIndexOf(ue.stackedByDimension,ie)),oe>=0){var ce=ue.data.getByRawIndex(ue.stackResultDimension,oe);if(ee==="all"||ee==="positive"&&ce>0||ee==="negative"&&ce<0||ee==="samesign"&&ne>=0&&ce>0||ee==="samesign"&&ne<=0&&ce<0){ne=addSafe(ne,ce),se=ce;break}}}return W[0]=ne,W[1]=se,W})})}var SourceImpl=(function(){function U(G){this.data=G.data||(G.sourceFormat===SOURCE_FORMAT_KEYED_COLUMNS?{}:[]),this.sourceFormat=G.sourceFormat||SOURCE_FORMAT_UNKNOWN,this.seriesLayoutBy=G.seriesLayoutBy||SERIES_LAYOUT_BY_COLUMN,this.startIndex=G.startIndex||0,this.dimensionsDetectedCount=G.dimensionsDetectedCount,this.metaRawOption=G.metaRawOption;var H=this.dimensionsDefine=G.dimensionsDefine;if(H)for(var W=0;W<H.length;W++){var Z=H[W];Z.type==null&&guessOrdinal(this,W)===BE_ORDINAL.Must&&(Z.type="ordinal")}}return U})();function isSourceInstance(U){return U instanceof SourceImpl}function createSource(U,G,H){H=H||detectSourceFormat(U);var W=G.seriesLayoutBy,Z=determineSourceDimensions(U,H,W,G.sourceHeader,G.dimensions),X=new SourceImpl({data:U,sourceFormat:H,seriesLayoutBy:W,dimensionsDefine:Z.dimensionsDefine,startIndex:Z.startIndex,dimensionsDetectedCount:Z.dimensionsDetectedCount,metaRawOption:clone$4(G)});return X}function createSourceFromSeriesDataOption(U){return new SourceImpl({data:U,sourceFormat:isTypedArray(U)?SOURCE_FORMAT_TYPED_ARRAY:SOURCE_FORMAT_ORIGINAL})}function cloneSourceShallow(U){return new SourceImpl({data:U.data,sourceFormat:U.sourceFormat,seriesLayoutBy:U.seriesLayoutBy,dimensionsDefine:clone$4(U.dimensionsDefine),startIndex:U.startIndex,dimensionsDetectedCount:U.dimensionsDetectedCount})}function detectSourceFormat(U){var G=SOURCE_FORMAT_UNKNOWN;if(isTypedArray(U))G=SOURCE_FORMAT_TYPED_ARRAY;else if(isArray$1(U)){U.length===0&&(G=SOURCE_FORMAT_ARRAY_ROWS);for(var H=0,W=U.length;H<W;H++){var Z=U[H];if(Z!=null){if(isArray$1(Z)||isTypedArray(Z)){G=SOURCE_FORMAT_ARRAY_ROWS;break}else if(isObject$3(Z)){G=SOURCE_FORMAT_OBJECT_ROWS;break}}}}else if(isObject$3(U)){for(var X in U)if(hasOwn(U,X)&&isArrayLike(U[X])){G=SOURCE_FORMAT_KEYED_COLUMNS;break}}return G}function determineSourceDimensions(U,G,H,W,Z){var X,K;if(!U)return{dimensionsDefine:normalizeDimensionsOption(Z),startIndex:K,dimensionsDetectedCount:X};if(G===SOURCE_FORMAT_ARRAY_ROWS){var Q=U;W==="auto"||W==null?arrayRowsTravelFirst(function(te){te!=null&&te!=="-"&&(isString(te)?K==null&&(K=1):K=0)},H,Q,10):K=isNumber(W)?W:W?1:0,!Z&&K===1&&(Z=[],arrayRowsTravelFirst(function(te,re){Z[re]=te!=null?te+"":""},H,Q,1/0)),X=Z?Z.length:H===SERIES_LAYOUT_BY_ROW?Q.length:Q[0]?Q[0].length:null}else if(G===SOURCE_FORMAT_OBJECT_ROWS)Z||(Z=objectRowsCollectDimensions(U));else if(G===SOURCE_FORMAT_KEYED_COLUMNS)Z||(Z=[],each$f(U,function(te,re){Z.push(re)}));else if(G===SOURCE_FORMAT_ORIGINAL){var ee=getDataItemValue(U[0]);X=isArray$1(ee)&&ee.length||1}else G===SOURCE_FORMAT_TYPED_ARRAY&&process.env.NODE_ENV!=="production"&&assert(!!Z,"dimensions must be given if data is TypedArray.");return{startIndex:K,dimensionsDefine:normalizeDimensionsOption(Z),dimensionsDetectedCount:X}}function objectRowsCollectDimensions(U){for(var G=0,H;G<U.length&&!(H=U[G++]););if(H)return keys(H)}function normalizeDimensionsOption(U){if(U){var G=createHashMap();return map$1(U,function(H,W){H=isObject$3(H)?H:{name:H};var Z={name:H.name,displayName:H.displayName,type:H.type};if(Z.name==null)return Z;Z.name+="",Z.displayName==null&&(Z.displayName=Z.name);var X=G.get(Z.name);return X?Z.name+="-"+X.count++:G.set(Z.name,{count:1}),Z})}}function arrayRowsTravelFirst(U,G,H,W){if(G===SERIES_LAYOUT_BY_ROW)for(var Z=0;Z<H.length&&Z<W;Z++)U(H[Z]?H[Z][0]:null,Z);else for(var X=H[0]||[],Z=0;Z<X.length&&Z<W;Z++)U(X[Z],Z)}function shouldRetrieveDataByName(U){var G=U.sourceFormat;return G===SOURCE_FORMAT_OBJECT_ROWS||G===SOURCE_FORMAT_KEYED_COLUMNS}var _a,_b,_c,_d,providerMethods,mountMethods,DefaultDataProvider=(function(){function U(G,H){var W=isSourceInstance(G)?G:createSourceFromSeriesDataOption(G);this._source=W;var Z=this._data=W.data,X=W.sourceFormat,K=W.seriesLayoutBy;if(X===SOURCE_FORMAT_TYPED_ARRAY){if(process.env.NODE_ENV!=="production"&&H==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=H,this._data=Z}if(process.env.NODE_ENV!=="production"){var Q=rawSourceDataValidatorMap[getMethodMapKey(X,K)];Q&&Q(Z,W.dimensionsDefine)}mountMethods(this,Z,W)}return U.prototype.getSource=function(){return this._source},U.prototype.count=function(){return 0},U.prototype.getItem=function(G,H){},U.prototype.appendData=function(G){},U.prototype.clean=function(){},U.protoInitialize=(function(){var G=U.prototype;G.pure=!1,G.persistent=!0})(),U.internalField=(function(){var G;mountMethods=function(K,Q,ee){var te=ee.sourceFormat,re=ee.seriesLayoutBy,ae=ee.startIndex,ne=ee.dimensionsDefine,ie=providerMethods[getMethodMapKey(te,re)];if(process.env.NODE_ENV!=="production"&&assert(ie,"Invalide sourceFormat: "+te),extend(K,ie),te===SOURCE_FORMAT_TYPED_ARRAY)K.getItem=H,K.count=Z,K.fillStorage=W;else{var oe=getRawSourceItemGetter(te,re);K.getItem=bind$1(oe,null,Q,ae,ne);var se=getRawSourceDataCounter(te,re);K.count=bind$1(se,null,Q,ae,ne)}};var H=function(K,Q){K=K-this._offset,Q=Q||[];for(var ee=this._data,te=this._dimSize,re=te*K,ae=0;ae<te;ae++)Q[ae]=ee[re+ae];return Q},W=function(K,Q,ee,te){for(var re=this._data,ae=this._dimSize,ne=0;ne<ae;ne++){for(var ie=te[ne],oe=ie[0]==null?1/0:ie[0],se=ie[1]==null?-1/0:ie[1],le=Q-K,ue=ee[ne],ce=0;ce<le;ce++){var fe=re[ce*ae+ne];ue[K+ce]=fe,fe<oe&&(oe=fe),fe>se&&(se=fe)}ie[0]=oe,ie[1]=se}},Z=function(){return this._data?this._data.length/this._dimSize:0};providerMethods=(G={},G[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]={pure:!0,appendData:X},G[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},G[SOURCE_FORMAT_OBJECT_ROWS]={pure:!0,appendData:X},G[SOURCE_FORMAT_KEYED_COLUMNS]={pure:!0,appendData:function(K){var Q=this._data;each$f(K,function(ee,te){for(var re=Q[te]||(Q[te]=[]),ae=0;ae<(ee||[]).length;ae++)re.push(ee[ae])})}},G[SOURCE_FORMAT_ORIGINAL]={appendData:X},G[SOURCE_FORMAT_TYPED_ARRAY]={persistent:!1,pure:!0,appendData:function(K){process.env.NODE_ENV!=="production"&&assert(isTypedArray(K),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=K},clean:function(){this._offset+=this.count(),this._data=null}},G);function X(K){for(var Q=0;Q<K.length;Q++)this._data.push(K[Q])}})(),U})(),validateSimply=function(U){isArray$1(U)||error("series.data or dataset.source must be an array.")},rawSourceDataValidatorMap=(_a={},_a[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]=validateSimply,_a[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]=validateSimply,_a[SOURCE_FORMAT_OBJECT_ROWS]=validateSimply,_a[SOURCE_FORMAT_KEYED_COLUMNS]=function(U,G){for(var H=0;H<G.length;H++){var W=G[H].name;W==null&&error("dimension name must not be null/undefined.")}},_a[SOURCE_FORMAT_ORIGINAL]=validateSimply,_a),getItemSimply=function(U,G,H,W){return U[W]},rawSourceItemGetterMap=(_b={},_b[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]=function(U,G,H,W){return U[W+G]},_b[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]=function(U,G,H,W,Z){W+=G;for(var X=Z||[],K=U,Q=0;Q<K.length;Q++){var ee=K[Q];X[Q]=ee?ee[W]:null}return X},_b[SOURCE_FORMAT_OBJECT_ROWS]=getItemSimply,_b[SOURCE_FORMAT_KEYED_COLUMNS]=function(U,G,H,W,Z){for(var X=Z||[],K=0;K<H.length;K++){var Q=H[K].name,ee=Q!=null?U[Q]:null;X[K]=ee?ee[W]:null}return X},_b[SOURCE_FORMAT_ORIGINAL]=getItemSimply,_b);function getRawSourceItemGetter(U,G){var H=rawSourceItemGetterMap[getMethodMapKey(U,G)];return process.env.NODE_ENV!=="production"&&assert(H,'Do not support get item on "'+U+'", "'+G+'".'),H}var countSimply=function(U,G,H){return U.length},rawSourceDataCounterMap=(_c={},_c[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]=function(U,G,H){return Math.max(0,U.length-G)},_c[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]=function(U,G,H){var W=U[0];return W?Math.max(0,W.length-G):0},_c[SOURCE_FORMAT_OBJECT_ROWS]=countSimply,_c[SOURCE_FORMAT_KEYED_COLUMNS]=function(U,G,H){var W=H[0].name,Z=W!=null?U[W]:null;return Z?Z.length:0},_c[SOURCE_FORMAT_ORIGINAL]=countSimply,_c);function getRawSourceDataCounter(U,G){var H=rawSourceDataCounterMap[getMethodMapKey(U,G)];return process.env.NODE_ENV!=="production"&&assert(H,'Do not support count on "'+U+'", "'+G+'".'),H}var getRawValueSimply=function(U,G,H){return U[G]},rawSourceValueGetterMap=(_d={},_d[SOURCE_FORMAT_ARRAY_ROWS]=getRawValueSimply,_d[SOURCE_FORMAT_OBJECT_ROWS]=function(U,G,H){return U[H]},_d[SOURCE_FORMAT_KEYED_COLUMNS]=getRawValueSimply,_d[SOURCE_FORMAT_ORIGINAL]=function(U,G,H){var W=getDataItemValue(U);return W instanceof Array?W[G]:W},_d[SOURCE_FORMAT_TYPED_ARRAY]=getRawValueSimply,_d);function getRawSourceValueGetter(U){var G=rawSourceValueGetterMap[U];return process.env.NODE_ENV!=="production"&&assert(G,'Do not support get value on "'+U+'".'),G}function getMethodMapKey(U,G){return U===SOURCE_FORMAT_ARRAY_ROWS?U+"_"+G:U}function retrieveRawValue(U,G,H){if(U){var W=U.getRawDataItem(G);if(W!=null){var Z=U.getStore(),X=Z.getSource().sourceFormat;if(H!=null){var K=U.getDimensionIndex(H),Q=Z.getDimensionProperty(K);return getRawSourceValueGetter(X)(W,K,Q)}else{var ee=W;return X===SOURCE_FORMAT_ORIGINAL&&(ee=getDataItemValue(W)),ee}}}}var DIMENSION_LABEL_REG=/\{@(.+?)\}/g,DataFormatMixin=(function(){function U(){}return U.prototype.getDataParams=function(G,H){var W=this.getData(H),Z=this.getRawValue(G,H),X=W.getRawIndex(G),K=W.getName(G),Q=W.getRawDataItem(G),ee=W.getItemVisual(G,"style"),te=ee&&ee[W.getItemVisual(G,"drawType")||"fill"],re=ee&&ee.stroke,ae=this.mainType,ne=ae==="series",ie=W.userOutput&&W.userOutput.get();return{componentType:ae,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:ne?this.subType:null,seriesIndex:this.seriesIndex,seriesId:ne?this.id:null,seriesName:ne?this.name:null,name:K,dataIndex:X,data:Q,dataType:H,value:Z,color:te,borderColor:re,dimensionNames:ie?ie.fullDimensions:null,encode:ie?ie.encode:null,$vars:["seriesName","name","value"]}},U.prototype.getFormattedLabel=function(G,H,W,Z,X,K){H=H||"normal";var Q=this.getData(W),ee=this.getDataParams(G,W);if(K&&(ee.value=K.interpolatedValue),Z!=null&&isArray$1(ee.value)&&(ee.value=ee.value[Z]),!X){var te=Q.getItemModel(G);X=te.get(H==="normal"?["label","formatter"]:[H,"label","formatter"])}if(isFunction(X))return ee.status=H,ee.dimensionIndex=Z,X(ee);if(isString(X)){var re=formatTpl(X,ee);return re.replace(DIMENSION_LABEL_REG,function(ae,ne){var ie=ne.length,oe=ne;oe.charAt(0)==="["&&oe.charAt(ie-1)==="]"&&(oe=+oe.slice(1,ie-1),process.env.NODE_ENV!=="production"&&isNaN(oe)&&error("Invalide label formatter: @"+ne+", only support @[0], @[1], @[2], ..."));var se=retrieveRawValue(Q,G,oe);if(K&&isArray$1(K.interpolatedValue)){var le=Q.getDimensionIndex(oe);le>=0&&(se=K.interpolatedValue[le])}return se!=null?se+"":""})}},U.prototype.getRawValue=function(G,H){return retrieveRawValue(this.getData(H),G)},U.prototype.formatTooltip=function(G,H,W){},U})();function normalizeTooltipFormatResult(U){var G,H;return isObject$3(U)?U.type?H=U:process.env.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+makePrintable(U)):G=U,{text:G,frag:H}}function createTask(U){return new Task(U)}var Task=(function(){function U(G){G=G||{},this._reset=G.reset,this._plan=G.plan,this._count=G.count,this._onDirty=G.onDirty,this._dirty=!0}return U.prototype.perform=function(G){var H=this._upstream,W=G&&G.skip;if(this._dirty&&H){var Z=this.context;Z.data=Z.outputData=H.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var X;this._plan&&!W&&(X=this._plan(this.context));var K=re(this._modBy),Q=this._modDataCount||0,ee=re(G&&G.modBy),te=G&&G.modDataCount||0;(K!==ee||Q!==te)&&(X="reset");function re(ce){return!(ce>=1)&&(ce=1),ce}var ae;(this._dirty||X==="reset")&&(this._dirty=!1,ae=this._doReset(W)),this._modBy=ee,this._modDataCount=te;var ne=G&&G.step;if(H?(process.env.NODE_ENV!=="production"&&assert(H._outputDueEnd!=null),this._dueEnd=H._outputDueEnd):(process.env.NODE_ENV!=="production"&&assert(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var ie=this._dueIndex,oe=Math.min(ne!=null?this._dueIndex+ne:1/0,this._dueEnd);if(!W&&(ae||ie<oe)){var se=this._progress;if(isArray$1(se))for(var le=0;le<se.length;le++)this._doProgress(se[le],ie,oe,ee,te);else this._doProgress(se,ie,oe,ee,te)}this._dueIndex=oe;var ue=this._settedOutputEnd!=null?this._settedOutputEnd:oe;process.env.NODE_ENV!=="production"&&assert(ue>=this._outputDueEnd),this._outputDueEnd=ue}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},U.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},U.prototype._doProgress=function(G,H,W,Z,X){iterator.reset(H,W,Z,X),this._callingProgress=G,this._callingProgress({start:H,end:W,count:W-H,next:iterator.next},this.context)},U.prototype._doReset=function(G){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var H,W;!G&&this._reset&&(H=this._reset(this.context),H&&H.progress&&(W=H.forceFirstProgress,H=H.progress),isArray$1(H)&&!H.length&&(H=null)),this._progress=H,this._modBy=this._modDataCount=null;var Z=this._downstream;return Z&&Z.dirty(),W},U.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},U.prototype.pipe=function(G){process.env.NODE_ENV!=="production"&&assert(G&&!G._disposed&&G!==this),(this._downstream!==G||this._dirty)&&(this._downstream=G,G._upstream=this,G.dirty())},U.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},U.prototype.getUpstream=function(){return this._upstream},U.prototype.getDownstream=function(){return this._downstream},U.prototype.setOutputEnd=function(G){this._outputDueEnd=this._settedOutputEnd=G},U})(),iterator=(function(){var U,G,H,W,Z,X={reset:function(ee,te,re,ae){G=ee,U=te,H=re,W=ae,Z=Math.ceil(W/H),X.next=H>1&&W>0?Q:K}};return X;function K(){return G<U?G++:null}function Q(){var ee=G%Z*H+Math.ceil(G/Z),te=G>=U?null:ee<W?ee:G;return G++,te}})();function parseDataValue(U,G){var H=G&&G.type;return H==="ordinal"?U:(H==="time"&&!isNumber(U)&&U!=null&&U!=="-"&&(U=+parseDate(U)),U==null||U===""?NaN:Number(U))}var valueParserMap=createHashMap({number:function(U){return parseFloat(U)},time:function(U){return+parseDate(U)},trim:function(U){return isString(U)?trim$1(U):U}});function getRawValueParser(U){return valueParserMap.get(U)}var ORDER_COMPARISON_OP_MAP={lt:function(U,G){return U<G},lte:function(U,G){return U<=G},gt:function(U,G){return U>G},gte:function(U,G){return U>=G}},FilterOrderComparator=(function(){function U(G,H){if(!isNumber(H)){var W="";process.env.NODE_ENV!=="production"&&(W='rvalue of "<", ">", "<=", ">=" can only be number in filter.'),throwError(W)}this._opFn=ORDER_COMPARISON_OP_MAP[G],this._rvalFloat=numericToNumber(H)}return U.prototype.evaluate=function(G){return isNumber(G)?this._opFn(G,this._rvalFloat):this._opFn(numericToNumber(G),this._rvalFloat)},U})(),SortOrderComparator=(function(){function U(G,H){var W=G==="desc";this._resultLT=W?1:-1,H==null&&(H=W?"min":"max"),this._incomparable=H==="min"?-1/0:1/0}return U.prototype.evaluate=function(G,H){var W=isNumber(G)?G:numericToNumber(G),Z=isNumber(H)?H:numericToNumber(H),X=isNaN(W),K=isNaN(Z);if(X&&(W=this._incomparable),K&&(Z=this._incomparable),X&&K){var Q=isString(G),ee=isString(H);Q&&(W=ee?G:0),ee&&(Z=Q?H:0)}return W<Z?this._resultLT:W>Z?-this._resultLT:0},U})(),FilterEqualityComparator=(function(){function U(G,H){this._rval=H,this._isEQ=G,this._rvalTypeof=typeof H,this._rvalFloat=numericToNumber(H)}return U.prototype.evaluate=function(G){var H=G===this._rval;if(!H){var W=typeof G;W!==this._rvalTypeof&&(W==="number"||this._rvalTypeof==="number")&&(H=numericToNumber(G)===this._rvalFloat)}return this._isEQ?H:!H},U})();function createFilterComparator(U,G){return U==="eq"||U==="ne"?new FilterEqualityComparator(U==="eq",G):hasOwn(ORDER_COMPARISON_OP_MAP,U)?new FilterOrderComparator(U,G):null}var ExternalSource=(function(){function U(){}return U.prototype.getRawData=function(){throw new Error("not supported")},U.prototype.getRawDataItem=function(G){throw new Error("not supported")},U.prototype.cloneRawData=function(){},U.prototype.getDimensionInfo=function(G){},U.prototype.cloneAllDimensionInfo=function(){},U.prototype.count=function(){},U.prototype.retrieveValue=function(G,H){},U.prototype.retrieveValueFromItem=function(G,H){},U.prototype.convertValue=function(G,H){return parseDataValue(G,H)},U})();function createExternalSource(U,G){var H=new ExternalSource,W=U.data,Z=H.sourceFormat=U.sourceFormat,X=U.startIndex,K="";U.seriesLayoutBy!==SERIES_LAYOUT_BY_COLUMN&&(process.env.NODE_ENV!=="production"&&(K='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),throwError(K));var Q=[],ee={},te=U.dimensionsDefine;if(te)each$f(te,function(se,le){var ue=se.name,ce={index:le,name:ue,displayName:se.displayName};if(Q.push(ce),ue!=null){var fe="";hasOwn(ee,ue)&&(process.env.NODE_ENV!=="production"&&(fe='dimension name "'+ue+'" duplicated.'),throwError(fe)),ee[ue]=ce}});else for(var re=0;re<U.dimensionsDetectedCount;re++)Q.push({index:re});var ae=getRawSourceItemGetter(Z,SERIES_LAYOUT_BY_COLUMN);G.__isBuiltIn&&(H.getRawDataItem=function(se){return ae(W,X,Q,se)},H.getRawData=bind$1(getRawData,null,U)),H.cloneRawData=bind$1(cloneRawData,null,U);var ne=getRawSourceDataCounter(Z,SERIES_LAYOUT_BY_COLUMN);H.count=bind$1(ne,null,W,X,Q);var ie=getRawSourceValueGetter(Z);H.retrieveValue=function(se,le){var ue=ae(W,X,Q,se);return oe(ue,le)};var oe=H.retrieveValueFromItem=function(se,le){if(se!=null){var ue=Q[le];if(ue)return ie(se,le,ue.name)}};return H.getDimensionInfo=bind$1(getDimensionInfo,null,Q,ee),H.cloneAllDimensionInfo=bind$1(cloneAllDimensionInfo,null,Q),H}function getRawData(U){var G=U.sourceFormat;if(!isSupportedSourceFormat(G)){var H="";process.env.NODE_ENV!=="production"&&(H="`getRawData` is not supported in source format "+G),throwError(H)}return U.data}function cloneRawData(U){var G=U.sourceFormat,H=U.data;if(!isSupportedSourceFormat(G)){var W="";process.env.NODE_ENV!=="production"&&(W="`cloneRawData` is not supported in source format "+G),throwError(W)}if(G===SOURCE_FORMAT_ARRAY_ROWS){for(var Z=[],X=0,K=H.length;X<K;X++)Z.push(H[X].slice());return Z}else if(G===SOURCE_FORMAT_OBJECT_ROWS){for(var Z=[],X=0,K=H.length;X<K;X++)Z.push(extend({},H[X]));return Z}}function getDimensionInfo(U,G,H){if(H!=null){if(isNumber(H)||!isNaN(H)&&!hasOwn(G,H))return U[H];if(hasOwn(G,H))return G[H]}}function cloneAllDimensionInfo(U){return clone$4(U)}var externalTransformMap=createHashMap();function registerExternalTransform(U){U=clone$4(U);var G=U.type,H="";G||(process.env.NODE_ENV!=="production"&&(H="Must have a `type` when `registerTransform`."),throwError(H));var W=G.split(":");W.length!==2&&(process.env.NODE_ENV!=="production"&&(H='Name must include namespace like "ns:regression".'),throwError(H));var Z=!1;W[0]==="echarts"&&(G=W[1],Z=!0),U.__isBuiltIn=Z,externalTransformMap.set(G,U)}function applyDataTransform(U,G,H){var W=normalizeToArray(U),Z=W.length,X="";Z||(process.env.NODE_ENV!=="production"&&(X="If `transform` declared, it should at least contain one transform."),throwError(X));for(var K=0,Q=Z;K<Q;K++){var ee=W[K];G=applySingleDataTransform(ee,G,H,Z===1?null:K),K!==Q-1&&(G.length=Math.max(G.length,1))}return G}function applySingleDataTransform(U,G,H,W){var Z="";G.length||(process.env.NODE_ENV!=="production"&&(Z="Must have at least one upstream dataset."),throwError(Z)),isObject$3(U)||(process.env.NODE_ENV!=="production"&&(Z="transform declaration must be an object rather than "+typeof U+"."),throwError(Z));var X=U.type,K=externalTransformMap.get(X);K||(process.env.NODE_ENV!=="production"&&(Z='Can not find transform on type "'+X+'".'),throwError(Z));var Q=map$1(G,function(re){return createExternalSource(re,K)}),ee=normalizeToArray(K.transform({upstream:Q[0],upstreamList:Q,config:clone$4(U.config)}));if(process.env.NODE_ENV!=="production"&&U.print){var te=map$1(ee,function(re){var ae=W!=null?" === pipe index: "+W:"";return["=== dataset index: "+H.datasetIndex+ae+" ===","- transform result data:",makePrintable(re.data),"- transform result dimensions:",makePrintable(re.dimensions)].join(`
|
|
20
|
+
`)}).join(`
|
|
21
|
+
`);log(te)}return map$1(ee,function(re,ae){var ne="";isObject$3(re)||(process.env.NODE_ENV!=="production"&&(ne="A transform should not return some empty results."),throwError(ne)),re.data||(process.env.NODE_ENV!=="production"&&(ne="Transform result data should be not be null or undefined"),throwError(ne));var ie=detectSourceFormat(re.data);isSupportedSourceFormat(ie)||(process.env.NODE_ENV!=="production"&&(ne="Transform result data should be array rows or object rows."),throwError(ne));var oe,se=G[0];if(se&&ae===0&&!re.dimensions){var le=se.startIndex;le&&(re.data=se.data.slice(0,le).concat(re.data)),oe={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN,sourceHeader:le,dimensions:se.metaRawOption.dimensions}}else oe={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN,sourceHeader:0,dimensions:re.dimensions};return createSource(re.data,oe,null)})}function isSupportedSourceFormat(U){return U===SOURCE_FORMAT_ARRAY_ROWS||U===SOURCE_FORMAT_OBJECT_ROWS}var UNDEFINED="undefined",CtorUint32Array=typeof Uint32Array===UNDEFINED?Array:Uint32Array,CtorUint16Array=typeof Uint16Array===UNDEFINED?Array:Uint16Array,CtorInt32Array$1=typeof Int32Array===UNDEFINED?Array:Int32Array,CtorFloat64Array=typeof Float64Array===UNDEFINED?Array:Float64Array,dataCtors={float:CtorFloat64Array,int:CtorInt32Array$1,ordinal:Array,number:Array,time:CtorFloat64Array},defaultDimValueGetters;function getIndicesCtor(U){return U>65535?CtorUint32Array:CtorUint16Array}function getInitialExtent(){return[1/0,-1/0]}function cloneChunk(U){var G=U.constructor;return G===Array?U.slice():new G(U)}function prepareStore(U,G,H,W,Z){var X=dataCtors[H||"float"];if(Z){var K=U[G],Q=K&&K.length;if(Q!==W){for(var ee=new X(W),te=0;te<Q;te++)ee[te]=K[te];U[G]=ee}}else U[G]=new X(W)}var DataStore=(function(){function U(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=createHashMap()}return U.prototype.initData=function(G,H,W){process.env.NODE_ENV!=="production"&&assert(isFunction(G.getItem)&&isFunction(G.count),"Invalid data provider."),this._provider=G,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var Z=G.getSource(),X=this.defaultDimValueGetter=defaultDimValueGetters[Z.sourceFormat];this._dimValueGetter=W||X,this._rawExtent=[];var K=shouldRetrieveDataByName(Z);this._dimensions=map$1(H,function(Q){return process.env.NODE_ENV!=="production"&&K&&assert(Q.property!=null),{type:Q.type,property:Q.property}}),this._initDataFromProvider(0,G.count())},U.prototype.getProvider=function(){return this._provider},U.prototype.getSource=function(){return this._provider.getSource()},U.prototype.ensureCalculationDimension=function(G,H){var W=this._calcDimNameToIdx,Z=this._dimensions,X=W.get(G);if(X!=null){if(Z[X].type===H)return X}else X=Z.length;return Z[X]={type:H},W.set(G,X),this._chunks[X]=new dataCtors[H||"float"](this._rawCount),this._rawExtent[X]=getInitialExtent(),X},U.prototype.collectOrdinalMeta=function(G,H){var W=this._chunks[G],Z=this._dimensions[G],X=this._rawExtent,K=Z.ordinalOffset||0,Q=W.length;K===0&&(X[G]=getInitialExtent());for(var ee=X[G],te=K;te<Q;te++){var re=W[te]=H.parseAndCollect(W[te]);isNaN(re)||(ee[0]=Math.min(re,ee[0]),ee[1]=Math.max(re,ee[1]))}Z.ordinalMeta=H,Z.ordinalOffset=Q,Z.type="ordinal"},U.prototype.getOrdinalMeta=function(G){var H=this._dimensions[G],W=H.ordinalMeta;return W},U.prototype.getDimensionProperty=function(G){var H=this._dimensions[G];return H&&H.property},U.prototype.appendData=function(G){process.env.NODE_ENV!=="production"&&assert(!this._indices,"appendData can only be called on raw data.");var H=this._provider,W=this.count();H.appendData(G);var Z=H.count();return H.persistent||(Z+=W),W<Z&&this._initDataFromProvider(W,Z,!0),[W,Z]},U.prototype.appendValues=function(G,H){for(var W=this._chunks,Z=this._dimensions,X=Z.length,K=this._rawExtent,Q=this.count(),ee=Q+Math.max(G.length,H||0),te=0;te<X;te++){var re=Z[te];prepareStore(W,te,re.type,ee,!0)}for(var ae=[],ne=Q;ne<ee;ne++)for(var ie=ne-Q,oe=0;oe<X;oe++){var re=Z[oe],se=defaultDimValueGetters.arrayRows.call(this,G[ie]||ae,re.property,ie,oe);W[oe][ne]=se;var le=K[oe];se<le[0]&&(le[0]=se),se>le[1]&&(le[1]=se)}return this._rawCount=this._count=ee,{start:Q,end:ee}},U.prototype._initDataFromProvider=function(G,H,W){for(var Z=this._provider,X=this._chunks,K=this._dimensions,Q=K.length,ee=this._rawExtent,te=map$1(K,function(ce){return ce.property}),re=0;re<Q;re++){var ae=K[re];ee[re]||(ee[re]=getInitialExtent()),prepareStore(X,re,ae.type,H,W)}if(Z.fillStorage)Z.fillStorage(G,H,X,ee);else for(var ne=[],ie=G;ie<H;ie++){ne=Z.getItem(ie,ne);for(var oe=0;oe<Q;oe++){var se=X[oe],le=this._dimValueGetter(ne,te[oe],ie,oe);se[ie]=le;var ue=ee[oe];le<ue[0]&&(ue[0]=le),le>ue[1]&&(ue[1]=le)}}!Z.persistent&&Z.clean&&Z.clean(),this._rawCount=this._count=H,this._extent=[]},U.prototype.count=function(){return this._count},U.prototype.get=function(G,H){if(!(H>=0&&H<this._count))return NaN;var W=this._chunks[G];return W?W[this.getRawIndex(H)]:NaN},U.prototype.getValues=function(G,H){var W=[],Z=[];if(H==null){H=G,G=[];for(var X=0;X<this._dimensions.length;X++)Z.push(X)}else Z=G;for(var X=0,K=Z.length;X<K;X++)W.push(this.get(Z[X],H));return W},U.prototype.getByRawIndex=function(G,H){if(!(H>=0&&H<this._rawCount))return NaN;var W=this._chunks[G];return W?W[H]:NaN},U.prototype.getSum=function(G){var H=this._chunks[G],W=0;if(H)for(var Z=0,X=this.count();Z<X;Z++){var K=this.get(G,Z);isNaN(K)||(W+=K)}return W},U.prototype.getMedian=function(G){var H=[];this.each([G],function(X){isNaN(X)||H.push(X)});var W=H.sort(function(X,K){return X-K}),Z=this.count();return Z===0?0:Z%2===1?W[(Z-1)/2]:(W[Z/2]+W[Z/2-1])/2},U.prototype.indexOfRawIndex=function(G){if(G>=this._rawCount||G<0)return-1;if(!this._indices)return G;var H=this._indices,W=H[G];if(W!=null&&W<this._count&&W===G)return G;for(var Z=0,X=this._count-1;Z<=X;){var K=(Z+X)/2|0;if(H[K]<G)Z=K+1;else if(H[K]>G)X=K-1;else return K}return-1},U.prototype.getIndices=function(){var G,H=this._indices;if(H){var W=H.constructor,Z=this._count;if(W===Array){G=new W(Z);for(var X=0;X<Z;X++)G[X]=H[X]}else G=new W(H.buffer,0,Z)}else{var W=getIndicesCtor(this._rawCount);G=new W(this.count());for(var X=0;X<G.length;X++)G[X]=X}return G},U.prototype.filter=function(G,H){if(!this._count)return this;for(var W=this.clone(),Z=W.count(),X=getIndicesCtor(W._rawCount),K=new X(Z),Q=[],ee=G.length,te=0,re=G[0],ae=W._chunks,ne=0;ne<Z;ne++){var ie=void 0,oe=W.getRawIndex(ne);if(ee===0)ie=H(ne);else if(ee===1){var se=ae[re][oe];ie=H(se,ne)}else{for(var le=0;le<ee;le++)Q[le]=ae[G[le]][oe];Q[le]=ne,ie=H.apply(null,Q)}ie&&(K[te++]=oe)}return te<Z&&(W._indices=K),W._count=te,W._extent=[],W._updateGetRawIdx(),W},U.prototype.selectRange=function(G){var H=this.clone(),W=H._count;if(!W)return this;var Z=keys(G),X=Z.length;if(!X)return this;var K=H.count(),Q=getIndicesCtor(H._rawCount),ee=new Q(K),te=0,re=Z[0],ae=G[re][0],ne=G[re][1],ie=H._chunks,oe=!1;if(!H._indices){var se=0;if(X===1){for(var le=ie[Z[0]],ue=0;ue<W;ue++){var ce=le[ue];(ce>=ae&&ce<=ne||isNaN(ce))&&(ee[te++]=se),se++}oe=!0}else if(X===2){for(var le=ie[Z[0]],fe=ie[Z[1]],he=G[Z[1]][0],ve=G[Z[1]][1],ue=0;ue<W;ue++){var ce=le[ue],de=fe[ue];(ce>=ae&&ce<=ne||isNaN(ce))&&(de>=he&&de<=ve||isNaN(de))&&(ee[te++]=se),se++}oe=!0}}if(!oe)if(X===1)for(var ue=0;ue<K;ue++){var pe=H.getRawIndex(ue),ce=ie[Z[0]][pe];(ce>=ae&&ce<=ne||isNaN(ce))&&(ee[te++]=pe)}else for(var ue=0;ue<K;ue++){for(var ge=!0,pe=H.getRawIndex(ue),me=0;me<X;me++){var ye=Z[me],ce=ie[ye][pe];(ce<G[ye][0]||ce>G[ye][1])&&(ge=!1)}ge&&(ee[te++]=H.getRawIndex(ue))}return te<K&&(H._indices=ee),H._count=te,H._extent=[],H._updateGetRawIdx(),H},U.prototype.map=function(G,H){var W=this.clone(G);return this._updateDims(W,G,H),W},U.prototype.modify=function(G,H){this._updateDims(this,G,H)},U.prototype._updateDims=function(G,H,W){for(var Z=G._chunks,X=[],K=H.length,Q=G.count(),ee=[],te=G._rawExtent,re=0;re<H.length;re++)te[H[re]]=getInitialExtent();for(var ae=0;ae<Q;ae++){for(var ne=G.getRawIndex(ae),ie=0;ie<K;ie++)ee[ie]=Z[H[ie]][ne];ee[K]=ae;var oe=W&&W.apply(null,ee);if(oe!=null){typeof oe!="object"&&(X[0]=oe,oe=X);for(var re=0;re<oe.length;re++){var se=H[re],le=oe[re],ue=te[se],ce=Z[se];ce&&(ce[ne]=le),le<ue[0]&&(ue[0]=le),le>ue[1]&&(ue[1]=le)}}}},U.prototype.lttbDownSample=function(G,H){var W=this.clone([G],!0),Z=W._chunks,X=Z[G],K=this.count(),Q=0,ee=Math.floor(1/H),te=this.getRawIndex(0),re,ae,ne,ie=new(getIndicesCtor(this._rawCount))(Math.min((Math.ceil(K/ee)+2)*2,K));ie[Q++]=te;for(var oe=1;oe<K-1;oe+=ee){for(var se=Math.min(oe+ee,K-1),le=Math.min(oe+ee*2,K),ue=(le+se)/2,ce=0,fe=se;fe<le;fe++){var he=this.getRawIndex(fe),ve=X[he];isNaN(ve)||(ce+=ve)}ce/=le-se;var de=oe,pe=Math.min(oe+ee,K),ge=oe-1,me=X[te];re=-1,ne=de;for(var ye=-1,_e=0,fe=de;fe<pe;fe++){var he=this.getRawIndex(fe),ve=X[he];if(isNaN(ve)){_e++,ye<0&&(ye=he);continue}ae=Math.abs((ge-ue)*(ve-me)-(ge-fe)*(ce-me)),ae>re&&(re=ae,ne=he)}_e>0&&_e<pe-de&&(ie[Q++]=Math.min(ye,ne),ne=Math.max(ye,ne)),ie[Q++]=ne,te=ne}return ie[Q++]=this.getRawIndex(K-1),W._count=Q,W._indices=ie,W.getRawIndex=this._getRawIdx,W},U.prototype.minmaxDownSample=function(G,H){for(var W=this.clone([G],!0),Z=W._chunks,X=Math.floor(1/H),K=Z[G],Q=this.count(),ee=new(getIndicesCtor(this._rawCount))(Math.ceil(Q/X)*2),te=0,re=0;re<Q;re+=X){var ae=re,ne=K[this.getRawIndex(ae)],ie=re,oe=K[this.getRawIndex(ie)],se=X;re+X>Q&&(se=Q-re);for(var le=0;le<se;le++){var ue=this.getRawIndex(re+le),ce=K[ue];ce<ne&&(ne=ce,ae=re+le),ce>oe&&(oe=ce,ie=re+le)}var fe=this.getRawIndex(ae),he=this.getRawIndex(ie);ae<ie?(ee[te++]=fe,ee[te++]=he):(ee[te++]=he,ee[te++]=fe)}return W._count=te,W._indices=ee,W._updateGetRawIdx(),W},U.prototype.downSample=function(G,H,W,Z){for(var X=this.clone([G],!0),K=X._chunks,Q=[],ee=Math.floor(1/H),te=K[G],re=this.count(),ae=X._rawExtent[G]=getInitialExtent(),ne=new(getIndicesCtor(this._rawCount))(Math.ceil(re/ee)),ie=0,oe=0;oe<re;oe+=ee){ee>re-oe&&(ee=re-oe,Q.length=ee);for(var se=0;se<ee;se++){var le=this.getRawIndex(oe+se);Q[se]=te[le]}var ue=W(Q),ce=this.getRawIndex(Math.min(oe+Z(Q,ue)||0,re-1));te[ce]=ue,ue<ae[0]&&(ae[0]=ue),ue>ae[1]&&(ae[1]=ue),ne[ie++]=ce}return X._count=ie,X._indices=ne,X._updateGetRawIdx(),X},U.prototype.each=function(G,H){if(this._count)for(var W=G.length,Z=this._chunks,X=0,K=this.count();X<K;X++){var Q=this.getRawIndex(X);switch(W){case 0:H(X);break;case 1:H(Z[G[0]][Q],X);break;case 2:H(Z[G[0]][Q],Z[G[1]][Q],X);break;default:for(var ee=0,te=[];ee<W;ee++)te[ee]=Z[G[ee]][Q];te[ee]=X,H.apply(null,te)}}},U.prototype.getDataExtent=function(G){var H=this._chunks[G],W=getInitialExtent();if(!H)return W;var Z=this.count(),X=!this._indices,K;if(X)return this._rawExtent[G].slice();if(K=this._extent[G],K)return K.slice();K=W;for(var Q=K[0],ee=K[1],te=0;te<Z;te++){var re=this.getRawIndex(te),ae=H[re];ae<Q&&(Q=ae),ae>ee&&(ee=ae)}return K=[Q,ee],this._extent[G]=K,K},U.prototype.getRawDataItem=function(G){var H=this.getRawIndex(G);if(this._provider.persistent)return this._provider.getItem(H);for(var W=[],Z=this._chunks,X=0;X<Z.length;X++)W.push(Z[X][H]);return W},U.prototype.clone=function(G,H){var W=new U,Z=this._chunks,X=G&&reduce(G,function(Q,ee){return Q[ee]=!0,Q},{});if(X)for(var K=0;K<Z.length;K++)W._chunks[K]=X[K]?cloneChunk(Z[K]):Z[K];else W._chunks=Z;return this._copyCommonProps(W),H||(W._indices=this._cloneIndices()),W._updateGetRawIdx(),W},U.prototype._copyCommonProps=function(G){G._count=this._count,G._rawCount=this._rawCount,G._provider=this._provider,G._dimensions=this._dimensions,G._extent=clone$4(this._extent),G._rawExtent=clone$4(this._rawExtent)},U.prototype._cloneIndices=function(){if(this._indices){var G=this._indices.constructor,H=void 0;if(G===Array){var W=this._indices.length;H=new G(W);for(var Z=0;Z<W;Z++)H[Z]=this._indices[Z]}else H=new G(this._indices);return H}return null},U.prototype._getRawIdxIdentity=function(G){return G},U.prototype._getRawIdx=function(G){return G<this._count&&G>=0?this._indices[G]:-1},U.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},U.internalField=(function(){function G(H,W,Z,X){return parseDataValue(H[X],this._dimensions[X])}defaultDimValueGetters={arrayRows:G,objectRows:function(H,W,Z,X){return parseDataValue(H[W],this._dimensions[X])},keyedColumns:G,original:function(H,W,Z,X){var K=H&&(H.value==null?H:H.value);return parseDataValue(K instanceof Array?K[X]:K,this._dimensions[X])},typedArray:function(H,W,Z,X){return H[X]}}})(),U})(),SourceManager=(function(){function U(G){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=G}return U.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},U.prototype._setLocalSource=function(G,H){this._sourceList=G,this._upstreamSignList=H,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},U.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},U.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},U.prototype._createSource=function(){this._setLocalSource([],[]);var G=this._sourceHost,H=this._getUpstreamSourceManagers(),W=!!H.length,Z,X;if(isSeries(G)){var K=G,Q=void 0,ee=void 0,te=void 0;if(W){var re=H[0];re.prepareSource(),te=re.getSource(),Q=te.data,ee=te.sourceFormat,X=[re._getVersionSign()]}else Q=K.get("data",!0),ee=isTypedArray(Q)?SOURCE_FORMAT_TYPED_ARRAY:SOURCE_FORMAT_ORIGINAL,X=[];var ae=this._getSourceMetaRawOption()||{},ne=te&&te.metaRawOption||{},ie=retrieve2(ae.seriesLayoutBy,ne.seriesLayoutBy)||null,oe=retrieve2(ae.sourceHeader,ne.sourceHeader),se=retrieve2(ae.dimensions,ne.dimensions),le=ie!==ne.seriesLayoutBy||!!oe!=!!ne.sourceHeader||se;Z=le?[createSource(Q,{seriesLayoutBy:ie,sourceHeader:oe,dimensions:se},ee)]:[]}else{var ue=G;if(W){var ce=this._applyTransform(H);Z=ce.sourceList,X=ce.upstreamSignList}else{var fe=ue.get("source",!0);Z=[createSource(fe,this._getSourceMetaRawOption(),null)],X=[]}}process.env.NODE_ENV!=="production"&&assert(Z&&X),this._setLocalSource(Z,X)},U.prototype._applyTransform=function(G){var H=this._sourceHost,W=H.get("transform",!0),Z=H.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&assert(Z!=null||W!=null),Z!=null){var X="";G.length!==1&&(process.env.NODE_ENV!=="production"&&(X="When using `fromTransformResult`, there should be only one upstream dataset"),doThrow(X))}var K,Q=[],ee=[];return each$f(G,function(te){te.prepareSource();var re=te.getSource(Z||0),ae="";Z!=null&&!re&&(process.env.NODE_ENV!=="production"&&(ae="Can not retrieve result by `fromTransformResult`: "+Z),doThrow(ae)),Q.push(re),ee.push(te._getVersionSign())}),W?K=applyDataTransform(W,Q,{datasetIndex:H.componentIndex}):Z!=null&&(K=[cloneSourceShallow(Q[0])]),{sourceList:K,upstreamSignList:ee}},U.prototype._isDirty=function(){if(this._dirty)return!0;for(var G=this._getUpstreamSourceManagers(),H=0;H<G.length;H++){var W=G[H];if(W._isDirty()||this._upstreamSignList[H]!==W._getVersionSign())return!0}},U.prototype.getSource=function(G){G=G||0;var H=this._sourceList[G];if(!H){var W=this._getUpstreamSourceManagers();return W[0]&&W[0].getSource(G)}return H},U.prototype.getSharedDataStore=function(G){process.env.NODE_ENV!=="production"&&assert(isSeries(this._sourceHost),"Can only call getDataStore on series source manager.");var H=G.makeStoreSchema();return this._innerGetDataStore(H.dimensions,G.source,H.hash)},U.prototype._innerGetDataStore=function(G,H,W){var Z=0,X=this._storeList,K=X[Z];K||(K=X[Z]={});var Q=K[W];if(!Q){var ee=this._getUpstreamSourceManagers()[0];isSeries(this._sourceHost)&&ee?Q=ee._innerGetDataStore(G,H,W):(Q=new DataStore,Q.initData(new DefaultDataProvider(H,G.length),G)),K[W]=Q}return Q},U.prototype._getUpstreamSourceManagers=function(){var G=this._sourceHost;if(isSeries(G)){var H=querySeriesUpstreamDatasetModel(G);return H?[H.getSourceManager()]:[]}else return map$1(queryDatasetUpstreamDatasetModels(G),function(W){return W.getSourceManager()})},U.prototype._getSourceMetaRawOption=function(){var G=this._sourceHost,H,W,Z;if(isSeries(G))H=G.get("seriesLayoutBy",!0),W=G.get("sourceHeader",!0),Z=G.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var X=G;H=X.get("seriesLayoutBy",!0),W=X.get("sourceHeader",!0),Z=X.get("dimensions",!0)}return{seriesLayoutBy:H,sourceHeader:W,dimensions:Z}},U})();function disableTransformOptionMerge(U){var G=U.option.transform;G&&setAsPrimitive(U.option.transform)}function isSeries(U){return U.mainType==="series"}function doThrow(U){throw new Error(U)}var TOOLTIP_LINE_HEIGHT_CSS="line-height:1";function getTooltipLineHeight(U){var G=U.lineHeight;return G==null?TOOLTIP_LINE_HEIGHT_CSS:"line-height:"+encodeHTML(G+"")+"px"}function getTooltipTextStyle(U,G){var H=U.color||tokens.color.tertiary,W=U.fontSize||12,Z=U.fontWeight||"400",X=U.color||tokens.color.secondary,K=U.fontSize||14,Q=U.fontWeight||"900";return G==="html"?{nameStyle:"font-size:"+encodeHTML(W+"")+"px;color:"+encodeHTML(H)+";font-weight:"+encodeHTML(Z+""),valueStyle:"font-size:"+encodeHTML(K+"")+"px;color:"+encodeHTML(X)+";font-weight:"+encodeHTML(Q+"")}:{nameStyle:{fontSize:W,fill:H,fontWeight:Z},valueStyle:{fontSize:K,fill:X,fontWeight:Q}}}var HTML_GAPS=[0,10,20,30],RICH_TEXT_GAPS=["",`
|
|
22
|
+
`,`
|
|
23
|
+
|
|
24
|
+
`,`
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
`];function createTooltipMarkup(U,G){return G.type=U,G}function isSectionFragment(U){return U.type==="section"}function getBuilder(U){return isSectionFragment(U)?buildSection:buildNameValue}function getBlockGapLevel(U){if(isSectionFragment(U)){var G=0,H=U.blocks.length,W=H>1||H>0&&!U.noHeader;return each$f(U.blocks,function(Z){var X=getBlockGapLevel(Z);X>=G&&(G=X+ +(W&&(!X||isSectionFragment(Z)&&!Z.noHeader)))}),G}return 0}function buildSection(U,G,H,W){var Z=G.noHeader,X=getGap(getBlockGapLevel(G)),K=[],Q=G.blocks||[];assert(!Q||isArray$1(Q)),Q=Q||[];var ee=U.orderMode;if(G.sortBlocks&&ee){Q=Q.slice();var te={valueAsc:"asc",valueDesc:"desc"};if(hasOwn(te,ee)){var re=new SortOrderComparator(te[ee],null);Q.sort(function(se,le){return re.evaluate(se.sortParam,le.sortParam)})}else ee==="seriesDesc"&&Q.reverse()}each$f(Q,function(se,le){var ue=G.valueFormatter,ce=getBuilder(se)(ue?extend(extend({},U),{valueFormatter:ue}):U,se,le>0?X.html:0,W);ce!=null&&K.push(ce)});var ae=U.renderMode==="richText"?K.join(X.richText):wrapBlockHTML(W,K.join(""),Z?H:X.html);if(Z)return ae;var ne=makeValueReadable(G.header,"ordinal",U.useUTC),ie=getTooltipTextStyle(W,U.renderMode).nameStyle,oe=getTooltipLineHeight(W);return U.renderMode==="richText"?wrapInlineNameRichText(U,ne,ie)+X.richText+ae:wrapBlockHTML(W,'<div style="'+ie+";"+oe+';">'+encodeHTML(ne)+"</div>"+ae,H)}function buildNameValue(U,G,H,W){var Z=U.renderMode,X=G.noName,K=G.noValue,Q=!G.markerType,ee=G.name,te=U.useUTC,re=G.valueFormatter||U.valueFormatter||function(he){return he=isArray$1(he)?he:[he],map$1(he,function(ve,de){return makeValueReadable(ve,isArray$1(ie)?ie[de]:ie,te)})};if(!(X&&K)){var ae=Q?"":U.markupStyleCreator.makeTooltipMarker(G.markerType,G.markerColor||tokens.color.secondary,Z),ne=X?"":makeValueReadable(ee,"ordinal",te),ie=G.valueType,oe=K?[]:re(G.value,G.dataIndex),se=!Q||!X,le=!Q&&X,ue=getTooltipTextStyle(W,Z),ce=ue.nameStyle,fe=ue.valueStyle;return Z==="richText"?(Q?"":ae)+(X?"":wrapInlineNameRichText(U,ne,ce))+(K?"":wrapInlineValueRichText(U,oe,se,le,fe)):wrapBlockHTML(W,(Q?"":ae)+(X?"":wrapInlineNameHTML(ne,!Q,ce))+(K?"":wrapInlineValueHTML(oe,se,le,fe)),H)}}function buildTooltipMarkup(U,G,H,W,Z,X){if(U){var K=getBuilder(U),Q={useUTC:Z,renderMode:H,orderMode:W,markupStyleCreator:G,valueFormatter:U.valueFormatter};return K(Q,U,0,X)}}function getGap(U){return{html:HTML_GAPS[U],richText:RICH_TEXT_GAPS[U]}}function wrapBlockHTML(U,G,H){var W='<div style="clear:both"></div>',Z="margin: "+H+"px 0 0",X=getTooltipLineHeight(U);return'<div style="'+Z+";"+X+';">'+G+W+"</div>"}function wrapInlineNameHTML(U,G,H){var W=G?"margin-left:2px":"";return'<span style="'+H+";"+W+'">'+encodeHTML(U)+"</span>"}function wrapInlineValueHTML(U,G,H,W){var Z=H?"10px":"20px",X=G?"float:right;margin-left:"+Z:"";return U=isArray$1(U)?U:[U],'<span style="'+X+";"+W+'">'+map$1(U,function(K){return encodeHTML(K)}).join(" ")+"</span>"}function wrapInlineNameRichText(U,G,H){return U.markupStyleCreator.wrapRichTextStyle(G,H)}function wrapInlineValueRichText(U,G,H,W,Z){var X=[Z],K=W?10:20;return H&&X.push({padding:[0,0,0,K],align:"right"}),U.markupStyleCreator.wrapRichTextStyle(isArray$1(G)?G.join(" "):G,X)}function retrieveVisualColorForTooltipMarker(U,G){var H=U.getData().getItemVisual(G,"style"),W=H[U.visualDrawType];return convertToColorString(W)}function getPaddingFromTooltipModel(U,G){var H=U.get("padding");return H??(G==="richText"?[8,10]:10)}var TooltipMarkupStyleCreator=(function(){function U(){this.richTextStyles={},this._nextStyleNameId=getRandomIdBase()}return U.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},U.prototype.makeTooltipMarker=function(G,H,W){var Z=W==="richText"?this._generateStyleName():null,X=getTooltipMarker({color:H,type:G,renderMode:W,markerId:Z});return isString(X)?X:(process.env.NODE_ENV!=="production"&&assert(Z),this.richTextStyles[Z]=X.style,X.content)},U.prototype.wrapRichTextStyle=function(G,H){var W={};isArray$1(H)?each$f(H,function(X){return extend(W,X)}):extend(W,H);var Z=this._generateStyleName();return this.richTextStyles[Z]=W,"{"+Z+"|"+G+"}"},U})();function defaultSeriesFormatTooltip(U){var G=U.series,H=U.dataIndex,W=U.multipleSeries,Z=G.getData(),X=Z.mapDimensionsAll("defaultedTooltip"),K=X.length,Q=G.getRawValue(H),ee=isArray$1(Q),te=retrieveVisualColorForTooltipMarker(G,H),re,ae,ne,ie;if(K>1||ee&&!K){var oe=formatTooltipArrayValue(Q,G,H,X,te);re=oe.inlineValues,ae=oe.inlineValueTypes,ne=oe.blocks,ie=oe.inlineValues[0]}else if(K){var se=Z.getDimensionInfo(X[0]);ie=re=retrieveRawValue(Z,H,X[0]),ae=se.type}else ie=re=ee?Q[0]:Q;var le=isNameSpecified(G),ue=le&&G.name||"",ce=Z.getName(H),fe=W?ue:ce;return createTooltipMarkup("section",{header:ue,noHeader:W||!le,sortParam:ie,blocks:[createTooltipMarkup("nameValue",{markerType:"item",markerColor:te,name:fe,noName:!trim$1(fe),value:re,valueType:ae,dataIndex:H})].concat(ne||[])})}function formatTooltipArrayValue(U,G,H,W,Z){var X=G.getData(),K=reduce(U,function(ae,ne,ie){var oe=X.getDimensionInfo(ie);return ae=ae||oe&&oe.tooltip!==!1&&oe.displayName!=null},!1),Q=[],ee=[],te=[];W.length?each$f(W,function(ae){re(retrieveRawValue(X,H,ae),ae)}):each$f(U,re);function re(ae,ne){var ie=X.getDimensionInfo(ne);!ie||ie.otherDims.tooltip===!1||(K?te.push(createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:Z,name:ie.displayName,value:ae,valueType:ie.type})):(Q.push(ae),ee.push(ie.type)))}return{inlineValues:Q,inlineValueTypes:ee,blocks:te}}var inner$m=makeInner();function getSelectionKey(U,G){return U.getName(G)||U.getId(G)}var SERIES_UNIVERSAL_TRANSITION_PROP="__universalTransitionEnabled",SeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H._selectedDataIndicesMap={},H}return G.prototype.init=function(H,W,Z){this.seriesIndex=this.componentIndex,this.dataTask=createTask({count:dataTaskCount,reset:dataTaskReset}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(H,Z);var X=inner$m(this).sourceManager=new SourceManager(this);X.prepareSource();var K=this.getInitialData(H,Z);wrapData(K,this),this.dataTask.context.data=K,process.env.NODE_ENV!=="production"&&assert(K,"getInitialData returned invalid data."),inner$m(this).dataBeforeProcessed=K,autoSeriesName(this),this._initSelectedMapFromData(K)},G.prototype.mergeDefaultAndTheme=function(H,W){var Z=fetchLayoutMode(this),X=Z?getLayoutParams(H):{},K=this.subType;ComponentModel.hasClass(K)&&(K+="Series"),merge(H,W.getTheme().get(this.subType)),merge(H,this.getDefaultOption()),defaultEmphasis(H,"label",["show"]),this.fillDataTextStyle(H.data),Z&&mergeLayoutParam(H,X,Z)},G.prototype.mergeOption=function(H,W){H=merge(this.option,H,!0),this.fillDataTextStyle(H.data);var Z=fetchLayoutMode(this);Z&&mergeLayoutParam(this.option,H,Z);var X=inner$m(this).sourceManager;X.dirty(),X.prepareSource();var K=this.getInitialData(H,W);wrapData(K,this),this.dataTask.dirty(),this.dataTask.context.data=K,inner$m(this).dataBeforeProcessed=K,autoSeriesName(this),this._initSelectedMapFromData(K)},G.prototype.fillDataTextStyle=function(H){if(H&&!isTypedArray(H))for(var W=["show"],Z=0;Z<H.length;Z++)H[Z]&&H[Z].label&&defaultEmphasis(H[Z],"label",W)},G.prototype.getInitialData=function(H,W){},G.prototype.appendData=function(H){var W=this.getRawData();W.appendData(H.data)},G.prototype.getData=function(H){var W=getCurrentTask(this);if(W){var Z=W.context.data;return H==null||!Z.getLinkedData?Z:Z.getLinkedData(H)}else return inner$m(this).data},G.prototype.getAllData=function(){var H=this.getData();return H&&H.getLinkedDataAll?H.getLinkedDataAll():[{data:H}]},G.prototype.setData=function(H){var W=getCurrentTask(this);if(W){var Z=W.context;Z.outputData=H,W!==this.dataTask&&(Z.data=H)}inner$m(this).data=H},G.prototype.getEncode=function(){var H=this.get("encode",!0);if(H)return createHashMap(H)},G.prototype.getSourceManager=function(){return inner$m(this).sourceManager},G.prototype.getSource=function(){return this.getSourceManager().getSource()},G.prototype.getRawData=function(){return inner$m(this).dataBeforeProcessed},G.prototype.getColorBy=function(){var H=this.get("colorBy");return H||"series"},G.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},G.prototype.getBaseAxis=function(){var H=this.coordinateSystem;return H&&H.getBaseAxis&&H.getBaseAxis()},G.prototype.indicesOfNearest=function(H,W,Z,X){var K=this.getData(),Q=this.coordinateSystem,ee=Q&&Q.getAxis(H);if(!Q||!ee)return[];var te=ee.dataToCoord(Z);X==null&&(X=1/0);var re=[],ae=1/0,ne=-1,ie=0;return K.each(W,function(oe,se){var le=ee.dataToCoord(oe),ue=te-le,ce=Math.abs(ue);ce<=X&&((ce<ae||ce===ae&&ue>=0&&ne<0)&&(ae=ce,ne=ue,ie=0),ue===ne&&(re[ie++]=se))}),re.length=ie,re},G.prototype.formatTooltip=function(H,W,Z){return defaultSeriesFormatTooltip({series:this,dataIndex:H,multipleSeries:W})},G.prototype.isAnimationEnabled=function(){var H=this.ecModel;if(env.node&&!(H&&H.ssr))return!1;var W=this.getShallow("animation");return W&&this.getData().count()>this.getShallow("animationThreshold")&&(W=!1),!!W},G.prototype.restoreData=function(){this.dataTask.dirty()},G.prototype.getColorFromPalette=function(H,W,Z){var X=this.ecModel,K=PaletteMixin.prototype.getColorFromPalette.call(this,H,W,Z);return K||(K=X.getColorFromPalette(H,W,Z)),K},G.prototype.coordDimToDataDim=function(H){return this.getRawData().mapDimensionsAll(H)},G.prototype.getProgressive=function(){return this.get("progressive")},G.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},G.prototype.select=function(H,W){this._innerSelect(this.getData(W),H)},G.prototype.unselect=function(H,W){var Z=this.option.selectedMap;if(Z){var X=this.option.selectedMode,K=this.getData(W);if(X==="series"||Z==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var Q=0;Q<H.length;Q++){var ee=H[Q],te=getSelectionKey(K,ee);Z[te]=!1,this._selectedDataIndicesMap[te]=-1}}},G.prototype.toggleSelect=function(H,W){for(var Z=[],X=0;X<H.length;X++)Z[0]=H[X],this.isSelected(H[X],W)?this.unselect(Z,W):this.select(Z,W)},G.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var H=this._selectedDataIndicesMap,W=keys(H),Z=[],X=0;X<W.length;X++){var K=H[W[X]];K>=0&&Z.push(K)}return Z},G.prototype.isSelected=function(H,W){var Z=this.option.selectedMap;if(!Z)return!1;var X=this.getData(W);return(Z==="all"||Z[getSelectionKey(X,H)])&&!X.getItemModel(H).get(["select","disabled"])},G.prototype.isUniversalTransitionEnabled=function(){if(this[SERIES_UNIVERSAL_TRANSITION_PROP])return!0;var H=this.option.universalTransition;return H?H===!0?!0:H&&H.enabled:!1},G.prototype._innerSelect=function(H,W){var Z,X,K=this.option,Q=K.selectedMode,ee=W.length;if(!(!Q||!ee)){if(Q==="series")K.selectedMap="all";else if(Q==="multiple"){isObject$3(K.selectedMap)||(K.selectedMap={});for(var te=K.selectedMap,re=0;re<ee;re++){var ae=W[re],ne=getSelectionKey(H,ae);te[ne]=!0,this._selectedDataIndicesMap[ne]=H.getRawIndex(ae)}}else if(Q==="single"||Q===!0){var ie=W[ee-1],ne=getSelectionKey(H,ie);K.selectedMap=(Z={},Z[ne]=!0,Z),this._selectedDataIndicesMap=(X={},X[ne]=H.getRawIndex(ie),X)}}},G.prototype._initSelectedMapFromData=function(H){if(!this.option.selectedMap){var W=[];H.hasItemOption&&H.each(function(Z){var X=H.getRawDataItem(Z);X&&X.selected&&W.push(Z)}),W.length>0&&this._innerSelect(H,W)}},G.registerClass=function(H){return ComponentModel.registerClass(H)},G.protoInitialize=(function(){var H=G.prototype;H.type="series.__base__",H.seriesIndex=0,H.ignoreStyleOnData=!1,H.hasSymbolVisual=!1,H.defaultSymbol="circle",H.visualStyleAccessPath="itemStyle",H.visualDrawType="fill"})(),G})(ComponentModel);mixin(SeriesModel,DataFormatMixin),mixin(SeriesModel,PaletteMixin),mountExtend(SeriesModel,ComponentModel);function autoSeriesName(U){var G=U.name;isNameSpecified(U)||(U.name=getSeriesAutoName(U)||G)}function getSeriesAutoName(U){var G=U.getRawData(),H=G.mapDimensionsAll("seriesName"),W=[];return each$f(H,function(Z){var X=G.getDimensionInfo(Z);X.displayName&&W.push(X.displayName)}),W.join(" ")}function dataTaskCount(U){return U.model.getRawData().count()}function dataTaskReset(U){var G=U.model;return G.setData(G.getRawData().cloneShallow()),dataTaskProgress}function dataTaskProgress(U,G){G.outputData&&U.end>G.outputData.count()&&G.model.getRawData().cloneShallow(G.outputData)}function wrapData(U,G){each$f(concatArray(U.CHANGABLE_METHODS,U.DOWNSAMPLE_METHODS),function(H){U.wrapMethod(H,curry$1(onDataChange,G))})}function onDataChange(U,G){var H=getCurrentTask(U);return H&&H.setOutputEnd((G||this).count()),G}function getCurrentTask(U){var G=(U.ecModel||{}).scheduler,H=G&&G.getPipeline(U.uid);if(H){var W=H.currentTask;if(W){var Z=W.agentStubMap;Z&&(W=Z.get(U.uid))}return W}}var ComponentView=(function(){function U(){this.group=new Group$3,this.uid=getUID("viewComponent")}return U.prototype.init=function(G,H){},U.prototype.render=function(G,H,W,Z){},U.prototype.dispose=function(G,H){},U.prototype.updateView=function(G,H,W,Z){},U.prototype.updateLayout=function(G,H,W,Z){},U.prototype.updateVisual=function(G,H,W,Z){},U.prototype.toggleBlurSeries=function(G,H,W){},U.prototype.eachRendered=function(G){var H=this.group;H&&H.traverse(G)},U})();enableClassExtend(ComponentView),enableClassManagement(ComponentView);function createRenderPlanner(){var U=makeInner();return function(G){var H=U(G),W=G.pipelineContext,Z=!!H.large,X=!!H.progressiveRender,K=H.large=!!(W&&W.large),Q=H.progressiveRender=!!(W&&W.progressiveRender);return(Z!==K||X!==Q)&&"reset"}}var inner$l=makeInner(),renderPlanner=createRenderPlanner(),ChartView=(function(){function U(){this.group=new Group$3,this.uid=getUID("viewChart"),this.renderTask=createTask({plan:renderTaskPlan,reset:renderTaskReset}),this.renderTask.context={view:this}}return U.prototype.init=function(G,H){},U.prototype.render=function(G,H,W,Z){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},U.prototype.highlight=function(G,H,W,Z){var X=G.getData(Z&&Z.dataType);if(!X){process.env.NODE_ENV!=="production"&&error("Unknown dataType "+Z.dataType);return}toggleHighlight(X,Z,"emphasis")},U.prototype.downplay=function(G,H,W,Z){var X=G.getData(Z&&Z.dataType);if(!X){process.env.NODE_ENV!=="production"&&error("Unknown dataType "+Z.dataType);return}toggleHighlight(X,Z,"normal")},U.prototype.remove=function(G,H){this.group.removeAll()},U.prototype.dispose=function(G,H){},U.prototype.updateView=function(G,H,W,Z){this.render(G,H,W,Z)},U.prototype.updateLayout=function(G,H,W,Z){this.render(G,H,W,Z)},U.prototype.updateVisual=function(G,H,W,Z){this.render(G,H,W,Z)},U.prototype.eachRendered=function(G){traverseElements(this.group,G)},U.markUpdateMethod=function(G,H){inner$l(G).updateMethod=H},U.protoInitialize=(function(){var G=U.prototype;G.type="chart"})(),U})();function elSetState(U,G,H){U&&isHighDownDispatcher(U)&&(G==="emphasis"?enterEmphasis:leaveEmphasis)(U,H)}function toggleHighlight(U,G,H){var W=queryDataIndex(U,G),Z=G&&G.highlightKey!=null?getHighlightDigit(G.highlightKey):null;W!=null?each$f(normalizeToArray(W),function(X){elSetState(U.getItemGraphicEl(X),H,Z)}):U.eachItemGraphicEl(function(X){elSetState(X,H,Z)})}enableClassExtend(ChartView,["dispose"]),enableClassManagement(ChartView);function renderTaskPlan(U){return renderPlanner(U.model)}function renderTaskReset(U){var G=U.model,H=U.ecModel,W=U.api,Z=U.payload,X=G.pipelineContext.progressiveRender,K=U.view,Q=Z&&inner$l(Z).updateMethod,ee=X?"incrementalPrepareRender":Q&&K[Q]?Q:"render";return ee!=="render"&&K[ee](G,H,W,Z),progressMethodMap[ee]}var progressMethodMap={incrementalPrepareRender:{progress:function(U,G){G.view.incrementalRender(U,G.model,G.ecModel,G.api,G.payload)}},render:{forceFirstProgress:!0,progress:function(U,G){G.view.render(G.model,G.ecModel,G.api,G.payload)}}},ORIGIN_METHOD="\0__throttleOriginMethod",RATE="\0__throttleRate",THROTTLE_TYPE="\0__throttleType";function throttle(U,G,H){var W,Z=0,X=0,K=null,Q,ee,te,re;G=G||0;function ae(){X=new Date().getTime(),K=null,U.apply(ee,te||[])}var ne=function(){for(var ie=[],oe=0;oe<arguments.length;oe++)ie[oe]=arguments[oe];W=new Date().getTime(),ee=this,te=ie;var se=re||G,le=re||H;re=null,Q=W-(le?Z:X)-se,clearTimeout(K),le?K=setTimeout(ae,se):Q>=0?ae():K=setTimeout(ae,-Q),Z=W};return ne.clear=function(){K&&(clearTimeout(K),K=null)},ne.debounceNextCall=function(ie){re=ie},ne}function createOrUpdate(U,G,H,W){var Z=U[G];if(Z){var X=Z[ORIGIN_METHOD]||Z,K=Z[THROTTLE_TYPE],Q=Z[RATE];if(Q!==H||K!==W){if(H==null||!W)return U[G]=X;Z=U[G]=throttle(X,H,W==="debounce"),Z[ORIGIN_METHOD]=X,Z[THROTTLE_TYPE]=W,Z[RATE]=H}return Z}}function clear$1(U,G){var H=U[G];H&&H[ORIGIN_METHOD]&&(H.clear&&H.clear(),U[G]=H[ORIGIN_METHOD])}var inner$k=makeInner(),defaultStyleMappers={itemStyle:makeStyleMapper(ITEM_STYLE_KEY_MAP,!0),lineStyle:makeStyleMapper(LINE_STYLE_KEY_MAP,!0)},defaultColorKey={lineStyle:"stroke",itemStyle:"fill"};function getStyleMapper(U,G){var H=U.visualStyleMapper||defaultStyleMappers[G];return H||(console.warn("Unknown style type '"+G+"'."),defaultStyleMappers.itemStyle)}function getDefaultColorKey(U,G){var H=U.visualDrawType||defaultColorKey[G];return H||(console.warn("Unknown style type '"+G+"'."),"fill")}var seriesStyleTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(U,G){var H=U.getData(),W=U.visualStyleAccessPath||"itemStyle",Z=U.getModel(W),X=getStyleMapper(U,W),K=X(Z),Q=Z.getShallow("decal");Q&&(H.setVisual("decal",Q),Q.dirty=!0);var ee=getDefaultColorKey(U,W),te=K[ee],re=isFunction(te)?te:null,ae=K.fill==="auto"||K.stroke==="auto";if(!K[ee]||re||ae){var ne=U.getColorFromPalette(U.name,null,G.getSeriesCount());K[ee]||(K[ee]=ne,H.setVisual("colorFromPalette",!0)),K.fill=K.fill==="auto"||isFunction(K.fill)?ne:K.fill,K.stroke=K.stroke==="auto"||isFunction(K.stroke)?ne:K.stroke}if(H.setVisual("style",K),H.setVisual("drawType",ee),!G.isSeriesFiltered(U)&&re)return H.setVisual("colorFromPalette",!1),{dataEach:function(ie,oe){var se=U.getDataParams(oe),le=extend({},K);le[ee]=re(se),ie.setItemVisual(oe,"style",le)}}}},sharedModel=new Model,dataStyleTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(U,G){if(!(U.ignoreStyleOnData||G.isSeriesFiltered(U))){var H=U.getData(),W=U.visualStyleAccessPath||"itemStyle",Z=getStyleMapper(U,W),X=H.getVisual("drawType");return{dataEach:H.hasItemOption?function(K,Q){var ee=K.getRawDataItem(Q);if(ee&&ee[W]){sharedModel.option=ee[W];var te=Z(sharedModel),re=K.ensureUniqueItemVisual(Q,"style");extend(re,te),sharedModel.option.decal&&(K.setItemVisual(Q,"decal",sharedModel.option.decal),sharedModel.option.decal.dirty=!0),X in te&&K.setItemVisual(Q,"colorFromPalette",!1)}}:null}}}},dataColorPaletteTask={performRawSeries:!0,overallReset:function(U){var G=createHashMap();U.eachSeries(function(H){var W=H.getColorBy();if(!H.isColorBySeries()){var Z=H.type+"-"+W,X=G.get(Z);X||(X={},G.set(Z,X)),inner$k(H).scope=X}}),U.eachSeries(function(H){if(!(H.isColorBySeries()||U.isSeriesFiltered(H))){var W=H.getRawData(),Z={},X=H.getData(),K=inner$k(H).scope,Q=H.visualStyleAccessPath||"itemStyle",ee=getDefaultColorKey(H,Q);X.each(function(te){var re=X.getRawIndex(te);Z[re]=te}),W.each(function(te){var re=Z[te],ae=X.getItemVisual(re,"colorFromPalette");if(ae){var ne=X.ensureUniqueItemVisual(re,"style"),ie=W.getName(te)||te+"",oe=W.count();ne[ee]=H.getColorFromPalette(ie,K,oe)}})}})}},PI$5=Math.PI;function defaultLoading(U,G){G=G||{},defaults(G,{text:"loading",textColor:tokens.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:tokens.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var H=new Group$3,W=new Rect$2({style:{fill:G.maskColor},zlevel:G.zlevel,z:1e4});H.add(W);var Z=new ZRText({style:{text:G.text,fill:G.textColor,fontSize:G.fontSize,fontWeight:G.fontWeight,fontStyle:G.fontStyle,fontFamily:G.fontFamily},zlevel:G.zlevel,z:10001}),X=new Rect$2({style:{fill:"none"},textContent:Z,textConfig:{position:"right",distance:10},zlevel:G.zlevel,z:10001});H.add(X);var K;return G.showSpinner&&(K=new Arc({shape:{startAngle:-PI$5/2,endAngle:-PI$5/2+.1,r:G.spinnerRadius},style:{stroke:G.color,lineCap:"round",lineWidth:G.lineWidth},zlevel:G.zlevel,z:10001}),K.animateShape(!0).when(1e3,{endAngle:PI$5*3/2}).start("circularInOut"),K.animateShape(!0).when(1e3,{startAngle:PI$5*3/2}).delay(300).start("circularInOut"),H.add(K)),H.resize=function(){var Q=Z.getBoundingRect().width,ee=G.showSpinner?G.spinnerRadius:0,te=(U.getWidth()-ee*2-(G.showSpinner&&Q?10:0)-Q)/2-(G.showSpinner&&Q?0:5+Q/2)+(G.showSpinner?0:Q/2)+(Q?0:ee),re=U.getHeight()/2;G.showSpinner&&K.setShape({cx:te,cy:re}),X.setShape({x:te-ee,y:re-ee,width:ee*2,height:ee*2}),W.setShape({x:0,y:0,width:U.getWidth(),height:U.getHeight()})},H.resize(),H}var Scheduler=(function(){function U(G,H,W,Z){this._stageTaskMap=createHashMap(),this.ecInstance=G,this.api=H,W=this._dataProcessorHandlers=W.slice(),Z=this._visualHandlers=Z.slice(),this._allHandlers=W.concat(Z)}return U.prototype.restoreData=function(G,H){G.restoreData(H),this._stageTaskMap.each(function(W){var Z=W.overallTask;Z&&Z.dirty()})},U.prototype.getPerformArgs=function(G,H){if(G.__pipeline){var W=this._pipelineMap.get(G.__pipeline.id),Z=W.context,X=!H&&W.progressiveEnabled&&(!Z||Z.progressiveRender)&&G.__idxInPipeline>W.blockIndex,K=X?W.step:null,Q=Z&&Z.modDataCount,ee=Q!=null?Math.ceil(Q/K):null;return{step:K,modBy:ee,modDataCount:Q}}},U.prototype.getPipeline=function(G){return this._pipelineMap.get(G)},U.prototype.updateStreamModes=function(G,H){var W=this._pipelineMap.get(G.uid),Z=G.getData(),X=Z.count(),K=W.progressiveEnabled&&H.incrementalPrepareRender&&X>=W.threshold,Q=G.get("large")&&X>=G.get("largeThreshold"),ee=G.get("progressiveChunkMode")==="mod"?X:null;G.pipelineContext=W.context={progressiveRender:K,modDataCount:ee,large:Q}},U.prototype.restorePipelines=function(G){var H=this,W=H._pipelineMap=createHashMap();G.eachSeries(function(Z){var X=Z.getProgressive(),K=Z.uid;W.set(K,{id:K,head:null,tail:null,threshold:Z.getProgressiveThreshold(),progressiveEnabled:X&&!(Z.preventIncremental&&Z.preventIncremental()),blockIndex:-1,step:Math.round(X||700),count:0}),H._pipe(Z,Z.dataTask)})},U.prototype.prepareStageTasks=function(){var G=this._stageTaskMap,H=this.api.getModel(),W=this.api;each$f(this._allHandlers,function(Z){var X=G.get(Z.uid)||G.set(Z.uid,{}),K="";process.env.NODE_ENV!=="production"&&(K='"reset" and "overallReset" must not be both specified.'),assert(!(Z.reset&&Z.overallReset),K),Z.reset&&this._createSeriesStageTask(Z,X,H,W),Z.overallReset&&this._createOverallStageTask(Z,X,H,W)},this)},U.prototype.prepareView=function(G,H,W,Z){var X=G.renderTask,K=X.context;K.model=H,K.ecModel=W,K.api=Z,X.__block=!G.incrementalPrepareRender,this._pipe(H,X)},U.prototype.performDataProcessorTasks=function(G,H){this._performStageTasks(this._dataProcessorHandlers,G,H,{block:!0})},U.prototype.performVisualTasks=function(G,H,W){this._performStageTasks(this._visualHandlers,G,H,W)},U.prototype._performStageTasks=function(G,H,W,Z){Z=Z||{};var X=!1,K=this;each$f(G,function(ee,te){if(!(Z.visualType&&Z.visualType!==ee.visualType)){var re=K._stageTaskMap.get(ee.uid),ae=re.seriesTaskMap,ne=re.overallTask;if(ne){var ie,oe=ne.agentStubMap;oe.each(function(le){Q(Z,le)&&(le.dirty(),ie=!0)}),ie&&ne.dirty(),K.updatePayload(ne,W);var se=K.getPerformArgs(ne,Z.block);oe.each(function(le){le.perform(se)}),ne.perform(se)&&(X=!0)}else ae&&ae.each(function(le,ue){Q(Z,le)&&le.dirty();var ce=K.getPerformArgs(le,Z.block);ce.skip=!ee.performRawSeries&&H.isSeriesFiltered(le.context.model),K.updatePayload(le,W),le.perform(ce)&&(X=!0)})}});function Q(ee,te){return ee.setDirty&&(!ee.dirtyMap||ee.dirtyMap.get(te.__pipeline.id))}this.unfinished=X||this.unfinished},U.prototype.performSeriesTasks=function(G){var H;G.eachSeries(function(W){H=W.dataTask.perform()||H}),this.unfinished=H||this.unfinished},U.prototype.plan=function(){this._pipelineMap.each(function(G){var H=G.tail;do{if(H.__block){G.blockIndex=H.__idxInPipeline;break}H=H.getUpstream()}while(H)})},U.prototype.updatePayload=function(G,H){H!=="remain"&&(G.context.payload=H)},U.prototype._createSeriesStageTask=function(G,H,W,Z){var X=this,K=H.seriesTaskMap,Q=H.seriesTaskMap=createHashMap(),ee=G.seriesType,te=G.getTargetSeries;G.createOnAllSeries?W.eachRawSeries(re):ee?W.eachRawSeriesByType(ee,re):te&&te(W,Z).each(re);function re(ae){var ne=ae.uid,ie=Q.set(ne,K&&K.get(ne)||createTask({plan:seriesTaskPlan,reset:seriesTaskReset,count:seriesTaskCount}));ie.context={model:ae,ecModel:W,api:Z,useClearVisual:G.isVisual&&!G.isLayout,plan:G.plan,reset:G.reset,scheduler:X},X._pipe(ae,ie)}},U.prototype._createOverallStageTask=function(G,H,W,Z){var X=this,K=H.overallTask=H.overallTask||createTask({reset:overallTaskReset});K.context={ecModel:W,api:Z,overallReset:G.overallReset,scheduler:X};var Q=K.agentStubMap,ee=K.agentStubMap=createHashMap(),te=G.seriesType,re=G.getTargetSeries,ae=!0,ne=!1,ie="";process.env.NODE_ENV!=="production"&&(ie='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),assert(!G.createOnAllSeries,ie),te?W.eachRawSeriesByType(te,oe):re?re(W,Z).each(oe):(ae=!1,each$f(W.getSeries(),oe));function oe(se){var le=se.uid,ue=ee.set(le,Q&&Q.get(le)||(ne=!0,createTask({reset:stubReset,onDirty:stubOnDirty})));ue.context={model:se,overallProgress:ae},ue.agent=K,ue.__block=ae,X._pipe(se,ue)}ne&&K.dirty()},U.prototype._pipe=function(G,H){var W=G.uid,Z=this._pipelineMap.get(W);!Z.head&&(Z.head=H),Z.tail&&Z.tail.pipe(H),Z.tail=H,H.__idxInPipeline=Z.count++,H.__pipeline=Z},U.wrapStageHandler=function(G,H){return isFunction(G)&&(G={overallReset:G,seriesType:detectSeriseType(G)}),G.uid=getUID("stageHandler"),H&&(G.visualType=H),G},U})();function overallTaskReset(U){U.overallReset(U.ecModel,U.api,U.payload)}function stubReset(U){return U.overallProgress&&stubProgress}function stubProgress(){this.agent.dirty(),this.getDownstream().dirty()}function stubOnDirty(){this.agent&&this.agent.dirty()}function seriesTaskPlan(U){return U.plan?U.plan(U.model,U.ecModel,U.api,U.payload):null}function seriesTaskReset(U){U.useClearVisual&&U.data.clearAllVisual();var G=U.resetDefines=normalizeToArray(U.reset(U.model,U.ecModel,U.api,U.payload));return G.length>1?map$1(G,function(H,W){return makeSeriesTaskProgress(W)}):singleSeriesTaskProgress}var singleSeriesTaskProgress=makeSeriesTaskProgress(0);function makeSeriesTaskProgress(U){return function(G,H){var W=H.data,Z=H.resetDefines[U];if(Z&&Z.dataEach)for(var X=G.start;X<G.end;X++)Z.dataEach(W,X);else Z&&Z.progress&&Z.progress(G,W)}}function seriesTaskCount(U){return U.data.count()}function detectSeriseType(U){seriesType=null;try{U(ecModelMock,apiMock)}catch{}return seriesType}var ecModelMock={},apiMock={},seriesType;mockMethods(ecModelMock,GlobalModel),mockMethods(apiMock,ExtensionAPI),ecModelMock.eachSeriesByType=ecModelMock.eachRawSeriesByType=function(U){seriesType=U},ecModelMock.eachComponent=function(U){U.mainType==="series"&&U.subType&&(seriesType=U.subType)};function mockMethods(U,G){for(var H in G.prototype)U[H]=noop}var color=tokens.darkColor,backgroundColor=color.background,axisCommon=function(){return{axisLine:{lineStyle:{color:color.axisLine}},splitLine:{lineStyle:{color:color.axisSplitLine}},splitArea:{areaStyle:{color:[color.backgroundTint,color.backgroundTransparent]}},minorSplitLine:{lineStyle:{color:color.axisMinorSplitLine}},axisLabel:{color:color.axisLabel},axisName:{}}},matrixAxis={label:{color:color.secondary},itemStyle:{borderColor:color.borderTint},dividerLineStyle:{color:color.border}},theme={darkMode:!0,color:color.theme,backgroundColor,axisPointer:{lineStyle:{color:color.border},crossStyle:{color:color.borderShade},label:{color:color.tertiary}},legend:{textStyle:{color:color.secondary},pageTextStyle:{color:color.tertiary}},textStyle:{color:color.secondary},title:{textStyle:{color:color.primary},subtextStyle:{color:color.quaternary}},toolbox:{iconStyle:{borderColor:color.accent50}},tooltip:{backgroundColor:color.neutral20,defaultBorderColor:color.border,textStyle:{color:color.tertiary}},dataZoom:{borderColor:color.accent10,textStyle:{color:color.tertiary},brushStyle:{color:color.backgroundTint},handleStyle:{color:color.neutral00,borderColor:color.accent20},moveHandleStyle:{color:color.accent40},emphasis:{handleStyle:{borderColor:color.accent50}},dataBackground:{lineStyle:{color:color.accent30},areaStyle:{color:color.accent20}},selectedDataBackground:{lineStyle:{color:color.accent50},areaStyle:{color:color.accent30}}},visualMap:{textStyle:{color:color.secondary},handleStyle:{borderColor:color.neutral30}},timeline:{lineStyle:{color:color.accent10},label:{color:color.tertiary},controlStyle:{color:color.accent30,borderColor:color.accent30}},calendar:{itemStyle:{color:color.neutral00,borderColor:color.neutral20},dayLabel:{color:color.tertiary},monthLabel:{color:color.secondary},yearLabel:{color:color.secondary}},matrix:{x:matrixAxis,y:matrixAxis,backgroundColor:{borderColor:color.axisLine},body:{itemStyle:{borderColor:color.borderTint}}},timeAxis:axisCommon(),logAxis:axisCommon(),valueAxis:axisCommon(),categoryAxis:axisCommon(),line:{symbol:"circle"},graph:{color:color.theme},gauge:{title:{color:color.secondary},axisLine:{lineStyle:{color:[[1,color.neutral05]]}},axisLabel:{color:color.axisLabel},detail:{color:color.primary}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}},funnel:{itemStyle:{borderColor:color.background}},radar:(function(){var U=axisCommon();return U.axisName={color:color.axisLabel},U.axisLine.lineStyle.color=color.neutral20,U})(),treemap:{breadcrumb:{itemStyle:{color:color.neutral20,textStyle:{color:color.secondary}},emphasis:{itemStyle:{color:color.neutral30}}}},sunburst:{itemStyle:{borderColor:color.background}},map:{itemStyle:{borderColor:color.border,areaColor:color.neutral10},label:{color:color.tertiary},emphasis:{label:{color:color.primary},itemStyle:{areaColor:color.highlight}},select:{label:{color:color.primary},itemStyle:{areaColor:color.highlight}}},geo:{itemStyle:{borderColor:color.border,areaColor:color.neutral10},emphasis:{label:{color:color.primary},itemStyle:{areaColor:color.highlight}},select:{label:{color:color.primary},itemStyle:{color:color.highlight}}}};theme.categoryAxis.splitLine.show=!1;var ECEventProcessor=(function(){function U(){}return U.prototype.normalizeQuery=function(G){var H={},W={},Z={};if(isString(G)){var X=parseClassType(G);H.mainType=X.main||null,H.subType=X.sub||null}else{var K=["Index","Name","Id"],Q={name:1,dataIndex:1,dataType:1};each$f(G,function(ee,te){for(var re=!1,ae=0;ae<K.length;ae++){var ne=K[ae],ie=te.lastIndexOf(ne);if(ie>0&&ie===te.length-ne.length){var oe=te.slice(0,ie);oe!=="data"&&(H.mainType=oe,H[ne.toLowerCase()]=ee,re=!0)}}Q.hasOwnProperty(te)&&(W[te]=ee,re=!0),re||(Z[te]=ee)})}return{cptQuery:H,dataQuery:W,otherQuery:Z}},U.prototype.filter=function(G,H){var W=this.eventInfo;if(!W)return!0;var Z=W.targetEl,X=W.packedEvent,K=W.model,Q=W.view;if(!K||!Q)return!0;var ee=H.cptQuery,te=H.dataQuery;return re(ee,K,"mainType")&&re(ee,K,"subType")&&re(ee,K,"index","componentIndex")&&re(ee,K,"name")&&re(ee,K,"id")&&re(te,X,"name")&&re(te,X,"dataIndex")&&re(te,X,"dataType")&&(!Q.filterForExposedEvent||Q.filterForExposedEvent(G,H.otherQuery,Z,X));function re(ae,ne,ie,oe){return ae[ie]==null||ne[oe||ie]===ae[ie]}},U.prototype.afterTrigger=function(){this.eventInfo=null},U})(),SYMBOL_PROPS_WITH_CB=["symbol","symbolSize","symbolRotate","symbolOffset"],SYMBOL_PROPS=SYMBOL_PROPS_WITH_CB.concat(["symbolKeepAspect"]),seriesSymbolTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(U,G){var H=U.getData();if(U.legendIcon&&H.setVisual("legendIcon",U.legendIcon),!U.hasSymbolVisual)return;for(var W={},Z={},X=!1,K=0;K<SYMBOL_PROPS_WITH_CB.length;K++){var Q=SYMBOL_PROPS_WITH_CB[K],ee=U.get(Q);isFunction(ee)?(X=!0,Z[Q]=ee):W[Q]=ee}if(W.symbol=W.symbol||U.defaultSymbol,H.setVisual(extend({legendIcon:U.legendIcon||W.symbol,symbolKeepAspect:U.get("symbolKeepAspect")},W)),G.isSeriesFiltered(U))return;var te=keys(Z);function re(ae,ne){for(var ie=U.getRawValue(ne),oe=U.getDataParams(ne),se=0;se<te.length;se++){var le=te[se];ae.setItemVisual(ne,le,Z[le](ie,oe))}}return{dataEach:X?re:null}}},dataSymbolTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(U,G){if(!U.hasSymbolVisual||G.isSeriesFiltered(U))return;var H=U.getData();function W(Z,X){for(var K=Z.getItemModel(X),Q=0;Q<SYMBOL_PROPS.length;Q++){var ee=SYMBOL_PROPS[Q],te=K.getShallow(ee,!0);te!=null&&Z.setItemVisual(X,ee,te)}}return{dataEach:H.hasItemOption?W:null}}};function getItemVisualFromData(U,G,H){switch(H){case"color":var W=U.getItemVisual(G,"style");return W[U.getVisual("drawType")];case"opacity":return U.getItemVisual(G,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return U.getItemVisual(G,H);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+H)}}function getVisualFromData(U,G){switch(G){case"color":var H=U.getVisual("style");return H[U.getVisual("drawType")];case"opacity":return U.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return U.getVisual(G);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+G)}}function setItemVisualFromData(U,G,H,W){switch(H){case"color":var Z=U.ensureUniqueItemVisual(G,"style");Z[U.getVisual("drawType")]=W,U.setItemVisual(G,"colorFromPalette",!1);break;case"opacity":U.ensureUniqueItemVisual(G,"style").opacity=W;break;case"symbol":case"symbolSize":case"liftZ":U.setItemVisual(G,H,W);break;default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+H)}}function createLegacyDataSelectAction(U,G){function H(W,Z){var X=[];return W.eachComponent({mainType:"series",subType:U,query:Z},function(K){X.push(K.seriesIndex)}),X}each$f([[U+"ToggleSelect","toggleSelect"],[U+"Select","select"],[U+"UnSelect","unselect"]],function(W){G(W[0],function(Z,X,K){Z=extend({},Z),process.env.NODE_ENV!=="production"&&deprecateReplaceLog(Z.type,W[1]),K.dispatchAction(extend(Z,{type:W[1],seriesIndex:H(X,Z)}))})})}function handleSeriesLegacySelectEvents(U,G,H,W,Z){var X=U+G;H.isSilent(X)||(process.env.NODE_ENV!=="production"&&deprecateLog("event "+X+" is deprecated."),W.eachComponent({mainType:"series",subType:"pie"},function(K){for(var Q=K.seriesIndex,ee=K.option.selectedMap,te=Z.selected,re=0;re<te.length;re++)if(te[re].seriesIndex===Q){var ae=K.getData(),ne=queryDataIndex(ae,Z.fromActionPayload);H.trigger(X,{type:X,seriesId:K.id,name:isArray$1(ne)?ae.getName(ne[0]):ae.getName(ne),selected:isString(ee)?ee:extend({},ee)})}}))}function handleLegacySelectEvents(U,G,H){U.on("selectchanged",function(W){var Z=H.getModel();W.isFromClick?(handleSeriesLegacySelectEvents("map","selectchanged",G,Z,W),handleSeriesLegacySelectEvents("pie","selectchanged",G,Z,W)):W.fromAction==="select"?(handleSeriesLegacySelectEvents("map","selected",G,Z,W),handleSeriesLegacySelectEvents("pie","selected",G,Z,W)):W.fromAction==="unselect"&&(handleSeriesLegacySelectEvents("map","unselected",G,Z,W),handleSeriesLegacySelectEvents("pie","unselected",G,Z,W))})}function findEventDispatcher(U,G,H){for(var W;U&&!(G(U)&&(W=U,H));)U=U.__hostTarget||U.parent;return W}var wmUniqueIndex=Math.round(Math.random()*9),supportDefineProperty=typeof Object.defineProperty=="function",WeakMap=(function(){function U(){this._id="__ec_inner_"+wmUniqueIndex++}return U.prototype.get=function(G){return this._guard(G)[this._id]},U.prototype.set=function(G,H){var W=this._guard(G);return supportDefineProperty?Object.defineProperty(W,this._id,{value:H,enumerable:!1,configurable:!0}):W[this._id]=H,this},U.prototype.delete=function(G){return this.has(G)?(delete this._guard(G)[this._id],!0):!1},U.prototype.has=function(G){return!!this._guard(G)[this._id]},U.prototype._guard=function(G){if(G!==Object(G))throw TypeError("Value of WeakMap is not a non-null object.");return G},U})(),Triangle=Path.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(U,G){var H=G.cx,W=G.cy,Z=G.width/2,X=G.height/2;U.moveTo(H,W-X),U.lineTo(H+Z,W+X),U.lineTo(H-Z,W+X),U.closePath()}}),Diamond=Path.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(U,G){var H=G.cx,W=G.cy,Z=G.width/2,X=G.height/2;U.moveTo(H,W-X),U.lineTo(H+Z,W),U.lineTo(H,W+X),U.lineTo(H-Z,W),U.closePath()}}),Pin=Path.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(U,G){var H=G.x,W=G.y,Z=G.width/5*3,X=Math.max(Z,G.height),K=Z/2,Q=K*K/(X-K),ee=W-X+K+Q,te=Math.asin(Q/K),re=Math.cos(te)*K,ae=Math.sin(te),ne=Math.cos(te),ie=K*.6,oe=K*.7;U.moveTo(H-re,ee+Q),U.arc(H,ee,K,Math.PI-te,Math.PI*2+te),U.bezierCurveTo(H+re-ae*ie,ee+Q+ne*ie,H,W-oe,H,W),U.bezierCurveTo(H,W-oe,H-re+ae*ie,ee+Q+ne*ie,H-re,ee+Q),U.closePath()}}),Arrow=Path.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(U,G){var H=G.height,W=G.width,Z=G.x,X=G.y,K=W/3*2;U.moveTo(Z,X),U.lineTo(Z+K,X+H),U.lineTo(Z,X+H/4*3),U.lineTo(Z-K,X+H),U.lineTo(Z,X),U.closePath()}}),symbolCtors={line:Line$1,rect:Rect$2,roundRect:Rect$2,square:Rect$2,circle:Circle,diamond:Diamond,pin:Pin,arrow:Arrow,triangle:Triangle},symbolShapeMakers={line:function(U,G,H,W,Z){Z.x1=U,Z.y1=G+W/2,Z.x2=U+H,Z.y2=G+W/2},rect:function(U,G,H,W,Z){Z.x=U,Z.y=G,Z.width=H,Z.height=W},roundRect:function(U,G,H,W,Z){Z.x=U,Z.y=G,Z.width=H,Z.height=W,Z.r=Math.min(H,W)/4},square:function(U,G,H,W,Z){var X=Math.min(H,W);Z.x=U,Z.y=G,Z.width=X,Z.height=X},circle:function(U,G,H,W,Z){Z.cx=U+H/2,Z.cy=G+W/2,Z.r=Math.min(H,W)/2},diamond:function(U,G,H,W,Z){Z.cx=U+H/2,Z.cy=G+W/2,Z.width=H,Z.height=W},pin:function(U,G,H,W,Z){Z.x=U+H/2,Z.y=G+W/2,Z.width=H,Z.height=W},arrow:function(U,G,H,W,Z){Z.x=U+H/2,Z.y=G+W/2,Z.width=H,Z.height=W},triangle:function(U,G,H,W,Z){Z.cx=U+H/2,Z.cy=G+W/2,Z.width=H,Z.height=W}},symbolBuildProxies={};each$f(symbolCtors,function(U,G){symbolBuildProxies[G]=new U});var SymbolClz=Path.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(U,G,H){var W=calculateTextPosition(U,G,H),Z=this.shape;return Z&&Z.symbolType==="pin"&&G.position==="inside"&&(W.y=H.y+H.height*.4),W},buildPath:function(U,G,H){var W=G.symbolType;if(W!=="none"){var Z=symbolBuildProxies[W];Z||(W="rect",Z=symbolBuildProxies[W]),symbolShapeMakers[W](G.x,G.y,G.width,G.height,Z.shape),Z.buildPath(U,Z.shape,H)}}});function symbolPathSetColor(U,G){if(this.type!=="image"){var H=this.style;this.__isEmptyBrush?(H.stroke=U,H.fill=G||tokens.color.neutral00,H.lineWidth=2):this.shape.symbolType==="line"?H.stroke=U:H.fill=U,this.markRedraw()}}function createSymbol$1(U,G,H,W,Z,X,K){var Q=U.indexOf("empty")===0;Q&&(U=U.substr(5,1).toLowerCase()+U.substr(6));var ee;return U.indexOf("image://")===0?ee=makeImage(U.slice(8),new BoundingRect(G,H,W,Z),K?"center":"cover"):U.indexOf("path://")===0?ee=makePath(U.slice(7),{},new BoundingRect(G,H,W,Z),K?"center":"cover"):ee=new SymbolClz({shape:{symbolType:U,x:G,y:H,width:W,height:Z}}),ee.__isEmptyBrush=Q,ee.setColor=symbolPathSetColor,X&&ee.setColor(X),ee}function normalizeSymbolSize(U){return isArray$1(U)||(U=[+U,+U]),[U[0]||0,U[1]||0]}function normalizeSymbolOffset(U,G){if(U!=null)return isArray$1(U)||(U=[U,U]),[parsePercent(U[0],G[0])||0,parsePercent(retrieve2(U[1],U[0]),G[1])||0]}function isSafeNum(U){return isFinite(U)}function createLinearGradient(U,G,H){var W=G.x==null?0:G.x,Z=G.x2==null?1:G.x2,X=G.y==null?0:G.y,K=G.y2==null?0:G.y2;G.global||(W=W*H.width+H.x,Z=Z*H.width+H.x,X=X*H.height+H.y,K=K*H.height+H.y),W=isSafeNum(W)?W:0,Z=isSafeNum(Z)?Z:1,X=isSafeNum(X)?X:0,K=isSafeNum(K)?K:0;var Q=U.createLinearGradient(W,X,Z,K);return Q}function createRadialGradient(U,G,H){var W=H.width,Z=H.height,X=Math.min(W,Z),K=G.x==null?.5:G.x,Q=G.y==null?.5:G.y,ee=G.r==null?.5:G.r;G.global||(K=K*W+H.x,Q=Q*Z+H.y,ee=ee*X),K=isSafeNum(K)?K:.5,Q=isSafeNum(Q)?Q:.5,ee=ee>=0&&isSafeNum(ee)?ee:.5;var te=U.createRadialGradient(K,Q,0,K,Q,ee);return te}function getCanvasGradient(U,G,H){for(var W=G.type==="radial"?createRadialGradient(U,G,H):createLinearGradient(U,G,H),Z=G.colorStops,X=0;X<Z.length;X++)W.addColorStop(Z[X].offset,Z[X].color);return W}function isClipPathChanged(U,G){if(U===G||!U&&!G)return!1;if(!U||!G||U.length!==G.length)return!0;for(var H=0;H<U.length;H++)if(U[H]!==G[H])return!0;return!1}function parseInt10(U){return parseInt(U,10)}function getSize$1(U,G,H){var W=["width","height"][G],Z=["clientWidth","clientHeight"][G],X=["paddingLeft","paddingTop"][G],K=["paddingRight","paddingBottom"][G];if(H[W]!=null&&H[W]!=="auto")return parseFloat(H[W]);var Q=document.defaultView.getComputedStyle(U);return(U[Z]||parseInt10(Q[W])||parseInt10(U.style[W]))-(parseInt10(Q[X])||0)-(parseInt10(Q[K])||0)|0}function normalizeLineDash(U,G){return!U||U==="solid"||!(G>0)?null:U==="dashed"?[4*G,2*G]:U==="dotted"?[G]:isNumber(U)?[U]:isArray$1(U)?U:null}function getLineDash(U){var G=U.style,H=G.lineDash&&G.lineWidth>0&&normalizeLineDash(G.lineDash,G.lineWidth),W=G.lineDashOffset;if(H){var Z=G.strokeNoScale&&U.getLineScale?U.getLineScale():1;Z&&Z!==1&&(H=map$1(H,function(X){return X/Z}),W/=Z)}return[H,W]}var pathProxyForDraw=new PathProxy(!0);function styleHasStroke(U){var G=U.stroke;return!(G==null||G==="none"||!(U.lineWidth>0))}function isValidStrokeFillStyle(U){return typeof U=="string"&&U!=="none"}function styleHasFill(U){var G=U.fill;return G!=null&&G!=="none"}function doFillPath(U,G){if(G.fillOpacity!=null&&G.fillOpacity!==1){var H=U.globalAlpha;U.globalAlpha=G.fillOpacity*G.opacity,U.fill(),U.globalAlpha=H}else U.fill()}function doStrokePath(U,G){if(G.strokeOpacity!=null&&G.strokeOpacity!==1){var H=U.globalAlpha;U.globalAlpha=G.strokeOpacity*G.opacity,U.stroke(),U.globalAlpha=H}else U.stroke()}function createCanvasPattern(U,G,H){var W=createOrUpdateImage(G.image,G.__image,H);if(isImageReady(W)){var Z=U.createPattern(W,G.repeat||"repeat");if(typeof DOMMatrix=="function"&&Z&&Z.setTransform){var X=new DOMMatrix;X.translateSelf(G.x||0,G.y||0),X.rotateSelf(0,0,(G.rotation||0)*RADIAN_TO_DEGREE),X.scaleSelf(G.scaleX||1,G.scaleY||1),Z.setTransform(X)}return Z}}function brushPath(U,G,H,W){var Z,X=styleHasStroke(H),K=styleHasFill(H),Q=H.strokePercent,ee=Q<1,te=!G.path;(!G.silent||ee)&&te&&G.createPathProxy();var re=G.path||pathProxyForDraw,ae=G.__dirty;if(!W){var ne=H.fill,ie=H.stroke,oe=K&&!!ne.colorStops,se=X&&!!ie.colorStops,le=K&&!!ne.image,ue=X&&!!ie.image,ce=void 0,fe=void 0,he=void 0,ve=void 0,de=void 0;(oe||se)&&(de=G.getBoundingRect()),oe&&(ce=ae?getCanvasGradient(U,ne,de):G.__canvasFillGradient,G.__canvasFillGradient=ce),se&&(fe=ae?getCanvasGradient(U,ie,de):G.__canvasStrokeGradient,G.__canvasStrokeGradient=fe),le&&(he=ae||!G.__canvasFillPattern?createCanvasPattern(U,ne,G):G.__canvasFillPattern,G.__canvasFillPattern=he),ue&&(ve=ae||!G.__canvasStrokePattern?createCanvasPattern(U,ie,G):G.__canvasStrokePattern,G.__canvasStrokePattern=ve),oe?U.fillStyle=ce:le&&(he?U.fillStyle=he:K=!1),se?U.strokeStyle=fe:ue&&(ve?U.strokeStyle=ve:X=!1)}var pe=G.getGlobalScale();re.setScale(pe[0],pe[1],G.segmentIgnoreThreshold);var ge,me;U.setLineDash&&H.lineDash&&(Z=getLineDash(G),ge=Z[0],me=Z[1]);var ye=!0;(te||ae&SHAPE_CHANGED_BIT)&&(re.setDPR(U.dpr),ee?re.setContext(null):(re.setContext(U),ye=!1),re.reset(),G.buildPath(re,G.shape,W),re.toStatic(),G.pathUpdated()),ye&&re.rebuildPath(U,ee?Q:1),ge&&(U.setLineDash(ge),U.lineDashOffset=me),W||(H.strokeFirst?(X&&doStrokePath(U,H),K&&doFillPath(U,H)):(K&&doFillPath(U,H),X&&doStrokePath(U,H))),ge&&U.setLineDash([])}function brushImage(U,G,H){var W=G.__image=createOrUpdateImage(H.image,G.__image,G,G.onload);if(!(!W||!isImageReady(W))){var Z=H.x||0,X=H.y||0,K=G.getWidth(),Q=G.getHeight(),ee=W.width/W.height;if(K==null&&Q!=null?K=Q*ee:Q==null&&K!=null?Q=K/ee:K==null&&Q==null&&(K=W.width,Q=W.height),H.sWidth&&H.sHeight){var te=H.sx||0,re=H.sy||0;U.drawImage(W,te,re,H.sWidth,H.sHeight,Z,X,K,Q)}else if(H.sx&&H.sy){var te=H.sx,re=H.sy,ae=K-te,ne=Q-re;U.drawImage(W,te,re,ae,ne,Z,X,K,Q)}else U.drawImage(W,Z,X,K,Q)}}function brushText(U,G,H){var W,Z=H.text;if(Z!=null&&(Z+=""),Z){U.font=H.font||DEFAULT_FONT,U.textAlign=H.textAlign,U.textBaseline=H.textBaseline;var X=void 0,K=void 0;U.setLineDash&&H.lineDash&&(W=getLineDash(G),X=W[0],K=W[1]),X&&(U.setLineDash(X),U.lineDashOffset=K),H.strokeFirst?(styleHasStroke(H)&&U.strokeText(Z,H.x,H.y),styleHasFill(H)&&U.fillText(Z,H.x,H.y)):(styleHasFill(H)&&U.fillText(Z,H.x,H.y),styleHasStroke(H)&&U.strokeText(Z,H.x,H.y)),X&&U.setLineDash([])}}var SHADOW_NUMBER_PROPS=["shadowBlur","shadowOffsetX","shadowOffsetY"],STROKE_PROPS=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function bindCommonProps(U,G,H,W,Z){var X=!1;if(!W&&(H=H||{},G===H))return!1;if(W||G.opacity!==H.opacity){flushPathDrawn(U,Z),X=!0;var K=Math.max(Math.min(G.opacity,1),0);U.globalAlpha=isNaN(K)?DEFAULT_COMMON_STYLE.opacity:K}(W||G.blend!==H.blend)&&(X||(flushPathDrawn(U,Z),X=!0),U.globalCompositeOperation=G.blend||DEFAULT_COMMON_STYLE.blend);for(var Q=0;Q<SHADOW_NUMBER_PROPS.length;Q++){var ee=SHADOW_NUMBER_PROPS[Q];(W||G[ee]!==H[ee])&&(X||(flushPathDrawn(U,Z),X=!0),U[ee]=U.dpr*(G[ee]||0))}return(W||G.shadowColor!==H.shadowColor)&&(X||(flushPathDrawn(U,Z),X=!0),U.shadowColor=G.shadowColor||DEFAULT_COMMON_STYLE.shadowColor),X}function bindPathAndTextCommonStyle(U,G,H,W,Z){var X=getStyle(G,Z.inHover),K=W?null:H&&getStyle(H,Z.inHover)||{};if(X===K)return!1;var Q=bindCommonProps(U,X,K,W,Z);if((W||X.fill!==K.fill)&&(Q||(flushPathDrawn(U,Z),Q=!0),isValidStrokeFillStyle(X.fill)&&(U.fillStyle=X.fill)),(W||X.stroke!==K.stroke)&&(Q||(flushPathDrawn(U,Z),Q=!0),isValidStrokeFillStyle(X.stroke)&&(U.strokeStyle=X.stroke)),(W||X.opacity!==K.opacity)&&(Q||(flushPathDrawn(U,Z),Q=!0),U.globalAlpha=X.opacity==null?1:X.opacity),G.hasStroke()){var ee=X.lineWidth,te=ee/(X.strokeNoScale&&G.getLineScale?G.getLineScale():1);U.lineWidth!==te&&(Q||(flushPathDrawn(U,Z),Q=!0),U.lineWidth=te)}for(var re=0;re<STROKE_PROPS.length;re++){var ae=STROKE_PROPS[re],ne=ae[0];(W||X[ne]!==K[ne])&&(Q||(flushPathDrawn(U,Z),Q=!0),U[ne]=X[ne]||ae[1])}return Q}function bindImageStyle(U,G,H,W,Z){return bindCommonProps(U,getStyle(G,Z.inHover),H&&getStyle(H,Z.inHover),W,Z)}function setContextTransform(U,G){var H=G.transform,W=U.dpr||1;H?U.setTransform(W*H[0],W*H[1],W*H[2],W*H[3],W*H[4],W*H[5]):U.setTransform(W,0,0,W,0,0)}function updateClipStatus(U,G,H){for(var W=!1,Z=0;Z<U.length;Z++){var X=U[Z];W=W||X.isZeroArea(),setContextTransform(G,X),G.beginPath(),X.buildPath(G,X.shape),G.clip()}H.allClipped=W}function isTransformChanged(U,G){return U&&G?U[0]!==G[0]||U[1]!==G[1]||U[2]!==G[2]||U[3]!==G[3]||U[4]!==G[4]||U[5]!==G[5]:!(!U&&!G)}var DRAW_TYPE_PATH=1,DRAW_TYPE_IMAGE=2,DRAW_TYPE_TEXT=3,DRAW_TYPE_INCREMENTAL=4;function canPathBatch(U){var G=styleHasFill(U),H=styleHasStroke(U);return!(U.lineDash||!(+G^+H)||G&&typeof U.fill!="string"||H&&typeof U.stroke!="string"||U.strokePercent<1||U.strokeOpacity<1||U.fillOpacity<1)}function flushPathDrawn(U,G){G.batchFill&&U.fill(),G.batchStroke&&U.stroke(),G.batchFill="",G.batchStroke=""}function getStyle(U,G){return G&&U.__hoverStyle||U.style}function brushSingle(U,G){brush$1(U,G,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function brush$1(U,G,H,W){var Z=G.transform;if(!G.shouldBePainted(H.viewWidth,H.viewHeight,!1,!1)){G.__dirty&=~REDRAW_BIT,G.__isRendered=!1;return}var X=G.__clipPaths,K=H.prevElClipPaths,Q=!1,ee=!1;if((!K||isClipPathChanged(X,K))&&(K&&K.length&&(flushPathDrawn(U,H),U.restore(),ee=Q=!0,H.prevElClipPaths=null,H.allClipped=!1,H.prevEl=null),X&&X.length&&(flushPathDrawn(U,H),U.save(),updateClipStatus(X,U,H),Q=!0),H.prevElClipPaths=X),H.allClipped){G.__isRendered=!1;return}G.beforeBrush&&G.beforeBrush(),G.innerBeforeBrush();var te=H.prevEl;te||(ee=Q=!0);var re=G instanceof Path&&G.autoBatch&&canPathBatch(G.style);Q||isTransformChanged(Z,te.transform)?(flushPathDrawn(U,H),setContextTransform(U,G)):re||flushPathDrawn(U,H);var ae=getStyle(G,H.inHover);G instanceof Path?(H.lastDrawType!==DRAW_TYPE_PATH&&(ee=!0,H.lastDrawType=DRAW_TYPE_PATH),bindPathAndTextCommonStyle(U,G,te,ee,H),(!re||!H.batchFill&&!H.batchStroke)&&U.beginPath(),brushPath(U,G,ae,re),re&&(H.batchFill=ae.fill||"",H.batchStroke=ae.stroke||"")):G instanceof TSpan?(H.lastDrawType!==DRAW_TYPE_TEXT&&(ee=!0,H.lastDrawType=DRAW_TYPE_TEXT),bindPathAndTextCommonStyle(U,G,te,ee,H),brushText(U,G,ae)):G instanceof ZRImage?(H.lastDrawType!==DRAW_TYPE_IMAGE&&(ee=!0,H.lastDrawType=DRAW_TYPE_IMAGE),bindImageStyle(U,G,te,ee,H),brushImage(U,G,ae)):G.getTemporalDisplayables&&(H.lastDrawType!==DRAW_TYPE_INCREMENTAL&&(ee=!0,H.lastDrawType=DRAW_TYPE_INCREMENTAL),brushIncremental(U,G,H)),re&&W&&flushPathDrawn(U,H),G.innerAfterBrush(),G.afterBrush&&G.afterBrush(),H.prevEl=G,G.__dirty=0,G.__isRendered=!0}function brushIncremental(U,G,H){var W=G.getDisplayables(),Z=G.getTemporalDisplayables();U.save();var X={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:H.viewWidth,viewHeight:H.viewHeight,inHover:H.inHover},K,Q;for(K=G.getCursor(),Q=W.length;K<Q;K++){var ee=W[K];ee.beforeBrush&&ee.beforeBrush(),ee.innerBeforeBrush(),brush$1(U,ee,X,K===Q-1),ee.innerAfterBrush(),ee.afterBrush&&ee.afterBrush(),X.prevEl=ee}for(var te=0,re=Z.length;te<re;te++){var ee=Z[te];ee.beforeBrush&&ee.beforeBrush(),ee.innerBeforeBrush(),brush$1(U,ee,X,te===re-1),ee.innerAfterBrush(),ee.afterBrush&&ee.afterBrush(),X.prevEl=ee}G.clearTemporalDisplayables(),G.notClear=!0,U.restore()}var decalMap=new WeakMap,decalCache=new LRU(100),decalKeys=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function createOrUpdatePatternFromDecal(U,G){if(U==="none")return null;var H=G.getDevicePixelRatio(),W=G.getZr(),Z=W.painter.type==="svg";U.dirty&&decalMap.delete(U);var X=decalMap.get(U);if(X)return X;var K=defaults(U,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});K.backgroundColor==="none"&&(K.backgroundColor=null);var Q={repeat:"repeat"};return ee(Q),Q.rotation=K.rotation,Q.scaleX=Q.scaleY=Z?1:1/H,decalMap.set(U,Q),U.dirty=!1,Q;function ee(te){for(var re=[H],ae=!0,ne=0;ne<decalKeys.length;++ne){var ie=K[decalKeys[ne]];if(ie!=null&&!isArray$1(ie)&&!isString(ie)&&!isNumber(ie)&&typeof ie!="boolean"){ae=!1;break}re.push(ie)}var oe;if(ae){oe=re.join(",")+(Z?"-svg":"");var se=decalCache.get(oe);se&&(Z?te.svgElement=se:te.image=se)}var le=normalizeDashArrayX(K.dashArrayX),ue=normalizeDashArrayY(K.dashArrayY),ce=normalizeSymbolArray(K.symbol),fe=getLineBlockLengthX(le),he=getLineBlockLengthY(ue),ve=!Z&&platformApi.createCanvas(),de=Z&&{tag:"g",attrs:{},key:"dcl",children:[]},pe=me(),ge;ve&&(ve.width=pe.width*H,ve.height=pe.height*H,ge=ve.getContext("2d")),ye(),ae&&decalCache.put(oe,ve||de),te.image=ve,te.svgElement=de,te.svgWidth=pe.width,te.svgHeight=pe.height;function me(){for(var _e=1,xe=0,Se=fe.length;xe<Se;++xe)_e=getLeastCommonMultiple(_e,fe[xe]);for(var Te=1,xe=0,Se=ce.length;xe<Se;++xe)Te=getLeastCommonMultiple(Te,ce[xe].length);_e*=Te;var be=he*fe.length*ce.length;if(process.env.NODE_ENV!=="production"){var Ae=function(we){console.warn("Calculated decal size is greater than "+we+" due to decal option settings so "+we+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+we+" to be larger to avoid incontinuity.")};_e>K.maxTileWidth&&Ae("maxTileWidth"),be>K.maxTileHeight&&Ae("maxTileHeight")}return{width:Math.max(1,Math.min(_e,K.maxTileWidth)),height:Math.max(1,Math.min(be,K.maxTileHeight))}}function ye(){ge&&(ge.clearRect(0,0,ve.width,ve.height),K.backgroundColor&&(ge.fillStyle=K.backgroundColor,ge.fillRect(0,0,ve.width,ve.height)));for(var _e=0,xe=0;xe<ue.length;++xe)_e+=ue[xe];if(_e<=0)return;for(var Se=-he,Te=0,be=0,Ae=0;Se<pe.height;){if(Te%2===0){for(var we=be/2%ce.length,Ce=0,Ee=0,Me=0;Ce<pe.width*2;){for(var De=0,xe=0;xe<le[Ae].length;++xe)De+=le[Ae][xe];if(De<=0)break;if(Ee%2===0){var Le=(1-K.symbolSize)*.5,Pe=Ce+le[Ae][Ee]*Le,Ie=Se+ue[Te]*Le,$e=le[Ae][Ee]*K.symbolSize,Ve=ue[Te]*K.symbolSize,Fe=Me/2%ce[we].length;ke(Pe,Ie,$e,Ve,ce[we][Fe])}Ce+=le[Ae][Ee],++Me,++Ee,Ee===le[Ae].length&&(Ee=0)}++Ae,Ae===le.length&&(Ae=0)}Se+=ue[Te],++be,++Te,Te===ue.length&&(Te=0)}function ke(Re,Ne,Oe,Be,ze){var Ge=Z?1:H,He=createSymbol$1(ze,Re*Ge,Ne*Ge,Oe*Ge,Be*Ge,K.color,K.symbolKeepAspect);if(Z){var Ue=W.painter.renderOneToVNode(He);Ue&&de.children.push(Ue)}else brushSingle(ge,He)}}}}function normalizeSymbolArray(U){if(!U||U.length===0)return[["rect"]];if(isString(U))return[[U]];for(var G=!0,H=0;H<U.length;++H)if(!isString(U[H])){G=!1;break}if(G)return normalizeSymbolArray([U]);for(var W=[],H=0;H<U.length;++H)isString(U[H])?W.push([U[H]]):W.push(U[H]);return W}function normalizeDashArrayX(U){if(!U||U.length===0)return[[0,0]];if(isNumber(U)){var G=Math.ceil(U);return[[G,G]]}for(var H=!0,W=0;W<U.length;++W)if(!isNumber(U[W])){H=!1;break}if(H)return normalizeDashArrayX([U]);for(var Z=[],W=0;W<U.length;++W)if(isNumber(U[W])){var G=Math.ceil(U[W]);Z.push([G,G])}else{var G=map$1(U[W],function(Q){return Math.ceil(Q)});G.length%2===1?Z.push(G.concat(G)):Z.push(G)}return Z}function normalizeDashArrayY(U){if(!U||typeof U=="object"&&U.length===0)return[0,0];if(isNumber(U)){var G=Math.ceil(U);return[G,G]}var H=map$1(U,function(W){return Math.ceil(W)});return U.length%2?H.concat(H):H}function getLineBlockLengthX(U){return map$1(U,function(G){return getLineBlockLengthY(G)})}function getLineBlockLengthY(U){for(var G=0,H=0;H<U.length;++H)G+=U[H];return U.length%2===1?G*2:G}function decalVisual(U,G){U.eachRawSeries(function(H){if(!U.isSeriesFiltered(H)){var W=H.getData();W.hasItemVisual()&&W.each(function(K){var Q=W.getItemVisual(K,"decal");if(Q){var ee=W.ensureUniqueItemVisual(K,"style");ee.decal=createOrUpdatePatternFromDecal(Q,G)}});var Z=W.getVisual("decal");if(Z){var X=W.getVisual("style");X.decal=createOrUpdatePatternFromDecal(Z,G)}}})}var lifecycle=new Eventful,implsStore={};function registerImpl(U,G){process.env.NODE_ENV!=="production"&&implsStore[U]&&error("Already has an implementation of "+U+"."),implsStore[U]=G}function getImpl(U){return process.env.NODE_ENV!=="production"&&(implsStore[U]||error("Implementation of "+U+" doesn't exists.")),implsStore[U]}var customRenderers={};function registerCustomSeries(U,G){customRenderers[U]=G}function getCustomSeries(U){return customRenderers[U]}var TEST_FRAME_REMAIN_TIME=1,PRIORITY_PROCESSOR_SERIES_FILTER=800,PRIORITY_PROCESSOR_DATASTACK=900,PRIORITY_PROCESSOR_FILTER=1e3,PRIORITY_PROCESSOR_DEFAULT=2e3,PRIORITY_PROCESSOR_STATISTIC=5e3,PRIORITY_VISUAL_LAYOUT=1e3,PRIORITY_VISUAL_PROGRESSIVE_LAYOUT=1100,PRIORITY_VISUAL_GLOBAL=2e3,PRIORITY_VISUAL_CHART=3e3,PRIORITY_VISUAL_COMPONENT=4e3,PRIORITY_VISUAL_CHART_DATA_CUSTOM=4500,PRIORITY_VISUAL_POST_CHART_LAYOUT=4600,PRIORITY_VISUAL_BRUSH=5e3,PRIORITY_VISUAL_ARIA=6e3,PRIORITY_VISUAL_DECAL=7e3,PRIORITY={PROCESSOR:{FILTER:PRIORITY_PROCESSOR_FILTER,SERIES_FILTER:PRIORITY_PROCESSOR_SERIES_FILTER,STATISTIC:PRIORITY_PROCESSOR_STATISTIC},VISUAL:{LAYOUT:PRIORITY_VISUAL_LAYOUT,PROGRESSIVE_LAYOUT:PRIORITY_VISUAL_PROGRESSIVE_LAYOUT,GLOBAL:PRIORITY_VISUAL_GLOBAL,CHART:PRIORITY_VISUAL_CHART,POST_CHART_LAYOUT:PRIORITY_VISUAL_POST_CHART_LAYOUT,COMPONENT:PRIORITY_VISUAL_COMPONENT,BRUSH:PRIORITY_VISUAL_BRUSH,CHART_ITEM:PRIORITY_VISUAL_CHART_DATA_CUSTOM,ARIA:PRIORITY_VISUAL_ARIA,DECAL:PRIORITY_VISUAL_DECAL}},IN_MAIN_PROCESS_KEY="__flagInMainProcess",MAIN_PROCESS_VERSION_KEY="__mainProcessVersion",PENDING_UPDATE="__pendingUpdate",STATUS_NEEDS_UPDATE_KEY="__needsUpdateStatus",ACTION_REG=/^[a-zA-Z0-9_]+$/,CONNECT_STATUS_KEY="__connectUpdateStatus",CONNECT_STATUS_PENDING=0,CONNECT_STATUS_UPDATING=1,CONNECT_STATUS_UPDATED=2;function createRegisterEventWithLowercaseECharts(U){return function(){for(var G=[],H=0;H<arguments.length;H++)G[H]=arguments[H];if(this.isDisposed()){disposedWarning(this.id);return}return toLowercaseNameAndCallEventful(this,U,G)}}function createRegisterEventWithLowercaseMessageCenter(U){return function(){for(var G=[],H=0;H<arguments.length;H++)G[H]=arguments[H];return toLowercaseNameAndCallEventful(this,U,G)}}function toLowercaseNameAndCallEventful(U,G,H){return H[0]=H[0]&&H[0].toLowerCase(),Eventful.prototype[G].apply(U,H)}var MessageCenter=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G})(Eventful),messageCenterProto=MessageCenter.prototype;messageCenterProto.on=createRegisterEventWithLowercaseMessageCenter("on"),messageCenterProto.off=createRegisterEventWithLowercaseMessageCenter("off");var prepare,prepareView,updateDirectly,updateMethods,doConvertPixel,updateStreamModes,doDispatchAction,flushPendingActions,triggerUpdatedEvent,bindRenderedEvent,bindMouseEvent,render,renderComponents,renderSeries,createExtensionAPI,enableConnect,markStatusToUpdate,applyChangedStates,updateMainProcessVersion,ECharts=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this,new ECEventProcessor)||this;X._chartsViews=[],X._chartsMap={},X._componentsViews=[],X._componentsMap={},X._pendingActions=[],Z=Z||{},X._dom=H;var K="canvas",Q="auto",ee=!1;if(X[MAIN_PROCESS_VERSION_KEY]=1,process.env.NODE_ENV!=="production"){var te=env.hasGlobalWindow?window:global;te&&(K=retrieve2(te.__ECHARTS__DEFAULT__RENDERER__,K),Q=retrieve2(te.__ECHARTS__DEFAULT__COARSE_POINTER,Q),ee=retrieve2(te.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,ee))}Z.ssr&®isterSSRDataGetter(function(ie){var oe=getECData(ie),se=oe.dataIndex;if(se!=null){var le=createHashMap();return le.set("series_index",oe.seriesIndex),le.set("data_index",se),oe.ssrType&&le.set("ssr_type",oe.ssrType),le}});var re=X._zr=init$2(H,{renderer:Z.renderer||K,devicePixelRatio:Z.devicePixelRatio,width:Z.width,height:Z.height,ssr:Z.ssr,useDirtyRect:retrieve2(Z.useDirtyRect,ee),useCoarsePointer:retrieve2(Z.useCoarsePointer,Q),pointerSize:Z.pointerSize});X._ssr=Z.ssr,X._throttledZrFlush=throttle(bind$1(re.flush,re),17),X._updateTheme(W),X._locale=createLocaleObject(Z.locale||SYSTEM_LANG),X._coordSysMgr=new CoordinateSystemManager;var ae=X._api=createExtensionAPI(X);function ne(ie,oe){return ie.__prio-oe.__prio}return sort$2(visualFuncs,ne),sort$2(dataProcessorFuncs,ne),X._scheduler=new Scheduler(X,ae,dataProcessorFuncs,visualFuncs),X._messageCenter=new MessageCenter,X._initEvents(),X.resize=bind$1(X.resize,X),re.animation.on("frame",X._onframe,X),bindRenderedEvent(re,X),bindMouseEvent(re,X),setAsPrimitive(X),X}return G.prototype._onframe=function(){if(!this._disposed){applyChangedStates(this);var H=this._scheduler;if(this[PENDING_UPDATE]){var W=this[PENDING_UPDATE].silent;this[IN_MAIN_PROCESS_KEY]=!0,updateMainProcessVersion(this);try{prepare(this),updateMethods.update.call(this,null,this[PENDING_UPDATE].updateParams)}catch(ee){throw this[IN_MAIN_PROCESS_KEY]=!1,this[PENDING_UPDATE]=null,ee}this._zr.flush(),this[IN_MAIN_PROCESS_KEY]=!1,this[PENDING_UPDATE]=null,flushPendingActions.call(this,W),triggerUpdatedEvent.call(this,W)}else if(H.unfinished){var Z=TEST_FRAME_REMAIN_TIME,X=this._model,K=this._api;H.unfinished=!1;do{var Q=+new Date;H.performSeriesTasks(X),H.performDataProcessorTasks(X),updateStreamModes(this,X),H.performVisualTasks(X),renderSeries(this,this._model,K,"remain",{}),Z-=+new Date-Q}while(Z>0&&H.unfinished);H.unfinished||this._zr.flush()}}},G.prototype.getDom=function(){return this._dom},G.prototype.getId=function(){return this.id},G.prototype.getZr=function(){return this._zr},G.prototype.isSSR=function(){return this._ssr},G.prototype.setOption=function(H,W,Z){if(this[IN_MAIN_PROCESS_KEY]){process.env.NODE_ENV!=="production"&&error("`setOption` should not be called during main process.");return}if(this._disposed){disposedWarning(this.id);return}var X,K,Q;if(isObject$3(W)&&(Z=W.lazyUpdate,X=W.silent,K=W.replaceMerge,Q=W.transition,W=W.notMerge),this[IN_MAIN_PROCESS_KEY]=!0,updateMainProcessVersion(this),!this._model||W){var ee=new OptionManager(this._api),te=this._theme,re=this._model=new GlobalModel;re.scheduler=this._scheduler,re.ssr=this._ssr,re.init(null,null,null,te,this._locale,ee)}this._model.setOption(H,{replaceMerge:K},optionPreprocessorFuncs);var ae={seriesTransition:Q,optionChanged:!0};if(Z)this[PENDING_UPDATE]={silent:X,updateParams:ae},this[IN_MAIN_PROCESS_KEY]=!1,this.getZr().wakeUp();else{try{prepare(this),updateMethods.update.call(this,null,ae)}catch(ne){throw this[PENDING_UPDATE]=null,this[IN_MAIN_PROCESS_KEY]=!1,ne}this._ssr||this._zr.flush(),this[PENDING_UPDATE]=null,this[IN_MAIN_PROCESS_KEY]=!1,flushPendingActions.call(this,X),triggerUpdatedEvent.call(this,X)}},G.prototype.setTheme=function(H,W){if(this[IN_MAIN_PROCESS_KEY]){process.env.NODE_ENV!=="production"&&error("`setTheme` should not be called during main process.");return}if(this._disposed){disposedWarning(this.id);return}var Z=this._model;if(Z){var X=W&&W.silent,K=null;this[PENDING_UPDATE]&&(X==null&&(X=this[PENDING_UPDATE].silent),K=this[PENDING_UPDATE].updateParams,this[PENDING_UPDATE]=null),this[IN_MAIN_PROCESS_KEY]=!0,updateMainProcessVersion(this);try{this._updateTheme(H),Z.setTheme(this._theme),prepare(this),updateMethods.update.call(this,{type:"setTheme"},K)}catch(Q){throw this[IN_MAIN_PROCESS_KEY]=!1,Q}this[IN_MAIN_PROCESS_KEY]=!1,flushPendingActions.call(this,X),triggerUpdatedEvent.call(this,X)}},G.prototype._updateTheme=function(H){isString(H)&&(H=themeStorage[H]),H&&(H=clone$4(H),H&&globalBackwardCompat(H,!0),this._theme=H)},G.prototype.getModel=function(){return this._model},G.prototype.getOption=function(){return this._model&&this._model.getOption()},G.prototype.getWidth=function(){return this._zr.getWidth()},G.prototype.getHeight=function(){return this._zr.getHeight()},G.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||env.hasGlobalWindow&&window.devicePixelRatio||1},G.prototype.getRenderedCanvas=function(H){return process.env.NODE_ENV!=="production"&&deprecateReplaceLog("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(H)},G.prototype.renderToCanvas=function(H){H=H||{};var W=this._zr.painter;if(process.env.NODE_ENV!=="production"&&W.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return W.getRenderedCanvas({backgroundColor:H.backgroundColor||this._model.get("backgroundColor"),pixelRatio:H.pixelRatio||this.getDevicePixelRatio()})},G.prototype.renderToSVGString=function(H){H=H||{};var W=this._zr.painter;if(process.env.NODE_ENV!=="production"&&W.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return W.renderToString({useViewBox:H.useViewBox})},G.prototype.getSvgDataURL=function(){var H=this._zr,W=H.storage.getDisplayList();return each$f(W,function(Z){Z.stopAnimation(null,!0)}),H.painter.toDataURL()},G.prototype.getDataURL=function(H){if(this._disposed){disposedWarning(this.id);return}H=H||{};var W=H.excludeComponents,Z=this._model,X=[],K=this;each$f(W,function(ee){Z.eachComponent({mainType:ee},function(te){var re=K._componentsMap[te.__viewId];re.group.ignore||(X.push(re),re.group.ignore=!0)})});var Q=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(H).toDataURL("image/"+(H&&H.type||"png"));return each$f(X,function(ee){ee.group.ignore=!1}),Q},G.prototype.getConnectedDataURL=function(H){if(this._disposed){disposedWarning(this.id);return}var W=H.type==="svg",Z=this.group,X=Math.min,K=Math.max,Q=1/0;if(connectedGroups[Z]){var ee=Q,te=Q,re=-Q,ae=-Q,ne=[],ie=H&&H.pixelRatio||this.getDevicePixelRatio();each$f(instances,function(fe,he){if(fe.group===Z){var ve=W?fe.getZr().painter.getSvgDom().innerHTML:fe.renderToCanvas(clone$4(H)),de=fe.getDom().getBoundingClientRect();ee=X(de.left,ee),te=X(de.top,te),re=K(de.right,re),ae=K(de.bottom,ae),ne.push({dom:ve,left:de.left,top:de.top})}}),ee*=ie,te*=ie,re*=ie,ae*=ie;var oe=re-ee,se=ae-te,le=platformApi.createCanvas(),ue=init$2(le,{renderer:W?"svg":"canvas"});if(ue.resize({width:oe,height:se}),W){var ce="";return each$f(ne,function(fe){var he=fe.left-ee,ve=fe.top-te;ce+='<g transform="translate('+he+","+ve+')">'+fe.dom+"</g>"}),ue.painter.getSvgRoot().innerHTML=ce,H.connectedBackgroundColor&&ue.painter.setBackgroundColor(H.connectedBackgroundColor),ue.refreshImmediately(),ue.painter.toDataURL()}else return H.connectedBackgroundColor&&ue.add(new Rect$2({shape:{x:0,y:0,width:oe,height:se},style:{fill:H.connectedBackgroundColor}})),each$f(ne,function(fe){var he=new ZRImage({style:{x:fe.left*ie-ee,y:fe.top*ie-te,image:fe.dom}});ue.add(he)}),ue.refreshImmediately(),le.toDataURL("image/"+(H&&H.type||"png"))}else return this.getDataURL(H)},G.prototype.convertToPixel=function(H,W,Z){return doConvertPixel(this,"convertToPixel",H,W,Z)},G.prototype.convertToLayout=function(H,W,Z){return doConvertPixel(this,"convertToLayout",H,W,Z)},G.prototype.convertFromPixel=function(H,W,Z){return doConvertPixel(this,"convertFromPixel",H,W,Z)},G.prototype.containPixel=function(H,W){if(this._disposed){disposedWarning(this.id);return}var Z=this._model,X,K=parseFinder$1(Z,H);return each$f(K,function(Q,ee){ee.indexOf("Models")>=0&&each$f(Q,function(te){var re=te.coordinateSystem;if(re&&re.containPoint)X=X||!!re.containPoint(W);else if(ee==="seriesModels"){var ae=this._chartsMap[te.__viewId];ae&&ae.containPoint?X=X||ae.containPoint(W,te):process.env.NODE_ENV!=="production"&&warn(ee+": "+(ae?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&warn(ee+": containPoint is not supported")},this)},this),!!X},G.prototype.getVisual=function(H,W){var Z=this._model,X=parseFinder$1(Z,H,{defaultMainType:"series"}),K=X.seriesModel;process.env.NODE_ENV!=="production"&&(K||warn("There is no specified series model"));var Q=K.getData(),ee=X.hasOwnProperty("dataIndexInside")?X.dataIndexInside:X.hasOwnProperty("dataIndex")?Q.indexOfRawIndex(X.dataIndex):null;return ee!=null?getItemVisualFromData(Q,ee,W):getVisualFromData(Q,W)},G.prototype.getViewOfComponentModel=function(H){return this._componentsMap[H.__viewId]},G.prototype.getViewOfSeriesModel=function(H){return this._chartsMap[H.__viewId]},G.prototype._initEvents=function(){var H=this;each$f(MOUSE_EVENT_NAMES,function(Z){var X=function(K){var Q=H.getModel(),ee=K.target,te,re=Z==="globalout";if(re?te={}:ee&&findEventDispatcher(ee,function(se){var le=getECData(se);if(le&&le.dataIndex!=null){var ue=le.dataModel||Q.getSeriesByIndex(le.seriesIndex);return te=ue&&ue.getDataParams(le.dataIndex,le.dataType,ee)||{},!0}else if(le.eventData)return te=extend({},le.eventData),!0},!0),te){var ae=te.componentType,ne=te.componentIndex;(ae==="markLine"||ae==="markPoint"||ae==="markArea")&&(ae="series",ne=te.seriesIndex);var ie=ae&&ne!=null&&Q.getComponent(ae,ne),oe=ie&&H[ie.mainType==="series"?"_chartsMap":"_componentsMap"][ie.__viewId];process.env.NODE_ENV!=="production"&&!re&&!(ie&&oe)&&warn("model or view can not be found by params"),te.event=K,te.type=Z,H._$eventProcessor.eventInfo={targetEl:ee,packedEvent:te,model:ie,view:oe},H.trigger(Z,te)}};X.zrEventfulCallAtLast=!0,H._zr.on(Z,X,H)});var W=this._messageCenter;each$f(publicEventTypeMap,function(Z,X){W.on(X,function(K){H.trigger(X,K)})}),handleLegacySelectEvents(W,this,this._api)},G.prototype.isDisposed=function(){return this._disposed},G.prototype.clear=function(){if(this._disposed){disposedWarning(this.id);return}this.setOption({series:[]},!0)},G.prototype.dispose=function(){if(this._disposed){disposedWarning(this.id);return}this._disposed=!0;var H=this.getDom();H&&setAttribute(this.getDom(),DOM_ATTRIBUTE_KEY,"");var W=this,Z=W._api,X=W._model;each$f(W._componentsViews,function(K){K.dispose(X,Z)}),each$f(W._chartsViews,function(K){K.dispose(X,Z)}),W._zr.dispose(),W._dom=W._model=W._chartsMap=W._componentsMap=W._chartsViews=W._componentsViews=W._scheduler=W._api=W._zr=W._throttledZrFlush=W._theme=W._coordSysMgr=W._messageCenter=null,delete instances[W.id]},G.prototype.resize=function(H){if(this[IN_MAIN_PROCESS_KEY]){process.env.NODE_ENV!=="production"&&error("`resize` should not be called during main process.");return}if(this._disposed){disposedWarning(this.id);return}this._zr.resize(H);var W=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!W){var Z=W.resetOption("media"),X=H&&H.silent;this[PENDING_UPDATE]&&(X==null&&(X=this[PENDING_UPDATE].silent),Z=!0,this[PENDING_UPDATE]=null),this[IN_MAIN_PROCESS_KEY]=!0,updateMainProcessVersion(this);try{Z&&prepare(this),updateMethods.update.call(this,{type:"resize",animation:extend({duration:0},H&&H.animation)})}catch(K){throw this[IN_MAIN_PROCESS_KEY]=!1,K}this[IN_MAIN_PROCESS_KEY]=!1,flushPendingActions.call(this,X),triggerUpdatedEvent.call(this,X)}},G.prototype.showLoading=function(H,W){if(this._disposed){disposedWarning(this.id);return}if(isObject$3(H)&&(W=H,H=""),H=H||"default",this.hideLoading(),!loadingEffects[H]){process.env.NODE_ENV!=="production"&&warn("Loading effects "+H+" not exists.");return}var Z=loadingEffects[H](this._api,W),X=this._zr;this._loadingFX=Z,X.add(Z)},G.prototype.hideLoading=function(){if(this._disposed){disposedWarning(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},G.prototype.makeActionFromEvent=function(H){var W=extend({},H);return W.type=connectionEventRevertMap[H.type],W},G.prototype.dispatchAction=function(H,W){if(this._disposed){disposedWarning(this.id);return}if(isObject$3(W)||(W={silent:!!W}),!!actions[H.type]&&this._model){if(this[IN_MAIN_PROCESS_KEY]){this._pendingActions.push(H);return}var Z=W.silent;doDispatchAction.call(this,H,Z);var X=W.flush;X?this._zr.flush():X!==!1&&env.browser.weChat&&this._throttledZrFlush(),flushPendingActions.call(this,Z),triggerUpdatedEvent.call(this,Z)}},G.prototype.updateLabelLayout=function(){lifecycle.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},G.prototype.appendData=function(H){if(this._disposed){disposedWarning(this.id);return}var W=H.seriesIndex,Z=this.getModel(),X=Z.getSeriesByIndex(W);process.env.NODE_ENV!=="production"&&assert(H.data&&X),X.appendData(H),this._scheduler.unfinished=!0,this.getZr().wakeUp()},G.internalField=(function(){prepare=function(ae){var ne=ae._scheduler;ne.restorePipelines(ae._model),ne.prepareStageTasks(),prepareView(ae,!0),prepareView(ae,!1),ne.plan()},prepareView=function(ae,ne){for(var ie=ae._model,oe=ae._scheduler,se=ne?ae._componentsViews:ae._chartsViews,le=ne?ae._componentsMap:ae._chartsMap,ue=ae._zr,ce=ae._api,fe=0;fe<se.length;fe++)se[fe].__alive=!1;ne?ie.eachComponent(function(de,pe){de!=="series"&&he(pe)}):ie.eachSeries(he);function he(de){var pe=de.__requireNewView;de.__requireNewView=!1;var ge="_ec_"+de.id+"_"+de.type,me=!pe&&le[ge];if(!me){var ye=parseClassType(de.type),_e=ne?ComponentView.getClass(ye.main,ye.sub):ChartView.getClass(ye.sub);process.env.NODE_ENV!=="production"&&assert(_e,ye.sub+" does not exist."),me=new _e,me.init(ie,ce),le[ge]=me,se.push(me),ue.add(me.group)}de.__viewId=me.__id=ge,me.__alive=!0,me.__model=de,me.group.__ecComponentInfo={mainType:de.mainType,index:de.componentIndex},!ne&&oe.prepareView(me,de,ie,ce)}for(var fe=0;fe<se.length;){var ve=se[fe];ve.__alive?fe++:(!ne&&ve.renderTask.dispose(),ue.remove(ve.group),ve.dispose(ie,ce),se.splice(fe,1),le[ve.__id]===ve&&delete le[ve.__id],ve.__id=ve.group.__ecComponentInfo=null)}},updateDirectly=function(ae,ne,ie,oe,se){var le=ae._model;if(le.setUpdatePayload(ie),!oe){each$f([].concat(ae._componentsViews).concat(ae._chartsViews),ve);return}var ue={};ue[oe+"Id"]=ie[oe+"Id"],ue[oe+"Index"]=ie[oe+"Index"],ue[oe+"Name"]=ie[oe+"Name"];var ce={mainType:oe,query:ue};se&&(ce.subType=se);var fe=ie.excludeSeriesId,he;fe!=null&&(he=createHashMap(),each$f(normalizeToArray(fe),function(de){var pe=convertOptionIdName(de,null);pe!=null&&he.set(pe,!0)})),le&&le.eachComponent(ce,function(de){var pe=he&&he.get(de.id)!=null;if(!pe)if(isHighDownPayload(ie))if(de instanceof SeriesModel)ie.type===HIGHLIGHT_ACTION_TYPE&&!ie.notBlur&&!de.get(["emphasis","disabled"])&&blurSeriesFromHighlightPayload(de,ie,ae._api);else{var ge=findComponentHighDownDispatchers(de.mainType,de.componentIndex,ie.name,ae._api),me=ge.focusSelf,ye=ge.dispatchers;ie.type===HIGHLIGHT_ACTION_TYPE&&me&&!ie.notBlur&&blurComponent(de.mainType,de.componentIndex,ae._api),ye&&each$f(ye,function(_e){ie.type===HIGHLIGHT_ACTION_TYPE?enterEmphasis(_e):leaveEmphasis(_e)})}else isSelectChangePayload(ie)&&de instanceof SeriesModel&&(toggleSelectionFromPayload(de,ie,ae._api),updateSeriesElementSelection(de),markStatusToUpdate(ae))},ae),le&&le.eachComponent(ce,function(de){var pe=he&&he.get(de.id)!=null;pe||ve(ae[oe==="series"?"_chartsMap":"_componentsMap"][de.__viewId])},ae);function ve(de){de&&de.__alive&&de[ne]&&de[ne](de.__model,le,ae._api,ie)}},updateMethods={prepareAndUpdate:function(ae){prepare(this),updateMethods.update.call(this,ae,ae&&{optionChanged:ae.newOption!=null})},update:function(ae,ne){var ie=this._model,oe=this._api,se=this._zr,le=this._coordSysMgr,ue=this._scheduler;if(ie){ie.setUpdatePayload(ae),ue.restoreData(ie,ae),ue.performSeriesTasks(ie),le.create(ie,oe),ue.performDataProcessorTasks(ie,ae),updateStreamModes(this,ie),le.update(ie,oe),W(ie),ue.performVisualTasks(ie,ae);var ce=ie.get("backgroundColor")||"transparent";se.setBackgroundColor(ce);var fe=ie.get("darkMode");fe!=null&&fe!=="auto"&&se.setDarkMode(fe),render(this,ie,oe,ae,ne),lifecycle.trigger("afterupdate",ie,oe)}},updateTransform:function(ae){var ne=this,ie=this._model,oe=this._api;if(ie){ie.setUpdatePayload(ae);var se=[];ie.eachComponent(function(ue,ce){if(ue!=="series"){var fe=ne.getViewOfComponentModel(ce);if(fe&&fe.__alive)if(fe.updateTransform){var he=fe.updateTransform(ce,ie,oe,ae);he&&he.update&&se.push(fe)}else se.push(fe)}});var le=createHashMap();ie.eachSeries(function(ue){var ce=ne._chartsMap[ue.__viewId];if(ce.updateTransform){var fe=ce.updateTransform(ue,ie,oe,ae);fe&&fe.update&&le.set(ue.uid,1)}else le.set(ue.uid,1)}),W(ie),this._scheduler.performVisualTasks(ie,ae,{setDirty:!0,dirtyMap:le}),renderSeries(this,ie,oe,ae,{},le),lifecycle.trigger("afterupdate",ie,oe)}},updateView:function(ae){var ne=this._model;ne&&(ne.setUpdatePayload(ae),ChartView.markUpdateMethod(ae,"updateView"),W(ne),this._scheduler.performVisualTasks(ne,ae,{setDirty:!0}),render(this,ne,this._api,ae,{}),lifecycle.trigger("afterupdate",ne,this._api))},updateVisual:function(ae){var ne=this,ie=this._model;ie&&(ie.setUpdatePayload(ae),ie.eachSeries(function(oe){oe.getData().clearAllVisual()}),ChartView.markUpdateMethod(ae,"updateVisual"),W(ie),this._scheduler.performVisualTasks(ie,ae,{visualType:"visual",setDirty:!0}),ie.eachComponent(function(oe,se){if(oe!=="series"){var le=ne.getViewOfComponentModel(se);le&&le.__alive&&le.updateVisual(se,ie,ne._api,ae)}}),ie.eachSeries(function(oe){var se=ne._chartsMap[oe.__viewId];se.updateVisual(oe,ie,ne._api,ae)}),lifecycle.trigger("afterupdate",ie,this._api))},updateLayout:function(ae){updateMethods.update.call(this,ae)}};function H(ae,ne,ie,oe,se){if(ae._disposed){disposedWarning(ae.id);return}for(var le=ae._model,ue=ae._coordSysMgr.getCoordinateSystems(),ce,fe=parseFinder$1(le,ie),he=0;he<ue.length;he++){var ve=ue[he];if(ve[ne]&&(ce=ve[ne](le,fe,oe,se))!=null)return ce}process.env.NODE_ENV!=="production"&&warn("No coordinate system that supports "+ne+" found by the given finder.")}doConvertPixel=H,updateStreamModes=function(ae,ne){var ie=ae._chartsMap,oe=ae._scheduler;ne.eachSeries(function(se){oe.updateStreamModes(se,ie[se.__viewId])})},doDispatchAction=function(ae,ne){var ie=this,oe=this.getModel(),se=ae.type,le=ae.escapeConnect,ue=actions[se],ce=(ue.update||"update").split(":"),fe=ce.pop(),he=ce[0]!=null&&parseClassType(ce[0]);this[IN_MAIN_PROCESS_KEY]=!0,updateMainProcessVersion(this);var ve=[ae],de=!1;ae.batch&&(de=!0,ve=map$1(ae.batch,function(Ae){return Ae=defaults(extend({},Ae),ae),Ae.batch=null,Ae}));var pe=[],ge,me=[],ye=ue.nonRefinedEventType,_e=isSelectChangePayload(ae),xe=isHighDownPayload(ae);if(xe&&allLeaveBlur(this._api),each$f(ve,function(Ae){var we=ue.action(Ae,oe,ie._api);if(ue.refineEvent?me.push(we):ge=we,ge=ge||extend({},Ae),ge.type=ye,pe.push(ge),xe){var Ce=preParseFinder(ae),Ee=Ce.queryOptionMap,Me=Ce.mainTypeSpecified,De=Me?Ee.keys()[0]:"series";updateDirectly(ie,fe,Ae,De),markStatusToUpdate(ie)}else _e?(updateDirectly(ie,fe,Ae,"series"),markStatusToUpdate(ie)):he&&updateDirectly(ie,fe,Ae,he.main,he.sub)}),fe!=="none"&&!xe&&!_e&&!he)try{this[PENDING_UPDATE]?(prepare(this),updateMethods.update.call(this,ae),this[PENDING_UPDATE]=null):updateMethods[fe].call(this,ae)}catch(Ae){throw this[IN_MAIN_PROCESS_KEY]=!1,Ae}if(de?ge={type:ye,escapeConnect:le,batch:pe}:ge=pe[0],this[IN_MAIN_PROCESS_KEY]=!1,!ne){var Se=void 0;if(ue.refineEvent){var Te=ue.refineEvent(me,ae,oe,this._api).eventContent;assert(isObject$3(Te)),Se=defaults({type:ue.refinedEventType},Te),Se.fromAction=ae.type,Se.fromActionPayload=ae,Se.escapeConnect=!0}var be=this._messageCenter;be.trigger(ge.type,ge),Se&&be.trigger(Se.type,Se)}},flushPendingActions=function(ae){for(var ne=this._pendingActions;ne.length;){var ie=ne.shift();doDispatchAction.call(this,ie,ae)}},triggerUpdatedEvent=function(ae){!ae&&this.trigger("updated")},bindRenderedEvent=function(ae,ne){ae.on("rendered",function(ie){ne.trigger("rendered",ie),ae.animation.isFinished()&&!ne[PENDING_UPDATE]&&!ne._scheduler.unfinished&&!ne._pendingActions.length&&ne.trigger("finished")})},bindMouseEvent=function(ae,ne){ae.on("mouseover",function(ie){var oe=ie.target,se=findEventDispatcher(oe,isHighDownDispatcher);se&&(handleGlobalMouseOverForHighDown(se,ie,ne._api),markStatusToUpdate(ne))}).on("mouseout",function(ie){var oe=ie.target,se=findEventDispatcher(oe,isHighDownDispatcher);se&&(handleGlobalMouseOutForHighDown(se,ie,ne._api),markStatusToUpdate(ne))}).on("click",function(ie){var oe=ie.target,se=findEventDispatcher(oe,function(ce){return getECData(ce).dataIndex!=null},!0);if(se){var le=se.selected?"unselect":"select",ue=getECData(se);ne._api.dispatchAction({type:le,dataType:ue.dataType,dataIndexInside:ue.dataIndex,seriesIndex:ue.seriesIndex,isFromClick:!0})}})};function W(ae){ae.clearColorPalette(),ae.eachSeries(function(ne){ne.clearColorPalette()})}function Z(ae){var ne=[],ie=[],oe=!1;if(ae.eachComponent(function(ce,fe){var he=fe.get("zlevel")||0,ve=fe.get("z")||0,de=fe.getZLevelKey();oe=oe||!!de,(ce==="series"?ie:ne).push({zlevel:he,z:ve,idx:fe.componentIndex,type:ce,key:de})}),oe){var se=ne.concat(ie),le,ue;sort$2(se,function(ce,fe){return ce.zlevel===fe.zlevel?ce.z-fe.z:ce.zlevel-fe.zlevel}),each$f(se,function(ce){var fe=ae.getComponent(ce.type,ce.idx),he=ce.zlevel,ve=ce.key;le!=null&&(he=Math.max(le,he)),ve?(he===le&&ve!==ue&&he++,ue=ve):ue&&(he===le&&he++,ue=""),le=he,fe.setZLevel(he)})}}render=function(ae,ne,ie,oe,se){Z(ne),renderComponents(ae,ne,ie,oe,se),each$f(ae._chartsViews,function(le){le.__alive=!1}),renderSeries(ae,ne,ie,oe,se),each$f(ae._chartsViews,function(le){le.__alive||le.remove(ne,ie)})},renderComponents=function(ae,ne,ie,oe,se,le){each$f(le||ae._componentsViews,function(ue){var ce=ue.__model;te(ce,ue),ue.render(ce,ne,ie,oe),ee(ce,ue),re(ce,ue)})},renderSeries=function(ae,ne,ie,oe,se,le){var ue=ae._scheduler;se=extend(se||{},{updatedSeries:ne.getSeries()}),lifecycle.trigger("series:beforeupdate",ne,ie,se);var ce=!1;ne.eachSeries(function(fe){var he=ae._chartsMap[fe.__viewId];he.__alive=!0;var ve=he.renderTask;ue.updatePayload(ve,oe),te(fe,he),le&&le.get(fe.uid)&&ve.dirty(),ve.perform(ue.getPerformArgs(ve))&&(ce=!0),he.group.silent=!!fe.get("silent"),Q(fe,he),updateSeriesElementSelection(fe)}),ue.unfinished=ce||ue.unfinished,lifecycle.trigger("series:layoutlabels",ne,ie,se),lifecycle.trigger("series:transition",ne,ie,se),ne.eachSeries(function(fe){var he=ae._chartsMap[fe.__viewId];ee(fe,he),re(fe,he)}),K(ae,ne),lifecycle.trigger("series:afterupdate",ne,ie,se)},markStatusToUpdate=function(ae){ae[STATUS_NEEDS_UPDATE_KEY]=!0,ae.getZr().wakeUp()},updateMainProcessVersion=function(ae){ae[MAIN_PROCESS_VERSION_KEY]=(ae[MAIN_PROCESS_VERSION_KEY]+1)%1e3},applyChangedStates=function(ae){ae[STATUS_NEEDS_UPDATE_KEY]&&(ae.getZr().storage.traverse(function(ne){isElementRemoved(ne)||X(ne)}),ae[STATUS_NEEDS_UPDATE_KEY]=!1)};function X(ae){for(var ne=[],ie=ae.currentStates,oe=0;oe<ie.length;oe++){var se=ie[oe];se==="emphasis"||se==="blur"||se==="select"||ne.push(se)}ae.selected&&ae.states.select&&ne.push("select"),ae.hoverState===HOVER_STATE_EMPHASIS&&ae.states.emphasis?ne.push("emphasis"):ae.hoverState===HOVER_STATE_BLUR&&ae.states.blur&&ne.push("blur"),ae.useStates(ne)}function K(ae,ne){var ie=ae._zr,oe=ie.storage,se=0;oe.traverse(function(le){le.isGroup||se++}),se>ne.get("hoverLayerThreshold")&&!env.node&&!env.worker&&ne.eachSeries(function(le){if(!le.preventUsingHoverLayer){var ue=ae._chartsMap[le.__viewId];ue.__alive&&ue.eachRendered(function(ce){ce.states.emphasis&&(ce.states.emphasis.hoverLayer=!0)})}})}function Q(ae,ne){var ie=ae.get("blendMode")||null;ne.eachRendered(function(oe){oe.isGroup||(oe.style.blend=ie)})}function ee(ae,ne){if(!ae.preventAutoZ){var ie=retrieveZInfo(ae);ne.eachRendered(function(oe){return traverseUpdateZ(oe,ie.z,ie.zlevel),!0})}}function te(ae,ne){ne.eachRendered(function(ie){if(!isElementRemoved(ie)){var oe=ie.getTextContent(),se=ie.getTextGuideLine();ie.stateTransition&&(ie.stateTransition=null),oe&&oe.stateTransition&&(oe.stateTransition=null),se&&se.stateTransition&&(se.stateTransition=null),ie.hasState()?(ie.prevStates=ie.currentStates,ie.clearStates()):ie.prevStates&&(ie.prevStates=null)}})}function re(ae,ne){var ie=ae.getModel("stateAnimation"),oe=ae.isAnimationEnabled(),se=ie.get("duration"),le=se>0?{duration:se,delay:ie.get("delay"),easing:ie.get("easing")}:null;ne.eachRendered(function(ue){if(ue.states&&ue.states.emphasis){if(isElementRemoved(ue))return;if(ue instanceof Path&&savePathStates(ue),ue.__dirty){var ce=ue.prevStates;ce&&ue.useStates(ce)}if(oe){ue.stateTransition=le;var fe=ue.getTextContent(),he=ue.getTextGuideLine();fe&&(fe.stateTransition=le),he&&(he.stateTransition=le)}ue.__dirty&&X(ue)}})}createExtensionAPI=function(ae){return new((function(ne){__extends(ie,ne);function ie(){return ne!==null&&ne.apply(this,arguments)||this}return ie.prototype.getCoordinateSystems=function(){return ae._coordSysMgr.getCoordinateSystems()},ie.prototype.getComponentByElement=function(oe){for(;oe;){var se=oe.__ecComponentInfo;if(se!=null)return ae._model.getComponent(se.mainType,se.index);oe=oe.parent}},ie.prototype.enterEmphasis=function(oe,se){enterEmphasis(oe,se),markStatusToUpdate(ae)},ie.prototype.leaveEmphasis=function(oe,se){leaveEmphasis(oe,se),markStatusToUpdate(ae)},ie.prototype.enterBlur=function(oe){enterBlur(oe),markStatusToUpdate(ae)},ie.prototype.leaveBlur=function(oe){leaveBlur(oe),markStatusToUpdate(ae)},ie.prototype.enterSelect=function(oe){enterSelect(oe),markStatusToUpdate(ae)},ie.prototype.leaveSelect=function(oe){leaveSelect(oe),markStatusToUpdate(ae)},ie.prototype.getModel=function(){return ae.getModel()},ie.prototype.getViewOfComponentModel=function(oe){return ae.getViewOfComponentModel(oe)},ie.prototype.getViewOfSeriesModel=function(oe){return ae.getViewOfSeriesModel(oe)},ie.prototype.getMainProcessVersion=function(){return ae[MAIN_PROCESS_VERSION_KEY]},ie})(ExtensionAPI))(ae)},enableConnect=function(ae){function ne(ie,oe){for(var se=0;se<ie.length;se++){var le=ie[se];le[CONNECT_STATUS_KEY]=oe}}each$f(connectionEventRevertMap,function(ie,oe){ae._messageCenter.on(oe,function(se){if(connectedGroups[ae.group]&&ae[CONNECT_STATUS_KEY]!==CONNECT_STATUS_PENDING){if(se&&se.escapeConnect)return;var le=ae.makeActionFromEvent(se),ue=[];each$f(instances,function(ce){ce!==ae&&ce.group===ae.group&&ue.push(ce)}),ne(ue,CONNECT_STATUS_PENDING),each$f(ue,function(ce){ce[CONNECT_STATUS_KEY]!==CONNECT_STATUS_UPDATING&&ce.dispatchAction(le)}),ne(ue,CONNECT_STATUS_UPDATED)}})})}})(),G})(Eventful),echartsProto=ECharts.prototype;echartsProto.on=createRegisterEventWithLowercaseECharts("on"),echartsProto.off=createRegisterEventWithLowercaseECharts("off"),echartsProto.one=function(U,G,H){var W=this;deprecateLog("ECharts#one is deprecated.");function Z(){for(var X=[],K=0;K<arguments.length;K++)X[K]=arguments[K];G&&G.apply&&G.apply(this,X),W.off(U,Z)}this.on.call(this,U,Z,H)};var MOUSE_EVENT_NAMES=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function disposedWarning(U){process.env.NODE_ENV!=="production"&&warn("Instance "+U+" has been disposed")}var actions={},connectionEventRevertMap={},publicEventTypeMap={},dataProcessorFuncs=[],optionPreprocessorFuncs=[],visualFuncs=[],themeStorage={},loadingEffects={},instances={},connectedGroups={},idBase=+new Date-0,DOM_ATTRIBUTE_KEY="_echarts_instance_";function init$1(U,G,H){var W=!(H&&H.ssr);if(W){if(process.env.NODE_ENV!=="production"&&!U)throw new Error("Initialize failed: invalid dom.");var Z=getInstanceByDom(U);if(Z)return process.env.NODE_ENV!=="production"&&warn("There is a chart instance already initialized on the dom."),Z;process.env.NODE_ENV!=="production"&&isDom(U)&&U.nodeName.toUpperCase()!=="CANVAS"&&(!U.clientWidth&&(!H||H.width==null)||!U.clientHeight&&(!H||H.height==null))&&warn("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var X=new ECharts(U,G,H);return X.id="ec_"+idBase++,instances[X.id]=X,W&&setAttribute(U,DOM_ATTRIBUTE_KEY,X.id),enableConnect(X),lifecycle.trigger("afterinit",X),X}function getInstanceByDom(U){return instances[getAttribute(U,DOM_ATTRIBUTE_KEY)]}function registerTheme(U,G){themeStorage[U]=G}function registerPreprocessor(U){indexOf(optionPreprocessorFuncs,U)<0&&optionPreprocessorFuncs.push(U)}function registerProcessor(U,G){normalizeRegister(dataProcessorFuncs,U,G,PRIORITY_PROCESSOR_DEFAULT)}function registerPostInit(U){registerUpdateLifecycle("afterinit",U)}function registerPostUpdate(U){registerUpdateLifecycle("afterupdate",U)}function registerUpdateLifecycle(U,G){lifecycle.on(U,G)}function registerAction$1(U,G,H){var W,Z,X,K,Q;isFunction(G)&&(H=G,G=""),isObject$3(U)?(W=U.type,Z=U.event,K=U.update,Q=U.publishNonRefinedEvent,H||(H=U.action),X=U.refineEvent):(W=U,Z=G);function ee(re){return re.toLowerCase()}Z=ee(Z||W);var te=X?ee(W):Z;actions[W]||(assert(ACTION_REG.test(W)&&ACTION_REG.test(Z)),X&&assert(Z!==W),actions[W]={actionType:W,refinedEventType:Z,nonRefinedEventType:te,update:K,action:H,refineEvent:X},publicEventTypeMap[Z]=1,X&&Q&&(publicEventTypeMap[te]=1),process.env.NODE_ENV!=="production"&&connectionEventRevertMap[te]&&error(te+' must not be shared; use "refineEvent" if you intend to share an event name.'),connectionEventRevertMap[te]=W)}function registerCoordinateSystem(U,G){CoordinateSystemManager.register(U,G)}function registerLayout(U,G){normalizeRegister(visualFuncs,U,G,PRIORITY_VISUAL_LAYOUT,"layout")}function registerVisual(U,G){normalizeRegister(visualFuncs,U,G,PRIORITY_VISUAL_CHART,"visual")}var registeredTasks=[];function normalizeRegister(U,G,H,W,Z){if((isFunction(G)||isObject$3(G))&&(H=G,G=W),process.env.NODE_ENV!=="production"){if(isNaN(G)||G==null)throw new Error("Illegal priority");each$f(U,function(K){assert(K.__raw!==H)})}if(!(indexOf(registeredTasks,H)>=0)){registeredTasks.push(H);var X=Scheduler.wrapStageHandler(H,Z);X.__prio=G,X.__raw=H,U.push(X)}}function registerLoading(U,G){loadingEffects[U]=G}function registerMap$1(U,G,H){var W=getImpl("registerMap");W&&W(U,G,H)}var registerTransform=registerExternalTransform;registerVisual(PRIORITY_VISUAL_GLOBAL,seriesStyleTask),registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM,dataStyleTask),registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM,dataColorPaletteTask),registerVisual(PRIORITY_VISUAL_GLOBAL,seriesSymbolTask),registerVisual(PRIORITY_VISUAL_CHART_DATA_CUSTOM,dataSymbolTask),registerVisual(PRIORITY_VISUAL_DECAL,decalVisual),registerPreprocessor(globalBackwardCompat),registerProcessor(PRIORITY_PROCESSOR_DATASTACK,dataStack),registerLoading("default",defaultLoading),registerAction$1({type:HIGHLIGHT_ACTION_TYPE,event:HIGHLIGHT_ACTION_TYPE,update:HIGHLIGHT_ACTION_TYPE},noop),registerAction$1({type:DOWNPLAY_ACTION_TYPE,event:DOWNPLAY_ACTION_TYPE,update:DOWNPLAY_ACTION_TYPE},noop),registerAction$1({type:SELECT_ACTION_TYPE,event:SELECT_CHANGED_EVENT_TYPE,update:SELECT_ACTION_TYPE,action:noop,refineEvent:makeSelectChangedEvent,publishNonRefinedEvent:!0}),registerAction$1({type:UNSELECT_ACTION_TYPE,event:SELECT_CHANGED_EVENT_TYPE,update:UNSELECT_ACTION_TYPE,action:noop,refineEvent:makeSelectChangedEvent,publishNonRefinedEvent:!0}),registerAction$1({type:TOGGLE_SELECT_ACTION_TYPE,event:SELECT_CHANGED_EVENT_TYPE,update:TOGGLE_SELECT_ACTION_TYPE,action:noop,refineEvent:makeSelectChangedEvent,publishNonRefinedEvent:!0});function makeSelectChangedEvent(U,G,H,W){return{eventContent:{selected:getAllSelectedIndices(H),isFromClick:G.isFromClick||!1}}}registerTheme("default",{}),registerTheme("dark",theme);var extensions=[],extensionRegisters={registerPreprocessor,registerProcessor,registerPostInit,registerPostUpdate,registerUpdateLifecycle,registerAction:registerAction$1,registerCoordinateSystem,registerLayout,registerVisual,registerTransform,registerLoading,registerMap:registerMap$1,registerImpl,PRIORITY,ComponentModel,ComponentView,SeriesModel,ChartView,registerComponentModel:function(U){ComponentModel.registerClass(U)},registerComponentView:function(U){ComponentView.registerClass(U)},registerSeriesModel:function(U){SeriesModel.registerClass(U)},registerChartView:function(U){ChartView.registerClass(U)},registerCustomSeries:function(U,G){registerCustomSeries(U,G)},registerSubTypeDefaulter:function(U,G){ComponentModel.registerSubTypeDefaulter(U,G)},registerPainter:function(U,G){registerPainter(U,G)}};function use(U){if(isArray$1(U)){each$f(U,function(G){use(G)});return}indexOf(extensions,U)>=0||(extensions.push(U),isFunction(U)&&(U={install:U}),U.install(extensionRegisters))}function dataIndexMapValueLength(U){return U==null?0:U.length||1}function defaultKeyGetter(U){return U}var DataDiffer=(function(){function U(G,H,W,Z,X,K){this._old=G,this._new=H,this._oldKeyGetter=W||defaultKeyGetter,this._newKeyGetter=Z||defaultKeyGetter,this.context=X,this._diffModeMultiple=K==="multiple"}return U.prototype.add=function(G){return this._add=G,this},U.prototype.update=function(G){return this._update=G,this},U.prototype.updateManyToOne=function(G){return this._updateManyToOne=G,this},U.prototype.updateOneToMany=function(G){return this._updateOneToMany=G,this},U.prototype.updateManyToMany=function(G){return this._updateManyToMany=G,this},U.prototype.remove=function(G){return this._remove=G,this},U.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},U.prototype._executeOneToOne=function(){var G=this._old,H=this._new,W={},Z=new Array(G.length),X=new Array(H.length);this._initIndexMap(G,null,Z,"_oldKeyGetter"),this._initIndexMap(H,W,X,"_newKeyGetter");for(var K=0;K<G.length;K++){var Q=Z[K],ee=W[Q],te=dataIndexMapValueLength(ee);if(te>1){var re=ee.shift();ee.length===1&&(W[Q]=ee[0]),this._update&&this._update(re,K)}else te===1?(W[Q]=null,this._update&&this._update(ee,K)):this._remove&&this._remove(K)}this._performRestAdd(X,W)},U.prototype._executeMultiple=function(){var G=this._old,H=this._new,W={},Z={},X=[],K=[];this._initIndexMap(G,W,X,"_oldKeyGetter"),this._initIndexMap(H,Z,K,"_newKeyGetter");for(var Q=0;Q<X.length;Q++){var ee=X[Q],te=W[ee],re=Z[ee],ae=dataIndexMapValueLength(te),ne=dataIndexMapValueLength(re);if(ae>1&&ne===1)this._updateManyToOne&&this._updateManyToOne(re,te),Z[ee]=null;else if(ae===1&&ne>1)this._updateOneToMany&&this._updateOneToMany(re,te),Z[ee]=null;else if(ae===1&&ne===1)this._update&&this._update(re,te),Z[ee]=null;else if(ae>1&&ne>1)this._updateManyToMany&&this._updateManyToMany(re,te),Z[ee]=null;else if(ae>1)for(var ie=0;ie<ae;ie++)this._remove&&this._remove(te[ie]);else this._remove&&this._remove(te)}this._performRestAdd(K,Z)},U.prototype._performRestAdd=function(G,H){for(var W=0;W<G.length;W++){var Z=G[W],X=H[Z],K=dataIndexMapValueLength(X);if(K>1)for(var Q=0;Q<K;Q++)this._add&&this._add(X[Q]);else K===1&&this._add&&this._add(X);H[Z]=null}},U.prototype._initIndexMap=function(G,H,W,Z){for(var X=this._diffModeMultiple,K=0;K<G.length;K++){var Q="_ec_"+this[Z](G[K],K);if(X||(W[K]=Q),!!H){var ee=H[Q],te=dataIndexMapValueLength(ee);te===0?(H[Q]=K,X&&W.push(Q)):te===1?H[Q]=[ee,K]:ee.push(K)}}},U})(),DimensionUserOuput=(function(){function U(G,H){this._encode=G,this._schema=H}return U.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},U.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},U})();function summarizeDimensions(U,G){var H={},W=H.encode={},Z=createHashMap(),X=[],K=[],Q={};each$f(U.dimensions,function(ne){var ie=U.getDimensionInfo(ne),oe=ie.coordDim;if(oe){process.env.NODE_ENV!=="production"&&assert(VISUAL_DIMENSIONS.get(oe)==null);var se=ie.coordDimIndex;getOrCreateEncodeArr(W,oe)[se]=ne,ie.isExtraCoord||(Z.set(oe,1),mayLabelDimType(ie.type)&&(X[0]=ne),getOrCreateEncodeArr(Q,oe)[se]=U.getDimensionIndex(ie.name)),ie.defaultTooltip&&K.push(ne)}VISUAL_DIMENSIONS.each(function(le,ue){var ce=getOrCreateEncodeArr(W,ue),fe=ie.otherDims[ue];fe!=null&&fe!==!1&&(ce[fe]=ie.name)})});var ee=[],te={};Z.each(function(ne,ie){var oe=W[ie];te[ie]=oe[0],ee=ee.concat(oe)}),H.dataDimsOnCoord=ee,H.dataDimIndicesOnCoord=map$1(ee,function(ne){return U.getDimensionInfo(ne).storeDimIndex}),H.encodeFirstDimNotExtra=te;var re=W.label;re&&re.length&&(X=re.slice());var ae=W.tooltip;return ae&&ae.length?K=ae.slice():K.length||(K=X.slice()),W.defaultedLabel=X,W.defaultedTooltip=K,H.userOutput=new DimensionUserOuput(Q,G),H}function getOrCreateEncodeArr(U,G){return U.hasOwnProperty(G)||(U[G]=[]),U[G]}function getDimensionTypeByAxis(U){return U==="category"?"ordinal":U==="time"?"time":"float"}function mayLabelDimType(U){return!(U==="ordinal"||U==="time")}var SeriesDimensionDefine=(function(){function U(G){this.otherDims={},G!=null&&extend(this,G)}return U})(),inner$j=makeInner(),dimTypeShort={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},SeriesDataSchema=(function(){function U(G){this.dimensions=G.dimensions,this._dimOmitted=G.dimensionOmitted,this.source=G.source,this._fullDimCount=G.fullDimensionCount,this._updateDimOmitted(G.dimensionOmitted)}return U.prototype.isDimensionOmitted=function(){return this._dimOmitted},U.prototype._updateDimOmitted=function(G){this._dimOmitted=G,G&&(this._dimNameMap||(this._dimNameMap=ensureSourceDimNameMap(this.source)))},U.prototype.getSourceDimensionIndex=function(G){return retrieve2(this._dimNameMap.get(G),-1)},U.prototype.getSourceDimension=function(G){var H=this.source.dimensionsDefine;if(H)return H[G]},U.prototype.makeStoreSchema=function(){for(var G=this._fullDimCount,H=shouldRetrieveDataByName(this.source),W=!shouldOmitUnusedDimensions(G),Z="",X=[],K=0,Q=0;K<G;K++){var ee=void 0,te=void 0,re=void 0,ae=this.dimensions[Q];if(ae&&ae.storeDimIndex===K)ee=H?ae.name:null,te=ae.type,re=ae.ordinalMeta,Q++;else{var ne=this.getSourceDimension(K);ne&&(ee=H?ne.name:null,te=ne.type)}X.push({property:ee,type:te,ordinalMeta:re}),H&&ee!=null&&(!ae||!ae.isCalculationCoord)&&(Z+=W?ee.replace(/\`/g,"`1").replace(/\$/g,"`2"):ee),Z+="$",Z+=dimTypeShort[te]||"f",re&&(Z+=re.uid),Z+="$"}var ie=this.source,oe=[ie.seriesLayoutBy,ie.startIndex,Z].join("$$");return{dimensions:X,hash:oe}},U.prototype.makeOutputDimensionNames=function(){for(var G=[],H=0,W=0;H<this._fullDimCount;H++){var Z=void 0,X=this.dimensions[W];if(X&&X.storeDimIndex===H)X.isCalculationCoord||(Z=X.name),W++;else{var K=this.getSourceDimension(H);K&&(Z=K.name)}G.push(Z)}return G},U.prototype.appendCalculationDimension=function(G){this.dimensions.push(G),G.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},U})();function isSeriesDataSchema(U){return U instanceof SeriesDataSchema}function createDimNameMap(U){for(var G=createHashMap(),H=0;H<(U||[]).length;H++){var W=U[H],Z=isObject$3(W)?W.name:W;Z!=null&&G.get(Z)==null&&G.set(Z,H)}return G}function ensureSourceDimNameMap(U){var G=inner$j(U);return G.dimNameMap||(G.dimNameMap=createDimNameMap(U.dimensionsDefine))}function shouldOmitUnusedDimensions(U){return U>30}var isObject$1=isObject$3,map=map$1,CtorInt32Array=typeof Int32Array>"u"?Array:Int32Array,ID_PREFIX="e\0\0",INDEX_NOT_FOUND=-1,TRANSFERABLE_PROPERTIES=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],CLONE_PROPERTIES=["_approximateExtent"],prepareInvertedIndex,getId,getIdNameFromStore,normalizeDimensions,transferProperties,cloneListForMapAndSample,makeIdFromName,SeriesData=(function(){function U(G,H){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var W,Z=!1;isSeriesDataSchema(G)?(W=G.dimensions,this._dimOmitted=G.isDimensionOmitted(),this._schema=G):(Z=!0,W=G),W=W||["x","y"];for(var X={},K=[],Q={},ee=!1,te={},re=0;re<W.length;re++){var ae=W[re],ne=isString(ae)?new SeriesDimensionDefine({name:ae}):ae instanceof SeriesDimensionDefine?ae:new SeriesDimensionDefine(ae),ie=ne.name;ne.type=ne.type||"float",ne.coordDim||(ne.coordDim=ie,ne.coordDimIndex=0);var oe=ne.otherDims=ne.otherDims||{};K.push(ie),X[ie]=ne,te[ie]!=null&&(ee=!0),ne.createInvertedIndices&&(Q[ie]=[]);var se=re;isNumber(ne.storeDimIndex)&&(se=ne.storeDimIndex),oe.itemName===0&&(this._nameDimIdx=se),oe.itemId===0&&(this._idDimIdx=se),process.env.NODE_ENV!=="production"&&assert(Z||ne.storeDimIndex>=0),Z&&(ne.storeDimIndex=re)}if(this.dimensions=K,this._dimInfos=X,this._initGetDimensionInfo(ee),this.hostModel=H,this._invertedIndicesMap=Q,this._dimOmitted){var le=this._dimIdxToName=createHashMap();each$f(K,function(ue){le.set(X[ue].storeDimIndex,ue)})}}return U.prototype.getDimension=function(G){var H=this._recognizeDimIndex(G);if(H==null)return G;if(H=G,!this._dimOmitted)return this.dimensions[H];var W=this._dimIdxToName.get(H);if(W!=null)return W;var Z=this._schema.getSourceDimension(H);if(Z)return Z.name},U.prototype.getDimensionIndex=function(G){var H=this._recognizeDimIndex(G);if(H!=null)return H;if(G==null)return-1;var W=this._getDimInfo(G);return W?W.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(G):-1},U.prototype._recognizeDimIndex=function(G){if(isNumber(G)||G!=null&&!isNaN(G)&&!this._getDimInfo(G)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(G)<0))return+G},U.prototype._getStoreDimIndex=function(G){var H=this.getDimensionIndex(G);if(process.env.NODE_ENV!=="production"&&H==null)throw new Error("Unknown dimension "+G);return H},U.prototype.getDimensionInfo=function(G){return this._getDimInfo(this.getDimension(G))},U.prototype._initGetDimensionInfo=function(G){var H=this._dimInfos;this._getDimInfo=G?function(W){return H.hasOwnProperty(W)?H[W]:void 0}:function(W){return H[W]}},U.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},U.prototype.mapDimension=function(G,H){var W=this._dimSummary;if(H==null)return W.encodeFirstDimNotExtra[G];var Z=W.encode[G];return Z?Z[H]:null},U.prototype.mapDimensionsAll=function(G){var H=this._dimSummary,W=H.encode[G];return(W||[]).slice()},U.prototype.getStore=function(){return this._store},U.prototype.initData=function(G,H,W){var Z=this,X;if(G instanceof DataStore&&(X=G),!X){var K=this.dimensions,Q=isSourceInstance(G)||isArrayLike(G)?new DefaultDataProvider(G,K.length):G;X=new DataStore;var ee=map(K,function(te){return{type:Z._dimInfos[te].type,property:te}});X.initData(Q,ee,W)}this._store=X,this._nameList=(H||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,X.count()),this._dimSummary=summarizeDimensions(this,this._schema),this.userOutput=this._dimSummary.userOutput},U.prototype.appendData=function(G){var H=this._store.appendData(G);this._doInit(H[0],H[1])},U.prototype.appendValues=function(G,H){var W=this._store.appendValues(G,H&&H.length),Z=W.start,X=W.end,K=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),H)for(var Q=Z;Q<X;Q++){var ee=Q-Z;this._nameList[Q]=H[ee],K&&makeIdFromName(this,Q)}},U.prototype._updateOrdinalMeta=function(){for(var G=this._store,H=this.dimensions,W=0;W<H.length;W++){var Z=this._dimInfos[H[W]];Z.ordinalMeta&&G.collectOrdinalMeta(Z.storeDimIndex,Z.ordinalMeta)}},U.prototype._shouldMakeIdFromName=function(){var G=this._store.getProvider();return this._idDimIdx==null&&G.getSource().sourceFormat!==SOURCE_FORMAT_TYPED_ARRAY&&!G.fillStorage},U.prototype._doInit=function(G,H){if(!(G>=H)){var W=this._store,Z=W.getProvider();this._updateOrdinalMeta();var X=this._nameList,K=this._idList,Q=Z.getSource().sourceFormat,ee=Q===SOURCE_FORMAT_ORIGINAL;if(ee&&!Z.pure)for(var te=[],re=G;re<H;re++){var ae=Z.getItem(re,te);if(!this.hasItemOption&&isDataItemOption(ae)&&(this.hasItemOption=!0),ae){var ne=ae.name;X[re]==null&&ne!=null&&(X[re]=convertOptionIdName(ne,null));var ie=ae.id;K[re]==null&&ie!=null&&(K[re]=convertOptionIdName(ie,null))}}if(this._shouldMakeIdFromName())for(var re=G;re<H;re++)makeIdFromName(this,re);prepareInvertedIndex(this)}},U.prototype.getApproximateExtent=function(G){return this._approximateExtent[G]||this._store.getDataExtent(this._getStoreDimIndex(G))},U.prototype.setApproximateExtent=function(G,H){H=this.getDimension(H),this._approximateExtent[H]=G.slice()},U.prototype.getCalculationInfo=function(G){return this._calculationInfo[G]},U.prototype.setCalculationInfo=function(G,H){isObject$1(G)?extend(this._calculationInfo,G):this._calculationInfo[G]=H},U.prototype.getName=function(G){var H=this.getRawIndex(G),W=this._nameList[H];return W==null&&this._nameDimIdx!=null&&(W=getIdNameFromStore(this,this._nameDimIdx,H)),W==null&&(W=""),W},U.prototype._getCategory=function(G,H){var W=this._store.get(G,H),Z=this._store.getOrdinalMeta(G);return Z?Z.categories[W]:W},U.prototype.getId=function(G){return getId(this,this.getRawIndex(G))},U.prototype.count=function(){return this._store.count()},U.prototype.get=function(G,H){var W=this._store,Z=this._dimInfos[G];if(Z)return W.get(Z.storeDimIndex,H)},U.prototype.getByRawIndex=function(G,H){var W=this._store,Z=this._dimInfos[G];if(Z)return W.getByRawIndex(Z.storeDimIndex,H)},U.prototype.getIndices=function(){return this._store.getIndices()},U.prototype.getDataExtent=function(G){return this._store.getDataExtent(this._getStoreDimIndex(G))},U.prototype.getSum=function(G){return this._store.getSum(this._getStoreDimIndex(G))},U.prototype.getMedian=function(G){return this._store.getMedian(this._getStoreDimIndex(G))},U.prototype.getValues=function(G,H){var W=this,Z=this._store;return isArray$1(G)?Z.getValues(map(G,function(X){return W._getStoreDimIndex(X)}),H):Z.getValues(G)},U.prototype.hasValue=function(G){for(var H=this._dimSummary.dataDimIndicesOnCoord,W=0,Z=H.length;W<Z;W++)if(isNaN(this._store.get(H[W],G)))return!1;return!0},U.prototype.indexOfName=function(G){for(var H=0,W=this._store.count();H<W;H++)if(this.getName(H)===G)return H;return-1},U.prototype.getRawIndex=function(G){return this._store.getRawIndex(G)},U.prototype.indexOfRawIndex=function(G){return this._store.indexOfRawIndex(G)},U.prototype.rawIndexOf=function(G,H){var W=G&&this._invertedIndicesMap[G];if(process.env.NODE_ENV!=="production"&&!W)throw new Error("Do not supported yet");var Z=W&&W[H];return Z==null||isNaN(Z)?INDEX_NOT_FOUND:Z},U.prototype.each=function(G,H,W){isFunction(G)&&(W=H,H=G,G=[]);var Z=W||this,X=map(normalizeDimensions(G),this._getStoreDimIndex,this);this._store.each(X,Z?bind$1(H,Z):H)},U.prototype.filterSelf=function(G,H,W){isFunction(G)&&(W=H,H=G,G=[]);var Z=W||this,X=map(normalizeDimensions(G),this._getStoreDimIndex,this);return this._store=this._store.filter(X,Z?bind$1(H,Z):H),this},U.prototype.selectRange=function(G){var H=this,W={},Z=keys(G);return each$f(Z,function(X){var K=H._getStoreDimIndex(X);W[K]=G[X]}),this._store=this._store.selectRange(W),this},U.prototype.mapArray=function(G,H,W){isFunction(G)&&(W=H,H=G,G=[]),W=W||this;var Z=[];return this.each(G,function(){Z.push(H&&H.apply(this,arguments))},W),Z},U.prototype.map=function(G,H,W,Z){var X=W||Z||this,K=map(normalizeDimensions(G),this._getStoreDimIndex,this),Q=cloneListForMapAndSample(this);return Q._store=this._store.map(K,X?bind$1(H,X):H),Q},U.prototype.modify=function(G,H,W,Z){var X=this,K=W||Z||this;process.env.NODE_ENV!=="production"&&each$f(normalizeDimensions(G),function(ee){var te=X.getDimensionInfo(ee);te.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var Q=map(normalizeDimensions(G),this._getStoreDimIndex,this);this._store.modify(Q,K?bind$1(H,K):H)},U.prototype.downSample=function(G,H,W,Z){var X=cloneListForMapAndSample(this);return X._store=this._store.downSample(this._getStoreDimIndex(G),H,W,Z),X},U.prototype.minmaxDownSample=function(G,H){var W=cloneListForMapAndSample(this);return W._store=this._store.minmaxDownSample(this._getStoreDimIndex(G),H),W},U.prototype.lttbDownSample=function(G,H){var W=cloneListForMapAndSample(this);return W._store=this._store.lttbDownSample(this._getStoreDimIndex(G),H),W},U.prototype.getRawDataItem=function(G){return this._store.getRawDataItem(G)},U.prototype.getItemModel=function(G){var H=this.hostModel,W=this.getRawDataItem(G);return new Model(W,H,H&&H.ecModel)},U.prototype.diff=function(G){var H=this;return new DataDiffer(G?G.getStore().getIndices():[],this.getStore().getIndices(),function(W){return getId(G,W)},function(W){return getId(H,W)})},U.prototype.getVisual=function(G){var H=this._visual;return H&&H[G]},U.prototype.setVisual=function(G,H){this._visual=this._visual||{},isObject$1(G)?extend(this._visual,G):this._visual[G]=H},U.prototype.getItemVisual=function(G,H){var W=this._itemVisuals[G],Z=W&&W[H];return Z??this.getVisual(H)},U.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},U.prototype.ensureUniqueItemVisual=function(G,H){var W=this._itemVisuals,Z=W[G];Z||(Z=W[G]={});var X=Z[H];return X==null&&(X=this.getVisual(H),isArray$1(X)?X=X.slice():isObject$1(X)&&(X=extend({},X)),Z[H]=X),X},U.prototype.setItemVisual=function(G,H,W){var Z=this._itemVisuals[G]||{};this._itemVisuals[G]=Z,isObject$1(H)?extend(Z,H):Z[H]=W},U.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},U.prototype.setLayout=function(G,H){isObject$1(G)?extend(this._layout,G):this._layout[G]=H},U.prototype.getLayout=function(G){return this._layout[G]},U.prototype.getItemLayout=function(G){return this._itemLayouts[G]},U.prototype.setItemLayout=function(G,H,W){this._itemLayouts[G]=W?extend(this._itemLayouts[G]||{},H):H},U.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},U.prototype.setItemGraphicEl=function(G,H){var W=this.hostModel&&this.hostModel.seriesIndex;setCommonECData(W,this.dataType,G,H),this._graphicEls[G]=H},U.prototype.getItemGraphicEl=function(G){return this._graphicEls[G]},U.prototype.eachItemGraphicEl=function(G,H){each$f(this._graphicEls,function(W,Z){W&&G&&G.call(H,W,Z)})},U.prototype.cloneShallow=function(G){return G||(G=new U(this._schema?this._schema:map(this.dimensions,this._getDimInfo,this),this.hostModel)),transferProperties(G,this),G._store=this._store,G},U.prototype.wrapMethod=function(G,H){var W=this[G];isFunction(W)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(G),this[G]=function(){var Z=W.apply(this,arguments);return H.apply(this,[Z].concat(slice(arguments)))})},U.internalField=(function(){prepareInvertedIndex=function(G){var H=G._invertedIndicesMap;each$f(H,function(W,Z){var X=G._dimInfos[Z],K=X.ordinalMeta,Q=G._store;if(K){W=H[Z]=new CtorInt32Array(K.categories.length);for(var ee=0;ee<W.length;ee++)W[ee]=INDEX_NOT_FOUND;for(var ee=0;ee<Q.count();ee++)W[Q.get(X.storeDimIndex,ee)]=ee}})},getIdNameFromStore=function(G,H,W){return convertOptionIdName(G._getCategory(H,W),null)},getId=function(G,H){var W=G._idList[H];return W==null&&G._idDimIdx!=null&&(W=getIdNameFromStore(G,G._idDimIdx,H)),W==null&&(W=ID_PREFIX+H),W},normalizeDimensions=function(G){return isArray$1(G)||(G=G!=null?[G]:[]),G},cloneListForMapAndSample=function(G){var H=new U(G._schema?G._schema:map(G.dimensions,G._getDimInfo,G),G.hostModel);return transferProperties(H,G),H},transferProperties=function(G,H){each$f(TRANSFERABLE_PROPERTIES.concat(H.__wrappedMethods||[]),function(W){H.hasOwnProperty(W)&&(G[W]=H[W])}),G.__wrappedMethods=H.__wrappedMethods,each$f(CLONE_PROPERTIES,function(W){G[W]=clone$4(H[W])}),G._calculationInfo=extend({},H._calculationInfo)},makeIdFromName=function(G,H){var W=G._nameList,Z=G._idList,X=G._nameDimIdx,K=G._idDimIdx,Q=W[H],ee=Z[H];if(Q==null&&X!=null&&(W[H]=Q=getIdNameFromStore(G,X,H)),ee==null&&K!=null&&(Z[H]=ee=getIdNameFromStore(G,K,H)),ee==null&&Q!=null){var te=G._nameRepeatCount,re=te[Q]=(te[Q]||0)+1;ee=Q,re>1&&(ee+="__ec__"+re),Z[H]=ee}}})(),U})();function prepareSeriesDataSchema(U,G){isSourceInstance(U)||(U=createSourceFromSeriesDataOption(U)),G=G||{};var H=G.coordDimensions||[],W=G.dimensionsDefine||U.dimensionsDefine||[],Z=createHashMap(),X=[],K=getDimCount(U,H,W,G.dimensionsCount),Q=G.canOmitUnusedDimensions&&shouldOmitUnusedDimensions(K),ee=W===U.dimensionsDefine,te=ee?ensureSourceDimNameMap(U):createDimNameMap(W),re=G.encodeDefine;!re&&G.encodeDefaulter&&(re=G.encodeDefaulter(U,K));for(var ae=createHashMap(re),ne=new CtorInt32Array$1(K),ie=0;ie<ne.length;ie++)ne[ie]=-1;function oe(me){var ye=ne[me];if(ye<0){var _e=W[me],xe=isObject$3(_e)?_e:{name:_e},Se=new SeriesDimensionDefine,Te=xe.name;Te!=null&&te.get(Te)!=null&&(Se.name=Se.displayName=Te),xe.type!=null&&(Se.type=xe.type),xe.displayName!=null&&(Se.displayName=xe.displayName);var be=X.length;return ne[me]=be,Se.storeDimIndex=me,X.push(Se),Se}return X[ye]}if(!Q)for(var ie=0;ie<K;ie++)oe(ie);ae.each(function(me,ye){var _e=normalizeToArray(me).slice();if(_e.length===1&&!isString(_e[0])&&_e[0]<0){ae.set(ye,!1);return}var xe=ae.set(ye,[]);each$f(_e,function(Se,Te){var be=isString(Se)?te.get(Se):Se;be!=null&&be<K&&(xe[Te]=be,le(oe(be),ye,Te))})});var se=0;each$f(H,function(me){var ye,_e,xe,Se;if(isString(me))ye=me,Se={};else{Se=me,ye=Se.name;var Te=Se.ordinalMeta;Se.ordinalMeta=null,Se=extend({},Se),Se.ordinalMeta=Te,_e=Se.dimsDef,xe=Se.otherDims,Se.name=Se.coordDim=Se.coordDimIndex=Se.dimsDef=Se.otherDims=null}var be=ae.get(ye);if(be!==!1){if(be=normalizeToArray(be),!be.length)for(var Ae=0;Ae<(_e&&_e.length||1);Ae++){for(;se<K&&oe(se).coordDim!=null;)se++;se<K&&be.push(se++)}each$f(be,function(we,Ce){var Ee=oe(we);if(ee&&Se.type!=null&&(Ee.type=Se.type),le(defaults(Ee,Se),ye,Ce),Ee.name==null&&_e){var Me=_e[Ce];!isObject$3(Me)&&(Me={name:Me}),Ee.name=Ee.displayName=Me.name,Ee.defaultTooltip=Me.defaultTooltip}xe&&defaults(Ee.otherDims,xe)})}});function le(me,ye,_e){VISUAL_DIMENSIONS.get(ye)!=null?me.otherDims[ye]=_e:(me.coordDim=ye,me.coordDimIndex=_e,Z.set(ye,!0))}var ue=G.generateCoord,ce=G.generateCoordCount,fe=ce!=null;ce=ue?ce||1:0;var he=ue||"value";function ve(me){me.name==null&&(me.name=me.coordDim)}if(Q)each$f(X,function(me){ve(me)}),X.sort(function(me,ye){return me.storeDimIndex-ye.storeDimIndex});else for(var de=0;de<K;de++){var pe=oe(de),ge=pe.coordDim;ge==null&&(pe.coordDim=genCoordDimName(he,Z,fe),pe.coordDimIndex=0,(!ue||ce<=0)&&(pe.isExtraCoord=!0),ce--),ve(pe),pe.type==null&&(guessOrdinal(U,de)===BE_ORDINAL.Must||pe.isExtraCoord&&(pe.otherDims.itemName!=null||pe.otherDims.seriesName!=null))&&(pe.type="ordinal")}return removeDuplication(X),new SeriesDataSchema({source:U,dimensions:X,fullDimensionCount:K,dimensionOmitted:Q})}function removeDuplication(U){for(var G=createHashMap(),H=0;H<U.length;H++){var W=U[H],Z=W.name,X=G.get(Z)||0;X>0&&(W.name=Z+(X-1)),X++,G.set(Z,X)}}function getDimCount(U,G,H,W){var Z=Math.max(U.dimensionsDetectedCount||1,G.length,H.length,W||0);return each$f(G,function(X){var K;isObject$3(X)&&(K=X.dimsDef)&&(Z=Math.max(Z,K.length))}),Z}function genCoordDimName(U,G,H){if(H||G.hasKey(U)){for(var W=0;G.hasKey(U+W);)W++;U+=W}return G.set(U,!0),U}var CoordSysInfo=(function(){function U(G){this.coordSysDims=[],this.axisMap=createHashMap(),this.categoryAxisMap=createHashMap(),this.coordSysName=G}return U})();function getCoordSysInfoBySeries(U){var G=U.get("coordinateSystem"),H=new CoordSysInfo(G),W=fetchers[G];if(W)return W(U,H,H.axisMap,H.categoryAxisMap),H}var fetchers={cartesian2d:function(U,G,H,W){var Z=U.getReferringComponents("xAxis",SINGLE_REFERRING).models[0],X=U.getReferringComponents("yAxis",SINGLE_REFERRING).models[0];if(process.env.NODE_ENV!=="production"){if(!Z)throw new Error('xAxis "'+retrieve(U.get("xAxisIndex"),U.get("xAxisId"),0)+'" not found');if(!X)throw new Error('yAxis "'+retrieve(U.get("xAxisIndex"),U.get("yAxisId"),0)+'" not found')}G.coordSysDims=["x","y"],H.set("x",Z),H.set("y",X),isCategory(Z)&&(W.set("x",Z),G.firstCategoryDimIndex=0),isCategory(X)&&(W.set("y",X),G.firstCategoryDimIndex==null&&(G.firstCategoryDimIndex=1))},singleAxis:function(U,G,H,W){var Z=U.getReferringComponents("singleAxis",SINGLE_REFERRING).models[0];if(process.env.NODE_ENV!=="production"&&!Z)throw new Error("singleAxis should be specified.");G.coordSysDims=["single"],H.set("single",Z),isCategory(Z)&&(W.set("single",Z),G.firstCategoryDimIndex=0)},polar:function(U,G,H,W){var Z=U.getReferringComponents("polar",SINGLE_REFERRING).models[0],X=Z.findAxisModel("radiusAxis"),K=Z.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!K)throw new Error("angleAxis option not found");if(!X)throw new Error("radiusAxis option not found")}G.coordSysDims=["radius","angle"],H.set("radius",X),H.set("angle",K),isCategory(X)&&(W.set("radius",X),G.firstCategoryDimIndex=0),isCategory(K)&&(W.set("angle",K),G.firstCategoryDimIndex==null&&(G.firstCategoryDimIndex=1))},geo:function(U,G,H,W){G.coordSysDims=["lng","lat"]},parallel:function(U,G,H,W){var Z=U.ecModel,X=Z.getComponent("parallel",U.get("parallelIndex")),K=G.coordSysDims=X.dimensions.slice();each$f(X.parallelAxisIndex,function(Q,ee){var te=Z.getComponent("parallelAxis",Q),re=K[ee];H.set(re,te),isCategory(te)&&(W.set(re,te),G.firstCategoryDimIndex==null&&(G.firstCategoryDimIndex=ee))})},matrix:function(U,G,H,W){var Z=U.getReferringComponents("matrix",SINGLE_REFERRING).models[0];if(process.env.NODE_ENV!=="production"&&!Z)throw new Error("matrix coordinate system should be specified.");G.coordSysDims=["x","y"];var X=Z.getDimensionModel("x"),K=Z.getDimensionModel("y");H.set("x",X),H.set("y",K),W.set("x",X),W.set("y",K)}};function isCategory(U){return U.get("type")==="category"}function enableDataStack(U,G,H){H=H||{};var W=H.byIndex,Z=H.stackedCoordDimension,X,K,Q;isLegacyDimensionsInput(G)?X=G:(K=G.schema,X=K.dimensions,Q=G.store);var ee=!!(U&&U.get("stack")),te,re,ae,ne;if(each$f(X,function(ce,fe){isString(ce)&&(X[fe]=ce={name:ce}),ee&&!ce.isExtraCoord&&(!W&&!te&&ce.ordinalMeta&&(te=ce),!re&&ce.type!=="ordinal"&&ce.type!=="time"&&(!Z||Z===ce.coordDim)&&(re=ce))}),re&&!W&&!te&&(W=!0),re){ae="__\0ecstackresult_"+U.id,ne="__\0ecstackedover_"+U.id,te&&(te.createInvertedIndices=!0);var ie=re.coordDim,oe=re.type,se=0;each$f(X,function(ce){ce.coordDim===ie&&se++});var le={name:ae,coordDim:ie,coordDimIndex:se,type:oe,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:X.length},ue={name:ne,coordDim:ne,coordDimIndex:se+1,type:oe,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:X.length+1};K?(Q&&(le.storeDimIndex=Q.ensureCalculationDimension(ne,oe),ue.storeDimIndex=Q.ensureCalculationDimension(ae,oe)),K.appendCalculationDimension(le),K.appendCalculationDimension(ue)):(X.push(le),X.push(ue))}return{stackedDimension:re&&re.name,stackedByDimension:te&&te.name,isStackedByIndex:W,stackedOverDimension:ne,stackResultDimension:ae}}function isLegacyDimensionsInput(U){return!isSeriesDataSchema(U.schema)}function isDimensionStacked(U,G){return!!G&&G===U.getCalculationInfo("stackedDimension")}function getStackedDimension(U,G){return isDimensionStacked(U,G)?U.getCalculationInfo("stackResultDimension"):G}function getCoordSysDimDefs(U,G){var H=U.get("coordinateSystem"),W=CoordinateSystemManager.get(H),Z;return G&&G.coordSysDims&&(Z=map$1(G.coordSysDims,function(X){var K={name:X},Q=G.axisMap.get(X);if(Q){var ee=Q.get("type");K.type=getDimensionTypeByAxis(ee)}return K})),Z||(Z=W&&(W.getDimensionsInfo?W.getDimensionsInfo():W.dimensions.slice())||["x","y"]),Z}function injectOrdinalMeta(U,G,H){var W,Z;return H&&each$f(U,function(X,K){var Q=X.coordDim,ee=H.categoryAxisMap.get(Q);ee&&(W==null&&(W=K),X.ordinalMeta=ee.getOrdinalMeta(),G&&(X.createInvertedIndices=!0)),X.otherDims.itemName!=null&&(Z=!0)}),!Z&&W!=null&&(U[W].otherDims.itemName=0),W}function createSeriesData$1(U,G,H){H=H||{};var W=G.getSourceManager(),Z,X=!1;U?(X=!0,Z=createSourceFromSeriesDataOption(U)):(Z=W.getSource(),X=Z.sourceFormat===SOURCE_FORMAT_ORIGINAL);var K=getCoordSysInfoBySeries(G),Q=getCoordSysDimDefs(G,K),ee=H.useEncodeDefaulter,te=isFunction(ee)?ee:ee?curry$1(makeSeriesEncodeForAxisCoordSys,Q,G):null,re={coordDimensions:Q,generateCoord:H.generateCoord,encodeDefine:G.getEncode(),encodeDefaulter:te,canOmitUnusedDimensions:!X},ae=prepareSeriesDataSchema(Z,re),ne=injectOrdinalMeta(ae.dimensions,H.createInvertedIndices,K),ie=X?null:W.getSharedDataStore(ae),oe=enableDataStack(G,{schema:ae,store:ie}),se=new SeriesData(ae,G);se.setCalculationInfo(oe);var le=ne!=null&&isNeedCompleteOrdinalData(Z)?function(ue,ce,fe,he){return he===ne?fe:this.defaultDimValueGetter(ue,ce,fe,he)}:null;return se.hasItemOption=!1,se.initData(X?Z:ie,null,le),se}function isNeedCompleteOrdinalData(U){if(U.sourceFormat===SOURCE_FORMAT_ORIGINAL){var G=firstDataNotNull(U.data||[]);return!isArray$1(getDataItemValue(G))}}function firstDataNotNull(U){for(var G=0;G<U.length&&U[G]==null;)G++;return U[G]}function isValueNice(U){var G=Math.pow(10,quantityExponent(Math.abs(U))),H=Math.abs(U/G);return H===0||H===1||H===2||H===3||H===5}function isIntervalOrLogScale(U){return U.type==="interval"||U.type==="log"}function intervalScaleNiceTicks(U,G,H,W,Z){var X={},K=X.interval=nice(G/H);W!=null&&K<W&&(K=X.interval=W),Z!=null&&K>Z&&(K=X.interval=Z);var Q=X.intervalPrecision=getIntervalPrecision(K),ee=X.niceTickExtent=[round$4(Math.ceil(U[0]/K)*K,Q),round$4(Math.floor(U[1]/K)*K,Q)];return fixExtent(ee,U),X}function increaseInterval(U){var G=Math.pow(10,quantityExponent(U)),H=U/G;return H?H===2?H=3:H===3?H=5:H*=2:H=1,round$4(H*G)}function getIntervalPrecision(U){return getPrecision(U)+2}function clamp(U,G,H){U[G]=Math.max(Math.min(U[G],H[1]),H[0])}function fixExtent(U,G){!isFinite(U[0])&&(U[0]=G[0]),!isFinite(U[1])&&(U[1]=G[1]),clamp(U,0,G),clamp(U,1,G),U[0]>U[1]&&(U[0]=U[1])}function contain$1(U,G){return U>=G[0]&&U<=G[1]}var ScaleCalculator=(function(){function U(){this.normalize=normalize$2,this.scale=scale}return U.prototype.updateMethods=function(G){G.hasBreaks()?(this.normalize=bind$1(G.normalize,G),this.scale=bind$1(G.scale,G)):(this.normalize=normalize$2,this.scale=scale)},U})();function normalize$2(U,G){return G[1]===G[0]?.5:(U-G[0])/(G[1]-G[0])}function scale(U,G){return U*(G[1]-G[0])+G[0]}function logTransform(U,G,H){var W=Math.log(U);return[Math.log(H?G[0]:Math.max(0,G[0]))/W,Math.log(H?G[1]:Math.max(0,G[1]))/W]}var Scale=(function(){function U(G){this._calculator=new ScaleCalculator,this._setting=G||{},this._extent=[1/0,-1/0];var H=getScaleBreakHelper();H&&(this._brkCtx=H.createScaleBreakContext(),this._brkCtx.update(this._extent))}return U.prototype.getSetting=function(G){return this._setting[G]},U.prototype._innerUnionExtent=function(G){var H=this._extent;this._innerSetExtent(G[0]<H[0]?G[0]:H[0],G[1]>H[1]?G[1]:H[1])},U.prototype.unionExtentFromData=function(G,H){this._innerUnionExtent(G.getApproximateExtent(H))},U.prototype.getExtent=function(){return this._extent.slice()},U.prototype.setExtent=function(G,H){this._innerSetExtent(G,H)},U.prototype._innerSetExtent=function(G,H){var W=this._extent;isNaN(G)||(W[0]=G),isNaN(H)||(W[1]=H),this._brkCtx&&this._brkCtx.update(W)},U.prototype.setBreaksFromOption=function(G){var H=getScaleBreakHelper();H&&this._innerSetBreak(H.parseAxisBreakOption(G,bind$1(this.parse,this)))},U.prototype._innerSetBreak=function(G){this._brkCtx&&(this._brkCtx.setBreaks(G),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},U.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},U.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},U.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},U.prototype.isInExtentRange=function(G){return this._extent[0]<=G&&this._extent[1]>=G},U.prototype.isBlank=function(){return this._isBlank},U.prototype.setBlank=function(G){this._isBlank=G},U})();enableClassManagement(Scale);var uidBase=0,OrdinalMeta=(function(){function U(G){this.categories=G.categories||[],this._needCollect=G.needCollect,this._deduplication=G.deduplication,this.uid=++uidBase,this._onCollect=G.onCollect}return U.createByAxisModel=function(G){var H=G.option,W=H.data,Z=W&&map$1(W,getName);return new U({categories:Z,needCollect:!Z,deduplication:H.dedplication!==!1})},U.prototype.getOrdinal=function(G){return this._getOrCreateMap().get(G)},U.prototype.parseAndCollect=function(G){var H,W=this._needCollect;if(!isString(G)&&!W)return G;if(W&&!this._deduplication)return H=this.categories.length,this.categories[H]=G,this._onCollect&&this._onCollect(G,H),H;var Z=this._getOrCreateMap();return H=Z.get(G),H==null&&(W?(H=this.categories.length,this.categories[H]=G,Z.set(G,H),this._onCollect&&this._onCollect(G,H)):H=NaN),H},U.prototype._getOrCreateMap=function(){return this._map||(this._map=createHashMap(this.categories))},U})();function getName(U){return isObject$3(U)&&U.value!=null?U.value:U+""}var OrdinalScale=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;W.type="ordinal";var Z=W.getSetting("ordinalMeta");return Z||(Z=new OrdinalMeta({})),isArray$1(Z)&&(Z=new OrdinalMeta({categories:map$1(Z,function(X){return isObject$3(X)?X.value:X})})),W._ordinalMeta=Z,W._extent=W.getSetting("extent")||[0,Z.categories.length-1],W}return G.prototype.parse=function(H){return H==null?NaN:isString(H)?this._ordinalMeta.getOrdinal(H):Math.round(H)},G.prototype.contain=function(H){return contain$1(H,this._extent)&&H>=0&&H<this._ordinalMeta.categories.length},G.prototype.normalize=function(H){return H=this._getTickNumber(H),this._calculator.normalize(H,this._extent)},G.prototype.scale=function(H){return H=Math.round(this._calculator.scale(H,this._extent)),this.getRawOrdinalNumber(H)},G.prototype.getTicks=function(){for(var H=[],W=this._extent,Z=W[0];Z<=W[1];)H.push({value:Z}),Z++;return H},G.prototype.getMinorTicks=function(H){},G.prototype.setSortInfo=function(H){if(H==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var W=H.ordinalNumbers,Z=this._ordinalNumbersByTick=[],X=this._ticksByOrdinalNumber=[],K=0,Q=this._ordinalMeta.categories.length,ee=Math.min(Q,W.length);K<ee;++K){var te=W[K];Z[K]=te,X[te]=K}for(var re=0;K<Q;++K){for(;X[re]!=null;)re++;Z.push(re),X[re]=K}},G.prototype._getTickNumber=function(H){var W=this._ticksByOrdinalNumber;return W&&H>=0&&H<W.length?W[H]:H},G.prototype.getRawOrdinalNumber=function(H){var W=this._ordinalNumbersByTick;return W&&H>=0&&H<W.length?W[H]:H},G.prototype.getLabel=function(H){if(!this.isBlank()){var W=this.getRawOrdinalNumber(H.value),Z=this._ordinalMeta.categories[W];return Z==null?"":Z+""}},G.prototype.count=function(){return this._extent[1]-this._extent[0]+1},G.prototype.isInExtentRange=function(H){return H=this._getTickNumber(H),this._extent[0]<=H&&this._extent[1]>=H},G.prototype.getOrdinalMeta=function(){return this._ordinalMeta},G.prototype.calcNiceTicks=function(){},G.prototype.calcNiceExtent=function(){},G.type="ordinal",G})(Scale);Scale.registerClass(OrdinalScale);var roundNumber=round$4,IntervalScale=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type="interval",H._interval=0,H._intervalPrecision=2,H}return G.prototype.parse=function(H){return H==null||H===""?NaN:Number(H)},G.prototype.contain=function(H){return contain$1(H,this._extent)},G.prototype.normalize=function(H){return this._calculator.normalize(H,this._extent)},G.prototype.scale=function(H){return this._calculator.scale(H,this._extent)},G.prototype.getInterval=function(){return this._interval},G.prototype.setInterval=function(H){this._interval=H,this._niceExtent=this._extent.slice(),this._intervalPrecision=getIntervalPrecision(H)},G.prototype.getTicks=function(H){H=H||{};var W=this._interval,Z=this._extent,X=this._niceExtent,K=this._intervalPrecision,Q=getScaleBreakHelper(),ee=[];if(!W)return ee;if(H.breakTicks==="only_break"&&Q)return Q.addBreaksToTicks(ee,this._brkCtx.breaks,this._extent),ee;var te=1e4;Z[0]<X[0]&&(H.expandToNicedExtent?ee.push({value:roundNumber(X[0]-W,K)}):ee.push({value:Z[0]}));for(var re=function(oe,se){return Math.round((se-oe)/W)},ae=X[0];ae<=X[1];){if(ee.push({value:ae}),ae=roundNumber(ae+W,K),this._brkCtx){var ne=this._brkCtx.calcNiceTickMultiple(ae,re);ne>=0&&(ae=roundNumber(ae+ne*W,K))}if(ee.length>0&&ae===ee[ee.length-1].value)break;if(ee.length>te)return[]}var ie=ee.length?ee[ee.length-1].value:X[1];return Z[1]>ie&&(H.expandToNicedExtent?ee.push({value:roundNumber(ie+W,K)}):ee.push({value:Z[1]})),Q&&Q.pruneTicksByBreak(H.pruneByBreak,ee,this._brkCtx.breaks,function(oe){return oe.value},this._interval,this._extent),H.breakTicks!=="none"&&Q&&Q.addBreaksToTicks(ee,this._brkCtx.breaks,this._extent),ee},G.prototype.getMinorTicks=function(H){for(var W=this.getTicks({expandToNicedExtent:!0}),Z=[],X=this.getExtent(),K=1;K<W.length;K++){var Q=W[K],ee=W[K-1];if(!(ee.break||Q.break)){for(var te=0,re=[],ae=Q.value-ee.value,ne=ae/H,ie=getIntervalPrecision(ne);te<H-1;){var oe=roundNumber(ee.value+(te+1)*ne,ie);oe>X[0]&&oe<X[1]&&re.push(oe),te++}var se=getScaleBreakHelper();se&&se.pruneTicksByBreak("auto",re,this._getNonTransBreaks(),function(le){return le},this._interval,X),Z.push(re)}}return Z},G.prototype._getNonTransBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},G.prototype.getLabel=function(H,W){if(H==null)return"";var Z=W&&W.precision;Z==null?Z=getPrecision(H.value)||0:Z==="auto"&&(Z=this._intervalPrecision);var X=roundNumber(H.value,Z,!0);return addCommas(X)},G.prototype.calcNiceTicks=function(H,W,Z){H=H||5;var X=this._extent.slice(),K=this._getExtentSpanWithBreaks();if(isFinite(K)){K<0&&(K=-K,X.reverse(),this._innerSetExtent(X[0],X[1]),X=this._extent.slice());var Q=intervalScaleNiceTicks(X,K,H,W,Z);this._intervalPrecision=Q.intervalPrecision,this._interval=Q.interval,this._niceExtent=Q.niceTickExtent}},G.prototype.calcNiceExtent=function(H){var W=this._extent.slice();if(W[0]===W[1])if(W[0]!==0){var Z=Math.abs(W[0]);H.fixMax||(W[1]+=Z/2),W[0]-=Z/2}else W[1]=1;var X=W[1]-W[0];isFinite(X)||(W[0]=0,W[1]=1),this._innerSetExtent(W[0],W[1]),W=this._extent.slice(),this.calcNiceTicks(H.splitNumber,H.minInterval,H.maxInterval);var K=this._interval,Q=this._intervalPrecision;H.fixMin||(W[0]=roundNumber(Math.floor(W[0]/K)*K,Q)),H.fixMax||(W[1]=roundNumber(Math.ceil(W[1]/K)*K,Q)),this._innerSetExtent(W[0],W[1])},G.prototype.setNiceExtent=function(H,W){this._niceExtent=[H,W]},G.type="interval",G})(Scale);Scale.registerClass(IntervalScale);var supportFloat32Array=typeof Float32Array<"u",Float32ArrayCtor=supportFloat32Array?Float32Array:Array;function createFloat32Array(U){return isArray$1(U)?supportFloat32Array?new Float32Array(U):U:new Float32ArrayCtor(U)}var STACK_PREFIX="__ec_stack_";function getSeriesStackId$1(U){return U.get("stack")||STACK_PREFIX+U.seriesIndex}function getAxisKey$1(U){return U.dim+U.index}function getLayoutOnAxis(U){var G=[],H=U.axis,W="axis0";if(H.type==="category"){for(var Z=H.getBandWidth(),X=0;X<U.count;X++)G.push(defaults({bandWidth:Z,axisKey:W,stackId:STACK_PREFIX+X},U));for(var K=doCalBarWidthAndOffset(G),Q=[],X=0;X<U.count;X++){var ee=K[W][STACK_PREFIX+X];ee.offsetCenter=ee.offset+ee.width/2,Q.push(ee)}return Q}}function prepareLayoutBarSeries(U,G){var H=[];return G.eachSeriesByType(U,function(W){isOnCartesian(W)&&H.push(W)}),H}function getValueAxesMinGaps(U){var G={};each$f(U,function(ee){var te=ee.coordinateSystem,re=te.getBaseAxis();if(!(re.type!=="time"&&re.type!=="value"))for(var ae=ee.getData(),ne=re.dim+"_"+re.index,ie=ae.getDimensionIndex(ae.mapDimension(re.dim)),oe=ae.getStore(),se=0,le=oe.count();se<le;++se){var ue=oe.get(ie,se);G[ne]?G[ne].push(ue):G[ne]=[ue]}});var H={};for(var W in G)if(G.hasOwnProperty(W)){var Z=G[W];if(Z){Z.sort(function(ee,te){return ee-te});for(var X=null,K=1;K<Z.length;++K){var Q=Z[K]-Z[K-1];Q>0&&(X=X===null?Q:Math.min(X,Q))}H[W]=X}}return H}function makeColumnLayout(U){var G=getValueAxesMinGaps(U),H=[];return each$f(U,function(W){var Z=W.coordinateSystem,X=Z.getBaseAxis(),K=X.getExtent(),Q;if(X.type==="category")Q=X.getBandWidth();else if(X.type==="value"||X.type==="time"){var ee=X.dim+"_"+X.index,te=G[ee],re=Math.abs(K[1]-K[0]),ae=X.scale.getExtent(),ne=Math.abs(ae[1]-ae[0]);Q=te?re/ne*te:re}else{var ie=W.getData();Q=Math.abs(K[1]-K[0])/ie.count()}var oe=parsePercent(W.get("barWidth"),Q),se=parsePercent(W.get("barMaxWidth"),Q),le=parsePercent(W.get("barMinWidth")||(isInLargeMode(W)?.5:1),Q),ue=W.get("barGap"),ce=W.get("barCategoryGap"),fe=W.get("defaultBarGap");H.push({bandWidth:Q,barWidth:oe,barMaxWidth:se,barMinWidth:le,barGap:ue,barCategoryGap:ce,defaultBarGap:fe,axisKey:getAxisKey$1(X),stackId:getSeriesStackId$1(W)})}),doCalBarWidthAndOffset(H)}function doCalBarWidthAndOffset(U){var G={};each$f(U,function(W,Z){var X=W.axisKey,K=W.bandWidth,Q=G[X]||{bandWidth:K,remainedWidth:K,autoWidthCount:0,categoryGap:null,gap:W.defaultBarGap||0,stacks:{}},ee=Q.stacks;G[X]=Q;var te=W.stackId;ee[te]||Q.autoWidthCount++,ee[te]=ee[te]||{width:0,maxWidth:0};var re=W.barWidth;re&&!ee[te].width&&(ee[te].width=re,re=Math.min(Q.remainedWidth,re),Q.remainedWidth-=re);var ae=W.barMaxWidth;ae&&(ee[te].maxWidth=ae);var ne=W.barMinWidth;ne&&(ee[te].minWidth=ne);var ie=W.barGap;ie!=null&&(Q.gap=ie);var oe=W.barCategoryGap;oe!=null&&(Q.categoryGap=oe)});var H={};return each$f(G,function(W,Z){H[Z]={};var X=W.stacks,K=W.bandWidth,Q=W.categoryGap;if(Q==null){var ee=keys(X).length;Q=Math.max(35-ee*4,15)+"%"}var te=parsePercent(Q,K),re=parsePercent(W.gap,1),ae=W.remainedWidth,ne=W.autoWidthCount,ie=(ae-te)/(ne+(ne-1)*re);ie=Math.max(ie,0),each$f(X,function(ue){var ce=ue.maxWidth,fe=ue.minWidth;if(ue.width){var he=ue.width;ce&&(he=Math.min(he,ce)),fe&&(he=Math.max(he,fe)),ue.width=he,ae-=he+re*he,ne--}else{var he=ie;ce&&ce<he&&(he=Math.min(ce,ae)),fe&&fe>he&&(he=fe),he!==ie&&(ue.width=he,ae-=he+re*he,ne--)}}),ie=(ae-te)/(ne+(ne-1)*re),ie=Math.max(ie,0);var oe=0,se;each$f(X,function(ue,ce){ue.width||(ue.width=ie),se=ue,oe+=ue.width*(1+re)}),se&&(oe-=se.width*re);var le=-oe/2;each$f(X,function(ue,ce){H[Z][ce]=H[Z][ce]||{bandWidth:K,offset:le,width:ue.width},le+=ue.width*(1+re)})}),H}function retrieveColumnLayout(U,G,H){if(U&&G){var W=U[getAxisKey$1(G)];return W}}function layout$2(U,G){var H=prepareLayoutBarSeries(U,G),W=makeColumnLayout(H);each$f(H,function(Z){var X=Z.getData(),K=Z.coordinateSystem,Q=K.getBaseAxis(),ee=getSeriesStackId$1(Z),te=W[getAxisKey$1(Q)][ee],re=te.offset,ae=te.width;X.setLayout({bandWidth:te.bandWidth,offset:re,size:ae})})}function createProgressiveLayout(U){return{seriesType:U,plan:createRenderPlanner(),reset:function(G){if(isOnCartesian(G)){var H=G.getData(),W=G.coordinateSystem,Z=W.getBaseAxis(),X=W.getOtherAxis(Z),K=H.getDimensionIndex(H.mapDimension(X.dim)),Q=H.getDimensionIndex(H.mapDimension(Z.dim)),ee=G.get("showBackground",!0),te=H.mapDimension(X.dim),re=H.getCalculationInfo("stackResultDimension"),ae=isDimensionStacked(H,te)&&!!H.getCalculationInfo("stackedOnSeries"),ne=X.isHorizontal(),ie=getValueAxisStart(Z,X),oe=isInLargeMode(G),se=G.get("barMinHeight")||0,le=re&&H.getDimensionIndex(re),ue=H.getLayout("size"),ce=H.getLayout("offset");return{progress:function(fe,he){for(var ve=fe.count,de=oe&&createFloat32Array(ve*3),pe=oe&&ee&&createFloat32Array(ve*3),ge=oe&&createFloat32Array(ve),me=W.master.getRect(),ye=ne?me.width:me.height,_e,xe=he.getStore(),Se=0;(_e=fe.next())!=null;){var Te=xe.get(ae?le:K,_e),be=xe.get(Q,_e),Ae=ie,we=void 0;ae&&(we=+Te-xe.get(K,_e));var Ce=void 0,Ee=void 0,Me=void 0,De=void 0;if(ne){var Le=W.dataToPoint([Te,be]);if(ae){var Pe=W.dataToPoint([we,be]);Ae=Pe[0]}Ce=Ae,Ee=Le[1]+ce,Me=Le[0]-Ae,De=ue,Math.abs(Me)<se&&(Me=(Me<0?-1:1)*se)}else{var Le=W.dataToPoint([be,Te]);if(ae){var Pe=W.dataToPoint([be,we]);Ae=Pe[1]}Ce=Le[0]+ce,Ee=Ae,Me=ue,De=Le[1]-Ae,Math.abs(De)<se&&(De=(De<=0?-1:1)*se)}oe?(de[Se]=Ce,de[Se+1]=Ee,de[Se+2]=ne?Me:De,pe&&(pe[Se]=ne?me.x:Ce,pe[Se+1]=ne?Ee:me.y,pe[Se+2]=ye),ge[_e]=_e):he.setItemLayout(_e,{x:Ce,y:Ee,width:Me,height:De}),Se+=3}oe&&he.setLayout({largePoints:de,largeDataIndices:ge,largeBackgroundPoints:pe,valueAxisHorizontal:ne})}}}}}}function isOnCartesian(U){return U.coordinateSystem&&U.coordinateSystem.type==="cartesian2d"}function isInLargeMode(U){return U.pipelineContext&&U.pipelineContext.large}function getValueAxisStart(U,G){var H=G.model.get("startValue");return H||(H=0),G.toGlobalCoord(G.dataToCoord(G.type==="log"?H>0?H:1:H))}var bisect=function(U,G,H,W){for(;H<W;){var Z=H+W>>>1;U[Z][1]<G?H=Z+1:W=Z}return H},TimeScale=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="time",W}return G.prototype.getLabel=function(H){var W=this.getSetting("useUTC");return format(H.value,fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))]||fullLeveledFormatter.second,W,this.getSetting("locale"))},G.prototype.getFormattedLabel=function(H,W,Z){var X=this.getSetting("useUTC"),K=this.getSetting("locale");return leveledFormat(H,W,Z,K,X)},G.prototype.getTicks=function(H){H=H||{};var W=this._interval,Z=this._extent,X=getScaleBreakHelper(),K=[];if(!W)return K;var Q=this.getSetting("useUTC");if(X&&H.breakTicks==="only_break")return getScaleBreakHelper().addBreaksToTicks(K,this._brkCtx.breaks,this._extent),K;var ee=getUnitFromValue(Z[1],Q);K.push({value:Z[0],time:{level:0,upperTimeUnit:ee,lowerTimeUnit:ee}});var te=getIntervalTicks(this._minLevelUnit,this._approxInterval,Q,Z,this._getExtentSpanWithBreaks(),this._brkCtx);K=K.concat(te);var re=getUnitFromValue(Z[1],Q);K.push({value:Z[1],time:{level:0,upperTimeUnit:re,lowerTimeUnit:re}});var ae=this.getSetting("useUTC"),ne=primaryTimeUnits.length-1,ie=0;return each$f(K,function(oe){ne=Math.min(ne,indexOf(primaryTimeUnits,oe.time.upperTimeUnit)),ie=Math.max(ie,oe.time.level)}),X&&getScaleBreakHelper().pruneTicksByBreak(H.pruneByBreak,K,this._brkCtx.breaks,function(oe){return oe.value},this._approxInterval,this._extent),X&&H.breakTicks!=="none"&&getScaleBreakHelper().addBreaksToTicks(K,this._brkCtx.breaks,this._extent,function(oe){for(var se=Math.max(indexOf(primaryTimeUnits,getUnitFromValue(oe.vmin,ae)),indexOf(primaryTimeUnits,getUnitFromValue(oe.vmax,ae))),le=0,ue=0;ue<primaryTimeUnits.length;ue++)if(!isPrimaryUnitValueAndGreaterSame(primaryTimeUnits[ue],oe.vmin,oe.vmax,ae)){le=ue;break}var ce=Math.min(le,ne),fe=Math.max(ce,se);return{level:ie,lowerTimeUnit:primaryTimeUnits[fe],upperTimeUnit:primaryTimeUnits[ce]}}),K},G.prototype.calcNiceExtent=function(H){var W=this.getExtent();if(W[0]===W[1]&&(W[0]-=ONE_DAY,W[1]+=ONE_DAY),W[1]===-1/0&&W[0]===1/0){var Z=new Date;W[1]=+new Date(Z.getFullYear(),Z.getMonth(),Z.getDate()),W[0]=W[1]-ONE_DAY}this._innerSetExtent(W[0],W[1]),this.calcNiceTicks(H.splitNumber,H.minInterval,H.maxInterval)},G.prototype.calcNiceTicks=function(H,W,Z){H=H||10;var X=this._getExtentSpanWithBreaks();this._approxInterval=X/H,W!=null&&this._approxInterval<W&&(this._approxInterval=W),Z!=null&&this._approxInterval>Z&&(this._approxInterval=Z);var K=scaleIntervals.length,Q=Math.min(bisect(scaleIntervals,this._approxInterval,0,K),K-1);this._interval=scaleIntervals[Q][1],this._intervalPrecision=getIntervalPrecision(this._interval),this._minLevelUnit=scaleIntervals[Math.max(Q-1,0)][0]},G.prototype.parse=function(H){return isNumber(H)?H:+parseDate(H)},G.prototype.contain=function(H){return contain$1(H,this._extent)},G.prototype.normalize=function(H){return this._calculator.normalize(H,this._extent)},G.prototype.scale=function(H){return this._calculator.scale(H,this._extent)},G.type="time",G})(IntervalScale),scaleIntervals=[["second",ONE_SECOND],["minute",ONE_MINUTE],["hour",ONE_HOUR],["quarter-day",ONE_HOUR*6],["half-day",ONE_HOUR*12],["day",ONE_DAY*1.2],["half-week",ONE_DAY*3.5],["week",ONE_DAY*7],["month",ONE_DAY*31],["quarter",ONE_DAY*95],["half-year",ONE_YEAR/2],["year",ONE_YEAR]];function isPrimaryUnitValueAndGreaterSame(U,G,H,W){return roundTime(new Date(G),U,W).getTime()===roundTime(new Date(H),U,W).getTime()}function getDateInterval(U,G){return U/=ONE_DAY,U>16?16:U>7.5?7:U>3.5?4:U>1.5?2:1}function getMonthInterval(U){var G=30*ONE_DAY;return U/=G,U>6?6:U>3?3:U>2?2:1}function getHourInterval(U){return U/=ONE_HOUR,U>12?12:U>6?6:U>3.5?4:U>2?2:1}function getMinutesAndSecondsInterval(U,G){return U/=G?ONE_MINUTE:ONE_SECOND,U>30?30:U>20?20:U>15?15:U>10?10:U>5?5:U>2?2:1}function getMillisecondsInterval(U){return nice(U)}function getFirstTimestampOfUnit(U,G,H){var W=Math.max(0,indexOf(primaryTimeUnits,G)-1);return roundTime(new Date(U),primaryTimeUnits[W],H).getTime()}function createEstimateNiceMultiple(U,G){var H=new Date(0);H[U](1);var W=H.getTime();H[U](1+G);var Z=H.getTime()-W;return function(X,K){return Math.max(0,Math.round((K-X)/Z))}}function getIntervalTicks(U,G,H,W,Z,X){var K=1e4,Q=timeUnits,ee=0;function te(Se,Te,be,Ae,we,Ce,Ee){for(var Me=createEstimateNiceMultiple(we,Se),De=Te,Le=new Date(De);De<be&&De<=W[1];){if(Ee.push({value:De}),ee++>K){process.env.NODE_ENV!=="production"&&warn("Exceed safe limit in time scale.");break}if(Le[we](Le[Ae]()+Se),De=Le.getTime(),X){var Pe=X.calcNiceTickMultiple(De,Me);Pe>0&&(Le[we](Le[Ae]()+Pe*Se),De=Le.getTime())}}Ee.push({value:De,notAdd:!0})}function re(Se,Te,be){var Ae=[],we=!Te.length;if(!isPrimaryUnitValueAndGreaterSame(getPrimaryTimeUnit(Se),W[0],W[1],H)){we&&(Te=[{value:getFirstTimestampOfUnit(W[0],Se,H)},{value:W[1]}]);for(var Ce=0;Ce<Te.length-1;Ce++){var Ee=Te[Ce].value,Me=Te[Ce+1].value;if(Ee!==Me){var De=void 0,Le=void 0,Pe=void 0,Ie=!1;switch(Se){case"year":De=Math.max(1,Math.round(G/ONE_DAY/365)),Le=fullYearGetterName(H),Pe=fullYearSetterName(H);break;case"half-year":case"quarter":case"month":De=getMonthInterval(G),Le=monthGetterName(H),Pe=monthSetterName(H);break;case"week":case"half-week":case"day":De=getDateInterval(G),Le=dateGetterName(H),Pe=dateSetterName(H),Ie=!0;break;case"half-day":case"quarter-day":case"hour":De=getHourInterval(G),Le=hoursGetterName(H),Pe=hoursSetterName(H);break;case"minute":De=getMinutesAndSecondsInterval(G,!0),Le=minutesGetterName(H),Pe=minutesSetterName(H);break;case"second":De=getMinutesAndSecondsInterval(G,!1),Le=secondsGetterName(H),Pe=secondsSetterName(H);break;case"millisecond":De=getMillisecondsInterval(G),Le=millisecondsGetterName(H),Pe=millisecondsSetterName(H);break}Me>=W[0]&&Ee<=W[1]&&te(De,Ee,Me,Le,Pe,Ie,Ae),Se==="year"&&be.length>1&&Ce===0&&be.unshift({value:be[0].value-De})}}for(var Ce=0;Ce<Ae.length;Ce++)be.push(Ae[Ce])}}for(var ae=[],ne=[],ie=0,oe=0,se=0;se<Q.length;++se){var le=getPrimaryTimeUnit(Q[se]);if(isPrimaryTimeUnit(Q[se])){re(Q[se],ae[ae.length-1]||[],ne);var ue=Q[se+1]?getPrimaryTimeUnit(Q[se+1]):null;if(le!==ue){if(ne.length){oe=ie,ne.sort(function(Se,Te){return Se.value-Te.value});for(var ce=[],fe=0;fe<ne.length;++fe){var he=ne[fe].value;(fe===0||ne[fe-1].value!==he)&&(ce.push(ne[fe]),he>=W[0]&&he<=W[1]&&ie++)}var ve=Z/G;if(ie>ve*1.5&&oe>ve/1.5||(ae.push(ce),ie>ve||U===Q[se]))break}ne=[]}}}for(var de=filter(map$1(ae,function(Se){return filter(Se,function(Te){return Te.value>=W[0]&&Te.value<=W[1]&&!Te.notAdd})}),function(Se){return Se.length>0}),pe=[],ge=de.length-1,se=0;se<de.length;++se)for(var me=de[se],ye=0;ye<me.length;++ye){var _e=getUnitFromValue(me[ye].value,H);pe.push({value:me[ye].value,time:{level:ge-se,upperTimeUnit:_e,lowerTimeUnit:_e}})}pe.sort(function(Se,Te){return Se.value-Te.value});for(var xe=[],se=0;se<pe.length;++se)(se===0||pe[se].value!==pe[se-1].value)&&xe.push(pe[se]);return xe}Scale.registerClass(TimeScale);var fixRound=round$4,mathFloor$1=Math.floor,mathCeil$1=Math.ceil,mathPow$1=Math.pow,mathLog=Math.log,LogScale=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type="log",H.base=10,H._originalScale=new IntervalScale,H}return G.prototype.getTicks=function(H){H=H||{};var W=this._extent.slice(),Z=this._originalScale.getExtent(),X=U.prototype.getTicks.call(this,H),K=this.base,Q=this._originalScale._innerGetBreaks(),ee=getScaleBreakHelper();return map$1(X,function(te){var re=te.value,ae=null,ne=mathPow$1(K,re);re===W[0]&&this._fixMin?ae=Z[0]:re===W[1]&&this._fixMax&&(ae=Z[1]);var ie;if(ee){var oe=ee.getTicksLogTransformBreak(te,K,Q,fixRoundingError);ie=oe.vBreak,ae==null&&(ae=oe.brkRoundingCriterion)}return ae!=null&&(ne=fixRoundingError(ne,ae)),{value:ne,break:ie}},this)},G.prototype._getNonTransBreaks=function(){return this._originalScale._innerGetBreaks()},G.prototype.setExtent=function(H,W){this._originalScale.setExtent(H,W);var Z=logTransform(this.base,[H,W]);U.prototype.setExtent.call(this,Z[0],Z[1])},G.prototype.getExtent=function(){var H=this.base,W=U.prototype.getExtent.call(this);W[0]=mathPow$1(H,W[0]),W[1]=mathPow$1(H,W[1]);var Z=this._originalScale.getExtent();return this._fixMin&&(W[0]=fixRoundingError(W[0],Z[0])),this._fixMax&&(W[1]=fixRoundingError(W[1],Z[1])),W},G.prototype.unionExtentFromData=function(H,W){this._originalScale.unionExtentFromData(H,W);var Z=logTransform(this.base,H.getApproximateExtent(W),!0);this._innerUnionExtent(Z)},G.prototype.calcNiceTicks=function(H){H=H||10;var W=this._extent.slice(),Z=this._getExtentSpanWithBreaks();if(!(!isFinite(Z)||Z<=0)){var X=quantity(Z),K=H/Z*X;for(K<=.5&&(X*=10);!isNaN(X)&&Math.abs(X)<1&&Math.abs(X)>0;)X*=10;var Q=[fixRound(mathCeil$1(W[0]/X)*X),fixRound(mathFloor$1(W[1]/X)*X)];this._interval=X,this._intervalPrecision=getIntervalPrecision(X),this._niceExtent=Q}},G.prototype.calcNiceExtent=function(H){U.prototype.calcNiceExtent.call(this,H),this._fixMin=H.fixMin,this._fixMax=H.fixMax},G.prototype.contain=function(H){return H=mathLog(H)/mathLog(this.base),U.prototype.contain.call(this,H)},G.prototype.normalize=function(H){return H=mathLog(H)/mathLog(this.base),U.prototype.normalize.call(this,H)},G.prototype.scale=function(H){return H=U.prototype.scale.call(this,H),mathPow$1(this.base,H)},G.prototype.setBreaksFromOption=function(H){var W=getScaleBreakHelper();if(W){var Z=W.logarithmicParseBreaksFromOption(H,this.base,bind$1(this.parse,this)),X=Z.parsedOriginal,K=Z.parsedLogged;this._originalScale._innerSetBreak(X),this._innerSetBreak(K)}},G.type="log",G})(IntervalScale);function fixRoundingError(U,G){return fixRound(U,getPrecision(G))}Scale.registerClass(LogScale);var ScaleRawExtentInfo=(function(){function U(G,H,W){this._prepareParams(G,H,W)}return U.prototype._prepareParams=function(G,H,W){W[1]<W[0]&&(W=[NaN,NaN]),this._dataMin=W[0],this._dataMax=W[1];var Z=this._isOrdinal=G.type==="ordinal";this._needCrossZero=G.type==="interval"&&H.getNeedCrossZero&&H.getNeedCrossZero();var X=H.get("min",!0);X==null&&(X=H.get("startValue",!0));var K=this._modelMinRaw=X;isFunction(K)?this._modelMinNum=parseAxisModelMinMax(G,K({min:W[0],max:W[1]})):K!=="dataMin"&&(this._modelMinNum=parseAxisModelMinMax(G,K));var Q=this._modelMaxRaw=H.get("max",!0);if(isFunction(Q)?this._modelMaxNum=parseAxisModelMinMax(G,Q({min:W[0],max:W[1]})):Q!=="dataMax"&&(this._modelMaxNum=parseAxisModelMinMax(G,Q)),Z)this._axisDataLen=H.getCategories().length;else{var ee=H.get("boundaryGap"),te=isArray$1(ee)?ee:[ee||0,ee||0];typeof te[0]=="boolean"||typeof te[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[parsePercent$1(te[0],1),parsePercent$1(te[1],1)]}},U.prototype.calculate=function(){var G=this._isOrdinal,H=this._dataMin,W=this._dataMax,Z=this._axisDataLen,X=this._boundaryGapInner,K=G?null:W-H||Math.abs(H),Q=this._modelMinRaw==="dataMin"?H:this._modelMinNum,ee=this._modelMaxRaw==="dataMax"?W:this._modelMaxNum,te=Q!=null,re=ee!=null;Q==null&&(Q=G?Z?0:NaN:H-X[0]*K),ee==null&&(ee=G?Z?Z-1:NaN:W+X[1]*K),(Q==null||!isFinite(Q))&&(Q=NaN),(ee==null||!isFinite(ee))&&(ee=NaN);var ae=eqNaN(Q)||eqNaN(ee)||G&&!Z;this._needCrossZero&&(Q>0&&ee>0&&!te&&(Q=0),Q<0&&ee<0&&!re&&(ee=0));var ne=this._determinedMin,ie=this._determinedMax;return ne!=null&&(Q=ne,te=!0),ie!=null&&(ee=ie,re=!0),{min:Q,max:ee,minFixed:te,maxFixed:re,isBlank:ae}},U.prototype.modifyDataMinMax=function(G,H){process.env.NODE_ENV!=="production"&&assert(!this.frozen),this[DATA_MIN_MAX_ATTR[G]]=H},U.prototype.setDeterminedMinMax=function(G,H){var W=DETERMINED_MIN_MAX_ATTR[G];process.env.NODE_ENV!=="production"&&assert(!this.frozen&&this[W]==null),this[W]=H},U.prototype.freeze=function(){this.frozen=!0},U})(),DETERMINED_MIN_MAX_ATTR={min:"_determinedMin",max:"_determinedMax"},DATA_MIN_MAX_ATTR={min:"_dataMin",max:"_dataMax"};function ensureScaleRawExtentInfo(U,G,H){var W=U.rawExtentInfo;return W||(W=new ScaleRawExtentInfo(U,G,H),U.rawExtentInfo=W,W)}function parseAxisModelMinMax(U,G){return G==null?null:eqNaN(G)?NaN:U.parse(G)}function getScaleExtent(U,G){var H=U.type,W=ensureScaleRawExtentInfo(U,G,U.getExtent()).calculate();U.setBlank(W.isBlank);var Z=W.min,X=W.max,K=G.ecModel;if(K&&H==="time"){var Q=prepareLayoutBarSeries("bar",K),ee=!1;if(each$f(Q,function(ae){ee=ee||ae.getBaseAxis()===G.axis}),ee){var te=makeColumnLayout(Q),re=adjustScaleForOverflow(Z,X,G,te);Z=re.min,X=re.max}}return{extent:[Z,X],fixMin:W.minFixed,fixMax:W.maxFixed}}function adjustScaleForOverflow(U,G,H,W){var Z=H.axis.getExtent(),X=Math.abs(Z[1]-Z[0]),K=retrieveColumnLayout(W,H.axis);if(K===void 0)return{min:U,max:G};var Q=1/0;each$f(K,function(ie){Q=Math.min(ie.offset,Q)});var ee=-1/0;each$f(K,function(ie){ee=Math.max(ie.offset+ie.width,ee)}),Q=Math.abs(Q),ee=Math.abs(ee);var te=Q+ee,re=G-U,ae=1-(Q+ee)/X,ne=re/ae-re;return G+=ne*(ee/te),U-=ne*(Q/te),{min:U,max:G}}function niceScaleExtent(U,G){var H=G,W=getScaleExtent(U,H),Z=W.extent,X=H.get("splitNumber");U instanceof LogScale&&(U.base=H.get("logBase"));var K=U.type,Q=H.get("interval"),ee=K==="interval"||K==="time";U.setBreaksFromOption(retrieveAxisBreaksOption(H)),U.setExtent(Z[0],Z[1]),U.calcNiceExtent({splitNumber:X,fixMin:W.fixMin,fixMax:W.fixMax,minInterval:ee?H.get("minInterval"):null,maxInterval:ee?H.get("maxInterval"):null}),Q!=null&&U.setInterval&&U.setInterval(Q)}function createScaleByModel$1(U,G){if(G=G||U.get("type"),G)switch(G){case"category":return new OrdinalScale({ordinalMeta:U.getOrdinalMeta?U.getOrdinalMeta():U.getCategories(),extent:[1/0,-1/0]});case"time":return new TimeScale({locale:U.ecModel.getLocaleModel(),useUTC:U.ecModel.get("useUTC")});default:return new(Scale.getClass(G)||IntervalScale)}}function ifAxisCrossZero(U){var G=U.scale.getExtent(),H=G[0],W=G[1];return!(H>0&&W>0||H<0&&W<0)}function makeLabelFormatter(U){var G=U.getLabelModel().get("formatter");if(U.type==="time"){var H=parseTimeAxisLabelFormatter(G);return function(Z,X){return U.scale.getFormattedLabel(Z,X,H)}}else{if(isString(G))return function(Z){var X=U.scale.getLabel(Z),K=G.replace("{value}",X??"");return K};if(isFunction(G)){if(U.type==="category")return function(Z,X){return G(getAxisRawValue(U,Z),Z.value-U.scale.getExtent()[0],null)};var W=getScaleBreakHelper();return function(Z,X){var K=null;return W&&(K=W.makeAxisLabelFormatterParamBreak(K,Z.break)),G(getAxisRawValue(U,Z),X,K)}}else return function(Z){return U.scale.getLabel(Z)}}}function getAxisRawValue(U,G){return U.type==="category"?U.scale.getLabel(G):G.value}function getOptionCategoryInterval(U){var G=U.get("interval");return G??"auto"}function shouldShowAllLabels(U){return U.type==="category"&&getOptionCategoryInterval(U.getLabelModel())===0}function getDataDimensionsOnAxis(U,G){var H={};return each$f(U.mapDimensionsAll(G),function(W){H[getStackedDimension(U,W)]=!0}),keys(H)}function unionAxisExtentFromData(U,G,H){G&&each$f(getDataDimensionsOnAxis(G,H),function(W){var Z=G.getApproximateExtent(W);Z[0]<U[0]&&(U[0]=Z[0]),Z[1]>U[1]&&(U[1]=Z[1])})}function isNameLocationCenter(U){return U==="middle"||U==="center"}function shouldAxisShow(U){return U.getShallow("show")}function retrieveAxisBreaksOption(U){var G=U.get("breaks",!0);if(G!=null){if(!getScaleBreakHelper()){process.env.NODE_ENV!=="production"&&error('Must `import {AxisBreak} from "echarts/features.js"; use(AxisBreak);` first if using breaks option.');return}if(!isSupportAxisBreak(U.axis)){process.env.NODE_ENV!=="production"&&error("Axis '"+U.axis.dim+"'-'"+U.axis.type+"' does not support break.");return}return G}}function isSupportAxisBreak(U){return(U.dim==="x"||U.dim==="y"||U.dim==="z"||U.dim==="single")&&U.type!=="category"}var AxisModelCommonMixin=(function(){function U(){}return U.prototype.getNeedCrossZero=function(){var G=this.option;return!G.scale},U.prototype.getCoordSysModel=function(){},U})(),EPSILON=1e-8;function isAroundEqual(U,G){return Math.abs(U-G)<EPSILON}function contain(U,G,H){var W=0,Z=U[0];if(!Z)return!1;for(var X=1;X<U.length;X++){var K=U[X];W+=windingLine(Z[0],Z[1],K[0],K[1],G,H),Z=K}var Q=U[0];return(!isAroundEqual(Z[0],Q[0])||!isAroundEqual(Z[1],Q[1]))&&(W+=windingLine(Z[0],Z[1],Q[0],Q[1],G,H)),W!==0}var TMP_TRANSFORM=[];function transformPoints(U,G){for(var H=0;H<U.length;H++)applyTransform$1(U[H],U[H],G)}function updateBBoxFromPoints(U,G,H,W){for(var Z=0;Z<U.length;Z++){var X=U[Z];W&&(X=W.project(X)),X&&isFinite(X[0])&&isFinite(X[1])&&(min$1(G,G,X),max$1(H,H,X))}}function centroid$1(U){for(var G=0,H=0,W=0,Z=U.length,X=U[Z-1][0],K=U[Z-1][1],Q=0;Q<Z;Q++){var ee=U[Q][0],te=U[Q][1],re=X*te-ee*K;G+=re,H+=(X+ee)*re,W+=(K+te)*re,X=ee,K=te}return G?[H/G/3,W/G/3,G]:[U[0][0]||0,U[0][1]||0]}var Region=(function(){function U(G){this.name=G}return U.prototype.setCenter=function(G){this._center=G},U.prototype.getCenter=function(){var G=this._center;return G||(G=this._center=this.calcCenter()),G},U})(),GeoJSONPolygonGeometry=(function(){function U(G,H){this.type="polygon",this.exterior=G,this.interiors=H}return U})(),GeoJSONLineStringGeometry=(function(){function U(G){this.type="linestring",this.points=G}return U})(),GeoJSONRegion=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this,H)||this;return X.type="geoJSON",X.geometries=W,X._center=Z&&[Z[0],Z[1]],X}return G.prototype.calcCenter=function(){for(var H=this.geometries,W,Z=0,X=0;X<H.length;X++){var K=H[X],Q=K.exterior,ee=Q&&Q.length;ee>Z&&(W=K,Z=ee)}if(W)return centroid$1(W.exterior);var te=this.getBoundingRect();return[te.x+te.width/2,te.y+te.height/2]},G.prototype.getBoundingRect=function(H){var W=this._rect;if(W&&!H)return W;var Z=[1/0,1/0],X=[-1/0,-1/0],K=this.geometries;return each$f(K,function(Q){Q.type==="polygon"?updateBBoxFromPoints(Q.exterior,Z,X,H):each$f(Q.points,function(ee){updateBBoxFromPoints(ee,Z,X,H)})}),isFinite(Z[0])&&isFinite(Z[1])&&isFinite(X[0])&&isFinite(X[1])||(Z[0]=Z[1]=X[0]=X[1]=0),W=new BoundingRect(Z[0],Z[1],X[0]-Z[0],X[1]-Z[1]),H||(this._rect=W),W},G.prototype.contain=function(H){var W=this.getBoundingRect(),Z=this.geometries;if(!W.contain(H[0],H[1]))return!1;e:for(var X=0,K=Z.length;X<K;X++){var Q=Z[X];if(Q.type==="polygon"){var ee=Q.exterior,te=Q.interiors;if(contain(ee,H[0],H[1])){for(var re=0;re<(te?te.length:0);re++)if(contain(te[re],H[0],H[1]))continue e;return!0}}}return!1},G.prototype.transformTo=function(H,W,Z,X){var K=this.getBoundingRect(),Q=K.width/K.height;Z?X||(X=Z/Q):Z=Q*X;for(var ee=new BoundingRect(H,W,Z,X),te=K.calculateTransform(ee),re=this.geometries,ae=0;ae<re.length;ae++){var ne=re[ae];ne.type==="polygon"?(transformPoints(ne.exterior,te),each$f(ne.interiors,function(ie){transformPoints(ie,te)})):each$f(ne.points,function(ie){transformPoints(ie,te)})}K=this._rect,K.copy(ee),this._center=[K.x+K.width/2,K.y+K.height/2]},G.prototype.cloneShallow=function(H){H==null&&(H=this.name);var W=new G(H,this.geometries,this._center);return W._rect=this._rect,W.transformTo=null,W},G})(Region),GeoSVGRegion=(function(U){__extends(G,U);function G(H,W){var Z=U.call(this,H)||this;return Z.type="geoSVG",Z._elOnlyForCalculate=W,Z}return G.prototype.calcCenter=function(){for(var H=this._elOnlyForCalculate,W=H.getBoundingRect(),Z=[W.x+W.width/2,W.y+W.height/2],X=identity(TMP_TRANSFORM),K=H;K&&!K.isGeoSVGGraphicRoot;)mul(X,K.getLocalTransform(),X),K=K.parent;return invert(X,X),applyTransform$1(Z,Z,X),Z},G})(Region);function decode(U){if(!U.UTF8Encoding)return U;var G=U,H=G.UTF8Scale;H==null&&(H=1024);var W=G.features;return each$f(W,function(Z){var X=Z.geometry,K=X.encodeOffsets,Q=X.coordinates;if(K)switch(X.type){case"LineString":X.coordinates=decodeRing(Q,K,H);break;case"Polygon":decodeRings(Q,K,H);break;case"MultiLineString":decodeRings(Q,K,H);break;case"MultiPolygon":each$f(Q,function(ee,te){return decodeRings(ee,K[te],H)})}}),G.UTF8Encoding=!1,G}function decodeRings(U,G,H){for(var W=0;W<U.length;W++)U[W]=decodeRing(U[W],G[W],H)}function decodeRing(U,G,H){for(var W=[],Z=G[0],X=G[1],K=0;K<U.length;K+=2){var Q=U.charCodeAt(K)-64,ee=U.charCodeAt(K+1)-64;Q=Q>>1^-(Q&1),ee=ee>>1^-(ee&1),Q+=Z,ee+=X,Z=Q,X=ee,W.push([Q/H,ee/H])}return W}function parseGeoJSON(U,G){return U=decode(U),map$1(filter(U.features,function(H){return H.geometry&&H.properties&&H.geometry.coordinates.length>0}),function(H){var W=H.properties,Z=H.geometry,X=[];switch(Z.type){case"Polygon":var K=Z.coordinates;X.push(new GeoJSONPolygonGeometry(K[0],K.slice(1)));break;case"MultiPolygon":each$f(Z.coordinates,function(ee){ee[0]&&X.push(new GeoJSONPolygonGeometry(ee[0],ee.slice(1)))});break;case"LineString":X.push(new GeoJSONLineStringGeometry([Z.coordinates]));break;case"MultiLineString":X.push(new GeoJSONLineStringGeometry(Z.coordinates))}var Q=new GeoJSONRegion(W[G||"name"],X,W.cp);return Q.properties=W,Q})}var modelInner=makeInner(),axisInner=makeInner(),AxisTickLabelComputingKind={estimate:1,determine:2};function createAxisLabelsComputingContext(U){return{out:{noPxChangeTryDetermine:[]},kind:U}}function tickValuesToNumbers(U,G){var H=map$1(G,function(W){return U.scale.parse(W)});return U.type==="time"&&H.length>0&&(H.sort(),H.unshift(H[0]),H.push(H[H.length-1])),H}function createAxisLabels(U,G){var H=U.getLabelModel().get("customValues");if(H){var W=makeLabelFormatter(U),Z=U.scale.getExtent(),X=tickValuesToNumbers(U,H),K=filter(X,function(Q){return Q>=Z[0]&&Q<=Z[1]});return{labels:map$1(K,function(Q){var ee={value:Q};return{formattedLabel:W(ee),rawLabel:U.scale.getLabel(ee),tickValue:Q,time:void 0,break:void 0}})}}return U.type==="category"?makeCategoryLabels(U,G):makeRealNumberLabels(U)}function createAxisTicks(U,G,H){var W=U.getTickModel().get("customValues");if(W){var Z=U.scale.getExtent(),X=tickValuesToNumbers(U,W);return{ticks:filter(X,function(K){return K>=Z[0]&&K<=Z[1]})}}return U.type==="category"?makeCategoryTicks(U,G):{ticks:map$1(U.scale.getTicks(H),function(K){return K.value})}}function makeCategoryLabels(U,G){var H=U.getLabelModel(),W=makeCategoryLabelsActually(U,H,G);return!H.get("show")||U.scale.isBlank()?{labels:[]}:W}function makeCategoryLabelsActually(U,G,H){var W=ensureCategoryLabelCache(U),Z=getOptionCategoryInterval(G),X=H.kind===AxisTickLabelComputingKind.estimate;if(!X){var K=axisCacheGet(W,Z);if(K)return K}var Q,ee;isFunction(Z)?Q=makeLabelsByCustomizedCategoryInterval(U,Z):(ee=Z==="auto"?makeAutoCategoryInterval(U,H):Z,Q=makeLabelsByNumericCategoryInterval(U,ee));var te={labels:Q,labelCategoryInterval:ee};return X?H.out.noPxChangeTryDetermine.push(function(){return axisCacheSet(W,Z,te),!0}):axisCacheSet(W,Z,te),te}function makeCategoryTicks(U,G){var H=ensureCategoryTickCache(U),W=getOptionCategoryInterval(G),Z=axisCacheGet(H,W);if(Z)return Z;var X,K;if((!G.get("show")||U.scale.isBlank())&&(X=[]),isFunction(W))X=makeLabelsByCustomizedCategoryInterval(U,W,!0);else if(W==="auto"){var Q=makeCategoryLabelsActually(U,U.getLabelModel(),createAxisLabelsComputingContext(AxisTickLabelComputingKind.determine));K=Q.labelCategoryInterval,X=map$1(Q.labels,function(ee){return ee.tickValue})}else K=W,X=makeLabelsByNumericCategoryInterval(U,K,!0);return axisCacheSet(H,W,{ticks:X,tickCategoryInterval:K})}function makeRealNumberLabels(U){var G=U.scale.getTicks(),H=makeLabelFormatter(U);return{labels:map$1(G,function(W,Z){return{formattedLabel:H(W,Z),rawLabel:U.scale.getLabel(W),tickValue:W.value,time:W.time,break:W.break}})}}var ensureCategoryTickCache=initAxisCacheMethod("axisTick"),ensureCategoryLabelCache=initAxisCacheMethod("axisLabel");function initAxisCacheMethod(U){return function(H){return axisInner(H)[U]||(axisInner(H)[U]={list:[]})}}function axisCacheGet(U,G){for(var H=0;H<U.list.length;H++)if(U.list[H].key===G)return U.list[H].value}function axisCacheSet(U,G,H){return U.list.push({key:G,value:H}),H}function makeAutoCategoryInterval(U,G){if(G.kind===AxisTickLabelComputingKind.estimate){var H=U.calculateCategoryInterval(G);return G.out.noPxChangeTryDetermine.push(function(){return axisInner(U).autoInterval=H,!0}),H}var W=axisInner(U).autoInterval;return W??(axisInner(U).autoInterval=U.calculateCategoryInterval(G))}function calculateCategoryInterval(U,G){var H=G.kind,W=fetchAutoCategoryIntervalCalculationParams(U),Z=makeLabelFormatter(U),X=(W.axisRotate-W.labelRotate)/180*Math.PI,K=U.scale,Q=K.getExtent(),ee=K.count();if(Q[1]-Q[0]<1)return 0;var te=1,re=40;ee>re&&(te=Math.max(1,Math.floor(ee/re)));for(var ae=Q[0],ne=U.dataToCoord(ae+1)-U.dataToCoord(ae),ie=Math.abs(ne*Math.cos(X)),oe=Math.abs(ne*Math.sin(X)),se=0,le=0;ae<=Q[1];ae+=te){var ue=0,ce=0,fe=getBoundingRect(Z({value:ae}),W.font,"center","top");ue=fe.width*1.3,ce=fe.height*1.3,se=Math.max(se,ue,7),le=Math.max(le,ce,7)}var he=se/ie,ve=le/oe;isNaN(he)&&(he=1/0),isNaN(ve)&&(ve=1/0);var de=Math.max(0,Math.floor(Math.min(he,ve)));if(H===AxisTickLabelComputingKind.estimate)return G.out.noPxChangeTryDetermine.push(bind$1(calculateCategoryIntervalTryDetermine,null,U,de,ee)),de;var pe=calculateCategoryIntervalDealCache(U,de,ee);return pe??de}function calculateCategoryIntervalTryDetermine(U,G,H){return calculateCategoryIntervalDealCache(U,G,H)==null}function calculateCategoryIntervalDealCache(U,G,H){var W=modelInner(U.model),Z=U.getExtent(),X=W.lastAutoInterval,K=W.lastTickCount;if(X!=null&&K!=null&&Math.abs(X-G)<=1&&Math.abs(K-H)<=1&&X>G&&W.axisExtent0===Z[0]&&W.axisExtent1===Z[1])return X;W.lastTickCount=H,W.lastAutoInterval=G,W.axisExtent0=Z[0],W.axisExtent1=Z[1]}function fetchAutoCategoryIntervalCalculationParams(U){var G=U.getLabelModel();return{axisRotate:U.getRotate?U.getRotate():U.isHorizontal&&!U.isHorizontal()?90:0,labelRotate:G.get("rotate")||0,font:G.getFont()}}function makeLabelsByNumericCategoryInterval(U,G,H){var W=makeLabelFormatter(U),Z=U.scale,X=Z.getExtent(),K=U.getLabelModel(),Q=[],ee=Math.max((G||0)+1,1),te=X[0],re=Z.count();te!==0&&ee>1&&re/ee>2&&(te=Math.round(Math.ceil(te/ee)*ee));var ae=shouldShowAllLabels(U),ne=K.get("showMinLabel")||ae,ie=K.get("showMaxLabel")||ae;ne&&te!==X[0]&&se(X[0]);for(var oe=te;oe<=X[1];oe+=ee)se(oe);ie&&oe-ee!==X[1]&&se(X[1]);function se(le){var ue={value:le};Q.push(H?le:{formattedLabel:W(ue),rawLabel:Z.getLabel(ue),tickValue:le,time:void 0,break:void 0})}return Q}function makeLabelsByCustomizedCategoryInterval(U,G,H){var W=U.scale,Z=makeLabelFormatter(U),X=[];return each$f(W.getTicks(),function(K){var Q=W.getLabel(K),ee=K.value;G(K.value,Q)&&X.push(H?ee:{formattedLabel:Z(K),rawLabel:Q,tickValue:ee,time:void 0,break:void 0})}),X}var NORMALIZED_EXTENT=[0,1],Axis=(function(){function U(G,H,W){this.onBand=!1,this.inverse=!1,this.dim=G,this.scale=H,this._extent=W||[0,0]}return U.prototype.contain=function(G){var H=this._extent,W=Math.min(H[0],H[1]),Z=Math.max(H[0],H[1]);return G>=W&&G<=Z},U.prototype.containData=function(G){return this.scale.contain(this.scale.parse(G))},U.prototype.getExtent=function(){return this._extent.slice()},U.prototype.getPixelPrecision=function(G){return getPixelPrecision(G||this.scale.getExtent(),this._extent)},U.prototype.setExtent=function(G,H){var W=this._extent;W[0]=G,W[1]=H},U.prototype.dataToCoord=function(G,H){var W=this._extent,Z=this.scale;return G=Z.normalize(Z.parse(G)),this.onBand&&Z.type==="ordinal"&&(W=W.slice(),fixExtentWithBands(W,Z.count())),linearMap$2(G,NORMALIZED_EXTENT,W,H)},U.prototype.coordToData=function(G,H){var W=this._extent,Z=this.scale;this.onBand&&Z.type==="ordinal"&&(W=W.slice(),fixExtentWithBands(W,Z.count()));var X=linearMap$2(G,W,NORMALIZED_EXTENT,H);return this.scale.scale(X)},U.prototype.pointToData=function(G,H){},U.prototype.getTicksCoords=function(G){G=G||{};var H=G.tickModel||this.getTickModel(),W=createAxisTicks(this,H,{breakTicks:G.breakTicks,pruneByBreak:G.pruneByBreak}),Z=W.ticks,X=map$1(Z,function(Q){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(Q):Q),tickValue:Q}},this),K=H.get("alignWithLabel");return fixOnBandTicksCoords(this,X,K,G.clamp),X},U.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var G=this.model.getModel("minorTick"),H=G.get("splitNumber");H>0&&H<100||(H=5);var W=this.scale.getMinorTicks(H),Z=map$1(W,function(X){return map$1(X,function(K){return{coord:this.dataToCoord(K),tickValue:K}},this)},this);return Z},U.prototype.getViewLabels=function(G){return G=G||createAxisLabelsComputingContext(AxisTickLabelComputingKind.determine),createAxisLabels(this,G).labels},U.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},U.prototype.getTickModel=function(){return this.model.getModel("axisTick")},U.prototype.getBandWidth=function(){var G=this._extent,H=this.scale.getExtent(),W=H[1]-H[0]+(this.onBand?1:0);W===0&&(W=1);var Z=Math.abs(G[1]-G[0]);return Math.abs(Z)/W},U.prototype.calculateCategoryInterval=function(G){return G=G||createAxisLabelsComputingContext(AxisTickLabelComputingKind.determine),calculateCategoryInterval(this,G)},U})();function fixExtentWithBands(U,G){var H=U[1]-U[0],W=G,Z=H/W/2;U[0]+=Z,U[1]-=Z}function fixOnBandTicksCoords(U,G,H,W){var Z=G.length;if(!U.onBand||H||!Z)return;var X=U.getExtent(),K,Q;if(Z===1)G[0].coord=X[0],G[0].onBand=!0,K=G[1]={coord:X[1],tickValue:G[0].tickValue,onBand:!0};else{var ee=G[Z-1].tickValue-G[0].tickValue,te=(G[Z-1].coord-G[0].coord)/ee;each$f(G,function(ie){ie.coord-=te/2,ie.onBand=!0});var re=U.scale.getExtent();Q=1+re[1]-G[Z-1].tickValue,K={coord:G[Z-1].coord+te*Q,tickValue:re[1]+1,onBand:!0},G.push(K)}var ae=X[0]>X[1];ne(G[0].coord,X[0])&&(W?G[0].coord=X[0]:G.shift()),W&&ne(X[0],G[0].coord)&&G.unshift({coord:X[0],onBand:!0}),ne(X[1],K.coord)&&(W?K.coord=X[1]:G.pop()),W&&ne(K.coord,X[1])&&G.push({coord:X[1],onBand:!0});function ne(ie,oe){return ie=round$4(ie),oe=round$4(oe),ae?ie>oe:ie<oe}}var PI2$2=Math.PI*2,CMD$1=PathProxy.CMD,DEFAULT_SEARCH_SPACE=["top","right","bottom","left"];function getCandidateAnchor(U,G,H,W,Z){var X=H.width,K=H.height;switch(U){case"top":W.set(H.x+X/2,H.y-G),Z.set(0,-1);break;case"bottom":W.set(H.x+X/2,H.y+K+G),Z.set(0,1);break;case"left":W.set(H.x-G,H.y+K/2),Z.set(-1,0);break;case"right":W.set(H.x+X+G,H.y+K/2),Z.set(1,0);break}}function projectPointToArc(U,G,H,W,Z,X,K,Q,ee){K-=U,Q-=G;var te=Math.sqrt(K*K+Q*Q);K/=te,Q/=te;var re=K*H+U,ae=Q*H+G;if(Math.abs(W-Z)%PI2$2<1e-4)return ee[0]=re,ee[1]=ae,te-H;if(X){var ne=W;W=normalizeRadian(Z),Z=normalizeRadian(ne)}else W=normalizeRadian(W),Z=normalizeRadian(Z);W>Z&&(Z+=PI2$2);var ie=Math.atan2(Q,K);if(ie<0&&(ie+=PI2$2),ie>=W&&ie<=Z||ie+PI2$2>=W&&ie+PI2$2<=Z)return ee[0]=re,ee[1]=ae,te-H;var oe=H*Math.cos(W)+U,se=H*Math.sin(W)+G,le=H*Math.cos(Z)+U,ue=H*Math.sin(Z)+G,ce=(oe-K)*(oe-K)+(se-Q)*(se-Q),fe=(le-K)*(le-K)+(ue-Q)*(ue-Q);return ce<fe?(ee[0]=oe,ee[1]=se,Math.sqrt(ce)):(ee[0]=le,ee[1]=ue,Math.sqrt(fe))}function projectPointToLine(U,G,H,W,Z,X,K,Q){var ee=Z-U,te=X-G,re=H-U,ae=W-G,ne=Math.sqrt(re*re+ae*ae);re/=ne,ae/=ne;var ie=ee*re+te*ae,oe=ie/ne;Q&&(oe=Math.min(Math.max(oe,0),1)),oe*=ne;var se=K[0]=U+oe*re,le=K[1]=G+oe*ae;return Math.sqrt((se-Z)*(se-Z)+(le-X)*(le-X))}function projectPointToRect(U,G,H,W,Z,X,K){H<0&&(U=U+H,H=-H),W<0&&(G=G+W,W=-W);var Q=U+H,ee=G+W,te=K[0]=Math.min(Math.max(Z,U),Q),re=K[1]=Math.min(Math.max(X,G),ee);return Math.sqrt((te-Z)*(te-Z)+(re-X)*(re-X))}var tmpPt=[];function nearestPointOnRect(U,G,H){var W=projectPointToRect(G.x,G.y,G.width,G.height,U.x,U.y,tmpPt);return H.set(tmpPt[0],tmpPt[1]),W}function nearestPointOnPath(U,G,H){for(var W=0,Z=0,X=0,K=0,Q,ee,te=1/0,re=G.data,ae=U.x,ne=U.y,ie=0;ie<re.length;){var oe=re[ie++];ie===1&&(W=re[ie],Z=re[ie+1],X=W,K=Z);var se=te;switch(oe){case CMD$1.M:X=re[ie++],K=re[ie++],W=X,Z=K;break;case CMD$1.L:se=projectPointToLine(W,Z,re[ie],re[ie+1],ae,ne,tmpPt,!0),W=re[ie++],Z=re[ie++];break;case CMD$1.C:se=cubicProjectPoint(W,Z,re[ie++],re[ie++],re[ie++],re[ie++],re[ie],re[ie+1],ae,ne,tmpPt),W=re[ie++],Z=re[ie++];break;case CMD$1.Q:se=quadraticProjectPoint(W,Z,re[ie++],re[ie++],re[ie],re[ie+1],ae,ne,tmpPt),W=re[ie++],Z=re[ie++];break;case CMD$1.A:var le=re[ie++],ue=re[ie++],ce=re[ie++],fe=re[ie++],he=re[ie++],ve=re[ie++];ie+=1;var de=!!(1-re[ie++]);Q=Math.cos(he)*ce+le,ee=Math.sin(he)*fe+ue,ie<=1&&(X=Q,K=ee);var pe=(ae-le)*fe/ce+le;se=projectPointToArc(le,ue,fe,he,he+ve,de,pe,ne,tmpPt),W=Math.cos(he+ve)*ce+le,Z=Math.sin(he+ve)*fe+ue;break;case CMD$1.R:X=W=re[ie++],K=Z=re[ie++];var ge=re[ie++],me=re[ie++];se=projectPointToRect(X,K,ge,me,ae,ne,tmpPt);break;case CMD$1.Z:se=projectPointToLine(W,Z,X,K,ae,ne,tmpPt,!0),W=X,Z=K;break}se<te&&(te=se,H.set(tmpPt[0],tmpPt[1]))}return te}var pt0=new Point,pt1=new Point,pt2=new Point,dir=new Point,dir2=new Point;function updateLabelLinePoints(U,G){if(U){var H=U.getTextGuideLine(),W=U.getTextContent();if(W&&H){var Z=U.textGuideLineConfig||{},X=[[0,0],[0,0],[0,0]],K=Z.candidates||DEFAULT_SEARCH_SPACE,Q=W.getBoundingRect().clone();Q.applyTransform(W.getComputedTransform());var ee=1/0,te=Z.anchor,re=U.getComputedTransform(),ae=re&&invert([],re),ne=G.get("length2")||0;te&&pt2.copy(te);for(var ie=0;ie<K.length;ie++){var oe=K[ie];getCandidateAnchor(oe,0,Q,pt0,dir),Point.scaleAndAdd(pt1,pt0,dir,ne),pt1.transform(ae);var se=U.getBoundingRect(),le=te?te.distance(pt1):U instanceof Path?nearestPointOnPath(pt1,U.path,pt2):nearestPointOnRect(pt1,se,pt2);le<ee&&(ee=le,pt1.transform(re),pt2.transform(re),pt2.toArray(X[0]),pt1.toArray(X[1]),pt0.toArray(X[2]))}limitTurnAngle(X,G.get("minTurnAngle")),H.setShape({points:X})}}}var tmpArr=[],tmpProjPoint=new Point;function limitTurnAngle(U,G){if(G<=180&&G>0){G=G/180*Math.PI,pt0.fromArray(U[0]),pt1.fromArray(U[1]),pt2.fromArray(U[2]),Point.sub(dir,pt0,pt1),Point.sub(dir2,pt2,pt1);var H=dir.len(),W=dir2.len();if(!(H<.001||W<.001)){dir.scale(1/H),dir2.scale(1/W);var Z=dir.dot(dir2),X=Math.cos(G);if(X<Z){var K=projectPointToLine(pt1.x,pt1.y,pt2.x,pt2.y,pt0.x,pt0.y,tmpArr,!1);tmpProjPoint.fromArray(tmpArr),tmpProjPoint.scaleAndAdd(dir2,K/Math.tan(Math.PI-G));var Q=pt2.x!==pt1.x?(tmpProjPoint.x-pt1.x)/(pt2.x-pt1.x):(tmpProjPoint.y-pt1.y)/(pt2.y-pt1.y);if(isNaN(Q))return;Q<0?Point.copy(tmpProjPoint,pt1):Q>1&&Point.copy(tmpProjPoint,pt2),tmpProjPoint.toArray(U[1])}}}}function limitSurfaceAngle(U,G,H){if(H<=180&&H>0){H=H/180*Math.PI,pt0.fromArray(U[0]),pt1.fromArray(U[1]),pt2.fromArray(U[2]),Point.sub(dir,pt1,pt0),Point.sub(dir2,pt2,pt1);var W=dir.len(),Z=dir2.len();if(!(W<.001||Z<.001)){dir.scale(1/W),dir2.scale(1/Z);var X=dir.dot(G),K=Math.cos(H);if(X<K){var Q=projectPointToLine(pt1.x,pt1.y,pt2.x,pt2.y,pt0.x,pt0.y,tmpArr,!1);tmpProjPoint.fromArray(tmpArr);var ee=Math.PI/2,te=Math.acos(dir2.dot(G)),re=ee+te-H;if(re>=ee)Point.copy(tmpProjPoint,pt2);else{tmpProjPoint.scaleAndAdd(dir2,Q/Math.tan(Math.PI/2-re));var ae=pt2.x!==pt1.x?(tmpProjPoint.x-pt1.x)/(pt2.x-pt1.x):(tmpProjPoint.y-pt1.y)/(pt2.y-pt1.y);if(isNaN(ae))return;ae<0?Point.copy(tmpProjPoint,pt1):ae>1&&Point.copy(tmpProjPoint,pt2)}tmpProjPoint.toArray(U[1])}}}}function setLabelLineState(U,G,H,W){var Z=H==="normal",X=Z?U:U.ensureState(H);X.ignore=G;var K=W.get("smooth");K&&K===!0&&(K=.3),X.shape=X.shape||{},K>0&&(X.shape.smooth=K);var Q=W.getModel("lineStyle").getLineStyle();Z?U.useStyle(Q):X.style=Q}function buildLabelLinePath(U,G){var H=G.smooth,W=G.points;if(W)if(U.moveTo(W[0][0],W[0][1]),H>0&&W.length>=3){var Z=dist$1(W[0],W[1]),X=dist$1(W[1],W[2]);if(!Z||!X){U.lineTo(W[1][0],W[1][1]),U.lineTo(W[2][0],W[2][1]);return}var K=Math.min(Z,X)*H,Q=lerp$1([],W[1],W[0],K/Z),ee=lerp$1([],W[1],W[2],K/X),te=lerp$1([],Q,ee,.5);U.bezierCurveTo(Q[0],Q[1],Q[0],Q[1],te[0],te[1]),U.bezierCurveTo(ee[0],ee[1],ee[0],ee[1],W[2][0],W[2][1])}else for(var re=1;re<W.length;re++)U.lineTo(W[re][0],W[re][1])}function setLabelLineStyle(U,G,H){var W=U.getTextGuideLine(),Z=U.getTextContent();if(!Z){W&&U.removeTextGuideLine();return}for(var X=G.normal,K=X.get("show"),Q=Z.ignore,ee=0;ee<DISPLAY_STATES.length;ee++){var te=DISPLAY_STATES[ee],re=G[te],ae=te==="normal";if(re){var ne=re.get("show"),ie=ae?Q:retrieve2(Z.states[te]&&Z.states[te].ignore,Q);if(ie||!retrieve2(ne,K)){var oe=ae?W:W&&W.states[te];oe&&(oe.ignore=!0),W&&setLabelLineState(W,!0,te,re);continue}W||(W=new Polyline$1,U.setTextGuideLine(W),!ae&&(Q||!K)&&setLabelLineState(W,!0,"normal",G.normal),U.stateProxy&&(W.stateProxy=U.stateProxy)),setLabelLineState(W,!1,te,re)}}if(W){defaults(W.style,H),W.style.fill=null;var se=X.get("showAbove"),le=U.textGuideLineConfig=U.textGuideLineConfig||{};le.showAbove=se||!1,W.buildPath=buildLabelLinePath}}function getLabelLineStatesModels(U,G){G=G||"labelLine";for(var H={normal:U.getModel(G)},W=0;W<SPECIAL_STATES.length;W++){var Z=SPECIAL_STATES[W];H[Z]=U.getModel([Z,G])}return H}var LABEL_LAYOUT_BASE_PROPS=["label","labelLine","layoutOption","priority","defaultAttr","marginForce","minMarginForce","marginDefault","suggestIgnore"],LABEL_LAYOUT_DIRTY_BIT_OTHERS=1,LABEL_LAYOUT_DIRTY_BIT_OBB=2,LABEL_LAYOUT_DIRTY_ALL=LABEL_LAYOUT_DIRTY_BIT_OTHERS|LABEL_LAYOUT_DIRTY_BIT_OBB;function setLabelLayoutDirty(U,G,H){H=H||LABEL_LAYOUT_DIRTY_ALL,G?U.dirty|=H:U.dirty&=~H}function isLabelLayoutDirty(U,G){return G=G||LABEL_LAYOUT_DIRTY_ALL,U.dirty==null||!!(U.dirty&G)}function ensureLabelLayoutWithGeometry(U){if(U)return isLabelLayoutDirty(U)&&computeLabelGeometry(U,U.label,U),U}function computeLabelGeometry(U,G,H){var W=G.getComputedTransform();U.transform=ensureCopyTransform(U.transform,W);var Z=U.localRect=ensureCopyRect(U.localRect,G.getBoundingRect()),X=G.style,K=X.margin,Q=H&&H.marginForce,ee=H&&H.minMarginForce,te=H&&H.marginDefault,re=X.__marginType;re==null&&te&&(K=te,re=LabelMarginType.textMargin);for(var ae=0;ae<4;ae++)_tmpLabelMargin[ae]=re===LabelMarginType.minMargin&&ee&&ee[ae]!=null?ee[ae]:Q&&Q[ae]!=null?Q[ae]:K?K[ae]:0;re===LabelMarginType.textMargin&&expandOrShrinkRect(Z,_tmpLabelMargin,!1,!1);var ne=U.rect=ensureCopyRect(U.rect,Z);return W&&ne.applyTransform(W),re===LabelMarginType.minMargin&&expandOrShrinkRect(ne,_tmpLabelMargin,!1,!1),U.axisAligned=isBoundingRectAxisAligned(W),(U.label=U.label||{}).ignore=G.ignore,setLabelLayoutDirty(U,!1),setLabelLayoutDirty(U,!0,LABEL_LAYOUT_DIRTY_BIT_OBB),U}var _tmpLabelMargin=[0,0,0,0];function computeLabelGeometry2(U,G,H){return U.transform=ensureCopyTransform(U.transform,H),U.localRect=ensureCopyRect(U.localRect,G),U.rect=ensureCopyRect(U.rect,G),H&&U.rect.applyTransform(H),U.axisAligned=isBoundingRectAxisAligned(H),U.obb=void 0,(U.label=U.label||{}).ignore=!1,U}function labelLayoutApplyTranslation(U,G){if(U){U.label.x+=G.x,U.label.y+=G.y,U.label.markRedraw();var H=U.transform;H&&(H[4]+=G.x,H[5]+=G.y);var W=U.rect;W&&(W.x+=G.x,W.y+=G.y);var Z=U.obb;Z&&Z.fromBoundingRect(U.localRect,H)}}function newLabelLayoutWithGeometry(U,G){for(var H=0;H<LABEL_LAYOUT_BASE_PROPS.length;H++){var W=LABEL_LAYOUT_BASE_PROPS[H];U[W]==null&&(U[W]=G[W])}return ensureLabelLayoutWithGeometry(U)}function ensureOBB(U){var G=U.obb;return(!G||isLabelLayoutDirty(U,LABEL_LAYOUT_DIRTY_BIT_OBB))&&(U.obb=G=G||new OrientedBoundingRect,G.fromBoundingRect(U.localRect,U.transform),setLabelLayoutDirty(U,!1,LABEL_LAYOUT_DIRTY_BIT_OBB)),G}function shiftLayoutOnXY(U,G,H,W,Z){var X=U.length,K=XY$2[G],Q=WH$2[G];if(X<2)return!1;U.sort(function(pe,ge){return pe.rect[K]-ge.rect[K]});for(var ee=0,te,re=!1,ae=0;ae<X;ae++){var ne=U[ae],ie=ne.rect;te=ie[K]-ee,te<0&&(ie[K]-=te,ne.label[K]-=te,re=!0),ee=ie[K]+ie[Q]}var oe=U[0],se=U[X-1],le,ue;ce(),le<0&&ve(-le,.8),ue<0&&ve(ue,.8),ce(),fe(le,ue,1),fe(ue,le,-1),ce(),le<0&&de(-le),ue<0&&de(ue);function ce(){le=oe.rect[K]-H,ue=W-se.rect[K]-se.rect[Q]}function fe(pe,ge,me){if(pe<0){var ye=Math.min(ge,-pe);if(ye>0){he(ye*me,0,X);var _e=ye+pe;_e<0&&ve(-_e*me,1)}else ve(-pe*me,1)}}function he(pe,ge,me){pe!==0&&(re=!0);for(var ye=ge;ye<me;ye++){var _e=U[ye],xe=_e.rect;xe[K]+=pe,_e.label[K]+=pe}}function ve(pe,ge){for(var me=[],ye=0,_e=1;_e<X;_e++){var xe=U[_e-1].rect,Se=Math.max(U[_e].rect[K]-xe[K]-xe[Q],0);me.push(Se),ye+=Se}if(ye){var Te=Math.min(Math.abs(pe)/ye,ge);if(pe>0)for(var _e=0;_e<X-1;_e++){var be=me[_e]*Te;he(be,0,_e+1)}else for(var _e=X-1;_e>0;_e--){var be=me[_e-1]*Te;he(-be,_e,X)}}}function de(pe){var ge=pe<0?-1:1;pe=Math.abs(pe);for(var me=Math.ceil(pe/(X-1)),ye=0;ye<X-1;ye++)if(ge>0?he(me,0,ye+1):he(-me,X-ye-1,X),pe-=me,pe<=0)return}return re}function restoreIgnore(U){for(var G=0;G<U.length;G++){var H=U[G],W=H.defaultAttr,Z=H.labelLine;H.label.attr("ignore",W.ignore),Z&&Z.attr("ignore",W.labelGuideIgnore)}}function hideOverlap(U){var G=[];U.sort(function(te,re){return(re.suggestIgnore?1:0)-(te.suggestIgnore?1:0)||re.priority-te.priority});function H(te){if(!te.ignore){var re=te.ensureState("emphasis");re.ignore==null&&(re.ignore=!1)}te.ignore=!0}for(var W=0;W<U.length;W++){var Z=ensureLabelLayoutWithGeometry(U[W]);if(!Z.label.ignore){for(var X=Z.label,K=Z.labelLine,Q=!1,ee=0;ee<G.length;ee++)if(labelIntersect(Z,G[ee],null,{touchThreshold:.05})){Q=!0;break}Q?(H(X),K&&H(K)):G.push(Z)}}}function labelIntersect(U,G,H,W){return!U||!G||U.label&&U.label.ignore||G.label&&G.label.ignore||!U.rect.intersect(G.rect,H,W)?!1:U.axisAligned&&G.axisAligned?!0:ensureOBB(U).intersect(ensureOBB(G),H,W)}function cloneArr(U){if(U){for(var G=[],H=0;H<U.length;H++)G.push(U[H].slice());return G}}function prepareLayoutCallbackParams(U,G){var H=U.label,W=G&&G.getTextGuideLine();return{dataIndex:U.dataIndex,dataType:U.dataType,seriesIndex:U.seriesModel.seriesIndex,text:U.label.style.text,rect:U.hostRect,labelRect:U.rect,align:H.style.align,verticalAlign:H.style.verticalAlign,labelLinePoints:cloneArr(W&&W.shape.points)}}var LABEL_OPTION_TO_STYLE_KEYS=["align","verticalAlign","width","height","fontSize"],dummyTransformable=new Transformable,labelLayoutInnerStore=makeInner(),labelLineAnimationStore=makeInner();function extendWithKeys(U,G,H){for(var W=0;W<H.length;W++){var Z=H[W];G[Z]!=null&&(U[Z]=G[Z])}}var LABEL_LAYOUT_PROPS=["x","y","rotation"],LabelManager=(function(){function U(){this._labelList=[],this._chartViewList=[]}return U.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},U.prototype._addLabel=function(G,H,W,Z,X){var K=Z.style,Q=Z.__hostTarget,ee=Q.textConfig||{},te=Z.getComputedTransform(),re=Z.getBoundingRect().plain();BoundingRect.applyTransform(re,re,te),te?dummyTransformable.setLocalTransform(te):(dummyTransformable.x=dummyTransformable.y=dummyTransformable.rotation=dummyTransformable.originX=dummyTransformable.originY=0,dummyTransformable.scaleX=dummyTransformable.scaleY=1),dummyTransformable.rotation=normalizeRadian(dummyTransformable.rotation);var ae=Z.__hostTarget,ne;if(ae){ne=ae.getBoundingRect().plain();var ie=ae.getComputedTransform();BoundingRect.applyTransform(ne,ne,ie)}var oe=ne&&ae.getTextGuideLine();this._labelList.push({label:Z,labelLine:oe,seriesModel:W,dataIndex:G,dataType:H,layoutOptionOrCb:X,layoutOption:null,rect:re,hostRect:ne,priority:ne?ne.width*ne.height:0,defaultAttr:{ignore:Z.ignore,labelGuideIgnore:oe&&oe.ignore,x:dummyTransformable.x,y:dummyTransformable.y,scaleX:dummyTransformable.scaleX,scaleY:dummyTransformable.scaleY,rotation:dummyTransformable.rotation,style:{x:K.x,y:K.y,align:K.align,verticalAlign:K.verticalAlign,width:K.width,height:K.height,fontSize:K.fontSize},cursor:Z.cursor,attachedPos:ee.position,attachedRot:ee.rotation}})},U.prototype.addLabelsOfSeries=function(G){var H=this;this._chartViewList.push(G);var W=G.__model,Z=W.get("labelLayout");(isFunction(Z)||keys(Z).length)&&G.group.traverse(function(X){if(X.ignore)return!0;var K=X.getTextContent(),Q=getECData(X);K&&!K.disableLabelLayout&&H._addLabel(Q.dataIndex,Q.dataType,W,K,Z)})},U.prototype.updateLayoutConfig=function(G){var H=G.getWidth(),W=G.getHeight();function Z(fe,he){return function(){updateLabelLinePoints(fe,he)}}for(var X=0;X<this._labelList.length;X++){var K=this._labelList[X],Q=K.label,ee=Q.__hostTarget,te=K.defaultAttr,re=void 0;isFunction(K.layoutOptionOrCb)?re=K.layoutOptionOrCb(prepareLayoutCallbackParams(K,ee)):re=K.layoutOptionOrCb,re=re||{},K.layoutOption=re;var ae=Math.PI/180;ee&&ee.setTextConfig({local:!1,position:re.x!=null||re.y!=null?null:te.attachedPos,rotation:re.rotate!=null?re.rotate*ae:te.attachedRot,offset:[re.dx||0,re.dy||0]});var ne=!1;if(re.x!=null?(Q.x=parsePercent(re.x,H),Q.setStyle("x",0),ne=!0):(Q.x=te.x,Q.setStyle("x",te.style.x)),re.y!=null?(Q.y=parsePercent(re.y,W),Q.setStyle("y",0),ne=!0):(Q.y=te.y,Q.setStyle("y",te.style.y)),re.labelLinePoints){var ie=ee.getTextGuideLine();ie&&(ie.setShape({points:re.labelLinePoints}),ne=!1)}var oe=labelLayoutInnerStore(Q);oe.needsUpdateLabelLine=ne,Q.rotation=re.rotate!=null?re.rotate*ae:te.rotation,Q.scaleX=te.scaleX,Q.scaleY=te.scaleY;for(var se=0;se<LABEL_OPTION_TO_STYLE_KEYS.length;se++){var le=LABEL_OPTION_TO_STYLE_KEYS[se];Q.setStyle(le,re[le]!=null?re[le]:te.style[le])}if(re.draggable){if(Q.draggable=!0,Q.cursor="move",ee){var ue=K.seriesModel;if(K.dataIndex!=null){var ce=K.seriesModel.getData(K.dataType);ue=ce.getItemModel(K.dataIndex)}Q.on("drag",Z(ee,ue.getModel("labelLine")))}}else Q.off("drag"),Q.cursor=te.cursor}},U.prototype.layout=function(G){var H=G.getWidth(),W=G.getHeight(),Z=[];each$f(this._labelList,function(ee){ee.defaultAttr.ignore||Z.push(newLabelLayoutWithGeometry({},ee))});var X=filter(Z,function(ee){return ee.layoutOption.moveOverlap==="shiftX"}),K=filter(Z,function(ee){return ee.layoutOption.moveOverlap==="shiftY"});shiftLayoutOnXY(X,0,0,H),shiftLayoutOnXY(K,1,0,W);var Q=filter(Z,function(ee){return ee.layoutOption.hideOverlap});restoreIgnore(Q),hideOverlap(Q)},U.prototype.processLabelsOverall=function(){var G=this;each$f(this._chartViewList,function(H){var W=H.__model,Z=H.ignoreLabelLineUpdate,X=W.isAnimationEnabled();H.group.traverse(function(K){if(K.ignore&&!K.forceLabelAnimation)return!0;var Q=!Z,ee=K.getTextContent();!Q&&ee&&(Q=labelLayoutInnerStore(ee).needsUpdateLabelLine),Q&&G._updateLabelLine(K,W),X&&G._animateLabels(K,W)})})},U.prototype._updateLabelLine=function(G,H){var W=G.getTextContent(),Z=getECData(G),X=Z.dataIndex;if(W&&X!=null){var K=H.getData(Z.dataType),Q=K.getItemModel(X),ee={},te=K.getItemVisual(X,"style");if(te){var re=K.getVisual("drawType");ee.stroke=te[re]}var ae=Q.getModel("labelLine");setLabelLineStyle(G,getLabelLineStatesModels(Q),ee),updateLabelLinePoints(G,ae)}},U.prototype._animateLabels=function(G,H){var W=G.getTextContent(),Z=G.getTextGuideLine();if(W&&(G.forceLabelAnimation||!W.ignore&&!W.invisible&&!G.disableLabelAnimation&&!isElementRemoved(G))){var X=labelLayoutInnerStore(W),K=X.oldLayout,Q=getECData(G),ee=Q.dataIndex,te={x:W.x,y:W.y,rotation:W.rotation},re=H.getData(Q.dataType);if(K){W.attr(K);var ne=G.prevStates;ne&&(indexOf(ne,"select")>=0&&W.attr(X.oldLayoutSelect),indexOf(ne,"emphasis")>=0&&W.attr(X.oldLayoutEmphasis)),updateProps$1(W,te,H,ee)}else if(W.attr(te),!labelInner(W).valueAnimation){var ae=retrieve2(W.style.opacity,1);W.style.opacity=0,initProps(W,{style:{opacity:ae}},H,ee)}if(X.oldLayout=te,W.states.select){var ie=X.oldLayoutSelect={};extendWithKeys(ie,te,LABEL_LAYOUT_PROPS),extendWithKeys(ie,W.states.select,LABEL_LAYOUT_PROPS)}if(W.states.emphasis){var oe=X.oldLayoutEmphasis={};extendWithKeys(oe,te,LABEL_LAYOUT_PROPS),extendWithKeys(oe,W.states.emphasis,LABEL_LAYOUT_PROPS)}animateLabelValue(W,ee,re,H,H)}if(Z&&!Z.ignore&&!Z.invisible){var X=labelLineAnimationStore(Z),K=X.oldLayout,se={points:Z.shape.points};K?(Z.attr({shape:K}),updateProps$1(Z,{shape:se},H)):(Z.setShape(se),Z.style.strokePercent=0,initProps(Z,{style:{strokePercent:1}},H)),X.oldLayout=se}},U})(),getLabelManager=makeInner();function installLabelLayout(U){U.registerUpdateLifecycle("series:beforeupdate",function(G,H,W){var Z=getLabelManager(H).labelManager;Z||(Z=getLabelManager(H).labelManager=new LabelManager),Z.clearLabels()}),U.registerUpdateLifecycle("series:layoutlabels",function(G,H,W){var Z=getLabelManager(H).labelManager;W.updatedSeries.forEach(function(X){Z.addLabelsOfSeries(H.getViewOfSeriesModel(X))}),Z.updateLayoutConfig(H),Z.layout(H),Z.processLabelsOverall()})}var mathSin=Math.sin,mathCos=Math.cos,PI$4=Math.PI,PI2$1=Math.PI*2,degree=180/PI$4,SVGPathRebuilder=(function(){function U(){}return U.prototype.reset=function(G){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,G||4)},U.prototype.moveTo=function(G,H){this._add("M",G,H)},U.prototype.lineTo=function(G,H){this._add("L",G,H)},U.prototype.bezierCurveTo=function(G,H,W,Z,X,K){this._add("C",G,H,W,Z,X,K)},U.prototype.quadraticCurveTo=function(G,H,W,Z){this._add("Q",G,H,W,Z)},U.prototype.arc=function(G,H,W,Z,X,K){this.ellipse(G,H,W,W,0,Z,X,K)},U.prototype.ellipse=function(G,H,W,Z,X,K,Q,ee){var te=Q-K,re=!ee,ae=Math.abs(te),ne=isAroundZero(ae-PI2$1)||(re?te>=PI2$1:-te>=PI2$1),ie=te>0?te%PI2$1:te%PI2$1+PI2$1,oe=!1;ne?oe=!0:isAroundZero(ae)?oe=!1:oe=ie>=PI$4==!!re;var se=G+W*mathCos(K),le=H+Z*mathSin(K);this._start&&this._add("M",se,le);var ue=Math.round(X*degree);if(ne){var ce=1/this._p,fe=(re?1:-1)*(PI2$1-ce);this._add("A",W,Z,ue,1,+re,G+W*mathCos(K+fe),H+Z*mathSin(K+fe)),ce>.01&&this._add("A",W,Z,ue,0,+re,se,le)}else{var he=G+W*mathCos(Q),ve=H+Z*mathSin(Q);this._add("A",W,Z,ue,+oe,+re,he,ve)}},U.prototype.rect=function(G,H,W,Z){this._add("M",G,H),this._add("l",W,0),this._add("l",0,Z),this._add("l",-W,0),this._add("Z")},U.prototype.closePath=function(){this._d.length>0&&this._add("Z")},U.prototype._add=function(G,H,W,Z,X,K,Q,ee,te){for(var re=[],ae=this._p,ne=1;ne<arguments.length;ne++){var ie=arguments[ne];if(isNaN(ie)){this._invalid=!0;return}re.push(Math.round(ie*ae)/ae)}this._d.push(G+re.join(" ")),this._start=G==="Z"},U.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},U.prototype.getStr=function(){return this._str},U})(),NONE="none",mathRound=Math.round;function pathHasFill(U){var G=U.fill;return G!=null&&G!==NONE}function pathHasStroke(U){var G=U.stroke;return G!=null&&G!==NONE}var strokeProps=["lineCap","miterLimit","lineJoin"],svgStrokeProps=map$1(strokeProps,function(U){return"stroke-"+U.toLowerCase()});function mapStyleToAttrs(U,G,H,W){var Z=G.opacity==null?1:G.opacity;if(H instanceof ZRImage){U("opacity",Z);return}if(pathHasFill(G)){var X=normalizeColor(G.fill);U("fill",X.color);var K=G.fillOpacity!=null?G.fillOpacity*X.opacity*Z:X.opacity*Z;K<1&&U("fill-opacity",K)}else U("fill",NONE);if(pathHasStroke(G)){var Q=normalizeColor(G.stroke);U("stroke",Q.color);var ee=G.strokeNoScale?H.getLineScale():1,te=ee?(G.lineWidth||0)/ee:0,re=G.strokeOpacity!=null?G.strokeOpacity*Q.opacity*Z:Q.opacity*Z,ae=G.strokeFirst;if(te!==1&&U("stroke-width",te),ae&&U("paint-order",ae?"stroke":"fill"),re<1&&U("stroke-opacity",re),G.lineDash){var ne=getLineDash(H),ie=ne[0],oe=ne[1];ie&&(oe=mathRound(oe||0),U("stroke-dasharray",ie.join(",")),(oe||W)&&U("stroke-dashoffset",oe))}for(var se=0;se<strokeProps.length;se++){var le=strokeProps[se];if(G[le]!==DEFAULT_PATH_STYLE[le]){var ue=G[le]||DEFAULT_PATH_STYLE[le];ue&&U(svgStrokeProps[se],ue)}}}}var SVGNS="http://www.w3.org/2000/svg",XLINKNS="http://www.w3.org/1999/xlink",XMLNS="http://www.w3.org/2000/xmlns/",XML_NAMESPACE="http://www.w3.org/XML/1998/namespace",META_DATA_PREFIX="ecmeta_";function createElement$1(U){return document.createElementNS(SVGNS,U)}function createVNode(U,G,H,W,Z){return{tag:U,attrs:H||{},children:W,text:Z,key:G}}function createElementOpen(U,G){var H=[];if(G)for(var W in G){var Z=G[W],X=W;Z!==!1&&(Z!==!0&&Z!=null&&(X+='="'+Z+'"'),H.push(X))}return"<"+U+" "+H.join(" ")+">"}function createElementClose(U){return"</"+U+">"}function vNodeToString(U,G){G=G||{};var H=G.newline?`
|
|
28
|
+
`:"";function W(Z){var X=Z.children,K=Z.tag,Q=Z.attrs,ee=Z.text;return createElementOpen(K,Q)+(K!=="style"?encodeHTML(ee):ee||"")+(X?""+H+map$1(X,function(te){return W(te)}).join(H)+H:"")+createElementClose(K)}return W(U)}function getCssString(U,G,H){H=H||{};var W=H.newline?`
|
|
29
|
+
`:"",Z=" {"+W,X=W+"}",K=map$1(keys(U),function(ee){return ee+Z+map$1(keys(U[ee]),function(te){return te+":"+U[ee][te]+";"}).join(W)+X}).join(W),Q=map$1(keys(G),function(ee){return"@keyframes "+ee+Z+map$1(keys(G[ee]),function(te){return te+Z+map$1(keys(G[ee][te]),function(re){var ae=G[ee][te][re];return re==="d"&&(ae='path("'+ae+'")'),re+":"+ae+";"}).join(W)+X}).join(W)+X}).join(W);return!K&&!Q?"":["<![CDATA[",K,Q,"]]>"].join(W)}function createBrushScope(U){return{zrId:U,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function createSVGVNode(U,G,H,W){return createVNode("svg","root",{width:U,height:G,xmlns:SVGNS,"xmlns:xlink":XLINKNS,version:"1.1",baseProfile:"full",viewBox:W?"0 0 "+U+" "+G:!1},H)}var cssClassIdx=0;function getClassId(){return cssClassIdx++}var EASING_MAP={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},transformOriginKey="transform-origin";function buildPathString(U,G,H){var W=extend({},U.shape);extend(W,G),U.buildPath(H,W);var Z=new SVGPathRebuilder;return Z.reset(getPathPrecision(U)),H.rebuildPath(Z,1),Z.generateStr(),Z.getStr()}function setTransformOrigin(U,G){var H=G.originX,W=G.originY;(H||W)&&(U[transformOriginKey]=H+"px "+W+"px")}var ANIMATE_STYLE_MAP={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function addAnimation(U,G){var H=G.zrId+"-ani-"+G.cssAnimIdx++;return G.cssAnims[H]=U,H}function createCompoundPathCSSAnimation(U,G,H){var W=U.shape.paths,Z={},X,K;if(each$f(W,function(ee){var te=createBrushScope(H.zrId);te.animation=!0,createCSSAnimation(ee,{},te,!0);var re=te.cssAnims,ae=te.cssNodes,ne=keys(re),ie=ne.length;if(ie){K=ne[ie-1];var oe=re[K];for(var se in oe){var le=oe[se];Z[se]=Z[se]||{d:""},Z[se].d+=le.d||""}for(var ue in ae){var ce=ae[ue].animation;ce.indexOf(K)>=0&&(X=ce)}}}),!!X){G.d=!1;var Q=addAnimation(Z,H);return X.replace(K,Q)}}function getEasingFunc(U){return isString(U)?EASING_MAP[U]?"cubic-bezier("+EASING_MAP[U]+")":createCubicEasingFunc(U)?U:"":""}function createCSSAnimation(U,G,H,W){var Z=U.animators,X=Z.length,K=[];if(U instanceof CompoundPath){var Q=createCompoundPathCSSAnimation(U,G,H);if(Q)K.push(Q);else if(!X)return}else if(!X)return;for(var ee={},te=0;te<X;te++){var re=Z[te],ae=[re.getMaxTime()/1e3+"s"],ne=getEasingFunc(re.getClip().easing),ie=re.getDelay();ne?ae.push(ne):ae.push("linear"),ie&&ae.push(ie/1e3+"s"),re.getLoop()&&ae.push("infinite");var oe=ae.join(" ");ee[oe]=ee[oe]||[oe,[]],ee[oe][1].push(re)}function se(ce){var fe=ce[1],he=fe.length,ve={},de={},pe={},ge="animation-timing-function";function me(ke,Re,Ne){for(var Oe=ke.getTracks(),Be=ke.getMaxTime(),ze=0;ze<Oe.length;ze++){var Ge=Oe[ze];if(Ge.needsAnimate()){var He=Ge.keyframes,Ue=Ge.propName;if(Ne&&(Ue=Ne(Ue)),Ue)for(var Ye=0;Ye<He.length;Ye++){var Ze=He[Ye],We=Math.round(Ze.time/Be*100)+"%",Xe=getEasingFunc(Ze.easing),je=Ze.rawValue;(isString(je)||isNumber(je))&&(Re[We]=Re[We]||{},Re[We][Ue]=Ze.rawValue,Xe&&(Re[We][ge]=Xe))}}}}for(var ye=0;ye<he;ye++){var _e=fe[ye],xe=_e.targetName;xe?xe==="shape"&&me(_e,de):!W&&me(_e,ve)}for(var Se in ve){var Te={};copyTransform(Te,U),extend(Te,ve[Se]);var be=getSRTTransformString(Te),Ae=ve[Se][ge];pe[Se]=be?{transform:be}:{},setTransformOrigin(pe[Se],Te),Ae&&(pe[Se][ge]=Ae)}var we,Ce=!0;for(var Se in de){pe[Se]=pe[Se]||{};var Ee=!we,Ae=de[Se][ge];Ee&&(we=new PathProxy);var Me=we.len();we.reset(),pe[Se].d=buildPathString(U,de[Se],we);var De=we.len();if(!Ee&&Me!==De){Ce=!1;break}Ae&&(pe[Se][ge]=Ae)}if(!Ce)for(var Se in pe)delete pe[Se].d;if(!W)for(var ye=0;ye<he;ye++){var _e=fe[ye],xe=_e.targetName;xe==="style"&&me(_e,pe,function(Oe){return ANIMATE_STYLE_MAP[Oe]})}for(var Le=keys(pe),Pe=!0,Ie,ye=1;ye<Le.length;ye++){var $e=Le[ye-1],Ve=Le[ye];if(pe[$e][transformOriginKey]!==pe[Ve][transformOriginKey]){Pe=!1;break}Ie=pe[$e][transformOriginKey]}if(Pe&&Ie){for(var Se in pe)pe[Se][transformOriginKey]&&delete pe[Se][transformOriginKey];G[transformOriginKey]=Ie}if(filter(Le,function(ke){return keys(pe[ke]).length>0}).length){var Fe=addAnimation(pe,H);return Fe+" "+ce[0]+" both"}}for(var le in ee){var Q=se(ee[le]);Q&&K.push(Q)}if(K.length){var ue=H.zrId+"-cls-"+getClassId();H.cssNodes["."+ue]={animation:K.join(",")},G.class=ue}}function createCSSEmphasis(U,G,H){if(!U.ignore)if(U.isSilent()){var W={"pointer-events":"none"};setClassAttribute(W,G,H)}else{var Z=U.states.emphasis&&U.states.emphasis.style?U.states.emphasis.style:{},X=Z.fill;if(!X){var K=U.style&&U.style.fill,Q=U.states.select&&U.states.select.style&&U.states.select.style.fill,ee=U.currentStates.indexOf("select")>=0&&Q||K;ee&&(X=liftColor(ee))}var te=Z.lineWidth;if(te){var re=!Z.strokeNoScale&&U.transform?U.transform[0]:1;te=te/re}var W={cursor:"pointer"};X&&(W.fill=X),Z.stroke&&(W.stroke=Z.stroke),te&&(W["stroke-width"]=te),setClassAttribute(W,G,H)}}function setClassAttribute(U,G,H,W){var Z=JSON.stringify(U),X=H.cssStyleCache[Z];X||(X=H.zrId+"-cls-"+getClassId(),H.cssStyleCache[Z]=X,H.cssNodes["."+X+":hover"]=U),G.class=G.class?G.class+" "+X:X}var round$2=Math.round;function isImageLike(U){return U&&isString(U.src)}function isCanvasLike(U){return U&&isFunction(U.toDataURL)}function setStyleAttrs(U,G,H,W){mapStyleToAttrs(function(Z,X){var K=Z==="fill"||Z==="stroke";K&&isGradient(X)?setGradient(G,U,Z,W):K&&isPattern(X)?setPattern(H,U,Z,W):U[Z]=X,K&&W.ssr&&X==="none"&&(U["pointer-events"]="visible")},G,H,!1),setShadow(H,U,W)}function setMetaData(U,G){var H=getElementSSRData(G);H&&(H.each(function(W,Z){W!=null&&(U[(META_DATA_PREFIX+Z).toLowerCase()]=W+"")}),G.isSilent()&&(U[META_DATA_PREFIX+"silent"]="true"))}function noRotateScale(U){return isAroundZero(U[0]-1)&&isAroundZero(U[1])&&isAroundZero(U[2])&&isAroundZero(U[3]-1)}function noTranslate(U){return isAroundZero(U[4])&&isAroundZero(U[5])}function setTransform(U,G,H){if(G&&!(noTranslate(G)&&noRotateScale(G))){var W=1e4;U.transform=noRotateScale(G)?"translate("+round$2(G[4]*W)/W+" "+round$2(G[5]*W)/W+")":getMatrixStr(G)}}function convertPolyShape(U,G,H){for(var W=U.points,Z=[],X=0;X<W.length;X++)Z.push(round$2(W[X][0]*H)/H),Z.push(round$2(W[X][1]*H)/H);G.points=Z.join(" ")}function validatePolyShape(U){return!U.smooth}function createAttrsConvert(U){var G=map$1(U,function(H){return typeof H=="string"?[H,H]:H});return function(H,W,Z){for(var X=0;X<G.length;X++){var K=G[X],Q=H[K[0]];Q!=null&&(W[K[1]]=round$2(Q*Z)/Z)}}}var builtinShapesDef={circle:[createAttrsConvert(["cx","cy","r"])],polyline:[convertPolyShape,validatePolyShape],polygon:[convertPolyShape,validatePolyShape]};function hasShapeAnimation(U){for(var G=U.animators,H=0;H<G.length;H++)if(G[H].targetName==="shape")return!0;return!1}function brushSVGPath(U,G){var H=U.style,W=U.shape,Z=builtinShapesDef[U.type],X={},K=G.animation,Q="path",ee=U.style.strokePercent,te=G.compress&&getPathPrecision(U)||4;if(Z&&!G.willUpdate&&!(Z[1]&&!Z[1](W))&&!(K&&hasShapeAnimation(U))&&!(ee<1)){Q=U.type;var re=Math.pow(10,te);Z[0](W,X,re)}else{var ae=!U.path||U.shapeChanged();U.path||U.createPathProxy();var ne=U.path;ae&&(ne.beginPath(),U.buildPath(ne,U.shape),U.pathUpdated());var ie=ne.getVersion(),oe=U,se=oe.__svgPathBuilder;(oe.__svgPathVersion!==ie||!se||ee!==oe.__svgPathStrokePercent)&&(se||(se=oe.__svgPathBuilder=new SVGPathRebuilder),se.reset(te),ne.rebuildPath(se,ee),se.generateStr(),oe.__svgPathVersion=ie,oe.__svgPathStrokePercent=ee),X.d=se.getStr()}return setTransform(X,U.transform),setStyleAttrs(X,H,U,G),setMetaData(X,U),G.animation&&createCSSAnimation(U,X,G),G.emphasis&&createCSSEmphasis(U,X,G),createVNode(Q,U.id+"",X)}function brushSVGImage(U,G){var H=U.style,W=H.image;if(W&&!isString(W)&&(isImageLike(W)?W=W.src:isCanvasLike(W)&&(W=W.toDataURL())),!!W){var Z=H.x||0,X=H.y||0,K=H.width,Q=H.height,ee={href:W,width:K,height:Q};return Z&&(ee.x=Z),X&&(ee.y=X),setTransform(ee,U.transform),setStyleAttrs(ee,H,U,G),setMetaData(ee,U),G.animation&&createCSSAnimation(U,ee,G),createVNode("image",U.id+"",ee)}}function brushSVGTSpan(U,G){var H=U.style,W=H.text;if(W!=null&&(W+=""),!(!W||isNaN(H.x)||isNaN(H.y))){var Z=H.font||DEFAULT_FONT,X=H.x||0,K=adjustTextY$1(H.y||0,getLineHeight(Z),H.textBaseline),Q=TEXT_ALIGN_TO_ANCHOR[H.textAlign]||H.textAlign,ee={"dominant-baseline":"central","text-anchor":Q};if(hasSeparateFont(H)){var te="",re=H.fontStyle,ae=parseFontSize(H.fontSize);if(!parseFloat(ae))return;var ne=H.fontFamily||DEFAULT_FONT_FAMILY,ie=H.fontWeight;te+="font-size:"+ae+";font-family:"+ne+";",re&&re!=="normal"&&(te+="font-style:"+re+";"),ie&&ie!=="normal"&&(te+="font-weight:"+ie+";"),ee.style=te}else ee.style="font: "+Z;return W.match(/\s/)&&(ee["xml:space"]="preserve"),X&&(ee.x=X),K&&(ee.y=K),setTransform(ee,U.transform),setStyleAttrs(ee,H,U,G),setMetaData(ee,U),G.animation&&createCSSAnimation(U,ee,G),createVNode("text",U.id+"",ee,void 0,W)}}function brush(U,G){if(U instanceof Path)return brushSVGPath(U,G);if(U instanceof ZRImage)return brushSVGImage(U,G);if(U instanceof TSpan)return brushSVGTSpan(U,G)}function setShadow(U,G,H){var W=U.style;if(hasShadow(W)){var Z=getShadowKey(U),X=H.shadowCache,K=X[Z];if(!K){var Q=U.getGlobalScale(),ee=Q[0],te=Q[1];if(!ee||!te)return;var re=W.shadowOffsetX||0,ae=W.shadowOffsetY||0,ne=W.shadowBlur,ie=normalizeColor(W.shadowColor),oe=ie.opacity,se=ie.color,le=ne/2/ee,ue=ne/2/te,ce=le+" "+ue;K=H.zrId+"-s"+H.shadowIdx++,H.defs[K]=createVNode("filter",K,{id:K,x:"-100%",y:"-100%",width:"300%",height:"300%"},[createVNode("feDropShadow","",{dx:re/ee,dy:ae/te,stdDeviation:ce,"flood-color":se,"flood-opacity":oe})]),X[Z]=K}G.filter=getIdURL(K)}}function setGradient(U,G,H,W){var Z=U[H],X,K={gradientUnits:Z.global?"userSpaceOnUse":"objectBoundingBox"};if(isLinearGradient(Z))X="linearGradient",K.x1=Z.x,K.y1=Z.y,K.x2=Z.x2,K.y2=Z.y2;else if(isRadialGradient(Z))X="radialGradient",K.cx=retrieve2(Z.x,.5),K.cy=retrieve2(Z.y,.5),K.r=retrieve2(Z.r,.5);else{process.env.NODE_ENV!=="production"&&logError("Illegal gradient type.");return}for(var Q=Z.colorStops,ee=[],te=0,re=Q.length;te<re;++te){var ae=round4(Q[te].offset)*100+"%",ne=Q[te].color,ie=normalizeColor(ne),oe=ie.color,se=ie.opacity,le={offset:ae};le["stop-color"]=oe,se<1&&(le["stop-opacity"]=se),ee.push(createVNode("stop",te+"",le))}var ue=createVNode(X,"",K,ee),ce=vNodeToString(ue),fe=W.gradientCache,he=fe[ce];he||(he=W.zrId+"-g"+W.gradientIdx++,fe[ce]=he,K.id=he,W.defs[he]=createVNode(X,he,K,ee)),G[H]=getIdURL(he)}function setPattern(U,G,H,W){var Z=U.style[H],X=U.getBoundingRect(),K={},Q=Z.repeat,ee=Q==="no-repeat",te=Q==="repeat-x",re=Q==="repeat-y",ae;if(isImagePattern(Z)){var ne=Z.imageWidth,ie=Z.imageHeight,oe=void 0,se=Z.image;if(isString(se)?oe=se:isImageLike(se)?oe=se.src:isCanvasLike(se)&&(oe=se.toDataURL()),typeof Image>"u"){var le="Image width/height must been given explictly in svg-ssr renderer.";assert(ne,le),assert(ie,le)}else if(ne==null||ie==null){var ue=function(ye,_e){if(ye){var xe=ye.elm,Se=ne||_e.width,Te=ie||_e.height;ye.tag==="pattern"&&(te?(Te=1,Se/=X.width):re&&(Se=1,Te/=X.height)),ye.attrs.width=Se,ye.attrs.height=Te,xe&&(xe.setAttribute("width",Se),xe.setAttribute("height",Te))}},ce=createOrUpdateImage(oe,null,U,function(ye){ee||ue(de,ye),ue(ae,ye)});ce&&ce.width&&ce.height&&(ne=ne||ce.width,ie=ie||ce.height)}ae=createVNode("image","img",{href:oe,width:ne,height:ie}),K.width=ne,K.height=ie}else Z.svgElement&&(ae=clone$4(Z.svgElement),K.width=Z.svgWidth,K.height=Z.svgHeight);if(ae){var fe,he;ee?fe=he=1:te?(he=1,fe=K.width/X.width):re?(fe=1,he=K.height/X.height):K.patternUnits="userSpaceOnUse",fe!=null&&!isNaN(fe)&&(K.width=fe),he!=null&&!isNaN(he)&&(K.height=he);var ve=getSRTTransformString(Z);ve&&(K.patternTransform=ve);var de=createVNode("pattern","",K,[ae]),pe=vNodeToString(de),ge=W.patternCache,me=ge[pe];me||(me=W.zrId+"-p"+W.patternIdx++,ge[pe]=me,K.id=me,de=W.defs[me]=createVNode("pattern",me,K,[ae])),G[H]=getIdURL(me)}}function setClipPath(U,G,H){var W=H.clipPathCache,Z=H.defs,X=W[U.id];if(!X){X=H.zrId+"-c"+H.clipPathIdx++;var K={id:X};W[U.id]=X,Z[X]=createVNode("clipPath",X,K,[brushSVGPath(U,H)])}G["clip-path"]=getIdURL(X)}function createTextNode(U){return document.createTextNode(U)}function insertBefore(U,G,H){U.insertBefore(G,H)}function removeChild(U,G){U.removeChild(G)}function appendChild(U,G){U.appendChild(G)}function parentNode(U){return U.parentNode}function nextSibling(U){return U.nextSibling}function setTextContent(U,G){U.textContent=G}var colonChar=58,xChar=120,emptyNode=createVNode("","");function isUndef(U){return U===void 0}function isDef(U){return U!==void 0}function createKeyToOldIdx(U,G,H){for(var W={},Z=G;Z<=H;++Z){var X=U[Z].key;X!==void 0&&(process.env.NODE_ENV!=="production"&&W[X]!=null&&console.error("Duplicate key "+X),W[X]=Z)}return W}function sameVnode(U,G){var H=U.key===G.key,W=U.tag===G.tag;return W&&H}function createElm(U){var G,H=U.children,W=U.tag;if(isDef(W)){var Z=U.elm=createElement$1(W);if(updateAttrs(emptyNode,U),isArray$1(H))for(G=0;G<H.length;++G){var X=H[G];X!=null&&appendChild(Z,createElm(X))}else isDef(U.text)&&!isObject$3(U.text)&&appendChild(Z,createTextNode(U.text))}else U.elm=createTextNode(U.text);return U.elm}function addVnodes(U,G,H,W,Z){for(;W<=Z;++W){var X=H[W];X!=null&&insertBefore(U,createElm(X),G)}}function removeVnodes(U,G,H,W){for(;H<=W;++H){var Z=G[H];if(Z!=null)if(isDef(Z.tag)){var X=parentNode(Z.elm);removeChild(X,Z.elm)}else removeChild(U,Z.elm)}}function updateAttrs(U,G){var H,W=G.elm,Z=U&&U.attrs||{},X=G.attrs||{};if(Z!==X){for(H in X){var K=X[H],Q=Z[H];Q!==K&&(K===!0?W.setAttribute(H,""):K===!1?W.removeAttribute(H):H==="style"?W.style.cssText=K:H.charCodeAt(0)!==xChar?W.setAttribute(H,K):H==="xmlns:xlink"||H==="xmlns"?W.setAttributeNS(XMLNS,H,K):H.charCodeAt(3)===colonChar?W.setAttributeNS(XML_NAMESPACE,H,K):H.charCodeAt(5)===colonChar?W.setAttributeNS(XLINKNS,H,K):W.setAttribute(H,K))}for(H in Z)H in X||W.removeAttribute(H)}}function updateChildren(U,G,H){for(var W=0,Z=0,X=G.length-1,K=G[0],Q=G[X],ee=H.length-1,te=H[0],re=H[ee],ae,ne,ie,oe;W<=X&&Z<=ee;)K==null?K=G[++W]:Q==null?Q=G[--X]:te==null?te=H[++Z]:re==null?re=H[--ee]:sameVnode(K,te)?(patchVnode(K,te),K=G[++W],te=H[++Z]):sameVnode(Q,re)?(patchVnode(Q,re),Q=G[--X],re=H[--ee]):sameVnode(K,re)?(patchVnode(K,re),insertBefore(U,K.elm,nextSibling(Q.elm)),K=G[++W],re=H[--ee]):sameVnode(Q,te)?(patchVnode(Q,te),insertBefore(U,Q.elm,K.elm),Q=G[--X],te=H[++Z]):(isUndef(ae)&&(ae=createKeyToOldIdx(G,W,X)),ne=ae[te.key],isUndef(ne)?insertBefore(U,createElm(te),K.elm):(ie=G[ne],ie.tag!==te.tag?insertBefore(U,createElm(te),K.elm):(patchVnode(ie,te),G[ne]=void 0,insertBefore(U,ie.elm,K.elm))),te=H[++Z]);(W<=X||Z<=ee)&&(W>X?(oe=H[ee+1]==null?null:H[ee+1].elm,addVnodes(U,oe,H,Z,ee)):removeVnodes(U,G,W,X))}function patchVnode(U,G){var H=G.elm=U.elm,W=U.children,Z=G.children;U!==G&&(updateAttrs(U,G),isUndef(G.text)?isDef(W)&&isDef(Z)?W!==Z&&updateChildren(H,W,Z):isDef(Z)?(isDef(U.text)&&setTextContent(H,""),addVnodes(H,null,Z,0,Z.length-1)):isDef(W)?removeVnodes(H,W,0,W.length-1):isDef(U.text)&&setTextContent(H,""):U.text!==G.text&&(isDef(W)&&removeVnodes(H,W,0,W.length-1),setTextContent(H,G.text)))}function patch(U,G){if(sameVnode(U,G))patchVnode(U,G);else{var H=U.elm,W=parentNode(H);createElm(G),W!==null&&(insertBefore(W,G.elm,nextSibling(H)),removeVnodes(W,[U],0,0))}return G}var svgId=0,SVGPainter=(function(){function U(G,H,W){if(this.type="svg",this.refreshHover=createMethodNotSupport("refreshHover"),this.configLayer=createMethodNotSupport("configLayer"),this.storage=H,this._opts=W=extend({},W),this.root=G,this._id="zr"+svgId++,this._oldVNode=createSVGVNode(W.width,W.height),G&&!W.ssr){var Z=this._viewport=document.createElement("div");Z.style.cssText="position:relative;overflow:hidden";var X=this._svgDom=this._oldVNode.elm=createElement$1("svg");updateAttrs(null,this._oldVNode),Z.appendChild(X),G.appendChild(Z)}this.resize(W.width,W.height)}return U.prototype.getType=function(){return this.type},U.prototype.getViewportRoot=function(){return this._viewport},U.prototype.getViewportRootOffset=function(){var G=this.getViewportRoot();if(G)return{offsetLeft:G.offsetLeft||0,offsetTop:G.offsetTop||0}},U.prototype.getSvgDom=function(){return this._svgDom},U.prototype.refresh=function(){if(this.root){var G=this.renderToVNode({willUpdate:!0});G.attrs.style="position:absolute;left:0;top:0;user-select:none",patch(this._oldVNode,G),this._oldVNode=G}},U.prototype.renderOneToVNode=function(G){return brush(G,createBrushScope(this._id))},U.prototype.renderToVNode=function(G){G=G||{};var H=this.storage.getDisplayList(!0),W=this._width,Z=this._height,X=createBrushScope(this._id);X.animation=G.animation,X.willUpdate=G.willUpdate,X.compress=G.compress,X.emphasis=G.emphasis,X.ssr=this._opts.ssr;var K=[],Q=this._bgVNode=createBackgroundVNode(W,Z,this._backgroundColor,X);Q&&K.push(Q);var ee=G.compress?null:this._mainVNode=createVNode("g","main",{},[]);this._paintList(H,X,ee?ee.children:K),ee&&K.push(ee);var te=map$1(keys(X.defs),function(ne){return X.defs[ne]});if(te.length&&K.push(createVNode("defs","defs",{},te)),G.animation){var re=getCssString(X.cssNodes,X.cssAnims,{newline:!0});if(re){var ae=createVNode("style","stl",{},[],re);K.push(ae)}}return createSVGVNode(W,Z,K,G.useViewBox)},U.prototype.renderToString=function(G){return G=G||{},vNodeToString(this.renderToVNode({animation:retrieve2(G.cssAnimation,!0),emphasis:retrieve2(G.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:retrieve2(G.useViewBox,!0)}),{newline:!0})},U.prototype.setBackgroundColor=function(G){this._backgroundColor=G},U.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},U.prototype._paintList=function(G,H,W){for(var Z=G.length,X=[],K=0,Q,ee,te=0,re=0;re<Z;re++){var ae=G[re];if(!ae.invisible){var ne=ae.__clipPaths,ie=ne&&ne.length||0,oe=ee&&ee.length||0,se=void 0;for(se=Math.max(ie-1,oe-1);se>=0&&!(ne&&ee&&ne[se]===ee[se]);se--);for(var le=oe-1;le>se;le--)K--,Q=X[K-1];for(var ue=se+1;ue<ie;ue++){var ce={};setClipPath(ne[ue],ce,H);var fe=createVNode("g","clip-g-"+te++,ce,[]);(Q?Q.children:W).push(fe),X[K++]=fe,Q=fe}ee=ne;var he=brush(ae,H);he&&(Q?Q.children:W).push(he)}}},U.prototype.resize=function(G,H){var W=this._opts,Z=this.root,X=this._viewport;if(G!=null&&(W.width=G),H!=null&&(W.height=H),Z&&X&&(X.style.display="none",G=getSize$1(Z,0,W),H=getSize$1(Z,1,W),X.style.display=""),this._width!==G||this._height!==H){if(this._width=G,this._height=H,X){var K=X.style;K.width=G+"px",K.height=H+"px"}if(isPattern(this._backgroundColor))this.refresh();else{var Q=this._svgDom;Q&&(Q.setAttribute("width",G),Q.setAttribute("height",H));var ee=this._bgVNode&&this._bgVNode.elm;ee&&(ee.setAttribute("width",G),ee.setAttribute("height",H))}}},U.prototype.getWidth=function(){return this._width},U.prototype.getHeight=function(){return this._height},U.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},U.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},U.prototype.toDataURL=function(G){var H=this.renderToString(),W="data:image/svg+xml;";return G?(H=encodeBase64(H),H&&W+"base64,"+H):W+"charset=UTF-8,"+encodeURIComponent(H)},U})();function createMethodNotSupport(U){return function(){process.env.NODE_ENV!=="production"&&logError('In SVG mode painter not support method "'+U+'"')}}function createBackgroundVNode(U,G,H,W){var Z;if(H&&H!=="none")if(Z=createVNode("rect","bg",{width:U,height:G,x:"0",y:"0"}),isGradient(H))setGradient({fill:H},Z.attrs,"fill",W);else if(isPattern(H))setPattern({style:{fill:H},dirty:noop,getBoundingRect:function(){return{width:U,height:G}}},Z.attrs,"fill",W);else{var X=normalizeColor(H),K=X.color,Q=X.opacity;Z.attrs.fill=K,Q<1&&(Z.attrs["fill-opacity"]=Q)}return Z}function install$W(U){U.registerPainter("svg",SVGPainter)}function createDom(U,G,H){var W=platformApi.createCanvas(),Z=G.getWidth(),X=G.getHeight(),K=W.style;return K&&(K.position="absolute",K.left="0",K.top="0",K.width=Z+"px",K.height=X+"px",W.setAttribute("data-zr-dom-id",U)),W.width=Z*H,W.height=X*H,W}var Layer=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this)||this;X.motionBlur=!1,X.lastFrameAlpha=.7,X.dpr=1,X.virtual=!1,X.config={},X.incremental=!1,X.zlevel=0,X.maxRepaintRectCount=5,X.__dirty=!0,X.__firstTimePaint=!0,X.__used=!1,X.__drawIndex=0,X.__startIndex=0,X.__endIndex=0,X.__prevStartIndex=null,X.__prevEndIndex=null;var K;Z=Z||devicePixelRatio,typeof H=="string"?K=createDom(H,W,Z):isObject$3(H)&&(K=H,H=K.id),X.id=H,X.dom=K;var Q=K.style;return Q&&(disableUserSelect(K),K.onselectstart=function(){return!1},Q.padding="0",Q.margin="0",Q.borderWidth="0"),X.painter=W,X.dpr=Z,X}return G.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},G.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},G.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},G.prototype.setUnpainted=function(){this.__firstTimePaint=!0},G.prototype.createBackBuffer=function(){var H=this.dpr;this.domBack=createDom("back-"+this.id,this.painter,H),this.ctxBack=this.domBack.getContext("2d"),H!==1&&this.ctxBack.scale(H,H)},G.prototype.createRepaintRects=function(H,W,Z,X){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var K=[],Q=this.maxRepaintRectCount,ee=!1,te=new BoundingRect(0,0,0,0);function re(ce){if(!(!ce.isFinite()||ce.isZero()))if(K.length===0){var fe=new BoundingRect(0,0,0,0);fe.copy(ce),K.push(fe)}else{for(var he=!1,ve=1/0,de=0,pe=0;pe<K.length;++pe){var ge=K[pe];if(ge.intersect(ce)){var me=new BoundingRect(0,0,0,0);me.copy(ge),me.union(ce),K[pe]=me,he=!0;break}else if(ee){te.copy(ce),te.union(ge);var ye=ce.width*ce.height,_e=ge.width*ge.height,xe=te.width*te.height,Se=xe-ye-_e;Se<ve&&(ve=Se,de=pe)}}if(ee&&(K[de].union(ce),he=!0),!he){var fe=new BoundingRect(0,0,0,0);fe.copy(ce),K.push(fe)}ee||(ee=K.length>=Q)}}for(var ae=this.__startIndex;ae<this.__endIndex;++ae){var ne=H[ae];if(ne){var ie=ne.shouldBePainted(Z,X,!0,!0),oe=ne.__isRendered&&(ne.__dirty&REDRAW_BIT||!ie)?ne.getPrevPaintRect():null;oe&&re(oe);var se=ie&&(ne.__dirty&REDRAW_BIT||!ne.__isRendered)?ne.getPaintRect():null;se&&re(se)}}for(var ae=this.__prevStartIndex;ae<this.__prevEndIndex;++ae){var ne=W[ae],ie=ne&&ne.shouldBePainted(Z,X,!0,!0);if(ne&&(!ie||!ne.__zr)&&ne.__isRendered){var oe=ne.getPrevPaintRect();oe&&re(oe)}}var le;do{le=!1;for(var ae=0;ae<K.length;){if(K[ae].isZero()){K.splice(ae,1);continue}for(var ue=ae+1;ue<K.length;)K[ae].intersect(K[ue])?(le=!0,K[ae].union(K[ue]),K.splice(ue,1)):ue++;ae++}}while(le);return this._paintRects=K,K},G.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},G.prototype.resize=function(H,W){var Z=this.dpr,X=this.dom,K=X.style,Q=this.domBack;K&&(K.width=H+"px",K.height=W+"px"),X.width=H*Z,X.height=W*Z,Q&&(Q.width=H*Z,Q.height=W*Z,Z!==1&&this.ctxBack.scale(Z,Z))},G.prototype.clear=function(H,W,Z){var X=this.dom,K=this.ctx,Q=X.width,ee=X.height;W=W||this.clearColor;var te=this.motionBlur&&!H,re=this.lastFrameAlpha,ae=this.dpr,ne=this;te&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(X,0,0,Q/ae,ee/ae));var ie=this.domBack;function oe(se,le,ue,ce){if(K.clearRect(se,le,ue,ce),W&&W!=="transparent"){var fe=void 0;if(isGradientObject(W)){var he=W.global||W.__width===ue&&W.__height===ce;fe=he&&W.__canvasGradient||getCanvasGradient(K,W,{x:0,y:0,width:ue,height:ce}),W.__canvasGradient=fe,W.__width=ue,W.__height=ce}else isImagePatternObject(W)&&(W.scaleX=W.scaleX||ae,W.scaleY=W.scaleY||ae,fe=createCanvasPattern(K,W,{dirty:function(){ne.setUnpainted(),ne.painter.refresh()}}));K.save(),K.fillStyle=fe||W,K.fillRect(se,le,ue,ce),K.restore()}te&&(K.save(),K.globalAlpha=re,K.drawImage(ie,se,le,ue,ce),K.restore())}!Z||te?oe(0,0,Q,ee):Z.length&&each$f(Z,function(se){oe(se.x*ae,se.y*ae,se.width*ae,se.height*ae)})},G})(Eventful),HOVER_LAYER_ZLEVEL=1e5,CANVAS_ZLEVEL=314159,EL_AFTER_INCREMENTAL_INC=.01,INCREMENTAL_INC=.001;function isLayerValid(U){return U?U.__builtin__?!0:!(typeof U.resize!="function"||typeof U.refresh!="function"):!1}function createRoot(U,G){var H=document.createElement("div");return H.style.cssText=["position:relative","width:"+U+"px","height:"+G+"px","padding:0","margin:0","border-width:0"].join(";")+";",H}var CanvasPainter=(function(){function U(G,H,W,Z){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var X=!G.nodeName||G.nodeName.toUpperCase()==="CANVAS";this._opts=W=extend({},W||{}),this.dpr=W.devicePixelRatio||devicePixelRatio,this._singleCanvas=X,this.root=G;var K=G.style;K&&(disableUserSelect(G),G.innerHTML=""),this.storage=H;var Q=this._zlevelList;this._prevDisplayList=[];var ee=this._layers;if(X){var re=G,ae=re.width,ne=re.height;W.width!=null&&(ae=W.width),W.height!=null&&(ne=W.height),this.dpr=W.devicePixelRatio||1,re.width=ae*this.dpr,re.height=ne*this.dpr,this._width=ae,this._height=ne;var ie=new Layer(re,this,this.dpr);ie.__builtin__=!0,ie.initContext(),ee[CANVAS_ZLEVEL]=ie,ie.zlevel=CANVAS_ZLEVEL,Q.push(CANVAS_ZLEVEL),this._domRoot=G}else{this._width=getSize$1(G,0,W),this._height=getSize$1(G,1,W);var te=this._domRoot=createRoot(this._width,this._height);G.appendChild(te)}}return U.prototype.getType=function(){return"canvas"},U.prototype.isSingleCanvas=function(){return this._singleCanvas},U.prototype.getViewportRoot=function(){return this._domRoot},U.prototype.getViewportRootOffset=function(){var G=this.getViewportRoot();if(G)return{offsetLeft:G.offsetLeft||0,offsetTop:G.offsetTop||0}},U.prototype.refresh=function(G){var H=this.storage.getDisplayList(!0),W=this._prevDisplayList,Z=this._zlevelList;this._redrawId=Math.random(),this._paintList(H,W,G,this._redrawId);for(var X=0;X<Z.length;X++){var K=Z[X],Q=this._layers[K];if(!Q.__builtin__&&Q.refresh){var ee=X===0?this._backgroundColor:null;Q.refresh(ee)}}return this._opts.useDirtyRect&&(this._prevDisplayList=H.slice()),this},U.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},U.prototype._paintHoverList=function(G){var H=G.length,W=this._hoverlayer;if(W&&W.clear(),!!H){for(var Z={inHover:!0,viewWidth:this._width,viewHeight:this._height},X,K=0;K<H;K++){var Q=G[K];Q.__inHover&&(W||(W=this._hoverlayer=this.getLayer(HOVER_LAYER_ZLEVEL)),X||(X=W.ctx,X.save()),brush$1(X,Q,Z,K===H-1))}X&&X.restore()}},U.prototype.getHoverLayer=function(){return this.getLayer(HOVER_LAYER_ZLEVEL)},U.prototype.paintOne=function(G,H){brushSingle(G,H)},U.prototype._paintList=function(G,H,W,Z){if(this._redrawId===Z){W=W||!1,this._updateLayerStatus(G);var X=this._doPaintList(G,H,W),K=X.finished,Q=X.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),Q&&this._paintHoverList(G),K)this.eachLayer(function(te){te.afterBrush&&te.afterBrush()});else{var ee=this;requestAnimationFrame$1(function(){ee._paintList(G,H,W,Z)})}}},U.prototype._compositeManually=function(){var G=this.getLayer(CANVAS_ZLEVEL).ctx,H=this._domRoot.width,W=this._domRoot.height;G.clearRect(0,0,H,W),this.eachBuiltinLayer(function(Z){Z.virtual&&G.drawImage(Z.dom,0,0,H,W)})},U.prototype._doPaintList=function(G,H,W){for(var Z=this,X=[],K=this._opts.useDirtyRect,Q=0;Q<this._zlevelList.length;Q++){var ee=this._zlevelList[Q],te=this._layers[ee];te.__builtin__&&te!==this._hoverlayer&&(te.__dirty||W)&&X.push(te)}for(var re=!0,ae=!1,ne=function(se){var le=X[se],ue=le.ctx,ce=K&&le.createRepaintRects(G,H,ie._width,ie._height),fe=W?le.__startIndex:le.__drawIndex,he=!W&&le.incremental&&Date.now,ve=he&&Date.now(),de=le.zlevel===ie._zlevelList[0]?ie._backgroundColor:null;if(le.__startIndex===le.__endIndex)le.clear(!1,de,ce);else if(fe===le.__startIndex){var pe=G[fe];(!pe.incremental||!pe.notClear||W)&&le.clear(!1,de,ce)}fe===-1&&(console.error("For some unknown reason. drawIndex is -1"),fe=le.__startIndex);var ge,me=function(Se){var Te={inHover:!1,allClipped:!1,prevEl:null,viewWidth:Z._width,viewHeight:Z._height};for(ge=fe;ge<le.__endIndex;ge++){var be=G[ge];if(be.__inHover&&(ae=!0),Z._doPaintEl(be,le,K,Se,Te,ge===le.__endIndex-1),he){var Ae=Date.now()-ve;if(Ae>15)break}}Te.prevElClipPaths&&ue.restore()};if(ce)if(ce.length===0)ge=le.__endIndex;else for(var ye=ie.dpr,_e=0;_e<ce.length;++_e){var xe=ce[_e];ue.save(),ue.beginPath(),ue.rect(xe.x*ye,xe.y*ye,xe.width*ye,xe.height*ye),ue.clip(),me(xe),ue.restore()}else ue.save(),me(),ue.restore();le.__drawIndex=ge,le.__drawIndex<le.__endIndex&&(re=!1)},ie=this,oe=0;oe<X.length;oe++)ne(oe);return env.wxa&&each$f(this._layers,function(se){se&&se.ctx&&se.ctx.draw&&se.ctx.draw()}),{finished:re,needsRefreshHover:ae}},U.prototype._doPaintEl=function(G,H,W,Z,X,K){var Q=H.ctx;if(W){var ee=G.getPaintRect();(!Z||ee&&ee.intersect(Z))&&(brush$1(Q,G,X,K),G.setPrevPaintRect(ee))}else brush$1(Q,G,X,K)},U.prototype.getLayer=function(G,H){this._singleCanvas&&!this._needsManuallyCompositing&&(G=CANVAS_ZLEVEL);var W=this._layers[G];return W||(W=new Layer("zr_"+G,this,this.dpr),W.zlevel=G,W.__builtin__=!0,this._layerConfig[G]?merge(W,this._layerConfig[G],!0):this._layerConfig[G-EL_AFTER_INCREMENTAL_INC]&&merge(W,this._layerConfig[G-EL_AFTER_INCREMENTAL_INC],!0),H&&(W.virtual=H),this.insertLayer(G,W),W.initContext()),W},U.prototype.insertLayer=function(G,H){var W=this._layers,Z=this._zlevelList,X=Z.length,K=this._domRoot,Q=null,ee=-1;if(W[G]){process.env.NODE_ENV!=="production"&&logError("ZLevel "+G+" has been used already");return}if(!isLayerValid(H)){process.env.NODE_ENV!=="production"&&logError("Layer of zlevel "+G+" is not valid");return}if(X>0&&G>Z[0]){for(ee=0;ee<X-1&&!(Z[ee]<G&&Z[ee+1]>G);ee++);Q=W[Z[ee]]}if(Z.splice(ee+1,0,G),W[G]=H,!H.virtual)if(Q){var te=Q.dom;te.nextSibling?K.insertBefore(H.dom,te.nextSibling):K.appendChild(H.dom)}else K.firstChild?K.insertBefore(H.dom,K.firstChild):K.appendChild(H.dom);H.painter||(H.painter=this)},U.prototype.eachLayer=function(G,H){for(var W=this._zlevelList,Z=0;Z<W.length;Z++){var X=W[Z];G.call(H,this._layers[X],X)}},U.prototype.eachBuiltinLayer=function(G,H){for(var W=this._zlevelList,Z=0;Z<W.length;Z++){var X=W[Z],K=this._layers[X];K.__builtin__&&G.call(H,K,X)}},U.prototype.eachOtherLayer=function(G,H){for(var W=this._zlevelList,Z=0;Z<W.length;Z++){var X=W[Z],K=this._layers[X];K.__builtin__||G.call(H,K,X)}},U.prototype.getLayers=function(){return this._layers},U.prototype._updateLayerStatus=function(G){this.eachBuiltinLayer(function(ae,ne){ae.__dirty=ae.__used=!1});function H(ae){X&&(X.__endIndex!==ae&&(X.__dirty=!0),X.__endIndex=ae)}if(this._singleCanvas)for(var W=1;W<G.length;W++){var Z=G[W];if(Z.zlevel!==G[W-1].zlevel||Z.incremental){this._needsManuallyCompositing=!0;break}}var X=null,K=0,Q,ee;for(ee=0;ee<G.length;ee++){var Z=G[ee],te=Z.zlevel,re=void 0;Q!==te&&(Q=te,K=0),Z.incremental?(re=this.getLayer(te+INCREMENTAL_INC,this._needsManuallyCompositing),re.incremental=!0,K=1):re=this.getLayer(te+(K>0?EL_AFTER_INCREMENTAL_INC:0),this._needsManuallyCompositing),re.__builtin__||logError("ZLevel "+te+" has been used by unkown layer "+re.id),re!==X&&(re.__used=!0,re.__startIndex!==ee&&(re.__dirty=!0),re.__startIndex=ee,re.incremental?re.__drawIndex=-1:re.__drawIndex=ee,H(ee),X=re),Z.__dirty&REDRAW_BIT&&!Z.__inHover&&(re.__dirty=!0,re.incremental&&re.__drawIndex<0&&(re.__drawIndex=ee))}H(ee),this.eachBuiltinLayer(function(ae,ne){!ae.__used&&ae.getElementCount()>0&&(ae.__dirty=!0,ae.__startIndex=ae.__endIndex=ae.__drawIndex=0),ae.__dirty&&ae.__drawIndex<0&&(ae.__drawIndex=ae.__startIndex)})},U.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},U.prototype._clearLayer=function(G){G.clear()},U.prototype.setBackgroundColor=function(G){this._backgroundColor=G,each$f(this._layers,function(H){H.setUnpainted()})},U.prototype.configLayer=function(G,H){if(H){var W=this._layerConfig;W[G]?merge(W[G],H,!0):W[G]=H;for(var Z=0;Z<this._zlevelList.length;Z++){var X=this._zlevelList[Z];if(X===G||X===G+EL_AFTER_INCREMENTAL_INC){var K=this._layers[X];merge(K,W[G],!0)}}}},U.prototype.delLayer=function(G){var H=this._layers,W=this._zlevelList,Z=H[G];Z&&(Z.dom.parentNode.removeChild(Z.dom),delete H[G],W.splice(indexOf(W,G),1))},U.prototype.resize=function(G,H){if(this._domRoot.style){var W=this._domRoot;W.style.display="none";var Z=this._opts,X=this.root;if(G!=null&&(Z.width=G),H!=null&&(Z.height=H),G=getSize$1(X,0,Z),H=getSize$1(X,1,Z),W.style.display="",this._width!==G||H!==this._height){W.style.width=G+"px",W.style.height=H+"px";for(var K in this._layers)this._layers.hasOwnProperty(K)&&this._layers[K].resize(G,H);this.refresh(!0)}this._width=G,this._height=H}else{if(G==null||H==null)return;this._width=G,this._height=H,this.getLayer(CANVAS_ZLEVEL).resize(G,H)}return this},U.prototype.clearLayer=function(G){var H=this._layers[G];H&&H.clear()},U.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},U.prototype.getRenderedCanvas=function(G){if(G=G||{},this._singleCanvas&&!this._compositeManually)return this._layers[CANVAS_ZLEVEL].dom;var H=new Layer("image",this,G.pixelRatio||this.dpr);H.initContext(),H.clear(!1,G.backgroundColor||this._backgroundColor);var W=H.ctx;if(G.pixelRatio<=this.dpr){this.refresh();var Z=H.dom.width,X=H.dom.height;this.eachLayer(function(ae){ae.__builtin__?W.drawImage(ae.dom,0,0,Z,X):ae.renderToCanvas&&(W.save(),ae.renderToCanvas(W),W.restore())})}else for(var K={inHover:!1,viewWidth:this._width,viewHeight:this._height},Q=this.storage.getDisplayList(!0),ee=0,te=Q.length;ee<te;ee++){var re=Q[ee];brush$1(W,re,K,ee===te-1)}return H.dom},U.prototype.getWidth=function(){return this._width},U.prototype.getHeight=function(){return this._height},U})();function install$V(U){U.registerPainter("canvas",CanvasPainter)}var LineSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.hasSymbolVisual=!0,H}return G.prototype.getInitialData=function(H){if(process.env.NODE_ENV!=="production"){var W=H.coordinateSystem;if(W!=="polar"&&W!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return createSeriesData$1(null,this,{useEncodeDefaulter:!0})},G.prototype.getLegendIcon=function(H){var W=new Group$3,Z=createSymbol$1("line",0,H.itemHeight/2,H.itemWidth,0,H.lineStyle.stroke,!1);W.add(Z),Z.setStyle(H.lineStyle);var X=this.getData().getVisual("symbol"),K=this.getData().getVisual("symbolRotate"),Q=X==="none"?"circle":X,ee=H.itemHeight*.8,te=createSymbol$1(Q,(H.itemWidth-ee)/2,(H.itemHeight-ee)/2,ee,ee,H.itemStyle.fill);W.add(te),te.setStyle(H.itemStyle);var re=H.iconRotate==="inherit"?K:H.iconRotate||0;return te.rotation=re*Math.PI/180,te.setOrigin([H.itemWidth/2,H.itemHeight/2]),Q.indexOf("empty")>-1&&(te.style.stroke=te.style.fill,te.style.fill=tokens.color.neutral00,te.style.lineWidth=2),W},G.type="series.line",G.dependencies=["grid","polar"],G.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},G})(SeriesModel);function getDefaultLabel(U,G){var H=U.mapDimensionsAll("defaultedLabel"),W=H.length;if(W===1){var Z=retrieveRawValue(U,G,H[0]);return Z!=null?Z+"":null}else if(W){for(var X=[],K=0;K<H.length;K++)X.push(retrieveRawValue(U,G,H[K]));return X.join(" ")}}function getDefaultInterpolatedLabel(U,G){var H=U.mapDimensionsAll("defaultedLabel");if(!isArray$1(G))return G+"";for(var W=[],Z=0;Z<H.length;Z++){var X=U.getDimensionIndex(H[Z]);X>=0&&W.push(G[X])}return W.join(" ")}var Symbol$1=(function(U){__extends(G,U);function G(H,W,Z,X){var K=U.call(this)||this;return K.updateData(H,W,Z,X),K}return G.prototype._createSymbol=function(H,W,Z,X,K,Q){this.removeAll();var ee=createSymbol$1(H,-1,-1,2,2,null,Q);ee.attr({z2:retrieve2(K,100),culling:!0,scaleX:X[0]/2,scaleY:X[1]/2}),ee.drift=driftSymbol,this._symbolType=H,this.add(ee)},G.prototype.stopSymbolAnimation=function(H){this.childAt(0).stopAnimation(null,H)},G.prototype.getSymbolType=function(){return this._symbolType},G.prototype.getSymbolPath=function(){return this.childAt(0)},G.prototype.highlight=function(){enterEmphasis(this.childAt(0))},G.prototype.downplay=function(){leaveEmphasis(this.childAt(0))},G.prototype.setZ=function(H,W){var Z=this.childAt(0);Z.zlevel=H,Z.z=W},G.prototype.setDraggable=function(H,W){var Z=this.childAt(0);Z.draggable=H,Z.cursor=!W&&H?"move":Z.cursor},G.prototype.updateData=function(H,W,Z,X){this.silent=!1;var K=H.getItemVisual(W,"symbol")||"circle",Q=H.hostModel,ee=G.getSymbolSize(H,W),te=G.getSymbolZ2(H,W),re=K!==this._symbolType,ae=X&&X.disableAnimation;if(re){var ne=H.getItemVisual(W,"symbolKeepAspect");this._createSymbol(K,H,W,ee,te,ne)}else{var ie=this.childAt(0);ie.silent=!1;var oe={scaleX:ee[0]/2,scaleY:ee[1]/2};ae?ie.attr(oe):updateProps$1(ie,oe,Q,W),saveOldStyle(ie)}if(this._updateCommon(H,W,ee,Z,X),re){var ie=this.childAt(0);if(!ae){var oe={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:ie.style.opacity}};ie.scaleX=ie.scaleY=0,ie.style.opacity=0,initProps(ie,oe,Q,W)}}ae&&this.childAt(0).stopAnimation("leave")},G.prototype._updateCommon=function(H,W,Z,X,K){var Q=this.childAt(0),ee=H.hostModel,te,re,ae,ne,ie,oe,se,le,ue;if(X&&(te=X.emphasisItemStyle,re=X.blurItemStyle,ae=X.selectItemStyle,ne=X.focus,ie=X.blurScope,se=X.labelStatesModels,le=X.hoverScale,ue=X.cursorStyle,oe=X.emphasisDisabled),!X||H.hasItemOption){var ce=X&&X.itemModel?X.itemModel:H.getItemModel(W),fe=ce.getModel("emphasis");te=fe.getModel("itemStyle").getItemStyle(),ae=ce.getModel(["select","itemStyle"]).getItemStyle(),re=ce.getModel(["blur","itemStyle"]).getItemStyle(),ne=fe.get("focus"),ie=fe.get("blurScope"),oe=fe.get("disabled"),se=getLabelStatesModels(ce),le=fe.getShallow("scale"),ue=ce.getShallow("cursor")}var he=H.getItemVisual(W,"symbolRotate");Q.attr("rotation",(he||0)*Math.PI/180||0);var ve=normalizeSymbolOffset(H.getItemVisual(W,"symbolOffset"),Z);ve&&(Q.x=ve[0],Q.y=ve[1]),ue&&Q.attr("cursor",ue);var de=H.getItemVisual(W,"style"),pe=de.fill;if(Q instanceof ZRImage){var ge=Q.style;Q.useStyle(extend({image:ge.image,x:ge.x,y:ge.y,width:ge.width,height:ge.height},de))}else Q.__isEmptyBrush?Q.useStyle(extend({},de)):Q.useStyle(de),Q.style.decal=null,Q.setColor(pe,K&&K.symbolInnerColor),Q.style.strokeNoScale=!0;var me=H.getItemVisual(W,"liftZ"),ye=this._z2;me!=null?ye==null&&(this._z2=Q.z2,Q.z2+=me):ye!=null&&(Q.z2=ye,this._z2=null);var _e=K&&K.useNameLabel;setLabelStyle(Q,se,{labelFetcher:ee,labelDataIndex:W,defaultText:xe,inheritColor:pe,defaultOpacity:de.opacity});function xe(be){return _e?H.getName(be):getDefaultLabel(H,be)}this._sizeX=Z[0]/2,this._sizeY=Z[1]/2;var Se=Q.ensureState("emphasis");Se.style=te,Q.ensureState("select").style=ae,Q.ensureState("blur").style=re;var Te=le==null||le===!0?Math.max(1.1,3/this._sizeY):isFinite(le)&&le>0?+le:1;Se.scaleX=this._sizeX*Te,Se.scaleY=this._sizeY*Te,this.setSymbolScale(1),toggleHoverEmphasis(this,ne,ie,oe)},G.prototype.setSymbolScale=function(H){this.scaleX=this.scaleY=H},G.prototype.fadeOut=function(H,W,Z){var X=this.childAt(0),K=getECData(this).dataIndex,Q=Z&&Z.animation;if(this.silent=X.silent=!0,Z&&Z.fadeLabel){var ee=X.getTextContent();ee&&removeElement(ee,{style:{opacity:0}},W,{dataIndex:K,removeOpt:Q,cb:function(){X.removeTextContent()}})}else X.removeTextContent();removeElement(X,{style:{opacity:0},scaleX:0,scaleY:0},W,{dataIndex:K,cb:H,removeOpt:Q})},G.getSymbolSize=function(H,W){return normalizeSymbolSize(H.getItemVisual(W,"symbolSize"))},G.getSymbolZ2=function(H,W){return H.getItemVisual(W,"z2")},G})(Group$3);function driftSymbol(U,G){this.parent.drift(U,G)}function symbolNeedsDraw$1(U,G,H,W){return G&&!isNaN(G[0])&&!isNaN(G[1])&&!(W.isIgnore&&W.isIgnore(H))&&!(W.clipShape&&!W.clipShape.contain(G[0],G[1]))&&U.getItemVisual(H,"symbol")!=="none"}function normalizeUpdateOpt(U){return U!=null&&!isObject$3(U)&&(U={isIgnore:U}),U||{}}function makeSeriesScope$2(U){var G=U.hostModel,H=G.getModel("emphasis");return{emphasisItemStyle:H.getModel("itemStyle").getItemStyle(),blurItemStyle:G.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:G.getModel(["select","itemStyle"]).getItemStyle(),focus:H.get("focus"),blurScope:H.get("blurScope"),emphasisDisabled:H.get("disabled"),hoverScale:H.get("scale"),labelStatesModels:getLabelStatesModels(G),cursorStyle:G.get("cursor")}}var SymbolDraw=(function(){function U(G){this.group=new Group$3,this._SymbolCtor=G||Symbol$1}return U.prototype.updateData=function(G,H){this._progressiveEls=null,H=normalizeUpdateOpt(H);var W=this.group,Z=G.hostModel,X=this._data,K=this._SymbolCtor,Q=H.disableAnimation,ee=makeSeriesScope$2(G),te={disableAnimation:Q},re=H.getSymbolPoint||function(ae){return G.getItemLayout(ae)};X||W.removeAll(),G.diff(X).add(function(ae){var ne=re(ae);if(symbolNeedsDraw$1(G,ne,ae,H)){var ie=new K(G,ae,ee,te);ie.setPosition(ne),G.setItemGraphicEl(ae,ie),W.add(ie)}}).update(function(ae,ne){var ie=X.getItemGraphicEl(ne),oe=re(ae);if(!symbolNeedsDraw$1(G,oe,ae,H)){W.remove(ie);return}var se=G.getItemVisual(ae,"symbol")||"circle",le=ie&&ie.getSymbolType&&ie.getSymbolType();if(!ie||le&&le!==se)W.remove(ie),ie=new K(G,ae,ee,te),ie.setPosition(oe);else{ie.updateData(G,ae,ee,te);var ue={x:oe[0],y:oe[1]};Q?ie.attr(ue):updateProps$1(ie,ue,Z)}W.add(ie),G.setItemGraphicEl(ae,ie)}).remove(function(ae){var ne=X.getItemGraphicEl(ae);ne&&ne.fadeOut(function(){W.remove(ne)},Z)}).execute(),this._getSymbolPoint=re,this._data=G},U.prototype.updateLayout=function(){var G=this,H=this._data;H&&H.eachItemGraphicEl(function(W,Z){var X=G._getSymbolPoint(Z);W.setPosition(X),W.markRedraw()})},U.prototype.incrementalPrepareUpdate=function(G){this._seriesScope=makeSeriesScope$2(G),this._data=null,this.group.removeAll()},U.prototype.incrementalUpdate=function(G,H,W){this._progressiveEls=[],W=normalizeUpdateOpt(W);function Z(ee){ee.isGroup||(ee.incremental=!0,ee.ensureState("emphasis").hoverLayer=!0)}for(var X=G.start;X<G.end;X++){var K=H.getItemLayout(X);if(symbolNeedsDraw$1(H,K,X,W)){var Q=new this._SymbolCtor(H,X,this._seriesScope);Q.traverse(Z),Q.setPosition(K),this.group.add(Q),H.setItemGraphicEl(X,Q),this._progressiveEls.push(Q)}}},U.prototype.eachRendered=function(G){traverseElements(this._progressiveEls||this.group,G)},U.prototype.remove=function(G){var H=this.group,W=this._data;W&&G?W.eachItemGraphicEl(function(Z){Z.fadeOut(function(){H.remove(Z)},W.hostModel)}):H.removeAll()},U})();function prepareDataCoordInfo(U,G,H){var W=U.getBaseAxis(),Z=U.getOtherAxis(W),X=getValueStart(Z,H),K=W.dim,Q=Z.dim,ee=G.mapDimension(Q),te=G.mapDimension(K),re=Q==="x"||Q==="radius"?1:0,ae=map$1(U.dimensions,function(oe){return G.mapDimension(oe)}),ne=!1,ie=G.getCalculationInfo("stackResultDimension");return isDimensionStacked(G,ae[0])&&(ne=!0,ae[0]=ie),isDimensionStacked(G,ae[1])&&(ne=!0,ae[1]=ie),{dataDimsForPoint:ae,valueStart:X,valueAxisDim:Q,baseAxisDim:K,stacked:!!ne,valueDim:ee,baseDim:te,baseDataOffset:re,stackedOverDimension:G.getCalculationInfo("stackedOverDimension")}}function getValueStart(U,G){var H=0,W=U.scale.getExtent();return G==="start"?H=W[0]:G==="end"?H=W[1]:isNumber(G)&&!isNaN(G)?H=G:W[0]>0?H=W[0]:W[1]<0&&(H=W[1]),H}function getStackedOnPoint(U,G,H,W){var Z=NaN;U.stacked&&(Z=H.get(H.getCalculationInfo("stackedOverDimension"),W)),isNaN(Z)&&(Z=U.valueStart);var X=U.baseDataOffset,K=[];return K[X]=H.get(U.baseDim,W),K[1-X]=Z,G.dataToPoint(K)}function diffData(U,G){var H=[];return G.diff(U).add(function(W){H.push({cmd:"+",idx:W})}).update(function(W,Z){H.push({cmd:"=",idx:Z,idx1:W})}).remove(function(W){H.push({cmd:"-",idx:W})}).execute(),H}function lineAnimationDiff(U,G,H,W,Z,X,K,Q){for(var ee=diffData(U,G),te=[],re=[],ae=[],ne=[],ie=[],oe=[],se=[],le=prepareDataCoordInfo(Z,G,K),ue=U.getLayout("points")||[],ce=G.getLayout("points")||[],fe=0;fe<ee.length;fe++){var he=ee[fe],ve=!0,de=void 0,pe=void 0;switch(he.cmd){case"=":de=he.idx*2,pe=he.idx1*2;var ge=ue[de],me=ue[de+1],ye=ce[pe],_e=ce[pe+1];(isNaN(ge)||isNaN(me))&&(ge=ye,me=_e),te.push(ge,me),re.push(ye,_e),ae.push(H[de],H[de+1]),ne.push(W[pe],W[pe+1]),se.push(G.getRawIndex(he.idx1));break;case"+":var xe=he.idx,Se=le.dataDimsForPoint,Te=Z.dataToPoint([G.get(Se[0],xe),G.get(Se[1],xe)]);pe=xe*2,te.push(Te[0],Te[1]),re.push(ce[pe],ce[pe+1]);var be=getStackedOnPoint(le,Z,G,xe);ae.push(be[0],be[1]),ne.push(W[pe],W[pe+1]),se.push(G.getRawIndex(xe));break;case"-":ve=!1}ve&&(ie.push(he),oe.push(oe.length))}oe.sort(function($e,Ve){return se[$e]-se[Ve]});for(var Ae=te.length,we=createFloat32Array(Ae),Ce=createFloat32Array(Ae),Ee=createFloat32Array(Ae),Me=createFloat32Array(Ae),De=[],fe=0;fe<oe.length;fe++){var Le=oe[fe],Pe=fe*2,Ie=Le*2;we[Pe]=te[Ie],we[Pe+1]=te[Ie+1],Ce[Pe]=re[Ie],Ce[Pe+1]=re[Ie+1],Ee[Pe]=ae[Ie],Ee[Pe+1]=ae[Ie+1],Me[Pe]=ne[Ie],Me[Pe+1]=ne[Ie+1],De[fe]=ie[Le]}return{current:we,next:Ce,stackedOnCurrent:Ee,stackedOnNext:Me,status:De}}var mathMin$5=Math.min,mathMax$5=Math.max;function isPointNull$1(U,G){return isNaN(U)||isNaN(G)}function drawSegment(U,G,H,W,Z,X,K,Q,ee){for(var te,re,ae,ne,ie,oe,se=H,le=0;le<W;le++){var ue=G[se*2],ce=G[se*2+1];if(se>=Z||se<0)break;if(isPointNull$1(ue,ce)){if(ee){se+=X;continue}break}if(se===H)U[X>0?"moveTo":"lineTo"](ue,ce),ae=ue,ne=ce;else{var fe=ue-te,he=ce-re;if(fe*fe+he*he<.5){se+=X;continue}if(K>0){for(var ve=se+X,de=G[ve*2],pe=G[ve*2+1];de===ue&&pe===ce&&le<W;)le++,ve+=X,se+=X,de=G[ve*2],pe=G[ve*2+1],ue=G[se*2],ce=G[se*2+1],fe=ue-te,he=ce-re;var ge=le+1;if(ee)for(;isPointNull$1(de,pe)&&ge<W;)ge++,ve+=X,de=G[ve*2],pe=G[ve*2+1];var me=.5,ye=0,_e=0,xe=void 0,Se=void 0;if(ge>=W||isPointNull$1(de,pe))ie=ue,oe=ce;else{ye=de-te,_e=pe-re;var Te=ue-te,be=de-ue,Ae=ce-re,we=pe-ce,Ce=void 0,Ee=void 0;if(Q==="x"){Ce=Math.abs(Te),Ee=Math.abs(be);var Me=ye>0?1:-1;ie=ue-Me*Ce*K,oe=ce,xe=ue+Me*Ee*K,Se=ce}else if(Q==="y"){Ce=Math.abs(Ae),Ee=Math.abs(we);var De=_e>0?1:-1;ie=ue,oe=ce-De*Ce*K,xe=ue,Se=ce+De*Ee*K}else Ce=Math.sqrt(Te*Te+Ae*Ae),Ee=Math.sqrt(be*be+we*we),me=Ee/(Ee+Ce),ie=ue-ye*K*(1-me),oe=ce-_e*K*(1-me),xe=ue+ye*K*me,Se=ce+_e*K*me,xe=mathMin$5(xe,mathMax$5(de,ue)),Se=mathMin$5(Se,mathMax$5(pe,ce)),xe=mathMax$5(xe,mathMin$5(de,ue)),Se=mathMax$5(Se,mathMin$5(pe,ce)),ye=xe-ue,_e=Se-ce,ie=ue-ye*Ce/Ee,oe=ce-_e*Ce/Ee,ie=mathMin$5(ie,mathMax$5(te,ue)),oe=mathMin$5(oe,mathMax$5(re,ce)),ie=mathMax$5(ie,mathMin$5(te,ue)),oe=mathMax$5(oe,mathMin$5(re,ce)),ye=ue-ie,_e=ce-oe,xe=ue+ye*Ee/Ce,Se=ce+_e*Ee/Ce}U.bezierCurveTo(ae,ne,ie,oe,ue,ce),ae=xe,ne=Se}else U.lineTo(ue,ce)}te=ue,re=ce,se+=X}return le}var ECPolylineShape=(function(){function U(){this.smooth=0,this.smoothConstraint=!0}return U})(),ECPolyline=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="ec-polyline",W}return G.prototype.getDefaultStyle=function(){return{stroke:tokens.color.neutral99,fill:null}},G.prototype.getDefaultShape=function(){return new ECPolylineShape},G.prototype.buildPath=function(H,W){var Z=W.points,X=0,K=Z.length/2;if(W.connectNulls){for(;K>0&&isPointNull$1(Z[K*2-2],Z[K*2-1]);K--);for(;X<K&&isPointNull$1(Z[X*2],Z[X*2+1]);X++);}for(;X<K;)X+=drawSegment(H,Z,X,K,K,1,W.smooth,W.smoothMonotone,W.connectNulls)+1},G.prototype.getPointOn=function(H,W){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var Z=this.path,X=Z.data,K=PathProxy.CMD,Q,ee,te=W==="x",re=[],ae=0;ae<X.length;){var ne=X[ae++],ie=void 0,oe=void 0,se=void 0,le=void 0,ue=void 0,ce=void 0,fe=void 0;switch(ne){case K.M:Q=X[ae++],ee=X[ae++];break;case K.L:if(ie=X[ae++],oe=X[ae++],fe=te?(H-Q)/(ie-Q):(H-ee)/(oe-ee),fe<=1&&fe>=0){var he=te?(oe-ee)*fe+ee:(ie-Q)*fe+Q;return te?[H,he]:[he,H]}Q=ie,ee=oe;break;case K.C:ie=X[ae++],oe=X[ae++],se=X[ae++],le=X[ae++],ue=X[ae++],ce=X[ae++];var ve=te?cubicRootAt(Q,ie,se,ue,H,re):cubicRootAt(ee,oe,le,ce,H,re);if(ve>0)for(var de=0;de<ve;de++){var pe=re[de];if(pe<=1&&pe>=0){var he=te?cubicAt(ee,oe,le,ce,pe):cubicAt(Q,ie,se,ue,pe);return te?[H,he]:[he,H]}}Q=ue,ee=ce;break}}},G})(Path),ECPolygonShape=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G})(ECPolylineShape),ECPolygon=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="ec-polygon",W}return G.prototype.getDefaultShape=function(){return new ECPolygonShape},G.prototype.buildPath=function(H,W){var Z=W.points,X=W.stackedOnPoints,K=0,Q=Z.length/2,ee=W.smoothMonotone;if(W.connectNulls){for(;Q>0&&isPointNull$1(Z[Q*2-2],Z[Q*2-1]);Q--);for(;K<Q&&isPointNull$1(Z[K*2],Z[K*2+1]);K++);}for(;K<Q;){var te=drawSegment(H,Z,K,Q,Q,1,W.smooth,ee,W.connectNulls);drawSegment(H,X,K+te-1,te,Q,-1,W.stackedOnSmooth,ee,W.connectNulls),K+=te+1,H.closePath()}},G})(Path);function createGridClipPath(U,G,H,W,Z){var X=U.getArea(),K=X.x,Q=X.y,ee=X.width,te=X.height,re=H.get(["lineStyle","width"])||0;K-=re/2,Q-=re/2,ee+=re,te+=re,ee=Math.ceil(ee),K!==Math.floor(K)&&(K=Math.floor(K),ee++);var ae=new Rect$2({shape:{x:K,y:Q,width:ee,height:te}});if(G){var ne=U.getBaseAxis(),ie=ne.isHorizontal(),oe=ne.inverse;ie?(oe&&(ae.shape.x+=ee),ae.shape.width=0):(oe||(ae.shape.y+=te),ae.shape.height=0);var se=isFunction(Z)?function(le){Z(le,ae)}:null;initProps(ae,{shape:{width:ee,height:te,x:K,y:Q}},H,null,W,se)}return ae}function createPolarClipPath(U,G,H){var W=U.getArea(),Z=round$4(W.r0,1),X=round$4(W.r,1),K=new Sector({shape:{cx:round$4(U.cx,1),cy:round$4(U.cy,1),r0:Z,r:X,startAngle:W.startAngle,endAngle:W.endAngle,clockwise:W.clockwise}});if(G){var Q=U.getBaseAxis().dim==="angle";Q?K.shape.endAngle=W.startAngle:K.shape.r=Z,initProps(K,{shape:{endAngle:W.endAngle,r:X}},H)}return K}function createClipPath(U,G,H,W,Z){if(U){if(U.type==="polar")return createPolarClipPath(U,G,H);if(U.type==="cartesian2d")return createGridClipPath(U,G,H,W,Z)}else return null;return null}function isCoordinateSystemType(U,G){return U.type===G}function isPointsSame(U,G){if(U.length===G.length){for(var H=0;H<U.length;H++)if(U[H]!==G[H])return;return!0}}function bboxFromPoints(U){for(var G=1/0,H=1/0,W=-1/0,Z=-1/0,X=0;X<U.length;){var K=U[X++],Q=U[X++];isNaN(K)||(G=Math.min(K,G),W=Math.max(K,W)),isNaN(Q)||(H=Math.min(Q,H),Z=Math.max(Q,Z))}return[[G,H],[W,Z]]}function getBoundingDiff(U,G){var H=bboxFromPoints(U),W=H[0],Z=H[1],X=bboxFromPoints(G),K=X[0],Q=X[1];return Math.max(Math.abs(W[0]-K[0]),Math.abs(W[1]-K[1]),Math.abs(Z[0]-Q[0]),Math.abs(Z[1]-Q[1]))}function getSmooth(U){return isNumber(U)?U:U?.5:0}function getStackedOnPoints(U,G,H){if(!H.valueDim)return[];for(var W=G.count(),Z=createFloat32Array(W*2),X=0;X<W;X++){var K=getStackedOnPoint(H,U,G,X);Z[X*2]=K[0],Z[X*2+1]=K[1]}return Z}function turnPointsIntoStep(U,G,H,W,Z){var X=H.getBaseAxis(),K=X.dim==="x"||X.dim==="radius"?0:1,Q=[],ee=0,te=[],re=[],ae=[],ne=[];if(Z){for(ee=0;ee<U.length;ee+=2){var ie=G||U;!isNaN(ie[ee])&&!isNaN(ie[ee+1])&&ne.push(U[ee],U[ee+1])}U=ne}for(ee=0;ee<U.length-2;ee+=2)switch(ae[0]=U[ee+2],ae[1]=U[ee+3],re[0]=U[ee],re[1]=U[ee+1],Q.push(re[0],re[1]),W){case"end":te[K]=ae[K],te[1-K]=re[1-K],Q.push(te[0],te[1]);break;case"middle":var oe=(re[K]+ae[K])/2,se=[];te[K]=se[K]=oe,te[1-K]=re[1-K],se[1-K]=ae[1-K],Q.push(te[0],te[1]),Q.push(se[0],se[1]);break;default:te[K]=re[K],te[1-K]=ae[1-K],Q.push(te[0],te[1])}return Q.push(U[ee++],U[ee++]),Q}function clipColorStops(U,G){var H=[],W=U.length,Z,X;function K(re,ae,ne){var ie=re.coord,oe=(ne-ie)/(ae.coord-ie),se=lerp(oe,[re.color,ae.color]);return{coord:ne,color:se}}for(var Q=0;Q<W;Q++){var ee=U[Q],te=ee.coord;if(te<0)Z=ee;else if(te>G){X?H.push(K(X,ee,G)):Z&&H.push(K(Z,ee,0),K(Z,ee,G));break}else Z&&(H.push(K(Z,ee,0)),Z=null),H.push(ee),X=ee}return H}function getVisualGradient(U,G,H){var W=U.getVisual("visualMeta");if(!(!W||!W.length||!U.count())){if(G.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var Z,X,K=W.length-1;K>=0;K--){var Q=U.getDimensionInfo(W[K].dimension);if(Z=Q&&Q.coordDim,Z==="x"||Z==="y"){X=W[K];break}}if(!X){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var ee=G.getAxis(Z),te=map$1(X.stops,function(fe){return{coord:ee.toGlobalCoord(ee.dataToCoord(fe.value)),color:fe.color}}),re=te.length,ae=X.outerColors.slice();re&&te[0].coord>te[re-1].coord&&(te.reverse(),ae.reverse());var ne=clipColorStops(te,Z==="x"?H.getWidth():H.getHeight()),ie=ne.length;if(!ie&&re)return te[0].coord<0?ae[1]?ae[1]:te[re-1].color:ae[0]?ae[0]:te[0].color;var oe=10,se=ne[0].coord-oe,le=ne[ie-1].coord+oe,ue=le-se;if(ue<.001)return"transparent";each$f(ne,function(fe){fe.offset=(fe.coord-se)/ue}),ne.push({offset:ie?ne[ie-1].offset:.5,color:ae[1]||"transparent"}),ne.unshift({offset:ie?ne[0].offset:.5,color:ae[0]||"transparent"});var ce=new LinearGradient(0,0,0,0,ne,!0);return ce[Z]=se,ce[Z+"2"]=le,ce}}function getIsIgnoreFunc(U,G,H){var W=U.get("showAllSymbol"),Z=W==="auto";if(!(W&&!Z)){var X=H.getAxesByScale("ordinal")[0];if(X&&!(Z&&canShowAllSymbolForCategory(X,G))){var K=G.mapDimension(X.dim),Q={};return each$f(X.getViewLabels(),function(ee){var te=X.scale.getRawOrdinalNumber(ee.tickValue);Q[te]=1}),function(ee){return!Q.hasOwnProperty(G.get(K,ee))}}}}function canShowAllSymbolForCategory(U,G){var H=U.getExtent(),W=Math.abs(H[1]-H[0])/U.scale.count();isNaN(W)&&(W=0);for(var Z=G.count(),X=Math.max(1,Math.round(Z/5)),K=0;K<Z;K+=X)if(Symbol$1.getSymbolSize(G,K)[U.isHorizontal()?1:0]*1.5>W)return!1;return!0}function isPointNull(U,G){return isNaN(U)||isNaN(G)}function getLastIndexNotNull(U){for(var G=U.length/2;G>0&&isPointNull(U[G*2-2],U[G*2-1]);G--);return G-1}function getPointAtIndex(U,G){return[U[G*2],U[G*2+1]]}function getIndexRange(U,G,H){for(var W=U.length/2,Z=H==="x"?0:1,X,K,Q=0,ee=-1,te=0;te<W;te++)if(K=U[te*2+Z],!(isNaN(K)||isNaN(U[te*2+1-Z]))){if(te===0){X=K;continue}if(X<=G&&K>=G||X>=G&&K<=G){ee=te;break}Q=te,X=K}return{range:[Q,ee],t:(G-X)/(K-X)}}function anyStateShowEndLabel(U){if(U.get(["endLabel","show"]))return!0;for(var G=0;G<SPECIAL_STATES.length;G++)if(U.get([SPECIAL_STATES[G],"endLabel","show"]))return!0;return!1}function createLineClipPath(U,G,H,W){if(isCoordinateSystemType(G,"cartesian2d")){var Z=W.getModel("endLabel"),X=Z.get("valueAnimation"),K=W.getData(),Q={lastFrameIndex:0},ee=anyStateShowEndLabel(W)?function(ie,oe){U._endLabelOnDuring(ie,oe,K,Q,X,Z,G)}:null,te=G.getBaseAxis().isHorizontal(),re=createGridClipPath(G,H,W,function(){var ie=U._endLabel;ie&&H&&Q.originalX!=null&&ie.attr({x:Q.originalX,y:Q.originalY})},ee);if(!W.get("clip",!0)){var ae=re.shape,ne=Math.max(ae.width,ae.height);te?(ae.y-=ne,ae.height+=ne*2):(ae.x-=ne,ae.width+=ne*2)}return ee&&ee(1,re),re}else return process.env.NODE_ENV!=="production"&&W.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),createPolarClipPath(G,H,W)}function getEndLabelStateSpecified(U,G){var H=G.getBaseAxis(),W=H.isHorizontal(),Z=H.inverse,X=W?Z?"right":"left":"center",K=W?"middle":Z?"top":"bottom";return{normal:{align:U.get("align")||X,verticalAlign:U.get("verticalAlign")||K}}}var LineView=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.init=function(){var H=new Group$3,W=new SymbolDraw;this.group.add(W.group),this._symbolDraw=W,this._lineGroup=H,this._changePolyState=bind$1(this._changePolyState,this)},G.prototype.render=function(H,W,Z){var X=H.coordinateSystem,K=this.group,Q=H.getData(),ee=H.getModel("lineStyle"),te=H.getModel("areaStyle"),re=Q.getLayout("points")||[],ae=X.type==="polar",ne=this._coordSys,ie=this._symbolDraw,oe=this._polyline,se=this._polygon,le=this._lineGroup,ue=!W.ssr&&H.get("animation"),ce=!te.isEmpty(),fe=te.get("origin"),he=prepareDataCoordInfo(X,Q,fe),ve=ce&&getStackedOnPoints(X,Q,he),de=H.get("showSymbol"),pe=H.get("connectNulls"),ge=de&&!ae&&getIsIgnoreFunc(H,Q,X),me=this._data;me&&me.eachItemGraphicEl(function($e,Ve){$e.__temp&&(K.remove($e),me.setItemGraphicEl(Ve,null))}),de||ie.remove(),K.add(le);var ye=ae?!1:H.get("step"),_e;X&&X.getArea&&H.get("clip",!0)&&(_e=X.getArea(),_e.width!=null?(_e.x-=.1,_e.y-=.1,_e.width+=.2,_e.height+=.2):_e.r0&&(_e.r0-=.5,_e.r+=.5)),this._clipShapeForSymbol=_e;var xe=getVisualGradient(Q,X,Z)||Q.getVisual("style")[Q.getVisual("drawType")];if(!(oe&&ne.type===X.type&&ye===this._step))de&&ie.updateData(Q,{isIgnore:ge,clipShape:_e,disableAnimation:!0,getSymbolPoint:function($e){return[re[$e*2],re[$e*2+1]]}}),ue&&this._initSymbolLabelAnimation(Q,X,_e),ye&&(ve&&(ve=turnPointsIntoStep(ve,re,X,ye,pe)),re=turnPointsIntoStep(re,null,X,ye,pe)),oe=this._newPolyline(re),ce?se=this._newPolygon(re,ve):se&&(le.remove(se),se=this._polygon=null),ae||this._initOrUpdateEndLabel(H,X,convertToColorString(xe)),le.setClipPath(createLineClipPath(this,X,!0,H));else{ce&&!se?se=this._newPolygon(re,ve):se&&!ce&&(le.remove(se),se=this._polygon=null),ae||this._initOrUpdateEndLabel(H,X,convertToColorString(xe));var Se=le.getClipPath();if(Se){var Te=createLineClipPath(this,X,!1,H);initProps(Se,{shape:Te.shape},H)}else le.setClipPath(createLineClipPath(this,X,!0,H));de&&ie.updateData(Q,{isIgnore:ge,clipShape:_e,disableAnimation:!0,getSymbolPoint:function($e){return[re[$e*2],re[$e*2+1]]}}),(!isPointsSame(this._stackedOnPoints,ve)||!isPointsSame(this._points,re))&&(ue?this._doUpdateAnimation(Q,ve,X,Z,ye,fe,pe):(ye&&(ve&&(ve=turnPointsIntoStep(ve,re,X,ye,pe)),re=turnPointsIntoStep(re,null,X,ye,pe)),oe.setShape({points:re}),se&&se.setShape({points:re,stackedOnPoints:ve})))}var be=H.getModel("emphasis"),Ae=be.get("focus"),we=be.get("blurScope"),Ce=be.get("disabled");if(oe.useStyle(defaults(ee.getLineStyle(),{fill:"none",stroke:xe,lineJoin:"bevel"})),setStatesStylesFromModel(oe,H,"lineStyle"),oe.style.lineWidth>0&&H.get(["emphasis","lineStyle","width"])==="bolder"){var Ee=oe.getState("emphasis").style;Ee.lineWidth=+oe.style.lineWidth+1}getECData(oe).seriesIndex=H.seriesIndex,toggleHoverEmphasis(oe,Ae,we,Ce);var Me=getSmooth(H.get("smooth")),De=H.get("smoothMonotone");if(oe.setShape({smooth:Me,smoothMonotone:De,connectNulls:pe}),se){var Le=Q.getCalculationInfo("stackedOnSeries"),Pe=0;se.useStyle(defaults(te.getAreaStyle(),{fill:xe,opacity:.7,lineJoin:"bevel",decal:Q.getVisual("style").decal})),Le&&(Pe=getSmooth(Le.get("smooth"))),se.setShape({smooth:Me,stackedOnSmooth:Pe,smoothMonotone:De,connectNulls:pe}),setStatesStylesFromModel(se,H,"areaStyle"),getECData(se).seriesIndex=H.seriesIndex,toggleHoverEmphasis(se,Ae,we,Ce)}var Ie=this._changePolyState;Q.eachItemGraphicEl(function($e){$e&&($e.onHoverStateChange=Ie)}),this._polyline.onHoverStateChange=Ie,this._data=Q,this._coordSys=X,this._stackedOnPoints=ve,this._points=re,this._step=ye,this._valueOrigin=fe,H.get("triggerLineEvent")&&(this.packEventData(H,oe),se&&this.packEventData(H,se))},G.prototype.packEventData=function(H,W){getECData(W).eventData={componentType:"series",componentSubType:"line",componentIndex:H.componentIndex,seriesIndex:H.seriesIndex,seriesName:H.name,seriesType:"line"}},G.prototype.highlight=function(H,W,Z,X){var K=H.getData(),Q=queryDataIndex(K,X);if(this._changePolyState("emphasis"),!(Q instanceof Array)&&Q!=null&&Q>=0){var ee=K.getLayout("points"),te=K.getItemGraphicEl(Q);if(!te){var re=ee[Q*2],ae=ee[Q*2+1];if(isNaN(re)||isNaN(ae)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(re,ae))return;var ne=H.get("zlevel")||0,ie=H.get("z")||0;te=new Symbol$1(K,Q),te.x=re,te.y=ae,te.setZ(ne,ie);var oe=te.getSymbolPath().getTextContent();oe&&(oe.zlevel=ne,oe.z=ie,oe.z2=this._polyline.z2+1),te.__temp=!0,K.setItemGraphicEl(Q,te),te.stopSymbolAnimation(!0),this.group.add(te)}te.highlight()}else ChartView.prototype.highlight.call(this,H,W,Z,X)},G.prototype.downplay=function(H,W,Z,X){var K=H.getData(),Q=queryDataIndex(K,X);if(this._changePolyState("normal"),Q!=null&&Q>=0){var ee=K.getItemGraphicEl(Q);ee&&(ee.__temp?(K.setItemGraphicEl(Q,null),this.group.remove(ee)):ee.downplay())}else ChartView.prototype.downplay.call(this,H,W,Z,X)},G.prototype._changePolyState=function(H){var W=this._polygon;setStatesFlag(this._polyline,H),W&&setStatesFlag(W,H)},G.prototype._newPolyline=function(H){var W=this._polyline;return W&&this._lineGroup.remove(W),W=new ECPolyline({shape:{points:H},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(W),this._polyline=W,W},G.prototype._newPolygon=function(H,W){var Z=this._polygon;return Z&&this._lineGroup.remove(Z),Z=new ECPolygon({shape:{points:H,stackedOnPoints:W},segmentIgnoreThreshold:2}),this._lineGroup.add(Z),this._polygon=Z,Z},G.prototype._initSymbolLabelAnimation=function(H,W,Z){var X,K,Q=W.getBaseAxis(),ee=Q.inverse;W.type==="cartesian2d"?(X=Q.isHorizontal(),K=!1):W.type==="polar"&&(X=Q.dim==="angle",K=!0);var te=H.hostModel,re=te.get("animationDuration");isFunction(re)&&(re=re(null));var ae=te.get("animationDelay")||0,ne=isFunction(ae)?ae(null):ae;H.eachItemGraphicEl(function(ie,oe){var se=ie;if(se){var le=[ie.x,ie.y],ue=void 0,ce=void 0,fe=void 0;if(Z)if(K){var he=Z,ve=W.pointToCoord(le);X?(ue=he.startAngle,ce=he.endAngle,fe=-ve[1]/180*Math.PI):(ue=he.r0,ce=he.r,fe=ve[0])}else{var de=Z;X?(ue=de.x,ce=de.x+de.width,fe=ie.x):(ue=de.y+de.height,ce=de.y,fe=ie.y)}var pe=ce===ue?0:(fe-ue)/(ce-ue);ee&&(pe=1-pe);var ge=isFunction(ae)?ae(oe):re*pe+ne,me=se.getSymbolPath(),ye=me.getTextContent();se.attr({scaleX:0,scaleY:0}),se.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:ge}),ye&&ye.animateFrom({style:{opacity:0}},{duration:300,delay:ge}),me.disableLabelAnimation=!0}})},G.prototype._initOrUpdateEndLabel=function(H,W,Z){var X=H.getModel("endLabel");if(anyStateShowEndLabel(H)){var K=H.getData(),Q=this._polyline,ee=K.getLayout("points");if(!ee){Q.removeTextContent(),this._endLabel=null;return}var te=this._endLabel;te||(te=this._endLabel=new ZRText({z2:200}),te.ignoreClip=!0,Q.setTextContent(this._endLabel),Q.disableLabelAnimation=!0);var re=getLastIndexNotNull(ee);re>=0&&(setLabelStyle(Q,getLabelStatesModels(H,"endLabel"),{inheritColor:Z,labelFetcher:H,labelDataIndex:re,defaultText:function(ae,ne,ie){return ie!=null?getDefaultInterpolatedLabel(K,ie):getDefaultLabel(K,ae)},enableTextSetter:!0},getEndLabelStateSpecified(X,W)),Q.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},G.prototype._endLabelOnDuring=function(H,W,Z,X,K,Q,ee){var te=this._endLabel,re=this._polyline;if(te){H<1&&X.originalX==null&&(X.originalX=te.x,X.originalY=te.y);var ae=Z.getLayout("points"),ne=Z.hostModel,ie=ne.get("connectNulls"),oe=Q.get("precision"),se=Q.get("distance")||0,le=ee.getBaseAxis(),ue=le.isHorizontal(),ce=le.inverse,fe=W.shape,he=ce?ue?fe.x:fe.y+fe.height:ue?fe.x+fe.width:fe.y,ve=(ue?se:0)*(ce?-1:1),de=(ue?0:-se)*(ce?-1:1),pe=ue?"x":"y",ge=getIndexRange(ae,he,pe),me=ge.range,ye=me[1]-me[0],_e=void 0;if(ye>=1){if(ye>1&&!ie){var xe=getPointAtIndex(ae,me[0]);te.attr({x:xe[0]+ve,y:xe[1]+de}),K&&(_e=ne.getRawValue(me[0]))}else{var xe=re.getPointOn(he,pe);xe&&te.attr({x:xe[0]+ve,y:xe[1]+de});var Se=ne.getRawValue(me[0]),Te=ne.getRawValue(me[1]);K&&(_e=interpolateRawValues(Z,oe,Se,Te,ge.t))}X.lastFrameIndex=me[0]}else{var be=H===1||X.lastFrameIndex>0?me[0]:0,xe=getPointAtIndex(ae,be);K&&(_e=ne.getRawValue(be)),te.attr({x:xe[0]+ve,y:xe[1]+de})}if(K){var Ae=labelInner(te);typeof Ae.setLabelText=="function"&&Ae.setLabelText(_e)}}},G.prototype._doUpdateAnimation=function(H,W,Z,X,K,Q,ee){var te=this._polyline,re=this._polygon,ae=H.hostModel,ne=lineAnimationDiff(this._data,H,this._stackedOnPoints,W,this._coordSys,Z,this._valueOrigin),ie=ne.current,oe=ne.stackedOnCurrent,se=ne.next,le=ne.stackedOnNext;if(K&&(oe=turnPointsIntoStep(ne.stackedOnCurrent,ne.current,Z,K,ee),ie=turnPointsIntoStep(ne.current,null,Z,K,ee),le=turnPointsIntoStep(ne.stackedOnNext,ne.next,Z,K,ee),se=turnPointsIntoStep(ne.next,null,Z,K,ee)),getBoundingDiff(ie,se)>3e3||re&&getBoundingDiff(oe,le)>3e3){te.stopAnimation(),te.setShape({points:se}),re&&(re.stopAnimation(),re.setShape({points:se,stackedOnPoints:le}));return}te.shape.__points=ne.current,te.shape.points=ie;var ue={shape:{points:se}};ne.current!==ie&&(ue.shape.__points=ne.next),te.stopAnimation(),updateProps$1(te,ue,ae),re&&(re.setShape({points:ie,stackedOnPoints:oe}),re.stopAnimation(),updateProps$1(re,{shape:{stackedOnPoints:le}},ae),te.shape.points!==re.shape.points&&(re.shape.points=te.shape.points));for(var ce=[],fe=ne.status,he=0;he<fe.length;he++){var ve=fe[he].cmd;if(ve==="="){var de=H.getItemGraphicEl(fe[he].idx1);de&&ce.push({el:de,ptIdx:he})}}te.animators&&te.animators.length&&te.animators[0].during(function(){re&&re.dirtyShape();for(var pe=te.shape.__points,ge=0;ge<ce.length;ge++){var me=ce[ge].el,ye=ce[ge].ptIdx*2;me.x=pe[ye],me.y=pe[ye+1],me.markRedraw()}})},G.prototype.remove=function(H){var W=this.group,Z=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),Z&&Z.eachItemGraphicEl(function(X,K){X.__temp&&(W.remove(X),Z.setItemGraphicEl(K,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},G.type="line",G})(ChartView);function pointsLayout(U,G){return{seriesType:U,plan:createRenderPlanner(),reset:function(H){var W=H.getData(),Z=H.coordinateSystem,X=H.pipelineContext,K=G||X.large;if(Z){var Q=map$1(Z.dimensions,function(ie){return W.mapDimension(ie)}).slice(0,2),ee=Q.length,te=W.getCalculationInfo("stackResultDimension");isDimensionStacked(W,Q[0])&&(Q[0]=te),isDimensionStacked(W,Q[1])&&(Q[1]=te);var re=W.getStore(),ae=W.getDimensionIndex(Q[0]),ne=W.getDimensionIndex(Q[1]);return ee&&{progress:function(ie,oe){for(var se=ie.end-ie.start,le=K&&createFloat32Array(se*ee),ue=[],ce=[],fe=ie.start,he=0;fe<ie.end;fe++){var ve=void 0;if(ee===1){var de=re.get(ae,fe);ve=Z.dataToPoint(de,null,ce)}else ue[0]=re.get(ae,fe),ue[1]=re.get(ne,fe),ve=Z.dataToPoint(ue,null,ce);K?(le[he++]=ve[0],le[he++]=ve[1]):oe.setItemLayout(fe,ve.slice())}K&&oe.setLayout("points",le)}}}}}}var samplers={average:function(U){for(var G=0,H=0,W=0;W<U.length;W++)isNaN(U[W])||(G+=U[W],H++);return H===0?NaN:G/H},sum:function(U){for(var G=0,H=0;H<U.length;H++)G+=U[H]||0;return G},max:function(U){for(var G=-1/0,H=0;H<U.length;H++)U[H]>G&&(G=U[H]);return isFinite(G)?G:NaN},min:function(U){for(var G=1/0,H=0;H<U.length;H++)U[H]<G&&(G=U[H]);return isFinite(G)?G:NaN},nearest:function(U){return U[0]}},indexSampler=function(U){return Math.round(U.length/2)};function dataSample(U){return{seriesType:U,reset:function(G,H,W){var Z=G.getData(),X=G.get("sampling"),K=G.coordinateSystem,Q=Z.count();if(Q>10&&K.type==="cartesian2d"&&X){var ee=K.getBaseAxis(),te=K.getOtherAxis(ee),re=ee.getExtent(),ae=W.getDevicePixelRatio(),ne=Math.abs(re[1]-re[0])*(ae||1),ie=Math.round(Q/ne);if(isFinite(ie)&&ie>1){X==="lttb"?G.setData(Z.lttbDownSample(Z.mapDimension(te.dim),1/ie)):X==="minmax"&&G.setData(Z.minmaxDownSample(Z.mapDimension(te.dim),1/ie));var oe=void 0;isString(X)?oe=samplers[X]:isFunction(X)&&(oe=X),oe&&G.setData(Z.downSample(Z.mapDimension(te.dim),1/ie,oe,indexSampler))}}}}}function install$U(U){U.registerChartView(LineView),U.registerSeriesModel(LineSeriesModel),U.registerLayout(pointsLayout("line",!0)),U.registerVisual({seriesType:"line",reset:function(G){var H=G.getData(),W=G.getModel("lineStyle").getLineStyle();W&&!W.stroke&&(W.stroke=H.getVisual("style").fill),H.setVisual("legendLineStyle",W)}}),U.registerProcessor(U.PRIORITY.PROCESSOR.STATISTIC,dataSample("line"))}var BaseBarSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.getInitialData=function(H,W){return createSeriesData$1(null,this,{useEncodeDefaulter:!0})},G.prototype.getMarkerPosition=function(H,W,Z){var X=this.coordinateSystem;if(X&&X.clampData){var K=X.clampData(H),Q=X.dataToPoint(K);if(Z)each$f(X.getAxes(),function(ne,ie){if(ne.type==="category"&&W!=null){var oe=ne.getTicksCoords(),se=ne.getTickModel().get("alignWithLabel"),le=K[ie],ue=W[ie]==="x1"||W[ie]==="y1";if(ue&&!se&&(le+=1),oe.length<2)return;if(oe.length===2){Q[ie]=ne.toGlobalCoord(ne.getExtent()[ue?1:0]);return}for(var ce=void 0,fe=void 0,he=1,ve=0;ve<oe.length;ve++){var de=oe[ve].coord,pe=ve===oe.length-1?oe[ve-1].tickValue+he:oe[ve].tickValue;if(pe===le){fe=de;break}else if(pe<le)ce=de;else if(ce!=null&&pe>le){fe=(de+ce)/2;break}ve===1&&(he=pe-oe[0].tickValue)}fe==null&&(ce?ce&&(fe=oe[oe.length-1].coord):fe=oe[0].coord),Q[ie]=ne.toGlobalCoord(fe)}});else{var ee=this.getData(),te=ee.getLayout("offset"),re=ee.getLayout("size"),ae=X.getBaseAxis().isHorizontal()?0:1;Q[ae]+=te+re/2}return Q}return[NaN,NaN]},G.type="series.__base_bar__",G.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},G})(SeriesModel);SeriesModel.registerClass(BaseBarSeriesModel);var BarSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.getInitialData=function(){return createSeriesData$1(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},G.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},G.prototype.getProgressiveThreshold=function(){var H=this.get("progressiveThreshold"),W=this.get("largeThreshold");return W>H&&(H=W),H},G.prototype.brushSelector=function(H,W,Z){return Z.rect(W.getItemLayout(H))},G.type="series.bar",G.dependencies=["grid","polar"],G.defaultOption=inheritDefaultOption(BaseBarSeriesModel.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:tokens.color.primary,borderWidth:2}},realtimeSort:!1}),G})(BaseBarSeriesModel),SausageShape=(function(){function U(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return U})(),SausagePath=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="sausage",W}return G.prototype.getDefaultShape=function(){return new SausageShape},G.prototype.buildPath=function(H,W){var Z=W.cx,X=W.cy,K=Math.max(W.r0||0,0),Q=Math.max(W.r,0),ee=(Q-K)*.5,te=K+ee,re=W.startAngle,ae=W.endAngle,ne=W.clockwise,ie=Math.PI*2,oe=ne?ae-re<ie:re-ae<ie;oe||(re=ae-(ne?ie:-ie));var se=Math.cos(re),le=Math.sin(re),ue=Math.cos(ae),ce=Math.sin(ae);oe?(H.moveTo(se*K+Z,le*K+X),H.arc(se*te+Z,le*te+X,ee,-Math.PI+re,re,!ne)):H.moveTo(se*Q+Z,le*Q+X),H.arc(Z,X,Q,re,ae,!ne),H.arc(ue*te+Z,ce*te+X,ee,ae-Math.PI*2,ae-Math.PI,!ne),K!==0&&H.arc(Z,X,K,ae,re,ne)},G})(Path);function createSectorCalculateTextPosition(U,G){G=G||{};var H=G.isRoundCap;return function(W,Z,X){var K=Z.position;if(!K||K instanceof Array)return calculateTextPosition(W,Z,X);var Q=U(K),ee=Z.distance!=null?Z.distance:5,te=this.shape,re=te.cx,ae=te.cy,ne=te.r,ie=te.r0,oe=(ne+ie)/2,se=te.startAngle,le=te.endAngle,ue=(se+le)/2,ce=H?Math.abs(ne-ie)/2:0,fe=Math.cos,he=Math.sin,ve=re+ne*fe(se),de=ae+ne*he(se),pe="left",ge="top";switch(Q){case"startArc":ve=re+(ie-ee)*fe(ue),de=ae+(ie-ee)*he(ue),pe="center",ge="top";break;case"insideStartArc":ve=re+(ie+ee)*fe(ue),de=ae+(ie+ee)*he(ue),pe="center",ge="bottom";break;case"startAngle":ve=re+oe*fe(se)+adjustAngleDistanceX(se,ee+ce,!1),de=ae+oe*he(se)+adjustAngleDistanceY(se,ee+ce,!1),pe="right",ge="middle";break;case"insideStartAngle":ve=re+oe*fe(se)+adjustAngleDistanceX(se,-ee+ce,!1),de=ae+oe*he(se)+adjustAngleDistanceY(se,-ee+ce,!1),pe="left",ge="middle";break;case"middle":ve=re+oe*fe(ue),de=ae+oe*he(ue),pe="center",ge="middle";break;case"endArc":ve=re+(ne+ee)*fe(ue),de=ae+(ne+ee)*he(ue),pe="center",ge="bottom";break;case"insideEndArc":ve=re+(ne-ee)*fe(ue),de=ae+(ne-ee)*he(ue),pe="center",ge="top";break;case"endAngle":ve=re+oe*fe(le)+adjustAngleDistanceX(le,ee+ce,!0),de=ae+oe*he(le)+adjustAngleDistanceY(le,ee+ce,!0),pe="left",ge="middle";break;case"insideEndAngle":ve=re+oe*fe(le)+adjustAngleDistanceX(le,-ee+ce,!0),de=ae+oe*he(le)+adjustAngleDistanceY(le,-ee+ce,!0),pe="right",ge="middle";break;default:return calculateTextPosition(W,Z,X)}return W=W||{},W.x=ve,W.y=de,W.align=pe,W.verticalAlign=ge,W}}function setSectorTextRotation(U,G,H,W){if(isNumber(W)){U.setTextConfig({rotation:W});return}else if(isArray$1(G)){U.setTextConfig({rotation:0});return}var Z=U.shape,X=Z.clockwise?Z.startAngle:Z.endAngle,K=Z.clockwise?Z.endAngle:Z.startAngle,Q=(X+K)/2,ee,te=H(G);switch(te){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":ee=Q;break;case"startAngle":case"insideStartAngle":ee=X;break;case"endAngle":case"insideEndAngle":ee=K;break;default:U.setTextConfig({rotation:0});return}var re=Math.PI*1.5-ee;te==="middle"&&re>Math.PI/2&&re<Math.PI*1.5&&(re-=Math.PI),U.setTextConfig({rotation:re})}function adjustAngleDistanceX(U,G,H){return G*Math.sin(U)*(H?-1:1)}function adjustAngleDistanceY(U,G,H){return G*Math.cos(U)*(H?1:-1)}function getSectorCornerRadius(U,G,H){var W=U.get("borderRadius");if(W==null)return H?{cornerRadius:0}:null;isArray$1(W)||(W=[W,W,W,W]);var Z=Math.abs(G.r||0-G.r0||0);return{cornerRadius:map$1(W,function(X){return parsePercent$1(X,Z)})}}var mathMax$4=Math.max,mathMin$4=Math.min;function getClipArea(U,G){var H=U.getArea&&U.getArea();if(isCoordinateSystemType(U,"cartesian2d")){var W=U.getBaseAxis();if(W.type!=="category"||!W.onBand){var Z=G.getLayout("bandWidth");W.isHorizontal()?(H.x-=Z,H.width+=Z*2):(H.y-=Z,H.height+=Z*2)}}return H}var BarView=(function(U){__extends(G,U);function G(){var H=U.call(this)||this;return H.type=G.type,H._isFirstFrame=!0,H}return G.prototype.render=function(H,W,Z,X){this._model=H,this._removeOnRenderedListener(Z),this._updateDrawMode(H);var K=H.get("coordinateSystem");K==="cartesian2d"||K==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(H,W,Z):this._renderNormal(H,W,Z,X)):process.env.NODE_ENV!=="production"&&warn("Only cartesian2d and polar supported for bar.")},G.prototype.incrementalPrepareRender=function(H){this._clear(),this._updateDrawMode(H),this._updateLargeClip(H)},G.prototype.incrementalRender=function(H,W){this._progressiveEls=[],this._incrementalRenderLarge(H,W)},G.prototype.eachRendered=function(H){traverseElements(this._progressiveEls||this.group,H)},G.prototype._updateDrawMode=function(H){var W=H.pipelineContext.large;(this._isLargeDraw==null||W!==this._isLargeDraw)&&(this._isLargeDraw=W,this._clear())},G.prototype._renderNormal=function(H,W,Z,X){var K=this.group,Q=H.getData(),ee=this._data,te=H.coordinateSystem,re=te.getBaseAxis(),ae;te.type==="cartesian2d"?ae=re.isHorizontal():te.type==="polar"&&(ae=re.dim==="angle");var ne=H.isAnimationEnabled()?H:null,ie=shouldRealtimeSort(H,te);ie&&this._enableRealtimeSort(ie,Q,Z);var oe=H.get("clip",!0)||ie,se=getClipArea(te,Q);K.removeClipPath();var le=H.get("roundCap",!0),ue=H.get("showBackground",!0),ce=H.getModel("backgroundStyle"),fe=ce.get("borderRadius")||0,he=[],ve=this._backgroundEls,de=X&&X.isInitSort,pe=X&&X.type==="changeAxisOrder";function ge(_e){var xe=getLayout[te.type](Q,_e);if(!xe)return null;var Se=createBackgroundEl(te,ae,xe);return Se.useStyle(ce.getItemStyle()),te.type==="cartesian2d"?Se.setShape("r",fe):Se.setShape("cornerRadius",fe),he[_e]=Se,Se}Q.diff(ee).add(function(_e){var xe=Q.getItemModel(_e),Se=getLayout[te.type](Q,_e,xe);if(Se&&(ue&&ge(_e),!(!Q.hasValue(_e)||!isValidLayout[te.type](Se)))){var Te=!1;oe&&(Te=clip[te.type](se,Se));var be=elementCreator[te.type](H,Q,_e,Se,ae,ne,re.model,!1,le);ie&&(be.forceLabelAnimation=!0),updateStyle(be,Q,_e,xe,Se,H,ae,te.type==="polar"),de?be.attr({shape:Se}):ie?updateRealtimeAnimation(ie,ne,be,Se,_e,ae,!1,!1):initProps(be,{shape:Se},H,_e),Q.setItemGraphicEl(_e,be),K.add(be),be.ignore=Te}}).update(function(_e,xe){var Se=Q.getItemModel(_e),Te=getLayout[te.type](Q,_e,Se);if(Te){if(ue){var be=void 0;ve.length===0?be=ge(xe):(be=ve[xe],be.useStyle(ce.getItemStyle()),te.type==="cartesian2d"?be.setShape("r",fe):be.setShape("cornerRadius",fe),he[_e]=be);var Ae=getLayout[te.type](Q,_e),we=createBackgroundShape(ae,Ae,te);updateProps$1(be,{shape:we},ne,_e)}var Ce=ee.getItemGraphicEl(xe);if(!Q.hasValue(_e)||!isValidLayout[te.type](Te)){K.remove(Ce);return}var Ee=!1;oe&&(Ee=clip[te.type](se,Te),Ee&&K.remove(Ce));var Me=Ce&&(Ce.type==="sector"&&le||Ce.type==="sausage"&&!le);if(Me&&(Ce&&removeElementWithFadeOut(Ce,H,xe),Ce=null),Ce?saveOldStyle(Ce):Ce=elementCreator[te.type](H,Q,_e,Te,ae,ne,re.model,!0,le),ie&&(Ce.forceLabelAnimation=!0),pe){var De=Ce.getTextContent();if(De){var Le=labelInner(De);Le.prevValue!=null&&(Le.prevValue=Le.value)}}else updateStyle(Ce,Q,_e,Se,Te,H,ae,te.type==="polar");de?Ce.attr({shape:Te}):ie?updateRealtimeAnimation(ie,ne,Ce,Te,_e,ae,!0,pe):updateProps$1(Ce,{shape:Te},H,_e,null),Q.setItemGraphicEl(_e,Ce),Ce.ignore=Ee,K.add(Ce)}}).remove(function(_e){var xe=ee.getItemGraphicEl(_e);xe&&removeElementWithFadeOut(xe,H,_e)}).execute();var me=this._backgroundGroup||(this._backgroundGroup=new Group$3);me.removeAll();for(var ye=0;ye<he.length;++ye)me.add(he[ye]);K.add(me),this._backgroundEls=he,this._data=Q},G.prototype._renderLarge=function(H,W,Z){this._clear(),createLarge$1(H,this.group),this._updateLargeClip(H)},G.prototype._incrementalRenderLarge=function(H,W){this._removeBackground(),createLarge$1(W,this.group,this._progressiveEls,!0)},G.prototype._updateLargeClip=function(H){var W=H.get("clip",!0)&&createClipPath(H.coordinateSystem,!1,H),Z=this.group;W?Z.setClipPath(W):Z.removeClipPath()},G.prototype._enableRealtimeSort=function(H,W,Z){var X=this;if(W.count()){var K=H.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(W,H,Z),this._isFirstFrame=!1;else{var Q=function(ee){var te=W.getItemGraphicEl(ee),re=te&&te.shape;return re&&Math.abs(K.isHorizontal()?re.height:re.width)||0};this._onRendered=function(){X._updateSortWithinSameData(W,Q,K,Z)},Z.getZr().on("rendered",this._onRendered)}}},G.prototype._dataSort=function(H,W,Z){var X=[];return H.each(H.mapDimension(W.dim),function(K,Q){var ee=Z(Q);ee=ee??NaN,X.push({dataIndex:Q,mappedValue:ee,ordinalNumber:K})}),X.sort(function(K,Q){return Q.mappedValue-K.mappedValue}),{ordinalNumbers:map$1(X,function(K){return K.ordinalNumber})}},G.prototype._isOrderChangedWithinSameData=function(H,W,Z){for(var X=Z.scale,K=H.mapDimension(Z.dim),Q=Number.MAX_VALUE,ee=0,te=X.getOrdinalMeta().categories.length;ee<te;++ee){var re=H.rawIndexOf(K,X.getRawOrdinalNumber(ee)),ae=re<0?Number.MIN_VALUE:W(H.indexOfRawIndex(re));if(ae>Q)return!0;Q=ae}return!1},G.prototype._isOrderDifferentInView=function(H,W){for(var Z=W.scale,X=Z.getExtent(),K=Math.max(0,X[0]),Q=Math.min(X[1],Z.getOrdinalMeta().categories.length-1);K<=Q;++K)if(H.ordinalNumbers[K]!==Z.getRawOrdinalNumber(K))return!0},G.prototype._updateSortWithinSameData=function(H,W,Z,X){if(this._isOrderChangedWithinSameData(H,W,Z)){var K=this._dataSort(H,Z,W);this._isOrderDifferentInView(K,Z)&&(this._removeOnRenderedListener(X),X.dispatchAction({type:"changeAxisOrder",componentType:Z.dim+"Axis",axisId:Z.index,sortInfo:K}))}},G.prototype._dispatchInitSort=function(H,W,Z){var X=W.baseAxis,K=this._dataSort(H,X,function(Q){return H.get(H.mapDimension(W.otherAxis.dim),Q)});Z.dispatchAction({type:"changeAxisOrder",componentType:X.dim+"Axis",isInitSort:!0,axisId:X.index,sortInfo:K})},G.prototype.remove=function(H,W){this._clear(this._model),this._removeOnRenderedListener(W)},G.prototype.dispose=function(H,W){this._removeOnRenderedListener(W)},G.prototype._removeOnRenderedListener=function(H){this._onRendered&&(H.getZr().off("rendered",this._onRendered),this._onRendered=null)},G.prototype._clear=function(H){var W=this.group,Z=this._data;H&&H.isAnimationEnabled()&&Z&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],Z.eachItemGraphicEl(function(X){removeElementWithFadeOut(X,H,getECData(X).dataIndex)})):W.removeAll(),this._data=null,this._isFirstFrame=!0},G.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},G.type="bar",G})(ChartView),clip={cartesian2d:function(U,G){var H=G.width<0?-1:1,W=G.height<0?-1:1;H<0&&(G.x+=G.width,G.width=-G.width),W<0&&(G.y+=G.height,G.height=-G.height);var Z=U.x+U.width,X=U.y+U.height,K=mathMax$4(G.x,U.x),Q=mathMin$4(G.x+G.width,Z),ee=mathMax$4(G.y,U.y),te=mathMin$4(G.y+G.height,X),re=Q<K,ae=te<ee;return G.x=re&&K>Z?Q:K,G.y=ae&&ee>X?te:ee,G.width=re?0:Q-K,G.height=ae?0:te-ee,H<0&&(G.x+=G.width,G.width=-G.width),W<0&&(G.y+=G.height,G.height=-G.height),re||ae},polar:function(U,G){var H=G.r0<=G.r?1:-1;if(H<0){var W=G.r;G.r=G.r0,G.r0=W}var Z=mathMin$4(G.r,U.r),X=mathMax$4(G.r0,U.r0);G.r=Z,G.r0=X;var K=Z-X<0;if(H<0){var W=G.r;G.r=G.r0,G.r0=W}return K}},elementCreator={cartesian2d:function(U,G,H,W,Z,X,K,Q,ee){var te=new Rect$2({shape:extend({},W),z2:1});if(te.__dataIndex=H,te.name="item",X){var re=te.shape,ae=Z?"height":"width";re[ae]=0}return te},polar:function(U,G,H,W,Z,X,K,Q,ee){var te=!Z&&ee?SausagePath:Sector,re=new te({shape:W,z2:1});re.name="item";var ae=createPolarPositionMapping(Z);if(re.calculateTextPosition=createSectorCalculateTextPosition(ae,{isRoundCap:te===SausagePath}),X){var ne=re.shape,ie=Z?"r":"endAngle",oe={};ne[ie]=Z?W.r0:W.startAngle,oe[ie]=W[ie],(Q?updateProps$1:initProps)(re,{shape:oe},X)}return re}};function shouldRealtimeSort(U,G){var H=U.get("realtimeSort",!0),W=G.getBaseAxis();if(process.env.NODE_ENV!=="production"&&H&&(W.type!=="category"&&warn("`realtimeSort` will not work because this bar series is not based on a category axis."),G.type!=="cartesian2d"&&warn("`realtimeSort` will not work because this bar series is not on cartesian2d.")),H&&W.type==="category"&&G.type==="cartesian2d")return{baseAxis:W,otherAxis:G.getOtherAxis(W)}}function updateRealtimeAnimation(U,G,H,W,Z,X,K,Q){var ee,te;X?(te={x:W.x,width:W.width},ee={y:W.y,height:W.height}):(te={y:W.y,height:W.height},ee={x:W.x,width:W.width}),Q||(K?updateProps$1:initProps)(H,{shape:ee},G,Z,null);var re=G?U.baseAxis.model:null;(K?updateProps$1:initProps)(H,{shape:te},re,Z)}function checkPropertiesNotValid(U,G){for(var H=0;H<G.length;H++)if(!isFinite(U[G[H]]))return!0;return!1}var rectPropties=["x","y","width","height"],polarPropties=["cx","cy","r","startAngle","endAngle"],isValidLayout={cartesian2d:function(U){return!checkPropertiesNotValid(U,rectPropties)},polar:function(U){return!checkPropertiesNotValid(U,polarPropties)}},getLayout={cartesian2d:function(U,G,H){var W=U.getItemLayout(G);if(!W)return null;var Z=H?getLineWidth(H,W):0,X=W.width>0?1:-1,K=W.height>0?1:-1;return{x:W.x+X*Z/2,y:W.y+K*Z/2,width:W.width-X*Z,height:W.height-K*Z}},polar:function(U,G,H){var W=U.getItemLayout(G);return{cx:W.cx,cy:W.cy,r0:W.r0,r:W.r,startAngle:W.startAngle,endAngle:W.endAngle,clockwise:W.clockwise}}};function isZeroOnPolar(U){return U.startAngle!=null&&U.endAngle!=null&&U.startAngle===U.endAngle}function createPolarPositionMapping(U){return(function(G){var H=G?"Arc":"Angle";return function(W){switch(W){case"start":case"insideStart":case"end":case"insideEnd":return W+H;default:return W}}})(U)}function updateStyle(U,G,H,W,Z,X,K,Q){var ee=G.getItemVisual(H,"style");if(Q){if(!X.get("roundCap")){var re=U.shape,ae=getSectorCornerRadius(W.getModel("itemStyle"),re,!0);extend(re,ae),U.setShape(re)}}else{var te=W.get(["itemStyle","borderRadius"])||0;U.setShape("r",te)}U.useStyle(ee);var ne=W.getShallow("cursor");ne&&U.attr("cursor",ne);var ie=Q?K?Z.r>=Z.r0?"endArc":"startArc":Z.endAngle>=Z.startAngle?"endAngle":"startAngle":K?Z.height>=0?"bottom":"top":Z.width>=0?"right":"left",oe=getLabelStatesModels(W);setLabelStyle(U,oe,{labelFetcher:X,labelDataIndex:H,defaultText:getDefaultLabel(X.getData(),H),inheritColor:ee.fill,defaultOpacity:ee.opacity,defaultOutsidePosition:ie});var se=U.getTextContent();if(Q&&se){var le=W.get(["label","position"]);U.textConfig.inside=le==="middle"?!0:null,setSectorTextRotation(U,le==="outside"?ie:le,createPolarPositionMapping(K),W.get(["label","rotate"]))}setLabelValueAnimation(se,oe,X.getRawValue(H),function(ce){return getDefaultInterpolatedLabel(G,ce)});var ue=W.getModel(["emphasis"]);toggleHoverEmphasis(U,ue.get("focus"),ue.get("blurScope"),ue.get("disabled")),setStatesStylesFromModel(U,W),isZeroOnPolar(Z)&&(U.style.fill="none",U.style.stroke="none",each$f(U.states,function(ce){ce.style&&(ce.style.fill=ce.style.stroke="none")}))}function getLineWidth(U,G){var H=U.get(["itemStyle","borderColor"]);if(!H||H==="none")return 0;var W=U.get(["itemStyle","borderWidth"])||0,Z=isNaN(G.width)?Number.MAX_VALUE:Math.abs(G.width),X=isNaN(G.height)?Number.MAX_VALUE:Math.abs(G.height);return Math.min(W,Z,X)}var LagePathShape=(function(){function U(){}return U})(),LargePath=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="largeBar",W}return G.prototype.getDefaultShape=function(){return new LagePathShape},G.prototype.buildPath=function(H,W){for(var Z=W.points,X=this.baseDimIdx,K=1-this.baseDimIdx,Q=[],ee=[],te=this.barWidth,re=0;re<Z.length;re+=3)ee[X]=te,ee[K]=Z[re+2],Q[X]=Z[re+X],Q[K]=Z[re+K],H.rect(Q[0],Q[1],ee[0],ee[1])},G})(Path);function createLarge$1(U,G,H,W){var Z=U.getData(),X=Z.getLayout("valueAxisHorizontal")?1:0,K=Z.getLayout("largeDataIndices"),Q=Z.getLayout("size"),ee=U.getModel("backgroundStyle"),te=Z.getLayout("largeBackgroundPoints");if(te){var re=new LargePath({shape:{points:te},incremental:!!W,silent:!0,z2:0});re.baseDimIdx=X,re.largeDataIndices=K,re.barWidth=Q,re.useStyle(ee.getItemStyle()),G.add(re),H&&H.push(re)}var ae=new LargePath({shape:{points:Z.getLayout("largePoints")},incremental:!!W,ignoreCoarsePointer:!0,z2:1});ae.baseDimIdx=X,ae.largeDataIndices=K,ae.barWidth=Q,G.add(ae),ae.useStyle(Z.getVisual("style")),ae.style.stroke=null,getECData(ae).seriesIndex=U.seriesIndex,U.get("silent")||(ae.on("mousedown",largePathUpdateDataIndex),ae.on("mousemove",largePathUpdateDataIndex)),H&&H.push(ae)}var largePathUpdateDataIndex=throttle(function(U){var G=this,H=largePathFindDataIndex(G,U.offsetX,U.offsetY);getECData(G).dataIndex=H>=0?H:null},30,!1);function largePathFindDataIndex(U,G,H){for(var W=U.baseDimIdx,Z=1-W,X=U.shape.points,K=U.largeDataIndices,Q=[],ee=[],te=U.barWidth,re=0,ae=X.length/3;re<ae;re++){var ne=re*3;if(ee[W]=te,ee[Z]=X[ne+2],Q[W]=X[ne+W],Q[Z]=X[ne+Z],ee[Z]<0&&(Q[Z]+=ee[Z],ee[Z]=-ee[Z]),G>=Q[0]&&G<=Q[0]+ee[0]&&H>=Q[1]&&H<=Q[1]+ee[1])return K[re]}return-1}function createBackgroundShape(U,G,H){if(isCoordinateSystemType(H,"cartesian2d")){var W=G,Z=H.getArea();return{x:U?W.x:Z.x,y:U?Z.y:W.y,width:U?W.width:Z.width,height:U?Z.height:W.height}}else{var Z=H.getArea(),X=G;return{cx:Z.cx,cy:Z.cy,r0:U?Z.r0:X.r0,r:U?Z.r:X.r,startAngle:U?X.startAngle:0,endAngle:U?X.endAngle:Math.PI*2}}}function createBackgroundEl(U,G,H){var W=U.type==="polar"?Sector:Rect$2;return new W({shape:createBackgroundShape(G,H,U),silent:!0,z2:0})}function install$T(U){U.registerChartView(BarView),U.registerSeriesModel(BarSeriesModel),U.registerLayout(U.PRIORITY.VISUAL.LAYOUT,curry$1(layout$2,"bar")),U.registerLayout(U.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,createProgressiveLayout("bar")),U.registerProcessor(U.PRIORITY.PROCESSOR.STATISTIC,dataSample("bar")),U.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(G,H){var W=G.componentType||"series";H.eachComponent({mainType:W,query:G},function(Z){G.sortInfo&&Z.axis.setCategorySortInfo(G.sortInfo)})})}var PI2=Math.PI*2,RADIAN$4=Math.PI/180;function pieLayout(U,G,H){G.eachSeriesByType(U,function(W){var Z=W.getData(),X=Z.mapDimension("value"),K=getCircleLayout(W,H),Q=K.cx,ee=K.cy,te=K.r,re=K.r0,ae=K.viewRect,ne=-W.get("startAngle")*RADIAN$4,ie=W.get("endAngle"),oe=W.get("padAngle")*RADIAN$4;ie=ie==="auto"?ne-PI2:-ie*RADIAN$4;var se=W.get("minAngle")*RADIAN$4,le=se+oe,ue=0;Z.each(X,function(we){!isNaN(we)&&ue++});var ce=Z.getSum(X),fe=Math.PI/(ce||ue)*2,he=W.get("clockwise"),ve=W.get("roseType"),de=W.get("stillShowZeroSum"),pe=Z.getDataExtent(X);pe[0]=0;var ge=he?1:-1,me=[ne,ie],ye=ge*oe/2;normalizeArcAngles(me,!he),ne=me[0],ie=me[1];var _e=getSeriesLayoutData(W);_e.startAngle=ne,_e.endAngle=ie,_e.clockwise=he,_e.cx=Q,_e.cy=ee,_e.r=te,_e.r0=re;var xe=Math.abs(ie-ne),Se=xe,Te=0,be=ne;if(Z.setLayout({viewRect:ae,r:te}),Z.each(X,function(we,Ce){var Ee;if(isNaN(we)){Z.setItemLayout(Ce,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:he,cx:Q,cy:ee,r0:re,r:ve?NaN:te});return}ve!=="area"?Ee=ce===0&&de?fe:we*fe:Ee=xe/ue,Ee<le?(Ee=le,Se-=le):Te+=we;var Me=be+ge*Ee,De=0,Le=0;oe>Ee?(De=be+ge*Ee/2,Le=De):(De=be+ye,Le=Me-ye),Z.setItemLayout(Ce,{angle:Ee,startAngle:De,endAngle:Le,clockwise:he,cx:Q,cy:ee,r0:re,r:ve?linearMap$2(we,pe,[re,te]):te}),be=Me}),Se<PI2&&ue)if(Se<=.001){var Ae=xe/ue;Z.each(X,function(we,Ce){if(!isNaN(we)){var Ee=Z.getItemLayout(Ce);Ee.angle=Ae;var Me=0,De=0;Ae<oe?(Me=ne+ge*(Ce+1/2)*Ae,De=Me):(Me=ne+ge*Ce*Ae+ye,De=ne+ge*(Ce+1)*Ae-ye),Ee.startAngle=Me,Ee.endAngle=De}})}else fe=Se/Te,be=ne,Z.each(X,function(we,Ce){if(!isNaN(we)){var Ee=Z.getItemLayout(Ce),Me=Ee.angle===le?le:we*fe,De=0,Le=0;Me<oe?(De=be+ge*Me/2,Le=De):(De=be+ye,Le=be+ge*Me-ye),Ee.startAngle=De,Ee.endAngle=Le,be+=ge*Me}})})}var getSeriesLayoutData=makeInner();function dataFilter$1(U){return{seriesType:U,reset:function(G,H){var W=H.findComponents({mainType:"legend"});if(!(!W||!W.length)){var Z=G.getData();Z.filterSelf(function(X){for(var K=Z.getName(X),Q=0;Q<W.length;Q++)if(!W[Q].isSelected(K))return!1;return!0})}}}}var RADIAN$3=Math.PI/180;function adjustSingleSide(U,G,H,W,Z,X,K,Q,ee,te){if(U.length<2)return;function re(se){for(var le=se.rB,ue=le*le,ce=0;ce<se.list.length;ce++){var fe=se.list[ce],he=Math.abs(fe.label.y-H),ve=W+fe.len,de=ve*ve,pe=Math.sqrt(Math.abs((1-he*he/ue)*de)),ge=G+(pe+fe.len2)*Z,me=ge-fe.label.x,ye=fe.targetTextWidth-me*Z;constrainTextWidth(fe,ye,!0),fe.label.x=ge}}function ae(se){for(var le={list:[],maxY:0},ue={list:[],maxY:0},ce=0;ce<se.length;ce++)if(se[ce].labelAlignTo==="none"){var fe=se[ce],he=fe.label.y>H?ue:le,ve=Math.abs(fe.label.y-H);if(ve>=he.maxY){var de=fe.label.x-G-fe.len2*Z,pe=W+fe.len,ge=Math.abs(de)<pe?Math.sqrt(ve*ve/(1-de*de/pe/pe)):pe;he.rB=ge,he.maxY=ve}he.list.push(fe)}re(le),re(ue)}for(var ne=U.length,ie=0;ie<ne;ie++)if(U[ie].position==="outer"&&U[ie].labelAlignTo==="labelLine"){var oe=U[ie].label.x-te;U[ie].linePoints[1][0]+=oe,U[ie].label.x=te}shiftLayoutOnXY(U,1,ee,ee+K)&&ae(U)}function avoidOverlap(U,G,H,W,Z,X,K,Q){for(var ee=[],te=[],re=Number.MAX_VALUE,ae=-Number.MAX_VALUE,ne=0;ne<U.length;ne++){var ie=U[ne].label;isPositionCenter(U[ne])||(ie.x<G?(re=Math.min(re,ie.x),ee.push(U[ne])):(ae=Math.max(ae,ie.x),te.push(U[ne])))}for(var ne=0;ne<U.length;ne++){var oe=U[ne];if(!isPositionCenter(oe)&&oe.linePoints){if(oe.labelStyleWidth!=null)continue;var ie=oe.label,se=oe.linePoints,le=void 0;oe.labelAlignTo==="edge"?ie.x<G?le=se[2][0]-oe.labelDistance-K-oe.edgeDistance:le=K+Z-oe.edgeDistance-se[2][0]-oe.labelDistance:oe.labelAlignTo==="labelLine"?ie.x<G?le=re-K-oe.bleedMargin:le=K+Z-ae-oe.bleedMargin:ie.x<G?le=ie.x-K-oe.bleedMargin:le=K+Z-ie.x-oe.bleedMargin,oe.targetTextWidth=le,constrainTextWidth(oe,le,!1)}}adjustSingleSide(te,G,H,W,1,Z,X,K,Q,ae),adjustSingleSide(ee,G,H,W,-1,Z,X,K,Q,re);for(var ne=0;ne<U.length;ne++){var oe=U[ne];if(!isPositionCenter(oe)&&oe.linePoints){var ie=oe.label,se=oe.linePoints,ue=oe.labelAlignTo==="edge",ce=ie.style.padding,fe=ce?ce[1]+ce[3]:0,he=ie.style.backgroundColor?0:fe,ve=oe.rect.width+he,de=se[1][0]-se[2][0];ue?ie.x<G?se[2][0]=K+oe.edgeDistance+ve+oe.labelDistance:se[2][0]=K+Z-oe.edgeDistance-ve-oe.labelDistance:(ie.x<G?se[2][0]=ie.x+oe.labelDistance:se[2][0]=ie.x-oe.labelDistance,se[1][0]=se[2][0]+de),se[1][1]=se[2][1]=ie.y}}}function constrainTextWidth(U,G,H){if(U.labelStyleWidth==null){var W=U.label,Z=W.style,X=U.rect,K=Z.backgroundColor,Q=Z.padding,ee=Q?Q[1]+Q[3]:0,te=Z.overflow,re=X.width+(K?0:ee);if(G<re||H){if(te&&te.match("break")){W.setStyle("backgroundColor",null),W.setStyle("width",G-ee);var ae=W.getBoundingRect();W.setStyle("width",Math.ceil(ae.width)),W.setStyle("backgroundColor",K)}else{var ne=G-ee,ie=G<re?ne:H?ne>U.unconstrainedWidth?null:ne:null;W.setStyle("width",ie)}computeLabelGlobalRect(X,W)}}}function computeLabelGlobalRect(U,G){_tmpLabelGeometry.rect=U,computeLabelGeometry(_tmpLabelGeometry,G,_computeLabelGeometryOpt)}var _computeLabelGeometryOpt={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},_tmpLabelGeometry={};function isPositionCenter(U){return U.position==="center"}function pieLabelLayout(U){var G=U.getData(),H=[],W,Z,X=!1,K=(U.get("minShowLabelAngle")||0)*RADIAN$3,Q=G.getLayout("viewRect"),ee=G.getLayout("r"),te=Q.width,re=Q.x,ae=Q.y,ne=Q.height;function ie(de){de.ignore=!0}function oe(de){if(!de.ignore)return!0;for(var pe in de.states)if(de.states[pe].ignore===!1)return!0;return!1}G.each(function(de){var pe=G.getItemGraphicEl(de),ge=pe.shape,me=pe.getTextContent(),ye=pe.getTextGuideLine(),_e=G.getItemModel(de),xe=_e.getModel("label"),Se=xe.get("position")||_e.get(["emphasis","label","position"]),Te=xe.get("distanceToLabelLine"),be=xe.get("alignTo"),Ae=parsePercent(xe.get("edgeDistance"),te),we=xe.get("bleedMargin");we==null&&(we=Math.min(te,ne)>200?10:2);var Ce=_e.getModel("labelLine"),Ee=Ce.get("length");Ee=parsePercent(Ee,te);var Me=Ce.get("length2");if(Me=parsePercent(Me,te),Math.abs(ge.endAngle-ge.startAngle)<K){each$f(me.states,ie),me.ignore=!0,ye&&(each$f(ye.states,ie),ye.ignore=!0);return}if(oe(me)){var De=(ge.startAngle+ge.endAngle)/2,Le=Math.cos(De),Pe=Math.sin(De),Ie,$e,Ve,Fe;W=ge.cx,Z=ge.cy;var ke=Se==="inside"||Se==="inner";if(Se==="center")Ie=ge.cx,$e=ge.cy,Fe="center";else{var Re=(ke?(ge.r+ge.r0)/2*Le:ge.r*Le)+W,Ne=(ke?(ge.r+ge.r0)/2*Pe:ge.r*Pe)+Z;if(Ie=Re+Le*3,$e=Ne+Pe*3,!ke){var Oe=Re+Le*(Ee+ee-ge.r),Be=Ne+Pe*(Ee+ee-ge.r),ze=Oe+(Le<0?-1:1)*Me,Ge=Be;be==="edge"?Ie=Le<0?re+Ae:re+te-Ae:Ie=ze+(Le<0?-Te:Te),$e=Ge,Ve=[[Re,Ne],[Oe,Be],[ze,Ge]]}Fe=ke?"center":be==="edge"?Le>0?"right":"left":Le>0?"left":"right"}var He=Math.PI,Ue=0,Ye=xe.get("rotate");if(isNumber(Ye))Ue=Ye*(He/180);else if(Se==="center")Ue=0;else if(Ye==="radial"||Ye===!0){var Ze=Le<0?-De+He:-De;Ue=Ze}else if(Ye==="tangential"&&Se!=="outside"&&Se!=="outer"){var We=Math.atan2(Le,Pe);We<0&&(We=He*2+We);var Xe=Pe>0;Xe&&(We=He+We),Ue=We-He}if(X=!!Ue,me.x=Ie,me.y=$e,me.rotation=Ue,me.setStyle({verticalAlign:"middle"}),ke){me.setStyle({align:Fe});var Ke=me.states.select;Ke&&(Ke.x+=me.x,Ke.y+=me.y)}else{var je=new BoundingRect(0,0,0,0);computeLabelGlobalRect(je,me),H.push({label:me,labelLine:ye,position:Se,len:Ee,len2:Me,minTurnAngle:Ce.get("minTurnAngle"),maxSurfaceAngle:Ce.get("maxSurfaceAngle"),surfaceNormal:new Point(Le,Pe),linePoints:Ve,textAlign:Fe,labelDistance:Te,labelAlignTo:be,edgeDistance:Ae,bleedMargin:we,rect:je,unconstrainedWidth:je.width,labelStyleWidth:me.style.width})}pe.setTextConfig({inside:ke})}}),!X&&U.get("avoidLabelOverlap")&&avoidOverlap(H,W,Z,ee,te,ne,re,ae);for(var se=0;se<H.length;se++){var le=H[se],ue=le.label,ce=le.labelLine,fe=isNaN(ue.x)||isNaN(ue.y);if(ue){ue.setStyle({align:le.textAlign}),fe&&(each$f(ue.states,ie),ue.ignore=!0);var he=ue.states.select;he&&(he.x+=ue.x,he.y+=ue.y)}if(ce){var ve=le.linePoints;fe||!ve?(each$f(ce.states,ie),ce.ignore=!0):(limitTurnAngle(ve,le.minTurnAngle),limitSurfaceAngle(ve,le.surfaceNormal,le.maxSurfaceAngle),ce.setShape({points:ve}),ue.__hostTarget.textGuideLineConfig={anchor:new Point(ve[0][0],ve[0][1])})}}}var PiePiece=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this)||this;X.z2=2;var K=new ZRText;return X.setTextContent(K),X.updateData(H,W,Z,!0),X}return G.prototype.updateData=function(H,W,Z,X){var K=this,Q=H.hostModel,ee=H.getItemModel(W),te=ee.getModel("emphasis"),re=H.getItemLayout(W),ae=extend(getSectorCornerRadius(ee.getModel("itemStyle"),re,!0),re);if(isNaN(ae.startAngle)){K.setShape(ae);return}if(X){K.setShape(ae);var ne=Q.getShallow("animationType");Q.ecModel.ssr?(initProps(K,{scaleX:0,scaleY:0},Q,{dataIndex:W,isFrom:!0}),K.originX=ae.cx,K.originY=ae.cy):ne==="scale"?(K.shape.r=re.r0,initProps(K,{shape:{r:re.r}},Q,W)):Z!=null?(K.setShape({startAngle:Z,endAngle:Z}),initProps(K,{shape:{startAngle:re.startAngle,endAngle:re.endAngle}},Q,W)):(K.shape.endAngle=re.startAngle,updateProps$1(K,{shape:{endAngle:re.endAngle}},Q,W))}else saveOldStyle(K),updateProps$1(K,{shape:ae},Q,W);K.useStyle(H.getItemVisual(W,"style")),setStatesStylesFromModel(K,ee);var ie=(re.startAngle+re.endAngle)/2,oe=Q.get("selectedOffset"),se=Math.cos(ie)*oe,le=Math.sin(ie)*oe,ue=ee.getShallow("cursor");ue&&K.attr("cursor",ue),this._updateLabel(Q,H,W),K.ensureState("emphasis").shape=extend({r:re.r+(te.get("scale")&&te.get("scaleSize")||0)},getSectorCornerRadius(te.getModel("itemStyle"),re)),extend(K.ensureState("select"),{x:se,y:le,shape:getSectorCornerRadius(ee.getModel(["select","itemStyle"]),re)}),extend(K.ensureState("blur"),{shape:getSectorCornerRadius(ee.getModel(["blur","itemStyle"]),re)});var ce=K.getTextGuideLine(),fe=K.getTextContent();ce&&extend(ce.ensureState("select"),{x:se,y:le}),extend(fe.ensureState("select"),{x:se,y:le}),toggleHoverEmphasis(this,te.get("focus"),te.get("blurScope"),te.get("disabled"))},G.prototype._updateLabel=function(H,W,Z){var X=this,K=W.getItemModel(Z),Q=K.getModel("labelLine"),ee=W.getItemVisual(Z,"style"),te=ee&&ee.fill,re=ee&&ee.opacity;setLabelStyle(X,getLabelStatesModels(K),{labelFetcher:W.hostModel,labelDataIndex:Z,inheritColor:te,defaultOpacity:re,defaultText:H.getFormattedLabel(Z,"normal")||W.getName(Z)});var ae=X.getTextContent();X.setTextConfig({position:null,rotation:null}),ae.attr({z2:10});var ne=K.get(["label","position"]);if(ne!=="outside"&&ne!=="outer")X.removeTextGuideLine();else{var ie=this.getTextGuideLine();ie||(ie=new Polyline$1,this.setTextGuideLine(ie)),setLabelLineStyle(this,getLabelLineStatesModels(K),{stroke:te,opacity:retrieve3(Q.get(["lineStyle","opacity"]),re,1)})}},G})(Sector),PieView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.ignoreLabelLineUpdate=!0,H}return G.prototype.render=function(H,W,Z,X){var K=H.getData(),Q=this._data,ee=this.group,te;if(!Q&&K.count()>0){for(var re=K.getItemLayout(0),ae=1;isNaN(re&&re.startAngle)&&ae<K.count();++ae)re=K.getItemLayout(ae);re&&(te=re.startAngle)}if(this._emptyCircleSector&&ee.remove(this._emptyCircleSector),K.count()===0&&H.get("showEmptyCircle")){var ne=getSeriesLayoutData(H),ie=new Sector({shape:clone$4(ne)});ie.useStyle(H.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=ie,ee.add(ie)}K.diff(Q).add(function(oe){var se=new PiePiece(K,oe,te);K.setItemGraphicEl(oe,se),ee.add(se)}).update(function(oe,se){var le=Q.getItemGraphicEl(se);le.updateData(K,oe,te),le.off("click"),ee.add(le),K.setItemGraphicEl(oe,le)}).remove(function(oe){var se=Q.getItemGraphicEl(oe);removeElementWithFadeOut(se,H,oe)}).execute(),pieLabelLayout(H),H.get("animationTypeUpdate")!=="expansion"&&(this._data=K)},G.prototype.dispose=function(){},G.prototype.containPoint=function(H,W){var Z=W.getData(),X=Z.getItemLayout(0);if(X){var K=H[0]-X.cx,Q=H[1]-X.cy,ee=Math.sqrt(K*K+Q*Q);return ee<=X.r&&ee>=X.r0}},G.type="pie",G})(ChartView);function createSeriesDataSimply(U,G,H){G=isArray$1(G)&&{coordDimensions:G}||extend({encodeDefine:U.getEncode()},G);var W=U.getSource(),Z=prepareSeriesDataSchema(W,G).dimensions,X=new SeriesData(Z,U);return X.initData(W,H),X}var LegendVisualProvider=(function(){function U(G,H){this._getDataWithEncodedVisual=G,this._getRawData=H}return U.prototype.getAllNames=function(){var G=this._getRawData();return G.mapArray(G.getName)},U.prototype.containName=function(G){var H=this._getRawData();return H.indexOfName(G)>=0},U.prototype.indexOfName=function(G){var H=this._getDataWithEncodedVisual();return H.indexOfName(G)},U.prototype.getItemVisual=function(G,H){var W=this._getDataWithEncodedVisual();return W.getItemVisual(G,H)},U})(),innerData=makeInner(),PieSeriesModel=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.init=function(H){U.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this)),this._defaultLabelLine(H)},G.prototype.mergeOption=function(){U.prototype.mergeOption.apply(this,arguments)},G.prototype.getInitialData=function(){return createSeriesDataSimply(this,{coordDimensions:["value"],encodeDefaulter:curry$1(makeSeriesEncodeForNameBased,this)})},G.prototype.getDataParams=function(H){var W=this.getData(),Z=innerData(W),X=Z.seats;if(!X){var K=[];W.each(W.mapDimension("value"),function(ee){K.push(ee)}),X=Z.seats=getPercentSeats(K,W.hostModel.get("percentPrecision"))}var Q=U.prototype.getDataParams.call(this,H);return Q.percent=X[H]||0,Q.$vars.push("percent"),Q},G.prototype._defaultLabelLine=function(H){defaultEmphasis(H,"labelLine",["show"]);var W=H.labelLine,Z=H.emphasis.labelLine;W.show=W.show&&H.label.show,Z.show=Z.show&&H.emphasis.label.show},G.type="series.pie",G.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},G})(SeriesModel);registerLayOutOnCoordSysUsage({fullType:PieSeriesModel.type,getCoord2:function(U){return U.getShallow("center")}});function negativeDataFilter(U){return{seriesType:U,reset:function(G,H){var W=G.getData();W.filterSelf(function(Z){var X=W.mapDimension("value"),K=W.get(X,Z);return!(isNumber(K)&&!isNaN(K)&&K<0)})}}}function install$S(U){U.registerChartView(PieView),U.registerSeriesModel(PieSeriesModel),createLegacyDataSelectAction("pie",U.registerAction),U.registerLayout(curry$1(pieLayout,"pie")),U.registerProcessor(dataFilter$1("pie")),U.registerProcessor(negativeDataFilter("pie"))}var ScatterSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.hasSymbolVisual=!0,H}return G.prototype.getInitialData=function(H,W){return createSeriesData$1(null,this,{useEncodeDefaulter:!0})},G.prototype.getProgressive=function(){var H=this.option.progressive;return H??(this.option.large?5e3:this.get("progressive"))},G.prototype.getProgressiveThreshold=function(){var H=this.option.progressiveThreshold;return H??(this.option.large?1e4:this.get("progressiveThreshold"))},G.prototype.brushSelector=function(H,W,Z){return Z.point(W.getItemLayout(H))},G.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},G.type="series.scatter",G.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],G.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:tokens.color.primary}},universalTransition:{divideShape:"clone"}},G})(SeriesModel),BOOST_SIZE_THRESHOLD=4,LargeSymbolPathShape=(function(){function U(){}return U})(),LargeSymbolPath=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W._off=0,W.hoverDataIdx=-1,W}return G.prototype.getDefaultShape=function(){return new LargeSymbolPathShape},G.prototype.reset=function(){this.notClear=!1,this._off=0},G.prototype.buildPath=function(H,W){var Z=W.points,X=W.size,K=this.symbolProxy,Q=K.shape,ee=H.getContext?H.getContext():H,te=ee&&X[0]<BOOST_SIZE_THRESHOLD,re=this.softClipShape,ae;if(te){this._ctx=ee;return}for(this._ctx=null,ae=this._off;ae<Z.length;){var ne=Z[ae++],ie=Z[ae++];isNaN(ne)||isNaN(ie)||re&&!re.contain(ne,ie)||(Q.x=ne-X[0]/2,Q.y=ie-X[1]/2,Q.width=X[0],Q.height=X[1],K.buildPath(H,Q,!0))}this.incremental&&(this._off=ae,this.notClear=!0)},G.prototype.afterBrush=function(){var H=this.shape,W=H.points,Z=H.size,X=this._ctx,K=this.softClipShape,Q;if(X){for(Q=this._off;Q<W.length;){var ee=W[Q++],te=W[Q++];isNaN(ee)||isNaN(te)||K&&!K.contain(ee,te)||X.fillRect(ee-Z[0]/2,te-Z[1]/2,Z[0],Z[1])}this.incremental&&(this._off=Q,this.notClear=!0)}},G.prototype.findDataIndex=function(H,W){for(var Z=this.shape,X=Z.points,K=Z.size,Q=Math.max(K[0],4),ee=Math.max(K[1],4),te=X.length/2-1;te>=0;te--){var re=te*2,ae=X[re]-Q/2,ne=X[re+1]-ee/2;if(H>=ae&&W>=ne&&H<=ae+Q&&W<=ne+ee)return te}return-1},G.prototype.contain=function(H,W){var Z=this.transformCoordToLocal(H,W),X=this.getBoundingRect();if(H=Z[0],W=Z[1],X.contain(H,W)){var K=this.hoverDataIdx=this.findDataIndex(H,W);return K>=0}return this.hoverDataIdx=-1,!1},G.prototype.getBoundingRect=function(){var H=this._rect;if(!H){for(var W=this.shape,Z=W.points,X=W.size,K=X[0],Q=X[1],ee=1/0,te=1/0,re=-1/0,ae=-1/0,ne=0;ne<Z.length;){var ie=Z[ne++],oe=Z[ne++];ee=Math.min(ie,ee),re=Math.max(ie,re),te=Math.min(oe,te),ae=Math.max(oe,ae)}H=this._rect=new BoundingRect(ee-K/2,te-Q/2,re-ee+K,ae-te+Q)}return H},G})(Path),LargeSymbolDraw=(function(){function U(){this.group=new Group$3}return U.prototype.updateData=function(G,H){this._clear();var W=this._create();W.setShape({points:G.getLayout("points")}),this._setCommon(W,G,H)},U.prototype.updateLayout=function(G){var H=G.getLayout("points");this.group.eachChild(function(W){if(W.startIndex!=null){var Z=(W.endIndex-W.startIndex)*2,X=W.startIndex*4*2;H=new Float32Array(H.buffer,X,Z)}W.setShape("points",H),W.reset()})},U.prototype.incrementalPrepareUpdate=function(G){this._clear()},U.prototype.incrementalUpdate=function(G,H,W){var Z=this._newAdded[0],X=H.getLayout("points"),K=Z&&Z.shape.points;if(K&&K.length<2e4){var Q=K.length,ee=new Float32Array(Q+X.length);ee.set(K),ee.set(X,Q),Z.endIndex=G.end,Z.setShape({points:ee})}else{this._newAdded=[];var te=this._create();te.startIndex=G.start,te.endIndex=G.end,te.incremental=!0,te.setShape({points:X}),this._setCommon(te,H,W)}},U.prototype.eachRendered=function(G){this._newAdded[0]&&G(this._newAdded[0])},U.prototype._create=function(){var G=new LargeSymbolPath({cursor:"default"});return G.ignoreCoarsePointer=!0,this.group.add(G),this._newAdded.push(G),G},U.prototype._setCommon=function(G,H,W){var Z=H.hostModel;W=W||{};var X=H.getVisual("symbolSize");G.setShape("size",X instanceof Array?X:[X,X]),G.softClipShape=W.clipShape||null,G.symbolProxy=createSymbol$1(H.getVisual("symbol"),0,0,0,0),G.setColor=G.symbolProxy.setColor;var K=G.shape.size[0]<BOOST_SIZE_THRESHOLD;G.useStyle(Z.getModel("itemStyle").getItemStyle(K?["color","shadowBlur","shadowColor"]:["color"]));var Q=H.getVisual("style"),ee=Q&&Q.fill;ee&&G.setColor(ee);var te=getECData(G);te.seriesIndex=Z.seriesIndex,G.on("mousemove",function(re){te.dataIndex=null;var ae=G.hoverDataIdx;ae>=0&&(te.dataIndex=ae+(G.startIndex||0))})},U.prototype.remove=function(){this._clear()},U.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},U})(),ScatterView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){var X=H.getData(),K=this._updateSymbolDraw(X,H);K.updateData(X,{clipShape:this._getClipShape(H)}),this._finished=!0},G.prototype.incrementalPrepareRender=function(H,W,Z){var X=H.getData(),K=this._updateSymbolDraw(X,H);K.incrementalPrepareUpdate(X),this._finished=!1},G.prototype.incrementalRender=function(H,W,Z){this._symbolDraw.incrementalUpdate(H,W.getData(),{clipShape:this._getClipShape(W)}),this._finished=H.end===W.getData().count()},G.prototype.updateTransform=function(H,W,Z){var X=H.getData();if(this.group.dirty(),!this._finished||X.count()>1e4)return{update:!0};var K=pointsLayout("").reset(H,W,Z);K.progress&&K.progress({start:0,end:X.count(),count:X.count()},X),this._symbolDraw.updateLayout(X)},G.prototype.eachRendered=function(H){this._symbolDraw&&this._symbolDraw.eachRendered(H)},G.prototype._getClipShape=function(H){if(H.get("clip",!0)){var W=H.coordinateSystem;return W&&W.getArea&&W.getArea(.1)}},G.prototype._updateSymbolDraw=function(H,W){var Z=this._symbolDraw,X=W.pipelineContext,K=X.large;return(!Z||K!==this._isLargeDraw)&&(Z&&Z.remove(),Z=this._symbolDraw=K?new LargeSymbolDraw:new SymbolDraw,this._isLargeDraw=K,this.group.removeAll()),this.group.add(Z.group),Z},G.prototype.remove=function(H,W){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},G.prototype.dispose=function(){},G.type="scatter",G})(ChartView),OUTER_BOUNDS_DEFAULT={left:0,right:0,top:0,bottom:0},OUTER_BOUNDS_CLAMP_DEFAULT=["25%","25%"],GridModel=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.mergeDefaultAndTheme=function(H,W){var Z=getLayoutParams(H.outerBounds);U.prototype.mergeDefaultAndTheme.apply(this,arguments),Z&&H.outerBounds&&mergeLayoutParam(H.outerBounds,Z)},G.prototype.mergeOption=function(H,W){U.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&H.outerBounds&&mergeLayoutParam(this.option.outerBounds,H.outerBounds)},G.type="grid",G.dependencies=["xAxis","yAxis"],G.layoutMode="box",G.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:OUTER_BOUNDS_DEFAULT,outerBoundsContain:"all",outerBoundsClampWidth:OUTER_BOUNDS_CLAMP_DEFAULT[0],outerBoundsClampHeight:OUTER_BOUNDS_CLAMP_DEFAULT[1],backgroundColor:tokens.color.transparent,borderWidth:1,borderColor:tokens.color.neutral30},G})(ComponentModel),CartesianAxisModel=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",SINGLE_REFERRING).models[0]},G.type="cartesian2dAxis",G})(ComponentModel);mixin(CartesianAxisModel,AxisModelCommonMixin);var defaultOption$1={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:tokens.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:tokens.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:tokens.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[tokens.color.backgroundTint,tokens.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:tokens.color.neutral00,borderColor:tokens.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},categoryAxis=merge({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},defaultOption$1),valueAxis=merge({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:tokens.color.axisMinorSplitLine,width:1}}},defaultOption$1),timeAxis=merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},valueAxis),logAxis=defaults({logBase:10},valueAxis);const axisDefault={category:categoryAxis,value:valueAxis,time:timeAxis,log:logAxis};var AXIS_TYPES={value:1,category:1,time:1,log:1},_impl=null;function registerAxisBreakHelperImpl(U){_impl||(_impl=U)}function getAxisBreakHelper(){return _impl}function axisModelCreator(U,G,H,W){each$f(AXIS_TYPES,function(Z,X){var K=merge(merge({},axisDefault[X],!0),W,!0),Q=(function(ee){__extends(te,ee);function te(){var re=ee!==null&&ee.apply(this,arguments)||this;return re.type=G+"Axis."+X,re}return te.prototype.mergeDefaultAndTheme=function(re,ae){var ne=fetchLayoutMode(this),ie=ne?getLayoutParams(re):{},oe=ae.getTheme();merge(re,oe.get(X+"Axis")),merge(re,this.getDefaultOption()),re.type=getAxisType(re),ne&&mergeLayoutParam(re,ie,ne)},te.prototype.optionUpdated=function(){var re=this.option;re.type==="category"&&(this.__ordinalMeta=OrdinalMeta.createByAxisModel(this))},te.prototype.getCategories=function(re){var ae=this.option;if(ae.type==="category")return re?ae.data:this.__ordinalMeta.categories},te.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},te.prototype.updateAxisBreaks=function(re){var ae=getAxisBreakHelper();return ae?ae.updateModelAxisBreak(this,re):{breaks:[]}},te.type=G+"Axis."+X,te.defaultOption=K,te})(H);U.registerComponentModel(Q)}),U.registerSubTypeDefaulter(G+"Axis",getAxisType)}function getAxisType(U){return U.type||(U.data?"category":"value")}var Cartesian=(function(){function U(G){this.type="cartesian",this._dimList=[],this._axes={},this.name=G||""}return U.prototype.getAxis=function(G){return this._axes[G]},U.prototype.getAxes=function(){return map$1(this._dimList,function(G){return this._axes[G]},this)},U.prototype.getAxesByScale=function(G){return G=G.toLowerCase(),filter(this.getAxes(),function(H){return H.scale.type===G})},U.prototype.addAxis=function(G){var H=G.dim;this._axes[H]=G,this._dimList.push(H)},U})(),cartesian2DDimensions=["x","y"];function canCalculateAffineTransform(U){return(U.type==="interval"||U.type==="time")&&!U.hasBreaks()}var Cartesian2D=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type="cartesian2d",H.dimensions=cartesian2DDimensions,H}return G.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var H=this.getAxis("x").scale,W=this.getAxis("y").scale;if(!(!canCalculateAffineTransform(H)||!canCalculateAffineTransform(W))){var Z=H.getExtent(),X=W.getExtent(),K=this.dataToPoint([Z[0],X[0]]),Q=this.dataToPoint([Z[1],X[1]]),ee=Z[1]-Z[0],te=X[1]-X[0];if(!(!ee||!te)){var re=(Q[0]-K[0])/ee,ae=(Q[1]-K[1])/te,ne=K[0]-Z[0]*re,ie=K[1]-X[0]*ae,oe=this._transform=[re,0,0,ae,ne,ie];this._invTransform=invert([],oe)}}},G.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},G.prototype.containPoint=function(H){var W=this.getAxis("x"),Z=this.getAxis("y");return W.contain(W.toLocalCoord(H[0]))&&Z.contain(Z.toLocalCoord(H[1]))},G.prototype.containData=function(H){return this.getAxis("x").containData(H[0])&&this.getAxis("y").containData(H[1])},G.prototype.containZone=function(H,W){var Z=this.dataToPoint(H),X=this.dataToPoint(W),K=this.getArea(),Q=new BoundingRect(Z[0],Z[1],X[0]-Z[0],X[1]-Z[1]);return K.intersect(Q)},G.prototype.dataToPoint=function(H,W,Z){Z=Z||[];var X=H[0],K=H[1];if(this._transform&&X!=null&&isFinite(X)&&K!=null&&isFinite(K))return applyTransform$1(Z,H,this._transform);var Q=this.getAxis("x"),ee=this.getAxis("y");return Z[0]=Q.toGlobalCoord(Q.dataToCoord(X,W)),Z[1]=ee.toGlobalCoord(ee.dataToCoord(K,W)),Z},G.prototype.clampData=function(H,W){var Z=this.getAxis("x").scale,X=this.getAxis("y").scale,K=Z.getExtent(),Q=X.getExtent(),ee=Z.parse(H[0]),te=X.parse(H[1]);return W=W||[],W[0]=Math.min(Math.max(Math.min(K[0],K[1]),ee),Math.max(K[0],K[1])),W[1]=Math.min(Math.max(Math.min(Q[0],Q[1]),te),Math.max(Q[0],Q[1])),W},G.prototype.pointToData=function(H,W,Z){if(Z=Z||[],this._invTransform)return applyTransform$1(Z,H,this._invTransform);var X=this.getAxis("x"),K=this.getAxis("y");return Z[0]=X.coordToData(X.toLocalCoord(H[0]),W),Z[1]=K.coordToData(K.toLocalCoord(H[1]),W),Z},G.prototype.getOtherAxis=function(H){return this.getAxis(H.dim==="x"?"y":"x")},G.prototype.getArea=function(H){H=H||0;var W=this.getAxis("x").getGlobalExtent(),Z=this.getAxis("y").getGlobalExtent(),X=Math.min(W[0],W[1])-H,K=Math.min(Z[0],Z[1])-H,Q=Math.max(W[0],W[1])-X+H,ee=Math.max(Z[0],Z[1])-K+H;return new BoundingRect(X,K,Q,ee)},G})(Cartesian),Axis2D=(function(U){__extends(G,U);function G(H,W,Z,X,K){var Q=U.call(this,H,W,Z)||this;return Q.index=0,Q.type=X||"value",Q.position=K||"bottom",Q}return G.prototype.isHorizontal=function(){var H=this.position;return H==="top"||H==="bottom"},G.prototype.getGlobalExtent=function(H){var W=this.getExtent();return W[0]=this.toGlobalCoord(W[0]),W[1]=this.toGlobalCoord(W[1]),H&&W[0]>W[1]&&W.reverse(),W},G.prototype.pointToData=function(H,W){return this.coordToData(this.toLocalCoord(H[this.dim==="x"?0:1]),W)},G.prototype.setCategorySortInfo=function(H){if(this.type!=="category")return!1;this.model.option.categorySortInfo=H,this.scale.setSortInfo(H)},G})(Axis),AXIS_BREAK_EXPAND_ACTION_TYPE="expandAxisBreak",AXIS_BREAK_COLLAPSE_ACTION_TYPE="collapseAxisBreak",AXIS_BREAK_TOGGLE_ACTION_TYPE="toggleAxisBreak",AXIS_BREAK_CHANGED_EVENT_TYPE="axisbreakchanged",expandAxisBreakActionInfo={type:AXIS_BREAK_EXPAND_ACTION_TYPE,event:AXIS_BREAK_CHANGED_EVENT_TYPE,update:"update",refineEvent:refineAxisBreakChangeEvent},collapseAxisBreakActionInfo={type:AXIS_BREAK_COLLAPSE_ACTION_TYPE,event:AXIS_BREAK_CHANGED_EVENT_TYPE,update:"update",refineEvent:refineAxisBreakChangeEvent},toggleAxisBreakActionInfo={type:AXIS_BREAK_TOGGLE_ACTION_TYPE,event:AXIS_BREAK_CHANGED_EVENT_TYPE,update:"update",refineEvent:refineAxisBreakChangeEvent};function refineAxisBreakChangeEvent(U,G,H,W){var Z=[];return each$f(U,function(X){Z=Z.concat(X.eventBreaks)}),{eventContent:{breaks:Z}}}function registerAction(U){U.registerAction(expandAxisBreakActionInfo,G),U.registerAction(collapseAxisBreakActionInfo,G),U.registerAction(toggleAxisBreakActionInfo,G);function G(H,W){var Z=[],X=parseFinder$1(W,H);function K(Q,ee){each$f(X[Q],function(te){var re=te.updateAxisBreaks(H);each$f(re.breaks,function(ae){var ne;Z.push(defaults((ne={},ne[ee]=te.componentIndex,ne),ae))})})}return K("xAxisModels","xAxisIndex"),K("yAxisModels","yAxisIndex"),K("singleAxisModels","singleAxisIndex"),{eventBreaks:Z}}}var PI$3=Math.PI,DEFAULT_CENTER_NAME_MARGIN_LEVELS=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],DEFAULT_ENDS_NAME_MARGIN_LEVELS=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],getLabelInner=makeInner(),getTickInner=makeInner(),AxisBuilderSharedContext=(function(){function U(G){this.recordMap={},this.resolveAxisNameOverlap=G}return U.prototype.ensureRecord=function(G){var H=G.axis.dim,W=G.componentIndex,Z=this.recordMap,X=Z[H]||(Z[H]=[]);return X[W]||(X[W]={ready:{}})},U})();function resetOverlapRecordToShared(U,G,H,W){var Z=H.axis,X=G.ensureRecord(H),K=[],Q,ee=hasAxisName(U.axisName)&&isNameLocationCenter(U.nameLocation);each$f(W,function(oe){var se=ensureLabelLayoutWithGeometry(oe);if(!(!se||se.label.ignore)){K.push(se);var le=X.transGroup;ee&&(le.transform?invert(_stTransTmp,le.transform):identity(_stTransTmp),se.transform&&mul(_stTransTmp,_stTransTmp,se.transform),BoundingRect.copy(_stLabelRectTmp,se.localRect),_stLabelRectTmp.applyTransform(_stTransTmp),Q?Q.union(_stLabelRectTmp):BoundingRect.copy(Q=new BoundingRect(0,0,0,0),_stLabelRectTmp))}});var te=Math.abs(X.dirVec.x)>.1?"x":"y",re=X.transGroup[te];if(K.sort(function(oe,se){return Math.abs(oe.label[te]-re)-Math.abs(se.label[te]-re)}),ee&&Q){var ae=Z.getExtent(),ne=Math.min(ae[0],ae[1]),ie=Math.max(ae[0],ae[1])-ne;Q.union(new BoundingRect(ne,0,ie,1))}X.stOccupiedRect=Q,X.labelInfoList=K}var _stTransTmp=create$1(),_stLabelRectTmp=new BoundingRect(0,0,0,0),resolveAxisNameOverlapDefault=function(U,G,H,W,Z,X){if(isNameLocationCenter(U.nameLocation)){var K=X.stOccupiedRect;K&&moveIfOverlap(computeLabelGeometry2({},K,X.transGroup.transform),W,Z)}else moveIfOverlapByLinearLabels(X.labelInfoList,X.dirVec,W,Z)};function moveIfOverlap(U,G,H){var W=new Point;labelIntersect(U,G,W,{direction:Math.atan2(H.y,H.x),bidirectional:!1,touchThreshold:.05})&&labelLayoutApplyTranslation(G,W)}function moveIfOverlapByLinearLabels(U,G,H,W){for(var Z=Point.dot(W,G)>=0,X=0,K=U.length;X<K;X++){var Q=U[Z?X:K-1-X];Q.label.ignore||moveIfOverlap(Q,H,W)}}var AxisBuilder=(function(){function U(G,H,W,Z){this.group=new Group$3,this._axisModel=G,this._api=H,this._local={},this._shared=Z||new AxisBuilderSharedContext(resolveAxisNameOverlapDefault),this._resetCfgDetermined(W)}return U.prototype.updateCfg=function(G){if(process.env.NODE_ENV!=="production"){var H=this._shared.ensureRecord(this._axisModel).ready;assert(!H.axisLine&&!H.axisTickLabelDetermine),H.axisName=H.axisTickLabelEstimate=!1}var W=this._cfg.raw;W.position=G.position,W.labelOffset=G.labelOffset,this._resetCfgDetermined(W)},U.prototype.__getRawCfg=function(){return this._cfg.raw},U.prototype._resetCfgDetermined=function(G){var H=this._axisModel,W=H.getDefaultOption?H.getDefaultOption():{},Z=retrieve2(G.axisName,H.get("name")),X=H.get("nameMoveOverlap");(X==null||X==="auto")&&(X=retrieve2(G.defaultNameMoveOverlap,!0));var K={raw:G,position:G.position,rotation:G.rotation,nameDirection:retrieve2(G.nameDirection,1),tickDirection:retrieve2(G.tickDirection,1),labelDirection:retrieve2(G.labelDirection,1),labelOffset:retrieve2(G.labelOffset,0),silent:retrieve2(G.silent,!0),axisName:Z,nameLocation:retrieve3(H.get("nameLocation"),W.nameLocation,"end"),shouldNameMoveOverlap:hasAxisName(Z)&&X,optionHideOverlap:H.get(["axisLabel","hideOverlap"]),showMinorTicks:H.get(["minorTick","show"])};process.env.NODE_ENV!=="production"&&(assert(K.position!=null),assert(K.rotation!=null)),this._cfg=K;var Q=new Group$3({x:K.position[0],y:K.position[1],rotation:K.rotation});Q.updateTransform(),this._transformGroup=Q;var ee=this._shared.ensureRecord(H);ee.transGroup=this._transformGroup,ee.dirVec=new Point(Math.cos(-K.rotation),Math.sin(-K.rotation))},U.prototype.build=function(G,H){var W=this;return G||(G={axisLine:!0,axisTickLabelEstimate:!1,axisTickLabelDetermine:!0,axisName:!0}),each$f(AXIS_BUILDER_AXIS_PART_NAMES,function(Z){G[Z]&&builders[Z](W._cfg,W._local,W._shared,W._axisModel,W.group,W._transformGroup,W._api,H||{})}),this},U.innerTextLayout=function(G,H,W){var Z=remRadian(H-G),X,K;return isRadianAroundZero(Z)?(K=W>0?"top":"bottom",X="center"):isRadianAroundZero(Z-PI$3)?(K=W>0?"bottom":"top",X="center"):(K="middle",Z>0&&Z<PI$3?X=W>0?"right":"left":X=W>0?"left":"right"),{rotation:Z,textAlign:X,textVerticalAlign:K}},U.makeAxisEventDataBase=function(G){var H={componentType:G.mainType,componentIndex:G.componentIndex};return H[G.mainType+"Index"]=G.componentIndex,H},U.isLabelSilent=function(G){var H=G.get("tooltip");return G.get("silent")||!(G.get("triggerEvent")||H&&H.show)},U})(),AXIS_BUILDER_AXIS_PART_NAMES=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],builders={axisLine:function(U,G,H,W,Z,X,K){if(process.env.NODE_ENV!=="production"){var Q=H.ensureRecord(W).ready;assert(!Q.axisLine),Q.axisLine=!0}var ee=W.get(["axisLine","show"]);if(ee==="auto"&&(ee=!0,U.raw.axisLineAutoShow!=null&&(ee=!!U.raw.axisLineAutoShow)),!!ee){var te=W.axis.getExtent(),re=X.transform,ae=[te[0],0],ne=[te[1],0],ie=ae[0]>ne[0];re&&(applyTransform$1(ae,ae,re),applyTransform$1(ne,ne,re));var oe=extend({lineCap:"round"},W.getModel(["axisLine","lineStyle"]).getLineStyle()),se={strokeContainThreshold:U.raw.strokeContainThreshold||5,silent:!0,z2:1,style:oe};if(W.get(["axisLine","breakLine"])&&W.axis.scale.hasBreaks())getAxisBreakHelper().buildAxisBreakLine(W,Z,X,se);else{var le=new Line$1(extend({shape:{x1:ae[0],y1:ae[1],x2:ne[0],y2:ne[1]}},se));subPixelOptimizeLine(le.shape,le.style.lineWidth),le.anid="line",Z.add(le)}var ue=W.get(["axisLine","symbol"]);if(ue!=null){var ce=W.get(["axisLine","symbolSize"]);isString(ue)&&(ue=[ue,ue]),(isString(ce)||isNumber(ce))&&(ce=[ce,ce]);var fe=normalizeSymbolOffset(W.get(["axisLine","symbolOffset"])||0,ce),he=ce[0],ve=ce[1];each$f([{rotate:U.rotation+Math.PI/2,offset:fe[0],r:0},{rotate:U.rotation-Math.PI/2,offset:fe[1],r:Math.sqrt((ae[0]-ne[0])*(ae[0]-ne[0])+(ae[1]-ne[1])*(ae[1]-ne[1]))}],function(de,pe){if(ue[pe]!=="none"&&ue[pe]!=null){var ge=createSymbol$1(ue[pe],-he/2,-ve/2,he,ve,oe.stroke,!0),me=de.r+de.offset,ye=ie?ne:ae;ge.attr({rotation:de.rotate,x:ye[0]+me*Math.cos(U.rotation),y:ye[1]-me*Math.sin(U.rotation),silent:!0,z2:11}),Z.add(ge)}})}}},axisTickLabelEstimate:function(U,G,H,W,Z,X,K,Q){if(process.env.NODE_ENV!=="production"){var ee=H.ensureRecord(W).ready;assert(!ee.axisTickLabelDetermine),ee.axisTickLabelEstimate=!0}var te=dealLastTickLabelResultReusable(G,Z,Q);te&&layOutAxisTickLabel(U,G,H,W,Z,X,K,AxisTickLabelComputingKind.estimate)},axisTickLabelDetermine:function(U,G,H,W,Z,X,K,Q){if(process.env.NODE_ENV!=="production"){var ee=H.ensureRecord(W).ready;ee.axisTickLabelDetermine=!0}var te=dealLastTickLabelResultReusable(G,Z,Q);te&&layOutAxisTickLabel(U,G,H,W,Z,X,K,AxisTickLabelComputingKind.determine);var re=buildAxisMajorTicks(U,Z,X,W);syncLabelIgnoreToMajorTicks(U,G.labelLayoutList,re),buildAxisMinorTicks(U,Z,X,W,U.tickDirection)},axisName:function(U,G,H,W,Z,X,K,Q){var ee=H.ensureRecord(W);if(process.env.NODE_ENV!=="production"){var te=ee.ready;assert(te.axisTickLabelEstimate||te.axisTickLabelDetermine),te.axisName=!0}G.nameEl&&(Z.remove(G.nameEl),G.nameEl=ee.nameLayout=ee.nameLocation=null);var re=U.axisName;if(hasAxisName(re)){var ae=U.nameLocation,ne=U.nameDirection,ie=W.getModel("nameTextStyle"),oe=W.get("nameGap")||0,se=W.axis.getExtent(),le=W.axis.inverse?-1:1,ue=new Point(0,0),ce=new Point(0,0);ae==="start"?(ue.x=se[0]-le*oe,ce.x=-le):ae==="end"?(ue.x=se[1]+le*oe,ce.x=le):(ue.x=(se[0]+se[1])/2,ue.y=U.labelOffset+ne*oe,ce.y=ne);var fe=create$1();ce.transform(rotate(fe,fe,U.rotation));var he=W.get("nameRotate");he!=null&&(he=he*PI$3/180);var ve,de;isNameLocationCenter(ae)?ve=AxisBuilder.innerTextLayout(U.rotation,he??U.rotation,ne):(ve=endTextLayout(U.rotation,ae,he||0,se),de=U.raw.axisNameAvailableWidth,de!=null&&(de=Math.abs(de/Math.sin(ve.rotation)),!isFinite(de)&&(de=null)));var pe=ie.getFont(),ge=W.get("nameTruncate",!0)||{},me=ge.ellipsis,ye=retrieve(U.raw.nameTruncateMaxWidth,ge.maxWidth,de),_e=Q.nameMarginLevel||0,xe=new ZRText({x:ue.x,y:ue.y,rotation:ve.rotation,silent:AxisBuilder.isLabelSilent(W),style:createTextStyle(ie,{text:re,font:pe,overflow:"truncate",width:ye,ellipsis:me,fill:ie.getTextColor()||W.get(["axisLine","lineStyle","color"]),align:ie.get("align")||ve.textAlign,verticalAlign:ie.get("verticalAlign")||ve.textVerticalAlign}),z2:1});if(setTooltipConfig({el:xe,componentModel:W,itemName:re}),xe.__fullText=re,xe.anid="name",W.get("triggerEvent")){var Se=AxisBuilder.makeAxisEventDataBase(W);Se.targetType="axisName",Se.name=re,getECData(xe).eventData=Se}X.add(xe),xe.updateTransform(),G.nameEl=xe;var Te=ee.nameLayout=ensureLabelLayoutWithGeometry({label:xe,priority:xe.z2,defaultAttr:{ignore:xe.ignore},marginDefault:isNameLocationCenter(ae)?DEFAULT_CENTER_NAME_MARGIN_LEVELS[_e]:DEFAULT_ENDS_NAME_MARGIN_LEVELS[_e]});if(ee.nameLocation=ae,Z.add(xe),xe.decomposeTransform(),U.shouldNameMoveOverlap&&Te){var be=H.ensureRecord(W);process.env.NODE_ENV!=="production"&&assert(be.labelInfoList),H.resolveAxisNameOverlap(U,H,W,Te,ce,be)}}}};function layOutAxisTickLabel(U,G,H,W,Z,X,K,Q){axisLabelBuildResultExists(G)||buildAxisLabel(U,G,Z,Q,W,K);var ee=G.labelLayoutList;updateAxisLabelChangableProps(U,W,ee,X),adjustBreakLabels(W,U.rotation,ee);var te=U.optionHideOverlap;fixMinMaxLabelShow(W,ee,te),te&&hideOverlap(filter(ee,function(re){return re&&!re.label.ignore})),resetOverlapRecordToShared(U,H,W,ee)}function endTextLayout(U,G,H,W){var Z=remRadian(H-U),X,K,Q=W[0]>W[1],ee=G==="start"&&!Q||G!=="start"&&Q;return isRadianAroundZero(Z-PI$3/2)?(K=ee?"bottom":"top",X="center"):isRadianAroundZero(Z-PI$3*1.5)?(K=ee?"top":"bottom",X="center"):(K="middle",Z<PI$3*1.5&&Z>PI$3/2?X=ee?"left":"right":X=ee?"right":"left"),{rotation:Z,textAlign:X,textVerticalAlign:K}}function fixMinMaxLabelShow(U,G,H){if(shouldShowAllLabels(U.axis))return;function W(Q,ee,te){var re=ensureLabelLayoutWithGeometry(G[ee]),ae=ensureLabelLayoutWithGeometry(G[te]);if(!(!re||!ae)){if(Q===!1||re.suggestIgnore){ignoreEl(re.label);return}if(ae.suggestIgnore){ignoreEl(ae.label);return}var ne=.1;if(!H){var ie=[0,0,0,0];re=newLabelLayoutWithGeometry({marginForce:ie},re),ae=newLabelLayoutWithGeometry({marginForce:ie},ae)}labelIntersect(re,ae,null,{touchThreshold:ne})&&ignoreEl(Q?ae.label:re.label)}}var Z=U.get(["axisLabel","showMinLabel"]),X=U.get(["axisLabel","showMaxLabel"]),K=G.length;W(Z,0,1),W(X,K-1,K-2)}function syncLabelIgnoreToMajorTicks(U,G,H){U.showMinorTicks||each$f(G,function(W){if(W&&W.label.ignore)for(var Z=0;Z<H.length;Z++){var X=H[Z],K=getTickInner(X),Q=getLabelInner(W.label);if(K.tickValue!=null&&!K.onBand&&K.tickValue===Q.tickValue){ignoreEl(X);return}}})}function ignoreEl(U){U&&(U.ignore=!0)}function createTicks(U,G,H,W,Z){for(var X=[],K=[],Q=[],ee=0;ee<U.length;ee++){var te=U[ee].coord;K[0]=te,K[1]=0,Q[0]=te,Q[1]=H,G&&(applyTransform$1(K,K,G),applyTransform$1(Q,Q,G));var re=new Line$1({shape:{x1:K[0],y1:K[1],x2:Q[0],y2:Q[1]},style:W,z2:2,autoBatch:!0,silent:!0});subPixelOptimizeLine(re.shape,re.style.lineWidth),re.anid=Z+"_"+U[ee].tickValue,X.push(re);var ae=getTickInner(re);ae.onBand=!!U[ee].onBand,ae.tickValue=U[ee].tickValue}return X}function buildAxisMajorTicks(U,G,H,W){var Z=W.axis,X=W.getModel("axisTick"),K=X.get("show");if(K==="auto"&&(K=!0,U.raw.axisTickAutoShow!=null&&(K=!!U.raw.axisTickAutoShow)),!K||Z.scale.isBlank())return[];for(var Q=X.getModel("lineStyle"),ee=U.tickDirection*X.get("length"),te=Z.getTicksCoords(),re=createTicks(te,H.transform,ee,defaults(Q.getLineStyle(),{stroke:W.get(["axisLine","lineStyle","color"])}),"ticks"),ae=0;ae<re.length;ae++)G.add(re[ae]);return re}function buildAxisMinorTicks(U,G,H,W,Z){var X=W.axis,K=W.getModel("minorTick");if(!(!U.showMinorTicks||X.scale.isBlank())){var Q=X.getMinorTicksCoords();if(Q.length)for(var ee=K.getModel("lineStyle"),te=Z*K.get("length"),re=defaults(ee.getLineStyle(),defaults(W.getModel("axisTick").getLineStyle(),{stroke:W.get(["axisLine","lineStyle","color"])})),ae=0;ae<Q.length;ae++)for(var ne=createTicks(Q[ae],H.transform,te,re,"minorticks_"+ae),ie=0;ie<ne.length;ie++)G.add(ne[ie])}}function dealLastTickLabelResultReusable(U,G,H){if(axisLabelBuildResultExists(U)){var W=U.axisLabelsCreationContext;process.env.NODE_ENV!=="production"&&assert(U.labelGroup&&W);var Z=W.out.noPxChangeTryDetermine;if(H.noPxChange){for(var X=!0,K=0;K<Z.length;K++)X=X&&Z[K]();if(X)return!1}Z.length&&(G.remove(U.labelGroup),axisLabelBuildResultSet(U,null,null,null))}return!0}function buildAxisLabel(U,G,H,W,Z,X){var K=Z.axis,Q=retrieve(U.raw.axisLabelShow,Z.get(["axisLabel","show"])),ee=new Group$3;H.add(ee);var te=createAxisLabelsComputingContext(W);if(!Q||K.scale.isBlank()){axisLabelBuildResultSet(G,[],ee,te);return}var re=Z.getModel("axisLabel"),ae=K.getViewLabels(te),ne=(retrieve(U.raw.labelRotate,re.get("rotate"))||0)*PI$3/180,ie=AxisBuilder.innerTextLayout(U.rotation,ne,U.labelDirection),oe=Z.getCategories&&Z.getCategories(!0),se=[],le=Z.get("triggerEvent"),ue=1/0,ce=-1/0;each$f(ae,function(he,ve){var de,pe=K.scale.type==="ordinal"?K.scale.getRawOrdinalNumber(he.tickValue):he.tickValue,ge=he.formattedLabel,me=he.rawLabel,ye=re;if(oe&&oe[pe]){var _e=oe[pe];isObject$3(_e)&&_e.textStyle&&(ye=new Model(_e.textStyle,re,Z.ecModel))}var xe=ye.getTextColor()||Z.get(["axisLine","lineStyle","color"]),Se=ye.getShallow("align",!0)||ie.textAlign,Te=retrieve2(ye.getShallow("alignMinLabel",!0),Se),be=retrieve2(ye.getShallow("alignMaxLabel",!0),Se),Ae=ye.getShallow("verticalAlign",!0)||ye.getShallow("baseline",!0)||ie.textVerticalAlign,we=retrieve2(ye.getShallow("verticalAlignMinLabel",!0),Ae),Ce=retrieve2(ye.getShallow("verticalAlignMaxLabel",!0),Ae),Ee=10+(((de=he.time)===null||de===void 0?void 0:de.level)||0);ue=Math.min(ue,Ee),ce=Math.max(ce,Ee);var Me=new ZRText({x:0,y:0,rotation:0,silent:AxisBuilder.isLabelSilent(Z),z2:Ee,style:createTextStyle(ye,{text:ge,align:ve===0?Te:ve===ae.length-1?be:Se,verticalAlign:ve===0?we:ve===ae.length-1?Ce:Ae,fill:isFunction(xe)?xe(K.type==="category"?me:K.type==="value"?pe+"":pe,ve):xe})});Me.anid="label_"+pe;var De=getLabelInner(Me);if(De.break=he.break,De.tickValue=pe,De.layoutRotation=ie.rotation,setTooltipConfig({el:Me,componentModel:Z,itemName:ge,formatterParamsExtra:{isTruncated:function(){return Me.isTruncated},value:me,tickIndex:ve}}),le){var Le=AxisBuilder.makeAxisEventDataBase(Z);Le.targetType="axisLabel",Le.value=me,Le.tickIndex=ve,he.break&&(Le.break={start:he.break.parsedBreak.vmin,end:he.break.parsedBreak.vmax}),K.type==="category"&&(Le.dataIndex=pe),getECData(Me).eventData=Le,he.break&&addBreakEventHandler(Z,X,Me,he.break)}se.push(Me),ee.add(Me)});var fe=map$1(se,function(he){return{label:he,priority:getLabelInner(he).break?he.z2+(ce-ue+1):he.z2,defaultAttr:{ignore:he.ignore}}});axisLabelBuildResultSet(G,fe,ee,te)}function axisLabelBuildResultExists(U){return!!U.labelLayoutList}function axisLabelBuildResultSet(U,G,H,W){U.labelLayoutList=G,U.labelGroup=H,U.axisLabelsCreationContext=W}function updateAxisLabelChangableProps(U,G,H,W){var Z=G.get(["axisLabel","margin"]);each$f(H,function(X,K){var Q=ensureLabelLayoutWithGeometry(X);if(Q){var ee=Q.label,te=getLabelInner(ee);Q.suggestIgnore=ee.ignore,ee.ignore=!1,copyTransform(_tmpLayoutEl,_tmpLayoutElReset),_tmpLayoutEl.x=G.axis.dataToCoord(te.tickValue),_tmpLayoutEl.y=U.labelOffset+U.labelDirection*Z,_tmpLayoutEl.rotation=te.layoutRotation,W.add(_tmpLayoutEl),_tmpLayoutEl.updateTransform(),W.remove(_tmpLayoutEl),_tmpLayoutEl.decomposeTransform(),copyTransform(ee,_tmpLayoutEl),ee.markRedraw(),setLabelLayoutDirty(Q,!0),ensureLabelLayoutWithGeometry(Q)}})}var _tmpLayoutEl=new Rect$2,_tmpLayoutElReset=new Rect$2;function hasAxisName(U){return!!U}function addBreakEventHandler(U,G,H,W){H.on("click",function(Z){var X={type:AXIS_BREAK_EXPAND_ACTION_TYPE,breaks:[{start:W.parsedBreak.breakOption.start,end:W.parsedBreak.breakOption.end}]};X[U.axis.dim+"AxisIndex"]=U.componentIndex,G.dispatchAction(X)})}function adjustBreakLabels(U,G,H){var W=getScaleBreakHelper();if(W){var Z=W.retrieveAxisBreakPairs(H,function(K){return K&&getLabelInner(K.label).break},!0),X=U.get(["breakLabelLayout","moveOverlap"],!0);(X===!0||X==="auto")&&each$f(Z,function(K){getAxisBreakHelper().adjustBreakLabelPair(U.axis.inverse,G,[ensureLabelLayoutWithGeometry(H[K[0]]),ensureLabelLayoutWithGeometry(H[K[1]])])})}}function layout$1(U,G,H){H=H||{};var W=G.axis,Z={},X=W.getAxesOnZeroOf()[0],K=W.position,Q=X?"onZero":K,ee=W.dim,te=[U.x,U.x+U.width,U.y,U.y+U.height],re={left:0,right:1,top:0,bottom:1,onZero:2},ae=G.get("offset")||0,ne=ee==="x"?[te[2]-ae,te[3]+ae]:[te[0]-ae,te[1]+ae];if(X){var ie=X.toGlobalCoord(X.dataToCoord(0));ne[re.onZero]=Math.max(Math.min(ie,ne[1]),ne[0])}Z.position=[ee==="y"?ne[re[Q]]:te[0],ee==="x"?ne[re[Q]]:te[3]],Z.rotation=Math.PI/2*(ee==="x"?0:1);var oe={top:-1,bottom:1,left:-1,right:1};Z.labelDirection=Z.tickDirection=Z.nameDirection=oe[K],Z.labelOffset=X?ne[re[K]]-ne[re.onZero]:0,G.get(["axisTick","inside"])&&(Z.tickDirection=-Z.tickDirection),retrieve(H.labelInside,G.get(["axisLabel","inside"]))&&(Z.labelDirection=-Z.labelDirection);var se=G.get(["axisLabel","rotate"]);return Z.labelRotate=Q==="top"?-se:se,Z.z2=1,Z}function isCartesian2DInjectedAsDataCoordSys(U){return U.coordinateSystem&&U.coordinateSystem.type==="cartesian2d"}function findAxisModels(U){var G={xAxisModel:null,yAxisModel:null};return each$f(G,function(H,W){var Z=W.replace(/Model$/,""),X=U.getReferringComponents(Z,SINGLE_REFERRING).models[0];if(process.env.NODE_ENV!=="production"&&!X)throw new Error(Z+' "'+retrieve3(U.get(Z+"Index"),U.get(Z+"Id"),0)+'" not found');G[W]=X}),G}function createCartesianAxisViewCommonPartBuilder(U,G,H,W,Z,X){for(var K=layout$1(U,H),Q=!1,ee=!1,te=0;te<G.length;te++)isIntervalOrLogScale(G[te].getOtherAxis(H.axis).scale)&&(Q=ee=!0,H.axis.type==="category"&&H.axis.onBand&&(ee=!1));return K.axisLineAutoShow=Q,K.axisTickAutoShow=ee,K.defaultNameMoveOverlap=X,new AxisBuilder(H,W,K,Z)}function updateCartesianAxisViewCommonPartBuilder(U,G,H){var W=layout$1(G,H);if(process.env.NODE_ENV!=="production"){var Z=U.__getRawCfg();each$f(keys(W),function(X){X!=="position"&&X!=="labelOffset"&&assert(W[X]===Z[X])})}U.updateCfg(W)}function alignScaleTicks(U,G,H){var W,Z=IntervalScale.prototype,X=Z.getTicks.call(H),K=Z.getTicks.call(H,{expandToNicedExtent:!0}),Q=X.length-1,ee=Z.getInterval.call(H),te=getScaleExtent(U,G),re=te.extent,ae=te.fixMin,ne=te.fixMax;U.type==="log"&&(re=logTransform(U.base,re,!0)),U.setBreaksFromOption(retrieveAxisBreaksOption(G)),U.setExtent(re[0],re[1]),U.calcNiceExtent({splitNumber:Q,fixMin:ae,fixMax:ne});var ie=Z.getExtent.call(U);ae&&(re[0]=ie[0]),ne&&(re[1]=ie[1]);var oe=Z.getInterval.call(U),se=re[0],le=re[1];if(ae&&ne)oe=(le-se)/Q;else if(ae)for(le=re[0]+oe*Q;le<re[1]&&isFinite(le)&&isFinite(re[1]);)oe=increaseInterval(oe),le=re[0]+oe*Q;else if(ne)for(se=re[1]-oe*Q;se>re[0]&&isFinite(se)&&isFinite(re[0]);)oe=increaseInterval(oe),se=re[1]-oe*Q;else{var ue=U.getTicks().length-1;ue>Q&&(oe=increaseInterval(oe));var ce=oe*Q;le=Math.ceil(re[1]/oe)*oe,se=round$4(le-ce),se<0&&re[0]>=0?(se=0,le=round$4(ce)):le>0&&re[1]<=0&&(le=0,se=-round$4(ce))}var fe=(X[0].value-K[0].value)/ee,he=(X[Q].value-K[Q].value)/ee;if(Z.setExtent.call(U,se+oe*fe,le+oe*he),Z.setInterval.call(U,oe),(fe||he)&&Z.setNiceExtent.call(U,se+oe,le-oe),process.env.NODE_ENV!=="production"){var ve=Z.getTicks.call(U);ve[1]&&(!isValueNice(oe)||getPrecisionSafe(ve[1].value)>getPrecisionSafe(oe))&&warn("The ticks may be not readable when set min: "+G.get("min")+", max: "+G.get("max")+(" and alignTicks: true. ("+((W=G.axis)===null||W===void 0?void 0:W.dim)+"AxisIndex: "+G.componentIndex+")"),!0)}}var XY_TO_MARGIN_IDX=[[3,1],[0,2]],Grid=(function(){function U(G,H,W){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=cartesian2DDimensions,this._initCartesian(G,H,W),this.model=G}return U.prototype.getRect=function(){return this._rect},U.prototype.update=function(G,H){var W=this._axesMap;this._updateScale(G,this.model);function Z(K){var Q,ee=keys(K),te=ee.length;if(te){for(var re=[],ae=te-1;ae>=0;ae--){var ne=+ee[ae],ie=K[ne],oe=ie.model,se=ie.scale;isIntervalOrLogScale(se)&&oe.get("alignTicks")&&oe.get("interval")==null?re.push(ie):(niceScaleExtent(se,oe),isIntervalOrLogScale(se)&&(Q=ie))}re.length&&(Q||(Q=re.pop(),niceScaleExtent(Q.scale,Q.model)),each$f(re,function(le){alignScaleTicks(le.scale,le.model,Q.scale)}))}}Z(W.x),Z(W.y);var X={};each$f(W.x,function(K){fixAxisOnZero(W,"y",K,X)}),each$f(W.y,function(K){fixAxisOnZero(W,"x",K,X)}),this.resize(this.model,H)},U.prototype.resize=function(G,H,W){var Z=createBoxLayoutReference(G,H),X=this._rect=getLayoutRect(G.getBoxLayoutParams(),Z.refContainer),K=this._axesMap,Q=this._coordsList,ee=G.get("containLabel");if(updateAllAxisExtentTransByGridRect(K,X),!W){var te=createAxisBiulders(X,Q,K,ee,H),re=void 0;if(ee)legacyLayOutGridByContainLabel?(legacyLayOutGridByContainLabel(this._axesList,X),updateAllAxisExtentTransByGridRect(K,X)):(process.env.NODE_ENV!=="production"&&log("Specified `grid.containLabel` but no `use(LegacyGridContainLabel)`;use `grid.outerBounds` instead.",!0),re=layOutGridByOuterBounds(X.clone(),"axisLabel",null,X,K,te,Z));else{var ae=prepareOuterBounds(G,X,Z),ne=ae.outerBoundsRect,ie=ae.parsedOuterBoundsContain,oe=ae.outerBoundsClamp;ne&&(re=layOutGridByOuterBounds(ne,ie,oe,X,K,te,Z))}createOrUpdateAxesView(X,K,AxisTickLabelComputingKind.determine,null,re,Z)}each$f(this._coordsList,function(se){se.calcAffineTransform()})},U.prototype.getAxis=function(G,H){var W=this._axesMap[G];if(W!=null)return W[H||0]},U.prototype.getAxes=function(){return this._axesList.slice()},U.prototype.getCartesian=function(G,H){if(G!=null&&H!=null){var W="x"+G+"y"+H;return this._coordsMap[W]}isObject$3(G)&&(H=G.yAxisIndex,G=G.xAxisIndex);for(var Z=0,X=this._coordsList;Z<X.length;Z++)if(X[Z].getAxis("x").index===G||X[Z].getAxis("y").index===H)return X[Z]},U.prototype.getCartesians=function(){return this._coordsList.slice()},U.prototype.convertToPixel=function(G,H,W){var Z=this._findConvertTarget(H);return Z.cartesian?Z.cartesian.dataToPoint(W):Z.axis?Z.axis.toGlobalCoord(Z.axis.dataToCoord(W)):null},U.prototype.convertFromPixel=function(G,H,W){var Z=this._findConvertTarget(H);return Z.cartesian?Z.cartesian.pointToData(W):Z.axis?Z.axis.coordToData(Z.axis.toLocalCoord(W)):null},U.prototype._findConvertTarget=function(G){var H=G.seriesModel,W=G.xAxisModel||H&&H.getReferringComponents("xAxis",SINGLE_REFERRING).models[0],Z=G.yAxisModel||H&&H.getReferringComponents("yAxis",SINGLE_REFERRING).models[0],X=G.gridModel,K=this._coordsList,Q,ee;if(H)Q=H.coordinateSystem,indexOf(K,Q)<0&&(Q=null);else if(W&&Z)Q=this.getCartesian(W.componentIndex,Z.componentIndex);else if(W)ee=this.getAxis("x",W.componentIndex);else if(Z)ee=this.getAxis("y",Z.componentIndex);else if(X){var te=X.coordinateSystem;te===this&&(Q=this._coordsList[0])}return{cartesian:Q,axis:ee}},U.prototype.containPoint=function(G){var H=this._coordsList[0];if(H)return H.containPoint(G)},U.prototype._initCartesian=function(G,H,W){var Z=this,X=this,K={left:!1,right:!1,top:!1,bottom:!1},Q={x:{},y:{}},ee={x:0,y:0};if(H.eachComponent("xAxis",te("x"),this),H.eachComponent("yAxis",te("y"),this),!ee.x||!ee.y){this._axesMap={},this._axesList=[];return}this._axesMap=Q,each$f(Q.x,function(re,ae){each$f(Q.y,function(ne,ie){var oe="x"+ae+"y"+ie,se=new Cartesian2D(oe);se.master=Z,se.model=G,Z._coordsMap[oe]=se,Z._coordsList.push(se),se.addAxis(re),se.addAxis(ne)})});function te(re){return function(ae,ne){if(isAxisUsedInTheGrid(ae,G)){var ie=ae.get("position");re==="x"?ie!=="top"&&ie!=="bottom"&&(ie=K.bottom?"top":"bottom"):ie!=="left"&&ie!=="right"&&(ie=K.left?"right":"left"),K[ie]=!0;var oe=new Axis2D(re,createScaleByModel$1(ae),[0,0],ae.get("type"),ie),se=oe.type==="category";oe.onBand=se&&ae.get("boundaryGap"),oe.inverse=ae.get("inverse"),ae.axis=oe,oe.model=ae,oe.grid=X,oe.index=ne,X._axesList.push(oe),Q[re][ne]=oe,ee[re]++}}}},U.prototype._updateScale=function(G,H){each$f(this._axesList,function(Z){if(Z.scale.setExtent(1/0,-1/0),Z.type==="category"){var X=Z.model.get("categorySortInfo");Z.scale.setSortInfo(X)}}),G.eachSeries(function(Z){if(isCartesian2DInjectedAsDataCoordSys(Z)){var X=findAxisModels(Z),K=X.xAxisModel,Q=X.yAxisModel;if(!isAxisUsedInTheGrid(K,H)||!isAxisUsedInTheGrid(Q,H))return;var ee=this.getCartesian(K.componentIndex,Q.componentIndex),te=Z.getData(),re=ee.getAxis("x"),ae=ee.getAxis("y");W(te,re),W(te,ae)}},this);function W(Z,X){each$f(getDataDimensionsOnAxis(Z,X.dim),function(K){X.scale.unionExtentFromData(Z,K)})}},U.prototype.getTooltipAxes=function(G){var H=[],W=[];return each$f(this.getCartesians(),function(Z){var X=G!=null&&G!=="auto"?Z.getAxis(G):Z.getBaseAxis(),K=Z.getOtherAxis(X);indexOf(H,X)<0&&H.push(X),indexOf(W,K)<0&&W.push(K)}),{baseAxes:H,otherAxes:W}},U.create=function(G,H){var W=[];return G.eachComponent("grid",function(Z,X){var K=new U(Z,G,H);K.name="grid_"+X,K.resize(Z,H,!0),Z.coordinateSystem=K,W.push(K)}),G.eachSeries(function(Z){injectCoordSysByOption({targetModel:Z,coordSysType:"cartesian2d",coordSysProvider:X});function X(){var K=findAxisModels(Z),Q=K.xAxisModel,ee=K.yAxisModel,te=Q.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!te)throw new Error('Grid "'+retrieve3(Q.get("gridIndex"),Q.get("gridId"),0)+'" not found');if(Q.getCoordSysModel()!==ee.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var re=te.coordinateSystem;return re.getCartesian(Q.componentIndex,ee.componentIndex)}}),W},U.dimensions=cartesian2DDimensions,U})();function isAxisUsedInTheGrid(U,G){return U.getCoordSysModel()===G}function fixAxisOnZero(U,G,H,W){H.getAxesOnZeroOf=function(){return X?[X]:[]};var Z=U[G],X,K=H.model,Q=K.get(["axisLine","onZero"]),ee=K.get(["axisLine","onZeroAxisIndex"]);if(!Q)return;if(ee!=null)canOnZeroToAxis(Z[ee])&&(X=Z[ee]);else for(var te in Z)if(Z.hasOwnProperty(te)&&canOnZeroToAxis(Z[te])&&!W[re(Z[te])]){X=Z[te];break}X&&(W[re(X)]=!0);function re(ae){return ae.dim+"_"+ae.index}}function canOnZeroToAxis(U){return U&&U.type!=="category"&&U.type!=="time"&&ifAxisCrossZero(U)}function updateAxisTransform(U,G){var H=U.getExtent(),W=H[0]+H[1];U.toGlobalCoord=U.dim==="x"?function(Z){return Z+G}:function(Z){return W-Z+G},U.toLocalCoord=U.dim==="x"?function(Z){return Z-G}:function(Z){return W-Z+G}}function updateAllAxisExtentTransByGridRect(U,G){each$f(U.x,function(H){return updateAxisExtentTransByGridRect(H,G.x,G.width)}),each$f(U.y,function(H){return updateAxisExtentTransByGridRect(H,G.y,G.height)})}function updateAxisExtentTransByGridRect(U,G,H){var W=[0,H],Z=U.inverse?1:0;U.setExtent(W[Z],W[1-Z]),updateAxisTransform(U,G)}var legacyLayOutGridByContainLabel;function registerLegacyGridContainLabelImpl(U){legacyLayOutGridByContainLabel=U}function layOutGridByOuterBounds(U,G,H,W,Z,X,K){process.env.NODE_ENV!=="production"&&assert(G==="all"||G==="axisLabel"),createOrUpdateAxesView(W,Z,AxisTickLabelComputingKind.estimate,G,!1,K);var Q=[0,0,0,0];te(0),te(1),re(W,0,NaN),re(W,1,NaN);var ee=find(Q,function(ne){return ne>0})==null;return expandOrShrinkRect(W,Q,!0,!0,H),updateAllAxisExtentTransByGridRect(Z,W),ee;function te(ne){each$f(Z[XY$2[ne]],function(ie){if(shouldAxisShow(ie.model)){var oe=X.ensureRecord(ie.model),se=oe.labelInfoList;if(se)for(var le=0;le<se.length;le++){var ue=se[le],ce=ie.scale.normalize(getLabelInner(ue.label).tickValue);ce=ne===1?1-ce:ce,re(ue.rect,ne,ce),re(ue.rect,1-ne,NaN)}var fe=oe.nameLayout;if(fe){var ce=isNameLocationCenter(oe.nameLocation)?.5:NaN;re(fe.rect,ne,ce),re(fe.rect,1-ne,NaN)}}})}function re(ne,ie,oe){var se=U[XY$2[ie]]-ne[XY$2[ie]],le=ne[WH$2[ie]]+ne[XY$2[ie]]-(U[WH$2[ie]]+U[XY$2[ie]]);se=ae(se,1-oe),le=ae(le,oe);var ue=XY_TO_MARGIN_IDX[ie][0],ce=XY_TO_MARGIN_IDX[ie][1];Q[ue]=mathMax$a(Q[ue],se),Q[ce]=mathMax$a(Q[ce],le)}function ae(ne,ie){return ne>0&&!eqNaN(ie)&&ie>1e-4&&(ne/=ie),ne}}function createAxisBiulders(U,G,H,W,Z){var X=new AxisBuilderSharedContext(resolveAxisNameOverlapForGrid);return each$f(H,function(K){return each$f(K,function(Q){if(shouldAxisShow(Q.model)){var ee=!W;Q.axisBuilder=createCartesianAxisViewCommonPartBuilder(U,G,Q.model,Z,X,ee)}})}),X}function createOrUpdateAxesView(U,G,H,W,Z,X){var K=H===AxisTickLabelComputingKind.determine;each$f(G,function(te){return each$f(te,function(re){shouldAxisShow(re.model)&&(updateCartesianAxisViewCommonPartBuilder(re.axisBuilder,U,re.model),re.axisBuilder.build(K?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:Z}))})});var Q={x:0,y:0};ee(0),ee(1);function ee(te){Q[XY$2[1-te]]=U[WH$2[te]]<=X.refContainer[WH$2[te]]*.5?0:1-te===1?2:1}each$f(G,function(te,re){return each$f(te,function(ae){shouldAxisShow(ae.model)&&((W==="all"||K)&&ae.axisBuilder.build({axisName:!0},{nameMarginLevel:Q[re]}),K&&ae.axisBuilder.build({axisLine:!0}))})})}function prepareOuterBounds(U,G,H){var W,Z=U.get("outerBoundsMode",!0);Z==="same"?W=G.clone():Z==null||Z==="auto"?W=getLayoutRect(U.get("outerBounds",!0)||OUTER_BOUNDS_DEFAULT,H.refContainer):Z!=="none"&&process.env.NODE_ENV!=="production"&&error("Invalid grid["+U.componentIndex+"].outerBoundsMode.");var X=U.get("outerBoundsContain",!0),K;X==null||X==="auto"?K="all":indexOf(["all","axisLabel"],X)<0?(process.env.NODE_ENV!=="production"&&error("Invalid grid["+U.componentIndex+"].outerBoundsContain."),K="all"):K=X;var Q=[parsePositionSizeOption(retrieve2(U.get("outerBoundsClampWidth",!0),OUTER_BOUNDS_CLAMP_DEFAULT[0]),G.width),parsePositionSizeOption(retrieve2(U.get("outerBoundsClampHeight",!0),OUTER_BOUNDS_CLAMP_DEFAULT[1]),G.height)];return{outerBoundsRect:W,parsedOuterBoundsContain:K,outerBoundsClamp:Q}}var resolveAxisNameOverlapForGrid=function(U,G,H,W,Z,X){var K=H.axis.dim==="x"?"y":"x";resolveAxisNameOverlapDefault(U,G,H,W,Z,X),isNameLocationCenter(U.nameLocation)||each$f(G.recordMap[K],function(Q){Q&&Q.labelInfoList&&Q.dirVec&&moveIfOverlapByLinearLabels(Q.labelInfoList,Q.dirVec,W,Z)})};function collect(U,G){var H={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return collectAxesInfo(H,U,G),H.seriesInvolved&&collectSeriesInfo(H,U),H}function collectAxesInfo(U,G,H){var W=G.getComponent("tooltip"),Z=G.getComponent("axisPointer"),X=Z.get("link",!0)||[],K=[];each$f(H.getCoordinateSystems(),function(Q){if(!Q.axisPointerEnabled)return;var ee=makeKey(Q.model),te=U.coordSysAxesInfo[ee]={};U.coordSysMap[ee]=Q;var re=Q.model,ae=re.getModel("tooltip",W);if(each$f(Q.getAxes(),curry$1(se,!1,null)),Q.getTooltipAxes&&W&&ae.get("show")){var ne=ae.get("trigger")==="axis",ie=ae.get(["axisPointer","type"])==="cross",oe=Q.getTooltipAxes(ae.get(["axisPointer","axis"]));(ne||ie)&&each$f(oe.baseAxes,curry$1(se,ie?"cross":!0,ne)),ie&&each$f(oe.otherAxes,curry$1(se,"cross",!1))}function se(le,ue,ce){var fe=ce.model.getModel("axisPointer",Z),he=fe.get("show");if(!(!he||he==="auto"&&!le&&!isHandleTrigger(fe))){ue==null&&(ue=fe.get("triggerTooltip")),fe=le?makeAxisPointerModel(ce,ae,Z,G,le,ue):fe;var ve=fe.get("snap"),de=fe.get("triggerEmphasis"),pe=makeKey(ce.model),ge=ue||ve||ce.type==="category",me=U.axesInfo[pe]={key:pe,axis:ce,coordSys:Q,axisPointerModel:fe,triggerTooltip:ue,triggerEmphasis:de,involveSeries:ge,snap:ve,useHandle:isHandleTrigger(fe),seriesModels:[],linkGroup:null};te[pe]=me,U.seriesInvolved=U.seriesInvolved||ge;var ye=getLinkGroupIndex(X,ce);if(ye!=null){var _e=K[ye]||(K[ye]={axesInfo:{}});_e.axesInfo[pe]=me,_e.mapper=X[ye].mapper,me.linkGroup=_e}}}})}function makeAxisPointerModel(U,G,H,W,Z,X){var K=G.getModel("axisPointer"),Q=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],ee={};each$f(Q,function(ne){ee[ne]=clone$4(K.get(ne))}),ee.snap=U.type!=="category"&&!!X,K.get("type")==="cross"&&(ee.type="line");var te=ee.label||(ee.label={});if(te.show==null&&(te.show=!1),Z==="cross"){var re=K.get(["label","show"]);if(te.show=re??!0,!X){var ae=ee.lineStyle=K.get("crossStyle");ae&&defaults(te,ae.textStyle)}}return U.model.getModel("axisPointer",new Model(ee,H,W))}function collectSeriesInfo(U,G){G.eachSeries(function(H){var W=H.coordinateSystem,Z=H.get(["tooltip","trigger"],!0),X=H.get(["tooltip","show"],!0);!W||!W.model||Z==="none"||Z===!1||Z==="item"||X===!1||H.get(["axisPointer","show"],!0)===!1||each$f(U.coordSysAxesInfo[makeKey(W.model)],function(K){var Q=K.axis;W.getAxis(Q.dim)===Q&&(K.seriesModels.push(H),K.seriesDataCount==null&&(K.seriesDataCount=0),K.seriesDataCount+=H.getData().count())})})}function getLinkGroupIndex(U,G){for(var H=G.model,W=G.dim,Z=0;Z<U.length;Z++){var X=U[Z]||{};if(checkPropInLink(X[W+"AxisId"],H.id)||checkPropInLink(X[W+"AxisIndex"],H.componentIndex)||checkPropInLink(X[W+"AxisName"],H.name))return Z}}function checkPropInLink(U,G){return U==="all"||isArray$1(U)&&indexOf(U,G)>=0||U===G}function fixValue(U){var G=getAxisInfo$1(U);if(G){var H=G.axisPointerModel,W=G.axis.scale,Z=H.option,X=H.get("status"),K=H.get("value");K!=null&&(K=W.parse(K));var Q=isHandleTrigger(H);X==null&&(Z.status=Q?"show":"hide");var ee=W.getExtent().slice();ee[0]>ee[1]&&ee.reverse(),(K==null||K>ee[1])&&(K=ee[1]),K<ee[0]&&(K=ee[0]),Z.value=K,Q&&(Z.status=G.axis.scale.isBlank()?"hide":"show")}}function getAxisInfo$1(U){var G=(U.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return G&&G.axesInfo[makeKey(U)]}function getAxisPointerModel(U){var G=getAxisInfo$1(U);return G&&G.axisPointerModel}function isHandleTrigger(U){return!!U.get(["handle","show"])}function makeKey(U){return U.type+"||"+U.id}var axisPointerClazz={},AxisView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z,X){this.axisPointerClass&&fixValue(H),U.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(H,Z,!0)},G.prototype.updateAxisPointer=function(H,W,Z,X){this._doUpdateAxisPointerClass(H,Z,!1)},G.prototype.remove=function(H,W){var Z=this._axisPointer;Z&&Z.remove(W)},G.prototype.dispose=function(H,W){this._disposeAxisPointer(W),U.prototype.dispose.apply(this,arguments)},G.prototype._doUpdateAxisPointerClass=function(H,W,Z){var X=G.getAxisPointerClass(this.axisPointerClass);if(X){var K=getAxisPointerModel(H);K?(this._axisPointer||(this._axisPointer=new X)).render(H,K,W,Z):this._disposeAxisPointer(W)}},G.prototype._disposeAxisPointer=function(H){this._axisPointer&&this._axisPointer.dispose(H),this._axisPointer=null},G.registerAxisPointerClass=function(H,W){if(process.env.NODE_ENV!=="production"&&axisPointerClazz[H])throw new Error("axisPointer "+H+" exists");axisPointerClazz[H]=W},G.getAxisPointerClass=function(H){return H&&axisPointerClazz[H]},G.type="axis",G})(ComponentView),inner$i=makeInner();function rectCoordAxisBuildSplitArea(U,G,H,W){var Z=H.axis;if(!Z.scale.isBlank()){var X=H.getModel("splitArea"),K=X.getModel("areaStyle"),Q=K.get("color"),ee=W.coordinateSystem.getRect(),te=Z.getTicksCoords({tickModel:X,clamp:!0,breakTicks:"none",pruneByBreak:"preserve_extent_bound"});if(te.length){var re=Q.length,ae=inner$i(U).splitAreaColors,ne=createHashMap(),ie=0;if(ae)for(var oe=0;oe<te.length;oe++){var se=ae.get(te[oe].tickValue);if(se!=null){ie=(se+(re-1)*oe)%re;break}}var le=Z.toGlobalCoord(te[0].coord),ue=K.getAreaStyle();Q=isArray$1(Q)?Q:[Q];for(var oe=1;oe<te.length;oe++){var ce=Z.toGlobalCoord(te[oe].coord),fe=void 0,he=void 0,ve=void 0,de=void 0;Z.isHorizontal()?(fe=le,he=ee.y,ve=ce-fe,de=ee.height,le=fe+ve):(fe=ee.x,he=le,ve=ee.width,de=ce-he,le=he+de);var pe=te[oe-1].tickValue;pe!=null&&ne.set(pe,ie),G.add(new Rect$2({anid:pe!=null?"area_"+pe:null,shape:{x:fe,y:he,width:ve,height:de},style:defaults({fill:Q[ie]},ue),autoBatch:!0,silent:!0})),ie=(ie+1)%re}inner$i(U).splitAreaColors=ne}}}function rectCoordAxisHandleRemove(U){inner$i(U).splitAreaColors=null}var selfBuilderAttrs$2=["splitArea","splitLine","minorSplitLine","breakArea"],CartesianAxisView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.axisPointerClass="CartesianAxisPointer",H}return G.prototype.render=function(H,W,Z,X){this.group.removeAll();var K=this._axisGroup;if(this._axisGroup=new Group$3,this.group.add(this._axisGroup),!!shouldAxisShow(H)){this._axisGroup.add(H.axis.axisBuilder.group),each$f(selfBuilderAttrs$2,function(ee){H.get([ee,"show"])&&axisElementBuilders$2[ee](this,this._axisGroup,H,H.getCoordSysModel(),Z)},this);var Q=X&&X.type==="changeAxisOrder"&&X.isInitSort;Q||groupTransition(K,this._axisGroup,H),U.prototype.render.call(this,H,W,Z,X)}},G.prototype.remove=function(){rectCoordAxisHandleRemove(this)},G.type="cartesianAxis",G})(AxisView),axisElementBuilders$2={splitLine:function(U,G,H,W,Z){var X=H.axis;if(!X.scale.isBlank()){var K=H.getModel("splitLine"),Q=K.getModel("lineStyle"),ee=Q.get("color"),te=K.get("showMinLine")!==!1,re=K.get("showMaxLine")!==!1;ee=isArray$1(ee)?ee:[ee];for(var ae=W.coordinateSystem.getRect(),ne=X.isHorizontal(),ie=0,oe=X.getTicksCoords({tickModel:K,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),se=[],le=[],ue=Q.getLineStyle(),ce=0;ce<oe.length;ce++){var fe=X.toGlobalCoord(oe[ce].coord);if(!(ce===0&&!te||ce===oe.length-1&&!re)){var he=oe[ce].tickValue;ne?(se[0]=fe,se[1]=ae.y,le[0]=fe,le[1]=ae.y+ae.height):(se[0]=ae.x,se[1]=fe,le[0]=ae.x+ae.width,le[1]=fe);var ve=ie++%ee.length,de=new Line$1({anid:he!=null?"line_"+he:null,autoBatch:!0,shape:{x1:se[0],y1:se[1],x2:le[0],y2:le[1]},style:defaults({stroke:ee[ve]},ue),silent:!0});subPixelOptimizeLine(de.shape,ue.lineWidth),G.add(de)}}}},minorSplitLine:function(U,G,H,W,Z){var X=H.axis,K=H.getModel("minorSplitLine"),Q=K.getModel("lineStyle"),ee=W.coordinateSystem.getRect(),te=X.isHorizontal(),re=X.getMinorTicksCoords();if(re.length)for(var ae=[],ne=[],ie=Q.getLineStyle(),oe=0;oe<re.length;oe++)for(var se=0;se<re[oe].length;se++){var le=X.toGlobalCoord(re[oe][se].coord);te?(ae[0]=le,ae[1]=ee.y,ne[0]=le,ne[1]=ee.y+ee.height):(ae[0]=ee.x,ae[1]=le,ne[0]=ee.x+ee.width,ne[1]=le);var ue=new Line$1({anid:"minor_line_"+re[oe][se].tickValue,autoBatch:!0,shape:{x1:ae[0],y1:ae[1],x2:ne[0],y2:ne[1]},style:ie,silent:!0});subPixelOptimizeLine(ue.shape,ie.lineWidth),G.add(ue)}},splitArea:function(U,G,H,W,Z){rectCoordAxisBuildSplitArea(U,G,H,W)},breakArea:function(U,G,H,W,Z){var X=getAxisBreakHelper(),K=H.axis.scale;X&&K.type!=="ordinal"&&X.rectCoordBuildBreakAxis(G,U,H,W.coordinateSystem.getRect(),Z)}},CartesianXAxisView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="xAxis",G})(CartesianAxisView),CartesianYAxisView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=CartesianXAxisView.type,H}return G.type="yAxis",G})(CartesianAxisView),GridView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type="grid",H}return G.prototype.render=function(H,W){this.group.removeAll(),H.get("show")&&this.group.add(new Rect$2({shape:H.coordinateSystem.getRect(),style:defaults({fill:H.get("backgroundColor")},H.getItemStyle()),silent:!0,z2:-1}))},G.type="grid",G})(ComponentView),extraOption={offset:0};function install$R(U){U.registerComponentView(GridView),U.registerComponentModel(GridModel),U.registerCoordinateSystem("cartesian2d",Grid),axisModelCreator(U,"x",CartesianAxisModel,extraOption),axisModelCreator(U,"y",CartesianAxisModel,extraOption),U.registerComponentView(CartesianXAxisView),U.registerComponentView(CartesianYAxisView),U.registerPreprocessor(function(G){G.xAxis&&G.yAxis&&!G.grid&&(G.grid={})})}function needFixJitter(U,G){var H=U.coordinateSystem,W=H&&H.type,Z=H&&H.getBaseAxis&&H.getBaseAxis(),X=Z&&Z.scale&&Z.scale.type,K=W==="cartesian2d"&&X==="ordinal"||W==="single",Q=G.model.get("jitter")>0;return K&&Q}var inner$h=makeInner();function fixJitter(U,G,H,W){if(U instanceof Axis2D){var Z=U.scale.type;if(Z!=="category"&&Z!=="ordinal")return H}var X=U.model,K=X.get("jitter"),Q=X.get("jitterOverlap"),ee=X.get("jitterMargin")||0,te=U.scale.type==="ordinal"?U.getBandWidth():null;return K>0?Q?fixJitterIgnoreOverlaps(H,K,te,W):fixJitterAvoidOverlaps(U,G,H,W,K,ee):H}function fixJitterIgnoreOverlaps(U,G,H,W){if(H===null)return U+(Math.random()-.5)*G;var Z=H-W*2,X=Math.min(Math.max(0,G),Z);return U+(Math.random()-.5)*X}function fixJitterAvoidOverlaps(U,G,H,W,Z,X){var K=inner$h(U);K.items||(K.items=[]);var Q=K.items,ee=placeJitterOnDirection(Q,G,H,W,Z,X,1),te=placeJitterOnDirection(Q,G,H,W,Z,X,-1),re=Math.abs(ee-H)<Math.abs(te-H)?ee:te,ae=U.scale.type==="ordinal"?U.getBandWidth():null,ne=Math.abs(re-H);return ne>Z/2||ae&&ne>ae/2-W?fixJitterIgnoreOverlaps(H,Z,ae,W):(Q.push({fixedCoord:G,floatCoord:re,r:W}),re)}function placeJitterOnDirection(U,G,H,W,Z,X,K){for(var Q=H,ee=0;ee<U.length;ee++){var te=U[ee],re=G-te.fixedCoord,ae=Q-te.floatCoord,ne=re*re+ae*ae,ie=W+te.r+X;if(ne<ie*ie){var oe=te.floatCoord+Math.sqrt(ie*ie-re*re)*K;if(Math.abs(oe-H)>Z/2)return Number.MAX_VALUE;if(K===1&&oe>Q||K===-1&&oe<Q){Q=oe,ee=-1;continue}}}return Q}function jitterLayout(U){U.eachSeriesByType("scatter",function(G){var H=G.coordinateSystem;if(H&&(H.type==="cartesian2d"||H.type==="single")){var W=H.getBaseAxis?H.getBaseAxis():null,Z=W&&needFixJitter(G,W);if(Z){var X=G.getData();X.each(function(K){var Q=W.dim,ee=W.orient,te=ee==="horizontal"&&W.type!=="category"||ee==="vertical"&&W.type==="category",re=X.getItemLayout(K),ae=X.getItemVisual(K,"symbolSize"),ne=ae instanceof Array?(ae[1]+ae[0])/2:ae;if(Q==="y"||Q==="single"&&te){var ie=fixJitter(W,re[0],re[1],ne/2);X.setItemLayout(K,[re[0],ie])}else if(Q==="x"||Q==="single"&&!te){var ie=fixJitter(W,re[1],re[0],ne/2);X.setItemLayout(K,[ie,re[1]])}})}}})}function install$Q(U){use(install$R),U.registerSeriesModel(ScatterSeriesModel),U.registerChartView(ScatterView),U.registerLayout(pointsLayout("scatter"))}function installScatterJitter(U){U.registerLayout(U.PRIORITY.VISUAL.POST_CHART_LAYOUT,jitterLayout)}function radarLayout(U){U.eachSeriesByType("radar",function(G){var H=G.getData(),W=[],Z=G.coordinateSystem;if(Z){var X=Z.getIndicatorAxes();each$f(X,function(K,Q){H.each(H.mapDimension(X[Q].dim),function(ee,te){W[te]=W[te]||[];var re=Z.dataToPoint(ee,Q);W[te][Q]=isValidPoint(re)?re:getValueMissingPoint(Z)})}),H.each(function(K){var Q=find(W[K],function(ee){return isValidPoint(ee)})||getValueMissingPoint(Z);W[K].push(Q.slice()),H.setItemLayout(K,W[K])})}})}function isValidPoint(U){return!isNaN(U[0])&&!isNaN(U[1])}function getValueMissingPoint(U){return[U.cx,U.cy]}function radarBackwardCompat(U){var G=U.polar;if(G){isArray$1(G)||(G=[G]);var H=[];each$f(G,function(W,Z){W.indicator?(W.type&&!W.shape&&(W.shape=W.type),U.radar=U.radar||[],isArray$1(U.radar)||(U.radar=[U.radar]),U.radar.push(W)):H.push(W)}),U.polar=H}each$f(U.series,function(W){W&&W.type==="radar"&&W.polarIndex&&(W.radarIndex=W.polarIndex)})}var RadarView$1=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){var X=H.coordinateSystem,K=this.group,Q=H.getData(),ee=this._data;function te(ne,ie){var oe=ne.getItemVisual(ie,"symbol")||"circle";if(oe!=="none"){var se=normalizeSymbolSize(ne.getItemVisual(ie,"symbolSize")),le=createSymbol$1(oe,-1,-1,2,2),ue=ne.getItemVisual(ie,"symbolRotate")||0;return le.attr({style:{strokeNoScale:!0},z2:100,scaleX:se[0]/2,scaleY:se[1]/2,rotation:ue*Math.PI/180||0}),le}}function re(ne,ie,oe,se,le,ue){oe.removeAll();for(var ce=0;ce<ie.length-1;ce++){var fe=te(se,le);fe&&(fe.__dimIdx=ce,ne[ce]?(fe.setPosition(ne[ce]),graphic[ue?"initProps":"updateProps"](fe,{x:ie[ce][0],y:ie[ce][1]},H,le)):fe.setPosition(ie[ce]),oe.add(fe))}}function ae(ne){return map$1(ne,function(ie){return[X.cx,X.cy]})}Q.diff(ee).add(function(ne){var ie=Q.getItemLayout(ne);if(ie){var oe=new Polygon,se=new Polyline$1,le={shape:{points:ie}};oe.shape.points=ae(ie),se.shape.points=ae(ie),initProps(oe,le,H,ne),initProps(se,le,H,ne);var ue=new Group$3,ce=new Group$3;ue.add(se),ue.add(oe),ue.add(ce),re(se.shape.points,ie,ce,Q,ne,!0),Q.setItemGraphicEl(ne,ue)}}).update(function(ne,ie){var oe=ee.getItemGraphicEl(ie),se=oe.childAt(0),le=oe.childAt(1),ue=oe.childAt(2),ce={shape:{points:Q.getItemLayout(ne)}};ce.shape.points&&(re(se.shape.points,ce.shape.points,ue,Q,ne,!1),saveOldStyle(le),saveOldStyle(se),updateProps$1(se,ce,H),updateProps$1(le,ce,H),Q.setItemGraphicEl(ne,oe))}).remove(function(ne){K.remove(ee.getItemGraphicEl(ne))}).execute(),Q.eachItemGraphicEl(function(ne,ie){var oe=Q.getItemModel(ie),se=ne.childAt(0),le=ne.childAt(1),ue=ne.childAt(2),ce=Q.getItemVisual(ie,"style"),fe=ce.fill;K.add(ne),se.useStyle(defaults(oe.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:fe})),setStatesStylesFromModel(se,oe,"lineStyle"),setStatesStylesFromModel(le,oe,"areaStyle");var he=oe.getModel("areaStyle"),ve=he.isEmpty()&&he.parentModel.isEmpty();le.ignore=ve,each$f(["emphasis","select","blur"],function(pe){var ge=oe.getModel([pe,"areaStyle"]),me=ge.isEmpty()&&ge.parentModel.isEmpty();le.ensureState(pe).ignore=me&&ve;var ye=oe.getModel([pe,"lineStyle"]).getLineStyle();se.ensureState(pe).style=ye;var _e=ge.getAreaStyle();le.ensureState(pe).style=_e;var xe=oe.getModel([pe,"itemStyle"]).getItemStyle();ue.eachChild(function(Se){Se.ensureState(pe).style=clone$4(xe)})}),le.useStyle(defaults(oe.getModel("areaStyle").getAreaStyle(),{fill:fe,opacity:.7,decal:ce.decal}));var de=oe.getModel("emphasis");ue.eachChild(function(pe){if(pe instanceof ZRImage){var ge=pe.style;pe.useStyle(extend({image:ge.image,x:ge.x,y:ge.y,width:ge.width,height:ge.height},ce))}else pe.useStyle(ce),pe.setColor(fe),pe.style.strokeNoScale=!0;var me=Q.getStore().get(Q.getDimensionIndex(pe.__dimIdx),ie);(me==null||isNaN(me))&&(me=""),setLabelStyle(pe,getLabelStatesModels(oe),{labelFetcher:Q.hostModel,labelDataIndex:ie,labelDimIndex:pe.__dimIdx,defaultText:me,inheritColor:fe,defaultOpacity:ce.opacity})}),toggleHoverEmphasis(ne,de.get("focus"),de.get("blurScope"),de.get("disabled"))}),this._data=Q},G.prototype.remove=function(){this.group.removeAll(),this._data=null},G.type="radar",G})(ChartView),RadarSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.hasSymbolVisual=!0,H}return G.prototype.init=function(H){U.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this))},G.prototype.getInitialData=function(H,W){return createSeriesDataSimply(this,{generateCoord:"indicator_",generateCoordCount:1/0})},G.prototype.formatTooltip=function(H,W,Z){var X=this.getData(),K=this.coordinateSystem,Q=K.getIndicatorAxes(),ee=this.getData().getName(H),te=ee===""?this.name:ee,re=retrieveVisualColorForTooltipMarker(this,H);return createTooltipMarkup("section",{header:te,sortBlocks:!0,blocks:map$1(Q,function(ae){var ne=X.get(X.mapDimension(ae.dim),H);return createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:re,name:ae.name,value:ne,sortParam:ne})})})},G.prototype.getTooltipPosition=function(H){if(H!=null){for(var W=this.getData(),Z=this.coordinateSystem,X=W.getValues(map$1(Z.dimensions,function(te){return W.mapDimension(te)}),H),K=0,Q=X.length;K<Q;K++)if(!isNaN(X[K])){var ee=Z.getIndicatorAxes();return Z.coordToPoint(ee[K].dataToCoord(X[K]),K)}}},G.type="series.radar",G.dependencies=["radar"],G.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},G})(SeriesModel),valueAxisDefault=axisDefault.value;function defaultsShow(U,G){return defaults({show:G},U)}var RadarModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.optionUpdated=function(){var H=this.get("boundaryGap"),W=this.get("splitNumber"),Z=this.get("scale"),X=this.get("axisLine"),K=this.get("axisTick"),Q=this.get("axisLabel"),ee=this.get("axisName"),te=this.get(["axisName","show"]),re=this.get(["axisName","formatter"]),ae=this.get("axisNameGap"),ne=this.get("triggerEvent"),ie=map$1(this.get("indicator")||[],function(oe){oe.max!=null&&oe.max>0&&!oe.min?oe.min=0:oe.min!=null&&oe.min<0&&!oe.max&&(oe.max=0);var se=ee;oe.color!=null&&(se=defaults({color:oe.color},ee));var le=merge(clone$4(oe),{boundaryGap:H,splitNumber:W,scale:Z,axisLine:X,axisTick:K,axisLabel:Q,name:oe.text,showName:te,nameLocation:"end",nameGap:ae,nameTextStyle:se,triggerEvent:ne},!1);if(isString(re)){var ue=le.name;le.name=re.replace("{value}",ue??"")}else isFunction(re)&&(le.name=re(le.name,le));var ce=new Model(le,null,this.ecModel);return mixin(ce,AxisModelCommonMixin.prototype),ce.mainType="radar",ce.componentIndex=this.componentIndex,ce},this);this._indicatorModels=ie},G.prototype.getIndicatorModels=function(){return this._indicatorModels},G.type="radar",G.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:tokens.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:merge({lineStyle:{color:tokens.color.neutral20}},valueAxisDefault.axisLine),axisLabel:defaultsShow(valueAxisDefault.axisLabel,!1),axisTick:defaultsShow(valueAxisDefault.axisTick,!1),splitLine:defaultsShow(valueAxisDefault.splitLine,!0),splitArea:defaultsShow(valueAxisDefault.splitArea,!0),indicator:[]},G})(ComponentModel),RadarView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){var X=this.group;X.removeAll(),this._buildAxes(H,Z),this._buildSplitLineAndArea(H)},G.prototype._buildAxes=function(H,W){var Z=H.coordinateSystem,X=Z.getIndicatorAxes(),K=map$1(X,function(Q){var ee=Q.model.get("showName")?Q.name:"",te=new AxisBuilder(Q.model,W,{axisName:ee,position:[Z.cx,Z.cy],rotation:Q.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return te});each$f(K,function(Q){Q.build(),this.group.add(Q.group)},this)},G.prototype._buildSplitLineAndArea=function(H){var W=H.coordinateSystem,Z=W.getIndicatorAxes();if(!Z.length)return;var X=H.get("shape"),K=H.getModel("splitLine"),Q=H.getModel("splitArea"),ee=K.getModel("lineStyle"),te=Q.getModel("areaStyle"),re=K.get("show"),ae=Q.get("show"),ne=ee.get("color"),ie=te.get("color"),oe=isArray$1(ne)?ne:[ne],se=isArray$1(ie)?ie:[ie],le=[],ue=[];function ce(be,Ae,we){var Ce=we%Ae.length;return be[Ce]=be[Ce]||[],Ce}if(X==="circle")for(var fe=Z[0].getTicksCoords(),he=W.cx,ve=W.cy,de=0;de<fe.length;de++){if(re){var pe=ce(le,oe,de);le[pe].push(new Circle({shape:{cx:he,cy:ve,r:fe[de].coord}}))}if(ae&&de<fe.length-1){var pe=ce(ue,se,de);ue[pe].push(new Ring({shape:{cx:he,cy:ve,r0:fe[de].coord,r:fe[de+1].coord}}))}}else for(var ge,me=map$1(Z,function(be,Ae){var we=be.getTicksCoords();return ge=ge==null?we.length-1:Math.min(we.length-1,ge),map$1(we,function(Ce){return W.coordToPoint(Ce.coord,Ae)})}),ye=[],de=0;de<=ge;de++){for(var _e=[],xe=0;xe<Z.length;xe++)_e.push(me[xe][de]);if(_e[0]?_e.push(_e[0].slice()):process.env.NODE_ENV!=="production"&&console.error("Can't draw value axis "+de),re){var pe=ce(le,oe,de);le[pe].push(new Polyline$1({shape:{points:_e}}))}if(ae&&ye){var pe=ce(ue,se,de-1);ue[pe].push(new Polygon({shape:{points:_e.concat(ye)}}))}ye=_e.slice().reverse()}var Se=ee.getLineStyle(),Te=te.getAreaStyle();each$f(ue,function(be,Ae){this.group.add(mergePath(be,{style:defaults({stroke:"none",fill:se[Ae%se.length]},Te),silent:!0}))},this),each$f(le,function(be,Ae){this.group.add(mergePath(be,{style:defaults({fill:"none",stroke:oe[Ae%oe.length]},Se),silent:!0}))},this)},G.type="radar",G})(ComponentView),IndicatorAxis=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this,H,W,Z)||this;return X.type="value",X.angle=0,X.name="",X}return G})(Axis),Radar=(function(){function U(G,H,W){this.dimensions=[],this._model=G,this._indicatorAxes=map$1(G.getIndicatorModels(),function(Z,X){var K="indicator_"+X,Q=new IndicatorAxis(K,new IntervalScale);return Q.name=Z.get("name"),Q.model=Z,Z.axis=Q,this.dimensions.push(K),Q},this),this.resize(G,W)}return U.prototype.getIndicatorAxes=function(){return this._indicatorAxes},U.prototype.dataToPoint=function(G,H){var W=this._indicatorAxes[H];return this.coordToPoint(W.dataToCoord(G),H)},U.prototype.coordToPoint=function(G,H){var W=this._indicatorAxes[H],Z=W.angle,X=this.cx+G*Math.cos(Z),K=this.cy-G*Math.sin(Z);return[X,K]},U.prototype.pointToData=function(G){var H=G[0]-this.cx,W=G[1]-this.cy,Z=Math.sqrt(H*H+W*W);H/=Z,W/=Z;for(var X=Math.atan2(-W,H),K=1/0,Q,ee=-1,te=0;te<this._indicatorAxes.length;te++){var re=this._indicatorAxes[te],ae=Math.abs(X-re.angle);ae<K&&(Q=re,ee=te,K=ae)}return[ee,+(Q&&Q.coordToData(Z))]},U.prototype.resize=function(G,H){var W=createBoxLayoutReference(G,H).refContainer,Z=G.get("center"),X=Math.min(W.width,W.height)/2;this.cx=parsePercent(Z[0],W.width)+W.x,this.cy=parsePercent(Z[1],W.height)+W.y,this.startAngle=G.get("startAngle")*Math.PI/180;var K=G.get("radius");(isString(K)||isNumber(K))&&(K=[0,K]),this.r0=parsePercent(K[0],X),this.r=parsePercent(K[1],X),each$f(this._indicatorAxes,function(Q,ee){Q.setExtent(this.r0,this.r);var te=this.startAngle+ee*Math.PI*2/this._indicatorAxes.length;te=Math.atan2(Math.sin(te),Math.cos(te)),Q.angle=te},this)},U.prototype.update=function(G,H){var W=this._indicatorAxes,Z=this._model;each$f(W,function(Q){Q.scale.setExtent(1/0,-1/0)}),G.eachSeriesByType("radar",function(Q,ee){if(!(Q.get("coordinateSystem")!=="radar"||G.getComponent("radar",Q.get("radarIndex"))!==Z)){var te=Q.getData();each$f(W,function(re){re.scale.unionExtentFromData(te,te.mapDimension(re.dim))})}},this);var X=Z.get("splitNumber"),K=new IntervalScale;K.setExtent(0,X),K.setInterval(1),each$f(W,function(Q,ee){alignScaleTicks(Q.scale,Q.model,K)})},U.prototype.convertToPixel=function(G,H,W){return console.warn("Not implemented."),null},U.prototype.convertFromPixel=function(G,H,W){return console.warn("Not implemented."),null},U.prototype.containPoint=function(G){return console.warn("Not implemented."),!1},U.create=function(G,H){var W=[];return G.eachComponent("radar",function(Z){var X=new U(Z,G,H);W.push(X),Z.coordinateSystem=X}),G.eachSeriesByType("radar",function(Z){Z.get("coordinateSystem")==="radar"&&(Z.coordinateSystem=W[Z.get("radarIndex")||0])}),W},U.dimensions=[],U})();function install$P(U){U.registerCoordinateSystem("radar",Radar),U.registerComponentModel(RadarModel),U.registerComponentView(RadarView),U.registerVisual({seriesType:"radar",reset:function(G){var H=G.getData();H.each(function(W){H.setItemVisual(W,"legendIcon","roundRect")}),H.setVisual("legendIcon","roundRect")}})}function install$O(U){use(install$P),U.registerChartView(RadarView$1),U.registerSeriesModel(RadarSeriesModel),U.registerLayout(radarLayout),U.registerProcessor(dataFilter$1("radar")),U.registerPreprocessor(radarBackwardCompat)}var inner$g=makeInner();function take(U,G,H){inner$g(U)[G]=H}function release(U,G,H){var W=inner$g(U),Z=W[G];Z===H&&(W[G]=null)}function isTaken(U,G){return!!inner$g(U)[G]}registerAction$1({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},noop);var IRRELEVANT_EXCLUDES={axisPointer:1,tooltip:1,brush:1};function onIrrelevantElement(U,G,H){var W=G.getComponentByElement(U.topTarget);if(!W||W===H||IRRELEVANT_EXCLUDES.hasOwnProperty(W.mainType))return!1;var Z=W.coordinateSystem;if(!Z||Z.model===H)return!1;var X=retrieveZInfo(W),K=retrieveZInfo(H);return!((X.zlevel-K.zlevel||X.z-K.z)<=0)}var RoamController=(function(U){__extends(G,U);function G(H){var W=U.call(this)||this;W._zr=H;var Z=bind$1(W._mousedownHandler,W),X=bind$1(W._mousemoveHandler,W),K=bind$1(W._mouseupHandler,W),Q=bind$1(W._mousewheelHandler,W),ee=bind$1(W._pinchHandler,W);return W.enable=function(te,re){var ae=re.zInfo,ne=retrieveZInfo(ae.component),ie=ne.z,oe=ne.zlevel,se={component:ae.component,z:ie,zlevel:oe,z2:retrieve2(ae.z2,-1/0)},le=extend({},re.triggerInfo);this._opt=defaults(extend({},re),{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0,zInfoParsed:se,triggerInfo:le}),te==null&&(te=!0),(!this._enabled||this._controlType!==te)&&(this._enabled=!0,this.disable(),(te===!0||te==="move"||te==="pan")&&(addRoamZrListener(H,"mousedown",Z,se),addRoamZrListener(H,"mousemove",X,se),addRoamZrListener(H,"mouseup",K,se)),(te===!0||te==="scale"||te==="zoom")&&(addRoamZrListener(H,"mousewheel",Q,se),addRoamZrListener(H,"pinch",ee,se)))},W.disable=function(){this._enabled=!1,removeRoamZrListener(H,"mousedown",Z),removeRoamZrListener(H,"mousemove",X),removeRoamZrListener(H,"mouseup",K),removeRoamZrListener(H,"mousewheel",Q),removeRoamZrListener(H,"pinch",ee)},W}return G.prototype.isDragging=function(){return this._dragging},G.prototype.isPinching=function(){return this._pinching},G.prototype._checkPointer=function(H,W,Z){var X=this._opt,K=X.zInfoParsed;if(onIrrelevantElement(H,X.api,K.component))return!1;var Q=X.triggerInfo,ee=Q.roamTrigger,te=!1;return ee==="global"&&(te=!0),te||(te=Q.isInSelf(H,W,Z)),te&&Q.isInClip&&!Q.isInClip(H,W,Z)&&(te=!1),te},G.prototype._decideCursorStyle=function(H,W,Z,X){var K=H.target;if(!K&&this._checkPointer(H,W,Z))return"grab";if(X)return K&&K.cursor||"default"},G.prototype.dispose=function(){this.disable()},G.prototype._mousedownHandler=function(H){if(!(isMiddleOrRightButtonOnMouseUpDown(H)||eventConsumed(H))){for(var W=H.target;W;){if(W.draggable)return;W=W.__hostTarget||W.parent}var Z=H.offsetX,X=H.offsetY;this._checkPointer(H,Z,X)&&(this._x=Z,this._y=X,this._dragging=!0)}},G.prototype._mousemoveHandler=function(H){var W=this._zr;if(!(H.gestureEvent==="pinch"||isTaken(W,"globalPan")||eventConsumed(H))){var Z=H.offsetX,X=H.offsetY;if(!this._dragging||!isAvailableBehavior("moveOnMouseMove",H,this._opt)){var K=this._decideCursorStyle(H,Z,X,!1);K&&W.setCursorStyle(K);return}W.setCursorStyle("grabbing");var Q=this._x,ee=this._y,te=Z-Q,re=X-ee;this._x=Z,this._y=X,this._opt.preventDefaultMouseMove&&stop(H.event),H.__ecRoamConsumed=!0,trigger$1(this,"pan","moveOnMouseMove",H,{dx:te,dy:re,oldX:Q,oldY:ee,newX:Z,newY:X,isAvailableBehavior:null})}},G.prototype._mouseupHandler=function(H){if(!eventConsumed(H)){var W=this._zr;if(!isMiddleOrRightButtonOnMouseUpDown(H)){this._dragging=!1;var Z=this._decideCursorStyle(H,H.offsetX,H.offsetY,!0);Z&&W.setCursorStyle(Z)}}},G.prototype._mousewheelHandler=function(H){if(!eventConsumed(H)){var W=isAvailableBehavior("zoomOnMouseWheel",H,this._opt),Z=isAvailableBehavior("moveOnMouseWheel",H,this._opt),X=H.wheelDelta,K=Math.abs(X),Q=H.offsetX,ee=H.offsetY;if(!(X===0||!W&&!Z)){if(W){var te=K>3?1.4:K>1?1.2:1.1,re=X>0?te:1/te;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",H,{scale:re,originX:Q,originY:ee,isAvailableBehavior:null})}if(Z){var ae=Math.abs(X),ne=(X>0?1:-1)*(ae>3?.4:ae>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",H,{scrollDelta:ne,originX:Q,originY:ee,isAvailableBehavior:null})}}}},G.prototype._pinchHandler=function(H){if(!(isTaken(this._zr,"globalPan")||eventConsumed(H))){var W=H.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,H,{scale:W,originX:H.pinchX,originY:H.pinchY,isAvailableBehavior:null})}},G.prototype._checkTriggerMoveZoom=function(H,W,Z,X,K){H._checkPointer(X,K.originX,K.originY)&&(stop(X.event),X.__ecRoamConsumed=!0,trigger$1(H,W,Z,X,K))},G})(Eventful);function eventConsumed(U){return U.__ecRoamConsumed}var innerZrStore=makeInner();function ensureZrStore(U){var G=innerZrStore(U);return G.roam=G.roam||{},G.uniform=G.uniform||{},G}function addRoamZrListener(U,G,H,W){for(var Z=ensureZrStore(U),X=Z.roam,K=X[G]=X[G]||[],Q=0;Q<K.length;Q++){var ee=K[Q].zInfoParsed;if((ee.zlevel-W.zlevel||ee.z-W.z||ee.z2-W.z2)<=0)break}K.splice(Q,0,{listener:H,zInfoParsed:W}),ensureUniformListener(U,G)}function removeRoamZrListener(U,G,H){for(var W=ensureZrStore(U),Z=W.roam[G]||[],X=0;X<Z.length;X++)if(Z[X].listener===H){Z.splice(X,1),Z.length||removeUniformListener(U,G);return}}function ensureUniformListener(U,G){var H=ensureZrStore(U);H.uniform[G]||U.on(G,H.uniform[G]=function(W){var Z=H.roam[G];if(Z)for(var X=0;X<Z.length;X++)Z[X].listener(W)})}function removeUniformListener(U,G){var H=ensureZrStore(U),W=H.uniform;W[G]&&(U.off(G,W[G]),W[G]=null)}function trigger$1(U,G,H,W,Z){Z.isAvailableBehavior=bind$1(isAvailableBehavior,null,H,W),U.trigger(G,Z)}function isAvailableBehavior(U,G,H){var W=H[U];return!U||W&&(!isString(W)||G.event[W+"Key"])}function updateViewOnPan(U,G,H){var W=U.target;W.x+=G,W.y+=H,W.dirty()}function updateViewOnZoom(U,G,H,W){var Z=U.target,X=U.zoomLimit,K=U.zoom=U.zoom||1;K*=G,K=clampByZoomLimit(K,X);var Q=K/U.zoom;U.zoom=K,zoomTransformableByOrigin(Z,H,W,Q),Z.dirty()}function updateController(U,G,H,W,Z,X){var K=new BoundingRect(0,0,0,0);W.enable(U.get("roam"),{api:G,zInfo:{component:U},triggerInfo:{roamTrigger:U.get("roamTrigger"),isInSelf:function(te,re,ae){return K.copy(H.getBoundingRect()),K.applyTransform(H.getComputedTransform()),K.contain(re,ae)},isInClip:function(te,re,ae){return!X||X.contain(re,ae)}}}),Z.zoomLimit=U.get("scaleLimit");var Q=U.coordinateSystem;Z.zoom=Q?Q.getZoom():1;var ee=U.subType+"Roam";W.off("pan").off("zoom").on("pan",function(te){updateViewOnPan(Z,te.dx,te.dy),G.dispatchAction({seriesId:U.id,type:ee,dx:te.dx,dy:te.dy})}).on("zoom",function(te){updateViewOnZoom(Z,te.scale,te.originX,te.originY),G.dispatchAction({seriesId:U.id,type:ee,zoom:te.scale,originX:te.originX,originY:te.originY}),G.updateLabelLayout()})}function getCenterCoord(U,G){return U.pointToProjected?U.pointToProjected(G):U.pointToData(G)}function updateCenterAndZoomInAction(U,G,H){var W=U.getZoom(),Z=U.getCenter(),X=G.zoom,K=U.projectedToPoint?U.projectedToPoint(Z):U.dataToPoint(Z);return G.dx!=null&&G.dy!=null&&(K[0]-=G.dx,K[1]-=G.dy,U.setCenter(getCenterCoord(U,K))),X!=null&&(X=clampByZoomLimit(W*X,H)/W,zoomTransformableByOrigin(U,G.originX,G.originY,X),U.updateTransform(),U.setCenter(getCenterCoord(U,K)),U.setZoom(X*W)),{center:U.getCenter(),zoom:U.getZoom()}}function zoomTransformableByOrigin(U,G,H,W){U.x-=(G-U.x)*(W-1),U.y-=(H-U.y)*(W-1),U.scaleX*=W,U.scaleY*=W}function clampByZoomLimit(U,G){if(G){var H=G.min||0,W=G.max||1/0;U=Math.max(Math.min(W,U),H)}return U}function parseXML(U){if(isString(U)){var G=new DOMParser;U=G.parseFromString(U,"text/xml")}var H=U;for(H.nodeType===9&&(H=H.firstChild);H.nodeName.toLowerCase()!=="svg"||H.nodeType!==1;)H=H.nextSibling;return H}var nodeParsers,INHERITABLE_STYLE_ATTRIBUTES_MAP={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS=keys(INHERITABLE_STYLE_ATTRIBUTES_MAP),SELF_STYLE_ATTRIBUTES_MAP={"alignment-baseline":"textBaseline","stop-color":"stopColor"},SELF_STYLE_ATTRIBUTES_MAP_KEYS=keys(SELF_STYLE_ATTRIBUTES_MAP),SVGParser=(function(){function U(){this._defs={},this._root=null}return U.prototype.parse=function(G,H){H=H||{};var W=parseXML(G);if(process.env.NODE_ENV!=="production"&&!W)throw new Error("Illegal svg");this._defsUsePending=[];var Z=new Group$3;this._root=Z;var X=[],K=W.getAttribute("viewBox")||"",Q=parseFloat(W.getAttribute("width")||H.width),ee=parseFloat(W.getAttribute("height")||H.height);isNaN(Q)&&(Q=null),isNaN(ee)&&(ee=null),parseAttributes(W,Z,null,!0,!1);for(var te=W.firstChild;te;)this._parseNode(te,Z,X,null,!1,!1),te=te.nextSibling;applyDefs(this._defs,this._defsUsePending),this._defsUsePending=[];var re,ae;if(K){var ne=splitNumberSequence(K);ne.length>=4&&(re={x:parseFloat(ne[0]||0),y:parseFloat(ne[1]||0),width:parseFloat(ne[2]),height:parseFloat(ne[3])})}if(re&&Q!=null&&ee!=null&&(ae=makeViewBoxTransform(re,{x:0,y:0,width:Q,height:ee}),!H.ignoreViewBox)){var ie=Z;Z=new Group$3,Z.add(ie),ie.scaleX=ie.scaleY=ae.scale,ie.x=ae.x,ie.y=ae.y}return!H.ignoreRootClip&&Q!=null&&ee!=null&&Z.setClipPath(new Rect$2({shape:{x:0,y:0,width:Q,height:ee}})),{root:Z,width:Q,height:ee,viewBoxRect:re,viewBoxTransform:ae,named:X}},U.prototype._parseNode=function(G,H,W,Z,X,K){var Q=G.nodeName.toLowerCase(),ee,te=Z;if(Q==="defs"&&(X=!0),Q==="text"&&(K=!0),Q==="defs"||Q==="switch")ee=H;else{if(!X){var re=nodeParsers[Q];if(re&&hasOwn(nodeParsers,Q)){ee=re.call(this,G,H);var ae=G.getAttribute("name");if(ae){var ne={name:ae,namedFrom:null,svgNodeTagLower:Q,el:ee};W.push(ne),Q==="g"&&(te=ne)}else Z&&W.push({name:Z.name,namedFrom:Z,svgNodeTagLower:Q,el:ee});H.add(ee)}}var ie=paintServerParsers[Q];if(ie&&hasOwn(paintServerParsers,Q)){var oe=ie.call(this,G),se=G.getAttribute("id");se&&(this._defs[se]=oe)}}if(ee&&ee.isGroup)for(var le=G.firstChild;le;)le.nodeType===1?this._parseNode(le,ee,W,te,X,K):le.nodeType===3&&K&&this._parseText(le,ee),le=le.nextSibling},U.prototype._parseText=function(G,H){var W=new TSpan({style:{text:G.textContent},silent:!0,x:this._textX||0,y:this._textY||0});inheritStyle(H,W),parseAttributes(G,W,this._defsUsePending,!1,!1),applyTextAlignment(W,H);var Z=W.style,X=Z.fontSize;X&&X<9&&(Z.fontSize=9,W.scaleX*=X/9,W.scaleY*=X/9);var K=(Z.fontSize||Z.fontFamily)&&[Z.fontStyle,Z.fontWeight,(Z.fontSize||12)+"px",Z.fontFamily||"sans-serif"].join(" ");Z.font=K;var Q=W.getBoundingRect();return this._textX+=Q.width,H.add(W),W},U.internalField=(function(){nodeParsers={g:function(G,H){var W=new Group$3;return inheritStyle(H,W),parseAttributes(G,W,this._defsUsePending,!1,!1),W},rect:function(G,H){var W=new Rect$2;return inheritStyle(H,W),parseAttributes(G,W,this._defsUsePending,!1,!1),W.setShape({x:parseFloat(G.getAttribute("x")||"0"),y:parseFloat(G.getAttribute("y")||"0"),width:parseFloat(G.getAttribute("width")||"0"),height:parseFloat(G.getAttribute("height")||"0")}),W.silent=!0,W},circle:function(G,H){var W=new Circle;return inheritStyle(H,W),parseAttributes(G,W,this._defsUsePending,!1,!1),W.setShape({cx:parseFloat(G.getAttribute("cx")||"0"),cy:parseFloat(G.getAttribute("cy")||"0"),r:parseFloat(G.getAttribute("r")||"0")}),W.silent=!0,W},line:function(G,H){var W=new Line$1;return inheritStyle(H,W),parseAttributes(G,W,this._defsUsePending,!1,!1),W.setShape({x1:parseFloat(G.getAttribute("x1")||"0"),y1:parseFloat(G.getAttribute("y1")||"0"),x2:parseFloat(G.getAttribute("x2")||"0"),y2:parseFloat(G.getAttribute("y2")||"0")}),W.silent=!0,W},ellipse:function(G,H){var W=new Ellipse;return inheritStyle(H,W),parseAttributes(G,W,this._defsUsePending,!1,!1),W.setShape({cx:parseFloat(G.getAttribute("cx")||"0"),cy:parseFloat(G.getAttribute("cy")||"0"),rx:parseFloat(G.getAttribute("rx")||"0"),ry:parseFloat(G.getAttribute("ry")||"0")}),W.silent=!0,W},polygon:function(G,H){var W=G.getAttribute("points"),Z;W&&(Z=parsePoints(W));var X=new Polygon({shape:{points:Z||[]},silent:!0});return inheritStyle(H,X),parseAttributes(G,X,this._defsUsePending,!1,!1),X},polyline:function(G,H){var W=G.getAttribute("points"),Z;W&&(Z=parsePoints(W));var X=new Polyline$1({shape:{points:Z||[]},silent:!0});return inheritStyle(H,X),parseAttributes(G,X,this._defsUsePending,!1,!1),X},image:function(G,H){var W=new ZRImage;return inheritStyle(H,W),parseAttributes(G,W,this._defsUsePending,!1,!1),W.setStyle({image:G.getAttribute("xlink:href")||G.getAttribute("href"),x:+G.getAttribute("x"),y:+G.getAttribute("y"),width:+G.getAttribute("width"),height:+G.getAttribute("height")}),W.silent=!0,W},text:function(G,H){var W=G.getAttribute("x")||"0",Z=G.getAttribute("y")||"0",X=G.getAttribute("dx")||"0",K=G.getAttribute("dy")||"0";this._textX=parseFloat(W)+parseFloat(X),this._textY=parseFloat(Z)+parseFloat(K);var Q=new Group$3;return inheritStyle(H,Q),parseAttributes(G,Q,this._defsUsePending,!1,!0),Q},tspan:function(G,H){var W=G.getAttribute("x"),Z=G.getAttribute("y");W!=null&&(this._textX=parseFloat(W)),Z!=null&&(this._textY=parseFloat(Z));var X=G.getAttribute("dx")||"0",K=G.getAttribute("dy")||"0",Q=new Group$3;return inheritStyle(H,Q),parseAttributes(G,Q,this._defsUsePending,!1,!0),this._textX+=parseFloat(X),this._textY+=parseFloat(K),Q},path:function(G,H){var W=G.getAttribute("d")||"",Z=createFromString(W);return inheritStyle(H,Z),parseAttributes(G,Z,this._defsUsePending,!1,!1),Z.silent=!0,Z}}})(),U})(),paintServerParsers={lineargradient:function(U){var G=parseInt(U.getAttribute("x1")||"0",10),H=parseInt(U.getAttribute("y1")||"0",10),W=parseInt(U.getAttribute("x2")||"10",10),Z=parseInt(U.getAttribute("y2")||"0",10),X=new LinearGradient(G,H,W,Z);return parsePaintServerUnit(U,X),parseGradientColorStops(U,X),X},radialgradient:function(U){var G=parseInt(U.getAttribute("cx")||"0",10),H=parseInt(U.getAttribute("cy")||"0",10),W=parseInt(U.getAttribute("r")||"0",10),Z=new RadialGradient(G,H,W);return parsePaintServerUnit(U,Z),parseGradientColorStops(U,Z),Z}};function parsePaintServerUnit(U,G){var H=U.getAttribute("gradientUnits");H==="userSpaceOnUse"&&(G.global=!0)}function parseGradientColorStops(U,G){for(var H=U.firstChild;H;){if(H.nodeType===1&&H.nodeName.toLocaleLowerCase()==="stop"){var W=H.getAttribute("offset"),Z=void 0;W&&W.indexOf("%")>0?Z=parseInt(W,10)/100:W?Z=parseFloat(W):Z=0;var X={};parseInlineStyle(H,X,X);var K=X.stopColor||H.getAttribute("stop-color")||"#000000",Q=X.stopOpacity||H.getAttribute("stop-opacity");if(Q){var ee=parse(K),te=ee&&ee[3];te&&(ee[3]*=parseCssFloat(Q),K=stringify(ee,"rgba"))}G.colorStops.push({offset:Z,color:K})}H=H.nextSibling}}function inheritStyle(U,G){U&&U.__inheritedStyle&&(G.__inheritedStyle||(G.__inheritedStyle={}),defaults(G.__inheritedStyle,U.__inheritedStyle))}function parsePoints(U){for(var G=splitNumberSequence(U),H=[],W=0;W<G.length;W+=2){var Z=parseFloat(G[W]),X=parseFloat(G[W+1]);H.push([Z,X])}return H}function parseAttributes(U,G,H,W,Z){var X=G,K=X.__inheritedStyle=X.__inheritedStyle||{},Q={};U.nodeType===1&&(parseTransformAttribute(U,G),parseInlineStyle(U,K,Q),W||parseAttributeStyle(U,K,Q)),X.style=X.style||{},K.fill!=null&&(X.style.fill=getFillStrokeStyle(X,"fill",K.fill,H)),K.stroke!=null&&(X.style.stroke=getFillStrokeStyle(X,"stroke",K.stroke,H)),each$f(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(ee){K[ee]!=null&&(X.style[ee]=parseFloat(K[ee]))}),each$f(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(ee){K[ee]!=null&&(X.style[ee]=K[ee])}),Z&&(X.__selfStyle=Q),K.lineDash&&(X.style.lineDash=map$1(splitNumberSequence(K.lineDash),function(ee){return parseFloat(ee)})),(K.visibility==="hidden"||K.visibility==="collapse")&&(X.invisible=!0),K.display==="none"&&(X.ignore=!0)}function applyTextAlignment(U,G){var H=G.__selfStyle;if(H){var W=H.textBaseline,Z=W;!W||W==="auto"||W==="baseline"?Z="alphabetic":W==="before-edge"||W==="text-before-edge"?Z="top":W==="after-edge"||W==="text-after-edge"?Z="bottom":(W==="central"||W==="mathematical")&&(Z="middle"),U.style.textBaseline=Z}var X=G.__inheritedStyle;if(X){var K=X.textAlign,Q=K;K&&(K==="middle"&&(Q="center"),U.style.textAlign=Q)}}var urlRegex=/^url\(\s*#(.*?)\)/;function getFillStrokeStyle(U,G,H,W){var Z=H&&H.match(urlRegex);if(Z){var X=trim$1(Z[1]);W.push([U,G,X]);return}return H==="none"&&(H=null),H}function applyDefs(U,G){for(var H=0;H<G.length;H++){var W=G[H];W[0].style[W[1]]=U[W[2]]}}var numberReg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function splitNumberSequence(U){return U.match(numberReg)||[]}var transformRegex=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,DEGREE_TO_ANGLE=Math.PI/180;function parseTransformAttribute(U,G){var H=U.getAttribute("transform");if(H){H=H.replace(/,/g," ");var W=[],Z=null;H.replace(transformRegex,function(ae,ne,ie){return W.push(ne,ie),""});for(var X=W.length-1;X>0;X-=2){var K=W[X],Q=W[X-1],ee=splitNumberSequence(K);switch(Z=Z||create$1(),Q){case"translate":translate(Z,Z,[parseFloat(ee[0]),parseFloat(ee[1]||"0")]);break;case"scale":scale$1(Z,Z,[parseFloat(ee[0]),parseFloat(ee[1]||ee[0])]);break;case"rotate":rotate(Z,Z,-parseFloat(ee[0])*DEGREE_TO_ANGLE,[parseFloat(ee[1]||"0"),parseFloat(ee[2]||"0")]);break;case"skewX":var te=Math.tan(parseFloat(ee[0])*DEGREE_TO_ANGLE);mul(Z,[1,0,te,1,0,0],Z);break;case"skewY":var re=Math.tan(parseFloat(ee[0])*DEGREE_TO_ANGLE);mul(Z,[1,re,0,1,0,0],Z);break;case"matrix":Z[0]=parseFloat(ee[0]),Z[1]=parseFloat(ee[1]),Z[2]=parseFloat(ee[2]),Z[3]=parseFloat(ee[3]),Z[4]=parseFloat(ee[4]),Z[5]=parseFloat(ee[5]);break}}G.setLocalTransform(Z)}}var styleRegex=/([^\s:;]+)\s*:\s*([^:;]+)/g;function parseInlineStyle(U,G,H){var W=U.getAttribute("style");if(W){styleRegex.lastIndex=0;for(var Z;(Z=styleRegex.exec(W))!=null;){var X=Z[1],K=hasOwn(INHERITABLE_STYLE_ATTRIBUTES_MAP,X)?INHERITABLE_STYLE_ATTRIBUTES_MAP[X]:null;K&&(G[K]=Z[2]);var Q=hasOwn(SELF_STYLE_ATTRIBUTES_MAP,X)?SELF_STYLE_ATTRIBUTES_MAP[X]:null;Q&&(H[Q]=Z[2])}}}function parseAttributeStyle(U,G,H){for(var W=0;W<INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS.length;W++){var Z=INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS[W],X=U.getAttribute(Z);X!=null&&(G[INHERITABLE_STYLE_ATTRIBUTES_MAP[Z]]=X)}for(var W=0;W<SELF_STYLE_ATTRIBUTES_MAP_KEYS.length;W++){var Z=SELF_STYLE_ATTRIBUTES_MAP_KEYS[W],X=U.getAttribute(Z);X!=null&&(H[SELF_STYLE_ATTRIBUTES_MAP[Z]]=X)}}function makeViewBoxTransform(U,G){var H=G.width/U.width,W=G.height/U.height,Z=Math.min(H,W);return{scale:Z,x:-(U.x+U.width/2)*Z+(G.x+G.width/2),y:-(U.y+U.height/2)*Z+(G.y+G.height/2)}}function parseSVG(U,G){var H=new SVGParser;return H.parse(U,G)}var REGION_AVAILABLE_SVG_TAG_MAP=createHashMap(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),GeoSVGResource=(function(){function U(G,H){this.type="geoSVG",this._usedGraphicMap=createHashMap(),this._freedGraphics=[],this._mapName=G,this._parsedXML=parseXML(H)}return U.prototype.load=function(){var G=this._firstGraphic;if(!G){G=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(G),this._boundingRect=this._firstGraphic.boundingRect.clone();var H=createRegions(G.named),W=H.regions,Z=H.regionsMap;this._regions=W,this._regionsMap=Z}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},U.prototype._buildGraphic=function(G){var H,W;try{H=G&&parseSVG(G,{ignoreViewBox:!0,ignoreRootClip:!0})||{},W=H.root,assert(W!=null)}catch(le){throw new Error(`Invalid svg format
|
|
30
|
+
`+le.message)}var Z=new Group$3;Z.add(W),Z.isGeoSVGGraphicRoot=!0;var X=H.width,K=H.height,Q=H.viewBoxRect,ee=this._boundingRect;if(!ee){var te=void 0,re=void 0,ae=void 0,ne=void 0;if(X!=null?(te=0,ae=X):Q&&(te=Q.x,ae=Q.width),K!=null?(re=0,ne=K):Q&&(re=Q.y,ne=Q.height),te==null||re==null){var ie=W.getBoundingRect();te==null&&(te=ie.x,ae=ie.width),re==null&&(re=ie.y,ne=ie.height)}ee=this._boundingRect=new BoundingRect(te,re,ae,ne)}if(Q){var oe=makeViewBoxTransform(Q,ee);W.scaleX=W.scaleY=oe.scale,W.x=oe.x,W.y=oe.y}Z.setClipPath(new Rect$2({shape:ee.plain()}));var se=[];return each$f(H.named,function(le){REGION_AVAILABLE_SVG_TAG_MAP.get(le.svgNodeTagLower)!=null&&(se.push(le),setSilent(le.el))}),{root:Z,boundingRect:ee,named:se}},U.prototype.useGraphic=function(G){var H=this._usedGraphicMap,W=H.get(G);return W||(W=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),H.set(G,W),W)},U.prototype.freeGraphic=function(G){var H=this._usedGraphicMap,W=H.get(G);W&&(H.removeKey(G),this._freedGraphics.push(W))},U})();function setSilent(U){U.silent=!1,U.isGroup&&U.traverse(function(G){G.silent=!1})}function createRegions(U){var G=[],H=createHashMap();return each$f(U,function(W){if(W.namedFrom==null){var Z=new GeoSVGRegion(W.name,W.el);G.push(Z),H.set(W.name,Z)}}),{regions:G,regionsMap:H}}for(var geoCoord=[126,25],nanhaiName="南海诸岛",points$1=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]],i=0;i<points$1.length;i++)for(var k=0;k<points$1[i].length;k++)points$1[i][k][0]/=10.5,points$1[i][k][1]/=-10.5/.75,points$1[i][k][0]+=geoCoord[0],points$1[i][k][1]+=geoCoord[1];function fixNanhai(U,G){if(U==="china"){for(var H=0;H<G.length;H++)if(G[H].name===nanhaiName)return;G.push(new GeoJSONRegion(nanhaiName,map$1(points$1,function(W){return{type:"polygon",exterior:W}}),geoCoord))}}var coordsOffsetMap={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function fixTextCoords(U,G){if(U==="china"){var H=coordsOffsetMap[G.name];if(H){var W=G.getCenter();W[0]+=H[0]/10.5,W[1]+=-H[1]/(10.5/.75),G.setCenter(W)}}}var points=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function fixDiaoyuIsland(U,G){U==="china"&&G.name==="台湾"&&G.geometries.push({type:"polygon",exterior:points[0]})}var DEFAULT_NAME_PROPERTY="name",GeoJSONResource=(function(){function U(G,H,W){this.type="geoJSON",this._parsedMap=createHashMap(),this._mapName=G,this._specialAreas=W,this._geoJSON=parseInput(H)}return U.prototype.load=function(G,H){H=H||DEFAULT_NAME_PROPERTY;var W=this._parsedMap.get(H);if(!W){var Z=this._parseToRegions(H);W=this._parsedMap.set(H,{regions:Z,boundingRect:calculateBoundingRect(Z)})}var X=createHashMap(),K=[];return each$f(W.regions,function(Q){var ee=Q.name;G&&hasOwn(G,ee)&&(Q=Q.cloneShallow(ee=G[ee])),K.push(Q),X.set(ee,Q)}),{regions:K,boundingRect:W.boundingRect||new BoundingRect(0,0,0,0),regionsMap:X}},U.prototype._parseToRegions=function(G){var H=this._mapName,W=this._geoJSON,Z;try{Z=W?parseGeoJSON(W,G):[]}catch(X){throw new Error(`Invalid geoJson format
|
|
31
|
+
`+X.message)}return fixNanhai(H,Z),each$f(Z,function(X){var K=X.name;fixTextCoords(H,X),fixDiaoyuIsland(H,X);var Q=this._specialAreas&&this._specialAreas[K];Q&&X.transformTo(Q.left,Q.top,Q.width,Q.height)},this),Z},U.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},U})();function calculateBoundingRect(U){for(var G,H=0;H<U.length;H++){var W=U[H].getBoundingRect();G=G||W.clone(),G.union(W)}return G}function parseInput(U){return isString(U)?typeof JSON<"u"&&JSON.parse?JSON.parse(U):new Function("return ("+U+");")():U}var storage=createHashMap();const geoSourceManager={registerMap:function(U,G,H){if(G.svg){var W=new GeoSVGResource(U,G.svg);storage.set(U,W)}else{var Z=G.geoJson||G.geoJSON;Z&&!G.features?H=G.specialAreas:Z=G;var W=new GeoJSONResource(U,Z,H);storage.set(U,W)}},getGeoResource:function(U){return storage.get(U)},getMapForUser:function(U){var G=storage.get(U);return G&&G.type==="geoJSON"&&G.getMapForUser()},load:function(U,G,H){var W=storage.get(U);if(!W){process.env.NODE_ENV!=="production"&&console.error("Map "+U+" not exists. The GeoJSON of the map must be provided.");return}return W.load(G,H)}};var OPTION_STYLE_ENABLED_TAGS=["rect","circle","line","ellipse","polygon","polyline","path"],OPTION_STYLE_ENABLED_TAG_MAP=createHashMap(OPTION_STYLE_ENABLED_TAGS),STATE_TRIGGER_TAG_MAP=createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(["g"])),LABEL_HOST_MAP=createHashMap(OPTION_STYLE_ENABLED_TAGS.concat(["g"])),mapLabelRaw=makeInner();function getFixedItemStyle(U){var G=U.getItemStyle(),H=U.get("areaColor");return H!=null&&(G.fill=H),G}function fixLineStyle(U){var G=U.style;G&&(G.stroke=G.stroke||G.fill,G.fill=null)}var MapDraw=(function(){function U(G){var H=this.group=new Group$3,W=this._transformGroup=new Group$3;H.add(W),this.uid=getUID("ec_map_draw"),this._controller=new RoamController(G.getZr()),this._controllerHost={target:W},W.add(this._regionsGroup=new Group$3),W.add(this._svgGroup=new Group$3)}return U.prototype.draw=function(G,H,W,Z,X){var K=G.mainType==="geo",Q=G.getData&&G.getData();K&&H.eachComponent({mainType:"series",subType:"map"},function(fe){!Q&&fe.getHostGeoModel()===G&&(Q=fe.getData())});var ee=G.coordinateSystem,te=this._regionsGroup,re=this._transformGroup,ae=ee.getTransformInfo(),ne=ae.raw,ie=ae.roam,oe=!te.childAt(0)||X,se=G.getShallow("clip",!0),le;se?(le=ee.getViewRect().clone(),this.group.setClipPath(new Rect$2({shape:le.clone()}))):this.group.removeClipPath(),oe?(re.x=ie.x,re.y=ie.y,re.scaleX=ie.scaleX,re.scaleY=ie.scaleY,re.dirty()):updateProps$1(re,ie,G);var ue=Q&&Q.getVisual("visualMeta")&&Q.getVisual("visualMeta").length>0,ce={api:W,geo:ee,mapOrGeoModel:G,data:Q,isVisualEncodedByVisualMap:ue,isGeo:K,transformInfoRaw:ne};ee.resourceType==="geoJSON"?this._buildGeoJSON(ce):ee.resourceType==="geoSVG"&&this._buildSVG(ce),this._updateController(G,le,H,W),this._updateMapSelectHandler(G,te,W,Z)},U.prototype._buildGeoJSON=function(G){var H=this._regionsGroupByName=createHashMap(),W=createHashMap(),Z=this._regionsGroup,X=G.transformInfoRaw,K=G.mapOrGeoModel,Q=G.data,ee=G.geo.projection,te=ee&&ee.stream;function re(ie,oe){return oe&&(ie=oe(ie)),ie&&[ie[0]*X.scaleX+X.x,ie[1]*X.scaleY+X.y]}function ae(ie){for(var oe=[],se=!te&&ee&&ee.project,le=0;le<ie.length;++le){var ue=re(ie[le],se);ue&&oe.push(ue)}return oe}function ne(ie){return{shape:{points:ae(ie)}}}Z.removeAll(),each$f(G.geo.regions,function(ie){var oe=ie.name,se=H.get(oe),le=W.get(oe)||{},ue=le.dataIdx,ce=le.regionModel;if(!se){se=H.set(oe,new Group$3),Z.add(se),ue=Q?Q.indexOfName(oe):null,ce=G.isGeo?K.getRegionModel(oe):Q?Q.getItemModel(ue):null;var fe=ce.get("silent",!0);fe!=null&&(se.silent=fe),W.set(oe,{dataIdx:ue,regionModel:ce})}var he=[],ve=[];each$f(ie.geometries,function(ge){if(ge.type==="polygon"){var me=[ge.exterior].concat(ge.interiors||[]);te&&(me=projectPolys(me,te)),each$f(me,function(_e){he.push(new Polygon(ne(_e)))})}else{var ye=ge.points;te&&(ye=projectPolys(ye,te,!0)),each$f(ye,function(_e){ve.push(new Polyline$1(ne(_e)))})}});var de=re(ie.getCenter(),ee&&ee.project);function pe(ge,me){if(ge.length){var ye=new CompoundPath({culling:!0,segmentIgnoreThreshold:1,shape:{paths:ge}});se.add(ye),applyOptionStyleForRegion(G,ye,ue,ce),resetLabelForRegion(G,ye,oe,ce,K,ue,de),me&&(fixLineStyle(ye),each$f(ye.states,fixLineStyle))}}pe(he),pe(ve,!0)}),H.each(function(ie,oe){var se=W.get(oe),le=se.dataIdx,ue=se.regionModel;resetEventTriggerForRegion(G,ie,oe,ue,K,le),resetTooltipForRegion(G,ie,oe,ue,K),resetStateTriggerForRegion(G,ie,oe,ue,K)},this)},U.prototype._buildSVG=function(G){var H=G.geo.map,W=G.transformInfoRaw;this._svgGroup.x=W.x,this._svgGroup.y=W.y,this._svgGroup.scaleX=W.scaleX,this._svgGroup.scaleY=W.scaleY,this._svgResourceChanged(H)&&(this._freeSVG(),this._useSVG(H));var Z=this._svgDispatcherMap=createHashMap(),X=!1;each$f(this._svgGraphicRecord.named,function(K){var Q=K.name,ee=G.mapOrGeoModel,te=G.data,re=K.svgNodeTagLower,ae=K.el,ne=te?te.indexOfName(Q):null,ie=ee.getRegionModel(Q);OPTION_STYLE_ENABLED_TAG_MAP.get(re)!=null&&ae instanceof Displayable&&applyOptionStyleForRegion(G,ae,ne,ie),ae instanceof Displayable&&(ae.culling=!0);var oe=ie.get("silent",!0);if(oe!=null&&(ae.silent=oe),ae.z2EmphasisLift=0,!K.namedFrom&&(LABEL_HOST_MAP.get(re)!=null&&resetLabelForRegion(G,ae,Q,ie,ee,ne,null),resetEventTriggerForRegion(G,ae,Q,ie,ee,ne),resetTooltipForRegion(G,ae,Q,ie,ee),STATE_TRIGGER_TAG_MAP.get(re)!=null)){var se=resetStateTriggerForRegion(G,ae,Q,ie,ee);se==="self"&&(X=!0);var le=Z.get(Q)||Z.set(Q,[]);le.push(ae)}},this),this._enableBlurEntireSVG(X,G)},U.prototype._enableBlurEntireSVG=function(G,H){if(G&&H.isGeo){var W=H.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),Z=W.opacity;this._svgGraphicRecord.root.traverse(function(X){if(!X.isGroup){setDefaultStateProxy(X);var K=X.ensureState("blur").style||{};K.opacity==null&&Z!=null&&(K.opacity=Z),X.ensureState("emphasis")}})}},U.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},U.prototype.findHighDownDispatchers=function(G,H){if(G==null)return[];var W=H.coordinateSystem;if(W.resourceType==="geoJSON"){var Z=this._regionsGroupByName;if(Z){var X=Z.get(G);return X?[X]:[]}}else if(W.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(G)||[]},U.prototype._svgResourceChanged=function(G){return this._svgMapName!==G},U.prototype._useSVG=function(G){var H=geoSourceManager.getGeoResource(G);if(H&&H.type==="geoSVG"){var W=H.useGraphic(this.uid);this._svgGroup.add(W.root),this._svgGraphicRecord=W,this._svgMapName=G}},U.prototype._freeSVG=function(){var G=this._svgMapName;if(G!=null){var H=geoSourceManager.getGeoResource(G);H&&H.type==="geoSVG"&&H.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},U.prototype._updateController=function(G,H,W,Z){var X=G.coordinateSystem,K=this._controller,Q=this._controllerHost;Q.zoomLimit=G.get("scaleLimit"),Q.zoom=X.getZoom(),K.enable(G.get("roam")||!1,{api:Z,zInfo:{component:G},triggerInfo:{roamTrigger:G.get("roamTrigger"),isInSelf:function(re,ae,ne){return X.containPoint([ae,ne])},isInClip:function(re,ae,ne){return!H||H.contain(ae,ne)}}});var ee=G.mainType;function te(){var re={type:"geoRoam",componentType:ee};return re[ee+"Id"]=G.id,re}K.off("pan").on("pan",function(re){this._mouseDownFlag=!1,updateViewOnPan(Q,re.dx,re.dy),Z.dispatchAction(extend(te(),{dx:re.dx,dy:re.dy,animation:{duration:0}}))},this),K.off("zoom").on("zoom",function(re){this._mouseDownFlag=!1,updateViewOnZoom(Q,re.scale,re.originX,re.originY),Z.dispatchAction(extend(te(),{totalZoom:Q.zoom,zoom:re.scale,originX:re.originX,originY:re.originY,animation:{duration:0}}))},this)},U.prototype.resetForLabelLayout=function(){this.group.traverse(function(G){var H=G.getTextContent();H&&(H.ignore=mapLabelRaw(H).ignore)})},U.prototype._updateMapSelectHandler=function(G,H,W,Z){var X=this;H.off("mousedown"),H.off("click"),G.get("selectedMode")&&(H.on("mousedown",function(){X._mouseDownFlag=!0}),H.on("click",function(K){X._mouseDownFlag&&(X._mouseDownFlag=!1)}))},U})();function applyOptionStyleForRegion(U,G,H,W){var Z=W.getModel("itemStyle"),X=W.getModel(["emphasis","itemStyle"]),K=W.getModel(["blur","itemStyle"]),Q=W.getModel(["select","itemStyle"]),ee=getFixedItemStyle(Z),te=getFixedItemStyle(X),re=getFixedItemStyle(Q),ae=getFixedItemStyle(K),ne=U.data;if(ne){var ie=ne.getItemVisual(H,"style"),oe=ne.getItemVisual(H,"decal");U.isVisualEncodedByVisualMap&&ie.fill&&(ee.fill=ie.fill),oe&&(ee.decal=createOrUpdatePatternFromDecal(oe,U.api))}G.setStyle(ee),G.style.strokeNoScale=!0,G.ensureState("emphasis").style=te,G.ensureState("select").style=re,G.ensureState("blur").style=ae,setDefaultStateProxy(G)}function resetLabelForRegion(U,G,H,W,Z,X,K){var Q=U.data,ee=U.isGeo,te=Q&&isNaN(Q.get(Q.mapDimension("value"),X)),re=Q&&Q.getItemLayout(X);if(ee||te||re&&re.showLabel){var ae=ee?H:X,ne=void 0;(!Q||X>=0)&&(ne=Z);var ie=K?{normal:{align:"center",verticalAlign:"middle"}}:null;setLabelStyle(G,getLabelStatesModels(W),{labelFetcher:ne,labelDataIndex:ae,defaultText:H},ie);var oe=G.getTextContent();if(oe&&(mapLabelRaw(oe).ignore=oe.ignore,G.textConfig&&K)){var se=G.getBoundingRect().clone();G.textConfig.layoutRect=se,G.textConfig.position=[(K[0]-se.x)/se.width*100+"%",(K[1]-se.y)/se.height*100+"%"]}G.disableLabelAnimation=!0}else G.removeTextContent(),G.removeTextConfig(),G.disableLabelAnimation=null}function resetEventTriggerForRegion(U,G,H,W,Z,X){U.data?U.data.setItemGraphicEl(X,G):getECData(G).eventData={componentType:"geo",componentIndex:Z.componentIndex,geoIndex:Z.componentIndex,name:H,region:W&&W.option||{}}}function resetTooltipForRegion(U,G,H,W,Z){U.data||setTooltipConfig({el:G,componentModel:Z,itemName:H,itemTooltipOption:W.get("tooltip")})}function resetStateTriggerForRegion(U,G,H,W,Z){G.highDownSilentOnTouch=!!Z.get("selectedMode");var X=W.getModel("emphasis"),K=X.get("focus");return toggleHoverEmphasis(G,K,X.get("blurScope"),X.get("disabled")),U.isGeo&&enableComponentHighDownFeatures(G,Z,H),K}function projectPolys(U,G,H){var W=[],Z;function X(){Z=[]}function K(){Z.length&&(W.push(Z),Z=[])}var Q=G({polygonStart:X,polygonEnd:K,lineStart:X,lineEnd:K,point:function(ee,te){isFinite(ee)&&isFinite(te)&&Z.push([ee,te])},sphere:function(){}});return!H&&Q.polygonStart(),each$f(U,function(ee){Q.lineStart();for(var te=0;te<ee.length;te++)Q.point(ee[te][0],ee[te][1]);Q.lineEnd()}),!H&&Q.polygonEnd(),W}var MapView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z,X){if(!(X&&X.type==="mapToggleSelect"&&X.from===this.uid)){var K=this.group;if(K.removeAll(),!H.getHostGeoModel()){if(this._mapDraw&&X&&X.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),X&&X.type==="geoRoam"&&X.componentType==="series"&&X.seriesId===H.id){var Q=this._mapDraw;Q&&K.add(Q.group)}else if(H.needsDrawMap){var Q=this._mapDraw||new MapDraw(Z);K.add(Q.group),Q.draw(H,W,Z,this,X),this._mapDraw=Q}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;H.get("showLegendSymbol")&&W.getComponent("legend")&&this._renderSymbols(H,W,Z)}}},G.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},G.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},G.prototype._renderSymbols=function(H,W,Z){var X=H.originalData,K=this.group;X.each(X.mapDimension("value"),function(Q,ee){if(!isNaN(Q)){var te=X.getItemLayout(ee);if(!(!te||!te.point)){var re=te.point,ae=te.offset,ne=new Circle({style:{fill:H.getData().getVisual("style").fill},shape:{cx:re[0]+ae*9,cy:re[1],r:3},silent:!0,z2:8+(ae?0:Z2_EMPHASIS_LIFT+1)});if(!ae){var ie=H.mainSeries.getData(),oe=X.getName(ee),se=ie.indexOfName(oe),le=X.getItemModel(ee),ue=le.getModel("label"),ce=ie.getItemGraphicEl(se);setLabelStyle(ne,getLabelStatesModels(le),{labelFetcher:{getFormattedLabel:function(fe,he){return H.getFormattedLabel(se,he)}},defaultText:oe}),ne.disableLabelAnimation=!0,ue.get("position")||ne.setTextConfig({position:"bottom"}),ce.onHoverStateChange=function(fe){setStatesFlag(ne,fe)}}K.add(ne)}}})},G.type="map",G})(ChartView),MapSeries=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.needsDrawMap=!1,H.seriesGroup=[],H.getTooltipPosition=function(W){if(W!=null){var Z=this.getData().getName(W),X=this.coordinateSystem,K=X.getRegion(Z);return K&&X.dataToPoint(K.getCenter())}},H}return G.prototype.getInitialData=function(H){for(var W=createSeriesDataSimply(this,{coordDimensions:["value"],encodeDefaulter:curry$1(makeSeriesEncodeForNameBased,this)}),Z=createHashMap(),X=[],K=0,Q=W.count();K<Q;K++){var ee=W.getName(K);Z.set(ee,K)}var te=geoSourceManager.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return each$f(te.regions,function(re){var ae=re.name,ne=Z.get(ae),ie=re.properties&&re.properties.echartsStyle,oe;ne==null?(oe={name:ae},X.push(oe)):oe=W.getRawDataItem(ne),ie&&merge(oe,ie)}),W.appendData(X),W},G.prototype.getHostGeoModel=function(){if(decideCoordSysUsageKind(this).kind!==CoordinateSystemUsageKind.boxCoordSys)return this.getReferringComponents("geo",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0]},G.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},G.prototype.getRawValue=function(H){var W=this.getData();return W.get(W.mapDimension("value"),H)},G.prototype.getRegionModel=function(H){var W=this.getData();return W.getItemModel(W.indexOfName(H))},G.prototype.formatTooltip=function(H,W,Z){for(var X=this.getData(),K=this.getRawValue(H),Q=X.getName(H),ee=this.seriesGroup,te=[],re=0;re<ee.length;re++){var ae=ee[re].originalData.indexOfName(Q),ne=X.mapDimension("value");isNaN(ee[re].originalData.get(ne,ae))||te.push(ee[re].name)}return createTooltipMarkup("section",{header:te.join(", "),noHeader:!te.length,blocks:[createTooltipMarkup("nameValue",{name:Q,value:K})]})},G.prototype.setZoom=function(H){this.option.zoom=H},G.prototype.setCenter=function(H){this.option.center=H},G.prototype.getLegendIcon=function(H){var W=H.icon||"roundRect",Z=createSymbol$1(W,0,0,H.itemWidth,H.itemHeight,H.itemStyle.fill);return Z.setStyle(H.itemStyle),Z.style.stroke="none",W.indexOf("empty")>-1&&(Z.style.stroke=Z.style.fill,Z.style.fill=tokens.color.neutral00,Z.style.lineWidth=2),Z},G.type="series.map",G.dependencies=["geo"],G.layoutMode="box",G.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:tokens.color.tertiary},itemStyle:{borderWidth:.5,borderColor:tokens.color.border,areaColor:tokens.color.background},emphasis:{label:{show:!0,color:tokens.color.primary},itemStyle:{areaColor:tokens.color.highlight}},select:{label:{show:!0,color:tokens.color.primary},itemStyle:{color:tokens.color.highlight}},nameProperty:"name"},G})(SeriesModel);function dataStatistics(U,G){var H={};return each$f(U,function(W){W.each(W.mapDimension("value"),function(Z,X){var K="ec-"+W.getName(X);H[K]=H[K]||[],isNaN(Z)||H[K].push(Z)})}),U[0].map(U[0].mapDimension("value"),function(W,Z){for(var X="ec-"+U[0].getName(Z),K=0,Q=1/0,ee=-1/0,te=H[X].length,re=0;re<te;re++)Q=Math.min(Q,H[X][re]),ee=Math.max(ee,H[X][re]),K+=H[X][re];var ae;return G==="min"?ae=Q:G==="max"?ae=ee:G==="average"?ae=K/te:ae=K,te===0?NaN:ae})}function mapDataStatistic(U){var G={};U.eachSeriesByType("map",function(H){var W=H.getHostGeoModel(),Z=W?"o"+W.id:"i"+H.getMapType();(G[Z]=G[Z]||[]).push(H)}),each$f(G,function(H,W){for(var Z=dataStatistics(map$1(H,function(K){return K.getData()}),H[0].get("mapValueCalculation")),X=0;X<H.length;X++)H[X].originalData=H[X].getData();for(var X=0;X<H.length;X++)H[X].seriesGroup=H,H[X].needsDrawMap=X===0&&!H[X].getHostGeoModel(),H[X].setData(Z.cloneShallow()),H[X].mainSeries=H[0]})}function mapSymbolLayout(U){var G={};U.eachSeriesByType("map",function(H){var W=H.getMapType();if(!(H.getHostGeoModel()||G[W])){var Z={};each$f(H.seriesGroup,function(K){var Q=K.coordinateSystem,ee=K.originalData;K.get("showLegendSymbol")&&U.getComponent("legend")&&ee.each(ee.mapDimension("value"),function(te,re){var ae=ee.getName(re),ne=Q.getRegion(ae);if(!(!ne||isNaN(te))){var ie=Z[ae]||0,oe=Q.dataToPoint(ne.getCenter());Z[ae]=ie+1,ee.setItemLayout(re,{point:oe,offset:ie})}})});var X=H.getData();X.each(function(K){var Q=X.getName(K),ee=X.getItemLayout(K)||{};ee.showLabel=!Z[Q],X.setItemLayout(K,ee)}),G[W]=!0}})}var v2ApplyTransform=applyTransform$1,View=(function(U){__extends(G,U);function G(H,W){var Z=U.call(this)||this;return Z.type="view",Z.dimensions=["x","y"],Z._roamTransformable=new Transformable,Z._rawTransformable=new Transformable,Z.name=H,Z._opt=W,Z}return G.prototype.setBoundingRect=function(H,W,Z,X){return this._rect=new BoundingRect(H,W,Z,X),this._updateCenterAndZoom(),this._rect},G.prototype.getBoundingRect=function(){return this._rect},G.prototype.setViewRect=function(H,W,Z,X){this._transformTo(H,W,Z,X),this._viewRect=new BoundingRect(H,W,Z,X)},G.prototype._transformTo=function(H,W,Z,X){var K=this.getBoundingRect(),Q=this._rawTransformable;Q.transform=K.calculateTransform(new BoundingRect(H,W,Z,X));var ee=Q.parent;Q.parent=null,Q.decomposeTransform(),Q.parent=ee,this._updateTransform()},G.prototype.setCenter=function(H){var W=this._opt;W&&W.api&&W.ecModel&&W.ecModel.getShallow("legacyViewCoordSysCenterBase")&&H&&(H=[parsePercent(H[0],W.api.getWidth()),parsePercent(H[1],W.api.getWidth())]),this._centerOption=clone$4(H),this._updateCenterAndZoom()},G.prototype.setZoom=function(H){this._zoom=clampByZoomLimit(H||1,this.zoomLimit),this._updateCenterAndZoom()},G.prototype.getDefaultCenter=function(){var H=this.getBoundingRect(),W=H.x+H.width/2,Z=H.y+H.height/2;return[W,Z]},G.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},G.prototype.getZoom=function(){return this._zoom||1},G.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},G.prototype._updateCenterAndZoom=function(){var H=this._centerOption,W=this._rect;H&&W&&(this._center=[parsePercent(H[0],W.width,W.x),parsePercent(H[1],W.height,W.y)]);var Z=this._rawTransformable.getLocalTransform(),X=this._roamTransformable,K=this.getDefaultCenter(),Q=this.getCenter(),ee=this.getZoom();Q=applyTransform$1([],Q,Z),K=applyTransform$1([],K,Z),X.originX=Q[0],X.originY=Q[1],X.x=K[0]-Q[0],X.y=K[1]-Q[1],X.scaleX=X.scaleY=ee,this._updateTransform()},G.prototype._updateTransform=function(){var H=this._roamTransformable,W=this._rawTransformable;W.parent=H,H.updateTransform(),W.updateTransform(),copy(this.transform||(this.transform=[]),W.transform||create$1()),this._rawTransform=W.getLocalTransform(),this.invTransform=this.invTransform||[],invert(this.invTransform,this.transform),this.decomposeTransform()},G.prototype.getTransformInfo=function(){var H=this._rawTransformable,W=this._roamTransformable,Z=new Transformable;return Z.transform=W.transform,Z.decomposeTransform(),{roam:{x:Z.x,y:Z.y,scaleX:Z.scaleX,scaleY:Z.scaleY},raw:{x:H.x,y:H.y,scaleX:H.scaleX,scaleY:H.scaleY}}},G.prototype.getViewRect=function(){return this._viewRect},G.prototype.getViewRectAfterRoam=function(){var H=this.getBoundingRect().clone();return H.applyTransform(this.transform),H},G.prototype.dataToPoint=function(H,W,Z){var X=W?this._rawTransform:this.transform;return Z=Z||[],X?v2ApplyTransform(Z,H,X):copy$1(Z,H)},G.prototype.pointToData=function(H,W,Z){Z=Z||[];var X=this.invTransform;return X?v2ApplyTransform(Z,H,X):(Z[0]=H[0],Z[1]=H[1],Z)},G.prototype.convertToPixel=function(H,W,Z){var X=getCoordSys$5(W);return X===this?X.dataToPoint(Z):null},G.prototype.convertFromPixel=function(H,W,Z){var X=getCoordSys$5(W);return X===this?X.pointToData(Z):null},G.prototype.containPoint=function(H){return this.getViewRectAfterRoam().contain(H[0],H[1])},G.dimensions=["x","y"],G})(Transformable);function getCoordSys$5(U){var G=U.seriesModel;return G?G.coordinateSystem:null}var GEO_DEFAULT_PARAMS={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},geo2DDimensions=["lng","lat"],Geo=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this,H,{api:Z.api,ecModel:Z.ecModel})||this;X.dimensions=geo2DDimensions,X.type="geo",X._nameCoordMap=createHashMap(),X.map=W;var K=Z.projection,Q=geoSourceManager.load(W,Z.nameMap,Z.nameProperty),ee=geoSourceManager.getGeoResource(W),te=X.resourceType=ee?ee.type:null,re=X.regions=Q.regions,ae=GEO_DEFAULT_PARAMS[ee.type];X._regionsMap=Q.regionsMap,X.regions=Q.regions,process.env.NODE_ENV!=="production"&&K&&(te==="geoSVG"&&(process.env.NODE_ENV!=="production"&&warn("Map "+W+" with SVG source can't use projection. Only GeoJSON source supports projection."),K=null),K.project&&K.unproject||(process.env.NODE_ENV!=="production"&&warn("project and unproject must be both provided in the projeciton."),K=null)),X.projection=K;var ne;if(K)for(var ie=0;ie<re.length;ie++){var oe=re[ie].getBoundingRect(K);ne=ne||oe.clone(),ne.union(oe)}else ne=Q.boundingRect;return X.setBoundingRect(ne.x,ne.y,ne.width,ne.height),X.aspectScale=K?1:retrieve2(Z.aspectScale,ae.aspectScale),X._invertLongitute=K?!1:ae.invertLongitute,X}return G.prototype._transformTo=function(H,W,Z,X){var K=this.getBoundingRect(),Q=this._invertLongitute;K=K.clone(),Q&&(K.y=-K.y-K.height);var ee=this._rawTransformable;ee.transform=K.calculateTransform(new BoundingRect(H,W,Z,X));var te=ee.parent;ee.parent=null,ee.decomposeTransform(),ee.parent=te,Q&&(ee.scaleY=-ee.scaleY),this._updateTransform()},G.prototype.getRegion=function(H){return this._regionsMap.get(H)},G.prototype.getRegionByCoord=function(H){for(var W=this.regions,Z=0;Z<W.length;Z++){var X=W[Z];if(X.type==="geoJSON"&&X.contain(H))return W[Z]}},G.prototype.addGeoCoord=function(H,W){this._nameCoordMap.set(H,W)},G.prototype.getGeoCoord=function(H){var W=this._regionsMap.get(H);return this._nameCoordMap.get(H)||W&&W.getCenter()},G.prototype.dataToPoint=function(H,W,Z){if(isString(H)&&(H=this.getGeoCoord(H)),H){var X=this.projection;return X&&(H=X.project(H)),H&&this.projectedToPoint(H,W,Z)}},G.prototype.pointToData=function(H,W,Z){var X=this.projection;return X&&(H=X.unproject(H)),H&&this.pointToProjected(H,Z)},G.prototype.pointToProjected=function(H,W){return U.prototype.pointToData.call(this,H,0,W)},G.prototype.projectedToPoint=function(H,W,Z){return U.prototype.dataToPoint.call(this,H,W,Z)},G.prototype.convertToPixel=function(H,W,Z){var X=getCoordSys$4(W);return X===this?X.dataToPoint(Z):null},G.prototype.convertFromPixel=function(H,W,Z){var X=getCoordSys$4(W);return X===this?X.pointToData(Z):null},G})(View);mixin(Geo,View);function getCoordSys$4(U){var G=U.geoModel,H=U.seriesModel;return G?G.coordinateSystem:H?H.coordinateSystem||(H.getReferringComponents("geo",SINGLE_REFERRING).models[0]||{}).coordinateSystem:null}function resizeGeo(U,G){var H=U.get("boundingCoords");if(H!=null){var W=H[0],Z=H[1];if(!(isFinite(W[0])&&isFinite(W[1])&&isFinite(Z[0])&&isFinite(Z[1])))process.env.NODE_ENV!=="production"&&console.error("Invalid boundingCoords");else{var X=this.projection;if(X){var K=W[0],Q=W[1],ee=Z[0],te=Z[1];W=[1/0,1/0],Z=[-1/0,-1/0];var re=function(ve,de,pe,ge){for(var me=pe-ve,ye=ge-de,_e=0;_e<=100;_e++){var xe=_e/100,Se=X.project([ve+me*xe,de+ye*xe]);min$1(W,W,Se),max$1(Z,Z,Se)}};re(K,Q,ee,Q),re(ee,Q,ee,te),re(ee,te,K,te),re(K,te,ee,Q)}this.setBoundingRect(W[0],W[1],Z[0]-W[0],Z[1]-W[1])}}var ae=this.getBoundingRect(),ne=U.get("layoutCenter"),ie=U.get("layoutSize"),oe=createBoxLayoutReference(U,G).refContainer,se=ae.width/ae.height*this.aspectScale,le=!1,ue,ce;ne&&ie&&(ue=[parsePercent(ne[0],oe.width)+oe.x,parsePercent(ne[1],oe.height)+oe.y],ce=parsePercent(ie,Math.min(oe.width,oe.height)),!isNaN(ue[0])&&!isNaN(ue[1])&&!isNaN(ce)?le=!0:process.env.NODE_ENV!=="production"&&console.warn("Given layoutCenter or layoutSize data are invalid. Use left/top/width/height instead."));var fe;if(le)fe={},se>1?(fe.width=ce,fe.height=ce/se):(fe.height=ce,fe.width=ce*se),fe.y=ue[1]-fe.height/2,fe.x=ue[0]-fe.width/2;else{var he=U.getBoxLayoutParams();he.aspect=se,fe=getLayoutRect(he,oe),fe=applyPreserveAspect(U,fe,se)}this.setViewRect(fe.x,fe.y,fe.width,fe.height),this.setCenter(U.get("center")),this.setZoom(U.get("zoom"))}function setGeoCoords(U,G){each$f(G.get("geoCoord"),function(H,W){U.addGeoCoord(W,H)})}var GeoCreator=(function(){function U(){this.dimensions=geo2DDimensions}return U.prototype.create=function(G,H){var W=[];function Z(K){return{nameProperty:K.get("nameProperty"),aspectScale:K.get("aspectScale"),projection:K.get("projection")}}G.eachComponent("geo",function(K,Q){var ee=K.get("map"),te=new Geo(ee+Q,ee,extend({nameMap:K.get("nameMap"),api:H,ecModel:G},Z(K)));te.zoomLimit=K.get("scaleLimit"),W.push(te),K.coordinateSystem=te,te.model=K,te.resize=resizeGeo,te.resize(K,H)}),G.eachSeries(function(K){injectCoordSysByOption({targetModel:K,coordSysType:"geo",coordSysProvider:function(){var Q=K.subType==="map"?K.getHostGeoModel():K.getReferringComponents("geo",SINGLE_REFERRING).models[0];return Q&&Q.coordinateSystem},allowNotFound:!0})});var X={};return G.eachSeriesByType("map",function(K){if(!K.getHostGeoModel()){var Q=K.getMapType();X[Q]=X[Q]||[],X[Q].push(K)}}),each$f(X,function(K,Q){var ee=map$1(K,function(re){return re.get("nameMap")}),te=new Geo(Q,Q,extend({nameMap:mergeAll(ee),api:H,ecModel:G},Z(K[0])));te.zoomLimit=retrieve.apply(null,map$1(K,function(re){return re.get("scaleLimit")})),W.push(te),te.resize=resizeGeo,te.resize(K[0],H),each$f(K,function(re){re.coordinateSystem=te,setGeoCoords(te,re)})}),W},U.prototype.getFilledRegions=function(G,H,W,Z){for(var X=(G||[]).slice(),K=createHashMap(),Q=0;Q<X.length;Q++)K.set(X[Q].name,X[Q]);var ee=geoSourceManager.load(H,W,Z);return each$f(ee.regions,function(te){var re=te.name,ae=K.get(re),ne=te.properties&&te.properties.echartsStyle;ae||(ae={name:re},X.push(ae)),ne&&merge(ae,ne)}),X},U})(),geoCreator=new GeoCreator,GeoModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H,W,Z){this.mergeDefaultAndTheme(H,Z);var X=geoSourceManager.getGeoResource(H.map);if(X&&X.type==="geoJSON"){var K=H.itemStyle=H.itemStyle||{};"color"in K||(K.color=H.defaultItemStyleColor||tokens.color.backgroundTint)}defaultEmphasis(H,"label",["show"])},G.prototype.optionUpdated=function(){var H=this,W=this.option;W.regions=geoCreator.getFilledRegions(W.regions,W.map,W.nameMap,W.nameProperty);var Z={};this._optionModelMap=reduce(W.regions||[],function(X,K){var Q=K.name;return Q&&(X.set(Q,new Model(K,H,H.ecModel)),K.selected&&(Z[Q]=!0)),X},createHashMap()),W.selectedMap||(W.selectedMap=Z)},G.prototype.getRegionModel=function(H){return this._optionModelMap.get(H)||new Model(null,this,this.ecModel)},G.prototype.getFormattedLabel=function(H,W){var Z=this.getRegionModel(H),X=W==="normal"?Z.get(["label","formatter"]):Z.get(["emphasis","label","formatter"]),K={name:H};if(isFunction(X))return K.status=W,X(K);if(isString(X))return X.replace("{a}",H??"")},G.prototype.setZoom=function(H){this.option.zoom=H},G.prototype.setCenter=function(H){this.option.center=H},G.prototype.select=function(H){var W=this.option,Z=W.selectedMode;if(Z){Z!=="multiple"&&(W.selectedMap=null);var X=W.selectedMap||(W.selectedMap={});X[H]=!0}},G.prototype.unSelect=function(H){var W=this.option.selectedMap;W&&(W[H]=!1)},G.prototype.toggleSelected=function(H){this[this.isSelected(H)?"unSelect":"select"](H)},G.prototype.isSelected=function(H){var W=this.option.selectedMap;return!!(W&&W[H])},G.type="geo",G.layoutMode="box",G.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:tokens.color.tertiary},itemStyle:{borderWidth:.5,borderColor:tokens.color.border},emphasis:{label:{show:!0,color:tokens.color.primary},itemStyle:{color:tokens.color.highlight}},select:{label:{show:!0,color:tokens.color.primary},itemStyle:{color:tokens.color.highlight}},regions:[]},G})(ComponentModel),GeoView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.focusBlurEnabled=!0,H}return G.prototype.init=function(H,W){this._api=W},G.prototype.render=function(H,W,Z,X){if(this._model=H,!H.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new MapDraw(Z));var K=this._mapDraw;K.draw(H,W,Z,this,X),K.group.on("click",this._handleRegionClick,this),K.group.silent=H.get("silent"),this.group.add(K.group),this.updateSelectStatus(H,W,Z)},G.prototype._handleRegionClick=function(H){var W;findEventDispatcher(H.target,function(Z){return(W=getECData(Z).eventData)!=null},!0),W&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:W.name})},G.prototype.updateSelectStatus=function(H,W,Z){var X=this;this._mapDraw.group.traverse(function(K){var Q=getECData(K).eventData;if(Q)return X._model.isSelected(Q.name)?Z.enterSelect(K):Z.leaveSelect(K),!0})},G.prototype.findHighDownDispatchers=function(H){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(H,this._model)},G.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},G.type="geo",G})(ComponentView);function registerMap(U,G,H){geoSourceManager.registerMap(U,G,H)}function install$N(U){U.registerCoordinateSystem("geo",geoCreator),U.registerComponentModel(GeoModel),U.registerComponentView(GeoView),U.registerImpl("registerMap",registerMap),U.registerImpl("getMap",function(H){return geoSourceManager.getMapForUser(H)});function G(H,W){W.update="geo:updateSelectStatus",U.registerAction(W,function(Z,X){var K={},Q=[];return X.eachComponent({mainType:"geo",query:Z},function(ee){ee[H](Z.name);var te=ee.coordinateSystem;each$f(te.regions,function(ae){K[ae.name]=ee.isSelected(ae.name)||!1});var re=[];each$f(K,function(ae,ne){K[ne]&&re.push(ne)}),Q.push({geoIndex:ee.componentIndex,name:re})}),{selected:K,allSelected:Q,name:Z.name}})}G("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),G("select",{type:"geoSelect",event:"geoselected"}),G("unSelect",{type:"geoUnSelect",event:"geounselected"}),U.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(H,W,Z){var X=H.componentType;X||(H.geoId!=null?X="geo":H.seriesId!=null&&(X="series")),X||(X="series"),W.eachComponent({mainType:X,query:H},function(K){var Q=K.coordinateSystem;if(Q.type==="geo"){var ee=updateCenterAndZoomInAction(Q,H,K.get("scaleLimit"));K.setCenter&&K.setCenter(ee.center),K.setZoom&&K.setZoom(ee.zoom),X==="series"&&each$f(K.seriesGroup,function(te){te.setCenter(ee.center),te.setZoom(ee.zoom)})}})})}function install$M(U){use(install$N),U.registerChartView(MapView),U.registerSeriesModel(MapSeries),U.registerLayout(mapSymbolLayout),U.registerProcessor(U.PRIORITY.PROCESSOR.STATISTIC,mapDataStatistic),createLegacyDataSelectAction("map",U.registerAction)}function init(U){var G=U;G.hierNode={defaultAncestor:null,ancestor:G,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var H=[G],W,Z;W=H.pop();)if(Z=W.children,W.isExpand&&Z.length)for(var X=Z.length,K=X-1;K>=0;K--){var Q=Z[K];Q.hierNode={defaultAncestor:null,ancestor:Q,prelim:0,modifier:0,change:0,shift:0,i:K,thread:null},H.push(Q)}}function firstWalk(U,G){var H=U.isExpand?U.children:[],W=U.parentNode.children,Z=U.hierNode.i?W[U.hierNode.i-1]:null;if(H.length){executeShifts(U);var X=(H[0].hierNode.prelim+H[H.length-1].hierNode.prelim)/2;Z?(U.hierNode.prelim=Z.hierNode.prelim+G(U,Z),U.hierNode.modifier=U.hierNode.prelim-X):U.hierNode.prelim=X}else Z&&(U.hierNode.prelim=Z.hierNode.prelim+G(U,Z));U.parentNode.hierNode.defaultAncestor=apportion(U,Z,U.parentNode.hierNode.defaultAncestor||W[0],G)}function secondWalk(U){var G=U.hierNode.prelim+U.parentNode.hierNode.modifier;U.setLayout({x:G},!0),U.hierNode.modifier+=U.parentNode.hierNode.modifier}function separation(U){return arguments.length?U:defaultSeparation}function radialCoordinate(U,G){return U-=Math.PI/2,{x:G*Math.cos(U),y:G*Math.sin(U)}}function executeShifts(U){for(var G=U.children,H=G.length,W=0,Z=0;--H>=0;){var X=G[H];X.hierNode.prelim+=W,X.hierNode.modifier+=W,Z+=X.hierNode.change,W+=X.hierNode.shift+Z}}function apportion(U,G,H,W){if(G){for(var Z=U,X=U,K=X.parentNode.children[0],Q=G,ee=Z.hierNode.modifier,te=X.hierNode.modifier,re=K.hierNode.modifier,ae=Q.hierNode.modifier;Q=nextRight(Q),X=nextLeft(X),Q&&X;){Z=nextRight(Z),K=nextLeft(K),Z.hierNode.ancestor=U;var ne=Q.hierNode.prelim+ae-X.hierNode.prelim-te+W(Q,X);ne>0&&(moveSubtree(nextAncestor(Q,U,H),U,ne),te+=ne,ee+=ne),ae+=Q.hierNode.modifier,te+=X.hierNode.modifier,ee+=Z.hierNode.modifier,re+=K.hierNode.modifier}Q&&!nextRight(Z)&&(Z.hierNode.thread=Q,Z.hierNode.modifier+=ae-ee),X&&!nextLeft(K)&&(K.hierNode.thread=X,K.hierNode.modifier+=te-re,H=U)}return H}function nextRight(U){var G=U.children;return G.length&&U.isExpand?G[G.length-1]:U.hierNode.thread}function nextLeft(U){var G=U.children;return G.length&&U.isExpand?G[0]:U.hierNode.thread}function nextAncestor(U,G,H){return U.hierNode.ancestor.parentNode===G.parentNode?U.hierNode.ancestor:H}function moveSubtree(U,G,H){var W=H/(G.hierNode.i-U.hierNode.i);G.hierNode.change-=W,G.hierNode.shift+=H,G.hierNode.modifier+=H,G.hierNode.prelim+=H,U.hierNode.change+=W}function defaultSeparation(U,G){return U.parentNode===G.parentNode?1:2}var TreeEdgeShape=(function(){function U(){this.parentPoint=[],this.childPoints=[]}return U})(),TreePath=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultStyle=function(){return{stroke:tokens.color.neutral99,fill:null}},G.prototype.getDefaultShape=function(){return new TreeEdgeShape},G.prototype.buildPath=function(H,W){var Z=W.childPoints,X=Z.length,K=W.parentPoint,Q=Z[0],ee=Z[X-1];if(X===1){H.moveTo(K[0],K[1]),H.lineTo(Q[0],Q[1]);return}var te=W.orient,re=te==="TB"||te==="BT"?0:1,ae=1-re,ne=parsePercent(W.forkPosition,1),ie=[];ie[re]=K[re],ie[ae]=K[ae]+(ee[ae]-K[ae])*ne,H.moveTo(K[0],K[1]),H.lineTo(ie[0],ie[1]),H.moveTo(Q[0],Q[1]),ie[re]=Q[re],H.lineTo(ie[0],ie[1]),ie[re]=ee[re],H.lineTo(ie[0],ie[1]),H.lineTo(ee[0],ee[1]);for(var oe=1;oe<X-1;oe++){var se=Z[oe];H.moveTo(se[0],se[1]),ie[re]=se[re],H.lineTo(ie[0],ie[1])}},G})(Path),TreeView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H._mainGroup=new Group$3,H}return G.prototype.init=function(H,W){this._controller=new RoamController(W.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},G.prototype.render=function(H,W,Z){var X=H.getData(),K=H.layoutInfo,Q=this._mainGroup,ee=H.get("layout");ee==="radial"?(Q.x=K.x+K.width/2,Q.y=K.y+K.height/2):(Q.x=K.x,Q.y=K.y),this._updateViewCoordSys(H,Z),this._updateController(H,null,W,Z);var te=this._data;X.diff(te).add(function(re){symbolNeedsDraw(X,re)&&updateNode(X,re,null,Q,H)}).update(function(re,ae){var ne=te.getItemGraphicEl(ae);if(!symbolNeedsDraw(X,re)){ne&&removeNode(te,ae,ne,Q,H);return}updateNode(X,re,ne,Q,H)}).remove(function(re){var ae=te.getItemGraphicEl(re);ae&&removeNode(te,re,ae,Q,H)}).execute(),this._nodeScaleRatio=H.get("nodeScaleRatio"),this._updateNodeAndLinkScale(H),H.get("expandAndCollapse")===!0&&X.eachItemGraphicEl(function(re,ae){re.off("click").on("click",function(){Z.dispatchAction({type:"treeExpandAndCollapse",seriesId:H.id,dataIndex:ae})})}),this._data=X},G.prototype._updateViewCoordSys=function(H,W){var Z=H.getData(),X=[];Z.each(function(ae){var ne=Z.getItemLayout(ae);ne&&!isNaN(ne.x)&&!isNaN(ne.y)&&X.push([+ne.x,+ne.y])});var K=[],Q=[];fromPoints(X,K,Q);var ee=this._min,te=this._max;Q[0]-K[0]===0&&(K[0]=ee?ee[0]:K[0]-1,Q[0]=te?te[0]:Q[0]+1),Q[1]-K[1]===0&&(K[1]=ee?ee[1]:K[1]-1,Q[1]=te?te[1]:Q[1]+1);var re=H.coordinateSystem=new View(null,{api:W,ecModel:H.ecModel});re.zoomLimit=H.get("scaleLimit"),re.setBoundingRect(K[0],K[1],Q[0]-K[0],Q[1]-K[1]),re.setCenter(H.get("center")),re.setZoom(H.get("zoom")),this.group.attr({x:re.x,y:re.y,scaleX:re.scaleX,scaleY:re.scaleY}),this._min=K,this._max=Q},G.prototype._updateController=function(H,W,Z,X){var K=this;updateController(H,X,this.group,this._controller,this._controllerHost,W),this._controller.on("zoom",function(Q){K._updateNodeAndLinkScale(H)})},G.prototype._updateNodeAndLinkScale=function(H){var W=H.getData(),Z=this._getNodeGlobalScale(H);W.eachItemGraphicEl(function(X,K){X.setSymbolScale(Z)})},G.prototype._getNodeGlobalScale=function(H){var W=H.coordinateSystem;if(W.type!=="view")return 1;var Z=this._nodeScaleRatio,X=W.scaleX||1,K=W.getZoom(),Q=(K-1)*Z+1;return Q/X},G.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},G.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},G.type="tree",G})(ChartView);function symbolNeedsDraw(U,G){var H=U.getItemLayout(G);return H&&!isNaN(H.x)&&!isNaN(H.y)}function updateNode(U,G,H,W,Z){var X=!H,K=U.tree.getNodeByDataIndex(G),Q=K.getModel(),ee=K.getVisual("style").fill,te=K.isExpand===!1&&K.children.length!==0?ee:tokens.color.neutral00,re=U.tree.root,ae=K.parentNode===re?K:K.parentNode||K,ne=U.getItemGraphicEl(ae.dataIndex),ie=ae.getLayout(),oe=ne?{x:ne.__oldX,y:ne.__oldY,rawX:ne.__radialOldRawX,rawY:ne.__radialOldRawY}:ie,se=K.getLayout();X?(H=new Symbol$1(U,G,null,{symbolInnerColor:te,useNameLabel:!0}),H.x=oe.x,H.y=oe.y):H.updateData(U,G,null,{symbolInnerColor:te,useNameLabel:!0}),H.__radialOldRawX=H.__radialRawX,H.__radialOldRawY=H.__radialRawY,H.__radialRawX=se.rawX,H.__radialRawY=se.rawY,W.add(H),U.setItemGraphicEl(G,H),H.__oldX=H.x,H.__oldY=H.y,updateProps$1(H,{x:se.x,y:se.y},Z);var le=H.getSymbolPath();if(Z.get("layout")==="radial"){var ue=re.children[0],ce=ue.getLayout(),fe=ue.children.length,he=void 0,ve=void 0;if(se.x===ce.x&&K.isExpand===!0&&ue.children.length){var de={x:(ue.children[0].getLayout().x+ue.children[fe-1].getLayout().x)/2,y:(ue.children[0].getLayout().y+ue.children[fe-1].getLayout().y)/2};he=Math.atan2(de.y-ce.y,de.x-ce.x),he<0&&(he=Math.PI*2+he),ve=de.x<ce.x,ve&&(he=he-Math.PI)}else he=Math.atan2(se.y-ce.y,se.x-ce.x),he<0&&(he=Math.PI*2+he),K.children.length===0||K.children.length!==0&&K.isExpand===!1?(ve=se.x<ce.x,ve&&(he=he-Math.PI)):(ve=se.x>ce.x,ve||(he=he-Math.PI));var pe=ve?"left":"right",ge=Q.getModel("label"),me=ge.get("rotate"),ye=me*(Math.PI/180),_e=le.getTextContent();_e&&(le.setTextConfig({position:ge.get("position")||pe,rotation:me==null?-he:ye,origin:"center"}),_e.setStyle("verticalAlign","middle"))}var xe=Q.get(["emphasis","focus"]),Se=xe==="relative"?concatArray(K.getAncestorsIndices(),K.getDescendantIndices()):xe==="ancestor"?K.getAncestorsIndices():xe==="descendant"?K.getDescendantIndices():null;Se&&(getECData(H).focus=Se),drawEdge(Z,K,re,H,oe,ie,se,W),H.__edge&&(H.onHoverStateChange=function(Te){if(Te!=="blur"){var be=K.parentNode&&U.getItemGraphicEl(K.parentNode.dataIndex);be&&be.hoverState===HOVER_STATE_BLUR||setStatesFlag(H.__edge,Te)}})}function drawEdge(U,G,H,W,Z,X,K,Q){var ee=G.getModel(),te=U.get("edgeShape"),re=U.get("layout"),ae=U.getOrient(),ne=U.get(["lineStyle","curveness"]),ie=U.get("edgeForkPosition"),oe=ee.getModel("lineStyle").getLineStyle(),se=W.__edge;if(te==="curve")G.parentNode&&G.parentNode!==H&&(se||(se=W.__edge=new BezierCurve({shape:getEdgeShape(re,ae,ne,Z,Z)})),updateProps$1(se,{shape:getEdgeShape(re,ae,ne,X,K)},U));else if(te==="polyline"){if(re==="orthogonal"){if(G!==H&&G.children&&G.children.length!==0&&G.isExpand===!0){for(var le=G.children,ue=[],ce=0;ce<le.length;ce++){var fe=le[ce].getLayout();ue.push([fe.x,fe.y])}se||(se=W.__edge=new TreePath({shape:{parentPoint:[K.x,K.y],childPoints:[[K.x,K.y]],orient:ae,forkPosition:ie}})),updateProps$1(se,{shape:{parentPoint:[K.x,K.y],childPoints:ue}},U)}}else if(process.env.NODE_ENV!=="production")throw new Error("The polyline edgeShape can only be used in orthogonal layout")}se&&!(te==="polyline"&&!G.isExpand)&&(se.useStyle(defaults({strokeNoScale:!0,fill:null},oe)),setStatesStylesFromModel(se,ee,"lineStyle"),setDefaultStateProxy(se),Q.add(se))}function removeNodeEdge(U,G,H,W,Z){var X=G.tree.root,K=getSourceNode(X,U),Q=K.source,ee=K.sourceLayout,te=G.getItemGraphicEl(U.dataIndex);if(te){var re=G.getItemGraphicEl(Q.dataIndex),ae=re.__edge,ne=te.__edge||(Q.isExpand===!1||Q.children.length===1?ae:void 0),ie=W.get("edgeShape"),oe=W.get("layout"),se=W.get("orient"),le=W.get(["lineStyle","curveness"]);ne&&(ie==="curve"?removeElement(ne,{shape:getEdgeShape(oe,se,le,ee,ee),style:{opacity:0}},W,{cb:function(){H.remove(ne)},removeOpt:Z}):ie==="polyline"&&W.get("layout")==="orthogonal"&&removeElement(ne,{shape:{parentPoint:[ee.x,ee.y],childPoints:[[ee.x,ee.y]]},style:{opacity:0}},W,{cb:function(){H.remove(ne)},removeOpt:Z}))}}function getSourceNode(U,G){for(var H=G.parentNode===U?G:G.parentNode||G,W;W=H.getLayout(),W==null;)H=H.parentNode===U?H:H.parentNode||H;return{source:H,sourceLayout:W}}function removeNode(U,G,H,W,Z){var X=U.tree.getNodeByDataIndex(G),K=U.tree.root,Q=getSourceNode(K,X).sourceLayout,ee={duration:Z.get("animationDurationUpdate"),easing:Z.get("animationEasingUpdate")};removeElement(H,{x:Q.x+1,y:Q.y+1},Z,{cb:function(){W.remove(H),U.setItemGraphicEl(G,null)},removeOpt:ee}),H.fadeOut(null,U.hostModel,{fadeLabel:!0,animation:ee}),X.children.forEach(function(te){removeNodeEdge(te,U,W,Z,ee)}),removeNodeEdge(X,U,W,Z,ee)}function getEdgeShape(U,G,H,W,Z){var X,K,Q,ee,te,re,ae,ne;if(U==="radial"){te=W.rawX,ae=W.rawY,re=Z.rawX,ne=Z.rawY;var ie=radialCoordinate(te,ae),oe=radialCoordinate(te,ae+(ne-ae)*H),se=radialCoordinate(re,ne+(ae-ne)*H),le=radialCoordinate(re,ne);return{x1:ie.x||0,y1:ie.y||0,x2:le.x||0,y2:le.y||0,cpx1:oe.x||0,cpy1:oe.y||0,cpx2:se.x||0,cpy2:se.y||0}}else te=W.x,ae=W.y,re=Z.x,ne=Z.y,(G==="LR"||G==="RL")&&(X=te+(re-te)*H,K=ae,Q=re+(te-re)*H,ee=ne),(G==="TB"||G==="BT")&&(X=te,K=ae+(ne-ae)*H,Q=re,ee=ne+(ae-ne)*H);return{x1:te,y1:ae,x2:re,y2:ne,cpx1:X,cpy1:K,cpx2:Q,cpy2:ee}}var inner$f=makeInner();function linkSeriesData(U){var G=U.mainData,H=U.datas;H||(H={main:G},U.datasAttr={main:"data"}),U.datas=U.mainData=null,linkAll(G,H,U),each$f(H,function(W){each$f(G.TRANSFERABLE_METHODS,function(Z){W.wrapMethod(Z,curry$1(transferInjection,U))})}),G.wrapMethod("cloneShallow",curry$1(cloneShallowInjection,U)),each$f(G.CHANGABLE_METHODS,function(W){G.wrapMethod(W,curry$1(changeInjection,U))}),assert(H[G.dataType]===G)}function transferInjection(U,G){if(isMainData(this)){var H=extend({},inner$f(this).datas);H[this.dataType]=G,linkAll(G,H,U)}else linkSingle(G,this.dataType,inner$f(this).mainData,U);return G}function changeInjection(U,G){return U.struct&&U.struct.update(),G}function cloneShallowInjection(U,G){return each$f(inner$f(G).datas,function(H,W){H!==G&&linkSingle(H.cloneShallow(),W,G,U)}),G}function getLinkedData(U){var G=inner$f(this).mainData;return U==null||G==null?G:inner$f(G).datas[U]}function getLinkedDataAll(){var U=inner$f(this).mainData;return U==null?[{data:U}]:map$1(keys(inner$f(U).datas),function(G){return{type:G,data:inner$f(U).datas[G]}})}function isMainData(U){return inner$f(U).mainData===U}function linkAll(U,G,H){inner$f(U).datas={},each$f(G,function(W,Z){linkSingle(W,Z,U,H)})}function linkSingle(U,G,H,W){inner$f(H).datas[G]=U,inner$f(U).mainData=H,U.dataType=G,W.struct&&(U[W.structAttr]=W.struct,W.struct[W.datasAttr[G]]=U),U.getLinkedData=getLinkedData,U.getLinkedDataAll=getLinkedDataAll}var TreeNode=(function(){function U(G,H){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=G||"",this.hostTree=H}return U.prototype.isRemoved=function(){return this.dataIndex<0},U.prototype.eachNode=function(G,H,W){isFunction(G)&&(W=H,H=G,G=null),G=G||{},isString(G)&&(G={order:G});var Z=G.order||"preorder",X=this[G.attr||"children"],K;Z==="preorder"&&(K=H.call(W,this));for(var Q=0;!K&&Q<X.length;Q++)X[Q].eachNode(G,H,W);Z==="postorder"&&H.call(W,this)},U.prototype.updateDepthAndHeight=function(G){var H=0;this.depth=G;for(var W=0;W<this.children.length;W++){var Z=this.children[W];Z.updateDepthAndHeight(G+1),Z.height>H&&(H=Z.height)}this.height=H+1},U.prototype.getNodeById=function(G){if(this.getId()===G)return this;for(var H=0,W=this.children,Z=W.length;H<Z;H++){var X=W[H].getNodeById(G);if(X)return X}},U.prototype.contains=function(G){if(G===this)return!0;for(var H=0,W=this.children,Z=W.length;H<Z;H++){var X=W[H].contains(G);if(X)return X}},U.prototype.getAncestors=function(G){for(var H=[],W=G?this:this.parentNode;W;)H.push(W),W=W.parentNode;return H.reverse(),H},U.prototype.getAncestorsIndices=function(){for(var G=[],H=this;H;)G.push(H.dataIndex),H=H.parentNode;return G.reverse(),G},U.prototype.getDescendantIndices=function(){var G=[];return this.eachNode(function(H){G.push(H.dataIndex)}),G},U.prototype.getValue=function(G){var H=this.hostTree.data;return H.getStore().get(H.getDimensionIndex(G||"value"),this.dataIndex)},U.prototype.setLayout=function(G,H){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,G,H)},U.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},U.prototype.getModel=function(G){if(!(this.dataIndex<0)){var H=this.hostTree,W=H.data.getItemModel(this.dataIndex);return W.getModel(G)}},U.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},U.prototype.setVisual=function(G,H){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,G,H)},U.prototype.getVisual=function(G){return this.hostTree.data.getItemVisual(this.dataIndex,G)},U.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},U.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},U.prototype.getChildIndex=function(){if(this.parentNode){for(var G=this.parentNode.children,H=0;H<G.length;++H)if(G[H]===this)return H;return-1}return-1},U.prototype.isAncestorOf=function(G){for(var H=G.parentNode;H;){if(H===this)return!0;H=H.parentNode}return!1},U.prototype.isDescendantOf=function(G){return G!==this&&G.isAncestorOf(this)},U})(),Tree=(function(){function U(G){this.type="tree",this._nodes=[],this.hostModel=G}return U.prototype.eachNode=function(G,H,W){this.root.eachNode(G,H,W)},U.prototype.getNodeByDataIndex=function(G){var H=this.data.getRawIndex(G);return this._nodes[H]},U.prototype.getNodeById=function(G){return this.root.getNodeById(G)},U.prototype.update=function(){for(var G=this.data,H=this._nodes,W=0,Z=H.length;W<Z;W++)H[W].dataIndex=-1;for(var W=0,Z=G.count();W<Z;W++)H[G.getRawIndex(W)].dataIndex=W},U.prototype.clearLayouts=function(){this.data.clearItemLayouts()},U.createTree=function(G,H,W){var Z=new U(H),X=[],K=1;Q(G);function Q(re,ae){var ne=re.value;K=Math.max(K,isArray$1(ne)?ne.length:1),X.push(re);var ie=new TreeNode(convertOptionIdName(re.name,""),Z);ae?addChild(ie,ae):Z.root=ie,Z._nodes.push(ie);var oe=re.children;if(oe)for(var se=0;se<oe.length;se++)Q(oe[se],ie)}Z.root.updateDepthAndHeight(0);var ee=prepareSeriesDataSchema(X,{coordDimensions:["value"],dimensionsCount:K}).dimensions,te=new SeriesData(ee,H);return te.initData(X),W&&W(te),linkSeriesData({mainData:te,struct:Z,structAttr:"tree"}),Z.update(),Z},U})();function addChild(U,G){var H=G.children;U.parentNode!==G&&(H.push(U),U.parentNode=G)}function retrieveTargetInfo(U,G,H){if(U&&indexOf(G,U.type)>=0){var W=H.getData().tree.root,Z=U.targetNode;if(isString(Z)&&(Z=W.getNodeById(Z)),Z&&W.contains(Z))return{node:Z};var X=U.targetNodeId;if(X!=null&&(Z=W.getNodeById(X)))return{node:Z}}}function getPathToRoot(U){for(var G=[];U;)U=U.parentNode,U&&G.push(U);return G.reverse()}function aboveViewRoot(U,G){var H=getPathToRoot(U);return indexOf(H,G)>=0}function wrapTreePathInfo(U,G){for(var H=[];U;){var W=U.dataIndex;H.push({name:U.name,dataIndex:W,value:G.getRawValue(W)}),U=U.parentNode}return H.reverse(),H}var TreeSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.hasSymbolVisual=!0,H.ignoreStyleOnData=!0,H}return G.prototype.getInitialData=function(H){var W={name:H.name,children:H.data},Z=H.leaves||{},X=new Model(Z,this,this.ecModel),K=Tree.createTree(W,this,Q);function Q(ae){ae.wrapMethod("getItemModel",function(ne,ie){var oe=K.getNodeByDataIndex(ie);return oe&&oe.children.length&&oe.isExpand||(ne.parentModel=X),ne})}var ee=0;K.eachNode("preorder",function(ae){ae.depth>ee&&(ee=ae.depth)});var te=H.expandAndCollapse,re=te&&H.initialTreeDepth>=0?H.initialTreeDepth:ee;return K.root.eachNode("preorder",function(ae){var ne=ae.hostTree.data.getRawDataItem(ae.dataIndex);ae.isExpand=ne&&ne.collapsed!=null?!ne.collapsed:ae.depth<=re}),K.data},G.prototype.getOrient=function(){var H=this.get("orient");return H==="horizontal"?H="LR":H==="vertical"&&(H="TB"),H},G.prototype.setZoom=function(H){this.option.zoom=H},G.prototype.setCenter=function(H){this.option.center=H},G.prototype.formatTooltip=function(H,W,Z){for(var X=this.getData().tree,K=X.root.children[0],Q=X.getNodeByDataIndex(H),ee=Q.getValue(),te=Q.name;Q&&Q!==K;)te=Q.parentNode.name+"."+te,Q=Q.parentNode;return createTooltipMarkup("nameValue",{name:te,value:ee,noValue:isNaN(ee)||ee==null})},G.prototype.getDataParams=function(H){var W=U.prototype.getDataParams.apply(this,arguments),Z=this.getData().tree.getNodeByDataIndex(H);return W.treeAncestors=wrapTreePathInfo(Z,this),W.collapsed=!Z.isExpand,W},G.type="series.tree",G.layoutMode="box",G.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:tokens.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},G})(SeriesModel);function eachAfter(U,G,H){for(var W=[U],Z=[],X;X=W.pop();)if(Z.push(X),X.isExpand){var K=X.children;if(K.length)for(var Q=0;Q<K.length;Q++)W.push(K[Q])}for(;X=Z.pop();)G(X,H)}function eachBefore(U,G){for(var H=[U],W;W=H.pop();)if(G(W),W.isExpand){var Z=W.children;if(Z.length)for(var X=Z.length-1;X>=0;X--)H.push(Z[X])}}function treeLayout(U,G){U.eachSeriesByType("tree",function(H){commonLayout(H,G)})}function commonLayout(U,G){var H=createBoxLayoutReference(U,G).refContainer,W=getLayoutRect(U.getBoxLayoutParams(),H);U.layoutInfo=W;var Z=U.get("layout"),X=0,K=0,Q=null;Z==="radial"?(X=2*Math.PI,K=Math.min(W.height,W.width)/2,Q=separation(function(he,ve){return(he.parentNode===ve.parentNode?1:2)/he.depth})):(X=W.width,K=W.height,Q=separation());var ee=U.getData().tree.root,te=ee.children[0];if(te){init(ee),eachAfter(te,firstWalk,Q),ee.hierNode.modifier=-te.hierNode.prelim,eachBefore(te,secondWalk);var re=te,ae=te,ne=te;eachBefore(te,function(he){var ve=he.getLayout().x;ve<re.getLayout().x&&(re=he),ve>ae.getLayout().x&&(ae=he),he.depth>ne.depth&&(ne=he)});var ie=re===ae?1:Q(re,ae)/2,oe=ie-re.getLayout().x,se=0,le=0,ue=0,ce=0;if(Z==="radial")se=X/(ae.getLayout().x+ie+oe),le=K/(ne.depth-1||1),eachBefore(te,function(he){ue=(he.getLayout().x+oe)*se,ce=(he.depth-1)*le;var ve=radialCoordinate(ue,ce);he.setLayout({x:ve.x,y:ve.y,rawX:ue,rawY:ce},!0)});else{var fe=U.getOrient();fe==="RL"||fe==="LR"?(le=K/(ae.getLayout().x+ie+oe),se=X/(ne.depth-1||1),eachBefore(te,function(he){ce=(he.getLayout().x+oe)*le,ue=fe==="LR"?(he.depth-1)*se:X-(he.depth-1)*se,he.setLayout({x:ue,y:ce},!0)})):(fe==="TB"||fe==="BT")&&(se=X/(ae.getLayout().x+ie+oe),le=K/(ne.depth-1||1),eachBefore(te,function(he){ue=(he.getLayout().x+oe)*se,ce=fe==="TB"?(he.depth-1)*le:K-(he.depth-1)*le,he.setLayout({x:ue,y:ce},!0)}))}}}function treeVisual(U){U.eachSeriesByType("tree",function(G){var H=G.getData(),W=H.tree;W.eachNode(function(Z){var X=Z.getModel(),K=X.getModel("itemStyle").getItemStyle(),Q=H.ensureUniqueItemVisual(Z.dataIndex,"style");extend(Q,K)})})}function installTreeAction(U){U.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(G,H){H.eachComponent({mainType:"series",subType:"tree",query:G},function(W){var Z=G.dataIndex,X=W.getData().tree,K=X.getNodeByDataIndex(Z);K.isExpand=!K.isExpand})}),U.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(G,H,W){H.eachComponent({mainType:"series",subType:"tree",query:G},function(Z){var X=Z.coordinateSystem,K=updateCenterAndZoomInAction(X,G,Z.get("scaleLimit"));Z.setCenter(K.center),Z.setZoom(K.zoom)})})}function install$L(U){U.registerChartView(TreeView),U.registerSeriesModel(TreeSeriesModel),U.registerLayout(treeLayout),U.registerVisual(treeVisual),installTreeAction(U)}var actionTypes=["treemapZoomToNode","treemapRender","treemapMove"];function installTreemapAction(U){for(var G=0;G<actionTypes.length;G++)U.registerAction({type:actionTypes[G],update:"updateView"},noop);U.registerAction({type:"treemapRootToNode",update:"updateView"},function(H,W){W.eachComponent({mainType:"series",subType:"treemap",query:H},Z);function Z(X,K){var Q=["treemapZoomToNode","treemapRootToNode"],ee=retrieveTargetInfo(H,Q,X);if(ee){var te=X.getViewRoot();te&&(H.direction=aboveViewRoot(te,ee.node)?"rollUp":"drillDown"),X.resetViewRoot(ee.node)}}})}function enableAriaDecalForTree(U){var G=U.getData(),H=G.tree,W={};H.eachNode(function(Z){for(var X=Z;X&&X.depth>1;)X=X.parentNode;var K=getDecalFromPalette(U.ecModel,X.name||X.dataIndex+"",W);Z.setVisual("decal",K)})}var TreemapSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.preventUsingHoverLayer=!0,H}return G.prototype.getInitialData=function(H,W){var Z={name:H.name,children:H.data};completeTreeValue$1(Z);var X=H.levels||[],K=this.designatedVisualItemStyle={},Q=new Model({itemStyle:K},this,W);X=H.levels=setDefault(X,W);var ee=map$1(X||[],function(ae){return new Model(ae,Q,W)},this),te=Tree.createTree(Z,this,re);function re(ae){ae.wrapMethod("getItemModel",function(ne,ie){var oe=te.getNodeByDataIndex(ie),se=oe?ee[oe.depth]:null;return ne.parentModel=se||Q,ne})}return te.data},G.prototype.optionUpdated=function(){this.resetViewRoot()},G.prototype.formatTooltip=function(H,W,Z){var X=this.getData(),K=this.getRawValue(H),Q=X.getName(H);return createTooltipMarkup("nameValue",{name:Q,value:K})},G.prototype.getDataParams=function(H){var W=U.prototype.getDataParams.apply(this,arguments),Z=this.getData().tree.getNodeByDataIndex(H);return W.treeAncestors=wrapTreePathInfo(Z,this),W.treePathInfo=W.treeAncestors,W},G.prototype.setLayoutInfo=function(H){this.layoutInfo=this.layoutInfo||{},extend(this.layoutInfo,H)},G.prototype.mapIdToIndex=function(H){var W=this._idIndexMap;W||(W=this._idIndexMap=createHashMap(),this._idIndexMapCount=0);var Z=W.get(H);return Z==null&&W.set(H,Z=this._idIndexMapCount++),Z},G.prototype.getViewRoot=function(){return this._viewRoot},G.prototype.resetViewRoot=function(H){H?this._viewRoot=H:H=this._viewRoot;var W=this.getRawData().tree.root;(!H||H!==W&&!W.contains(H))&&(this._viewRoot=W)},G.prototype.enableAriaDecal=function(){enableAriaDecalForTree(this)},G.type="series.treemap",G.layoutMode="box",G.defaultOption={progressive:0,coordinateSystemUsage:"box",left:tokens.size.l,top:tokens.size.xxxl,right:tokens.size.l,bottom:tokens.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:tokens.size.m,emptyItemWidth:25,itemStyle:{color:tokens.color.backgroundShade,textStyle:{color:tokens.color.secondary}},emphasis:{itemStyle:{color:tokens.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:tokens.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:tokens.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},G})(SeriesModel);function completeTreeValue$1(U){var G=0;each$f(U.children,function(W){completeTreeValue$1(W);var Z=W.value;isArray$1(Z)&&(Z=Z[0]),G+=Z});var H=U.value;isArray$1(H)&&(H=H[0]),(H==null||isNaN(H))&&(H=G),H<0&&(H=0),isArray$1(U.value)?U.value[0]=H:U.value=H}function setDefault(U,G){var H=normalizeToArray(G.get("color")),W=normalizeToArray(G.get(["aria","decal","decals"]));if(H){U=U||[];var Z,X;each$f(U,function(Q){var ee=new Model(Q),te=ee.get("color"),re=ee.get("decal");(ee.get(["itemStyle","color"])||te&&te!=="none")&&(Z=!0),(ee.get(["itemStyle","decal"])||re&&re!=="none")&&(X=!0)});var K=U[0]||(U[0]={});return Z||(K.color=H.slice()),!X&&W&&(K.decal=W.slice()),U}}var TEXT_PADDING=8,ITEM_GAP=8,ARRAY_LENGTH=5,Breadcrumb=(function(){function U(G){this.group=new Group$3,G.add(this.group)}return U.prototype.render=function(G,H,W,Z){var X=G.getModel("breadcrumb"),K=this.group;if(K.removeAll(),!(!X.get("show")||!W)){var Q=X.getModel("itemStyle"),ee=X.getModel("emphasis"),te=Q.getModel("textStyle"),re=ee.getModel(["itemStyle","textStyle"]),ae=createBoxLayoutReference(G,H).refContainer,ne={left:X.get("left"),right:X.get("right"),top:X.get("top"),bottom:X.get("bottom")},ie={emptyItemWidth:X.get("emptyItemWidth"),totalWidth:0,renderList:[]},oe=getLayoutRect(ne,ae);this._prepare(W,ie,te),this._renderContent(G,ie,oe,Q,ee,te,re,Z),positionElement(K,ne,ae)}},U.prototype._prepare=function(G,H,W){for(var Z=G;Z;Z=Z.parentNode){var X=convertOptionIdName(Z.getModel().get("name"),""),K=W.getTextRect(X),Q=Math.max(K.width+TEXT_PADDING*2,H.emptyItemWidth);H.totalWidth+=Q+ITEM_GAP,H.renderList.push({node:Z,text:X,width:Q})}},U.prototype._renderContent=function(G,H,W,Z,X,K,Q,ee){for(var te=0,re=H.emptyItemWidth,ae=G.get(["breadcrumb","height"]),ne=H.totalWidth,ie=H.renderList,oe=X.getModel("itemStyle").getItemStyle(),se=ie.length-1;se>=0;se--){var le=ie[se],ue=le.node,ce=le.width,fe=le.text;ne>W.width&&(ne-=ce-re,ce=re,fe=null);var he=new Polygon({shape:{points:makeItemPoints(te,0,ce,ae,se===ie.length-1,se===0)},style:defaults(Z.getItemStyle(),{lineJoin:"bevel"}),textContent:new ZRText({style:createTextStyle(K,{text:fe})}),textConfig:{position:"inside"},z2:Z2_EMPHASIS_LIFT*1e4,onclick:curry$1(ee,ue)});he.disableLabelAnimation=!0,he.getTextContent().ensureState("emphasis").style=createTextStyle(Q,{text:fe}),he.ensureState("emphasis").style=oe,toggleHoverEmphasis(he,X.get("focus"),X.get("blurScope"),X.get("disabled")),this.group.add(he),packEventData(he,G,ue),te+=ce+ITEM_GAP}},U.prototype.remove=function(){this.group.removeAll()},U})();function makeItemPoints(U,G,H,W,Z,X){var K=[[Z?U:U-ARRAY_LENGTH,G],[U+H,G],[U+H,G+W],[Z?U:U-ARRAY_LENGTH,G+W]];return!X&&K.splice(2,0,[U+H+ARRAY_LENGTH,G+W/2]),!Z&&K.push([U,G+W/2]),K}function packEventData(U,G,H){getECData(U).eventData={componentType:"series",componentSubType:"treemap",componentIndex:G.componentIndex,seriesIndex:G.seriesIndex,seriesName:G.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:H&&H.dataIndex,name:H&&H.name},treePathInfo:H&&wrapTreePathInfo(H,G)}}var AnimationWrap=(function(){function U(){this._storage=[],this._elExistsMap={}}return U.prototype.add=function(G,H,W,Z,X){return this._elExistsMap[G.id]?!1:(this._elExistsMap[G.id]=!0,this._storage.push({el:G,target:H,duration:W,delay:Z,easing:X}),!0)},U.prototype.finished=function(G){return this._finishedCallback=G,this},U.prototype.start=function(){for(var G=this,H=this._storage.length,W=function(){H--,H<=0&&(G._storage.length=0,G._elExistsMap={},G._finishedCallback&&G._finishedCallback())},Z=0,X=this._storage.length;Z<X;Z++){var K=this._storage[Z];K.el.animateTo(K.target,{duration:K.duration,delay:K.delay,easing:K.easing,setToFinal:!0,done:W,aborted:W})}return this},U})();function createWrap(){return new AnimationWrap}var Group$2=Group$3,Rect$1=Rect$2,DRAG_THRESHOLD=3,PATH_LABEL_NOAMAL="label",PATH_UPPERLABEL_NORMAL="upperLabel",Z2_BASE=Z2_EMPHASIS_LIFT*10,Z2_BG=Z2_EMPHASIS_LIFT*2,Z2_CONTENT=Z2_EMPHASIS_LIFT*3,getStateItemStyle=makeStyleMapper([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),getItemStyleNormal=function(U){var G=getStateItemStyle(U);return G.stroke=G.fill=G.lineWidth=null,G},inner$e=makeInner(),TreemapView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H._state="ready",H._storage=createStorage(),H}return G.prototype.render=function(H,W,Z,X){var K=W.findComponents({mainType:"series",subType:"treemap",query:X});if(!(indexOf(K,H)<0)){this.seriesModel=H,this.api=Z,this.ecModel=W;var Q=["treemapZoomToNode","treemapRootToNode"],ee=retrieveTargetInfo(X,Q,H),te=X&&X.type,re=H.layoutInfo,ae=!this._oldTree,ne=this._storage,ie=te==="treemapRootToNode"&&ee&&ne?{rootNodeGroup:ne.nodeGroup[ee.node.getRawIndex()],direction:X.direction}:null,oe=this._giveContainerGroup(re),se=H.get("animation"),le=this._doRender(oe,H,ie);se&&!ae&&(!te||te==="treemapZoomToNode"||te==="treemapRootToNode")?this._doAnimation(oe,le,H,ie):le.renderFinally(),this._resetController(Z),this._renderBreadcrumb(H,Z,ee)}},G.prototype._giveContainerGroup=function(H){var W=this._containerGroup;return W||(W=this._containerGroup=new Group$2,this._initEvents(W),this.group.add(W)),W.x=H.x,W.y=H.y,W},G.prototype._doRender=function(H,W,Z){var X=W.getData().tree,K=this._oldTree,Q=createStorage(),ee=createStorage(),te=this._storage,re=[];function ae(ce,fe,he,ve){return renderNode(W,ee,te,Z,Q,re,ce,fe,he,ve)}se(X.root?[X.root]:[],K&&K.root?[K.root]:[],H,X===K||!K,0);var ne=le(te);if(this._oldTree=X,this._storage=ee,this._controllerHost){var ie=this.seriesModel.layoutInfo,oe=X.root.getLayout();oe.width===ie.width&&oe.height===ie.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:Q,willDeleteEls:ne,renderFinally:ue};function se(ce,fe,he,ve,de){ve?(fe=ce,each$f(ce,function(me,ye){!me.isRemoved()&&ge(ye,ye)})):new DataDiffer(fe,ce,pe,pe).add(ge).update(ge).remove(curry$1(ge,null)).execute();function pe(me){return me.getId()}function ge(me,ye){var _e=me!=null?ce[me]:null,xe=ye!=null?fe[ye]:null,Se=ae(_e,xe,he,de);Se&&se(_e&&_e.viewChildren||[],xe&&xe.viewChildren||[],Se,ve,de+1)}}function le(ce){var fe=createStorage();return ce&&each$f(ce,function(he,ve){var de=fe[ve];each$f(he,function(pe){pe&&(de.push(pe),inner$e(pe).willDelete=!0)})}),fe}function ue(){each$f(ne,function(ce){each$f(ce,function(fe){fe.parent&&fe.parent.remove(fe)})}),each$f(re,function(ce){ce.invisible=!0,ce.dirty()})}},G.prototype._doAnimation=function(H,W,Z,X){var K=Z.get("animationDurationUpdate"),Q=Z.get("animationEasing"),ee=(isFunction(K)?0:K)||0,te=(isFunction(Q)?null:Q)||"cubicOut",re=createWrap();each$f(W.willDeleteEls,function(ae,ne){each$f(ae,function(ie,oe){if(!ie.invisible){var se=ie.parent,le,ue=inner$e(se);if(X&&X.direction==="drillDown")le=se===X.rootNodeGroup?{shape:{x:0,y:0,width:ue.nodeWidth,height:ue.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var ce=0,fe=0;ue.willDelete||(ce=ue.nodeWidth/2,fe=ue.nodeHeight/2),le=ne==="nodeGroup"?{x:ce,y:fe,style:{opacity:0}}:{shape:{x:ce,y:fe,width:0,height:0},style:{opacity:0}}}le&&re.add(ie,le,ee,0,te)}})}),each$f(this._storage,function(ae,ne){each$f(ae,function(ie,oe){var se=W.lastsForAnimation[ne][oe],le={};se&&(ie instanceof Group$3?se.oldX!=null&&(le.x=ie.x,le.y=ie.y,ie.x=se.oldX,ie.y=se.oldY):(se.oldShape&&(le.shape=extend({},ie.shape),ie.setShape(se.oldShape)),se.fadein?(ie.setStyle("opacity",0),le.style={opacity:1}):ie.style.opacity!==1&&(le.style={opacity:1})),re.add(ie,le,ee,0,te))})},this),this._state="animating",re.finished(bind$1(function(){this._state="ready",W.renderFinally()},this)).start()},G.prototype._resetController=function(H){var W=this,Z=this._controller,X=this._controllerHost;X||(this._controllerHost={target:this.group},X=this._controllerHost);var K=this.seriesModel;Z||(Z=this._controller=new RoamController(H.getZr()),Z.on("pan",bind$1(this._onPan,this)),Z.on("zoom",bind$1(this._onZoom,this))),Z.enable(K.get("roam"),{api:H,zInfo:{component:K},triggerInfo:{roamTrigger:K.get("roamTrigger"),isInSelf:function(Q,ee,te){var re=W._containerGroup;return re?re.getBoundingRect().contain(ee-re.x,te-re.y):!1}}}),X.zoomLimit=K.get("scaleLimit"),X.zoom=K.get("zoom")},G.prototype._clearController=function(){var H=this._controller;this._controllerHost=null,H&&(H.dispose(),H=null)},G.prototype._onPan=function(H){if(this._state!=="animating"&&(Math.abs(H.dx)>DRAG_THRESHOLD||Math.abs(H.dy)>DRAG_THRESHOLD)){var W=this.seriesModel.getData().tree.root;if(!W)return;var Z=W.getLayout();if(!Z)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:Z.x+H.dx,y:Z.y+H.dy,width:Z.width,height:Z.height}})}},G.prototype._onZoom=function(H){var W=H.originX,Z=H.originY,X=H.scale;if(this._state!=="animating"){var K=this.seriesModel.getData().tree.root;if(!K)return;var Q=K.getLayout();if(!Q)return;var ee=new BoundingRect(Q.x,Q.y,Q.width,Q.height),te=null,re=this._controllerHost;te=re.zoomLimit;var ae=re.zoom=re.zoom||1;if(ae*=X,te){var ne=te.min||0,ie=te.max||1/0;ae=Math.max(Math.min(ie,ae),ne)}var oe=ae/re.zoom;re.zoom=ae;var se=this.seriesModel.layoutInfo;W-=se.x,Z-=se.y;var le=create$1();translate(le,le,[-W,-Z]),scale$1(le,le,[oe,oe]),translate(le,le,[W,Z]),ee.applyTransform(le),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:ee.x,y:ee.y,width:ee.width,height:ee.height}})}},G.prototype._initEvents=function(H){var W=this;H.on("click",function(Z){if(W._state==="ready"){var X=W.seriesModel.get("nodeClick",!0);if(X){var K=W.findTarget(Z.offsetX,Z.offsetY);if(K){var Q=K.node;if(Q.getLayout().isLeafRoot)W._rootToNode(K);else if(X==="zoomToNode")W._zoomToNode(K);else if(X==="link"){var ee=Q.hostTree.data.getItemModel(Q.dataIndex),te=ee.get("link",!0),re=ee.get("target",!0)||"blank";te&&windowOpen(te,re)}}}}},this)},G.prototype._renderBreadcrumb=function(H,W,Z){var X=this;Z||(Z=H.get("leafDepth",!0)!=null?{node:H.getViewRoot()}:this.findTarget(W.getWidth()/2,W.getHeight()/2),Z||(Z={node:H.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Breadcrumb(this.group))).render(H,W,Z.node,function(K){X._state!=="animating"&&(aboveViewRoot(H.getViewRoot(),K)?X._rootToNode({node:K}):X._zoomToNode({node:K}))})},G.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=createStorage(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},G.prototype.dispose=function(){this._clearController()},G.prototype._zoomToNode=function(H){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:H.node})},G.prototype._rootToNode=function(H){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:H.node})},G.prototype.findTarget=function(H,W){var Z,X=this.seriesModel.getViewRoot();return X.eachNode({attr:"viewChildren",order:"preorder"},function(K){var Q=this._storage.background[K.getRawIndex()];if(Q){var ee=Q.transformCoordToLocal(H,W),te=Q.shape;if(te.x<=ee[0]&&ee[0]<=te.x+te.width&&te.y<=ee[1]&&ee[1]<=te.y+te.height)Z={node:K,offsetX:ee[0],offsetY:ee[1]};else return!1}},this),Z},G.type="treemap",G})(ChartView);function createStorage(){return{nodeGroup:[],background:[],content:[]}}function renderNode(U,G,H,W,Z,X,K,Q,ee,te){if(!K)return;var re=K.getLayout(),ae=U.getData(),ne=K.getModel();if(ae.setItemGraphicEl(K.dataIndex,null),!re||!re.isInView)return;var ie=re.width,oe=re.height,se=re.borderWidth,le=re.invisible,ue=K.getRawIndex(),ce=Q&&Q.getRawIndex(),fe=K.viewChildren,he=re.upperHeight,ve=fe&&fe.length,de=ne.getModel("itemStyle"),pe=ne.getModel(["emphasis","itemStyle"]),ge=ne.getModel(["blur","itemStyle"]),me=ne.getModel(["select","itemStyle"]),ye=de.get("borderRadius")||0,_e=$e("nodeGroup",Group$2);if(!_e)return;if(ee.add(_e),_e.x=re.x||0,_e.y=re.y||0,_e.markRedraw(),inner$e(_e).nodeWidth=ie,inner$e(_e).nodeHeight=oe,re.isAboveViewRoot)return _e;var xe=$e("background",Rect$1,te,Z2_BG);xe&&Me(_e,xe,ve&&re.upperLabelHeight);var Se=ne.getModel("emphasis"),Te=Se.get("focus"),be=Se.get("blurScope"),Ae=Se.get("disabled"),we=Te==="ancestor"?K.getAncestorsIndices():Te==="descendant"?K.getDescendantIndices():Te;if(ve)isHighDownDispatcher(_e)&&setAsHighDownDispatcher(_e,!1),xe&&(setAsHighDownDispatcher(xe,!Ae),ae.setItemGraphicEl(K.dataIndex,xe),enableHoverFocus(xe,we,be));else{var Ce=$e("content",Rect$1,te,Z2_CONTENT);Ce&&De(_e,Ce),xe.disableMorphing=!0,xe&&isHighDownDispatcher(xe)&&setAsHighDownDispatcher(xe,!1),setAsHighDownDispatcher(_e,!Ae),ae.setItemGraphicEl(K.dataIndex,_e);var Ee=ne.getShallow("cursor");Ee&&Ce.attr("cursor",Ee),enableHoverFocus(_e,we,be)}return _e;function Me(ke,Re,Ne){var Oe=getECData(Re);if(Oe.dataIndex=K.dataIndex,Oe.seriesIndex=U.seriesIndex,Re.setShape({x:0,y:0,width:ie,height:oe,r:ye}),le)Le(Re);else{Re.invisible=!1;var Be=K.getVisual("style"),ze=Be.stroke,Ge=getItemStyleNormal(de);Ge.fill=ze;var He=getStateItemStyle(pe);He.fill=pe.get("borderColor");var Ue=getStateItemStyle(ge);Ue.fill=ge.get("borderColor");var Ye=getStateItemStyle(me);if(Ye.fill=me.get("borderColor"),Ne){var Ze=ie-2*se;Pe(Re,ze,Be.opacity,{x:se,y:0,width:Ze,height:he})}else Re.removeTextContent();Re.setStyle(Ge),Re.ensureState("emphasis").style=He,Re.ensureState("blur").style=Ue,Re.ensureState("select").style=Ye,setDefaultStateProxy(Re)}ke.add(Re)}function De(ke,Re){var Ne=getECData(Re);Ne.dataIndex=K.dataIndex,Ne.seriesIndex=U.seriesIndex;var Oe=Math.max(ie-2*se,0),Be=Math.max(oe-2*se,0);if(Re.culling=!0,Re.setShape({x:se,y:se,width:Oe,height:Be,r:ye}),le)Le(Re);else{Re.invisible=!1;var ze=K.getVisual("style"),Ge=ze.fill,He=getItemStyleNormal(de);He.fill=Ge,He.decal=ze.decal;var Ue=getStateItemStyle(pe),Ye=getStateItemStyle(ge),Ze=getStateItemStyle(me);Pe(Re,Ge,ze.opacity,null),Re.setStyle(He),Re.ensureState("emphasis").style=Ue,Re.ensureState("blur").style=Ye,Re.ensureState("select").style=Ze,setDefaultStateProxy(Re)}ke.add(Re)}function Le(ke){!ke.invisible&&X.push(ke)}function Pe(ke,Re,Ne,Oe){var Be=ne.getModel(Oe?PATH_UPPERLABEL_NORMAL:PATH_LABEL_NOAMAL),ze=convertOptionIdName(ne.get("name"),null),Ge=Be.getShallow("show");setLabelStyle(ke,getLabelStatesModels(ne,Oe?PATH_UPPERLABEL_NORMAL:PATH_LABEL_NOAMAL),{defaultText:Ge?ze:null,inheritColor:Re,defaultOpacity:Ne,labelFetcher:U,labelDataIndex:K.dataIndex});var He=ke.getTextContent();if(He){var Ue=He.style,Ye=normalizeCssArray$1(Ue.padding||0);Oe&&(ke.setTextConfig({layoutRect:Oe}),He.disableLabelLayout=!0),He.beforeUpdate=function(){var We=Math.max((Oe?Oe.width:ke.shape.width)-Ye[1]-Ye[3],0),Xe=Math.max((Oe?Oe.height:ke.shape.height)-Ye[0]-Ye[2],0);(Ue.width!==We||Ue.height!==Xe)&&He.setStyle({width:We,height:Xe})},Ue.truncateMinChar=2,Ue.lineOverflow="truncate",Ie(Ue,Oe,re);var Ze=He.getState("emphasis");Ie(Ze?Ze.style:null,Oe,re)}}function Ie(ke,Re,Ne){var Oe=ke?ke.text:null;if(!Re&&Ne.isLeafRoot&&Oe!=null){var Be=U.get("drillDownIcon",!0);ke.text=Be?Be+" "+Oe:Oe}}function $e(ke,Re,Ne,Oe){var Be=ce!=null&&H[ke][ce],ze=Z[ke];return Be?(H[ke][ce]=null,Ve(ze,Be)):le||(Be=new Re,Be instanceof Displayable&&(Be.z2=calculateZ2(Ne,Oe)),Fe(ze,Be)),G[ke][ue]=Be}function Ve(ke,Re){var Ne=ke[ue]={};Re instanceof Group$2?(Ne.oldX=Re.x,Ne.oldY=Re.y):Ne.oldShape=extend({},Re.shape)}function Fe(ke,Re){var Ne=ke[ue]={},Oe=K.parentNode,Be=Re instanceof Group$3;if(Oe&&(!W||W.direction==="drillDown")){var ze=0,Ge=0,He=Z.background[Oe.getRawIndex()];!W&&He&&He.oldShape&&(ze=He.oldShape.width,Ge=He.oldShape.height),Be?(Ne.oldX=0,Ne.oldY=Ge):Ne.oldShape={x:ze,y:Ge,width:0,height:0}}Ne.fadein=!Be}}function calculateZ2(U,G){return U*Z2_BASE+G}var each$c=each$f,isObject=isObject$3,CATEGORY_DEFAULT_VISUAL_INDEX=-1,VisualMapping=(function(){function U(G){var H=G.mappingMethod,W=G.type,Z=this.option=clone$4(G);this.type=W,this.mappingMethod=H,this._normalizeData=normalizers[H];var X=U.visualHandlers[W];this.applyVisual=X.applyVisual,this.getColorMapper=X.getColorMapper,this._normalizedToVisual=X._normalizedToVisual[H],H==="piecewise"?(normalizeVisualRange(Z),preprocessForPiecewise(Z)):H==="category"?Z.categories?preprocessForSpecifiedCategory(Z):normalizeVisualRange(Z,!0):(assert(H!=="linear"||Z.dataExtent),normalizeVisualRange(Z))}return U.prototype.mapValueToVisual=function(G){var H=this._normalizeData(G);return this._normalizedToVisual(H,G)},U.prototype.getNormalizer=function(){return bind$1(this._normalizeData,this)},U.listVisualTypes=function(){return keys(U.visualHandlers)},U.isValidType=function(G){return U.visualHandlers.hasOwnProperty(G)},U.eachVisual=function(G,H,W){isObject$3(G)?each$f(G,H,W):H.call(W,G)},U.mapVisual=function(G,H,W){var Z,X=isArray$1(G)?[]:isObject$3(G)?{}:(Z=!0,null);return U.eachVisual(G,function(K,Q){var ee=H.call(W,K,Q);Z?X=ee:X[Q]=ee}),X},U.retrieveVisuals=function(G){var H={},W;return G&&each$c(U.visualHandlers,function(Z,X){G.hasOwnProperty(X)&&(H[X]=G[X],W=!0)}),W?H:null},U.prepareVisualTypes=function(G){if(isArray$1(G))G=G.slice();else if(isObject(G)){var H=[];each$c(G,function(W,Z){H.push(Z)}),G=H}else return[];return G.sort(function(W,Z){return Z==="color"&&W!=="color"&&W.indexOf("color")===0?1:-1}),G},U.dependsOn=function(G,H){return H==="color"?!!(G&&G.indexOf(H)===0):G===H},U.findPieceIndex=function(G,H,W){for(var Z,X=1/0,K=0,Q=H.length;K<Q;K++){var ee=H[K].value;if(ee!=null){if(ee===G||isString(ee)&&ee===G+"")return K;W&&ne(ee,K)}}for(var K=0,Q=H.length;K<Q;K++){var te=H[K],re=te.interval,ae=te.close;if(re){if(re[0]===-1/0){if(littleThan(ae[1],G,re[1]))return K}else if(re[1]===1/0){if(littleThan(ae[0],re[0],G))return K}else if(littleThan(ae[0],re[0],G)&&littleThan(ae[1],G,re[1]))return K;W&&ne(re[0],K),W&&ne(re[1],K)}}if(W)return G===1/0?H.length-1:G===-1/0?0:Z;function ne(ie,oe){var se=Math.abs(ie-G);se<X&&(X=se,Z=oe)}},U.visualHandlers={color:{applyVisual:makeApplyVisual("color"),getColorMapper:function(){var G=this.option;return bind$1(G.mappingMethod==="category"?function(H,W){return!W&&(H=this._normalizeData(H)),doMapCategory.call(this,H)}:function(H,W,Z){var X=!!Z;return!W&&(H=this._normalizeData(H)),Z=fastLerp(H,G.parsedVisual,Z),X?Z:stringify(Z,"rgba")},this)},_normalizedToVisual:{linear:function(G){return stringify(fastLerp(G,this.option.parsedVisual),"rgba")},category:doMapCategory,piecewise:function(G,H){var W=getSpecifiedVisual.call(this,H);return W==null&&(W=stringify(fastLerp(G,this.option.parsedVisual),"rgba")),W},fixed:doMapFixed}},colorHue:makePartialColorVisualHandler(function(G,H){return modifyHSL(G,H)}),colorSaturation:makePartialColorVisualHandler(function(G,H){return modifyHSL(G,null,H)}),colorLightness:makePartialColorVisualHandler(function(G,H){return modifyHSL(G,null,null,H)}),colorAlpha:makePartialColorVisualHandler(function(G,H){return modifyAlpha(G,H)}),decal:{applyVisual:makeApplyVisual("decal"),_normalizedToVisual:{linear:null,category:doMapCategory,piecewise:null,fixed:null}},opacity:{applyVisual:makeApplyVisual("opacity"),_normalizedToVisual:createNormalizedToNumericVisual([0,1])},liftZ:{applyVisual:makeApplyVisual("liftZ"),_normalizedToVisual:{linear:doMapFixed,category:doMapFixed,piecewise:doMapFixed,fixed:doMapFixed}},symbol:{applyVisual:function(G,H,W){var Z=this.mapValueToVisual(G);W("symbol",Z)},_normalizedToVisual:{linear:doMapToArray,category:doMapCategory,piecewise:function(G,H){var W=getSpecifiedVisual.call(this,H);return W==null&&(W=doMapToArray.call(this,G)),W},fixed:doMapFixed}},symbolSize:{applyVisual:makeApplyVisual("symbolSize"),_normalizedToVisual:createNormalizedToNumericVisual([0,1])}},U})();function preprocessForPiecewise(U){var G=U.pieceList;U.hasSpecialVisual=!1,each$f(G,function(H,W){H.originIndex=W,H.visual!=null&&(U.hasSpecialVisual=!0)})}function preprocessForSpecifiedCategory(U){var G=U.categories,H=U.categoryMap={},W=U.visual;if(each$c(G,function(K,Q){H[K]=Q}),!isArray$1(W)){var Z=[];isObject$3(W)?each$c(W,function(K,Q){var ee=H[Q];Z[ee??CATEGORY_DEFAULT_VISUAL_INDEX]=K}):Z[CATEGORY_DEFAULT_VISUAL_INDEX]=W,W=setVisualToOption(U,Z)}for(var X=G.length-1;X>=0;X--)W[X]==null&&(delete H[G[X]],G.pop())}function normalizeVisualRange(U,G){var H=U.visual,W=[];isObject$3(H)?each$c(H,function(X){W.push(X)}):H!=null&&W.push(H);var Z={color:1,symbol:1};!G&&W.length===1&&!Z.hasOwnProperty(U.type)&&(W[1]=W[0]),setVisualToOption(U,W)}function makePartialColorVisualHandler(U){return{applyVisual:function(G,H,W){var Z=this.mapValueToVisual(G);W("color",U(H("color"),Z))},_normalizedToVisual:createNormalizedToNumericVisual([0,1])}}function doMapToArray(U){var G=this.option.visual;return G[Math.round(linearMap$2(U,[0,1],[0,G.length-1],!0))]||{}}function makeApplyVisual(U){return function(G,H,W){W(U,this.mapValueToVisual(G))}}function doMapCategory(U){var G=this.option.visual;return G[this.option.loop&&U!==CATEGORY_DEFAULT_VISUAL_INDEX?U%G.length:U]}function doMapFixed(){return this.option.visual[0]}function createNormalizedToNumericVisual(U){return{linear:function(G){return linearMap$2(G,U,this.option.visual,!0)},category:doMapCategory,piecewise:function(G,H){var W=getSpecifiedVisual.call(this,H);return W==null&&(W=linearMap$2(G,U,this.option.visual,!0)),W},fixed:doMapFixed}}function getSpecifiedVisual(U){var G=this.option,H=G.pieceList;if(G.hasSpecialVisual){var W=VisualMapping.findPieceIndex(U,H),Z=H[W];if(Z&&Z.visual)return Z.visual[this.type]}}function setVisualToOption(U,G){return U.visual=G,U.type==="color"&&(U.parsedVisual=map$1(G,function(H){var W=parse(H);return!W&&process.env.NODE_ENV!=="production"&&warn("'"+H+"' is an illegal color, fallback to '#000000'",!0),W||[0,0,0,1]})),G}var normalizers={linear:function(U){return linearMap$2(U,this.option.dataExtent,[0,1],!0)},piecewise:function(U){var G=this.option.pieceList,H=VisualMapping.findPieceIndex(U,G,!0);if(H!=null)return linearMap$2(H,[0,G.length-1],[0,1],!0)},category:function(U){var G=this.option.categories?this.option.categoryMap[U]:U;return G??CATEGORY_DEFAULT_VISUAL_INDEX},fixed:noop};function littleThan(U,G,H){return U?G<=H:G<H}var ITEM_STYLE_NORMAL="itemStyle",inner$d=makeInner();const treemapVisual={seriesType:"treemap",reset:function(U){var G=U.getData().tree,H=G.root;H.isRemoved()||travelTree(H,{},U.getViewRoot().getAncestors(),U)}};function travelTree(U,G,H,W){var Z=U.getModel(),X=U.getLayout(),K=U.hostTree.data;if(!(!X||X.invisible||!X.isInView)){var Q=Z.getModel(ITEM_STYLE_NORMAL),ee=buildVisuals(Q,G,W),te=K.ensureUniqueItemVisual(U.dataIndex,"style"),re=Q.get("borderColor"),ae=Q.get("borderColorSaturation"),ne;ae!=null&&(ne=calculateColor(ee),re=calculateBorderColor(ae,ne)),te.stroke=re;var ie=U.viewChildren;if(!ie||!ie.length)ne=calculateColor(ee),te.fill=ne;else{var oe=buildVisualMapping(U,Z,X,Q,ee,ie);each$f(ie,function(se,le){if(se.depth>=H.length||se===H[se.depth]){var ue=mapVisual$1(Z,ee,se,le,oe,W);travelTree(se,ue,H,W)}})}}}function buildVisuals(U,G,H){var W=extend({},G),Z=H.designatedVisualItemStyle;return each$f(["color","colorAlpha","colorSaturation"],function(X){Z[X]=G[X];var K=U.get(X);Z[X]=null,K!=null&&(W[X]=K)}),W}function calculateColor(U){var G=getValueVisualDefine(U,"color");if(G){var H=getValueVisualDefine(U,"colorAlpha"),W=getValueVisualDefine(U,"colorSaturation");return W&&(G=modifyHSL(G,null,null,W)),H&&(G=modifyAlpha(G,H)),G}}function calculateBorderColor(U,G){return G!=null?modifyHSL(G,null,null,U):null}function getValueVisualDefine(U,G){var H=U[G];if(H!=null&&H!=="none")return H}function buildVisualMapping(U,G,H,W,Z,X){if(!(!X||!X.length)){var K=getRangeVisual(G,"color")||Z.color!=null&&Z.color!=="none"&&(getRangeVisual(G,"colorAlpha")||getRangeVisual(G,"colorSaturation"));if(K){var Q=G.get("visualMin"),ee=G.get("visualMax"),te=H.dataExtent.slice();Q!=null&&Q<te[0]&&(te[0]=Q),ee!=null&&ee>te[1]&&(te[1]=ee);var re=G.get("colorMappingBy"),ae={type:K.name,dataExtent:te,visual:K.range};ae.type==="color"&&(re==="index"||re==="id")?(ae.mappingMethod="category",ae.loop=!0):ae.mappingMethod="linear";var ne=new VisualMapping(ae);return inner$d(ne).drColorMappingBy=re,ne}}}function getRangeVisual(U,G){var H=U.get(G);return isArray$1(H)&&H.length?{name:G,range:H}:null}function mapVisual$1(U,G,H,W,Z,X){var K=extend({},G);if(Z){var Q=Z.type,ee=Q==="color"&&inner$d(Z).drColorMappingBy,te=ee==="index"?W:ee==="id"?X.mapIdToIndex(H.getId()):H.getValue(U.get("visualDimension"));K[Q]=Z.mapValueToVisual(te)}return K}var mathMax$3=Math.max,mathMin$3=Math.min,retrieveValue=retrieve,each$b=each$f,PATH_BORDER_WIDTH=["itemStyle","borderWidth"],PATH_GAP_WIDTH=["itemStyle","gapWidth"],PATH_UPPER_LABEL_SHOW=["upperLabel","show"],PATH_UPPER_LABEL_HEIGHT=["upperLabel","height"];const treemapLayout={seriesType:"treemap",reset:function(U,G,H,W){var Z=U.option,X=createBoxLayoutReference(U,H).refContainer,K=getLayoutRect(U.getBoxLayoutParams(),X),Q=Z.size||[],ee=parsePercent(retrieveValue(K.width,Q[0]),X.width),te=parsePercent(retrieveValue(K.height,Q[1]),X.height),re=W&&W.type,ae=["treemapZoomToNode","treemapRootToNode"],ne=retrieveTargetInfo(W,ae,U),ie=re==="treemapRender"||re==="treemapMove"?W.rootRect:null,oe=U.getViewRoot(),se=getPathToRoot(oe);if(re!=="treemapMove"){var le=re==="treemapZoomToNode"?estimateRootSize(U,ne,oe,ee,te):ie?[ie.width,ie.height]:[ee,te],ue=Z.sort;ue&&ue!=="asc"&&ue!=="desc"&&(ue="desc");var ce={squareRatio:Z.squareRatio,sort:ue,leafDepth:Z.leafDepth};oe.hostTree.clearLayouts();var fe={x:0,y:0,width:le[0],height:le[1],area:le[0]*le[1]};oe.setLayout(fe),squarify(oe,ce,!1,0),fe=oe.getLayout(),each$b(se,function(ve,de){var pe=(se[de+1]||oe).getValue();ve.setLayout(extend({dataExtent:[pe,pe],borderWidth:0,upperHeight:0},fe))})}var he=U.getData().tree.root;he.setLayout(calculateRootPosition(K,ie,ne),!0),U.setLayoutInfo(K),prunning(he,new BoundingRect(-K.x,-K.y,H.getWidth(),H.getHeight()),se,oe,0)}};function squarify(U,G,H,W){var Z,X;if(!U.isRemoved()){var K=U.getLayout();Z=K.width,X=K.height;var Q=U.getModel(),ee=Q.get(PATH_BORDER_WIDTH),te=Q.get(PATH_GAP_WIDTH)/2,re=getUpperLabelHeight(Q),ae=Math.max(ee,re),ne=ee-te,ie=ae-te;U.setLayout({borderWidth:ee,upperHeight:ae,upperLabelHeight:re},!0),Z=mathMax$3(Z-2*ne,0),X=mathMax$3(X-ne-ie,0);var oe=Z*X,se=initChildren$1(U,Q,oe,G,H,W);if(se.length){var le={x:ne,y:ie,width:Z,height:X},ue=mathMin$3(Z,X),ce=1/0,fe=[];fe.area=0;for(var he=0,ve=se.length;he<ve;){var de=se[he];fe.push(de),fe.area+=de.getLayout().area;var pe=worst(fe,ue,G.squareRatio);pe<=ce?(he++,ce=pe):(fe.area-=fe.pop().getLayout().area,position(fe,ue,le,te,!1),ue=mathMin$3(le.width,le.height),fe.length=fe.area=0,ce=1/0)}if(fe.length&&position(fe,ue,le,te,!0),!H){var ge=Q.get("childrenVisibleMin");ge!=null&&oe<ge&&(H=!0)}for(var he=0,ve=se.length;he<ve;he++)squarify(se[he],G,H,W+1)}}}function initChildren$1(U,G,H,W,Z,X){var K=U.children||[],Q=W.sort;Q!=="asc"&&Q!=="desc"&&(Q=null);var ee=W.leafDepth!=null&&W.leafDepth<=X;if(Z&&!ee)return U.viewChildren=[];K=filter(K,function(ie){return!ie.isRemoved()}),sort$1(K,Q);var te=statistic(G,K,Q);if(te.sum===0)return U.viewChildren=[];if(te.sum=filterByThreshold(G,H,te.sum,Q,K),te.sum===0)return U.viewChildren=[];for(var re=0,ae=K.length;re<ae;re++){var ne=K[re].getValue()/te.sum*H;K[re].setLayout({area:ne})}return ee&&(K.length&&U.setLayout({isLeafRoot:!0},!0),K.length=0),U.viewChildren=K,U.setLayout({dataExtent:te.dataExtent},!0),K}function filterByThreshold(U,G,H,W,Z){if(!W)return H;for(var X=U.get("visibleMin"),K=Z.length,Q=K,ee=K-1;ee>=0;ee--){var te=Z[W==="asc"?K-ee-1:ee].getValue();te/H*G<X&&(Q=ee,H-=te)}return W==="asc"?Z.splice(0,K-Q):Z.splice(Q,K-Q),H}function sort$1(U,G){return G&&U.sort(function(H,W){var Z=G==="asc"?H.getValue()-W.getValue():W.getValue()-H.getValue();return Z===0?G==="asc"?H.dataIndex-W.dataIndex:W.dataIndex-H.dataIndex:Z}),U}function statistic(U,G,H){for(var W=0,Z=0,X=G.length;Z<X;Z++)W+=G[Z].getValue();var K=U.get("visualDimension"),Q;return!G||!G.length?Q=[NaN,NaN]:K==="value"&&H?(Q=[G[G.length-1].getValue(),G[0].getValue()],H==="asc"&&Q.reverse()):(Q=[1/0,-1/0],each$b(G,function(ee){var te=ee.getValue(K);te<Q[0]&&(Q[0]=te),te>Q[1]&&(Q[1]=te)})),{sum:W,dataExtent:Q}}function worst(U,G,H){for(var W=0,Z=1/0,X=0,K=void 0,Q=U.length;X<Q;X++)K=U[X].getLayout().area,K&&(K<Z&&(Z=K),K>W&&(W=K));var ee=U.area*U.area,te=G*G*H;return ee?mathMax$3(te*W/ee,ee/(te*Z)):1/0}function position(U,G,H,W,Z){var X=G===H.width?0:1,K=1-X,Q=["x","y"],ee=["width","height"],te=H[Q[X]],re=G?U.area/G:0;(Z||re>H[ee[K]])&&(re=H[ee[K]]);for(var ae=0,ne=U.length;ae<ne;ae++){var ie=U[ae],oe={},se=re?ie.getLayout().area/re:0,le=oe[ee[K]]=mathMax$3(re-2*W,0),ue=H[Q[X]]+H[ee[X]]-te,ce=ae===ne-1||ue<se?ue:se,fe=oe[ee[X]]=mathMax$3(ce-2*W,0);oe[Q[K]]=H[Q[K]]+mathMin$3(W,le/2),oe[Q[X]]=te+mathMin$3(W,fe/2),te+=ce,ie.setLayout(oe,!0)}H[Q[K]]+=re,H[ee[K]]-=re}function estimateRootSize(U,G,H,W,Z){var X=(G||{}).node,K=[W,Z];if(!X||X===H)return K;for(var Q,ee=W*Z,te=ee*U.option.zoomToNodeRatio;Q=X.parentNode;){for(var re=0,ae=Q.children,ne=0,ie=ae.length;ne<ie;ne++)re+=ae[ne].getValue();var oe=X.getValue();if(oe===0)return K;te*=re/oe;var se=Q.getModel(),le=se.get(PATH_BORDER_WIDTH),ue=Math.max(le,getUpperLabelHeight(se));te+=4*le*le+(3*le+ue)*Math.pow(te,.5),te>MAX_SAFE_INTEGER&&(te=MAX_SAFE_INTEGER),X=Q}te<ee&&(te=ee);var ce=Math.pow(te/ee,.5);return[W*ce,Z*ce]}function calculateRootPosition(U,G,H){if(G)return{x:G.x,y:G.y};var W={x:0,y:0};if(!H)return W;var Z=H.node,X=Z.getLayout();if(!X)return W;for(var K=[X.width/2,X.height/2],Q=Z;Q;){var ee=Q.getLayout();K[0]+=ee.x,K[1]+=ee.y,Q=Q.parentNode}return{x:U.width/2-K[0],y:U.height/2-K[1]}}function prunning(U,G,H,W,Z){var X=U.getLayout(),K=H[Z],Q=K&&K===U;if(!(K&&!Q||Z===H.length&&U!==W)){U.setLayout({isInView:!0,invisible:!Q&&!G.intersect(X),isAboveViewRoot:Q},!0);var ee=new BoundingRect(G.x-X.x,G.y-X.y,G.width,G.height);each$b(U.viewChildren||[],function(te){prunning(te,ee,H,W,Z+1)})}}function getUpperLabelHeight(U){return U.get(PATH_UPPER_LABEL_SHOW)?U.get(PATH_UPPER_LABEL_HEIGHT):0}function install$K(U){U.registerSeriesModel(TreemapSeriesModel),U.registerChartView(TreemapView),U.registerVisual(treemapVisual),U.registerLayout(treemapLayout),installTreemapAction(U)}function categoryFilter(U){var G=U.findComponents({mainType:"legend"});!G||!G.length||U.eachSeriesByType("graph",function(H){var W=H.getCategoriesData(),Z=H.getGraph(),X=Z.data,K=W.mapArray(W.getName);X.filterSelf(function(Q){var ee=X.getItemModel(Q),te=ee.getShallow("category");if(te!=null){isNumber(te)&&(te=K[te]);for(var re=0;re<G.length;re++)if(!G[re].isSelected(te))return!1}return!0})})}function categoryVisual(U){var G={};U.eachSeriesByType("graph",function(H){var W=H.getCategoriesData(),Z=H.getData(),X={};W.each(function(K){var Q=W.getName(K);X["ec-"+Q]=K;var ee=W.getItemModel(K),te=ee.getModel("itemStyle").getItemStyle();te.fill||(te.fill=H.getColorFromPalette(Q,G)),W.setItemVisual(K,"style",te);for(var re=["symbol","symbolSize","symbolKeepAspect"],ae=0;ae<re.length;ae++){var ne=ee.getShallow(re[ae],!0);ne!=null&&W.setItemVisual(K,re[ae],ne)}}),W.count()&&Z.each(function(K){var Q=Z.getItemModel(K),ee=Q.getShallow("category");if(ee!=null){isString(ee)&&(ee=X["ec-"+ee]);var te=W.getItemVisual(ee,"style"),re=Z.ensureUniqueItemVisual(K,"style");extend(re,te);for(var ae=["symbol","symbolSize","symbolKeepAspect"],ne=0;ne<ae.length;ne++)Z.setItemVisual(K,ae[ne],W.getItemVisual(ee,ae[ne]))}})})}function normalize$1(U){return U instanceof Array||(U=[U,U]),U}function graphEdgeVisual(U){U.eachSeriesByType("graph",function(G){var H=G.getGraph(),W=G.getEdgeData(),Z=normalize$1(G.get("edgeSymbol")),X=normalize$1(G.get("edgeSymbolSize"));W.setVisual("fromSymbol",Z&&Z[0]),W.setVisual("toSymbol",Z&&Z[1]),W.setVisual("fromSymbolSize",X&&X[0]),W.setVisual("toSymbolSize",X&&X[1]),W.setVisual("style",G.getModel("lineStyle").getLineStyle()),W.each(function(K){var Q=W.getItemModel(K),ee=H.getEdgeByIndex(K),te=normalize$1(Q.getShallow("symbol",!0)),re=normalize$1(Q.getShallow("symbolSize",!0)),ae=Q.getModel("lineStyle").getLineStyle(),ne=W.ensureUniqueItemVisual(K,"style");switch(extend(ne,ae),ne.stroke){case"source":{var ie=ee.node1.getVisual("style");ne.stroke=ie&&ie.fill;break}case"target":{var ie=ee.node2.getVisual("style");ne.stroke=ie&&ie.fill;break}}te[0]&&ee.setVisual("fromSymbol",te[0]),te[1]&&ee.setVisual("toSymbol",te[1]),re[0]&&ee.setVisual("fromSymbolSize",re[0]),re[1]&&ee.setVisual("toSymbolSize",re[1])})})}var KEY_DELIMITER="-->",getAutoCurvenessParams=function(U){return U.get("autoCurveness")||null},createCurveness=function(U,G){var H=getAutoCurvenessParams(U),W=20,Z=[];if(isNumber(H))W=H;else if(isArray$1(H)){U.__curvenessList=H;return}G>W&&(W=G);var X=W%2?W+2:W+3;Z=[];for(var K=0;K<X;K++)Z.push((K%2?K+1:K)/10*(K%2?-1:1));U.__curvenessList=Z},getKeyOfEdges=function(U,G,H){var W=[U.id,U.dataIndex].join("."),Z=[G.id,G.dataIndex].join(".");return[H.uid,W,Z].join(KEY_DELIMITER)},getOppositeKey=function(U){var G=U.split(KEY_DELIMITER);return[G[0],G[2],G[1]].join(KEY_DELIMITER)},getEdgeFromMap=function(U,G){var H=getKeyOfEdges(U.node1,U.node2,G);return G.__edgeMap[H]},getTotalLengthBetweenNodes=function(U,G){var H=getEdgeMapLengthWithKey(getKeyOfEdges(U.node1,U.node2,G),G),W=getEdgeMapLengthWithKey(getKeyOfEdges(U.node2,U.node1,G),G);return H+W},getEdgeMapLengthWithKey=function(U,G){var H=G.__edgeMap;return H[U]?H[U].length:0};function initCurvenessList(U){getAutoCurvenessParams(U)&&(U.__curvenessList=[],U.__edgeMap={},createCurveness(U))}function createEdgeMapForCurveness(U,G,H,W){if(getAutoCurvenessParams(H)){var Z=getKeyOfEdges(U,G,H),X=H.__edgeMap,K=X[getOppositeKey(Z)];X[Z]&&!K?X[Z].isForward=!0:K&&X[Z]&&(K.isForward=!0,X[Z].isForward=!1),X[Z]=X[Z]||[],X[Z].push(W)}}function getCurvenessForEdge(U,G,H,W){var Z=getAutoCurvenessParams(G),X=isArray$1(Z);if(!Z)return null;var K=getEdgeFromMap(U,G);if(!K)return null;for(var Q=-1,ee=0;ee<K.length;ee++)if(K[ee]===H){Q=ee;break}var te=getTotalLengthBetweenNodes(U,G);createCurveness(G,te),U.lineStyle=U.lineStyle||{};var re=getKeyOfEdges(U.node1,U.node2,G),ae=G.__curvenessList,ne=X||te%2?0:1;if(K.isForward)return ae[ne+Q];var ie=getOppositeKey(re),oe=getEdgeMapLengthWithKey(ie,G),se=ae[Q+oe+ne];return W?X?Z&&Z[0]===0?(oe+ne)%2?se:-se:((oe%2?0:1)+ne)%2?se:-se:(oe+ne)%2?se:-se:ae[Q+oe+ne]}function simpleLayout(U){var G=U.coordinateSystem;if(!(G&&G.type!=="view")){var H=U.getGraph();H.eachNode(function(W){var Z=W.getModel();W.setLayout([+Z.get("x"),+Z.get("y")])}),simpleLayoutEdge(H,U)}}function simpleLayoutEdge(U,G){U.eachEdge(function(H,W){var Z=retrieve3(H.getModel().get(["lineStyle","curveness"]),-getCurvenessForEdge(H,G,W,!0),0),X=clone$3(H.node1.getLayout()),K=clone$3(H.node2.getLayout()),Q=[X,K];+Z&&Q.push([(X[0]+K[0])/2-(X[1]-K[1])*Z,(X[1]+K[1])/2-(K[0]-X[0])*Z]),H.setLayout(Q)})}function graphSimpleLayout(U,G){U.eachSeriesByType("graph",function(H){var W=H.get("layout"),Z=H.coordinateSystem;if(Z&&Z.type!=="view"){var X=H.getData(),K=[];each$f(Z.dimensions,function(ne){K=K.concat(X.mapDimensionsAll(ne))});for(var Q=0;Q<X.count();Q++){for(var ee=[],te=!1,re=0;re<K.length;re++){var ae=X.get(K[re],Q);isNaN(ae)||(te=!0),ee.push(ae)}te?X.setItemLayout(Q,Z.dataToPoint(ee)):X.setItemLayout(Q,[NaN,NaN])}simpleLayoutEdge(X.graph,H)}else(!W||W==="none")&&simpleLayout(H)})}function getNodeGlobalScale(U){var G=U.coordinateSystem;if(G.type!=="view")return 1;var H=U.option.nodeScaleRatio,W=G.scaleX,Z=G.getZoom(),X=(Z-1)*H+1;return X/W}function getSymbolSize(U){var G=U.getVisual("symbolSize");return G instanceof Array&&(G=(G[0]+G[1])/2),+G}var PI$2=Math.PI,_symbolRadiansHalf=[];function circularLayout(U,G,H,W){var Z=U.coordinateSystem;if(!(Z&&Z.type!=="view")){var X=Z.getBoundingRect(),K=U.getData(),Q=K.graph,ee=X.width/2+X.x,te=X.height/2+X.y,re=Math.min(X.width,X.height)/2,ae=K.count();if(K.setLayout({cx:ee,cy:te}),!!ae){if(H){var ne=Z.pointToData(W),ie=ne[0],oe=ne[1],se=[ie-ee,oe-te];normalize$3(se,se),scale$2(se,se,re),H.setLayout([ee+se[0],te+se[1]],!0);var le=U.get(["circular","rotateLabel"]);rotateNodeLabel(H,le,ee,te)}_layoutNodesBasedOn[G](U,Q,K,re,ee,te,ae),Q.eachEdge(function(ue,ce){var fe=retrieve3(ue.getModel().get(["lineStyle","curveness"]),getCurvenessForEdge(ue,U,ce),0),he=clone$3(ue.node1.getLayout()),ve=clone$3(ue.node2.getLayout()),de,pe=(he[0]+ve[0])/2,ge=(he[1]+ve[1])/2;+fe&&(fe*=3,de=[ee*fe+pe*(1-fe),te*fe+ge*(1-fe)]),ue.setLayout([he,ve,de])})}}}var _layoutNodesBasedOn={value:function(U,G,H,W,Z,X,K){var Q=0,ee=H.getSum("value"),te=Math.PI*2/(ee||K);G.eachNode(function(re){var ae=re.getValue("value"),ne=te*(ee?ae:1)/2;Q+=ne,re.setLayout([W*Math.cos(Q)+Z,W*Math.sin(Q)+X]),Q+=ne})},symbolSize:function(U,G,H,W,Z,X,K){var Q=0;_symbolRadiansHalf.length=K;var ee=getNodeGlobalScale(U);G.eachNode(function(ae){var ne=getSymbolSize(ae);isNaN(ne)&&(ne=2),ne<0&&(ne=0),ne*=ee;var ie=Math.asin(ne/2/W);isNaN(ie)&&(ie=PI$2/2),_symbolRadiansHalf[ae.dataIndex]=ie,Q+=ie*2});var te=(2*PI$2-Q)/K/2,re=0;G.eachNode(function(ae){var ne=te+_symbolRadiansHalf[ae.dataIndex];re+=ne,(!ae.getLayout()||!ae.getLayout().fixed)&&ae.setLayout([W*Math.cos(re)+Z,W*Math.sin(re)+X]),re+=ne})}};function rotateNodeLabel(U,G,H,W){var Z=U.getGraphicEl();if(Z){var X=U.getModel(),K=X.get(["label","rotate"])||0,Q=Z.getSymbolPath();if(G){var ee=U.getLayout(),te=Math.atan2(ee[1]-W,ee[0]-H);te<0&&(te=Math.PI*2+te);var re=ee[0]<H;re&&(te=te-Math.PI);var ae=re?"left":"right";Q.setTextConfig({rotation:-te,position:ae,origin:"center"});var ne=Q.ensureState("emphasis");extend(ne.textConfig||(ne.textConfig={}),{position:ae})}else Q.setTextConfig({rotation:K*=Math.PI/180})}}function graphCircularLayout(U){U.eachSeriesByType("graph",function(G){G.get("layout")==="circular"&&circularLayout(G,"symbolSize")})}var scaleAndAdd=scaleAndAdd$1;function forceLayout(U,G,H){for(var W=U,Z=G,X=H.rect,K=X.width,Q=X.height,ee=[X.x+K/2,X.y+Q/2],te=H.gravity==null?.1:H.gravity,re=0;re<W.length;re++){var ae=W[re];ae.p||(ae.p=create$2(K*(Math.random()-.5)+ee[0],Q*(Math.random()-.5)+ee[1])),ae.pp=clone$3(ae.p),ae.edges=null}var ne=H.friction==null?.6:H.friction,ie=ne,oe,se;return{warmUp:function(){ie=ne*.8},setFixed:function(le){W[le].fixed=!0},setUnfixed:function(le){W[le].fixed=!1},beforeStep:function(le){oe=le},afterStep:function(le){se=le},step:function(le){oe&&oe(W,Z);for(var ue=[],ce=W.length,fe=0;fe<Z.length;fe++){var he=Z[fe];if(!he.ignoreForceLayout){var ve=he.n1,de=he.n2;sub(ue,de.p,ve.p);var pe=len(ue)-he.d,ge=de.w/(ve.w+de.w);isNaN(ge)&&(ge=0),normalize$3(ue,ue),!ve.fixed&&scaleAndAdd(ve.p,ve.p,ue,ge*pe*ie),!de.fixed&&scaleAndAdd(de.p,de.p,ue,-(1-ge)*pe*ie)}}for(var fe=0;fe<ce;fe++){var me=W[fe];me.fixed||(sub(ue,ee,me.p),scaleAndAdd(me.p,me.p,ue,te*ie))}for(var fe=0;fe<ce;fe++)for(var ve=W[fe],ye=fe+1;ye<ce;ye++){var de=W[ye];sub(ue,de.p,ve.p);var pe=len(ue);pe===0&&(set$1(ue,Math.random()-.5,Math.random()-.5),pe=1);var _e=(ve.rep+de.rep)/pe/pe;!ve.fixed&&scaleAndAdd(ve.pp,ve.pp,ue,_e),!de.fixed&&scaleAndAdd(de.pp,de.pp,ue,-_e)}for(var xe=[],fe=0;fe<ce;fe++){var me=W[fe];me.fixed||(sub(xe,me.p,me.pp),scaleAndAdd(me.p,me.p,xe,ie),copy$1(me.pp,me.p))}ie=ie*.992;var Se=ie<.01;se&&se(W,Z,Se),le&&le(Se)}}}function graphForceLayout(U){U.eachSeriesByType("graph",function(G){var H=G.coordinateSystem;if(!(H&&H.type!=="view"))if(G.get("layout")==="force"){var W=G.preservedPoints||{},Z=G.getGraph(),X=Z.data,K=Z.edgeData,Q=G.getModel("force"),ee=Q.get("initLayout");G.preservedPoints?X.each(function(fe){var he=X.getId(fe);X.setItemLayout(fe,W[he]||[NaN,NaN])}):!ee||ee==="none"?simpleLayout(G):ee==="circular"&&circularLayout(G,"value");var te=X.getDataExtent("value"),re=K.getDataExtent("value"),ae=Q.get("repulsion"),ne=Q.get("edgeLength"),ie=isArray$1(ae)?ae:[ae,ae],oe=isArray$1(ne)?ne:[ne,ne];oe=[oe[1],oe[0]];var se=X.mapArray("value",function(fe,he){var ve=X.getItemLayout(he),de=linearMap$2(fe,te,ie);return isNaN(de)&&(de=(ie[0]+ie[1])/2),{w:de,rep:de,fixed:X.getItemModel(he).get("fixed"),p:!ve||isNaN(ve[0])||isNaN(ve[1])?null:ve}}),le=K.mapArray("value",function(fe,he){var ve=Z.getEdgeByIndex(he),de=linearMap$2(fe,re,oe);isNaN(de)&&(de=(oe[0]+oe[1])/2);var pe=ve.getModel(),ge=retrieve3(ve.getModel().get(["lineStyle","curveness"]),-getCurvenessForEdge(ve,G,he,!0),0);return{n1:se[ve.node1.dataIndex],n2:se[ve.node2.dataIndex],d:de,curveness:ge,ignoreForceLayout:pe.get("ignoreForceLayout")}}),ue=H.getBoundingRect(),ce=forceLayout(se,le,{rect:ue,gravity:Q.get("gravity"),friction:Q.get("friction")});ce.beforeStep(function(fe,he){for(var ve=0,de=fe.length;ve<de;ve++)fe[ve].fixed&©$1(fe[ve].p,Z.getNodeByIndex(ve).getLayout())}),ce.afterStep(function(fe,he,ve){for(var de=0,pe=fe.length;de<pe;de++)fe[de].fixed||Z.getNodeByIndex(de).setLayout(fe[de].p),W[X.getId(de)]=fe[de].p;for(var de=0,pe=he.length;de<pe;de++){var ge=he[de],me=Z.getEdgeByIndex(de),ye=ge.n1.p,_e=ge.n2.p,xe=me.getLayout();xe=xe?xe.slice():[],xe[0]=xe[0]||[],xe[1]=xe[1]||[],copy$1(xe[0],ye),copy$1(xe[1],_e),+ge.curveness&&(xe[2]=[(ye[0]+_e[0])/2-(ye[1]-_e[1])*ge.curveness,(ye[1]+_e[1])/2-(_e[0]-ye[0])*ge.curveness]),me.setLayout(xe)}}),G.forceLayout=ce,G.preservedPoints=W,ce.step()}else G.forceLayout=null})}function getViewRect$1(U,G,H){var W=createBoxLayoutReference(U,G),Z=extend(U.getBoxLayoutParams(),{aspect:H}),X=getLayoutRect(Z,W.refContainer);return applyPreserveAspect(U,X,H)}function createViewCoordSys(U,G){var H=[];return U.eachSeriesByType("graph",function(W){injectCoordSysByOption({targetModel:W,coordSysType:"view",coordSysProvider:Z,isDefaultDataCoordSys:!0});function Z(){var X=W.getData(),K=X.mapArray(function(oe){var se=X.getItemModel(oe);return[+se.get("x"),+se.get("y")]}),Q=[],ee=[];fromPoints(K,Q,ee),ee[0]-Q[0]===0&&(ee[0]+=1,Q[0]-=1),ee[1]-Q[1]===0&&(ee[1]+=1,Q[1]-=1);var te=(ee[0]-Q[0])/(ee[1]-Q[1]),re=getViewRect$1(W,G,te);isNaN(te)&&(Q=[re.x,re.y],ee=[re.x+re.width,re.y+re.height]);var ae=ee[0]-Q[0],ne=ee[1]-Q[1],ie=new View(null,{api:G,ecModel:U});return ie.zoomLimit=W.get("scaleLimit"),ie.setBoundingRect(Q[0],Q[1],ae,ne),ie.setViewRect(re.x,re.y,re.width,re.height),ie.setCenter(W.get("center")),ie.setZoom(W.get("zoom")),H.push(ie),ie}}),H}var straightLineProto=Line$1.prototype,bezierCurveProto=BezierCurve.prototype,StraightLineShape=(function(){function U(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return U})();(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G})(StraightLineShape);function isStraightLine(U){return isNaN(+U.cpx1)||isNaN(+U.cpy1)}var ECLinePath=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="ec-line",W}return G.prototype.getDefaultStyle=function(){return{stroke:tokens.color.neutral99,fill:null}},G.prototype.getDefaultShape=function(){return new StraightLineShape},G.prototype.buildPath=function(H,W){isStraightLine(W)?straightLineProto.buildPath.call(this,H,W):bezierCurveProto.buildPath.call(this,H,W)},G.prototype.pointAt=function(H){return isStraightLine(this.shape)?straightLineProto.pointAt.call(this,H):bezierCurveProto.pointAt.call(this,H)},G.prototype.tangentAt=function(H){var W=this.shape,Z=isStraightLine(W)?[W.x2-W.x1,W.y2-W.y1]:bezierCurveProto.tangentAt.call(this,H);return normalize$3(Z,Z)},G})(Path),SYMBOL_CATEGORIES=["fromSymbol","toSymbol"];function makeSymbolTypeKey(U){return"_"+U+"Type"}function makeSymbolTypeValue(U,G,H){var W=G.getItemVisual(H,U);if(!W||W==="none")return W;var Z=G.getItemVisual(H,U+"Size"),X=G.getItemVisual(H,U+"Rotate"),K=G.getItemVisual(H,U+"Offset"),Q=G.getItemVisual(H,U+"KeepAspect"),ee=normalizeSymbolSize(Z),te=normalizeSymbolOffset(K||0,ee);return W+ee+te+(X||"")+(Q||"")}function createSymbol(U,G,H){var W=G.getItemVisual(H,U);if(!(!W||W==="none")){var Z=G.getItemVisual(H,U+"Size"),X=G.getItemVisual(H,U+"Rotate"),K=G.getItemVisual(H,U+"Offset"),Q=G.getItemVisual(H,U+"KeepAspect"),ee=normalizeSymbolSize(Z),te=normalizeSymbolOffset(K||0,ee),re=createSymbol$1(W,-ee[0]/2+te[0],-ee[1]/2+te[1],ee[0],ee[1],null,Q);return re.__specifiedRotation=X==null||isNaN(X)?void 0:+X*Math.PI/180||0,re.name=U,re}}function createLine(U){var G=new ECLinePath({name:"line",subPixelOptimize:!0});return setLinePoints(G.shape,U),G}function setLinePoints(U,G){U.x1=G[0][0],U.y1=G[0][1],U.x2=G[1][0],U.y2=G[1][1],U.percent=1;var H=G[2];H?(U.cpx1=H[0],U.cpy1=H[1]):(U.cpx1=NaN,U.cpy1=NaN)}var Line=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this)||this;return X._createLine(H,W,Z),X}return G.prototype._createLine=function(H,W,Z){var X=H.hostModel,K=H.getItemLayout(W),Q=H.getItemVisual(W,"z2"),ee=createLine(K);ee.shape.percent=0,initProps(ee,{z2:retrieve2(Q,0),shape:{percent:1}},X,W),this.add(ee),each$f(SYMBOL_CATEGORIES,function(te){var re=createSymbol(te,H,W);this.add(re),this[makeSymbolTypeKey(te)]=makeSymbolTypeValue(te,H,W)},this),this._updateCommonStl(H,W,Z)},G.prototype.updateData=function(H,W,Z){var X=H.hostModel,K=this.childOfName("line"),Q=H.getItemLayout(W),ee={shape:{}};setLinePoints(ee.shape,Q),updateProps$1(K,ee,X,W),each$f(SYMBOL_CATEGORIES,function(te){var re=makeSymbolTypeValue(te,H,W),ae=makeSymbolTypeKey(te);if(this[ae]!==re){this.remove(this.childOfName(te));var ne=createSymbol(te,H,W);this.add(ne)}this[ae]=re},this),this._updateCommonStl(H,W,Z)},G.prototype.getLinePath=function(){return this.childAt(0)},G.prototype._updateCommonStl=function(H,W,Z){var X=H.hostModel,K=this.childOfName("line"),Q=Z&&Z.emphasisLineStyle,ee=Z&&Z.blurLineStyle,te=Z&&Z.selectLineStyle,re=Z&&Z.labelStatesModels,ae=Z&&Z.emphasisDisabled,ne=Z&&Z.focus,ie=Z&&Z.blurScope;if(!Z||H.hasItemOption){var oe=H.getItemModel(W),se=oe.getModel("emphasis");Q=se.getModel("lineStyle").getLineStyle(),ee=oe.getModel(["blur","lineStyle"]).getLineStyle(),te=oe.getModel(["select","lineStyle"]).getLineStyle(),ae=se.get("disabled"),ne=se.get("focus"),ie=se.get("blurScope"),re=getLabelStatesModels(oe)}var le=H.getItemVisual(W,"style"),ue=le.stroke;K.useStyle(le),K.style.fill=null,K.style.strokeNoScale=!0,K.ensureState("emphasis").style=Q,K.ensureState("blur").style=ee,K.ensureState("select").style=te,each$f(SYMBOL_CATEGORIES,function(de){var pe=this.childOfName(de);if(pe){pe.setColor(ue),pe.style.opacity=le.opacity;for(var ge=0;ge<SPECIAL_STATES.length;ge++){var me=SPECIAL_STATES[ge],ye=K.getState(me);if(ye){var _e=ye.style||{},xe=pe.ensureState(me),Se=xe.style||(xe.style={});_e.stroke!=null&&(Se[pe.__isEmptyBrush?"stroke":"fill"]=_e.stroke),_e.opacity!=null&&(Se.opacity=_e.opacity)}}pe.markRedraw()}},this);var ce=X.getRawValue(W);setLabelStyle(this,re,{labelDataIndex:W,labelFetcher:{getFormattedLabel:function(de,pe){return X.getFormattedLabel(de,pe,H.dataType)}},inheritColor:ue||tokens.color.neutral99,defaultOpacity:le.opacity,defaultText:(ce==null?H.getName(W):isFinite(ce)?round$4(ce):ce)+""});var fe=this.getTextContent();if(fe){var he=re.normal;fe.__align=fe.style.align,fe.__verticalAlign=fe.style.verticalAlign,fe.__position=he.get("position")||"middle";var ve=he.get("distance");isArray$1(ve)||(ve=[ve,ve]),fe.__labelDistance=ve}this.setTextConfig({position:null,local:!0,inside:!1}),toggleHoverEmphasis(this,ne,ie,ae)},G.prototype.highlight=function(){enterEmphasis(this)},G.prototype.downplay=function(){leaveEmphasis(this)},G.prototype.updateLayout=function(H,W){this.setLinePoints(H.getItemLayout(W))},G.prototype.setLinePoints=function(H){var W=this.childOfName("line");setLinePoints(W.shape,H),W.dirty()},G.prototype.beforeUpdate=function(){var H=this,W=H.childOfName("fromSymbol"),Z=H.childOfName("toSymbol"),X=H.getTextContent();if(!W&&!Z&&(!X||X.ignore))return;for(var K=1,Q=this.parent;Q;)Q.scaleX&&(K/=Q.scaleX),Q=Q.parent;var ee=H.childOfName("line");if(!this.__dirty&&!ee.__dirty)return;var te=ee.shape.percent,re=ee.pointAt(0),ae=ee.pointAt(te),ne=sub([],ae,re);normalize$3(ne,ne);function ie(ye,_e){var xe=ye.__specifiedRotation;if(xe==null){var Se=ee.tangentAt(_e);ye.attr("rotation",(_e===1?-1:1)*Math.PI/2-Math.atan2(Se[1],Se[0]))}else ye.attr("rotation",xe)}if(W&&(W.setPosition(re),ie(W,0),W.scaleX=W.scaleY=K*te,W.markRedraw()),Z&&(Z.setPosition(ae),ie(Z,1),Z.scaleX=Z.scaleY=K*te,Z.markRedraw()),X&&!X.ignore){X.x=X.y=0,X.originX=X.originY=0;var oe=void 0,se=void 0,le=X.__labelDistance,ue=le[0]*K,ce=le[1]*K,fe=te/2,he=ee.tangentAt(fe),ve=[he[1],-he[0]],de=ee.pointAt(fe);ve[1]>0&&(ve[0]=-ve[0],ve[1]=-ve[1]);var pe=he[0]<0?-1:1;if(X.__position!=="start"&&X.__position!=="end"){var ge=-Math.atan2(he[1],he[0]);ae[0]<re[0]&&(ge=Math.PI+ge),X.rotation=ge}var me=void 0;switch(X.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":me=-ce,se="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":me=ce,se="top";break;default:me=0,se="middle"}switch(X.__position){case"end":X.x=ne[0]*ue+ae[0],X.y=ne[1]*ce+ae[1],oe=ne[0]>.8?"left":ne[0]<-.8?"right":"center",se=ne[1]>.8?"top":ne[1]<-.8?"bottom":"middle";break;case"start":X.x=-ne[0]*ue+re[0],X.y=-ne[1]*ce+re[1],oe=ne[0]>.8?"right":ne[0]<-.8?"left":"center",se=ne[1]>.8?"bottom":ne[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":X.x=ue*pe+re[0],X.y=re[1]+me,oe=he[0]<0?"right":"left",X.originX=-ue*pe,X.originY=-me;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":X.x=de[0],X.y=de[1]+me,oe="center",X.originY=-me;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":X.x=-ue*pe+ae[0],X.y=ae[1]+me,oe=he[0]>=0?"right":"left",X.originX=ue*pe,X.originY=-me;break}X.scaleX=X.scaleY=K,X.setStyle({verticalAlign:X.__verticalAlign||se,align:X.__align||oe})}},G})(Group$3),LineDraw=(function(){function U(G){this.group=new Group$3,this._LineCtor=G||Line}return U.prototype.updateData=function(G){var H=this;this._progressiveEls=null;var W=this,Z=W.group,X=W._lineData;W._lineData=G,X||Z.removeAll();var K=makeSeriesScope$1(G);G.diff(X).add(function(Q){H._doAdd(G,Q,K)}).update(function(Q,ee){H._doUpdate(X,G,ee,Q,K)}).remove(function(Q){Z.remove(X.getItemGraphicEl(Q))}).execute()},U.prototype.updateLayout=function(){var G=this._lineData;G&&G.eachItemGraphicEl(function(H,W){H.updateLayout(G,W)},this)},U.prototype.incrementalPrepareUpdate=function(G){this._seriesScope=makeSeriesScope$1(G),this._lineData=null,this.group.removeAll()},U.prototype.incrementalUpdate=function(G,H){this._progressiveEls=[];function W(Q){!Q.isGroup&&!isEffectObject(Q)&&(Q.incremental=!0,Q.ensureState("emphasis").hoverLayer=!0)}for(var Z=G.start;Z<G.end;Z++){var X=H.getItemLayout(Z);if(lineNeedsDraw(X)){var K=new this._LineCtor(H,Z,this._seriesScope);K.traverse(W),this.group.add(K),H.setItemGraphicEl(Z,K),this._progressiveEls.push(K)}}},U.prototype.remove=function(){this.group.removeAll()},U.prototype.eachRendered=function(G){traverseElements(this._progressiveEls||this.group,G)},U.prototype._doAdd=function(G,H,W){var Z=G.getItemLayout(H);if(lineNeedsDraw(Z)){var X=new this._LineCtor(G,H,W);G.setItemGraphicEl(H,X),this.group.add(X)}},U.prototype._doUpdate=function(G,H,W,Z,X){var K=G.getItemGraphicEl(W);if(!lineNeedsDraw(H.getItemLayout(Z))){this.group.remove(K);return}K?K.updateData(H,Z,X):K=new this._LineCtor(H,Z,X),H.setItemGraphicEl(Z,K),this.group.add(K)},U})();function isEffectObject(U){return U.animators&&U.animators.length>0}function makeSeriesScope$1(U){var G=U.hostModel,H=G.getModel("emphasis");return{lineStyle:G.getModel("lineStyle").getLineStyle(),emphasisLineStyle:H.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:G.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:G.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:H.get("disabled"),blurScope:H.get("blurScope"),focus:H.get("focus"),labelStatesModels:getLabelStatesModels(G)}}function isPointNaN(U){return isNaN(U[0])||isNaN(U[1])}function lineNeedsDraw(U){return U&&!isPointNaN(U[0])&&!isPointNaN(U[1])}var v1=[],v2=[],v3=[],quadraticAt=quadraticAt$1,v2DistSquare=distSquare,mathAbs=Math.abs;function intersectCurveCircle(U,G,H){for(var W=U[0],Z=U[1],X=U[2],K=1/0,Q,ee=H*H,te=.1,re=.1;re<=.9;re+=.1){v1[0]=quadraticAt(W[0],Z[0],X[0],re),v1[1]=quadraticAt(W[1],Z[1],X[1],re);var ae=mathAbs(v2DistSquare(v1,G)-ee);ae<K&&(K=ae,Q=re)}for(var ne=0;ne<32;ne++){var ie=Q+te;v2[0]=quadraticAt(W[0],Z[0],X[0],Q),v2[1]=quadraticAt(W[1],Z[1],X[1],Q),v3[0]=quadraticAt(W[0],Z[0],X[0],ie),v3[1]=quadraticAt(W[1],Z[1],X[1],ie);var ae=v2DistSquare(v2,G)-ee;if(mathAbs(ae)<.01)break;var oe=v2DistSquare(v3,G)-ee;te/=2,ae<0?oe>=0?Q=Q+te:Q=Q-te:oe>=0?Q=Q-te:Q=Q+te}return Q}function adjustEdge(U,G){var H=[],W=quadraticSubdivide,Z=[[],[],[]],X=[[],[]],K=[];G/=2,U.eachEdge(function(Q,ee){var te=Q.getLayout(),re=Q.getVisual("fromSymbol"),ae=Q.getVisual("toSymbol");te.__original||(te.__original=[clone$3(te[0]),clone$3(te[1])],te[2]&&te.__original.push(clone$3(te[2])));var ne=te.__original;if(te[2]!=null){if(copy$1(Z[0],ne[0]),copy$1(Z[1],ne[2]),copy$1(Z[2],ne[1]),re&&re!=="none"){var ie=getSymbolSize(Q.node1),oe=intersectCurveCircle(Z,ne[0],ie*G);W(Z[0][0],Z[1][0],Z[2][0],oe,H),Z[0][0]=H[3],Z[1][0]=H[4],W(Z[0][1],Z[1][1],Z[2][1],oe,H),Z[0][1]=H[3],Z[1][1]=H[4]}if(ae&&ae!=="none"){var ie=getSymbolSize(Q.node2),oe=intersectCurveCircle(Z,ne[1],ie*G);W(Z[0][0],Z[1][0],Z[2][0],oe,H),Z[1][0]=H[1],Z[2][0]=H[2],W(Z[0][1],Z[1][1],Z[2][1],oe,H),Z[1][1]=H[1],Z[2][1]=H[2]}copy$1(te[0],Z[0]),copy$1(te[1],Z[2]),copy$1(te[2],Z[1])}else{if(copy$1(X[0],ne[0]),copy$1(X[1],ne[1]),sub(K,X[1],X[0]),normalize$3(K,K),re&&re!=="none"){var ie=getSymbolSize(Q.node1);scaleAndAdd$1(X[0],X[0],K,ie*G)}if(ae&&ae!=="none"){var ie=getSymbolSize(Q.node2);scaleAndAdd$1(X[1],X[1],K,-ie*G)}copy$1(te[0],X[0]),copy$1(te[1],X[1])}})}var inner$c=makeInner();function getThumbnailBridge(U){if(U)return inner$c(U).bridge}function injectThumbnailBridge(U,G){U&&(inner$c(U).bridge=G)}function isViewCoordSys(U){return U.type==="view"}var GraphView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H,W){var Z=new SymbolDraw,X=new LineDraw,K=this.group,Q=new Group$3;this._controller=new RoamController(W.getZr()),this._controllerHost={target:Q},Q.add(Z.group),Q.add(X.group),K.add(Q),this._symbolDraw=Z,this._lineDraw=X,this._mainGroup=Q,this._firstRender=!0},G.prototype.render=function(H,W,Z){var X=this,K=H.coordinateSystem,Q=!1;this._model=H,this._api=Z,this._active=!0;var ee=this._getThumbnailInfo();ee&&ee.bridge.reset(Z);var te=this._symbolDraw,re=this._lineDraw;if(isViewCoordSys(K)){var ae={x:K.x,y:K.y,scaleX:K.scaleX,scaleY:K.scaleY};this._firstRender?this._mainGroup.attr(ae):updateProps$1(this._mainGroup,ae,H)}adjustEdge(H.getGraph(),getNodeGlobalScale(H));var ne=H.getData();te.updateData(ne);var ie=H.getEdgeData();re.updateData(ie),this._updateNodeAndLinkScale(),this._updateController(null,H,Z),clearTimeout(this._layoutTimeout);var oe=H.forceLayout,se=H.get(["force","layoutAnimation"]);oe&&(Q=!0,this._startForceLayoutIteration(oe,Z,se));var le=H.get("layout");ne.graph.eachNode(function(he){var ve=he.dataIndex,de=he.getGraphicEl(),pe=he.getModel();if(de){de.off("drag").off("dragend");var ge=pe.get("draggable");ge&&de.on("drag",function(ye){switch(le){case"force":oe.warmUp(),!X._layouting&&X._startForceLayoutIteration(oe,Z,se),oe.setFixed(ve),ne.setItemLayout(ve,[de.x,de.y]);break;case"circular":ne.setItemLayout(ve,[de.x,de.y]),he.setLayout({fixed:!0},!0),circularLayout(H,"symbolSize",he,[ye.offsetX,ye.offsetY]),X.updateLayout(H);break;default:ne.setItemLayout(ve,[de.x,de.y]),simpleLayoutEdge(H.getGraph(),H),X.updateLayout(H);break}}).on("dragend",function(){oe&&oe.setUnfixed(ve)}),de.setDraggable(ge,!!pe.get("cursor"));var me=pe.get(["emphasis","focus"]);me==="adjacency"&&(getECData(de).focus=he.getAdjacentDataIndices())}}),ne.graph.eachEdge(function(he){var ve=he.getGraphicEl(),de=he.getModel().get(["emphasis","focus"]);ve&&de==="adjacency"&&(getECData(ve).focus={edge:[he.dataIndex],node:[he.node1.dataIndex,he.node2.dataIndex]})});var ue=H.get("layout")==="circular"&&H.get(["circular","rotateLabel"]),ce=ne.getLayout("cx"),fe=ne.getLayout("cy");ne.graph.eachNode(function(he){rotateNodeLabel(he,ue,ce,fe)}),this._firstRender=!1,Q||this._renderThumbnail(H,Z,this._symbolDraw,this._lineDraw)},G.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},G.prototype._startForceLayoutIteration=function(H,W,Z){var X=this,K=!1;(function Q(){H.step(function(ee){X.updateLayout(X._model),(ee||!K)&&(K=!0,X._renderThumbnail(X._model,W,X._symbolDraw,X._lineDraw)),(X._layouting=!ee)&&(Z?X._layoutTimeout=setTimeout(Q,16):Q())})})()},G.prototype._updateController=function(H,W,Z){var X=this._controller,K=this._controllerHost,Q=W.coordinateSystem;if(!isViewCoordSys(Q)){X.disable();return}X.enable(W.get("roam"),{api:Z,zInfo:{component:W},triggerInfo:{roamTrigger:W.get("roamTrigger"),isInSelf:function(ee,te,re){return Q.containPoint([te,re])},isInClip:function(ee,te,re){return!H||H.contain(te,re)}}}),K.zoomLimit=W.get("scaleLimit"),K.zoom=Q.getZoom(),X.off("pan").off("zoom").on("pan",function(ee){Z.dispatchAction({seriesId:W.id,type:"graphRoam",dx:ee.dx,dy:ee.dy})}).on("zoom",function(ee){Z.dispatchAction({seriesId:W.id,type:"graphRoam",zoom:ee.scale,originX:ee.originX,originY:ee.originY})})},G.prototype.updateViewOnPan=function(H,W,Z){this._active&&(updateViewOnPan(this._controllerHost,Z.dx,Z.dy),this._updateThumbnailWindow())},G.prototype.updateViewOnZoom=function(H,W,Z){this._active&&(updateViewOnZoom(this._controllerHost,Z.zoom,Z.originX,Z.originY),this._updateNodeAndLinkScale(),adjustEdge(H.getGraph(),getNodeGlobalScale(H)),this._lineDraw.updateLayout(),W.updateLabelLayout(),this._updateThumbnailWindow())},G.prototype._updateNodeAndLinkScale=function(){var H=this._model,W=H.getData(),Z=getNodeGlobalScale(H);W.eachItemGraphicEl(function(X,K){X&&X.setSymbolScale(Z)})},G.prototype.updateLayout=function(H){this._active&&(adjustEdge(H.getGraph(),getNodeGlobalScale(H)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},G.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},G.prototype._getThumbnailInfo=function(){var H=this._model,W=H.coordinateSystem;if(W.type==="view"){var Z=getThumbnailBridge(H);if(Z)return{bridge:Z,coordSys:W}}},G.prototype._updateThumbnailWindow=function(){var H=this._getThumbnailInfo();H&&H.bridge.updateWindow(H.coordSys.transform,this._api)},G.prototype._renderThumbnail=function(H,W,Z,X){var K=this._getThumbnailInfo();if(K){var Q=new Group$3,ee=Z.group.children(),te=X.group.children(),re=new Group$3,ae=new Group$3;Q.add(ae),Q.add(re);for(var ne=0;ne<ee.length;ne++){var ie=ee[ne],oe=ie.children()[0],se=ie.x,le=ie.y,ue=clone$4(oe.shape),ce=extend(ue,{width:oe.scaleX,height:oe.scaleY,x:se-oe.scaleX/2,y:le-oe.scaleY/2}),fe=clone$4(oe.style),he=new oe.constructor({shape:ce,style:fe,z2:151});ae.add(he)}for(var ne=0;ne<te.length;ne++){var ie=te[ne],ve=ie.children()[0],fe=clone$4(ve.style),ce=clone$4(ve.shape),de=new ECLinePath({style:fe,shape:ce,z2:151});re.add(de)}K.bridge.renderContent({api:W,roamType:H.get("roam"),viewportRect:null,group:Q,targetTrans:K.coordSys.transform})}},G.type="graph",G})(ChartView);function generateNodeKey(U){return"_EC_"+U}var Graph=(function(){function U(G){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=G||!1}return U.prototype.isDirected=function(){return this._directed},U.prototype.addNode=function(G,H){G=G==null?""+H:""+G;var W=this._nodesMap;if(W[generateNodeKey(G)]){process.env.NODE_ENV!=="production"&&console.error("Graph nodes have duplicate name or id");return}var Z=new GraphNode(G,H);return Z.hostGraph=this,this.nodes.push(Z),W[generateNodeKey(G)]=Z,Z},U.prototype.getNodeByIndex=function(G){var H=this.data.getRawIndex(G);return this.nodes[H]},U.prototype.getNodeById=function(G){return this._nodesMap[generateNodeKey(G)]},U.prototype.addEdge=function(G,H,W){var Z=this._nodesMap,X=this._edgesMap;if(isNumber(G)&&(G=this.nodes[G]),isNumber(H)&&(H=this.nodes[H]),G instanceof GraphNode||(G=Z[generateNodeKey(G)]),H instanceof GraphNode||(H=Z[generateNodeKey(H)]),!(!G||!H)){var K=G.id+"-"+H.id,Q=new GraphEdge(G,H,W);return Q.hostGraph=this,this._directed&&(G.outEdges.push(Q),H.inEdges.push(Q)),G.edges.push(Q),G!==H&&H.edges.push(Q),this.edges.push(Q),X[K]=Q,Q}},U.prototype.getEdgeByIndex=function(G){var H=this.edgeData.getRawIndex(G);return this.edges[H]},U.prototype.getEdge=function(G,H){G instanceof GraphNode&&(G=G.id),H instanceof GraphNode&&(H=H.id);var W=this._edgesMap;return this._directed?W[G+"-"+H]:W[G+"-"+H]||W[H+"-"+G]},U.prototype.eachNode=function(G,H){for(var W=this.nodes,Z=W.length,X=0;X<Z;X++)W[X].dataIndex>=0&&G.call(H,W[X],X)},U.prototype.eachEdge=function(G,H){for(var W=this.edges,Z=W.length,X=0;X<Z;X++)W[X].dataIndex>=0&&W[X].node1.dataIndex>=0&&W[X].node2.dataIndex>=0&&G.call(H,W[X],X)},U.prototype.breadthFirstTraverse=function(G,H,W,Z){if(H instanceof GraphNode||(H=this._nodesMap[generateNodeKey(H)]),!!H){for(var X=W==="out"?"outEdges":W==="in"?"inEdges":"edges",K=0;K<this.nodes.length;K++)this.nodes[K].__visited=!1;if(!G.call(Z,H,null))for(var Q=[H];Q.length;)for(var ee=Q.shift(),te=ee[X],K=0;K<te.length;K++){var re=te[K],ae=re.node1===ee?re.node2:re.node1;if(!ae.__visited){if(G.call(Z,ae,ee))return;Q.push(ae),ae.__visited=!0}}}},U.prototype.update=function(){for(var G=this.data,H=this.edgeData,W=this.nodes,Z=this.edges,X=0,K=W.length;X<K;X++)W[X].dataIndex=-1;for(var X=0,K=G.count();X<K;X++)W[G.getRawIndex(X)].dataIndex=X;H.filterSelf(function(Q){var ee=Z[H.getRawIndex(Q)];return ee.node1.dataIndex>=0&&ee.node2.dataIndex>=0});for(var X=0,K=Z.length;X<K;X++)Z[X].dataIndex=-1;for(var X=0,K=H.count();X<K;X++)Z[H.getRawIndex(X)].dataIndex=X},U.prototype.clone=function(){for(var G=new U(this._directed),H=this.nodes,W=this.edges,Z=0;Z<H.length;Z++)G.addNode(H[Z].id,H[Z].dataIndex);for(var Z=0;Z<W.length;Z++){var X=W[Z];G.addEdge(X.node1.id,X.node2.id,X.dataIndex)}return G},U})(),GraphNode=(function(){function U(G,H){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=G??"",this.dataIndex=H??-1}return U.prototype.degree=function(){return this.edges.length},U.prototype.inDegree=function(){return this.inEdges.length},U.prototype.outDegree=function(){return this.outEdges.length},U.prototype.getModel=function(G){if(!(this.dataIndex<0)){var H=this.hostGraph,W=H.data.getItemModel(this.dataIndex);return W.getModel(G)}},U.prototype.getAdjacentDataIndices=function(){for(var G={edge:[],node:[]},H=0;H<this.edges.length;H++){var W=this.edges[H];W.dataIndex<0||(G.edge.push(W.dataIndex),G.node.push(W.node1.dataIndex,W.node2.dataIndex))}return G},U.prototype.getTrajectoryDataIndices=function(){for(var G=createHashMap(),H=createHashMap(),W=0,Z=this.edges.length;W<Z;W++){var X=this.edges[W];if(!(X.dataIndex<0)){G.set(X.dataIndex,!0);for(var K=[X.node1],Q=[X.node2],ee=0;ee<K.length;){var te=K[ee];ee++,H.set(te.dataIndex,!0);for(var re=te.inEdges,ae=0,ne=re.length,ie=void 0,oe=void 0;ae<ne;ae++)ie=re[ae],oe=ie.dataIndex,oe>=0&&!G.hasKey(oe)&&(G.set(oe,!0),K.push(ie.node1))}for(ee=0;ee<Q.length;){var se=Q[ee];ee++,H.set(se.dataIndex,!0);for(var le=se.outEdges,ae=0,ue=le.length,ce=void 0,fe=void 0;ae<ue;ae++)ce=le[ae],fe=ce.dataIndex,fe>=0&&!G.hasKey(fe)&&(G.set(fe,!0),Q.push(ce.node2))}}}return{edge:G.keys(),node:H.keys()}},U})(),GraphEdge=(function(){function U(G,H,W){this.dataIndex=-1,this.node1=G,this.node2=H,this.dataIndex=W??-1}return U.prototype.getModel=function(G){if(!(this.dataIndex<0)){var H=this.hostGraph,W=H.edgeData.getItemModel(this.dataIndex);return W.getModel(G)}},U.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},U.prototype.getTrajectoryDataIndices=function(){var G=createHashMap(),H=createHashMap();G.set(this.dataIndex,!0);for(var W=[this.node1],Z=[this.node2],X=0;X<W.length;){var K=W[X];X++,H.set(K.dataIndex,!0);for(var Q=K.inEdges,ee=0,te=Q.length,re=void 0,ae=void 0;ee<te;ee++)re=K.inEdges[ee],ae=re.dataIndex,ae>=0&&!G.hasKey(ae)&&(G.set(ae,!0),W.push(re.node1))}for(X=0;X<Z.length;){var ne=Z[X];X++,H.set(ne.dataIndex,!0);for(var ie=ne.outEdges,ee=0,te=ie.length,oe=void 0,se=void 0;ee<te;ee++)oe=ne.outEdges[ee],se=oe.dataIndex,se>=0&&!G.hasKey(se)&&(G.set(se,!0),Z.push(oe.node2))}return{edge:G.keys(),node:H.keys()}},U})();function createGraphDataProxyMixin(U,G){return{getValue:function(H){var W=this[U][G];return W.getStore().get(W.getDimensionIndex(H||"value"),this.dataIndex)},setVisual:function(H,W){this.dataIndex>=0&&this[U][G].setItemVisual(this.dataIndex,H,W)},getVisual:function(H){return this[U][G].getItemVisual(this.dataIndex,H)},setLayout:function(H,W){this.dataIndex>=0&&this[U][G].setItemLayout(this.dataIndex,H,W)},getLayout:function(){return this[U][G].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[U][G].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[U][G].getRawIndex(this.dataIndex)}}}mixin(GraphNode,createGraphDataProxyMixin("hostGraph","data")),mixin(GraphEdge,createGraphDataProxyMixin("hostGraph","edgeData"));function createGraphFromNodeEdge(U,G,H,W,Z){for(var X=new Graph(W),K=0;K<U.length;K++)X.addNode(retrieve(U[K].id,U[K].name,K),K);for(var Q=[],ee=[],te=0,K=0;K<G.length;K++){var re=G[K],ae=re.source,ne=re.target;X.addEdge(ae,ne,te)&&(ee.push(re),Q.push(retrieve(convertOptionIdName(re.id,null),ae+" > "+ne)),te++)}var ie=H.get("coordinateSystem"),oe;if(ie==="cartesian2d"||ie==="polar"||ie==="matrix")oe=createSeriesData$1(U,H);else{var se=CoordinateSystemManager.get(ie),le=se?se.dimensions||[]:[];indexOf(le,"value")<0&&le.concat(["value"]);var ue=prepareSeriesDataSchema(U,{coordDimensions:le,encodeDefine:H.getEncode()}).dimensions;oe=new SeriesData(ue,H),oe.initData(U)}var ce=new SeriesData(["value"],H);return ce.initData(ee,Q),Z&&Z(oe,ce),linkSeriesData({mainData:oe,struct:X,structAttr:"graph",datas:{node:oe,edge:ce},datasAttr:{node:"data",edge:"edgeData"}}),X.update(),X}var GraphSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.hasSymbolVisual=!0,H}return G.prototype.init=function(H){U.prototype.init.apply(this,arguments);var W=this;function Z(){return W._categoriesData}this.legendVisualProvider=new LegendVisualProvider(Z,Z),this.fillDataTextStyle(H.edges||H.links),this._updateCategoriesData()},G.prototype.mergeOption=function(H){U.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(H.edges||H.links),this._updateCategoriesData()},G.prototype.mergeDefaultAndTheme=function(H){U.prototype.mergeDefaultAndTheme.apply(this,arguments),defaultEmphasis(H,"edgeLabel",["show"])},G.prototype.getInitialData=function(H,W){var Z=H.edges||H.links||[],X=H.data||H.nodes||[],K=this;if(X&&Z){initCurvenessList(this);var Q=createGraphFromNodeEdge(X,Z,this,!0,ee);return each$f(Q.edges,function(te){createEdgeMapForCurveness(te.node1,te.node2,this,te.dataIndex)},this),Q.data}function ee(te,re){te.wrapMethod("getItemModel",function(oe){var se=K._categoriesModels,le=oe.getShallow("category"),ue=se[le];return ue&&(ue.parentModel=oe.parentModel,oe.parentModel=ue),oe});var ae=Model.prototype.getModel;function ne(oe,se){var le=ae.call(this,oe,se);return le.resolveParentPath=ie,le}re.wrapMethod("getItemModel",function(oe){return oe.resolveParentPath=ie,oe.getModel=ne,oe});function ie(oe){if(oe&&(oe[0]==="label"||oe[1]==="label")){var se=oe.slice();return oe[0]==="label"?se[0]="edgeLabel":oe[1]==="label"&&(se[1]="edgeLabel"),se}return oe}}},G.prototype.getGraph=function(){return this.getData().graph},G.prototype.getEdgeData=function(){return this.getGraph().edgeData},G.prototype.getCategoriesData=function(){return this._categoriesData},G.prototype.formatTooltip=function(H,W,Z){if(Z==="edge"){var X=this.getData(),K=this.getDataParams(H,Z),Q=X.graph.getEdgeByIndex(H),ee=X.getName(Q.node1.dataIndex),te=X.getName(Q.node2.dataIndex),re=[];return ee!=null&&re.push(ee),te!=null&&re.push(te),createTooltipMarkup("nameValue",{name:re.join(" > "),value:K.value,noValue:K.value==null})}var ae=defaultSeriesFormatTooltip({series:this,dataIndex:H,multipleSeries:W});return ae},G.prototype._updateCategoriesData=function(){var H=map$1(this.option.categories||[],function(Z){return Z.value!=null?Z:extend({value:0},Z)}),W=new SeriesData(["value"],this);W.initData(H),this._categoriesData=W,this._categoriesModels=W.mapArray(function(Z){return W.getItemModel(Z)})},G.prototype.setZoom=function(H){this.option.zoom=H},G.prototype.setCenter=function(H){this.option.center=H},G.prototype.isAnimationEnabled=function(){return U.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},G.type="series.graph",G.dependencies=["grid","polar","geo","singleAxis","calendar"],G.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:tokens.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:tokens.color.primary}}},G})(SeriesModel);function install$J(U){U.registerChartView(GraphView),U.registerSeriesModel(GraphSeriesModel),U.registerProcessor(categoryFilter),U.registerVisual(categoryVisual),U.registerVisual(graphEdgeVisual),U.registerLayout(graphSimpleLayout),U.registerLayout(U.PRIORITY.VISUAL.POST_CHART_LAYOUT,graphCircularLayout),U.registerLayout(graphForceLayout),U.registerCoordinateSystem("graphView",{dimensions:View.dimensions,create:createViewCoordSys}),U.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},noop),U.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},noop),U.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(G,H,W){H.eachComponent({mainType:"series",query:G},function(Z){var X=W.getViewOfSeriesModel(Z);X&&(G.dx!=null&&G.dy!=null&&X.updateViewOnPan(Z,W,G),G.zoom!=null&&G.originX!=null&&G.originY!=null&&X.updateViewOnZoom(Z,W,G));var K=Z.coordinateSystem,Q=updateCenterAndZoomInAction(K,G,Z.get("scaleLimit"));Z.setCenter&&Z.setCenter(Q.center),Z.setZoom&&Z.setZoom(Q.zoom)})})}var ChordPiece=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this)||this;getECData(X).dataType="node",X.z2=2;var K=new ZRText;return X.setTextContent(K),X.updateData(H,W,Z,!0),X}return G.prototype.updateData=function(H,W,Z,X){var K=this,Q=H.graph.getNodeByIndex(W),ee=H.hostModel,te=Q.getModel(),re=te.getModel("emphasis"),ae=H.getItemLayout(W),ne=extend(getSectorCornerRadius(te.getModel("itemStyle"),ae,!0),ae),ie=this;if(isNaN(ne.startAngle)){ie.setShape(ne);return}X?ie.setShape(ne):updateProps$1(ie,{shape:ne},ee,W);var oe=extend(getSectorCornerRadius(te.getModel("itemStyle"),ae,!0),ae);K.setShape(oe),K.useStyle(H.getItemVisual(W,"style")),setStatesStylesFromModel(K,te),this._updateLabel(ee,te,Q),H.setItemGraphicEl(W,ie),setStatesStylesFromModel(ie,te,"itemStyle");var se=re.get("focus");toggleHoverEmphasis(this,se==="adjacency"?Q.getAdjacentDataIndices():se,re.get("blurScope"),re.get("disabled"))},G.prototype._updateLabel=function(H,W,Z){var X=this.getTextContent(),K=Z.getLayout(),Q=(K.startAngle+K.endAngle)/2,ee=Math.cos(Q),te=Math.sin(Q),re=W.getModel("label");X.ignore=!re.get("show");var ae=getLabelStatesModels(W),ne=Z.getVisual("style");setLabelStyle(X,ae,{labelFetcher:{getFormattedLabel:function(ce,fe,he,ve,de,pe){return H.getFormattedLabel(ce,fe,"node",ve,retrieve3(de,ae.normal&&ae.normal.get("formatter"),W.get("name")),pe)}},labelDataIndex:Z.dataIndex,defaultText:Z.dataIndex+"",inheritColor:ne.fill,defaultOpacity:ne.opacity,defaultOutsidePosition:"startArc"});var ie=re.get("position")||"outside",oe=re.get("distance")||0,se;ie==="outside"?se=K.r+oe:se=(K.r+K.r0)/2,this.textConfig={inside:ie!=="outside"};var le=ie!=="outside"?re.get("align")||"center":ee>0?"left":"right",ue=ie!=="outside"?re.get("verticalAlign")||"middle":te>0?"top":"bottom";X.attr({x:ee*se+K.cx,y:te*se+K.cy,rotation:0,style:{align:le,verticalAlign:ue}})},G})(Sector),ChordEdge=(function(U){__extends(G,U);function G(H,W,Z,X){var K=U.call(this)||this;return getECData(K).dataType="edge",K.updateData(H,W,Z,X,!0),K}return G.prototype.buildPath=function(H,W){H.moveTo(W.s1[0],W.s1[1]);var Z=.7,X=W.clockwise;H.arc(W.cx,W.cy,W.r,W.sStartAngle,W.sEndAngle,!X),H.bezierCurveTo((W.cx-W.s2[0])*Z+W.s2[0],(W.cy-W.s2[1])*Z+W.s2[1],(W.cx-W.t1[0])*Z+W.t1[0],(W.cy-W.t1[1])*Z+W.t1[1],W.t1[0],W.t1[1]),H.arc(W.cx,W.cy,W.r,W.tStartAngle,W.tEndAngle,!X),H.bezierCurveTo((W.cx-W.t2[0])*Z+W.t2[0],(W.cy-W.t2[1])*Z+W.t2[1],(W.cx-W.s1[0])*Z+W.s1[0],(W.cy-W.s1[1])*Z+W.s1[1],W.s1[0],W.s1[1]),H.closePath()},G.prototype.updateData=function(H,W,Z,X,K){var Q=H.hostModel,ee=W.graph.getEdgeByIndex(Z),te=ee.getLayout(),re=ee.node1.getModel(),ae=W.getItemModel(ee.dataIndex),ne=ae.getModel("lineStyle"),ie=ae.getModel("emphasis"),oe=ie.get("focus"),se=extend(getSectorCornerRadius(re.getModel("itemStyle"),te,!0),te),le=this;if(isNaN(se.sStartAngle)||isNaN(se.tStartAngle)){le.setShape(se);return}K?(le.setShape(se),applyEdgeFill(le,ee,H,ne)):(saveOldStyle(le),applyEdgeFill(le,ee,H,ne),updateProps$1(le,{shape:se},Q,Z)),toggleHoverEmphasis(this,oe==="adjacency"?ee.getAdjacentDataIndices():oe,ie.get("blurScope"),ie.get("disabled")),setStatesStylesFromModel(le,ae,"lineStyle"),W.setItemGraphicEl(ee.dataIndex,le)},G})(Path);function applyEdgeFill(U,G,H,W){var Z=G.node1,X=G.node2,K=U.style;U.setStyle(W.getLineStyle());var Q=W.get("color");switch(Q){case"source":K.fill=H.getItemVisual(Z.dataIndex,"style").fill,K.decal=Z.getVisual("style").decal;break;case"target":K.fill=H.getItemVisual(X.dataIndex,"style").fill,K.decal=X.getVisual("style").decal;break;case"gradient":var ee=H.getItemVisual(Z.dataIndex,"style").fill,te=H.getItemVisual(X.dataIndex,"style").fill;if(isString(ee)&&isString(te)){var re=U.shape,ae=(re.s1[0]+re.s2[0])/2,ne=(re.s1[1]+re.s2[1])/2,ie=(re.t1[0]+re.t2[0])/2,oe=(re.t1[1]+re.t2[1])/2;K.fill=new LinearGradient(ae,ne,ie,oe,[{offset:0,color:ee},{offset:1,color:te}],!0)}break}}var RADIAN$2=Math.PI/180,ChordView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H,W){},G.prototype.render=function(H,W,Z){var X=H.getData(),K=this._data,Q=this.group,ee=-H.get("startAngle")*RADIAN$2;if(X.diff(K).add(function(re){var ae=X.getItemLayout(re);if(ae){var ne=new ChordPiece(X,re,ee);getECData(ne).dataIndex=re,Q.add(ne)}}).update(function(re,ae){var ne=K.getItemGraphicEl(ae),ie=X.getItemLayout(re);if(!ie){ne&&removeElementWithFadeOut(ne,H,ae);return}ne?ne.updateData(X,re,ee):ne=new ChordPiece(X,re,ee),Q.add(ne)}).remove(function(re){var ae=K.getItemGraphicEl(re);ae&&removeElementWithFadeOut(ae,H,re)}).execute(),!K){var te=H.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=parsePercent(te[0],Z.getWidth()),this.group.originY=parsePercent(te[1],Z.getHeight()),initProps(this.group,{scaleX:1,scaleY:1},H)}this._data=X,this.renderEdges(H,ee)},G.prototype.renderEdges=function(H,W){var Z=H.getData(),X=H.getEdgeData(),K=this._edgeData,Q=this.group;X.diff(K).add(function(ee){var te=new ChordEdge(Z,X,ee,W);getECData(te).dataIndex=ee,Q.add(te)}).update(function(ee,te){var re=K.getItemGraphicEl(te);re.updateData(Z,X,ee,W),Q.add(re)}).remove(function(ee){var te=K.getItemGraphicEl(ee);te&&removeElementWithFadeOut(te,H,ee)}).execute(),this._edgeData=X},G.prototype.dispose=function(){},G.type="chord",G})(ChartView),ChordSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H){U.prototype.init.apply(this,arguments),this.fillDataTextStyle(H.edges||H.links),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this))},G.prototype.mergeOption=function(H){U.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(H.edges||H.links)},G.prototype.getInitialData=function(H,W){var Z=H.edges||H.links||[],X=H.data||H.nodes||[];if(X&&Z){var K=createGraphFromNodeEdge(X,Z,this,!0,Q);return K.data}function Q(ee,te){var re=Model.prototype.getModel;function ae(ie,oe){var se=re.call(this,ie,oe);return se.resolveParentPath=ne,se}te.wrapMethod("getItemModel",function(ie){return ie.resolveParentPath=ne,ie.getModel=ae,ie});function ne(ie){if(ie&&(ie[0]==="label"||ie[1]==="label")){var oe=ie.slice();return ie[0]==="label"?oe[0]="edgeLabel":ie[1]==="label"&&(oe[1]="edgeLabel"),oe}return ie}}},G.prototype.getGraph=function(){return this.getData().graph},G.prototype.getEdgeData=function(){return this.getGraph().edgeData},G.prototype.formatTooltip=function(H,W,Z){var X=this.getDataParams(H,Z);if(Z==="edge"){var K=this.getData(),Q=K.graph.getEdgeByIndex(H),ee=K.getName(Q.node1.dataIndex),te=K.getName(Q.node2.dataIndex),re=[];return ee!=null&&re.push(ee),te!=null&&re.push(te),createTooltipMarkup("nameValue",{name:re.join(" > "),value:X.value,noValue:X.value==null})}return createTooltipMarkup("nameValue",{name:X.name,value:X.value,noValue:X.value==null})},G.prototype.getDataParams=function(H,W){var Z=U.prototype.getDataParams.call(this,H,W);if(W==="node"){var X=this.getData(),K=this.getGraph().getNodeByIndex(H);if(Z.name==null&&(Z.name=X.getName(H)),Z.value==null){var Q=K.getLayout().value;Z.value=Q}}return Z},G.type="series.chord",G.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},G})(SeriesModel),RADIAN$1=Math.PI/180;function chordCircularLayout(U,G){U.eachSeriesByType("chord",function(H){chordLayout(H,G)})}function chordLayout(U,G){var H=U.getData(),W=H.graph,Z=U.getEdgeData(),X=Z.count();if(X){var K=getCircleLayout(U,G),Q=K.cx,ee=K.cy,te=K.r,re=K.r0,ae=Math.max((U.get("padAngle")||0)*RADIAN$1,0),ne=Math.max((U.get("minAngle")||0)*RADIAN$1,0),ie=-U.get("startAngle")*RADIAN$1,oe=ie+Math.PI*2,se=U.get("clockwise"),le=se?1:-1,ue=[ie,oe];normalizeArcAngles(ue,!se);var ce=ue[0],fe=ue[1],he=fe-ce,ve=H.getSum("value")===0&&Z.getSum("value")===0,de=[],pe=0;W.eachEdge(function(Ce){var Ee=ve?1:Ce.getValue("value");ve&&(Ee>0||ne)&&(pe+=2);var Me=Ce.node1.dataIndex,De=Ce.node2.dataIndex;de[Me]=(de[Me]||0)+Ee,de[De]=(de[De]||0)+Ee});var ge=0;if(W.eachNode(function(Ce){var Ee=Ce.getValue("value");isNaN(Ee)||(de[Ce.dataIndex]=Math.max(Ee,de[Ce.dataIndex]||0)),!ve&&(de[Ce.dataIndex]>0||ne)&&pe++,ge+=de[Ce.dataIndex]||0}),!(pe===0||ge===0)){ae*pe>=Math.abs(he)&&(ae=Math.max(0,(Math.abs(he)-ne*pe)/pe)),(ae+ne)*pe>=Math.abs(he)&&(ne=(Math.abs(he)-ae*pe)/pe);var me=(he-ae*pe*le)/ge,ye=0,_e=0,xe=0;W.eachNode(function(Ce){var Ee=de[Ce.dataIndex]||0,Me=me*(ge?Ee:1)*le;Math.abs(Me)<ne?ye+=ne-Math.abs(Me):(_e+=Math.abs(Me)-ne,xe+=Math.abs(Me)),Ce.setLayout({angle:Me,value:Ee})});var Se=!1;if(ye>_e){var Te=ye/_e;W.eachNode(function(Ce){var Ee=Ce.getLayout().angle;Math.abs(Ee)>=ne?Ce.setLayout({angle:Ee*Te,ratio:Te},!0):Ce.setLayout({angle:ne,ratio:ne===0?1:Ee/ne},!0)})}else W.eachNode(function(Ce){if(!Se){var Ee=Ce.getLayout().angle,Me=Math.min(Ee/xe,1),De=Me*ye;Ee-De<ne&&(Se=!0)}});var be=ye;W.eachNode(function(Ce){if(!(be<=0)){var Ee=Ce.getLayout().angle;if(Ee>ne&&ne>0){var Me=Se?1:Math.min(Ee/xe,1),De=Ee-ne,Le=Math.min(De,Math.min(be,ye*Me));be-=Le,Ce.setLayout({angle:Ee-Le,ratio:(Ee-Le)/Ee},!0)}else ne>0&&Ce.setLayout({angle:ne,ratio:Ee===0?1:ne/Ee},!0)}});var Ae=ce,we=[];W.eachNode(function(Ce){var Ee=Math.max(Ce.getLayout().angle,ne);Ce.setLayout({cx:Q,cy:ee,r0:re,r:te,startAngle:Ae,endAngle:Ae+Ee*le,clockwise:se},!0),we[Ce.dataIndex]=Ae,Ae+=(Ee+ae)*le}),W.eachEdge(function(Ce){var Ee=ve?1:Ce.getValue("value"),Me=me*(ge?Ee:1)*le,De=Ce.node1.dataIndex,Le=we[De]||0,Pe=Math.abs((Ce.node1.getLayout().ratio||1)*Me),Ie=Le+Pe*le,$e=[Q+re*Math.cos(Le),ee+re*Math.sin(Le)],Ve=[Q+re*Math.cos(Ie),ee+re*Math.sin(Ie)],Fe=Ce.node2.dataIndex,ke=we[Fe]||0,Re=Math.abs((Ce.node2.getLayout().ratio||1)*Me),Ne=ke+Re*le,Oe=[Q+re*Math.cos(ke),ee+re*Math.sin(ke)],Be=[Q+re*Math.cos(Ne),ee+re*Math.sin(Ne)];Ce.setLayout({s1:$e,s2:Ve,sStartAngle:Le,sEndAngle:Ie,t1:Oe,t2:Be,tStartAngle:ke,tEndAngle:Ne,cx:Q,cy:ee,r:re,value:Ee,clockwise:se}),we[De]=Ie,we[Fe]=Ne})}}}function install$I(U){U.registerChartView(ChordView),U.registerSeriesModel(ChordSeriesModel),U.registerLayout(U.PRIORITY.VISUAL.POST_CHART_LAYOUT,chordCircularLayout),U.registerProcessor(dataFilter$1("chord"))}var PointerShape=(function(){function U(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return U})(),PointerPath=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="pointer",W}return G.prototype.getDefaultShape=function(){return new PointerShape},G.prototype.buildPath=function(H,W){var Z=Math.cos,X=Math.sin,K=W.r,Q=W.width,ee=W.angle,te=W.x-Z(ee)*Q*(Q>=K/3?1:2),re=W.y-X(ee)*Q*(Q>=K/3?1:2);ee=W.angle-Math.PI/2,H.moveTo(te,re),H.lineTo(W.x+Z(ee)*Q,W.y+X(ee)*Q),H.lineTo(W.x+Z(W.angle)*K,W.y+X(W.angle)*K),H.lineTo(W.x-Z(ee)*Q,W.y-X(ee)*Q),H.lineTo(te,re)},G})(Path);function parsePosition(U,G){var H=U.get("center"),W=G.getWidth(),Z=G.getHeight(),X=Math.min(W,Z),K=parsePercent(H[0],G.getWidth()),Q=parsePercent(H[1],G.getHeight()),ee=parsePercent(U.get("radius"),X/2);return{cx:K,cy:Q,r:ee}}function formatLabel(U,G){var H=U==null?"":U+"";return G&&(isString(G)?H=G.replace("{value}",H):isFunction(G)&&(H=G(U))),H}var GaugeView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){this.group.removeAll();var X=H.get(["axisLine","lineStyle","color"]),K=parsePosition(H,Z);this._renderMain(H,W,Z,X,K),this._data=H.getData()},G.prototype.dispose=function(){},G.prototype._renderMain=function(H,W,Z,X,K){var Q=this.group,ee=H.get("clockwise"),te=-H.get("startAngle")/180*Math.PI,re=-H.get("endAngle")/180*Math.PI,ae=H.getModel("axisLine"),ne=ae.get("roundCap"),ie=ne?SausagePath:Sector,oe=ae.get("show"),se=ae.getModel("lineStyle"),le=se.get("width"),ue=[te,re];normalizeArcAngles(ue,!ee),te=ue[0],re=ue[1];for(var ce=re-te,fe=te,he=[],ve=0;oe&&ve<X.length;ve++){var de=Math.min(Math.max(X[ve][0],0),1);re=te+ce*de;var pe=new ie({shape:{startAngle:fe,endAngle:re,cx:K.cx,cy:K.cy,clockwise:ee,r0:K.r-le,r:K.r},silent:!0});pe.setStyle({fill:X[ve][1]}),pe.setStyle(se.getLineStyle(["color","width"])),he.push(pe),fe=re}he.reverse(),each$f(he,function(me){return Q.add(me)});var ge=function(me){if(me<=0)return X[0][1];var ye;for(ye=0;ye<X.length;ye++)if(X[ye][0]>=me&&(ye===0?0:X[ye-1][0])<me)return X[ye][1];return X[ye-1][1]};this._renderTicks(H,W,Z,ge,K,te,re,ee,le),this._renderTitleAndDetail(H,W,Z,ge,K),this._renderAnchor(H,K),this._renderPointer(H,W,Z,ge,K,te,re,ee,le)},G.prototype._renderTicks=function(H,W,Z,X,K,Q,ee,te,re){for(var ae=this.group,ne=K.cx,ie=K.cy,oe=K.r,se=+H.get("min"),le=+H.get("max"),ue=H.getModel("splitLine"),ce=H.getModel("axisTick"),fe=H.getModel("axisLabel"),he=H.get("splitNumber"),ve=ce.get("splitNumber"),de=parsePercent(ue.get("length"),oe),pe=parsePercent(ce.get("length"),oe),ge=Q,me=(ee-Q)/he,ye=me/ve,_e=ue.getModel("lineStyle").getLineStyle(),xe=ce.getModel("lineStyle").getLineStyle(),Se=ue.get("distance"),Te,be,Ae=0;Ae<=he;Ae++){if(Te=Math.cos(ge),be=Math.sin(ge),ue.get("show")){var we=Se?Se+re:re,Ce=new Line$1({shape:{x1:Te*(oe-we)+ne,y1:be*(oe-we)+ie,x2:Te*(oe-de-we)+ne,y2:be*(oe-de-we)+ie},style:_e,silent:!0});_e.stroke==="auto"&&Ce.setStyle({stroke:X(Ae/he)}),ae.add(Ce)}if(fe.get("show")){var we=fe.get("distance")+Se,Ee=formatLabel(round$4(Ae/he*(le-se)+se),fe.get("formatter")),Me=X(Ae/he),De=Te*(oe-de-we)+ne,Le=be*(oe-de-we)+ie,Pe=fe.get("rotate"),Ie=0;Pe==="radial"?(Ie=-ge+2*Math.PI,Ie>Math.PI/2&&(Ie+=Math.PI)):Pe==="tangential"?Ie=-ge-Math.PI/2:isNumber(Pe)&&(Ie=Pe*Math.PI/180),Ie===0?ae.add(new ZRText({style:createTextStyle(fe,{text:Ee,x:De,y:Le,verticalAlign:be<-.8?"top":be>.8?"bottom":"middle",align:Te<-.4?"left":Te>.4?"right":"center"},{inheritColor:Me}),silent:!0})):ae.add(new ZRText({style:createTextStyle(fe,{text:Ee,x:De,y:Le,verticalAlign:"middle",align:"center"},{inheritColor:Me}),silent:!0,originX:De,originY:Le,rotation:Ie}))}if(ce.get("show")&&Ae!==he){var we=ce.get("distance");we=we?we+re:re;for(var $e=0;$e<=ve;$e++){Te=Math.cos(ge),be=Math.sin(ge);var Ve=new Line$1({shape:{x1:Te*(oe-we)+ne,y1:be*(oe-we)+ie,x2:Te*(oe-pe-we)+ne,y2:be*(oe-pe-we)+ie},silent:!0,style:xe});xe.stroke==="auto"&&Ve.setStyle({stroke:X((Ae+$e/ve)/he)}),ae.add(Ve),ge+=ye}ge-=ye}else ge+=me}},G.prototype._renderPointer=function(H,W,Z,X,K,Q,ee,te,re){var ae=this.group,ne=this._data,ie=this._progressEls,oe=[],se=H.get(["pointer","show"]),le=H.getModel("progress"),ue=le.get("show"),ce=H.getData(),fe=ce.mapDimension("value"),he=+H.get("min"),ve=+H.get("max"),de=[he,ve],pe=[Q,ee];function ge(ye,_e){var xe=ce.getItemModel(ye),Se=xe.getModel("pointer"),Te=parsePercent(Se.get("width"),K.r),be=parsePercent(Se.get("length"),K.r),Ae=H.get(["pointer","icon"]),we=Se.get("offsetCenter"),Ce=parsePercent(we[0],K.r),Ee=parsePercent(we[1],K.r),Me=Se.get("keepAspect"),De;return Ae?De=createSymbol$1(Ae,Ce-Te/2,Ee-be,Te,be,null,Me):De=new PointerPath({shape:{angle:-Math.PI/2,width:Te,r:be,x:Ce,y:Ee}}),De.rotation=-(_e+Math.PI/2),De.x=K.cx,De.y=K.cy,De}function me(ye,_e){var xe=le.get("roundCap"),Se=xe?SausagePath:Sector,Te=le.get("overlap"),be=Te?le.get("width"):re/ce.count(),Ae=Te?K.r-be:K.r-(ye+1)*be,we=Te?K.r:K.r-ye*be,Ce=new Se({shape:{startAngle:Q,endAngle:_e,cx:K.cx,cy:K.cy,clockwise:te,r0:Ae,r:we}});return Te&&(Ce.z2=linearMap$2(ce.get(fe,ye),[he,ve],[100,0],!0)),Ce}(ue||se)&&(ce.diff(ne).add(function(ye){var _e=ce.get(fe,ye);if(se){var xe=ge(ye,Q);initProps(xe,{rotation:-((isNaN(+_e)?pe[0]:linearMap$2(_e,de,pe,!0))+Math.PI/2)},H),ae.add(xe),ce.setItemGraphicEl(ye,xe)}if(ue){var Se=me(ye,Q),Te=le.get("clip");initProps(Se,{shape:{endAngle:linearMap$2(_e,de,pe,Te)}},H),ae.add(Se),setCommonECData(H.seriesIndex,ce.dataType,ye,Se),oe[ye]=Se}}).update(function(ye,_e){var xe=ce.get(fe,ye);if(se){var Se=ne.getItemGraphicEl(_e),Te=Se?Se.rotation:Q,be=ge(ye,Te);be.rotation=Te,updateProps$1(be,{rotation:-((isNaN(+xe)?pe[0]:linearMap$2(xe,de,pe,!0))+Math.PI/2)},H),ae.add(be),ce.setItemGraphicEl(ye,be)}if(ue){var Ae=ie[_e],we=Ae?Ae.shape.endAngle:Q,Ce=me(ye,we),Ee=le.get("clip");updateProps$1(Ce,{shape:{endAngle:linearMap$2(xe,de,pe,Ee)}},H),ae.add(Ce),setCommonECData(H.seriesIndex,ce.dataType,ye,Ce),oe[ye]=Ce}}).execute(),ce.each(function(ye){var _e=ce.getItemModel(ye),xe=_e.getModel("emphasis"),Se=xe.get("focus"),Te=xe.get("blurScope"),be=xe.get("disabled");if(se){var Ae=ce.getItemGraphicEl(ye),we=ce.getItemVisual(ye,"style"),Ce=we.fill;if(Ae instanceof ZRImage){var Ee=Ae.style;Ae.useStyle(extend({image:Ee.image,x:Ee.x,y:Ee.y,width:Ee.width,height:Ee.height},we))}else Ae.useStyle(we),Ae.type!=="pointer"&&Ae.setColor(Ce);Ae.setStyle(_e.getModel(["pointer","itemStyle"]).getItemStyle()),Ae.style.fill==="auto"&&Ae.setStyle("fill",X(linearMap$2(ce.get(fe,ye),de,[0,1],!0))),Ae.z2EmphasisLift=0,setStatesStylesFromModel(Ae,_e),toggleHoverEmphasis(Ae,Se,Te,be)}if(ue){var Me=oe[ye];Me.useStyle(ce.getItemVisual(ye,"style")),Me.setStyle(_e.getModel(["progress","itemStyle"]).getItemStyle()),Me.z2EmphasisLift=0,setStatesStylesFromModel(Me,_e),toggleHoverEmphasis(Me,Se,Te,be)}}),this._progressEls=oe)},G.prototype._renderAnchor=function(H,W){var Z=H.getModel("anchor"),X=Z.get("show");if(X){var K=Z.get("size"),Q=Z.get("icon"),ee=Z.get("offsetCenter"),te=Z.get("keepAspect"),re=createSymbol$1(Q,W.cx-K/2+parsePercent(ee[0],W.r),W.cy-K/2+parsePercent(ee[1],W.r),K,K,null,te);re.z2=Z.get("showAbove")?1:0,re.setStyle(Z.getModel("itemStyle").getItemStyle()),this.group.add(re)}},G.prototype._renderTitleAndDetail=function(H,W,Z,X,K){var Q=this,ee=H.getData(),te=ee.mapDimension("value"),re=+H.get("min"),ae=+H.get("max"),ne=new Group$3,ie=[],oe=[],se=H.isAnimationEnabled(),le=H.get(["pointer","showAbove"]);ee.diff(this._data).add(function(ue){ie[ue]=new ZRText({silent:!0}),oe[ue]=new ZRText({silent:!0})}).update(function(ue,ce){ie[ue]=Q._titleEls[ce],oe[ue]=Q._detailEls[ce]}).execute(),ee.each(function(ue){var ce=ee.getItemModel(ue),fe=ee.get(te,ue),he=new Group$3,ve=X(linearMap$2(fe,[re,ae],[0,1],!0)),de=ce.getModel("title");if(de.get("show")){var pe=de.get("offsetCenter"),ge=K.cx+parsePercent(pe[0],K.r),me=K.cy+parsePercent(pe[1],K.r),ye=ie[ue];ye.attr({z2:le?0:2,style:createTextStyle(de,{x:ge,y:me,text:ee.getName(ue),align:"center",verticalAlign:"middle"},{inheritColor:ve})}),he.add(ye)}var _e=ce.getModel("detail");if(_e.get("show")){var xe=_e.get("offsetCenter"),Se=K.cx+parsePercent(xe[0],K.r),Te=K.cy+parsePercent(xe[1],K.r),be=parsePercent(_e.get("width"),K.r),Ae=parsePercent(_e.get("height"),K.r),we=H.get(["progress","show"])?ee.getItemVisual(ue,"style").fill:ve,ye=oe[ue],Ce=_e.get("formatter");ye.attr({z2:le?0:2,style:createTextStyle(_e,{x:Se,y:Te,text:formatLabel(fe,Ce),width:isNaN(be)?null:be,height:isNaN(Ae)?null:Ae,align:"center",verticalAlign:"middle"},{inheritColor:we})}),setLabelValueAnimation(ye,{normal:_e},fe,function(Me){return formatLabel(Me,Ce)}),se&&animateLabelValue(ye,ue,ee,H,{getFormattedLabel:function(Me,De,Le,Pe,Ie,$e){return formatLabel($e?$e.interpolatedValue:fe,Ce)}}),he.add(ye)}ne.add(he)}),this.group.add(ne),this._titleEls=ie,this._detailEls=oe},G.type="gauge",G})(ChartView),GaugeSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.visualStyleAccessPath="itemStyle",H}return G.prototype.getInitialData=function(H,W){return createSeriesDataSimply(this,["value"])},G.type="series.gauge",G.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,tokens.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:tokens.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:tokens.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:tokens.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:tokens.color.neutral00,borderWidth:0,borderColor:tokens.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:tokens.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:tokens.color.transparent,borderWidth:0,borderColor:tokens.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:tokens.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},G})(SeriesModel);function install$H(U){U.registerChartView(GaugeView),U.registerSeriesModel(GaugeSeriesModel)}var opacityAccessPath$1=["itemStyle","opacity"],FunnelPiece=(function(U){__extends(G,U);function G(H,W){var Z=U.call(this)||this,X=Z,K=new Polyline$1,Q=new ZRText;return X.setTextContent(Q),Z.setTextGuideLine(K),Z.updateData(H,W,!0),Z}return G.prototype.updateData=function(H,W,Z){var X=this,K=H.hostModel,Q=H.getItemModel(W),ee=H.getItemLayout(W),te=Q.getModel("emphasis"),re=Q.get(opacityAccessPath$1);re=re??1,Z||saveOldStyle(X),X.useStyle(H.getItemVisual(W,"style")),X.style.lineJoin="round",Z?(X.setShape({points:ee.points}),X.style.opacity=0,initProps(X,{style:{opacity:re}},K,W)):updateProps$1(X,{style:{opacity:re},shape:{points:ee.points}},K,W),setStatesStylesFromModel(X,Q),this._updateLabel(H,W),toggleHoverEmphasis(this,te.get("focus"),te.get("blurScope"),te.get("disabled"))},G.prototype._updateLabel=function(H,W){var Z=this,X=this.getTextGuideLine(),K=Z.getTextContent(),Q=H.hostModel,ee=H.getItemModel(W),te=H.getItemLayout(W),re=te.label,ae=H.getItemVisual(W,"style"),ne=ae.fill;setLabelStyle(K,getLabelStatesModels(ee),{labelFetcher:H.hostModel,labelDataIndex:W,defaultOpacity:ae.opacity,defaultText:H.getName(W)},{normal:{align:re.textAlign,verticalAlign:re.verticalAlign}});var ie=ee.getModel("label"),oe=ie.get("color"),se=oe==="inherit"?ne:null;Z.setTextConfig({local:!0,inside:!!re.inside,insideStroke:se,outsideFill:se});var le=re.linePoints;X.setShape({points:le}),Z.textGuideLineConfig={anchor:le?new Point(le[0][0],le[0][1]):null},updateProps$1(K,{style:{x:re.x,y:re.y}},Q,W),K.attr({rotation:re.rotation,originX:re.x,originY:re.y,z2:10}),setLabelLineStyle(Z,getLabelLineStatesModels(ee),{stroke:ne})},G})(Polygon),FunnelView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.ignoreLabelLineUpdate=!0,H}return G.prototype.render=function(H,W,Z){var X=H.getData(),K=this._data,Q=this.group;X.diff(K).add(function(ee){var te=new FunnelPiece(X,ee);X.setItemGraphicEl(ee,te),Q.add(te)}).update(function(ee,te){var re=K.getItemGraphicEl(te);re.updateData(X,ee),Q.add(re),X.setItemGraphicEl(ee,re)}).remove(function(ee){var te=K.getItemGraphicEl(ee);removeElementWithFadeOut(te,H,ee)}).execute(),this._data=X},G.prototype.remove=function(){this.group.removeAll(),this._data=null},G.prototype.dispose=function(){},G.type="funnel",G})(ChartView),FunnelSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H){U.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this)),this._defaultLabelLine(H)},G.prototype.getInitialData=function(H,W){return createSeriesDataSimply(this,{coordDimensions:["value"],encodeDefaulter:curry$1(makeSeriesEncodeForNameBased,this)})},G.prototype._defaultLabelLine=function(H){defaultEmphasis(H,"labelLine",["show"]);var W=H.labelLine,Z=H.emphasis.labelLine;W.show=W.show&&H.label.show,Z.show=Z.show&&H.emphasis.label.show},G.prototype.getDataParams=function(H){var W=this.getData(),Z=U.prototype.getDataParams.call(this,H),X=W.mapDimension("value"),K=W.getSum(X);return Z.percent=K?+(W.get(X,H)/K*100).toFixed(2):0,Z.$vars.push("percent"),Z},G.type="series.funnel",G.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:tokens.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:tokens.color.primary}}},G})(SeriesModel);function getSortedIndices(U,G){for(var H=U.mapDimension("value"),W=U.mapArray(H,function(ee){return ee}),Z=[],X=G==="ascending",K=0,Q=U.count();K<Q;K++)Z[K]=K;return isFunction(G)?Z.sort(G):G!=="none"&&Z.sort(function(ee,te){return X?W[ee]-W[te]:W[te]-W[ee]}),Z}function labelLayout(U){var G=U.hostModel,H=G.get("orient");U.each(function(W){var Z=U.getItemModel(W),X=Z.getModel("label"),K=X.get("position"),Q=Z.getModel("labelLine"),ee=U.getItemLayout(W),te=ee.points,re=K==="inner"||K==="inside"||K==="center"||K==="insideLeft"||K==="insideRight",ae,ne,ie,oe;if(re)K==="insideLeft"?(ne=(te[0][0]+te[3][0])/2+5,ie=(te[0][1]+te[3][1])/2,ae="left"):K==="insideRight"?(ne=(te[1][0]+te[2][0])/2-5,ie=(te[1][1]+te[2][1])/2,ae="right"):(ne=(te[0][0]+te[1][0]+te[2][0]+te[3][0])/4,ie=(te[0][1]+te[1][1]+te[2][1]+te[3][1])/4,ae="center"),oe=[[ne,ie],[ne,ie]];else{var se=void 0,le=void 0,ue=void 0,ce=void 0,fe=Q.get("length");process.env.NODE_ENV!=="production"&&(H==="vertical"&&["top","bottom"].indexOf(K)>-1&&(K="left",console.warn("Position error: Funnel chart on vertical orient dose not support top and bottom.")),H==="horizontal"&&["left","right"].indexOf(K)>-1&&(K="bottom",console.warn("Position error: Funnel chart on horizontal orient dose not support left and right."))),K==="left"?(se=(te[3][0]+te[0][0])/2,le=(te[3][1]+te[0][1])/2,ue=se-fe,ne=ue-5,ae="right"):K==="right"?(se=(te[1][0]+te[2][0])/2,le=(te[1][1]+te[2][1])/2,ue=se+fe,ne=ue+5,ae="left"):K==="top"?(se=(te[3][0]+te[0][0])/2,le=(te[3][1]+te[0][1])/2,ce=le-fe,ie=ce-5,ae="center"):K==="bottom"?(se=(te[1][0]+te[2][0])/2,le=(te[1][1]+te[2][1])/2,ce=le+fe,ie=ce+5,ae="center"):K==="rightTop"?(se=H==="horizontal"?te[3][0]:te[1][0],le=H==="horizontal"?te[3][1]:te[1][1],H==="horizontal"?(ce=le-fe,ie=ce-5,ae="center"):(ue=se+fe,ne=ue+5,ae="top")):K==="rightBottom"?(se=te[2][0],le=te[2][1],H==="horizontal"?(ce=le+fe,ie=ce+5,ae="center"):(ue=se+fe,ne=ue+5,ae="bottom")):K==="leftTop"?(se=te[0][0],le=H==="horizontal"?te[0][1]:te[1][1],H==="horizontal"?(ce=le-fe,ie=ce-5,ae="center"):(ue=se-fe,ne=ue-5,ae="right")):K==="leftBottom"?(se=H==="horizontal"?te[1][0]:te[3][0],le=H==="horizontal"?te[1][1]:te[2][1],H==="horizontal"?(ce=le+fe,ie=ce+5,ae="center"):(ue=se-fe,ne=ue-5,ae="right")):(se=(te[1][0]+te[2][0])/2,le=(te[1][1]+te[2][1])/2,H==="horizontal"?(ce=le+fe,ie=ce+5,ae="center"):(ue=se+fe,ne=ue+5,ae="left")),H==="horizontal"?(ue=se,ne=ue):(ce=le,ie=ce),oe=[[se,le],[ue,ce]]}ee.label={linePoints:oe,x:ne,y:ie,verticalAlign:"middle",textAlign:ae,inside:re}})}function funnelLayout(U,G){U.eachSeriesByType("funnel",function(H){var W=H.getData(),Z=W.mapDimension("value"),X=H.get("sort"),K=createBoxLayoutReference(H,G),Q=getLayoutRect(H.getBoxLayoutParams(),K.refContainer),ee=H.get("orient"),te=Q.width,re=Q.height,ae=getSortedIndices(W,X),ne=Q.x,ie=Q.y,oe=ee==="horizontal"?[parsePercent(H.get("minSize"),re),parsePercent(H.get("maxSize"),re)]:[parsePercent(H.get("minSize"),te),parsePercent(H.get("maxSize"),te)],se=W.getDataExtent(Z),le=H.get("min"),ue=H.get("max");le==null&&(le=Math.min(se[0],0)),ue==null&&(ue=se[1]);var ce=H.get("funnelAlign"),fe=H.get("gap"),he=ee==="horizontal"?te:re,ve=(he-fe*(W.count()-1))/W.count(),de=function(be,Ae){if(ee==="horizontal"){var we=W.get(Z,be)||0,Ce=linearMap$2(we,[le,ue],oe,!0),Ee=void 0;switch(ce){case"top":Ee=ie;break;case"center":Ee=ie+(re-Ce)/2;break;case"bottom":Ee=ie+(re-Ce);break}return[[Ae,Ee],[Ae,Ee+Ce]]}var Me=W.get(Z,be)||0,De=linearMap$2(Me,[le,ue],oe,!0),Le;switch(ce){case"left":Le=ne;break;case"center":Le=ne+(te-De)/2;break;case"right":Le=ne+te-De;break}return[[Le,Ae],[Le+De,Ae]]};X==="ascending"&&(ve=-ve,fe=-fe,ee==="horizontal"?ne+=te:ie+=re,ae=ae.reverse());for(var pe=0;pe<ae.length;pe++){var ge=ae[pe],me=ae[pe+1],ye=W.getItemModel(ge);if(ee==="horizontal"){var _e=ye.get(["itemStyle","width"]);_e==null?_e=ve:(_e=parsePercent(_e,te),X==="ascending"&&(_e=-_e));var xe=de(ge,ne),Se=de(me,ne+_e);ne+=_e+fe,W.setItemLayout(ge,{points:xe.concat(Se.slice().reverse())})}else{var Te=ye.get(["itemStyle","height"]);Te==null?Te=ve:(Te=parsePercent(Te,re),X==="ascending"&&(Te=-Te));var xe=de(ge,ie),Se=de(me,ie+Te);ie+=Te+fe,W.setItemLayout(ge,{points:xe.concat(Se.slice().reverse())})}}labelLayout(W)})}function install$G(U){U.registerChartView(FunnelView),U.registerSeriesModel(FunnelSeriesModel),U.registerLayout(funnelLayout),U.registerProcessor(dataFilter$1("funnel"))}var DEFAULT_SMOOTH=.3,ParallelView$1=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H._dataGroup=new Group$3,H._initialized=!1,H}return G.prototype.init=function(){this.group.add(this._dataGroup)},G.prototype.render=function(H,W,Z,X){this._progressiveEls=null;var K=this._dataGroup,Q=H.getData(),ee=this._data,te=H.coordinateSystem,re=te.dimensions,ae=makeSeriesScope(H);Q.diff(ee).add(ne).update(ie).remove(oe).execute();function ne(le){var ue=addEl(Q,K,le,re,te);updateElCommon(ue,Q,le,ae)}function ie(le,ue){var ce=ee.getItemGraphicEl(ue),fe=createLinePoints(Q,le,re,te);Q.setItemGraphicEl(le,ce),updateProps$1(ce,{shape:{points:fe}},H,le),saveOldStyle(ce),updateElCommon(ce,Q,le,ae)}function oe(le){var ue=ee.getItemGraphicEl(le);K.remove(ue)}if(!this._initialized){this._initialized=!0;var se=createGridClipShape$2(te,H,function(){setTimeout(function(){K.removeClipPath()})});K.setClipPath(se)}this._data=Q},G.prototype.incrementalPrepareRender=function(H,W,Z){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},G.prototype.incrementalRender=function(H,W,Z){for(var X=W.getData(),K=W.coordinateSystem,Q=K.dimensions,ee=makeSeriesScope(W),te=this._progressiveEls=[],re=H.start;re<H.end;re++){var ae=addEl(X,this._dataGroup,re,Q,K);ae.incremental=!0,updateElCommon(ae,X,re,ee),te.push(ae)}},G.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},G.type="parallel",G})(ChartView);function createGridClipShape$2(U,G,H){var W=U.model,Z=U.getRect(),X=new Rect$2({shape:{x:Z.x,y:Z.y,width:Z.width,height:Z.height}}),K=W.get("layout")==="horizontal"?"width":"height";return X.setShape(K,0),initProps(X,{shape:{width:Z.width,height:Z.height}},G,H),X}function createLinePoints(U,G,H,W){for(var Z=[],X=0;X<H.length;X++){var K=H[X],Q=U.get(U.mapDimension(K),G);isEmptyValue(Q,W.getAxis(K).type)||Z.push(W.dataToPoint(Q,K))}return Z}function addEl(U,G,H,W,Z){var X=createLinePoints(U,H,W,Z),K=new Polyline$1({shape:{points:X},z2:10});return G.add(K),U.setItemGraphicEl(H,K),K}function makeSeriesScope(U){var G=U.get("smooth",!0);return G===!0&&(G=DEFAULT_SMOOTH),G=numericToNumber(G),eqNaN(G)&&(G=0),{smooth:G}}function updateElCommon(U,G,H,W){U.useStyle(G.getItemVisual(H,"style")),U.style.fill=null,U.setShape("smooth",W.smooth);var Z=G.getItemModel(H),X=Z.getModel("emphasis");setStatesStylesFromModel(U,Z,"lineStyle"),toggleHoverEmphasis(U,X.get("focus"),X.get("blurScope"),X.get("disabled"))}function isEmptyValue(U,G){return G==="category"?U==null:U==null||isNaN(U)}var ParallelSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.visualStyleAccessPath="lineStyle",H.visualDrawType="stroke",H}return G.prototype.getInitialData=function(H,W){return createSeriesData$1(null,this,{useEncodeDefaulter:bind$1(makeDefaultEncode,null,this)})},G.prototype.getRawIndicesByActiveState=function(H){var W=this.coordinateSystem,Z=this.getData(),X=[];return W.eachActiveState(Z,function(K,Q){H===K&&X.push(Z.getRawIndex(Q))}),X},G.type="series.parallel",G.dependencies=["parallel"],G.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},G})(SeriesModel);function makeDefaultEncode(U){var G=U.ecModel.getComponent("parallel",U.get("parallelIndex"));if(G){var H={};return each$f(G.dimensions,function(W){var Z=convertDimNameToNumber(W);H[W]=Z}),H}}function convertDimNameToNumber(U){return+U.replace("dim","")}var opacityAccessPath=["lineStyle","opacity"],parallelVisual={seriesType:"parallel",reset:function(U,G){var H=U.coordinateSystem,W={normal:U.get(["lineStyle","opacity"]),active:U.get("activeOpacity"),inactive:U.get("inactiveOpacity")};return{progress:function(Z,X){H.eachActiveState(X,function(K,Q){var ee=W[K];if(K==="normal"&&X.hasItemOption){var te=X.getItemModel(Q).get(opacityAccessPath,!0);te!=null&&(ee=te)}var re=X.ensureUniqueItemVisual(Q,"style");re.opacity=ee},Z.start,Z.end)}}}};function parallelPreprocessor(U){createParallelIfNeeded(U),mergeAxisOptionFromParallel(U)}function createParallelIfNeeded(U){if(!U.parallel){var G=!1;each$f(U.series,function(H){H&&H.type==="parallel"&&(G=!0)}),G&&(U.parallel=[{}])}}function mergeAxisOptionFromParallel(U){var G=normalizeToArray(U.parallelAxis);each$f(G,function(H){if(isObject$3(H)){var W=H.parallelIndex||0,Z=normalizeToArray(U.parallel)[W];Z&&Z.parallelAxisDefault&&merge(H,Z.parallelAxisDefault,!1)}})}var CLICK_THRESHOLD=5,ParallelView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){this._model=H,this._api=Z,this._handlers||(this._handlers={},each$f(handlers$1,function(X,K){Z.getZr().on(K,this._handlers[K]=bind$1(X,this))},this)),createOrUpdate(this,"_throttledDispatchExpand",H.get("axisExpandRate"),"fixRate")},G.prototype.dispose=function(H,W){clear$1(this,"_throttledDispatchExpand"),each$f(this._handlers,function(Z,X){W.getZr().off(X,Z)}),this._handlers=null},G.prototype._throttledDispatchExpand=function(H){this._dispatchExpand(H)},G.prototype._dispatchExpand=function(H){H&&this._api.dispatchAction(extend({type:"parallelAxisExpand"},H))},G.type="parallel",G})(ComponentView),handlers$1={mousedown:function(U){checkTrigger(this,"click")&&(this._mouseDownPoint=[U.offsetX,U.offsetY])},mouseup:function(U){var G=this._mouseDownPoint;if(checkTrigger(this,"click")&&G){var H=[U.offsetX,U.offsetY],W=Math.pow(G[0]-H[0],2)+Math.pow(G[1]-H[1],2);if(W>CLICK_THRESHOLD)return;var Z=this._model.coordinateSystem.getSlidedAxisExpandWindow([U.offsetX,U.offsetY]);Z.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:Z.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(U){if(!(this._mouseDownPoint||!checkTrigger(this,"mousemove"))){var G=this._model,H=G.coordinateSystem.getSlidedAxisExpandWindow([U.offsetX,U.offsetY]),W=H.behavior;W==="jump"&&this._throttledDispatchExpand.debounceNextCall(G.get("axisExpandDebounce")),this._throttledDispatchExpand(W==="none"?null:{axisExpandWindow:H.axisExpandWindow,animation:W==="jump"?null:{duration:0}})}}};function checkTrigger(U,G){var H=U._model;return H.get("axisExpandable")&&H.get("axisExpandTriggerOn")===G}var ParallelModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(){U.prototype.init.apply(this,arguments),this.mergeOption({})},G.prototype.mergeOption=function(H){var W=this.option;H&&merge(W,H,!0),this._initDimensions()},G.prototype.contains=function(H,W){var Z=H.get("parallelIndex");return Z!=null&&W.getComponent("parallel",Z)===this},G.prototype.setAxisExpand=function(H){each$f(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(W){H.hasOwnProperty(W)&&(this.option[W]=H[W])},this)},G.prototype._initDimensions=function(){var H=this.dimensions=[],W=this.parallelAxisIndex=[],Z=filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(X){return(X.get("parallelIndex")||0)===this.componentIndex},this);each$f(Z,function(X){H.push("dim"+X.get("dim")),W.push(X.componentIndex)})},G.type="parallel",G.dependencies=["parallelAxis"],G.layoutMode="box",G.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},G})(ComponentModel),ParallelAxis=(function(U){__extends(G,U);function G(H,W,Z,X,K){var Q=U.call(this,H,W,Z)||this;return Q.type=X||"value",Q.axisIndex=K,Q}return G.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},G})(Axis);function sliderMove(U,G,H,W,Z,X){U=U||0;var K=H[1]-H[0];if(Z!=null&&(Z=restrict$1(Z,[0,K])),X!=null&&(X=Math.max(X,Z??0)),W==="all"){var Q=Math.abs(G[1]-G[0]);Q=restrict$1(Q,[0,K]),Z=X=restrict$1(Q,[Z,X]),W=0}G[0]=restrict$1(G[0],H),G[1]=restrict$1(G[1],H);var ee=getSpanSign(G,W);G[W]+=U;var te=Z||0,re=H.slice();ee.sign<0?re[0]+=te:re[1]-=te,G[W]=restrict$1(G[W],re);var ae;return ae=getSpanSign(G,W),Z!=null&&(ae.sign!==ee.sign||ae.span<Z)&&(G[1-W]=G[W]+ee.sign*Z),ae=getSpanSign(G,W),X!=null&&ae.span>X&&(G[1-W]=G[W]+ae.sign*X),G}function getSpanSign(U,G){var H=U[G]-U[1-G];return{span:Math.abs(H),sign:H>0?-1:H<0?1:G?-1:1}}function restrict$1(U,G){return Math.min(G[1]!=null?G[1]:1/0,Math.max(G[0]!=null?G[0]:-1/0,U))}var each$a=each$f,mathMin$2=Math.min,mathMax$2=Math.max,mathFloor=Math.floor,mathCeil=Math.ceil,round$1=round$4,PI$1=Math.PI,Parallel=(function(){function U(G,H,W){this.type="parallel",this._axesMap=createHashMap(),this._axesLayout={},this.dimensions=G.dimensions,this._model=G,this._init(G,H,W)}return U.prototype._init=function(G,H,W){var Z=G.dimensions,X=G.parallelAxisIndex;each$a(Z,function(K,Q){var ee=X[Q],te=H.getComponent("parallelAxis",ee),re=this._axesMap.set(K,new ParallelAxis(K,createScaleByModel$1(te),[0,0],te.get("type"),ee)),ae=re.type==="category";re.onBand=ae&&te.get("boundaryGap"),re.inverse=te.get("inverse"),te.axis=re,re.model=te,re.coordinateSystem=te.coordinateSystem=this},this)},U.prototype.update=function(G,H){this._updateAxesFromSeries(this._model,G)},U.prototype.containPoint=function(G){var H=this._makeLayoutInfo(),W=H.axisBase,Z=H.layoutBase,X=H.pixelDimIndex,K=G[1-X],Q=G[X];return K>=W&&K<=W+H.axisLength&&Q>=Z&&Q<=Z+H.layoutLength},U.prototype.getModel=function(){return this._model},U.prototype._updateAxesFromSeries=function(G,H){H.eachSeries(function(W){if(G.contains(W,H)){var Z=W.getData();each$a(this.dimensions,function(X){var K=this._axesMap.get(X);K.scale.unionExtentFromData(Z,Z.mapDimension(X)),niceScaleExtent(K.scale,K.model)},this)}},this)},U.prototype.resize=function(G,H){var W=createBoxLayoutReference(G,H).refContainer;this._rect=getLayoutRect(G.getBoxLayoutParams(),W),this._layoutAxes()},U.prototype.getRect=function(){return this._rect},U.prototype._makeLayoutInfo=function(){var G=this._model,H=this._rect,W=["x","y"],Z=["width","height"],X=G.get("layout"),K=X==="horizontal"?0:1,Q=H[Z[K]],ee=[0,Q],te=this.dimensions.length,re=restrict(G.get("axisExpandWidth"),ee),ae=restrict(G.get("axisExpandCount")||0,[0,te]),ne=G.get("axisExpandable")&&te>3&&te>ae&&ae>1&&re>0&&Q>0,ie=G.get("axisExpandWindow"),oe;if(ie)oe=restrict(ie[1]-ie[0],ee),ie[1]=ie[0]+oe;else{oe=restrict(re*(ae-1),ee);var se=G.get("axisExpandCenter")||mathFloor(te/2);ie=[re*se-oe/2],ie[1]=ie[0]+oe}var le=(Q-oe)/(te-ae);le<3&&(le=0);var ue=[mathFloor(round$1(ie[0]/re,1))+1,mathCeil(round$1(ie[1]/re,1))-1],ce=le/re*ie[0];return{layout:X,pixelDimIndex:K,layoutBase:H[W[K]],layoutLength:Q,axisBase:H[W[1-K]],axisLength:H[Z[1-K]],axisExpandable:ne,axisExpandWidth:re,axisCollapseWidth:le,axisExpandWindow:ie,axisCount:te,winInnerIndices:ue,axisExpandWindow0Pos:ce}},U.prototype._layoutAxes=function(){var G=this._rect,H=this._axesMap,W=this.dimensions,Z=this._makeLayoutInfo(),X=Z.layout;H.each(function(K){var Q=[0,Z.axisLength],ee=K.inverse?1:0;K.setExtent(Q[ee],Q[1-ee])}),each$a(W,function(K,Q){var ee=(Z.axisExpandable?layoutAxisWithExpand:layoutAxisWithoutExpand)(Q,Z),te={horizontal:{x:ee.position,y:Z.axisLength},vertical:{x:0,y:ee.position}},re={horizontal:PI$1/2,vertical:0},ae=[te[X].x+G.x,te[X].y+G.y],ne=re[X],ie=create$1();rotate(ie,ie,ne),translate(ie,ie,ae),this._axesLayout[K]={position:ae,rotation:ne,transform:ie,axisNameAvailableWidth:ee.axisNameAvailableWidth,axisLabelShow:ee.axisLabelShow,nameTruncateMaxWidth:ee.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},U.prototype.getAxis=function(G){return this._axesMap.get(G)},U.prototype.dataToPoint=function(G,H){return this.axisCoordToPoint(this._axesMap.get(H).dataToCoord(G),H)},U.prototype.eachActiveState=function(G,H,W,Z){W==null&&(W=0),Z==null&&(Z=G.count());var X=this._axesMap,K=this.dimensions,Q=[],ee=[];each$f(K,function(le){Q.push(G.mapDimension(le)),ee.push(X.get(le).model)});for(var te=this.hasAxisBrushed(),re=W;re<Z;re++){var ae=void 0;if(!te)ae="normal";else{ae="active";for(var ne=G.getValues(Q,re),ie=0,oe=K.length;ie<oe;ie++){var se=ee[ie].getActiveState(ne[ie]);if(se==="inactive"){ae="inactive";break}}}H(ae,re)}},U.prototype.hasAxisBrushed=function(){for(var G=this.dimensions,H=this._axesMap,W=!1,Z=0,X=G.length;Z<X;Z++)H.get(G[Z]).model.getActiveState()!=="normal"&&(W=!0);return W},U.prototype.axisCoordToPoint=function(G,H){var W=this._axesLayout[H];return applyTransform([G,0],W.transform)},U.prototype.getAxisLayout=function(G){return clone$4(this._axesLayout[G])},U.prototype.getSlidedAxisExpandWindow=function(G){var H=this._makeLayoutInfo(),W=H.pixelDimIndex,Z=H.axisExpandWindow.slice(),X=Z[1]-Z[0],K=[0,H.axisExpandWidth*(H.axisCount-1)];if(!this.containPoint(G))return{behavior:"none",axisExpandWindow:Z};var Q=G[W]-H.layoutBase-H.axisExpandWindow0Pos,ee,te="slide",re=H.axisCollapseWidth,ae=this._model.get("axisExpandSlideTriggerArea"),ne=ae[0]!=null;if(re)ne&&re&&Q<X*ae[0]?(te="jump",ee=Q-X*ae[2]):ne&&re&&Q>X*(1-ae[0])?(te="jump",ee=Q-X*(1-ae[2])):(ee=Q-X*ae[1])>=0&&(ee=Q-X*(1-ae[1]))<=0&&(ee=0),ee*=H.axisExpandWidth/re,ee?sliderMove(ee,Z,K,"all"):te="none";else{var ie=Z[1]-Z[0],oe=K[1]*Q/ie;Z=[mathMax$2(0,oe-ie/2)],Z[1]=mathMin$2(K[1],Z[0]+ie),Z[0]=Z[1]-ie}return{axisExpandWindow:Z,behavior:te}},U})();function restrict(U,G){return mathMin$2(mathMax$2(U,G[0]),G[1])}function layoutAxisWithoutExpand(U,G){var H=G.layoutLength/(G.axisCount-1);return{position:H*U,axisNameAvailableWidth:H,axisLabelShow:!0}}function layoutAxisWithExpand(U,G){var H=G.layoutLength,W=G.axisExpandWidth,Z=G.axisCount,X=G.axisCollapseWidth,K=G.winInnerIndices,Q,ee=X,te=!1,re;return U<K[0]?(Q=U*X,re=X):U<=K[1]?(Q=G.axisExpandWindow0Pos+U*W-G.axisExpandWindow[0],ee=W,te=!0):(Q=H-(Z-1-U)*X,re=X),{position:Q,axisNameAvailableWidth:ee,axisLabelShow:te,nameTruncateMaxWidth:re}}function createParallelCoordSys(U,G){var H=[];return U.eachComponent("parallel",function(W,Z){var X=new Parallel(W,U,G);X.name="parallel_"+Z,X.resize(W,G),W.coordinateSystem=X,X.model=W,H.push(X)}),U.eachSeries(function(W){if(W.get("coordinateSystem")==="parallel"){var Z=W.getReferringComponents("parallel",SINGLE_REFERRING).models[0];W.coordinateSystem=Z.coordinateSystem}}),H}var parallelCoordSysCreator={create:createParallelCoordSys},ParallelAxisModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.activeIntervals=[],H}return G.prototype.getAreaSelectStyle=function(){return makeStyleMapper([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},G.prototype.setActiveIntervals=function(H){var W=this.activeIntervals=clone$4(H);if(W)for(var Z=W.length-1;Z>=0;Z--)asc$2(W[Z])},G.prototype.getActiveState=function(H){var W=this.activeIntervals;if(!W.length)return"normal";if(H==null||isNaN(+H))return"inactive";if(W.length===1){var Z=W[0];if(Z[0]<=H&&H<=Z[1])return"active"}else for(var X=0,K=W.length;X<K;X++)if(W[X][0]<=H&&H<=W[X][1])return"active";return"inactive"},G})(ComponentModel);mixin(ParallelAxisModel,AxisModelCommonMixin);var BRUSH_PANEL_GLOBAL=!0,mathMin$1=Math.min,mathMax$1=Math.max,mathPow=Math.pow,COVER_Z=1e4,UNSELECT_THRESHOLD=6,MIN_RESIZE_LINE_WIDTH=6,MUTEX_RESOURCE_KEY="globalPan",DIRECTION_MAP={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},CURSOR_MAP={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},DEFAULT_BRUSH_OPT={brushStyle:{lineWidth:2,stroke:tokens.color.backgroundTint,fill:tokens.color.borderTint},transformable:!0,brushMode:"single",removeOnClick:!1},baseUID=0,BrushController=(function(U){__extends(G,U);function G(H){var W=U.call(this)||this;return W._track=[],W._covers=[],W._handlers={},process.env.NODE_ENV!=="production"&&assert(H),W._zr=H,W.group=new Group$3,W._uid="brushController_"+baseUID++,each$f(pointerHandlers,function(Z,X){this._handlers[X]=bind$1(Z,this)},W),W}return G.prototype.enableBrush=function(H){return process.env.NODE_ENV!=="production"&&assert(this._mounted),this._brushType&&this._doDisableBrush(),H.brushType&&this._doEnableBrush(H),this},G.prototype._doEnableBrush=function(H){var W=this._zr;this._enableGlobalPan||take(W,MUTEX_RESOURCE_KEY,this._uid),each$f(this._handlers,function(Z,X){W.on(X,Z)}),this._brushType=H.brushType,this._brushOption=merge(clone$4(DEFAULT_BRUSH_OPT),H,!0)},G.prototype._doDisableBrush=function(){var H=this._zr;release(H,MUTEX_RESOURCE_KEY,this._uid),each$f(this._handlers,function(W,Z){H.off(Z,W)}),this._brushType=this._brushOption=null},G.prototype.setPanels=function(H){if(H&&H.length){var W=this._panels={};each$f(H,function(Z){W[Z.panelId]=clone$4(Z)})}else this._panels=null;return this},G.prototype.mount=function(H){H=H||{},process.env.NODE_ENV!=="production"&&(this._mounted=!0),this._enableGlobalPan=H.enableGlobalPan;var W=this.group;return this._zr.add(W),W.attr({x:H.x||0,y:H.y||0,rotation:H.rotation||0,scaleX:H.scaleX||1,scaleY:H.scaleY||1}),this._transform=W.getLocalTransform(),this},G.prototype.updateCovers=function(H){process.env.NODE_ENV!=="production"&&assert(this._mounted),H=map$1(H,function(ne){return merge(clone$4(DEFAULT_BRUSH_OPT),ne,!0)});var W="\0-brush-index-",Z=this._covers,X=this._covers=[],K=this,Q=this._creatingCover;return new DataDiffer(Z,H,te,ee).add(re).update(re).remove(ae).execute(),this;function ee(ne,ie){return(ne.id!=null?ne.id:W+ie)+"-"+ne.brushType}function te(ne,ie){return ee(ne.__brushOption,ie)}function re(ne,ie){var oe=H[ne];if(ie!=null&&Z[ie]===Q)X[ne]=Z[ie];else{var se=X[ne]=ie!=null?(Z[ie].__brushOption=oe,Z[ie]):endCreating(K,createCover(K,oe));updateCoverAfterCreation(K,se)}}function ae(ne){Z[ne]!==Q&&K.group.remove(Z[ne])}},G.prototype.unmount=function(){if(!(process.env.NODE_ENV!=="production"&&!this._mounted))return this.enableBrush(!1),clearCovers(this),this._zr.remove(this.group),process.env.NODE_ENV!=="production"&&(this._mounted=!1),this},G.prototype.dispose=function(){this.unmount(),this.off()},G})(Eventful);function createCover(U,G){var H=coverRenderers[G.brushType].createCover(U,G);return H.__brushOption=G,updateZ$3(H,G),U.group.add(H),H}function endCreating(U,G){var H=getCoverRenderer(G);return H.endCreating&&(H.endCreating(U,G),updateZ$3(G,G.__brushOption)),G}function updateCoverShape(U,G){var H=G.__brushOption;getCoverRenderer(G).updateCoverShape(U,G,H.range,H)}function updateZ$3(U,G){var H=G.z;H==null&&(H=COVER_Z),U.traverse(function(W){W.z=H,W.z2=H})}function updateCoverAfterCreation(U,G){getCoverRenderer(G).updateCommon(U,G),updateCoverShape(U,G)}function getCoverRenderer(U){return coverRenderers[U.__brushOption.brushType]}function getPanelByPoint(U,G,H){var W=U._panels;if(!W)return BRUSH_PANEL_GLOBAL;var Z,X=U._transform;return each$f(W,function(K){K.isTargetByCursor(G,H,X)&&(Z=K)}),Z}function getPanelByCover(U,G){var H=U._panels;if(!H)return BRUSH_PANEL_GLOBAL;var W=G.__brushOption.panelId;return W!=null?H[W]:BRUSH_PANEL_GLOBAL}function clearCovers(U){var G=U._covers,H=G.length;return each$f(G,function(W){U.group.remove(W)},U),G.length=0,!!H}function trigger(U,G){var H=map$1(U._covers,function(W){var Z=W.__brushOption,X=clone$4(Z.range);return{brushType:Z.brushType,panelId:Z.panelId,range:X}});U.trigger("brush",{areas:H,isEnd:!!G.isEnd,removeOnClick:!!G.removeOnClick})}function shouldShowCover(U){var G=U._track;if(!G.length)return!1;var H=G[G.length-1],W=G[0],Z=H[0]-W[0],X=H[1]-W[1],K=mathPow(Z*Z+X*X,.5);return K>UNSELECT_THRESHOLD}function getTrackEnds(U){var G=U.length-1;return G<0&&(G=0),[U[0],U[G]]}function createBaseRectCover(U,G,H,W){var Z=new Group$3;return Z.add(new Rect$2({name:"main",style:makeStyle(H),silent:!0,draggable:!0,cursor:"move",drift:curry$1(driftRect,U,G,Z,["n","s","w","e"]),ondragend:curry$1(trigger,G,{isEnd:!0})})),each$f(W,function(X){Z.add(new Rect$2({name:X.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:curry$1(driftRect,U,G,Z,X),ondragend:curry$1(trigger,G,{isEnd:!0})}))}),Z}function updateBaseRect(U,G,H,W){var Z=W.brushStyle.lineWidth||0,X=mathMax$1(Z,MIN_RESIZE_LINE_WIDTH),K=H[0][0],Q=H[1][0],ee=K-Z/2,te=Q-Z/2,re=H[0][1],ae=H[1][1],ne=re-X+Z/2,ie=ae-X+Z/2,oe=re-K,se=ae-Q,le=oe+Z,ue=se+Z;updateRectShape(U,G,"main",K,Q,oe,se),W.transformable&&(updateRectShape(U,G,"w",ee,te,X,ue),updateRectShape(U,G,"e",ne,te,X,ue),updateRectShape(U,G,"n",ee,te,le,X),updateRectShape(U,G,"s",ee,ie,le,X),updateRectShape(U,G,"nw",ee,te,X,X),updateRectShape(U,G,"ne",ne,te,X,X),updateRectShape(U,G,"sw",ee,ie,X,X),updateRectShape(U,G,"se",ne,ie,X,X))}function updateCommon$1(U,G){var H=G.__brushOption,W=H.transformable,Z=G.childAt(0);Z.useStyle(makeStyle(H)),Z.attr({silent:!W,cursor:W?"move":"default"}),each$f([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(X){var K=G.childOfName(X.join("")),Q=X.length===1?getGlobalDirection1(U,X[0]):getGlobalDirection2(U,X);K&&K.attr({silent:!W,invisible:!W,cursor:W?CURSOR_MAP[Q]+"-resize":null})})}function updateRectShape(U,G,H,W,Z,X,K){var Q=G.childOfName(H);Q&&Q.setShape(pointsToRect(clipByPanel(U,G,[[W,Z],[W+X,Z+K]])))}function makeStyle(U){return defaults({strokeNoScale:!0},U.brushStyle)}function formatRectRange(U,G,H,W){var Z=[mathMin$1(U,H),mathMin$1(G,W)],X=[mathMax$1(U,H),mathMax$1(G,W)];return[[Z[0],X[0]],[Z[1],X[1]]]}function getTransform(U){return getTransform$1(U.group)}function getGlobalDirection1(U,G){var H={w:"left",e:"right",n:"top",s:"bottom"},W={left:"w",right:"e",top:"n",bottom:"s"},Z=transformDirection(H[G],getTransform(U));return W[Z]}function getGlobalDirection2(U,G){var H=[getGlobalDirection1(U,G[0]),getGlobalDirection1(U,G[1])];return(H[0]==="e"||H[0]==="w")&&H.reverse(),H.join("")}function driftRect(U,G,H,W,Z,X){var K=H.__brushOption,Q=U.toRectRange(K.range),ee=toLocalDelta(G,Z,X);each$f(W,function(te){var re=DIRECTION_MAP[te];Q[re[0]][re[1]]+=ee[re[0]]}),K.range=U.fromRectRange(formatRectRange(Q[0][0],Q[1][0],Q[0][1],Q[1][1])),updateCoverAfterCreation(G,H),trigger(G,{isEnd:!1})}function driftPolygon(U,G,H,W){var Z=G.__brushOption.range,X=toLocalDelta(U,H,W);each$f(Z,function(K){K[0]+=X[0],K[1]+=X[1]}),updateCoverAfterCreation(U,G),trigger(U,{isEnd:!1})}function toLocalDelta(U,G,H){var W=U.group,Z=W.transformCoordToLocal(G,H),X=W.transformCoordToLocal(0,0);return[Z[0]-X[0],Z[1]-X[1]]}function clipByPanel(U,G,H){var W=getPanelByCover(U,G);return W&&W!==BRUSH_PANEL_GLOBAL?W.clipPath(H,U._transform):clone$4(H)}function pointsToRect(U){var G=mathMin$1(U[0][0],U[1][0]),H=mathMin$1(U[0][1],U[1][1]),W=mathMax$1(U[0][0],U[1][0]),Z=mathMax$1(U[0][1],U[1][1]);return{x:G,y:H,width:W-G,height:Z-H}}function resetCursor(U,G,H){if(!(!U._brushType||isOutsideZrArea(U,G.offsetX,G.offsetY))){var W=U._zr,Z=U._covers,X=getPanelByPoint(U,G,H);if(!U._dragging)for(var K=0;K<Z.length;K++){var Q=Z[K].__brushOption;if(X&&(X===BRUSH_PANEL_GLOBAL||Q.panelId===X.panelId)&&coverRenderers[Q.brushType].contain(Z[K],H[0],H[1]))return}X&&W.setCursorStyle("crosshair")}}function preventDefault(U){var G=U.event;G.preventDefault&&G.preventDefault()}function mainShapeContain(U,G,H){return U.childOfName("main").contain(G,H)}function updateCoverByMouse(U,G,H,W){var Z=U._creatingCover,X=U._creatingPanel,K=U._brushOption,Q;if(U._track.push(H.slice()),shouldShowCover(U)||Z){if(X&&!Z){K.brushMode==="single"&&clearCovers(U);var ee=clone$4(K);ee.brushType=determineBrushType(ee.brushType,X),ee.panelId=X===BRUSH_PANEL_GLOBAL?null:X.panelId,Z=U._creatingCover=createCover(U,ee),U._covers.push(Z)}if(Z){var te=coverRenderers[determineBrushType(U._brushType,X)],re=Z.__brushOption;re.range=te.getCreatingRange(clipByPanel(U,Z,U._track)),W&&(endCreating(U,Z),te.updateCommon(U,Z)),updateCoverShape(U,Z),Q={isEnd:W}}}else W&&K.brushMode==="single"&&K.removeOnClick&&getPanelByPoint(U,G,H)&&clearCovers(U)&&(Q={isEnd:W,removeOnClick:!0});return Q}function determineBrushType(U,G){return U==="auto"?(process.env.NODE_ENV!=="production"&&assert(G&&G.defaultBrushType,'MUST have defaultBrushType when brushType is "atuo"'),G.defaultBrushType):U}var pointerHandlers={mousedown:function(U){if(this._dragging)handleDragEnd(this,U);else if(!U.target||!U.target.draggable){preventDefault(U);var G=this.group.transformCoordToLocal(U.offsetX,U.offsetY);this._creatingCover=null;var H=this._creatingPanel=getPanelByPoint(this,U,G);H&&(this._dragging=!0,this._track=[G.slice()])}},mousemove:function(U){var G=U.offsetX,H=U.offsetY,W=this.group.transformCoordToLocal(G,H);if(resetCursor(this,U,W),this._dragging){preventDefault(U);var Z=updateCoverByMouse(this,U,W,!1);Z&&trigger(this,Z)}},mouseup:function(U){handleDragEnd(this,U)}};function handleDragEnd(U,G){if(U._dragging){preventDefault(G);var H=G.offsetX,W=G.offsetY,Z=U.group.transformCoordToLocal(H,W),X=updateCoverByMouse(U,G,Z,!0);U._dragging=!1,U._track=[],U._creatingCover=null,X&&trigger(U,X)}}function isOutsideZrArea(U,G,H){var W=U._zr;return G<0||G>W.getWidth()||H<0||H>W.getHeight()}var coverRenderers={lineX:getLineRenderer(0),lineY:getLineRenderer(1),rect:{createCover:function(U,G){function H(W){return W}return createBaseRectCover({toRectRange:H,fromRectRange:H},U,G,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(U){var G=getTrackEnds(U);return formatRectRange(G[1][0],G[1][1],G[0][0],G[0][1])},updateCoverShape:function(U,G,H,W){updateBaseRect(U,G,H,W)},updateCommon:updateCommon$1,contain:mainShapeContain},polygon:{createCover:function(U,G){var H=new Group$3;return H.add(new Polyline$1({name:"main",style:makeStyle(G),silent:!0})),H},getCreatingRange:function(U){return U},endCreating:function(U,G){G.remove(G.childAt(0)),G.add(new Polygon({name:"main",draggable:!0,drift:curry$1(driftPolygon,U,G),ondragend:curry$1(trigger,U,{isEnd:!0})}))},updateCoverShape:function(U,G,H,W){G.childAt(0).setShape({points:clipByPanel(U,G,H)})},updateCommon:updateCommon$1,contain:mainShapeContain}};function getLineRenderer(U){return{createCover:function(G,H){return createBaseRectCover({toRectRange:function(W){var Z=[W,[0,100]];return U&&Z.reverse(),Z},fromRectRange:function(W){return W[U]}},G,H,[[["w"],["e"]],[["n"],["s"]]][U])},getCreatingRange:function(G){var H=getTrackEnds(G),W=mathMin$1(H[0][U],H[1][U]),Z=mathMax$1(H[0][U],H[1][U]);return[W,Z]},updateCoverShape:function(G,H,W,Z){var X,K=getPanelByCover(G,H);if(K!==BRUSH_PANEL_GLOBAL&&K.getLinearBrushOtherExtent)X=K.getLinearBrushOtherExtent(U);else{var Q=G._zr;X=[0,[Q.getWidth(),Q.getHeight()][1-U]]}var ee=[W,X];U&&ee.reverse(),updateBaseRect(G,H,ee,Z)},updateCommon:updateCommon$1,contain:mainShapeContain}}function makeRectPanelClipPath(U){return U=normalizeRect(U),function(G){return clipPointsByRect(G,U)}}function makeLinearBrushOtherExtent(U,G){return U=normalizeRect(U),function(H){var W=G??H,Z=W?U.width:U.height,X=W?U.x:U.y;return[X,X+(Z||0)]}}function makeRectIsTargetByCursor(U,G,H){var W=normalizeRect(U);return function(Z,X){return W.contain(X[0],X[1])&&!onIrrelevantElement(Z,G,H)}}function normalizeRect(U){return BoundingRect.create(U)}var ParallelAxisView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H,W){U.prototype.init.apply(this,arguments),(this._brushController=new BrushController(W.getZr())).on("brush",bind$1(this._onBrush,this))},G.prototype.render=function(H,W,Z,X){if(!fromAxisAreaSelect(H,W,X)){this.axisModel=H,this.api=Z,this.group.removeAll();var K=this._axisGroup;if(this._axisGroup=new Group$3,this.group.add(this._axisGroup),!!H.get("show")){var Q=getCoordSysModel(H,W),ee=Q.coordinateSystem,te=H.getAreaSelectStyle(),re=te.width,ae=H.axis.dim,ne=ee.getAxisLayout(ae),ie=extend({strokeContainThreshold:re},ne),oe=new AxisBuilder(H,Z,ie);oe.build(),this._axisGroup.add(oe.group),this._refreshBrushController(ie,te,H,Q,re,Z),groupTransition(K,this._axisGroup,H)}}},G.prototype._refreshBrushController=function(H,W,Z,X,K,Q){var ee=Z.axis.getExtent(),te=ee[1]-ee[0],re=Math.min(30,Math.abs(te)*.1),ae=BoundingRect.create({x:ee[0],y:-K/2,width:te,height:K});ae.x-=re,ae.width+=2*re,this._brushController.mount({enableGlobalPan:!0,rotation:H.rotation,x:H.position[0],y:H.position[1]}).setPanels([{panelId:"pl",clipPath:makeRectPanelClipPath(ae),isTargetByCursor:makeRectIsTargetByCursor(ae,Q,X),getLinearBrushOtherExtent:makeLinearBrushOtherExtent(ae,0)}]).enableBrush({brushType:"lineX",brushStyle:W,removeOnClick:!0}).updateCovers(getCoverInfoList(Z))},G.prototype._onBrush=function(H){var W=H.areas,Z=this.axisModel,X=Z.axis,K=map$1(W,function(Q){return[X.coordToData(Q.range[0],!0),X.coordToData(Q.range[1],!0)]});(!Z.option.realtime===H.isEnd||H.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:Z.id,intervals:K})},G.prototype.dispose=function(){this._brushController.dispose()},G.type="parallelAxis",G})(ComponentView);function fromAxisAreaSelect(U,G,H){return H&&H.type==="axisAreaSelect"&&G.findComponents({mainType:"parallelAxis",query:H})[0]===U}function getCoverInfoList(U){var G=U.axis;return map$1(U.activeIntervals,function(H){return{brushType:"lineX",panelId:"pl",range:[G.dataToCoord(H[0],!0),G.dataToCoord(H[1],!0)]}})}function getCoordSysModel(U,G){return G.getComponent("parallel",U.get("parallelIndex"))}var actionInfo={type:"axisAreaSelect",event:"axisAreaSelected"};function installParallelActions(U){U.registerAction(actionInfo,function(G,H){H.eachComponent({mainType:"parallelAxis",query:G},function(W){W.axis.model.setActiveIntervals(G.intervals)})}),U.registerAction("parallelAxisExpand",function(G,H){H.eachComponent({mainType:"parallel",query:G},function(W){W.setAxisExpand(G)})})}var defaultAxisOption={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function install$F(U){U.registerComponentView(ParallelView),U.registerComponentModel(ParallelModel),U.registerCoordinateSystem("parallel",parallelCoordSysCreator),U.registerPreprocessor(parallelPreprocessor),U.registerComponentModel(ParallelAxisModel),U.registerComponentView(ParallelAxisView),axisModelCreator(U,"parallel",ParallelAxisModel,defaultAxisOption),installParallelActions(U)}function install$E(U){use(install$F),U.registerChartView(ParallelView$1),U.registerSeriesModel(ParallelSeriesModel),U.registerVisual(U.PRIORITY.VISUAL.BRUSH,parallelVisual)}var SankeyPathShape=(function(){function U(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return U})(),SankeyPath=(function(U){__extends(G,U);function G(H){return U.call(this,H)||this}return G.prototype.getDefaultShape=function(){return new SankeyPathShape},G.prototype.buildPath=function(H,W){var Z=W.extent;H.moveTo(W.x1,W.y1),H.bezierCurveTo(W.cpx1,W.cpy1,W.cpx2,W.cpy2,W.x2,W.y2),W.orient==="vertical"?(H.lineTo(W.x2+Z,W.y2),H.bezierCurveTo(W.cpx2+Z,W.cpy2,W.cpx1+Z,W.cpy1,W.x1+Z,W.y1)):(H.lineTo(W.x2,W.y2+Z),H.bezierCurveTo(W.cpx2,W.cpy2+Z,W.cpx1,W.cpy1+Z,W.x1,W.y1+Z)),H.closePath()},G.prototype.highlight=function(){enterEmphasis(this)},G.prototype.downplay=function(){leaveEmphasis(this)},G})(Path),SankeyView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H._mainGroup=new Group$3,H._focusAdjacencyDisabled=!1,H}return G.prototype.init=function(H,W){this._controller=new RoamController(W.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},G.prototype.render=function(H,W,Z){var X=this,K=H.getGraph(),Q=this._mainGroup,ee=H.layoutInfo,te=ee.width,re=ee.height,ae=H.getData(),ne=H.getData("edge"),ie=H.get("orient");this._model=H,Q.removeAll(),Q.x=ee.x,Q.y=ee.y,this._updateViewCoordSys(H,Z),updateController(H,Z,Q,this._controller,this._controllerHost,null),K.eachEdge(function(oe){var se=new SankeyPath,le=getECData(se);le.dataIndex=oe.dataIndex,le.seriesIndex=H.seriesIndex,le.dataType="edge";var ue=oe.getModel(),ce=ue.getModel("lineStyle"),fe=ce.get("curveness"),he=oe.node1.getLayout(),ve=oe.node1.getModel(),de=ve.get("localX"),pe=ve.get("localY"),ge=oe.node2.getLayout(),me=oe.node2.getModel(),ye=me.get("localX"),_e=me.get("localY"),xe=oe.getLayout(),Se,Te,be,Ae,we,Ce,Ee,Me;se.shape.extent=Math.max(1,xe.dy),se.shape.orient=ie,ie==="vertical"?(Se=(de!=null?de*te:he.x)+xe.sy,Te=(pe!=null?pe*re:he.y)+he.dy,be=(ye!=null?ye*te:ge.x)+xe.ty,Ae=_e!=null?_e*re:ge.y,we=Se,Ce=Te*(1-fe)+Ae*fe,Ee=be,Me=Te*fe+Ae*(1-fe)):(Se=(de!=null?de*te:he.x)+he.dx,Te=(pe!=null?pe*re:he.y)+xe.sy,be=ye!=null?ye*te:ge.x,Ae=(_e!=null?_e*re:ge.y)+xe.ty,we=Se*(1-fe)+be*fe,Ce=Te,Ee=Se*fe+be*(1-fe),Me=Ae),se.setShape({x1:Se,y1:Te,x2:be,y2:Ae,cpx1:we,cpy1:Ce,cpx2:Ee,cpy2:Me}),se.useStyle(ce.getItemStyle()),applyCurveStyle(se.style,ie,oe);var De=""+ue.get("value"),Le=getLabelStatesModels(ue,"edgeLabel");setLabelStyle(se,Le,{labelFetcher:{getFormattedLabel:function($e,Ve,Fe,ke,Re,Ne){return H.getFormattedLabel($e,Ve,"edge",ke,retrieve3(Re,Le.normal&&Le.normal.get("formatter"),De),Ne)}},labelDataIndex:oe.dataIndex,defaultText:De}),se.setTextConfig({position:"inside"});var Pe=ue.getModel("emphasis");setStatesStylesFromModel(se,ue,"lineStyle",function($e){var Ve=$e.getItemStyle();return applyCurveStyle(Ve,ie,oe),Ve}),Q.add(se),ne.setItemGraphicEl(oe.dataIndex,se);var Ie=Pe.get("focus");toggleHoverEmphasis(se,Ie==="adjacency"?oe.getAdjacentDataIndices():Ie==="trajectory"?oe.getTrajectoryDataIndices():Ie,Pe.get("blurScope"),Pe.get("disabled"))}),K.eachNode(function(oe){var se=oe.getLayout(),le=oe.getModel(),ue=le.get("localX"),ce=le.get("localY"),fe=le.getModel("emphasis"),he=le.get(["itemStyle","borderRadius"])||0,ve=new Rect$2({shape:{x:ue!=null?ue*te:se.x,y:ce!=null?ce*re:se.y,width:se.dx,height:se.dy,r:he},style:le.getModel("itemStyle").getItemStyle(),z2:10});setLabelStyle(ve,getLabelStatesModels(le),{labelFetcher:{getFormattedLabel:function(pe,ge){return H.getFormattedLabel(pe,ge,"node")}},labelDataIndex:oe.dataIndex,defaultText:oe.id}),ve.disableLabelAnimation=!0,ve.setStyle("fill",oe.getVisual("color")),ve.setStyle("decal",oe.getVisual("style").decal),setStatesStylesFromModel(ve,le),Q.add(ve),ae.setItemGraphicEl(oe.dataIndex,ve),getECData(ve).dataType="node";var de=fe.get("focus");toggleHoverEmphasis(ve,de==="adjacency"?oe.getAdjacentDataIndices():de==="trajectory"?oe.getTrajectoryDataIndices():de,fe.get("blurScope"),fe.get("disabled"))}),ae.eachItemGraphicEl(function(oe,se){var le=ae.getItemModel(se);le.get("draggable")&&(oe.drift=function(ue,ce){X._focusAdjacencyDisabled=!0,this.shape.x+=ue,this.shape.y+=ce,this.dirty(),Z.dispatchAction({type:"dragNode",seriesId:H.id,dataIndex:ae.getRawIndex(se),localX:this.shape.x/te,localY:this.shape.y/re})},oe.ondragend=function(){X._focusAdjacencyDisabled=!1},oe.draggable=!0,oe.cursor="move")}),!this._data&&H.isAnimationEnabled()&&Q.setClipPath(createGridClipShape$1(Q.getBoundingRect(),H,function(){Q.removeClipPath()})),this._data=H.getData()},G.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},G.prototype._updateViewCoordSys=function(H,W){var Z=H.layoutInfo,X=Z.width,K=Z.height,Q=H.coordinateSystem=new View(null,{api:W,ecModel:H.ecModel});Q.zoomLimit=H.get("scaleLimit"),Q.setBoundingRect(0,0,X,K),Q.setCenter(H.get("center")),Q.setZoom(H.get("zoom")),this._controllerHost.target.attr({x:Q.x,y:Q.y,scaleX:Q.scaleX,scaleY:Q.scaleY})},G.type="sankey",G})(ChartView);function applyCurveStyle(U,G,H){switch(U.fill){case"source":U.fill=H.node1.getVisual("color"),U.decal=H.node1.getVisual("style").decal;break;case"target":U.fill=H.node2.getVisual("color"),U.decal=H.node2.getVisual("style").decal;break;case"gradient":var W=H.node1.getVisual("color"),Z=H.node2.getVisual("color");isString(W)&&isString(Z)&&(U.fill=new LinearGradient(0,0,+(G==="horizontal"),+(G==="vertical"),[{color:W,offset:0},{color:Z,offset:1}]))}}function createGridClipShape$1(U,G,H){var W=new Rect$2({shape:{x:U.x-10,y:U.y-10,width:0,height:U.height+20}});return initProps(W,{shape:{width:U.width+20}},G,H),W}var SankeySeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.getInitialData=function(H,W){var Z=H.edges||H.links||[],X=H.data||H.nodes||[],K=H.levels||[];this.levelModels=[];for(var Q=this.levelModels,ee=0;ee<K.length;ee++)if(K[ee].depth!=null&&K[ee].depth>=0)Q[K[ee].depth]=new Model(K[ee],this,W);else if(process.env.NODE_ENV!=="production")throw new Error("levels[i].depth is mandatory and should be natural number");var te=createGraphFromNodeEdge(X,Z,this,!0,re);return te.data;function re(ae,ne){ae.wrapMethod("getItemModel",function(ie,oe){var se=ie.parentModel,le=se.getData().getItemLayout(oe);if(le){var ue=le.depth,ce=se.levelModels[ue];ce&&(ie.parentModel=ce)}return ie}),ne.wrapMethod("getItemModel",function(ie,oe){var se=ie.parentModel,le=se.getGraph().getEdgeByIndex(oe),ue=le.node1.getLayout();if(ue){var ce=ue.depth,fe=se.levelModels[ce];fe&&(ie.parentModel=fe)}return ie})}},G.prototype.setNodePosition=function(H,W){var Z=this.option.data||this.option.nodes,X=Z[H];X.localX=W[0],X.localY=W[1]},G.prototype.setCenter=function(H){this.option.center=H},G.prototype.setZoom=function(H){this.option.zoom=H},G.prototype.getGraph=function(){return this.getData().graph},G.prototype.getEdgeData=function(){return this.getGraph().edgeData},G.prototype.formatTooltip=function(H,W,Z){function X(ie){return isNaN(ie)||ie==null}if(Z==="edge"){var K=this.getDataParams(H,Z),Q=K.data,ee=K.value,te=Q.source+" -- "+Q.target;return createTooltipMarkup("nameValue",{name:te,value:ee,noValue:X(ee)})}else{var re=this.getGraph().getNodeByIndex(H),ae=re.getLayout().value,ne=this.getDataParams(H,Z).data.name;return createTooltipMarkup("nameValue",{name:ne!=null?ne+"":null,value:ae,noValue:X(ae)})}},G.prototype.optionUpdated=function(){},G.prototype.getDataParams=function(H,W){var Z=U.prototype.getDataParams.call(this,H,W);if(Z.value==null&&W==="node"){var X=this.getGraph().getNodeByIndex(H),K=X.getLayout().value;Z.value=K}return Z},G.type="series.sankey",G.layoutMode="box",G.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:tokens.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:tokens.color.primary}},animationEasing:"linear",animationDuration:1e3},G})(SeriesModel);function sankeyLayout(U,G){U.eachSeriesByType("sankey",function(H){var W=H.get("nodeWidth"),Z=H.get("nodeGap"),X=createBoxLayoutReference(H,G).refContainer,K=getLayoutRect(H.getBoxLayoutParams(),X);H.layoutInfo=K;var Q=K.width,ee=K.height,te=H.getGraph(),re=te.nodes,ae=te.edges;computeNodeValues(re);var ne=filter(re,function(le){return le.getLayout().value===0}),ie=ne.length!==0?0:H.get("layoutIterations"),oe=H.get("orient"),se=H.get("nodeAlign");layoutSankey(re,ae,W,Z,Q,ee,ie,oe,se)})}function layoutSankey(U,G,H,W,Z,X,K,Q,ee){computeNodeBreadths(U,G,H,Z,X,Q,ee),computeNodeDepths(U,G,X,Z,W,K,Q),computeEdgeDepths(U,Q)}function computeNodeValues(U){each$f(U,function(G){var H=sum(G.outEdges,getEdgeValue),W=sum(G.inEdges,getEdgeValue),Z=G.getValue()||0,X=Math.max(H,W,Z);G.setLayout({value:X},!0)})}function computeNodeBreadths(U,G,H,W,Z,X,K){for(var Q=[],ee=[],te=[],re=[],ae=0,ne=0;ne<G.length;ne++)Q[ne]=1;for(var ne=0;ne<U.length;ne++)ee[ne]=U[ne].inEdges.length,ee[ne]===0&&te.push(U[ne]);for(var ie=-1;te.length;){for(var oe=0;oe<te.length;oe++){var se=te[oe],le=se.hostGraph.data.getRawDataItem(se.dataIndex),ue=le.depth!=null&&le.depth>=0;ue&&le.depth>ie&&(ie=le.depth),se.setLayout({depth:ue?le.depth:ae},!0),X==="vertical"?se.setLayout({dy:H},!0):se.setLayout({dx:H},!0);for(var ce=0;ce<se.outEdges.length;ce++){var fe=se.outEdges[ce],he=G.indexOf(fe);Q[he]=0;var ve=fe.node2,de=U.indexOf(ve);--ee[de]===0&&re.indexOf(ve)<0&&re.push(ve)}}++ae,te=re,re=[]}for(var ne=0;ne<Q.length;ne++)if(Q[ne]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var pe=ie>ae-1?ie:ae-1;K&&K!=="left"&&adjustNodeWithNodeAlign(U,K,X,pe);var ge=X==="vertical"?(Z-H)/pe:(W-H)/pe;scaleNodeBreadths(U,ge,X)}function isNodeDepth(U){var G=U.hostGraph.data.getRawDataItem(U.dataIndex);return G.depth!=null&&G.depth>=0}function adjustNodeWithNodeAlign(U,G,H,W){if(G==="right"){for(var Z=[],X=U,K=0;X.length;){for(var Q=0;Q<X.length;Q++){var ee=X[Q];ee.setLayout({skNodeHeight:K},!0);for(var te=0;te<ee.inEdges.length;te++){var re=ee.inEdges[te];Z.indexOf(re.node1)<0&&Z.push(re.node1)}}X=Z,Z=[],++K}each$f(U,function(ae){isNodeDepth(ae)||ae.setLayout({depth:Math.max(0,W-ae.getLayout().skNodeHeight)},!0)})}else G==="justify"&&moveSinksRight(U,W)}function moveSinksRight(U,G){each$f(U,function(H){!isNodeDepth(H)&&!H.outEdges.length&&H.setLayout({depth:G},!0)})}function scaleNodeBreadths(U,G,H){each$f(U,function(W){var Z=W.getLayout().depth*G;H==="vertical"?W.setLayout({y:Z},!0):W.setLayout({x:Z},!0)})}function computeNodeDepths(U,G,H,W,Z,X,K){var Q=prepareNodesByBreadth(U,K);initializeNodeDepth(Q,G,H,W,Z,K),resolveCollisions(Q,Z,H,W,K);for(var ee=1;X>0;X--)ee*=.99,relaxRightToLeft(Q,ee,K),resolveCollisions(Q,Z,H,W,K),relaxLeftToRight(Q,ee,K),resolveCollisions(Q,Z,H,W,K)}function prepareNodesByBreadth(U,G){var H=[],W=G==="vertical"?"y":"x",Z=groupData(U,function(X){return X.getLayout()[W]});return Z.keys.sort(function(X,K){return X-K}),each$f(Z.keys,function(X){H.push(Z.buckets.get(X))}),H}function initializeNodeDepth(U,G,H,W,Z,X){var K=1/0;each$f(U,function(Q){var ee=Q.length,te=0;each$f(Q,function(ae){te+=ae.getLayout().value});var re=X==="vertical"?(W-(ee-1)*Z)/te:(H-(ee-1)*Z)/te;re<K&&(K=re)}),each$f(U,function(Q){each$f(Q,function(ee,te){var re=ee.getLayout().value*K;X==="vertical"?(ee.setLayout({x:te},!0),ee.setLayout({dx:re},!0)):(ee.setLayout({y:te},!0),ee.setLayout({dy:re},!0))})}),each$f(G,function(Q){var ee=+Q.getValue()*K;Q.setLayout({dy:ee},!0)})}function resolveCollisions(U,G,H,W,Z){var X=Z==="vertical"?"x":"y";each$f(U,function(K){K.sort(function(se,le){return se.getLayout()[X]-le.getLayout()[X]});for(var Q,ee,te,re=0,ae=K.length,ne=Z==="vertical"?"dx":"dy",ie=0;ie<ae;ie++)ee=K[ie],te=re-ee.getLayout()[X],te>0&&(Q=ee.getLayout()[X]+te,Z==="vertical"?ee.setLayout({x:Q},!0):ee.setLayout({y:Q},!0)),re=ee.getLayout()[X]+ee.getLayout()[ne]+G;var oe=Z==="vertical"?W:H;if(te=re-G-oe,te>0){Q=ee.getLayout()[X]-te,Z==="vertical"?ee.setLayout({x:Q},!0):ee.setLayout({y:Q},!0),re=Q;for(var ie=ae-2;ie>=0;--ie)ee=K[ie],te=ee.getLayout()[X]+ee.getLayout()[ne]+G-re,te>0&&(Q=ee.getLayout()[X]-te,Z==="vertical"?ee.setLayout({x:Q},!0):ee.setLayout({y:Q},!0)),re=ee.getLayout()[X]}})}function relaxRightToLeft(U,G,H){each$f(U.slice().reverse(),function(W){each$f(W,function(Z){if(Z.outEdges.length){var X=sum(Z.outEdges,weightedTarget,H)/sum(Z.outEdges,getEdgeValue);if(isNaN(X)){var K=Z.outEdges.length;X=K?sum(Z.outEdges,centerTarget,H)/K:0}if(H==="vertical"){var Q=Z.getLayout().x+(X-center(Z,H))*G;Z.setLayout({x:Q},!0)}else{var ee=Z.getLayout().y+(X-center(Z,H))*G;Z.setLayout({y:ee},!0)}}})})}function weightedTarget(U,G){return center(U.node2,G)*U.getValue()}function centerTarget(U,G){return center(U.node2,G)}function weightedSource(U,G){return center(U.node1,G)*U.getValue()}function centerSource(U,G){return center(U.node1,G)}function center(U,G){return G==="vertical"?U.getLayout().x+U.getLayout().dx/2:U.getLayout().y+U.getLayout().dy/2}function getEdgeValue(U){return U.getValue()}function sum(U,G,H){for(var W=0,Z=U.length,X=-1;++X<Z;){var K=+G(U[X],H);isNaN(K)||(W+=K)}return W}function relaxLeftToRight(U,G,H){each$f(U,function(W){each$f(W,function(Z){if(Z.inEdges.length){var X=sum(Z.inEdges,weightedSource,H)/sum(Z.inEdges,getEdgeValue);if(isNaN(X)){var K=Z.inEdges.length;X=K?sum(Z.inEdges,centerSource,H)/K:0}if(H==="vertical"){var Q=Z.getLayout().x+(X-center(Z,H))*G;Z.setLayout({x:Q},!0)}else{var ee=Z.getLayout().y+(X-center(Z,H))*G;Z.setLayout({y:ee},!0)}}})})}function computeEdgeDepths(U,G){var H=G==="vertical"?"x":"y";each$f(U,function(W){W.outEdges.sort(function(Z,X){return Z.node2.getLayout()[H]-X.node2.getLayout()[H]}),W.inEdges.sort(function(Z,X){return Z.node1.getLayout()[H]-X.node1.getLayout()[H]})}),each$f(U,function(W){var Z=0,X=0;each$f(W.outEdges,function(K){K.setLayout({sy:Z},!0),Z+=K.getLayout().dy}),each$f(W.inEdges,function(K){K.setLayout({ty:X},!0),X+=K.getLayout().dy})})}function sankeyVisual(U){U.eachSeriesByType("sankey",function(G){var H=G.getGraph(),W=H.nodes,Z=H.edges;if(W.length){var X=1/0,K=-1/0;each$f(W,function(Q){var ee=Q.getLayout().value;ee<X&&(X=ee),ee>K&&(K=ee)}),each$f(W,function(Q){var ee=new VisualMapping({type:"color",mappingMethod:"linear",dataExtent:[X,K],visual:G.get("color")}),te=ee.mapValueToVisual(Q.getLayout().value),re=Q.getModel().get(["itemStyle","color"]);re!=null?(Q.setVisual("color",re),Q.setVisual("style",{fill:re})):(Q.setVisual("color",te),Q.setVisual("style",{fill:te}))})}Z.length&&each$f(Z,function(Q){var ee=Q.getModel().get("lineStyle");Q.setVisual("style",ee)})})}function install$D(U){U.registerChartView(SankeyView),U.registerSeriesModel(SankeySeriesModel),U.registerLayout(sankeyLayout),U.registerVisual(sankeyVisual),U.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(G,H){H.eachComponent({mainType:"series",subType:"sankey",query:G},function(W){W.setNodePosition(G.dataIndex,[G.localX,G.localY])})}),U.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(G,H,W){H.eachComponent({mainType:"series",subType:"sankey",query:G},function(Z){var X=Z.coordinateSystem,K=updateCenterAndZoomInAction(X,G,Z.get("scaleLimit"));Z.setCenter(K.center),Z.setZoom(K.zoom)})})}var WhiskerBoxCommonMixin=(function(){function U(){}return U.prototype._hasEncodeRule=function(G){var H=this.getEncode();return H&&H.get(G)!=null},U.prototype.getInitialData=function(G,H){var W,Z=H.getComponent("xAxis",this.get("xAxisIndex")),X=H.getComponent("yAxis",this.get("yAxisIndex")),K=Z.get("type"),Q=X.get("type"),ee;K==="category"?(G.layout="horizontal",W=Z.getOrdinalMeta(),ee=!this._hasEncodeRule("x")):Q==="category"?(G.layout="vertical",W=X.getOrdinalMeta(),ee=!this._hasEncodeRule("y")):G.layout=G.layout||"horizontal";var te=["x","y"],re=G.layout==="horizontal"?0:1,ae=this._baseAxisDim=te[re],ne=te[1-re],ie=[Z,X],oe=ie[re].get("type"),se=ie[1-re].get("type"),le=G.data;if(le&&ee){var ue=[];each$f(le,function(he,ve){var de;isArray$1(he)?(de=he.slice(),he.unshift(ve)):isArray$1(he.value)?(de=extend({},he),de.value=de.value.slice(),he.value.unshift(ve)):de=he,ue.push(de)}),G.data=ue}var ce=this.defaultValueDimensions,fe=[{name:ae,type:getDimensionTypeByAxis(oe),ordinalMeta:W,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:ne,type:getDimensionTypeByAxis(se),dimsDef:ce.slice()}];return createSeriesDataSimply(this,{coordDimensions:fe,dimensionsCount:ce.length+1,encodeDefaulter:curry$1(makeSeriesEncodeForAxisCoordSys,fe,this)})},U.prototype.getBaseAxis=function(){var G=this._baseAxisDim;return this.ecModel.getComponent(G+"Axis",this.get(G+"AxisIndex")).axis},U})(),BoxplotSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],H.visualDrawType="stroke",H}return G.type="series.boxplot",G.dependencies=["xAxis","yAxis","grid"],G.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:tokens.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:tokens.color.shadow}},animationDuration:800},G})(SeriesModel);mixin(BoxplotSeriesModel,WhiskerBoxCommonMixin,!0);var BoxplotView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){var X=H.getData(),K=this.group,Q=this._data;this._data||K.removeAll();var ee=H.get("layout")==="horizontal"?1:0;X.diff(Q).add(function(te){if(X.hasValue(te)){var re=X.getItemLayout(te),ae=createNormalBox$1(re,X,te,ee,!0);X.setItemGraphicEl(te,ae),K.add(ae)}}).update(function(te,re){var ae=Q.getItemGraphicEl(re);if(!X.hasValue(te)){K.remove(ae);return}var ne=X.getItemLayout(te);ae?(saveOldStyle(ae),updateNormalBoxData(ne,ae,X,te)):ae=createNormalBox$1(ne,X,te,ee),K.add(ae),X.setItemGraphicEl(te,ae)}).remove(function(te){var re=Q.getItemGraphicEl(te);re&&K.remove(re)}).execute(),this._data=X},G.prototype.remove=function(H){var W=this.group,Z=this._data;this._data=null,Z&&Z.eachItemGraphicEl(function(X){X&&W.remove(X)})},G.type="boxplot",G})(ChartView),BoxPathShape=(function(){function U(){}return U})(),BoxPath=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="boxplotBoxPath",W}return G.prototype.getDefaultShape=function(){return new BoxPathShape},G.prototype.buildPath=function(H,W){var Z=W.points,X=0;for(H.moveTo(Z[X][0],Z[X][1]),X++;X<4;X++)H.lineTo(Z[X][0],Z[X][1]);for(H.closePath();X<Z.length;X++)H.moveTo(Z[X][0],Z[X][1]),X++,H.lineTo(Z[X][0],Z[X][1])},G})(Path);function createNormalBox$1(U,G,H,W,Z){var X=U.ends,K=new BoxPath({shape:{points:Z?transInit$1(X,W,U):X}});return updateNormalBoxData(U,K,G,H,Z),K}function updateNormalBoxData(U,G,H,W,Z){var X=H.hostModel,K=graphic[Z?"initProps":"updateProps"];K(G,{shape:{points:U.ends}},X,W),G.useStyle(H.getItemVisual(W,"style")),G.style.strokeNoScale=!0,G.z2=100;var Q=H.getItemModel(W),ee=Q.getModel("emphasis");setStatesStylesFromModel(G,Q),toggleHoverEmphasis(G,ee.get("focus"),ee.get("blurScope"),ee.get("disabled"))}function transInit$1(U,G,H){return map$1(U,function(W){return W=W.slice(),W[G]=H.initBaseline,W})}var each$9=each$f;function boxplotLayout(U){var G=groupSeriesByAxis(U);each$9(G,function(H){var W=H.seriesModels;W.length&&(calculateBase(H),each$9(W,function(Z,X){layoutSingleSeries(Z,H.boxOffsetList[X],H.boxWidthList[X])}))})}function groupSeriesByAxis(U){var G=[],H=[];return U.eachSeriesByType("boxplot",function(W){var Z=W.getBaseAxis(),X=indexOf(H,Z);X<0&&(X=H.length,H[X]=Z,G[X]={axis:Z,seriesModels:[]}),G[X].seriesModels.push(W)}),G}function calculateBase(U){var G=U.axis,H=U.seriesModels,W=H.length,Z=U.boxWidthList=[],X=U.boxOffsetList=[],K=[],Q;if(G.type==="category")Q=G.getBandWidth();else{var ee=0;each$9(H,function(oe){ee=Math.max(ee,oe.getData().count())});var te=G.getExtent();Q=Math.abs(te[1]-te[0])/ee}each$9(H,function(oe){var se=oe.get("boxWidth");isArray$1(se)||(se=[se,se]),K.push([parsePercent(se[0],Q)||0,parsePercent(se[1],Q)||0])});var re=Q*.8-2,ae=re/W*.3,ne=(re-ae*(W-1))/W,ie=ne/2-re/2;each$9(H,function(oe,se){X.push(ie),ie+=ae+ne,Z.push(Math.min(Math.max(ne,K[se][0]),K[se][1]))})}function layoutSingleSeries(U,G,H){var W=U.coordinateSystem,Z=U.getData(),X=H/2,K=U.get("layout")==="horizontal"?0:1,Q=1-K,ee=["x","y"],te=Z.mapDimension(ee[K]),re=Z.mapDimensionsAll(ee[Q]);if(te==null||re.length<5)return;for(var ae=0;ae<Z.count();ae++){var ne=Z.get(te,ae),ie=fe(ne,re[2],ae),oe=fe(ne,re[0],ae),se=fe(ne,re[1],ae),le=fe(ne,re[3],ae),ue=fe(ne,re[4],ae),ce=[];he(ce,se,!1),he(ce,le,!0),ce.push(oe,se,ue,le),ve(ce,oe),ve(ce,ue),ve(ce,ie),Z.setItemLayout(ae,{initBaseline:ie[Q],ends:ce})}function fe(de,pe,ge){var me=Z.get(pe,ge),ye=[];ye[K]=de,ye[Q]=me;var _e;return isNaN(de)||isNaN(me)?_e=[NaN,NaN]:(_e=W.dataToPoint(ye),_e[K]+=G),_e}function he(de,pe,ge){var me=pe.slice(),ye=pe.slice();me[K]+=X,ye[K]-=X,ge?de.push(me,ye):de.push(ye,me)}function ve(de,pe){var ge=pe.slice(),me=pe.slice();ge[K]-=X,me[K]+=X,de.push(ge,me)}}function prepareBoxplotData(U,G){G=G||{};for(var H=[],W=[],Z=G.boundIQR,X=Z==="none"||Z===0,K=0;K<U.length;K++){var Q=asc$2(U[K].slice()),ee=quantile(Q,.25),te=quantile(Q,.5),re=quantile(Q,.75),ae=Q[0],ne=Q[Q.length-1],ie=(Z??1.5)*(re-ee),oe=X?ae:Math.max(ae,ee-ie),se=X?ne:Math.min(ne,re+ie),le=G.itemNameFormatter,ue=isFunction(le)?le({value:K}):isString(le)?le.replace("{value}",K+""):K+"";H.push([ue,oe,ee,te,re,se]);for(var ce=0;ce<Q.length;ce++){var fe=Q[ce];if(fe<oe||fe>se){var he=[ue,fe];W.push(he)}}}return{boxData:H,outliers:W}}var boxplotTransform={type:"echarts:boxplot",transform:function U(G){var H=G.upstream;if(H.sourceFormat!==SOURCE_FORMAT_ARRAY_ROWS){var W="";process.env.NODE_ENV!=="production"&&(W=makePrintable("source data is not applicable for this boxplot transform. Expect number[][].")),throwError(W)}var Z=prepareBoxplotData(H.getRawData(),G.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:Z.boxData},{data:Z.outliers}]}};function install$C(U){U.registerSeriesModel(BoxplotSeriesModel),U.registerChartView(BoxplotView),U.registerLayout(boxplotLayout),U.registerTransform(boxplotTransform)}var positiveBorderColorQuery=["itemStyle","borderColor"],negativeBorderColorQuery=["itemStyle","borderColor0"],dojiBorderColorQuery=["itemStyle","borderColorDoji"],positiveColorQuery=["itemStyle","color"],negativeColorQuery=["itemStyle","color0"];function getColor(U,G){return G.get(U>0?positiveColorQuery:negativeColorQuery)}function getBorderColor(U,G){return G.get(U===0?dojiBorderColorQuery:U>0?positiveBorderColorQuery:negativeBorderColorQuery)}var candlestickVisual={seriesType:"candlestick",plan:createRenderPlanner(),performRawSeries:!0,reset:function(U,G){if(!G.isSeriesFiltered(U)){var H=U.pipelineContext.large;return!H&&{progress:function(W,Z){for(var X;(X=W.next())!=null;){var K=Z.getItemModel(X),Q=Z.getItemLayout(X).sign,ee=K.getItemStyle();ee.fill=getColor(Q,K),ee.stroke=getBorderColor(Q,K)||ee.fill;var te=Z.ensureUniqueItemVisual(X,"style");extend(te,ee)}}}}}},SKIP_PROPS=["color","borderColor"],CandlestickView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(H),this._isLargeDraw?this._renderLarge(H):this._renderNormal(H)},G.prototype.incrementalPrepareRender=function(H,W,Z){this._clear(),this._updateDrawMode(H)},G.prototype.incrementalRender=function(H,W,Z,X){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(H,W):this._incrementalRenderNormal(H,W)},G.prototype.eachRendered=function(H){traverseElements(this._progressiveEls||this.group,H)},G.prototype._updateDrawMode=function(H){var W=H.pipelineContext.large;(this._isLargeDraw==null||W!==this._isLargeDraw)&&(this._isLargeDraw=W,this._clear())},G.prototype._renderNormal=function(H){var W=H.getData(),Z=this._data,X=this.group,K=W.getLayout("isSimpleBox"),Q=H.get("clip",!0),ee=H.coordinateSystem,te=ee.getArea&&ee.getArea();this._data||X.removeAll(),W.diff(Z).add(function(re){if(W.hasValue(re)){var ae=W.getItemLayout(re);if(Q&&isNormalBoxClipped(te,ae))return;var ne=createNormalBox(ae,re,!0);initProps(ne,{shape:{points:ae.ends}},H,re),setBoxCommon(ne,W,re,K),X.add(ne),W.setItemGraphicEl(re,ne)}}).update(function(re,ae){var ne=Z.getItemGraphicEl(ae);if(!W.hasValue(re)){X.remove(ne);return}var ie=W.getItemLayout(re);if(Q&&isNormalBoxClipped(te,ie)){X.remove(ne);return}ne?(updateProps$1(ne,{shape:{points:ie.ends}},H,re),saveOldStyle(ne)):ne=createNormalBox(ie),setBoxCommon(ne,W,re,K),X.add(ne),W.setItemGraphicEl(re,ne)}).remove(function(re){var ae=Z.getItemGraphicEl(re);ae&&X.remove(ae)}).execute(),this._data=W},G.prototype._renderLarge=function(H){this._clear(),createLarge(H,this.group);var W=H.get("clip",!0)?createClipPath(H.coordinateSystem,!1,H):null;W?this.group.setClipPath(W):this.group.removeClipPath()},G.prototype._incrementalRenderNormal=function(H,W){for(var Z=W.getData(),X=Z.getLayout("isSimpleBox"),K;(K=H.next())!=null;){var Q=Z.getItemLayout(K),ee=createNormalBox(Q);setBoxCommon(ee,Z,K,X),ee.incremental=!0,this.group.add(ee),this._progressiveEls.push(ee)}},G.prototype._incrementalRenderLarge=function(H,W){createLarge(W,this.group,this._progressiveEls,!0)},G.prototype.remove=function(H){this._clear()},G.prototype._clear=function(){this.group.removeAll(),this._data=null},G.type="candlestick",G})(ChartView),NormalBoxPathShape=(function(){function U(){}return U})(),NormalBoxPath=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="normalCandlestickBox",W}return G.prototype.getDefaultShape=function(){return new NormalBoxPathShape},G.prototype.buildPath=function(H,W){var Z=W.points;this.__simpleBox?(H.moveTo(Z[4][0],Z[4][1]),H.lineTo(Z[6][0],Z[6][1])):(H.moveTo(Z[0][0],Z[0][1]),H.lineTo(Z[1][0],Z[1][1]),H.lineTo(Z[2][0],Z[2][1]),H.lineTo(Z[3][0],Z[3][1]),H.closePath(),H.moveTo(Z[4][0],Z[4][1]),H.lineTo(Z[5][0],Z[5][1]),H.moveTo(Z[6][0],Z[6][1]),H.lineTo(Z[7][0],Z[7][1]))},G})(Path);function createNormalBox(U,G,H){var W=U.ends;return new NormalBoxPath({shape:{points:H?transInit(W,U):W},z2:100})}function isNormalBoxClipped(U,G){for(var H=!0,W=0;W<G.ends.length;W++)if(U.contain(G.ends[W][0],G.ends[W][1])){H=!1;break}return H}function setBoxCommon(U,G,H,W){var Z=G.getItemModel(H);U.useStyle(G.getItemVisual(H,"style")),U.style.strokeNoScale=!0,U.__simpleBox=W,setStatesStylesFromModel(U,Z);var X=G.getItemLayout(H).sign;each$f(U.states,function(Q,ee){var te=Z.getModel(ee),re=getColor(X,te),ae=getBorderColor(X,te)||re,ne=Q.style||(Q.style={});re&&(ne.fill=re),ae&&(ne.stroke=ae)});var K=Z.getModel("emphasis");toggleHoverEmphasis(U,K.get("focus"),K.get("blurScope"),K.get("disabled"))}function transInit(U,G){return map$1(U,function(H){return H=H.slice(),H[1]=G.initBaseline,H})}var LargeBoxPathShape=(function(){function U(){}return U})(),LargeBoxPath=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W.type="largeCandlestickBox",W}return G.prototype.getDefaultShape=function(){return new LargeBoxPathShape},G.prototype.buildPath=function(H,W){for(var Z=W.points,X=0;X<Z.length;)if(this.__sign===Z[X++]){var K=Z[X++];H.moveTo(K,Z[X++]),H.lineTo(K,Z[X++])}else X+=3},G})(Path);function createLarge(U,G,H,W){var Z=U.getData(),X=Z.getLayout("largePoints"),K=new LargeBoxPath({shape:{points:X},__sign:1,ignoreCoarsePointer:!0});G.add(K);var Q=new LargeBoxPath({shape:{points:X},__sign:-1,ignoreCoarsePointer:!0});G.add(Q);var ee=new LargeBoxPath({shape:{points:X},__sign:0,ignoreCoarsePointer:!0});G.add(ee),setLargeStyle(1,K,U),setLargeStyle(-1,Q,U),setLargeStyle(0,ee,U),W&&(K.incremental=!0,Q.incremental=!0),H&&H.push(K,Q)}function setLargeStyle(U,G,H,W){var Z=getBorderColor(U,H)||getColor(U,H),X=H.getModel("itemStyle").getItemStyle(SKIP_PROPS);G.useStyle(X),G.style.fill=null,G.style.stroke=Z}var CandlestickSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],H}return G.prototype.getShadowDim=function(){return"open"},G.prototype.brushSelector=function(H,W,Z){var X=W.getItemLayout(H);return X&&Z.rect(X.brushRect)},G.type="series.candlestick",G.dependencies=["xAxis","yAxis","grid"],G.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},G})(SeriesModel);mixin(CandlestickSeriesModel,WhiskerBoxCommonMixin,!0);function candlestickPreprocessor(U){!U||!isArray$1(U.series)||each$f(U.series,function(G){isObject$3(G)&&G.type==="k"&&(G.type="candlestick")})}var candlestickLayout={seriesType:"candlestick",plan:createRenderPlanner(),reset:function(U){var G=U.coordinateSystem,H=U.getData(),W=calculateCandleWidth(U,H),Z=0,X=1,K=["x","y"],Q=H.getDimensionIndex(H.mapDimension(K[Z])),ee=map$1(H.mapDimensionsAll(K[X]),H.getDimensionIndex,H),te=ee[0],re=ee[1],ae=ee[2],ne=ee[3];if(H.setLayout({candleWidth:W,isSimpleBox:W<=1.3}),Q<0||ee.length<4)return;return{progress:U.pipelineContext.large?oe:ie};function ie(se,le){for(var ue,ce=le.getStore();(ue=se.next())!=null;){var fe=ce.get(Q,ue),he=ce.get(te,ue),ve=ce.get(re,ue),de=ce.get(ae,ue),pe=ce.get(ne,ue),ge=Math.min(he,ve),me=Math.max(he,ve),ye=we(ge,fe),_e=we(me,fe),xe=we(de,fe),Se=we(pe,fe),Te=[];Ce(Te,_e,0),Ce(Te,ye,1),Te.push(Me(Se),Me(_e),Me(xe),Me(ye));var be=le.getItemModel(ue),Ae=!!be.get(["itemStyle","borderColorDoji"]);le.setItemLayout(ue,{sign:getSign(ce,ue,he,ve,re,Ae),initBaseline:he>ve?_e[X]:ye[X],ends:Te,brushRect:Ee(de,pe,fe)})}function we(De,Le){var Pe=[];return Pe[Z]=Le,Pe[X]=De,isNaN(Le)||isNaN(De)?[NaN,NaN]:G.dataToPoint(Pe)}function Ce(De,Le,Pe){var Ie=Le.slice(),$e=Le.slice();Ie[Z]=subPixelOptimize(Ie[Z]+W/2,1,!1),$e[Z]=subPixelOptimize($e[Z]-W/2,1,!0),Pe?De.push(Ie,$e):De.push($e,Ie)}function Ee(De,Le,Pe){var Ie=we(De,Pe),$e=we(Le,Pe);return Ie[Z]-=W/2,$e[Z]-=W/2,{x:Ie[0],y:Ie[1],width:W,height:$e[1]-Ie[1]}}function Me(De){return De[Z]=subPixelOptimize(De[Z],1),De}}function oe(se,le){for(var ue=createFloat32Array(se.count*4),ce=0,fe,he=[],ve=[],de,pe=le.getStore(),ge=!!U.get(["itemStyle","borderColorDoji"]);(de=se.next())!=null;){var me=pe.get(Q,de),ye=pe.get(te,de),_e=pe.get(re,de),xe=pe.get(ae,de),Se=pe.get(ne,de);if(isNaN(me)||isNaN(xe)||isNaN(Se)){ue[ce++]=NaN,ce+=3;continue}ue[ce++]=getSign(pe,de,ye,_e,re,ge),he[Z]=me,he[X]=xe,fe=G.dataToPoint(he,null,ve),ue[ce++]=fe?fe[0]:NaN,ue[ce++]=fe?fe[1]:NaN,he[X]=Se,fe=G.dataToPoint(he,null,ve),ue[ce++]=fe?fe[1]:NaN}le.setLayout("largePoints",ue)}}};function getSign(U,G,H,W,Z,X){var K;return H>W?K=-1:H<W?K=1:K=X?0:G>0?U.get(Z,G-1)<=W?1:-1:1,K}function calculateCandleWidth(U,G){var H=U.getBaseAxis(),W,Z=H.type==="category"?H.getBandWidth():(W=H.getExtent(),Math.abs(W[1]-W[0])/G.count()),X=parsePercent(retrieve2(U.get("barMaxWidth"),Z),Z),K=parsePercent(retrieve2(U.get("barMinWidth"),1),Z),Q=U.get("barWidth");return Q!=null?parsePercent(Q,Z):Math.max(Math.min(Z/2,X),K)}function install$B(U){U.registerChartView(CandlestickView),U.registerSeriesModel(CandlestickSeriesModel),U.registerPreprocessor(candlestickPreprocessor),U.registerVisual(candlestickVisual),U.registerLayout(candlestickLayout)}function updateRipplePath(U,G){var H=G.rippleEffectColor||G.color;U.eachChild(function(W){W.attr({z:G.z,zlevel:G.zlevel,style:{stroke:G.brushType==="stroke"?H:null,fill:G.brushType==="fill"?H:null}})})}var EffectSymbol=(function(U){__extends(G,U);function G(H,W){var Z=U.call(this)||this,X=new Symbol$1(H,W),K=new Group$3;return Z.add(X),Z.add(K),Z.updateData(H,W),Z}return G.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},G.prototype.startEffectAnimation=function(H){for(var W=H.symbolType,Z=H.color,X=H.rippleNumber,K=this.childAt(1),Q=0;Q<X;Q++){var ee=createSymbol$1(W,-1,-1,2,2,Z);ee.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var te=-Q/X*H.period+H.effectOffset;ee.animate("",!0).when(H.period,{scaleX:H.rippleScale/2,scaleY:H.rippleScale/2}).delay(te).start(),ee.animateStyle(!0).when(H.period,{opacity:0}).delay(te).start(),K.add(ee)}updateRipplePath(K,H)},G.prototype.updateEffectAnimation=function(H){for(var W=this._effectCfg,Z=this.childAt(1),X=["symbolType","period","rippleScale","rippleNumber"],K=0;K<X.length;K++){var Q=X[K];if(W[Q]!==H[Q]){this.stopEffectAnimation(),this.startEffectAnimation(H);return}}updateRipplePath(Z,H)},G.prototype.highlight=function(){enterEmphasis(this)},G.prototype.downplay=function(){leaveEmphasis(this)},G.prototype.getSymbolType=function(){var H=this.childAt(0);return H&&H.getSymbolType()},G.prototype.updateData=function(H,W){var Z=this,X=H.hostModel;this.childAt(0).updateData(H,W);var K=this.childAt(1),Q=H.getItemModel(W),ee=H.getItemVisual(W,"symbol"),te=normalizeSymbolSize(H.getItemVisual(W,"symbolSize")),re=H.getItemVisual(W,"style"),ae=re&&re.fill,ne=Q.getModel("emphasis");K.setScale(te),K.traverse(function(le){le.setStyle("fill",ae)});var ie=normalizeSymbolOffset(H.getItemVisual(W,"symbolOffset"),te);ie&&(K.x=ie[0],K.y=ie[1]);var oe=H.getItemVisual(W,"symbolRotate");K.rotation=(oe||0)*Math.PI/180||0;var se={};se.showEffectOn=X.get("showEffectOn"),se.rippleScale=Q.get(["rippleEffect","scale"]),se.brushType=Q.get(["rippleEffect","brushType"]),se.period=Q.get(["rippleEffect","period"])*1e3,se.effectOffset=W/H.count(),se.z=X.getShallow("z")||0,se.zlevel=X.getShallow("zlevel")||0,se.symbolType=ee,se.color=ae,se.rippleEffectColor=Q.get(["rippleEffect","color"]),se.rippleNumber=Q.get(["rippleEffect","number"]),se.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(se):this.startEffectAnimation(se),this._effectCfg=se):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(le){le==="emphasis"?se.showEffectOn!=="render"&&Z.startEffectAnimation(se):le==="normal"&&se.showEffectOn!=="render"&&Z.stopEffectAnimation()}),this._effectCfg=se,toggleHoverEmphasis(this,ne.get("focus"),ne.get("blurScope"),ne.get("disabled"))},G.prototype.fadeOut=function(H){H&&H()},G})(Group$3),EffectScatterView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(){this._symbolDraw=new SymbolDraw(EffectSymbol)},G.prototype.render=function(H,W,Z){var X=H.getData(),K=this._symbolDraw;K.updateData(X,{clipShape:this._getClipShape(H)}),this.group.add(K.group)},G.prototype._getClipShape=function(H){var W=H.coordinateSystem,Z=W&&W.getArea&&W.getArea();return H.get("clip",!0)?Z:null},G.prototype.updateTransform=function(H,W,Z){var X=H.getData();this.group.dirty();var K=pointsLayout("").reset(H,W,Z);K.progress&&K.progress({start:0,end:X.count(),count:X.count()},X),this._symbolDraw.updateLayout()},G.prototype._updateGroupTransform=function(H){var W=H.coordinateSystem;W&&W.getRoamTransform&&(this.group.transform=clone$2(W.getRoamTransform()),this.group.decomposeTransform())},G.prototype.remove=function(H,W){this._symbolDraw&&this._symbolDraw.remove(!0)},G.type="effectScatter",G})(ChartView),EffectScatterSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.hasSymbolVisual=!0,H}return G.prototype.getInitialData=function(H,W){return createSeriesData$1(null,this,{useEncodeDefaulter:!0})},G.prototype.brushSelector=function(H,W,Z){return Z.point(W.getItemLayout(H))},G.type="series.effectScatter",G.dependencies=["grid","polar"],G.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},G})(SeriesModel);function install$A(U){U.registerChartView(EffectScatterView),U.registerSeriesModel(EffectScatterSeriesModel),U.registerLayout(pointsLayout("effectScatter"))}var EffectLine=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this)||this;return X.add(X.createLine(H,W,Z)),X._updateEffectSymbol(H,W),X}return G.prototype.createLine=function(H,W,Z){return new Line(H,W,Z)},G.prototype._updateEffectSymbol=function(H,W){var Z=H.getItemModel(W),X=Z.getModel("effect"),K=X.get("symbolSize"),Q=X.get("symbol");isArray$1(K)||(K=[K,K]);var ee=H.getItemVisual(W,"style"),te=X.get("color")||ee&&ee.stroke,re=this.childAt(1);this._symbolType!==Q&&(this.remove(re),re=createSymbol$1(Q,-.5,-.5,1,1,te),re.z2=100,re.culling=!0,this.add(re)),re&&(re.setStyle("shadowColor",te),re.setStyle(X.getItemStyle(["color"])),re.scaleX=K[0],re.scaleY=K[1],re.setColor(te),this._symbolType=Q,this._symbolScale=K,this._updateEffectAnimation(H,X,W))},G.prototype._updateEffectAnimation=function(H,W,Z){var X=this.childAt(1);if(X){var K=H.getItemLayout(Z),Q=W.get("period")*1e3,ee=W.get("loop"),te=W.get("roundTrip"),re=W.get("constantSpeed"),ae=retrieve(W.get("delay"),function(ie){return ie/H.count()*Q/3});if(X.ignore=!0,this._updateAnimationPoints(X,K),re>0&&(Q=this._getLineLength(X)/re*1e3),Q!==this._period||ee!==this._loop||te!==this._roundTrip){X.stopAnimation();var ne=void 0;isFunction(ae)?ne=ae(Z):ne=ae,X.__t>0&&(ne=-Q*X.__t),this._animateSymbol(X,Q,ne,ee,te)}this._period=Q,this._loop=ee,this._roundTrip=te}},G.prototype._animateSymbol=function(H,W,Z,X,K){if(W>0){H.__t=0;var Q=this,ee=H.animate("",X).when(K?W*2:W,{__t:K?2:1}).delay(Z).during(function(){Q._updateSymbolPosition(H)});X||ee.done(function(){Q.remove(H)}),ee.start()}},G.prototype._getLineLength=function(H){return dist$1(H.__p1,H.__cp1)+dist$1(H.__cp1,H.__p2)},G.prototype._updateAnimationPoints=function(H,W){H.__p1=W[0],H.__p2=W[1],H.__cp1=W[2]||[(W[0][0]+W[1][0])/2,(W[0][1]+W[1][1])/2]},G.prototype.updateData=function(H,W,Z){this.childAt(0).updateData(H,W,Z),this._updateEffectSymbol(H,W)},G.prototype._updateSymbolPosition=function(H){var W=H.__p1,Z=H.__p2,X=H.__cp1,K=H.__t<1?H.__t:2-H.__t,Q=[H.x,H.y],ee=Q.slice(),te=quadraticAt$1,re=quadraticDerivativeAt;Q[0]=te(W[0],X[0],Z[0],K),Q[1]=te(W[1],X[1],Z[1],K);var ae=H.__t<1?re(W[0],X[0],Z[0],K):re(Z[0],X[0],W[0],1-K),ne=H.__t<1?re(W[1],X[1],Z[1],K):re(Z[1],X[1],W[1],1-K);H.rotation=-Math.atan2(ne,ae)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(H.__lastT!==void 0&&H.__lastT<H.__t?(H.scaleY=dist$1(ee,Q)*1.05,K===1&&(Q[0]=ee[0]+(Q[0]-ee[0])/2,Q[1]=ee[1]+(Q[1]-ee[1])/2)):H.__lastT===1?H.scaleY=2*dist$1(W,Q):H.scaleY=this._symbolScale[1]),H.__lastT=H.__t,H.ignore=!1,H.x=Q[0],H.y=Q[1]},G.prototype.updateLayout=function(H,W){this.childAt(0).updateLayout(H,W);var Z=H.getItemModel(W).getModel("effect");this._updateEffectAnimation(H,Z,W)},G})(Group$3),Polyline=(function(U){__extends(G,U);function G(H,W,Z){var X=U.call(this)||this;return X._createPolyline(H,W,Z),X}return G.prototype._createPolyline=function(H,W,Z){var X=H.getItemLayout(W),K=new Polyline$1({shape:{points:X}});this.add(K),this._updateCommonStl(H,W,Z)},G.prototype.updateData=function(H,W,Z){var X=H.hostModel,K=this.childAt(0),Q={shape:{points:H.getItemLayout(W)}};updateProps$1(K,Q,X,W),this._updateCommonStl(H,W,Z)},G.prototype._updateCommonStl=function(H,W,Z){var X=this.childAt(0),K=H.getItemModel(W),Q=Z&&Z.emphasisLineStyle,ee=Z&&Z.focus,te=Z&&Z.blurScope,re=Z&&Z.emphasisDisabled;if(!Z||H.hasItemOption){var ae=K.getModel("emphasis");Q=ae.getModel("lineStyle").getLineStyle(),re=ae.get("disabled"),ee=ae.get("focus"),te=ae.get("blurScope")}X.useStyle(H.getItemVisual(W,"style")),X.style.fill=null,X.style.strokeNoScale=!0;var ne=X.ensureState("emphasis");ne.style=Q,toggleHoverEmphasis(this,ee,te,re)},G.prototype.updateLayout=function(H,W){var Z=this.childAt(0);Z.setShape("points",H.getItemLayout(W))},G})(Group$3),EffectPolyline=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H._lastFrame=0,H._lastFramePercent=0,H}return G.prototype.createLine=function(H,W,Z){return new Polyline(H,W,Z)},G.prototype._updateAnimationPoints=function(H,W){this._points=W;for(var Z=[0],X=0,K=1;K<W.length;K++){var Q=W[K-1],ee=W[K];X+=dist$1(Q,ee),Z.push(X)}if(X===0){this._length=0;return}for(var K=0;K<Z.length;K++)Z[K]/=X;this._offsets=Z,this._length=X},G.prototype._getLineLength=function(){return this._length},G.prototype._updateSymbolPosition=function(H){var W=H.__t<1?H.__t:2-H.__t,Z=this._points,X=this._offsets,K=Z.length;if(X){var Q=this._lastFrame,ee;if(W<this._lastFramePercent){var te=Math.min(Q+1,K-1);for(ee=te;ee>=0&&!(X[ee]<=W);ee--);ee=Math.min(ee,K-2)}else{for(ee=Q;ee<K&&!(X[ee]>W);ee++);ee=Math.min(ee-1,K-2)}var re=(W-X[ee])/(X[ee+1]-X[ee]),ae=Z[ee],ne=Z[ee+1];H.x=ae[0]*(1-re)+re*ne[0],H.y=ae[1]*(1-re)+re*ne[1];var ie=H.__t<1?ne[0]-ae[0]:ae[0]-ne[0],oe=H.__t<1?ne[1]-ae[1]:ae[1]-ne[1];H.rotation=-Math.atan2(oe,ie)-Math.PI/2,this._lastFrame=ee,this._lastFramePercent=W,H.ignore=!1}},G})(EffectLine),LargeLinesPathShape=(function(){function U(){this.polyline=!1,this.curveness=0,this.segs=[]}return U})(),LargeLinesPath=(function(U){__extends(G,U);function G(H){var W=U.call(this,H)||this;return W._off=0,W.hoverDataIdx=-1,W}return G.prototype.reset=function(){this.notClear=!1,this._off=0},G.prototype.getDefaultStyle=function(){return{stroke:tokens.color.neutral99,fill:null}},G.prototype.getDefaultShape=function(){return new LargeLinesPathShape},G.prototype.buildPath=function(H,W){var Z=W.segs,X=W.curveness,K;if(W.polyline)for(K=this._off;K<Z.length;){var Q=Z[K++];if(Q>0){H.moveTo(Z[K++],Z[K++]);for(var ee=1;ee<Q;ee++)H.lineTo(Z[K++],Z[K++])}}else for(K=this._off;K<Z.length;){var te=Z[K++],re=Z[K++],ae=Z[K++],ne=Z[K++];if(H.moveTo(te,re),X>0){var ie=(te+ae)/2-(re-ne)*X,oe=(re+ne)/2-(ae-te)*X;H.quadraticCurveTo(ie,oe,ae,ne)}else H.lineTo(ae,ne)}this.incremental&&(this._off=K,this.notClear=!0)},G.prototype.findDataIndex=function(H,W){var Z=this.shape,X=Z.segs,K=Z.curveness,Q=this.style.lineWidth;if(Z.polyline)for(var ee=0,te=0;te<X.length;){var re=X[te++];if(re>0)for(var ae=X[te++],ne=X[te++],ie=1;ie<re;ie++){var oe=X[te++],se=X[te++];if(containStroke$4(ae,ne,oe,se,Q,H,W))return ee}ee++}else for(var ee=0,te=0;te<X.length;){var ae=X[te++],ne=X[te++],oe=X[te++],se=X[te++];if(K>0){var le=(ae+oe)/2-(ne-se)*K,ue=(ne+se)/2-(oe-ae)*K;if(containStroke$2(ae,ne,le,ue,oe,se,Q,H,W))return ee}else if(containStroke$4(ae,ne,oe,se,Q,H,W))return ee;ee++}return-1},G.prototype.contain=function(H,W){var Z=this.transformCoordToLocal(H,W),X=this.getBoundingRect();if(H=Z[0],W=Z[1],X.contain(H,W)){var K=this.hoverDataIdx=this.findDataIndex(H,W);return K>=0}return this.hoverDataIdx=-1,!1},G.prototype.getBoundingRect=function(){var H=this._rect;if(!H){for(var W=this.shape,Z=W.segs,X=1/0,K=1/0,Q=-1/0,ee=-1/0,te=0;te<Z.length;){var re=Z[te++],ae=Z[te++];X=Math.min(re,X),Q=Math.max(re,Q),K=Math.min(ae,K),ee=Math.max(ae,ee)}H=this._rect=new BoundingRect(X,K,Q,ee)}return H},G})(Path),LargeLineDraw=(function(){function U(){this.group=new Group$3}return U.prototype.updateData=function(G){this._clear();var H=this._create();H.setShape({segs:G.getLayout("linesPoints")}),this._setCommon(H,G)},U.prototype.incrementalPrepareUpdate=function(G){this.group.removeAll(),this._clear()},U.prototype.incrementalUpdate=function(G,H){var W=this._newAdded[0],Z=H.getLayout("linesPoints"),X=W&&W.shape.segs;if(X&&X.length<2e4){var K=X.length,Q=new Float32Array(K+Z.length);Q.set(X),Q.set(Z,K),W.setShape({segs:Q})}else{this._newAdded=[];var ee=this._create();ee.incremental=!0,ee.setShape({segs:Z}),this._setCommon(ee,H),ee.__startIndex=G.start}},U.prototype.remove=function(){this._clear()},U.prototype.eachRendered=function(G){this._newAdded[0]&&G(this._newAdded[0])},U.prototype._create=function(){var G=new LargeLinesPath({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(G),this.group.add(G),G},U.prototype._setCommon=function(G,H,W){var Z=H.hostModel;G.setShape({polyline:Z.get("polyline"),curveness:Z.get(["lineStyle","curveness"])}),G.useStyle(Z.getModel("lineStyle").getLineStyle()),G.style.strokeNoScale=!0;var X=H.getVisual("style");X&&X.stroke&&G.setStyle("stroke",X.stroke),G.setStyle("fill",null);var K=getECData(G);K.seriesIndex=Z.seriesIndex,G.on("mousemove",function(Q){K.dataIndex=null;var ee=G.hoverDataIdx;ee>0&&(K.dataIndex=ee+G.__startIndex)})},U.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},U})(),linesLayout={seriesType:"lines",plan:createRenderPlanner(),reset:function(U){var G=U.coordinateSystem;if(!G){process.env.NODE_ENV!=="production"&&error("The lines series must have a coordinate system.");return}var H=U.get("polyline"),W=U.pipelineContext.large;return{progress:function(Z,X){var K=[];if(W){var Q=void 0,ee=Z.end-Z.start;if(H){for(var te=0,re=Z.start;re<Z.end;re++)te+=U.getLineCoordsCount(re);Q=new Float32Array(ee+te*2)}else Q=new Float32Array(ee*4);for(var ae=0,ne=[],re=Z.start;re<Z.end;re++){var ie=U.getLineCoords(re,K);H&&(Q[ae++]=ie);for(var oe=0;oe<ie;oe++)ne=G.dataToPoint(K[oe],!1,ne),Q[ae++]=ne[0],Q[ae++]=ne[1]}X.setLayout("linesPoints",Q)}else for(var re=Z.start;re<Z.end;re++){var se=X.getItemModel(re),ie=U.getLineCoords(re,K),le=[];if(H)for(var ue=0;ue<ie;ue++)le.push(G.dataToPoint(K[ue]));else{le[0]=G.dataToPoint(K[0]),le[1]=G.dataToPoint(K[1]);var ce=se.get(["lineStyle","curveness"]);+ce&&(le[2]=[(le[0][0]+le[1][0])/2-(le[0][1]-le[1][1])*ce,(le[0][1]+le[1][1])/2-(le[1][0]-le[0][0])*ce])}X.setItemLayout(re,le)}}}}},LinesView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){var X=H.getData(),K=this._updateLineDraw(X,H),Q=H.get("zlevel"),ee=H.get(["effect","trailLength"]),te=Z.getZr(),re=te.painter.getType()==="svg";re||te.painter.getLayer(Q).clear(!0),this._lastZlevel!=null&&!re&&te.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(H)&&ee>0&&(re?process.env.NODE_ENV!=="production"&&console.warn("SVG render mode doesn't support lines with trail effect"):te.configLayer(Q,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(ee/10+.9,1),0)})),K.updateData(X);var ae=H.get("clip",!0)&&createClipPath(H.coordinateSystem,!1,H);ae?this.group.setClipPath(ae):this.group.removeClipPath(),this._lastZlevel=Q,this._finished=!0},G.prototype.incrementalPrepareRender=function(H,W,Z){var X=H.getData(),K=this._updateLineDraw(X,H);K.incrementalPrepareUpdate(X),this._clearLayer(Z),this._finished=!1},G.prototype.incrementalRender=function(H,W,Z){this._lineDraw.incrementalUpdate(H,W.getData()),this._finished=H.end===W.getData().count()},G.prototype.eachRendered=function(H){this._lineDraw&&this._lineDraw.eachRendered(H)},G.prototype.updateTransform=function(H,W,Z){var X=H.getData(),K=H.pipelineContext;if(!this._finished||K.large||K.progressiveRender)return{update:!0};var Q=linesLayout.reset(H,W,Z);Q.progress&&Q.progress({start:0,end:X.count(),count:X.count()},X),this._lineDraw.updateLayout(),this._clearLayer(Z)},G.prototype._updateLineDraw=function(H,W){var Z=this._lineDraw,X=this._showEffect(W),K=!!W.get("polyline"),Q=W.pipelineContext,ee=Q.large;return process.env.NODE_ENV!=="production"&&X&&ee&&console.warn("Large lines not support effect"),(!Z||X!==this._hasEffet||K!==this._isPolyline||ee!==this._isLargeDraw)&&(Z&&Z.remove(),Z=this._lineDraw=ee?new LargeLineDraw:new LineDraw(K?X?EffectPolyline:Polyline:X?EffectLine:Line),this._hasEffet=X,this._isPolyline=K,this._isLargeDraw=ee),this.group.add(Z.group),Z},G.prototype._showEffect=function(H){return!!H.get(["effect","show"])},G.prototype._clearLayer=function(H){var W=H.getZr(),Z=W.painter.getType()==="svg";!Z&&this._lastZlevel!=null&&W.painter.getLayer(this._lastZlevel).clear(!0)},G.prototype.remove=function(H,W){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(W)},G.prototype.dispose=function(H,W){this.remove(H,W)},G.type="lines",G})(ChartView),Uint32Arr=typeof Uint32Array>"u"?Array:Uint32Array,Float64Arr=typeof Float64Array>"u"?Array:Float64Array;function compatEc2(U){var G=U.data;G&&G[0]&&G[0][0]&&G[0][0].coord&&(process.env.NODE_ENV!=="production"&&console.warn("Lines data configuration has been changed to { coords:[[1,2],[2,3]] }"),U.data=map$1(G,function(H){var W=[H[0].coord,H[1].coord],Z={coords:W};return H[0].name&&(Z.fromName=H[0].name),H[1].name&&(Z.toName=H[1].name),mergeAll([Z,H[0],H[1]])}))}var LinesSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.visualStyleAccessPath="lineStyle",H.visualDrawType="stroke",H}return G.prototype.init=function(H){H.data=H.data||[],compatEc2(H);var W=this._processFlatCoordsArray(H.data);this._flatCoords=W.flatCoords,this._flatCoordsOffset=W.flatCoordsOffset,W.flatCoords&&(H.data=new Float32Array(W.count)),U.prototype.init.apply(this,arguments)},G.prototype.mergeOption=function(H){if(compatEc2(H),H.data){var W=this._processFlatCoordsArray(H.data);this._flatCoords=W.flatCoords,this._flatCoordsOffset=W.flatCoordsOffset,W.flatCoords&&(H.data=new Float32Array(W.count))}U.prototype.mergeOption.apply(this,arguments)},G.prototype.appendData=function(H){var W=this._processFlatCoordsArray(H.data);W.flatCoords&&(this._flatCoords?(this._flatCoords=concatArray(this._flatCoords,W.flatCoords),this._flatCoordsOffset=concatArray(this._flatCoordsOffset,W.flatCoordsOffset)):(this._flatCoords=W.flatCoords,this._flatCoordsOffset=W.flatCoordsOffset),H.data=new Float32Array(W.count)),this.getRawData().appendData(H.data)},G.prototype._getCoordsFromItemModel=function(H){var W=this.getData().getItemModel(H),Z=W.option instanceof Array?W.option:W.getShallow("coords");if(process.env.NODE_ENV!=="production"&&!(Z instanceof Array&&Z.length>0&&Z[0]instanceof Array))throw new Error("Invalid coords "+JSON.stringify(Z)+". Lines must have 2d coords array in data item.");return Z},G.prototype.getLineCoordsCount=function(H){return this._flatCoordsOffset?this._flatCoordsOffset[H*2+1]:this._getCoordsFromItemModel(H).length},G.prototype.getLineCoords=function(H,W){if(this._flatCoordsOffset){for(var Z=this._flatCoordsOffset[H*2],X=this._flatCoordsOffset[H*2+1],K=0;K<X;K++)W[K]=W[K]||[],W[K][0]=this._flatCoords[Z+K*2],W[K][1]=this._flatCoords[Z+K*2+1];return X}else{for(var Q=this._getCoordsFromItemModel(H),K=0;K<Q.length;K++)W[K]=W[K]||[],W[K][0]=Q[K][0],W[K][1]=Q[K][1];return Q.length}},G.prototype._processFlatCoordsArray=function(H){var W=0;if(this._flatCoords&&(W=this._flatCoords.length),isNumber(H[0])){for(var Z=H.length,X=new Uint32Arr(Z),K=new Float64Arr(Z),Q=0,ee=0,te=0,re=0;re<Z;){te++;var ae=H[re++];X[ee++]=Q+W,X[ee++]=ae;for(var ne=0;ne<ae;ne++){var ie=H[re++],oe=H[re++];if(K[Q++]=ie,K[Q++]=oe,re>Z&&process.env.NODE_ENV!=="production")throw new Error("Invalid data format.")}}return{flatCoordsOffset:new Uint32Array(X.buffer,0,ee),flatCoords:K,count:te}}return{flatCoordsOffset:null,flatCoords:null,count:H.length}},G.prototype.getInitialData=function(H,W){if(process.env.NODE_ENV!=="production"){var Z=CoordinateSystemManager.get(H.coordinateSystem);if(!Z)throw new Error("Unknown coordinate system "+H.coordinateSystem)}var X=new SeriesData(["value"],this);return X.hasItemOption=!1,X.initData(H.data,[],function(K,Q,ee,te){if(K instanceof Array)return NaN;X.hasItemOption=!0;var re=K.value;if(re!=null)return re instanceof Array?re[te]:re}),X},G.prototype.formatTooltip=function(H,W,Z){var X=this.getData(),K=X.getItemModel(H),Q=K.get("name");if(Q)return Q;var ee=K.get("fromName"),te=K.get("toName"),re=[];return ee!=null&&re.push(ee),te!=null&&re.push(te),createTooltipMarkup("nameValue",{name:re.join(" > ")})},G.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},G.prototype.getProgressive=function(){var H=this.option.progressive;return H??(this.option.large?1e4:this.get("progressive"))},G.prototype.getProgressiveThreshold=function(){var H=this.option.progressiveThreshold;return H??(this.option.large?2e4:this.get("progressiveThreshold"))},G.prototype.getZLevelKey=function(){var H=this.getModel("effect"),W=H.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:H.get("show")&&W>0?W+"":""},G.type="series.lines",G.dependencies=["grid","polar","geo","calendar"],G.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},G})(SeriesModel);function normalize(U){return U instanceof Array||(U=[U,U]),U}var linesVisual={seriesType:"lines",reset:function(U){var G=normalize(U.get("symbol")),H=normalize(U.get("symbolSize")),W=U.getData();W.setVisual("fromSymbol",G&&G[0]),W.setVisual("toSymbol",G&&G[1]),W.setVisual("fromSymbolSize",H&&H[0]),W.setVisual("toSymbolSize",H&&H[1]);function Z(X,K){var Q=X.getItemModel(K),ee=normalize(Q.getShallow("symbol",!0)),te=normalize(Q.getShallow("symbolSize",!0));ee[0]&&X.setItemVisual(K,"fromSymbol",ee[0]),ee[1]&&X.setItemVisual(K,"toSymbol",ee[1]),te[0]&&X.setItemVisual(K,"fromSymbolSize",te[0]),te[1]&&X.setItemVisual(K,"toSymbolSize",te[1])}return{dataEach:W.hasItemOption?Z:null}}};function install$z(U){U.registerChartView(LinesView),U.registerSeriesModel(LinesSeriesModel),U.registerLayout(linesLayout),U.registerVisual(linesVisual)}var GRADIENT_LEVELS=256,HeatmapLayer=(function(){function U(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var G=platformApi.createCanvas();this.canvas=G}return U.prototype.update=function(G,H,W,Z,X,K){var Q=this._getBrush(),ee=this._getGradient(X,"inRange"),te=this._getGradient(X,"outOfRange"),re=this.pointSize+this.blurSize,ae=this.canvas,ne=ae.getContext("2d"),ie=G.length;ae.width=H,ae.height=W;for(var oe=0;oe<ie;++oe){var se=G[oe],le=se[0],ue=se[1],ce=se[2],fe=Z(ce);ne.globalAlpha=fe,ne.drawImage(Q,le-re,ue-re)}if(!ae.width||!ae.height)return ae;for(var he=ne.getImageData(0,0,ae.width,ae.height),ve=he.data,de=0,pe=ve.length,ge=this.minOpacity,me=this.maxOpacity,ye=me-ge;de<pe;){var fe=ve[de+3]/256,_e=Math.floor(fe*(GRADIENT_LEVELS-1))*4;if(fe>0){var xe=K(fe)?ee:te;fe>0&&(fe=fe*ye+ge),ve[de++]=xe[_e],ve[de++]=xe[_e+1],ve[de++]=xe[_e+2],ve[de++]=xe[_e+3]*fe*256}else de+=4}return ne.putImageData(he,0,0),ae},U.prototype._getBrush=function(){var G=this._brushCanvas||(this._brushCanvas=platformApi.createCanvas()),H=this.pointSize+this.blurSize,W=H*2;G.width=W,G.height=W;var Z=G.getContext("2d");return Z.clearRect(0,0,W,W),Z.shadowOffsetX=W,Z.shadowBlur=this.blurSize,Z.shadowColor=tokens.color.neutral99,Z.beginPath(),Z.arc(-H,H,this.pointSize,0,Math.PI*2,!0),Z.closePath(),Z.fill(),G},U.prototype._getGradient=function(G,H){for(var W=this._gradientPixels,Z=W[H]||(W[H]=new Uint8ClampedArray(256*4)),X=[0,0,0,0],K=0,Q=0;Q<256;Q++)G[H](Q/255,!0,X),Z[K++]=X[0],Z[K++]=X[1],Z[K++]=X[2],Z[K++]=X[3];return Z},U})();function getIsInPiecewiseRange(U,G,H){var W=U[1]-U[0];G=map$1(G,function(K){return{interval:[(K.interval[0]-U[0])/W,(K.interval[1]-U[0])/W]}});var Z=G.length,X=0;return function(K){var Q;for(Q=X;Q<Z;Q++){var ee=G[Q].interval;if(ee[0]<=K&&K<=ee[1]){X=Q;break}}if(Q===Z)for(Q=X-1;Q>=0;Q--){var ee=G[Q].interval;if(ee[0]<=K&&K<=ee[1]){X=Q;break}}return Q>=0&&Q<Z&&H[Q]}}function getIsInContinuousRange(U,G){var H=U[1]-U[0];return G=[(G[0]-U[0])/H,(G[1]-U[0])/H],function(W){return W>=G[0]&&W<=G[1]}}function isGeoCoordSys(U){var G=U.dimensions;return G[0]==="lng"&&G[1]==="lat"}var HeatmapView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){var X;if(W.eachComponent("visualMap",function(Q){Q.eachTargetSeries(function(ee){ee===H&&(X=Q)})}),process.env.NODE_ENV!=="production"&&!X)throw new Error("Heatmap must use with visualMap");this._progressiveEls=null,this.group.removeAll();var K=H.coordinateSystem;K.type==="cartesian2d"||K.type==="calendar"||K.type==="matrix"?this._renderOnGridLike(H,Z,0,H.getData().count()):isGeoCoordSys(K)&&this._renderOnGeo(K,H,X,Z)},G.prototype.incrementalPrepareRender=function(H,W,Z){this.group.removeAll()},G.prototype.incrementalRender=function(H,W,Z,X){var K=W.coordinateSystem;K&&(isGeoCoordSys(K)?this.render(W,Z,X):(this._progressiveEls=[],this._renderOnGridLike(W,X,H.start,H.end,!0)))},G.prototype.eachRendered=function(H){traverseElements(this._progressiveEls||this.group,H)},G.prototype._renderOnGridLike=function(H,W,Z,X,K){var Q=H.coordinateSystem,ee=isCoordinateSystemType(Q,"cartesian2d"),te=isCoordinateSystemType(Q,"matrix"),re,ae,ne,ie;if(ee){var oe=Q.getAxis("x"),se=Q.getAxis("y");if(process.env.NODE_ENV!=="production"){if(!(oe.type==="category"&&se.type==="category"))throw new Error("Heatmap on cartesian must have two category axes");if(!(oe.onBand&&se.onBand))throw new Error("Heatmap on cartesian must have two axes with boundaryGap true")}re=oe.getBandWidth()+.5,ae=se.getBandWidth()+.5,ne=oe.scale.getExtent(),ie=se.scale.getExtent()}for(var le=this.group,ue=H.getData(),ce=H.getModel(["emphasis","itemStyle"]).getItemStyle(),fe=H.getModel(["blur","itemStyle"]).getItemStyle(),he=H.getModel(["select","itemStyle"]).getItemStyle(),ve=H.get(["itemStyle","borderRadius"]),de=getLabelStatesModels(H),pe=H.getModel("emphasis"),ge=pe.get("focus"),me=pe.get("blurScope"),ye=pe.get("disabled"),_e=ee||te?[ue.mapDimension("x"),ue.mapDimension("y"),ue.mapDimension("value")]:[ue.mapDimension("time"),ue.mapDimension("value")],xe=Z;xe<X;xe++){var Se=void 0,Te=ue.getItemVisual(xe,"style");if(ee){var be=ue.get(_e[0],xe),Ae=ue.get(_e[1],xe);if(isNaN(ue.get(_e[2],xe))||isNaN(be)||isNaN(Ae)||be<ne[0]||be>ne[1]||Ae<ie[0]||Ae>ie[1])continue;var we=Q.dataToPoint([be,Ae]);Se=new Rect$2({shape:{x:we[0]-re/2,y:we[1]-ae/2,width:re,height:ae},style:Te})}else if(te){var Ce=Q.dataToLayout([ue.get(_e[0],xe),ue.get(_e[1],xe)]).rect;if(eqNaN(Ce.x))continue;Se=new Rect$2({z2:1,shape:Ce,style:Te})}else{if(isNaN(ue.get(_e[1],xe)))continue;var Ee=Q.dataToLayout([ue.get(_e[0],xe)]),Ce=Ee.contentRect||Ee.rect;if(eqNaN(Ce.x)||eqNaN(Ce.y))continue;Se=new Rect$2({z2:1,shape:Ce,style:Te})}if(ue.hasItemOption){var Me=ue.getItemModel(xe),De=Me.getModel("emphasis");ce=De.getModel("itemStyle").getItemStyle(),fe=Me.getModel(["blur","itemStyle"]).getItemStyle(),he=Me.getModel(["select","itemStyle"]).getItemStyle(),ve=Me.get(["itemStyle","borderRadius"]),ge=De.get("focus"),me=De.get("blurScope"),ye=De.get("disabled"),de=getLabelStatesModels(Me)}Se.shape.r=ve;var Le=H.getRawValue(xe),Pe="-";Le&&Le[2]!=null&&(Pe=Le[2]+""),setLabelStyle(Se,de,{labelFetcher:H,labelDataIndex:xe,defaultOpacity:Te.opacity,defaultText:Pe}),Se.ensureState("emphasis").style=ce,Se.ensureState("blur").style=fe,Se.ensureState("select").style=he,toggleHoverEmphasis(Se,ge,me,ye),Se.incremental=K,K&&(Se.states.emphasis.hoverLayer=!0),le.add(Se),ue.setItemGraphicEl(xe,Se),this._progressiveEls&&this._progressiveEls.push(Se)}},G.prototype._renderOnGeo=function(H,W,Z,X){var K=Z.targetVisuals.inRange,Q=Z.targetVisuals.outOfRange,ee=W.getData(),te=this._hmLayer||this._hmLayer||new HeatmapLayer;te.blurSize=W.get("blurSize"),te.pointSize=W.get("pointSize"),te.minOpacity=W.get("minOpacity"),te.maxOpacity=W.get("maxOpacity");var re=H.getViewRect().clone(),ae=H.getRoamTransform();re.applyTransform(ae);var ne=Math.max(re.x,0),ie=Math.max(re.y,0),oe=Math.min(re.width+re.x,X.getWidth()),se=Math.min(re.height+re.y,X.getHeight()),le=oe-ne,ue=se-ie,ce=[ee.mapDimension("lng"),ee.mapDimension("lat"),ee.mapDimension("value")],fe=ee.mapArray(ce,function(pe,ge,me){var ye=H.dataToPoint([pe,ge]);return ye[0]-=ne,ye[1]-=ie,ye.push(me),ye}),he=Z.getExtent(),ve=Z.type==="visualMap.continuous"?getIsInContinuousRange(he,Z.option.range):getIsInPiecewiseRange(he,Z.getPieceList(),Z.option.selected);te.update(fe,le,ue,K.color.getNormalizer(),{inRange:K.color.getColorMapper(),outOfRange:Q.color.getColorMapper()},ve);var de=new ZRImage({style:{width:le,height:ue,x:ne,y:ie,image:te.canvas},silent:!0});this.group.add(de)},G.type="heatmap",G})(ChartView),HeatmapSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.getInitialData=function(H,W){return createSeriesData$1(null,this,{generateCoord:"value"})},G.prototype.preventIncremental=function(){var H=CoordinateSystemManager.get(this.get("coordinateSystem"));if(H&&H.dimensions)return H.dimensions[0]==="lng"&&H.dimensions[1]==="lat"},G.type="series.heatmap",G.dependencies=["grid","geo","calendar","matrix"],G.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:tokens.color.primary}}},G})(SeriesModel);function install$y(U){U.registerChartView(HeatmapView),U.registerSeriesModel(HeatmapSeriesModel)}var BAR_BORDER_WIDTH_QUERY=["itemStyle","borderWidth"],LAYOUT_ATTRS=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],pathForLineWidth=new Circle,PictorialBarView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){var X=this.group,K=H.getData(),Q=this._data,ee=H.coordinateSystem,te=ee.getBaseAxis(),re=te.isHorizontal(),ae=ee.master.getRect(),ne={ecSize:{width:Z.getWidth(),height:Z.getHeight()},seriesModel:H,coordSys:ee,coordSysExtent:[[ae.x,ae.x+ae.width],[ae.y,ae.y+ae.height]],isHorizontal:re,valueDim:LAYOUT_ATTRS[+re],categoryDim:LAYOUT_ATTRS[1-+re]};K.diff(Q).add(function(oe){if(K.hasValue(oe)){var se=getItemModel(K,oe),le=getSymbolMeta(K,oe,se,ne),ue=createBar(K,ne,le);K.setItemGraphicEl(oe,ue),X.add(ue),updateCommon(ue,ne,le)}}).update(function(oe,se){var le=Q.getItemGraphicEl(se);if(!K.hasValue(oe)){X.remove(le);return}var ue=getItemModel(K,oe),ce=getSymbolMeta(K,oe,ue,ne),fe=getShapeStr(K,ce);le&&fe!==le.__pictorialShapeStr&&(X.remove(le),K.setItemGraphicEl(oe,null),le=null),le?updateBar(le,ne,ce):le=createBar(K,ne,ce,!0),K.setItemGraphicEl(oe,le),le.__pictorialSymbolMeta=ce,X.add(le),updateCommon(le,ne,ce)}).remove(function(oe){var se=Q.getItemGraphicEl(oe);se&&removeBar(Q,oe,se.__pictorialSymbolMeta.animationModel,se)}).execute();var ie=H.get("clip",!0)?createClipPath(H.coordinateSystem,!1,H):null;return ie?X.setClipPath(ie):X.removeClipPath(),this._data=K,this.group},G.prototype.remove=function(H,W){var Z=this.group,X=this._data;H.get("animation")?X&&X.eachItemGraphicEl(function(K){removeBar(X,getECData(K).dataIndex,H,K)}):Z.removeAll()},G.type="pictorialBar",G})(ChartView);function getSymbolMeta(U,G,H,W){var Z=U.getItemLayout(G),X=H.get("symbolRepeat"),K=H.get("symbolClip"),Q=H.get("symbolPosition")||"start",ee=H.get("symbolRotate"),te=(ee||0)*Math.PI/180||0,re=H.get("symbolPatternSize")||2,ae=H.isAnimationEnabled(),ne={dataIndex:G,layout:Z,itemModel:H,symbolType:U.getItemVisual(G,"symbol")||"circle",style:U.getItemVisual(G,"style"),symbolClip:K,symbolRepeat:X,symbolRepeatDirection:H.get("symbolRepeatDirection"),symbolPatternSize:re,rotation:te,animationModel:ae?H:null,hoverScale:ae&&H.get(["emphasis","scale"]),z2:H.getShallow("z",!0)||0};prepareBarLength(H,X,Z,W,ne),prepareSymbolSize(U,G,Z,X,K,ne.boundingLength,ne.pxSign,re,W,ne),prepareLineWidth(H,ne.symbolScale,te,W,ne);var ie=ne.symbolSize,oe=normalizeSymbolOffset(H.get("symbolOffset"),ie);return prepareLayoutInfo(H,ie,Z,X,K,oe,Q,ne.valueLineWidth,ne.boundingLength,ne.repeatCutLength,W,ne),ne}function prepareBarLength(U,G,H,W,Z){var X=W.valueDim,K=U.get("symbolBoundingData"),Q=W.coordSys.getOtherAxis(W.coordSys.getBaseAxis()),ee=Q.toGlobalCoord(Q.dataToCoord(0)),te=1-+(H[X.wh]<=0),re;if(isArray$1(K)){var ae=[convertToCoordOnAxis(Q,K[0])-ee,convertToCoordOnAxis(Q,K[1])-ee];ae[1]<ae[0]&&ae.reverse(),re=ae[te]}else K!=null?re=convertToCoordOnAxis(Q,K)-ee:G?re=W.coordSysExtent[X.index][te]-ee:re=H[X.wh];Z.boundingLength=re,G&&(Z.repeatCutLength=H[X.wh]);var ne=X.xy==="x",ie=Q.inverse;Z.pxSign=ne&&!ie||!ne&&ie?re>=0?1:-1:re>0?1:-1}function convertToCoordOnAxis(U,G){return U.toGlobalCoord(U.dataToCoord(U.scale.parse(G)))}function prepareSymbolSize(U,G,H,W,Z,X,K,Q,ee,te){var re=ee.valueDim,ae=ee.categoryDim,ne=Math.abs(H[ae.wh]),ie=U.getItemVisual(G,"symbolSize"),oe;isArray$1(ie)?oe=ie.slice():ie==null?oe=["100%","100%"]:oe=[ie,ie],oe[ae.index]=parsePercent(oe[ae.index],ne),oe[re.index]=parsePercent(oe[re.index],W?ne:Math.abs(X)),te.symbolSize=oe;var se=te.symbolScale=[oe[0]/Q,oe[1]/Q];se[re.index]*=(ee.isHorizontal?-1:1)*K}function prepareLineWidth(U,G,H,W,Z){var X=U.get(BAR_BORDER_WIDTH_QUERY)||0;X&&(pathForLineWidth.attr({scaleX:G[0],scaleY:G[1],rotation:H}),pathForLineWidth.updateTransform(),X/=pathForLineWidth.getLineScale(),X*=G[W.valueDim.index]),Z.valueLineWidth=X||0}function prepareLayoutInfo(U,G,H,W,Z,X,K,Q,ee,te,re,ae){var ne=re.categoryDim,ie=re.valueDim,oe=ae.pxSign,se=Math.max(G[ie.index]+Q,0),le=se;if(W){var ue=Math.abs(ee),ce=retrieve(U.get("symbolMargin"),"15%")+"",fe=!1;ce.lastIndexOf("!")===ce.length-1&&(fe=!0,ce=ce.slice(0,ce.length-1));var he=parsePercent(ce,G[ie.index]),ve=Math.max(se+he*2,0),de=fe?0:he*2,pe=isNumeric(W),ge=pe?W:toIntTimes((ue+de)/ve),me=ue-ge*se;he=me/2/(fe?ge:Math.max(ge-1,1)),ve=se+he*2,de=fe?0:he*2,!pe&&W!=="fixed"&&(ge=te?toIntTimes((Math.abs(te)+de)/ve):0),le=ge*ve-de,ae.repeatTimes=ge,ae.symbolMargin=he}var ye=oe*(le/2),_e=ae.pathPosition=[];_e[ne.index]=H[ne.wh]/2,_e[ie.index]=K==="start"?ye:K==="end"?ee-ye:ee/2,X&&(_e[0]+=X[0],_e[1]+=X[1]);var xe=ae.bundlePosition=[];xe[ne.index]=H[ne.xy],xe[ie.index]=H[ie.xy];var Se=ae.barRectShape=extend({},H);Se[ie.wh]=oe*Math.max(Math.abs(H[ie.wh]),Math.abs(_e[ie.index]+ye)),Se[ne.wh]=H[ne.wh];var Te=ae.clipShape={};Te[ne.xy]=-H[ne.xy],Te[ne.wh]=re.ecSize[ne.wh],Te[ie.xy]=0,Te[ie.wh]=H[ie.wh]}function createPath(U){var G=U.symbolPatternSize,H=createSymbol$1(U.symbolType,-G/2,-G/2,G,G);return H.attr({culling:!0}),H.type!=="image"&&H.setStyle({strokeNoScale:!0}),H}function createOrUpdateRepeatSymbols(U,G,H,W){var Z=U.__pictorialBundle,X=H.symbolSize,K=H.valueLineWidth,Q=H.pathPosition,ee=G.valueDim,te=H.repeatTimes||0,re=0,ae=X[G.valueDim.index]+K+H.symbolMargin*2;for(eachPath(U,function(se){se.__pictorialAnimationIndex=re,se.__pictorialRepeatTimes=te,re<te?updateAttr(se,null,oe(re),H,W):updateAttr(se,null,{scaleX:0,scaleY:0},H,W,function(){Z.remove(se)}),re++});re<te;re++){var ne=createPath(H);ne.__pictorialAnimationIndex=re,ne.__pictorialRepeatTimes=te,Z.add(ne);var ie=oe(re);updateAttr(ne,{x:ie.x,y:ie.y,scaleX:0,scaleY:0},{scaleX:ie.scaleX,scaleY:ie.scaleY,rotation:ie.rotation},H,W)}function oe(se){var le=Q.slice(),ue=H.pxSign,ce=se;return(H.symbolRepeatDirection==="start"?ue>0:ue<0)&&(ce=te-1-se),le[ee.index]=ae*(ce-te/2+.5)+Q[ee.index],{x:le[0],y:le[1],scaleX:H.symbolScale[0],scaleY:H.symbolScale[1],rotation:H.rotation}}}function createOrUpdateSingleSymbol(U,G,H,W){var Z=U.__pictorialBundle,X=U.__pictorialMainPath;X?updateAttr(X,null,{x:H.pathPosition[0],y:H.pathPosition[1],scaleX:H.symbolScale[0],scaleY:H.symbolScale[1],rotation:H.rotation},H,W):(X=U.__pictorialMainPath=createPath(H),Z.add(X),updateAttr(X,{x:H.pathPosition[0],y:H.pathPosition[1],scaleX:0,scaleY:0,rotation:H.rotation},{scaleX:H.symbolScale[0],scaleY:H.symbolScale[1]},H,W))}function createOrUpdateBarRect(U,G,H){var W=extend({},G.barRectShape),Z=U.__pictorialBarRect;Z?updateAttr(Z,null,{shape:W},G,H):(Z=U.__pictorialBarRect=new Rect$2({z2:2,shape:W,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),Z.disableMorphing=!0,U.add(Z))}function createOrUpdateClip(U,G,H,W){if(H.symbolClip){var Z=U.__pictorialClipPath,X=extend({},H.clipShape),K=G.valueDim,Q=H.animationModel,ee=H.dataIndex;if(Z)updateProps$1(Z,{shape:X},Q,ee);else{X[K.wh]=0,Z=new Rect$2({shape:X}),U.__pictorialBundle.setClipPath(Z),U.__pictorialClipPath=Z;var te={};te[K.wh]=H.clipShape[K.wh],graphic[W?"updateProps":"initProps"](Z,{shape:te},Q,ee)}}}function getItemModel(U,G){var H=U.getItemModel(G);return H.getAnimationDelayParams=getAnimationDelayParams,H.isAnimationEnabled=isAnimationEnabled,H}function getAnimationDelayParams(U){return{index:U.__pictorialAnimationIndex,count:U.__pictorialRepeatTimes}}function isAnimationEnabled(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function createBar(U,G,H,W){var Z=new Group$3,X=new Group$3;return Z.add(X),Z.__pictorialBundle=X,X.x=H.bundlePosition[0],X.y=H.bundlePosition[1],H.symbolRepeat?createOrUpdateRepeatSymbols(Z,G,H):createOrUpdateSingleSymbol(Z,G,H),createOrUpdateBarRect(Z,H,W),createOrUpdateClip(Z,G,H,W),Z.__pictorialShapeStr=getShapeStr(U,H),Z.__pictorialSymbolMeta=H,Z}function updateBar(U,G,H){var W=H.animationModel,Z=H.dataIndex,X=U.__pictorialBundle;updateProps$1(X,{x:H.bundlePosition[0],y:H.bundlePosition[1]},W,Z),H.symbolRepeat?createOrUpdateRepeatSymbols(U,G,H,!0):createOrUpdateSingleSymbol(U,G,H,!0),createOrUpdateBarRect(U,H,!0),createOrUpdateClip(U,G,H,!0)}function removeBar(U,G,H,W){var Z=W.__pictorialBarRect;Z&&Z.removeTextContent();var X=[];eachPath(W,function(K){X.push(K)}),W.__pictorialMainPath&&X.push(W.__pictorialMainPath),W.__pictorialClipPath&&(H=null),each$f(X,function(K){removeElement(K,{scaleX:0,scaleY:0},H,G,function(){W.parent&&W.parent.remove(W)})}),U.setItemGraphicEl(G,null)}function getShapeStr(U,G){return[U.getItemVisual(G.dataIndex,"symbol")||"none",!!G.symbolRepeat,!!G.symbolClip].join(":")}function eachPath(U,G,H){each$f(U.__pictorialBundle.children(),function(W){W!==U.__pictorialBarRect&&G.call(H,W)})}function updateAttr(U,G,H,W,Z,X){G&&U.attr(G),W.symbolClip&&!Z?H&&U.attr(H):H&&graphic[Z?"updateProps":"initProps"](U,H,W.animationModel,W.dataIndex,X)}function updateCommon(U,G,H){var W=H.dataIndex,Z=H.itemModel,X=Z.getModel("emphasis"),K=X.getModel("itemStyle").getItemStyle(),Q=Z.getModel(["blur","itemStyle"]).getItemStyle(),ee=Z.getModel(["select","itemStyle"]).getItemStyle(),te=Z.getShallow("cursor"),re=X.get("focus"),ae=X.get("blurScope"),ne=X.get("scale");eachPath(U,function(se){if(se instanceof ZRImage){var le=se.style;se.useStyle(extend({image:le.image,x:le.x,y:le.y,width:le.width,height:le.height},H.style))}else se.useStyle(H.style);var ue=se.ensureState("emphasis");ue.style=K,ne&&(ue.scaleX=se.scaleX*1.1,ue.scaleY=se.scaleY*1.1),se.ensureState("blur").style=Q,se.ensureState("select").style=ee,te&&(se.cursor=te),se.z2=H.z2});var ie=G.valueDim.posDesc[+(H.boundingLength>0)],oe=U.__pictorialBarRect;oe.ignoreClip=!0,setLabelStyle(oe,getLabelStatesModels(Z),{labelFetcher:G.seriesModel,labelDataIndex:W,defaultText:getDefaultLabel(G.seriesModel.getData(),W),inheritColor:H.style.fill,defaultOpacity:H.style.opacity,defaultOutsidePosition:ie}),toggleHoverEmphasis(U,re,ae,X.get("disabled"))}function toIntTimes(U){var G=Math.round(U);return Math.abs(U-G)<1e-4?G:Math.ceil(U)}var PictorialBarSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.hasSymbolVisual=!0,H.defaultSymbol="roundRect",H}return G.prototype.getInitialData=function(H){return H.stack=null,U.prototype.getInitialData.apply(this,arguments)},G.type="series.pictorialBar",G.dependencies=["grid"],G.defaultOption=inheritDefaultOption(BaseBarSeriesModel.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:tokens.color.primary}}}),G})(BaseBarSeriesModel);function install$x(U){U.registerChartView(PictorialBarView),U.registerSeriesModel(PictorialBarSeriesModel),U.registerLayout(U.PRIORITY.VISUAL.LAYOUT,curry$1(layout$2,"pictorialBar")),U.registerLayout(U.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,createProgressiveLayout("pictorialBar"))}var ThemeRiverView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H._layers=[],H}return G.prototype.render=function(H,W,Z){var X=H.getData(),K=this,Q=this.group,ee=H.getLayerSeries(),te=X.getLayout("layoutInfo"),re=te.rect,ae=te.boundaryGap;Q.x=0,Q.y=re.y+ae[0];function ne(le){return le.name}var ie=new DataDiffer(this._layersSeries||[],ee,ne,ne),oe=[];ie.add(bind$1(se,this,"add")).update(bind$1(se,this,"update")).remove(bind$1(se,this,"remove")).execute();function se(le,ue,ce){var fe=K._layers;if(le==="remove"){Q.remove(fe[ue]);return}for(var he=[],ve=[],de,pe=ee[ue].indices,ge=0;ge<pe.length;ge++){var me=X.getItemLayout(pe[ge]),ye=me.x,_e=me.y0,xe=me.y;he.push(ye,_e),ve.push(ye,_e+xe),de=X.getItemVisual(pe[ge],"style")}var Se,Te=X.getItemLayout(pe[0]),be=H.getModel("label"),Ae=be.get("margin"),we=H.getModel("emphasis");if(le==="add"){var Ce=oe[ue]=new Group$3;Se=new ECPolygon({shape:{points:he,stackedOnPoints:ve,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),Ce.add(Se),Q.add(Ce),H.isAnimationEnabled()&&Se.setClipPath(createGridClipShape(Se.getBoundingRect(),H,function(){Se.removeClipPath()}))}else{var Ce=fe[ce];Se=Ce.childAt(0),Q.add(Ce),oe[ue]=Ce,updateProps$1(Se,{shape:{points:he,stackedOnPoints:ve}},H),saveOldStyle(Se)}setLabelStyle(Se,getLabelStatesModels(H),{labelDataIndex:pe[ge-1],defaultText:X.getName(pe[ge-1]),inheritColor:de.fill},{normal:{verticalAlign:"middle"}}),Se.setTextConfig({position:null,local:!0});var Ee=Se.getTextContent();Ee&&(Ee.x=Te.x-Ae,Ee.y=Te.y0+Te.y/2),Se.useStyle(de),X.setItemGraphicEl(ue,Se),setStatesStylesFromModel(Se,H),toggleHoverEmphasis(Se,we.get("focus"),we.get("blurScope"),we.get("disabled"))}this._layersSeries=ee,this._layers=oe},G.type="themeRiver",G})(ChartView);function createGridClipShape(U,G,H){var W=new Rect$2({shape:{x:U.x-10,y:U.y-10,width:0,height:U.height+20}});return initProps(W,{shape:{x:U.x-50,width:U.width+100,height:U.height+20}},G,H),W}var DATA_NAME_INDEX=2,ThemeRiverSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H){U.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this))},G.prototype.fixData=function(H){var W=H.length,Z={},X=groupData(H,function(ne){return Z.hasOwnProperty(ne[0]+"")||(Z[ne[0]+""]=-1),ne[2]}),K=[];X.buckets.each(function(ne,ie){K.push({name:ie,dataList:ne})});for(var Q=K.length,ee=0;ee<Q;++ee){for(var te=K[ee].name,re=0;re<K[ee].dataList.length;++re){var ae=K[ee].dataList[re][0]+"";Z[ae]=ee}for(var ae in Z)Z.hasOwnProperty(ae)&&Z[ae]!==ee&&(Z[ae]=ee,H[W]=[ae,0,te],W++)}return H},G.prototype.getInitialData=function(H,W){for(var Z=this.getReferringComponents("singleAxis",SINGLE_REFERRING).models[0],X=Z.get("type"),K=filter(H.data,function(oe){return oe[2]!==void 0}),Q=this.fixData(K||[]),ee=[],te=this.nameMap=createHashMap(),re=0,ae=0;ae<Q.length;++ae)ee.push(Q[ae][DATA_NAME_INDEX]),te.get(Q[ae][DATA_NAME_INDEX])||(te.set(Q[ae][DATA_NAME_INDEX],re),re++);var ne=prepareSeriesDataSchema(Q,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:getDimensionTypeByAxis(X)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,ie=new SeriesData(ne,this);return ie.initData(Q),ie},G.prototype.getLayerSeries=function(){for(var H=this.getData(),W=H.count(),Z=[],X=0;X<W;++X)Z[X]=X;var K=H.mapDimension("single"),Q=groupData(Z,function(te){return H.get("name",te)}),ee=[];return Q.buckets.each(function(te,re){te.sort(function(ae,ne){return H.get(K,ae)-H.get(K,ne)}),ee.push({name:re,indices:te})}),ee},G.prototype.getAxisTooltipData=function(H,W,Z){isArray$1(H)||(H=H?[H]:[]);for(var X=this.getData(),K=this.getLayerSeries(),Q=[],ee=K.length,te,re=0;re<ee;++re){for(var ae=Number.MAX_VALUE,ne=-1,ie=K[re].indices.length,oe=0;oe<ie;++oe){var se=X.get(H[0],K[re].indices[oe]),le=Math.abs(se-W);le<=ae&&(te=se,ae=le,ne=K[re].indices[oe])}Q.push(ne)}return{dataIndices:Q,nestestValue:te}},G.prototype.formatTooltip=function(H,W,Z){var X=this.getData(),K=X.getName(H),Q=X.get(X.mapDimension("value"),H);return createTooltipMarkup("nameValue",{name:K,value:Q})},G.type="series.themeRiver",G.dependencies=["singleAxis"],G.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},G})(SeriesModel);function themeRiverLayout(U,G){U.eachSeriesByType("themeRiver",function(H){var W=H.getData(),Z=H.coordinateSystem,X={},K=Z.getRect();X.rect=K;var Q=H.get("boundaryGap"),ee=Z.getAxis();if(X.boundaryGap=Q,ee.orient==="horizontal"){Q[0]=parsePercent(Q[0],K.height),Q[1]=parsePercent(Q[1],K.height);var te=K.height-Q[0]-Q[1];doThemeRiverLayout(W,H,te)}else{Q[0]=parsePercent(Q[0],K.width),Q[1]=parsePercent(Q[1],K.width);var re=K.width-Q[0]-Q[1];doThemeRiverLayout(W,H,re)}W.setLayout("layoutInfo",X)})}function doThemeRiverLayout(U,G,H){if(U.count())for(var W=G.coordinateSystem,Z=G.getLayerSeries(),X=U.mapDimension("single"),K=U.mapDimension("value"),Q=map$1(Z,function(le){return map$1(le.indices,function(ue){var ce=W.dataToPoint(U.get(X,ue));return ce[1]=U.get(K,ue),ce})}),ee=computeBaseline(Q),te=ee.y0,re=H/ee.max,ae=Z.length,ne=Z[0].indices.length,ie,oe=0;oe<ne;++oe){ie=te[oe]*re,U.setItemLayout(Z[0].indices[oe],{layerIndex:0,x:Q[0][oe][0],y0:ie,y:Q[0][oe][1]*re});for(var se=1;se<ae;++se)ie+=Q[se-1][oe][1]*re,U.setItemLayout(Z[se].indices[oe],{layerIndex:se,x:Q[se][oe][0],y0:ie,y:Q[se][oe][1]*re})}}function computeBaseline(U){for(var G=U.length,H=U[0].length,W=[],Z=[],X=0,K=0;K<H;++K){for(var Q=0,ee=0;ee<G;++ee)Q+=U[ee][K][1];Q>X&&(X=Q),W.push(Q)}for(var te=0;te<H;++te)Z[te]=(X-W[te])/2;X=0;for(var re=0;re<H;++re){var ae=W[re]+Z[re];ae>X&&(X=ae)}return{y0:Z,max:X}}function install$w(U){U.registerChartView(ThemeRiverView),U.registerSeriesModel(ThemeRiverSeriesModel),U.registerLayout(themeRiverLayout),U.registerProcessor(dataFilter$1("themeRiver"))}var DEFAULT_SECTOR_Z=2,DEFAULT_TEXT_Z=4,SunburstPiece=(function(U){__extends(G,U);function G(H,W,Z,X){var K=U.call(this)||this;K.z2=DEFAULT_SECTOR_Z,K.textConfig={inside:!0},getECData(K).seriesIndex=W.seriesIndex;var Q=new ZRText({z2:DEFAULT_TEXT_Z,silent:H.getModel().get(["label","silent"])});return K.setTextContent(Q),K.updateData(!0,H,W,Z,X),K}return G.prototype.updateData=function(H,W,Z,X,K){this.node=W,W.piece=this,Z=Z||this._seriesModel,X=X||this._ecModel;var Q=this;getECData(Q).dataIndex=W.dataIndex;var ee=W.getModel(),te=ee.getModel("emphasis"),re=W.getLayout(),ae=extend({},re);ae.label=null;var ne=W.getVisual("style");ne.lineJoin="bevel";var ie=W.getVisual("decal");ie&&(ne.decal=createOrUpdatePatternFromDecal(ie,K));var oe=getSectorCornerRadius(ee.getModel("itemStyle"),ae,!0);extend(ae,oe),each$f(SPECIAL_STATES,function(ce){var fe=Q.ensureState(ce),he=ee.getModel([ce,"itemStyle"]);fe.style=he.getItemStyle();var ve=getSectorCornerRadius(he,ae);ve&&(fe.shape=ve)}),H?(Q.setShape(ae),Q.shape.r=re.r0,initProps(Q,{shape:{r:re.r}},Z,W.dataIndex)):(updateProps$1(Q,{shape:ae},Z),saveOldStyle(Q)),Q.useStyle(ne),this._updateLabel(Z);var se=ee.getShallow("cursor");se&&Q.attr("cursor",se),this._seriesModel=Z||this._seriesModel,this._ecModel=X||this._ecModel;var le=te.get("focus"),ue=le==="relative"?concatArray(W.getAncestorsIndices(),W.getDescendantIndices()):le==="ancestor"?W.getAncestorsIndices():le==="descendant"?W.getDescendantIndices():le;toggleHoverEmphasis(this,ue,te.get("blurScope"),te.get("disabled"))},G.prototype._updateLabel=function(H){var W=this,Z=this.node.getModel(),X=Z.getModel("label"),K=this.node.getLayout(),Q=K.endAngle-K.startAngle,ee=(K.startAngle+K.endAngle)/2,te=Math.cos(ee),re=Math.sin(ee),ae=this,ne=ae.getTextContent(),ie=this.node.dataIndex,oe=X.get("minAngle")/180*Math.PI,se=X.get("show")&&!(oe!=null&&Math.abs(Q)<oe);ne.ignore=!se,each$f(DISPLAY_STATES,function(ue){var ce=ue==="normal"?Z.getModel("label"):Z.getModel([ue,"label"]),fe=ue==="normal",he=fe?ne:ne.ensureState(ue),ve=H.getFormattedLabel(ie,ue);fe&&(ve=ve||W.node.name),he.style=createTextStyle(ce,{},null,ue!=="normal",!0),ve&&(he.style.text=ve);var de=ce.get("show");de!=null&&!fe&&(he.ignore=!de);var pe=le(ce,"position"),ge=fe?ae:ae.states[ue],me=ge.style.fill;ge.textConfig={outsideFill:ce.get("color")==="inherit"?me:null,inside:pe!=="outside"};var ye,_e=le(ce,"distance")||0,xe=le(ce,"align"),Se=le(ce,"rotate"),Te=Math.PI*.5,be=Math.PI*1.5,Ae=normalizeRadian(Se==="tangential"?Math.PI/2-ee:ee),we=Ae>Te&&!isRadianAroundZero(Ae-Te)&&Ae<be;pe==="outside"?(ye=K.r+_e,xe=we?"right":"left"):!xe||xe==="center"?(Q===2*Math.PI&&K.r0===0?ye=0:ye=(K.r+K.r0)/2,xe="center"):xe==="left"?(ye=K.r0+_e,xe=we?"right":"left"):xe==="right"&&(ye=K.r-_e,xe=we?"left":"right"),he.style.align=xe,he.style.verticalAlign=le(ce,"verticalAlign")||"middle",he.x=ye*te+K.cx,he.y=ye*re+K.cy;var Ce=0;Se==="radial"?Ce=normalizeRadian(-ee)+(we?Math.PI:0):Se==="tangential"?Ce=normalizeRadian(Math.PI/2-ee)+(we?Math.PI:0):isNumber(Se)&&(Ce=Se*Math.PI/180),he.rotation=normalizeRadian(Ce)});function le(ue,ce){var fe=ue.get(ce);return fe??X.get(ce)}ne.dirtyStyle()},G})(Sector),ROOT_TO_NODE_ACTION="sunburstRootToNode",HIGHLIGHT_ACTION="sunburstHighlight",UNHIGHLIGHT_ACTION="sunburstUnhighlight";function installSunburstAction(U){U.registerAction({type:ROOT_TO_NODE_ACTION,update:"updateView"},function(G,H){H.eachComponent({mainType:"series",subType:"sunburst",query:G},W);function W(Z,X){var K=retrieveTargetInfo(G,[ROOT_TO_NODE_ACTION],Z);if(K){var Q=Z.getViewRoot();Q&&(G.direction=aboveViewRoot(Q,K.node)?"rollUp":"drillDown"),Z.resetViewRoot(K.node)}}}),U.registerAction({type:HIGHLIGHT_ACTION,update:"none"},function(G,H,W){G=extend({},G),H.eachComponent({mainType:"series",subType:"sunburst",query:G},Z);function Z(X){var K=retrieveTargetInfo(G,[HIGHLIGHT_ACTION],X);K&&(G.dataIndex=K.node.dataIndex)}process.env.NODE_ENV!=="production"&&deprecateReplaceLog("sunburstHighlight","highlight"),W.dispatchAction(extend(G,{type:"highlight"}))}),U.registerAction({type:UNHIGHLIGHT_ACTION,update:"updateView"},function(G,H,W){G=extend({},G),process.env.NODE_ENV!=="production"&&deprecateReplaceLog("sunburstUnhighlight","downplay"),W.dispatchAction(extend(G,{type:"downplay"}))})}var SunburstView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z,X){var K=this;this.seriesModel=H,this.api=Z,this.ecModel=W;var Q=H.getData(),ee=Q.tree.root,te=H.getViewRoot(),re=this.group,ae=H.get("renderLabelForZeroData"),ne=[];te.eachNode(function(ce){ne.push(ce)});var ie=this._oldChildren||[];oe(ne,ie),ue(ee,te),this._initEvents(),this._oldChildren=ne;function oe(ce,fe){if(ce.length===0&&fe.length===0)return;new DataDiffer(fe,ce,he,he).add(ve).update(ve).remove(curry$1(ve,null)).execute();function he(de){return de.getId()}function ve(de,pe){var ge=de==null?null:ce[de],me=pe==null?null:fe[pe];se(ge,me)}}function se(ce,fe){if(!ae&&ce&&!ce.getValue()&&(ce=null),ce!==ee&&fe!==ee){if(fe&&fe.piece)ce?(fe.piece.updateData(!1,ce,H,W,Z),Q.setItemGraphicEl(ce.dataIndex,fe.piece)):le(fe);else if(ce){var he=new SunburstPiece(ce,H,W,Z);re.add(he),Q.setItemGraphicEl(ce.dataIndex,he)}}}function le(ce){ce&&ce.piece&&(re.remove(ce.piece),ce.piece=null)}function ue(ce,fe){fe.depth>0?(K.virtualPiece?K.virtualPiece.updateData(!1,ce,H,W,Z):(K.virtualPiece=new SunburstPiece(ce,H,W,Z),re.add(K.virtualPiece)),fe.piece.off("click"),K.virtualPiece.on("click",function(he){K._rootToNode(fe.parentNode)})):K.virtualPiece&&(re.remove(K.virtualPiece),K.virtualPiece=null)}},G.prototype._initEvents=function(){var H=this;this.group.off("click"),this.group.on("click",function(W){var Z=!1,X=H.seriesModel.getViewRoot();X.eachNode(function(K){if(!Z&&K.piece&&K.piece===W.target){var Q=K.getModel().get("nodeClick");if(Q==="rootToNode")H._rootToNode(K);else if(Q==="link"){var ee=K.getModel(),te=ee.get("link");if(te){var re=ee.get("target",!0)||"_blank";windowOpen(te,re)}}Z=!0}})})},G.prototype._rootToNode=function(H){H!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ROOT_TO_NODE_ACTION,from:this.uid,seriesId:this.seriesModel.id,targetNode:H})},G.prototype.containPoint=function(H,W){var Z=W.getData(),X=Z.getItemLayout(0);if(X){var K=H[0]-X.cx,Q=H[1]-X.cy,ee=Math.sqrt(K*K+Q*Q);return ee<=X.r&&ee>=X.r0}},G.type="sunburst",G})(ChartView),SunburstSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.ignoreStyleOnData=!0,H}return G.prototype.getInitialData=function(H,W){var Z={name:H.name,children:H.data};completeTreeValue(Z);var X=this._levelModels=map$1(H.levels||[],function(ee){return new Model(ee,this,W)},this),K=Tree.createTree(Z,this,Q);function Q(ee){ee.wrapMethod("getItemModel",function(te,re){var ae=K.getNodeByDataIndex(re),ne=X[ae.depth];return ne&&(te.parentModel=ne),te})}return K.data},G.prototype.optionUpdated=function(){this.resetViewRoot()},G.prototype.getDataParams=function(H){var W=U.prototype.getDataParams.apply(this,arguments),Z=this.getData().tree.getNodeByDataIndex(H);return W.treePathInfo=wrapTreePathInfo(Z,this),W},G.prototype.getLevelModel=function(H){return this._levelModels&&this._levelModels[H.depth]},G.prototype.getViewRoot=function(){return this._viewRoot},G.prototype.resetViewRoot=function(H){H?this._viewRoot=H:H=this._viewRoot;var W=this.getRawData().tree.root;(!H||H!==W&&!W.contains(H))&&(this._viewRoot=W)},G.prototype.enableAriaDecal=function(){enableAriaDecalForTree(this)},G.type="series.sunburst",G.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},G})(SeriesModel);function completeTreeValue(U){var G=0;each$f(U.children,function(W){completeTreeValue(W);var Z=W.value;isArray$1(Z)&&(Z=Z[0]),G+=Z});var H=U.value;isArray$1(H)&&(H=H[0]),(H==null||isNaN(H))&&(H=G),H<0&&(H=0),isArray$1(U.value)?U.value[0]=H:U.value=H}var RADIAN=Math.PI/180;function sunburstLayout(U,G,H){G.eachSeriesByType(U,function(W){var Z=W.get("center"),X=W.get("radius");isArray$1(X)||(X=[0,X]),isArray$1(Z)||(Z=[Z,Z]);var K=H.getWidth(),Q=H.getHeight(),ee=Math.min(K,Q),te=parsePercent(Z[0],K),re=parsePercent(Z[1],Q),ae=parsePercent(X[0],ee/2),ne=parsePercent(X[1],ee/2),ie=-W.get("startAngle")*RADIAN,oe=W.get("minAngle")*RADIAN,se=W.getData().tree.root,le=W.getViewRoot(),ue=le.depth,ce=W.get("sort");ce!=null&&initChildren(le,ce);var fe=0;each$f(le.children,function(Ae){!isNaN(Ae.getValue())&&fe++});var he=le.getValue(),ve=Math.PI/(he||fe)*2,de=le.depth>0,pe=le.height-(de?-1:1),ge=(ne-ae)/(pe||1),me=W.get("clockwise"),ye=W.get("stillShowZeroSum"),_e=me?1:-1,xe=function(Ae,we){if(Ae){var Ce=we;if(Ae!==se){var Ee=Ae.getValue(),Me=he===0&&ye?ve:Ee*ve;Me<oe&&(Me=oe),Ce=we+_e*Me;var De=Ae.depth-ue-(de?-1:1),Le=ae+ge*De,Pe=ae+ge*(De+1),Ie=W.getLevelModel(Ae);if(Ie){var $e=Ie.get("r0",!0),Ve=Ie.get("r",!0),Fe=Ie.get("radius",!0);Fe!=null&&($e=Fe[0],Ve=Fe[1]),$e!=null&&(Le=parsePercent($e,ee/2)),Ve!=null&&(Pe=parsePercent(Ve,ee/2))}Ae.setLayout({angle:Me,startAngle:we,endAngle:Ce,clockwise:me,cx:te,cy:re,r0:Le,r:Pe})}if(Ae.children&&Ae.children.length){var ke=0;each$f(Ae.children,function(Re){ke+=xe(Re,we+ke)})}return Ce-we}};if(de){var Se=ae,Te=ae+ge,be=Math.PI*2;se.setLayout({angle:be,startAngle:ie,endAngle:ie+be,clockwise:me,cx:te,cy:re,r0:Se,r:Te})}xe(le,ie)})}function initChildren(U,G){var H=U.children||[];U.children=sort(H,G),H.length&&each$f(U.children,function(W){initChildren(W,G)})}function sort(U,G){if(isFunction(G)){var H=map$1(U,function(Z,X){var K=Z.getValue();return{params:{depth:Z.depth,height:Z.height,dataIndex:Z.dataIndex,getValue:function(){return K}},index:X}});return H.sort(function(Z,X){return G(Z.params,X.params)}),map$1(H,function(Z){return U[Z.index]})}else{var W=G==="asc";return U.sort(function(Z,X){var K=(Z.getValue()-X.getValue())*(W?1:-1);return K===0?(Z.dataIndex-X.dataIndex)*(W?-1:1):K})}}function sunburstVisual(U){var G={};function H(W,Z,X){if(W.depth===0)return tokens.color.neutral50;for(var K=W;K&&K.depth>1;)K=K.parentNode;var Q=Z.getColorFromPalette(K.name||K.dataIndex+"",G);return W.depth>1&&isString(Q)&&(Q=lift(Q,(W.depth-1)/(X-1)*.5)),Q}U.eachSeriesByType("sunburst",function(W){var Z=W.getData(),X=Z.tree;X.eachNode(function(K){var Q=K.getModel(),ee=Q.getModel("itemStyle").getItemStyle();ee.fill||(ee.fill=H(K,W,X.root.height));var te=Z.ensureUniqueItemVisual(K.dataIndex,"style");extend(te,ee)})})}function install$v(U){U.registerChartView(SunburstView),U.registerSeriesModel(SunburstSeriesModel),U.registerLayout(curry$1(sunburstLayout,"sunburst")),U.registerProcessor(curry$1(dataFilter$1,"sunburst")),U.registerVisual(sunburstVisual),installSunburstAction(U)}var STYLE_VISUAL_TYPE={color:"fill",borderColor:"stroke"},NON_STYLE_VISUAL_PROPS={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},customInnerStore=makeInner(),CustomSeriesModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},G.prototype.getInitialData=function(H,W){return createSeriesData$1(null,this)},G.prototype.getDataParams=function(H,W,Z){var X=U.prototype.getDataParams.call(this,H,W);return Z&&(X.info=customInnerStore(Z).info),X},G.type="series.custom",G.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],G.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},G})(SeriesModel);function dataToCoordSize$3(U,G){return G=G||[0,0],map$1(["x","y"],function(H,W){var Z=this.getAxis(H),X=G[W],K=U[W]/2;return Z.type==="category"?Z.getBandWidth():Math.abs(Z.dataToCoord(X-K)-Z.dataToCoord(X+K))},this)}function cartesianPrepareCustom(U){var G=U.master.getRect();return{coordSys:{type:"cartesian2d",x:G.x,y:G.y,width:G.width,height:G.height},api:{coord:function(H){return U.dataToPoint(H)},size:bind$1(dataToCoordSize$3,U)}}}function dataToCoordSize$2(U,G){return G=G||[0,0],map$1([0,1],function(H){var W=G[H],Z=U[H]/2,X=[],K=[];return X[H]=W-Z,K[H]=W+Z,X[1-H]=K[1-H]=G[1-H],Math.abs(this.dataToPoint(X)[H]-this.dataToPoint(K)[H])},this)}function geoPrepareCustom(U){var G=U.getBoundingRect();return{coordSys:{type:"geo",x:G.x,y:G.y,width:G.width,height:G.height,zoom:U.getZoom()},api:{coord:function(H){return U.dataToPoint(H)},size:bind$1(dataToCoordSize$2,U)}}}function dataToCoordSize$1(U,G){var H=this.getAxis(),W=G instanceof Array?G[0]:G,Z=(U instanceof Array?U[0]:U)/2;return H.type==="category"?H.getBandWidth():Math.abs(H.dataToCoord(W-Z)-H.dataToCoord(W+Z))}function singlePrepareCustom(U){var G=U.getRect();return{coordSys:{type:"singleAxis",x:G.x,y:G.y,width:G.width,height:G.height},api:{coord:function(H){return U.dataToPoint(H)},size:bind$1(dataToCoordSize$1,U)}}}function dataToCoordSize(U,G){return G=G||[0,0],map$1(["Radius","Angle"],function(H,W){var Z="get"+H+"Axis",X=this[Z](),K=G[W],Q=U[W]/2,ee=X.type==="category"?X.getBandWidth():Math.abs(X.dataToCoord(K-Q)-X.dataToCoord(K+Q));return H==="Angle"&&(ee=ee*Math.PI/180),ee},this)}function polarPrepareCustom(U){var G=U.getRadiusAxis(),H=U.getAngleAxis(),W=G.getExtent();return W[0]>W[1]&&W.reverse(),{coordSys:{type:"polar",cx:U.cx,cy:U.cy,r:W[1],r0:W[0]},api:{coord:function(Z){var X=G.dataToRadius(Z[0]),K=H.dataToAngle(Z[1]),Q=U.coordToPoint([X,K]);return Q.push(X,K*Math.PI/180),Q},size:bind$1(dataToCoordSize,U)}}}function calendarPrepareCustom(U){var G=U.getRect(),H=U.getRangeInfo();return{coordSys:{type:"calendar",x:G.x,y:G.y,width:G.width,height:G.height,cellWidth:U.getCellWidth(),cellHeight:U.getCellHeight(),rangeInfo:{start:H.start,end:H.end,weeks:H.weeks,dayCount:H.allDay}},api:{coord:function(W,Z){return U.dataToPoint(W,Z)},layout:function(W,Z){return U.dataToLayout(W,Z)}}}}function matrixPrepareCustom(U){var G=U.getRect();return{coordSys:{type:"matrix",x:G.x,y:G.y,width:G.width,height:G.height},api:{coord:function(H,W){return U.dataToPoint(H,W)},layout:function(H,W){return U.dataToLayout(H,W)}}}}var deprecatedLogs={};function isEC4CompatibleStyle(U,G,H,W){return U&&(U.legacy||U.legacy!==!1&&!H&&!W&&G!=="tspan"&&(G==="text"||hasOwn(U,"text")))}function convertFromEC4CompatibleStyle(U,G,H){var W=U,Z,X,K;if(G==="text")K=W;else{K={},hasOwn(W,"text")&&(K.text=W.text),hasOwn(W,"rich")&&(K.rich=W.rich),hasOwn(W,"textFill")&&(K.fill=W.textFill),hasOwn(W,"textStroke")&&(K.stroke=W.textStroke),hasOwn(W,"fontFamily")&&(K.fontFamily=W.fontFamily),hasOwn(W,"fontSize")&&(K.fontSize=W.fontSize),hasOwn(W,"fontStyle")&&(K.fontStyle=W.fontStyle),hasOwn(W,"fontWeight")&&(K.fontWeight=W.fontWeight),X={type:"text",style:K,silent:!0},Z={};var Q=hasOwn(W,"textPosition");H?Z.position=Q?W.textPosition:"inside":Q&&(Z.position=W.textPosition),hasOwn(W,"textPosition")&&(Z.position=W.textPosition),hasOwn(W,"textOffset")&&(Z.offset=W.textOffset),hasOwn(W,"textRotation")&&(Z.rotation=W.textRotation),hasOwn(W,"textDistance")&&(Z.distance=W.textDistance)}return convertEC4CompatibleRichItem(K,U),each$f(K.rich,function(ee){convertEC4CompatibleRichItem(ee,ee)}),{textConfig:Z,textContent:X}}function convertEC4CompatibleRichItem(U,G){G&&(G.font=G.textFont||G.font,hasOwn(G,"textStrokeWidth")&&(U.lineWidth=G.textStrokeWidth),hasOwn(G,"textAlign")&&(U.align=G.textAlign),hasOwn(G,"textVerticalAlign")&&(U.verticalAlign=G.textVerticalAlign),hasOwn(G,"textLineHeight")&&(U.lineHeight=G.textLineHeight),hasOwn(G,"textWidth")&&(U.width=G.textWidth),hasOwn(G,"textHeight")&&(U.height=G.textHeight),hasOwn(G,"textBackgroundColor")&&(U.backgroundColor=G.textBackgroundColor),hasOwn(G,"textPadding")&&(U.padding=G.textPadding),hasOwn(G,"textBorderColor")&&(U.borderColor=G.textBorderColor),hasOwn(G,"textBorderWidth")&&(U.borderWidth=G.textBorderWidth),hasOwn(G,"textBorderRadius")&&(U.borderRadius=G.textBorderRadius),hasOwn(G,"textBoxShadowColor")&&(U.shadowColor=G.textBoxShadowColor),hasOwn(G,"textBoxShadowBlur")&&(U.shadowBlur=G.textBoxShadowBlur),hasOwn(G,"textBoxShadowOffsetX")&&(U.shadowOffsetX=G.textBoxShadowOffsetX),hasOwn(G,"textBoxShadowOffsetY")&&(U.shadowOffsetY=G.textBoxShadowOffsetY))}function convertToEC4StyleForCustomSerise(U,G,H){var W=U;W.textPosition=W.textPosition||H.position||"inside",H.offset!=null&&(W.textOffset=H.offset),H.rotation!=null&&(W.textRotation=H.rotation),H.distance!=null&&(W.textDistance=H.distance);var Z=W.textPosition.indexOf("inside")>=0,X=U.fill||tokens.color.neutral99;convertToEC4RichItem(W,G);var K=W.textFill==null;return Z?K&&(W.textFill=H.insideFill||tokens.color.neutral00,!W.textStroke&&H.insideStroke&&(W.textStroke=H.insideStroke),!W.textStroke&&(W.textStroke=X),W.textStrokeWidth==null&&(W.textStrokeWidth=2)):(K&&(W.textFill=U.fill||H.outsideFill||tokens.color.neutral00),!W.textStroke&&H.outsideStroke&&(W.textStroke=H.outsideStroke)),W.text=G.text,W.rich=G.rich,each$f(G.rich,function(Q){convertToEC4RichItem(Q,Q)}),W}function convertToEC4RichItem(U,G){G&&(hasOwn(G,"fill")&&(U.textFill=G.fill),hasOwn(G,"stroke")&&(U.textStroke=G.fill),hasOwn(G,"lineWidth")&&(U.textStrokeWidth=G.lineWidth),hasOwn(G,"font")&&(U.font=G.font),hasOwn(G,"fontStyle")&&(U.fontStyle=G.fontStyle),hasOwn(G,"fontWeight")&&(U.fontWeight=G.fontWeight),hasOwn(G,"fontSize")&&(U.fontSize=G.fontSize),hasOwn(G,"fontFamily")&&(U.fontFamily=G.fontFamily),hasOwn(G,"align")&&(U.textAlign=G.align),hasOwn(G,"verticalAlign")&&(U.textVerticalAlign=G.verticalAlign),hasOwn(G,"lineHeight")&&(U.textLineHeight=G.lineHeight),hasOwn(G,"width")&&(U.textWidth=G.width),hasOwn(G,"height")&&(U.textHeight=G.height),hasOwn(G,"backgroundColor")&&(U.textBackgroundColor=G.backgroundColor),hasOwn(G,"padding")&&(U.textPadding=G.padding),hasOwn(G,"borderColor")&&(U.textBorderColor=G.borderColor),hasOwn(G,"borderWidth")&&(U.textBorderWidth=G.borderWidth),hasOwn(G,"borderRadius")&&(U.textBorderRadius=G.borderRadius),hasOwn(G,"shadowColor")&&(U.textBoxShadowColor=G.shadowColor),hasOwn(G,"shadowBlur")&&(U.textBoxShadowBlur=G.shadowBlur),hasOwn(G,"shadowOffsetX")&&(U.textBoxShadowOffsetX=G.shadowOffsetX),hasOwn(G,"shadowOffsetY")&&(U.textBoxShadowOffsetY=G.shadowOffsetY),hasOwn(G,"textShadowColor")&&(U.textShadowColor=G.textShadowColor),hasOwn(G,"textShadowBlur")&&(U.textShadowBlur=G.textShadowBlur),hasOwn(G,"textShadowOffsetX")&&(U.textShadowOffsetX=G.textShadowOffsetX),hasOwn(G,"textShadowOffsetY")&&(U.textShadowOffsetY=G.textShadowOffsetY))}function warnDeprecated(U,G){if(process.env.NODE_ENV!=="production"){var H=U+"^_^"+G;deprecatedLogs[H]||(console.warn('[ECharts] DEPRECATED: "'+U+'" has been deprecated. '+G),deprecatedLogs[H]=!0)}}var LEGACY_TRANSFORM_PROPS_MAP={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},LEGACY_TRANSFORM_PROPS=keys(LEGACY_TRANSFORM_PROPS_MAP),TRANSFORM_PROPS_MAP=reduce(TRANSFORMABLE_PROPS,function(U,G){return U[G]=1,U},{}),transformPropNamesStr=TRANSFORMABLE_PROPS.join(", "),ELEMENT_ANIMATABLE_PROPS=["","style","shape","extra"],transitionInnerStore=makeInner();function getElementAnimationConfig(U,G,H,W,Z){var X=U+"Animation",K=getAnimationConfig(U,W,Z)||{},Q=transitionInnerStore(G).userDuring;return K.duration>0&&(K.during=Q?bind$1(duringCall,{el:G,userDuring:Q}):null,K.setToFinal=!0,K.scope=U),extend(K,H[X]),K}function applyUpdateTransition(U,G,H,W){W=W||{};var Z=W.dataIndex,X=W.isInit,K=W.clearStyle,Q=H.isAnimationEnabled(),ee=transitionInnerStore(U),te=G.style;ee.userDuring=G.during;var re={},ae={};if(prepareTransformAllPropsFinal(U,G,ae),U.type==="compound")for(var ne=U.shape.paths,ie=G.shape.paths,oe=0;oe<ie.length;oe++){var se=ie[oe];prepareShapeOrExtraAllPropsFinal("shape",se,ne[oe])}else prepareShapeOrExtraAllPropsFinal("shape",G,ae),prepareShapeOrExtraAllPropsFinal("extra",G,ae);if(!X&&Q&&(prepareTransformTransitionFrom(U,G,re),prepareShapeOrExtraTransitionFrom("shape",U,G,re),prepareShapeOrExtraTransitionFrom("extra",U,G,re),prepareStyleTransitionFrom(U,G,te,re)),ae.style=te,applyPropsDirectly(U,ae,K),applyMiscProps(U,G),Q)if(X){var le={};each$f(ELEMENT_ANIMATABLE_PROPS,function(ce){var fe=ce?G[ce]:G;fe&&fe.enterFrom&&(ce&&(le[ce]=le[ce]||{}),extend(ce?le[ce]:le,fe.enterFrom))});var ue=getElementAnimationConfig("enter",U,G,H,Z);ue.duration>0&&U.animateFrom(le,ue)}else applyPropsTransition(U,G,Z||0,H,re);updateLeaveTo(U,G),te?U.dirty():U.markRedraw()}function updateLeaveTo(U,G){for(var H=transitionInnerStore(U).leaveToProps,W=0;W<ELEMENT_ANIMATABLE_PROPS.length;W++){var Z=ELEMENT_ANIMATABLE_PROPS[W],X=Z?G[Z]:G;X&&X.leaveTo&&(H||(H=transitionInnerStore(U).leaveToProps={}),Z&&(H[Z]=H[Z]||{}),extend(Z?H[Z]:H,X.leaveTo))}}function applyLeaveTransition(U,G,H,W){if(U){var Z=U.parent,X=transitionInnerStore(U).leaveToProps;if(X){var K=getElementAnimationConfig("update",U,G,H,0);K.done=function(){Z&&Z.remove(U)},U.animateTo(X,K)}else Z&&Z.remove(U)}}function isTransitionAll(U){return U==="all"}function applyPropsDirectly(U,G,H){var W=G.style;if(!U.isGroup&&W){if(H){U.useStyle({});for(var Z=U.animators,X=0;X<Z.length;X++){var K=Z[X];K.targetName==="style"&&K.changeTarget(U.style)}}U.setStyle(W)}G&&(G.style=null,G&&U.attr(G),G.style=W)}function applyPropsTransition(U,G,H,W,Z){if(Z){var X=getElementAnimationConfig("update",U,G,W,H);X.duration>0&&U.animateFrom(Z,X)}}function applyMiscProps(U,G){hasOwn(G,"silent")&&(U.silent=G.silent),hasOwn(G,"ignore")&&(U.ignore=G.ignore),U instanceof Displayable&&hasOwn(G,"invisible")&&(U.invisible=G.invisible),U instanceof Path&&hasOwn(G,"autoBatch")&&(U.autoBatch=G.autoBatch)}var tmpDuringScope={},transitionDuringAPI={setTransform:function(U,G){return process.env.NODE_ENV!=="production"&&assert(hasOwn(TRANSFORM_PROPS_MAP,U),"Only "+transformPropNamesStr+" available in `setTransform`."),tmpDuringScope.el[U]=G,this},getTransform:function(U){return process.env.NODE_ENV!=="production"&&assert(hasOwn(TRANSFORM_PROPS_MAP,U),"Only "+transformPropNamesStr+" available in `getTransform`."),tmpDuringScope.el[U]},setShape:function(U,G){process.env.NODE_ENV!=="production"&&assertNotReserved(U);var H=tmpDuringScope.el,W=H.shape||(H.shape={});return W[U]=G,H.dirtyShape&&H.dirtyShape(),this},getShape:function(U){process.env.NODE_ENV!=="production"&&assertNotReserved(U);var G=tmpDuringScope.el.shape;if(G)return G[U]},setStyle:function(U,G){process.env.NODE_ENV!=="production"&&assertNotReserved(U);var H=tmpDuringScope.el,W=H.style;return W&&(process.env.NODE_ENV!=="production"&&eqNaN(G)&&warn("style."+U+" must not be assigned with NaN."),W[U]=G,H.dirtyStyle&&H.dirtyStyle()),this},getStyle:function(U){process.env.NODE_ENV!=="production"&&assertNotReserved(U);var G=tmpDuringScope.el.style;if(G)return G[U]},setExtra:function(U,G){process.env.NODE_ENV!=="production"&&assertNotReserved(U);var H=tmpDuringScope.el.extra||(tmpDuringScope.el.extra={});return H[U]=G,this},getExtra:function(U){process.env.NODE_ENV!=="production"&&assertNotReserved(U);var G=tmpDuringScope.el.extra;if(G)return G[U]}};function assertNotReserved(U){if(process.env.NODE_ENV!=="production"&&(U==="transition"||U==="enterFrom"||U==="leaveTo"))throw new Error('key must not be "'+U+'"')}function duringCall(){var U=this,G=U.el;if(G){var H=transitionInnerStore(G).userDuring,W=U.userDuring;if(H!==W){U.el=U.userDuring=null;return}tmpDuringScope.el=G,W(transitionDuringAPI)}}function prepareShapeOrExtraTransitionFrom(U,G,H,W){var Z=H[U];if(Z){var X=G[U],K;if(X){var Q=H.transition,ee=Z.transition;if(ee)if(!K&&(K=W[U]={}),isTransitionAll(ee))extend(K,X);else for(var te=normalizeToArray(ee),re=0;re<te.length;re++){var ae=te[re],ne=X[ae];K[ae]=ne}else if(isTransitionAll(Q)||indexOf(Q,U)>=0){!K&&(K=W[U]={});for(var ie=keys(X),re=0;re<ie.length;re++){var ae=ie[re],ne=X[ae];isNonStyleTransitionEnabled(Z[ae],ne)&&(K[ae]=ne)}}}}}function prepareShapeOrExtraAllPropsFinal(U,G,H){var W=G[U];if(W)for(var Z=H[U]={},X=keys(W),K=0;K<X.length;K++){var Q=X[K];Z[Q]=cloneValue(W[Q])}}function prepareTransformTransitionFrom(U,G,H){for(var W=G.transition,Z=isTransitionAll(W)?TRANSFORMABLE_PROPS:normalizeToArray(W||[]),X=0;X<Z.length;X++){var K=Z[X];if(!(K==="style"||K==="shape"||K==="extra")){var Q=U[K];process.env.NODE_ENV!=="production"&&checkTransformPropRefer(K,"el.transition"),H[K]=Q}}}function prepareTransformAllPropsFinal(U,G,H){for(var W=0;W<LEGACY_TRANSFORM_PROPS.length;W++){var Z=LEGACY_TRANSFORM_PROPS[W],X=LEGACY_TRANSFORM_PROPS_MAP[Z],K=G[Z];K&&(H[X[0]]=K[0],H[X[1]]=K[1])}for(var W=0;W<TRANSFORMABLE_PROPS.length;W++){var Q=TRANSFORMABLE_PROPS[W];G[Q]!=null&&(H[Q]=G[Q])}}function prepareStyleTransitionFrom(U,G,H,W){if(H){var Z=U.style,X;if(Z){var K=H.transition,Q=G.transition;if(K&&!isTransitionAll(K)){var ee=normalizeToArray(K);!X&&(X=W.style={});for(var te=0;te<ee.length;te++){var re=ee[te],ae=Z[re];X[re]=ae}}else if(U.getAnimationStyleProps&&(isTransitionAll(Q)||isTransitionAll(K)||indexOf(Q,"style")>=0)){var ne=U.getAnimationStyleProps(),ie=ne?ne.style:null;if(ie){!X&&(X=W.style={});for(var oe=keys(H),te=0;te<oe.length;te++){var re=oe[te];if(ie[re]){var ae=Z[re];X[re]=ae}}}}}}}function isNonStyleTransitionEnabled(U,G){return isArrayLike(U)?U!==G:U!=null&&isFinite(U)}var checkTransformPropRefer;process.env.NODE_ENV!=="production"&&(checkTransformPropRefer=function(U,G){hasOwn(TRANSFORM_PROPS_MAP,U)||warn("Prop `"+U+"` is not a permitted in `"+G+"`. Only `"+keys(TRANSFORM_PROPS_MAP).join("`, `")+"` are permitted.")});var getStateToRestore=makeInner(),KEYFRAME_EXCLUDE_KEYS=["percent","easing","shape","style","extra"];function stopPreviousKeyframeAnimationAndRestore(U){U.stopAnimation("keyframe"),U.attr(getStateToRestore(U))}function applyKeyframeAnimation(U,G,H){if(!(!H.isAnimationEnabled()||!G)){if(isArray$1(G)){each$f(G,function(Q){applyKeyframeAnimation(U,Q,H)});return}var W=G.keyframes,Z=G.duration;if(H&&Z==null){var X=getAnimationConfig("enter",H,0);Z=X&&X.duration}if(!(!W||!Z)){var K=getStateToRestore(U);each$f(ELEMENT_ANIMATABLE_PROPS,function(Q){if(!(Q&&!U[Q])){var ee,te=!1;W.sort(function(re,ae){return re.percent-ae.percent}),each$f(W,function(re){var ae=U.animators,ne=Q?re[Q]:re;if(process.env.NODE_ENV!=="production"&&re.percent>=1&&(te=!0),!!ne){var ie=keys(ne);if(Q||(ie=filter(ie,function(le){return indexOf(KEYFRAME_EXCLUDE_KEYS,le)<0})),!!ie.length){ee||(ee=U.animate(Q,G.loop,!0),ee.scope="keyframe");for(var oe=0;oe<ae.length;oe++)ae[oe]!==ee&&ae[oe].targetName===ee.targetName&&ae[oe].stopTracks(ie);Q&&(K[Q]=K[Q]||{});var se=Q?K[Q]:K;each$f(ie,function(le){se[le]=((Q?U[Q]:U)||{})[le]}),ee.whenWithKeys(Z*re.percent,ne,ie,re.easing)}}}),ee&&(process.env.NODE_ENV!=="production"&&(te||warn("End frame with percent: 1 is missing in the keyframeAnimation.",!0)),ee.delay(G.delay||0).duration(Z).start(G.easing))}})}}}var EMPHASIS="emphasis",NORMAL="normal",BLUR="blur",SELECT="select",STATES=[NORMAL,EMPHASIS,BLUR,SELECT],PATH_ITEM_STYLE={normal:["itemStyle"],emphasis:[EMPHASIS,"itemStyle"],blur:[BLUR,"itemStyle"],select:[SELECT,"itemStyle"]},PATH_LABEL={normal:["label"],emphasis:[EMPHASIS,"label"],blur:[BLUR,"label"],select:[SELECT,"label"]},DEFAULT_TRANSITION=["x","y"],GROUP_DIFF_PREFIX="e\0\0",attachedTxInfoTmp={normal:{},emphasis:{},blur:{},select:{}},prepareCustoms={cartesian2d:cartesianPrepareCustom,geo:geoPrepareCustom,single:singlePrepareCustom,polar:polarPrepareCustom,calendar:calendarPrepareCustom,matrix:matrixPrepareCustom};function isPath(U){return U instanceof Path}function isDisplayable(U){return U instanceof Displayable}function copyElement(U,G){G.copyTransform(U),isDisplayable(G)&&isDisplayable(U)&&(G.setStyle(U.style),G.z=U.z,G.z2=U.z2,G.zlevel=U.zlevel,G.invisible=U.invisible,G.ignore=U.ignore,isPath(G)&&isPath(U)&&G.setShape(U.shape))}var CustomChartView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z,X){this._progressiveEls=null;var K=this._data,Q=H.getData(),ee=this.group,te=makeRenderItem(H,Q,W,Z);K||ee.removeAll(),Q.diff(K).add(function(ae){createOrUpdateItem(Z,null,ae,te(ae,X),H,ee,Q)}).remove(function(ae){var ne=K.getItemGraphicEl(ae);ne&&applyLeaveTransition(ne,customInnerStore(ne).option,H)}).update(function(ae,ne){var ie=K.getItemGraphicEl(ne);createOrUpdateItem(Z,ie,ae,te(ae,X),H,ee,Q)}).execute();var re=H.get("clip",!0)?createClipPath(H.coordinateSystem,!1,H):null;re?ee.setClipPath(re):ee.removeClipPath(),this._data=Q},G.prototype.incrementalPrepareRender=function(H,W,Z){this.group.removeAll(),this._data=null},G.prototype.incrementalRender=function(H,W,Z,X,K){var Q=W.getData(),ee=makeRenderItem(W,Q,Z,X),te=this._progressiveEls=[];function re(ie){ie.isGroup||(ie.incremental=!0,ie.ensureState("emphasis").hoverLayer=!0)}for(var ae=H.start;ae<H.end;ae++){var ne=createOrUpdateItem(null,null,ae,ee(ae,K),W,this.group,Q);ne&&(ne.traverse(re),te.push(ne))}},G.prototype.eachRendered=function(H){traverseElements(this._progressiveEls||this.group,H)},G.prototype.filterForExposedEvent=function(H,W,Z,X){var K=W.element;if(K==null||Z.name===K)return!0;for(;(Z=Z.__hostTarget||Z.parent)&&Z!==this.group;)if(Z.name===K)return!0;return!1},G.type="custom",G})(ChartView);function createEl$1(U){var G=U.type,H;if(G==="path"){var W=U.shape,Z=W.width!=null&&W.height!=null?{x:W.x||0,y:W.y||0,width:W.width,height:W.height}:null,X=getPathData(W);H=makePath(X,null,Z,W.layout||"center"),customInnerStore(H).customPathData=X}else if(G==="image")H=new ZRImage({}),customInnerStore(H).customImagePath=U.style.image;else if(G==="text")H=new ZRText({});else if(G==="group")H=new Group$3;else if(G==="compoundPath"){var W=U.shape;if(!W||!W.paths){var K="";process.env.NODE_ENV!=="production"&&(K="shape.paths must be specified in compoundPath"),throwError(K)}var Q=map$1(W.paths,function(re){if(re.type==="path")return makePath(re.shape.pathData,re,null);var ae=getShapeClass(re.type);if(!ae){var ne="";process.env.NODE_ENV!=="production"&&(ne='graphic type "'+G+'" can not be found.'),throwError(ne)}return new ae});H=new CompoundPath({shape:{paths:Q}})}else{var ee=getShapeClass(G);if(!ee){var K="";process.env.NODE_ENV!=="production"&&(K='graphic type "'+G+'" can not be found.'),throwError(K)}H=new ee}return customInnerStore(H).customGraphicType=G,H.name=U.name,H.z2EmphasisLift=1,H.z2SelectLift=1,H}function updateElNormal(U,G,H,W,Z,X,K){stopPreviousKeyframeAnimationAndRestore(G);var Q=Z&&Z.normal.cfg;Q&&G.setTextConfig(Q),W&&W.transition==null&&(W.transition=DEFAULT_TRANSITION);var ee=W&&W.style;if(ee){if(G.type==="text"){var te=ee;hasOwn(te,"textFill")&&(te.fill=te.textFill),hasOwn(te,"textStroke")&&(te.stroke=te.textStroke)}var re=void 0,ae=isPath(G)?ee.decal:null;U&&ae&&(ae.dirty=!0,re=createOrUpdatePatternFromDecal(ae,U)),ee.__decalPattern=re}if(isDisplayable(G)&&ee){var re=ee.__decalPattern;re&&(ee.decal=re)}applyUpdateTransition(G,W,X,{dataIndex:H,isInit:K,clearStyle:!0}),applyKeyframeAnimation(G,W.keyframeAnimation,X)}function updateElOnState(U,G,H,W,Z){var X=G.isGroup?null:G,K=Z&&Z[U].cfg;if(X){var Q=X.ensureState(U);if(W===!1){var ee=X.getState(U);ee&&(ee.style=null)}else Q.style=W||null;K&&(Q.textConfig=K),setDefaultStateProxy(X)}}function updateZ$2(U,G,H){if(!U.isGroup){var W=U,Z=H.currentZ,X=H.currentZLevel;W.z=Z,W.zlevel=X;var K=G.z2;K!=null&&(W.z2=K||0);for(var Q=0;Q<STATES.length;Q++)updateZForEachState(W,G,STATES[Q])}}function updateZForEachState(U,G,H){var W=H===NORMAL,Z=W?G:retrieveStateOption(G,H),X=Z?Z.z2:null,K;X!=null&&(K=W?U:U.ensureState(H),K.z2=X||0)}function makeRenderItem(U,G,H,W){var Z=U.get("renderItem");if(typeof Z=="string"){var X=getCustomSeries(Z);X?Z=X:process.env.NODE_ENV!=="production"&&console.warn("Custom series renderItem '"+Z+`' not found.
|
|
32
|
+
Call 'echarts.registerCustomSeries' to register it.`)}var K=U.coordinateSystem,Q={};K&&(process.env.NODE_ENV!=="production"&&(assert(Z,"series.render is required."),assert(K.prepareCustoms||prepareCustoms[K.type],"This coordSys does not support custom series.")),Q=K.prepareCustoms?K.prepareCustoms(K):prepareCustoms[K.type](K));for(var ee=defaults({getWidth:W.getWidth,getHeight:W.getHeight,getZr:W.getZr,getDevicePixelRatio:W.getDevicePixelRatio,value:ve,style:pe,ordinalRawValue:de,styleEmphasis:ge,visual:_e,barLayout:xe,currentSeriesIndices:Se,font:Te},Q.api||{}),te={context:{},seriesId:U.id,seriesName:U.name,seriesIndex:U.seriesIndex,coordSys:Q.coordSys,dataInsideLength:G.count(),encode:wrapEncodeDef(U.getData()),itemPayload:U.get("itemPayload")||{}},re,ae,ne={},ie={},oe={},se={},le=0;le<STATES.length;le++){var ue=STATES[le];oe[ue]=U.getModel(PATH_ITEM_STYLE[ue]),se[ue]=U.getModel(PATH_LABEL[ue])}function ce(be){return be===re?ae||(ae=G.getItemModel(be)):G.getItemModel(be)}function fe(be,Ae){return G.hasItemOption?be===re?ne[Ae]||(ne[Ae]=ce(be).getModel(PATH_ITEM_STYLE[Ae])):ce(be).getModel(PATH_ITEM_STYLE[Ae]):oe[Ae]}function he(be,Ae){return G.hasItemOption?be===re?ie[Ae]||(ie[Ae]=ce(be).getModel(PATH_LABEL[Ae])):ce(be).getModel(PATH_LABEL[Ae]):se[Ae]}return function(be,Ae){return re=be,ae=null,ne={},ie={},Z&&Z(defaults({dataIndexInside:be,dataIndex:G.getRawIndex(be),actionType:Ae?Ae.type:null},te),ee)};function ve(be,Ae){return Ae==null&&(Ae=re),G.getStore().get(G.getDimensionIndex(be||0),Ae)}function de(be,Ae){Ae==null&&(Ae=re),be=be||0;var we=G.getDimensionInfo(be);if(!we){var Ce=G.getDimensionIndex(be);return Ce>=0?G.getStore().get(Ce,Ae):void 0}var Ee=G.get(we.name,Ae),Me=we&&we.ordinalMeta;return Me?Me.categories[Ee]:Ee}function pe(be,Ae){process.env.NODE_ENV!=="production"&&warnDeprecated("api.style","Please write literal style directly instead."),Ae==null&&(Ae=re);var we=G.getItemVisual(Ae,"style"),Ce=we&&we.fill,Ee=we&&we.opacity,Me=fe(Ae,NORMAL).getItemStyle();Ce!=null&&(Me.fill=Ce),Ee!=null&&(Me.opacity=Ee);var De={inheritColor:isString(Ce)?Ce:tokens.color.neutral99},Le=he(Ae,NORMAL),Pe=createTextStyle(Le,null,De,!1,!0);Pe.text=Le.getShallow("show")?retrieve2(U.getFormattedLabel(Ae,NORMAL),getDefaultLabel(G,Ae)):null;var Ie=createTextConfig(Le,De,!1);return ye(be,Me),Me=convertToEC4StyleForCustomSerise(Me,Pe,Ie),be&&me(Me,be),Me.legacy=!0,Me}function ge(be,Ae){process.env.NODE_ENV!=="production"&&warnDeprecated("api.styleEmphasis","Please write literal style directly instead."),Ae==null&&(Ae=re);var we=fe(Ae,EMPHASIS).getItemStyle(),Ce=he(Ae,EMPHASIS),Ee=createTextStyle(Ce,null,null,!0,!0);Ee.text=Ce.getShallow("show")?retrieve3(U.getFormattedLabel(Ae,EMPHASIS),U.getFormattedLabel(Ae,NORMAL),getDefaultLabel(G,Ae)):null;var Me=createTextConfig(Ce,null,!0);return ye(be,we),we=convertToEC4StyleForCustomSerise(we,Ee,Me),be&&me(we,be),we.legacy=!0,we}function me(be,Ae){for(var we in Ae)hasOwn(Ae,we)&&(be[we]=Ae[we])}function ye(be,Ae){be&&(be.textFill&&(Ae.textFill=be.textFill),be.textPosition&&(Ae.textPosition=be.textPosition))}function _e(be,Ae){if(Ae==null&&(Ae=re),hasOwn(STYLE_VISUAL_TYPE,be)){var we=G.getItemVisual(Ae,"style");return we?we[STYLE_VISUAL_TYPE[be]]:null}if(hasOwn(NON_STYLE_VISUAL_PROPS,be))return G.getItemVisual(Ae,be)}function xe(be){if(K.type==="cartesian2d"){var Ae=K.getBaseAxis();return getLayoutOnAxis(defaults({axis:Ae},be))}}function Se(){return H.getCurrentSeriesIndices()}function Te(be){return getFont(be,H)}}function wrapEncodeDef(U){var G={};return each$f(U.dimensions,function(H){var W=U.getDimensionInfo(H);if(!W.isExtraCoord){var Z=W.coordDim,X=G[Z]=G[Z]||[];X[W.coordDimIndex]=U.getDimensionIndex(H)}}),G}function createOrUpdateItem(U,G,H,W,Z,X,K){if(!W){X.remove(G);return}var Q=doCreateOrUpdateEl(U,G,H,W,Z,X);return Q&&K.setItemGraphicEl(H,Q),Q&&toggleHoverEmphasis(Q,W.focus,W.blurScope,W.emphasisDisabled),Q}function doCreateOrUpdateEl(U,G,H,W,Z,X){process.env.NODE_ENV!=="production"&&assert(W,"should not have an null/undefined element setting");var K=-1,Q=G;G&&doesElNeedRecreate(G,W,Z)&&(K=indexOf(X.childrenRef(),G),G=null);var ee=!G,te=G;te?te.clearStates():(te=createEl$1(W),Q&©Element(Q,te)),W.morph===!1?te.disableMorphing=!0:te.disableMorphing&&(te.disableMorphing=!1),W.tooltipDisabled&&(te.tooltipDisabled=!0),attachedTxInfoTmp.normal.cfg=attachedTxInfoTmp.normal.conOpt=attachedTxInfoTmp.emphasis.cfg=attachedTxInfoTmp.emphasis.conOpt=attachedTxInfoTmp.blur.cfg=attachedTxInfoTmp.blur.conOpt=attachedTxInfoTmp.select.cfg=attachedTxInfoTmp.select.conOpt=null,attachedTxInfoTmp.isLegacy=!1,doCreateOrUpdateAttachedTx(te,H,W,Z,ee,attachedTxInfoTmp),doCreateOrUpdateClipPath(te,H,W,Z,ee),updateElNormal(U,te,H,W,attachedTxInfoTmp,Z,ee),hasOwn(W,"info")&&(customInnerStore(te).info=W.info);for(var re=0;re<STATES.length;re++){var ae=STATES[re];if(ae!==NORMAL){var ne=retrieveStateOption(W,ae),ie=retrieveStyleOptionOnState(W,ne,ae);updateElOnState(ae,te,ne,ie,attachedTxInfoTmp)}}return updateZ$2(te,W,Z),W.type==="group"&&mergeChildren(U,te,H,W,Z),K>=0?X.replaceAt(te,K):X.add(te),te}function doesElNeedRecreate(U,G,H){var W=customInnerStore(U),Z=G.type,X=G.shape,K=G.style;return H.isUniversalTransitionEnabled()||Z!=null&&Z!==W.customGraphicType||Z==="path"&&hasOwnPathData(X)&&getPathData(X)!==W.customPathData||Z==="image"&&hasOwn(K,"image")&&K.image!==W.customImagePath}function doCreateOrUpdateClipPath(U,G,H,W,Z){var X=H.clipPath;if(X===!1)U&&U.getClipPath()&&U.removeClipPath();else if(X){var K=U.getClipPath();K&&doesElNeedRecreate(K,X,W)&&(K=null),K||(K=createEl$1(X),process.env.NODE_ENV!=="production"&&assert(isPath(K),"Only any type of `path` can be used in `clipPath`, rather than "+K.type+"."),U.setClipPath(K)),updateElNormal(null,K,G,X,null,W,Z)}}function doCreateOrUpdateAttachedTx(U,G,H,W,Z,X){if(!(U.isGroup||U.type==="compoundPath")){processTxInfo(H,null,X),processTxInfo(H,EMPHASIS,X);var K=X.normal.conOpt,Q=X.emphasis.conOpt,ee=X.blur.conOpt,te=X.select.conOpt;if(K!=null||Q!=null||te!=null||ee!=null){var re=U.getTextContent();if(K===!1)re&&U.removeTextContent();else{K=X.normal.conOpt=K||{type:"text"},re?re.clearStates():(re=createEl$1(K),U.setTextContent(re)),updateElNormal(null,re,G,K,null,W,Z);for(var ae=K&&K.style,ne=0;ne<STATES.length;ne++){var ie=STATES[ne];if(ie!==NORMAL){var oe=X[ie].conOpt;updateElOnState(ie,re,oe,retrieveStyleOptionOnState(K,oe,ie),null)}}ae?re.dirty():re.markRedraw()}}}}function processTxInfo(U,G,H){var W=G?retrieveStateOption(U,G):U,Z=G?retrieveStyleOptionOnState(U,W,EMPHASIS):U.style,X=U.type,K=W?W.textConfig:null,Q=U.textContent,ee=Q?G?retrieveStateOption(Q,G):Q:null;if(Z&&(H.isLegacy||isEC4CompatibleStyle(Z,X,!!K,!!ee))){H.isLegacy=!0;var te=convertFromEC4CompatibleStyle(Z,X,!G);!K&&te.textConfig&&(K=te.textConfig),!ee&&te.textContent&&(ee=te.textContent)}if(!G&&ee){var re=ee;!re.type&&(re.type="text"),process.env.NODE_ENV!=="production"&&assert(re.type==="text",'textContent.type must be "text"')}var ae=G?H[G]:H.normal;ae.cfg=K,ae.conOpt=ee}function retrieveStateOption(U,G){return G?U?U[G]:null:U}function retrieveStyleOptionOnState(U,G,H){var W=G&&G.style;return W==null&&H===EMPHASIS&&U&&(W=U.styleEmphasis),W}function mergeChildren(U,G,H,W,Z){var X=W.children,K=X?X.length:0,Q=W.$mergeChildren,ee=Q==="byName"||W.diffChildrenByName,te=Q===!1;if(!(!K&&!ee&&!te)){if(ee){diffGroupChildren({api:U,oldChildren:G.children()||[],newChildren:X||[],dataIndex:H,seriesModel:Z,group:G});return}te&&G.removeAll();for(var re=0;re<K;re++){var ae=X[re],ne=G.childAt(re);ae?(ae.ignore==null&&(ae.ignore=!1),doCreateOrUpdateEl(U,ne,H,ae,Z,G)):(process.env.NODE_ENV!=="production"&&assert(ne,"renderItem should not return a group containing elements as null/undefined/{} if they do not exist before."),ne.ignore=!0)}for(var ie=G.childCount()-1;ie>=re;ie--){var oe=G.childAt(ie);removeChildFromGroup(G,oe,Z)}}}function removeChildFromGroup(U,G,H){G&&applyLeaveTransition(G,customInnerStore(U).option,H)}function diffGroupChildren(U){new DataDiffer(U.oldChildren,U.newChildren,getKey,getKey,U).add(processAddUpdate).update(processAddUpdate).remove(processRemove).execute()}function getKey(U,G){var H=U&&U.name;return H??GROUP_DIFF_PREFIX+G}function processAddUpdate(U,G){var H=this.context,W=U!=null?H.newChildren[U]:null,Z=G!=null?H.oldChildren[G]:null;doCreateOrUpdateEl(H.api,Z,H.dataIndex,W,H.seriesModel,H.group)}function processRemove(U){var G=this.context,H=G.oldChildren[U];H&&applyLeaveTransition(H,customInnerStore(H).option,G.seriesModel)}function getPathData(U){return U&&(U.pathData||U.d)}function hasOwnPathData(U){return U&&(hasOwn(U,"pathData")||hasOwn(U,"d"))}function install$u(U){U.registerChartView(CustomChartView),U.registerSeriesModel(CustomSeriesModel)}var inner$b=makeInner(),clone$1=clone$4,bind=bind$1,BaseAxisPointer=(function(){function U(){this._dragging=!1,this.animationThreshold=15}return U.prototype.render=function(G,H,W,Z){var X=H.get("value"),K=H.get("status");if(this._axisModel=G,this._axisPointerModel=H,this._api=W,!(!Z&&this._lastValue===X&&this._lastStatus===K)){this._lastValue=X,this._lastStatus=K;var Q=this._group,ee=this._handle;if(!K||K==="hide"){Q&&Q.hide(),ee&&ee.hide();return}Q&&Q.show(),ee&&ee.show();var te={};this.makeElOption(te,X,G,H,W);var re=te.graphicKey;re!==this._lastGraphicKey&&this.clear(W),this._lastGraphicKey=re;var ae=this._moveAnimation=this.determineAnimation(G,H);if(!Q)Q=this._group=new Group$3,this.createPointerEl(Q,te,G,H),this.createLabelEl(Q,te,G,H),W.getZr().add(Q);else{var ne=curry$1(updateProps,H,ae);this.updatePointerEl(Q,te,ne),this.updateLabelEl(Q,te,ne,H)}updateMandatoryProps(Q,H,!0),this._renderHandle(X)}},U.prototype.remove=function(G){this.clear(G)},U.prototype.dispose=function(G){this.clear(G)},U.prototype.determineAnimation=function(G,H){var W=H.get("animation"),Z=G.axis,X=Z.type==="category",K=H.get("snap");if(!K&&!X)return!1;if(W==="auto"||W==null){var Q=this.animationThreshold;if(X&&Z.getBandWidth()>Q)return!0;if(K){var ee=getAxisInfo$1(G).seriesDataCount,te=Z.getExtent();return Math.abs(te[0]-te[1])/ee>Q}return!1}return W===!0},U.prototype.makeElOption=function(G,H,W,Z,X){},U.prototype.createPointerEl=function(G,H,W,Z){var X=H.pointer;if(X){var K=inner$b(G).pointerEl=new graphic[X.type](clone$1(H.pointer));G.add(K)}},U.prototype.createLabelEl=function(G,H,W,Z){if(H.label){var X=inner$b(G).labelEl=new ZRText(clone$1(H.label));G.add(X),updateLabelShowHide(X,Z)}},U.prototype.updatePointerEl=function(G,H,W){var Z=inner$b(G).pointerEl;Z&&H.pointer&&(Z.setStyle(H.pointer.style),W(Z,{shape:H.pointer.shape}))},U.prototype.updateLabelEl=function(G,H,W,Z){var X=inner$b(G).labelEl;X&&(X.setStyle(H.label.style),W(X,{x:H.label.x,y:H.label.y}),updateLabelShowHide(X,Z))},U.prototype._renderHandle=function(G){if(!(this._dragging||!this.updateHandleTransform)){var H=this._axisPointerModel,W=this._api.getZr(),Z=this._handle,X=H.getModel("handle"),K=H.get("status");if(!X.get("show")||!K||K==="hide"){Z&&W.remove(Z),this._handle=null;return}var Q;this._handle||(Q=!0,Z=this._handle=createIcon(X.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(te){stop(te.event)},onmousedown:bind(this._onHandleDragMove,this,0,0),drift:bind(this._onHandleDragMove,this),ondragend:bind(this._onHandleDragEnd,this)}),W.add(Z)),updateMandatoryProps(Z,H,!1),Z.setStyle(X.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var ee=X.get("size");isArray$1(ee)||(ee=[ee,ee]),Z.scaleX=ee[0]/2,Z.scaleY=ee[1]/2,createOrUpdate(this,"_doDispatchAxisPointer",X.get("throttle")||0,"fixRate"),this._moveHandleToValue(G,Q)}},U.prototype._moveHandleToValue=function(G,H){updateProps(this._axisPointerModel,!H&&this._moveAnimation,this._handle,getHandleTransProps(this.getHandleTransform(G,this._axisModel,this._axisPointerModel)))},U.prototype._onHandleDragMove=function(G,H){var W=this._handle;if(W){this._dragging=!0;var Z=this.updateHandleTransform(getHandleTransProps(W),[G,H],this._axisModel,this._axisPointerModel);this._payloadInfo=Z,W.stopAnimation(),W.attr(getHandleTransProps(Z)),inner$b(W).lastProp=null,this._doDispatchAxisPointer()}},U.prototype._doDispatchAxisPointer=function(){var G=this._handle;if(G){var H=this._payloadInfo,W=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:H.cursorPoint[0],y:H.cursorPoint[1],tooltipOption:H.tooltipOption,axesInfo:[{axisDim:W.axis.dim,axisIndex:W.componentIndex}]})}},U.prototype._onHandleDragEnd=function(){this._dragging=!1;var G=this._handle;if(G){var H=this._axisPointerModel.get("value");this._moveHandleToValue(H),this._api.dispatchAction({type:"hideTip"})}},U.prototype.clear=function(G){this._lastValue=null,this._lastStatus=null;var H=G.getZr(),W=this._group,Z=this._handle;H&&W&&(this._lastGraphicKey=null,W&&H.remove(W),Z&&H.remove(Z),this._group=null,this._handle=null,this._payloadInfo=null),clear$1(this,"_doDispatchAxisPointer")},U.prototype.doClear=function(){},U.prototype.buildLabel=function(G,H,W){return W=W||0,{x:G[W],y:G[1-W],width:H[W],height:H[1-W]}},U})();function updateProps(U,G,H,W){propsEqual(inner$b(H).lastProp,W)||(inner$b(H).lastProp=W,G?updateProps$1(H,W,U):(H.stopAnimation(),H.attr(W)))}function propsEqual(U,G){if(isObject$3(U)&&isObject$3(G)){var H=!0;return each$f(G,function(W,Z){H=H&&propsEqual(U[Z],W)}),!!H}else return U===G}function updateLabelShowHide(U,G){U[G.get(["label","show"])?"show":"hide"]()}function getHandleTransProps(U){return{x:U.x||0,y:U.y||0,rotation:U.rotation||0}}function updateMandatoryProps(U,G,H){var W=G.get("z"),Z=G.get("zlevel");U&&U.traverse(function(X){X.type!=="group"&&(W!=null&&(X.z=W),Z!=null&&(X.zlevel=Z),X.silent=H)})}function buildElStyle(U){var G=U.get("type"),H=U.getModel(G+"Style"),W;return G==="line"?(W=H.getLineStyle(),W.fill=null):G==="shadow"&&(W=H.getAreaStyle(),W.stroke=null),W}function buildLabelElOption(U,G,H,W,Z){var X=H.get("value"),K=getValueLabel(X,G.axis,G.ecModel,H.get("seriesDataIndices"),{precision:H.get(["label","precision"]),formatter:H.get(["label","formatter"])}),Q=H.getModel("label"),ee=normalizeCssArray(Q.get("padding")||0),te=Q.getFont(),re=getBoundingRect(K,te),ae=Z.position,ne=re.width+ee[1]+ee[3],ie=re.height+ee[0]+ee[2],oe=Z.align;oe==="right"&&(ae[0]-=ne),oe==="center"&&(ae[0]-=ne/2);var se=Z.verticalAlign;se==="bottom"&&(ae[1]-=ie),se==="middle"&&(ae[1]-=ie/2),confineInContainer(ae,ne,ie,W);var le=Q.get("backgroundColor");(!le||le==="auto")&&(le=G.get(["axisLine","lineStyle","color"])),U.label={x:ae[0],y:ae[1],style:createTextStyle(Q,{text:K,font:te,fill:Q.getTextColor(),padding:ee,backgroundColor:le}),z2:10}}function confineInContainer(U,G,H,W){var Z=W.getWidth(),X=W.getHeight();U[0]=Math.min(U[0]+G,Z)-G,U[1]=Math.min(U[1]+H,X)-H,U[0]=Math.max(U[0],0),U[1]=Math.max(U[1],0)}function getValueLabel(U,G,H,W,Z){U=G.scale.parse(U);var X=G.scale.getLabel({value:U},{precision:Z.precision}),K=Z.formatter;if(K){var Q={value:getAxisRawValue(G,{value:U}),axisDimension:G.dim,axisIndex:G.index,seriesData:[]};each$f(W,function(ee){var te=H.getSeriesByIndex(ee.seriesIndex),re=ee.dataIndexInside,ae=te&&te.getDataParams(re);ae&&Q.seriesData.push(ae)}),isString(K)?X=K.replace("{value}",X):isFunction(K)&&(X=K(Q))}return X}function getTransformedPosition(U,G,H){var W=create$1();return rotate(W,W,H.rotation),translate(W,W,H.position),applyTransform([U.dataToCoord(G),(H.labelOffset||0)+(H.labelDirection||1)*(H.labelMargin||0)],W)}function buildCartesianSingleLabelElOption(U,G,H,W,Z,X){var K=AxisBuilder.innerTextLayout(H.rotation,0,H.labelDirection);H.labelMargin=Z.get(["label","margin"]),buildLabelElOption(G,W,Z,X,{position:getTransformedPosition(W.axis,U,H),align:K.textAlign,verticalAlign:K.textVerticalAlign})}function makeLineShape(U,G,H){return H=H||0,{x1:U[H],y1:U[1-H],x2:G[H],y2:G[1-H]}}function makeRectShape(U,G,H){return H=H||0,{x:U[H],y:U[1-H],width:G[H],height:G[1-H]}}function makeSectorShape(U,G,H,W,Z,X){return{cx:U,cy:G,r0:H,r:W,startAngle:Z,endAngle:X,clockwise:!0}}var CartesianAxisPointer=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.makeElOption=function(H,W,Z,X,K){var Q=Z.axis,ee=Q.grid,te=X.get("type"),re=getCartesian(ee,Q).getOtherAxis(Q).getGlobalExtent(),ae=Q.toGlobalCoord(Q.dataToCoord(W,!0));if(te&&te!=="none"){var ne=buildElStyle(X),ie=pointerShapeBuilder$2[te](Q,ae,re);ie.style=ne,H.graphicKey=ie.type,H.pointer=ie}var oe=layout$1(ee.getRect(),Z);buildCartesianSingleLabelElOption(W,H,oe,Z,X,K)},G.prototype.getHandleTransform=function(H,W,Z){var X=layout$1(W.axis.grid.getRect(),W,{labelInside:!1});X.labelMargin=Z.get(["handle","margin"]);var K=getTransformedPosition(W.axis,H,X);return{x:K[0],y:K[1],rotation:X.rotation+(X.labelDirection<0?Math.PI:0)}},G.prototype.updateHandleTransform=function(H,W,Z,X){var K=Z.axis,Q=K.grid,ee=K.getGlobalExtent(!0),te=getCartesian(Q,K).getOtherAxis(K).getGlobalExtent(),re=K.dim==="x"?0:1,ae=[H.x,H.y];ae[re]+=W[re],ae[re]=Math.min(ee[1],ae[re]),ae[re]=Math.max(ee[0],ae[re]);var ne=(te[1]+te[0])/2,ie=[ne,ne];ie[re]=ae[re];var oe=[{verticalAlign:"middle"},{align:"center"}];return{x:ae[0],y:ae[1],rotation:H.rotation,cursorPoint:ie,tooltipOption:oe[re]}},G})(BaseAxisPointer);function getCartesian(U,G){var H={};return H[G.dim+"AxisIndex"]=G.index,U.getCartesian(H)}var pointerShapeBuilder$2={line:function(U,G,H){var W=makeLineShape([G,H[0]],[G,H[1]],getAxisDimIndex(U));return{type:"Line",subPixelOptimize:!0,shape:W}},shadow:function(U,G,H){var W=Math.max(1,U.getBandWidth()),Z=H[1]-H[0];return{type:"Rect",shape:makeRectShape([G-W/2,H[0]],[W,Z],getAxisDimIndex(U))}}};function getAxisDimIndex(U){return U.dim==="x"?0:1}var AxisPointerModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="axisPointer",G.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:tokens.color.border,width:1,type:"dashed"},shadowStyle:{color:tokens.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:tokens.color.neutral00,padding:[5,7,5,7],backgroundColor:tokens.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:tokens.color.accent40,throttle:40}},G})(ComponentModel),inner$a=makeInner(),each$8=each$f;function register$1(U,G,H){if(!env.node){var W=G.getZr();inner$a(W).records||(inner$a(W).records={}),initGlobalListeners(W,G);var Z=inner$a(W).records[U]||(inner$a(W).records[U]={});Z.handler=H}}function initGlobalListeners(U,G){if(inner$a(U).initialized)return;inner$a(U).initialized=!0,H("click",curry$1(doEnter,"click")),H("mousemove",curry$1(doEnter,"mousemove")),H("globalout",onLeave);function H(W,Z){U.on(W,function(X){var K=makeDispatchAction$1(G);each$8(inner$a(U).records,function(Q){Q&&Z(Q,X,K.dispatchAction)}),dispatchTooltipFinally(K.pendings,G)})}}function dispatchTooltipFinally(U,G){var H=U.showTip.length,W=U.hideTip.length,Z;H?Z=U.showTip[H-1]:W&&(Z=U.hideTip[W-1]),Z&&(Z.dispatchAction=null,G.dispatchAction(Z))}function onLeave(U,G,H){U.handler("leave",null,H)}function doEnter(U,G,H,W){G.handler(U,H,W)}function makeDispatchAction$1(U){var G={showTip:[],hideTip:[]},H=function(W){var Z=G[W.type];Z?Z.push(W):(W.dispatchAction=H,U.dispatchAction(W))};return{dispatchAction:H,pendings:G}}function unregister(U,G){if(!env.node){var H=G.getZr(),W=(inner$a(H).records||{})[U];W&&(inner$a(H).records[U]=null)}}var AxisPointerView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){var X=W.getComponent("tooltip"),K=H.get("triggerOn")||X&&X.get("triggerOn")||"mousemove|click";register$1("axisPointer",Z,function(Q,ee,te){K!=="none"&&(Q==="leave"||K.indexOf(Q)>=0)&&te({type:"updateAxisPointer",currTrigger:Q,x:ee&&ee.offsetX,y:ee&&ee.offsetY})})},G.prototype.remove=function(H,W){unregister("axisPointer",W)},G.prototype.dispose=function(H,W){unregister("axisPointer",W)},G.type="axisPointer",G})(ComponentView);function findPointFromSeries(U,G){var H=[],W=U.seriesIndex,Z;if(W==null||!(Z=G.getSeriesByIndex(W)))return{point:[]};var X=Z.getData(),K=queryDataIndex(X,U);if(K==null||K<0||isArray$1(K))return{point:[]};var Q=X.getItemGraphicEl(K),ee=Z.coordinateSystem;if(Z.getTooltipPosition)H=Z.getTooltipPosition(K)||[];else if(ee&&ee.dataToPoint)if(U.isStacked){var te=ee.getBaseAxis(),re=ee.getOtherAxis(te),ae=re.dim,ne=te.dim,ie=ae==="x"||ae==="radius"?1:0,oe=X.mapDimension(ne),se=[];se[ie]=X.get(oe,K),se[1-ie]=X.get(X.getCalculationInfo("stackResultDimension"),K),H=ee.dataToPoint(se)||[]}else H=ee.dataToPoint(X.getValues(map$1(ee.dimensions,function(ue){return X.mapDimension(ue)}),K))||[];else if(Q){var le=Q.getBoundingRect().clone();le.applyTransform(Q.transform),H=[le.x+le.width/2,le.y+le.height/2]}return{point:H,el:Q}}var inner$9=makeInner();function axisTrigger(U,G,H){var W=U.currTrigger,Z=[U.x,U.y],X=U,K=U.dispatchAction||bind$1(H.dispatchAction,H),Q=G.getComponent("axisPointer").coordSysAxesInfo;if(Q){illegalPoint(Z)&&(Z=findPointFromSeries({seriesIndex:X.seriesIndex,dataIndex:X.dataIndex},G).point);var ee=illegalPoint(Z),te=X.axesInfo,re=Q.axesInfo,ae=W==="leave"||illegalPoint(Z),ne={},ie={},oe={list:[],map:{}},se={showPointer:curry$1(showPointer,ie),showTooltip:curry$1(showTooltip,oe)};each$f(Q.coordSysMap,function(ue,ce){var fe=ee||ue.containPoint(Z);each$f(Q.coordSysAxesInfo[ce],function(he,ve){var de=he.axis,pe=findInputAxisInfo(te,he);if(!ae&&fe&&(!te||pe)){var ge=pe&&pe.value;ge==null&&!ee&&(ge=de.pointToData(Z)),ge!=null&&processOnAxis(he,ge,se,!1,ne)}})});var le={};return each$f(re,function(ue,ce){var fe=ue.linkGroup;fe&&!ie[ce]&&each$f(fe.axesInfo,function(he,ve){var de=ie[ve];if(he!==ue&&de){var pe=de.value;fe.mapper&&(pe=ue.axis.scale.parse(fe.mapper(pe,makeMapperParam(he),makeMapperParam(ue)))),le[ue.key]=pe}})}),each$f(le,function(ue,ce){processOnAxis(re[ce],ue,se,!0,ne)}),updateModelActually(ie,re,ne),dispatchTooltipActually(oe,Z,U,K),dispatchHighDownActually(re,K,H),ne}}function processOnAxis(U,G,H,W,Z){var X=U.axis;if(!(X.scale.isBlank()||!X.containData(G))){if(!U.involveSeries){H.showPointer(U,G);return}var K=buildPayloadsBySeries(G,U),Q=K.payloadBatch,ee=K.snapToValue;Q[0]&&Z.seriesIndex==null&&extend(Z,Q[0]),!W&&U.snap&&X.containData(ee)&&ee!=null&&(G=ee),H.showPointer(U,G,Q),H.showTooltip(U,K,ee)}}function buildPayloadsBySeries(U,G){var H=G.axis,W=H.dim,Z=U,X=[],K=Number.MAX_VALUE,Q=-1;return each$f(G.seriesModels,function(ee,te){var re=ee.getData().mapDimensionsAll(W),ae,ne;if(ee.getAxisTooltipData){var ie=ee.getAxisTooltipData(re,U,H);ne=ie.dataIndices,ae=ie.nestestValue}else{if(ne=ee.indicesOfNearest(W,re[0],U,H.type==="category"?.5:null),!ne.length)return;ae=ee.getData().get(re[0],ne[0])}if(!(ae==null||!isFinite(ae))){var oe=U-ae,se=Math.abs(oe);se<=K&&((se<K||oe>=0&&Q<0)&&(K=se,Q=oe,Z=ae,X.length=0),each$f(ne,function(le){X.push({seriesIndex:ee.seriesIndex,dataIndexInside:le,dataIndex:ee.getData().getRawIndex(le)})}))}}),{payloadBatch:X,snapToValue:Z}}function showPointer(U,G,H,W){U[G.key]={value:H,payloadBatch:W}}function showTooltip(U,G,H,W){var Z=H.payloadBatch,X=G.axis,K=X.model,Q=G.axisPointerModel;if(!(!G.triggerTooltip||!Z.length)){var ee=G.coordSys.model,te=makeKey(ee),re=U.map[te];re||(re=U.map[te]={coordSysId:ee.id,coordSysIndex:ee.componentIndex,coordSysType:ee.type,coordSysMainType:ee.mainType,dataByAxis:[]},U.list.push(re)),re.dataByAxis.push({axisDim:X.dim,axisIndex:K.componentIndex,axisType:K.type,axisId:K.id,value:W,valueLabelOpt:{precision:Q.get(["label","precision"]),formatter:Q.get(["label","formatter"])},seriesDataIndices:Z.slice()})}}function updateModelActually(U,G,H){var W=H.axesInfo=[];each$f(G,function(Z,X){var K=Z.axisPointerModel.option,Q=U[X];Q?(!Z.useHandle&&(K.status="show"),K.value=Q.value,K.seriesDataIndices=(Q.payloadBatch||[]).slice()):!Z.useHandle&&(K.status="hide"),K.status==="show"&&W.push({axisDim:Z.axis.dim,axisIndex:Z.axis.model.componentIndex,value:K.value})})}function dispatchTooltipActually(U,G,H,W){if(illegalPoint(G)||!U.list.length){W({type:"hideTip"});return}var Z=((U.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};W({type:"showTip",escapeConnect:!0,x:G[0],y:G[1],tooltipOption:H.tooltipOption,position:H.position,dataIndexInside:Z.dataIndexInside,dataIndex:Z.dataIndex,seriesIndex:Z.seriesIndex,dataByCoordSys:U.list})}function dispatchHighDownActually(U,G,H){var W=H.getZr(),Z="axisPointerLastHighlights",X=inner$9(W)[Z]||{},K=inner$9(W)[Z]={};each$f(U,function(te,re){var ae=te.axisPointerModel.option;ae.status==="show"&&te.triggerEmphasis&&each$f(ae.seriesDataIndices,function(ne){var ie=ne.seriesIndex+" | "+ne.dataIndex;K[ie]=ne})});var Q=[],ee=[];each$f(X,function(te,re){!K[re]&&ee.push(te)}),each$f(K,function(te,re){!X[re]&&Q.push(te)}),ee.length&&H.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:ee}),Q.length&&H.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:Q})}function findInputAxisInfo(U,G){for(var H=0;H<(U||[]).length;H++){var W=U[H];if(G.axis.dim===W.axisDim&&G.axis.model.componentIndex===W.axisIndex)return W}}function makeMapperParam(U){var G=U.axis.model,H={},W=H.axisDim=U.axis.dim;return H.axisIndex=H[W+"AxisIndex"]=G.componentIndex,H.axisName=H[W+"AxisName"]=G.name,H.axisId=H[W+"AxisId"]=G.id,H}function illegalPoint(U){return!U||U[0]==null||isNaN(U[0])||U[1]==null||isNaN(U[1])}function install$t(U){AxisView.registerAxisPointerClass("CartesianAxisPointer",CartesianAxisPointer),U.registerComponentModel(AxisPointerModel),U.registerComponentView(AxisPointerView),U.registerPreprocessor(function(G){if(G){(!G.axisPointer||G.axisPointer.length===0)&&(G.axisPointer={});var H=G.axisPointer.link;H&&!isArray$1(H)&&(G.axisPointer.link=[H])}}),U.registerProcessor(U.PRIORITY.PROCESSOR.STATISTIC,function(G,H){G.getComponent("axisPointer").coordSysAxesInfo=collect(G,H)}),U.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},axisTrigger)}function install$s(U){use(install$R),use(install$t)}var PolarAxisPointer=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.makeElOption=function(H,W,Z,X,K){var Q=Z.axis;Q.dim==="angle"&&(this.animationThreshold=Math.PI/18);var ee=Q.polar,te=ee.getOtherAxis(Q),re=te.getExtent(),ae=Q.dataToCoord(W),ne=X.get("type");if(ne&&ne!=="none"){var ie=buildElStyle(X),oe=pointerShapeBuilder$1[ne](Q,ee,ae,re);oe.style=ie,H.graphicKey=oe.type,H.pointer=oe}var se=X.get(["label","margin"]),le=getLabelPosition(W,Z,X,ee,se);buildLabelElOption(H,Z,X,K,le)},G})(BaseAxisPointer);function getLabelPosition(U,G,H,W,Z){var X=G.axis,K=X.dataToCoord(U),Q=W.getAngleAxis().getExtent()[0];Q=Q/180*Math.PI;var ee=W.getRadiusAxis().getExtent(),te,re,ae;if(X.dim==="radius"){var ne=create$1();rotate(ne,ne,Q),translate(ne,ne,[W.cx,W.cy]),te=applyTransform([K,-Z],ne);var ie=G.getModel("axisLabel").get("rotate")||0,oe=AxisBuilder.innerTextLayout(Q,ie*Math.PI/180,-1);re=oe.textAlign,ae=oe.textVerticalAlign}else{var se=ee[1];te=W.coordToPoint([se+Z,K]);var le=W.cx,ue=W.cy;re=Math.abs(te[0]-le)/se<.3?"center":te[0]>le?"left":"right",ae=Math.abs(te[1]-ue)/se<.3?"middle":te[1]>ue?"top":"bottom"}return{position:te,align:re,verticalAlign:ae}}var pointerShapeBuilder$1={line:function(U,G,H,W){return U.dim==="angle"?{type:"Line",shape:makeLineShape(G.coordToPoint([W[0],H]),G.coordToPoint([W[1],H]))}:{type:"Circle",shape:{cx:G.cx,cy:G.cy,r:H}}},shadow:function(U,G,H,W){var Z=Math.max(1,U.getBandWidth()),X=Math.PI/180;return U.dim==="angle"?{type:"Sector",shape:makeSectorShape(G.cx,G.cy,W[0],W[1],(-H-Z/2)*X,(-H+Z/2)*X)}:{type:"Sector",shape:makeSectorShape(G.cx,G.cy,H-Z/2,H+Z/2,0,Math.PI*2)}}},PolarModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.findAxisModel=function(H){var W,Z=this.ecModel;return Z.eachComponent(H,function(X){X.getCoordSysModel()===this&&(W=X)},this),W},G.type="polar",G.dependencies=["radiusAxis","angleAxis"],G.defaultOption={z:0,center:["50%","50%"],radius:"80%"},G})(ComponentModel),PolarAxisModel=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",SINGLE_REFERRING).models[0]},G.type="polarAxis",G})(ComponentModel);mixin(PolarAxisModel,AxisModelCommonMixin);var AngleAxisModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="angleAxis",G})(PolarAxisModel),RadiusAxisModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="radiusAxis",G})(PolarAxisModel),RadiusAxis=(function(U){__extends(G,U);function G(H,W){return U.call(this,"radius",H,W)||this}return G.prototype.pointToData=function(H,W){return this.polar.pointToData(H,W)[this.dim==="radius"?0:1]},G})(Axis);RadiusAxis.prototype.dataToRadius=Axis.prototype.dataToCoord,RadiusAxis.prototype.radiusToData=Axis.prototype.coordToData;var inner$8=makeInner(),AngleAxis=(function(U){__extends(G,U);function G(H,W){return U.call(this,"angle",H,W||[0,360])||this}return G.prototype.pointToData=function(H,W){return this.polar.pointToData(H,W)[this.dim==="radius"?0:1]},G.prototype.calculateCategoryInterval=function(){var H=this,W=H.getLabelModel(),Z=H.scale,X=Z.getExtent(),K=Z.count();if(X[1]-X[0]<1)return 0;var Q=X[0],ee=H.dataToCoord(Q+1)-H.dataToCoord(Q),te=Math.abs(ee),re=getBoundingRect(Q==null?"":Q+"",W.getFont(),"center","top"),ae=Math.max(re.height,7),ne=ae/te;isNaN(ne)&&(ne=1/0);var ie=Math.max(0,Math.floor(ne)),oe=inner$8(H.model),se=oe.lastAutoInterval,le=oe.lastTickCount;return se!=null&&le!=null&&Math.abs(se-ie)<=1&&Math.abs(le-K)<=1&&se>ie?ie=se:(oe.lastTickCount=K,oe.lastAutoInterval=ie),ie},G})(Axis);AngleAxis.prototype.dataToAngle=Axis.prototype.dataToCoord,AngleAxis.prototype.angleToData=Axis.prototype.coordToData;var polarDimensions=["radius","angle"],Polar=(function(){function U(G){this.dimensions=polarDimensions,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new RadiusAxis,this._angleAxis=new AngleAxis,this.axisPointerEnabled=!0,this.name=G||"",this._radiusAxis.polar=this._angleAxis.polar=this}return U.prototype.containPoint=function(G){var H=this.pointToCoord(G);return this._radiusAxis.contain(H[0])&&this._angleAxis.contain(H[1])},U.prototype.containData=function(G){return this._radiusAxis.containData(G[0])&&this._angleAxis.containData(G[1])},U.prototype.getAxis=function(G){var H="_"+G+"Axis";return this[H]},U.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},U.prototype.getAxesByScale=function(G){var H=[],W=this._angleAxis,Z=this._radiusAxis;return W.scale.type===G&&H.push(W),Z.scale.type===G&&H.push(Z),H},U.prototype.getAngleAxis=function(){return this._angleAxis},U.prototype.getRadiusAxis=function(){return this._radiusAxis},U.prototype.getOtherAxis=function(G){var H=this._angleAxis;return G===H?this._radiusAxis:H},U.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},U.prototype.getTooltipAxes=function(G){var H=G!=null&&G!=="auto"?this.getAxis(G):this.getBaseAxis();return{baseAxes:[H],otherAxes:[this.getOtherAxis(H)]}},U.prototype.dataToPoint=function(G,H,W){return this.coordToPoint([this._radiusAxis.dataToRadius(G[0],H),this._angleAxis.dataToAngle(G[1],H)],W)},U.prototype.pointToData=function(G,H,W){W=W||[];var Z=this.pointToCoord(G);return W[0]=this._radiusAxis.radiusToData(Z[0],H),W[1]=this._angleAxis.angleToData(Z[1],H),W},U.prototype.pointToCoord=function(G){var H=G[0]-this.cx,W=G[1]-this.cy,Z=this.getAngleAxis(),X=Z.getExtent(),K=Math.min(X[0],X[1]),Q=Math.max(X[0],X[1]);Z.inverse?K=Q-360:Q=K+360;var ee=Math.sqrt(H*H+W*W);H/=ee,W/=ee;for(var te=Math.atan2(-W,H)/Math.PI*180,re=te<K?1:-1;te<K||te>Q;)te+=re*360;return[ee,te]},U.prototype.coordToPoint=function(G,H){H=H||[];var W=G[0],Z=G[1]/180*Math.PI;return H[0]=Math.cos(Z)*W+this.cx,H[1]=-Math.sin(Z)*W+this.cy,H},U.prototype.getArea=function(){var G=this.getAngleAxis(),H=this.getRadiusAxis(),W=H.getExtent().slice();W[0]>W[1]&&W.reverse();var Z=G.getExtent(),X=Math.PI/180,K=1e-4;return{cx:this.cx,cy:this.cy,r0:W[0],r:W[1],startAngle:-Z[0]*X,endAngle:-Z[1]*X,clockwise:G.inverse,contain:function(Q,ee){var te=Q-this.cx,re=ee-this.cy,ae=te*te+re*re,ne=this.r,ie=this.r0;return ne!==ie&&ae-K<=ne*ne&&ae+K>=ie*ie},x:this.cx-W[1],y:this.cy-W[1],width:W[1]*2,height:W[1]*2}},U.prototype.convertToPixel=function(G,H,W){var Z=getCoordSys$3(H);return Z===this?this.dataToPoint(W):null},U.prototype.convertFromPixel=function(G,H,W){var Z=getCoordSys$3(H);return Z===this?this.pointToData(W):null},U})();function getCoordSys$3(U){var G=U.seriesModel,H=U.polarModel;return H&&H.coordinateSystem||G&&G.coordinateSystem}function resizePolar(U,G,H){var W=G.get("center"),Z=createBoxLayoutReference(G,H).refContainer;U.cx=parsePercent(W[0],Z.width)+Z.x,U.cy=parsePercent(W[1],Z.height)+Z.y;var X=U.getRadiusAxis(),K=Math.min(Z.width,Z.height)/2,Q=G.get("radius");Q==null?Q=[0,"100%"]:isArray$1(Q)||(Q=[0,Q]);var ee=[parsePercent(Q[0],K),parsePercent(Q[1],K)];X.inverse?X.setExtent(ee[1],ee[0]):X.setExtent(ee[0],ee[1])}function updatePolarScale(U,G){var H=this,W=H.getAngleAxis(),Z=H.getRadiusAxis();if(W.scale.setExtent(1/0,-1/0),Z.scale.setExtent(1/0,-1/0),U.eachSeries(function(Q){if(Q.coordinateSystem===H){var ee=Q.getData();each$f(getDataDimensionsOnAxis(ee,"radius"),function(te){Z.scale.unionExtentFromData(ee,te)}),each$f(getDataDimensionsOnAxis(ee,"angle"),function(te){W.scale.unionExtentFromData(ee,te)})}}),niceScaleExtent(W.scale,W.model),niceScaleExtent(Z.scale,Z.model),W.type==="category"&&!W.onBand){var X=W.getExtent(),K=360/W.scale.count();W.inverse?X[1]+=K:X[1]-=K,W.setExtent(X[0],X[1])}}function isAngleAxisModel(U){return U.mainType==="angleAxis"}function setAxis(U,G){var H;if(U.type=G.get("type"),U.scale=createScaleByModel$1(G),U.onBand=G.get("boundaryGap")&&U.type==="category",U.inverse=G.get("inverse"),isAngleAxisModel(G)){U.inverse=U.inverse!==G.get("clockwise");var W=G.get("startAngle"),Z=(H=G.get("endAngle"))!==null&&H!==void 0?H:W+(U.inverse?-360:360);U.setExtent(W,Z)}G.axis=U,U.model=G}var polarCreator={dimensions:polarDimensions,create:function(U,G){var H=[];return U.eachComponent("polar",function(W,Z){var X=new Polar(Z+"");X.update=updatePolarScale;var K=X.getRadiusAxis(),Q=X.getAngleAxis(),ee=W.findAxisModel("radiusAxis"),te=W.findAxisModel("angleAxis");setAxis(K,ee),setAxis(Q,te),resizePolar(X,W,G),H.push(X),W.coordinateSystem=X,X.model=W}),U.eachSeries(function(W){if(W.get("coordinateSystem")==="polar"){var Z=W.getReferringComponents("polar",SINGLE_REFERRING).models[0];if(process.env.NODE_ENV!=="production"&&!Z)throw new Error('Polar "'+retrieve(W.get("polarIndex"),W.get("polarId"),0)+'" not found');W.coordinateSystem=Z.coordinateSystem}}),H}},elementList=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function getAxisLineShape(U,G,H){G[1]>G[0]&&(G=G.slice().reverse());var W=U.coordToPoint([G[0],H]),Z=U.coordToPoint([G[1],H]);return{x1:W[0],y1:W[1],x2:Z[0],y2:Z[1]}}function getRadiusIdx(U){var G=U.getRadiusAxis();return G.inverse?0:1}function fixAngleOverlap(U){var G=U[0],H=U[U.length-1];G&&H&&Math.abs(Math.abs(G.coord-H.coord)-360)<1e-4&&U.pop()}var AngleAxisView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.axisPointerClass="PolarAxisPointer",H}return G.prototype.render=function(H,W){if(this.group.removeAll(),!!H.get("show")){var Z=H.axis,X=Z.polar,K=X.getRadiusAxis().getExtent(),Q=Z.getTicksCoords({breakTicks:"none"}),ee=Z.getMinorTicksCoords(),te=map$1(Z.getViewLabels(),function(re){re=clone$4(re);var ae=Z.scale,ne=ae.type==="ordinal"?ae.getRawOrdinalNumber(re.tickValue):re.tickValue;return re.coord=Z.dataToCoord(ne),re});fixAngleOverlap(te),fixAngleOverlap(Q),each$f(elementList,function(re){H.get([re,"show"])&&(!Z.scale.isBlank()||re==="axisLine")&&angelAxisElementsBuilders[re](this.group,H,X,Q,ee,K,te)},this)}},G.type="angleAxis",G})(AxisView),angelAxisElementsBuilders={axisLine:function(U,G,H,W,Z,X){var K=G.getModel(["axisLine","lineStyle"]),Q=H.getAngleAxis(),ee=Math.PI/180,te=Q.getExtent(),re=getRadiusIdx(H),ae=re?0:1,ne,ie=Math.abs(te[1]-te[0])===360?"Circle":"Arc";X[ae]===0?ne=new graphic[ie]({shape:{cx:H.cx,cy:H.cy,r:X[re],startAngle:-te[0]*ee,endAngle:-te[1]*ee,clockwise:Q.inverse},style:K.getLineStyle(),z2:1,silent:!0}):ne=new Ring({shape:{cx:H.cx,cy:H.cy,r:X[re],r0:X[ae]},style:K.getLineStyle(),z2:1,silent:!0}),ne.style.fill=null,U.add(ne)},axisTick:function(U,G,H,W,Z,X){var K=G.getModel("axisTick"),Q=(K.get("inside")?-1:1)*K.get("length"),ee=X[getRadiusIdx(H)],te=map$1(W,function(re){return new Line$1({shape:getAxisLineShape(H,[ee,ee+Q],re.coord)})});U.add(mergePath(te,{style:defaults(K.getModel("lineStyle").getLineStyle(),{stroke:G.get(["axisLine","lineStyle","color"])})}))},minorTick:function(U,G,H,W,Z,X){if(Z.length){for(var K=G.getModel("axisTick"),Q=G.getModel("minorTick"),ee=(K.get("inside")?-1:1)*Q.get("length"),te=X[getRadiusIdx(H)],re=[],ae=0;ae<Z.length;ae++)for(var ne=0;ne<Z[ae].length;ne++)re.push(new Line$1({shape:getAxisLineShape(H,[te,te+ee],Z[ae][ne].coord)}));U.add(mergePath(re,{style:defaults(Q.getModel("lineStyle").getLineStyle(),defaults(K.getLineStyle(),{stroke:G.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(U,G,H,W,Z,X,K){var Q=G.getCategories(!0),ee=G.getModel("axisLabel"),te=ee.get("margin"),re=G.get("triggerEvent");each$f(K,function(ae,ne){var ie=ee,oe=ae.tickValue,se=X[getRadiusIdx(H)],le=H.coordToPoint([se+te,ae.coord]),ue=H.cx,ce=H.cy,fe=Math.abs(le[0]-ue)/se<.3?"center":le[0]>ue?"left":"right",he=Math.abs(le[1]-ce)/se<.3?"middle":le[1]>ce?"top":"bottom";if(Q&&Q[oe]){var ve=Q[oe];isObject$3(ve)&&ve.textStyle&&(ie=new Model(ve.textStyle,ee,ee.ecModel))}var de=new ZRText({silent:AxisBuilder.isLabelSilent(G),style:createTextStyle(ie,{x:le[0],y:le[1],fill:ie.getTextColor()||G.get(["axisLine","lineStyle","color"]),text:ae.formattedLabel,align:fe,verticalAlign:he})});if(U.add(de),setTooltipConfig({el:de,componentModel:G,itemName:ae.formattedLabel,formatterParamsExtra:{isTruncated:function(){return de.isTruncated},value:ae.rawLabel,tickIndex:ne}}),re){var pe=AxisBuilder.makeAxisEventDataBase(G);pe.targetType="axisLabel",pe.value=ae.rawLabel,getECData(de).eventData=pe}},this)},splitLine:function(U,G,H,W,Z,X){var K=G.getModel("splitLine"),Q=K.getModel("lineStyle"),ee=Q.get("color"),te=0;ee=ee instanceof Array?ee:[ee];for(var re=[],ae=0;ae<W.length;ae++){var ne=te++%ee.length;re[ne]=re[ne]||[],re[ne].push(new Line$1({shape:getAxisLineShape(H,X,W[ae].coord)}))}for(var ae=0;ae<re.length;ae++)U.add(mergePath(re[ae],{style:defaults({stroke:ee[ae%ee.length]},Q.getLineStyle()),silent:!0,z:G.get("z")}))},minorSplitLine:function(U,G,H,W,Z,X){if(Z.length){for(var K=G.getModel("minorSplitLine"),Q=K.getModel("lineStyle"),ee=[],te=0;te<Z.length;te++)for(var re=0;re<Z[te].length;re++)ee.push(new Line$1({shape:getAxisLineShape(H,X,Z[te][re].coord)}));U.add(mergePath(ee,{style:Q.getLineStyle(),silent:!0,z:G.get("z")}))}},splitArea:function(U,G,H,W,Z,X){if(W.length){var K=G.getModel("splitArea"),Q=K.getModel("areaStyle"),ee=Q.get("color"),te=0;ee=ee instanceof Array?ee:[ee];for(var re=[],ae=Math.PI/180,ne=-W[0].coord*ae,ie=Math.min(X[0],X[1]),oe=Math.max(X[0],X[1]),se=G.get("clockwise"),le=1,ue=W.length;le<=ue;le++){var ce=le===ue?W[0].coord:W[le].coord,fe=te++%ee.length;re[fe]=re[fe]||[],re[fe].push(new Sector({shape:{cx:H.cx,cy:H.cy,r0:ie,r:oe,startAngle:ne,endAngle:-ce*ae,clockwise:se},silent:!0})),ne=-ce*ae}for(var le=0;le<re.length;le++)U.add(mergePath(re[le],{style:defaults({fill:ee[le%ee.length]},Q.getAreaStyle()),silent:!0}))}}},selfBuilderAttrs$1=["splitLine","splitArea","minorSplitLine"],RadiusAxisView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.axisPointerClass="PolarAxisPointer",H}return G.prototype.render=function(H,W,Z){if(this.group.removeAll(),!!H.get("show")){var X=this._axisGroup,K=this._axisGroup=new Group$3;this.group.add(K);var Q=H.axis,ee=Q.polar,te=ee.getAngleAxis(),re=Q.getTicksCoords(),ae=Q.getMinorTicksCoords(),ne=te.getExtent()[0],ie=Q.getExtent(),oe=layoutAxis(ee,H,ne),se=new AxisBuilder(H,Z,oe);se.build(),K.add(se.group),groupTransition(X,K,H),each$f(selfBuilderAttrs$1,function(le){H.get([le,"show"])&&!Q.scale.isBlank()&&axisElementBuilders$1[le](this.group,H,ee,ne,ie,re,ae)},this)}},G.type="radiusAxis",G})(AxisView),axisElementBuilders$1={splitLine:function(U,G,H,W,Z,X){var K=G.getModel("splitLine"),Q=K.getModel("lineStyle"),ee=Q.get("color"),te=0,re=H.getAngleAxis(),ae=Math.PI/180,ne=re.getExtent(),ie=Math.abs(ne[1]-ne[0])===360?"Circle":"Arc";ee=ee instanceof Array?ee:[ee];for(var oe=[],se=0;se<X.length;se++){var le=te++%ee.length;oe[le]=oe[le]||[],oe[le].push(new graphic[ie]({shape:{cx:H.cx,cy:H.cy,r:Math.max(X[se].coord,0),startAngle:-ne[0]*ae,endAngle:-ne[1]*ae,clockwise:re.inverse}}))}for(var se=0;se<oe.length;se++)U.add(mergePath(oe[se],{style:defaults({stroke:ee[se%ee.length],fill:null},Q.getLineStyle()),silent:!0}))},minorSplitLine:function(U,G,H,W,Z,X,K){if(K.length){for(var Q=G.getModel("minorSplitLine"),ee=Q.getModel("lineStyle"),te=[],re=0;re<K.length;re++)for(var ae=0;ae<K[re].length;ae++)te.push(new Circle({shape:{cx:H.cx,cy:H.cy,r:K[re][ae].coord}}));U.add(mergePath(te,{style:defaults({fill:null},ee.getLineStyle()),silent:!0}))}},splitArea:function(U,G,H,W,Z,X){if(X.length){var K=G.getModel("splitArea"),Q=K.getModel("areaStyle"),ee=Q.get("color"),te=0;ee=ee instanceof Array?ee:[ee];for(var re=[],ae=X[0].coord,ne=1;ne<X.length;ne++){var ie=te++%ee.length;re[ie]=re[ie]||[],re[ie].push(new Sector({shape:{cx:H.cx,cy:H.cy,r0:ae,r:X[ne].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),ae=X[ne].coord}for(var ne=0;ne<re.length;ne++)U.add(mergePath(re[ne],{style:defaults({fill:ee[ne%ee.length]},Q.getAreaStyle()),silent:!0}))}}};function layoutAxis(U,G,H){return{position:[U.cx,U.cy],rotation:H/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:G.getModel("axisLabel").get("rotate"),z2:1}}function getSeriesStackId(U){return U.get("stack")||"__ec_stack_"+U.seriesIndex}function getAxisKey(U,G){return G.dim+U.model.componentIndex}function barLayoutPolar(U,G,H){var W={},Z=calRadialBar(filter(G.getSeriesByType(U),function(X){return!G.isSeriesFiltered(X)&&X.coordinateSystem&&X.coordinateSystem.type==="polar"}));G.eachSeriesByType(U,function(X){if(X.coordinateSystem.type==="polar"){var K=X.getData(),Q=X.coordinateSystem,ee=Q.getBaseAxis(),te=getAxisKey(Q,ee),re=getSeriesStackId(X),ae=Z[te][re],ne=ae.offset,ie=ae.width,oe=Q.getOtherAxis(ee),se=X.coordinateSystem.cx,le=X.coordinateSystem.cy,ue=X.get("barMinHeight")||0,ce=X.get("barMinAngle")||0;W[re]=W[re]||[];for(var fe=K.mapDimension(oe.dim),he=K.mapDimension(ee.dim),ve=isDimensionStacked(K,fe),de=ee.dim!=="radius"||!X.get("roundCap",!0),pe=oe.model,ge=pe.get("startValue"),me=oe.dataToCoord(ge||0),ye=0,_e=K.count();ye<_e;ye++){var xe=K.get(fe,ye),Se=K.get(he,ye),Te=xe>=0?"p":"n",be=me;ve&&(W[re][Se]||(W[re][Se]={p:me,n:me}),be=W[re][Se][Te]);var Ae=void 0,we=void 0,Ce=void 0,Ee=void 0;if(oe.dim==="radius"){var Me=oe.dataToCoord(xe)-me,De=ee.dataToCoord(Se);Math.abs(Me)<ue&&(Me=(Me<0?-1:1)*ue),Ae=be,we=be+Me,Ce=De-ne,Ee=Ce-ie,ve&&(W[re][Se][Te]=we)}else{var Le=oe.dataToCoord(xe,de)-me,Pe=ee.dataToCoord(Se);Math.abs(Le)<ce&&(Le=(Le<0?-1:1)*ce),Ae=Pe+ne,we=Ae+ie,Ce=be,Ee=be+Le,ve&&(W[re][Se][Te]=Ee)}K.setItemLayout(ye,{cx:se,cy:le,r0:Ae,r:we,startAngle:-Ce*Math.PI/180,endAngle:-Ee*Math.PI/180,clockwise:Ce>=Ee})}}})}function calRadialBar(U){var G={};each$f(U,function(W,Z){var X=W.getData(),K=W.coordinateSystem,Q=K.getBaseAxis(),ee=getAxisKey(K,Q),te=Q.getExtent(),re=Q.type==="category"?Q.getBandWidth():Math.abs(te[1]-te[0])/X.count(),ae=G[ee]||{bandWidth:re,remainedWidth:re,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},ne=ae.stacks;G[ee]=ae;var ie=getSeriesStackId(W);ne[ie]||ae.autoWidthCount++,ne[ie]=ne[ie]||{width:0,maxWidth:0};var oe=parsePercent(W.get("barWidth"),re),se=parsePercent(W.get("barMaxWidth"),re),le=W.get("barGap"),ue=W.get("barCategoryGap");oe&&!ne[ie].width&&(oe=Math.min(ae.remainedWidth,oe),ne[ie].width=oe,ae.remainedWidth-=oe),se&&(ne[ie].maxWidth=se),le!=null&&(ae.gap=le),ue!=null&&(ae.categoryGap=ue)});var H={};return each$f(G,function(W,Z){H[Z]={};var X=W.stacks,K=W.bandWidth,Q=parsePercent(W.categoryGap,K),ee=parsePercent(W.gap,1),te=W.remainedWidth,re=W.autoWidthCount,ae=(te-Q)/(re+(re-1)*ee);ae=Math.max(ae,0),each$f(X,function(se,le){var ue=se.maxWidth;ue&&ue<ae&&(ue=Math.min(ue,te),se.width&&(ue=Math.min(ue,se.width)),te-=ue,se.width=ue,re--)}),ae=(te-Q)/(re+(re-1)*ee),ae=Math.max(ae,0);var ne=0,ie;each$f(X,function(se,le){se.width||(se.width=ae),ie=se,ne+=se.width*(1+ee)}),ie&&(ne-=ie.width*ee);var oe=-ne/2;each$f(X,function(se,le){H[Z][le]=H[Z][le]||{offset:oe,width:se.width},oe+=se.width*(1+ee)})}),H}var angleAxisExtraOption={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},radiusAxisExtraOption={splitNumber:5},PolarView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="polar",G})(ComponentView);function install$r(U){use(install$t),AxisView.registerAxisPointerClass("PolarAxisPointer",PolarAxisPointer),U.registerCoordinateSystem("polar",polarCreator),U.registerComponentModel(PolarModel),U.registerComponentView(PolarView),axisModelCreator(U,"angle",AngleAxisModel,angleAxisExtraOption),axisModelCreator(U,"radius",RadiusAxisModel,radiusAxisExtraOption),U.registerComponentView(AngleAxisView),U.registerComponentView(RadiusAxisView),U.registerLayout(curry$1(barLayoutPolar,"bar"))}function layout(U,G){G=G||{};var H=U.coordinateSystem,W=U.axis,Z={},X=W.position,K=W.orient,Q=H.getRect(),ee=[Q.x,Q.x+Q.width,Q.y,Q.y+Q.height],te={horizontal:{top:ee[2],bottom:ee[3]},vertical:{left:ee[0],right:ee[1]}};Z.position=[K==="vertical"?te.vertical[X]:ee[0],K==="horizontal"?te.horizontal[X]:ee[3]];var re={horizontal:0,vertical:1};Z.rotation=Math.PI/2*re[K];var ae={top:-1,bottom:1,right:1,left:-1};Z.labelDirection=Z.tickDirection=Z.nameDirection=ae[X],U.get(["axisTick","inside"])&&(Z.tickDirection=-Z.tickDirection),retrieve(G.labelInside,U.get(["axisLabel","inside"]))&&(Z.labelDirection=-Z.labelDirection);var ne=U.get(["axisLabel","rotate"]);return Z.labelRotate=X==="top"?-ne:ne,Z.z2=1,Z}var selfBuilderAttrs=["splitArea","splitLine","breakArea"],SingleAxisView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.axisPointerClass="SingleAxisPointer",H}return G.prototype.render=function(H,W,Z,X){var K=this.group;K.removeAll();var Q=this._axisGroup;this._axisGroup=new Group$3;var ee=layout(H),te=new AxisBuilder(H,Z,ee);te.build(),K.add(this._axisGroup),K.add(te.group),each$f(selfBuilderAttrs,function(re){H.get([re,"show"])&&axisElementBuilders[re](this,this.group,this._axisGroup,H,Z)},this),groupTransition(Q,this._axisGroup,H),U.prototype.render.call(this,H,W,Z,X)},G.prototype.remove=function(){rectCoordAxisHandleRemove(this)},G.type="singleAxis",G})(AxisView),axisElementBuilders={splitLine:function(U,G,H,W,Z){var X=W.axis;if(!X.scale.isBlank()){var K=W.getModel("splitLine"),Q=K.getModel("lineStyle"),ee=Q.get("color");ee=ee instanceof Array?ee:[ee];for(var te=Q.get("width"),re=W.coordinateSystem.getRect(),ae=X.isHorizontal(),ne=[],ie=0,oe=X.getTicksCoords({tickModel:K,breakTicks:"none",pruneByBreak:"preserve_extent_bound"}),se=[],le=[],ue=0;ue<oe.length;++ue){var ce=X.toGlobalCoord(oe[ue].coord);ae?(se[0]=ce,se[1]=re.y,le[0]=ce,le[1]=re.y+re.height):(se[0]=re.x,se[1]=ce,le[0]=re.x+re.width,le[1]=ce);var fe=new Line$1({shape:{x1:se[0],y1:se[1],x2:le[0],y2:le[1]},silent:!0});subPixelOptimizeLine(fe.shape,te);var he=ie++%ee.length;ne[he]=ne[he]||[],ne[he].push(fe)}for(var ve=Q.getLineStyle(["color"]),ue=0;ue<ne.length;++ue)G.add(mergePath(ne[ue],{style:defaults({stroke:ee[ue%ee.length]},ve),silent:!0}))}},splitArea:function(U,G,H,W,Z){rectCoordAxisBuildSplitArea(U,H,W,W)},breakArea:function(U,G,H,W,Z){var X=getAxisBreakHelper(),K=W.axis.scale;X&&K.type!=="ordinal"&&X.rectCoordBuildBreakAxis(G,U,W,W.coordinateSystem.getRect(),Z)}},SingleAxisModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.getCoordSysModel=function(){return this},G.type="singleAxis",G.layoutMode="box",G.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}},jitter:0,jitterOverlap:!0,jitterMargin:2},G})(ComponentModel);mixin(SingleAxisModel,AxisModelCommonMixin.prototype);var SingleAxis=(function(U){__extends(G,U);function G(H,W,Z,X,K){var Q=U.call(this,H,W,Z)||this;return Q.type=X||"value",Q.position=K||"bottom",Q}return G.prototype.isHorizontal=function(){var H=this.position;return H==="top"||H==="bottom"},G.prototype.pointToData=function(H,W){return this.coordinateSystem.pointToData(H)[0]},G})(Axis),singleDimensions=["single"],Single=(function(){function U(G,H,W){this.type="single",this.dimension="single",this.dimensions=singleDimensions,this.axisPointerEnabled=!0,this.model=G,this._init(G,H,W)}return U.prototype._init=function(G,H,W){var Z=this.dimension,X=new SingleAxis(Z,createScaleByModel$1(G),[0,0],G.get("type"),G.get("position")),K=X.type==="category";X.onBand=K&&G.get("boundaryGap"),X.inverse=G.get("inverse"),X.orient=G.get("orient"),G.axis=X,X.model=G,X.coordinateSystem=this,this._axis=X},U.prototype.update=function(G,H){G.eachSeries(function(W){if(W.coordinateSystem===this){var Z=W.getData();each$f(Z.mapDimensionsAll(this.dimension),function(X){this._axis.scale.unionExtentFromData(Z,X)},this),niceScaleExtent(this._axis.scale,this._axis.model)}},this)},U.prototype.resize=function(G,H){var W=createBoxLayoutReference(G,H).refContainer;this._rect=getLayoutRect(G.getBoxLayoutParams(),W),this._adjustAxis()},U.prototype.getRect=function(){return this._rect},U.prototype._adjustAxis=function(){var G=this._rect,H=this._axis,W=H.isHorizontal(),Z=W?[0,G.width]:[0,G.height],X=H.inverse?1:0;H.setExtent(Z[X],Z[1-X]),this._updateAxisTransform(H,W?G.x:G.y)},U.prototype._updateAxisTransform=function(G,H){var W=G.getExtent(),Z=W[0]+W[1],X=G.isHorizontal();G.toGlobalCoord=X?function(K){return K+H}:function(K){return Z-K+H},G.toLocalCoord=X?function(K){return K-H}:function(K){return Z-K+H}},U.prototype.getAxis=function(){return this._axis},U.prototype.getBaseAxis=function(){return this._axis},U.prototype.getAxes=function(){return[this._axis]},U.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},U.prototype.containPoint=function(G){var H=this.getRect(),W=this.getAxis(),Z=W.orient;return Z==="horizontal"?W.contain(W.toLocalCoord(G[0]))&&G[1]>=H.y&&G[1]<=H.y+H.height:W.contain(W.toLocalCoord(G[1]))&&G[0]>=H.y&&G[0]<=H.y+H.height},U.prototype.pointToData=function(G,H,W){W=W||[];var Z=this.getAxis();return W[0]=Z.coordToData(Z.toLocalCoord(G[Z.orient==="horizontal"?0:1])),W},U.prototype.dataToPoint=function(G,H,W){var Z=this.getAxis(),X=this.getRect();W=W||[];var K=Z.orient==="horizontal"?0:1;return G instanceof Array&&(G=G[0]),W[K]=Z.toGlobalCoord(Z.dataToCoord(+G)),W[1-K]=K===0?X.y+X.height/2:X.x+X.width/2,W},U.prototype.convertToPixel=function(G,H,W){var Z=getCoordSys$2(H);return Z===this?this.dataToPoint(W):null},U.prototype.convertFromPixel=function(G,H,W){var Z=getCoordSys$2(H);return Z===this?this.pointToData(W):null},U})();function getCoordSys$2(U){var G=U.seriesModel,H=U.singleAxisModel;return H&&H.coordinateSystem||G&&G.coordinateSystem}function create(U,G){var H=[];return U.eachComponent("singleAxis",function(W,Z){var X=new Single(W,U,G);X.name="single_"+Z,X.resize(W,G),W.coordinateSystem=X,H.push(X)}),U.eachSeries(function(W){if(W.get("coordinateSystem")==="singleAxis"){var Z=W.getReferringComponents("singleAxis",SINGLE_REFERRING).models[0];W.coordinateSystem=Z&&Z.coordinateSystem}}),H}var singleCreator={create,dimensions:singleDimensions},XY$1=["x","y"],WH$1=["width","height"],SingleAxisPointer=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.makeElOption=function(H,W,Z,X,K){var Q=Z.axis,ee=Q.coordinateSystem,te=getGlobalExtent(ee,1-getPointDimIndex(Q)),re=ee.dataToPoint(W)[0],ae=X.get("type");if(ae&&ae!=="none"){var ne=buildElStyle(X),ie=pointerShapeBuilder[ae](Q,re,te);ie.style=ne,H.graphicKey=ie.type,H.pointer=ie}var oe=layout(Z);buildCartesianSingleLabelElOption(W,H,oe,Z,X,K)},G.prototype.getHandleTransform=function(H,W,Z){var X=layout(W,{labelInside:!1});X.labelMargin=Z.get(["handle","margin"]);var K=getTransformedPosition(W.axis,H,X);return{x:K[0],y:K[1],rotation:X.rotation+(X.labelDirection<0?Math.PI:0)}},G.prototype.updateHandleTransform=function(H,W,Z,X){var K=Z.axis,Q=K.coordinateSystem,ee=getPointDimIndex(K),te=getGlobalExtent(Q,ee),re=[H.x,H.y];re[ee]+=W[ee],re[ee]=Math.min(te[1],re[ee]),re[ee]=Math.max(te[0],re[ee]);var ae=getGlobalExtent(Q,1-ee),ne=(ae[1]+ae[0])/2,ie=[ne,ne];return ie[ee]=re[ee],{x:re[0],y:re[1],rotation:H.rotation,cursorPoint:ie,tooltipOption:{verticalAlign:"middle"}}},G})(BaseAxisPointer),pointerShapeBuilder={line:function(U,G,H){var W=makeLineShape([G,H[0]],[G,H[1]],getPointDimIndex(U));return{type:"Line",subPixelOptimize:!0,shape:W}},shadow:function(U,G,H){var W=U.getBandWidth(),Z=H[1]-H[0];return{type:"Rect",shape:makeRectShape([G-W/2,H[0]],[W,Z],getPointDimIndex(U))}}};function getPointDimIndex(U){return U.isHorizontal()?0:1}function getGlobalExtent(U,G){var H=U.getRect();return[H[XY$1[G]],H[XY$1[G]]+H[WH$1[G]]]}var SingleView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="single",G})(ComponentView);function install$q(U){use(install$t),AxisView.registerAxisPointerClass("SingleAxisPointer",SingleAxisPointer),U.registerComponentView(SingleView),U.registerComponentView(SingleAxisView),U.registerComponentModel(SingleAxisModel),axisModelCreator(U,"single",SingleAxisModel,SingleAxisModel.defaultOption),U.registerCoordinateSystem("single",singleCreator)}var CalendarModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H,W,Z){var X=getLayoutParams(H);U.prototype.init.apply(this,arguments),mergeAndNormalizeLayoutParams$1(H,X)},G.prototype.mergeOption=function(H){U.prototype.mergeOption.apply(this,arguments),mergeAndNormalizeLayoutParams$1(this.option,H)},G.prototype.getCellSize=function(){return this.option.cellSize},G.type="calendar",G.layoutMode="box",G.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:tokens.color.axisLine,width:1,type:"solid"}},itemStyle:{color:tokens.color.neutral00,borderWidth:1,borderColor:tokens.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:tokens.size.s,color:tokens.color.secondary},monthLabel:{show:!0,position:"start",margin:tokens.size.s,align:"center",formatter:null,color:tokens.color.secondary},yearLabel:{show:!0,position:null,margin:tokens.size.xl,formatter:null,color:tokens.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},G})(ComponentModel);function mergeAndNormalizeLayoutParams$1(U,G){var H=U.cellSize,W;isArray$1(H)?W=H:W=U.cellSize=[H,H],W.length===1&&(W[1]=W[0]);var Z=map$1([0,1],function(X){return sizeCalculable(G,X)&&(W[X]="auto"),W[X]!=null&&W[X]!=="auto"});mergeLayoutParam(U,G,{type:"box",ignoreSize:Z})}var CalendarView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){var X=this.group;X.removeAll();var K=H.coordinateSystem,Q=K.getRangeInfo(),ee=K.getOrient(),te=W.getLocaleModel();this._renderDayRect(H,Q,X),this._renderLines(H,Q,ee,X),this._renderYearText(H,Q,ee,X),this._renderMonthText(H,te,ee,X),this._renderWeekText(H,te,Q,ee,X)},G.prototype._renderDayRect=function(H,W,Z){for(var X=H.coordinateSystem,K=H.getModel("itemStyle").getItemStyle(),Q=X.getCellWidth(),ee=X.getCellHeight(),te=W.start.time;te<=W.end.time;te=X.getNextNDay(te,1).time){var re=X.dataToCalendarLayout([te],!1).tl,ae=new Rect$2({shape:{x:re[0],y:re[1],width:Q,height:ee},cursor:"default",style:K});Z.add(ae)}},G.prototype._renderLines=function(H,W,Z,X){var K=this,Q=H.coordinateSystem,ee=H.getModel(["splitLine","lineStyle"]).getLineStyle(),te=H.get(["splitLine","show"]),re=ee.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var ae=W.start,ne=0;ae.time<=W.end.time;ne++){oe(ae.formatedDate),ne===0&&(ae=Q.getDateInfo(W.start.y+"-"+W.start.m));var ie=ae.date;ie.setMonth(ie.getMonth()+1),ae=Q.getDateInfo(ie)}oe(Q.getNextNDay(W.end.time,1).formatedDate);function oe(se){K._firstDayOfMonth.push(Q.getDateInfo(se)),K._firstDayPoints.push(Q.dataToCalendarLayout([se],!1).tl);var le=K._getLinePointsOfOneWeek(H,se,Z);K._tlpoints.push(le[0]),K._blpoints.push(le[le.length-1]),te&&K._drawSplitline(le,ee,X)}te&&this._drawSplitline(K._getEdgesPoints(K._tlpoints,re,Z),ee,X),te&&this._drawSplitline(K._getEdgesPoints(K._blpoints,re,Z),ee,X)},G.prototype._getEdgesPoints=function(H,W,Z){var X=[H[0].slice(),H[H.length-1].slice()],K=Z==="horizontal"?0:1;return X[0][K]=X[0][K]-W/2,X[1][K]=X[1][K]+W/2,X},G.prototype._drawSplitline=function(H,W,Z){var X=new Polyline$1({z2:20,shape:{points:H},style:W});Z.add(X)},G.prototype._getLinePointsOfOneWeek=function(H,W,Z){for(var X=H.coordinateSystem,K=X.getDateInfo(W),Q=[],ee=0;ee<7;ee++){var te=X.getNextNDay(K.time,ee),re=X.dataToCalendarLayout([te.time],!1);Q[2*te.day]=re.tl,Q[2*te.day+1]=re[Z==="horizontal"?"bl":"tr"]}return Q},G.prototype._formatterLabel=function(H,W){return isString(H)&&H?formatTplSimple(H,W):isFunction(H)?H(W):W.nameMap},G.prototype._yearTextPositionControl=function(H,W,Z,X,K){var Q=W[0],ee=W[1],te=["center","bottom"];X==="bottom"?(ee+=K,te=["center","top"]):X==="left"?Q-=K:X==="right"?(Q+=K,te=["center","top"]):ee-=K;var re=0;return(X==="left"||X==="right")&&(re=Math.PI/2),{rotation:re,x:Q,y:ee,style:{align:te[0],verticalAlign:te[1]}}},G.prototype._renderYearText=function(H,W,Z,X){var K=H.getModel("yearLabel");if(K.get("show")){var Q=K.get("margin"),ee=K.get("position");ee||(ee=Z!=="horizontal"?"top":"left");var te=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],re=(te[0][0]+te[1][0])/2,ae=(te[0][1]+te[1][1])/2,ne=Z==="horizontal"?0:1,ie={top:[re,te[ne][1]],bottom:[re,te[1-ne][1]],left:[te[1-ne][0],ae],right:[te[ne][0],ae]},oe=W.start.y;+W.end.y>+W.start.y&&(oe=oe+"-"+W.end.y);var se=K.get("formatter"),le={start:W.start.y,end:W.end.y,nameMap:oe},ue=this._formatterLabel(se,le),ce=new ZRText({z2:30,style:createTextStyle(K,{text:ue}),silent:K.get("silent")});ce.attr(this._yearTextPositionControl(ce,ie[ee],Z,ee,Q)),X.add(ce)}},G.prototype._monthTextPositionControl=function(H,W,Z,X,K){var Q="left",ee="top",te=H[0],re=H[1];return Z==="horizontal"?(re=re+K,W&&(Q="center"),X==="start"&&(ee="bottom")):(te=te+K,W&&(ee="middle"),X==="start"&&(Q="right")),{x:te,y:re,align:Q,verticalAlign:ee}},G.prototype._renderMonthText=function(H,W,Z,X){var K=H.getModel("monthLabel");if(K.get("show")){var Q=K.get("nameMap"),ee=K.get("margin"),te=K.get("position"),re=K.get("align"),ae=[this._tlpoints,this._blpoints];(!Q||isString(Q))&&(Q&&(W=getLocaleModel(Q)||W),Q=W.get(["time","monthAbbr"])||[]);var ne=te==="start"?0:1,ie=Z==="horizontal"?0:1;ee=te==="start"?-ee:ee;for(var oe=re==="center",se=K.get("silent"),le=0;le<ae[ne].length-1;le++){var ue=ae[ne][le].slice(),ce=this._firstDayOfMonth[le];if(oe){var fe=this._firstDayPoints[le];ue[ie]=(fe[ie]+ae[0][le+1][ie])/2}var he=K.get("formatter"),ve=Q[+ce.m-1],de={yyyy:ce.y,yy:(ce.y+"").slice(2),MM:ce.m,M:+ce.m,nameMap:ve},pe=this._formatterLabel(he,de),ge=new ZRText({z2:30,style:extend(createTextStyle(K,{text:pe}),this._monthTextPositionControl(ue,oe,Z,te,ee)),silent:se});X.add(ge)}}},G.prototype._weekTextPositionControl=function(H,W,Z,X,K){var Q="center",ee="middle",te=H[0],re=H[1],ae=Z==="start";return W==="horizontal"?(te=te+X+(ae?1:-1)*K[0]/2,Q=ae?"right":"left"):(re=re+X+(ae?1:-1)*K[1]/2,ee=ae?"bottom":"top"),{x:te,y:re,align:Q,verticalAlign:ee}},G.prototype._renderWeekText=function(H,W,Z,X,K){var Q=H.getModel("dayLabel");if(Q.get("show")){var ee=H.coordinateSystem,te=Q.get("position"),re=Q.get("nameMap"),ae=Q.get("margin"),ne=ee.getFirstDayOfWeek();if(!re||isString(re)){re&&(W=getLocaleModel(re)||W);var ie=W.get(["time","dayOfWeekShort"]);re=ie||map$1(W.get(["time","dayOfWeekAbbr"]),function(de){return de[0]})}var oe=ee.getNextNDay(Z.end.time,7-Z.lweek).time,se=[ee.getCellWidth(),ee.getCellHeight()];ae=parsePercent(ae,Math.min(se[1],se[0])),te==="start"&&(oe=ee.getNextNDay(Z.start.time,-(7+Z.fweek)).time,ae=-ae);for(var le=Q.get("silent"),ue=0;ue<7;ue++){var ce=ee.getNextNDay(oe,ue),fe=ee.dataToCalendarLayout([ce.time],!1).center,he=ue;he=Math.abs((ue+ne)%7);var ve=new ZRText({z2:30,style:extend(createTextStyle(Q,{text:re[he]}),this._weekTextPositionControl(fe,X,te,ae,se)),silent:le});K.add(ve)}}},G.type="calendar",G})(ComponentView),PROXIMATE_ONE_DAY=864e5,Calendar=(function(){function U(G,H,W){this.type="calendar",this.dimensions=U.dimensions,this.getDimensionsInfo=U.getDimensionsInfo,this._model=G,this._update(H,W)}return U.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},U.prototype.getRangeInfo=function(){return this._rangeInfo},U.prototype.getModel=function(){return this._model},U.prototype.getRect=function(){return this._rect},U.prototype.getCellWidth=function(){return this._sw},U.prototype.getCellHeight=function(){return this._sh},U.prototype.getOrient=function(){return this._orient},U.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},U.prototype.getDateInfo=function(G){G=parseDate(G);var H=G.getFullYear(),W=G.getMonth()+1,Z=W<10?"0"+W:""+W,X=G.getDate(),K=X<10?"0"+X:""+X,Q=G.getDay();return Q=Math.abs((Q+7-this.getFirstDayOfWeek())%7),{y:H+"",m:Z,d:K,day:Q,time:G.getTime(),formatedDate:H+"-"+Z+"-"+K,date:G}},U.prototype.getNextNDay=function(G,H){return H=H||0,H===0?this.getDateInfo(G):(G=new Date(this.getDateInfo(G).time),G.setDate(G.getDate()+H),this.getDateInfo(G))},U.prototype._update=function(G,H){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var W=this._rangeInfo.weeks||1,Z=["width","height"],X=this._model.getCellSize().slice(),K=this._model.getBoxLayoutParams(),Q=this._orient==="horizontal"?[W,7]:[7,W];each$f([0,1],function(ae){re(X,ae)&&(K[Z[ae]]=X[ae]*Q[ae])});var ee={width:H.getWidth(),height:H.getHeight()},te=this._rect=getLayoutRect(K,ee);each$f([0,1],function(ae){re(X,ae)||(X[ae]=te[Z[ae]]/Q[ae])});function re(ae,ne){return ae[ne]!=null&&ae[ne]!=="auto"}this._sw=X[0],this._sh=X[1]},U.prototype.dataToPoint=function(G,H,W){W=W||[],isArray$1(G)&&(G=G[0]),H==null&&(H=!0);var Z=this.getDateInfo(G),X=this._rangeInfo,K=Z.formatedDate;if(H&&!(Z.time>=X.start.time&&Z.time<X.end.time+PROXIMATE_ONE_DAY))return W[0]=W[1]=NaN,W;var Q=Z.day,ee=this._getRangeInfo([X.start.time,K]).nthWeek;return this._orient==="vertical"?(W[0]=this._rect.x+Q*this._sw+this._sw/2,W[1]=this._rect.y+ee*this._sh+this._sh/2):(W[0]=this._rect.x+ee*this._sw+this._sw/2,W[1]=this._rect.y+Q*this._sh+this._sh/2),W},U.prototype.pointToData=function(G){var H=this.pointToDate(G);return H&&H.time},U.prototype.dataToLayout=function(G,H,W){W=W||{};var Z=W.rect=W.rect||{},X=W.contentRect=W.contentRect||{},K=this.dataToPoint(G,H);return Z.x=K[0]-this._sw/2,Z.y=K[1]-this._sh/2,Z.width=this._sw,Z.height=this._sh,BoundingRect.copy(X,Z),expandOrShrinkRect(X,this._lineWidth/2,!0,!0),W},U.prototype.dataToCalendarLayout=function(G,H){var W=this.dataToPoint(G,H);return{center:W,tl:[W[0]-this._sw/2,W[1]-this._sh/2],tr:[W[0]+this._sw/2,W[1]-this._sh/2],br:[W[0]+this._sw/2,W[1]+this._sh/2],bl:[W[0]-this._sw/2,W[1]+this._sh/2]}},U.prototype.pointToDate=function(G){var H=Math.floor((G[0]-this._rect.x)/this._sw)+1,W=Math.floor((G[1]-this._rect.y)/this._sh)+1,Z=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(W,H-1,Z):this._getDateByWeeksAndDay(H,W-1,Z)},U.prototype.convertToPixel=function(G,H,W){var Z=getCoordSys$1(H);return Z===this?Z.dataToPoint(W):null},U.prototype.convertToLayout=function(G,H,W){var Z=getCoordSys$1(H);return Z===this?Z.dataToLayout(W):null},U.prototype.convertFromPixel=function(G,H,W){var Z=getCoordSys$1(H);return Z===this?Z.pointToData(W):null},U.prototype.containPoint=function(G){return console.warn("Not implemented."),!1},U.prototype._initRangeOption=function(){var G=this._model.get("range"),H;if(isArray$1(G)&&G.length===1&&(G=G[0]),isArray$1(G))H=G;else{var W=G.toString();if(/^\d{4}$/.test(W)&&(H=[W+"-01-01",W+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(W)){var Z=this.getDateInfo(W),X=Z.date;X.setMonth(X.getMonth()+1);var K=this.getNextNDay(X,-1);H=[Z.formatedDate,K.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(W)&&(H=[W,W])}if(!H)return process.env.NODE_ENV!=="production"&&logError("Invalid date range."),G;var Q=this._getRangeInfo(H);return Q.start.time>Q.end.time&&H.reverse(),H},U.prototype._getRangeInfo=function(G){var H=[this.getDateInfo(G[0]),this.getDateInfo(G[1])],W;H[0].time>H[1].time&&(W=!0,H.reverse());var Z=Math.floor(H[1].time/PROXIMATE_ONE_DAY)-Math.floor(H[0].time/PROXIMATE_ONE_DAY)+1,X=new Date(H[0].time),K=X.getDate(),Q=H[1].date.getDate();X.setDate(K+Z-1);var ee=X.getDate();if(ee!==Q)for(var te=X.getTime()-H[1].time>0?1:-1;(ee=X.getDate())!==Q&&(X.getTime()-H[1].time)*te>0;)Z-=te,X.setDate(ee-te);var re=Math.floor((Z+H[0].day+6)/7),ae=W?-re+1:re-1;return W&&H.reverse(),{range:[H[0].formatedDate,H[1].formatedDate],start:H[0],end:H[1],allDay:Z,weeks:re,nthWeek:ae,fweek:H[0].day,lweek:H[1].day}},U.prototype._getDateByWeeksAndDay=function(G,H,W){var Z=this._getRangeInfo(W);if(G>Z.weeks||G===0&&H<Z.fweek||G===Z.weeks&&H>Z.lweek)return null;var X=(G-1)*7-Z.fweek+H,K=new Date(Z.start.time);return K.setDate(+Z.start.d+X),this.getDateInfo(K)},U.create=function(G,H){var W=[];return G.eachComponent("calendar",function(Z){var X=new U(Z,G,H);W.push(X),Z.coordinateSystem=X}),G.eachComponent(function(Z,X){injectCoordSysByOption({targetModel:X,coordSysType:"calendar",coordSysProvider:simpleCoordSysInjectionProvider})}),W},U.dimensions=["time","value"],U})();function getCoordSys$1(U){var G=U.calendarModel,H=U.seriesModel,W=G?G.coordinateSystem:H?H.coordinateSystem:null;return W}function install$p(U){U.registerComponentModel(CalendarModel),U.registerComponentView(CalendarView),U.registerCoordinateSystem("calendar",Calendar)}var MatrixCellLayoutInfoType={level:1,leaf:2,nonLeaf:3},MatrixClampOption={none:0,all:1,body:2,corner:3};function coordDataToAllCellLevelLayout(U,G,H){var W=G[XY$2[H]].getCell(U);return!W&&isNumber(U)&&U<0&&(W=G[XY$2[1-H]].getUnitLayoutInfo(H,Math.round(U))),W}function resetXYLocatorRange(U){var G=U||[];return G[0]=G[0]||[],G[1]=G[1]||[],G[0][0]=G[0][1]=G[1][0]=G[1][1]=NaN,G}function parseCoordRangeOption(U,G,H,W,Z){parseCoordRangeOptionOnOneDim(U[0],G,Z,H,W,0),parseCoordRangeOptionOnOneDim(U[1],G,Z,H,W,1)}function parseCoordRangeOptionOnOneDim(U,G,H,W,Z,X){U[0]=1/0,U[1]=-1/0;var K=W[X],Q=isArray$1(K)?K:[K],ee=Q.length,te=!!H;if(ee>=1?(parseCoordRangeOptionOnOneDimOnePart(U,G,Q,te,Z,X,0),ee>1&&parseCoordRangeOptionOnOneDimOnePart(U,G,Q,te,Z,X,ee-1)):(process.env.NODE_ENV!=="production"&&G&&G.push('Should be like [["x1", "x2"], ["y1", "y2"]], or ["x1", "y1"], rather than empty.'),U[0]=U[1]=NaN),te){var re=-Z[XY$2[1-X]].getLocatorCount(X),ae=Z[XY$2[X]].getLocatorCount(X)-1;H===MatrixClampOption.body?re=mathMax$a(0,re):H===MatrixClampOption.corner&&(ae=mathMin$a(-1,ae)),ae<re&&(re=ae=NaN),eqNaN(U[0])&&(U[0]=re),eqNaN(U[1])&&(U[1]=ae),U[0]=mathMax$a(mathMin$a(U[0],ae),re),U[1]=mathMax$a(mathMin$a(U[1],ae),re)}}function parseCoordRangeOptionOnOneDimOnePart(U,G,H,W,Z,X,K){var Q=coordDataToAllCellLevelLayout(H[K],Z,X);if(!Q){process.env.NODE_ENV!=="production"&&!W&&G&&G.push("Can not find cell by coord["+X+"]["+K+"]."),U[0]=U[1]=NaN;return}var ee=Q.id[XY$2[X]],te=ee,re=cellLayoutInfoToDimCell(Q);re&&(te+=re.span[XY$2[X]]-1),U[0]=mathMin$a(U[0],ee,te),U[1]=mathMax$a(U[1],ee,te)}function isXYLocatorRangeInvalidOnDim(U,G){return eqNaN(U[G][0])||eqNaN(U[G][1])}function resolveXYLocatorRangeByCellMerge(U,G,H,W){G=G||_tmpOutMergedMarkList;for(var Z=0;Z<W;Z++)G[Z]=!1;for(;;){for(var X=!1,Z=0;Z<W;Z++){var K=H[Z];!G[Z]&&K.cellMergeOwner&&expandXYLocatorRangeIfIntersect(U,K.locatorRange)&&(G[Z]=!0,X=!0)}if(!X)break}}var _tmpOutMergedMarkList=[];function expandXYLocatorRangeIfIntersect(U,G){return!locatorRangeIntersectOneDim(U[0],G[0])||!locatorRangeIntersectOneDim(U[1],G[1])?!1:(U[0][0]=mathMin$a(U[0][0],G[0][0]),U[0][1]=mathMax$a(U[0][1],G[0][1]),U[1][0]=mathMin$a(U[1][0],G[1][0]),U[1][1]=mathMax$a(U[1][1],G[1][1]),!0)}function locatorRangeIntersectOneDim(U,G){return U[1]>=G[0]&&U[0]<=G[1]}function fillIdSpanFromLocatorRange(U,G){U.id.set(G[0][0],G[1][0]),U.span.set(G[0][1]-U.id.x+1,G[1][1]-U.id.y+1)}function cloneXYLocatorRange(U,G){U[0][0]=G[0][0],U[0][1]=G[0][1],U[1][0]=G[1][0],U[1][1]=G[1][1]}function xyLocatorRangeToRectOneDim(U,G,H,W){var Z=coordDataToAllCellLevelLayout(G[W][0],H,W),X=coordDataToAllCellLevelLayout(G[W][1],H,W);U[XY$2[W]]=U[WH$2[W]]=NaN,Z&&X&&(U[XY$2[W]]=Z.xy,U[WH$2[W]]=X.xy+X.wh-Z.xy)}function setDimXYValue(U,G,H,W){return U[XY$2[G]]=H,U[XY$2[1-G]]=W,U}function cellLayoutInfoToDimCell(U){return U&&(U.type===MatrixCellLayoutInfoType.leaf||U.type===MatrixCellLayoutInfoType.nonLeaf)?U:null}function createNaNRectLike(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var MatrixDim=(function(){function U(G,H){this._cells=[],this._levels=[],this.dim=G,this.dimIdx=G==="x"?0:1,this._model=H,this._uniqueValueGen=createUniqueValueGenerator(G);var W=H.get("data",!0);W!=null&&!isArray$1(W)&&(process.env.NODE_ENV!=="production"&&error("Illegal echarts option - matrix."+this.dim+".data must be an array if specified."),W=[]),W?this._initByDimModelData(W):this._initBySeriesData()}return U.prototype._initByDimModelData=function(G){var H=this,W=H._cells,Z=H._levels,X=[],K=0;H._leavesCount=Q(G,0,0),ee();return;function Q(te,re,ae){var ne=0;return te&&each$f(te,function(ie,oe){var se=!1,le;isString(ie)?le={value:ie}:isObject$3(ie)?(le=ie,ie.value!=null&&!isString(ie.value)&&(se=!0,le={value:null})):(le={value:null},ie!=null&&(se=!0)),se&&process.env.NODE_ENV!=="production"&&error("Illegal echarts option - matrix."+H.dim+".data["+oe+"] must be `string | {value: string}`.");var ue={type:MatrixCellLayoutInfoType.nonLeaf,ordinal:NaN,level:ae,firstLeafLocator:re,id:new Point,span:setDimXYValue(new Point,H.dimIdx,1,1),option:le,xy:NaN,wh:NaN,dim:H,rect:createNaNRectLike()};K++,(X[re]||(X[re]=[])).push(ue),Z[ae]||(Z[ae]={type:MatrixCellLayoutInfoType.level,xy:NaN,wh:NaN,option:null,id:new Point,dim:H});var ce=Q(le.children,re,ae+1),fe=Math.max(1,ce);ue.span[XY$2[H.dimIdx]]=fe,ne+=fe,re+=fe}),ne}function ee(){for(var te=[];W.length<K;)for(var re=0;re<X.length;re++){var ae=X[re].pop();if(ae){ae.ordinal=te.length;var ne=ae.option.value;te.push(ne),W.push(ae),H._uniqueValueGen.calcDupBase(ne)}}H._uniqueValueGen.ensureValueUnique(te,W);var ie=H._ordinalMeta=new OrdinalMeta({categories:te,needCollect:!1,deduplication:!1});H._scale=new OrdinalScale({ordinalMeta:ie});for(var oe=0;oe<H._leavesCount;oe++){var se=H._cells[oe];se.type=MatrixCellLayoutInfoType.leaf,se.span[XY$2[1-H.dimIdx]]=H._levels.length-se.level}H._initCellsId(),H._initLevelIdOptions()}},U.prototype._initBySeriesData=function(){var G=this;G._leavesCount=0,G._levels=[{type:MatrixCellLayoutInfoType.level,xy:NaN,wh:NaN,option:null,id:new Point,dim:G}],G._initLevelIdOptions();var H=G._ordinalMeta=new OrdinalMeta({needCollect:!0,deduplication:!0,onCollect:function(W,Z){var X=G._cells[Z]={type:MatrixCellLayoutInfoType.leaf,ordinal:Z,level:0,firstLeafLocator:Z,id:new Point,span:setDimXYValue(new Point,G.dimIdx,1,1),option:{value:W+""},xy:NaN,wh:NaN,dim:G,rect:createNaNRectLike()};G._leavesCount++,G._setCellId(X)}});G._scale=new OrdinalScale({ordinalMeta:H})},U.prototype._setCellId=function(G){var H=this._levels.length,W=this.dimIdx;setDimXYValue(G.id,W,G.firstLeafLocator,G.level-H)},U.prototype._initCellsId=function(){var G=this._levels.length,H=this.dimIdx;each$f(this._cells,function(W){setDimXYValue(W.id,H,W.firstLeafLocator,W.level-G)})},U.prototype._initLevelIdOptions=function(){var G=this._levels.length,H=this.dimIdx,W=this._model.get("levels",!0);W=isArray$1(W)?W:[],each$f(this._levels,function(Z,X){setDimXYValue(Z.id,H,0,X-G),Z.option=W[X]})},U.prototype.shouldShow=function(){return!!this._model.getShallow("show",!0)},U.prototype.resetLayoutIterator=function(G,H,W,Z){if(G=G||new ListIterator,H===this.dimIdx){var X=this._leavesCount,K=W!=null?Math.max(0,W):0;Z=Z!=null?Math.min(Z,X):X,G.reset(this._cells,K,K+Z)}else{var X=this._levels.length,K=W!=null?Math.max(0,W+X):0;Z=Z!=null?Math.min(Z,X):X,G.reset(this._levels,K,K+Z)}return G},U.prototype.resetCellIterator=function(G){return(G||new ListIterator).reset(this._cells,0)},U.prototype.resetLevelIterator=function(G){return(G||new ListIterator).reset(this._levels,0)},U.prototype.getLayout=function(G,H,W){var Z=this.getUnitLayoutInfo(H,W);G[XY$2[H]]=Z?Z.xy:NaN,G[WH$2[H]]=Z?Z.wh:NaN},U.prototype.getUnitLayoutInfo=function(G,H){return G===this.dimIdx?H<this._leavesCount?this._cells[H]:void 0:this._levels[H+this._levels.length]},U.prototype.getCell=function(G){var H=this._scale.parse(G);return eqNaN(H)?void 0:this._cells[H]},U.prototype.getLocatorCount=function(G){return G===this.dimIdx?this._leavesCount:this._levels.length},U.prototype.getOrdinalMeta=function(){return this._ordinalMeta},U})();function createUniqueValueGenerator(U){var G=U.toUpperCase(),H=new RegExp("^"+G+"([0-9]+)$"),W=0;function Z(Q){var ee;Q!=null&&(ee=Q.match(H))&&(W=mathMax$a(W,+ee[1]+1))}function X(){return""+G+W++}function K(Q,ee){for(var te=createHashMap(),re=0;re<Q.length;re++){var ae=Q[re];(ae==null||te.get(ae)!=null)&&(Q[re]=ae=X(),ee[re].option=defaults({value:ae},ee[re].option)),te.set(ae,!0)}}return{calcDupBase:Z,ensureValueUnique:K}}var MatrixBodyCorner=(function(){function U(G,H,W){this._model=H,this._dims=W,this._kind=G,this._cellMergeOwnerList=[]}return U.prototype._ensureCellMap=function(){var G=this,H=G._cellMap;return H||(H=G._cellMap=createHashMap(),W()),H;function W(){var X=[],K=G._model.getShallow("data");K&&!isArray$1(K)&&(process.env.NODE_ENV!=="production"&&error("matrix."+K+".data must be an array if specified."),K=null),each$f(K,function(oe,se){if(!isObject$3(oe)||!isArray$1(oe.coord)){process.env.NODE_ENV!=="production"&&error("Illegal matrix."+G._kind+".data["+se+"], must be a {coord: [...], ...}");return}var le=resetXYLocatorRange([]),ue=null;if(process.env.NODE_ENV!=="production"&&(ue=[]),parseCoordRangeOption(le,ue,oe.coord,G._dims,oe.coordClamp?MatrixClampOption[G._kind]:MatrixClampOption.none),isXYLocatorRangeInvalidOnDim(le,0)||isXYLocatorRangeInvalidOnDim(le,1)){process.env.NODE_ENV!=="production"&&error("Can not determine cells by option matrix."+G._kind+".data["+se+"]: "+(""+ue.join(" ")));return}var ce=oe&&oe.mergeCells,fe={id:new Point,span:new Point,locatorRange:le,option:oe,cellMergeOwner:ce};fillIdSpanFromLocatorRange(fe,le),X.push(fe)});for(var Q=[],ee=0;ee<X.length;ee++){var te=X[ee];if(te.cellMergeOwner){var re=te.locatorRange;resolveXYLocatorRangeByCellMerge(re,Q,X,ee);for(var ae=0;ae<ee;ae++)Q[ae]&&(X[ae].cellMergeOwner=!1);if(re[0][0]!==te.id.x||re[1][0]!==te.id.y){te.cellMergeOwner=!1;var ne=extend({},te.option);ne.coord=null;var ie={id:new Point,span:new Point,locatorRange:re,option:ne,cellMergeOwner:!0};fillIdSpanFromLocatorRange(ie,re),X.push(ie)}}}each$f(X,function(oe){var se=Z(oe.id.x,oe.id.y);if(oe.cellMergeOwner&&(se.cellMergeOwner=!0,se.span=oe.span,se.locatorRange=oe.locatorRange,se.spanRect=createNaNRectLike(),G._cellMergeOwnerList.push(se)),!(!oe.cellMergeOwner&&!oe.option))for(var le=0;le<oe.span.y;le++)for(var ue=0;ue<oe.span.x;ue++){var ce=Z(oe.id.x+ue,oe.id.y+le);ce.option=oe.option,oe.cellMergeOwner&&(ce.inSpanOf=se)}})}function Z(X,K){var Q=makeCellMapKey(X,K),ee=H.get(Q);return ee||(ee=H.set(Q,{id:new Point(X,K),option:null,inSpanOf:null,span:null,spanRect:null,locatorRange:null,cellMergeOwner:!1})),ee}},U.prototype.getCell=function(G){return this._ensureCellMap().get(makeCellMapKey(G[0],G[1]))},U.prototype.travelExistingCells=function(G){this._ensureCellMap().each(G)},U.prototype.expandRangeByCellMerge=function(G){if(!isXYLocatorRangeInvalidOnDim(G,0)&&!isXYLocatorRangeInvalidOnDim(G,1)&&G[0][0]===G[0][1]&&G[1][0]===G[1][1]){_tmpERBCMLocator[0]=G[0][0],_tmpERBCMLocator[1]=G[1][0];var H=this.getCell(_tmpERBCMLocator),W=H&&H.inSpanOf;if(W){cloneXYLocatorRange(G,W.locatorRange);return}}var Z=this._cellMergeOwnerList;resolveXYLocatorRangeByCellMerge(G,null,Z,Z.length)},U})(),_tmpERBCMLocator=[];function makeCellMapKey(U,G){return U+"|"+G}var defaultLabelOption={show:!0,color:tokens.color.secondary,overflow:"break",lineOverflow:"truncate",padding:[2,3,2,3],distance:0};function makeDefaultCellItemStyleOption(U){return{color:"none",borderWidth:1,borderColor:U?"none":tokens.color.borderTint}}var defaultDimOption={show:!0,label:defaultLabelOption,itemStyle:makeDefaultCellItemStyleOption(!1),silent:void 0,dividerLineStyle:{width:1,color:tokens.color.border}},defaultBodyOption={label:defaultLabelOption,itemStyle:makeDefaultCellItemStyleOption(!1),silent:void 0},defaultCornerOption={label:defaultLabelOption,itemStyle:makeDefaultCellItemStyleOption(!0),silent:void 0},defaultMatrixOption={z:-50,left:"10%",top:"10%",right:"10%",bottom:"10%",x:defaultDimOption,y:defaultDimOption,body:defaultBodyOption,corner:defaultCornerOption,backgroundStyle:{color:"none",borderColor:tokens.color.axisLine,borderWidth:1}},MatrixModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.optionUpdated=function(){var H=this._dimModels={x:new MatrixDimensionModel(this.get("x",!0)||{}),y:new MatrixDimensionModel(this.get("y",!0)||{})};H.x.option.type=H.y.option.type="category";var W=H.x.dim=new MatrixDim("x",H.x),Z=H.y.dim=new MatrixDim("y",H.y),X={x:W,y:Z};this._body=new MatrixBodyCorner("body",new Model(this.getShallow("body")),X),this._corner=new MatrixBodyCorner("corner",new Model(this.getShallow("corner")),X)},G.prototype.getDimensionModel=function(H){return this._dimModels[H]},G.prototype.getBody=function(){return this._body},G.prototype.getCorner=function(){return this._corner},G.type="matrix",G.layoutMode="box",G.defaultOption=defaultMatrixOption,G})(ComponentModel),MatrixDimensionModel=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.getOrdinalMeta=function(){return this.dim.getOrdinalMeta()},G})(Model),round=Math.round,Z2_BACKGROUND=0,Z2_OUTER_BORDER=99,Z2_BODY_CORNER_CELL_DEFAULT={normal:25,special:100},Z2_DIMENSION_CELL_DEFAULT={normal:50,special:125},MatrixView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W){this.group.removeAll();var Z=this.group,X=H.coordinateSystem,K=X.getRect(),Q=H.getDimensionModel("x"),ee=H.getDimensionModel("y"),te=Q.dim,re=ee.dim;renderDimensionCells(Z,H,W),createBodyAndCorner(Z,H,te,re,W);var ae=H.getShallow("borderZ2",!0),ne=retrieve2(ae,Z2_OUTER_BORDER),ie=ne-1,oe=H.getModel("backgroundStyle").getItemStyle(["borderWidth"]);oe.lineWidth=0;var se=H.getModel("backgroundStyle").getItemStyle(["color","decal","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]);se.fill="none";var le=createMatrixRect(K.clone(),oe,Z2_BACKGROUND),ue=createMatrixRect(K.clone(),se,ne);le.silent=!0,ue.silent=!0,Z.add(le),Z.add(ue);var ce=te.getUnitLayoutInfo(0,0),fe=re.getUnitLayoutInfo(1,0);ce&&fe&&(te.shouldShow()&&Z.add(createMatrixLine({x1:K.x,y1:fe.xy,x2:K.x+K.width,y2:fe.xy},Q.getModel("dividerLineStyle").getLineStyle(),ie)),re.shouldShow()&&Z.add(createMatrixLine({x1:ce.xy,y1:K.y,x2:ce.xy,y2:K.y+K.height},ee.getModel("dividerLineStyle").getLineStyle(),ie)))},G.type="matrix",G})(ComponentView);function renderDimensionCells(U,G,H){W(0),W(1);function W(Z){var X=G.getDimensionModel(XY$2[Z]),K=X.dim;if(K.shouldShow())for(var Q=X.getModel("itemStyle"),ee=X.getModel("label"),te=G.getShallow("tooltip",!0),re=[],ae=K.resetCellIterator();ae.next();){var ne=ae.item,ie={};BoundingRect.copy(ie,ne.rect),set$1(re,ne.id.x,ne.id.y),createMatrixCell(re,G,U,H,ne.option,Q,ee,X,ie,ne.option.value,Z2_DIMENSION_CELL_DEFAULT,te)}}}function createBodyAndCorner(U,G,H,W,Z){X("body",G.getBody(),H,W),H.shouldShow()&&W.shouldShow()&&X("corner",G.getCorner(),W,H);function X(K,Q,ee,te){var re=new Model(G.getShallow(K,!0)),ae=re.getModel("itemStyle"),ne=re.getModel("label"),ie=new ListIterator,oe=new ListIterator,se=[],le=G.getShallow("tooltip",!0);for(te.resetLayoutIterator(oe,1);oe.next();)for(ee.resetLayoutIterator(ie,0);ie.next();){var ue=ie.item,ce=oe.item;set$1(se,ue.id.x,ce.id.y);var fe=Q.getCell(se);if(!(fe&&fe.inSpanOf&&fe.inSpanOf!==fe)){var he={};fe&&fe.span?BoundingRect.copy(he,fe.spanRect):(ue.dim.getLayout(he,0,se[0]),ce.dim.getLayout(he,1,se[1]));var ve=fe?fe.option:null;createMatrixCell(se,G,U,Z,ve,ae,ne,re,he,ve?ve.value:null,Z2_BODY_CORNER_CELL_DEFAULT,le)}}}}function createMatrixCell(U,G,H,W,Z,X,K,Q,ee,te,re,ae){var ne;_tmpCellItemStyleModel.option=Z?Z.itemStyle:null,_tmpCellItemStyleModel.parentModel=X,_tmpCellModel.option=Z,_tmpCellModel.parentModel=Q;var ie=retrieve2(_tmpCellModel.getShallow("z2"),Z&&Z.itemStyle?re.special:re.normal),oe=ae&&ae.show,se=createMatrixRect(ee,_tmpCellItemStyleModel.getItemStyle(),ie);H.add(se);var le=_tmpCellModel.get("cursor");le!=null&&se.attr("cursor",le);var ue;if(te!=null){var ce=te+"";if(_tmpCellLabelModel.option=Z?Z.label:null,_tmpCellLabelModel.parentModel=K,_tmpCellLabelModel.ecModel=W,setLabelStyle(se,{normal:_tmpCellLabelModel},{defaultText:ce,autoOverflowArea:!0,layoutRect:clone$4(se.shape)}),ue=se.getTextContent(),ue){ue.z2=ie+1;var fe=ue.style;if(fe&&fe.overflow&&fe.overflow!=="none"&&fe.lineOverflow){var he={};BoundingRect.copy(he,ee),expandOrShrinkRect(he,(((ne=se.style)===null||ne===void 0?void 0:ne.lineWidth)||0)/2,!0,!0),se.updateInnerText(),ue.getLocalTransform(_tmpInnerTextTrans),invert(_tmpInnerTextTrans,_tmpInnerTextTrans),BoundingRect.applyTransform(he,he,_tmpInnerTextTrans),ue.setClipPath(new Rect$2({shape:he}))}}setTooltipConfig({el:se,componentModel:G,itemName:ce,itemTooltipOption:ae,formatterParamsExtra:{xyLocator:U.slice()}})}if(ue){var ve=_tmpCellLabelModel.get("silent");ve==null&&(ve=!oe),ue.silent=ve,ue.ignoreHostSilent=!0}var de=_tmpCellModel.get("silent");de==null&&(de=!se.style||se.style.fill==="none"||!se.style.fill),se.silent=de,clearTmpModel(_tmpCellModel),clearTmpModel(_tmpCellItemStyleModel),clearTmpModel(_tmpCellLabelModel)}var _tmpCellModel=new Model,_tmpCellItemStyleModel=new Model,_tmpCellLabelModel=new Model,_tmpInnerTextTrans=[];function createMatrixRect(U,G,H){var W=G.lineWidth;if(W){var Z=U.x+U.width,X=U.y+U.height;U.x=subPixelOptimize$1(U.x,W,!0),U.y=subPixelOptimize$1(U.y,W,!0),U.width=subPixelOptimize$1(Z,W,!0)-U.x,U.height=subPixelOptimize$1(X,W,!0)-U.y}return new Rect$2({shape:U,style:G,z2:H})}function createMatrixLine(U,G,H){var W=G.lineWidth;return W&&(round(U.x1*2)===round(U.x2*2)&&(U.x1=U.x2=subPixelOptimize$1(U.x1,W,!0)),round(U.y1*2)===round(U.y2*2)&&(U.y1=U.y2=subPixelOptimize$1(U.y1,W,!0))),new Line$1({shape:U,style:G,silent:!0,z2:H})}var Matrix=(function(){function U(G,H,W){this.dimensions=U.dimensions,this.type="matrix",this._model=G;var Z=this._dimModels={x:G.getDimensionModel("x"),y:G.getDimensionModel("y")};this._dims={x:Z.x.dim,y:Z.y.dim},this._resize(G,W)}return U.getDimensionsInfo=function(){return[{name:"x",type:"ordinal"},{name:"y",type:"ordinal"},{name:"value"}]},U.create=function(G,H){var W=[];return G.eachComponent("matrix",function(Z){var X=new U(Z,G,H);W.push(X),Z.coordinateSystem=X}),G.eachComponent(function(Z,X){injectCoordSysByOption({targetModel:X,coordSysType:"matrix",coordSysProvider:simpleCoordSysInjectionProvider})}),W},U.prototype.getRect=function(){return this._rect},U.prototype._resize=function(G,H){var W=this._dims,Z=this._dimModels,X=this._rect=getLayoutRect(G.getBoxLayoutParams(),{width:H.getWidth(),height:H.getHeight()});layOutUnitsOnDimension(Z,W,X,0),layOutUnitsOnDimension(Z,W,X,1),layOutDimCellsRestInfoByUnit(0,W),layOutDimCellsRestInfoByUnit(1,W),layOutBodyCornerCellMerge(this._model.getBody(),W),layOutBodyCornerCellMerge(this._model.getCorner(),W)},U.prototype.dataToPoint=function(G,H,W){return W=W||[],this.dataToLayout(G,H,_dtpOutDataToLayout),W[0]=_dtpOutDataToLayout.rect.x+_dtpOutDataToLayout.rect.width/2,W[1]=_dtpOutDataToLayout.rect.y+_dtpOutDataToLayout.rect.height/2,W},U.prototype.dataToLayout=function(G,H,W){var Z=this._dims;W=W||{};var X=W.rect=W.rect||{};X.x=X.y=X.width=X.height=NaN;var K=W.matrixXYLocatorRange=resetXYLocatorRange(W.matrixXYLocatorRange);return isArray$1(G)?(parseCoordRangeOption(K,null,G,Z,retrieve2(H&&H.clamp,MatrixClampOption.none)),(!H||!H.ignoreMergeCells)&&((!H||H.clamp!==MatrixClampOption.corner)&&this._model.getBody().expandRangeByCellMerge(K),(!H||H.clamp!==MatrixClampOption.body)&&this._model.getCorner().expandRangeByCellMerge(K)),xyLocatorRangeToRectOneDim(X,K,Z,0),xyLocatorRangeToRectOneDim(X,K,Z,1),W):(process.env.NODE_ENV!=="production"&&error("Input data must be an array in `convertToLayout`, `convertToPixel`"),W)},U.prototype.pointToData=function(G,H,W){var Z=this._dims;return pointToDataOneDimPrepareCtx(_tmpCtxPointToData,0,Z,G,H&&H.clamp),pointToDataOneDimPrepareCtx(_tmpCtxPointToData,1,Z,G,H&&H.clamp),W=W||[],W[0]=W[1]=NaN,_tmpCtxPointToData.y===CtxPointToDataAreaType.inCorner&&_tmpCtxPointToData.x===CtxPointToDataAreaType.inBody?pointToDataOnlyHeaderFillOut(_tmpCtxPointToData,W,0,Z):_tmpCtxPointToData.x===CtxPointToDataAreaType.inCorner&&_tmpCtxPointToData.y===CtxPointToDataAreaType.inBody?pointToDataOnlyHeaderFillOut(_tmpCtxPointToData,W,1,Z):(pointToDataBodyCornerFillOut(_tmpCtxPointToData,W,0,Z),pointToDataBodyCornerFillOut(_tmpCtxPointToData,W,1,Z)),W},U.prototype.convertToPixel=function(G,H,W,Z){var X=getCoordSys(H);return X===this?X.dataToPoint(W,Z):void 0},U.prototype.convertToLayout=function(G,H,W,Z){var X=getCoordSys(H);return X===this?X.dataToLayout(W,Z):void 0},U.prototype.convertFromPixel=function(G,H,W,Z){var X=getCoordSys(H);return X===this?X.pointToData(W,Z):void 0},U.prototype.containPoint=function(G){return this._rect.contain(G[0],G[1])},U.dimensions=["x","y","value"],U})(),_dtpOutDataToLayout={rect:createNaNRectLike()},_ptdLevelIt=new ListIterator,_ptdDimCellIt=new ListIterator;function layOutUnitsOnDimension(U,G,H,W){for(var Z=1-W,X=G[XY$2[W]],K=G[XY$2[Z]],Q=K.shouldShow(),ee=X.resetCellIterator();ee.next();)ee.item.wh=ee.item.xy=NaN;for(var te=K.resetLayoutIterator(null,W);te.next();)te.item.wh=te.item.xy=NaN;for(var re=H[WH$2[W]],ae=X.getLocatorCount(W)+K.getLocatorCount(W),ne=new Model,ie=K.resetLevelIterator();ie.next();)ne.option=ie.item.option,ne.parentModel=U[XY$2[Z]],le(ie.item,Q?ne.get("levelSize"):0);for(var oe=new Model,se=X.resetCellIterator();se.next();)se.item.type===MatrixCellLayoutInfoType.leaf&&(oe.option=se.item.option,oe.parentModel=void 0,le(se.item,oe.get("size")));function le(pe,ge){var me=parseSizeOption(ge,W,H);eqNaN(me)||(pe.wh=confineSize(me,re),re=confineSize(re-pe.wh),ae--)}var ue=ae?re/ae:0,ce=!ae&&re>=1,fe=H[XY$2[W]],he=X.getLocatorCount(W)-1,ve=new ListIterator;for(K.resetLayoutIterator(ve,W);ve.next();)de(ve.item);for(X.resetLayoutIterator(ve,W);ve.next();)de(ve.item);function de(pe){eqNaN(pe.wh)&&(pe.wh=ue),pe.xy=fe,pe.id[XY$2[W]]===he&&!ce&&(pe.wh=H[XY$2[W]]+H[WH$2[W]]-pe.xy),fe+=pe.wh}}function layOutDimCellsRestInfoByUnit(U,G){for(var H=G[XY$2[U]].resetCellIterator();H.next();){var W=H.item;layOutRectOneDimBasedOnUnit(W.rect,U,W.id,W.span,G),layOutRectOneDimBasedOnUnit(W.rect,1-U,W.id,W.span,G),W.type===MatrixCellLayoutInfoType.nonLeaf&&(W.xy=W.rect[XY$2[U]],W.wh=W.rect[WH$2[U]])}}function layOutBodyCornerCellMerge(U,G){U.travelExistingCells(function(H){var W=H.span;if(W){var Z=H.spanRect,X=H.id;layOutRectOneDimBasedOnUnit(Z,0,X,W,G),layOutRectOneDimBasedOnUnit(Z,1,X,W,G)}})}function layOutRectOneDimBasedOnUnit(U,G,H,W,Z){U[WH$2[G]]=0;var X=H[XY$2[G]],K=X<0?Z[XY$2[1-G]]:Z[XY$2[G]],Q=K.getUnitLayoutInfo(G,H[XY$2[G]]);if(U[XY$2[G]]=Q.xy,U[WH$2[G]]=Q.wh,W[XY$2[G]]>1){var ee=K.getUnitLayoutInfo(G,H[XY$2[G]]+W[XY$2[G]]-1);U[WH$2[G]]=ee.xy+ee.wh-Q.xy}}function parseSizeOption(U,G,H){var W=parsePositionSizeOption(U,H[WH$2[G]]);return confineSize(W,H[WH$2[G]])}function confineSize(U,G){return Math.max(Math.min(U,retrieve2(G,1/0)),0)}function getCoordSys(U){var G=U.matrixModel,H=U.seriesModel,W=G?G.coordinateSystem:H?H.coordinateSystem:null;return W}var CtxPointToDataAreaType={inBody:1,inCorner:2,outside:3},_tmpCtxPointToData={x:null,y:null,point:[]};function pointToDataOneDimPrepareCtx(U,G,H,W,Z){var X=H[XY$2[G]],K=H[XY$2[1-G]],Q=X.getUnitLayoutInfo(G,X.getLocatorCount(G)-1),ee=X.getUnitLayoutInfo(G,0),te=K.getUnitLayoutInfo(G,-K.getLocatorCount(G)),re=K.shouldShow()?K.getUnitLayoutInfo(G,-1):null,ae=U.point[G]=W[G];if(!ee&&!re){U[XY$2[G]]=CtxPointToDataAreaType.outside;return}if(Z===MatrixClampOption.body){ee?(U[XY$2[G]]=CtxPointToDataAreaType.inBody,ae=mathMin$a(Q.xy+Q.wh,mathMax$a(ee.xy,ae)),U.point[G]=ae):U[XY$2[G]]=CtxPointToDataAreaType.outside;return}else if(Z===MatrixClampOption.corner){re?(U[XY$2[G]]=CtxPointToDataAreaType.inCorner,ae=mathMin$a(re.xy+re.wh,mathMax$a(te.xy,ae)),U.point[G]=ae):U[XY$2[G]]=CtxPointToDataAreaType.outside;return}var ne=ee?ee.xy:re?re.xy+re.wh:NaN,ie=te?te.xy:ne,oe=Q?Q.xy+Q.wh:ne;if(ae<ie){if(!Z){U[XY$2[G]]=CtxPointToDataAreaType.outside;return}ae=ie}else if(ae>oe){if(!Z){U[XY$2[G]]=CtxPointToDataAreaType.outside;return}ae=oe}U.point[G]=ae,U[XY$2[G]]=ne<=ae&&ae<=oe?CtxPointToDataAreaType.inBody:ie<=ae&&ae<=ne?CtxPointToDataAreaType.inCorner:CtxPointToDataAreaType.outside}function pointToDataOnlyHeaderFillOut(U,G,H,W){var Z=1-H;if(U[XY$2[H]]!==CtxPointToDataAreaType.outside)for(W[XY$2[H]].resetCellIterator(_ptdDimCellIt);_ptdDimCellIt.next();){var X=_ptdDimCellIt.item;if(isCoordInRect(U.point[H],X.rect,H)&&isCoordInRect(U.point[Z],X.rect,Z)){G[H]=X.ordinal,G[Z]=X.id[XY$2[Z]];return}}}function pointToDataBodyCornerFillOut(U,G,H,W){if(U[XY$2[H]]!==CtxPointToDataAreaType.outside){var Z=U[XY$2[H]]===CtxPointToDataAreaType.inCorner?W[XY$2[1-H]]:W[XY$2[H]];for(Z.resetLayoutIterator(_ptdLevelIt,H);_ptdLevelIt.next();)if(isCoordInLayoutInfo(U.point[H],_ptdLevelIt.item)){G[H]=_ptdLevelIt.item.id[XY$2[H]];return}}}function isCoordInLayoutInfo(U,G){return G.xy<=U&&U<=G.xy+G.wh}function isCoordInRect(U,G,H){return G[XY$2[H]]<=U&&U<=G[XY$2[H]]+G[WH$2[H]]}function install$o(U){U.registerComponentModel(MatrixModel),U.registerComponentView(MatrixView),U.registerCoordinateSystem("matrix",Matrix)}function setKeyInfoToNewElOption(U,G){var H=U.existing;if(G.id=U.keyInfo.id,!G.type&&H&&(G.type=H.type),G.parentId==null){var W=G.parentOption;W?G.parentId=W.id:H&&(G.parentId=H.parentId)}G.parentOption=null}function isSetLoc(U,G){var H;return each$f(G,function(W){U[W]!=null&&U[W]!=="auto"&&(H=!0)}),H}function mergeNewElOptionToExist(U,G,H){var W=extend({},H),Z=U[G],X=H.$action||"merge";if(X==="merge")if(Z){if(process.env.NODE_ENV!=="production"){var K=H.type;assert(!K||Z.type===K,'Please set $action: "replace" to change `type`')}merge(Z,W,!0),mergeLayoutParam(Z,W,{ignoreSize:!0}),copyLayoutParams(H,Z),copyTransitionInfo(H,Z),copyTransitionInfo(H,Z,"shape"),copyTransitionInfo(H,Z,"style"),copyTransitionInfo(H,Z,"extra"),H.clipPath=Z.clipPath}else U[G]=W;else X==="replace"?U[G]=W:X==="remove"&&Z&&(U[G]=null)}var TRANSITION_PROPS_TO_COPY=["transition","enterFrom","leaveTo"],ROOT_TRANSITION_PROPS_TO_COPY=TRANSITION_PROPS_TO_COPY.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function copyTransitionInfo(U,G,H){if(H&&(!U[H]&&G[H]&&(U[H]={}),U=U[H],G=G[H]),!(!U||!G))for(var W=H?TRANSITION_PROPS_TO_COPY:ROOT_TRANSITION_PROPS_TO_COPY,Z=0;Z<W.length;Z++){var X=W[Z];U[X]==null&&G[X]!=null&&(U[X]=G[X])}}function setLayoutInfoToExist(U,G){if(U&&(U.hv=G.hv=[isSetLoc(G,["left","right"]),isSetLoc(G,["top","bottom"])],U.type==="group")){var H=U,W=G;H.width==null&&(H.width=W.width=0),H.height==null&&(H.height=W.height=0)}}var GraphicComponentModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.preventAutoZ=!0,H}return G.prototype.mergeOption=function(H,W){var Z=this.option.elements;this.option.elements=null,U.prototype.mergeOption.call(this,H,W),this.option.elements=Z},G.prototype.optionUpdated=function(H,W){var Z=this.option,X=(W?Z:H).elements,K=Z.elements=W?[]:Z.elements,Q=[];this._flatten(X,Q,null);var ee=mappingToExists(K,Q,"normalMerge"),te=this._elOptionsToUpdate=[];each$f(ee,function(re,ae){var ne=re.newOption;process.env.NODE_ENV!=="production"&&assert(isObject$3(ne)||re.existing,"Empty graphic option definition"),ne&&(te.push(ne),setKeyInfoToNewElOption(re,ne),mergeNewElOptionToExist(K,ae,ne),setLayoutInfoToExist(K[ae],ne))},this),Z.elements=filter(K,function(re){return re&&delete re.$action,re!=null})},G.prototype._flatten=function(H,W,Z){each$f(H,function(X){if(X){Z&&(X.parentOption=Z),W.push(X);var K=X.children;K&&K.length&&this._flatten(K,W,X),delete X.children}},this)},G.prototype.useElOptionsToUpdate=function(){var H=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,H},G.type="graphic",G.defaultOption={elements:[]},G})(ComponentModel),nonShapeGraphicElements={path:null,compoundPath:null,group:Group$3,image:ZRImage,text:ZRText},inner$7=makeInner(),GraphicComponentView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(){this._elMap=createHashMap()},G.prototype.render=function(H,W,Z){H!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=H,this._updateElements(H),this._relocate(H,Z)},G.prototype._updateElements=function(H){var W=H.useElOptionsToUpdate();if(W){var Z=this._elMap,X=this.group,K=H.get("z"),Q=H.get("zlevel");each$f(W,function(ee){var te=convertOptionIdName(ee.id,null),re=te!=null?Z.get(te):null,ae=convertOptionIdName(ee.parentId,null),ne=ae!=null?Z.get(ae):X,ie=ee.type,oe=ee.style;ie==="text"&&oe&&ee.hv&&ee.hv[1]&&(oe.textVerticalAlign=oe.textBaseline=oe.verticalAlign=oe.align=null);var se=ee.textContent,le=ee.textConfig;if(oe&&isEC4CompatibleStyle(oe,ie,!!le,!!se)){var ue=convertFromEC4CompatibleStyle(oe,ie,!0);!le&&ue.textConfig&&(le=ee.textConfig=ue.textConfig),!se&&ue.textContent&&(se=ue.textContent)}var ce=getCleanedElOption(ee);process.env.NODE_ENV!=="production"&&re&&assert(ne===re.parent,"Changing parent is not supported.");var fe=ee.$action||"merge",he=fe==="merge",ve=fe==="replace";if(he){var de=!re,pe=re;de?pe=createEl(te,ne,ee.type,Z):(pe&&(inner$7(pe).isNew=!1),stopPreviousKeyframeAnimationAndRestore(pe)),pe&&(applyUpdateTransition(pe,ce,H,{isInit:de}),updateCommonAttrs(pe,ee,K,Q))}else if(ve){removeEl$1(re,ee,Z,H);var ge=createEl(te,ne,ee.type,Z);ge&&(applyUpdateTransition(ge,ce,H,{isInit:!0}),updateCommonAttrs(ge,ee,K,Q))}else fe==="remove"&&(updateLeaveTo(re,ee),removeEl$1(re,ee,Z,H));var me=Z.get(te);if(me&&se)if(he){var ye=me.getTextContent();ye?ye.attr(se):me.setTextContent(new ZRText(se))}else ve&&me.setTextContent(new ZRText(se));if(me){var _e=ee.clipPath;if(_e){var xe=_e.type,Se=void 0,de=!1;if(he){var Te=me.getClipPath();de=!Te||inner$7(Te).type!==xe,Se=de?newEl(xe):Te}else ve&&(de=!0,Se=newEl(xe));me.setClipPath(Se),applyUpdateTransition(Se,_e,H,{isInit:de}),applyKeyframeAnimation(Se,_e.keyframeAnimation,H)}var be=inner$7(me);me.setTextConfig(le),be.option=ee,setEventData(me,H,ee),setTooltipConfig({el:me,componentModel:H,itemName:me.name,itemTooltipOption:ee.tooltip}),applyKeyframeAnimation(me,ee.keyframeAnimation,H)}})}},G.prototype._relocate=function(H,W){for(var Z=H.option.elements,X=this.group,K=this._elMap,Q=W.getWidth(),ee=W.getHeight(),te=["x","y"],re=0;re<Z.length;re++){var ae=Z[re],ne=convertOptionIdName(ae.id,null),ie=ne!=null?K.get(ne):null;if(!(!ie||!ie.isGroup)){var oe=ie.parent,se=oe===X,le=inner$7(ie),ue=inner$7(oe);le.width=parsePercent(le.option.width,se?Q:ue.width)||0,le.height=parsePercent(le.option.height,se?ee:ue.height)||0}}for(var re=Z.length-1;re>=0;re--){var ae=Z[re],ne=convertOptionIdName(ae.id,null),ie=ne!=null?K.get(ne):null;if(ie){var oe=ie.parent,ue=inner$7(oe),ce=oe===X?{width:Q,height:ee}:{width:ue.width,height:ue.height},fe={},he=positionElement(ie,ae,ce,null,{hv:ae.hv,boundingMode:ae.bounding},fe);if(!inner$7(ie).isNew&&he){for(var ve=ae.transition,de={},pe=0;pe<te.length;pe++){var ge=te[pe],me=fe[ge];ve&&(isTransitionAll(ve)||indexOf(ve,ge)>=0)?de[ge]=me:ie[ge]=me}updateProps$1(ie,de,H,0)}else ie.attr(fe)}}},G.prototype._clear=function(){var H=this,W=this._elMap;W.each(function(Z){removeEl$1(Z,inner$7(Z).option,W,H._lastGraphicModel)}),this._elMap=createHashMap()},G.prototype.dispose=function(){this._clear()},G.type="graphic",G})(ComponentView);function newEl(U){process.env.NODE_ENV!=="production"&&assert(U,"graphic type MUST be set");var G=hasOwn(nonShapeGraphicElements,U)?nonShapeGraphicElements[U]:getShapeClass(U);process.env.NODE_ENV!=="production"&&assert(G,"graphic type "+U+" can not be found");var H=new G({});return inner$7(H).type=U,H}function createEl(U,G,H,W){var Z=newEl(H);return G.add(Z),W.set(U,Z),inner$7(Z).id=U,inner$7(Z).isNew=!0,Z}function removeEl$1(U,G,H,W){var Z=U&&U.parent;Z&&(U.type==="group"&&U.traverse(function(X){removeEl$1(X,G,H,W)}),applyLeaveTransition(U,G,W),H.removeKey(inner$7(U).id))}function updateCommonAttrs(U,G,H,W){U.isGroup||each$f([["cursor",Displayable.prototype.cursor],["zlevel",W||0],["z",H||0],["z2",0]],function(Z){var X=Z[0];hasOwn(G,X)?U[X]=retrieve2(G[X],Z[1]):U[X]==null&&(U[X]=Z[1])}),each$f(keys(G),function(Z){if(Z.indexOf("on")===0){var X=G[Z];U[Z]=isFunction(X)?X:null}}),hasOwn(G,"draggable")&&(U.draggable=G.draggable),G.name!=null&&(U.name=G.name),G.id!=null&&(U.id=G.id)}function getCleanedElOption(U){return U=extend({},U),each$f(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(LOCATION_PARAMS),function(G){delete U[G]}),U}function setEventData(U,G,H){var W=getECData(U).eventData;!U.silent&&!U.ignore&&!W&&(W=getECData(U).eventData={componentType:"graphic",componentIndex:G.componentIndex,name:U.name}),W&&(W.info=H.info)}function install$n(U){U.registerComponentModel(GraphicComponentModel),U.registerComponentView(GraphicComponentView),U.registerPreprocessor(function(G){var H=G.graphic;isArray$1(H)?!H[0]||!H[0].elements?G.graphic=[{elements:H}]:G.graphic=[G.graphic[0]]:H&&!H.elements&&(G.graphic=[{elements:[H]}])})}var DATA_ZOOM_AXIS_DIMENSIONS=["x","y","radius","angle","single"],SERIES_COORDS=["cartesian2d","polar","singleAxis"];function isCoordSupported(U){var G=U.get("coordinateSystem");return indexOf(SERIES_COORDS,G)>=0}function getAxisMainType(U){return process.env.NODE_ENV!=="production"&&assert(U),U+"Axis"}function findEffectedDataZooms(U,G){var H=createHashMap(),W=[],Z=createHashMap();U.eachComponent({mainType:"dataZoom",query:G},function(re){Z.get(re.uid)||Q(re)});var X;do X=!1,U.eachComponent("dataZoom",K);while(X);function K(re){!Z.get(re.uid)&&ee(re)&&(Q(re),X=!0)}function Q(re){Z.set(re.uid,!0),W.push(re),te(re)}function ee(re){var ae=!1;return re.eachTargetAxis(function(ne,ie){var oe=H.get(ne);oe&&oe[ie]&&(ae=!0)}),ae}function te(re){re.eachTargetAxis(function(ae,ne){(H.get(ae)||H.set(ae,[]))[ne]=!0})}return W}function collectReferCoordSysModelInfo(U){var G=U.ecModel,H={infoList:[],infoMap:createHashMap()};return U.eachTargetAxis(function(W,Z){var X=G.getComponent(getAxisMainType(W),Z);if(X){var K=X.getCoordSysModel();if(K){var Q=K.uid,ee=H.infoMap.get(Q);ee||(ee={model:K,axisModels:[]},H.infoList.push(ee),H.infoMap.set(Q,ee)),ee.axisModels.push(X)}}}),H}var DataZoomAxisInfo=(function(){function U(){this.indexList=[],this.indexMap=[]}return U.prototype.add=function(G){this.indexMap[G]||(this.indexList.push(G),this.indexMap[G]=!0)},U})(),DataZoomModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H._autoThrottle=!0,H._noTarget=!0,H._rangePropMode=["percent","percent"],H}return G.prototype.init=function(H,W,Z){var X=retrieveRawOption(H);this.settledOption=X,this.mergeDefaultAndTheme(H,Z),this._doInit(X)},G.prototype.mergeOption=function(H){var W=retrieveRawOption(H);merge(this.option,H,!0),merge(this.settledOption,W,!0),this._doInit(W)},G.prototype._doInit=function(H){var W=this.option;this._setDefaultThrottle(H),this._updateRangeUse(H);var Z=this.settledOption;each$f([["start","startValue"],["end","endValue"]],function(X,K){this._rangePropMode[K]==="value"&&(W[X[0]]=Z[X[0]]=null)},this),this._resetTarget()},G.prototype._resetTarget=function(){var H=this.get("orient",!0),W=this._targetAxisInfoMap=createHashMap(),Z=this._fillSpecifiedTargetAxis(W);Z?this._orient=H||this._makeAutoOrientByTargetAxis():(this._orient=H||"horizontal",this._fillAutoTargetAxisByOrient(W,this._orient)),this._noTarget=!0,W.each(function(X){X.indexList.length&&(this._noTarget=!1)},this)},G.prototype._fillSpecifiedTargetAxis=function(H){var W=!1;return each$f(DATA_ZOOM_AXIS_DIMENSIONS,function(Z){var X=this.getReferringComponents(getAxisMainType(Z),MULTIPLE_REFERRING);if(X.specified){W=!0;var K=new DataZoomAxisInfo;each$f(X.models,function(Q){K.add(Q.componentIndex)}),H.set(Z,K)}},this),W},G.prototype._fillAutoTargetAxisByOrient=function(H,W){var Z=this.ecModel,X=!0;if(X){var K=W==="vertical"?"y":"x",Q=Z.findComponents({mainType:K+"Axis"});ee(Q,K)}if(X){var Q=Z.findComponents({mainType:"singleAxis",filter:function(re){return re.get("orient",!0)===W}});ee(Q,"single")}function ee(te,re){var ae=te[0];if(ae){var ne=new DataZoomAxisInfo;if(ne.add(ae.componentIndex),H.set(re,ne),X=!1,re==="x"||re==="y"){var ie=ae.getReferringComponents("grid",SINGLE_REFERRING).models[0];ie&&each$f(te,function(oe){ae.componentIndex!==oe.componentIndex&&ie===oe.getReferringComponents("grid",SINGLE_REFERRING).models[0]&&ne.add(oe.componentIndex)})}}}X&&each$f(DATA_ZOOM_AXIS_DIMENSIONS,function(te){if(X){var re=Z.findComponents({mainType:getAxisMainType(te),filter:function(ne){return ne.get("type",!0)==="category"}});if(re[0]){var ae=new DataZoomAxisInfo;ae.add(re[0].componentIndex),H.set(te,ae),X=!1}}},this)},G.prototype._makeAutoOrientByTargetAxis=function(){var H;return this.eachTargetAxis(function(W){!H&&(H=W)},this),H==="y"?"vertical":"horizontal"},G.prototype._setDefaultThrottle=function(H){if(H.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var W=this.ecModel.option;this.option.throttle=W.animation&&W.animationDurationUpdate>0?100:20}},G.prototype._updateRangeUse=function(H){var W=this._rangePropMode,Z=this.get("rangeMode");each$f([["start","startValue"],["end","endValue"]],function(X,K){var Q=H[X[0]]!=null,ee=H[X[1]]!=null;Q&&!ee?W[K]="percent":!Q&&ee?W[K]="value":Z?W[K]=Z[K]:Q&&(W[K]="percent")})},G.prototype.noTarget=function(){return this._noTarget},G.prototype.getFirstTargetAxisModel=function(){var H;return this.eachTargetAxis(function(W,Z){H==null&&(H=this.ecModel.getComponent(getAxisMainType(W),Z))},this),H},G.prototype.eachTargetAxis=function(H,W){this._targetAxisInfoMap.each(function(Z,X){each$f(Z.indexList,function(K){H.call(W,X,K)})})},G.prototype.getAxisProxy=function(H,W){var Z=this.getAxisModel(H,W);if(Z)return Z.__dzAxisProxy},G.prototype.getAxisModel=function(H,W){process.env.NODE_ENV!=="production"&&assert(H&&W!=null);var Z=this._targetAxisInfoMap.get(H);if(Z&&Z.indexMap[W])return this.ecModel.getComponent(getAxisMainType(H),W)},G.prototype.setRawRange=function(H){var W=this.option,Z=this.settledOption;each$f([["start","startValue"],["end","endValue"]],function(X){(H[X[0]]!=null||H[X[1]]!=null)&&(W[X[0]]=Z[X[0]]=H[X[0]],W[X[1]]=Z[X[1]]=H[X[1]])},this),this._updateRangeUse(H)},G.prototype.setCalculatedRange=function(H){var W=this.option;each$f(["start","startValue","end","endValue"],function(Z){W[Z]=H[Z]})},G.prototype.getPercentRange=function(){var H=this.findRepresentativeAxisProxy();if(H)return H.getDataPercentWindow()},G.prototype.getValueRange=function(H,W){if(H==null&&W==null){var Z=this.findRepresentativeAxisProxy();if(Z)return Z.getDataValueWindow()}else return this.getAxisProxy(H,W).getDataValueWindow()},G.prototype.findRepresentativeAxisProxy=function(H){if(H)return H.__dzAxisProxy;for(var W,Z=this._targetAxisInfoMap.keys(),X=0;X<Z.length;X++)for(var K=Z[X],Q=this._targetAxisInfoMap.get(K),ee=0;ee<Q.indexList.length;ee++){var te=this.getAxisProxy(K,Q.indexList[ee]);if(te.hostedBy(this))return te;W||(W=te)}return W},G.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},G.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&assert(this._orient),this._orient},G.type="dataZoom",G.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],G.defaultOption={z:4,filterMode:"filter",start:0,end:100},G})(ComponentModel);function retrieveRawOption(U){var G={};return each$f(["start","end","startValue","endValue","throttle"],function(H){U.hasOwnProperty(H)&&(G[H]=U[H])}),G}var SelectDataZoomModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="dataZoom.select",G})(DataZoomModel),DataZoomView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z,X){this.dataZoomModel=H,this.ecModel=W,this.api=Z},G.type="dataZoom",G})(ComponentView),SelectDataZoomView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="dataZoom.select",G})(DataZoomView),each$7=each$f,asc$1=asc$2,AxisProxy=(function(){function U(G,H,W,Z){this._dimName=G,this._axisIndex=H,this.ecModel=Z,this._dataZoomModel=W}return U.prototype.hostedBy=function(G){return this._dataZoomModel===G},U.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},U.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},U.prototype.getTargetSeriesModels=function(){var G=[];return this.ecModel.eachSeries(function(H){if(isCoordSupported(H)){var W=getAxisMainType(this._dimName),Z=H.getReferringComponents(W,SINGLE_REFERRING).models[0];Z&&this._axisIndex===Z.componentIndex&&G.push(H)}},this),G},U.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},U.prototype.getMinMaxSpan=function(){return clone$4(this._minMaxSpan)},U.prototype.calculateDataWindow=function(G){var H=this._dataExtent,W=this.getAxisModel(),Z=W.axis.scale,X=this._dataZoomModel.getRangePropMode(),K=[0,100],Q=[],ee=[],te;each$7(["start","end"],function(ne,ie){var oe=G[ne],se=G[ne+"Value"];X[ie]==="percent"?(oe==null&&(oe=K[ie]),se=Z.parse(linearMap$2(oe,K,H))):(te=!0,se=se==null?H[ie]:Z.parse(se),oe=linearMap$2(se,H,K)),ee[ie]=se==null||isNaN(se)?H[ie]:se,Q[ie]=oe==null||isNaN(oe)?K[ie]:oe}),asc$1(ee),asc$1(Q);var re=this._minMaxSpan;te?ae(ee,Q,H,K,!1):ae(Q,ee,K,H,!0);function ae(ne,ie,oe,se,le){var ue=le?"Span":"ValueSpan";sliderMove(0,ne,oe,"all",re["min"+ue],re["max"+ue]);for(var ce=0;ce<2;ce++)ie[ce]=linearMap$2(ne[ce],oe,se,!0),le&&(ie[ce]=Z.parse(ie[ce]))}return{valueWindow:ee,percentWindow:Q}},U.prototype.reset=function(G){if(G===this._dataZoomModel){var H=this.getTargetSeriesModels();this._dataExtent=calculateDataExtent(this,this._dimName,H),this._updateMinMaxSpan();var W=this.calculateDataWindow(G.settledOption);this._valueWindow=W.valueWindow,this._percentWindow=W.percentWindow,this._setAxisModel()}},U.prototype.filterData=function(G,H){if(G!==this._dataZoomModel)return;var W=this._dimName,Z=this.getTargetSeriesModels(),X=G.get("filterMode"),K=this._valueWindow;if(X==="none")return;each$7(Z,function(ee){var te=ee.getData(),re=te.mapDimensionsAll(W);if(re.length){if(X==="weakFilter"){var ae=te.getStore(),ne=map$1(re,function(ie){return te.getDimensionIndex(ie)},te);te.filterSelf(function(ie){for(var oe,se,le,ue=0;ue<re.length;ue++){var ce=ae.get(ne[ue],ie),fe=!isNaN(ce),he=ce<K[0],ve=ce>K[1];if(fe&&!he&&!ve)return!0;fe&&(le=!0),he&&(oe=!0),ve&&(se=!0)}return le&&oe&&se})}else each$7(re,function(ie){if(X==="empty")ee.setData(te=te.map(ie,function(se){return Q(se)?se:NaN}));else{var oe={};oe[ie]=K,te.selectRange(oe)}});each$7(re,function(ie){te.setApproximateExtent(K,ie)})}});function Q(ee){return ee>=K[0]&&ee<=K[1]}},U.prototype._updateMinMaxSpan=function(){var G=this._minMaxSpan={},H=this._dataZoomModel,W=this._dataExtent;each$7(["min","max"],function(Z){var X=H.get(Z+"Span"),K=H.get(Z+"ValueSpan");K!=null&&(K=this.getAxisModel().axis.scale.parse(K)),K!=null?X=linearMap$2(W[0]+K,W,[0,100],!0):X!=null&&(K=linearMap$2(X,[0,100],W,!0)-W[0]),G[Z+"Span"]=X,G[Z+"ValueSpan"]=K},this)},U.prototype._setAxisModel=function(){var G=this.getAxisModel(),H=this._percentWindow,W=this._valueWindow;if(H){var Z=getPixelPrecision(W,[0,500]);Z=Math.min(Z,20);var X=G.axis.scale.rawExtentInfo;H[0]!==0&&X.setDeterminedMinMax("min",+W[0].toFixed(Z)),H[1]!==100&&X.setDeterminedMinMax("max",+W[1].toFixed(Z)),X.freeze()}},U})();function calculateDataExtent(U,G,H){var W=[1/0,-1/0];each$7(H,function(K){unionAxisExtentFromData(W,K.getData(),G)});var Z=U.getAxisModel(),X=ensureScaleRawExtentInfo(Z.axis.scale,Z,W).calculate();return[X.min,X.max]}var dataZoomProcessor={getTargetSeries:function(U){function G(Z){U.eachComponent("dataZoom",function(X){X.eachTargetAxis(function(K,Q){var ee=U.getComponent(getAxisMainType(K),Q);Z(K,Q,ee,X)})})}G(function(Z,X,K,Q){K.__dzAxisProxy=null});var H=[];G(function(Z,X,K,Q){K.__dzAxisProxy||(K.__dzAxisProxy=new AxisProxy(Z,X,Q,U),H.push(K.__dzAxisProxy))});var W=createHashMap();return each$f(H,function(Z){each$f(Z.getTargetSeriesModels(),function(X){W.set(X.uid,X)})}),W},overallReset:function(U,G){U.eachComponent("dataZoom",function(H){H.eachTargetAxis(function(W,Z){H.getAxisProxy(W,Z).reset(H)}),H.eachTargetAxis(function(W,Z){H.getAxisProxy(W,Z).filterData(H,G)})}),U.eachComponent("dataZoom",function(H){var W=H.findRepresentativeAxisProxy();if(W){var Z=W.getDataPercentWindow(),X=W.getDataValueWindow();H.setCalculatedRange({start:Z[0],end:Z[1],startValue:X[0],endValue:X[1]})}})}};function installDataZoomAction(U){U.registerAction("dataZoom",function(G,H){var W=findEffectedDataZooms(H,G);each$f(W,function(Z){Z.setRawRange({start:G.start,end:G.end,startValue:G.startValue,endValue:G.endValue})})})}var installed$1=!1;function installCommon$1(U){installed$1||(installed$1=!0,U.registerProcessor(U.PRIORITY.PROCESSOR.FILTER,dataZoomProcessor),installDataZoomAction(U),U.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function install$m(U){U.registerComponentModel(SelectDataZoomModel),U.registerComponentView(SelectDataZoomView),installCommon$1(U)}var ToolboxFeature=(function(){function U(){}return U})(),features={};function registerFeature(U,G){features[U]=G}function getFeature(U){return features[U]}var ToolboxModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.optionUpdated=function(){U.prototype.optionUpdated.apply(this,arguments);var H=this.ecModel;each$f(this.option.feature,function(W,Z){var X=getFeature(Z);X&&(X.getDefaultOption&&(X.defaultOption=X.getDefaultOption(H)),merge(W,X.defaultOption))})},G.type="toolbox",G.layoutMode={type:"box",ignoreSize:!0},G.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:tokens.color.border,borderRadius:0,borderWidth:0,padding:tokens.size.m,itemSize:15,itemGap:tokens.size.s,showTitle:!0,iconStyle:{borderColor:tokens.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:tokens.color.accent50}},tooltip:{show:!1,position:"bottom"}},G})(ComponentModel);function makeBackground(U,G){var H=normalizeCssArray(G.get("padding")),W=G.getItemStyle(["color","opacity"]);W.fill=G.get("backgroundColor");var Z=new Rect$2({shape:{x:U.x-H[3],y:U.y-H[0],width:U.width+H[1]+H[3],height:U.height+H[0]+H[2],r:G.get("borderRadius")},style:W,silent:!0,z2:-1});return Z}var ToolboxView=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.render=function(H,W,Z,X){var K=this.group;if(K.removeAll(),!H.get("show"))return;var Q=+H.get("itemSize"),ee=H.get("orient")==="vertical",te=H.get("feature")||{},re=this._features||(this._features={}),ae=[];each$f(te,function(ce,fe){ae.push(fe)}),new DataDiffer(this._featureNames||[],ae).add(ne).update(ne).remove(curry$1(ne,null)).execute(),this._featureNames=ae;function ne(ce,fe){var he=ae[ce],ve=ae[fe],de=te[he],pe=new Model(de,H,H.ecModel),ge;if(X&&X.newTitle!=null&&X.featureName===he&&(de.title=X.newTitle),he&&!ve){if(isUserFeatureName(he))ge={onclick:pe.option.onclick,featureName:he};else{var me=getFeature(he);if(!me)return;ge=new me}re[he]=ge}else if(ge=re[ve],!ge)return;ge.uid=getUID("toolbox-feature"),ge.model=pe,ge.ecModel=W,ge.api=Z;var ye=ge instanceof ToolboxFeature;if(!he&&ve){ye&&ge.dispose&&ge.dispose(W,Z);return}if(!pe.get("show")||ye&&ge.unusable){ye&&ge.remove&&ge.remove(W,Z);return}ie(pe,ge,he),pe.setIconStatus=function(_e,xe){var Se=this.option,Te=this.iconPaths;Se.iconStatus=Se.iconStatus||{},Se.iconStatus[_e]=xe,Te[_e]&&(xe==="emphasis"?enterEmphasis:leaveEmphasis)(Te[_e])},ge instanceof ToolboxFeature&&ge.render&&ge.render(pe,W,Z,X)}function ie(ce,fe,he){var ve=ce.getModel("iconStyle"),de=ce.getModel(["emphasis","iconStyle"]),pe=fe instanceof ToolboxFeature&&fe.getIcons?fe.getIcons():ce.get("icon"),ge=ce.get("title")||{},me,ye;isString(pe)?(me={},me[he]=pe):me=pe,isString(ge)?(ye={},ye[he]=ge):ye=ge;var _e=ce.iconPaths={};each$f(me,function(xe,Se){var Te=createIcon(xe,{},{x:-Q/2,y:-Q/2,width:Q,height:Q});Te.setStyle(ve.getItemStyle());var be=Te.ensureState("emphasis");be.style=de.getItemStyle();var Ae=new ZRText({style:{text:ye[Se],align:de.get("textAlign"),borderRadius:de.get("textBorderRadius"),padding:de.get("textPadding"),fill:null,font:getFont({fontStyle:de.get("textFontStyle"),fontFamily:de.get("textFontFamily"),fontSize:de.get("textFontSize"),fontWeight:de.get("textFontWeight")},W)},ignore:!0});Te.setTextContent(Ae),setTooltipConfig({el:Te,componentModel:H,itemName:Se,formatterParamsExtra:{title:ye[Se]}}),Te.__title=ye[Se],Te.on("mouseover",function(){var we=de.getItemStyle(),Ce=ee?H.get("right")==null&&H.get("left")!=="right"?"right":"left":H.get("bottom")==null&&H.get("top")!=="bottom"?"bottom":"top";Ae.setStyle({fill:de.get("textFill")||we.fill||we.stroke||tokens.color.neutral99,backgroundColor:de.get("textBackgroundColor")}),Te.setTextConfig({position:de.get("textPosition")||Ce}),Ae.ignore=!H.get("showTitle"),Z.enterEmphasis(this)}).on("mouseout",function(){ce.get(["iconStatus",Se])!=="emphasis"&&Z.leaveEmphasis(this),Ae.hide()}),(ce.get(["iconStatus",Se])==="emphasis"?enterEmphasis:leaveEmphasis)(Te),K.add(Te),Te.on("click",bind$1(fe.onclick,fe,W,Z,Se)),_e[Se]=Te})}var oe=createBoxLayoutReference(H,Z).refContainer,se=H.getBoxLayoutParams(),le=H.get("padding"),ue=getLayoutRect(se,oe,le);box(H.get("orient"),K,H.get("itemGap"),ue.width,ue.height),positionElement(K,se,oe,le),K.add(makeBackground(K.getBoundingRect(),H)),ee||K.eachChild(function(ce){var fe=ce.__title,he=ce.ensureState("emphasis"),ve=he.textConfig||(he.textConfig={}),de=ce.getTextContent(),pe=de&&de.ensureState("emphasis");if(pe&&!isFunction(pe)&&fe){var ge=pe.style||(pe.style={}),me=getBoundingRect(fe,ZRText.makeFont(ge)),ye=ce.x+K.x,_e=ce.y+K.y+Q,xe=!1;_e+me.height>Z.getHeight()&&(ve.position="top",xe=!0);var Se=xe?-5-me.height:Q+10;ye+me.width/2>Z.getWidth()?(ve.position=["100%",Se],ge.align="right"):ye-me.width/2<0&&(ve.position=[0,Se],ge.align="left")}})},G.prototype.updateView=function(H,W,Z,X){each$f(this._features,function(K){K instanceof ToolboxFeature&&K.updateView&&K.updateView(K.model,W,Z,X)})},G.prototype.remove=function(H,W){each$f(this._features,function(Z){Z instanceof ToolboxFeature&&Z.remove&&Z.remove(H,W)}),this.group.removeAll()},G.prototype.dispose=function(H,W){each$f(this._features,function(Z){Z instanceof ToolboxFeature&&Z.dispose&&Z.dispose(H,W)})},G.type="toolbox",G})(ComponentView);function isUserFeatureName(U){return U.indexOf("my")===0}var SaveAsImage=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.onclick=function(H,W){var Z=this.model,X=Z.get("name")||H.get("title.0.text")||"echarts",K=W.getZr().painter.getType()==="svg",Q=K?"svg":Z.get("type",!0)||"png",ee=W.getConnectedDataURL({type:Q,backgroundColor:Z.get("backgroundColor",!0)||H.get("backgroundColor")||tokens.color.neutral00,connectedBackgroundColor:Z.get("connectedBackgroundColor"),excludeComponents:Z.get("excludeComponents"),pixelRatio:Z.get("pixelRatio")}),te=env.browser;if(typeof MouseEvent=="function"&&(te.newEdge||!te.ie&&!te.edge)){var re=document.createElement("a");re.download=X+"."+Q,re.target="_blank",re.href=ee;var ae=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});re.dispatchEvent(ae)}else if(window.navigator.msSaveOrOpenBlob||K){var ne=ee.split(","),ie=ne[0].indexOf("base64")>-1,oe=K?decodeURIComponent(ne[1]):ne[1];ie&&(oe=window.atob(oe));var se=X+"."+Q;if(window.navigator.msSaveOrOpenBlob){for(var le=oe.length,ue=new Uint8Array(le);le--;)ue[le]=oe.charCodeAt(le);var ce=new Blob([ue]);window.navigator.msSaveOrOpenBlob(ce,se)}else{var fe=document.createElement("iframe");document.body.appendChild(fe);var he=fe.contentWindow,ve=he.document;ve.open("image/svg+xml","replace"),ve.write(oe),ve.close(),he.focus(),ve.execCommand("SaveAs",!0,se),document.body.removeChild(fe)}}else{var de=Z.get("lang"),pe='<body style="margin:0;"><img src="'+ee+'" style="max-width:100%;" title="'+(de&&de[0]||"")+'" /></body>',ge=window.open();ge.document.write(pe),ge.document.title=X}},G.getDefaultOption=function(H){var W={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:H.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:tokens.color.neutral00,name:"",excludeComponents:["toolbox"],lang:H.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return W},G})(ToolboxFeature),INNER_STACK_KEYWORD="__ec_magicType_stack__",radioTypes=[["line","bar"],["stack"]],MagicType=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.getIcons=function(){var H=this.model,W=H.get("icon"),Z={};return each$f(H.get("type"),function(X){W[X]&&(Z[X]=W[X])}),Z},G.getDefaultOption=function(H){var W={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:H.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return W},G.prototype.onclick=function(H,W,Z){var X=this.model,K=X.get(["seriesIndex",Z]);if(seriesOptGenreator[Z]){var Q={series:[]},ee=function(ae){var ne=ae.subType,ie=ae.id,oe=seriesOptGenreator[Z](ne,ie,ae,X);oe&&(defaults(oe,ae.option),Q.series.push(oe));var se=ae.coordinateSystem;if(se&&se.type==="cartesian2d"&&(Z==="line"||Z==="bar")){var le=se.getAxesByScale("ordinal")[0];if(le){var ue=le.dim,ce=ue+"Axis",fe=ae.getReferringComponents(ce,SINGLE_REFERRING).models[0],he=fe.componentIndex;Q[ce]=Q[ce]||[];for(var ve=0;ve<=he;ve++)Q[ce][he]=Q[ce][he]||{};Q[ce][he].boundaryGap=Z==="bar"}}};each$f(radioTypes,function(ae){indexOf(ae,Z)>=0&&each$f(ae,function(ne){X.setIconStatus(ne,"normal")})}),X.setIconStatus(Z,"emphasis"),H.eachComponent({mainType:"series",query:K==null?null:{seriesIndex:K}},ee);var te,re=Z;Z==="stack"&&(te=merge({stack:X.option.title.tiled,tiled:X.option.title.stack},X.option.title),X.get(["iconStatus",Z])!=="emphasis"&&(re="tiled")),W.dispatchAction({type:"changeMagicType",currentType:re,newOption:Q,newTitle:te,featureName:"magicType"})}},G})(ToolboxFeature),seriesOptGenreator={line:function(U,G,H,W){if(U==="bar")return merge({id:G,type:"line",data:H.get("data"),stack:H.get("stack"),markPoint:H.get("markPoint"),markLine:H.get("markLine")},W.get(["option","line"])||{},!0)},bar:function(U,G,H,W){if(U==="line")return merge({id:G,type:"bar",data:H.get("data"),stack:H.get("stack"),markPoint:H.get("markPoint"),markLine:H.get("markLine")},W.get(["option","bar"])||{},!0)},stack:function(U,G,H,W){var Z=H.get("stack")===INNER_STACK_KEYWORD;if(U==="line"||U==="bar")return W.setIconStatus("stack",Z?"normal":"emphasis"),merge({id:G,stack:Z?"":INNER_STACK_KEYWORD},W.get(["option","stack"])||{},!0)}};registerAction$1({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(U,G){G.mergeOption(U.newOption)});var BLOCK_SPLITER=new Array(60).join("-"),ITEM_SPLITER=" ";function groupSeries(U){var G={},H=[],W=[];return U.eachRawSeries(function(Z){var X=Z.coordinateSystem;if(X&&(X.type==="cartesian2d"||X.type==="polar")){var K=X.getBaseAxis();if(K.type==="category"){var Q=K.dim+"_"+K.index;G[Q]||(G[Q]={categoryAxis:K,valueAxis:X.getOtherAxis(K),series:[]},W.push({axisDim:K.dim,axisIndex:K.index})),G[Q].series.push(Z)}else H.push(Z)}else H.push(Z)}),{seriesGroupByCategoryAxis:G,other:H,meta:W}}function assembleSeriesWithCategoryAxis(U){var G=[];return each$f(U,function(H,W){var Z=H.categoryAxis,X=H.valueAxis,K=X.dim,Q=[" "].concat(map$1(H.series,function(ie){return ie.name})),ee=[Z.model.getCategories()];each$f(H.series,function(ie){var oe=ie.getRawData();ee.push(ie.getRawData().mapArray(oe.mapDimension(K),function(se){return se}))});for(var te=[Q.join(ITEM_SPLITER)],re=0;re<ee[0].length;re++){for(var ae=[],ne=0;ne<ee.length;ne++)ae.push(ee[ne][re]);te.push(ae.join(ITEM_SPLITER))}G.push(te.join(`
|
|
33
|
+
`))}),G.join(`
|
|
34
|
+
|
|
35
|
+
`+BLOCK_SPLITER+`
|
|
36
|
+
|
|
37
|
+
`)}function assembleOtherSeries(U){return map$1(U,function(G){var H=G.getRawData(),W=[G.name],Z=[];return H.each(H.dimensions,function(){for(var X=arguments.length,K=arguments[X-1],Q=H.getName(K),ee=0;ee<X-1;ee++)Z[ee]=arguments[ee];W.push((Q?Q+ITEM_SPLITER:"")+Z.join(ITEM_SPLITER))}),W.join(`
|
|
38
|
+
`)}).join(`
|
|
39
|
+
|
|
40
|
+
`+BLOCK_SPLITER+`
|
|
41
|
+
|
|
42
|
+
`)}function getContentFromModel(U){var G=groupSeries(U);return{value:filter([assembleSeriesWithCategoryAxis(G.seriesGroupByCategoryAxis),assembleOtherSeries(G.other)],function(H){return!!H.replace(/[\n\t\s]/g,"")}).join(`
|
|
43
|
+
|
|
44
|
+
`+BLOCK_SPLITER+`
|
|
45
|
+
|
|
46
|
+
`),meta:G.meta}}function trim(U){return U.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function isTSVFormat(U){var G=U.slice(0,U.indexOf(`
|
|
47
|
+
`));if(G.indexOf(ITEM_SPLITER)>=0)return!0}var itemSplitRegex=new RegExp("["+ITEM_SPLITER+"]+","g");function parseTSVContents(U){for(var G=U.split(/\n+/g),H=trim(G.shift()).split(itemSplitRegex),W=[],Z=map$1(H,function(ee){return{name:ee,data:[]}}),X=0;X<G.length;X++){var K=trim(G[X]).split(itemSplitRegex);W.push(K.shift());for(var Q=0;Q<K.length;Q++)Z[Q]&&(Z[Q].data[X]=K[Q])}return{series:Z,categories:W}}function parseListContents(U){for(var G=U.split(/\n+/g),H=trim(G.shift()),W=[],Z=0;Z<G.length;Z++){var X=trim(G[Z]);if(X){var K=X.split(itemSplitRegex),Q="",ee=void 0,te=!1;isNaN(K[0])?(te=!0,Q=K[0],K=K.slice(1),W[Z]={name:Q,value:[]},ee=W[Z].value):ee=W[Z]=[];for(var re=0;re<K.length;re++)ee.push(+K[re]);ee.length===1&&(te?W[Z].value=ee[0]:W[Z]=ee[0])}}return{name:H,data:W}}function parseContents(U,G){var H=U.split(new RegExp(`
|
|
48
|
+
*`+BLOCK_SPLITER+`
|
|
49
|
+
*`,"g")),W={series:[]};return each$f(H,function(Z,X){if(isTSVFormat(Z)){var K=parseTSVContents(Z),Q=G[X],ee=Q.axisDim+"Axis";Q&&(W[ee]=W[ee]||[],W[ee][Q.axisIndex]={data:K.categories},W.series=W.series.concat(K.series))}else{var K=parseListContents(Z);W.series.push(K)}}),W}var DataView=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.onclick=function(H,W){setTimeout(function(){W.dispatchAction({type:"hideTip"})});var Z=W.getDom(),X=this.model;this._dom&&Z.removeChild(this._dom);var K=document.createElement("div");K.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",K.style.backgroundColor=X.get("backgroundColor")||tokens.color.neutral00;var Q=document.createElement("h4"),ee=X.get("lang")||[];Q.innerHTML=ee[0]||X.get("title"),Q.style.cssText="margin:10px 20px",Q.style.color=X.get("textColor");var te=document.createElement("div"),re=document.createElement("textarea");te.style.cssText="overflow:auto";var ae=X.get("optionToContent"),ne=X.get("contentToOption"),ie=getContentFromModel(H);if(isFunction(ae)){var oe=ae(W.getOption());isString(oe)?te.innerHTML=oe:isDom(oe)&&te.appendChild(oe)}else{re.readOnly=X.get("readOnly");var se=re.style;se.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",se.color=X.get("textColor"),se.borderColor=X.get("textareaBorderColor"),se.backgroundColor=X.get("textareaColor"),re.value=ie.value,te.appendChild(re)}var le=ie.meta,ue=document.createElement("div");ue.style.cssText="position:absolute;bottom:5px;left:0;right:0";var ce="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",fe=document.createElement("div"),he=document.createElement("div");ce+=";background-color:"+X.get("buttonColor"),ce+=";color:"+X.get("buttonTextColor");var ve=this;function de(){Z.removeChild(K),ve._dom=null}addEventListener(fe,"click",de),addEventListener(he,"click",function(){if(ne==null&&ae!=null||ne!=null&&ae==null){process.env.NODE_ENV!=="production"&&warn("It seems you have just provided one of `contentToOption` and `optionToContent` functions but missed the other one. Data change is ignored."),de();return}var pe;try{isFunction(ne)?pe=ne(te,W.getOption()):pe=parseContents(re.value,le)}catch(ge){throw de(),new Error("Data view format error "+ge)}pe&&W.dispatchAction({type:"changeDataView",newOption:pe}),de()}),fe.innerHTML=ee[1],he.innerHTML=ee[2],he.style.cssText=fe.style.cssText=ce,!X.get("readOnly")&&ue.appendChild(he),ue.appendChild(fe),K.appendChild(Q),K.appendChild(te),K.appendChild(ue),te.style.height=Z.clientHeight-80+"px",Z.appendChild(K),this._dom=K},G.prototype.remove=function(H,W){this._dom&&W.getDom().removeChild(this._dom)},G.prototype.dispose=function(H,W){this.remove(H,W)},G.getDefaultOption=function(H){var W={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:H.getLocaleModel().get(["toolbox","dataView","title"]),lang:H.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:tokens.color.background,textColor:tokens.color.primary,textareaColor:tokens.color.background,textareaBorderColor:tokens.color.border,buttonColor:tokens.color.accent50,buttonTextColor:tokens.color.neutral00};return W},G})(ToolboxFeature);function tryMergeDataOption(U,G){return map$1(U,function(H,W){var Z=G&&G[W];if(isObject$3(Z)&&!isArray$1(Z)){var X=isObject$3(H)&&!isArray$1(H);X||(H={value:H});var K=Z.name!=null&&H.name==null;return H=defaults(H,Z),K&&delete H.name,H}else return H})}registerAction$1({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(U,G){var H=[];each$f(U.newOption.series,function(W){var Z=G.getSeriesByName(W.name)[0];if(!Z)H.push(extend({type:"scatter"},W));else{var X=Z.get("data");H.push({name:W.name,data:tryMergeDataOption(W.data,X)})}}),G.mergeOption(defaults({series:H},U.newOption))});var each$6=each$f,inner$6=makeInner();function push(U,G){var H=getStoreSnapshots(U);each$6(G,function(W,Z){for(var X=H.length-1;X>=0;X--){var K=H[X];if(K[Z])break}if(X<0){var Q=U.queryComponents({mainType:"dataZoom",subType:"select",id:Z})[0];if(Q){var ee=Q.getPercentRange();H[0][Z]={dataZoomId:Z,start:ee[0],end:ee[1]}}}}),H.push(G)}function pop(U){var G=getStoreSnapshots(U),H=G[G.length-1];G.length>1&&G.pop();var W={};return each$6(H,function(Z,X){for(var K=G.length-1;K>=0;K--)if(Z=G[K][X],Z){W[X]=Z;break}}),W}function clear(U){inner$6(U).snapshots=null}function count(U){return getStoreSnapshots(U).length}function getStoreSnapshots(U){var G=inner$6(U);return G.snapshots||(G.snapshots=[{}]),G.snapshots}var RestoreOption=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.onclick=function(H,W){clear(H),W.dispatchAction({type:"restore",from:this.uid})},G.getDefaultOption=function(H){var W={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:H.getLocaleModel().get(["toolbox","restore","title"])};return W},G})(ToolboxFeature);registerAction$1({type:"restore",event:"restore",update:"prepareAndUpdate"},function(U,G){G.resetOption("recreate")});var INCLUDE_FINDER_MAIN_TYPES=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],BrushTargetManager=(function(){function U(G,H,W){var Z=this;this._targetInfoList=[];var X=parseFinder(H,G);each$f(targetInfoBuilders,function(K,Q){(!W||!W.include||indexOf(W.include,Q)>=0)&&K(X,Z._targetInfoList)})}return U.prototype.setOutputRanges=function(G,H){return this.matchOutputRanges(G,H,function(W,Z,X){if((W.coordRanges||(W.coordRanges=[])).push(Z),!W.coordRange){W.coordRange=Z;var K=coordConvert[W.brushType](0,X,Z);W.__rangeOffset={offset:diffProcessor[W.brushType](K.values,W.range,[1,1]),xyMinMax:K.xyMinMax}}}),G},U.prototype.matchOutputRanges=function(G,H,W){each$f(G,function(Z){var X=this.findTargetInfo(Z,H);X&&X!==!0&&each$f(X.coordSyses,function(K){var Q=coordConvert[Z.brushType](1,K,Z.range,!0);W(Z,Q.values,K,H)})},this)},U.prototype.setInputRanges=function(G,H){each$f(G,function(W){var Z=this.findTargetInfo(W,H);if(process.env.NODE_ENV!=="production"&&(assert(!Z||Z===!0||W.coordRange,"coordRange must be specified when coord index specified."),assert(!Z||Z!==!0||W.range,"range must be specified in global brush.")),W.range=W.range||[],Z&&Z!==!0){W.panelId=Z.panelId;var X=coordConvert[W.brushType](0,Z.coordSys,W.coordRange),K=W.__rangeOffset;W.range=K?diffProcessor[W.brushType](X.values,K.offset,getScales(X.xyMinMax,K.xyMinMax)):X.values}},this)},U.prototype.makePanelOpts=function(G,H){return map$1(this._targetInfoList,function(W){var Z=W.getPanelRect();return{panelId:W.panelId,defaultBrushType:H?H(W):null,clipPath:makeRectPanelClipPath(Z),isTargetByCursor:makeRectIsTargetByCursor(Z,G,W.coordSysModel),getLinearBrushOtherExtent:makeLinearBrushOtherExtent(Z)}})},U.prototype.controlSeries=function(G,H,W){var Z=this.findTargetInfo(G,W);return Z===!0||Z&&indexOf(Z.coordSyses,H.coordinateSystem)>=0},U.prototype.findTargetInfo=function(G,H){for(var W=this._targetInfoList,Z=parseFinder(H,G),X=0;X<W.length;X++){var K=W[X],Q=G.panelId;if(Q){if(K.panelId===Q)return K}else for(var ee=0;ee<targetInfoMatchers.length;ee++)if(targetInfoMatchers[ee](Z,K))return K}return!0},U})();function formatMinMax(U){return U[0]>U[1]&&U.reverse(),U}function parseFinder(U,G){return parseFinder$1(U,G,{includeMainTypes:INCLUDE_FINDER_MAIN_TYPES})}var targetInfoBuilders={grid:function(U,G){var H=U.xAxisModels,W=U.yAxisModels,Z=U.gridModels,X=createHashMap(),K={},Q={};!H&&!W&&!Z||(each$f(H,function(ee){var te=ee.axis.grid.model;X.set(te.id,te),K[te.id]=!0}),each$f(W,function(ee){var te=ee.axis.grid.model;X.set(te.id,te),Q[te.id]=!0}),each$f(Z,function(ee){X.set(ee.id,ee),K[ee.id]=!0,Q[ee.id]=!0}),X.each(function(ee){var te=ee.coordinateSystem,re=[];each$f(te.getCartesians(),function(ae,ne){(indexOf(H,ae.getAxis("x").model)>=0||indexOf(W,ae.getAxis("y").model)>=0)&&re.push(ae)}),G.push({panelId:"grid--"+ee.id,gridModel:ee,coordSysModel:ee,coordSys:re[0],coordSyses:re,getPanelRect:panelRectBuilders.grid,xAxisDeclared:K[ee.id],yAxisDeclared:Q[ee.id]})}))},geo:function(U,G){each$f(U.geoModels,function(H){var W=H.coordinateSystem;G.push({panelId:"geo--"+H.id,geoModel:H,coordSysModel:H,coordSys:W,coordSyses:[W],getPanelRect:panelRectBuilders.geo})})}},targetInfoMatchers=[function(U,G){var H=U.xAxisModel,W=U.yAxisModel,Z=U.gridModel;return!Z&&H&&(Z=H.axis.grid.model),!Z&&W&&(Z=W.axis.grid.model),Z&&Z===G.gridModel},function(U,G){var H=U.geoModel;return H&&H===G.geoModel}],panelRectBuilders={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var U=this.coordSys,G=U.getBoundingRect().clone();return G.applyTransform(getTransform$1(U)),G}},coordConvert={lineX:curry$1(axisConvert,0),lineY:curry$1(axisConvert,1),rect:function(U,G,H,W){var Z=U?G.pointToData([H[0][0],H[1][0]],W):G.dataToPoint([H[0][0],H[1][0]],W),X=U?G.pointToData([H[0][1],H[1][1]],W):G.dataToPoint([H[0][1],H[1][1]],W),K=[formatMinMax([Z[0],X[0]]),formatMinMax([Z[1],X[1]])];return{values:K,xyMinMax:K}},polygon:function(U,G,H,W){var Z=[[1/0,-1/0],[1/0,-1/0]],X=map$1(H,function(K){var Q=U?G.pointToData(K,W):G.dataToPoint(K,W);return Z[0][0]=Math.min(Z[0][0],Q[0]),Z[1][0]=Math.min(Z[1][0],Q[1]),Z[0][1]=Math.max(Z[0][1],Q[0]),Z[1][1]=Math.max(Z[1][1],Q[1]),Q});return{values:X,xyMinMax:Z}}};function axisConvert(U,G,H,W){process.env.NODE_ENV!=="production"&&assert(H.type==="cartesian2d","lineX/lineY brush is available only in cartesian2d.");var Z=H.getAxis(["x","y"][U]),X=formatMinMax(map$1([0,1],function(Q){return G?Z.coordToData(Z.toLocalCoord(W[Q]),!0):Z.toGlobalCoord(Z.dataToCoord(W[Q]))})),K=[];return K[U]=X,K[1-U]=[NaN,NaN],{values:X,xyMinMax:K}}var diffProcessor={lineX:curry$1(axisDiffProcessor,0),lineY:curry$1(axisDiffProcessor,1),rect:function(U,G,H){return[[U[0][0]-H[0]*G[0][0],U[0][1]-H[0]*G[0][1]],[U[1][0]-H[1]*G[1][0],U[1][1]-H[1]*G[1][1]]]},polygon:function(U,G,H){return map$1(U,function(W,Z){return[W[0]-H[0]*G[Z][0],W[1]-H[1]*G[Z][1]]})}};function axisDiffProcessor(U,G,H,W){return[G[0]-W[U]*H[0],G[1]-W[U]*H[1]]}function getScales(U,G){var H=getSize(U),W=getSize(G),Z=[H[0]/W[0],H[1]/W[1]];return isNaN(Z[0])&&(Z[0]=1),isNaN(Z[1])&&(Z[1]=1),Z}function getSize(U){return U?[U[0][1]-U[0][0],U[1][1]-U[1][0]]:[NaN,NaN]}var each$5=each$f,DATA_ZOOM_ID_BASE=makeInternalComponentId("toolbox-dataZoom_"),DataZoomFeature=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.render=function(H,W,Z,X){this._brushController||(this._brushController=new BrushController(Z.getZr()),this._brushController.on("brush",bind$1(this._onBrush,this)).mount()),updateZoomBtnStatus(H,W,this,X,Z),updateBackBtnStatus(H,W)},G.prototype.onclick=function(H,W,Z){handlers[Z].call(this)},G.prototype.remove=function(H,W){this._brushController&&this._brushController.unmount()},G.prototype.dispose=function(H,W){this._brushController&&this._brushController.dispose()},G.prototype._onBrush=function(H){var W=H.areas;if(!H.isEnd||!W.length)return;var Z={},X=this.ecModel;this._brushController.updateCovers([]);var K=new BrushTargetManager(makeAxisFinder(this.model),X,{include:["grid"]});K.matchOutputRanges(W,X,function(te,re,ae){if(ae.type==="cartesian2d"){var ne=te.brushType;ne==="rect"?(Q("x",ae,re[0]),Q("y",ae,re[1])):Q({lineX:"x",lineY:"y"}[ne],ae,re)}}),push(X,Z),this._dispatchZoomAction(Z);function Q(te,re,ae){var ne=re.getAxis(te),ie=ne.model,oe=ee(te,ie,X),se=oe.findRepresentativeAxisProxy(ie).getMinMaxSpan();(se.minValueSpan!=null||se.maxValueSpan!=null)&&(ae=sliderMove(0,ae.slice(),ne.scale.getExtent(),0,se.minValueSpan,se.maxValueSpan)),oe&&(Z[oe.id]={dataZoomId:oe.id,startValue:ae[0],endValue:ae[1]})}function ee(te,re,ae){var ne;return ae.eachComponent({mainType:"dataZoom",subType:"select"},function(ie){var oe=ie.getAxisModel(te,re.componentIndex);oe&&(ne=ie)}),ne}},G.prototype._dispatchZoomAction=function(H){var W=[];each$5(H,function(Z,X){W.push(clone$4(Z))}),W.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:W})},G.getDefaultOption=function(H){var W={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:H.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:tokens.color.backgroundTint}};return W},G})(ToolboxFeature),handlers={zoom:function(){var U=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:U})},back:function(){this._dispatchZoomAction(pop(this.ecModel))}};function makeAxisFinder(U){var G={xAxisIndex:U.get("xAxisIndex",!0),yAxisIndex:U.get("yAxisIndex",!0),xAxisId:U.get("xAxisId",!0),yAxisId:U.get("yAxisId",!0)};return G.xAxisIndex==null&&G.xAxisId==null&&(G.xAxisIndex="all"),G.yAxisIndex==null&&G.yAxisId==null&&(G.yAxisIndex="all"),G}function updateBackBtnStatus(U,G){U.setIconStatus("back",count(G)>1?"emphasis":"normal")}function updateZoomBtnStatus(U,G,H,W,Z){var X=H._isZoomActive;W&&W.type==="takeGlobalCursor"&&(X=W.key==="dataZoomSelect"?W.dataZoomSelectActive:!1),H._isZoomActive=X,U.setIconStatus("zoom",X?"emphasis":"normal");var K=new BrushTargetManager(makeAxisFinder(U),G,{include:["grid"]}),Q=K.makePanelOpts(Z,function(ee){return ee.xAxisDeclared&&!ee.yAxisDeclared?"lineX":!ee.xAxisDeclared&&ee.yAxisDeclared?"lineY":"rect"});H._brushController.setPanels(Q).enableBrush(X&&Q.length?{brushType:"auto",brushStyle:U.getModel("brushStyle").getItemStyle()}:!1)}registerInternalOptionCreator("dataZoom",function(U){var G=U.getComponent("toolbox",0),H=["feature","dataZoom"];if(!G||G.get(H)==null)return;var W=G.getModel(H),Z=[],X=makeAxisFinder(W),K=parseFinder$1(U,X);each$5(K.xAxisModels,function(ee){return Q(ee,"xAxis","xAxisIndex")}),each$5(K.yAxisModels,function(ee){return Q(ee,"yAxis","yAxisIndex")});function Q(ee,te,re){var ae=ee.componentIndex,ne={type:"select",$fromToolbox:!0,filterMode:W.get("filterMode",!0)||"filter",id:DATA_ZOOM_ID_BASE+te+ae};ne[re]=ae,Z.push(ne)}return Z});function install$l(U){U.registerComponentModel(ToolboxModel),U.registerComponentView(ToolboxView),registerFeature("saveAsImage",SaveAsImage),registerFeature("magicType",MagicType),registerFeature("dataView",DataView),registerFeature("dataZoom",DataZoomFeature),registerFeature("restore",RestoreOption),use(install$m)}var TooltipModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="tooltip",G.dependencies=["axisPointer"],G.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:tokens.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:tokens.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:tokens.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:tokens.color.tertiary,fontSize:14}},G})(ComponentModel);function shouldTooltipConfine(U){var G=U.get("confine");return G!=null?!!G:U.get("renderMode")==="richText"}function testStyle(U){if(env.domSupported){for(var G=document.documentElement.style,H=0,W=U.length;H<W;H++)if(U[H]in G)return U[H]}}var TRANSFORM_VENDOR=testStyle(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),TRANSITION_VENDOR=testStyle(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function toCSSVendorPrefix(U,G){if(!U)return G;G=toCamelCase(G,!0);var H=U.indexOf(G);return U=H===-1?G:"-"+U.slice(0,H)+"-"+G,U.toLowerCase()}function getComputedStyle$1(U,G){var H=U.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(U);return H?H[G]:null}var CSS_TRANSITION_VENDOR=toCSSVendorPrefix(TRANSITION_VENDOR,"transition"),CSS_TRANSFORM_VENDOR=toCSSVendorPrefix(TRANSFORM_VENDOR,"transform"),gCssText="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(env.transform3dSupported?"will-change:transform;":"");function mirrorPos(U){return U=U==="left"?"right":U==="right"?"left":U==="top"?"bottom":"top",U}function assembleArrow(U,G,H){if(!isString(H)||H==="inside")return"";var W=U.get("backgroundColor"),Z=U.get("borderWidth");G=convertToColorString(G);var X=mirrorPos(H),K=Math.max(Math.round(Z)*1.5,6),Q="",ee=CSS_TRANSFORM_VENDOR+":",te;indexOf(["left","right"],X)>-1?(Q+="top:50%",ee+="translateY(-50%) rotate("+(te=X==="left"?-225:-45)+"deg)"):(Q+="left:50%",ee+="translateX(-50%) rotate("+(te=X==="top"?225:45)+"deg)");var re=te*Math.PI/180,ae=K+Z,ne=ae*Math.abs(Math.cos(re))+ae*Math.abs(Math.sin(re)),ie=Math.round(((ne-Math.SQRT2*Z)/2+Math.SQRT2*Z-(ne-ae)/2)*100)/100;Q+=";"+X+":-"+ie+"px";var oe=G+" solid "+Z+"px;",se=["position:absolute;width:"+K+"px;height:"+K+"px;z-index:-1;",Q+";"+ee+";","border-bottom:"+oe,"border-right:"+oe,"background-color:"+W+";"];return'<div style="'+se.join("")+'"></div>'}function assembleTransition(U,G,H){var W="cubic-bezier(0.23,1,0.32,1)",Z="",X="";return H&&(Z=" "+U/2+"s "+W,X="opacity"+Z+",visibility"+Z),G||(Z=" "+U+"s "+W,X+=(X.length?",":"")+(env.transformSupported?""+CSS_TRANSFORM_VENDOR+Z:",left"+Z+",top"+Z)),CSS_TRANSITION_VENDOR+":"+X}function assembleTransform(U,G,H){var W=U.toFixed(0)+"px",Z=G.toFixed(0)+"px";if(!env.transformSupported)return H?"top:"+Z+";left:"+W+";":[["top",Z],["left",W]];var X=env.transform3dSupported,K="translate"+(X?"3d":"")+"("+W+","+Z+(X?",0":"")+")";return H?"top:0;left:0;"+CSS_TRANSFORM_VENDOR+":"+K+";":[["top",0],["left",0],[TRANSFORM_VENDOR,K]]}function assembleFont(U){var G=[],H=U.get("fontSize"),W=U.getTextColor();W&&G.push("color:"+W),G.push("font:"+U.getFont());var Z=retrieve2(U.get("lineHeight"),Math.round(H*3/2));H&&G.push("line-height:"+Z+"px");var X=U.get("textShadowColor"),K=U.get("textShadowBlur")||0,Q=U.get("textShadowOffsetX")||0,ee=U.get("textShadowOffsetY")||0;return X&&K&&G.push("text-shadow:"+Q+"px "+ee+"px "+K+"px "+X),each$f(["decoration","align"],function(te){var re=U.get(te);re&&G.push("text-"+te+":"+re)}),G.join(";")}function assembleCssText(U,G,H,W){var Z=[],X=U.get("transitionDuration"),K=U.get("backgroundColor"),Q=U.get("shadowBlur"),ee=U.get("shadowColor"),te=U.get("shadowOffsetX"),re=U.get("shadowOffsetY"),ae=U.getModel("textStyle"),ne=getPaddingFromTooltipModel(U,"html"),ie=te+"px "+re+"px "+Q+"px "+ee;return Z.push("box-shadow:"+ie),G&&X>0&&Z.push(assembleTransition(X,H,W)),K&&Z.push("background-color:"+K),each$f(["width","color","radius"],function(oe){var se="border-"+oe,le=toCamelCase(se),ue=U.get(le);ue!=null&&Z.push(se+":"+ue+(oe==="color"?"":"px"))}),Z.push(assembleFont(ae)),ne!=null&&Z.push("padding:"+normalizeCssArray(ne).join("px ")+"px"),Z.join(";")+";"}function makeStyleCoord$1(U,G,H,W,Z){var X=G&&G.painter;if(H){var K=X&&X.getViewportRoot();K&&transformLocalCoord(U,K,H,W,Z)}else{U[0]=W,U[1]=Z;var Q=X&&X.getViewportRootOffset();Q&&(U[0]+=Q.offsetLeft,U[1]+=Q.offsetTop)}U[2]=U[0]/G.getWidth(),U[3]=U[1]/G.getHeight()}var TooltipHTMLContent=(function(){function U(G,H){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,env.wxa)return null;var W=document.createElement("div");W.domBelongToZr=!0,this.el=W;var Z=this._zr=G.getZr(),X=H.appendTo,K=X&&(isString(X)?document.querySelector(X):isDom(X)?X:isFunction(X)&&X(G.getDom()));makeStyleCoord$1(this._styleCoord,Z,K,G.getWidth()/2,G.getHeight()/2),(K||G.getDom()).appendChild(W),this._api=G,this._container=K;var Q=this;W.onmouseenter=function(){Q._enterable&&(clearTimeout(Q._hideTimeout),Q._show=!0),Q._inContent=!0},W.onmousemove=function(ee){if(ee=ee||window.event,!Q._enterable){var te=Z.handler,re=Z.painter.getViewportRoot();normalizeEvent(re,ee,!0),te.dispatch("mousemove",ee)}},W.onmouseleave=function(){Q._inContent=!1,Q._enterable&&Q._show&&Q.hideLater(Q._hideDelay)}}return U.prototype.update=function(G){if(!this._container){var H=this._api.getDom(),W=getComputedStyle$1(H,"position"),Z=H.style;Z.position!=="absolute"&&W!=="absolute"&&(Z.position="relative")}var X=G.get("alwaysShowContent");X&&this._moveIfResized(),this._alwaysShowContent=X,this._enableDisplayTransition=G.get("displayTransition")&&G.get("transitionDuration")>0,this.el.className=G.get("className")||""},U.prototype.show=function(G,H){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var W=this.el,Z=W.style,X=this._styleCoord;W.innerHTML?Z.cssText=gCssText+assembleCssText(G,!this._firstShow,this._longHide,this._enableDisplayTransition)+assembleTransform(X[0],X[1],!0)+("border-color:"+convertToColorString(H)+";")+(G.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):Z.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},U.prototype.setContent=function(G,H,W,Z,X){var K=this.el;if(G==null){K.innerHTML="";return}var Q="";if(isString(X)&&W.get("trigger")==="item"&&!shouldTooltipConfine(W)&&(Q=assembleArrow(W,Z,X)),isString(G))K.innerHTML=G+Q;else if(G){K.innerHTML="",isArray$1(G)||(G=[G]);for(var ee=0;ee<G.length;ee++)isDom(G[ee])&&G[ee].parentNode!==K&&K.appendChild(G[ee]);if(Q&&K.childNodes.length){var te=document.createElement("div");te.innerHTML=Q,K.appendChild(te)}}},U.prototype.setEnterable=function(G){this._enterable=G},U.prototype.getSize=function(){var G=this.el;return G?[G.offsetWidth,G.offsetHeight]:[0,0]},U.prototype.moveTo=function(G,H){if(this.el){var W=this._styleCoord;if(makeStyleCoord$1(W,this._zr,this._container,G,H),W[0]!=null&&W[1]!=null){var Z=this.el.style,X=assembleTransform(W[0],W[1]);each$f(X,function(K){Z[K[0]]=K[1]})}}},U.prototype._moveIfResized=function(){var G=this._styleCoord[2],H=this._styleCoord[3];this.moveTo(G*this._zr.getWidth(),H*this._zr.getHeight())},U.prototype.hide=function(){var G=this,H=this.el.style;this._enableDisplayTransition?(H.visibility="hidden",H.opacity="0"):H.display="none",env.transform3dSupported&&(H.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return G._longHide=!0},500)},U.prototype.hideLater=function(G){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(G?(this._hideDelay=G,this._show=!1,this._hideTimeout=setTimeout(bind$1(this.hide,this),G)):this.hide())},U.prototype.isShow=function(){return this._show},U.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var G=this._zr;transformLocalCoordClear(G&&G.painter&&G.painter.getViewportRoot(),this._container);var H=this.el;if(H){H.onmouseenter=H.onmousemove=H.onmouseleave=null;var W=H.parentNode;W&&W.removeChild(H)}this.el=this._container=null},U})(),TooltipRichContent=(function(){function U(G){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=G.getZr(),makeStyleCoord(this._styleCoord,this._zr,G.getWidth()/2,G.getHeight()/2)}return U.prototype.update=function(G){var H=G.get("alwaysShowContent");H&&this._moveIfResized(),this._alwaysShowContent=H},U.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},U.prototype.setContent=function(G,H,W,Z,X){var K=this;isObject$3(G)&&throwError(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var Q=W.getModel("textStyle");this.el=new ZRText({style:{rich:H.richTextStyles,text:G,lineHeight:22,borderWidth:1,borderColor:Z,textShadowColor:Q.get("textShadowColor"),fill:W.get(["textStyle","color"]),padding:getPaddingFromTooltipModel(W,"richText"),verticalAlign:"top",align:"left"},z:W.get("z")}),each$f(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(te){K.el.style[te]=W.get(te)}),each$f(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(te){K.el.style[te]=Q.get(te)||0}),this._zr.add(this.el);var ee=this;this.el.on("mouseover",function(){ee._enterable&&(clearTimeout(ee._hideTimeout),ee._show=!0),ee._inContent=!0}),this.el.on("mouseout",function(){ee._enterable&&ee._show&&ee.hideLater(ee._hideDelay),ee._inContent=!1})},U.prototype.setEnterable=function(G){this._enterable=G},U.prototype.getSize=function(){var G=this.el,H=this.el.getBoundingRect(),W=calcShadowOuterSize(G.style);return[H.width+W.left+W.right,H.height+W.top+W.bottom]},U.prototype.moveTo=function(G,H){var W=this.el;if(W){var Z=this._styleCoord;makeStyleCoord(Z,this._zr,G,H),G=Z[0],H=Z[1];var X=W.style,K=mathMaxWith0(X.borderWidth||0),Q=calcShadowOuterSize(X);W.x=G+K+Q.left,W.y=H+K+Q.top,W.markRedraw()}},U.prototype._moveIfResized=function(){var G=this._styleCoord[2],H=this._styleCoord[3];this.moveTo(G*this._zr.getWidth(),H*this._zr.getHeight())},U.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},U.prototype.hideLater=function(G){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(G?(this._hideDelay=G,this._show=!1,this._hideTimeout=setTimeout(bind$1(this.hide,this),G)):this.hide())},U.prototype.isShow=function(){return this._show},U.prototype.dispose=function(){this._zr.remove(this.el)},U})();function mathMaxWith0(U){return Math.max(0,U)}function calcShadowOuterSize(U){var G=mathMaxWith0(U.shadowBlur||0),H=mathMaxWith0(U.shadowOffsetX||0),W=mathMaxWith0(U.shadowOffsetY||0);return{left:mathMaxWith0(G-H),right:mathMaxWith0(G+H),top:mathMaxWith0(G-W),bottom:mathMaxWith0(G+W)}}function makeStyleCoord(U,G,H,W){U[0]=H,U[1]=W,U[2]=U[0]/G.getWidth(),U[3]=U[1]/G.getHeight()}var proxyRect=new Rect$2({shape:{x:-1,y:-1,width:2,height:2}}),TooltipView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H,W){if(!(env.node||!W.getDom())){var Z=H.getComponent("tooltip"),X=this._renderMode=getTooltipRenderMode(Z.get("renderMode"));this._tooltipContent=X==="richText"?new TooltipRichContent(W):new TooltipHTMLContent(W,{appendTo:Z.get("appendToBody",!0)?"body":Z.get("appendTo",!0)})}},G.prototype.render=function(H,W,Z){if(!(env.node||!Z.getDom())){this.group.removeAll(),this._tooltipModel=H,this._ecModel=W,this._api=Z;var X=this._tooltipContent;X.update(H),X.setEnterable(H.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&H.get("transitionDuration")?createOrUpdate(this,"_updatePosition",50,"fixRate"):clear$1(this,"_updatePosition")}},G.prototype._initGlobalListener=function(){var H=this._tooltipModel,W=H.get("triggerOn");register$1("itemTooltip",this._api,bind$1(function(Z,X,K){W!=="none"&&(W.indexOf(Z)>=0?this._tryShow(X,K):Z==="leave"&&this._hide(K))},this))},G.prototype._keepShow=function(){var H=this._tooltipModel,W=this._ecModel,Z=this._api,X=H.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&X!=="none"&&X!=="click"){var K=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!Z.isDisposed()&&K.manuallyShowTip(H,W,Z,{x:K._lastX,y:K._lastY,dataByCoordSys:K._lastDataByCoordSys})})}},G.prototype.manuallyShowTip=function(H,W,Z,X){if(!(X.from===this.uid||env.node||!Z.getDom())){var K=makeDispatchAction(X,Z);this._ticket="";var Q=X.dataByCoordSys,ee=findComponentReference(X,W,Z);if(ee){var te=ee.el.getBoundingRect().clone();te.applyTransform(ee.el.transform),this._tryShow({offsetX:te.x+te.width/2,offsetY:te.y+te.height/2,target:ee.el,position:X.position,positionDefault:"bottom"},K)}else if(X.tooltip&&X.x!=null&&X.y!=null){var re=proxyRect;re.x=X.x,re.y=X.y,re.update(),getECData(re).tooltipConfig={name:null,option:X.tooltip},this._tryShow({offsetX:X.x,offsetY:X.y,target:re},K)}else if(Q)this._tryShow({offsetX:X.x,offsetY:X.y,position:X.position,dataByCoordSys:Q,tooltipOption:X.tooltipOption},K);else if(X.seriesIndex!=null){if(this._manuallyAxisShowTip(H,W,Z,X))return;var ae=findPointFromSeries(X,W),ne=ae.point[0],ie=ae.point[1];ne!=null&&ie!=null&&this._tryShow({offsetX:ne,offsetY:ie,target:ae.el,position:X.position,positionDefault:"bottom"},K)}else X.x!=null&&X.y!=null&&(Z.dispatchAction({type:"updateAxisPointer",x:X.x,y:X.y}),this._tryShow({offsetX:X.x,offsetY:X.y,position:X.position,target:Z.getZr().findHover(X.x,X.y).target},K))}},G.prototype.manuallyHideTip=function(H,W,Z,X){var K=this._tooltipContent;this._tooltipModel&&K.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,X.from!==this.uid&&this._hide(makeDispatchAction(X,Z))},G.prototype._manuallyAxisShowTip=function(H,W,Z,X){var K=X.seriesIndex,Q=X.dataIndex,ee=W.getComponent("axisPointer").coordSysAxesInfo;if(!(K==null||Q==null||ee==null)){var te=W.getSeriesByIndex(K);if(te){var re=te.getData(),ae=buildTooltipModel([re.getItemModel(Q),te,(te.coordinateSystem||{}).model],this._tooltipModel);if(ae.get("trigger")==="axis")return Z.dispatchAction({type:"updateAxisPointer",seriesIndex:K,dataIndex:Q,position:X.position}),!0}}},G.prototype._tryShow=function(H,W){var Z=H.target,X=this._tooltipModel;if(X){this._lastX=H.offsetX,this._lastY=H.offsetY;var K=H.dataByCoordSys;if(K&&K.length)this._showAxisTooltip(K,H);else if(Z){var Q=getECData(Z);if(Q.ssrType==="legend")return;this._lastDataByCoordSys=null;var ee,te;findEventDispatcher(Z,function(re){if(re.tooltipDisabled)return ee=te=null,!0;ee||te||(getECData(re).dataIndex!=null?ee=re:getECData(re).tooltipConfig!=null&&(te=re))},!0),ee?this._showSeriesItemTooltip(H,ee,W):te?this._showComponentItemTooltip(H,te,W):this._hide(W)}else this._lastDataByCoordSys=null,this._hide(W)}},G.prototype._showOrMove=function(H,W){var Z=H.get("showDelay");W=bind$1(W,this),clearTimeout(this._showTimout),Z>0?this._showTimout=setTimeout(W,Z):W()},G.prototype._showAxisTooltip=function(H,W){var Z=this._ecModel,X=this._tooltipModel,K=[W.offsetX,W.offsetY],Q=buildTooltipModel([W.tooltipOption],X),ee=this._renderMode,te=[],re=createTooltipMarkup("section",{blocks:[],noHeader:!0}),ae=[],ne=new TooltipMarkupStyleCreator;each$f(H,function(ce){each$f(ce.dataByAxis,function(fe){var he=Z.getComponent(fe.axisDim+"Axis",fe.axisIndex),ve=fe.value;if(!(!he||ve==null)){var de=getValueLabel(ve,he.axis,Z,fe.seriesDataIndices,fe.valueLabelOpt),pe=createTooltipMarkup("section",{header:de,noHeader:!trim$1(de),sortBlocks:!0,blocks:[]});re.blocks.push(pe),each$f(fe.seriesDataIndices,function(ge){var me=Z.getSeriesByIndex(ge.seriesIndex),ye=ge.dataIndexInside,_e=me.getDataParams(ye);if(!(_e.dataIndex<0)){_e.axisDim=fe.axisDim,_e.axisIndex=fe.axisIndex,_e.axisType=fe.axisType,_e.axisId=fe.axisId,_e.axisValue=getAxisRawValue(he.axis,{value:ve}),_e.axisValueLabel=de,_e.marker=ne.makeTooltipMarker("item",convertToColorString(_e.color),ee);var xe=normalizeTooltipFormatResult(me.formatTooltip(ye,!0,null)),Se=xe.frag;if(Se){var Te=buildTooltipModel([me],X).get("valueFormatter");pe.blocks.push(Te?extend({valueFormatter:Te},Se):Se)}xe.text&&ae.push(xe.text),te.push(_e)}})}})}),re.blocks.reverse(),ae.reverse();var ie=W.position,oe=Q.get("order"),se=buildTooltipMarkup(re,ne,ee,oe,Z.get("useUTC"),Q.get("textStyle"));se&&ae.unshift(se);var le=ee==="richText"?`
|
|
50
|
+
|
|
51
|
+
`:"<br/>",ue=ae.join(le);this._showOrMove(Q,function(){this._updateContentNotChangedOnAxis(H,te)?this._updatePosition(Q,ie,K[0],K[1],this._tooltipContent,te):this._showTooltipContent(Q,ue,te,Math.random()+"",K[0],K[1],ie,null,ne)})},G.prototype._showSeriesItemTooltip=function(H,W,Z){var X=this._ecModel,K=getECData(W),Q=K.seriesIndex,ee=X.getSeriesByIndex(Q),te=K.dataModel||ee,re=K.dataIndex,ae=K.dataType,ne=te.getData(ae),ie=this._renderMode,oe=H.positionDefault,se=buildTooltipModel([ne.getItemModel(re),te,ee&&(ee.coordinateSystem||{}).model],this._tooltipModel,oe?{position:oe}:null),le=se.get("trigger");if(!(le!=null&&le!=="item")){var ue=te.getDataParams(re,ae),ce=new TooltipMarkupStyleCreator;ue.marker=ce.makeTooltipMarker("item",convertToColorString(ue.color),ie);var fe=normalizeTooltipFormatResult(te.formatTooltip(re,!1,ae)),he=se.get("order"),ve=se.get("valueFormatter"),de=fe.frag,pe=de?buildTooltipMarkup(ve?extend({valueFormatter:ve},de):de,ce,ie,he,X.get("useUTC"),se.get("textStyle")):fe.text,ge="item_"+te.name+"_"+re;this._showOrMove(se,function(){this._showTooltipContent(se,pe,ue,ge,H.offsetX,H.offsetY,H.position,H.target,ce)}),Z({type:"showTip",dataIndexInside:re,dataIndex:ne.getRawIndex(re),seriesIndex:Q,from:this.uid})}},G.prototype._showComponentItemTooltip=function(H,W,Z){var X=this._renderMode==="html",K=getECData(W),Q=K.tooltipConfig,ee=Q.option||{},te=ee.encodeHTMLContent;if(isString(ee)){var re=ee;ee={content:re,formatter:re},te=!0}te&&X&&ee.content&&(ee=clone$4(ee),ee.content=encodeHTML(ee.content));var ae=[ee],ne=this._ecModel.getComponent(K.componentMainType,K.componentIndex);ne&&ae.push(ne),ae.push({formatter:ee.content});var ie=H.positionDefault,oe=buildTooltipModel(ae,this._tooltipModel,ie?{position:ie}:null),se=oe.get("content"),le=Math.random()+"",ue=new TooltipMarkupStyleCreator;this._showOrMove(oe,function(){var ce=clone$4(oe.get("formatterParams")||{});this._showTooltipContent(oe,se,ce,le,H.offsetX,H.offsetY,H.position,W,ue)}),Z({type:"showTip",from:this.uid})},G.prototype._showTooltipContent=function(H,W,Z,X,K,Q,ee,te,re){if(this._ticket="",!(!H.get("showContent")||!H.get("show"))){var ae=this._tooltipContent;ae.setEnterable(H.get("enterable"));var ne=H.get("formatter");ee=ee||H.get("position");var ie=W,oe=this._getNearestPoint([K,Q],Z,H.get("trigger"),H.get("borderColor"),H.get("defaultBorderColor",!0)),se=oe.color;if(ne)if(isString(ne)){var le=H.ecModel.get("useUTC"),ue=isArray$1(Z)?Z[0]:Z,ce=ue&&ue.axisType&&ue.axisType.indexOf("time")>=0;ie=ne,ce&&(ie=format(ue.axisValue,ie,le)),ie=formatTpl(ie,Z,!0)}else if(isFunction(ne)){var fe=bind$1(function(he,ve){he===this._ticket&&(ae.setContent(ve,re,H,se,ee),this._updatePosition(H,ee,K,Q,ae,Z,te))},this);this._ticket=X,ie=ne(Z,X,fe)}else ie=ne;ae.setContent(ie,re,H,se,ee),ae.show(H,se),this._updatePosition(H,ee,K,Q,ae,Z,te)}},G.prototype._getNearestPoint=function(H,W,Z,X,K){if(Z==="axis"||isArray$1(W))return{color:X||K};if(!isArray$1(W))return{color:X||W.color||W.borderColor}},G.prototype._updatePosition=function(H,W,Z,X,K,Q,ee){var te=this._api.getWidth(),re=this._api.getHeight();W=W||H.get("position");var ae=K.getSize(),ne=H.get("align"),ie=H.get("verticalAlign"),oe=ee&&ee.getBoundingRect().clone();if(ee&&oe.applyTransform(ee.transform),isFunction(W)&&(W=W([Z,X],Q,K.el,oe,{viewSize:[te,re],contentSize:ae.slice()})),isArray$1(W))Z=parsePercent(W[0],te),X=parsePercent(W[1],re);else if(isObject$3(W)){var se=W;se.width=ae[0],se.height=ae[1];var le=getLayoutRect(se,{width:te,height:re});Z=le.x,X=le.y,ne=null,ie=null}else if(isString(W)&&ee){var ue=calcTooltipPosition(W,oe,ae,H.get("borderWidth"));Z=ue[0],X=ue[1]}else{var ue=refixTooltipPosition(Z,X,K,te,re,ne?null:20,ie?null:20);Z=ue[0],X=ue[1]}if(ne&&(Z-=isCenterAlign(ne)?ae[0]/2:ne==="right"?ae[0]:0),ie&&(X-=isCenterAlign(ie)?ae[1]/2:ie==="bottom"?ae[1]:0),shouldTooltipConfine(H)){var ue=confineTooltipPosition(Z,X,K,te,re);Z=ue[0],X=ue[1]}K.moveTo(Z,X)},G.prototype._updateContentNotChangedOnAxis=function(H,W){var Z=this._lastDataByCoordSys,X=this._cbParamsList,K=!!Z&&Z.length===H.length;return K&&each$f(Z,function(Q,ee){var te=Q.dataByAxis||[],re=H[ee]||{},ae=re.dataByAxis||[];K=K&&te.length===ae.length,K&&each$f(te,function(ne,ie){var oe=ae[ie]||{},se=ne.seriesDataIndices||[],le=oe.seriesDataIndices||[];K=K&&ne.value===oe.value&&ne.axisType===oe.axisType&&ne.axisId===oe.axisId&&se.length===le.length,K&&each$f(se,function(ue,ce){var fe=le[ce];K=K&&ue.seriesIndex===fe.seriesIndex&&ue.dataIndex===fe.dataIndex}),X&&each$f(ne.seriesDataIndices,function(ue){var ce=ue.seriesIndex,fe=W[ce],he=X[ce];fe&&he&&he.data!==fe.data&&(K=!1)})})}),this._lastDataByCoordSys=H,this._cbParamsList=W,!!K},G.prototype._hide=function(H){this._lastDataByCoordSys=null,H({type:"hideTip",from:this.uid})},G.prototype.dispose=function(H,W){env.node||!W.getDom()||(clear$1(this,"_updatePosition"),this._tooltipContent.dispose(),unregister("itemTooltip",W))},G.type="tooltip",G})(ComponentView);function buildTooltipModel(U,G,H){var W=G.ecModel,Z;H?(Z=new Model(H,W,W),Z=new Model(G.option,Z,W)):Z=G;for(var X=U.length-1;X>=0;X--){var K=U[X];K&&(K instanceof Model&&(K=K.get("tooltip",!0)),isString(K)&&(K={formatter:K}),K&&(Z=new Model(K,Z,W)))}return Z}function makeDispatchAction(U,G){return U.dispatchAction||bind$1(G.dispatchAction,G)}function refixTooltipPosition(U,G,H,W,Z,X,K){var Q=H.getSize(),ee=Q[0],te=Q[1];return X!=null&&(U+ee+X+2>W?U-=ee+X:U+=X),K!=null&&(G+te+K>Z?G-=te+K:G+=K),[U,G]}function confineTooltipPosition(U,G,H,W,Z){var X=H.getSize(),K=X[0],Q=X[1];return U=Math.min(U+K,W)-K,G=Math.min(G+Q,Z)-Q,U=Math.max(U,0),G=Math.max(G,0),[U,G]}function calcTooltipPosition(U,G,H,W){var Z=H[0],X=H[1],K=Math.ceil(Math.SQRT2*W)+8,Q=0,ee=0,te=G.width,re=G.height;switch(U){case"inside":Q=G.x+te/2-Z/2,ee=G.y+re/2-X/2;break;case"top":Q=G.x+te/2-Z/2,ee=G.y-X-K;break;case"bottom":Q=G.x+te/2-Z/2,ee=G.y+re+K;break;case"left":Q=G.x-Z-K,ee=G.y+re/2-X/2;break;case"right":Q=G.x+te+K,ee=G.y+re/2-X/2}return[Q,ee]}function isCenterAlign(U){return U==="center"||U==="middle"}function findComponentReference(U,G,H){var W=preParseFinder(U).queryOptionMap,Z=W.keys()[0];if(!(!Z||Z==="series")){var X=queryReferringComponents(G,Z,W.get(Z),{useDefault:!1,enableAll:!1,enableNone:!1}),K=X.models[0];if(K){var Q=H.getViewOfComponentModel(K),ee;if(Q.group.traverse(function(te){var re=getECData(te).tooltipConfig;if(re&&re.name===U.name)return ee=te,!0}),ee)return{componentMainType:Z,componentIndex:K.componentIndex,el:ee}}}}function install$k(U){use(install$t),U.registerComponentModel(TooltipModel),U.registerComponentView(TooltipView),U.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},noop),U.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},noop)}var DEFAULT_TOOLBOX_BTNS=["rect","polygon","keep","clear"];function brushPreprocessor(U,G){var H=normalizeToArray(U?U.brush:[]);if(H.length){var W=[];each$f(H,function(ee){var te=ee.hasOwnProperty("toolbox")?ee.toolbox:[];te instanceof Array&&(W=W.concat(te))});var Z=U&&U.toolbox;isArray$1(Z)&&(Z=Z[0]),Z||(Z={feature:{}},U.toolbox=[Z]);var X=Z.feature||(Z.feature={}),K=X.brush||(X.brush={}),Q=K.type||(K.type=[]);Q.push.apply(Q,W),removeDuplicate(Q),G&&!Q.length&&Q.push.apply(Q,DEFAULT_TOOLBOX_BTNS)}}function removeDuplicate(U){var G={};each$f(U,function(H){G[H]=1}),U.length=0,each$f(G,function(H,W){U.push(W)})}var each$4=each$f;function hasKeys(U){if(U){for(var G in U)if(U.hasOwnProperty(G))return!0}}function createVisualMappings(U,G,H){var W={};return each$4(G,function(X){var K=W[X]=Z();each$4(U[X],function(Q,ee){if(VisualMapping.isValidType(ee)){var te={type:ee,visual:Q};H&&H(te,X),K[ee]=new VisualMapping(te),ee==="opacity"&&(te=clone$4(te),te.type="colorAlpha",K.__hidden.__alphaForOpacity=new VisualMapping(te))}})}),W;function Z(){var X=function(){};X.prototype.__hidden=X.prototype;var K=new X;return K}}function replaceVisualOption(U,G,H){var W;each$f(H,function(Z){G.hasOwnProperty(Z)&&hasKeys(G[Z])&&(W=!0)}),W&&each$f(H,function(Z){G.hasOwnProperty(Z)&&hasKeys(G[Z])?U[Z]=clone$4(G[Z]):delete U[Z]})}function applyVisual(U,G,H,W,Z,X){var K={};each$f(U,function(ae){var ne=VisualMapping.prepareVisualTypes(G[ae]);K[ae]=ne});var Q;function ee(ae){return getItemVisualFromData(H,Q,ae)}function te(ae,ne){setItemVisualFromData(H,Q,ae,ne)}H.each(re);function re(ae,ne){Q=ae;var ie=H.getRawDataItem(Q);if(!(ie&&ie.visualMap===!1))for(var oe=W.call(Z,ae),se=G[oe],le=K[oe],ue=0,ce=le.length;ue<ce;ue++){var fe=le[ue];se[fe]&&se[fe].applyVisual(ae,ee,te)}}}function incrementalApplyVisual(U,G,H,W){var Z={};return each$f(U,function(X){var K=VisualMapping.prepareVisualTypes(G[X]);Z[X]=K}),{progress:function(K,Q){var ee;W!=null&&(ee=Q.getDimensionIndex(W));function te(ve){return getItemVisualFromData(Q,ae,ve)}function re(ve,de){setItemVisualFromData(Q,ae,ve,de)}for(var ae,ne=Q.getStore();(ae=K.next())!=null;){var ie=Q.getRawDataItem(ae);if(!(ie&&ie.visualMap===!1))for(var oe=W!=null?ne.get(ee,ae):ae,se=H(oe),le=G[se],ue=Z[se],ce=0,fe=ue.length;ce<fe;ce++){var he=ue[ce];le[he]&&le[he].applyVisual(oe,te,re)}}}}}function makeBrushCommonSelectorForSeries(U){var G=U.brushType,H={point:function(W){return selector[G].point(W,H,U)},rect:function(W){return selector[G].rect(W,H,U)}};return H}var selector={lineX:getLineSelectors(0),lineY:getLineSelectors(1),rect:{point:function(U,G,H){return U&&H.boundingRect.contain(U[0],U[1])},rect:function(U,G,H){return U&&H.boundingRect.intersect(U)}},polygon:{point:function(U,G,H){return U&&H.boundingRect.contain(U[0],U[1])&&contain(H.range,U[0],U[1])},rect:function(U,G,H){var W=H.range;if(!U||W.length<=1)return!1;var Z=U.x,X=U.y,K=U.width,Q=U.height,ee=W[0];if(contain(W,Z,X)||contain(W,Z+K,X)||contain(W,Z,X+Q)||contain(W,Z+K,X+Q)||BoundingRect.create(U).contain(ee[0],ee[1])||linePolygonIntersect(Z,X,Z+K,X,W)||linePolygonIntersect(Z,X,Z,X+Q,W)||linePolygonIntersect(Z+K,X,Z+K,X+Q,W)||linePolygonIntersect(Z,X+Q,Z+K,X+Q,W))return!0}}};function getLineSelectors(U){var G=["x","y"],H=["width","height"];return{point:function(W,Z,X){if(W){var K=X.range,Q=W[U];return inLineRange(Q,K)}},rect:function(W,Z,X){if(W){var K=X.range,Q=[W[G[U]],W[G[U]]+W[H[U]]];return Q[1]<Q[0]&&Q.reverse(),inLineRange(Q[0],K)||inLineRange(Q[1],K)||inLineRange(K[0],Q)||inLineRange(K[1],Q)}}}}function inLineRange(U,G){return G[0]<=U&&U<=G[1]}var STATE_LIST=["inBrush","outOfBrush"],DISPATCH_METHOD="__ecBrushSelect",DISPATCH_FLAG="__ecInBrushSelectEvent";function layoutCovers(U){U.eachComponent({mainType:"brush"},function(G){var H=G.brushTargetManager=new BrushTargetManager(G.option,U);H.setInputRanges(G.areas,U)})}function brushVisual(U,G,H){var W=[],Z,X;U.eachComponent({mainType:"brush"},function(K){H&&H.type==="takeGlobalCursor"&&K.setBrushOption(H.key==="brush"?H.brushOption:{brushType:!1})}),layoutCovers(U),U.eachComponent({mainType:"brush"},function(K,Q){var ee={brushId:K.id,brushIndex:Q,brushName:K.name,areas:clone$4(K.areas),selected:[]};W.push(ee);var te=K.option,re=te.brushLink,ae=[],ne=[],ie=[],oe=!1;Q||(Z=te.throttleType,X=te.throttleDelay);var se=map$1(K.areas,function(ve){var de=boundingRectBuilders[ve.brushType],pe=defaults({boundingRect:de?de(ve):void 0},ve);return pe.selectors=makeBrushCommonSelectorForSeries(pe),pe}),le=createVisualMappings(K.option,STATE_LIST,function(ve){ve.mappingMethod="fixed"});isArray$1(re)&&each$f(re,function(ve){ae[ve]=1});function ue(ve){return re==="all"||!!ae[ve]}function ce(ve){return!!ve.length}U.eachSeries(function(ve,de){var pe=ie[de]=[];ve.subType==="parallel"?fe(ve,de):he(ve,de,pe)});function fe(ve,de){var pe=ve.coordinateSystem;oe=oe||pe.hasAxisBrushed(),ue(de)&&pe.eachActiveState(ve.getData(),function(ge,me){ge==="active"&&(ne[me]=1)})}function he(ve,de,pe){if(!(!ve.brushSelector||brushModelNotControll(K,de))&&(each$f(se,function(me){K.brushTargetManager.controlSeries(me,ve,U)&&pe.push(me),oe=oe||ce(pe)}),ue(de)&&ce(pe))){var ge=ve.getData();ge.each(function(me){checkInRange(ve,pe,ge,me)&&(ne[me]=1)})}}U.eachSeries(function(ve,de){var pe={seriesId:ve.id,seriesIndex:de,seriesName:ve.name,dataIndex:[]};ee.selected.push(pe);var ge=ie[de],me=ve.getData(),ye=ue(de)?function(_e){return ne[_e]?(pe.dataIndex.push(me.getRawIndex(_e)),"inBrush"):"outOfBrush"}:function(_e){return checkInRange(ve,ge,me,_e)?(pe.dataIndex.push(me.getRawIndex(_e)),"inBrush"):"outOfBrush"};(ue(de)?oe:ce(ge))&&applyVisual(STATE_LIST,le,me,ye)})}),dispatchAction$1(G,Z,X,W,H)}function dispatchAction$1(U,G,H,W,Z){if(Z){var X=U.getZr();if(!X[DISPATCH_FLAG]){X[DISPATCH_METHOD]||(X[DISPATCH_METHOD]=doDispatch);var K=createOrUpdate(X,DISPATCH_METHOD,H,G);K(U,W)}}}function doDispatch(U,G){if(!U.isDisposed()){var H=U.getZr();H[DISPATCH_FLAG]=!0,U.dispatchAction({type:"brushSelect",batch:G}),H[DISPATCH_FLAG]=!1}}function checkInRange(U,G,H,W){for(var Z=0,X=G.length;Z<X;Z++){var K=G[Z];if(U.brushSelector(W,H,K.selectors,K))return!0}}function brushModelNotControll(U,G){var H=U.option.seriesIndex;return H!=null&&H!=="all"&&(isArray$1(H)?indexOf(H,G)<0:G!==H)}var boundingRectBuilders={rect:function(U){return getBoundingRectFromMinMax(U.range)},polygon:function(U){for(var G,H=U.range,W=0,Z=H.length;W<Z;W++){G=G||[[1/0,-1/0],[1/0,-1/0]];var X=H[W];X[0]<G[0][0]&&(G[0][0]=X[0]),X[0]>G[0][1]&&(G[0][1]=X[0]),X[1]<G[1][0]&&(G[1][0]=X[1]),X[1]>G[1][1]&&(G[1][1]=X[1])}return G&&getBoundingRectFromMinMax(G)}};function getBoundingRectFromMinMax(U){return new BoundingRect(U[0][0],U[1][0],U[0][1]-U[0][0],U[1][1]-U[1][0])}var BrushView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H,W){this.ecModel=H,this.api=W,this.model,(this._brushController=new BrushController(W.getZr())).on("brush",bind$1(this._onBrush,this)).mount()},G.prototype.render=function(H,W,Z,X){this.model=H,this._updateController(H,W,Z,X)},G.prototype.updateTransform=function(H,W,Z,X){layoutCovers(W),this._updateController(H,W,Z,X)},G.prototype.updateVisual=function(H,W,Z,X){this.updateTransform(H,W,Z,X)},G.prototype.updateView=function(H,W,Z,X){this._updateController(H,W,Z,X)},G.prototype._updateController=function(H,W,Z,X){(!X||X.$from!==H.id)&&this._brushController.setPanels(H.brushTargetManager.makePanelOpts(Z)).enableBrush(H.brushOption).updateCovers(H.areas.slice())},G.prototype.dispose=function(){this._brushController.dispose()},G.prototype._onBrush=function(H){var W=this.model.id,Z=this.model.brushTargetManager.setOutputRanges(H.areas,this.ecModel);(!H.isEnd||H.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:W,areas:clone$4(Z),$from:W}),H.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:W,areas:clone$4(Z),$from:W})},G.type="brush",G})(ComponentView),BrushModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.areas=[],H.brushOption={},H}return G.prototype.optionUpdated=function(H,W){var Z=this.option;!W&&replaceVisualOption(Z,H,["inBrush","outOfBrush"]);var X=Z.inBrush=Z.inBrush||{};Z.outOfBrush=Z.outOfBrush||{color:this.option.defaultOutOfBrushColor},X.hasOwnProperty("liftZ")||(X.liftZ=5)},G.prototype.setAreas=function(H){process.env.NODE_ENV!=="production"&&(assert(isArray$1(H)),each$f(H,function(W){assert(W.brushType,"Illegal areas")})),H&&(this.areas=map$1(H,function(W){return generateBrushOption(this.option,W)},this))},G.prototype.setBrushOption=function(H){this.brushOption=generateBrushOption(this.option,H),this.brushType=this.brushOption.brushType},G.type="brush",G.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],G.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:tokens.color.backgroundTint,borderColor:tokens.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:tokens.color.disabled},G})(ComponentModel);function generateBrushOption(U,G){return merge({brushType:U.brushType,brushMode:U.brushMode,transformable:U.transformable,brushStyle:new Model(U.brushStyle).getItemStyle(),removeOnClick:U.removeOnClick,z:U.z},G,!0)}var ICON_TYPES=["rect","polygon","lineX","lineY","keep","clear"],BrushFeature=(function(U){__extends(G,U);function G(){return U!==null&&U.apply(this,arguments)||this}return G.prototype.render=function(H,W,Z){var X,K,Q;W.eachComponent({mainType:"brush"},function(ee){X=ee.brushType,K=ee.brushOption.brushMode||"single",Q=Q||!!ee.areas.length}),this._brushType=X,this._brushMode=K,each$f(H.get("type",!0),function(ee){H.setIconStatus(ee,(ee==="keep"?K==="multiple":ee==="clear"?Q:ee===X)?"emphasis":"normal")})},G.prototype.updateView=function(H,W,Z){this.render(H,W,Z)},G.prototype.getIcons=function(){var H=this.model,W=H.get("icon",!0),Z={};return each$f(H.get("type",!0),function(X){W[X]&&(Z[X]=W[X])}),Z},G.prototype.onclick=function(H,W,Z){var X=this._brushType,K=this._brushMode;Z==="clear"?(W.dispatchAction({type:"axisAreaSelect",intervals:[]}),W.dispatchAction({type:"brush",command:"clear",areas:[]})):W.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:Z==="keep"?X:X===Z?!1:Z,brushMode:Z==="keep"?K==="multiple"?"single":"multiple":K}})},G.getDefaultOption=function(H){var W={show:!0,type:ICON_TYPES.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:H.getLocaleModel().get(["toolbox","brush","title"])};return W},G})(ToolboxFeature);function install$j(U){U.registerComponentView(BrushView),U.registerComponentModel(BrushModel),U.registerPreprocessor(brushPreprocessor),U.registerVisual(U.PRIORITY.VISUAL.BRUSH,brushVisual),U.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(G,H){H.eachComponent({mainType:"brush",query:G},function(W){W.setAreas(G.areas)})}),U.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},noop),U.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},noop),registerFeature("brush",BrushFeature)}var TitleModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.layoutMode={type:"box",ignoreSize:!0},H}return G.type="title",G.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:tokens.size.m,backgroundColor:tokens.color.transparent,borderColor:tokens.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:tokens.color.primary},subtextStyle:{fontSize:12,color:tokens.color.quaternary}},G})(ComponentModel),TitleView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){if(this.group.removeAll(),!!H.get("show")){var X=this.group,K=H.getModel("textStyle"),Q=H.getModel("subtextStyle"),ee=H.get("textAlign"),te=retrieve2(H.get("textBaseline"),H.get("textVerticalAlign")),re=new ZRText({style:createTextStyle(K,{text:H.get("text"),fill:K.getTextColor()},{disableBox:!0}),z2:10}),ae=re.getBoundingRect(),ne=H.get("subtext"),ie=new ZRText({style:createTextStyle(Q,{text:ne,fill:Q.getTextColor(),y:ae.height+H.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),oe=H.get("link"),se=H.get("sublink"),le=H.get("triggerEvent",!0);re.silent=!oe&&!le,ie.silent=!se&&!le,oe&&re.on("click",function(){windowOpen(oe,"_"+H.get("target"))}),se&&ie.on("click",function(){windowOpen(se,"_"+H.get("subtarget"))}),getECData(re).eventData=getECData(ie).eventData=le?{componentType:"title",componentIndex:H.componentIndex}:null,X.add(re),ne&&X.add(ie);var ue=X.getBoundingRect(),ce=H.getBoxLayoutParams();ce.width=ue.width,ce.height=ue.height;var fe=createBoxLayoutReference(H,Z),he=getLayoutRect(ce,fe.refContainer,H.get("padding"));ee||(ee=H.get("left")||H.get("right"),ee==="middle"&&(ee="center"),ee==="right"?he.x+=he.width:ee==="center"&&(he.x+=he.width/2)),te||(te=H.get("top")||H.get("bottom"),te==="center"&&(te="middle"),te==="bottom"?he.y+=he.height:te==="middle"&&(he.y+=he.height/2),te=te||"top"),X.x=he.x,X.y=he.y,X.markRedraw();var ve={align:ee,verticalAlign:te};re.setStyle(ve),ie.setStyle(ve),ue=X.getBoundingRect();var de=he.margin,pe=H.getItemStyle(["color","opacity"]);pe.fill=H.get("backgroundColor");var ge=new Rect$2({shape:{x:ue.x-de[3],y:ue.y-de[0],width:ue.width+de[1]+de[3],height:ue.height+de[0]+de[2],r:H.get("borderRadius")},style:pe,subPixelOptimize:!0,silent:!0});X.add(ge)}},G.type="title",G})(ComponentView);function install$i(U){U.registerComponentModel(TitleModel),U.registerComponentView(TitleView)}var TimelineModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.layoutMode="box",H}return G.prototype.init=function(H,W,Z){this.mergeDefaultAndTheme(H,Z),this._initData()},G.prototype.mergeOption=function(H){U.prototype.mergeOption.apply(this,arguments),this._initData()},G.prototype.setCurrentIndex=function(H){H==null&&(H=this.option.currentIndex);var W=this._data.count();this.option.loop?H=(H%W+W)%W:(H>=W&&(H=W-1),H<0&&(H=0)),this.option.currentIndex=H},G.prototype.getCurrentIndex=function(){return this.option.currentIndex},G.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},G.prototype.setPlayState=function(H){this.option.autoPlay=!!H},G.prototype.getPlayState=function(){return!!this.option.autoPlay},G.prototype._initData=function(){var H=this.option,W=H.data||[],Z=H.axisType,X=this._names=[],K;Z==="category"?(K=[],each$f(W,function(te,re){var ae=convertOptionIdName(getDataItemValue(te),""),ne;isObject$3(te)?(ne=clone$4(te),ne.value=re):ne=re,K.push(ne),X.push(ae)})):K=W;var Q={category:"ordinal",time:"time",value:"number"}[Z]||"number",ee=this._data=new SeriesData([{name:"value",type:Q}],this);ee.initData(K,X)},G.prototype.getData=function(){return this._data},G.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},G.type="timeline",G.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:tokens.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:tokens.color.secondary},data:[]},G})(ComponentModel),SliderTimelineModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="timeline.slider",G.defaultOption=inheritDefaultOption(TimelineModel.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:tokens.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:tokens.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:tokens.color.tertiary},itemStyle:{color:tokens.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:tokens.color.accent50,borderColor:tokens.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:tokens.color.accent50,borderColor:tokens.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:tokens.color.accent60},itemStyle:{color:tokens.color.accent60,borderColor:tokens.color.accent60},controlStyle:{color:tokens.color.accent70,borderColor:tokens.color.accent70}},progress:{lineStyle:{color:tokens.color.accent30},itemStyle:{color:tokens.color.accent40}},data:[]}),G})(TimelineModel);mixin(SliderTimelineModel,DataFormatMixin.prototype);var TimelineView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="timeline",G})(ComponentView),TimelineAxis=(function(U){__extends(G,U);function G(H,W,Z,X){var K=U.call(this,H,W,Z)||this;return K.type=X||"value",K}return G.prototype.getLabelModel=function(){return this.model.getModel("label")},G.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},G})(Axis),PI=Math.PI,labelDataIndexStore=makeInner(),SliderTimelineView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(H,W){this.api=W},G.prototype.render=function(H,W,Z){if(this.model=H,this.api=Z,this.ecModel=W,this.group.removeAll(),H.get("show",!0)){var X=this._layout(H,Z),K=this._createGroup("_mainGroup"),Q=this._createGroup("_labelGroup"),ee=this._axis=this._createAxis(X,H);H.formatTooltip=function(te){var re=ee.scale.getLabel({value:te});return createTooltipMarkup("nameValue",{noName:!0,value:re})},each$f(["AxisLine","AxisTick","Control","CurrentPointer"],function(te){this["_render"+te](X,K,ee,H)},this),this._renderAxisLabel(X,Q,ee,H),this._position(X,H)}this._doPlayStop(),this._updateTicksStatus()},G.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},G.prototype.dispose=function(){this._clearTimer()},G.prototype._layout=function(H,W){var Z=H.get(["label","position"]),X=H.get("orient"),K=getViewRect(H,W),Q;Z==null||Z==="auto"?Q=X==="horizontal"?K.y+K.height/2<W.getHeight()/2?"-":"+":K.x+K.width/2<W.getWidth()/2?"+":"-":isString(Z)?Q={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[X][Z]:Q=Z;var ee={horizontal:"center",vertical:Q>=0||Q==="+"?"left":"right"},te={horizontal:Q>=0||Q==="+"?"top":"bottom",vertical:"middle"},re={horizontal:0,vertical:PI/2},ae=X==="vertical"?K.height:K.width,ne=H.getModel("controlStyle"),ie=ne.get("show",!0),oe=ie?ne.get("itemSize"):0,se=ie?ne.get("itemGap"):0,le=oe+se,ue=H.get(["label","rotate"])||0;ue=ue*PI/180;var ce,fe,he,ve=ne.get("position",!0),de=ie&&ne.get("showPlayBtn",!0),pe=ie&&ne.get("showPrevBtn",!0),ge=ie&&ne.get("showNextBtn",!0),me=0,ye=ae;ve==="left"||ve==="bottom"?(de&&(ce=[0,0],me+=le),pe&&(fe=[me,0],me+=le),ge&&(he=[ye-oe,0],ye-=le)):(de&&(ce=[ye-oe,0],ye-=le),pe&&(fe=[0,0],me+=le),ge&&(he=[ye-oe,0],ye-=le));var _e=[me,ye];return H.get("inverse")&&_e.reverse(),{viewRect:K,mainLength:ae,orient:X,rotation:re[X],labelRotation:ue,labelPosOpt:Q,labelAlign:H.get(["label","align"])||ee[X],labelBaseline:H.get(["label","verticalAlign"])||H.get(["label","baseline"])||te[X],playPosition:ce,prevBtnPosition:fe,nextBtnPosition:he,axisExtent:_e,controlSize:oe,controlGap:se}},G.prototype._position=function(H,W){var Z=this._mainGroup,X=this._labelGroup,K=H.viewRect;if(H.orient==="vertical"){var Q=create$1(),ee=K.x,te=K.y+K.height;translate(Q,Q,[-ee,-te]),rotate(Q,Q,-PI/2),translate(Q,Q,[ee,te]),K=K.clone(),K.applyTransform(Q)}var re=ce(K),ae=ce(Z.getBoundingRect()),ne=ce(X.getBoundingRect()),ie=[Z.x,Z.y],oe=[X.x,X.y];oe[0]=ie[0]=re[0][0];var se=H.labelPosOpt;if(se==null||isString(se)){var le=se==="+"?0:1;fe(ie,ae,re,1,le),fe(oe,ne,re,1,1-le)}else{var le=se>=0?0:1;fe(ie,ae,re,1,le),oe[1]=ie[1]+se}Z.setPosition(ie),X.setPosition(oe),Z.rotation=X.rotation=H.rotation,ue(Z),ue(X);function ue(he){he.originX=re[0][0]-he.x,he.originY=re[1][0]-he.y}function ce(he){return[[he.x,he.x+he.width],[he.y,he.y+he.height]]}function fe(he,ve,de,pe,ge){he[pe]+=de[pe][ge]-ve[pe][ge]}},G.prototype._createAxis=function(H,W){var Z=W.getData(),X=W.get("axisType"),K=createScaleByModel(W,X);K.getTicks=function(){return Z.mapArray(["value"],function(te){return{value:te}})};var Q=Z.getDataExtent("value");K.setExtent(Q[0],Q[1]),K.calcNiceTicks();var ee=new TimelineAxis("value",K,H.axisExtent,X);return ee.model=W,ee},G.prototype._createGroup=function(H){var W=this[H]=new Group$3;return this.group.add(W),W},G.prototype._renderAxisLine=function(H,W,Z,X){var K=Z.getExtent();if(X.get(["lineStyle","show"])){var Q=new Line$1({shape:{x1:K[0],y1:0,x2:K[1],y2:0},style:extend({lineCap:"round"},X.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});W.add(Q);var ee=this._progressLine=new Line$1({shape:{x1:K[0],x2:this._currentPointer?this._currentPointer.x:K[0],y1:0,y2:0},style:defaults({lineCap:"round",lineWidth:Q.style.lineWidth},X.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});W.add(ee)}},G.prototype._renderAxisTick=function(H,W,Z,X){var K=this,Q=X.getData(),ee=Z.scale.getTicks();this._tickSymbols=[],each$f(ee,function(te){var re=Z.dataToCoord(te.value),ae=Q.getItemModel(te.value),ne=ae.getModel("itemStyle"),ie=ae.getModel(["emphasis","itemStyle"]),oe=ae.getModel(["progress","itemStyle"]),se={x:re,y:0,onclick:bind$1(K._changeTimeline,K,te.value)},le=giveSymbol(ae,ne,W,se);le.ensureState("emphasis").style=ie.getItemStyle(),le.ensureState("progress").style=oe.getItemStyle(),enableHoverEmphasis(le);var ue=getECData(le);ae.get("tooltip")?(ue.dataIndex=te.value,ue.dataModel=X):ue.dataIndex=ue.dataModel=null,K._tickSymbols.push(le)})},G.prototype._renderAxisLabel=function(H,W,Z,X){var K=this,Q=Z.getLabelModel();if(Q.get("show")){var ee=X.getData(),te=Z.getViewLabels();this._tickLabels=[],each$f(te,function(re){var ae=re.tickValue,ne=ee.getItemModel(ae),ie=ne.getModel("label"),oe=ne.getModel(["emphasis","label"]),se=ne.getModel(["progress","label"]),le=Z.dataToCoord(re.tickValue),ue=new ZRText({x:le,y:0,rotation:H.labelRotation-H.rotation,onclick:bind$1(K._changeTimeline,K,ae),silent:!1,style:createTextStyle(ie,{text:re.formattedLabel,align:H.labelAlign,verticalAlign:H.labelBaseline})});ue.ensureState("emphasis").style=createTextStyle(oe),ue.ensureState("progress").style=createTextStyle(se),W.add(ue),enableHoverEmphasis(ue),labelDataIndexStore(ue).dataIndex=ae,K._tickLabels.push(ue)})}},G.prototype._renderControl=function(H,W,Z,X){var K=H.controlSize,Q=H.rotation,ee=X.getModel("controlStyle").getItemStyle(),te=X.getModel(["emphasis","controlStyle"]).getItemStyle(),re=X.getPlayState(),ae=X.get("inverse",!0);ne(H.nextBtnPosition,"next",bind$1(this._changeTimeline,this,ae?"-":"+")),ne(H.prevBtnPosition,"prev",bind$1(this._changeTimeline,this,ae?"+":"-")),ne(H.playPosition,re?"stop":"play",bind$1(this._handlePlayClick,this,!re),!0);function ne(ie,oe,se,le){if(ie){var ue=parsePercent$1(retrieve2(X.get(["controlStyle",oe+"BtnSize"]),K),K),ce=[0,-ue/2,ue,ue],fe=makeControlIcon(X,oe+"Icon",ce,{x:ie[0],y:ie[1],originX:K/2,originY:0,rotation:le?-Q:0,rectHover:!0,style:ee,onclick:se});fe.ensureState("emphasis").style=te,W.add(fe),enableHoverEmphasis(fe)}}},G.prototype._renderCurrentPointer=function(H,W,Z,X){var K=X.getData(),Q=X.getCurrentIndex(),ee=K.getItemModel(Q).getModel("checkpointStyle"),te=this,re={onCreate:function(ae){ae.draggable=!0,ae.drift=bind$1(te._handlePointerDrag,te),ae.ondragend=bind$1(te._handlePointerDragend,te),pointerMoveTo(ae,te._progressLine,Q,Z,X,!0)},onUpdate:function(ae){pointerMoveTo(ae,te._progressLine,Q,Z,X)}};this._currentPointer=giveSymbol(ee,ee,this._mainGroup,{},this._currentPointer,re)},G.prototype._handlePlayClick=function(H){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:H,from:this.uid})},G.prototype._handlePointerDrag=function(H,W,Z){this._clearTimer(),this._pointerChangeTimeline([Z.offsetX,Z.offsetY])},G.prototype._handlePointerDragend=function(H){this._pointerChangeTimeline([H.offsetX,H.offsetY],!0)},G.prototype._pointerChangeTimeline=function(H,W){var Z=this._toAxisCoord(H)[0],X=this._axis,K=asc$2(X.getExtent().slice());Z>K[1]&&(Z=K[1]),Z<K[0]&&(Z=K[0]),this._currentPointer.x=Z,this._currentPointer.markRedraw();var Q=this._progressLine;Q&&(Q.shape.x2=Z,Q.dirty());var ee=this._findNearestTick(Z),te=this.model;(W||ee!==te.getCurrentIndex()&&te.get("realtime"))&&this._changeTimeline(ee)},G.prototype._doPlayStop=function(){var H=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var W=H.model;H._changeTimeline(W.getCurrentIndex()+(W.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},G.prototype._toAxisCoord=function(H){var W=this._mainGroup.getLocalTransform();return applyTransform(H,W,!0)},G.prototype._findNearestTick=function(H){var W=this.model.getData(),Z=1/0,X,K=this._axis;return W.each(["value"],function(Q,ee){var te=K.dataToCoord(Q),re=Math.abs(te-H);re<Z&&(Z=re,X=ee)}),X},G.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},G.prototype._changeTimeline=function(H){var W=this.model.getCurrentIndex();H==="+"?H=W+1:H==="-"&&(H=W-1),this.api.dispatchAction({type:"timelineChange",currentIndex:H,from:this.uid})},G.prototype._updateTicksStatus=function(){var H=this.model.getCurrentIndex(),W=this._tickSymbols,Z=this._tickLabels;if(W)for(var X=0;X<W.length;X++)W&&W[X]&&W[X].toggleState("progress",X<H);if(Z)for(var X=0;X<Z.length;X++)Z&&Z[X]&&Z[X].toggleState("progress",labelDataIndexStore(Z[X]).dataIndex<=H)},G.type="timeline.slider",G})(TimelineView);function createScaleByModel(U,G){if(G=G||U.get("type"),G)switch(G){case"category":return new OrdinalScale({ordinalMeta:U.getCategories(),extent:[1/0,-1/0]});case"time":return new TimeScale({locale:U.ecModel.getLocaleModel(),useUTC:U.ecModel.get("useUTC")});default:return new IntervalScale}}function getViewRect(U,G){return getLayoutRect(U.getBoxLayoutParams(),createBoxLayoutReference(U,G).refContainer,U.get("padding"))}function makeControlIcon(U,G,H,W){var Z=W.style,X=createIcon(U.get(["controlStyle",G]),W||{},new BoundingRect(H[0],H[1],H[2],H[3]));return Z&&X.setStyle(Z),X}function giveSymbol(U,G,H,W,Z,X){var K=G.get("color");if(Z)Z.setColor(K),H.add(Z),X&&X.onUpdate(Z);else{var Q=U.get("symbol");Z=createSymbol$1(Q,-1,-1,2,2,K),Z.setStyle("strokeNoScale",!0),H.add(Z),X&&X.onCreate(Z)}var ee=G.getItemStyle(["color"]);Z.setStyle(ee),W=merge({rectHover:!0,z2:100},W,!0);var te=normalizeSymbolSize(U.get("symbolSize"));W.scaleX=te[0]/2,W.scaleY=te[1]/2;var re=normalizeSymbolOffset(U.get("symbolOffset"),te);re&&(W.x=(W.x||0)+re[0],W.y=(W.y||0)+re[1]);var ae=U.get("symbolRotate");return W.rotation=(ae||0)*Math.PI/180||0,Z.attr(W),Z.updateTransform(),Z}function pointerMoveTo(U,G,H,W,Z,X){if(!U.dragging){var K=Z.getModel("checkpointStyle"),Q=W.dataToCoord(Z.getData().get("value",H));if(X||!K.get("animation",!0))U.attr({x:Q,y:0}),G&&G.attr({shape:{x2:Q}});else{var ee={duration:K.get("animationDuration",!0),easing:K.get("animationEasing",!0)};U.stopAnimation(null,!0),U.animateTo({x:Q,y:0},ee),G&&G.animateTo({shape:{x2:Q}},ee)}}}function installTimelineAction(U){U.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(G,H,W){var Z=H.getComponent("timeline");return Z&&G.currentIndex!=null&&(Z.setCurrentIndex(G.currentIndex),!Z.get("loop",!0)&&Z.isIndexMax()&&Z.getPlayState()&&(Z.setPlayState(!1),W.dispatchAction({type:"timelinePlayChange",playState:!1,from:G.from}))),H.resetOption("timeline",{replaceMerge:Z.get("replaceMerge",!0)}),defaults({currentIndex:Z.option.currentIndex},G)}),U.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(G,H){var W=H.getComponent("timeline");W&&G.playState!=null&&W.setPlayState(G.playState)})}function timelinePreprocessor(U){var G=U&&U.timeline;isArray$1(G)||(G=G?[G]:[]),each$f(G,function(H){H&&compatibleEC2(H)})}function compatibleEC2(U){var G=U.type,H={number:"value",time:"time"};if(H[G]&&(U.axisType=H[G],delete U.type),transferItem(U),has$1(U,"controlPosition")){var W=U.controlStyle||(U.controlStyle={});has$1(W,"position")||(W.position=U.controlPosition),W.position==="none"&&!has$1(W,"show")&&(W.show=!1,delete W.position),delete U.controlPosition}each$f(U.data||[],function(Z){isObject$3(Z)&&!isArray$1(Z)&&(!has$1(Z,"value")&&has$1(Z,"name")&&(Z.value=Z.name),transferItem(Z))})}function transferItem(U){var G=U.itemStyle||(U.itemStyle={}),H=G.emphasis||(G.emphasis={}),W=U.label||U.label||{},Z=W.normal||(W.normal={}),X={normal:1,emphasis:1};each$f(W,function(K,Q){!X[Q]&&!has$1(Z,Q)&&(Z[Q]=K)}),H.label&&!has$1(W,"emphasis")&&(W.emphasis=H.label,delete H.label)}function has$1(U,G){return U.hasOwnProperty(G)}function install$h(U){U.registerComponentModel(SliderTimelineModel),U.registerComponentView(SliderTimelineView),U.registerSubTypeDefaulter("timeline",function(){return"slider"}),installTimelineAction(U),U.registerPreprocessor(timelinePreprocessor)}function checkMarkerInSeries(U,G){if(!U)return!1;for(var H=isArray$1(U)?U:[U],W=0;W<H.length;W++)if(H[W]&&H[W][G])return!0;return!1}function fillLabel(U){defaultEmphasis(U,"label",["show"])}var inner$5=makeInner(),MarkerModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.createdBySelf=!1,H.preventAutoZ=!0,H}return G.prototype.init=function(H,W,Z){if(process.env.NODE_ENV!=="production"&&this.type==="marker")throw new Error("Marker component is abstract component. Use markLine, markPoint, markArea instead.");this.mergeDefaultAndTheme(H,Z),this._mergeOption(H,Z,!1,!0)},G.prototype.isAnimationEnabled=function(){if(env.node)return!1;var H=this.__hostSeries;return this.getShallow("animation")&&H&&H.isAnimationEnabled()},G.prototype.mergeOption=function(H,W){this._mergeOption(H,W,!1,!1)},G.prototype._mergeOption=function(H,W,Z,X){var K=this.mainType;Z||W.eachSeries(function(Q){var ee=Q.get(this.mainType,!0),te=inner$5(Q)[K];if(!ee||!ee.data){inner$5(Q)[K]=null;return}te?te._mergeOption(ee,W,!0):(X&&fillLabel(ee),each$f(ee.data,function(re){re instanceof Array?(fillLabel(re[0]),fillLabel(re[1])):fillLabel(re)}),te=this.createMarkerModelFromSeries(ee,this,W),extend(te,{mainType:this.mainType,seriesIndex:Q.seriesIndex,name:Q.name,createdBySelf:!0}),te.__hostSeries=Q),inner$5(Q)[K]=te},this)},G.prototype.formatTooltip=function(H,W,Z){var X=this.getData(),K=this.getRawValue(H),Q=X.getName(H);return createTooltipMarkup("section",{header:this.name,blocks:[createTooltipMarkup("nameValue",{name:Q,value:K,noName:!Q,noValue:K==null})]})},G.prototype.getData=function(){return this._data},G.prototype.setData=function(H){this._data=H},G.prototype.getDataParams=function(H,W){var Z=DataFormatMixin.prototype.getDataParams.call(this,H,W),X=this.__hostSeries;return X&&(Z.seriesId=X.id,Z.seriesName=X.name,Z.seriesType=X.subType),Z},G.getMarkerModelFromSeries=function(H,W){return inner$5(H)[W]},G.type="marker",G.dependencies=["series","grid","polar","geo"],G})(ComponentModel);mixin(MarkerModel,DataFormatMixin.prototype);var MarkPointModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.createMarkerModelFromSeries=function(H,W,Z){return new G(H,W,Z)},G.type="markPoint",G.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},G})(MarkerModel);function hasXOrY(U){return!(isNaN(parseFloat(U.x))&&isNaN(parseFloat(U.y)))}function hasXAndY(U){return!isNaN(parseFloat(U.x))&&!isNaN(parseFloat(U.y))}function markerTypeCalculatorWithExtent(U,G,H,W,Z,X,K){var Q=[],ee=isDimensionStacked(G,Z),te=ee?G.getCalculationInfo("stackResultDimension"):Z,re=numCalculate(G,te,U),ae=G.hostModel,ne=ae.indicesOfNearest(H,te,re)[0];Q[X]=G.get(W,ne),Q[K]=G.get(te,ne);var ie=G.get(Z,ne),oe=getPrecision(G.get(Z,ne));return oe=Math.min(oe,20),oe>=0&&(Q[K]=+Q[K].toFixed(oe)),[Q,ie]}var markerTypeCalculator={min:curry$1(markerTypeCalculatorWithExtent,"min"),max:curry$1(markerTypeCalculatorWithExtent,"max"),average:curry$1(markerTypeCalculatorWithExtent,"average"),median:curry$1(markerTypeCalculatorWithExtent,"median")};function dataTransform(U,G){if(G){var H=U.getData(),W=U.coordinateSystem,Z=W&&W.dimensions;if(!hasXAndY(G)&&!isArray$1(G.coord)&&isArray$1(Z)){var X=getAxisInfo(G,H,W,U);if(G=clone$4(G),G.type&&markerTypeCalculator[G.type]&&X.baseAxis&&X.valueAxis){var K=indexOf(Z,X.baseAxis.dim),Q=indexOf(Z,X.valueAxis.dim),ee=markerTypeCalculator[G.type](H,X.valueAxis.dim,X.baseDataDim,X.valueDataDim,K,Q);G.coord=ee[0],G.value=ee[1]}else G.coord=[G.xAxis!=null?G.xAxis:G.radiusAxis,G.yAxis!=null?G.yAxis:G.angleAxis]}if(G.coord==null||!isArray$1(Z)){G.coord=[];var te=U.getBaseAxis();if(te&&G.type&&markerTypeCalculator[G.type]){var re=W.getOtherAxis(te);re&&(G.value=numCalculate(H,H.mapDimension(re.dim),G.type))}}else for(var ae=G.coord,ne=0;ne<2;ne++)markerTypeCalculator[ae[ne]]&&(ae[ne]=numCalculate(H,H.mapDimension(Z[ne]),ae[ne]));return G}}function getAxisInfo(U,G,H,W){var Z={};return U.valueIndex!=null||U.valueDim!=null?(Z.valueDataDim=U.valueIndex!=null?G.getDimension(U.valueIndex):U.valueDim,Z.valueAxis=H.getAxis(dataDimToCoordDim(W,Z.valueDataDim)),Z.baseAxis=H.getOtherAxis(Z.valueAxis),Z.baseDataDim=G.mapDimension(Z.baseAxis.dim)):(Z.baseAxis=W.getBaseAxis(),Z.valueAxis=H.getOtherAxis(Z.baseAxis),Z.baseDataDim=G.mapDimension(Z.baseAxis.dim),Z.valueDataDim=G.mapDimension(Z.valueAxis.dim)),Z}function dataDimToCoordDim(U,G){var H=U.getData().getDimensionInfo(G);return H&&H.coordDim}function dataFilter(U,G){return U&&U.containData&&G.coord&&!hasXOrY(G)?U.containData(G.coord):!0}function zoneFilter(U,G,H){return U&&U.containZone&&G.coord&&H.coord&&!hasXOrY(G)&&!hasXOrY(H)?U.containZone(G.coord,H.coord):!0}function createMarkerDimValueGetter(U,G){return U?function(H,W,Z,X){var K=X<2?H.coord&&H.coord[X]:H.value;return parseDataValue(K,G[X])}:function(H,W,Z,X){return parseDataValue(H.value,G[X])}}function numCalculate(U,G,H){if(H==="average"){var W=0,Z=0;return U.each(G,function(X,K){isNaN(X)||(W+=X,Z++)}),W/Z}else return H==="median"?U.getMedian(G):U.getDataExtent(G)[H==="max"?1:0]}var inner$4=makeInner(),MarkerView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.init=function(){this.markerGroupMap=createHashMap()},G.prototype.render=function(H,W,Z){var X=this,K=this.markerGroupMap;K.each(function(Q){inner$4(Q).keep=!1}),W.eachSeries(function(Q){var ee=MarkerModel.getMarkerModelFromSeries(Q,X.type);ee&&X.renderSeries(Q,ee,W,Z)}),K.each(function(Q){!inner$4(Q).keep&&X.group.remove(Q.group)}),updateZ$1(W,K,this.type)},G.prototype.markKeep=function(H){inner$4(H).keep=!0},G.prototype.toggleBlurSeries=function(H,W){var Z=this;each$f(H,function(X){var K=MarkerModel.getMarkerModelFromSeries(X,Z.type);if(K){var Q=K.getData();Q.eachItemGraphicEl(function(ee){ee&&(W?enterBlur(ee):leaveBlur(ee))})}})},G.type="marker",G})(ComponentView);function updateZ$1(U,G,H){U.eachSeries(function(W){var Z=MarkerModel.getMarkerModelFromSeries(W,H),X=G.get(W.id);if(Z&&X&&X.group){var K=retrieveZInfo(Z),Q=K.z,ee=K.zlevel;traverseUpdateZ(X.group,Q,ee)}})}function updateMarkerLayout(U,G,H){var W=G.coordinateSystem,Z=H.getWidth(),X=H.getHeight(),K=W&&W.getArea&&W.getArea();U.each(function(Q){var ee=U.getItemModel(Q),te=ee.get("relativeTo")==="coordinate",re=te?K?K.width:0:Z,ae=te?K?K.height:0:X,ne=te&&K?K.x:0,ie=te&&K?K.y:0,oe,se=parsePercent(ee.get("x"),re)+ne,le=parsePercent(ee.get("y"),ae)+ie;if(!isNaN(se)&&!isNaN(le))oe=[se,le];else if(G.getMarkerPosition)oe=G.getMarkerPosition(U.getValues(U.dimensions,Q));else if(W){var ue=U.get(W.dimensions[0],Q),ce=U.get(W.dimensions[1],Q);oe=W.dataToPoint([ue,ce])}isNaN(se)||(oe[0]=se),isNaN(le)||(oe[1]=le),U.setItemLayout(Q,oe)})}var MarkPointView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.updateTransform=function(H,W,Z){W.eachSeries(function(X){var K=MarkerModel.getMarkerModelFromSeries(X,"markPoint");K&&(updateMarkerLayout(K.getData(),X,Z),this.markerGroupMap.get(X.id).updateLayout())},this)},G.prototype.renderSeries=function(H,W,Z,X){var K=H.coordinateSystem,Q=H.id,ee=H.getData(),te=this.markerGroupMap,re=te.get(Q)||te.set(Q,new SymbolDraw),ae=createData(K,H,W);W.setData(ae),updateMarkerLayout(W.getData(),H,X),ae.each(function(ne){var ie=ae.getItemModel(ne),oe=ie.getShallow("symbol"),se=ie.getShallow("symbolSize"),le=ie.getShallow("symbolRotate"),ue=ie.getShallow("symbolOffset"),ce=ie.getShallow("symbolKeepAspect");if(isFunction(oe)||isFunction(se)||isFunction(le)||isFunction(ue)){var fe=W.getRawValue(ne),he=W.getDataParams(ne);isFunction(oe)&&(oe=oe(fe,he)),isFunction(se)&&(se=se(fe,he)),isFunction(le)&&(le=le(fe,he)),isFunction(ue)&&(ue=ue(fe,he))}var ve=ie.getModel("itemStyle").getItemStyle(),de=ie.get("z2"),pe=getVisualFromData(ee,"color");ve.fill||(ve.fill=pe),ae.setItemVisual(ne,{z2:retrieve2(de,0),symbol:oe,symbolSize:se,symbolRotate:le,symbolOffset:ue,symbolKeepAspect:ce,style:ve})}),re.updateData(ae),this.group.add(re.group),ae.eachItemGraphicEl(function(ne){ne.traverse(function(ie){getECData(ie).dataModel=W})}),this.markKeep(re),re.group.silent=W.get("silent")||H.get("silent")},G.type="markPoint",G})(MarkerView);function createData(U,G,H){var W;U?W=map$1(U&&U.dimensions,function(Q){var ee=G.getData().getDimensionInfo(G.getData().mapDimension(Q))||{};return extend(extend({},ee),{name:Q,ordinalMeta:null})}):W=[{name:"value",type:"float"}];var Z=new SeriesData(W,H),X=map$1(H.get("data"),curry$1(dataTransform,G));U&&(X=filter(X,curry$1(dataFilter,U)));var K=createMarkerDimValueGetter(!!U,W);return Z.initData(X,null,K),Z}function install$g(U){U.registerComponentModel(MarkPointModel),U.registerComponentView(MarkPointView),U.registerPreprocessor(function(G){checkMarkerInSeries(G.series,"markPoint")&&(G.markPoint=G.markPoint||{})})}var MarkLineModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.createMarkerModelFromSeries=function(H,W,Z){return new G(H,W,Z)},G.type="markLine",G.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},G})(MarkerModel),inner$3=makeInner(),markLineTransform=function(U,G,H,W){var Z=U.getData(),X;if(isArray$1(W))X=W;else{var K=W.type;if(K==="min"||K==="max"||K==="average"||K==="median"||W.xAxis!=null||W.yAxis!=null){var Q=void 0,ee=void 0;if(W.yAxis!=null||W.xAxis!=null)Q=G.getAxis(W.yAxis!=null?"y":"x"),ee=retrieve(W.yAxis,W.xAxis);else{var te=getAxisInfo(W,Z,G,U);Q=te.valueAxis;var re=getStackedDimension(Z,te.valueDataDim);ee=numCalculate(Z,re,K)}var ae=Q.dim==="x"?0:1,ne=1-ae,ie=clone$4(W),oe={coord:[]};ie.type=null,ie.coord=[],ie.coord[ne]=-1/0,oe.coord[ne]=1/0;var se=H.get("precision");se>=0&&isNumber(ee)&&(ee=+ee.toFixed(Math.min(se,20))),ie.coord[ae]=oe.coord[ae]=ee,X=[ie,oe,{type:K,valueIndex:W.valueIndex,value:ee}]}else process.env.NODE_ENV!=="production"&&logError("Invalid markLine data."),X=[]}var le=[dataTransform(U,X[0]),dataTransform(U,X[1]),extend({},X[2])];return le[2].type=le[2].type||null,merge(le[2],le[0]),merge(le[2],le[1]),le};function isInfinity$1(U){return!isNaN(U)&&!isFinite(U)}function ifMarkLineHasOnlyDim(U,G,H,W){var Z=1-U,X=W.dimensions[U];return isInfinity$1(G[Z])&&isInfinity$1(H[Z])&&G[U]===H[U]&&W.getAxis(X).containData(G[U])}function markLineFilter(U,G){if(U.type==="cartesian2d"){var H=G[0].coord,W=G[1].coord;if(H&&W&&(ifMarkLineHasOnlyDim(1,H,W,U)||ifMarkLineHasOnlyDim(0,H,W,U)))return!0}return dataFilter(U,G[0])&&dataFilter(U,G[1])}function updateSingleMarkerEndLayout(U,G,H,W,Z){var X=W.coordinateSystem,K=U.getItemModel(G),Q,ee=parsePercent(K.get("x"),Z.getWidth()),te=parsePercent(K.get("y"),Z.getHeight());if(!isNaN(ee)&&!isNaN(te))Q=[ee,te];else{if(W.getMarkerPosition)Q=W.getMarkerPosition(U.getValues(U.dimensions,G));else{var re=X.dimensions,ae=U.get(re[0],G),ne=U.get(re[1],G);Q=X.dataToPoint([ae,ne])}if(isCoordinateSystemType(X,"cartesian2d")){var ie=X.getAxis("x"),oe=X.getAxis("y"),re=X.dimensions;isInfinity$1(U.get(re[0],G))?Q[0]=ie.toGlobalCoord(ie.getExtent()[H?0:1]):isInfinity$1(U.get(re[1],G))&&(Q[1]=oe.toGlobalCoord(oe.getExtent()[H?0:1]))}isNaN(ee)||(Q[0]=ee),isNaN(te)||(Q[1]=te)}U.setItemLayout(G,Q)}var MarkLineView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.updateTransform=function(H,W,Z){W.eachSeries(function(X){var K=MarkerModel.getMarkerModelFromSeries(X,"markLine");if(K){var Q=K.getData(),ee=inner$3(K).from,te=inner$3(K).to;ee.each(function(re){updateSingleMarkerEndLayout(ee,re,!0,X,Z),updateSingleMarkerEndLayout(te,re,!1,X,Z)}),Q.each(function(re){Q.setItemLayout(re,[ee.getItemLayout(re),te.getItemLayout(re)])}),this.markerGroupMap.get(X.id).updateLayout()}},this)},G.prototype.renderSeries=function(H,W,Z,X){var K=H.coordinateSystem,Q=H.id,ee=H.getData(),te=this.markerGroupMap,re=te.get(Q)||te.set(Q,new LineDraw);this.group.add(re.group);var ae=createList$1(K,H,W),ne=ae.from,ie=ae.to,oe=ae.line;inner$3(W).from=ne,inner$3(W).to=ie,W.setData(oe);var se=W.get("symbol"),le=W.get("symbolSize"),ue=W.get("symbolRotate"),ce=W.get("symbolOffset");isArray$1(se)||(se=[se,se]),isArray$1(le)||(le=[le,le]),isArray$1(ue)||(ue=[ue,ue]),isArray$1(ce)||(ce=[ce,ce]),ae.from.each(function(he){fe(ne,he,!0),fe(ie,he,!1)}),oe.each(function(he){var ve=oe.getItemModel(he),de=ve.getModel("lineStyle").getLineStyle();oe.setItemLayout(he,[ne.getItemLayout(he),ie.getItemLayout(he)]);var pe=ve.get("z2");de.stroke==null&&(de.stroke=ne.getItemVisual(he,"style").fill),oe.setItemVisual(he,{z2:retrieve2(pe,0),fromSymbolKeepAspect:ne.getItemVisual(he,"symbolKeepAspect"),fromSymbolOffset:ne.getItemVisual(he,"symbolOffset"),fromSymbolRotate:ne.getItemVisual(he,"symbolRotate"),fromSymbolSize:ne.getItemVisual(he,"symbolSize"),fromSymbol:ne.getItemVisual(he,"symbol"),toSymbolKeepAspect:ie.getItemVisual(he,"symbolKeepAspect"),toSymbolOffset:ie.getItemVisual(he,"symbolOffset"),toSymbolRotate:ie.getItemVisual(he,"symbolRotate"),toSymbolSize:ie.getItemVisual(he,"symbolSize"),toSymbol:ie.getItemVisual(he,"symbol"),style:de})}),re.updateData(oe),ae.line.eachItemGraphicEl(function(he){getECData(he).dataModel=W,he.traverse(function(ve){getECData(ve).dataModel=W})});function fe(he,ve,de){var pe=he.getItemModel(ve);updateSingleMarkerEndLayout(he,ve,de,H,X);var ge=pe.getModel("itemStyle").getItemStyle();ge.fill==null&&(ge.fill=getVisualFromData(ee,"color")),he.setItemVisual(ve,{symbolKeepAspect:pe.get("symbolKeepAspect"),symbolOffset:retrieve2(pe.get("symbolOffset",!0),ce[de?0:1]),symbolRotate:retrieve2(pe.get("symbolRotate",!0),ue[de?0:1]),symbolSize:retrieve2(pe.get("symbolSize"),le[de?0:1]),symbol:retrieve2(pe.get("symbol",!0),se[de?0:1]),style:ge})}this.markKeep(re),re.group.silent=W.get("silent")||H.get("silent")},G.type="markLine",G})(MarkerView);function createList$1(U,G,H){var W;U?W=map$1(U&&U.dimensions,function(te){var re=G.getData().getDimensionInfo(G.getData().mapDimension(te))||{};return extend(extend({},re),{name:te,ordinalMeta:null})}):W=[{name:"value",type:"float"}];var Z=new SeriesData(W,H),X=new SeriesData(W,H),K=new SeriesData([],H),Q=map$1(H.get("data"),curry$1(markLineTransform,G,U,H));U&&(Q=filter(Q,curry$1(markLineFilter,U)));var ee=createMarkerDimValueGetter(!!U,W);return Z.initData(map$1(Q,function(te){return te[0]}),null,ee),X.initData(map$1(Q,function(te){return te[1]}),null,ee),K.initData(map$1(Q,function(te){return te[2]})),K.hasItemOption=!0,{from:Z,to:X,line:K}}function install$f(U){U.registerComponentModel(MarkLineModel),U.registerComponentView(MarkLineView),U.registerPreprocessor(function(G){checkMarkerInSeries(G.series,"markLine")&&(G.markLine=G.markLine||{})})}var MarkAreaModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.createMarkerModelFromSeries=function(H,W,Z){return new G(H,W,Z)},G.type="markArea",G.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},G})(MarkerModel),inner$2=makeInner(),markAreaTransform=function(U,G,H,W){var Z=W[0],X=W[1];if(!(!Z||!X)){var K=dataTransform(U,Z),Q=dataTransform(U,X),ee=K.coord,te=Q.coord;ee[0]=retrieve(ee[0],-1/0),ee[1]=retrieve(ee[1],-1/0),te[0]=retrieve(te[0],1/0),te[1]=retrieve(te[1],1/0);var re=mergeAll([{},K,Q]);return re.coord=[K.coord,Q.coord],re.x0=K.x,re.y0=K.y,re.x1=Q.x,re.y1=Q.y,re}};function isInfinity(U){return!isNaN(U)&&!isFinite(U)}function ifMarkAreaHasOnlyDim(U,G,H,W){var Z=1-U;return isInfinity(G[Z])&&isInfinity(H[Z])}function markAreaFilter(U,G){var H=G.coord[0],W=G.coord[1],Z={coord:H,x:G.x0,y:G.y0},X={coord:W,x:G.x1,y:G.y1};return isCoordinateSystemType(U,"cartesian2d")?H&&W&&(ifMarkAreaHasOnlyDim(1,H,W)||ifMarkAreaHasOnlyDim(0,H,W))?!0:zoneFilter(U,Z,X):dataFilter(U,Z)||dataFilter(U,X)}function getSingleMarkerEndPoint(U,G,H,W,Z){var X=W.coordinateSystem,K=U.getItemModel(G),Q,ee=parsePercent(K.get(H[0]),Z.getWidth()),te=parsePercent(K.get(H[1]),Z.getHeight());if(!isNaN(ee)&&!isNaN(te))Q=[ee,te];else{if(W.getMarkerPosition){var re=U.getValues(["x0","y0"],G),ae=U.getValues(["x1","y1"],G),ne=X.clampData(re),ie=X.clampData(ae),oe=[];H[0]==="x0"?oe[0]=ne[0]>ie[0]?ae[0]:re[0]:oe[0]=ne[0]>ie[0]?re[0]:ae[0],H[1]==="y0"?oe[1]=ne[1]>ie[1]?ae[1]:re[1]:oe[1]=ne[1]>ie[1]?re[1]:ae[1],Q=W.getMarkerPosition(oe,H,!0)}else{var se=U.get(H[0],G),le=U.get(H[1],G),ue=[se,le];X.clampData&&X.clampData(ue,ue),Q=X.dataToPoint(ue,!0)}if(isCoordinateSystemType(X,"cartesian2d")){var ce=X.getAxis("x"),fe=X.getAxis("y"),se=U.get(H[0],G),le=U.get(H[1],G);isInfinity(se)?Q[0]=ce.toGlobalCoord(ce.getExtent()[H[0]==="x0"?0:1]):isInfinity(le)&&(Q[1]=fe.toGlobalCoord(fe.getExtent()[H[1]==="y0"?0:1]))}isNaN(ee)||(Q[0]=ee),isNaN(te)||(Q[1]=te)}return Q}var dimPermutations=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],MarkAreaView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.updateTransform=function(H,W,Z){W.eachSeries(function(X){var K=MarkerModel.getMarkerModelFromSeries(X,"markArea");if(K){var Q=K.getData();Q.each(function(ee){var te=map$1(dimPermutations,function(ae){return getSingleMarkerEndPoint(Q,ee,ae,X,Z)});Q.setItemLayout(ee,te);var re=Q.getItemGraphicEl(ee);re.setShape("points",te)})}},this)},G.prototype.renderSeries=function(H,W,Z,X){var K=H.coordinateSystem,Q=H.id,ee=H.getData(),te=this.markerGroupMap,re=te.get(Q)||te.set(Q,{group:new Group$3});this.group.add(re.group),this.markKeep(re);var ae=createList(K,H,W);W.setData(ae),ae.each(function(ne){var ie=map$1(dimPermutations,function(ye){return getSingleMarkerEndPoint(ae,ne,ye,H,X)}),oe=K.getAxis("x").scale,se=K.getAxis("y").scale,le=oe.getExtent(),ue=se.getExtent(),ce=[oe.parse(ae.get("x0",ne)),oe.parse(ae.get("x1",ne))],fe=[se.parse(ae.get("y0",ne)),se.parse(ae.get("y1",ne))];asc$2(ce),asc$2(fe);var he=!(le[0]>ce[1]||le[1]<ce[0]||ue[0]>fe[1]||ue[1]<fe[0]),ve=!he;ae.setItemLayout(ne,{points:ie,allClipped:ve});var de=ae.getItemModel(ne),pe=de.getModel("itemStyle").getItemStyle(),ge=de.get("z2"),me=getVisualFromData(ee,"color");pe.fill||(pe.fill=me,isString(pe.fill)&&(pe.fill=modifyAlpha(pe.fill,.4))),pe.stroke||(pe.stroke=me),ae.setItemVisual(ne,"style",pe),ae.setItemVisual(ne,"z2",retrieve2(ge,0))}),ae.diff(inner$2(re).data).add(function(ne){var ie=ae.getItemLayout(ne),oe=ae.getItemVisual(ne,"z2");if(!ie.allClipped){var se=new Polygon({z2:retrieve2(oe,0),shape:{points:ie.points}});ae.setItemGraphicEl(ne,se),re.group.add(se)}}).update(function(ne,ie){var oe=inner$2(re).data.getItemGraphicEl(ie),se=ae.getItemLayout(ne),le=ae.getItemVisual(ne,"z2");se.allClipped?oe&&re.group.remove(oe):(oe?updateProps$1(oe,{z2:retrieve2(le,0),shape:{points:se.points}},W,ne):oe=new Polygon({shape:{points:se.points}}),ae.setItemGraphicEl(ne,oe),re.group.add(oe))}).remove(function(ne){var ie=inner$2(re).data.getItemGraphicEl(ne);re.group.remove(ie)}).execute(),ae.eachItemGraphicEl(function(ne,ie){var oe=ae.getItemModel(ie),se=ae.getItemVisual(ie,"style");ne.useStyle(ae.getItemVisual(ie,"style")),setLabelStyle(ne,getLabelStatesModels(oe),{labelFetcher:W,labelDataIndex:ie,defaultText:ae.getName(ie)||"",inheritColor:isString(se.fill)?modifyAlpha(se.fill,1):tokens.color.neutral99}),setStatesStylesFromModel(ne,oe),toggleHoverEmphasis(ne,null,null,oe.get(["emphasis","disabled"])),getECData(ne).dataModel=W}),inner$2(re).data=ae,re.group.silent=W.get("silent")||H.get("silent")},G.type="markArea",G})(MarkerView);function createList(U,G,H){var W,Z,X=["x0","y0","x1","y1"];if(U){var K=map$1(U&&U.dimensions,function(te){var re=G.getData(),ae=re.getDimensionInfo(re.mapDimension(te))||{};return extend(extend({},ae),{name:te,ordinalMeta:null})});Z=map$1(X,function(te,re){return{name:te,type:K[re%2].type}}),W=new SeriesData(Z,H)}else Z=[{name:"value",type:"float"}],W=new SeriesData(Z,H);var Q=map$1(H.get("data"),curry$1(markAreaTransform,G,U,H));U&&(Q=filter(Q,curry$1(markAreaFilter,U)));var ee=U?function(te,re,ae,ne){var ie=te.coord[Math.floor(ne/2)][ne%2];return parseDataValue(ie,Z[ne])}:function(te,re,ae,ne){return parseDataValue(te.value,Z[ne])};return W.initData(Q,null,ee),W.hasItemOption=!0,W}function install$e(U){U.registerComponentModel(MarkAreaModel),U.registerComponentView(MarkAreaView),U.registerPreprocessor(function(G){checkMarkerInSeries(G.series,"markArea")&&(G.markArea=G.markArea||{})})}var getDefaultSelectorOptions=function(U,G){if(G==="all")return{type:"all",title:U.getLocaleModel().get(["legend","selector","all"])};if(G==="inverse")return{type:"inverse",title:U.getLocaleModel().get(["legend","selector","inverse"])}},LegendModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.layoutMode={type:"box",ignoreSize:!0},H}return G.prototype.init=function(H,W,Z){this.mergeDefaultAndTheme(H,Z),H.selected=H.selected||{},this._updateSelector(H)},G.prototype.mergeOption=function(H,W){U.prototype.mergeOption.call(this,H,W),this._updateSelector(H)},G.prototype._updateSelector=function(H){var W=H.selector,Z=this.ecModel;W===!0&&(W=H.selector=["all","inverse"]),isArray$1(W)&&each$f(W,function(X,K){isString(X)&&(X={type:X}),W[K]=merge(X,getDefaultSelectorOptions(Z,X.type))})},G.prototype.optionUpdated=function(){this._updateData(this.ecModel);var H=this._data;if(H[0]&&this.get("selectedMode")==="single"){for(var W=!1,Z=0;Z<H.length;Z++){var X=H[Z].get("name");if(this.isSelected(X)){this.select(X),W=!0;break}}!W&&this.select(H[0].get("name"))}},G.prototype._updateData=function(H){var W=[],Z=[];H.eachRawSeries(function(ee){var te=ee.name;Z.push(te);var re;if(ee.legendVisualProvider){var ae=ee.legendVisualProvider,ne=ae.getAllNames();H.isSeriesFiltered(ee)||(Z=Z.concat(ne)),ne.length?W=W.concat(ne):re=!0}else re=!0;re&&isNameSpecified(ee)&&W.push(ee.name)}),this._availableNames=Z;var X=this.get("data")||W,K=createHashMap(),Q=map$1(X,function(ee){return(isString(ee)||isNumber(ee))&&(ee={name:ee}),K.get(ee.name)?null:(K.set(ee.name,!0),new Model(ee,this,this.ecModel))},this);this._data=filter(Q,function(ee){return!!ee})},G.prototype.getData=function(){return this._data},G.prototype.select=function(H){var W=this.option.selected,Z=this.get("selectedMode");if(Z==="single"){var X=this._data;each$f(X,function(K){W[K.get("name")]=!1})}W[H]=!0},G.prototype.unSelect=function(H){this.get("selectedMode")!=="single"&&(this.option.selected[H]=!1)},G.prototype.toggleSelected=function(H){var W=this.option.selected;W.hasOwnProperty(H)||(W[H]=!0),this[W[H]?"unSelect":"select"](H)},G.prototype.allSelect=function(){var H=this._data,W=this.option.selected;each$f(H,function(Z){W[Z.get("name",!0)]=!0})},G.prototype.inverseSelect=function(){var H=this._data,W=this.option.selected;each$f(H,function(Z){var X=Z.get("name",!0);W.hasOwnProperty(X)||(W[X]=!0),W[X]=!W[X]})},G.prototype.isSelected=function(H){var W=this.option.selected;return!(W.hasOwnProperty(H)&&!W[H])&&indexOf(this._availableNames,H)>=0},G.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},G.type="legend.plain",G.dependencies=["series"],G.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:tokens.size.m,align:"auto",backgroundColor:tokens.color.transparent,borderColor:tokens.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:tokens.color.disabled,inactiveBorderColor:tokens.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:tokens.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:tokens.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:tokens.color.tertiary,borderWidth:1,borderColor:tokens.color.border},emphasis:{selectorLabel:{show:!0,color:tokens.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},G})(ComponentModel),curry=curry$1,each$3=each$f,Group$1=Group$3,LegendView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.newlineDisabled=!1,H}return G.prototype.init=function(){this.group.add(this._contentGroup=new Group$1),this.group.add(this._selectorGroup=new Group$1),this._isFirstRender=!0},G.prototype.getContentGroup=function(){return this._contentGroup},G.prototype.getSelectorGroup=function(){return this._selectorGroup},G.prototype.render=function(H,W,Z){var X=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!H.get("show",!0)){var K=H.get("align"),Q=H.get("orient");(!K||K==="auto")&&(K=H.get("left")==="right"&&Q==="vertical"?"right":"left");var ee=H.get("selector",!0),te=H.get("selectorPosition",!0);ee&&(!te||te==="auto")&&(te=Q==="horizontal"?"end":"start"),this.renderInner(K,H,W,Z,ee,Q,te);var re=createBoxLayoutReference(H,Z).refContainer,ae=H.getBoxLayoutParams(),ne=H.get("padding"),ie=getLayoutRect(ae,re,ne),oe=this.layoutInner(H,K,ie,X,ee,te),se=getLayoutRect(defaults({width:oe.width,height:oe.height},ae),re,ne);this.group.x=se.x-oe.x,this.group.y=se.y-oe.y,this.group.markRedraw(),this.group.add(this._backgroundEl=makeBackground(oe,H))}},G.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},G.prototype.renderInner=function(H,W,Z,X,K,Q,ee){var te=this.getContentGroup(),re=createHashMap(),ae=W.get("selectedMode"),ne=W.get("triggerEvent"),ie=[];Z.eachRawSeries(function(oe){!oe.get("legendHoverLink")&&ie.push(oe.id)}),each$3(W.getData(),function(oe,se){var le=this,ue=oe.get("name");if(!this.newlineDisabled&&(ue===""||ue===`
|
|
52
|
+
`)){var ce=new Group$1;ce.newline=!0,te.add(ce);return}var fe=Z.getSeriesByName(ue)[0];if(!re.get(ue)){if(fe){var he=fe.getData(),ve=he.getVisual("legendLineStyle")||{},de=he.getVisual("legendIcon"),pe=he.getVisual("style"),ge=this._createItem(fe,ue,se,oe,W,H,ve,pe,de,ae,X);ge.on("click",curry(dispatchSelectAction,ue,null,X,ie)).on("mouseover",curry(dispatchHighlightAction,fe.name,null,X,ie)).on("mouseout",curry(dispatchDownplayAction,fe.name,null,X,ie)),Z.ssr&&ge.eachChild(function(me){var ye=getECData(me);ye.seriesIndex=fe.seriesIndex,ye.dataIndex=se,ye.ssrType="legend"}),ne&&ge.eachChild(function(me){le.packEventData(me,W,fe,se,ue)}),re.set(ue,!0)}else Z.eachRawSeries(function(me){var ye=this;if(!re.get(ue)&&me.legendVisualProvider){var _e=me.legendVisualProvider;if(!_e.containName(ue))return;var xe=_e.indexOfName(ue),Se=_e.getItemVisual(xe,"style"),Te=_e.getItemVisual(xe,"legendIcon"),be=parse(Se.fill);be&&be[3]===0&&(be[3]=.2,Se=extend(extend({},Se),{fill:stringify(be,"rgba")}));var Ae=this._createItem(me,ue,se,oe,W,H,{},Se,Te,ae,X);Ae.on("click",curry(dispatchSelectAction,null,ue,X,ie)).on("mouseover",curry(dispatchHighlightAction,null,ue,X,ie)).on("mouseout",curry(dispatchDownplayAction,null,ue,X,ie)),Z.ssr&&Ae.eachChild(function(we){var Ce=getECData(we);Ce.seriesIndex=me.seriesIndex,Ce.dataIndex=se,Ce.ssrType="legend"}),ne&&Ae.eachChild(function(we){ye.packEventData(we,W,me,se,ue)}),re.set(ue,!0)}},this);process.env.NODE_ENV!=="production"&&(re.get(ue)||console.warn(ue+" series not exists. Legend data should be same with series name or data name."))}},this),K&&this._createSelector(K,W,X,Q,ee)},G.prototype.packEventData=function(H,W,Z,X,K){var Q={componentType:"legend",componentIndex:W.componentIndex,dataIndex:X,value:K,seriesIndex:Z.seriesIndex};getECData(H).eventData=Q},G.prototype._createSelector=function(H,W,Z,X,K){var Q=this.getSelectorGroup();each$3(H,function(te){var re=te.type,ae=new ZRText({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){Z.dispatchAction({type:re==="all"?"legendAllSelect":"legendInverseSelect",legendId:W.id})}});Q.add(ae);var ne=W.getModel("selectorLabel"),ie=W.getModel(["emphasis","selectorLabel"]);setLabelStyle(ae,{normal:ne,emphasis:ie},{defaultText:te.title}),enableHoverEmphasis(ae)})},G.prototype._createItem=function(H,W,Z,X,K,Q,ee,te,re,ae,ne){var ie=H.visualDrawType,oe=K.get("itemWidth"),se=K.get("itemHeight"),le=K.isSelected(W),ue=X.get("symbolRotate"),ce=X.get("symbolKeepAspect"),fe=X.get("icon");re=fe||re||"roundRect";var he=getLegendStyle(re,X,ee,te,ie,le,ne),ve=new Group$1,de=X.getModel("textStyle");if(isFunction(H.getLegendIcon)&&(!fe||fe==="inherit"))ve.add(H.getLegendIcon({itemWidth:oe,itemHeight:se,icon:re,iconRotate:ue,itemStyle:he.itemStyle,lineStyle:he.lineStyle,symbolKeepAspect:ce}));else{var pe=fe==="inherit"&&H.getData().getVisual("symbol")?ue==="inherit"?H.getData().getVisual("symbolRotate"):ue:0;ve.add(getDefaultLegendIcon({itemWidth:oe,itemHeight:se,icon:re,iconRotate:pe,itemStyle:he.itemStyle,symbolKeepAspect:ce}))}var ge=Q==="left"?oe+5:-5,me=Q,ye=K.get("formatter"),_e=W;isString(ye)&&ye?_e=ye.replace("{name}",W??""):isFunction(ye)&&(_e=ye(W));var xe=le?de.getTextColor():X.get("inactiveColor");ve.add(new ZRText({style:createTextStyle(de,{text:_e,x:ge,y:se/2,fill:xe,align:me,verticalAlign:"middle"},{inheritColor:xe})}));var Se=new Rect$2({shape:ve.getBoundingRect(),style:{fill:"transparent"}}),Te=X.getModel("tooltip");return Te.get("show")&&setTooltipConfig({el:Se,componentModel:K,itemName:W,itemTooltipOption:Te.option}),ve.add(Se),ve.eachChild(function(be){be.silent=!0}),Se.silent=!ae,this.getContentGroup().add(ve),enableHoverEmphasis(ve),ve.__legendDataIndex=Z,ve},G.prototype.layoutInner=function(H,W,Z,X,K,Q){var ee=this.getContentGroup(),te=this.getSelectorGroup();box(H.get("orient"),ee,H.get("itemGap"),Z.width,Z.height);var re=ee.getBoundingRect(),ae=[-re.x,-re.y];if(te.markRedraw(),ee.markRedraw(),K){box("horizontal",te,H.get("selectorItemGap",!0));var ne=te.getBoundingRect(),ie=[-ne.x,-ne.y],oe=H.get("selectorButtonGap",!0),se=H.getOrient().index,le=se===0?"width":"height",ue=se===0?"height":"width",ce=se===0?"y":"x";Q==="end"?ie[se]+=re[le]+oe:ae[se]+=ne[le]+oe,ie[1-se]+=re[ue]/2-ne[ue]/2,te.x=ie[0],te.y=ie[1],ee.x=ae[0],ee.y=ae[1];var fe={x:0,y:0};return fe[le]=re[le]+oe+ne[le],fe[ue]=Math.max(re[ue],ne[ue]),fe[ce]=Math.min(0,ne[ce]+ie[1-se]),fe}else return ee.x=ae[0],ee.y=ae[1],this.group.getBoundingRect()},G.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},G.type="legend.plain",G})(ComponentView);function getLegendStyle(U,G,H,W,Z,X,K){function Q(le,ue){le.lineWidth==="auto"&&(le.lineWidth=ue.lineWidth>0?2:0),each$3(le,function(ce,fe){le[fe]==="inherit"&&(le[fe]=ue[fe])})}var ee=G.getModel("itemStyle"),te=ee.getItemStyle(),re=U.lastIndexOf("empty",0)===0?"fill":"stroke",ae=ee.getShallow("decal");te.decal=!ae||ae==="inherit"?W.decal:createOrUpdatePatternFromDecal(ae,K),te.fill==="inherit"&&(te.fill=W[Z]),te.stroke==="inherit"&&(te.stroke=W[re]),te.opacity==="inherit"&&(te.opacity=(Z==="fill"?W:H).opacity),Q(te,W);var ne=G.getModel("lineStyle"),ie=ne.getLineStyle();if(Q(ie,H),te.fill==="auto"&&(te.fill=W.fill),te.stroke==="auto"&&(te.stroke=W.fill),ie.stroke==="auto"&&(ie.stroke=W.fill),!X){var oe=G.get("inactiveBorderWidth"),se=te[re];te.lineWidth=oe==="auto"?W.lineWidth>0&&se?2:0:te.lineWidth,te.fill=G.get("inactiveColor"),te.stroke=G.get("inactiveBorderColor"),ie.stroke=ne.get("inactiveColor"),ie.lineWidth=ne.get("inactiveWidth")}return{itemStyle:te,lineStyle:ie}}function getDefaultLegendIcon(U){var G=U.icon||"roundRect",H=createSymbol$1(G,0,0,U.itemWidth,U.itemHeight,U.itemStyle.fill,U.symbolKeepAspect);return H.setStyle(U.itemStyle),H.rotation=(U.iconRotate||0)*Math.PI/180,H.setOrigin([U.itemWidth/2,U.itemHeight/2]),G.indexOf("empty")>-1&&(H.style.stroke=H.style.fill,H.style.fill=tokens.color.neutral00,H.style.lineWidth=2),H}function dispatchSelectAction(U,G,H,W){dispatchDownplayAction(U,G,H,W),H.dispatchAction({type:"legendToggleSelect",name:U??G}),dispatchHighlightAction(U,G,H,W)}function isUseHoverLayer(U){for(var G=U.getZr().storage.getDisplayList(),H,W=0,Z=G.length;W<Z&&!(H=G[W].states.emphasis);)W++;return H&&H.hoverLayer}function dispatchHighlightAction(U,G,H,W){isUseHoverLayer(H)||H.dispatchAction({type:"highlight",seriesName:U,name:G,excludeSeriesId:W})}function dispatchDownplayAction(U,G,H,W){isUseHoverLayer(H)||H.dispatchAction({type:"downplay",seriesName:U,name:G,excludeSeriesId:W})}function legendFilter(U){var G=U.findComponents({mainType:"legend"});G&&G.length&&U.filterSeries(function(H){for(var W=0;W<G.length;W++)if(!G[W].isSelected(H.name))return!1;return!0})}function legendSelectActionHandler(U,G,H){var W=U==="allSelect"||U==="inverseSelect",Z={},X=[];H.eachComponent({mainType:"legend",query:G},function(Q){W?Q[U]():Q[U](G.name),makeSelectedMap(Q,Z),X.push(Q.componentIndex)});var K={};return H.eachComponent("legend",function(Q){each$f(Z,function(ee,te){Q[ee?"select":"unSelect"](te)}),makeSelectedMap(Q,K)}),W?{selected:K,legendIndex:X}:{name:G.name,selected:K}}function makeSelectedMap(U,G){var H=G||{};return each$f(U.getData(),function(W){var Z=W.get("name");if(!(Z===`
|
|
53
|
+
`||Z==="")){var X=U.isSelected(Z);hasOwn(H,Z)?H[Z]=H[Z]&&X:H[Z]=X}}),H}function installLegendAction(U){U.registerAction("legendToggleSelect","legendselectchanged",curry$1(legendSelectActionHandler,"toggleSelected")),U.registerAction("legendAllSelect","legendselectall",curry$1(legendSelectActionHandler,"allSelect")),U.registerAction("legendInverseSelect","legendinverseselect",curry$1(legendSelectActionHandler,"inverseSelect")),U.registerAction("legendSelect","legendselected",curry$1(legendSelectActionHandler,"select")),U.registerAction("legendUnSelect","legendunselected",curry$1(legendSelectActionHandler,"unSelect"))}function install$d(U){U.registerComponentModel(LegendModel),U.registerComponentView(LegendView),U.registerProcessor(U.PRIORITY.PROCESSOR.SERIES_FILTER,legendFilter),U.registerSubTypeDefaulter("legend",function(){return"plain"}),installLegendAction(U)}var ScrollableLegendModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.setScrollDataIndex=function(H){this.option.scrollDataIndex=H},G.prototype.init=function(H,W,Z){var X=getLayoutParams(H);U.prototype.init.call(this,H,W,Z),mergeAndNormalizeLayoutParams(this,H,X)},G.prototype.mergeOption=function(H,W){U.prototype.mergeOption.call(this,H,W),mergeAndNormalizeLayoutParams(this,this.option,H)},G.type="legend.scroll",G.defaultOption=inheritDefaultOption(LegendModel.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:tokens.color.accent50,pageIconInactiveColor:tokens.color.accent10,pageIconSize:15,pageTextStyle:{color:tokens.color.tertiary},animationDurationUpdate:800}),G})(LegendModel);function mergeAndNormalizeLayoutParams(U,G,H){var W=U.getOrient(),Z=[1,1];Z[W.index]=0,mergeLayoutParam(G,H,{type:"box",ignoreSize:!!Z})}var Group=Group$3,WH=["width","height"],XY=["x","y"],ScrollableLegendView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.newlineDisabled=!0,H._currentIndex=0,H}return G.prototype.init=function(){U.prototype.init.call(this),this.group.add(this._containerGroup=new Group),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Group)},G.prototype.resetInner=function(){U.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},G.prototype.renderInner=function(H,W,Z,X,K,Q,ee){var te=this;U.prototype.renderInner.call(this,H,W,Z,X,K,Q,ee);var re=this._controllerGroup,ae=W.get("pageIconSize",!0),ne=isArray$1(ae)?ae:[ae,ae];oe("pagePrev",0);var ie=W.getModel("pageTextStyle");re.add(new ZRText({name:"pageText",style:{text:"xx/xx",fill:ie.getTextColor(),font:ie.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),oe("pageNext",1);function oe(se,le){var ue=se+"DataIndex",ce=createIcon(W.get("pageIcons",!0)[W.getOrient().name][le],{onclick:bind$1(te._pageGo,te,ue,W,X)},{x:-ne[0]/2,y:-ne[1]/2,width:ne[0],height:ne[1]});ce.name=se,re.add(ce)}},G.prototype.layoutInner=function(H,W,Z,X,K,Q){var ee=this.getSelectorGroup(),te=H.getOrient().index,re=WH[te],ae=XY[te],ne=WH[1-te],ie=XY[1-te];K&&box("horizontal",ee,H.get("selectorItemGap",!0));var oe=H.get("selectorButtonGap",!0),se=ee.getBoundingRect(),le=[-se.x,-se.y],ue=clone$4(Z);K&&(ue[re]=Z[re]-se[re]-oe);var ce=this._layoutContentAndController(H,X,ue,te,re,ne,ie,ae);if(K){if(Q==="end")le[te]+=ce[re]+oe;else{var fe=se[re]+oe;le[te]-=fe,ce[ae]-=fe}ce[re]+=se[re]+oe,le[1-te]+=ce[ie]+ce[ne]/2-se[ne]/2,ce[ne]=Math.max(ce[ne],se[ne]),ce[ie]=Math.min(ce[ie],se[ie]+le[1-te]),ee.x=le[0],ee.y=le[1],ee.markRedraw()}return ce},G.prototype._layoutContentAndController=function(H,W,Z,X,K,Q,ee,te){var re=this.getContentGroup(),ae=this._containerGroup,ne=this._controllerGroup;box(H.get("orient"),re,H.get("itemGap"),X?Z.width:null,X?null:Z.height),box("horizontal",ne,H.get("pageButtonItemGap",!0));var ie=re.getBoundingRect(),oe=ne.getBoundingRect(),se=this._showController=ie[K]>Z[K],le=[-ie.x,-ie.y];W||(le[X]=re[te]);var ue=[0,0],ce=[-oe.x,-oe.y],fe=retrieve2(H.get("pageButtonGap",!0),H.get("itemGap",!0));if(se){var he=H.get("pageButtonPosition",!0);he==="end"?ce[X]+=Z[K]-oe[K]:ue[X]+=oe[K]+fe}ce[1-X]+=ie[Q]/2-oe[Q]/2,re.setPosition(le),ae.setPosition(ue),ne.setPosition(ce);var ve={x:0,y:0};if(ve[K]=se?Z[K]:ie[K],ve[Q]=Math.max(ie[Q],oe[Q]),ve[ee]=Math.min(0,oe[ee]+ce[1-X]),ae.__rectSize=Z[K],se){var de={x:0,y:0};de[K]=Math.max(Z[K]-oe[K]-fe,0),de[Q]=ve[Q],ae.setClipPath(new Rect$2({shape:de})),ae.__rectSize=de[K]}else ne.eachChild(function(ge){ge.attr({invisible:!0,silent:!0})});var pe=this._getPageInfo(H);return pe.pageIndex!=null&&updateProps$1(re,{x:pe.contentPosition[0],y:pe.contentPosition[1]},se?H:null),this._updatePageInfoView(H,pe),ve},G.prototype._pageGo=function(H,W,Z){var X=this._getPageInfo(W)[H];X!=null&&Z.dispatchAction({type:"legendScroll",scrollDataIndex:X,legendId:W.id})},G.prototype._updatePageInfoView=function(H,W){var Z=this._controllerGroup;each$f(["pagePrev","pageNext"],function(re){var ae=re+"DataIndex",ne=W[ae]!=null,ie=Z.childOfName(re);ie&&(ie.setStyle("fill",ne?H.get("pageIconColor",!0):H.get("pageIconInactiveColor",!0)),ie.cursor=ne?"pointer":"default")});var X=Z.childOfName("pageText"),K=H.get("pageFormatter"),Q=W.pageIndex,ee=Q!=null?Q+1:0,te=W.pageCount;X&&K&&X.setStyle("text",isString(K)?K.replace("{current}",ee==null?"":ee+"").replace("{total}",te==null?"":te+""):K({current:ee,total:te}))},G.prototype._getPageInfo=function(H){var W=H.get("scrollDataIndex",!0),Z=this.getContentGroup(),X=this._containerGroup.__rectSize,K=H.getOrient().index,Q=WH[K],ee=XY[K],te=this._findTargetItemIndex(W),re=Z.children(),ae=re[te],ne=re.length,ie=ne?1:0,oe={contentPosition:[Z.x,Z.y],pageCount:ie,pageIndex:ie-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!ae)return oe;var se=he(ae);oe.contentPosition[K]=-se.s;for(var le=te+1,ue=se,ce=se,fe=null;le<=ne;++le)fe=he(re[le]),(!fe&&ce.e>ue.s+X||fe&&!ve(fe,ue.s))&&(ce.i>ue.i?ue=ce:ue=fe,ue&&(oe.pageNextDataIndex==null&&(oe.pageNextDataIndex=ue.i),++oe.pageCount)),ce=fe;for(var le=te-1,ue=se,ce=se,fe=null;le>=-1;--le)fe=he(re[le]),(!fe||!ve(ce,fe.s))&&ue.i<ce.i&&(ce=ue,oe.pagePrevDataIndex==null&&(oe.pagePrevDataIndex=ue.i),++oe.pageCount,++oe.pageIndex),ue=fe;return oe;function he(de){if(de){var pe=de.getBoundingRect(),ge=pe[ee]+de[ee];return{s:ge,e:ge+pe[Q],i:de.__legendDataIndex}}}function ve(de,pe){return de.e>=pe&&de.s<=pe+X}},G.prototype._findTargetItemIndex=function(H){if(!this._showController)return 0;var W,Z=this.getContentGroup(),X;return Z.eachChild(function(K,Q){var ee=K.__legendDataIndex;X==null&&ee!=null&&(X=Q),ee===H&&(W=Q)}),W??X},G.type="legend.scroll",G})(LegendView);function installScrollableLegendAction(U){U.registerAction("legendScroll","legendscroll",function(G,H){var W=G.scrollDataIndex;W!=null&&H.eachComponent({mainType:"legend",subType:"scroll",query:G},function(Z){Z.setScrollDataIndex(W)})})}function install$c(U){use(install$d),U.registerComponentModel(ScrollableLegendModel),U.registerComponentView(ScrollableLegendView),installScrollableLegendAction(U)}function install$b(U){use(install$d),use(install$c)}var InsideZoomModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="dataZoom.inside",G.defaultOption=inheritDefaultOption(DataZoomModel.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),G})(DataZoomModel),inner$1=makeInner();function setViewInfoToCoordSysRecord(U,G,H){inner$1(U).coordSysRecordMap.each(function(W){var Z=W.dataZoomInfoMap.get(G.uid);Z&&(Z.getRange=H)})}function disposeCoordSysRecordIfNeeded(U,G){for(var H=inner$1(U).coordSysRecordMap,W=H.keys(),Z=0;Z<W.length;Z++){var X=W[Z],K=H.get(X),Q=K.dataZoomInfoMap;if(Q){var ee=G.uid,te=Q.get(ee);te&&(Q.removeKey(ee),Q.keys().length||disposeCoordSysRecord(H,K))}}}function disposeCoordSysRecord(U,G){if(G){U.removeKey(G.model.uid);var H=G.controller;H&&H.dispose()}}function createCoordSysRecord(U,G){var H={model:G,containsPoint:curry$1(containsPoint,G),dispatchAction:curry$1(dispatchAction,U),dataZoomInfoMap:null,controller:null},W=H.controller=new RoamController(U.getZr());return each$f(["pan","zoom","scrollMove"],function(Z){W.on(Z,function(X){var K=[];H.dataZoomInfoMap.each(function(Q){if(X.isAvailableBehavior(Q.model.option)){var ee=(Q.getRange||{})[Z],te=ee&&ee(Q.dzReferCoordSysInfo,H.model.mainType,H.controller,X);!Q.model.get("disabled",!0)&&te&&K.push({dataZoomId:Q.model.id,start:te[0],end:te[1]})}}),K.length&&H.dispatchAction(K)})}),H}function dispatchAction(U,G){U.isDisposed()||U.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:G})}function containsPoint(U,G,H,W){return U.coordinateSystem.containPoint([H,W])}function mergeControllerParams(U,G,H){var W,Z="type_",X={type_true:2,type_move:1,type_false:0,type_undefined:-1},K=!0;return U.each(function(Q){var ee=Q.model,te=ee.get("disabled",!0)?!1:ee.get("zoomLock",!0)?"move":!0;X[Z+te]>X[Z+W]&&(W=te),K=K&&ee.get("preventDefaultMouseMove",!0)}),{controlType:W,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!K,api:H,zInfo:{component:G.model},triggerInfo:{roamTrigger:null,isInSelf:G.containsPoint}}}}function installDataZoomRoamProcessor(U){U.registerProcessor(U.PRIORITY.PROCESSOR.FILTER,function(G,H){var W=inner$1(H),Z=W.coordSysRecordMap||(W.coordSysRecordMap=createHashMap());Z.each(function(X){X.dataZoomInfoMap=null}),G.eachComponent({mainType:"dataZoom",subType:"inside"},function(X){var K=collectReferCoordSysModelInfo(X);each$f(K.infoList,function(Q){var ee=Q.model.uid,te=Z.get(ee)||Z.set(ee,createCoordSysRecord(H,Q.model)),re=te.dataZoomInfoMap||(te.dataZoomInfoMap=createHashMap());re.set(X.uid,{dzReferCoordSysInfo:Q,model:X,getRange:null})})}),Z.each(function(X){var K=X.controller,Q,ee=X.dataZoomInfoMap;if(ee){var te=ee.keys()[0];te!=null&&(Q=ee.get(te))}if(!Q){disposeCoordSysRecord(Z,X);return}var re=mergeControllerParams(ee,X,H);K.enable(re.controlType,re.opt),createOrUpdate(X,"dispatchAction",Q.model.get("throttle",!0),"fixRate")})})}var InsideZoomView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type="dataZoom.inside",H}return G.prototype.render=function(H,W,Z){if(U.prototype.render.apply(this,arguments),H.noTarget()){this._clear();return}this.range=H.getPercentRange(),setViewInfoToCoordSysRecord(Z,H,{pan:bind$1(getRangeHandlers.pan,this),zoom:bind$1(getRangeHandlers.zoom,this),scrollMove:bind$1(getRangeHandlers.scrollMove,this)})},G.prototype.dispose=function(){this._clear(),U.prototype.dispose.apply(this,arguments)},G.prototype._clear=function(){disposeCoordSysRecordIfNeeded(this.api,this.dataZoomModel),this.range=null},G.type="dataZoom.inside",G})(DataZoomView),getRangeHandlers={zoom:function(U,G,H,W){var Z=this.range,X=Z.slice(),K=U.axisModels[0];if(K){var Q=getDirectionInfo[G](null,[W.originX,W.originY],K,H,U),ee=(Q.signal>0?Q.pixelStart+Q.pixelLength-Q.pixel:Q.pixel-Q.pixelStart)/Q.pixelLength*(X[1]-X[0])+X[0],te=Math.max(1/W.scale,0);X[0]=(X[0]-ee)*te+ee,X[1]=(X[1]-ee)*te+ee;var re=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(sliderMove(0,X,[0,100],0,re.minSpan,re.maxSpan),this.range=X,Z[0]!==X[0]||Z[1]!==X[1])return X}},pan:makeMover(function(U,G,H,W,Z,X){var K=getDirectionInfo[W]([X.oldX,X.oldY],[X.newX,X.newY],G,Z,H);return K.signal*(U[1]-U[0])*K.pixel/K.pixelLength}),scrollMove:makeMover(function(U,G,H,W,Z,X){var K=getDirectionInfo[W]([0,0],[X.scrollDelta,X.scrollDelta],G,Z,H);return K.signal*(U[1]-U[0])*X.scrollDelta})};function makeMover(U){return function(G,H,W,Z){var X=this.range,K=X.slice(),Q=G.axisModels[0];if(Q){var ee=U(K,Q,G,H,W,Z);if(sliderMove(ee,K,[0,100],"all"),this.range=K,X[0]!==K[0]||X[1]!==K[1])return K}}}var getDirectionInfo={grid:function(U,G,H,W,Z){var X=H.axis,K={},Q=Z.model.coordinateSystem.getRect();return U=U||[0,0],X.dim==="x"?(K.pixel=G[0]-U[0],K.pixelLength=Q.width,K.pixelStart=Q.x,K.signal=X.inverse?1:-1):(K.pixel=G[1]-U[1],K.pixelLength=Q.height,K.pixelStart=Q.y,K.signal=X.inverse?-1:1),K},polar:function(U,G,H,W,Z){var X=H.axis,K={},Q=Z.model.coordinateSystem,ee=Q.getRadiusAxis().getExtent(),te=Q.getAngleAxis().getExtent();return U=U?Q.pointToCoord(U):[0,0],G=Q.pointToCoord(G),H.mainType==="radiusAxis"?(K.pixel=G[0]-U[0],K.pixelLength=ee[1]-ee[0],K.pixelStart=ee[0],K.signal=X.inverse?1:-1):(K.pixel=G[1]-U[1],K.pixelLength=te[1]-te[0],K.pixelStart=te[0],K.signal=X.inverse?-1:1),K},singleAxis:function(U,G,H,W,Z){var X=H.axis,K=Z.model.coordinateSystem.getRect(),Q={};return U=U||[0,0],X.orient==="horizontal"?(Q.pixel=G[0]-U[0],Q.pixelLength=K.width,Q.pixelStart=K.x,Q.signal=X.inverse?1:-1):(Q.pixel=G[1]-U[1],Q.pixelLength=K.height,Q.pixelStart=K.y,Q.signal=X.inverse?-1:1),Q}};function install$a(U){installCommon$1(U),U.registerComponentModel(InsideZoomModel),U.registerComponentView(InsideZoomView),installDataZoomRoamProcessor(U)}var SliderZoomModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.type="dataZoom.slider",G.layoutMode="box",G.defaultOption=inheritDefaultOption(DataZoomModel.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:tokens.color.accent10,borderRadius:0,backgroundColor:tokens.color.transparent,dataBackground:{lineStyle:{color:tokens.color.accent30,width:.5},areaStyle:{color:tokens.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:tokens.color.accent40,width:.5},areaStyle:{color:tokens.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:tokens.color.neutral00,borderColor:tokens.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:tokens.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:tokens.color.tertiary},brushSelect:!0,brushStyle:{color:tokens.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:tokens.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),G})(DataZoomModel),Rect=Rect$2,DEFAULT_FRAME_BORDER_WIDTH=1,DEFAULT_FILLER_SIZE=30,DEFAULT_MOVE_HANDLE_SIZE=7,HORIZONTAL="horizontal",VERTICAL="vertical",LABEL_GAP=5,SHOW_DATA_SHADOW_SERIES_TYPE=["line","bar","candlestick","scatter"],REALTIME_ANIMATION_CONFIG={easing:"cubicOut",duration:100,delay:0},SliderZoomView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H._displayables={},H}return G.prototype.init=function(H,W){this.api=W,this._onBrush=bind$1(this._onBrush,this),this._onBrushEnd=bind$1(this._onBrushEnd,this)},G.prototype.render=function(H,W,Z,X){if(U.prototype.render.apply(this,arguments),createOrUpdate(this,"_dispatchZoomAction",H.get("throttle"),"fixRate"),this._orient=H.getOrient(),H.get("show")===!1){this.group.removeAll();return}if(H.noTarget()){this._clear(),this.group.removeAll();return}(!X||X.type!=="dataZoom"||X.from!==this.uid)&&this._buildView(),this._updateView()},G.prototype.dispose=function(){this._clear(),U.prototype.dispose.apply(this,arguments)},G.prototype._clear=function(){clear$1(this,"_dispatchZoomAction");var H=this.api.getZr();H.off("mousemove",this._onBrush),H.off("mouseup",this._onBrushEnd)},G.prototype._buildView=function(){var H=this.group;H.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var W=this._displayables.sliderGroup=new Group$3;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),H.add(W),this._positionGroup()},G.prototype._resetLocation=function(){var H=this.dataZoomModel,W=this.api,Z=H.get("brushSelect"),X=Z?DEFAULT_MOVE_HANDLE_SIZE:0,K=createBoxLayoutReference(H,W).refContainer,Q=this._findCoordRect(),ee=H.get("defaultLocationEdgeGap",!0)||0,te=this._orient===HORIZONTAL?{right:K.width-Q.x-Q.width,top:K.height-DEFAULT_FILLER_SIZE-ee-X,width:Q.width,height:DEFAULT_FILLER_SIZE}:{right:ee,top:Q.y,width:DEFAULT_FILLER_SIZE,height:Q.height},re=getLayoutParams(H.option);each$f(["right","top","width","height"],function(ne){re[ne]==="ph"&&(re[ne]=te[ne])});var ae=getLayoutRect(re,K);this._location={x:ae.x,y:ae.y},this._size=[ae.width,ae.height],this._orient===VERTICAL&&this._size.reverse()},G.prototype._positionGroup=function(){var H=this.group,W=this._location,Z=this._orient,X=this.dataZoomModel.getFirstTargetAxisModel(),K=X&&X.get("inverse"),Q=this._displayables.sliderGroup,ee=(this._dataShadowInfo||{}).otherAxisInverse;Q.attr(Z===HORIZONTAL&&!K?{scaleY:ee?1:-1,scaleX:1}:Z===HORIZONTAL&&K?{scaleY:ee?1:-1,scaleX:-1}:Z===VERTICAL&&!K?{scaleY:ee?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:ee?-1:1,scaleX:-1,rotation:Math.PI/2});var te=H.getBoundingRect([Q]);H.x=W.x-te.x,H.y=W.y-te.y,H.markRedraw()},G.prototype._getViewExtent=function(){return[0,this._size[0]]},G.prototype._renderBackground=function(){var H=this.dataZoomModel,W=this._size,Z=this._displayables.sliderGroup,X=H.get("brushSelect");Z.add(new Rect({silent:!0,shape:{x:0,y:0,width:W[0],height:W[1]},style:{fill:H.get("backgroundColor")},z2:-40}));var K=new Rect({shape:{x:0,y:0,width:W[0],height:W[1]},style:{fill:"transparent"},z2:0,onclick:bind$1(this._onClickPanel,this)}),Q=this.api.getZr();X?(K.on("mousedown",this._onBrushStart,this),K.cursor="crosshair",Q.on("mousemove",this._onBrush),Q.on("mouseup",this._onBrushEnd)):(Q.off("mousemove",this._onBrush),Q.off("mouseup",this._onBrushEnd)),Z.add(K)},G.prototype._renderDataShadow=function(){var H=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!H)return;var W=this._size,Z=this._shadowSize||[],X=H.series,K=X.getRawData(),Q=X.getShadowDim&&X.getShadowDim(),ee=Q&&K.getDimensionInfo(Q)?X.getShadowDim():H.otherDim;if(ee==null)return;var te=this._shadowPolygonPts,re=this._shadowPolylinePts;if(K!==this._shadowData||ee!==this._shadowDim||W[0]!==Z[0]||W[1]!==Z[1]){var ae=K.getDataExtent(H.thisDim),ne=K.getDataExtent(ee),ie=(ne[1]-ne[0])*.3;ne=[ne[0]-ie,ne[1]+ie];var oe=[0,W[1]],se=[0,W[0]],le=[[W[0],0],[0,0]],ue=[],ce=se[1]/Math.max(1,K.count()-1),fe=W[0]/(ae[1]-ae[0]),he=H.thisAxis.type==="time",ve=-ce,de=Math.round(K.count()/W[0]),pe;K.each([H.thisDim,ee],function(xe,Se,Te){if(de>0&&Te%de){he||(ve+=ce);return}ve=he?(+xe-ae[0])*fe:ve+ce;var be=Se==null||isNaN(Se)||Se==="",Ae=be?0:linearMap$2(Se,ne,oe,!0);be&&!pe&&Te?(le.push([le[le.length-1][0],0]),ue.push([ue[ue.length-1][0],0])):!be&&pe&&(le.push([ve,0]),ue.push([ve,0])),be||(le.push([ve,Ae]),ue.push([ve,Ae])),pe=be}),te=this._shadowPolygonPts=le,re=this._shadowPolylinePts=ue}this._shadowData=K,this._shadowDim=ee,this._shadowSize=[W[0],W[1]];var ge=this.dataZoomModel;function me(xe){var Se=ge.getModel(xe?"selectedDataBackground":"dataBackground"),Te=new Group$3,be=new Polygon({shape:{points:te},segmentIgnoreThreshold:1,style:Se.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),Ae=new Polyline$1({shape:{points:re},segmentIgnoreThreshold:1,style:Se.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return Te.add(be),Te.add(Ae),Te}for(var ye=0;ye<3;ye++){var _e=me(ye===1);this._displayables.sliderGroup.add(_e),this._displayables.dataShadowSegs.push(_e)}},G.prototype._prepareDataShadowInfo=function(){var H=this.dataZoomModel,W=H.get("showDataShadow");if(W!==!1){var Z,X=this.ecModel;return H.eachTargetAxis(function(K,Q){var ee=H.getAxisProxy(K,Q).getTargetSeriesModels();each$f(ee,function(te){if(!Z&&!(W!==!0&&indexOf(SHOW_DATA_SHADOW_SERIES_TYPE,te.get("type"))<0)){var re=X.getComponent(getAxisMainType(K),Q).axis,ae=getOtherDim(K),ne,ie=te.coordinateSystem;ae!=null&&ie.getOtherAxis&&(ne=ie.getOtherAxis(re).inverse),ae=te.getData().mapDimension(ae);var oe=te.getData().mapDimension(K);Z={thisAxis:re,series:te,thisDim:oe,otherDim:ae,otherAxisInverse:ne}}},this)},this),Z}},G.prototype._renderHandle=function(){var H=this.group,W=this._displayables,Z=W.handles=[null,null],X=W.handleLabels=[null,null],K=this._displayables.sliderGroup,Q=this._size,ee=this.dataZoomModel,te=this.api,re=ee.get("borderRadius")||0,ae=ee.get("brushSelect"),ne=W.filler=new Rect({silent:ae,style:{fill:ee.get("fillerColor")},textConfig:{position:"inside"}});K.add(ne),K.add(new Rect({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:Q[0],height:Q[1],r:re},style:{stroke:ee.get("dataBackgroundColor")||ee.get("borderColor"),lineWidth:DEFAULT_FRAME_BORDER_WIDTH,fill:tokens.color.transparent}})),each$f([0,1],function(fe){var he=ee.get("handleIcon");!symbolBuildProxies[he]&&he.indexOf("path://")<0&&he.indexOf("image://")<0&&(he="path://"+he,process.env.NODE_ENV!=="production"&&deprecateLog("handleIcon now needs 'path://' prefix when using a path string"));var ve=createSymbol$1(he,-1,0,2,2,null,!0);ve.attr({cursor:getCursor$1(this._orient),draggable:!0,drift:bind$1(this._onDragMove,this,fe),ondragend:bind$1(this._onDragEnd,this),onmouseover:bind$1(this._showDataInfo,this,!0),onmouseout:bind$1(this._showDataInfo,this,!1),z2:5});var de=ve.getBoundingRect(),pe=ee.get("handleSize");this._handleHeight=parsePercent(pe,this._size[1]),this._handleWidth=de.width/de.height*this._handleHeight,ve.setStyle(ee.getModel("handleStyle").getItemStyle()),ve.style.strokeNoScale=!0,ve.rectHover=!0,ve.ensureState("emphasis").style=ee.getModel(["emphasis","handleStyle"]).getItemStyle(),enableHoverEmphasis(ve);var ge=ee.get("handleColor");ge!=null&&(ve.style.fill=ge),K.add(Z[fe]=ve);var me=ee.getModel("textStyle"),ye=ee.get("handleLabel")||{},_e=ye.show||!1;H.add(X[fe]=new ZRText({silent:!0,invisible:!_e,style:createTextStyle(me,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:me.getTextColor(),font:me.getFont()}),z2:10}))},this);var ie=ne;if(ae){var oe=parsePercent(ee.get("moveHandleSize"),Q[1]),se=W.moveHandle=new Rect$2({style:ee.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:Q[1]-.5,height:oe}}),le=oe*.8,ue=W.moveHandleIcon=createSymbol$1(ee.get("moveHandleIcon"),-le/2,-le/2,le,le,tokens.color.neutral00,!0);ue.silent=!0,ue.y=Q[1]+oe/2-.5,se.ensureState("emphasis").style=ee.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var ce=Math.min(Q[1]/2,Math.max(oe,10));ie=W.moveZone=new Rect$2({invisible:!0,shape:{y:Q[1]-ce,height:oe+ce}}),ie.on("mouseover",function(){te.enterEmphasis(se)}).on("mouseout",function(){te.leaveEmphasis(se)}),K.add(se),K.add(ue),K.add(ie)}ie.attr({draggable:!0,cursor:"default",drift:bind$1(this._onDragMove,this,"all"),ondragstart:bind$1(this._showDataInfo,this,!0),ondragend:bind$1(this._onDragEnd,this),onmouseover:bind$1(this._showDataInfo,this,!0),onmouseout:bind$1(this._showDataInfo,this,!1)})},G.prototype._resetInterval=function(){var H=this._range=this.dataZoomModel.getPercentRange(),W=this._getViewExtent();this._handleEnds=[linearMap$2(H[0],[0,100],W,!0),linearMap$2(H[1],[0,100],W,!0)]},G.prototype._updateInterval=function(H,W){var Z=this.dataZoomModel,X=this._handleEnds,K=this._getViewExtent(),Q=Z.findRepresentativeAxisProxy().getMinMaxSpan(),ee=[0,100];sliderMove(W,X,K,Z.get("zoomLock")?"all":H,Q.minSpan!=null?linearMap$2(Q.minSpan,ee,K,!0):null,Q.maxSpan!=null?linearMap$2(Q.maxSpan,ee,K,!0):null);var te=this._range,re=this._range=asc$2([linearMap$2(X[0],K,ee,!0),linearMap$2(X[1],K,ee,!0)]);return!te||te[0]!==re[0]||te[1]!==re[1]},G.prototype._updateView=function(H){var W=this._displayables,Z=this._handleEnds,X=asc$2(Z.slice()),K=this._size;each$f([0,1],function(ie){var oe=W.handles[ie],se=this._handleHeight;oe.attr({scaleX:se/2,scaleY:se/2,x:Z[ie]+(ie?-1:1),y:K[1]/2-se/2})},this),W.filler.setShape({x:X[0],y:0,width:X[1]-X[0],height:K[1]});var Q={x:X[0],width:X[1]-X[0]};W.moveHandle&&(W.moveHandle.setShape(Q),W.moveZone.setShape(Q),W.moveZone.getBoundingRect(),W.moveHandleIcon&&W.moveHandleIcon.attr("x",Q.x+Q.width/2));for(var ee=W.dataShadowSegs,te=[0,X[0],X[1],K[0]],re=0;re<ee.length;re++){var ae=ee[re],ne=ae.getClipPath();ne||(ne=new Rect$2,ae.setClipPath(ne)),ne.setShape({x:te[re],y:0,width:te[re+1]-te[re],height:K[1]})}this._updateDataInfo(H)},G.prototype._updateDataInfo=function(H){var W=this.dataZoomModel,Z=this._displayables,X=Z.handleLabels,K=this._orient,Q=["",""];if(W.get("showDetail")){var ee=W.findRepresentativeAxisProxy();if(ee){var te=ee.getAxisModel().axis,re=this._range,ae=H?ee.calculateDataWindow({start:re[0],end:re[1]}).valueWindow:ee.getDataValueWindow();Q=[this._formatLabel(ae[0],te),this._formatLabel(ae[1],te)]}}var ne=asc$2(this._handleEnds.slice());ie.call(this,0),ie.call(this,1);function ie(oe){var se=getTransform$1(Z.handles[oe].parent,this.group),le=transformDirection(oe===0?"right":"left",se),ue=this._handleWidth/2+LABEL_GAP,ce=applyTransform([ne[oe]+(oe===0?-ue:ue),this._size[1]/2],se);X[oe].setStyle({x:ce[0],y:ce[1],verticalAlign:K===HORIZONTAL?"middle":le,align:K===HORIZONTAL?le:"center",text:Q[oe]})}},G.prototype._formatLabel=function(H,W){var Z=this.dataZoomModel,X=Z.get("labelFormatter"),K=Z.get("labelPrecision");(K==null||K==="auto")&&(K=W.getPixelPrecision());var Q=H==null||isNaN(H)?"":W.type==="category"||W.type==="time"?W.scale.getLabel({value:Math.round(H)}):H.toFixed(Math.min(K,20));return isFunction(X)?X(H,Q):isString(X)?X.replace("{value}",Q):Q},G.prototype._showDataInfo=function(H){var W=this.dataZoomModel.get("handleLabel")||{},Z=W.show||!1,X=this.dataZoomModel.getModel(["emphasis","handleLabel"]),K=X.get("show")||!1,Q=H||this._dragging?K:Z,ee=this._displayables,te=ee.handleLabels;te[0].attr("invisible",!Q),te[1].attr("invisible",!Q),ee.moveHandle&&this.api[Q?"enterEmphasis":"leaveEmphasis"](ee.moveHandle,1)},G.prototype._onDragMove=function(H,W,Z,X){this._dragging=!0,stop(X.event);var K=this._displayables.sliderGroup.getLocalTransform(),Q=applyTransform([W,Z],K,!0),ee=this._updateInterval(H,Q[0]),te=this.dataZoomModel.get("realtime");this._updateView(!te),ee&&te&&this._dispatchZoomAction(!0)},G.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var H=this.dataZoomModel.get("realtime");!H&&this._dispatchZoomAction(!1)},G.prototype._onClickPanel=function(H){var W=this._size,Z=this._displayables.sliderGroup.transformCoordToLocal(H.offsetX,H.offsetY);if(!(Z[0]<0||Z[0]>W[0]||Z[1]<0||Z[1]>W[1])){var X=this._handleEnds,K=(X[0]+X[1])/2,Q=this._updateInterval("all",Z[0]-K);this._updateView(),Q&&this._dispatchZoomAction(!1)}},G.prototype._onBrushStart=function(H){var W=H.offsetX,Z=H.offsetY;this._brushStart=new Point(W,Z),this._brushing=!0,this._brushStartTime=+new Date},G.prototype._onBrushEnd=function(H){if(this._brushing){var W=this._displayables.brushRect;if(this._brushing=!1,!!W){W.attr("ignore",!0);var Z=W.shape,X=+new Date;if(!(X-this._brushStartTime<200&&Math.abs(Z.width)<5)){var K=this._getViewExtent(),Q=[0,100],ee=this._handleEnds=[Z.x,Z.x+Z.width],te=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();sliderMove(0,ee,K,0,te.minSpan!=null?linearMap$2(te.minSpan,Q,K,!0):null,te.maxSpan!=null?linearMap$2(te.maxSpan,Q,K,!0):null),this._range=asc$2([linearMap$2(ee[0],K,Q,!0),linearMap$2(ee[1],K,Q,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},G.prototype._onBrush=function(H){this._brushing&&(stop(H.event),this._updateBrushRect(H.offsetX,H.offsetY))},G.prototype._updateBrushRect=function(H,W){var Z=this._displayables,X=this.dataZoomModel,K=Z.brushRect;K||(K=Z.brushRect=new Rect({silent:!0,style:X.getModel("brushStyle").getItemStyle()}),Z.sliderGroup.add(K)),K.attr("ignore",!1);var Q=this._brushStart,ee=this._displayables.sliderGroup,te=ee.transformCoordToLocal(H,W),re=ee.transformCoordToLocal(Q.x,Q.y),ae=this._size;te[0]=Math.max(Math.min(ae[0],te[0]),0),K.setShape({x:re[0],y:0,width:te[0]-re[0],height:ae[1]})},G.prototype._dispatchZoomAction=function(H){var W=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:H?REALTIME_ANIMATION_CONFIG:null,start:W[0],end:W[1]})},G.prototype._findCoordRect=function(){var H,W=collectReferCoordSysModelInfo(this.dataZoomModel).infoList;if(!H&&W.length){var Z=W[0].model.coordinateSystem;H=Z.getRect&&Z.getRect()}if(!H){var X=this.api.getWidth(),K=this.api.getHeight();H={x:X*.2,y:K*.2,width:X*.6,height:K*.6}}return H},G.type="dataZoom.slider",G})(DataZoomView);function getOtherDim(U){var G={x:"y",y:"x",radius:"angle",angle:"radius"};return G[U]}function getCursor$1(U){return U==="vertical"?"ns-resize":"ew-resize"}function install$9(U){U.registerComponentModel(SliderZoomModel),U.registerComponentView(SliderZoomView),installCommon$1(U)}function install$8(U){use(install$a),use(install$9)}var visualDefault={get:function(U,G,H){var W=clone$4((defaultOption[U]||{})[G]);return H&&isArray$1(W)?W[W.length-1]:W}},defaultOption={color:{active:["#006edd","#e0ffff"],inactive:[tokens.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}},mapVisual=VisualMapping.mapVisual,eachVisual=VisualMapping.eachVisual,isArray=isArray$1,each$2=each$f,asc=asc$2,linearMap$1=linearMap$2,VisualMapModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.stateList=["inRange","outOfRange"],H.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],H.layoutMode={type:"box",ignoreSize:!0},H.dataBound=[-1/0,1/0],H.targetVisuals={},H.controllerVisuals={},H}return G.prototype.init=function(H,W,Z){this.mergeDefaultAndTheme(H,Z)},G.prototype.optionUpdated=function(H,W){var Z=this.option;!W&&replaceVisualOption(Z,H,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},G.prototype.resetVisual=function(H){var W=this.stateList;H=bind$1(H,this),this.controllerVisuals=createVisualMappings(this.option.controller,W,H),this.targetVisuals=createVisualMappings(this.option.target,W,H)},G.prototype.getItemSymbol=function(){return null},G.prototype.getTargetSeriesIndices=function(){var H=this.option.seriesId,W=this.option.seriesIndex;W==null&&H==null&&(W="all");var Z=queryReferringComponents(this.ecModel,"series",{index:W,id:H},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return map$1(Z,function(X){return X.componentIndex})},G.prototype.eachTargetSeries=function(H,W){each$f(this.getTargetSeriesIndices(),function(Z){var X=this.ecModel.getSeriesByIndex(Z);X&&H.call(W,X)},this)},G.prototype.isTargetSeries=function(H){var W=!1;return this.eachTargetSeries(function(Z){Z===H&&(W=!0)}),W},G.prototype.formatValueText=function(H,W,Z){var X=this.option,K=X.precision,Q=this.dataBound,ee=X.formatter,te;Z=Z||["<",">"],isArray$1(H)&&(H=H.slice(),te=!0);var re=W?H:te?[ae(H[0]),ae(H[1])]:ae(H);if(isString(ee))return ee.replace("{value}",te?re[0]:re).replace("{value2}",te?re[1]:re);if(isFunction(ee))return te?ee(H[0],H[1]):ee(H);if(te)return H[0]===Q[0]?Z[0]+" "+re[1]:H[1]===Q[1]?Z[1]+" "+re[0]:re[0]+" - "+re[1];return re;function ae(ne){return ne===Q[0]?"min":ne===Q[1]?"max":(+ne).toFixed(Math.min(K,20))}},G.prototype.resetExtent=function(){var H=this.option,W=asc([H.min,H.max]);this._dataExtent=W},G.prototype.getDataDimensionIndex=function(H){var W=this.option.dimension;if(W!=null)return H.getDimensionIndex(W);for(var Z=H.dimensions,X=Z.length-1;X>=0;X--){var K=Z[X],Q=H.getDimensionInfo(K);if(!Q.isCalculationCoord)return Q.storeDimIndex}},G.prototype.getExtent=function(){return this._dataExtent.slice()},G.prototype.completeVisualOption=function(){var H=this.ecModel,W=this.option,Z={inRange:W.inRange,outOfRange:W.outOfRange},X=W.target||(W.target={}),K=W.controller||(W.controller={});merge(X,Z),merge(K,Z);var Q=this.isCategory();ee.call(this,X),ee.call(this,K),te.call(this,X,"inRange","outOfRange"),re.call(this,K);function ee(ae){isArray(W.color)&&!ae.inRange&&(ae.inRange={color:W.color.slice().reverse()}),ae.inRange=ae.inRange||{color:H.get("gradientColor")}}function te(ae,ne,ie){var oe=ae[ne],se=ae[ie];oe&&!se&&(se=ae[ie]={},each$2(oe,function(le,ue){if(VisualMapping.isValidType(ue)){var ce=visualDefault.get(ue,"inactive",Q);ce!=null&&(se[ue]=ce,ue==="color"&&!se.hasOwnProperty("opacity")&&!se.hasOwnProperty("colorAlpha")&&(se.opacity=[0,0]))}}))}function re(ae){var ne=(ae.inRange||{}).symbol||(ae.outOfRange||{}).symbol,ie=(ae.inRange||{}).symbolSize||(ae.outOfRange||{}).symbolSize,oe=this.get("inactiveColor"),se=this.getItemSymbol(),le=se||"roundRect";each$2(this.stateList,function(ue){var ce=this.itemSize,fe=ae[ue];fe||(fe=ae[ue]={color:Q?oe:[oe]}),fe.symbol==null&&(fe.symbol=ne&&clone$4(ne)||(Q?le:[le])),fe.symbolSize==null&&(fe.symbolSize=ie&&clone$4(ie)||(Q?ce[0]:[ce[0],ce[0]])),fe.symbol=mapVisual(fe.symbol,function(de){return de==="none"?le:de});var he=fe.symbolSize;if(he!=null){var ve=-1/0;eachVisual(he,function(de){de>ve&&(ve=de)}),fe.symbolSize=mapVisual(he,function(de){return linearMap$1(de,[0,ve],[0,ce[0]],!0)})}},this)}},G.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},G.prototype.isCategory=function(){return!!this.option.categories},G.prototype.setSelected=function(H){},G.prototype.getSelected=function(){return null},G.prototype.getValueState=function(H){return null},G.prototype.getVisualMeta=function(H){return null},G.type="visualMap",G.dependencies=["series"],G.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:tokens.color.transparent,borderColor:tokens.color.borderTint,contentColor:tokens.color.theme[0],inactiveColor:tokens.color.disabled,borderWidth:0,padding:tokens.size.m,textGap:10,precision:0,textStyle:{color:tokens.color.secondary}},G})(ComponentModel),DEFAULT_BAR_BOUND=[20,140],ContinuousModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.optionUpdated=function(H,W){U.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(Z){Z.mappingMethod="linear",Z.dataExtent=this.getExtent()}),this._resetRange()},G.prototype.resetItemSize=function(){U.prototype.resetItemSize.apply(this,arguments);var H=this.itemSize;(H[0]==null||isNaN(H[0]))&&(H[0]=DEFAULT_BAR_BOUND[0]),(H[1]==null||isNaN(H[1]))&&(H[1]=DEFAULT_BAR_BOUND[1])},G.prototype._resetRange=function(){var H=this.getExtent(),W=this.option.range;!W||W.auto?(H.auto=1,this.option.range=H):isArray$1(W)&&(W[0]>W[1]&&W.reverse(),W[0]=Math.max(W[0],H[0]),W[1]=Math.min(W[1],H[1]))},G.prototype.completeVisualOption=function(){U.prototype.completeVisualOption.apply(this,arguments),each$f(this.stateList,function(H){var W=this.option.controller[H].symbolSize;W&&W[0]!==W[1]&&(W[0]=W[1]/3)},this)},G.prototype.setSelected=function(H){this.option.range=H.slice(),this._resetRange()},G.prototype.getSelected=function(){var H=this.getExtent(),W=asc$2((this.get("range")||[]).slice());return W[0]>H[1]&&(W[0]=H[1]),W[1]>H[1]&&(W[1]=H[1]),W[0]<H[0]&&(W[0]=H[0]),W[1]<H[0]&&(W[1]=H[0]),W},G.prototype.getValueState=function(H){var W=this.option.range,Z=this.getExtent(),X=retrieve2(this.option.unboundedRange,!0);return(X&&W[0]<=Z[0]||W[0]<=H)&&(X&&W[1]>=Z[1]||H<=W[1])?"inRange":"outOfRange"},G.prototype.findTargetDataIndices=function(H){var W=[];return this.eachTargetSeries(function(Z){var X=[],K=Z.getData();K.each(this.getDataDimensionIndex(K),function(Q,ee){H[0]<=Q&&Q<=H[1]&&X.push(ee)},this),W.push({seriesId:Z.id,dataIndex:X})},this),W},G.prototype.getVisualMeta=function(H){var W=getColorStopValues(this,"outOfRange",this.getExtent()),Z=getColorStopValues(this,"inRange",this.option.range.slice()),X=[];function K(ie,oe){X.push({value:ie,color:H(ie,oe)})}for(var Q=0,ee=0,te=Z.length,re=W.length;ee<re&&(!Z.length||W[ee]<=Z[0]);ee++)W[ee]<Z[Q]&&K(W[ee],"outOfRange");for(var ae=1;Q<te;Q++,ae=0)ae&&X.length&&K(Z[Q],"outOfRange"),K(Z[Q],"inRange");for(var ae=1;ee<re;ee++)(!Z.length||Z[Z.length-1]<W[ee])&&(ae&&(X.length&&K(X[X.length-1].value,"outOfRange"),ae=0),K(W[ee],"outOfRange"));var ne=X.length;return{stops:X,outerColors:[ne?X[0].color:"transparent",ne?X[ne-1].color:"transparent"]}},G.type="visualMap.continuous",G.defaultOption=inheritDefaultOption(VisualMapModel.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:tokens.color.neutral00,borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:tokens.color.neutral00,borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:tokens.color.shadow}}),G})(VisualMapModel);function getColorStopValues(U,G,H){if(H[0]===H[1])return H.slice();for(var W=200,Z=(H[1]-H[0])/W,X=H[0],K=[],Q=0;Q<=W&&X<H[1];Q++)K.push(X),X+=Z;return K.push(H[1]),K}var VisualMapView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.autoPositionValues={left:1,right:1,top:1,bottom:1},H}return G.prototype.init=function(H,W){this.ecModel=H,this.api=W},G.prototype.render=function(H,W,Z,X){if(this.visualMapModel=H,H.get("show")===!1){this.group.removeAll();return}this.doRender(H,W,Z,X)},G.prototype.renderBackground=function(H){var W=this.visualMapModel,Z=normalizeCssArray(W.get("padding")||0),X=H.getBoundingRect();H.add(new Rect$2({z2:-1,silent:!0,shape:{x:X.x-Z[3],y:X.y-Z[0],width:X.width+Z[3]+Z[1],height:X.height+Z[0]+Z[2]},style:{fill:W.get("backgroundColor"),stroke:W.get("borderColor"),lineWidth:W.get("borderWidth")}}))},G.prototype.getControllerVisual=function(H,W,Z){Z=Z||{};var X=Z.forceState,K=this.visualMapModel,Q={};if(W==="color"){var ee=K.get("contentColor");Q.color=ee}function te(ie){return Q[ie]}function re(ie,oe){Q[ie]=oe}var ae=K.controllerVisuals[X||K.getValueState(H)],ne=VisualMapping.prepareVisualTypes(ae);return each$f(ne,function(ie){var oe=ae[ie];Z.convertOpacityToAlpha&&ie==="opacity"&&(ie="colorAlpha",oe=ae.__alphaForOpacity),VisualMapping.dependsOn(ie,W)&&oe&&oe.applyVisual(H,te,re)}),Q[W]},G.prototype.positionGroup=function(H){var W=this.visualMapModel,Z=this.api,X=createBoxLayoutReference(W,Z).refContainer;positionElement(H,W.getBoxLayoutParams(),X)},G.prototype.doRender=function(H,W,Z,X){},G.type="visualMap",G})(ComponentView),paramsSet=[["left","right","width"],["top","bottom","height"]];function getItemAlign(U,G,H){var W=U.option,Z=W.align;if(Z!=null&&Z!=="auto")return Z;for(var X={width:G.getWidth(),height:G.getHeight()},K=W.orient==="horizontal"?1:0,Q=paramsSet[K],ee=[0,null,10],te={},re=0;re<3;re++)te[paramsSet[1-K][re]]=ee[re],te[Q[re]]=re===2?H[0]:W[Q[re]];var ae=[["x","width",3],["y","height",0]][K],ne=getLayoutRect(te,X,W.padding);return Q[(ne.margin[ae[2]]||0)+ne[ae[0]]+ne[ae[1]]*.5<X[ae[1]]*.5?0:1]}function makeHighDownBatch(U,G){return each$f(U||[],function(H){H.dataIndex!=null&&(H.dataIndexInside=H.dataIndex,H.dataIndex=null),H.highlightKey="visualMap"+(G?G.componentIndex:"")}),U}var linearMap=linearMap$2,each$1=each$f,mathMin=Math.min,mathMax=Math.max,HOVER_LINK_SIZE=12,HOVER_LINK_OUT=6,ContinuousView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H._shapes={},H._dataInterval=[],H._handleEnds=[],H._hoverLinkDataIndices=[],H}return G.prototype.init=function(H,W){U.prototype.init.call(this,H,W),this._hoverLinkFromSeriesMouseOver=bind$1(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=bind$1(this._hideIndicator,this)},G.prototype.doRender=function(H,W,Z,X){(!X||X.type!=="selectDataRange"||X.from!==this.uid)&&this._buildView()},G.prototype._buildView=function(){this.group.removeAll();var H=this.visualMapModel,W=this.group;this._orient=H.get("orient"),this._useHandle=H.get("calculable"),this._resetInterval(),this._renderBar(W);var Z=H.get("text");this._renderEndsText(W,Z,0),this._renderEndsText(W,Z,1),this._updateView(!0),this.renderBackground(W),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(W)},G.prototype._renderEndsText=function(H,W,Z){if(W){var X=W[1-Z];X=X!=null?X+"":"";var K=this.visualMapModel,Q=K.get("textGap"),ee=K.itemSize,te=this._shapes.mainGroup,re=this._applyTransform([ee[0]/2,Z===0?-Q:ee[1]+Q],te),ae=this._applyTransform(Z===0?"bottom":"top",te),ne=this._orient,ie=this.visualMapModel.textStyleModel;this.group.add(new ZRText({style:createTextStyle(ie,{x:re[0],y:re[1],verticalAlign:ie.get("verticalAlign")||(ne==="horizontal"?"middle":ae),align:ie.get("align")||(ne==="horizontal"?ae:"center"),text:X})}))}},G.prototype._renderBar=function(H){var W=this.visualMapModel,Z=this._shapes,X=W.itemSize,K=this._orient,Q=this._useHandle,ee=getItemAlign(W,this.api,X),te=Z.mainGroup=this._createBarGroup(ee),re=new Group$3;te.add(re),re.add(Z.outOfRange=createPolygon()),re.add(Z.inRange=createPolygon(null,Q?getCursor(this._orient):null,bind$1(this._dragHandle,this,"all",!1),bind$1(this._dragHandle,this,"all",!0))),re.setClipPath(new Rect$2({shape:{x:0,y:0,width:X[0],height:X[1],r:3}}));var ae=W.textStyleModel.getTextRect("国"),ne=mathMax(ae.width,ae.height);Q&&(Z.handleThumbs=[],Z.handleLabels=[],Z.handleLabelPoints=[],this._createHandle(W,te,0,X,ne,K),this._createHandle(W,te,1,X,ne,K)),this._createIndicator(W,te,X,ne,K),H.add(te)},G.prototype._createHandle=function(H,W,Z,X,K,Q){var ee=bind$1(this._dragHandle,this,Z,!1),te=bind$1(this._dragHandle,this,Z,!0),re=parsePercent$1(H.get("handleSize"),X[0]),ae=createSymbol$1(H.get("handleIcon"),-re/2,-re/2,re,re,null,!0),ne=getCursor(this._orient);ae.attr({cursor:ne,draggable:!0,drift:ee,ondragend:te,onmousemove:function(ue){stop(ue.event)}}),ae.x=X[0]/2,ae.useStyle(H.getModel("handleStyle").getItemStyle()),ae.setStyle({strokeNoScale:!0,strokeFirst:!0}),ae.style.lineWidth*=2,ae.ensureState("emphasis").style=H.getModel(["emphasis","handleStyle"]).getItemStyle(),setAsHighDownDispatcher(ae,!0),W.add(ae);var ie=this.visualMapModel.textStyleModel,oe=new ZRText({cursor:ne,draggable:!0,drift:ee,onmousemove:function(ue){stop(ue.event)},ondragend:te,style:createTextStyle(ie,{x:0,y:0,text:""})});oe.ensureState("blur").style={opacity:.1},oe.stateTransition={duration:200},this.group.add(oe);var se=[re,0],le=this._shapes;le.handleThumbs[Z]=ae,le.handleLabelPoints[Z]=se,le.handleLabels[Z]=oe},G.prototype._createIndicator=function(H,W,Z,X,K){var Q=parsePercent$1(H.get("indicatorSize"),Z[0]),ee=createSymbol$1(H.get("indicatorIcon"),-Q/2,-Q/2,Q,Q,null,!0);ee.attr({cursor:"move",invisible:!0,silent:!0,x:Z[0]/2});var te=H.getModel("indicatorStyle").getItemStyle();if(ee instanceof ZRImage){var re=ee.style;ee.useStyle(extend({image:re.image,x:re.x,y:re.y,width:re.width,height:re.height},te))}else ee.useStyle(te);W.add(ee);var ae=this.visualMapModel.textStyleModel,ne=new ZRText({silent:!0,invisible:!0,style:createTextStyle(ae,{x:0,y:0,text:""})});this.group.add(ne);var ie=[(K==="horizontal"?X/2:HOVER_LINK_OUT)+Z[0]/2,0],oe=this._shapes;oe.indicator=ee,oe.indicatorLabel=ne,oe.indicatorLabelPoint=ie,this._firstShowIndicator=!0},G.prototype._dragHandle=function(H,W,Z,X){if(this._useHandle){if(this._dragging=!W,!W){var K=this._applyTransform([Z,X],this._shapes.mainGroup,!0);this._updateInterval(H,K[1]),this._hideIndicator(),this._updateView()}W===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),W?!this._hovering&&this._clearHoverLinkToSeries():useHoverLinkOnHandle(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[H],!1)}},G.prototype._resetInterval=function(){var H=this.visualMapModel,W=this._dataInterval=H.getSelected(),Z=H.getExtent(),X=[0,H.itemSize[1]];this._handleEnds=[linearMap(W[0],Z,X,!0),linearMap(W[1],Z,X,!0)]},G.prototype._updateInterval=function(H,W){W=W||0;var Z=this.visualMapModel,X=this._handleEnds,K=[0,Z.itemSize[1]];sliderMove(W,X,K,H,0);var Q=Z.getExtent();this._dataInterval=[linearMap(X[0],K,Q,!0),linearMap(X[1],K,Q,!0)]},G.prototype._updateView=function(H){var W=this.visualMapModel,Z=W.getExtent(),X=this._shapes,K=[0,W.itemSize[1]],Q=H?K:this._handleEnds,ee=this._createBarVisual(this._dataInterval,Z,Q,"inRange"),te=this._createBarVisual(Z,Z,K,"outOfRange");X.inRange.setStyle({fill:ee.barColor}).setShape("points",ee.barPoints),X.outOfRange.setStyle({fill:te.barColor}).setShape("points",te.barPoints),this._updateHandle(Q,ee)},G.prototype._createBarVisual=function(H,W,Z,X){var K={forceState:X,convertOpacityToAlpha:!0},Q=this._makeColorGradient(H,K),ee=[this.getControllerVisual(H[0],"symbolSize",K),this.getControllerVisual(H[1],"symbolSize",K)],te=this._createBarPoints(Z,ee);return{barColor:new LinearGradient(0,0,0,1,Q),barPoints:te,handlesColor:[Q[0].color,Q[Q.length-1].color]}},G.prototype._makeColorGradient=function(H,W){var Z=100,X=[],K=(H[1]-H[0])/Z;X.push({color:this.getControllerVisual(H[0],"color",W),offset:0});for(var Q=1;Q<Z;Q++){var ee=H[0]+K*Q;if(ee>H[1])break;X.push({color:this.getControllerVisual(ee,"color",W),offset:Q/Z})}return X.push({color:this.getControllerVisual(H[1],"color",W),offset:1}),X},G.prototype._createBarPoints=function(H,W){var Z=this.visualMapModel.itemSize;return[[Z[0]-W[0],H[0]],[Z[0],H[0]],[Z[0],H[1]],[Z[0]-W[1],H[1]]]},G.prototype._createBarGroup=function(H){var W=this._orient,Z=this.visualMapModel.get("inverse");return new Group$3(W==="horizontal"&&!Z?{scaleX:H==="bottom"?1:-1,rotation:Math.PI/2}:W==="horizontal"&&Z?{scaleX:H==="bottom"?-1:1,rotation:-Math.PI/2}:W==="vertical"&&!Z?{scaleX:H==="left"?1:-1,scaleY:-1}:{scaleX:H==="left"?1:-1})},G.prototype._updateHandle=function(H,W){if(this._useHandle){var Z=this._shapes,X=this.visualMapModel,K=Z.handleThumbs,Q=Z.handleLabels,ee=X.itemSize,te=X.getExtent(),re=this._applyTransform("left",Z.mainGroup);each$1([0,1],function(ae){var ne=K[ae];ne.setStyle("fill",W.handlesColor[ae]),ne.y=H[ae];var ie=linearMap(H[ae],[0,ee[1]],te,!0),oe=this.getControllerVisual(ie,"symbolSize");ne.scaleX=ne.scaleY=oe/ee[0],ne.x=ee[0]-oe/2;var se=applyTransform(Z.handleLabelPoints[ae],getTransform$1(ne,this.group));if(this._orient==="horizontal"){var le=re==="left"||re==="top"?(ee[0]-oe)/2:(ee[0]-oe)/-2;se[1]+=le}Q[ae].setStyle({x:se[0],y:se[1],text:X.formatValueText(this._dataInterval[ae]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",Z.mainGroup):"center"})},this)}},G.prototype._showIndicator=function(H,W,Z,X){var K=this.visualMapModel,Q=K.getExtent(),ee=K.itemSize,te=[0,ee[1]],re=this._shapes,ae=re.indicator;if(ae){ae.attr("invisible",!1);var ne={convertOpacityToAlpha:!0},ie=this.getControllerVisual(H,"color",ne),oe=this.getControllerVisual(H,"symbolSize"),se=linearMap(H,Q,te,!0),le=ee[0]-oe/2,ue={x:ae.x,y:ae.y};ae.y=se,ae.x=le;var ce=applyTransform(re.indicatorLabelPoint,getTransform$1(ae,this.group)),fe=re.indicatorLabel;fe.attr("invisible",!1);var he=this._applyTransform("left",re.mainGroup),ve=this._orient,de=ve==="horizontal";fe.setStyle({text:(Z||"")+K.formatValueText(W),verticalAlign:de?he:"middle",align:de?"center":he});var pe={x:le,y:se,style:{fill:ie}},ge={style:{x:ce[0],y:ce[1]}};if(K.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var me={duration:100,easing:"cubicInOut",additive:!0};ae.x=ue.x,ae.y=ue.y,ae.animateTo(pe,me),fe.animateTo(ge,me)}else ae.attr(pe),fe.attr(ge);this._firstShowIndicator=!1;var ye=this._shapes.handleLabels;if(ye)for(var _e=0;_e<ye.length;_e++)this.api.enterBlur(ye[_e])}},G.prototype._enableHoverLinkToSeries=function(){var H=this;this._shapes.mainGroup.on("mousemove",function(W){if(H._hovering=!0,!H._dragging){var Z=H.visualMapModel.itemSize,X=H._applyTransform([W.offsetX,W.offsetY],H._shapes.mainGroup,!0,!0);X[1]=mathMin(mathMax(0,X[1]),Z[1]),H._doHoverLinkToSeries(X[1],0<=X[0]&&X[0]<=Z[0])}}).on("mouseout",function(){H._hovering=!1,!H._dragging&&H._clearHoverLinkToSeries()})},G.prototype._enableHoverLinkFromSeries=function(){var H=this.api.getZr();this.visualMapModel.option.hoverLink?(H.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),H.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},G.prototype._doHoverLinkToSeries=function(H,W){var Z=this.visualMapModel,X=Z.itemSize;if(Z.option.hoverLink){var K=[0,X[1]],Q=Z.getExtent();H=mathMin(mathMax(K[0],H),K[1]);var ee=getHalfHoverLinkSize(Z,Q,K),te=[H-ee,H+ee],re=linearMap(H,K,Q,!0),ae=[linearMap(te[0],K,Q,!0),linearMap(te[1],K,Q,!0)];te[0]<K[0]&&(ae[0]=-1/0),te[1]>K[1]&&(ae[1]=1/0),W&&(ae[0]===-1/0?this._showIndicator(re,ae[1],"< ",ee):ae[1]===1/0?this._showIndicator(re,ae[0],"> ",ee):this._showIndicator(re,re,"≈ ",ee));var ne=this._hoverLinkDataIndices,ie=[];(W||useHoverLinkOnHandle(Z))&&(ie=this._hoverLinkDataIndices=Z.findTargetDataIndices(ae));var oe=compressBatches(ne,ie);this._dispatchHighDown("downplay",makeHighDownBatch(oe[0],Z)),this._dispatchHighDown("highlight",makeHighDownBatch(oe[1],Z))}},G.prototype._hoverLinkFromSeriesMouseOver=function(H){var W;if(findEventDispatcher(H.target,function(ee){var te=getECData(ee);if(te.dataIndex!=null)return W=te,!0},!0),!!W){var Z=this.ecModel.getSeriesByIndex(W.seriesIndex),X=this.visualMapModel;if(X.isTargetSeries(Z)){var K=Z.getData(W.dataType),Q=K.getStore().get(X.getDataDimensionIndex(K),W.dataIndex);isNaN(Q)||this._showIndicator(Q,Q)}}},G.prototype._hideIndicator=function(){var H=this._shapes;H.indicator&&H.indicator.attr("invisible",!0),H.indicatorLabel&&H.indicatorLabel.attr("invisible",!0);var W=this._shapes.handleLabels;if(W)for(var Z=0;Z<W.length;Z++)this.api.leaveBlur(W[Z])},G.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var H=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",makeHighDownBatch(H,this.visualMapModel)),H.length=0},G.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var H=this.api.getZr();H.off("mouseover",this._hoverLinkFromSeriesMouseOver),H.off("mouseout",this._hideIndicator)},G.prototype._applyTransform=function(H,W,Z,X){var K=getTransform$1(W,X?null:this.group);return isArray$1(H)?applyTransform(H,K,Z):transformDirection(H,K,Z)},G.prototype._dispatchHighDown=function(H,W){W&&W.length&&this.api.dispatchAction({type:H,batch:W})},G.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},G.type="visualMap.continuous",G})(VisualMapView);function createPolygon(U,G,H,W){return new Polygon({shape:{points:U},draggable:!!H,cursor:G,drift:H,onmousemove:function(Z){stop(Z.event)},ondragend:W})}function getHalfHoverLinkSize(U,G,H){var W=HOVER_LINK_SIZE/2,Z=U.get("hoverLinkDataSize");return Z&&(W=linearMap(Z,G,H,!0)/2),W}function useHoverLinkOnHandle(U){var G=U.get("hoverLinkOnHandle");return!!(G??U.get("realtime"))}function getCursor(U){return U==="vertical"?"ns-resize":"ew-resize"}var visualMapActionInfo={type:"selectDataRange",event:"dataRangeSelected",update:"update"},visualMapActionHander=function(U,G){G.eachComponent({mainType:"visualMap",query:U},function(H){H.setSelected(U.selected)})},visualMapEncodingHandlers=[{createOnAllSeries:!0,reset:function(U,G){var H=[];return G.eachComponent("visualMap",function(W){var Z=U.pipelineContext;!W.isTargetSeries(U)||Z&&Z.large||H.push(incrementalApplyVisual(W.stateList,W.targetVisuals,bind$1(W.getValueState,W),W.getDataDimensionIndex(U.getData())))}),H}},{createOnAllSeries:!0,reset:function(U,G){var H=U.getData(),W=[];G.eachComponent("visualMap",function(Z){if(Z.isTargetSeries(U)){var X=Z.getVisualMeta(bind$1(getColorVisual,null,U,Z))||{stops:[],outerColors:[]},K=Z.getDataDimensionIndex(H);K>=0&&(X.dimension=K,W.push(X))}}),U.getData().setVisual("visualMeta",W)}}];function getColorVisual(U,G,H,W){for(var Z=G.targetVisuals[W],X=VisualMapping.prepareVisualTypes(Z),K={color:getVisualFromData(U.getData(),"color")},Q=0,ee=X.length;Q<ee;Q++){var te=X[Q],re=Z[te==="opacity"?"__alphaForOpacity":te];re&&re.applyVisual(H,ae,ne)}return K.color;function ae(ie){return K[ie]}function ne(ie,oe){K[ie]=oe}}var each=each$f;function visualMapPreprocessor(U){var G=U&&U.visualMap;isArray$1(G)||(G=G?[G]:[]),each(G,function(H){if(H){has(H,"splitList")&&!has(H,"pieces")&&(H.pieces=H.splitList,delete H.splitList);var W=H.pieces;W&&isArray$1(W)&&each(W,function(Z){isObject$3(Z)&&(has(Z,"start")&&!has(Z,"min")&&(Z.min=Z.start),has(Z,"end")&&!has(Z,"max")&&(Z.max=Z.end))})}})}function has(U,G){return U&&U.hasOwnProperty&&U.hasOwnProperty(G)}var installed=!1;function installCommon(U){installed||(installed=!0,U.registerSubTypeDefaulter("visualMap",function(G){return!G.categories&&(!(G.pieces?G.pieces.length>0:G.splitNumber>0)||G.calculable)?"continuous":"piecewise"}),U.registerAction(visualMapActionInfo,visualMapActionHander),each$f(visualMapEncodingHandlers,function(G){U.registerVisual(U.PRIORITY.VISUAL.COMPONENT,G)}),U.registerPreprocessor(visualMapPreprocessor))}function install$7(U){U.registerComponentModel(ContinuousModel),U.registerComponentView(ContinuousView),installCommon(U)}var PiecewiseModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H._pieceList=[],H}return G.prototype.optionUpdated=function(H,W){U.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var Z=this._mode=this._determineMode();this._pieceList=[],resetMethods[this._mode].call(this,this._pieceList),this._resetSelected(H,W);var X=this.option.categories;this.resetVisual(function(K,Q){Z==="categories"?(K.mappingMethod="category",K.categories=clone$4(X)):(K.dataExtent=this.getExtent(),K.mappingMethod="piecewise",K.pieceList=map$1(this._pieceList,function(ee){return ee=clone$4(ee),Q!=="inRange"&&(ee.visual=null),ee}))})},G.prototype.completeVisualOption=function(){var H=this.option,W={},Z=VisualMapping.listVisualTypes(),X=this.isCategory();each$f(H.pieces,function(Q){each$f(Z,function(ee){Q.hasOwnProperty(ee)&&(W[ee]=1)})}),each$f(W,function(Q,ee){var te=!1;each$f(this.stateList,function(re){te=te||K(H,re,ee)||K(H.target,re,ee)},this),!te&&each$f(this.stateList,function(re){(H[re]||(H[re]={}))[ee]=visualDefault.get(ee,re==="inRange"?"active":"inactive",X)})},this);function K(Q,ee,te){return Q&&Q[ee]&&Q[ee].hasOwnProperty(te)}U.prototype.completeVisualOption.apply(this,arguments)},G.prototype._resetSelected=function(H,W){var Z=this.option,X=this._pieceList,K=(W?Z:H).selected||{};if(Z.selected=K,each$f(X,function(ee,te){var re=this.getSelectedMapKey(ee);K.hasOwnProperty(re)||(K[re]=!0)},this),Z.selectedMode==="single"){var Q=!1;each$f(X,function(ee,te){var re=this.getSelectedMapKey(ee);K[re]&&(Q?K[re]=!1:Q=!0)},this)}},G.prototype.getItemSymbol=function(){return this.get("itemSymbol")},G.prototype.getSelectedMapKey=function(H){return this._mode==="categories"?H.value+"":H.index+""},G.prototype.getPieceList=function(){return this._pieceList},G.prototype._determineMode=function(){var H=this.option;return H.pieces&&H.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},G.prototype.setSelected=function(H){this.option.selected=clone$4(H)},G.prototype.getValueState=function(H){var W=VisualMapping.findPieceIndex(H,this._pieceList);return W!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[W])]?"inRange":"outOfRange"},G.prototype.findTargetDataIndices=function(H){var W=[],Z=this._pieceList;return this.eachTargetSeries(function(X){var K=[],Q=X.getData();Q.each(this.getDataDimensionIndex(Q),function(ee,te){var re=VisualMapping.findPieceIndex(ee,Z);re===H&&K.push(te)},this),W.push({seriesId:X.id,dataIndex:K})},this),W},G.prototype.getRepresentValue=function(H){var W;if(this.isCategory())W=H.value;else if(H.value!=null)W=H.value;else{var Z=H.interval||[];W=Z[0]===-1/0&&Z[1]===1/0?0:(Z[0]+Z[1])/2}return W},G.prototype.getVisualMeta=function(H){if(this.isCategory())return;var W=[],Z=["",""],X=this;function K(re,ae){var ne=X.getRepresentValue({interval:re});ae||(ae=X.getValueState(ne));var ie=H(ne,ae);re[0]===-1/0?Z[0]=ie:re[1]===1/0?Z[1]=ie:W.push({value:re[0],color:ie},{value:re[1],color:ie})}var Q=this._pieceList.slice();if(!Q.length)Q.push({interval:[-1/0,1/0]});else{var ee=Q[0].interval[0];ee!==-1/0&&Q.unshift({interval:[-1/0,ee]}),ee=Q[Q.length-1].interval[1],ee!==1/0&&Q.push({interval:[ee,1/0]})}var te=-1/0;return each$f(Q,function(re){var ae=re.interval;ae&&(ae[0]>te&&K([te,ae[0]],"outOfRange"),K(ae.slice()),te=ae[1])},this),{stops:W,outerColors:Z}},G.type="visualMap.piecewise",G.defaultOption=inheritDefaultOption(VisualMapModel.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),G})(VisualMapModel),resetMethods={splitNumber:function(U){var G=this.option,H=Math.min(G.precision,20),W=this.getExtent(),Z=G.splitNumber;Z=Math.max(parseInt(Z,10),1),G.splitNumber=Z;for(var X=(W[1]-W[0])/Z;+X.toFixed(H)!==X&&H<5;)H++;G.precision=H,X=+X.toFixed(H),G.minOpen&&U.push({interval:[-1/0,W[0]],close:[0,0]});for(var K=0,Q=W[0];K<Z;Q+=X,K++){var ee=K===Z-1?W[1]:Q+X;U.push({interval:[Q,ee],close:[1,1]})}G.maxOpen&&U.push({interval:[W[1],1/0],close:[0,0]}),reformIntervals(U),each$f(U,function(te,re){te.index=re,te.text=this.formatValueText(te.interval)},this)},categories:function(U){var G=this.option;each$f(G.categories,function(H){U.push({text:this.formatValueText(H,!0),value:H})},this),normalizeReverse(G,U)},pieces:function(U){var G=this.option;each$f(G.pieces,function(H,W){isObject$3(H)||(H={value:H});var Z={text:"",index:W};if(H.label!=null&&(Z.text=H.label),H.hasOwnProperty("value")){var X=Z.value=H.value;Z.interval=[X,X],Z.close=[1,1]}else{for(var K=Z.interval=[],Q=Z.close=[0,0],ee=[1,0,1],te=[-1/0,1/0],re=[],ae=0;ae<2;ae++){for(var ne=[["gte","gt","min"],["lte","lt","max"]][ae],ie=0;ie<3&&K[ae]==null;ie++)K[ae]=H[ne[ie]],Q[ae]=ee[ie],re[ae]=ie===2;K[ae]==null&&(K[ae]=te[ae])}re[0]&&K[1]===1/0&&(Q[0]=0),re[1]&&K[0]===-1/0&&(Q[1]=0),process.env.NODE_ENV!=="production"&&K[0]>K[1]&&console.warn("Piece "+W+"is illegal: "+K+" lower bound should not greater then uppper bound."),K[0]===K[1]&&Q[0]&&Q[1]&&(Z.value=K[0])}Z.visual=VisualMapping.retrieveVisuals(H),U.push(Z)},this),normalizeReverse(G,U),reformIntervals(U),each$f(U,function(H){var W=H.close,Z=[["<","≤"][W[1]],[">","≥"][W[0]]];H.text=H.text||this.formatValueText(H.value!=null?H.value:H.interval,!1,Z)},this)}};function normalizeReverse(U,G){var H=U.inverse;(U.orient==="vertical"?!H:H)&&G.reverse()}var PiecewiseVisualMapView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.doRender=function(){var H=this.group;H.removeAll();var W=this.visualMapModel,Z=W.get("textGap"),X=W.textStyleModel,K=this._getItemAlign(),Q=W.itemSize,ee=this._getViewData(),te=ee.endsText,re=retrieve(W.get("showLabel",!0),!te),ae=!W.get("selectedMode");te&&this._renderEndsText(H,te[0],Q,re,K),each$f(ee.viewPieceList,function(ne){var ie=ne.piece,oe=new Group$3;oe.onclick=bind$1(this._onItemClick,this,ie),this._enableHoverLink(oe,ne.indexInModelPieceList);var se=W.getRepresentValue(ie);if(this._createItemSymbol(oe,se,[0,0,Q[0],Q[1]],ae),re){var le=this.visualMapModel.getValueState(se),ue=X.get("align")||K;oe.add(new ZRText({style:createTextStyle(X,{x:ue==="right"?-Z:Q[0]+Z,y:Q[1]/2,text:ie.text,verticalAlign:X.get("verticalAlign")||"middle",align:ue,opacity:retrieve2(X.get("opacity"),le==="outOfRange"?.5:1)}),silent:ae}))}H.add(oe)},this),te&&this._renderEndsText(H,te[1],Q,re,K),box(W.get("orient"),H,W.get("itemGap")),this.renderBackground(H),this.positionGroup(H)},G.prototype._enableHoverLink=function(H,W){var Z=this;H.on("mouseover",function(){return X("highlight")}).on("mouseout",function(){return X("downplay")});var X=function(K){var Q=Z.visualMapModel;Q.option.hoverLink&&Z.api.dispatchAction({type:K,batch:makeHighDownBatch(Q.findTargetDataIndices(W),Q)})}},G.prototype._getItemAlign=function(){var H=this.visualMapModel,W=H.option;if(W.orient==="vertical")return getItemAlign(H,this.api,H.itemSize);var Z=W.align;return(!Z||Z==="auto")&&(Z="left"),Z},G.prototype._renderEndsText=function(H,W,Z,X,K){if(W){var Q=new Group$3,ee=this.visualMapModel.textStyleModel;Q.add(new ZRText({style:createTextStyle(ee,{x:X?K==="right"?Z[0]:0:Z[0]/2,y:Z[1]/2,verticalAlign:"middle",align:X?K:"center",text:W})})),H.add(Q)}},G.prototype._getViewData=function(){var H=this.visualMapModel,W=map$1(H.getPieceList(),function(Q,ee){return{piece:Q,indexInModelPieceList:ee}}),Z=H.get("text"),X=H.get("orient"),K=H.get("inverse");return(X==="horizontal"?K:!K)?W.reverse():Z&&(Z=Z.slice().reverse()),{viewPieceList:W,endsText:Z}},G.prototype._createItemSymbol=function(H,W,Z,X){var K=createSymbol$1(this.getControllerVisual(W,"symbol"),Z[0],Z[1],Z[2],Z[3],this.getControllerVisual(W,"color"));K.silent=X,H.add(K)},G.prototype._onItemClick=function(H){var W=this.visualMapModel,Z=W.option,X=Z.selectedMode;if(X){var K=clone$4(Z.selected),Q=W.getSelectedMapKey(H);X==="single"||X===!0?(K[Q]=!0,each$f(K,function(ee,te){K[te]=te===Q})):K[Q]=!K[Q],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:K})}},G.type="visualMap.piecewise",G})(VisualMapView);function install$6(U){U.registerComponentModel(PiecewiseModel),U.registerComponentView(PiecewiseVisualMapView),installCommon(U)}function install$5(U){use(install$7),use(install$6)}var ThumbnailBridgeImpl=(function(){function U(G){this._thumbnailModel=G}return U.prototype.reset=function(G){this._renderVersion=G.getMainProcessVersion()},U.prototype.renderContent=function(G){var H=G.api.getViewOfComponentModel(this._thumbnailModel);H&&(G.group.silent=!0,H.renderContent({group:G.group,targetTrans:G.targetTrans,z2Range:calcZ2Range(G.group),roamType:G.roamType,viewportRect:G.viewportRect,renderVersion:this._renderVersion}))},U.prototype.updateWindow=function(G,H){var W=H.getViewOfComponentModel(this._thumbnailModel);W&&W.updateWindow({targetTrans:G,renderVersion:this._renderVersion})},U})(),ThumbnailModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H.preventAutoZ=!0,H}return G.prototype.optionUpdated=function(H,W){this._updateBridge()},G.prototype._updateBridge=function(){var H=this._birdge=this._birdge||new ThumbnailBridgeImpl(this);if(this._target=null,this.ecModel.eachSeries(function(Z){injectThumbnailBridge(Z,null)}),this.shouldShow()){var W=this.getTarget();injectThumbnailBridge(W.baseMapProvider,H)}},G.prototype.shouldShow=function(){return this.getShallow("show",!0)},G.prototype.getBridge=function(){return this._birdge},G.prototype.getTarget=function(){if(this._target)return this._target;var H=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return H?H.subType!=="graph"&&(H=null,process.env.NODE_ENV!=="production"&&error("series."+H.subType+" is not supported in thumbnail.",!0)):H=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:H},this._target},G.type="thumbnail",G.layoutMode="box",G.dependencies=["series","geo"],G.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:tokens.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:tokens.color.neutral30,borderColor:tokens.color.neutral40,opacity:.3},z:10},G})(ComponentModel),ThumbnailView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type=G.type,H}return G.prototype.render=function(H,W,Z){if(this._api=Z,this._model=H,this._coordSys||(this._coordSys=new View),!this._isEnabled()){this._clear();return}this._renderVersion=Z.getMainProcessVersion();var X=this.group;X.removeAll();var K=H.getModel("itemStyle"),Q=K.getItemStyle();Q.fill==null&&(Q.fill=W.get("backgroundColor")||tokens.color.neutral00);var ee=createBoxLayoutReference(H,Z).refContainer,te=getLayoutRect(getBoxLayoutParams(H,!0),ee),re=Q.lineWidth||0,ae=this._contentRect=expandOrShrinkRect(te.clone(),re/2,!0,!0),ne=new Group$3;X.add(ne),ne.setClipPath(new Rect$2({shape:ae.plain()}));var ie=this._targetGroup=new Group$3;ne.add(ie);var oe=te.plain();oe.r=K.getShallow("borderRadius",!0),X.add(this._bgRect=new Rect$2({style:Q,shape:oe,silent:!1,cursor:"grab"}));var se=H.getModel("windowStyle"),le=se.getShallow("borderRadius",!0);ne.add(this._windowRect=new Rect$2({shape:{x:0,y:0,width:0,height:0,r:le},style:se.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),updateZ(H,this)},G.prototype.renderContent=function(H){this._bridgeRendered=H,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),updateZ(this._model,this))},G.prototype._dealRenderContent=function(){var H=this._bridgeRendered;if(!(!H||H.renderVersion!==this._renderVersion)){var W=this._targetGroup,Z=this._coordSys,X=this._contentRect;if(W.removeAll(),!!H){var K=H.group,Q=K.getBoundingRect();W.add(K),this._bgRect.z2=H.z2Range.min-10,Z.setBoundingRect(Q.x,Q.y,Q.width,Q.height);var ee=getLayoutRect({left:"center",top:"center",aspect:Q.width/Q.height},X);Z.setViewRect(ee.x,ee.y,ee.width,ee.height),K.attr(Z.getTransformInfo().raw),this._windowRect.z2=H.z2Range.max+10,this._resetRoamController(H.roamType)}}},G.prototype.updateWindow=function(H){var W=this._bridgeRendered;W&&W.renderVersion===H.renderVersion&&(W.targetTrans=H.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},G.prototype._dealUpdateWindow=function(){var H=this._bridgeRendered;if(!(!H||H.renderVersion!==this._renderVersion)){var W=invert([],H.targetTrans),Z=mul([],this._coordSys.transform,W);this._transThisToTarget=invert([],Z);var X=H.viewportRect;X?X=X.clone():X=new BoundingRect(0,0,this._api.getWidth(),this._api.getHeight()),X.applyTransform(Z);var K=this._windowRect,Q=K.shape.r;K.setShape(defaults({r:Q},X))}},G.prototype._resetRoamController=function(H){var W=this,Z=this._api,X=this._roamController;if(X||(X=this._roamController=new RoamController(Z.getZr())),!H||!this._isEnabled()){X.disable();return}X.enable(H,{api:Z,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(K,Q,ee){return W._contentRect.contain(Q,ee)}}}),X.off("pan").off("zoom").on("pan",bind$1(this._onPan,this)).on("zoom",bind$1(this._onZoom,this))},G.prototype._onPan=function(H){var W=this._transThisToTarget;if(!(!this._isEnabled()||!W)){var Z=applyTransform$1([],[H.oldX,H.oldY],W),X=applyTransform$1([],[H.oldX-H.dx,H.oldY-H.dy],W);this._api.dispatchAction(makeRoamPayload(this._model.getTarget().baseMapProvider,{dx:X[0]-Z[0],dy:X[1]-Z[1]}))}},G.prototype._onZoom=function(H){var W=this._transThisToTarget;if(!(!this._isEnabled()||!W)){var Z=applyTransform$1([],[H.originX,H.originY],W);this._api.dispatchAction(makeRoamPayload(this._model.getTarget().baseMapProvider,{zoom:1/H.scale,originX:Z[0],originY:Z[1]}))}},G.prototype._isEnabled=function(){var H=this._model;if(!H||!H.shouldShow())return!1;var W=H.getTarget().baseMapProvider;return!!W},G.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},G.prototype.remove=function(){this._clear()},G.prototype.dispose=function(){this._clear()},G.type="thumbnail",G})(ComponentView);function makeRoamPayload(U,G){var H=U.mainType==="series"?U.subType+"Roam":U.mainType+"Roam",W={type:H};return W[U.mainType+"Id"]=U.id,extend(W,G),W}function updateZ(U,G){var H=retrieveZInfo(U);traverseUpdateZ(G.group,H.z,H.zlevel)}function install$4(U){U.registerComponentModel(ThumbnailModel),U.registerComponentView(ThumbnailView)}var DEFAULT_OPTION={label:{enabled:!0},decal:{show:!1}},inner=makeInner(),decalPaletteScope={};function ariaVisual(U,G){var H=U.getModel("aria");if(!H.get("enabled"))return;var W=clone$4(DEFAULT_OPTION);merge(W.label,U.getLocaleModel().get("aria"),!1),merge(H.option,W,!1),Z(),X();function Z(){var te=H.getModel("decal"),re=te.get("show");if(re){var ae=createHashMap();U.eachSeries(function(ne){if(!ne.isColorBySeries()){var ie=ae.get(ne.type);ie||(ie={},ae.set(ne.type,ie)),inner(ne).scope=ie}}),U.eachRawSeries(function(ne){if(U.isSeriesFiltered(ne))return;if(isFunction(ne.enableAriaDecal)){ne.enableAriaDecal();return}var ie=ne.getData();if(ne.isColorBySeries()){var ce=getDecalFromPalette(ne.ecModel,ne.name,decalPaletteScope,U.getSeriesCount()),fe=ie.getVisual("decal");ie.setVisual("decal",he(fe,ce))}else{var oe=ne.getRawData(),se={},le=inner(ne).scope;ie.each(function(ve){var de=ie.getRawIndex(ve);se[de]=ve});var ue=oe.count();oe.each(function(ve){var de=se[ve],pe=oe.getName(ve)||ve+"",ge=getDecalFromPalette(ne.ecModel,pe,le,ue),me=ie.getItemVisual(de,"decal");ie.setItemVisual(de,"decal",he(me,ge))})}function he(ve,de){var pe=ve?extend(extend({},de),ve):de;return pe.dirty=!0,pe}})}}function X(){var te=G.getZr().dom;if(te){var re=U.getLocaleModel().get("aria"),ae=H.getModel("label");if(ae.option=defaults(ae.option,re),!!ae.get("enabled")){if(te.setAttribute("role","img"),ae.get("description")){te.setAttribute("aria-label",ae.get("description"));return}var ne=U.getSeriesCount(),ie=ae.get(["data","maxCount"])||10,oe=ae.get(["series","maxCount"])||10,se=Math.min(ne,oe),le;if(!(ne<1)){var ue=Q();if(ue){var ce=ae.get(["general","withTitle"]);le=K(ce,{title:ue})}else le=ae.get(["general","withoutTitle"]);var fe=[],he=ne>1?ae.get(["series","multiple","prefix"]):ae.get(["series","single","prefix"]);le+=K(he,{seriesCount:ne}),U.eachSeries(function(ge,me){if(me<se){var ye=void 0,_e=ge.get("name"),xe=_e?"withName":"withoutName";ye=ne>1?ae.get(["series","multiple",xe]):ae.get(["series","single",xe]),ye=K(ye,{seriesId:ge.seriesIndex,seriesName:ge.get("name"),seriesType:ee(ge.subType)});var Se=ge.getData();if(Se.count()>ie){var Te=ae.get(["data","partialData"]);ye+=K(Te,{displayCnt:ie})}else ye+=ae.get(["data","allData"]);for(var be=ae.get(["data","separator","middle"]),Ae=ae.get(["data","separator","end"]),we=ae.get(["data","excludeDimensionId"]),Ce=[],Ee=0;Ee<Se.count();Ee++)if(Ee<ie){var Me=Se.getName(Ee),De=we?filter(Se.getValues(Ee),function(Pe,Ie){return indexOf(we,Ie)===-1}):Se.getValues(Ee),Le=ae.get(["data",Me?"withName":"withoutName"]);Ce.push(K(Le,{name:Me,value:De.join(be)}))}ye+=Ce.join(be)+Ae,fe.push(ye)}});var ve=ae.getModel(["series","multiple","separator"]),de=ve.get("middle"),pe=ve.get("end");le+=fe.join(de)+pe,te.setAttribute("aria-label",le)}}}}function K(te,re){if(!isString(te))return te;var ae=te;return each$f(re,function(ne,ie){ae=ae.replace(new RegExp("\\{\\s*"+ie+"\\s*\\}","g"),ne)}),ae}function Q(){var te=U.get("title");return te&&te.length&&(te=te[0]),te&&te.text}function ee(te){var re=U.getLocaleModel().get(["series","typeNames"]);return re[te]||re.chart}}function ariaPreprocessor(U){if(!(!U||!U.aria)){var G=U.aria;G.show!=null&&(G.enabled=G.show),G.label=G.label||{},each$f(["description","general","series","data"],function(H){G[H]!=null&&(G.label[H]=G[H])})}}function install$3(U){U.registerPreprocessor(ariaPreprocessor),U.registerVisual(U.PRIORITY.VISUAL.ARIA,ariaVisual)}var RELATIONAL_EXPRESSION_OP_ALIAS_MAP={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},RegExpEvaluator=(function(){function U(G){var H=this._condVal=isString(G)?new RegExp(G):isRegExp(G)?G:null;if(H==null){var W="";process.env.NODE_ENV!=="production"&&(W=makePrintable("Illegal regexp",G,"in")),throwError(W)}}return U.prototype.evaluate=function(G){var H=typeof G;return isString(H)?this._condVal.test(G):isNumber(H)?this._condVal.test(G+""):!1},U})(),ConstConditionInternal=(function(){function U(){}return U.prototype.evaluate=function(){return this.value},U})(),AndConditionInternal=(function(){function U(){}return U.prototype.evaluate=function(){for(var G=this.children,H=0;H<G.length;H++)if(!G[H].evaluate())return!1;return!0},U})(),OrConditionInternal=(function(){function U(){}return U.prototype.evaluate=function(){for(var G=this.children,H=0;H<G.length;H++)if(G[H].evaluate())return!0;return!1},U})(),NotConditionInternal=(function(){function U(){}return U.prototype.evaluate=function(){return!this.child.evaluate()},U})(),RelationalConditionInternal=(function(){function U(){}return U.prototype.evaluate=function(){for(var G=!!this.valueParser,H=this.getValue,W=H(this.valueGetterParam),Z=G?this.valueParser(W):null,X=0;X<this.subCondList.length;X++)if(!this.subCondList[X].evaluate(G?Z:W))return!1;return!0},U})();function parseOption(U,G){if(U===!0||U===!1){var H=new ConstConditionInternal;return H.value=U,H}var W="";return isObjectNotArray(U)||(process.env.NODE_ENV!=="production"&&(W=makePrintable("Illegal config. Expect a plain object but actually",U)),throwError(W)),U.and?parseAndOrOption("and",U,G):U.or?parseAndOrOption("or",U,G):U.not?parseNotOption(U,G):parseRelationalOption(U,G)}function parseAndOrOption(U,G,H){var W=G[U],Z="";process.env.NODE_ENV!=="production"&&(Z=makePrintable('"and"/"or" condition should only be `'+U+": [...]` and must not be empty array.","Illegal condition:",G)),isArray$1(W)||throwError(Z),W.length||throwError(Z);var X=U==="and"?new AndConditionInternal:new OrConditionInternal;return X.children=map$1(W,function(K){return parseOption(K,H)}),X.children.length||throwError(Z),X}function parseNotOption(U,G){var H=U.not,W="";process.env.NODE_ENV!=="production"&&(W=makePrintable('"not" condition should only be `not: {}`.',"Illegal condition:",U)),isObjectNotArray(H)||throwError(W);var Z=new NotConditionInternal;return Z.child=parseOption(H,G),Z.child||throwError(W),Z}function parseRelationalOption(U,G){for(var H="",W=G.prepareGetValue(U),Z=[],X=keys(U),K=U.parser,Q=K?getRawValueParser(K):null,ee=0;ee<X.length;ee++){var te=X[ee];if(!(te==="parser"||G.valueGetterAttrMap.get(te))){var re=hasOwn(RELATIONAL_EXPRESSION_OP_ALIAS_MAP,te)?RELATIONAL_EXPRESSION_OP_ALIAS_MAP[te]:te,ae=U[te],ne=Q?Q(ae):ae,ie=createFilterComparator(re,ne)||re==="reg"&&new RegExpEvaluator(ne);ie||(process.env.NODE_ENV!=="production"&&(H=makePrintable('Illegal relational operation: "'+te+'" in condition:',U)),throwError(H)),Z.push(ie)}}Z.length||(process.env.NODE_ENV!=="production"&&(H=makePrintable("Relational condition must have at least one operator.","Illegal condition:",U)),throwError(H));var oe=new RelationalConditionInternal;return oe.valueGetterParam=W,oe.valueParser=Q,oe.getValue=G.getValue,oe.subCondList=Z,oe}function isObjectNotArray(U){return isObject$3(U)&&!isArrayLike(U)}var ConditionalExpressionParsed=(function(){function U(G,H){this._cond=parseOption(G,H)}return U.prototype.evaluate=function(){return this._cond.evaluate()},U})();function parseConditionalExpression(U,G){return new ConditionalExpressionParsed(U,G)}var filterTransform={type:"echarts:filter",transform:function(U){for(var G=U.upstream,H,W=parseConditionalExpression(U.config,{valueGetterAttrMap:createHashMap({dimension:!0}),prepareGetValue:function(Q){var ee="",te=Q.dimension;hasOwn(Q,"dimension")||(process.env.NODE_ENV!=="production"&&(ee=makePrintable('Relation condition must has prop "dimension" specified.',"Illegal condition:",Q)),throwError(ee));var re=G.getDimensionInfo(te);return re||(process.env.NODE_ENV!=="production"&&(ee=makePrintable("Can not find dimension info via: "+te+`.
|
|
54
|
+
`,"Existing dimensions: ",G.cloneAllDimensionInfo(),`.
|
|
55
|
+
`,"Illegal condition:",Q,`.
|
|
56
|
+
`)),throwError(ee)),{dimIdx:re.index}},getValue:function(Q){return G.retrieveValueFromItem(H,Q.dimIdx)}}),Z=[],X=0,K=G.count();X<K;X++)H=G.getRawDataItem(X),W.evaluate()&&Z.push(H);return{data:Z}}},sampleLog="";process.env.NODE_ENV!=="production"&&(sampleLog=["Valid config is like:",'{ dimension: "age", order: "asc" }','or [{ dimension: "age", order: "asc"], { dimension: "date", order: "desc" }]'].join(" "));var sortTransform={type:"echarts:sort",transform:function(U){var G=U.upstream,H=U.config,W="",Z=normalizeToArray(H);Z.length||(process.env.NODE_ENV!=="production"&&(W="Empty `config` in sort transform."),throwError(W));var X=[];each$f(Z,function(re){var ae=re.dimension,ne=re.order,ie=re.parser,oe=re.incomparable;if(ae==null&&(process.env.NODE_ENV!=="production"&&(W='Sort transform config must has "dimension" specified.'+sampleLog),throwError(W)),ne!=="asc"&&ne!=="desc"&&(process.env.NODE_ENV!=="production"&&(W='Sort transform config must has "order" specified.'+sampleLog),throwError(W)),oe&&oe!=="min"&&oe!=="max"){var se="";process.env.NODE_ENV!=="production"&&(se='incomparable must be "min" or "max" rather than "'+oe+'".'),throwError(se)}if(ne!=="asc"&&ne!=="desc"){var le="";process.env.NODE_ENV!=="production"&&(le='order must be "asc" or "desc" rather than "'+ne+'".'),throwError(le)}var ue=G.getDimensionInfo(ae);ue||(process.env.NODE_ENV!=="production"&&(W=makePrintable("Can not find dimension info via: "+ae+`.
|
|
57
|
+
`,"Existing dimensions: ",G.cloneAllDimensionInfo(),`.
|
|
58
|
+
`,"Illegal config:",re,`.
|
|
59
|
+
`)),throwError(W));var ce=ie?getRawValueParser(ie):null;ie&&!ce&&(process.env.NODE_ENV!=="production"&&(W=makePrintable("Invalid parser name "+ie+`.
|
|
60
|
+
`,"Illegal config:",re,`.
|
|
61
|
+
`)),throwError(W)),X.push({dimIdx:ue.index,parser:ce,comparator:new SortOrderComparator(ne,oe)})});var K=G.sourceFormat;K!==SOURCE_FORMAT_ARRAY_ROWS&&K!==SOURCE_FORMAT_OBJECT_ROWS&&(process.env.NODE_ENV!=="production"&&(W='sourceFormat "'+K+'" is not supported yet'),throwError(W));for(var Q=[],ee=0,te=G.count();ee<te;ee++)Q.push(G.getRawDataItem(ee));return Q.sort(function(re,ae){for(var ne=0;ne<X.length;ne++){var ie=X[ne],oe=G.retrieveValueFromItem(re,ie.dimIdx),se=G.retrieveValueFromItem(ae,ie.dimIdx);ie.parser&&(oe=ie.parser(oe),se=ie.parser(se));var le=ie.comparator.evaluate(oe,se);if(le!==0)return le}return 0}),{data:Q}}};function install$2(U){U.registerTransform(filterTransform),U.registerTransform(sortTransform)}var DatasetModel=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type="dataset",H}return G.prototype.init=function(H,W,Z){U.prototype.init.call(this,H,W,Z),this._sourceManager=new SourceManager(this),disableTransformOptionMerge(this)},G.prototype.mergeOption=function(H,W){U.prototype.mergeOption.call(this,H,W),disableTransformOptionMerge(this)},G.prototype.optionUpdated=function(){this._sourceManager.dirty()},G.prototype.getSourceManager=function(){return this._sourceManager},G.type="dataset",G.defaultOption={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN},G})(ComponentModel),DatasetView=(function(U){__extends(G,U);function G(){var H=U!==null&&U.apply(this,arguments)||this;return H.type="dataset",H}return G.type="dataset",G})(ComponentView);function install$1(U){U.registerComponentModel(DatasetModel),U.registerComponentView(DatasetView)}var CMD=PathProxy.CMD;function aroundEqual(U,G){return Math.abs(U-G)<1e-5}function pathToBezierCurves(U){var G=U.data,H=U.len(),W=[],Z,X=0,K=0,Q=0,ee=0;function te(Se,Te){Z&&Z.length>2&&W.push(Z),Z=[Se,Te]}function re(Se,Te,be,Ae){aroundEqual(Se,be)&&aroundEqual(Te,Ae)||Z.push(Se,Te,be,Ae,be,Ae)}function ae(Se,Te,be,Ae,we,Ce){var Ee=Math.abs(Te-Se),Me=Math.tan(Ee/4)*4/3,De=Te<Se?-1:1,Le=Math.cos(Se),Pe=Math.sin(Se),Ie=Math.cos(Te),$e=Math.sin(Te),Ve=Le*we+be,Fe=Pe*Ce+Ae,ke=Ie*we+be,Re=$e*Ce+Ae,Ne=we*Me*De,Oe=Ce*Me*De;Z.push(Ve-Ne*Pe,Fe+Oe*Le,ke+Ne*$e,Re-Oe*Ie,ke,Re)}for(var ne,ie,oe,se,le=0;le<H;){var ue=G[le++],ce=le===1;switch(ce&&(X=G[le],K=G[le+1],Q=X,ee=K,(ue===CMD.L||ue===CMD.C||ue===CMD.Q)&&(Z=[Q,ee])),ue){case CMD.M:X=Q=G[le++],K=ee=G[le++],te(Q,ee);break;case CMD.L:ne=G[le++],ie=G[le++],re(X,K,ne,ie),X=ne,K=ie;break;case CMD.C:Z.push(G[le++],G[le++],G[le++],G[le++],X=G[le++],K=G[le++]);break;case CMD.Q:ne=G[le++],ie=G[le++],oe=G[le++],se=G[le++],Z.push(X+2/3*(ne-X),K+2/3*(ie-K),oe+2/3*(ne-oe),se+2/3*(ie-se),oe,se),X=oe,K=se;break;case CMD.A:var fe=G[le++],he=G[le++],ve=G[le++],de=G[le++],pe=G[le++],ge=G[le++]+pe;le+=1;var me=!G[le++];ne=Math.cos(pe)*ve+fe,ie=Math.sin(pe)*de+he,ce?(Q=ne,ee=ie,te(Q,ee)):re(X,K,ne,ie),X=Math.cos(ge)*ve+fe,K=Math.sin(ge)*de+he;for(var ye=(me?-1:1)*Math.PI/2,_e=pe;me?_e>ge:_e<ge;_e+=ye){var xe=me?Math.max(_e+ye,ge):Math.min(_e+ye,ge);ae(_e,xe,fe,he,ve,de)}break;case CMD.R:Q=X=G[le++],ee=K=G[le++],ne=Q+G[le++],ie=ee+G[le++],te(ne,ee),re(ne,ee,ne,ie),re(ne,ie,Q,ie),re(Q,ie,Q,ee),re(Q,ee,ne,ee);break;case CMD.Z:Z&&re(X,K,Q,ee),X=Q,K=ee;break}}return Z&&Z.length>2&&W.push(Z),W}function adpativeBezier(U,G,H,W,Z,X,K,Q,ee,te){if(aroundEqual(U,H)&&aroundEqual(G,W)&&aroundEqual(Z,K)&&aroundEqual(X,Q)){ee.push(K,Q);return}var re=2/te,ae=re*re,ne=K-U,ie=Q-G,oe=Math.sqrt(ne*ne+ie*ie);ne/=oe,ie/=oe;var se=H-U,le=W-G,ue=Z-K,ce=X-Q,fe=se*se+le*le,he=ue*ue+ce*ce;if(fe<ae&&he<ae){ee.push(K,Q);return}var ve=ne*se+ie*le,de=-ne*ue-ie*ce,pe=fe-ve*ve,ge=he-de*de;if(pe<ae&&ve>=0&&ge<ae&&de>=0){ee.push(K,Q);return}var me=[],ye=[];cubicSubdivide(U,H,Z,K,.5,me),cubicSubdivide(G,W,X,Q,.5,ye),adpativeBezier(me[0],ye[0],me[1],ye[1],me[2],ye[2],me[3],ye[3],ee,te),adpativeBezier(me[4],ye[4],me[5],ye[5],me[6],ye[6],me[7],ye[7],ee,te)}function pathToPolygons(U,G){var H=pathToBezierCurves(U),W=[];G=G||1;for(var Z=0;Z<H.length;Z++){var X=H[Z],K=[],Q=X[0],ee=X[1];K.push(Q,ee);for(var te=2;te<X.length;){var re=X[te++],ae=X[te++],ne=X[te++],ie=X[te++],oe=X[te++],se=X[te++];adpativeBezier(Q,ee,re,ae,ne,ie,oe,se,K,G),Q=oe,ee=se}W.push(K)}return W}function getDividingGrids(U,G,H){var W=U[G],Z=U[1-G],X=Math.abs(W/Z),K=Math.ceil(Math.sqrt(X*H)),Q=Math.floor(H/K);Q===0&&(Q=1,K=H);for(var ee=[],te=0;te<K;te++)ee.push(Q);var re=K*Q,ae=H-re;if(ae>0)for(var te=0;te<ae;te++)ee[te%K]+=1;return ee}function divideSector(U,G,H){for(var W=U.r0,Z=U.r,X=U.startAngle,K=U.endAngle,Q=Math.abs(K-X),ee=Q*Z,te=Z-W,re=ee>Math.abs(te),ae=getDividingGrids([ee,te],re?0:1,G),ne=(re?Q:te)/ae.length,ie=0;ie<ae.length;ie++)for(var oe=(re?te:Q)/ae[ie],se=0;se<ae[ie];se++){var le={};re?(le.startAngle=X+ne*ie,le.endAngle=X+ne*(ie+1),le.r0=W+oe*se,le.r=W+oe*(se+1)):(le.startAngle=X+oe*se,le.endAngle=X+oe*(se+1),le.r0=W+ne*ie,le.r=W+ne*(ie+1)),le.clockwise=U.clockwise,le.cx=U.cx,le.cy=U.cy,H.push(le)}}function divideRect(U,G,H){for(var W=U.width,Z=U.height,X=W>Z,K=getDividingGrids([W,Z],X?0:1,G),Q=X?"width":"height",ee=X?"height":"width",te=X?"x":"y",re=X?"y":"x",ae=U[Q]/K.length,ne=0;ne<K.length;ne++)for(var ie=U[ee]/K[ne],oe=0;oe<K[ne];oe++){var se={};se[te]=ne*ae,se[re]=oe*ie,se[Q]=ae,se[ee]=ie,se.x+=U.x,se.y+=U.y,H.push(se)}}function crossProduct2d(U,G,H,W){return U*W-H*G}function lineLineIntersect(U,G,H,W,Z,X,K,Q){var ee=H-U,te=W-G,re=K-Z,ae=Q-X,ne=crossProduct2d(re,ae,ee,te);if(Math.abs(ne)<1e-6)return null;var ie=U-Z,oe=G-X,se=crossProduct2d(ie,oe,re,ae)/ne;return se<0||se>1?null:new Point(se*ee+U,se*te+G)}function projPtOnLine(U,G,H){var W=new Point;Point.sub(W,H,G),W.normalize();var Z=new Point;Point.sub(Z,U,G);var X=Z.dot(W);return X}function addToPoly(U,G){var H=U[U.length-1];H&&H[0]===G[0]&&H[1]===G[1]||U.push(G)}function splitPolygonByLine(U,G,H){for(var W=U.length,Z=[],X=0;X<W;X++){var K=U[X],Q=U[(X+1)%W],ee=lineLineIntersect(K[0],K[1],Q[0],Q[1],G.x,G.y,H.x,H.y);ee&&Z.push({projPt:projPtOnLine(ee,G,H),pt:ee,idx:X})}if(Z.length<2)return[{points:U},{points:U}];Z.sort(function(le,ue){return le.projPt-ue.projPt});var te=Z[0],re=Z[Z.length-1];if(re.idx<te.idx){var ae=te;te=re,re=ae}for(var ne=[te.pt.x,te.pt.y],ie=[re.pt.x,re.pt.y],oe=[ne],se=[ie],X=te.idx+1;X<=re.idx;X++)addToPoly(oe,U[X].slice());addToPoly(oe,ie),addToPoly(oe,ne);for(var X=re.idx+1;X<=te.idx+W;X++)addToPoly(se,U[X%W].slice());return addToPoly(se,ne),addToPoly(se,ie),[{points:oe},{points:se}]}function binaryDividePolygon(U){var G=U.points,H=[],W=[];fromPoints(G,H,W);var Z=new BoundingRect(H[0],H[1],W[0]-H[0],W[1]-H[1]),X=Z.width,K=Z.height,Q=Z.x,ee=Z.y,te=new Point,re=new Point;return X>K?(te.x=re.x=Q+X/2,te.y=ee,re.y=ee+K):(te.y=re.y=ee+K/2,te.x=Q,re.x=Q+X),splitPolygonByLine(G,te,re)}function binaryDivideRecursive(U,G,H,W){if(H===1)W.push(G);else{var Z=Math.floor(H/2),X=U(G);binaryDivideRecursive(U,X[0],Z,W),binaryDivideRecursive(U,X[1],H-Z,W)}return W}function clone(U,G){for(var H=[],W=0;W<G;W++)H.push(clonePath(U));return H}function copyPathProps(U,G){G.setStyle(U.style),G.z=U.z,G.z2=U.z2,G.zlevel=U.zlevel}function polygonConvert(U){for(var G=[],H=0;H<U.length;)G.push([U[H++],U[H++]]);return G}function split(U,G){var H=[],W=U.shape,Z;switch(U.type){case"rect":divideRect(W,G,H),Z=Rect$2;break;case"sector":divideSector(W,G,H),Z=Sector;break;case"circle":divideSector({r0:0,r:W.r,startAngle:0,endAngle:Math.PI*2,cx:W.cx,cy:W.cy},G,H),Z=Sector;break;default:var X=U.getComputedTransform(),K=X?Math.sqrt(Math.max(X[0]*X[0]+X[1]*X[1],X[2]*X[2]+X[3]*X[3])):1,Q=map$1(pathToPolygons(U.getUpdatedPathProxy(),K),function(ue){return polygonConvert(ue)}),ee=Q.length;if(ee===0)binaryDivideRecursive(binaryDividePolygon,{points:Q[0]},G,H);else if(ee===G)for(var te=0;te<ee;te++)H.push({points:Q[te]});else{var re=0,ae=map$1(Q,function(ue){var ce=[],fe=[];fromPoints(ue,ce,fe);var he=(fe[1]-ce[1])*(fe[0]-ce[0]);return re+=he,{poly:ue,area:he}});ae.sort(function(ue,ce){return ce.area-ue.area});for(var ne=G,te=0;te<ee;te++){var ie=ae[te];if(ne<=0)break;var oe=te===ee-1?ne:Math.ceil(ie.area/re*G);oe<0||(binaryDivideRecursive(binaryDividePolygon,{points:ie.poly},oe,H),ne-=oe)}}Z=Polygon;break}if(!Z)return clone(U,G);for(var se=[],te=0;te<H.length;te++){var le=new Z;le.setShape(H[te]),copyPathProps(U,le),se.push(le)}return se}function alignSubpath(U,G){var H=U.length,W=G.length;if(H===W)return[U,G];for(var Z=[],X=[],K=H<W?U:G,Q=Math.min(H,W),ee=Math.abs(W-H)/6,te=(Q-2)/6,re=Math.ceil(ee/te)+1,ae=[K[0],K[1]],ne=ee,ie=2;ie<Q;){var oe=K[ie-2],se=K[ie-1],le=K[ie++],ue=K[ie++],ce=K[ie++],fe=K[ie++],he=K[ie++],ve=K[ie++];if(ne<=0){ae.push(le,ue,ce,fe,he,ve);continue}for(var de=Math.min(ne,re-1)+1,pe=1;pe<=de;pe++){var ge=pe/de;cubicSubdivide(oe,le,ce,he,ge,Z),cubicSubdivide(se,ue,fe,ve,ge,X),oe=Z[3],se=X[3],ae.push(Z[1],X[1],Z[2],X[2],oe,se),le=Z[5],ue=X[5],ce=Z[6],fe=X[6]}ne-=de-1}return K===U?[ae,G]:[U,ae]}function createSubpath(U,G){for(var H=U.length,W=U[H-2],Z=U[H-1],X=[],K=0;K<G.length;)X[K++]=W,X[K++]=Z;return X}function alignBezierCurves(U,G){for(var H,W,Z,X=[],K=[],Q=0;Q<Math.max(U.length,G.length);Q++){var ee=U[Q],te=G[Q],re=void 0,ae=void 0;ee?te?(H=alignSubpath(ee,te),re=H[0],ae=H[1],W=re,Z=ae):(ae=createSubpath(Z||ee,ee),re=ee):(re=createSubpath(W||te,te),ae=te),X.push(re),K.push(ae)}return[X,K]}function centroid(U){for(var G=0,H=0,W=0,Z=U.length,X=0,K=Z-2;X<Z;K=X,X+=2){var Q=U[K],ee=U[K+1],te=U[X],re=U[X+1],ae=Q*re-te*ee;G+=ae,H+=(Q+te)*ae,W+=(ee+re)*ae}return G===0?[U[0]||0,U[1]||0]:[H/G/3,W/G/3,G]}function findBestRingOffset(U,G,H,W){for(var Z=(U.length-2)/6,X=1/0,K=0,Q=U.length,ee=Q-2,te=0;te<Z;te++){for(var re=te*6,ae=0,ne=0;ne<Q;ne+=2){var ie=ne===0?re:(re+ne-2)%ee+2,oe=U[ie]-H[0],se=U[ie+1]-H[1],le=G[ne]-W[0],ue=G[ne+1]-W[1],ce=le-oe,fe=ue-se;ae+=ce*ce+fe*fe}ae<X&&(X=ae,K=te)}return K}function reverse(U){for(var G=[],H=U.length,W=0;W<H;W+=2)G[W]=U[H-W-2],G[W+1]=U[H-W-1];return G}function findBestMorphingRotation(U,G,H,W){for(var Z=[],X,K=0;K<U.length;K++){var Q=U[K],ee=G[K],te=centroid(Q),re=centroid(ee);X==null&&(X=te[2]<0!=re[2]<0);var ae=[],ne=[],ie=0,oe=1/0,se=[],le=Q.length;X&&(Q=reverse(Q));for(var ue=findBestRingOffset(Q,ee,te,re)*6,ce=le-2,fe=0;fe<ce;fe+=2){var he=(ue+fe)%ce+2;ae[fe+2]=Q[he]-te[0],ae[fe+3]=Q[he+1]-te[1]}ae[0]=Q[ue]-te[0],ae[1]=Q[ue+1]-te[1];for(var ve=W/H,de=-W/2;de<=W/2;de+=ve){for(var pe=Math.sin(de),ge=Math.cos(de),me=0,fe=0;fe<Q.length;fe+=2){var ye=ae[fe],_e=ae[fe+1],xe=ee[fe]-re[0],Se=ee[fe+1]-re[1],Te=xe*ge-Se*pe,be=xe*pe+Se*ge;se[fe]=Te,se[fe+1]=be;var Ae=Te-ye,we=be-_e;me+=Ae*Ae+we*we}if(me<oe){oe=me,ie=de;for(var Ce=0;Ce<se.length;Ce++)ne[Ce]=se[Ce]}}Z.push({from:ae,to:ne,fromCp:te,toCp:re,rotation:-ie})}return Z}function isCombineMorphing(U){return U.__isCombineMorphing}var SAVED_METHOD_PREFIX="__mOriginal_";function saveAndModifyMethod(U,G,H){var W=SAVED_METHOD_PREFIX+G,Z=U[W]||U[G];U[W]||(U[W]=U[G]);var X=H.replace,K=H.after,Q=H.before;U[G]=function(){var ee=arguments,te;return Q&&Q.apply(this,ee),X?te=X.apply(this,ee):te=Z.apply(this,ee),K&&K.apply(this,ee),te}}function restoreMethod(U,G){var H=SAVED_METHOD_PREFIX+G;U[H]&&(U[G]=U[H],U[H]=null)}function applyTransformOnBeziers(U,G){for(var H=0;H<U.length;H++)for(var W=U[H],Z=0;Z<W.length;){var X=W[Z],K=W[Z+1];W[Z++]=G[0]*X+G[2]*K+G[4],W[Z++]=G[1]*X+G[3]*K+G[5]}}function prepareMorphPath(U,G){var H=U.getUpdatedPathProxy(),W=G.getUpdatedPathProxy(),Z=alignBezierCurves(pathToBezierCurves(H),pathToBezierCurves(W)),X=Z[0],K=Z[1],Q=U.getComputedTransform(),ee=G.getComputedTransform();function te(){this.transform=null}Q&&applyTransformOnBeziers(X,Q),ee&&applyTransformOnBeziers(K,ee),saveAndModifyMethod(G,"updateTransform",{replace:te}),G.transform=null;var re=findBestMorphingRotation(X,K,10,Math.PI),ae=[];saveAndModifyMethod(G,"buildPath",{replace:function(ne){for(var ie=G.__morphT,oe=1-ie,se=[],le=0;le<re.length;le++){var ue=re[le],ce=ue.from,fe=ue.to,he=ue.rotation*ie,ve=ue.fromCp,de=ue.toCp,pe=Math.sin(he),ge=Math.cos(he);lerp$1(se,ve,de,ie);for(var me=0;me<ce.length;me+=2){var ye=ce[me],_e=ce[me+1],xe=fe[me],Se=fe[me+1],Te=ye*oe+xe*ie,be=_e*oe+Se*ie;ae[me]=Te*ge-be*pe+se[0],ae[me+1]=Te*pe+be*ge+se[1]}var Ae=ae[0],we=ae[1];ne.moveTo(Ae,we);for(var me=2;me<ce.length;){var xe=ae[me++],Se=ae[me++],Ce=ae[me++],Ee=ae[me++],Me=ae[me++],De=ae[me++];Ae===xe&&we===Se&&Ce===Me&&Ee===De?ne.lineTo(Me,De):ne.bezierCurveTo(xe,Se,Ce,Ee,Me,De),Ae=Me,we=De}}}})}function morphPath(U,G,H){if(!U||!G)return G;var W=H.done,Z=H.during;prepareMorphPath(U,G),G.__morphT=0;function X(){restoreMethod(G,"buildPath"),restoreMethod(G,"updateTransform"),G.__morphT=-1,G.createPathProxy(),G.dirtyShape()}return G.animateTo({__morphT:1},defaults({during:function(K){G.dirtyShape(),Z&&Z(K)},done:function(){X(),W&&W()}},H)),G}function hilbert(U,G,H,W,Z,X){var K=16;U=Z===H?0:Math.round(32767*(U-H)/(Z-H)),G=X===W?0:Math.round(32767*(G-W)/(X-W));for(var Q=0,ee,te=(1<<K)/2;te>0;te/=2){var re=0,ae=0;(U&te)>0&&(re=1),(G&te)>0&&(ae=1),Q+=te*te*(3*re^ae),ae===0&&(re===1&&(U=te-1-U,G=te-1-G),ee=U,U=G,G=ee)}return Q}function sortPaths(U){var G=1/0,H=1/0,W=-1/0,Z=-1/0,X=map$1(U,function(Q){var ee=Q.getBoundingRect(),te=Q.getComputedTransform(),re=ee.x+ee.width/2+(te?te[4]:0),ae=ee.y+ee.height/2+(te?te[5]:0);return G=Math.min(re,G),H=Math.min(ae,H),W=Math.max(re,W),Z=Math.max(ae,Z),[re,ae]}),K=map$1(X,function(Q,ee){return{cp:Q,z:hilbert(Q[0],Q[1],G,H,W,Z),path:U[ee]}});return K.sort(function(Q,ee){return Q.z-ee.z}).map(function(Q){return Q.path})}function defaultDividePath(U){return split(U.path,U.count)}function createEmptyReturn(){return{fromIndividuals:[],toIndividuals:[],count:0}}function combineMorph(U,G,H){var W=[];function Z(ve){for(var de=0;de<ve.length;de++){var pe=ve[de];isCombineMorphing(pe)?Z(pe.childrenRef()):pe instanceof Path&&W.push(pe)}}Z(U);var X=W.length;if(!X)return createEmptyReturn();var K=H.dividePath||defaultDividePath,Q=K({path:G,count:X});if(Q.length!==X)return console.error("Invalid morphing: unmatched splitted path"),createEmptyReturn();W=sortPaths(W),Q=sortPaths(Q);for(var ee=H.done,te=H.during,re=H.individualDelay,ae=new Transformable,ne=0;ne<X;ne++){var ie=W[ne],oe=Q[ne];oe.parent=G,oe.copyTransform(ae),re||prepareMorphPath(ie,oe)}G.__isCombineMorphing=!0,G.childrenRef=function(){return Q};function se(ve){for(var de=0;de<Q.length;de++)Q[de].addSelfToZr(ve)}saveAndModifyMethod(G,"addSelfToZr",{after:function(ve){se(ve)}}),saveAndModifyMethod(G,"removeSelfFromZr",{after:function(ve){for(var de=0;de<Q.length;de++)Q[de].removeSelfFromZr(ve)}});function le(){G.__isCombineMorphing=!1,G.__morphT=-1,G.childrenRef=null,restoreMethod(G,"addSelfToZr"),restoreMethod(G,"removeSelfFromZr")}var ue=Q.length;if(re)for(var ce=ue,fe=function(){ce--,ce===0&&(le(),ee&&ee())},ne=0;ne<ue;ne++){var he=re?defaults({delay:(H.delay||0)+re(ne,ue,W[ne],Q[ne]),done:fe},H):H;morphPath(W[ne],Q[ne],he)}else G.__morphT=0,G.animateTo({__morphT:1},defaults({during:function(ve){for(var de=0;de<ue;de++){var pe=Q[de];pe.__morphT=G.__morphT,pe.dirtyShape()}te&&te(ve)},done:function(){le();for(var ve=0;ve<U.length;ve++)restoreMethod(U[ve],"updateTransform");ee&&ee()}},H));return G.__zr&&se(G.__zr),{fromIndividuals:W,toIndividuals:Q,count:ue}}function separateMorph(U,G,H){var W=G.length,Z=[],X=H.dividePath||defaultDividePath;function K(ie){for(var oe=0;oe<ie.length;oe++){var se=ie[oe];isCombineMorphing(se)?K(se.childrenRef()):se instanceof Path&&Z.push(se)}}if(isCombineMorphing(U)){K(U.childrenRef());var Q=Z.length;if(Q<W)for(var ee=0,te=Q;te<W;te++)Z.push(clonePath(Z[ee++%Q]));Z.length=W}else{Z=X({path:U,count:W});for(var re=U.getComputedTransform(),te=0;te<Z.length;te++)Z[te].setLocalTransform(re);if(Z.length!==W)return console.error("Invalid morphing: unmatched splitted path"),createEmptyReturn()}Z=sortPaths(Z),G=sortPaths(G);for(var ae=H.individualDelay,te=0;te<W;te++){var ne=ae?defaults({delay:(H.delay||0)+ae(te,W,Z[te],G[te])},H):H;morphPath(Z[te],G[te],ne)}return{fromIndividuals:Z,toIndividuals:G,count:G.length}}function isMultiple(U){return isArray$1(U[0])}function prepareMorphBatches(U,G){for(var H=[],W=U.length,Z=0;Z<W;Z++)H.push({one:U[Z],many:[]});for(var Z=0;Z<G.length;Z++){var X=G[Z].length,K=void 0;for(K=0;K<X;K++)H[K%W].many.push(G[Z][K])}for(var Q=0,Z=W-1;Z>=0;Z--)if(!H[Z].many.length){var ee=H[Q].many;if(ee.length<=1)if(Q)Q=0;else return H;var X=ee.length,te=Math.ceil(X/2);H[Z].many=ee.slice(te,X),H[Q].many=ee.slice(0,te),Q++}return H}var pathDividers={clone:function(U){for(var G=[],H=1-Math.pow(1-U.path.style.opacity,1/U.count),W=0;W<U.count;W++){var Z=clonePath(U.path);Z.setStyle("opacity",H),G.push(Z)}return G},split:null};function applyMorphAnimation(U,G,H,W,Z,X){if(!U.length||!G.length)return;var K=getAnimationConfig("update",W,Z);if(!(K&&K.duration>0))return;var Q=W.getModel("universalTransition").get("delay"),ee=Object.assign({setToFinal:!0},K),te,re;isMultiple(U)&&(te=U,re=G),isMultiple(G)&&(te=G,re=U);function ae(ue,ce,fe,he,ve){var de=ue.many,pe=ue.one;if(de.length===1&&!ve){var ge=ce?de[0]:pe,me=ce?pe:de[0];if(isCombineMorphing(ge))ae({many:[ge],one:me},!0,fe,he,!0);else{var ye=Q?defaults({delay:Q(fe,he)},ee):ee;morphPath(ge,me,ye),X(ge,me,ge,me,ye)}}else for(var _e=defaults({dividePath:pathDividers[H],individualDelay:Q&&function(we,Ce,Ee,Me){return Q(we+fe,he)}},ee),xe=ce?combineMorph(de,pe,_e):separateMorph(pe,de,_e),Se=xe.fromIndividuals,Te=xe.toIndividuals,be=Se.length,Ae=0;Ae<be;Ae++){var ye=Q?defaults({delay:Q(Ae,be)},ee):ee;X(Se[Ae],Te[Ae],ce?de[Ae]:ue.one,ce?ue.one:de[Ae],ye)}}for(var ne=te?te===U:U.length>G.length,ie=te?prepareMorphBatches(re,te):prepareMorphBatches(ne?G:U,[ne?U:G]),oe=0,se=0;se<ie.length;se++)oe+=ie[se].many.length;for(var le=0,se=0;se<ie.length;se++)ae(ie[se],ne,le,oe),le+=ie[se].many.length}function getPathList(U){if(!U)return[];if(isArray$1(U)){for(var G=[],H=0;H<U.length;H++)G.push(getPathList(U[H]));return G}var W=[];return U.traverse(function(Z){Z instanceof Path&&!Z.disableMorphing&&!Z.invisible&&!Z.ignore&&W.push(Z)}),W}var DATA_COUNT_THRESHOLD=1e4,TRANSITION_NONE=0,TRANSITION_P2C=1,TRANSITION_C2P=2,getUniversalTransitionGlobalStore=makeInner();function getDimension(U,G){for(var H=U.dimensions,W=0;W<H.length;W++){var Z=U.getDimensionInfo(H[W]);if(Z&&Z.otherDims[G]===0)return H[W]}}function getValueByDimension(U,G,H){var W=U.getDimensionInfo(H),Z=W&&W.ordinalMeta;if(W){var X=U.get(W.name,G);return Z&&Z.categories[X]||X+""}}function getGroupId(U,G,H,W){var Z=W?"itemChildGroupId":"itemGroupId",X=getDimension(U,Z);if(X){var K=getValueByDimension(U,G,X);return K}var Q=U.getRawDataItem(G),ee=W?"childGroupId":"groupId";if(Q&&Q[ee])return Q[ee]+"";if(!W)return H||U.getId(G)}function flattenDataDiffItems(U){var G=[];return each$f(U,function(H){var W=H.data,Z=H.dataGroupId;if(W.count()>DATA_COUNT_THRESHOLD){process.env.NODE_ENV!=="production"&&warn("Universal transition is disabled on large data > 10k.");return}for(var X=W.getIndices(),K=0;K<X.length;K++)G.push({data:W,groupId:getGroupId(W,K,Z,!1),childGroupId:getGroupId(W,K,Z,!0),divide:H.divide,dataIndex:K})}),G}function fadeInElement(U,G,H){U.traverse(function(W){W instanceof Path&&initProps(W,{style:{opacity:0}},G,{dataIndex:H,isFrom:!0})})}function removeEl(U){if(U.parent){var G=U.getComputedTransform();U.setLocalTransform(G),U.parent.remove(U)}}function stopAnimation(U){U.stopAnimation(),U.isGroup&&U.traverse(function(G){G.stopAnimation()})}function animateElementStyles(U,G,H){var W=getAnimationConfig("update",H,G);W&&U.traverse(function(Z){if(Z instanceof Displayable){var X=getOldStyle(Z);X&&Z.animateFrom({style:X},W)}})}function isAllIdSame(U,G){var H=U.length;if(H!==G.length)return!1;for(var W=0;W<H;W++){var Z=U[W],X=G[W];if(Z.data.getId(Z.dataIndex)!==X.data.getId(X.dataIndex))return!1}return!0}function transitionBetween(U,G,H){var W=flattenDataDiffItems(U),Z=flattenDataDiffItems(G);function X(fe,he,ve,de,pe){(ve||fe)&&he.animateFrom({style:ve&&ve!==fe?extend(extend({},ve.style),fe.style):fe.style},pe)}var K=!1,Q=TRANSITION_NONE,ee=createHashMap(),te=createHashMap();W.forEach(function(fe){fe.groupId&&ee.set(fe.groupId,!0),fe.childGroupId&&te.set(fe.childGroupId,!0)});for(var re=0;re<Z.length;re++){var ae=Z[re].groupId;if(te.get(ae)){Q=TRANSITION_P2C;break}var ne=Z[re].childGroupId;if(ne&&ee.get(ne)){Q=TRANSITION_C2P;break}}function ie(fe,he){return function(ve){var de=ve.data,pe=ve.dataIndex;return he?de.getId(pe):fe?Q===TRANSITION_P2C?ve.childGroupId:ve.groupId:Q===TRANSITION_C2P?ve.childGroupId:ve.groupId}}var oe=isAllIdSame(W,Z),se={};if(!oe)for(var re=0;re<Z.length;re++){var le=Z[re],ue=le.data.getItemGraphicEl(le.dataIndex);ue&&(se[ue.id]=!0)}function ce(fe,he){var ve=W[he],de=Z[fe],pe=de.data.hostModel,ge=ve.data.getItemGraphicEl(ve.dataIndex),me=de.data.getItemGraphicEl(de.dataIndex);if(ge===me){me&&animateElementStyles(me,de.dataIndex,pe);return}ge&&se[ge.id]||me&&(stopAnimation(me),ge?(stopAnimation(ge),removeEl(ge),K=!0,applyMorphAnimation(getPathList(ge),getPathList(me),de.divide,pe,fe,X)):fadeInElement(me,pe,fe))}new DataDiffer(W,Z,ie(!0,oe),ie(!1,oe),null,"multiple").update(ce).updateManyToOne(function(fe,he){var ve=Z[fe],de=ve.data,pe=de.hostModel,ge=de.getItemGraphicEl(ve.dataIndex),me=filter(map$1(he,function(ye){return W[ye].data.getItemGraphicEl(W[ye].dataIndex)}),function(ye){return ye&&ye!==ge&&!se[ye.id]});ge&&(stopAnimation(ge),me.length?(each$f(me,function(ye){stopAnimation(ye),removeEl(ye)}),K=!0,applyMorphAnimation(getPathList(me),getPathList(ge),ve.divide,pe,fe,X)):fadeInElement(ge,pe,ve.dataIndex))}).updateOneToMany(function(fe,he){var ve=W[he],de=ve.data.getItemGraphicEl(ve.dataIndex);if(!(de&&se[de.id])){var pe=filter(map$1(fe,function(me){return Z[me].data.getItemGraphicEl(Z[me].dataIndex)}),function(me){return me&&me!==de}),ge=Z[fe[0]].data.hostModel;pe.length&&(each$f(pe,function(me){return stopAnimation(me)}),de?(stopAnimation(de),removeEl(de),K=!0,applyMorphAnimation(getPathList(de),getPathList(pe),ve.divide,ge,fe[0],X)):each$f(pe,function(me){return fadeInElement(me,ge,fe[0])}))}}).updateManyToMany(function(fe,he){new DataDiffer(he,fe,function(ve){return W[ve].data.getId(W[ve].dataIndex)},function(ve){return Z[ve].data.getId(Z[ve].dataIndex)}).update(function(ve,de){ce(fe[ve],he[de])}).execute()}).execute(),K&&each$f(G,function(fe){var he=fe.data,ve=he.hostModel,de=ve&&H.getViewOfSeriesModel(ve),pe=getAnimationConfig("update",ve,0);de&&ve.isAnimationEnabled()&&pe&&pe.duration>0&&de.group.traverse(function(ge){ge instanceof Path&&!ge.animators.length&&ge.animateFrom({style:{opacity:0}},pe)})})}function getSeriesTransitionKey(U){var G=U.getModel("universalTransition").get("seriesKey");return G||U.id}function convertArraySeriesKeyToString(U){return isArray$1(U)?U.sort().join(","):U}function getDivideShapeFromData(U){if(U.hostModel)return U.hostModel.getModel("universalTransition").get("divideShape")}function findTransitionSeriesBatches(U,G){var H=createHashMap(),W=createHashMap(),Z=createHashMap();each$f(U.oldSeries,function(K,Q){var ee=U.oldDataGroupIds[Q],te=U.oldData[Q],re=getSeriesTransitionKey(K),ae=convertArraySeriesKeyToString(re);W.set(ae,{dataGroupId:ee,data:te}),isArray$1(re)&&each$f(re,function(ne){Z.set(ne,{key:ae,dataGroupId:ee,data:te})})});function X(K){H.get(K)&&warn("Duplicated seriesKey in universalTransition "+K)}return each$f(G.updatedSeries,function(K){if(K.isUniversalTransitionEnabled()&&K.isAnimationEnabled()){var Q=K.get("dataGroupId"),ee=K.getData(),te=getSeriesTransitionKey(K),re=convertArraySeriesKeyToString(te),ae=W.get(re);if(ae)process.env.NODE_ENV!=="production"&&X(re),H.set(re,{oldSeries:[{dataGroupId:ae.dataGroupId,divide:getDivideShapeFromData(ae.data),data:ae.data}],newSeries:[{dataGroupId:Q,divide:getDivideShapeFromData(ee),data:ee}]});else if(isArray$1(te)){process.env.NODE_ENV!=="production"&&X(re);var ne=[];each$f(te,function(se){var le=W.get(se);le.data&&ne.push({dataGroupId:le.dataGroupId,divide:getDivideShapeFromData(le.data),data:le.data})}),ne.length&&H.set(re,{oldSeries:ne,newSeries:[{dataGroupId:Q,data:ee,divide:getDivideShapeFromData(ee)}]})}else{var ie=Z.get(te);if(ie){var oe=H.get(ie.key);oe||(oe={oldSeries:[{dataGroupId:ie.dataGroupId,data:ie.data,divide:getDivideShapeFromData(ie.data)}],newSeries:[]},H.set(ie.key,oe)),oe.newSeries.push({dataGroupId:Q,data:ee,divide:getDivideShapeFromData(ee)})}}}}),H}function querySeries(U,G){for(var H=0;H<U.length;H++){var W=G.seriesIndex!=null&&G.seriesIndex===U[H].seriesIndex||G.seriesId!=null&&G.seriesId===U[H].id;if(W)return H}}function transitionSeriesFromOpt(U,G,H,W){var Z=[],X=[];each$f(normalizeToArray(U.from),function(K){var Q=querySeries(G.oldSeries,K);Q>=0&&Z.push({dataGroupId:G.oldDataGroupIds[Q],data:G.oldData[Q],divide:getDivideShapeFromData(G.oldData[Q]),groupIdDim:K.dimension})}),each$f(normalizeToArray(U.to),function(K){var Q=querySeries(H.updatedSeries,K);if(Q>=0){var ee=H.updatedSeries[Q].getData();X.push({dataGroupId:G.oldDataGroupIds[Q],data:ee,divide:getDivideShapeFromData(ee),groupIdDim:K.dimension})}}),Z.length>0&&X.length>0&&transitionBetween(Z,X,W)}function installUniversalTransition(U){U.registerUpdateLifecycle("series:beforeupdate",function(G,H,W){each$f(normalizeToArray(W.seriesTransition),function(Z){each$f(normalizeToArray(Z.to),function(X){for(var K=W.updatedSeries,Q=0;Q<K.length;Q++)(X.seriesIndex!=null&&X.seriesIndex===K[Q].seriesIndex||X.seriesId!=null&&X.seriesId===K[Q].id)&&(K[Q][SERIES_UNIVERSAL_TRANSITION_PROP]=!0)})})}),U.registerUpdateLifecycle("series:transition",function(G,H,W){var Z=getUniversalTransitionGlobalStore(H);if(Z.oldSeries&&W.updatedSeries&&W.optionChanged){var X=W.seriesTransition;if(X)each$f(normalizeToArray(X),function(ie){transitionSeriesFromOpt(ie,Z,W,H)});else{var K=findTransitionSeriesBatches(Z,W);each$f(K.keys(),function(ie){var oe=K.get(ie);transitionBetween(oe.oldSeries,oe.newSeries,H)})}each$f(W.updatedSeries,function(ie){ie[SERIES_UNIVERSAL_TRANSITION_PROP]&&(ie[SERIES_UNIVERSAL_TRANSITION_PROP]=!1)})}for(var Q=G.getSeries(),ee=Z.oldSeries=[],te=Z.oldDataGroupIds=[],re=Z.oldData=[],ae=0;ae<Q.length;ae++){var ne=Q[ae].getData();ne.count()<DATA_COUNT_THRESHOLD&&(ee.push(Q[ae]),te.push(Q[ae].get("dataGroupId")),re.push(ne))}})}var ScaleBreakContextImpl=(function(){function U(){this.breaks=[],this._elapsedExtent=[1/0,-1/0]}return U.prototype.setBreaks=function(G){this.breaks=G.breaks},U.prototype.update=function(G){updateAxisBreakGapReal(this,G);var H=this._elapsedExtent;H[0]=this.elapse(G[0]),H[1]=this.elapse(G[1])},U.prototype.hasBreaks=function(){return!!this.breaks.length},U.prototype.calcNiceTickMultiple=function(G,H){for(var W=0;W<this.breaks.length;W++){var Z=this.breaks[W];if(Z.vmin<G&&G<Z.vmax){var X=H(G,Z.vmax);return process.env.NODE_ENV!=="production"&&assert(X>=0&&Math.round(X)===X),X}}return 0},U.prototype.getExtentSpan=function(){return this._elapsedExtent[1]-this._elapsedExtent[0]},U.prototype.normalize=function(G){var H=this._elapsedExtent[1]-this._elapsedExtent[0];return H===0?.5:(this.elapse(G)-this._elapsedExtent[0])/H},U.prototype.scale=function(G){return this.unelapse(G*(this._elapsedExtent[1]-this._elapsedExtent[0])+this._elapsedExtent[0])},U.prototype.elapse=function(G){for(var H=AXIS_BREAK_ELAPSED_BASE,W=AXIS_BREAK_LAST_BREAK_END_BASE,Z=!0,X=0;X<this.breaks.length;X++){var K=this.breaks[X];if(G<=K.vmax){G>K.vmin?H+=K.vmin-W+(G-K.vmin)/(K.vmax-K.vmin)*K.gapReal:H+=G-W,W=K.vmax,Z=!1;break}H+=K.vmin-W+K.gapReal,W=K.vmax}return Z&&(H+=G-W),H},U.prototype.unelapse=function(G){for(var H=AXIS_BREAK_ELAPSED_BASE,W=AXIS_BREAK_LAST_BREAK_END_BASE,Z=!0,X=0,K=0;K<this.breaks.length;K++){var Q=this.breaks[K],ee=H+Q.vmin-W,te=ee+Q.gapReal;if(G<=te){G>ee?X=Q.vmin+(G-ee)/(te-ee)*(Q.vmax-Q.vmin):X=W+G-H,W=Q.vmax,Z=!1;break}H=te,W=Q.vmax}return Z&&(X=W+G-H),X},U})();function createScaleBreakContext(){return new ScaleBreakContextImpl}var AXIS_BREAK_ELAPSED_BASE=0,AXIS_BREAK_LAST_BREAK_END_BASE=0;function updateAxisBreakGapReal(U,G){var H=0,W={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},Z=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},X={S:{tpAbs:Z(),tpPrct:Z()},E:{tpAbs:Z(),tpPrct:Z()}};each$f(U.breaks,function(Q){var ee=Q.gapParsed;ee.type==="tpPrct"&&(H+=ee.val);var te=clampBreakByExtent(Q,G);if(te){var re=te.vmin!==Q.vmin,ae=te.vmax!==Q.vmax,ne=te.vmax-te.vmin;if(!(re&&ae))if(re||ae){var ie=re?"S":"E";X[ie][ee.type].has=!0,X[ie][ee.type].span=ne,X[ie][ee.type].inExtFrac=ne/(Q.vmax-Q.vmin),X[ie][ee.type].val=ee.val}else W[ee.type].span+=ne,W[ee.type].val+=ee.val}});var K=H*(0+(G[1]-G[0])+(W.tpAbs.val-W.tpAbs.span)+(X.S.tpAbs.has?(X.S.tpAbs.val-X.S.tpAbs.span)*X.S.tpAbs.inExtFrac:0)+(X.E.tpAbs.has?(X.E.tpAbs.val-X.E.tpAbs.span)*X.E.tpAbs.inExtFrac:0)-W.tpPrct.span-(X.S.tpPrct.has?X.S.tpPrct.span*X.S.tpPrct.inExtFrac:0)-(X.E.tpPrct.has?X.E.tpPrct.span*X.E.tpPrct.inExtFrac:0))/(1-W.tpPrct.val-(X.S.tpPrct.has?X.S.tpPrct.val*X.S.tpPrct.inExtFrac:0)-(X.E.tpPrct.has?X.E.tpPrct.val*X.E.tpPrct.inExtFrac:0));each$f(U.breaks,function(Q){var ee=Q.gapParsed;ee.type==="tpPrct"&&(Q.gapReal=H!==0?Math.max(K,0)*ee.val/H:0),ee.type==="tpAbs"&&(Q.gapReal=ee.val),Q.gapReal==null&&(Q.gapReal=0)})}function pruneTicksByBreak(U,G,H,W,Z,X){U!=="no"&&each$f(H,function(K){var Q=clampBreakByExtent(K,X);if(Q)for(var ee=G.length-1;ee>=0;ee--){var te=G[ee],re=W(te),ae=Z*3/4;re>Q.vmin-ae&&re<Q.vmax+ae&&(U!=="preserve_extent_bound"||re!==X[0]&&re!==X[1])&&G.splice(ee,1)}})}function addBreaksToTicks(U,G,H,W){each$f(G,function(Z){var X=clampBreakByExtent(Z,H);X&&(U.push({value:X.vmin,break:{type:"vmin",parsedBreak:X},time:W?W(X):void 0}),U.push({value:X.vmax,break:{type:"vmax",parsedBreak:X},time:W?W(X):void 0}))}),G.length&&U.sort(function(Z,X){return Z.value-X.value})}function clampBreakByExtent(U,G){var H=Math.max(U.vmin,G[0]),W=Math.min(U.vmax,G[1]);return H<W||H===W&&H>G[0]&&H<G[1]?{vmin:H,vmax:W,breakOption:U.breakOption,gapParsed:U.gapParsed,gapReal:U.gapReal}:null}function parseAxisBreakOption(U,G,H){var W=[];if(!U)return{breaks:W};function Z(K,Q){return K>=0&&K<1-1e-5?!0:(process.env.NODE_ENV!=="production"&&error(Q+" must be >= 0 and < 1, rather than "+K+" ."),!1)}each$f(U,function(K){if(!K||K.start==null||K.end==null){process.env.NODE_ENV!=="production"&&error("The input axis breaks start/end should not be empty.");return}if(!K.isExpanded){var Q={breakOption:clone$4(K),vmin:G(K.start),vmax:G(K.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(K.gap!=null){var ee=!1;if(isString(K.gap)){var te=trim$1(K.gap);if(te.match(/%$/)){var re=parseFloat(te)/100;Z(re,"Percent gap")||(re=0),Q.gapParsed.type="tpPrct",Q.gapParsed.val=re,ee=!0}}if(!ee){var ae=G(K.gap);(!isFinite(ae)||ae<0)&&(process.env.NODE_ENV!=="production"&&error("Axis breaks gap must positive finite rather than ("+K.gap+")."),ae=0),Q.gapParsed.type="tpAbs",Q.gapParsed.val=ae}}if(Q.vmin===Q.vmax&&(Q.gapParsed.type="tpAbs",Q.gapParsed.val=0),H&&H.noNegative&&each$f(["vmin","vmax"],function(ie){Q[ie]<0&&(process.env.NODE_ENV!=="production"&&error("Axis break."+ie+" must not be negative."),Q[ie]=0)}),Q.vmin>Q.vmax){var ne=Q.vmax;Q.vmax=Q.vmin,Q.vmin=ne}W.push(Q)}}),W.sort(function(K,Q){return K.vmin-Q.vmin});var X=-1/0;return each$f(W,function(K,Q){X>K.vmin&&(process.env.NODE_ENV!=="production"&&error("Axis breaks must not overlap."),W[Q]=null),X=K.vmax}),{breaks:W.filter(function(K){return!!K})}}function identifyAxisBreak(U,G){return serializeAxisBreakIdentifier(G)===serializeAxisBreakIdentifier(U)}function serializeAxisBreakIdentifier(U){return U.start+"_\0_"+U.end}function retrieveAxisBreakPairs(U,G,H){var W=[];each$f(U,function(X,K){var Q=G(X);Q&&Q.type==="vmin"&&W.push([K])}),each$f(U,function(X,K){var Q=G(X);if(Q&&Q.type==="vmax"){var ee=find(W,function(te){return identifyAxisBreak(G(U[te[0]]).parsedBreak.breakOption,Q.parsedBreak.breakOption)});ee&&ee.push(K)}});var Z=[];return each$f(W,function(X){X.length===2&&Z.push(H?X:[U[X[0]],U[X[1]]])}),Z}function getTicksLogTransformBreak(U,G,H,W){var Z,X;if(U.break){var K=U.break.parsedBreak,Q=find(H,function(ae){return identifyAxisBreak(ae.breakOption,U.break.parsedBreak.breakOption)}),ee=W(Math.pow(G,K.vmin),Q.vmin),te=W(Math.pow(G,K.vmax),Q.vmax),re={type:K.gapParsed.type,val:K.gapParsed.type==="tpAbs"?round$4(Math.pow(G,K.vmin+K.gapParsed.val))-ee:K.gapParsed.val};Z={type:U.break.type,parsedBreak:{breakOption:K.breakOption,vmin:ee,vmax:te,gapParsed:re,gapReal:K.gapReal}},X=Q[U.break.type]}return{brkRoundingCriterion:X,vBreak:Z}}function logarithmicParseBreaksFromOption(U,G,H){var W={noNegative:!0},Z=parseAxisBreakOption(U,H,W),X=parseAxisBreakOption(U,H,W),K=Math.log(G);return X.breaks=map$1(X.breaks,function(Q){var ee=Math.log(Q.vmin)/K,te=Math.log(Q.vmax)/K,re={type:Q.gapParsed.type,val:Q.gapParsed.type==="tpAbs"?Math.log(Q.vmin+Q.gapParsed.val)/K-ee:Q.gapParsed.val};return{vmin:ee,vmax:te,gapParsed:re,gapReal:Q.gapReal,breakOption:Q.breakOption}}),{parsedOriginal:Z,parsedLogged:X}}var BREAK_MIN_MAX_TO_PARAM={vmin:"start",vmax:"end"};function makeAxisLabelFormatterParamBreak(U,G){return G&&(U=U||{},U.break={type:BREAK_MIN_MAX_TO_PARAM[G.type],start:G.parsedBreak.vmin,end:G.parsedBreak.vmax}),U}function installScaleBreakHelper(){registerScaleBreakHelperImpl({createScaleBreakContext,pruneTicksByBreak,addBreaksToTicks,parseAxisBreakOption,identifyAxisBreak,serializeAxisBreakIdentifier,retrieveAxisBreakPairs,getTicksLogTransformBreak,logarithmicParseBreaksFromOption,makeAxisLabelFormatterParamBreak})}var viewCache=makeInner();function ensureVisualInCache(U,G){var H=find(U,function(W){return getScaleBreakHelper().identifyAxisBreak(W.parsedBreak.breakOption,G.breakOption)});return H||U.push(H={zigzagRandomList:[],parsedBreak:G,shouldRemove:!1}),H}function resetCacheVisualRemoveFlag(U){each$f(U,function(G){return G.shouldRemove=!0})}function removeUnusedCacheVisual(U){for(var G=U.length-1;G>=0;G--)U[G].shouldRemove&&U.splice(G,1)}function rectCoordBuildBreakAxis(U,G,H,W,Z){var X=H.axis;if(X.scale.isBlank()||!getScaleBreakHelper())return;var K=getScaleBreakHelper().retrieveAxisBreakPairs(X.scale.getTicks({breakTicks:"only_break"}),function(me){return me.break},!1);if(!K.length)return;var Q=H.getModel("breakArea"),ee=Q.get("zigzagAmplitude"),te=Q.get("zigzagMinSpan"),re=Q.get("zigzagMaxSpan");te=Math.max(2,te||0),re=Math.max(te,re||0);var ae=Q.get("expandOnClick"),ne=Q.get("zigzagZ"),ie=Q.getModel("itemStyle"),oe=ie.getItemStyle(),se=oe.stroke,le=oe.lineWidth,ue=oe.lineDash,ce=oe.fill,fe=new Group$3({ignoreModelZ:!0}),he=X.isHorizontal(),ve=viewCache(G).visualList||(viewCache(G).visualList=[]);resetCacheVisualRemoveFlag(ve);for(var de=function(me){var ye=K[me][0].break.parsedBreak,_e=[];_e[0]=X.toGlobalCoord(X.dataToCoord(ye.vmin,!0)),_e[1]=X.toGlobalCoord(X.dataToCoord(ye.vmax,!0)),_e[1]<_e[0]&&_e.reverse();var xe=ensureVisualInCache(ve,ye);xe.shouldRemove=!1;var Se=new Group$3;ge(xe.zigzagRandomList,Se,_e[0],_e[1],he,ye),ae&&Se.on("click",function(){var Te={type:AXIS_BREAK_EXPAND_ACTION_TYPE,breaks:[{start:ye.breakOption.start,end:ye.breakOption.end}]};Te[X.dim+"AxisIndex"]=H.componentIndex,Z.dispatchAction(Te)}),Se.silent=!ae,fe.add(Se)},pe=0;pe<K.length;pe++)de(pe);U.add(fe),removeUnusedCacheVisual(ve);function ge(me,ye,_e,xe,Se,Te){var be={stroke:se,lineWidth:le,lineDash:ue,fill:"none"},Ae=Se?0:1,we=1-Ae,Ce=W[XY$2[we]]+W[WH$2[we]];function Ee(ze){var Ge=[],He=[];Ge[Ae]=He[Ae]=ze,Ge[we]=W[XY$2[we]],He[we]=Ce;var Ue={x1:Ge[0],y1:Ge[1],x2:He[0],y2:He[1]};return subPixelOptimizeLine$1(Ue,Ue,{lineWidth:1}),Ge[0]=Ue.x1,Ge[1]=Ue.y1,Ge[Ae]}_e=Ee(_e),xe=Ee(xe);for(var Me=[],De=[],Le=!0,Pe=W[XY$2[we]],Ie=0;;Ie++){var $e=Pe===W[XY$2[we]],Ve=Pe>=Ce;Ve&&(Pe=Ce);var Fe=[],ke=[];Fe[Ae]=_e,ke[Ae]=xe,!$e&&!Ve&&(Fe[Ae]+=Le?-ee:ee,ke[Ae]-=Le?ee:-ee),Fe[we]=Pe,ke[we]=Pe,Me.push(Fe),De.push(ke);var Re=void 0;if(Ie<me.length?Re=me[Ie]:(Re=Math.random(),me.push(Re)),Pe+=Re*(re-te)+te,Le=!Le,Ve)break}var Ne=getScaleBreakHelper().serializeAxisBreakIdentifier(Te.breakOption);if(ye.add(new Polyline$1({anid:"break_a_"+Ne,shape:{points:Me},style:be,z:ne})),Te.gapReal!==0){ye.add(new Polyline$1({anid:"break_b_"+Ne,shape:{points:De},style:be,z:ne}));var Oe=De.slice();Oe.reverse();var Be=Me.concat(Oe);ye.add(new Polygon({anid:"break_c_"+Ne,shape:{points:Be},style:{fill:ce,opacity:oe.opacity},z:ne}))}}}function buildAxisBreakLine(U,G,H,W){var Z=U.axis,X=H.transform;assert(W.style);var K=Z.getExtent();Z.inverse&&(K=K.slice(),K.reverse());var Q=getScaleBreakHelper().retrieveAxisBreakPairs(Z.scale.getTicks({breakTicks:"only_break"}),function(le){return le.break},!1),ee=map$1(Q,function(le){var ue=le[0].break.parsedBreak,ce=[Z.dataToCoord(ue.vmin,!0),Z.dataToCoord(ue.vmax,!0)];return ce[0]>ce[1]&&ce.reverse(),{coordPair:ce,brkId:getScaleBreakHelper().serializeAxisBreakIdentifier(ue.breakOption)}});ee.sort(function(le,ue){return le.coordPair[0]-ue.coordPair[0]});for(var te=K[0],re=null,ae=0;ae<ee.length;ae++){var ne=ee[ae],ie=Math.max(ne.coordPair[0],K[0]),oe=Math.min(ne.coordPair[1],K[1]);te<=ie&&se(te,ie,re,ne),te=oe,re=ne}te<=K[1]&&se(te,K[1],re,null);function se(le,ue,ce,fe){function he(_e,xe){X&&(applyTransform$1(_e,_e,X),applyTransform$1(xe,xe,X))}function ve(_e,xe){var Se={x1:_e[0],y1:_e[1],x2:xe[0],y2:xe[1]};subPixelOptimizeLine$1(Se,Se,W.style),_e[0]=Se.x1,_e[1]=Se.y1,xe[0]=Se.x2,xe[1]=Se.y2}var de=[le,0],pe=[ue,0],ge=[le,5],me=[ue,5];he(de,ge),ve(de,ge),he(pe,me),ve(pe,me),ve(de,pe);var ye=new Line$1(extend({shape:{x1:de[0],y1:de[1],x2:pe[0],y2:pe[1]}},W));G.add(ye),ye.anid="breakLine_"+(ce?ce.brkId:"\0")+"_\0_"+(fe?fe.brkId:"\0")}}function adjustBreakLabelPair(U,G,H){if(find(H,function(ce){return!ce}))return;var W=new Point;if(!labelIntersect(H[0],H[1],W,{direction:-(U?G+Math.PI:G),touchThreshold:0,bidirectional:!1}))return;var Z=create$1();rotate(Z,Z,-G);var X=map$1(H,function(ce){return ce.transform?mul(create$1(),Z,ce.transform):Z});function K(ce){var fe=H[0].localRect,he=new Point(fe[WH$2[ce]]*X[0][0],fe[WH$2[ce]]*X[0][1]);return Math.abs(he.y)<1e-5}var Q=.5;if(K(0)||K(1)){var ee=map$1(H,function(ce,fe){var he=ce.localRect.clone();return he.applyTransform(X[fe]),he}),te=new Point;te.copy(H[0].label).add(H[1].label).scale(.5),te.transform(Z);var re=W.clone().transform(Z),ae=ee[0].x+ee[1].x+(re.x>=0?ee[0].width:ee[1].width),ne=(ae+re.x)/2-te.x,ie=Math.min(ne,ne-re.x),oe=Math.max(ne,ne-re.x),se=oe<0?oe:ie>0?ie:0;Q=(ne-se)/re.x}var le=new Point,ue=new Point;Point.scale(le,W,-Q),Point.scale(ue,W,1-Q),labelLayoutApplyTranslation(H[0],le),labelLayoutApplyTranslation(H[1],ue)}function updateModelAxisBreak(U,G){var H={breaks:[]};return each$f(G.breaks,function(W){if(W){var Z=find(U.get("breaks",!0),function(Q){return getScaleBreakHelper().identifyAxisBreak(Q,W)});if(!Z){process.env.NODE_ENV!=="production"&&warn("Can not find axis break by start: "+W.start+", end: "+W.end);return}var X=G.type,K={isExpanded:!!Z.isExpanded};Z.isExpanded=X===AXIS_BREAK_EXPAND_ACTION_TYPE?!0:X===AXIS_BREAK_COLLAPSE_ACTION_TYPE?!1:X===AXIS_BREAK_TOGGLE_ACTION_TYPE?!Z.isExpanded:Z.isExpanded,H.breaks.push({start:Z.start,end:Z.end,isExpanded:!!Z.isExpanded,old:K})}}),H}function installAxisBreakHelper(){registerAxisBreakHelperImpl({adjustBreakLabelPair,buildAxisBreakLine,rectCoordBuildBreakAxis,updateModelAxisBreak})}function installAxisBreak(U){registerAction(U),installScaleBreakHelper(),installAxisBreakHelper()}function installLegacyGridContainLabel(){registerLegacyGridContainLabelImpl(legacyLayOutGridByContained)}function legacyLayOutGridByContained(U,G){each$f(U,function(H){if(!H.model.get(["axisLabel","inside"])){var W=estimateLabelUnionRect(H);if(W){var Z=H.isHorizontal()?"height":"width",X=H.model.get(["axisLabel","margin"]);G[Z]-=W[Z]+X,H.position==="top"?G.y+=W.height+X:H.position==="left"&&(G.x+=W.width+X)}}})}function estimateLabelUnionRect(U){var G=U.model,H=U.scale;if(!G.get(["axisLabel","show"])||H.isBlank())return;var W,Z,X=H.getExtent();H instanceof OrdinalScale?Z=H.count():(W=H.getTicks(),Z=W.length);var K=U.getLabelModel(),Q=makeLabelFormatter(U),ee,te=1;Z>40&&(te=Math.ceil(Z/40));for(var re=0;re<Z;re+=te){var ae=W?W[re]:{value:X[0]+re},ne=Q(ae,re),ie=K.getTextRect(ne),oe=se(ie,K.get("rotate")||0);ee?ee.union(oe):ee=oe}return ee;function se(le,ue){var ce=ue*Math.PI/180,fe=le.width,he=le.height,ve=fe*Math.abs(Math.cos(ce))+Math.abs(he*Math.sin(ce)),de=fe*Math.abs(Math.sin(ce))+Math.abs(he*Math.cos(ce)),pe=new BoundingRect(le.x,le.y,ve,de);return pe}}use([install$V]),use([install$W]),use([install$U,install$T,install$S,install$Q,install$O,install$M,install$L,install$K,install$J,install$I,install$H,install$G,install$E,install$D,install$C,install$B,install$A,install$z,install$y,install$x,install$w,install$v,install$u]),use(install$s),use(install$r),use(install$N),use(install$q),use(install$F),use(install$p),use(install$o),use(install$n),use(install$l),use(install$k),use(install$t),use(install$j),use(install$i),use(install$h),use(install$g),use(install$f),use(install$e),use(install$b),use(install$8),use(install$a),use(install$9),use(install$5),use(install$7),use(install$6),use(install$4),use(install$3),use(install$2),use(install$1),use(installUniversalTransition),use(installLabelLayout),use(installAxisBreak),use(installLegacyGridContainLabel),use(installScatterJitter);const _merge=(U,G)=>merge$1(U,G),onRE=/^on[^a-z]/,isOn=U=>onRE.test(U);function omitOn(U){const G={};for(const H in U)isOn(H)||(G[H]=U[H]);return G}function unwrapInjected(U,G){const H=vue.isRef(U)?vue.unref(U):U;return H&&typeof H=="object"&&"value"in H?vue.unref(H)||G:H||G}const hexToRgba=(U,G)=>{const H=parseInt(U.slice(1,3),16),W=parseInt(U.slice(3,5),16),Z=parseInt(U.slice(5,7),16);return isNaN(G)?`rgb(${H}, ${W}, ${Z})`:`rgba(${H}, ${W}, ${Z}, ${G})`};var ChartTypeEnum=(U=>(U.Bar="bar",U.Pie="pie",U.Line="line",U.Map="map",U.Radar="radar",U))(ChartTypeEnum||{});const COMMON_COLORS=["#c065e7","#765deb","#3862d8","#6a89E2","#219CF9","#6efbbf","#40c057","#ffd351","#ff8e43","#f56b6d"],BG_COLOR="#fff",defaultThemeOpt=()=>({color:COMMON_COLORS,backgroundColor:BG_COLOR}),hasConsensusxAxisBase=U=>{let G=!1;return U.forEach(H=>{H.xAxis&&(G=!0)}),G},getNormalSeriesObj=(U,G)=>{const H=[];let W=[],Z=cloneDeep(U);const X=hasConsensusxAxisBase(Z),K=[];X&&(Z.forEach(te=>{te.xAxis&&K.push(te.name)}),Z=Z.filter(te=>te.xAxis===void 0));function Q(te,re){let ae="";return re.forEach(ne=>{ne.name===te&&(ae=ne)}),ae}const ee={type:G};return Array.isArray(Z)&&(X?W=K.map(te=>{H.push(te);const re=Q(te,Z),ae={name:te,value:re!==""?re.value:0,dataObj:re!==""?re:"",group:"noGroup"};return re.info!==void 0&&(ae.info=re.info),ae}):W=Z.map(te=>(H.push(te.name??""),{name:te.name,value:te.value||0,info:te.info,dataObj:te,group:"noGroup"})),ee.data=W),{category:H,seriesObj:ee}},transformOriginDataToSeries=(U,G)=>{const{seriesObj:H,category:W}=getNormalSeriesObj(U,G);return{series:H,category:W}},transformPieDataToSeries=(U,G)=>{const H=[],W=U.map((Z,X)=>(H.push(Z.name),{name:Z.name,value:parseInt(Z.value,10),itemStyle:{color:new LinearGradient(1,1,0,0,[{offset:0,color:hexToRgba(G[X],1)},{offset:1,color:hexToRgba(G[X],.5)}])}}));return{category:H,series:W}},build$2=U=>{const{category:G,series:H}=transformOriginDataToSeries(U,"pie");console.log(G,H);const W=function(ee){const te=/(?=(\B)(\d{3})+$)/g;return ee.toString().replace(te,",")},Z=ee=>({type:"pie",roseType:"radius",radius:["25%","60%"],center:["50%","50%"],data:ee,itemStyle:{normal:{borderColor:"#fff",borderWidth:2}},labelLine:{noraml:{length:20,length2:120,lineStyle:{}}},label:{normal:{formatter:te=>"{icon|●}{name|"+te.name+`}
|
|
62
|
+
{value|`+W(te.value)+"}",rich:{icon:{fontSize:16,color:"inherit"},name:{fontSize:18,padding:[0,0,0,10],color:"#000"},value:{fontSize:14,fontWeight:"bolder",padding:[10,0,0,20],color:"inherit"}}}}}),X="总量",K=U.reduce((ee,te)=>ee+te.value*1,0);return _merge(defaultThemeOpt(),{tooltip:{trigger:"item"},title:[{text:"{name|"+X+`}
|
|
63
|
+
{val|`+W(K)+"}",top:"center",left:"center",textStyle:{rich:{name:{fontSize:14,fontWeight:"normal",color:"#000",padding:[10,0]},val:{fontSize:32,fontWeight:"bolder",color:"#000"}}}},{text:"单位:个",top:20,left:20,textStyle:{fontSize:14,color:"#666666",fontWeight:400},show:!1}],series:[Z(H.data)]})},createSeriesData=U=>({name:"",type:"pie",roseType:!1,center:["35%","50%"],radius:["45%","60%"],avoidLabelOverlap:!0,label:{normal:{show:!1,position:"center"},emphasis:{show:!0,textStyle:{color:"#333",fontSize:12}}},selected:{},data:U}),build$1=U=>{const G=["#67C8FF","#FF6666","#669AFF","#F4A54E","#F284F3","#41C8FF","#FF2366","#749AFF","#F4A22E","#F124F3","#FF6767","#FF9D6B","#D3C95A","#55CA69","#16D8B8","#67CCFF","#6895FF","#B095FF","#D05CFF","#FF63AD"],{category:H,series:W}=transformPieDataToSeries(U,G),Z={show:!0,position:"center",rich:{a:{fontWeight:700,fontSize:22,lineHeight:20},b:{fontWeight:700,fontSize:16,lineHeight:24}},formatter:function(re){return["{a|"+re.percent+`}
|
|
64
|
+
{b|`+re.name+"}"]}},X={type:"scroll",orient:"vertical",right:10,top:"center",bottom:20,itemWidth:8,itemHeight:8,align:"left",textStyle:{fontSize:12,padding:[0,0,0,5],rich:{value:{fontSize:14,fontWeight:400}}},formatter:re=>{const ae=W.find(ne=>ne.name===re);return re+" {value|"+ae.value+"}"},data:H},K={left:"center",top:"top",textStyle:{fontSize:"16px",color:"#333",fontWeight:400}},Q={trigger:"item",extraCssText:"box-shadow: 0px 0px 5px 0px rgba(139, 146, 190, 0.2); color:rgba(77, 77, 77, 0.9); fontSize:14px; padding:12px",backgroundColor:"rgba(236, 242, 255, 0.9)",formatter:"{b}</br>占比:{d}%</br>数量:{c}"},ee=[createSeriesData(W)];return _merge(defaultThemeOpt(),{tooltip:Q,title:K,legend:X,label:Z,colors:G,series:ee})},result={pie01:build$2,pie02:build$1},build=(U,G,H)=>{let W=Object.create(null);const Z=result[H];return G===ChartTypeEnum.Pie?W=Z(U):W={},console.log(W),W};let registered=null;const TAG_NAME="pandora-charts";function register(){if(registered!=null)return registered;if(typeof HTMLElement>"u"||typeof customElements>"u")return registered=!1;try{new Function("tag",`class EChartsElement extends HTMLElement {
|
|
65
|
+
__dispose = null;
|
|
66
|
+
|
|
67
|
+
disconnectedCallback() {
|
|
68
|
+
if (this.__dispose) {
|
|
69
|
+
this.__dispose();
|
|
70
|
+
this.__dispose = null;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
if (customElements.get(tag) == null) {
|
|
76
|
+
customElements.define(tag, EChartsElement);
|
|
77
|
+
}
|
|
78
|
+
`)(TAG_NAME)}catch{return registered=!1}return registered=!0}const METHOD_NAMES=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function usePublicAPI(U){function G(W){return(...Z)=>{if(!U.value)throw new Error("ECharts is not initialized yet.");return U.value[W].apply(U.value,Z)}}function H(){const W=Object.create(null);return METHOD_NAMES.forEach(Z=>{W[Z]=G(Z)}),W}return H()}const LOADING_OPTIONS_KEY="ecLoadingOptions";function useLoading(U,G,H){const W=vue.inject(LOADING_OPTIONS_KEY,{}),Z=vue.computed(()=>({...unwrapInjected(W,{}),...H?.value}));vue.watchEffect(()=>{const X=U.value;X&&(G.value?X.showLoading(Z.value):X.hideLoading())})}var raf=null;function requestAnimationFrame(U){return raf||(raf=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(G){return setTimeout(G,16)}).bind(window)),raf(U)}var caf=null;function cancelAnimationFrame(U){caf||(caf=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(G){clearTimeout(G)}).bind(window)),caf(U)}function createStyles(U){var G=document.createElement("style");return G.styleSheet?G.styleSheet.cssText=U:G.appendChild(document.createTextNode(U)),(document.querySelector("head")||document.body).appendChild(G),G}function createElement(U,G){G===void 0&&(G={});var H=document.createElement(U);return Object.keys(G).forEach(function(W){H[W]=G[W]}),H}function getComputedStyle(U,G,H){var W=window.getComputedStyle(U,null)||{display:"none"};return W[G]}function getRenderInfo(U){if(!document.documentElement.contains(U))return{detached:!0,rendered:!1};for(var G=U;G!==document;){if(getComputedStyle(G,"display")==="none")return{detached:!1,rendered:!1};G=G.parentNode}return{detached:!1,rendered:!0}}var css_248z='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',total=0,style=null;function addListener(U,G){U.__resize_mutation_handler__||(U.__resize_mutation_handler__=handleMutation.bind(U));var H=U.__resize_listeners__;if(!H){if(U.__resize_listeners__=[],window.ResizeObserver){var W=U.offsetWidth,Z=U.offsetHeight,X=new ResizeObserver(function(){!U.__resize_observer_triggered__&&(U.__resize_observer_triggered__=!0,U.offsetWidth===W&&U.offsetHeight===Z)||runCallbacks(U)}),K=getRenderInfo(U),Q=K.detached,ee=K.rendered;U.__resize_observer_triggered__=Q===!1&&ee===!1,U.__resize_observer__=X,X.observe(U)}else if(U.attachEvent&&U.addEventListener)U.__resize_legacy_resize_handler__=function(){runCallbacks(U)},U.attachEvent("onresize",U.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",U.__resize_mutation_handler__);else if(total||(style=createStyles(css_248z)),initTriggers(U),U.__resize_rendered__=getRenderInfo(U).rendered,window.MutationObserver){var te=new MutationObserver(U.__resize_mutation_handler__);te.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),U.__resize_mutation_observer__=te}}U.__resize_listeners__.push(G),total++}function removeListener(U,G){var H=U.__resize_listeners__;if(H){if(G&&H.splice(H.indexOf(G),1),!H.length||!G){if(U.detachEvent&&U.removeEventListener){U.detachEvent("onresize",U.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",U.__resize_mutation_handler__);return}U.__resize_observer__?(U.__resize_observer__.unobserve(U),U.__resize_observer__.disconnect(),U.__resize_observer__=null):(U.__resize_mutation_observer__&&(U.__resize_mutation_observer__.disconnect(),U.__resize_mutation_observer__=null),U.removeEventListener("scroll",handleScroll),U.removeChild(U.__resize_triggers__.triggers),U.__resize_triggers__=null),U.__resize_listeners__=null}!--total&&style&&style.parentNode.removeChild(style)}}function getUpdatedSize(U){var G=U.__resize_last__,H=G.width,W=G.height,Z=U.offsetWidth,X=U.offsetHeight;return Z!==H||X!==W?{width:Z,height:X}:null}function handleMutation(){var U=getRenderInfo(this),G=U.rendered,H=U.detached;G!==this.__resize_rendered__&&(!H&&this.__resize_triggers__&&(resetTriggers(this),this.addEventListener("scroll",handleScroll,!0)),this.__resize_rendered__=G,runCallbacks(this))}function handleScroll(){var U=this;resetTriggers(this),this.__resize_raf__&&cancelAnimationFrame(this.__resize_raf__),this.__resize_raf__=requestAnimationFrame(function(){var G=getUpdatedSize(U);G&&(U.__resize_last__=G,runCallbacks(U))})}function runCallbacks(U){!U||!U.__resize_listeners__||U.__resize_listeners__.forEach(function(G){G.call(U,U)})}function initTriggers(U){var G=getComputedStyle(U,"position");(!G||G==="static")&&(U.style.position="relative"),U.__resize_old_position__=G,U.__resize_last__={};var H=createElement("div",{className:"resize-triggers"}),W=createElement("div",{className:"resize-expand-trigger"}),Z=createElement("div"),X=createElement("div",{className:"resize-contract-trigger"});W.appendChild(Z),H.appendChild(W),H.appendChild(X),U.appendChild(H),U.__resize_triggers__={triggers:H,expand:W,expandChild:Z,contract:X},resetTriggers(U),U.addEventListener("scroll",handleScroll,!0),U.__resize_last__={width:U.offsetWidth,height:U.offsetHeight}}function resetTriggers(U){var G=U.__resize_triggers__,H=G.expand,W=G.expandChild,Z=G.contract,X=Z.scrollWidth,K=Z.scrollHeight,Q=H.offsetWidth,ee=H.offsetHeight,te=H.scrollWidth,re=H.scrollHeight;Z.scrollLeft=X,Z.scrollTop=K,W.style.width=Q+1+"px",W.style.height=ee+1+"px",H.scrollLeft=te,H.scrollTop=re}function useAutoresize(U,G,H){let W=null;vue.watch([H,U,G],([Z,X,K],Q,ee)=>{if(Z&&X&&K){const te=K===!0?{}:K,{throttle:re=100,onResize:ae}=te,ne=()=>{X.resize(),ae?.()};W=re?throttle(ne,re):ne,addListener(Z,W)}ee(()=>{Z&&W&&removeListener(Z,W)})})}function useEventListener(U,G,H){let W=H;W||(W={},Object.keys(G).filter(Z=>Z.indexOf("on")===0&&Z.length>2).forEach(Z=>{let X=Z.charAt(2).toLowerCase()+Z.slice(3);X.substring(X.length-4)==="Once"&&(X=`~${X.substring(0,X.length-4)}`),W[X]=G[Z]})),Object.keys(W).forEach(Z=>{let X=W[Z];if(!X)return;let K=Z.toLowerCase();K.charAt(0)==="~"&&(K=K.substring(1),X.__once__=!0);let Q=U;if(K.indexOf("zr:")===0&&(Q=U.getZr(),K=K.substring(3)),X.__once__){delete X.__once__;const ee=X;X=(...te)=>{ee(...te),Q.off(K,X)}}Q.on(K,X)})}function useCharts(U){const G=vue.ref(null),H=vue.ref(!1);async function W(){return vue.unref(G)||console.error("The chart instance has not been obtained, please make sure that the chart has been rendered when performing the chart operation!"),await vue.nextTick(),vue.unref(G)}return[K=>{vue.onUnmounted(()=>{G.value=null,H.value=!1}),!(vue.unref(H)&&K===vue.unref(G))&&(G.value=K,H.value=!0,vue.watch(()=>U,()=>{U&&K.setProps(U)},{immediate:!0,deep:!0}))},{setProps:async K=>{(await W()).setProps(K)},setOptions:async K=>{(await W()).setOptions(K)},resize:async()=>{(await W()).resize()},getInstance:()=>vue.unref(G)?.getInstance(),showLoading:async(K,Q)=>{(await W()).showLoading(K,Q)},hideLoading:async()=>{(await W()).hideLoading()},clear:async()=>{(await W()).clear()},dispose:async()=>{(await W()).dispose()}}]}const defaultProps={data:{type:Array,default:()=>[]},theme:{type:[Object,String]},options:{type:Object,default:()=>{}},group:String,initOptions:Object,updateOptions:Object,manualUpdate:Boolean,autoresize:{type:[Boolean,Object],default:!0},loading:{type:Boolean,default:!1},loadingOptions:{type:Object,default:()=>{}},chartType:String,subChartType:String},wcRegistered=register();typeof window.Vue<"u"&&window.Vue.config&&window.Vue.config.ignoredElements.push(TAG_NAME);const THEME_KEY="ecTheme",INIT_OPTIONS_KEY="ecInitOptions",UPDATE_OPTIONS_KEY="ecUpdateOptions",_sfc_main=vue.defineComponent({name:"Charts",inheritAttrs:!1,props:defaultProps,emits:["register"],setup(U,{attrs:G,emit:H}){const W=vue.shallowRef(),Z=vue.shallowRef(),X=vue.shallowRef(),K=vue.ref({}),Q=vue.computed(()=>({...U,...K.value})),ee=vue.inject(THEME_KEY,null),te=vue.inject(INIT_OPTIONS_KEY,null),re=vue.inject(UPDATE_OPTIONS_KEY,null),ae=vue.computed(()=>Q.value.autoresize),ne=vue.computed(()=>Q.value.manualUpdate),ie=vue.computed(()=>Q.value.loading),oe=vue.computed(()=>Q.value.loadingOptions),se=vue.computed(()=>Q.value.data),le=vue.computed(()=>Q.value.chartType),ue=vue.computed(()=>Q.value.subChartType),ce=vue.computed(()=>Q.value.theme||unwrapInjected(ee,{})),fe=vue.computed(()=>X.value||Q.value.options||null),he=vue.computed(()=>Q.value.initOptions||unwrapInjected(te,{})),ve=vue.computed(()=>Q.value.updateOptions||unwrapInjected(re,{})),de=vue.computed(()=>omitOn(G));function pe(Te){if(!W.value)return;const be=Z.value=init$1(W.value,ce.value,he.value);Q.value.group&&(be.group=Q.value.group),useEventListener(be,G,void 0);function Ae(){be&&!be.isDisposed()&&be.resize()}function we(){if(Te||fe.value){const Ee=build(se.value,le.value,ue.value);be.setOption(Ee,ve.value)}}ae.value?vue.nextTick(()=>{Ae(),we()}):we()}function ge(Te,be){Q.value.manualUpdate&&(X.value=Te),Z.value?Z.value.setOption(Te,be||{}):pe(Te)}function me(){Z.value&&(Z.value.dispose(),Z.value=void 0)}let ye=null;vue.watch(ne,Te=>{typeof ye=="function"&&(ye(),ye=null),Te||(ye=vue.watch(()=>Q.value.options,(be,Ae)=>{be&&(Z.value?Z.value.setOption(be,{notMerge:be!==Ae,...ve.value}):pe())},{deep:!0}))},{immediate:!0}),vue.watch([ce,he],()=>{me(),pe()},{deep:!0}),vue.watchEffect(()=>{Q.value.group&&Z.value&&(Z.value.group=Q.value.group)}),vue.watch(se,Te=>{Te&&Te.length&&ge(build(Te,le.value,ue.value))}),useLoading(Z,vue.computed(()=>!!ie.value),oe),useAutoresize(Z,ae,W);const _e=usePublicAPI(Z);function xe(Te){K.value={...K.value,...Te}}const Se={setProps:xe,setOptions:ge,resize:()=>Z.value?.resize(),getInstance:()=>Z.value,showLoading:(Te,be)=>Z.value?.showLoading(Te,be),hideLoading:()=>Z.value?.hideLoading(),clear:()=>Z.value?.clear(),dispose:()=>Z.value?.dispose()};return vue.onMounted(()=>{pe(),H("register",Se)}),vue.onBeforeUnmount(()=>{wcRegistered&&W.value?W.value.__dispose=me:me()}),{chart:Z,root:W,nonEventAttrs:de,register,..._e}},render(){const U={...this.nonEventAttrs};return U.ref="root",U.class=U.class?["echarts"].concat(U.class):"echarts",vue.createVNode(TAG_NAME,U,null)}}),PdCharts=withInstall(_sfc_main),install=installer.install;exports.Charts=_sfc_main,exports.PdCharts=PdCharts,exports.PdForm=PdForm,exports.PdFormItem=PdFormItem,exports.PdPageLayout=PdPageLayout,exports.PdPageTreeLayout=PdPageTreeLayout,exports.PdTable=PdTable,exports.default=installer,exports.install=install,exports.makeInstaller=makeInstaller,exports.useAutoresize=useAutoresize,exports.useCharts=useCharts,exports.useComponentRegister=useComponentRegister,exports.useEventListener=useEventListener,exports.useForm=useForm,exports.useLoading=useLoading,exports.usePublicAPI=usePublicAPI,exports.useTable=useTable,Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|