File: /www/server/panel/BTPanel/static/js/utils-lib.js
var Xe=Object.defineProperty;var Je=(n,r,a)=>r in n?Xe(n,r,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[r]=a;var se=(n,r,a)=>(Je(n,typeof r!="symbol"?r+"":r,a),a);import{d as defineAsyncComponent,E as ElLoading,n as nextTick,a as ElMessage,u as useClipboard,b as useRoute,c as defineComponent,r as ref,w as watch,e as createVNode$1,m as mergeProps,f as ElImage,l as linkProps,t as toRefs,g as computed,h as ElLink,F as Fragment,i as isVNode$1,o as onMounted,j as openBlock,k as createElementBlock,p as unref,q as createBaseVNode,s as toDisplayString,v as withCtx,x as createTextVNode,y as createCommentVNode,z as ElButton,A as createStaticVNode,B as renderList,C as createBlock,D as ElTag,G as ElDivider,H as reactive,I as resolveDirective,J as withDirectives,K as vShow,L as normalizeClass,M as normalizeStyle$1,N as renderSlot,O as resolveDynamicComponent,P as withKeys,Q as isRef,R as withModifiers,S as ElInputNumber,T as ElInput,U as ElCheckbox,V as shallowRef,W as isReactive,X as mergeModels,Y as useModel,Z as useSlots,_ as useTemplateRef,$ as useThrottleFn,a0 as provide,a1 as createSlots,a2 as zhCn,a3 as useResizeObserver,a4 as ElConfigProvider,a5 as ElDialog,a6 as createApp,a7 as useDark,a8 as onUnmounted,a9 as toRaw,aa as formProps,ab as ElForm,ac as formItemProps,ad as ElFormItem,ae as checkboxProps,af as ElCheckboxButton,ag as ElCheckboxGroup,ah as inputProps,ai as radioGroupProps,aj as ElRadioGroup,ak as ElRadio,al as ElRadioButton,am as ElOption,an as ElSelect,ao as switchProps,ap as ElSwitch,aq as buttonProps,ar as ElDropdown,as as ElDropdownMenu,at as ElDropdownItem,au as useWebSocket,av as toRef,aw as useSessionStorage,ax as ElPagination,ay as ElTableColumn,az as ElEmpty,aA as ElTable,aB as ElPopover,aC as inject,aD as useDebounceFn,aE as ElTabPane,aF as h,aG as ElTabs,aH as onBeforeUnmount,aI as storeToRefs,aJ as defineStore,aK as useLocalStorage,aL as useRouter,aM as nprogress,aN as watchEffect,aO as tryOnScopeDispose,aP as isClient,aQ as isNavigationFailure,aR as createRouter,aS as createWebHistory}from"./base-lib.js?v=1777008528";import{g as getDefaultExportFromCjs}from"./__commonjsHelpers__.js?v=1777008528";const scriptRel=function(){const r=typeof document<"u"&&document.createElement("link").relList;return r&&r.supports&&r.supports("modulepreload")?"modulepreload":"preload"}(),assetsURL=function(n,r){return new URL(n,r).href},seen={},__vitePreload=function(r,a,o){let s=Promise.resolve();if(a&&a.length>0){const l=document.getElementsByTagName("link");s=Promise.all(a.map(u=>{if(u=assetsURL(u,o),u in seen)return;seen[u]=!0;const c=u.endsWith(".css?v=1777008528"),d=c?'[rel="stylesheet"]':"";if(!!o)for(let v=l.length-1;v>=0;v--){const g=l[v];if(g.href===u&&(!c||g.rel==="stylesheet"))return}else if(document.querySelector('link[href="'.concat(u,'"]').concat(d)))return;const p=document.createElement("link");if(p.rel=c?"stylesheet":scriptRel,c||(p.as="script",p.crossOrigin=""),p.href=u,document.head.appendChild(p),c)return new Promise((v,g)=>{p.addEventListener("load",v),p.addEventListener("error",()=>g(new Error("Unable to preload CSS for ".concat(u))))})}))}return s.then(()=>r()).catch(l=>{const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=l,window.dispatchEvent(u),!u.defaultPrevented)throw l})};function bind$3(n,r){return function(){return n.apply(r,arguments)}}const{toString:toString$2}=Object.prototype,{getPrototypeOf}=Object,{iterator:iterator$1,toStringTag}=Symbol,kindOf=(n=>r=>{const a=toString$2.call(r);return n[a]||(n[a]=a.slice(8,-1).toLowerCase())})(Object.create(null)),kindOfTest=n=>(n=n.toLowerCase(),r=>kindOf(r)===n),typeOfTest=n=>r=>typeof r===n,{isArray:isArray$3}=Array,isUndefined$1=typeOfTest("undefined");function isBuffer$1(n){return n!==null&&!isUndefined$1(n)&&n.constructor!==null&&!isUndefined$1(n.constructor)&&isFunction$3(n.constructor.isBuffer)&&n.constructor.isBuffer(n)}const isArrayBuffer=kindOfTest("ArrayBuffer");function isArrayBufferView(n){let r;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?r=ArrayBuffer.isView(n):r=n&&n.buffer&&isArrayBuffer(n.buffer),r}const isString$2=typeOfTest("string"),isFunction$3=typeOfTest("function"),isNumber$2=typeOfTest("number"),isObject$5=n=>n!==null&&typeof n=="object",isBoolean$1=n=>n===!0||n===!1,isPlainObject$1=n=>{if(kindOf(n)!=="object")return!1;const r=getPrototypeOf(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(toStringTag in n)&&!(iterator$1 in n)},isEmptyObject=n=>{if(!isObject$5(n)||isBuffer$1(n))return!1;try{return Object.keys(n).length===0&&Object.getPrototypeOf(n)===Object.prototype}catch(r){return!1}},isDate$1=kindOfTest("Date"),isFile=kindOfTest("File"),isBlob=kindOfTest("Blob"),isFileList=kindOfTest("FileList"),isStream=n=>isObject$5(n)&&isFunction$3(n.pipe),isFormData=n=>{let r;return n&&(typeof FormData=="function"&&n instanceof FormData||isFunction$3(n.append)&&((r=kindOf(n))==="formdata"||r==="object"&&isFunction$3(n.toString)&&n.toString()==="[object FormData]"))},isURLSearchParams=kindOfTest("URLSearchParams"),[isReadableStream,isRequest,isResponse,isHeaders]=["ReadableStream","Request","Response","Headers"].map(kindOfTest),trim$3=n=>n.trim?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function forEach(n,r,{allOwnKeys:a=!1}={}){if(n===null||typeof n>"u")return;let o,s;if(typeof n!="object"&&(n=[n]),isArray$3(n))for(o=0,s=n.length;o<s;o++)r.call(null,n[o],o,n);else{if(isBuffer$1(n))return;const l=a?Object.getOwnPropertyNames(n):Object.keys(n),u=l.length;let c;for(o=0;o<u;o++)c=l[o],r.call(null,n[c],c,n)}}function findKey(n,r){if(isBuffer$1(n))return null;r=r.toLowerCase();const a=Object.keys(n);let o=a.length,s;for(;o-- >0;)if(s=a[o],r===s.toLowerCase())return s;return null}const _global=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,isContextDefined=n=>!isUndefined$1(n)&&n!==_global;function merge$1(){const{caseless:n,skipUndefined:r}=isContextDefined(this)&&this||{},a={},o=(s,l)=>{const u=n&&findKey(a,l)||l;isPlainObject$1(a[u])&&isPlainObject$1(s)?a[u]=merge$1(a[u],s):isPlainObject$1(s)?a[u]=merge$1({},s):isArray$3(s)?a[u]=s.slice():(!r||!isUndefined$1(s))&&(a[u]=s)};for(let s=0,l=arguments.length;s<l;s++)arguments[s]&&forEach(arguments[s],o);return a}const extend$3=(n,r,a,{allOwnKeys:o}={})=>(forEach(r,(s,l)=>{a&&isFunction$3(s)?n[l]=bind$3(s,a):n[l]=s},{allOwnKeys:o}),n),stripBOM=n=>(n.charCodeAt(0)===65279&&(n=n.slice(1)),n),inherits$1=(n,r,a,o)=>{n.prototype=Object.create(r.prototype,o),n.prototype.constructor=n,Object.defineProperty(n,"super",{value:r.prototype}),a&&Object.assign(n.prototype,a)},toFlatObject=(n,r,a,o)=>{let s,l,u;const c={};if(r=r||{},n==null)return r;do{for(s=Object.getOwnPropertyNames(n),l=s.length;l-- >0;)u=s[l],(!o||o(u,n,r))&&!c[u]&&(r[u]=n[u],c[u]=!0);n=a!==!1&&getPrototypeOf(n)}while(n&&(!a||a(n,r))&&n!==Object.prototype);return r},endsWith=(n,r,a)=>{n=String(n),(a===void 0||a>n.length)&&(a=n.length),a-=r.length;const o=n.indexOf(r,a);return o!==-1&&o===a},toArray=n=>{if(!n)return null;if(isArray$3(n))return n;let r=n.length;if(!isNumber$2(r))return null;const a=new Array(r);for(;r-- >0;)a[r]=n[r];return a},isTypedArray$1=(n=>r=>n&&r instanceof n)(typeof Uint8Array<"u"&&getPrototypeOf(Uint8Array)),forEachEntry=(n,r)=>{const o=(n&&n[iterator$1]).call(n);let s;for(;(s=o.next())&&!s.done;){const l=s.value;r.call(n,l[0],l[1])}},matchAll=(n,r)=>{let a;const o=[];for(;(a=n.exec(r))!==null;)o.push(a);return o},isHTMLForm=kindOfTest("HTMLFormElement"),toCamelCase$1=n=>n.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(a,o,s){return o.toUpperCase()+s}),hasOwnProperty$1=(({hasOwnProperty:n})=>(r,a)=>n.call(r,a))(Object.prototype),isRegExp$1=kindOfTest("RegExp"),reduceDescriptors=(n,r)=>{const a=Object.getOwnPropertyDescriptors(n),o={};forEach(a,(s,l)=>{let u;(u=r(s,l,n))!==!1&&(o[l]=u||s)}),Object.defineProperties(n,o)},freezeMethods=n=>{reduceDescriptors(n,(r,a)=>{if(isFunction$3(n)&&["arguments","caller","callee"].indexOf(a)!==-1)return!1;const o=n[a];if(isFunction$3(o)){if(r.enumerable=!1,"writable"in r){r.writable=!1;return}r.set||(r.set=()=>{throw Error("Can not rewrite read-only method '"+a+"'")})}})},toObjectSet=(n,r)=>{const a={},o=s=>{s.forEach(l=>{a[l]=!0})};return isArray$3(n)?o(n):o(String(n).split(r)),a},noop$1=()=>{},toFiniteNumber=(n,r)=>n!=null&&Number.isFinite(n=+n)?n:r;function isSpecCompliantForm(n){return!!(n&&isFunction$3(n.append)&&n[toStringTag]==="FormData"&&n[iterator$1])}const toJSONObject=n=>{const r=new Array(10),a=(o,s)=>{if(isObject$5(o)){if(r.indexOf(o)>=0)return;if(isBuffer$1(o))return o;if(!("toJSON"in o)){r[s]=o;const l=isArray$3(o)?[]:{};return forEach(o,(u,c)=>{const d=a(u,s+1);!isUndefined$1(d)&&(l[c]=d)}),r[s]=void 0,l}}return o};return a(n,0)},isAsyncFn=kindOfTest("AsyncFunction"),isThenable=n=>n&&(isObject$5(n)||isFunction$3(n))&&isFunction$3(n.then)&&isFunction$3(n.catch),_setImmediate=((n,r)=>n?setImmediate:r?((a,o)=>(_global.addEventListener("message",({source:s,data:l})=>{s===_global&&l===a&&o.length&&o.shift()()},!1),s=>{o.push(s),_global.postMessage(a,"*")}))("axios@".concat(Math.random()),[]):a=>setTimeout(a))(typeof setImmediate=="function",isFunction$3(_global.postMessage)),asap=typeof queueMicrotask<"u"?queueMicrotask.bind(_global):typeof process<"u"&&process.nextTick||_setImmediate,isIterable=n=>n!=null&&isFunction$3(n[iterator$1]),utils$1={isArray:isArray$3,isArrayBuffer,isBuffer:isBuffer$1,isFormData,isArrayBufferView,isString:isString$2,isNumber:isNumber$2,isBoolean:isBoolean$1,isObject:isObject$5,isPlainObject:isPlainObject$1,isEmptyObject,isReadableStream,isRequest,isResponse,isHeaders,isUndefined:isUndefined$1,isDate:isDate$1,isFile,isBlob,isRegExp:isRegExp$1,isFunction:isFunction$3,isStream,isURLSearchParams,isTypedArray:isTypedArray$1,isFileList,forEach,merge:merge$1,extend:extend$3,trim:trim$3,stripBOM,inherits:inherits$1,toFlatObject,kindOf,kindOfTest,endsWith,toArray,forEachEntry,matchAll,isHTMLForm,hasOwnProperty:hasOwnProperty$1,hasOwnProp:hasOwnProperty$1,reduceDescriptors,freezeMethods,toObjectSet,toCamelCase:toCamelCase$1,noop:noop$1,toFiniteNumber,findKey,global:_global,isContextDefined,isSpecCompliantForm,toJSONObject,isAsyncFn,isThenable,setImmediate:_setImmediate,asap,isIterable};function AxiosError(n,r,a,o,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=n,this.name="AxiosError",r&&(this.code=r),a&&(this.config=a),o&&(this.request=o),s&&(this.response=s,this.status=s.status?s.status:null)}utils$1.inherits(AxiosError,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:utils$1.toJSONObject(this.config),code:this.code,status:this.status}}});const prototype$1=AxiosError.prototype,descriptors={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(n=>{descriptors[n]={value:n}});Object.defineProperties(AxiosError,descriptors);Object.defineProperty(prototype$1,"isAxiosError",{value:!0});AxiosError.from=(n,r,a,o,s,l)=>{const u=Object.create(prototype$1);utils$1.toFlatObject(n,u,function(p){return p!==Error.prototype},f=>f!=="isAxiosError");const c=n&&n.message?n.message:"Error",d=r==null&&n?n.code:r;return AxiosError.call(u,c,d,a,o,s),n&&u.cause==null&&Object.defineProperty(u,"cause",{value:n,configurable:!0}),u.name=n&&n.name||"Error",l&&Object.assign(u,l),u};const httpAdapter=null;function isVisitable(n){return utils$1.isPlainObject(n)||utils$1.isArray(n)}function removeBrackets(n){return utils$1.endsWith(n,"[]")?n.slice(0,-2):n}function renderKey(n,r,a){return n?n.concat(r).map(function(s,l){return s=removeBrackets(s),!a&&l?"["+s+"]":s}).join(a?".":""):r}function isFlatArray(n){return utils$1.isArray(n)&&!n.some(isVisitable)}const predicates=utils$1.toFlatObject(utils$1,{},null,function(r){return/^is[A-Z]/.test(r)});function toFormData(n,r,a){if(!utils$1.isObject(n))throw new TypeError("target must be an object");r=r||new FormData,a=utils$1.toFlatObject(a,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,b){return!utils$1.isUndefined(b[S])});const o=a.metaTokens,s=a.visitor||p,l=a.dots,u=a.indexes,d=(a.Blob||typeof Blob<"u"&&Blob)&&utils$1.isSpecCompliantForm(r);if(!utils$1.isFunction(s))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(utils$1.isDate(_))return _.toISOString();if(utils$1.isBoolean(_))return _.toString();if(!d&&utils$1.isBlob(_))throw new AxiosError("Blob is not supported. Use a Buffer instead.");return utils$1.isArrayBuffer(_)||utils$1.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,S,b){let x=_;if(_&&!b&&typeof _=="object"){if(utils$1.endsWith(S,"{}"))S=o?S:S.slice(0,-2),_=JSON.stringify(_);else if(utils$1.isArray(_)&&isFlatArray(_)||(utils$1.isFileList(_)||utils$1.endsWith(S,"[]"))&&(x=utils$1.toArray(_)))return S=removeBrackets(S),x.forEach(function(w,E){!(utils$1.isUndefined(w)||w===null)&&r.append(u===!0?renderKey([S],E,l):u===null?S:S+"[]",f(w))}),!1}return isVisitable(_)?!0:(r.append(renderKey(b,S,l),f(_)),!1)}const v=[],g=Object.assign(predicates,{defaultVisitor:p,convertValue:f,isVisitable});function y(_,S){if(!utils$1.isUndefined(_)){if(v.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));v.push(_),utils$1.forEach(_,function(x,A){(!(utils$1.isUndefined(x)||x===null)&&s.call(r,x,utils$1.isString(A)?A.trim():A,S,g))===!0&&y(x,S?S.concat(A):[A])}),v.pop()}}if(!utils$1.isObject(n))throw new TypeError("data must be an object");return y(n),r}function encode$1(n){const r={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(n).replace(/[!'()~]|%20|%00/g,function(o){return r[o]})}function AxiosURLSearchParams(n,r){this._pairs=[],n&&toFormData(n,this,r)}const prototype=AxiosURLSearchParams.prototype;prototype.append=function(r,a){this._pairs.push([r,a])};prototype.toString=function(r){const a=r?function(o){return r.call(this,o,encode$1)}:encode$1;return this._pairs.map(function(s){return a(s[0])+"="+a(s[1])},"").join("&")};function encode(n){return encodeURIComponent(n).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function buildURL(n,r,a){if(!r)return n;const o=a&&a.encode||encode;utils$1.isFunction(a)&&(a={serialize:a});const s=a&&a.serialize;let l;if(s?l=s(r,a):l=utils$1.isURLSearchParams(r)?r.toString():new AxiosURLSearchParams(r,a).toString(o),l){const u=n.indexOf("#");u!==-1&&(n=n.slice(0,u)),n+=(n.indexOf("?")===-1?"?":"&")+l}return n}class InterceptorManager{constructor(){this.handlers=[]}use(r,a,o){return this.handlers.push({fulfilled:r,rejected:a,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(r){this.handlers[r]&&(this.handlers[r]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(r){utils$1.forEach(this.handlers,function(o){o!==null&&r(o)})}}const transitionalDefaults={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},URLSearchParams$1=typeof URLSearchParams<"u"?URLSearchParams:AxiosURLSearchParams,FormData$1=typeof FormData<"u"?FormData:null,Blob$1=typeof Blob<"u"?Blob:null,platform$2={isBrowser:!0,classes:{URLSearchParams:URLSearchParams$1,FormData:FormData$1,Blob:Blob$1},protocols:["http","https","file","blob","url","data"]},hasBrowserEnv=typeof window<"u"&&typeof document<"u",_navigator=typeof navigator=="object"&&navigator||void 0,hasStandardBrowserEnv=hasBrowserEnv&&(!_navigator||["ReactNative","NativeScript","NS"].indexOf(_navigator.product)<0),hasStandardBrowserWebWorkerEnv=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",origin=hasBrowserEnv&&window.location.href||"http://localhost",utils=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv,hasStandardBrowserEnv,hasStandardBrowserWebWorkerEnv,navigator:_navigator,origin},Symbol.toStringTag,{value:"Module"})),platform$1={...utils,...platform$2};function toURLEncodedForm(n,r){return toFormData(n,new platform$1.classes.URLSearchParams,{visitor:function(a,o,s,l){return platform$1.isNode&&utils$1.isBuffer(a)?(this.append(o,a.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...r})}function parsePropPath(n){return utils$1.matchAll(/\w+|\[(\w*)]/g,n).map(r=>r[0]==="[]"?"":r[1]||r[0])}function arrayToObject(n){const r={},a=Object.keys(n);let o;const s=a.length;let l;for(o=0;o<s;o++)l=a[o],r[l]=n[l];return r}function formDataToJSON(n){function r(a,o,s,l){let u=a[l++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=l>=a.length;return u=!u&&utils$1.isArray(s)?s.length:u,d?(utils$1.hasOwnProp(s,u)?s[u]=[s[u],o]:s[u]=o,!c):((!s[u]||!utils$1.isObject(s[u]))&&(s[u]=[]),r(a,o,s[u],l)&&utils$1.isArray(s[u])&&(s[u]=arrayToObject(s[u])),!c)}if(utils$1.isFormData(n)&&utils$1.isFunction(n.entries)){const a={};return utils$1.forEachEntry(n,(o,s)=>{r(parsePropPath(o),s,a,0)}),a}return null}function stringifySafely(n,r,a){if(utils$1.isString(n))try{return(r||JSON.parse)(n),utils$1.trim(n)}catch(o){if(o.name!=="SyntaxError")throw o}return(0,JSON.stringify)(n)}const defaults$3={transitional:transitionalDefaults,adapter:["xhr","http","fetch"],transformRequest:[function(r,a){const o=a.getContentType()||"",s=o.indexOf("application/json")>-1,l=utils$1.isObject(r);if(l&&utils$1.isHTMLForm(r)&&(r=new FormData(r)),utils$1.isFormData(r))return s?JSON.stringify(formDataToJSON(r)):r;if(utils$1.isArrayBuffer(r)||utils$1.isBuffer(r)||utils$1.isStream(r)||utils$1.isFile(r)||utils$1.isBlob(r)||utils$1.isReadableStream(r))return r;if(utils$1.isArrayBufferView(r))return r.buffer;if(utils$1.isURLSearchParams(r))return a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),r.toString();let c;if(l){if(o.indexOf("application/x-www-form-urlencoded")>-1)return toURLEncodedForm(r,this.formSerializer).toString();if((c=utils$1.isFileList(r))||o.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return toFormData(c?{"files[]":r}:r,d&&new d,this.formSerializer)}}return l||s?(a.setContentType("application/json",!1),stringifySafely(r)):r}],transformResponse:[function(r){const a=this.transitional||defaults$3.transitional,o=a&&a.forcedJSONParsing,s=this.responseType==="json";if(utils$1.isResponse(r)||utils$1.isReadableStream(r))return r;if(r&&utils$1.isString(r)&&(o&&!this.responseType||s)){const u=!(a&&a.silentJSONParsing)&&s;try{return JSON.parse(r,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?AxiosError.from(c,AxiosError.ERR_BAD_RESPONSE,this,null,this.response):c}}return r}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:platform$1.classes.FormData,Blob:platform$1.classes.Blob},validateStatus:function(r){return r>=200&&r<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};utils$1.forEach(["delete","get","head","post","put","patch"],n=>{defaults$3.headers[n]={}});const ignoreDuplicateOf=utils$1.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),parseHeaders=n=>{const r={};let a,o,s;return n&&n.split("\n").forEach(function(u){s=u.indexOf(":"),a=u.substring(0,s).trim().toLowerCase(),o=u.substring(s+1).trim(),!(!a||r[a]&&ignoreDuplicateOf[a])&&(a==="set-cookie"?r[a]?r[a].push(o):r[a]=[o]:r[a]=r[a]?r[a]+", "+o:o)}),r},$internals=Symbol("internals");function normalizeHeader(n){return n&&String(n).trim().toLowerCase()}function normalizeValue(n){return n===!1||n==null?n:utils$1.isArray(n)?n.map(normalizeValue):String(n)}function parseTokens(n){const r=Object.create(null),a=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=a.exec(n);)r[o[1]]=o[2];return r}const isValidHeaderName=n=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim());function matchHeaderValue(n,r,a,o,s){if(utils$1.isFunction(o))return o.call(this,r,a);if(s&&(r=a),!!utils$1.isString(r)){if(utils$1.isString(o))return r.indexOf(o)!==-1;if(utils$1.isRegExp(o))return o.test(r)}}function formatHeader(n){return n.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(r,a,o)=>a.toUpperCase()+o)}function buildAccessors(n,r){const a=utils$1.toCamelCase(" "+r);["get","set","has"].forEach(o=>{Object.defineProperty(n,o+a,{value:function(s,l,u){return this[o].call(this,r,s,l,u)},configurable:!0})})}class AxiosHeaders{constructor(r){r&&this.set(r)}set(r,a,o){const s=this;function l(c,d,f){const p=normalizeHeader(d);if(!p)throw new Error("header name must be a non-empty string");const v=utils$1.findKey(s,p);(!v||s[v]===void 0||f===!0||f===void 0&&s[v]!==!1)&&(s[v||d]=normalizeValue(c))}const u=(c,d)=>utils$1.forEach(c,(f,p)=>l(f,p,d));if(utils$1.isPlainObject(r)||r instanceof this.constructor)u(r,a);else if(utils$1.isString(r)&&(r=r.trim())&&!isValidHeaderName(r))u(parseHeaders(r),a);else if(utils$1.isObject(r)&&utils$1.isIterable(r)){let c={},d,f;for(const p of r){if(!utils$1.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?utils$1.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,a)}else r!=null&&l(a,r,o);return this}get(r,a){if(r=normalizeHeader(r),r){const o=utils$1.findKey(this,r);if(o){const s=this[o];if(!a)return s;if(a===!0)return parseTokens(s);if(utils$1.isFunction(a))return a.call(this,s,o);if(utils$1.isRegExp(a))return a.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(r,a){if(r=normalizeHeader(r),r){const o=utils$1.findKey(this,r);return!!(o&&this[o]!==void 0&&(!a||matchHeaderValue(this,this[o],o,a)))}return!1}delete(r,a){const o=this;let s=!1;function l(u){if(u=normalizeHeader(u),u){const c=utils$1.findKey(o,u);c&&(!a||matchHeaderValue(o,o[c],c,a))&&(delete o[c],s=!0)}}return utils$1.isArray(r)?r.forEach(l):l(r),s}clear(r){const a=Object.keys(this);let o=a.length,s=!1;for(;o--;){const l=a[o];(!r||matchHeaderValue(this,this[l],l,r,!0))&&(delete this[l],s=!0)}return s}normalize(r){const a=this,o={};return utils$1.forEach(this,(s,l)=>{const u=utils$1.findKey(o,l);if(u){a[u]=normalizeValue(s),delete a[l];return}const c=r?formatHeader(l):String(l).trim();c!==l&&delete a[l],a[c]=normalizeValue(s),o[c]=!0}),this}concat(...r){return this.constructor.concat(this,...r)}toJSON(r){const a=Object.create(null);return utils$1.forEach(this,(o,s)=>{o!=null&&o!==!1&&(a[s]=r&&utils$1.isArray(o)?o.join(", "):o)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([r,a])=>r+": "+a).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(r){return r instanceof this?r:new this(r)}static concat(r,...a){const o=new this(r);return a.forEach(s=>o.set(s)),o}static accessor(r){const o=(this[$internals]=this[$internals]={accessors:{}}).accessors,s=this.prototype;function l(u){const c=normalizeHeader(u);o[c]||(buildAccessors(s,u),o[c]=!0)}return utils$1.isArray(r)?r.forEach(l):l(r),this}}AxiosHeaders.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);utils$1.reduceDescriptors(AxiosHeaders.prototype,({value:n},r)=>{let a=r[0].toUpperCase()+r.slice(1);return{get:()=>n,set(o){this[a]=o}}});utils$1.freezeMethods(AxiosHeaders);function transformData(n,r){const a=this||defaults$3,o=r||a,s=AxiosHeaders.from(o.headers);let l=o.data;return utils$1.forEach(n,function(c){l=c.call(a,l,s.normalize(),r?r.status:void 0)}),s.normalize(),l}function isCancel(n){return!!(n&&n.__CANCEL__)}function CanceledError(n,r,a){AxiosError.call(this,n==null?"canceled":n,AxiosError.ERR_CANCELED,r,a),this.name="CanceledError"}utils$1.inherits(CanceledError,AxiosError,{__CANCEL__:!0});function settle(n,r,a){const o=a.config.validateStatus;!a.status||!o||o(a.status)?n(a):r(new AxiosError("Request failed with status code "+a.status,[AxiosError.ERR_BAD_REQUEST,AxiosError.ERR_BAD_RESPONSE][Math.floor(a.status/100)-4],a.config,a.request,a))}function parseProtocol(n){const r=/^([-+\w]{1,25})(:?\/\/|:)/.exec(n);return r&&r[1]||""}function speedometer(n,r){n=n||10;const a=new Array(n),o=new Array(n);let s=0,l=0,u;return r=r!==void 0?r:1e3,function(d){const f=Date.now(),p=o[l];u||(u=f),a[s]=d,o[s]=f;let v=l,g=0;for(;v!==s;)g+=a[v++],v=v%n;if(s=(s+1)%n,s===l&&(l=(l+1)%n),f-u<r)return;const y=p&&f-p;return y?Math.round(g*1e3/y):void 0}}function throttle$3(n,r){let a=0,o=1e3/r,s,l;const u=(f,p=Date.now())=>{a=p,s=null,l&&(clearTimeout(l),l=null),n(...f)};return[(...f)=>{const p=Date.now(),v=p-a;v>=o?u(f,p):(s=f,l||(l=setTimeout(()=>{l=null,u(s)},o-v)))},()=>s&&u(s)]}const progressEventReducer=(n,r,a=3)=>{let o=0;const s=speedometer(50,250);return throttle$3(l=>{const u=l.loaded,c=l.lengthComputable?l.total:void 0,d=u-o,f=s(d),p=u<=c;o=u;const v={loaded:u,total:c,progress:c?u/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&p?(c-u)/f:void 0,event:l,lengthComputable:c!=null,[r?"download":"upload"]:!0};n(v)},a)},progressEventDecorator=(n,r)=>{const a=n!=null;return[o=>r[0]({lengthComputable:a,total:n,loaded:o}),r[1]]},asyncDecorator=n=>(...r)=>utils$1.asap(()=>n(...r)),isURLSameOrigin=platform$1.hasStandardBrowserEnv?((n,r)=>a=>(a=new URL(a,platform$1.origin),n.protocol===a.protocol&&n.host===a.host&&(r||n.port===a.port)))(new URL(platform$1.origin),platform$1.navigator&&/(msie|trident)/i.test(platform$1.navigator.userAgent)):()=>!0,cookies=platform$1.hasStandardBrowserEnv?{write(n,r,a,o,s,l,u){if(typeof document>"u")return;const c=["".concat(n,"=").concat(encodeURIComponent(r))];utils$1.isNumber(a)&&c.push("expires=".concat(new Date(a).toUTCString())),utils$1.isString(o)&&c.push("path=".concat(o)),utils$1.isString(s)&&c.push("domain=".concat(s)),l===!0&&c.push("secure"),utils$1.isString(u)&&c.push("SameSite=".concat(u)),document.cookie=c.join("; ")},read(n){if(typeof document>"u")return null;const r=document.cookie.match(new RegExp("(?:^|; )"+n+"=([^;]*)"));return r?decodeURIComponent(r[1]):null},remove(n){this.write(n,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function isAbsoluteURL(n){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(n)}function combineURLs(n,r){return r?n.replace(/\/?\/$/,"")+"/"+r.replace(/^\/+/,""):n}function buildFullPath(n,r,a){let o=!isAbsoluteURL(r);return n&&(o||a==!1)?combineURLs(n,r):r}const headersToObject=n=>n instanceof AxiosHeaders?{...n}:n;function mergeConfig(n,r){r=r||{};const a={};function o(f,p,v,g){return utils$1.isPlainObject(f)&&utils$1.isPlainObject(p)?utils$1.merge.call({caseless:g},f,p):utils$1.isPlainObject(p)?utils$1.merge({},p):utils$1.isArray(p)?p.slice():p}function s(f,p,v,g){if(utils$1.isUndefined(p)){if(!utils$1.isUndefined(f))return o(void 0,f,v,g)}else return o(f,p,v,g)}function l(f,p){if(!utils$1.isUndefined(p))return o(void 0,p)}function u(f,p){if(utils$1.isUndefined(p)){if(!utils$1.isUndefined(f))return o(void 0,f)}else return o(void 0,p)}function c(f,p,v){if(v in r)return o(f,p);if(v in n)return o(void 0,f)}const d={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(f,p,v)=>s(headersToObject(f),headersToObject(p),v,!0)};return utils$1.forEach(Object.keys({...n,...r}),function(p){const v=d[p]||s,g=v(n[p],r[p],p);utils$1.isUndefined(g)&&v!==c||(a[p]=g)}),a}const resolveConfig=n=>{const r=mergeConfig({},n);let{data:a,withXSRFToken:o,xsrfHeaderName:s,xsrfCookieName:l,headers:u,auth:c}=r;if(r.headers=u=AxiosHeaders.from(u),r.url=buildURL(buildFullPath(r.baseURL,r.url,r.allowAbsoluteUrls),n.params,n.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),utils$1.isFormData(a)){if(platform$1.hasStandardBrowserEnv||platform$1.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(utils$1.isFunction(a.getHeaders)){const d=a.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([p,v])=>{f.includes(p.toLowerCase())&&u.set(p,v)})}}if(platform$1.hasStandardBrowserEnv&&(o&&utils$1.isFunction(o)&&(o=o(r)),o||o!==!1&&isURLSameOrigin(r.url))){const d=s&&l&&cookies.read(l);d&&u.set(s,d)}return r},isXHRAdapterSupported=typeof XMLHttpRequest<"u",xhrAdapter=isXHRAdapterSupported&&function(n){return new Promise(function(a,o){const s=resolveConfig(n);let l=s.data;const u=AxiosHeaders.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,v,g,y,_;function S(){y&&y(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function x(){if(!b)return;const w=AxiosHeaders.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),D={data:!c||c==="text"||c==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:w,config:n,request:b};settle(function($){a($),S()},function($){o($),S()},D),b=null}"onloadend"in b?b.onloadend=x:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(x)},b.onabort=function(){b&&(o(new AxiosError("Request aborted",AxiosError.ECONNABORTED,n,b)),b=null)},b.onerror=function(E){const D=E&&E.message?E.message:"Network Error",C=new AxiosError(D,AxiosError.ERR_NETWORK,n,b);C.event=E||null,o(C),b=null},b.ontimeout=function(){let E=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const D=s.transitional||transitionalDefaults;s.timeoutErrorMessage&&(E=s.timeoutErrorMessage),o(new AxiosError(E,D.clarifyTimeoutError?AxiosError.ETIMEDOUT:AxiosError.ECONNABORTED,n,b)),b=null},l===void 0&&u.setContentType(null),"setRequestHeader"in b&&utils$1.forEach(u.toJSON(),function(E,D){b.setRequestHeader(D,E)}),utils$1.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),c&&c!=="json"&&(b.responseType=s.responseType),f&&([g,_]=progressEventReducer(f,!0),b.addEventListener("progress",g)),d&&b.upload&&([v,y]=progressEventReducer(d),b.upload.addEventListener("progress",v),b.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=w=>{b&&(o(!w||w.type?new CanceledError(null,n,b):w),b.abort(),b=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const A=parseProtocol(s.url);if(A&&platform$1.protocols.indexOf(A)===-1){o(new AxiosError("Unsupported protocol "+A+":",AxiosError.ERR_BAD_REQUEST,n));return}b.send(l||null)})},composeSignals=(n,r)=>{const{length:a}=n=n?n.filter(Boolean):[];if(r||a){let o=new AbortController,s;const l=function(f){if(!s){s=!0,c();const p=f instanceof Error?f:this.reason;o.abort(p instanceof AxiosError?p:new CanceledError(p instanceof Error?p.message:p))}};let u=r&&setTimeout(()=>{u=null,l(new AxiosError("timeout ".concat(r," of ms exceeded"),AxiosError.ETIMEDOUT))},r);const c=()=>{n&&(u&&clearTimeout(u),u=null,n.forEach(f=>{f.unsubscribe?f.unsubscribe(l):f.removeEventListener("abort",l)}),n=null)};n.forEach(f=>f.addEventListener("abort",l));const{signal:d}=o;return d.unsubscribe=()=>utils$1.asap(c),d}},streamChunk=function*(n,r){let a=n.byteLength;if(a<r){yield n;return}let o=0,s;for(;o<a;)s=o+r,yield n.slice(o,s),o=s},readBytes=async function*(n,r){for await(const a of readStream(n))yield*streamChunk(a,r)},readStream=async function*(n){if(n[Symbol.asyncIterator]){yield*n;return}const r=n.getReader();try{for(;;){const{done:a,value:o}=await r.read();if(a)break;yield o}}finally{await r.cancel()}},trackStream=(n,r,a,o)=>{const s=readBytes(n,r);let l=0,u,c=d=>{u||(u=!0,o&&o(d))};return new ReadableStream({async pull(d){try{const{done:f,value:p}=await s.next();if(f){c(),d.close();return}let v=p.byteLength;if(a){let g=l+=v;a(g)}d.enqueue(new Uint8Array(p))}catch(f){throw c(f),f}},cancel(d){return c(d),s.return()}},{highWaterMark:2})},DEFAULT_CHUNK_SIZE=64*1024,{isFunction:isFunction$2}=utils$1,globalFetchAPI=(({Request:n,Response:r})=>({Request:n,Response:r}))(utils$1.global),{ReadableStream:ReadableStream$1,TextEncoder}=utils$1.global,test$1=(n,...r)=>{try{return!!n(...r)}catch(a){return!1}},factory=n=>{n=utils$1.merge.call({skipUndefined:!0},globalFetchAPI,n);const{fetch:r,Request:a,Response:o}=n,s=r?isFunction$2(r):typeof fetch=="function",l=isFunction$2(a),u=isFunction$2(o);if(!s)return!1;const c=s&&isFunction$2(ReadableStream$1),d=s&&(typeof TextEncoder=="function"?(_=>S=>_.encode(S))(new TextEncoder):async _=>new Uint8Array(await new a(_).arrayBuffer())),f=l&&c&&test$1(()=>{let _=!1;const S=new a(platform$1.origin,{body:new ReadableStream$1,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!S}),p=u&&c&&test$1(()=>utils$1.isReadableStream(new o("").body)),v={stream:p&&(_=>_.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!v[_]&&(v[_]=(S,b)=>{let x=S&&S[_];if(x)return x.call(S);throw new AxiosError("Response type '".concat(_,"' is not supported"),AxiosError.ERR_NOT_SUPPORT,b)})});const g=async _=>{if(_==null)return 0;if(utils$1.isBlob(_))return _.size;if(utils$1.isSpecCompliantForm(_))return(await new a(platform$1.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(utils$1.isArrayBufferView(_)||utils$1.isArrayBuffer(_))return _.byteLength;if(utils$1.isURLSearchParams(_)&&(_=_+""),utils$1.isString(_))return(await d(_)).byteLength},y=async(_,S)=>{const b=utils$1.toFiniteNumber(_.getContentLength());return b==null?g(S):b};return async _=>{let{url:S,method:b,data:x,signal:A,cancelToken:w,timeout:E,onDownloadProgress:D,onUploadProgress:C,responseType:$,headers:P,withCredentials:M="same-origin",fetchOptions:I}=resolveConfig(_),L=r||fetch;$=$?($+"").toLowerCase():"text";let O=composeSignals([A,w&&w.toAbortSignal()],E),R=null;const N=O&&O.unsubscribe&&(()=>{O.unsubscribe()});let V;try{if(C&&f&&b!=="get"&&b!=="head"&&(V=await y(P,x))!==0){let B=new a(S,{method:"POST",body:x,duplex:"half"}),Y;if(utils$1.isFormData(x)&&(Y=B.headers.get("content-type"))&&P.setContentType(Y),B.body){const[Z,K]=progressEventDecorator(V,progressEventReducer(asyncDecorator(C)));x=trackStream(B.body,DEFAULT_CHUNK_SIZE,Z,K)}}utils$1.isString(M)||(M=M?"include":"omit");const F=l&&"credentials"in a.prototype,U={...I,signal:O,method:b.toUpperCase(),headers:P.normalize().toJSON(),body:x,duplex:"half",credentials:F?M:void 0};R=l&&new a(S,U);let H=await(l?L(R,I):L(S,U));const W=p&&($==="stream"||$==="response");if(p&&(D||W&&N)){const B={};["status","statusText","headers"].forEach(ee=>{B[ee]=H[ee]});const Y=utils$1.toFiniteNumber(H.headers.get("content-length")),[Z,K]=D&&progressEventDecorator(Y,progressEventReducer(asyncDecorator(D),!0))||[];H=new o(trackStream(H.body,DEFAULT_CHUNK_SIZE,Z,()=>{K&&K(),N&&N()}),B)}$=$||"text";let G=await v[utils$1.findKey(v,$)||"text"](H,_);return!W&&N&&N(),await new Promise((B,Y)=>{settle(B,Y,{data:G,headers:AxiosHeaders.from(H.headers),status:H.status,statusText:H.statusText,config:_,request:R})})}catch(F){throw N&&N(),F&&F.name==="TypeError"&&/Load failed|fetch/i.test(F.message)?Object.assign(new AxiosError("Network Error",AxiosError.ERR_NETWORK,_,R),{cause:F.cause||F}):AxiosError.from(F,F&&F.code,_,R)}}},seedCache=new Map,getFetch=n=>{let r=n&&n.env||{};const{fetch:a,Request:o,Response:s}=r,l=[o,s,a];let u=l.length,c=u,d,f,p=seedCache;for(;c--;)d=l[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:factory(r)),p=f;return f};getFetch();const knownAdapters={http:httpAdapter,xhr:xhrAdapter,fetch:{get:getFetch}};utils$1.forEach(knownAdapters,(n,r)=>{if(n){try{Object.defineProperty(n,"name",{value:r})}catch(a){}Object.defineProperty(n,"adapterName",{value:r})}});const renderReason=n=>"- ".concat(n),isResolvedHandle=n=>utils$1.isFunction(n)||n===null||n===!1;function getAdapter(n,r){n=utils$1.isArray(n)?n:[n];const{length:a}=n;let o,s;const l={};for(let u=0;u<a;u++){o=n[u];let c;if(s=o,!isResolvedHandle(o)&&(s=knownAdapters[(c=String(o)).toLowerCase()],s===void 0))throw new AxiosError("Unknown adapter '".concat(c,"'"));if(s&&(utils$1.isFunction(s)||(s=s.get(r))))break;l[c||"#"+u]=s}if(!s){const u=Object.entries(l).map(([d,f])=>"adapter ".concat(d," ")+(f===!1?"is not supported by the environment":"is not available in the build"));let c=a?u.length>1?"since :\n"+u.map(renderReason).join("\n"):" "+renderReason(u[0]):"as no adapter specified";throw new AxiosError("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return s}const adapters={getAdapter,adapters:knownAdapters};function throwIfCancellationRequested(n){if(n.cancelToken&&n.cancelToken.throwIfRequested(),n.signal&&n.signal.aborted)throw new CanceledError(null,n)}function dispatchRequest(n){return throwIfCancellationRequested(n),n.headers=AxiosHeaders.from(n.headers),n.data=transformData.call(n,n.transformRequest),["post","put","patch"].indexOf(n.method)!==-1&&n.headers.setContentType("application/x-www-form-urlencoded",!1),adapters.getAdapter(n.adapter||defaults$3.adapter,n)(n).then(function(o){return throwIfCancellationRequested(n),o.data=transformData.call(n,n.transformResponse,o),o.headers=AxiosHeaders.from(o.headers),o},function(o){return isCancel(o)||(throwIfCancellationRequested(n),o&&o.response&&(o.response.data=transformData.call(n,n.transformResponse,o.response),o.response.headers=AxiosHeaders.from(o.response.headers))),Promise.reject(o)})}const VERSION="1.13.2",validators$1={};["object","boolean","number","function","string","symbol"].forEach((n,r)=>{validators$1[n]=function(o){return typeof o===n||"a"+(r<1?"n ":" ")+n}});const deprecatedWarnings={};validators$1.transitional=function(r,a,o){function s(l,u){return"[Axios v"+VERSION+"] Transitional option '"+l+"'"+u+(o?". "+o:"")}return(l,u,c)=>{if(r===!1)throw new AxiosError(s(u," has been removed"+(a?" in "+a:"")),AxiosError.ERR_DEPRECATED);return a&&!deprecatedWarnings[u]&&(deprecatedWarnings[u]=!0),r?r(l,u,c):!0}};validators$1.spelling=function(r){return(a,o)=>!0};function assertOptions(n,r,a){if(typeof n!="object")throw new AxiosError("options must be an object",AxiosError.ERR_BAD_OPTION_VALUE);const o=Object.keys(n);let s=o.length;for(;s-- >0;){const l=o[s],u=r[l];if(u){const c=n[l],d=c===void 0||u(c,l,n);if(d!==!0)throw new AxiosError("option "+l+" must be "+d,AxiosError.ERR_BAD_OPTION_VALUE);continue}if(a!==!0)throw new AxiosError("Unknown option "+l,AxiosError.ERR_BAD_OPTION)}}const validator={assertOptions,validators:validators$1},validators=validator.validators;class Axios{constructor(r){this.defaults=r||{},this.interceptors={request:new InterceptorManager,response:new InterceptorManager}}async request(r,a){try{return await this._request(r,a)}catch(o){if(o instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const l=s.stack?s.stack.replace(/^.+\n/,""):"";try{o.stack?l&&!String(o.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(o.stack+="\n"+l):o.stack=l}catch(u){}}throw o}}_request(r,a){typeof r=="string"?(a=a||{},a.url=r):a=r||{},a=mergeConfig(this.defaults,a);const{transitional:o,paramsSerializer:s,headers:l}=a;o!==void 0&&validator.assertOptions(o,{silentJSONParsing:validators.transitional(validators.boolean),forcedJSONParsing:validators.transitional(validators.boolean),clarifyTimeoutError:validators.transitional(validators.boolean)},!1),s!=null&&(utils$1.isFunction(s)?a.paramsSerializer={serialize:s}:validator.assertOptions(s,{encode:validators.function,serialize:validators.function},!0)),a.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?a.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:a.allowAbsoluteUrls=!0),validator.assertOptions(a,{baseUrl:validators.spelling("baseURL"),withXsrfToken:validators.spelling("withXSRFToken")},!0),a.method=(a.method||this.defaults.method||"get").toLowerCase();let u=l&&utils$1.merge(l.common,l[a.method]);l&&utils$1.forEach(["delete","get","head","post","put","patch","common"],_=>{delete l[_]}),a.headers=AxiosHeaders.concat(u,l);const c=[];let d=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(a)===!1||(d=d&&S.synchronous,c.unshift(S.fulfilled,S.rejected))});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let p,v=0,g;if(!d){const _=[dispatchRequest.bind(this),void 0];for(_.unshift(...c),_.push(...f),g=_.length,p=Promise.resolve(a);v<g;)p=p.then(_[v++],_[v++]);return p}g=c.length;let y=a;for(;v<g;){const _=c[v++],S=c[v++];try{y=_(y)}catch(b){S.call(this,b);break}}try{p=dispatchRequest.call(this,y)}catch(_){return Promise.reject(_)}for(v=0,g=f.length;v<g;)p=p.then(f[v++],f[v++]);return p}getUri(r){r=mergeConfig(this.defaults,r);const a=buildFullPath(r.baseURL,r.url,r.allowAbsoluteUrls);return buildURL(a,r.params,r.paramsSerializer)}}utils$1.forEach(["delete","get","head","options"],function(r){Axios.prototype[r]=function(a,o){return this.request(mergeConfig(o||{},{method:r,url:a,data:(o||{}).data}))}});utils$1.forEach(["post","put","patch"],function(r){function a(o){return function(l,u,c){return this.request(mergeConfig(c||{},{method:r,headers:o?{"Content-Type":"multipart/form-data"}:{},url:l,data:u}))}}Axios.prototype[r]=a(),Axios.prototype[r+"Form"]=a(!0)});class CancelToken{constructor(r){if(typeof r!="function")throw new TypeError("executor must be a function.");let a;this.promise=new Promise(function(l){a=l});const o=this;this.promise.then(s=>{if(!o._listeners)return;let l=o._listeners.length;for(;l-- >0;)o._listeners[l](s);o._listeners=null}),this.promise.then=s=>{let l;const u=new Promise(c=>{o.subscribe(c),l=c}).then(s);return u.cancel=function(){o.unsubscribe(l)},u},r(function(l,u,c){o.reason||(o.reason=new CanceledError(l,u,c),a(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(r){if(this.reason){r(this.reason);return}this._listeners?this._listeners.push(r):this._listeners=[r]}unsubscribe(r){if(!this._listeners)return;const a=this._listeners.indexOf(r);a!==-1&&this._listeners.splice(a,1)}toAbortSignal(){const r=new AbortController,a=o=>{r.abort(o)};return this.subscribe(a),r.signal.unsubscribe=()=>this.unsubscribe(a),r.signal}static source(){let r;return{token:new CancelToken(function(s){r=s}),cancel:r}}}function spread(n){return function(a){return n.apply(null,a)}}function isAxiosError(n){return utils$1.isObject(n)&&n.isAxiosError===!0}const HttpStatusCode={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(HttpStatusCode).forEach(([n,r])=>{HttpStatusCode[r]=n});function createInstance(n){const r=new Axios(n),a=bind$3(Axios.prototype.request,r);return utils$1.extend(a,Axios.prototype,r,{allOwnKeys:!0}),utils$1.extend(a,r,null,{allOwnKeys:!0}),a.create=function(s){return createInstance(mergeConfig(n,s))},a}const axios=createInstance(defaults$3);axios.Axios=Axios;axios.CanceledError=CanceledError;axios.CancelToken=CancelToken;axios.isCancel=isCancel;axios.VERSION=VERSION;axios.toFormData=toFormData;axios.AxiosError=AxiosError;axios.Cancel=axios.CanceledError;axios.all=function(r){return Promise.all(r)};axios.spread=spread;axios.isAxiosError=isAxiosError;axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders;axios.formToJSON=n=>formDataToJSON(utils$1.isHTMLForm(n)?new FormData(n):n);axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode;axios.default=axios;var T=function(){return!0};const __={"@@functional/placeholder":!0};function _isPlaceholder(n){return n!=null&&typeof n=="object"&&n["@@functional/placeholder"]===!0}function _curry1(n){return function r(a){return arguments.length===0||_isPlaceholder(a)?r:n.apply(this,arguments)}}function _curry2(n){return function r(a,o){switch(arguments.length){case 0:return r;case 1:return _isPlaceholder(a)?r:_curry1(function(s){return n(a,s)});default:return _isPlaceholder(a)&&_isPlaceholder(o)?r:_isPlaceholder(a)?_curry1(function(s){return n(s,o)}):_isPlaceholder(o)?_curry1(function(s){return n(a,s)}):n(a,o)}}}function _concat(n,r){n=n||[],r=r||[];var a,o=n.length,s=r.length,l=[];for(a=0;a<o;)l[l.length]=n[a],a+=1;for(a=0;a<s;)l[l.length]=r[a],a+=1;return l}function _arity(n,r){switch(n){case 0:return function(){return r.apply(this,arguments)};case 1:return function(a){return r.apply(this,arguments)};case 2:return function(a,o){return r.apply(this,arguments)};case 3:return function(a,o,s){return r.apply(this,arguments)};case 4:return function(a,o,s,l){return r.apply(this,arguments)};case 5:return function(a,o,s,l,u){return r.apply(this,arguments)};case 6:return function(a,o,s,l,u,c){return r.apply(this,arguments)};case 7:return function(a,o,s,l,u,c,d){return r.apply(this,arguments)};case 8:return function(a,o,s,l,u,c,d,f){return r.apply(this,arguments)};case 9:return function(a,o,s,l,u,c,d,f,p){return r.apply(this,arguments)};case 10:return function(a,o,s,l,u,c,d,f,p,v){return r.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}function _curryN(n,r,a){return function(){for(var o=[],s=0,l=n,u=0,c=!1;u<r.length||s<arguments.length;){var d;u<r.length&&(!_isPlaceholder(r[u])||s>=arguments.length)?d=r[u]:(d=arguments[s],s+=1),o[u]=d,_isPlaceholder(d)?c=!0:l-=1,u+=1}return!c&&l<=0?a.apply(this,o):_arity(Math.max(0,l),_curryN(n,o,a))}}var curryN=_curry2(function(r,a){return r===1?_curry1(a):_arity(r,_curryN(r,[],a))});function _curry3(n){return function r(a,o,s){switch(arguments.length){case 0:return r;case 1:return _isPlaceholder(a)?r:_curry2(function(l,u){return n(a,l,u)});case 2:return _isPlaceholder(a)&&_isPlaceholder(o)?r:_isPlaceholder(a)?_curry2(function(l,u){return n(l,o,u)}):_isPlaceholder(o)?_curry2(function(l,u){return n(a,l,u)}):_curry1(function(l){return n(a,o,l)});default:return _isPlaceholder(a)&&_isPlaceholder(o)&&_isPlaceholder(s)?r:_isPlaceholder(a)&&_isPlaceholder(o)?_curry2(function(l,u){return n(l,u,s)}):_isPlaceholder(a)&&_isPlaceholder(s)?_curry2(function(l,u){return n(l,o,u)}):_isPlaceholder(o)&&_isPlaceholder(s)?_curry2(function(l,u){return n(a,l,u)}):_isPlaceholder(a)?_curry1(function(l){return n(l,o,s)}):_isPlaceholder(o)?_curry1(function(l){return n(a,l,s)}):_isPlaceholder(s)?_curry1(function(l){return n(a,o,l)}):n(a,o,s)}}}const _isArray=Array.isArray||function(r){return r!=null&&r.length>=0&&Object.prototype.toString.call(r)==="[object Array]"};function _isTransformer(n){return n!=null&&typeof n["@@transducer/step"]=="function"}function _dispatchable(n,r,a){return function(){if(arguments.length===0)return a();var o=arguments[arguments.length-1];if(!_isArray(o)){for(var s=0;s<n.length;){if(typeof o[n[s]]=="function")return o[n[s]].apply(o,Array.prototype.slice.call(arguments,0,-1));s+=1}if(_isTransformer(o)){var l=r.apply(null,Array.prototype.slice.call(arguments,0,-1));return l(o)}}return a.apply(this,arguments)}}function _reduced(n){return n&&n["@@transducer/reduced"]?n:{"@@transducer/value":n,"@@transducer/reduced":!0}}const _xfBase={init:function(){return this.xf["@@transducer/init"]()},result:function(n){return this.xf["@@transducer/result"](n)}};function _arrayFromIterator(n){for(var r=[],a;!(a=n.next()).done;)r.push(a.value);return r}function _includesWith(n,r,a){for(var o=0,s=a.length;o<s;){if(n(r,a[o]))return!0;o+=1}return!1}function _functionName(n){var r=String(n).match(/^function (\w*)/);return r==null?"":r[1]}function _has(n,r){return Object.prototype.hasOwnProperty.call(r,n)}function _objectIs(n,r){return n===r?n!==0||1/n===1/r:n!==n&&r!==r}const _objectIs$1=typeof Object.is=="function"?Object.is:_objectIs;var toString$1=Object.prototype.toString,_isArguments=function(){return toString$1.call(arguments)==="[object Arguments]"?function(r){return toString$1.call(r)==="[object Arguments]"}:function(r){return _has("callee",r)}}(),hasEnumBug=!{toString:null}.propertyIsEnumerable("toString"),nonEnumerableProps=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],hasArgsEnumBug=function(){return arguments.propertyIsEnumerable("length")}(),contains=function(r,a){for(var o=0;o<r.length;){if(r[o]===a)return!0;o+=1}return!1},keys$1=_curry1(typeof Object.keys=="function"&&!hasArgsEnumBug?function(r){return Object(r)!==r?[]:Object.keys(r)}:function(r){if(Object(r)!==r)return[];var a,o,s=[],l=hasArgsEnumBug&&_isArguments(r);for(a in r)_has(a,r)&&(!l||a!=="length")&&(s[s.length]=a);if(hasEnumBug)for(o=nonEnumerableProps.length-1;o>=0;)a=nonEnumerableProps[o],_has(a,r)&&!contains(s,a)&&(s[s.length]=a),o-=1;return s}),type=_curry1(function(r){return r===null?"Null":r===void 0?"Undefined":Object.prototype.toString.call(r).slice(8,-1)});function _uniqContentEquals(n,r,a,o){var s=_arrayFromIterator(n),l=_arrayFromIterator(r);function u(c,d){return _equals(c,d,a.slice(),o.slice())}return!_includesWith(function(c,d){return!_includesWith(u,d,c)},l,s)}function _equals(n,r,a,o){if(_objectIs$1(n,r))return!0;var s=type(n);if(s!==type(r))return!1;if(typeof n["fantasy-land/equals"]=="function"||typeof r["fantasy-land/equals"]=="function")return typeof n["fantasy-land/equals"]=="function"&&n["fantasy-land/equals"](r)&&typeof r["fantasy-land/equals"]=="function"&&r["fantasy-land/equals"](n);if(typeof n.equals=="function"||typeof r.equals=="function")return typeof n.equals=="function"&&n.equals(r)&&typeof r.equals=="function"&&r.equals(n);switch(s){case"Arguments":case"Array":case"Object":if(typeof n.constructor=="function"&&_functionName(n.constructor)==="Promise")return n===r;break;case"Boolean":case"Number":case"String":if(!(typeof n==typeof r&&_objectIs$1(n.valueOf(),r.valueOf())))return!1;break;case"Date":if(!_objectIs$1(n.valueOf(),r.valueOf()))return!1;break;case"Error":return n.name===r.name&&n.message===r.message;case"RegExp":if(!(n.source===r.source&&n.global===r.global&&n.ignoreCase===r.ignoreCase&&n.multiline===r.multiline&&n.sticky===r.sticky&&n.unicode===r.unicode))return!1;break}for(var l=a.length-1;l>=0;){if(a[l]===n)return o[l]===r;l-=1}switch(s){case"Map":return n.size!==r.size?!1:_uniqContentEquals(n.entries(),r.entries(),a.concat([n]),o.concat([r]));case"Set":return n.size!==r.size?!1:_uniqContentEquals(n.values(),r.values(),a.concat([n]),o.concat([r]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var u=keys$1(n);if(u.length!==keys$1(r).length)return!1;var c=a.concat([n]),d=o.concat([r]);for(l=u.length-1;l>=0;){var f=u[l];if(!(_has(f,r)&&_equals(r[f],n[f],c,d)))return!1;l-=1}return!0}var equals=_curry2(function(r,a){return _equals(r,a,[],[])});function _indexOf(n,r,a){var o,s;if(typeof n.indexOf=="function")switch(typeof r){case"number":if(r===0){for(o=1/r;a<n.length;){if(s=n[a],s===0&&1/s===o)return a;a+=1}return-1}else if(r!==r){for(;a<n.length;){if(s=n[a],typeof s=="number"&&s!==s)return a;a+=1}return-1}return n.indexOf(r,a);case"string":case"boolean":case"function":case"undefined":return n.indexOf(r,a);case"object":if(r===null)return n.indexOf(r,a)}for(;a<n.length;){if(equals(n[a],r))return a;a+=1}return-1}function _includes(n,r){return _indexOf(r,n,0)>=0}function _map(n,r){for(var a=0,o=r.length,s=Array(o);a<o;)s[a]=n(r[a]),a+=1;return s}function _quote(n){var r=n.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0");return'"'+r.replace(/"/g,'\\"')+'"'}var pad$1=function(r){return(r<10?"0":"")+r},_toISOString=typeof Date.prototype.toISOString=="function"?function(r){return r.toISOString()}:function(r){return r.getUTCFullYear()+"-"+pad$1(r.getUTCMonth()+1)+"-"+pad$1(r.getUTCDate())+"T"+pad$1(r.getUTCHours())+":"+pad$1(r.getUTCMinutes())+":"+pad$1(r.getUTCSeconds())+"."+(r.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};function _complement(n){return function(){return!n.apply(this,arguments)}}function _arrayReduce(n,r,a){for(var o=0,s=a.length;o<s;)r=n(r,a[o]),o+=1;return r}function _filter(n,r){for(var a=0,o=r.length,s=[];a<o;)n(r[a])&&(s[s.length]=r[a]),a+=1;return s}function _isObject(n){return Object.prototype.toString.call(n)==="[object Object]"}var XFilter=function(){function n(r,a){this.xf=a,this.f=r}return n.prototype["@@transducer/init"]=_xfBase.init,n.prototype["@@transducer/result"]=_xfBase.result,n.prototype["@@transducer/step"]=function(r,a){return this.f(a)?this.xf["@@transducer/step"](r,a):r},n}();function _xfilter(n){return function(r){return new XFilter(n,r)}}var filter$1=_curry2(_dispatchable(["fantasy-land/filter","filter"],_xfilter,function(n,r){return _isObject(r)?_arrayReduce(function(a,o){return n(r[o])&&(a[o]=r[o]),a},{},keys$1(r)):_filter(n,r)})),reject=_curry2(function(r,a){return filter$1(_complement(r),a)});function _toString(n,r){var a=function(u){var c=r.concat([n]);return _includes(u,c)?"<Circular>":_toString(u,c)},o=function(l,u){return _map(function(c){return _quote(c)+": "+a(l[c])},u.slice().sort())};switch(Object.prototype.toString.call(n)){case"[object Arguments]":return"(function() { return arguments; }("+_map(a,n).join(", ")+"))";case"[object Array]":return"["+_map(a,n).concat(o(n,reject(function(l){return/^\d+$/.test(l)},keys$1(n)))).join(", ")+"]";case"[object Boolean]":return typeof n=="object"?"new Boolean("+a(n.valueOf())+")":n.toString();case"[object Date]":return"new Date("+(isNaN(n.valueOf())?a(NaN):_quote(_toISOString(n)))+")";case"[object Map]":return"new Map("+a(Array.from(n))+")";case"[object Null]":return"null";case"[object Number]":return typeof n=="object"?"new Number("+a(n.valueOf())+")":1/n===-1/0?"-0":n.toString(10);case"[object Set]":return"new Set("+a(Array.from(n).sort())+")";case"[object String]":return typeof n=="object"?"new String("+a(n.valueOf())+")":_quote(n);case"[object Undefined]":return"undefined";default:if(typeof n.toString=="function"){var s=n.toString();if(s!=="[object Object]")return s}return"{"+o(n,keys$1(n)).join(", ")+"}"}}var toString=_curry1(function(r){return _toString(r,[])}),max$3=_curry2(function(r,a){if(r===a)return a;function o(d,f){if(d>f!=f>d)return f>d?f:d}var s=o(r,a);if(s!==void 0)return s;var l=o(typeof r,typeof a);if(l!==void 0)return l===typeof r?r:a;var u=toString(r),c=o(u,toString(a));return c!==void 0&&c===u?r:a}),XMap=function(){function n(r,a){this.xf=a,this.f=r}return n.prototype["@@transducer/init"]=_xfBase.init,n.prototype["@@transducer/result"]=_xfBase.result,n.prototype["@@transducer/step"]=function(r,a){return this.xf["@@transducer/step"](r,this.f(a))},n}(),_xmap=function(r){return function(a){return new XMap(r,a)}},map$2=_curry2(_dispatchable(["fantasy-land/map","map"],_xmap,function(r,a){switch(Object.prototype.toString.call(a)){case"[object Function]":return curryN(a.length,function(){return r.call(this,a.apply(this,arguments))});case"[object Object]":return _arrayReduce(function(o,s){return o[s]=r(a[s]),o},{},keys$1(a));default:return _map(r,a)}}));const _isInteger=Number.isInteger||function(r){return r<<0===r};function _isString(n){return Object.prototype.toString.call(n)==="[object String]"}function _nth(n,r){var a=n<0?r.length+n:n;return _isString(r)?r.charAt(a):r[a]}var prop=_curry2(function(r,a){if(a!=null)return _isInteger(r)?_nth(r,a):a[r]}),pluck=_curry2(function(r,a){return map$2(prop(r),a)}),_isArrayLike=_curry1(function(r){return _isArray(r)?!0:!r||typeof r!="object"||_isString(r)?!1:r.length===0?!0:r.length>0?r.hasOwnProperty(0)&&r.hasOwnProperty(r.length-1):!1}),symIterator=typeof Symbol<"u"?Symbol.iterator:"@@iterator";function _createReduce(n,r,a){return function(s,l,u){if(_isArrayLike(u))return n(s,l,u);if(u==null)return l;if(typeof u["fantasy-land/reduce"]=="function")return r(s,l,u,"fantasy-land/reduce");if(u[symIterator]!=null)return a(s,l,u[symIterator]());if(typeof u.next=="function")return a(s,l,u);if(typeof u.reduce=="function")return r(s,l,u,"reduce");throw new TypeError("reduce: list must be array or iterable")}}function _xArrayReduce(n,r,a){for(var o=0,s=a.length;o<s;){if(r=n["@@transducer/step"](r,a[o]),r&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}o+=1}return n["@@transducer/result"](r)}var bind$2=_curry2(function(r,a){return _arity(r.length,function(){return r.apply(a,arguments)})});function _xIterableReduce(n,r,a){for(var o=a.next();!o.done;){if(r=n["@@transducer/step"](r,o.value),r&&r["@@transducer/reduced"]){r=r["@@transducer/value"];break}o=a.next()}return n["@@transducer/result"](r)}function _xMethodReduce(n,r,a,o){return n["@@transducer/result"](a[o](bind$2(n["@@transducer/step"],n),r))}var _xReduce=_createReduce(_xArrayReduce,_xMethodReduce,_xIterableReduce),XWrap=function(){function n(r){this.f=r}return n.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},n.prototype["@@transducer/result"]=function(r){return r},n.prototype["@@transducer/step"]=function(r,a){return this.f(r,a)},n}();function _xwrap(n){return new XWrap(n)}var reduce$1=_curry3(function(n,r,a){return _xReduce(typeof n=="function"?_xwrap(n):n,r,a)}),always=_curry1(function(r){return function(){return r}}),and=_curry2(function(r,a){return r&&a}),anyPass=_curry1(function(r){return curryN(reduce$1(max$3,0,pluck("length",r)),function(){for(var a=0,o=r.length;a<o;){if(r[a].apply(this,arguments))return!0;a+=1}return!1})});function _iterableReduce(n,r,a){for(var o=a.next();!o.done;)r=n(r,o.value),o=a.next();return r}function _methodReduce(n,r,a,o){return a[o](n,r)}var _reduce=_createReduce(_arrayReduce,_methodReduce,_iterableReduce),ap=_curry2(function(r,a){return typeof a["fantasy-land/ap"]=="function"?a["fantasy-land/ap"](r):typeof r.ap=="function"?r.ap(a):typeof r=="function"?function(o){return r(o)(a(o))}:_reduce(function(o,s){return _concat(o,map$2(s,a))},[],r)}),ascend=_curry3(function(r,a,o){var s=r(a),l=r(o);return s<l?-1:s>l?1:0}),curry$2=_curry1(function(r){return curryN(r.length,r)}),isNil=_curry1(function(r){return r==null});function _isFunction(n){var r=Object.prototype.toString.call(n);return r==="[object Function]"||r==="[object AsyncFunction]"||r==="[object GeneratorFunction]"||r==="[object AsyncGeneratorFunction]"}var liftN=_curry2(function(r,a){var o=curryN(r,a);return curryN(r,function(){return _arrayReduce(ap,map$2(o,arguments[0]),Array.prototype.slice.call(arguments,1))})}),lift$1=_curry1(function(r){return liftN(r.length,r)}),both=_curry2(function(r,a){return _isFunction(r)?function(){return r.apply(this,arguments)&&a.apply(this,arguments)}:lift$1(and)(r,a)});function _cloneRegExp(n){return new RegExp(n.source,n.flags?n.flags:(n.global?"g":"")+(n.ignoreCase?"i":"")+(n.multiline?"m":"")+(n.sticky?"y":"")+(n.unicode?"u":"")+(n.dotAll?"s":""))}var not=_curry1(function(r){return!r}),complement=lift$1(not);function _pipe(n,r){return function(){return r.call(this,n.apply(this,arguments))}}function _checkForMethod(n,r){return function(){var a=arguments.length;if(a===0)return r();var o=arguments[a-1];return _isArray(o)||typeof o[n]!="function"?r.apply(this,arguments):o[n].apply(o,Array.prototype.slice.call(arguments,0,a-1))}}var slice$1=_curry3(_checkForMethod("slice",function(r,a,o){return Array.prototype.slice.call(o,r,a)})),tail=_curry1(_checkForMethod("tail",slice$1(1,1/0)));function pipe(){if(arguments.length===0)throw new Error("pipe requires at least one argument");return _arity(arguments[0].length,reduce$1(_pipe,arguments[0],tail(arguments)))}var reverse$1=_curry1(function(r){return _isString(r)?r.split("").reverse().join(""):Array.prototype.slice.call(r,0).reverse()});function compose(){if(arguments.length===0)throw new Error("compose requires at least one argument");return pipe.apply(this,reverse$1(arguments))}var head=_curry1(function(n){return _nth(0,n)});function _identity(n){return n}var identity$1=_curry1(_identity),concat=_curry2(function(r,a){if(_isArray(r)){if(_isArray(a))return r.concat(a);throw new TypeError(toString(a)+" is not an array")}if(_isString(r)){if(_isString(a))return r+a;throw new TypeError(toString(a)+" is not a string")}if(r!=null&&_isFunction(r["fantasy-land/concat"]))return r["fantasy-land/concat"](a);if(r!=null&&_isFunction(r.concat))return r.concat(a);throw new TypeError(toString(r)+' does not have a method named "concat" or "fantasy-land/concat"')}),cond=_curry1(function(r){var a=reduce$1(max$3,0,map$2(function(o){return o[0].length},r));return _arity(a,function(){for(var o=0;o<r.length;){if(r[o][0].apply(this,arguments))return r[o][1].apply(this,arguments);o+=1}})}),descend=_curry3(function(r,a,o){var s=r(a),l=r(o);return s>l?-1:s<l?1:0});function _isTypedArray(n){var r=Object.prototype.toString.call(n);return r==="[object Uint8ClampedArray]"||r==="[object Int8Array]"||r==="[object Uint8Array]"||r==="[object Int16Array]"||r==="[object Uint16Array]"||r==="[object Int32Array]"||r==="[object Uint32Array]"||r==="[object Float32Array]"||r==="[object Float64Array]"||r==="[object BigInt64Array]"||r==="[object BigUint64Array]"}var empty=_curry1(function(r){return r!=null&&typeof r["fantasy-land/empty"]=="function"?r["fantasy-land/empty"]():r!=null&&r.constructor!=null&&typeof r.constructor["fantasy-land/empty"]=="function"?r.constructor["fantasy-land/empty"]():r!=null&&typeof r.empty=="function"?r.empty():r!=null&&r.constructor!=null&&typeof r.constructor.empty=="function"?r.constructor.empty():_isArray(r)?[]:_isString(r)?"":_isObject(r)?{}:_isArguments(r)?function(){return arguments}():_isTypedArray(r)?r.constructor.from(""):void 0}),XFindIndex=function(){function n(r,a){this.xf=a,this.f=r,this.idx=-1,this.found=!1}return n.prototype["@@transducer/init"]=_xfBase.init,n.prototype["@@transducer/result"]=function(r){return this.found||(r=this.xf["@@transducer/step"](r,-1)),this.xf["@@transducer/result"](r)},n.prototype["@@transducer/step"]=function(r,a){return this.idx+=1,this.f(a)&&(this.found=!0,r=_reduced(this.xf["@@transducer/step"](r,this.idx))),r},n}();function _xfindIndex(n){return function(r){return new XFindIndex(n,r)}}var findIndex=_curry2(_dispatchable([],_xfindIndex,function(r,a){for(var o=0,s=a.length;o<s;){if(r(a[o]))return o;o+=1}return-1})),forEachObjIndexed=_curry2(function(r,a){for(var o=keys$1(a),s=0;s<o.length;){var l=o[s];r(a[l],l,a),s+=1}return a}),fromPairs=_curry1(function(r){for(var a={},o=0;o<r.length;)a[r[o][0]]=r[o][1],o+=1;return a}),hasPath=_curry2(function(r,a){if(r.length===0||isNil(a))return!1;for(var o=a,s=0;s<r.length;)if(!isNil(o)&&_has(r[s],o))o=o[r[s]],s+=1;else return!1;return!0}),has$2=_curry2(function(r,a){return hasPath([r],a)}),ifElse=_curry3(function(r,a,o){return curryN(Math.max(r.length,a.length,o.length),function(){return r.apply(this,arguments)?a.apply(this,arguments):o.apply(this,arguments)})}),invoker=_curry2(function(r,a){return curryN(r+1,function(){var o=arguments[r];if(o!=null&&_isFunction(o[a]))return o[a].apply(o,Array.prototype.slice.call(arguments,0,r));throw new TypeError(toString(o)+' does not have a method named "'+a+'"')})}),is=_curry2(function(r,a){return a instanceof r||a!=null&&(a.constructor===r||r.name==="Object"&&typeof a=="object")}),isEmpty$1=_curry1(function(r){return r!=null&&equals(r,empty(r))}),isNotNil=_curry1(function(r){return!isNil(r)}),join=invoker(1,"join");function _isNumber(n){return Object.prototype.toString.call(n)==="[object Number]"}var length$1=_curry1(function(r){return r!=null&&_isNumber(r.length)?r.length:NaN}),nth=_curry2(_nth),times=_curry2(function(r,a){var o=Number(a);if(o<0||isNaN(o))throw new RangeError("n must be a non-negative number");for(var s=0,l=Array(o);s<o;)l[s]=r(s),s+=1;return l}),repeat=_curry2(function(r,a){return times(always(r),a)}),replace=_curry3(function(r,a,o){return o.replace(r,a)}),sort$3=_curry2(function(r,a){return Array.prototype.slice.call(a,0).sort(r)}),split$1=invoker(1,"split"),splitEvery=_curry2(function(r,a){if(r<=0)throw new Error("First argument to splitEvery must be a positive integer");for(var o=[],s=0;s<a.length;)o.push(slice$1(s,s+=r,a));return o});function _isRegExp(n){return Object.prototype.toString.call(n)==="[object RegExp]"}var test=_curry2(function(r,a){if(!_isRegExp(r))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+toString(r));return _cloneRegExp(r).test(a)}),toLower=invoker(0,"toLowerCase"),toPairs=_curry1(function(r){var a=[];for(var o in r)_has(o,r)&&(a[a.length]=[o,r[o]]);return a}),ws=" \n\v\f\r \u2028\u2029\uFEFF",zeroWidth="",hasProtoTrim=typeof String.prototype.trim=="function",trim$2=_curry1(!hasProtoTrim||ws.trim()||!zeroWidth.trim()?function(r){var a=new RegExp("^["+ws+"]["+ws+"]*"),o=new RegExp("["+ws+"]["+ws+"]*$");return r.replace(a,"").replace(o,"")}:function(r){return r.trim()}),zip=_curry2(function(r,a){for(var o=Math.min(r.length,a.length),s=Array(o),l=0;l<o;)s[l]=[r[l],a[l]],l+=1;return s}),zipWith=_curry3(function(r,a,o){for(var s=Math.min(a.length,o.length),l=Array(s),u=0;u<s;)l[u]=r(a[u],o[u]),u+=1;return l}),md5$1={exports:{}},crypt={exports:{}};(function(){var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r={rotl:function(a,o){return a<<o|a>>>32-o},rotr:function(a,o){return a<<32-o|a>>>o},endian:function(a){if(a.constructor==Number)return r.rotl(a,8)&16711935|r.rotl(a,24)&4278255360;for(var o=0;o<a.length;o++)a[o]=r.endian(a[o]);return a},randomBytes:function(a){for(var o=[];a>0;a--)o.push(Math.floor(Math.random()*256));return o},bytesToWords:function(a){for(var o=[],s=0,l=0;s<a.length;s++,l+=8)o[l>>>5]|=a[s]<<24-l%32;return o},wordsToBytes:function(a){for(var o=[],s=0;s<a.length*32;s+=8)o.push(a[s>>>5]>>>24-s%32&255);return o},bytesToHex:function(a){for(var o=[],s=0;s<a.length;s++)o.push((a[s]>>>4).toString(16)),o.push((a[s]&15).toString(16));return o.join("")},hexToBytes:function(a){for(var o=[],s=0;s<a.length;s+=2)o.push(parseInt(a.substr(s,2),16));return o},bytesToBase64:function(a){for(var o=[],s=0;s<a.length;s+=3)for(var l=a[s]<<16|a[s+1]<<8|a[s+2],u=0;u<4;u++)s*8+u*6<=a.length*8?o.push(n.charAt(l>>>6*(3-u)&63)):o.push("=");return o.join("")},base64ToBytes:function(a){a=a.replace(/[^A-Z0-9+\/]/ig,"");for(var o=[],s=0,l=0;s<a.length;l=++s%4)l!=0&&o.push((n.indexOf(a.charAt(s-1))&Math.pow(2,-2*l+8)-1)<<l*2|n.indexOf(a.charAt(s))>>>6-l*2);return o}};crypt.exports=r})();var cryptExports=crypt.exports,charenc={utf8:{stringToBytes:function(n){return charenc.bin.stringToBytes(unescape(encodeURIComponent(n)))},bytesToString:function(n){return decodeURIComponent(escape(charenc.bin.bytesToString(n)))}},bin:{stringToBytes:function(n){for(var r=[],a=0;a<n.length;a++)r.push(n.charCodeAt(a)&255);return r},bytesToString:function(n){for(var r=[],a=0;a<n.length;a++)r.push(String.fromCharCode(n[a]));return r.join("")}}},charenc_1=charenc;var isBuffer_1=function(n){return n!=null&&(isBuffer(n)||isSlowBuffer(n)||!!n._isBuffer)};function isBuffer(n){return!!n.constructor&&typeof n.constructor.isBuffer=="function"&&n.constructor.isBuffer(n)}function isSlowBuffer(n){return typeof n.readFloatLE=="function"&&typeof n.slice=="function"&&isBuffer(n.slice(0,0))}(function(){var n=cryptExports,r=charenc_1.utf8,a=isBuffer_1,o=charenc_1.bin,s=function(l,u){l.constructor==String?u&&u.encoding==="binary"?l=o.stringToBytes(l):l=r.stringToBytes(l):a(l)?l=Array.prototype.slice.call(l,0):!Array.isArray(l)&&l.constructor!==Uint8Array&&(l=l.toString());for(var c=n.bytesToWords(l),d=l.length*8,f=1732584193,p=-271733879,v=-1732584194,g=271733878,y=0;y<c.length;y++)c[y]=(c[y]<<8|c[y]>>>24)&16711935|(c[y]<<24|c[y]>>>8)&4278255360;c[d>>>5]|=128<<d%32,c[(d+64>>>9<<4)+14]=d;for(var _=s._ff,S=s._gg,b=s._hh,x=s._ii,y=0;y<c.length;y+=16){var A=f,w=p,E=v,D=g;f=_(f,p,v,g,c[y+0],7,-680876936),g=_(g,f,p,v,c[y+1],12,-389564586),v=_(v,g,f,p,c[y+2],17,606105819),p=_(p,v,g,f,c[y+3],22,-1044525330),f=_(f,p,v,g,c[y+4],7,-176418897),g=_(g,f,p,v,c[y+5],12,1200080426),v=_(v,g,f,p,c[y+6],17,-1473231341),p=_(p,v,g,f,c[y+7],22,-45705983),f=_(f,p,v,g,c[y+8],7,1770035416),g=_(g,f,p,v,c[y+9],12,-1958414417),v=_(v,g,f,p,c[y+10],17,-42063),p=_(p,v,g,f,c[y+11],22,-1990404162),f=_(f,p,v,g,c[y+12],7,1804603682),g=_(g,f,p,v,c[y+13],12,-40341101),v=_(v,g,f,p,c[y+14],17,-1502002290),p=_(p,v,g,f,c[y+15],22,1236535329),f=S(f,p,v,g,c[y+1],5,-165796510),g=S(g,f,p,v,c[y+6],9,-1069501632),v=S(v,g,f,p,c[y+11],14,643717713),p=S(p,v,g,f,c[y+0],20,-373897302),f=S(f,p,v,g,c[y+5],5,-701558691),g=S(g,f,p,v,c[y+10],9,38016083),v=S(v,g,f,p,c[y+15],14,-660478335),p=S(p,v,g,f,c[y+4],20,-405537848),f=S(f,p,v,g,c[y+9],5,568446438),g=S(g,f,p,v,c[y+14],9,-1019803690),v=S(v,g,f,p,c[y+3],14,-187363961),p=S(p,v,g,f,c[y+8],20,1163531501),f=S(f,p,v,g,c[y+13],5,-1444681467),g=S(g,f,p,v,c[y+2],9,-51403784),v=S(v,g,f,p,c[y+7],14,1735328473),p=S(p,v,g,f,c[y+12],20,-1926607734),f=b(f,p,v,g,c[y+5],4,-378558),g=b(g,f,p,v,c[y+8],11,-2022574463),v=b(v,g,f,p,c[y+11],16,1839030562),p=b(p,v,g,f,c[y+14],23,-35309556),f=b(f,p,v,g,c[y+1],4,-1530992060),g=b(g,f,p,v,c[y+4],11,1272893353),v=b(v,g,f,p,c[y+7],16,-155497632),p=b(p,v,g,f,c[y+10],23,-1094730640),f=b(f,p,v,g,c[y+13],4,681279174),g=b(g,f,p,v,c[y+0],11,-358537222),v=b(v,g,f,p,c[y+3],16,-722521979),p=b(p,v,g,f,c[y+6],23,76029189),f=b(f,p,v,g,c[y+9],4,-640364487),g=b(g,f,p,v,c[y+12],11,-421815835),v=b(v,g,f,p,c[y+15],16,530742520),p=b(p,v,g,f,c[y+2],23,-995338651),f=x(f,p,v,g,c[y+0],6,-198630844),g=x(g,f,p,v,c[y+7],10,1126891415),v=x(v,g,f,p,c[y+14],15,-1416354905),p=x(p,v,g,f,c[y+5],21,-57434055),f=x(f,p,v,g,c[y+12],6,1700485571),g=x(g,f,p,v,c[y+3],10,-1894986606),v=x(v,g,f,p,c[y+10],15,-1051523),p=x(p,v,g,f,c[y+1],21,-2054922799),f=x(f,p,v,g,c[y+8],6,1873313359),g=x(g,f,p,v,c[y+15],10,-30611744),v=x(v,g,f,p,c[y+6],15,-1560198380),p=x(p,v,g,f,c[y+13],21,1309151649),f=x(f,p,v,g,c[y+4],6,-145523070),g=x(g,f,p,v,c[y+11],10,-1120210379),v=x(v,g,f,p,c[y+2],15,718787259),p=x(p,v,g,f,c[y+9],21,-343485551),f=f+A>>>0,p=p+w>>>0,v=v+E>>>0,g=g+D>>>0}return n.endian([f,p,v,g])};s._ff=function(l,u,c,d,f,p,v){var g=l+(u&c|~u&d)+(f>>>0)+v;return(g<<p|g>>>32-p)+u},s._gg=function(l,u,c,d,f,p,v){var g=l+(u&d|c&~d)+(f>>>0)+v;return(g<<p|g>>>32-p)+u},s._hh=function(l,u,c,d,f,p,v){var g=l+(u^c^d)+(f>>>0)+v;return(g<<p|g>>>32-p)+u},s._ii=function(l,u,c,d,f,p,v){var g=l+(c^(u|~d))+(f>>>0)+v;return(g<<p|g>>>32-p)+u},s._blocksize=16,s._digestsize=16,md5$1.exports=function(l,u){if(l==null)throw new Error("Illegal argument "+l);var c=n.wordsToBytes(s(l,u));return u&&u.asBytes?c:u&&u.asString?o.bytesToString(c):n.bytesToHex(c)}})();var md5Exports=md5$1.exports;const md5=getDefaultExportFromCjs(md5Exports),isUndefined=isNil,isNull=isNil,isBoolean=is(Boolean),isNumber$1=is(Number),isObject$4=n=>both(is(Object),both(complement(is(Function)),complement(is(Array))))(n),isFunction$1=is(Function),isString$1=is(String),isArray$2=n=>is(Array)(n),isEmpty=isEmpty$1;test(/^\d+$/);const isDate=is(Date),isPromise=is(Promise);is(Symbol);const isVNode=n=>is(Object,n)&&has$2("type",n),checkUrl=test(/^((https|http|ftp|rtsp|mms)?:\/\/)[^\s]+/),checkPort=pipe(ifElse(is(Number),toString,identity$1),test(/^([0-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5])$/));test(/[\u4e00-\u9fa5]/);const checkDomain=pipe(trim$2,test(/^([\w\u4e00-\u9fa5\-\*]{1,100}\.){1,10}([\w\u4e00-\u9fa5\-]{1,24}|[\w\u4e00-\u9fa5\-]{1,24}\.[\w\u4e00-\u9fa5\-]{1,24})$/));pipe(trim$2,anyPass([test(/^([\w\u4e00-\u9fa5\-\*]{1,100}\.){1,10}([\w\u4e00-\u9fa5\-]{1,24}|[\w\u4e00-\u9fa5\-]{1,24}\.[\w\u4e00-\u9fa5\-]{1,24})$/),test(/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/)]));const checkEmail=test(/\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}/),checkPhone=pipe(ifElse(is(Number),toString,identity$1),test(/^1[3456789]\d{9}$/)),checkIp=test(/^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/),checkDomainIp=test(/^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/),checkDomainPort=test(/^([\w\u4e00-\u9fa5\-\*]{1,100}\.){1,10}([\w\u4e00-\u9fa5\-]{1,24}|[\w\u4e00-\u9fa5\-]{1,24}\.[\w\u4e00-\u9fa5\-]{1,24})(:([1-9]|[1-9]\d|[1-9]\d{2}|[1-9]\d{3}|[1-5]\d{4}|6[0-4]\d{3}|65[0-4]\d{2}|655[0-2]\d|6553[0-5]))?$/),checkDomainOrIpPort=n=>{if(!n)return!1;const r=n.trim();if(r.startsWith("[")){const o=r.match(/^\[([^\]]+)\](?::(\d+))?$/);if(!o)return!1;const s=o[1],l=o[2];return!(!l&&!/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/.test(s)||l&&!checkPort(l))}const a=r.split(":");if(a.length===1)return checkDomain(a[0]);if(a.length===2){const[o,s]=a;return checkDomain(o)&&checkPort(s)}return!1};test(/^([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}$/);const checkIps=test(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(\/\d{1,2})?$/),checkPanelUrl=test(/^(https?):\/\/(?:(?:[\w-]+\.)+[a-zA-Z]{2,}|(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:\[(?:[0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,7}:|(?:[0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|(?:[0-9a-fA-F]{1,4}:){1,5}(?::[0-9a-fA-F]{1,4}){1,2}|(?:[0-9a-fA-F]{1,4}:){1,4}(?::[0-9a-fA-F]{1,4}){1,3}|(?:[0-9a-fA-F]{1,4}:){1,3}(?::[0-9a-fA-F]{1,4}){1,4}|(?:[0-9a-fA-F]{1,4}:){1,2}(?::[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:(?::[0-9a-fA-F]{1,4}){1,6}|:(?::[0-9a-fA-F]{1,4}){1,7}|:(?::[0-9a-fA-F]{1,4}){1,6}:|(?:[0-9a-fA-F]{1,4}:){1,6}:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))\])(?::\d{1,5})?(?:\/.*)?$/),toNumbersArray=pipe(split$1("."),map$2(parseInt)),getMaxLength=(n,r)=>Math.max(n.length,r.length),getVersionsInfo=(n,r)=>{let a=toNumbersArray(n),o=toNumbersArray(r);const s=getMaxLength(a,o),l=u=>concat(u,repeat(0,s-length$1(u)));return a=l(a),o=l(o),{versionArr:a,cloudVersionArr:o,maxLength:s}},checkVersion=(n,r)=>{const{versionArr:a,cloudVersionArr:o,maxLength:s}=getVersionsInfo(n,r),l=zipWith((c,d)=>c-d,a,o),u=findIndex(complement(equals(0)),l);return cond([[equals(-1),always(1)],[equals(s-1),always(2)],[T,always(-1)]])(u)},compareVersion=(n,r)=>{const{versionArr:a,cloudVersionArr:o}=getVersionsInfo(n,r);return reduce$1((s,[l,u])=>l>u?!0:!(l<u),0,zip(a,o))};replace(new RegExp("/(".concat(String(__),"+)/g")));const checkVariable=(n,r,a,o,s)=>(c=>Array.isArray(c)?"array":typeof c)(n)!==r||r==="object"&&Object.keys(n).length===0&&s||r==="array"&&n.length===0&&s?(o&&o(n),a):n,validatePort=(n,r,a)=>{const o=String(r).split(","),s=/^\d+$/;return o.forEach(l=>{if(s.test(l)){const u=parseInt(l,10);if(u<1||u>65535)return a("端口输入范围不正确,请重新输入")}else if(l.includes("-")){const u=l.split("-"),c=parseInt(u[0],10),d=parseInt(u[1],10);if(c<1||d>65535||c>d)return a("端口输入范围不正确,请重新输入")}else if(isEmpty(l))a("端口不可为空,请输入");else return a("端口格式不正确,请重新输入")}),a()};var BI_RM="0123456789abcdefghijklmnopqrstuvwxyz";function int2char(n){return BI_RM.charAt(n)}function op_and(n,r){return n&r}function op_or(n,r){return n|r}function op_xor(n,r){return n^r}function op_andnot(n,r){return n&~r}function lbit(n){if(n==0)return-1;var r=0;return n&65535||(n>>=16,r+=16),n&255||(n>>=8,r+=8),n&15||(n>>=4,r+=4),n&3||(n>>=2,r+=2),n&1||++r,r}function cbit(n){for(var r=0;n!=0;)n&=n-1,++r;return r}var b64map="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",b64pad="=";function hex2b64(n){var r,a,o="";for(r=0;r+3<=n.length;r+=3)a=parseInt(n.substring(r,r+3),16),o+=b64map.charAt(a>>6)+b64map.charAt(a&63);for(r+1==n.length?(a=parseInt(n.substring(r,r+1),16),o+=b64map.charAt(a<<2)):r+2==n.length&&(a=parseInt(n.substring(r,r+2),16),o+=b64map.charAt(a>>2)+b64map.charAt((a&3)<<4));(o.length&3)>0;)o+=b64pad;return o}function b64tohex(n){var r="",a,o=0,s=0;for(a=0;a<n.length&&n.charAt(a)!=b64pad;++a){var l=b64map.indexOf(n.charAt(a));l<0||(o==0?(r+=int2char(l>>2),s=l&3,o=1):o==1?(r+=int2char(s<<2|l>>4),s=l&15,o=2):o==2?(r+=int2char(s),r+=int2char(l>>2),s=l&3,o=3):(r+=int2char(s<<2|l>>4),r+=int2char(l&15),o=0))}return o==1&&(r+=int2char(s<<2)),r}var decoder$1,Hex={decode:function(n){var r;if(decoder$1===void 0){var a="0123456789ABCDEF",o=" \f\n\r \u2028\u2029";for(decoder$1={},r=0;r<16;++r)decoder$1[a.charAt(r)]=r;for(a=a.toLowerCase(),r=10;r<16;++r)decoder$1[a.charAt(r)]=r;for(r=0;r<o.length;++r)decoder$1[o.charAt(r)]=-1}var s=[],l=0,u=0;for(r=0;r<n.length;++r){var c=n.charAt(r);if(c=="=")break;if(c=decoder$1[c],c!=-1){if(c===void 0)throw new Error("Illegal character at offset "+r);l|=c,++u>=2?(s[s.length]=l,l=0,u=0):l<<=4}}if(u)throw new Error("Hex encoding incomplete: 4 bits missing");return s}},decoder,Base64={decode:function(n){var r;if(decoder===void 0){var a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o="= \f\n\r \u2028\u2029";for(decoder=Object.create(null),r=0;r<64;++r)decoder[a.charAt(r)]=r;for(decoder["-"]=62,decoder._=63,r=0;r<o.length;++r)decoder[o.charAt(r)]=-1}var s=[],l=0,u=0;for(r=0;r<n.length;++r){var c=n.charAt(r);if(c=="=")break;if(c=decoder[c],c!=-1){if(c===void 0)throw new Error("Illegal character at offset "+r);l|=c,++u>=4?(s[s.length]=l>>16,s[s.length]=l>>8&255,s[s.length]=l&255,l=0,u=0):l<<=6}}switch(u){case 1:throw new Error("Base64 encoding incomplete: at least 2 bits missing");case 2:s[s.length]=l>>10;break;case 3:s[s.length]=l>>16,s[s.length]=l>>8&255;break}return s},re:/-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,unarmor:function(n){var r=Base64.re.exec(n);if(r)if(r[1])n=r[1];else if(r[2])n=r[2];else throw new Error("RegExp out of sync");return Base64.decode(n)}},max$2=1e13,Int10=function(){function n(r){this.buf=[+r||0]}return n.prototype.mulAdd=function(r,a){var o=this.buf,s=o.length,l,u;for(l=0;l<s;++l)u=o[l]*r+a,u<max$2?a=0:(a=0|u/max$2,u-=a*max$2),o[l]=u;a>0&&(o[l]=a)},n.prototype.sub=function(r){var a=this.buf,o=a.length,s,l;for(s=0;s<o;++s)l=a[s]-r,l<0?(l+=max$2,r=1):r=0,a[s]=l;for(;a[a.length-1]===0;)a.pop()},n.prototype.toString=function(r){if((r||10)!=10)throw new Error("only base 10 is supported");for(var a=this.buf,o=a[a.length-1].toString(),s=a.length-2;s>=0;--s)o+=(max$2+a[s]).toString().substring(1);return o},n.prototype.valueOf=function(){for(var r=this.buf,a=0,o=r.length-1;o>=0;--o)a=a*max$2+r[o];return a},n.prototype.simplify=function(){var r=this.buf;return r.length==1?r[0]:this},n}(),ellipsis="…",reTimeS=/^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/,reTimeL=/^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;function stringCut(n,r){return n.length>r&&(n=n.substring(0,r)+ellipsis),n}var Stream=function(){function n(r,a){this.hexDigits="0123456789ABCDEF",r instanceof n?(this.enc=r.enc,this.pos=r.pos):(this.enc=r,this.pos=a)}return n.prototype.get=function(r){if(r===void 0&&(r=this.pos++),r>=this.enc.length)throw new Error("Requesting byte offset ".concat(r," on a stream of length ").concat(this.enc.length));return typeof this.enc=="string"?this.enc.charCodeAt(r):this.enc[r]},n.prototype.hexByte=function(r){return this.hexDigits.charAt(r>>4&15)+this.hexDigits.charAt(r&15)},n.prototype.hexDump=function(r,a,o){for(var s="",l=r;l<a;++l)if(s+=this.hexByte(this.get(l)),o!==!0)switch(l&15){case 7:s+=" ";break;case 15:s+="\n";break;default:s+=" "}return s},n.prototype.isASCII=function(r,a){for(var o=r;o<a;++o){var s=this.get(o);if(s<32||s>176)return!1}return!0},n.prototype.parseStringISO=function(r,a){for(var o="",s=r;s<a;++s)o+=String.fromCharCode(this.get(s));return o},n.prototype.parseStringUTF=function(r,a){for(var o="",s=r;s<a;){var l=this.get(s++);l<128?o+=String.fromCharCode(l):l>191&&l<224?o+=String.fromCharCode((l&31)<<6|this.get(s++)&63):o+=String.fromCharCode((l&15)<<12|(this.get(s++)&63)<<6|this.get(s++)&63)}return o},n.prototype.parseStringBMP=function(r,a){for(var o="",s,l,u=r;u<a;)s=this.get(u++),l=this.get(u++),o+=String.fromCharCode(s<<8|l);return o},n.prototype.parseTime=function(r,a,o){var s=this.parseStringISO(r,a),l=(o?reTimeS:reTimeL).exec(s);return l?(o&&(l[1]=+l[1],l[1]+=+l[1]<70?2e3:1900),s=l[1]+"-"+l[2]+"-"+l[3]+" "+l[4],l[5]&&(s+=":"+l[5],l[6]&&(s+=":"+l[6],l[7]&&(s+="."+l[7]))),l[8]&&(s+=" UTC",l[8]!="Z"&&(s+=l[8],l[9]&&(s+=":"+l[9]))),s):"Unrecognized time: "+s},n.prototype.parseInteger=function(r,a){for(var o=this.get(r),s=o>127,l=s?255:0,u,c="";o==l&&++r<a;)o=this.get(r);if(u=a-r,u===0)return s?-1:0;if(u>4){for(c=o,u<<=3;!((+c^l)&128);)c=+c<<1,--u;c="("+u+" bit)\n"}s&&(o=o-256);for(var d=new Int10(o),f=r+1;f<a;++f)d.mulAdd(256,this.get(f));return c+d.toString()},n.prototype.parseBitString=function(r,a,o){for(var s=this.get(r),l=(a-r-1<<3)-s,u="("+l+" bit)\n",c="",d=r+1;d<a;++d){for(var f=this.get(d),p=d==a-1?s:0,v=7;v>=p;--v)c+=f>>v&1?"1":"0";if(c.length>o)return u+stringCut(c,o)}return u+c},n.prototype.parseOctetString=function(r,a,o){if(this.isASCII(r,a))return stringCut(this.parseStringISO(r,a),o);var s=a-r,l="("+s+" byte)\n";o/=2,s>o&&(a=r+o);for(var u=r;u<a;++u)l+=this.hexByte(this.get(u));return s>o&&(l+=ellipsis),l},n.prototype.parseOID=function(r,a,o){for(var s="",l=new Int10,u=0,c=r;c<a;++c){var d=this.get(c);if(l.mulAdd(128,d&127),u+=7,!(d&128)){if(s==="")if(l=l.simplify(),l instanceof Int10)l.sub(80),s="2."+l.toString();else{var f=l<80?l<40?0:1:2;s=f+"."+(l-f*40)}else s+="."+l.toString();if(s.length>o)return stringCut(s,o);l=new Int10,u=0}}return u>0&&(s+=".incomplete"),s},n}(),ASN1=function(){function n(r,a,o,s,l){if(!(s instanceof ASN1Tag))throw new Error("Invalid tag value.");this.stream=r,this.header=a,this.length=o,this.tag=s,this.sub=l}return n.prototype.typeName=function(){switch(this.tag.tagClass){case 0:switch(this.tag.tagNumber){case 0:return"EOC";case 1:return"BOOLEAN";case 2:return"INTEGER";case 3:return"BIT_STRING";case 4:return"OCTET_STRING";case 5:return"NULL";case 6:return"OBJECT_IDENTIFIER";case 7:return"ObjectDescriptor";case 8:return"EXTERNAL";case 9:return"REAL";case 10:return"ENUMERATED";case 11:return"EMBEDDED_PDV";case 12:return"UTF8String";case 16:return"SEQUENCE";case 17:return"SET";case 18:return"NumericString";case 19:return"PrintableString";case 20:return"TeletexString";case 21:return"VideotexString";case 22:return"IA5String";case 23:return"UTCTime";case 24:return"GeneralizedTime";case 25:return"GraphicString";case 26:return"VisibleString";case 27:return"GeneralString";case 28:return"UniversalString";case 30:return"BMPString"}return"Universal_"+this.tag.tagNumber.toString();case 1:return"Application_"+this.tag.tagNumber.toString();case 2:return"["+this.tag.tagNumber.toString()+"]";case 3:return"Private_"+this.tag.tagNumber.toString()}},n.prototype.content=function(r){if(this.tag===void 0)return null;r===void 0&&(r=1/0);var a=this.posContent(),o=Math.abs(this.length);if(!this.tag.isUniversal())return this.sub!==null?"("+this.sub.length+" elem)":this.stream.parseOctetString(a,a+o,r);switch(this.tag.tagNumber){case 1:return this.stream.get(a)===0?"false":"true";case 2:return this.stream.parseInteger(a,a+o);case 3:return this.sub?"("+this.sub.length+" elem)":this.stream.parseBitString(a,a+o,r);case 4:return this.sub?"("+this.sub.length+" elem)":this.stream.parseOctetString(a,a+o,r);case 6:return this.stream.parseOID(a,a+o,r);case 16:case 17:return this.sub!==null?"("+this.sub.length+" elem)":"(no elem)";case 12:return stringCut(this.stream.parseStringUTF(a,a+o),r);case 18:case 19:case 20:case 21:case 22:case 26:return stringCut(this.stream.parseStringISO(a,a+o),r);case 30:return stringCut(this.stream.parseStringBMP(a,a+o),r);case 23:case 24:return this.stream.parseTime(a,a+o,this.tag.tagNumber==23)}return null},n.prototype.toString=function(){return this.typeName()+"@"+this.stream.pos+"[header:"+this.header+",length:"+this.length+",sub:"+(this.sub===null?"null":this.sub.length)+"]"},n.prototype.toPrettyString=function(r){r===void 0&&(r="");var a=r+this.typeName()+" @"+this.stream.pos;if(this.length>=0&&(a+="+"),a+=this.length,this.tag.tagConstructed?a+=" (constructed)":this.tag.isUniversal()&&(this.tag.tagNumber==3||this.tag.tagNumber==4)&&this.sub!==null&&(a+=" (encapsulates)"),a+="\n",this.sub!==null){r+=" ";for(var o=0,s=this.sub.length;o<s;++o)a+=this.sub[o].toPrettyString(r)}return a},n.prototype.posStart=function(){return this.stream.pos},n.prototype.posContent=function(){return this.stream.pos+this.header},n.prototype.posEnd=function(){return this.stream.pos+this.header+Math.abs(this.length)},n.prototype.toHexString=function(){return this.stream.hexDump(this.posStart(),this.posEnd(),!0)},n.decodeLength=function(r){var a=r.get(),o=a&127;if(o==a)return o;if(o>6)throw new Error("Length over 48 bits not supported at position "+(r.pos-1));if(o===0)return null;a=0;for(var s=0;s<o;++s)a=a*256+r.get();return a},n.prototype.getHexStringValue=function(){var r=this.toHexString(),a=this.header*2,o=this.length*2;return r.substring(a,a+o)},n.decode=function(r){var a;r instanceof Stream?a=r:a=new Stream(r,0);var o=new Stream(a),s=new ASN1Tag(a),l=n.decodeLength(a),u=a.pos,c=u-o.pos,d=null,f=function(){var v=[];if(l!==null){for(var g=u+l;a.pos<g;)v[v.length]=n.decode(a);if(a.pos!=g)throw new Error("Content size is not correct for container starting at offset "+u)}else try{for(;;){var y=n.decode(a);if(y.tag.isEOC())break;v[v.length]=y}l=u-a.pos}catch(_){throw new Error("Exception while decoding undefined length content: "+_)}return v};if(s.tagConstructed)d=f();else if(s.isUniversal()&&(s.tagNumber==3||s.tagNumber==4))try{if(s.tagNumber==3&&a.get()!=0)throw new Error("BIT STRINGs with unused bits cannot encapsulate.");d=f();for(var p=0;p<d.length;++p)if(d[p].tag.isEOC())throw new Error("EOC is not supposed to be actual content.")}catch(v){d=null}if(d===null){if(l===null)throw new Error("We can't skip over an invalid tag with undefined length at offset "+u);a.pos=u+Math.abs(l)}return new n(o,c,l,s,d)},n}(),ASN1Tag=function(){function n(r){var a=r.get();if(this.tagClass=a>>6,this.tagConstructed=(a&32)!==0,this.tagNumber=a&31,this.tagNumber==31){var o=new Int10;do a=r.get(),o.mulAdd(128,a&127);while(a&128);this.tagNumber=o.simplify()}}return n.prototype.isUniversal=function(){return this.tagClass===0},n.prototype.isEOC=function(){return this.tagClass===0&&this.tagNumber===0},n}(),dbits,canary=0xdeadbeefcafe,j_lm=(canary&16777215)==15715070,lowprimes=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],lplim=(1<<26)/lowprimes[lowprimes.length-1],BigInteger=function(){function n(r,a,o){r!=null&&(typeof r=="number"?this.fromNumber(r,a,o):a==null&&typeof r!="string"?this.fromString(r,256):this.fromString(r,a))}return n.prototype.toString=function(r){if(this.s<0)return"-"+this.negate().toString(r);var a;if(r==16)a=4;else if(r==8)a=3;else if(r==2)a=1;else if(r==32)a=5;else if(r==4)a=2;else return this.toRadix(r);var o=(1<<a)-1,s,l=!1,u="",c=this.t,d=this.DB-c*this.DB%a;if(c-- >0)for(d<this.DB&&(s=this[c]>>d)>0&&(l=!0,u=int2char(s));c>=0;)d<a?(s=(this[c]&(1<<d)-1)<<a-d,s|=this[--c]>>(d+=this.DB-a)):(s=this[c]>>(d-=a)&o,d<=0&&(d+=this.DB,--c)),s>0&&(l=!0),l&&(u+=int2char(s));return l?u:"0"},n.prototype.negate=function(){var r=nbi();return n.ZERO.subTo(this,r),r},n.prototype.abs=function(){return this.s<0?this.negate():this},n.prototype.compareTo=function(r){var a=this.s-r.s;if(a!=0)return a;var o=this.t;if(a=o-r.t,a!=0)return this.s<0?-a:a;for(;--o>=0;)if((a=this[o]-r[o])!=0)return a;return 0},n.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+nbits(this[this.t-1]^this.s&this.DM)},n.prototype.mod=function(r){var a=nbi();return this.abs().divRemTo(r,null,a),this.s<0&&a.compareTo(n.ZERO)>0&&r.subTo(a,a),a},n.prototype.modPowInt=function(r,a){var o;return r<256||a.isEven()?o=new Classic(a):o=new Montgomery(a),this.exp(r,o)},n.prototype.clone=function(){var r=nbi();return this.copyTo(r),r},n.prototype.intValue=function(){if(this.s<0){if(this.t==1)return this[0]-this.DV;if(this.t==0)return-1}else{if(this.t==1)return this[0];if(this.t==0)return 0}return(this[1]&(1<<32-this.DB)-1)<<this.DB|this[0]},n.prototype.byteValue=function(){return this.t==0?this.s:this[0]<<24>>24},n.prototype.shortValue=function(){return this.t==0?this.s:this[0]<<16>>16},n.prototype.signum=function(){return this.s<0?-1:this.t<=0||this.t==1&&this[0]<=0?0:1},n.prototype.toByteArray=function(){var r=this.t,a=[];a[0]=this.s;var o=this.DB-r*this.DB%8,s,l=0;if(r-- >0)for(o<this.DB&&(s=this[r]>>o)!=(this.s&this.DM)>>o&&(a[l++]=s|this.s<<this.DB-o);r>=0;)o<8?(s=(this[r]&(1<<o)-1)<<8-o,s|=this[--r]>>(o+=this.DB-8)):(s=this[r]>>(o-=8)&255,o<=0&&(o+=this.DB,--r)),s&128&&(s|=-256),l==0&&(this.s&128)!=(s&128)&&++l,(l>0||s!=this.s)&&(a[l++]=s);return a},n.prototype.equals=function(r){return this.compareTo(r)==0},n.prototype.min=function(r){return this.compareTo(r)<0?this:r},n.prototype.max=function(r){return this.compareTo(r)>0?this:r},n.prototype.and=function(r){var a=nbi();return this.bitwiseTo(r,op_and,a),a},n.prototype.or=function(r){var a=nbi();return this.bitwiseTo(r,op_or,a),a},n.prototype.xor=function(r){var a=nbi();return this.bitwiseTo(r,op_xor,a),a},n.prototype.andNot=function(r){var a=nbi();return this.bitwiseTo(r,op_andnot,a),a},n.prototype.not=function(){for(var r=nbi(),a=0;a<this.t;++a)r[a]=this.DM&~this[a];return r.t=this.t,r.s=~this.s,r},n.prototype.shiftLeft=function(r){var a=nbi();return r<0?this.rShiftTo(-r,a):this.lShiftTo(r,a),a},n.prototype.shiftRight=function(r){var a=nbi();return r<0?this.lShiftTo(-r,a):this.rShiftTo(r,a),a},n.prototype.getLowestSetBit=function(){for(var r=0;r<this.t;++r)if(this[r]!=0)return r*this.DB+lbit(this[r]);return this.s<0?this.t*this.DB:-1},n.prototype.bitCount=function(){for(var r=0,a=this.s&this.DM,o=0;o<this.t;++o)r+=cbit(this[o]^a);return r},n.prototype.testBit=function(r){var a=Math.floor(r/this.DB);return a>=this.t?this.s!=0:(this[a]&1<<r%this.DB)!=0},n.prototype.setBit=function(r){return this.changeBit(r,op_or)},n.prototype.clearBit=function(r){return this.changeBit(r,op_andnot)},n.prototype.flipBit=function(r){return this.changeBit(r,op_xor)},n.prototype.add=function(r){var a=nbi();return this.addTo(r,a),a},n.prototype.subtract=function(r){var a=nbi();return this.subTo(r,a),a},n.prototype.multiply=function(r){var a=nbi();return this.multiplyTo(r,a),a},n.prototype.divide=function(r){var a=nbi();return this.divRemTo(r,a,null),a},n.prototype.remainder=function(r){var a=nbi();return this.divRemTo(r,null,a),a},n.prototype.divideAndRemainder=function(r){var a=nbi(),o=nbi();return this.divRemTo(r,a,o),[a,o]},n.prototype.modPow=function(r,a){var o=r.bitLength(),s,l=nbv(1),u;if(o<=0)return l;o<18?s=1:o<48?s=3:o<144?s=4:o<768?s=5:s=6,o<8?u=new Classic(a):a.isEven()?u=new Barrett(a):u=new Montgomery(a);var c=[],d=3,f=s-1,p=(1<<s)-1;if(c[1]=u.convert(this),s>1){var v=nbi();for(u.sqrTo(c[1],v);d<=p;)c[d]=nbi(),u.mulTo(v,c[d-2],c[d]),d+=2}var g=r.t-1,y,_=!0,S=nbi(),b;for(o=nbits(r[g])-1;g>=0;){for(o>=f?y=r[g]>>o-f&p:(y=(r[g]&(1<<o+1)-1)<<f-o,g>0&&(y|=r[g-1]>>this.DB+o-f)),d=s;!(y&1);)y>>=1,--d;if((o-=d)<0&&(o+=this.DB,--g),_)c[y].copyTo(l),_=!1;else{for(;d>1;)u.sqrTo(l,S),u.sqrTo(S,l),d-=2;d>0?u.sqrTo(l,S):(b=l,l=S,S=b),u.mulTo(S,c[y],l)}for(;g>=0&&!(r[g]&1<<o);)u.sqrTo(l,S),b=l,l=S,S=b,--o<0&&(o=this.DB-1,--g)}return u.revert(l)},n.prototype.modInverse=function(r){var a=r.isEven();if(this.isEven()&&a||r.signum()==0)return n.ZERO;for(var o=r.clone(),s=this.clone(),l=nbv(1),u=nbv(0),c=nbv(0),d=nbv(1);o.signum()!=0;){for(;o.isEven();)o.rShiftTo(1,o),a?((!l.isEven()||!u.isEven())&&(l.addTo(this,l),u.subTo(r,u)),l.rShiftTo(1,l)):u.isEven()||u.subTo(r,u),u.rShiftTo(1,u);for(;s.isEven();)s.rShiftTo(1,s),a?((!c.isEven()||!d.isEven())&&(c.addTo(this,c),d.subTo(r,d)),c.rShiftTo(1,c)):d.isEven()||d.subTo(r,d),d.rShiftTo(1,d);o.compareTo(s)>=0?(o.subTo(s,o),a&&l.subTo(c,l),u.subTo(d,u)):(s.subTo(o,s),a&&c.subTo(l,c),d.subTo(u,d))}if(s.compareTo(n.ONE)!=0)return n.ZERO;if(d.compareTo(r)>=0)return d.subtract(r);if(d.signum()<0)d.addTo(r,d);else return d;return d.signum()<0?d.add(r):d},n.prototype.pow=function(r){return this.exp(r,new NullExp)},n.prototype.gcd=function(r){var a=this.s<0?this.negate():this.clone(),o=r.s<0?r.negate():r.clone();if(a.compareTo(o)<0){var s=a;a=o,o=s}var l=a.getLowestSetBit(),u=o.getLowestSetBit();if(u<0)return a;for(l<u&&(u=l),u>0&&(a.rShiftTo(u,a),o.rShiftTo(u,o));a.signum()>0;)(l=a.getLowestSetBit())>0&&a.rShiftTo(l,a),(l=o.getLowestSetBit())>0&&o.rShiftTo(l,o),a.compareTo(o)>=0?(a.subTo(o,a),a.rShiftTo(1,a)):(o.subTo(a,o),o.rShiftTo(1,o));return u>0&&o.lShiftTo(u,o),o},n.prototype.isProbablePrime=function(r){var a,o=this.abs();if(o.t==1&&o[0]<=lowprimes[lowprimes.length-1]){for(a=0;a<lowprimes.length;++a)if(o[0]==lowprimes[a])return!0;return!1}if(o.isEven())return!1;for(a=1;a<lowprimes.length;){for(var s=lowprimes[a],l=a+1;l<lowprimes.length&&s<lplim;)s*=lowprimes[l++];for(s=o.modInt(s);a<l;)if(s%lowprimes[a++]==0)return!1}return o.millerRabin(r)},n.prototype.copyTo=function(r){for(var a=this.t-1;a>=0;--a)r[a]=this[a];r.t=this.t,r.s=this.s},n.prototype.fromInt=function(r){this.t=1,this.s=r<0?-1:0,r>0?this[0]=r:r<-1?this[0]=r+this.DV:this.t=0},n.prototype.fromString=function(r,a){var o;if(a==16)o=4;else if(a==8)o=3;else if(a==256)o=8;else if(a==2)o=1;else if(a==32)o=5;else if(a==4)o=2;else{this.fromRadix(r,a);return}this.t=0,this.s=0;for(var s=r.length,l=!1,u=0;--s>=0;){var c=o==8?+r[s]&255:intAt(r,s);if(c<0){r.charAt(s)=="-"&&(l=!0);continue}l=!1,u==0?this[this.t++]=c:u+o>this.DB?(this[this.t-1]|=(c&(1<<this.DB-u)-1)<<u,this[this.t++]=c>>this.DB-u):this[this.t-1]|=c<<u,u+=o,u>=this.DB&&(u-=this.DB)}o==8&&+r[0]&128&&(this.s=-1,u>0&&(this[this.t-1]|=(1<<this.DB-u)-1<<u)),this.clamp(),l&&n.ZERO.subTo(this,this)},n.prototype.clamp=function(){for(var r=this.s&this.DM;this.t>0&&this[this.t-1]==r;)--this.t},n.prototype.dlShiftTo=function(r,a){var o;for(o=this.t-1;o>=0;--o)a[o+r]=this[o];for(o=r-1;o>=0;--o)a[o]=0;a.t=this.t+r,a.s=this.s},n.prototype.drShiftTo=function(r,a){for(var o=r;o<this.t;++o)a[o-r]=this[o];a.t=Math.max(this.t-r,0),a.s=this.s},n.prototype.lShiftTo=function(r,a){for(var o=r%this.DB,s=this.DB-o,l=(1<<s)-1,u=Math.floor(r/this.DB),c=this.s<<o&this.DM,d=this.t-1;d>=0;--d)a[d+u+1]=this[d]>>s|c,c=(this[d]&l)<<o;for(var d=u-1;d>=0;--d)a[d]=0;a[u]=c,a.t=this.t+u+1,a.s=this.s,a.clamp()},n.prototype.rShiftTo=function(r,a){a.s=this.s;var o=Math.floor(r/this.DB);if(o>=this.t){a.t=0;return}var s=r%this.DB,l=this.DB-s,u=(1<<s)-1;a[0]=this[o]>>s;for(var c=o+1;c<this.t;++c)a[c-o-1]|=(this[c]&u)<<l,a[c-o]=this[c]>>s;s>0&&(a[this.t-o-1]|=(this.s&u)<<l),a.t=this.t-o,a.clamp()},n.prototype.subTo=function(r,a){for(var o=0,s=0,l=Math.min(r.t,this.t);o<l;)s+=this[o]-r[o],a[o++]=s&this.DM,s>>=this.DB;if(r.t<this.t){for(s-=r.s;o<this.t;)s+=this[o],a[o++]=s&this.DM,s>>=this.DB;s+=this.s}else{for(s+=this.s;o<r.t;)s-=r[o],a[o++]=s&this.DM,s>>=this.DB;s-=r.s}a.s=s<0?-1:0,s<-1?a[o++]=this.DV+s:s>0&&(a[o++]=s),a.t=o,a.clamp()},n.prototype.multiplyTo=function(r,a){var o=this.abs(),s=r.abs(),l=o.t;for(a.t=l+s.t;--l>=0;)a[l]=0;for(l=0;l<s.t;++l)a[l+o.t]=o.am(0,s[l],a,l,0,o.t);a.s=0,a.clamp(),this.s!=r.s&&n.ZERO.subTo(a,a)},n.prototype.squareTo=function(r){for(var a=this.abs(),o=r.t=2*a.t;--o>=0;)r[o]=0;for(o=0;o<a.t-1;++o){var s=a.am(o,a[o],r,2*o,0,1);(r[o+a.t]+=a.am(o+1,2*a[o],r,2*o+1,s,a.t-o-1))>=a.DV&&(r[o+a.t]-=a.DV,r[o+a.t+1]=1)}r.t>0&&(r[r.t-1]+=a.am(o,a[o],r,2*o,0,1)),r.s=0,r.clamp()},n.prototype.divRemTo=function(r,a,o){var s=r.abs();if(!(s.t<=0)){var l=this.abs();if(l.t<s.t){a!=null&&a.fromInt(0),o!=null&&this.copyTo(o);return}o==null&&(o=nbi());var u=nbi(),c=this.s,d=r.s,f=this.DB-nbits(s[s.t-1]);f>0?(s.lShiftTo(f,u),l.lShiftTo(f,o)):(s.copyTo(u),l.copyTo(o));var p=u.t,v=u[p-1];if(v!=0){var g=v*(1<<this.F1)+(p>1?u[p-2]>>this.F2:0),y=this.FV/g,_=(1<<this.F1)/g,S=1<<this.F2,b=o.t,x=b-p,A=a==null?nbi():a;for(u.dlShiftTo(x,A),o.compareTo(A)>=0&&(o[o.t++]=1,o.subTo(A,o)),n.ONE.dlShiftTo(p,A),A.subTo(u,u);u.t<p;)u[u.t++]=0;for(;--x>=0;){var w=o[--b]==v?this.DM:Math.floor(o[b]*y+(o[b-1]+S)*_);if((o[b]+=u.am(0,w,o,x,0,p))<w)for(u.dlShiftTo(x,A),o.subTo(A,o);o[b]<--w;)o.subTo(A,o)}a!=null&&(o.drShiftTo(p,a),c!=d&&n.ZERO.subTo(a,a)),o.t=p,o.clamp(),f>0&&o.rShiftTo(f,o),c<0&&n.ZERO.subTo(o,o)}}},n.prototype.invDigit=function(){if(this.t<1)return 0;var r=this[0];if(!(r&1))return 0;var a=r&3;return a=a*(2-(r&15)*a)&15,a=a*(2-(r&255)*a)&255,a=a*(2-((r&65535)*a&65535))&65535,a=a*(2-r*a%this.DV)%this.DV,a>0?this.DV-a:-a},n.prototype.isEven=function(){return(this.t>0?this[0]&1:this.s)==0},n.prototype.exp=function(r,a){if(r>4294967295||r<1)return n.ONE;var o=nbi(),s=nbi(),l=a.convert(this),u=nbits(r)-1;for(l.copyTo(o);--u>=0;)if(a.sqrTo(o,s),(r&1<<u)>0)a.mulTo(s,l,o);else{var c=o;o=s,s=c}return a.revert(o)},n.prototype.chunkSize=function(r){return Math.floor(Math.LN2*this.DB/Math.log(r))},n.prototype.toRadix=function(r){if(r==null&&(r=10),this.signum()==0||r<2||r>36)return"0";var a=this.chunkSize(r),o=Math.pow(r,a),s=nbv(o),l=nbi(),u=nbi(),c="";for(this.divRemTo(s,l,u);l.signum()>0;)c=(o+u.intValue()).toString(r).substring(1)+c,l.divRemTo(s,l,u);return u.intValue().toString(r)+c},n.prototype.fromRadix=function(r,a){this.fromInt(0),a==null&&(a=10);for(var o=this.chunkSize(a),s=Math.pow(a,o),l=!1,u=0,c=0,d=0;d<r.length;++d){var f=intAt(r,d);if(f<0){r.charAt(d)=="-"&&this.signum()==0&&(l=!0);continue}c=a*c+f,++u>=o&&(this.dMultiply(s),this.dAddOffset(c,0),u=0,c=0)}u>0&&(this.dMultiply(Math.pow(a,u)),this.dAddOffset(c,0)),l&&n.ZERO.subTo(this,this)},n.prototype.fromNumber=function(r,a,o){if(typeof a=="number")if(r<2)this.fromInt(1);else for(this.fromNumber(r,o),this.testBit(r-1)||this.bitwiseTo(n.ONE.shiftLeft(r-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(a);)this.dAddOffset(2,0),this.bitLength()>r&&this.subTo(n.ONE.shiftLeft(r-1),this);else{var s=[],l=r&7;s.length=(r>>3)+1,a.nextBytes(s),l>0?s[0]&=(1<<l)-1:s[0]=0,this.fromString(s,256)}},n.prototype.bitwiseTo=function(r,a,o){var s,l,u=Math.min(r.t,this.t);for(s=0;s<u;++s)o[s]=a(this[s],r[s]);if(r.t<this.t){for(l=r.s&this.DM,s=u;s<this.t;++s)o[s]=a(this[s],l);o.t=this.t}else{for(l=this.s&this.DM,s=u;s<r.t;++s)o[s]=a(l,r[s]);o.t=r.t}o.s=a(this.s,r.s),o.clamp()},n.prototype.changeBit=function(r,a){var o=n.ONE.shiftLeft(r);return this.bitwiseTo(o,a,o),o},n.prototype.addTo=function(r,a){for(var o=0,s=0,l=Math.min(r.t,this.t);o<l;)s+=this[o]+r[o],a[o++]=s&this.DM,s>>=this.DB;if(r.t<this.t){for(s+=r.s;o<this.t;)s+=this[o],a[o++]=s&this.DM,s>>=this.DB;s+=this.s}else{for(s+=this.s;o<r.t;)s+=r[o],a[o++]=s&this.DM,s>>=this.DB;s+=r.s}a.s=s<0?-1:0,s>0?a[o++]=s:s<-1&&(a[o++]=this.DV+s),a.t=o,a.clamp()},n.prototype.dMultiply=function(r){this[this.t]=this.am(0,r-1,this,0,0,this.t),++this.t,this.clamp()},n.prototype.dAddOffset=function(r,a){if(r!=0){for(;this.t<=a;)this[this.t++]=0;for(this[a]+=r;this[a]>=this.DV;)this[a]-=this.DV,++a>=this.t&&(this[this.t++]=0),++this[a]}},n.prototype.multiplyLowerTo=function(r,a,o){var s=Math.min(this.t+r.t,a);for(o.s=0,o.t=s;s>0;)o[--s]=0;for(var l=o.t-this.t;s<l;++s)o[s+this.t]=this.am(0,r[s],o,s,0,this.t);for(var l=Math.min(r.t,a);s<l;++s)this.am(0,r[s],o,s,0,a-s);o.clamp()},n.prototype.multiplyUpperTo=function(r,a,o){--a;var s=o.t=this.t+r.t-a;for(o.s=0;--s>=0;)o[s]=0;for(s=Math.max(a-this.t,0);s<r.t;++s)o[this.t+s-a]=this.am(a-s,r[s],o,0,0,this.t+s-a);o.clamp(),o.drShiftTo(1,o)},n.prototype.modInt=function(r){if(r<=0)return 0;var a=this.DV%r,o=this.s<0?r-1:0;if(this.t>0)if(a==0)o=this[0]%r;else for(var s=this.t-1;s>=0;--s)o=(a*o+this[s])%r;return o},n.prototype.millerRabin=function(r){var a=this.subtract(n.ONE),o=a.getLowestSetBit();if(o<=0)return!1;var s=a.shiftRight(o);r=r+1>>1,r>lowprimes.length&&(r=lowprimes.length);for(var l=nbi(),u=0;u<r;++u){l.fromInt(lowprimes[Math.floor(Math.random()*lowprimes.length)]);var c=l.modPow(s,this);if(c.compareTo(n.ONE)!=0&&c.compareTo(a)!=0){for(var d=1;d++<o&&c.compareTo(a)!=0;)if(c=c.modPowInt(2,this),c.compareTo(n.ONE)==0)return!1;if(c.compareTo(a)!=0)return!1}}return!0},n.prototype.square=function(){var r=nbi();return this.squareTo(r),r},n.prototype.gcda=function(r,a){var o=this.s<0?this.negate():this.clone(),s=r.s<0?r.negate():r.clone();if(o.compareTo(s)<0){var l=o;o=s,s=l}var u=o.getLowestSetBit(),c=s.getLowestSetBit();if(c<0){a(o);return}u<c&&(c=u),c>0&&(o.rShiftTo(c,o),s.rShiftTo(c,s));var d=function(){(u=o.getLowestSetBit())>0&&o.rShiftTo(u,o),(u=s.getLowestSetBit())>0&&s.rShiftTo(u,s),o.compareTo(s)>=0?(o.subTo(s,o),o.rShiftTo(1,o)):(s.subTo(o,s),s.rShiftTo(1,s)),o.signum()>0?setTimeout(d,0):(c>0&&s.lShiftTo(c,s),setTimeout(function(){a(s)},0))};setTimeout(d,10)},n.prototype.fromNumberAsync=function(r,a,o,s){if(typeof a=="number")if(r<2)this.fromInt(1);else{this.fromNumber(r,o),this.testBit(r-1)||this.bitwiseTo(n.ONE.shiftLeft(r-1),op_or,this),this.isEven()&&this.dAddOffset(1,0);var l=this,u=function(){l.dAddOffset(2,0),l.bitLength()>r&&l.subTo(n.ONE.shiftLeft(r-1),l),l.isProbablePrime(a)?setTimeout(function(){s()},0):setTimeout(u,0)};setTimeout(u,0)}else{var c=[],d=r&7;c.length=(r>>3)+1,a.nextBytes(c),d>0?c[0]&=(1<<d)-1:c[0]=0,this.fromString(c,256)}},n}(),NullExp=function(){function n(){}return n.prototype.convert=function(r){return r},n.prototype.revert=function(r){return r},n.prototype.mulTo=function(r,a,o){r.multiplyTo(a,o)},n.prototype.sqrTo=function(r,a){r.squareTo(a)},n}(),Classic=function(){function n(r){this.m=r}return n.prototype.convert=function(r){return r.s<0||r.compareTo(this.m)>=0?r.mod(this.m):r},n.prototype.revert=function(r){return r},n.prototype.reduce=function(r){r.divRemTo(this.m,null,r)},n.prototype.mulTo=function(r,a,o){r.multiplyTo(a,o),this.reduce(o)},n.prototype.sqrTo=function(r,a){r.squareTo(a),this.reduce(a)},n}(),Montgomery=function(){function n(r){this.m=r,this.mp=r.invDigit(),this.mpl=this.mp&32767,this.mph=this.mp>>15,this.um=(1<<r.DB-15)-1,this.mt2=2*r.t}return n.prototype.convert=function(r){var a=nbi();return r.abs().dlShiftTo(this.m.t,a),a.divRemTo(this.m,null,a),r.s<0&&a.compareTo(BigInteger.ZERO)>0&&this.m.subTo(a,a),a},n.prototype.revert=function(r){var a=nbi();return r.copyTo(a),this.reduce(a),a},n.prototype.reduce=function(r){for(;r.t<=this.mt2;)r[r.t++]=0;for(var a=0;a<this.m.t;++a){var o=r[a]&32767,s=o*this.mpl+((o*this.mph+(r[a]>>15)*this.mpl&this.um)<<15)&r.DM;for(o=a+this.m.t,r[o]+=this.m.am(0,s,r,a,0,this.m.t);r[o]>=r.DV;)r[o]-=r.DV,r[++o]++}r.clamp(),r.drShiftTo(this.m.t,r),r.compareTo(this.m)>=0&&r.subTo(this.m,r)},n.prototype.mulTo=function(r,a,o){r.multiplyTo(a,o),this.reduce(o)},n.prototype.sqrTo=function(r,a){r.squareTo(a),this.reduce(a)},n}(),Barrett=function(){function n(r){this.m=r,this.r2=nbi(),this.q3=nbi(),BigInteger.ONE.dlShiftTo(2*r.t,this.r2),this.mu=this.r2.divide(r)}return n.prototype.convert=function(r){if(r.s<0||r.t>2*this.m.t)return r.mod(this.m);if(r.compareTo(this.m)<0)return r;var a=nbi();return r.copyTo(a),this.reduce(a),a},n.prototype.revert=function(r){return r},n.prototype.reduce=function(r){for(r.drShiftTo(this.m.t-1,this.r2),r.t>this.m.t+1&&(r.t=this.m.t+1,r.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);r.compareTo(this.r2)<0;)r.dAddOffset(1,this.m.t+1);for(r.subTo(this.r2,r);r.compareTo(this.m)>=0;)r.subTo(this.m,r)},n.prototype.mulTo=function(r,a,o){r.multiplyTo(a,o),this.reduce(o)},n.prototype.sqrTo=function(r,a){r.squareTo(a),this.reduce(a)},n}();function nbi(){return new BigInteger(null)}function parseBigInt(n,r){return new BigInteger(n,r)}var inBrowser=typeof navigator<"u";inBrowser&&j_lm&&navigator.appName=="Microsoft Internet Explorer"?(BigInteger.prototype.am=function(r,a,o,s,l,u){for(var c=a&32767,d=a>>15;--u>=0;){var f=this[r]&32767,p=this[r++]>>15,v=d*f+p*c;f=c*f+((v&32767)<<15)+o[s]+(l&1073741823),l=(f>>>30)+(v>>>15)+d*p+(l>>>30),o[s++]=f&1073741823}return l},dbits=30):inBrowser&&j_lm&&navigator.appName!="Netscape"?(BigInteger.prototype.am=function(r,a,o,s,l,u){for(;--u>=0;){var c=a*this[r++]+o[s]+l;l=Math.floor(c/67108864),o[s++]=c&67108863}return l},dbits=26):(BigInteger.prototype.am=function(r,a,o,s,l,u){for(var c=a&16383,d=a>>14;--u>=0;){var f=this[r]&16383,p=this[r++]>>14,v=d*f+p*c;f=c*f+((v&16383)<<14)+o[s]+l,l=(f>>28)+(v>>14)+d*p,o[s++]=f&268435455}return l},dbits=28);BigInteger.prototype.DB=dbits;BigInteger.prototype.DM=(1<<dbits)-1;BigInteger.prototype.DV=1<<dbits;var BI_FP=52;BigInteger.prototype.FV=Math.pow(2,BI_FP);BigInteger.prototype.F1=BI_FP-dbits;BigInteger.prototype.F2=2*dbits-BI_FP;var BI_RC=[],rr,vv;rr=48;for(vv=0;vv<=9;++vv)BI_RC[rr++]=vv;rr=97;for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;rr=65;for(vv=10;vv<36;++vv)BI_RC[rr++]=vv;function intAt(n,r){var a=BI_RC[n.charCodeAt(r)];return a==null?-1:a}function nbv(n){var r=nbi();return r.fromInt(n),r}function nbits(n){var r=1,a;return(a=n>>>16)!=0&&(n=a,r+=16),(a=n>>8)!=0&&(n=a,r+=8),(a=n>>4)!=0&&(n=a,r+=4),(a=n>>2)!=0&&(n=a,r+=2),(a=n>>1)!=0&&(n=a,r+=1),r}BigInteger.ZERO=nbv(0);BigInteger.ONE=nbv(1);var Arcfour=function(){function n(){this.i=0,this.j=0,this.S=[]}return n.prototype.init=function(r){var a,o,s;for(a=0;a<256;++a)this.S[a]=a;for(o=0,a=0;a<256;++a)o=o+this.S[a]+r[a%r.length]&255,s=this.S[a],this.S[a]=this.S[o],this.S[o]=s;this.i=0,this.j=0},n.prototype.next=function(){var r;return this.i=this.i+1&255,this.j=this.j+this.S[this.i]&255,r=this.S[this.i],this.S[this.i]=this.S[this.j],this.S[this.j]=r,this.S[r+this.S[this.i]&255]},n}();function prng_newstate(){return new Arcfour}var rng_psize=256,rng_state,rng_pool=null,rng_pptr;if(rng_pool==null){rng_pool=[],rng_pptr=0;var t=void 0;if(typeof window<"u"&&self.crypto&&self.crypto.getRandomValues){var z=new Uint32Array(256);for(self.crypto.getRandomValues(z),t=0;t<z.length;++t)rng_pool[rng_pptr++]=z[t]&255}var count$1=0,onMouseMoveListener_1=function(n){if(count$1=count$1||0,count$1>=256||rng_pptr>=rng_psize){self.removeEventListener?self.removeEventListener("mousemove",onMouseMoveListener_1,!1):self.detachEvent&&self.detachEvent("onmousemove",onMouseMoveListener_1);return}try{var r=n.x+n.y;rng_pool[rng_pptr++]=r&255,count$1+=1}catch(a){}};typeof window<"u"&&(self.addEventListener?self.addEventListener("mousemove",onMouseMoveListener_1,!1):self.attachEvent&&self.attachEvent("onmousemove",onMouseMoveListener_1))}function rng_get_byte(){if(rng_state==null){for(rng_state=prng_newstate();rng_pptr<rng_psize;){var n=Math.floor(65536*Math.random());rng_pool[rng_pptr++]=n&255}for(rng_state.init(rng_pool),rng_pptr=0;rng_pptr<rng_pool.length;++rng_pptr)rng_pool[rng_pptr]=0;rng_pptr=0}return rng_state.next()}var SecureRandom=function(){function n(){}return n.prototype.nextBytes=function(r){for(var a=0;a<r.length;++a)r[a]=rng_get_byte()},n}();function rstr_sha256(n){return binb2rstr(binb_sha256(rstr2binb(n),n.length*8))}function rstr2hex(n){for(var r="0123456789abcdef",a="",o=0;o<n.length;o++){var s=n.charCodeAt(o);a+=r.charAt(s>>>4&15)+r.charAt(s&15)}return a}function rstr2binb(n){for(var r=Array(n.length>>2),a=0;a<r.length;a++)r[a]=0;for(var a=0;a<n.length*8;a+=8)r[a>>5]|=(n.charCodeAt(a/8)&255)<<24-a%32;return r}function binb2rstr(n){for(var r="",a=0;a<n.length*32;a+=8)r+=String.fromCharCode(n[a>>5]>>>24-a%32&255);return r}function sha256_S(n,r){return n>>>r|n<<32-r}function sha256_R(n,r){return n>>>r}function sha256_Ch(n,r,a){return n&r^~n&a}function sha256_Maj(n,r,a){return n&r^n&a^r&a}function sha256_Sigma0256(n){return sha256_S(n,2)^sha256_S(n,13)^sha256_S(n,22)}function sha256_Sigma1256(n){return sha256_S(n,6)^sha256_S(n,11)^sha256_S(n,25)}function sha256_Gamma0256(n){return sha256_S(n,7)^sha256_S(n,18)^sha256_R(n,3)}function sha256_Gamma1256(n){return sha256_S(n,17)^sha256_S(n,19)^sha256_R(n,10)}var sha256_K=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function binb_sha256(n,r){var a=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),o=new Array(64),s,l,u,c,d,f,p,v,g,y,_,S;for(n[r>>5]|=128<<24-r%32,n[(r+64>>9<<4)+15]=r,g=0;g<n.length;g+=16){for(s=a[0],l=a[1],u=a[2],c=a[3],d=a[4],f=a[5],p=a[6],v=a[7],y=0;y<64;y++)y<16?o[y]=n[y+g]:o[y]=safe_add(safe_add(safe_add(sha256_Gamma1256(o[y-2]),o[y-7]),sha256_Gamma0256(o[y-15])),o[y-16]),_=safe_add(safe_add(safe_add(safe_add(v,sha256_Sigma1256(d)),sha256_Ch(d,f,p)),sha256_K[y]),o[y]),S=safe_add(sha256_Sigma0256(s),sha256_Maj(s,l,u)),v=p,p=f,f=d,d=safe_add(c,_),c=u,u=l,l=s,s=safe_add(_,S);a[0]=safe_add(s,a[0]),a[1]=safe_add(l,a[1]),a[2]=safe_add(u,a[2]),a[3]=safe_add(c,a[3]),a[4]=safe_add(d,a[4]),a[5]=safe_add(f,a[5]),a[6]=safe_add(p,a[6]),a[7]=safe_add(v,a[7])}return a}function safe_add(n,r){var a=(n&65535)+(r&65535),o=(n>>16)+(r>>16)+(a>>16);return o<<16|a&65535}function pkcs1pad1(n,r){if(r<n.length+22)return null;for(var a=r-n.length-6,o="",s=0;s<a;s+=2)o+="ff";var l="0001"+o+"00"+n;return parseBigInt(l,16)}function pkcs1pad2(n,r){if(r<n.length+11)return null;for(var a=[],o=n.length-1;o>=0&&r>0;){var s=n.charCodeAt(o--);s<128?a[--r]=s:s>127&&s<2048?(a[--r]=s&63|128,a[--r]=s>>6|192):(a[--r]=s&63|128,a[--r]=s>>6&63|128,a[--r]=s>>12|224)}a[--r]=0;for(var l=new SecureRandom,u=[];r>2;){for(u[0]=0;u[0]==0;)l.nextBytes(u);a[--r]=u[0]}return a[--r]=2,a[--r]=0,new BigInteger(a)}function oaep_mgf1_arr(n,r,a){for(var o="",s=0;o.length<r;)o+=a(String.fromCharCode.apply(String,n.concat([(s&4278190080)>>24,(s&16711680)>>16,(s&65280)>>8,s&255]))),s+=1;return o}var SHA256_SIZE=32;function oaep_pad(n,r){var a=SHA256_SIZE,o=rstr_sha256;if(n.length+2*a+2>r)throw"Message too long for RSA";var s="",l;for(l=0;l<r-n.length-2*a-2;l+=1)s+="\0";var u=o("")+s+""+n,c=new Array(a);new SecureRandom().nextBytes(c);var d=oaep_mgf1_arr(c,u.length,o),f=[];for(l=0;l<u.length;l+=1)f[l]=u.charCodeAt(l)^d.charCodeAt(l);var p=oaep_mgf1_arr(f,c.length,o),v=[0];for(l=0;l<c.length;l+=1)v[l+1]=c[l]^p.charCodeAt(l);return new BigInteger(v.concat(f))}var RSAKey=function(){function n(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null}return n.prototype.doPublic=function(r){return r.modPowInt(this.e,this.n)},n.prototype.doPrivate=function(r){if(this.p==null||this.q==null)return r.modPow(this.d,this.n);for(var a=r.mod(this.p).modPow(this.dmp1,this.p),o=r.mod(this.q).modPow(this.dmq1,this.q);a.compareTo(o)<0;)a=a.add(this.p);return a.subtract(o).multiply(this.coeff).mod(this.p).multiply(this.q).add(o)},n.prototype.setPublic=function(r,a){r!=null&&a!=null&&r.length>0&&a.length>0&&(this.n=parseBigInt(r,16),this.e=parseInt(a,16))},n.prototype.encrypt=function(r,a){typeof a>"u"&&(a=pkcs1pad2);var o=this.n.bitLength()+7>>3,s=a(r,o);if(s==null)return null;var l=this.doPublic(s);if(l==null)return null;for(var u=l.toString(16),c=u.length,d=0;d<o*2-c;d++)u="0"+u;return u},n.prototype.setPrivate=function(r,a,o){r!=null&&a!=null&&r.length>0&&a.length>0&&(this.n=parseBigInt(r,16),this.e=parseInt(a,16),this.d=parseBigInt(o,16))},n.prototype.setPrivateEx=function(r,a,o,s,l,u,c,d){r!=null&&a!=null&&r.length>0&&a.length>0&&(this.n=parseBigInt(r,16),this.e=parseInt(a,16),this.d=parseBigInt(o,16),this.p=parseBigInt(s,16),this.q=parseBigInt(l,16),this.dmp1=parseBigInt(u,16),this.dmq1=parseBigInt(c,16),this.coeff=parseBigInt(d,16))},n.prototype.generate=function(r,a){var o=new SecureRandom,s=r>>1;this.e=parseInt(a,16);for(var l=new BigInteger(a,16);;){for(;this.p=new BigInteger(r-s,1,o),!(this.p.subtract(BigInteger.ONE).gcd(l).compareTo(BigInteger.ONE)==0&&this.p.isProbablePrime(10)););for(;this.q=new BigInteger(s,1,o),!(this.q.subtract(BigInteger.ONE).gcd(l).compareTo(BigInteger.ONE)==0&&this.q.isProbablePrime(10)););if(this.p.compareTo(this.q)<=0){var u=this.p;this.p=this.q,this.q=u}var c=this.p.subtract(BigInteger.ONE),d=this.q.subtract(BigInteger.ONE),f=c.multiply(d);if(f.gcd(l).compareTo(BigInteger.ONE)==0){this.n=this.p.multiply(this.q),this.d=l.modInverse(f),this.dmp1=this.d.mod(c),this.dmq1=this.d.mod(d),this.coeff=this.q.modInverse(this.p);break}}},n.prototype.decrypt=function(r){var a=parseBigInt(r,16),o=this.doPrivate(a);return o==null?null:pkcs1unpad2(o,this.n.bitLength()+7>>3)},n.prototype.generateAsync=function(r,a,o){var s=new SecureRandom,l=r>>1;this.e=parseInt(a,16);var u=new BigInteger(a,16),c=this,d=function(){var f=function(){if(c.p.compareTo(c.q)<=0){var g=c.p;c.p=c.q,c.q=g}var y=c.p.subtract(BigInteger.ONE),_=c.q.subtract(BigInteger.ONE),S=y.multiply(_);S.gcd(u).compareTo(BigInteger.ONE)==0?(c.n=c.p.multiply(c.q),c.d=u.modInverse(S),c.dmp1=c.d.mod(y),c.dmq1=c.d.mod(_),c.coeff=c.q.modInverse(c.p),setTimeout(function(){o()},0)):setTimeout(d,0)},p=function(){c.q=nbi(),c.q.fromNumberAsync(l,1,s,function(){c.q.subtract(BigInteger.ONE).gcda(u,function(g){g.compareTo(BigInteger.ONE)==0&&c.q.isProbablePrime(10)?setTimeout(f,0):setTimeout(p,0)})})},v=function(){c.p=nbi(),c.p.fromNumberAsync(r-l,1,s,function(){c.p.subtract(BigInteger.ONE).gcda(u,function(g){g.compareTo(BigInteger.ONE)==0&&c.p.isProbablePrime(10)?setTimeout(p,0):setTimeout(v,0)})})};setTimeout(v,0)};setTimeout(d,0)},n.prototype.sign=function(r,a,o){var s=getDigestHeader(o),l=s+a(r).toString(),u=this.n.bitLength()/4,c=pkcs1pad1(l,u);if(c==null)return null;var d=this.doPrivate(c);if(d==null)return null;for(var f=d.toString(16),p=f.length,v=0;v<u-p;v++)f="0"+f;return f},n.prototype.verify=function(r,a,o){var s=parseBigInt(a,16),l=this.doPublic(s);if(l==null)return null;var u=l.toString(16).replace(/^1f+00/,""),c=removeDigestHeader(u);return c==o(r).toString()},n}();function pkcs1unpad2(n,r){for(var a=n.toByteArray(),o=0;o<a.length&&a[o]==0;)++o;if(a.length-o!=r-1||a[o]!=2)return null;for(++o;a[o]!=0;)if(++o>=a.length)return null;for(var s="";++o<a.length;){var l=a[o]&255;l<128?s+=String.fromCharCode(l):l>191&&l<224?(s+=String.fromCharCode((l&31)<<6|a[o+1]&63),++o):(s+=String.fromCharCode((l&15)<<12|(a[o+1]&63)<<6|a[o+2]&63),o+=2)}return s}var DIGEST_HEADERS={md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",ripemd160:"3021300906052b2403020105000414"};function getDigestHeader(n){return DIGEST_HEADERS[n]||""}function removeDigestHeader(n){for(var r in DIGEST_HEADERS)if(DIGEST_HEADERS.hasOwnProperty(r)){var a=DIGEST_HEADERS[r],o=a.length;if(n.substring(0,o)==a)return n.substring(o)}return n}function extendClass(n,r,a){if(!r||!n)throw new Error("extend failed, please check that all dependencies are included.");var o=function(){};o.prototype=r.prototype,n.prototype=new o,n.prototype.constructor=n,n.superclass=r.prototype,r.prototype.constructor==Object.prototype.constructor&&(r.prototype.constructor=r)}var KJUR={};(typeof KJUR.asn1>"u"||!KJUR.asn1)&&(KJUR.asn1={});KJUR.asn1.ASN1Util=new function(){this.integerToByteHex=function(n){var r=n.toString(16);return r.length%2==1&&(r="0"+r),r},this.bigIntToMinTwosComplementsHex=function(n){var r=n.toString(16);if(r.substring(0,1)!="-")r.length%2==1?r="0"+r:r.match(/^[0-7]/)||(r="00"+r);else{var a=r.substring(1),o=a.length;o%2==1?o+=1:r.match(/^[0-7]/)||(o+=2);for(var s="",l=0;l<o;l++)s+="f";var u=new BigInteger(s,16),c=u.xor(n).add(BigInteger.ONE);r=c.toString(16).replace(/^-/,"")}return r},this.getPEMStringFromHex=function(n,r){return hextopem(n,r)},this.newObject=function(n){var r=KJUR,a=r.asn1,o=a.DERBoolean,s=a.DERInteger,l=a.DERBitString,u=a.DEROctetString,c=a.DERNull,d=a.DERObjectIdentifier,f=a.DEREnumerated,p=a.DERUTF8String,v=a.DERNumericString,g=a.DERPrintableString,y=a.DERTeletexString,_=a.DERIA5String,S=a.DERUTCTime,b=a.DERGeneralizedTime,x=a.DERSequence,A=a.DERSet,w=a.DERTaggedObject,E=a.ASN1Util.newObject,D=Object.keys(n);if(D.length!=1)throw"key of param shall be only one.";var C=D[0];if(":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":"+C+":")==-1)throw"undefined key: "+C;if(C=="bool")return new o(n[C]);if(C=="int")return new s(n[C]);if(C=="bitstr")return new l(n[C]);if(C=="octstr")return new u(n[C]);if(C=="null")return new c(n[C]);if(C=="oid")return new d(n[C]);if(C=="enum")return new f(n[C]);if(C=="utf8str")return new p(n[C]);if(C=="numstr")return new v(n[C]);if(C=="prnstr")return new g(n[C]);if(C=="telstr")return new y(n[C]);if(C=="ia5str")return new _(n[C]);if(C=="utctime")return new S(n[C]);if(C=="gentime")return new b(n[C]);if(C=="seq"){for(var $=n[C],P=[],M=0;M<$.length;M++){var I=E($[M]);P.push(I)}return new x({array:P})}if(C=="set"){for(var $=n[C],P=[],M=0;M<$.length;M++){var I=E($[M]);P.push(I)}return new A({array:P})}if(C=="tag"){var L=n[C];if(Object.prototype.toString.call(L)==="[object Array]"&&L.length==3){var O=E(L[2]);return new w({tag:L[0],explicit:L[1],obj:O})}else{var R={};if(L.explicit!==void 0&&(R.explicit=L.explicit),L.tag!==void 0&&(R.tag=L.tag),L.obj===void 0)throw"obj shall be specified for 'tag'.";return R.obj=E(L.obj),new w(R)}}},this.jsonToASN1HEX=function(n){var r=this.newObject(n);return r.getEncodedHex()}};KJUR.asn1.ASN1Util.oidHexToInt=function(n){for(var s="",r=parseInt(n.substring(0,2),16),a=Math.floor(r/40),o=r%40,s=a+"."+o,l="",u=2;u<n.length;u+=2){var c=parseInt(n.substring(u,u+2),16),d=("00000000"+c.toString(2)).slice(-8);if(l=l+d.substring(1,8),d.substring(0,1)=="0"){var f=new BigInteger(l,2);s=s+"."+f.toString(10),l=""}}return s};KJUR.asn1.ASN1Util.oidIntToHex=function(n){var r=function(c){var d=c.toString(16);return d.length==1&&(d="0"+d),d},a=function(c){var d="",f=new BigInteger(c,10),p=f.toString(2),v=7-p.length%7;v==7&&(v=0);for(var g="",y=0;y<v;y++)g+="0";p=g+p;for(var y=0;y<p.length-1;y+=7){var _=p.substring(y,y+7);y!=p.length-7&&(_="1"+_),d+=r(parseInt(_,2))}return d};if(!n.match(/^[0-9.]+$/))throw"malformed oid string: "+n;var o="",s=n.split("."),l=parseInt(s[0])*40+parseInt(s[1]);o+=r(l),s.splice(0,2);for(var u=0;u<s.length;u++)o+=a(s[u]);return o};KJUR.asn1.ASN1Object=function(){var n="";this.getLengthHexFromValue=function(){if(typeof this.hV>"u"||this.hV==null)throw"this.hV is null or undefined.";if(this.hV.length%2==1)throw"value hex must be even length: n="+n.length+",v="+this.hV;var r=this.hV.length/2,a=r.toString(16);if(a.length%2==1&&(a="0"+a),r<128)return a;var o=a.length/2;if(o>15)throw"ASN.1 length too long to represent by 8x: n = "+r.toString(16);var s=128+o;return s.toString(16)+a},this.getEncodedHex=function(){return(this.hTLV==null||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""}};KJUR.asn1.DERAbstractString=function(n){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(r){this.hTLV=null,this.isModified=!0,this.s=r,this.hV=stohex(this.s)},this.setStringHex=function(r){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=r},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n=="string"?this.setString(n):typeof n.str<"u"?this.setString(n.str):typeof n.hex<"u"&&this.setStringHex(n.hex))};extendClass(KJUR.asn1.DERAbstractString,KJUR.asn1.ASN1Object);KJUR.asn1.DERAbstractTime=function(n){KJUR.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(r){utc=r.getTime()+r.getTimezoneOffset()*6e4;var a=new Date(utc);return a},this.formatDate=function(r,a,o){var s=this.zeroPadding,l=this.localDateToUTC(r),u=String(l.getFullYear());a=="utc"&&(u=u.substring(2,4));var c=s(String(l.getMonth()+1),2),d=s(String(l.getDate()),2),f=s(String(l.getHours()),2),p=s(String(l.getMinutes()),2),v=s(String(l.getSeconds()),2),g=u+c+d+f+p+v;if(o===!0){var y=l.getMilliseconds();if(y!=0){var _=s(String(y),3);_=_.replace(/[0]+$/,""),g=g+"."+_}}return g+"Z"},this.zeroPadding=function(r,a){return r.length>=a?r:new Array(a-r.length+1).join("0")+r},this.getString=function(){return this.s},this.setString=function(r){this.hTLV=null,this.isModified=!0,this.s=r,this.hV=stohex(r)},this.setByDateValue=function(r,a,o,s,l,u){var c=new Date(Date.UTC(r,a-1,o,s,l,u,0));this.setByDate(c)},this.getFreshValueHex=function(){return this.hV}};extendClass(KJUR.asn1.DERAbstractTime,KJUR.asn1.ASN1Object);KJUR.asn1.DERAbstractStructured=function(n){KJUR.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array=r},this.appendASN1Object=function(r){this.hTLV=null,this.isModified=!0,this.asn1Array.push(r)},this.asn1Array=new Array,typeof n<"u"&&typeof n.array<"u"&&(this.asn1Array=n.array)};extendClass(KJUR.asn1.DERAbstractStructured,KJUR.asn1.ASN1Object);KJUR.asn1.DERBoolean=function(){KJUR.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV="0101ff"};extendClass(KJUR.asn1.DERBoolean,KJUR.asn1.ASN1Object);KJUR.asn1.DERInteger=function(n){KJUR.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(r){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(r)},this.setByInteger=function(r){var a=new BigInteger(String(r),10);this.setByBigInteger(a)},this.setValueHex=function(r){this.hV=r},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n.bigint<"u"?this.setByBigInteger(n.bigint):typeof n.int<"u"?this.setByInteger(n.int):typeof n=="number"?this.setByInteger(n):typeof n.hex<"u"&&this.setValueHex(n.hex))};extendClass(KJUR.asn1.DERInteger,KJUR.asn1.ASN1Object);KJUR.asn1.DERBitString=function(n){if(n!==void 0&&typeof n.obj<"u"){var r=KJUR.asn1.ASN1Util.newObject(n.obj);n.hex="00"+r.getEncodedHex()}KJUR.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(a){this.hTLV=null,this.isModified=!0,this.hV=a},this.setUnusedBitsAndHexValue=function(a,o){if(a<0||7<a)throw"unused bits shall be from 0 to 7: u = "+a;var s="0"+a;this.hTLV=null,this.isModified=!0,this.hV=s+o},this.setByBinaryString=function(a){a=a.replace(/0+$/,"");var o=8-a.length%8;o==8&&(o=0);for(var s=0;s<=o;s++)a+="0";for(var l="",s=0;s<a.length-1;s+=8){var u=a.substring(s,s+8),c=parseInt(u,2).toString(16);c.length==1&&(c="0"+c),l+=c}this.hTLV=null,this.isModified=!0,this.hV="0"+o+l},this.setByBooleanArray=function(a){for(var o="",s=0;s<a.length;s++)a[s]==!0?o+="1":o+="0";this.setByBinaryString(o)},this.newFalseArray=function(a){for(var o=new Array(a),s=0;s<a;s++)o[s]=!1;return o},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n=="string"&&n.toLowerCase().match(/^[0-9a-f]+$/)?this.setHexValueIncludingUnusedBits(n):typeof n.hex<"u"?this.setHexValueIncludingUnusedBits(n.hex):typeof n.bin<"u"?this.setByBinaryString(n.bin):typeof n.array<"u"&&this.setByBooleanArray(n.array))};extendClass(KJUR.asn1.DERBitString,KJUR.asn1.ASN1Object);KJUR.asn1.DEROctetString=function(n){if(n!==void 0&&typeof n.obj<"u"){var r=KJUR.asn1.ASN1Util.newObject(n.obj);n.hex=r.getEncodedHex()}KJUR.asn1.DEROctetString.superclass.constructor.call(this,n),this.hT="04"};extendClass(KJUR.asn1.DEROctetString,KJUR.asn1.DERAbstractString);KJUR.asn1.DERNull=function(){KJUR.asn1.DERNull.superclass.constructor.call(this),this.hT="05",this.hTLV="0500"};extendClass(KJUR.asn1.DERNull,KJUR.asn1.ASN1Object);KJUR.asn1.DERObjectIdentifier=function(n){var r=function(o){var s=o.toString(16);return s.length==1&&(s="0"+s),s},a=function(o){var s="",l=new BigInteger(o,10),u=l.toString(2),c=7-u.length%7;c==7&&(c=0);for(var d="",f=0;f<c;f++)d+="0";u=d+u;for(var f=0;f<u.length-1;f+=7){var p=u.substring(f,f+7);f!=u.length-7&&(p="1"+p),s+=r(parseInt(p,2))}return s};KJUR.asn1.DERObjectIdentifier.superclass.constructor.call(this),this.hT="06",this.setValueHex=function(o){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=o},this.setValueOidString=function(o){if(!o.match(/^[0-9.]+$/))throw"malformed oid string: "+o;var s="",l=o.split("."),u=parseInt(l[0])*40+parseInt(l[1]);s+=r(u),l.splice(0,2);for(var c=0;c<l.length;c++)s+=a(l[c]);this.hTLV=null,this.isModified=!0,this.s=null,this.hV=s},this.setValueName=function(o){var s=KJUR.asn1.x509.OID.name2oid(o);if(s!=="")this.setValueOidString(s);else throw"DERObjectIdentifier oidName undefined: "+o},this.getFreshValueHex=function(){return this.hV},n!==void 0&&(typeof n=="string"?n.match(/^[0-2].[0-9.]+$/)?this.setValueOidString(n):this.setValueName(n):n.oid!==void 0?this.setValueOidString(n.oid):n.hex!==void 0?this.setValueHex(n.hex):n.name!==void 0&&this.setValueName(n.name))};extendClass(KJUR.asn1.DERObjectIdentifier,KJUR.asn1.ASN1Object);KJUR.asn1.DEREnumerated=function(n){KJUR.asn1.DEREnumerated.superclass.constructor.call(this),this.hT="0a",this.setByBigInteger=function(r){this.hTLV=null,this.isModified=!0,this.hV=KJUR.asn1.ASN1Util.bigIntToMinTwosComplementsHex(r)},this.setByInteger=function(r){var a=new BigInteger(String(r),10);this.setByBigInteger(a)},this.setValueHex=function(r){this.hV=r},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n.int<"u"?this.setByInteger(n.int):typeof n=="number"?this.setByInteger(n):typeof n.hex<"u"&&this.setValueHex(n.hex))};extendClass(KJUR.asn1.DEREnumerated,KJUR.asn1.ASN1Object);KJUR.asn1.DERUTF8String=function(n){KJUR.asn1.DERUTF8String.superclass.constructor.call(this,n),this.hT="0c"};extendClass(KJUR.asn1.DERUTF8String,KJUR.asn1.DERAbstractString);KJUR.asn1.DERNumericString=function(n){KJUR.asn1.DERNumericString.superclass.constructor.call(this,n),this.hT="12"};extendClass(KJUR.asn1.DERNumericString,KJUR.asn1.DERAbstractString);KJUR.asn1.DERPrintableString=function(n){KJUR.asn1.DERPrintableString.superclass.constructor.call(this,n),this.hT="13"};extendClass(KJUR.asn1.DERPrintableString,KJUR.asn1.DERAbstractString);KJUR.asn1.DERTeletexString=function(n){KJUR.asn1.DERTeletexString.superclass.constructor.call(this,n),this.hT="14"};extendClass(KJUR.asn1.DERTeletexString,KJUR.asn1.DERAbstractString);KJUR.asn1.DERIA5String=function(n){KJUR.asn1.DERIA5String.superclass.constructor.call(this,n),this.hT="16"};extendClass(KJUR.asn1.DERIA5String,KJUR.asn1.DERAbstractString);KJUR.asn1.DERUTCTime=function(n){KJUR.asn1.DERUTCTime.superclass.constructor.call(this,n),this.hT="17",this.setByDate=function(r){this.hTLV=null,this.isModified=!0,this.date=r,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return typeof this.date>"u"&&typeof this.s>"u"&&(this.date=new Date,this.s=this.formatDate(this.date,"utc"),this.hV=stohex(this.s)),this.hV},n!==void 0&&(n.str!==void 0?this.setString(n.str):typeof n=="string"&&n.match(/^[0-9]{12}Z$/)?this.setString(n):n.hex!==void 0?this.setStringHex(n.hex):n.date!==void 0&&this.setByDate(n.date))};extendClass(KJUR.asn1.DERUTCTime,KJUR.asn1.DERAbstractTime);KJUR.asn1.DERGeneralizedTime=function(n){KJUR.asn1.DERGeneralizedTime.superclass.constructor.call(this,n),this.hT="18",this.withMillis=!1,this.setByDate=function(r){this.hTLV=null,this.isModified=!0,this.date=r,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)},this.getFreshValueHex=function(){return this.date===void 0&&this.s===void 0&&(this.date=new Date,this.s=this.formatDate(this.date,"gen",this.withMillis),this.hV=stohex(this.s)),this.hV},n!==void 0&&(n.str!==void 0?this.setString(n.str):typeof n=="string"&&n.match(/^[0-9]{14}Z$/)?this.setString(n):n.hex!==void 0?this.setStringHex(n.hex):n.date!==void 0&&this.setByDate(n.date),n.millis===!0&&(this.withMillis=!0))};extendClass(KJUR.asn1.DERGeneralizedTime,KJUR.asn1.DERAbstractTime);KJUR.asn1.DERSequence=function(n){KJUR.asn1.DERSequence.superclass.constructor.call(this,n),this.hT="30",this.getFreshValueHex=function(){for(var r="",a=0;a<this.asn1Array.length;a++){var o=this.asn1Array[a];r+=o.getEncodedHex()}return this.hV=r,this.hV}};extendClass(KJUR.asn1.DERSequence,KJUR.asn1.DERAbstractStructured);KJUR.asn1.DERSet=function(n){KJUR.asn1.DERSet.superclass.constructor.call(this,n),this.hT="31",this.sortFlag=!0,this.getFreshValueHex=function(){for(var r=new Array,a=0;a<this.asn1Array.length;a++){var o=this.asn1Array[a];r.push(o.getEncodedHex())}return this.sortFlag==!0&&r.sort(),this.hV=r.join(""),this.hV},typeof n<"u"&&typeof n.sortflag<"u"&&n.sortflag==!1&&(this.sortFlag=!1)};extendClass(KJUR.asn1.DERSet,KJUR.asn1.DERAbstractStructured);KJUR.asn1.DERTaggedObject=function(n){KJUR.asn1.DERTaggedObject.superclass.constructor.call(this),this.hT="a0",this.hV="",this.isExplicit=!0,this.asn1Object=null,this.setASN1Object=function(r,a,o){this.hT=a,this.isExplicit=r,this.asn1Object=o,this.isExplicit?(this.hV=this.asn1Object.getEncodedHex(),this.hTLV=null,this.isModified=!0):(this.hV=null,this.hTLV=o.getEncodedHex(),this.hTLV=this.hTLV.replace(/^../,a),this.isModified=!1)},this.getFreshValueHex=function(){return this.hV},typeof n<"u"&&(typeof n.tag<"u"&&(this.hT=n.tag),typeof n.explicit<"u"&&(this.isExplicit=n.explicit),typeof n.obj<"u"&&(this.asn1Object=n.obj,this.setASN1Object(this.isExplicit,this.hT,this.asn1Object)))};extendClass(KJUR.asn1.DERTaggedObject,KJUR.asn1.ASN1Object);var __extends$1=function(){var n=function(r,a){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,s){o.__proto__=s}||function(o,s){for(var l in s)Object.prototype.hasOwnProperty.call(s,l)&&(o[l]=s[l])},n(r,a)};return function(r,a){if(typeof a!="function"&&a!==null)throw new TypeError("Class extends value "+String(a)+" is not a constructor or null");n(r,a);function o(){this.constructor=r}r.prototype=a===null?Object.create(a):(o.prototype=a.prototype,new o)}}(),JSEncryptRSAKey=function(n){__extends$1(r,n);function r(a){var o=n.call(this)||this;return a&&(typeof a=="string"?o.parseKey(a):(r.hasPrivateKeyProperty(a)||r.hasPublicKeyProperty(a))&&o.parsePropertiesFrom(a)),o}return r.prototype.parseKey=function(a){try{var o=0,s=0,l=/^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/,u=l.test(a)?Hex.decode(a):Base64.unarmor(a),c=ASN1.decode(u);if(c.sub.length===3&&(c=c.sub[2].sub[0]),c.sub.length===9){o=c.sub[1].getHexStringValue(),this.n=parseBigInt(o,16),s=c.sub[2].getHexStringValue(),this.e=parseInt(s,16);var d=c.sub[3].getHexStringValue();this.d=parseBigInt(d,16);var f=c.sub[4].getHexStringValue();this.p=parseBigInt(f,16);var p=c.sub[5].getHexStringValue();this.q=parseBigInt(p,16);var v=c.sub[6].getHexStringValue();this.dmp1=parseBigInt(v,16);var g=c.sub[7].getHexStringValue();this.dmq1=parseBigInt(g,16);var y=c.sub[8].getHexStringValue();this.coeff=parseBigInt(y,16)}else if(c.sub.length===2)if(c.sub[0].sub){var _=c.sub[1],S=_.sub[0];o=S.sub[0].getHexStringValue(),this.n=parseBigInt(o,16),s=S.sub[1].getHexStringValue(),this.e=parseInt(s,16)}else o=c.sub[0].getHexStringValue(),this.n=parseBigInt(o,16),s=c.sub[1].getHexStringValue(),this.e=parseInt(s,16);else return!1;return!0}catch(b){return!1}},r.prototype.getPrivateBaseKey=function(){var a={array:[new KJUR.asn1.DERInteger({int:0}),new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e}),new KJUR.asn1.DERInteger({bigint:this.d}),new KJUR.asn1.DERInteger({bigint:this.p}),new KJUR.asn1.DERInteger({bigint:this.q}),new KJUR.asn1.DERInteger({bigint:this.dmp1}),new KJUR.asn1.DERInteger({bigint:this.dmq1}),new KJUR.asn1.DERInteger({bigint:this.coeff})]},o=new KJUR.asn1.DERSequence(a);return o.getEncodedHex()},r.prototype.getPrivateBaseKeyB64=function(){return hex2b64(this.getPrivateBaseKey())},r.prototype.getPublicBaseKey=function(){var a=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERObjectIdentifier({oid:"1.2.840.113549.1.1.1"}),new KJUR.asn1.DERNull]}),o=new KJUR.asn1.DERSequence({array:[new KJUR.asn1.DERInteger({bigint:this.n}),new KJUR.asn1.DERInteger({int:this.e})]}),s=new KJUR.asn1.DERBitString({hex:"00"+o.getEncodedHex()}),l=new KJUR.asn1.DERSequence({array:[a,s]});return l.getEncodedHex()},r.prototype.getPublicBaseKeyB64=function(){return hex2b64(this.getPublicBaseKey())},r.wordwrap=function(a,o){if(o=o||64,!a)return a;var s="(.{1,"+o+"})( +|$\n?)|(.{1,"+o+"})";return a.match(RegExp(s,"g")).join("\n")},r.prototype.getPrivateKey=function(){var a="-----BEGIN RSA PRIVATE KEY-----\n";return a+=r.wordwrap(this.getPrivateBaseKeyB64())+"\n",a+="-----END RSA PRIVATE KEY-----",a},r.prototype.getPublicKey=function(){var a="-----BEGIN PUBLIC KEY-----\n";return a+=r.wordwrap(this.getPublicBaseKeyB64())+"\n",a+="-----END PUBLIC KEY-----",a},r.hasPublicKeyProperty=function(a){return a=a||{},a.hasOwnProperty("n")&&a.hasOwnProperty("e")},r.hasPrivateKeyProperty=function(a){return a=a||{},a.hasOwnProperty("n")&&a.hasOwnProperty("e")&&a.hasOwnProperty("d")&&a.hasOwnProperty("p")&&a.hasOwnProperty("q")&&a.hasOwnProperty("dmp1")&&a.hasOwnProperty("dmq1")&&a.hasOwnProperty("coeff")},r.prototype.parsePropertiesFrom=function(a){this.n=a.n,this.e=a.e,a.hasOwnProperty("d")&&(this.d=a.d,this.p=a.p,this.q=a.q,this.dmp1=a.dmp1,this.dmq1=a.dmq1,this.coeff=a.coeff)},r}(RSAKey),define_process_env_default={},_a$1,version$4=typeof process<"u"?(_a$1=define_process_env_default)===null||_a$1===void 0?void 0:_a$1.npm_package_version:void 0,JSEncrypt=function(){function n(r){r===void 0&&(r={}),this.default_key_size=r.default_key_size?parseInt(r.default_key_size,10):1024,this.default_public_exponent=r.default_public_exponent||"010001",this.log=r.log||!1,this.key=r.key||null}return n.prototype.setKey=function(r){r?(this.log&&this.key,this.key=new JSEncryptRSAKey(r)):!this.key&&this.log},n.prototype.setPrivateKey=function(r){this.setKey(r)},n.prototype.setPublicKey=function(r){this.setKey(r)},n.prototype.decrypt=function(r){try{return this.getKey().decrypt(b64tohex(r))}catch(a){return!1}},n.prototype.encrypt=function(r){try{return hex2b64(this.getKey().encrypt(r))}catch(a){return!1}},n.prototype.encryptOAEP=function(r){try{return hex2b64(this.getKey().encrypt(r,oaep_pad))}catch(a){return!1}},n.prototype.sign=function(r,a,o){a===void 0&&(a=function(s){return s}),o===void 0&&(o="");try{return hex2b64(this.getKey().sign(r,a,o))}catch(s){return!1}},n.prototype.signSha256=function(r){return this.sign(r,function(a){return rstr2hex(rstr_sha256(a))},"sha256")},n.prototype.verify=function(r,a,o){o===void 0&&(o=function(s){return s});try{return this.getKey().verify(r,b64tohex(a),o)}catch(s){return!1}},n.prototype.verifySha256=function(r,a){return this.verify(r,a,function(o){return rstr2hex(rstr_sha256(o))})},n.prototype.getKey=function(r){if(!this.key){if(this.key=new JSEncryptRSAKey,r&&{}.toString.call(r)==="[object Function]"){this.key.generateAsync(this.default_key_size,this.default_public_exponent,r);return}this.key.generate(this.default_key_size,this.default_public_exponent)}return this.key},n.prototype.getPrivateKey=function(){return this.getKey().getPrivateKey()},n.prototype.getPrivateKeyB64=function(){return this.getKey().getPrivateBaseKeyB64()},n.prototype.getPublicKey=function(){return this.getKey().getPublicKey()},n.prototype.getPublicKeyB64=function(){return this.getKey().getPublicBaseKeyB64()},n.version=version$4,n}();const os="Linux",pid={pro:100000011,ltd:100000032,dev:100000068,coupon:1e8},isDev=!1,isRelease=!1;replace(/\s+/g,"");const getByteUnit=curry$2((n=0,r=!0,a=2,o="")=>{let s=n;const l=1024,u=[" B"," KB"," MB"," GB"," TB"," PB"," EB"];for(let c=0;c<u.length;c++){const d=u[c],f=a===0?Math.round(s):s.toFixed(a),p=c===0?s:f;if(o){if(d.trim()===o.trim())return r?p+d:"".concat(p)}else if(s<l)return r?p+d:"".concat(p);s/=l}return""});curry$2((n,r="rem")=>isNull(n)?String(n):"".concat(n).concat(r));const getPageTotal=n=>{const r=n.match(/class='Pcount'>共([0-9]*)条</);return isArray$2(r)&&length$1(r)>=2?Number(r[1]):0},refreshBrowser=(n=2e3,r=2e3)=>{let a=r;return isNumber$1(n)&&(a=n),new Promise(o=>{const s=window.setTimeout(()=>{isString$1(n)?window.location.href=n:isNumber$1(n)&&window.location.reload(),o(s)},a)})},rsaEncrypt=n=>{const r=window.vite_public_encryption;if(length$1(r)<10)return n;const a=new JSEncrypt;return a.setPublicKey(r),a.encrypt(n)},getToken=()=>{const n=Date.now(),r=window.vite_public_proxy_key,a=md5(String(n).concat(md5(r)));return{request_time:n,request_token:a}};curry$2((n,r)=>{const o=pipe(toPairs,map$2(([s,l])=>"".concat(String(s),"=").concat(encodeURIComponent(String(l)))),join("&"))(r);return/\?$/.test(n)?n+o:n.replace(/\/?$/,"?")+o});const hasOwnProperty=(n,r)=>Object.prototype.hasOwnProperty.call(n,r),getRepeatChar=(n,r)=>{let a="";for(;r--;)a+=n;return a},deepClone=n=>{if(isUndefined(n)||!isObject$4(n)&&!isArray$2(n))return n;const r=Array.isArray(n)?[]:{};for(const a in n)r[a]=deepClone(n[a]);return r},contrastTableConfig=(n,r)=>(n.length===0||n==null||n.map((a,o)=>(isBoolean(a.isCustom)&&(r[o].isCustom=a.isCustom),a)),r),removeEmptyValues=n=>Object.entries(n).reduce((r,[a,o])=>isUndefined(o)||isEmpty(o)||isArray$2(o)?r:{...r,[a]:o},{}),decodeHtml=n=>new DOMParser().parseFromString(n,"text/html").documentElement.textContent,toHalfWidth=n=>n.replace(/[\uff01-\uff5e]/g,function(r){const a=r.charCodeAt(0);return String.fromCharCode(a-65248)}),getCookie=n=>{const r=window.location.protocol==="https:",a="http".concat(r?"s":"","_").concat(n),o=new RegExp("(^| )".concat(a,"=([^;]*)(;|$)")),s=document.cookie.match(o);return s?decodeURIComponent(s[2]):null},setCookie=(n,r,a=30)=>{const o=new Date,s=window.location.protocol==="https:",l="; Secure; Path=/; SameSite=None",u=isNil(a)?30*24*60*60*1e3:Number(a)*24*60*60*1e3;o.setTime(o.getTime()+u);const c=o.toUTCString();document.cookie="http".concat(s?"s":"","_").concat(n,"=").concat(encodeURIComponent(r),";expires=").concat(c).concat(s?l:"")},emptyCookie=()=>{const n=document.cookie.split(";");for(let r=0;r<n.length;r++){const a=n[r],o=a.indexOf("="),s=o>-1?a.substr(0,o):a;document.cookie="".concat(s,"=;expires=Thu, 01 Jan 1970 00:00:00 GMT")}},clearCookie=n=>{setCookie(n,"",0)},checkObjKey=curry$2((n,r)=>pipe(ifElse(isNotNil,always,has$2(r)))(n)),camelCase=n=>n.replace(/_([a-z])/g,function(r){return r[1].toUpperCase()});pipe(toPairs,map$2(([n,r])=>[camelCase(n),r]),fromPairs);const checkDevImgPath=n=>{let r="";return r="/static/images/".concat(n),r.replace(/\/\//g,"/")},isMobile=()=>{const n=navigator.userAgent.toLowerCase();return/android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|windows phone/i.test(n)},createProxyUrl=n=>{let r=n;return r.indexOf("?")>-1,n.indexOf("/")!==0&&(r="/".concat(n)),r},checkComponent=n=>{if(isObject$4(n)&&has$2("__name",n))return n;if(isFunction$1(n)){const r=n();return isPromise(r)?defineAsyncComponent(()=>r):r}return n},swapString=n=>{const r={lt:"<",gt:">",nbsp:" ",amp:"&",quot:'"',"#x27":"'",apos:"'"};return n.replace(/&(lt|gt|nbsp|amp|quot|#x27);/gi,function(a,o){return r[o]})},getDefaultDate=n=>{let r=new Date;isDate(n)&&(r=n),n=Math.round(n);const a=n.toString();return a.length===13&&(r=new Date(n)),a.length===10&&(r=new Date(n*1e3)),r},formatTime$1=(n,r="yyyy-MM-dd HH:mm:ss",a=!1)=>{const o=getDefaultDate(n),s=new Map([["y","".concat(o.getFullYear())],["M","".concat(o.getMonth()+1)],["d","".concat(o.getDate())],["H","".concat(o.getHours())],["m","".concat(o.getMinutes())],["s","".concat(o.getSeconds())],["q","".concat(Math.floor((o.getMonth()+3)/3))],["f","".concat(o.getMilliseconds())]]);if(a)s.set("h",s.get("H"));else{const f=Number(s.get("H"));f>12?s.set("h","".concat(f-12)):s.set("h","".concat(f))}let l="",u="",c=r;const d="yMdHhmsqf";for(let f=0,p=0;f<d.length;f++)if(p=r.indexOf(d[f]),!(p<0)){for(l="";p<r.length&&r[p]===d[f];p++)l+=d[f];if(l.length>0){const v=s.get(d[f])||"";if(l.length===v.length)u=v;else if(l.length>v.length)d[f]==="f"?u=v+getRepeatChar("0",l.length-v.length):u=getRepeatChar("0",l.length-v.length)+v;else switch(d[f]){case"y":u=v.substring(v.length-l.length);break;case"f":u=v.substring(0,l.length);break;default:u=v;break}c=c.replace(l,u)}}return c},getSimplifyTime=n=>{let r=n;n.toString().length===10&&(r*=1e3);const s=new Date().getTime()-r;if(s<=0)return"刚刚";const l=[{label:"分钟",num:60},{label:"小时",num:60},{label:"天",num:24},{label:"周",num:7,cut:!0},{label:"月",num:30,cut:!0},{label:"年",num:365,cut:!0}];let u=0,c=0,d=1e3;for(let f=0;f<l.length;f++){const p=l[f];if(u=d,u*=p.num,p.cut||(d=u),c=Math.floor(s/u),f===l.length-1&&c>0)return"".concat(c).concat(p.label,"前");if(f===l.length-1)break;if(c<l[f+1].num&&c>0)return"".concat(c).concat(p.label,"前")}return"刚刚"},addDay=(n,r=new Date)=>{isString$1(r)&&(r=new Date(r));const a=r.getTime()+n*864e5;return new Date(a)},getDuration=n=>{let r="";const a=Math.floor(n/86400),o=Math.floor(n%86400/3600),s=Math.floor(n%86400%3600/60),l=Math.floor(n%86400%3600%60);return a>0?r="".concat(a,"天").concat(o,"小时").concat(s,"分").concat(l,"秒"):o>0?r="".concat(o,"小时").concat(s,"分").concat(l,"秒"):s>0?r="".concat(s,"分").concat(l,"秒"):l>=0&&(r="".concat(l,"秒")),r},messageList=[],BtMessage=n=>{const r=ElMessage({duration:2e3,...n});return messageList.forEach(a=>{a.close()}),messageList.length=0,messageList.push(r),r};let Message$2=class Le{static getOptions(r={}){return(isString$1(r)||isVNode(r))&&(r={message:r}),isUndefined(r.msg)||(r.message=r.msg,delete r.msg),isUndefined(r.time)||(r.duration=r.time,delete r.time),{...r,customClass:"bt-message-html",showClose:!0}}static msg(r){return BtMessage({...r})}static success(r){const a=Le.getOptions(r);return BtMessage({type:"success",...a})}static warn(r){const a=Le.getOptions(r);return BtMessage({type:"warning",...a})}static error(r){const a=Le.getOptions(r);return BtMessage({type:"error",dangerouslyUseHTMLString:!0,customClass:"bt-message-error-html",...a})}static request(r,a){return BtMessage({customClass:"bt-message-error-html",type:r.status?"success":"error",dangerouslyUseHTMLString:!0,message:r.msg,...a||{}})}static load(r){(isString$1(r)||isVNode(r))&&(r={msg:r,customClass:"",background:"rgba(0,0,0, 0.3)"});const{msg:a,background:o,customClass:s}=r,l=ElLoading.service({text:a||"加载中...",spinner:"",customClass:"bt-loading ".concat(s||""),background:o||"rgba(0,0,0, 0.3)"});return nextTick(()=>{var c,d;const u=l.$el.querySelector(".circular");if(u){const f=document.createElement("div");f.className="custom-loading__icon",f.innerHTML='\n <svg aria-hidden="true"><use href="#icon-tools-logo"></use></svg>\n ',(c=u.parentNode)==null||c.insertBefore(f,u),(d=u.parentNode)==null||d.removeChild(u)}}),l}};const useMessage=()=>Message$2,useLoading=n=>Message$2.load(n),getBody=()=>document.body||document.documentElement,inputFocus=(n,r="",a="input")=>{try{nextTick(()=>{let o=n;o.tagName!=="INPUT"&&(o=n.querySelector("".concat(a).concat(r!==""?"[name='".concat(r,"']"):""))),!o.getAttribute("disabled")&&(o==null||o.focus())})}catch(o){}},setFullScreen=()=>{const n=document.documentElement.requestFullscreen;if(n)n.call(document.documentElement);else if(typeof window.ActiveXObject<"u"){const r=new ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}},exitFullscreen=()=>{const n=document.exitFullscreen;if(n)n.call(document);else if(typeof window.ActiveXObject<"u"){const r=new ActiveXObject("WScript.Shell");r!==null&&r.SendKeys("{F11}")}},copyText=async({value:n,success:r="复制成功",error:a="复制失败,请手动复制文本"})=>{const o=useMessage(),{copy:s,isSupported:l}=useClipboard({legacy:!0});l.value?(s(n),o.success(r)):o.error(a)},scrollBottom=n=>{const r=document.querySelector(n);if(!r)return;const{scrollHeight:a,clientHeight:o}=r;r.scrollTop=a+o},imitatePhpAdminForm=(n,r,a,o)=>new Promise(s=>{const l="".concat(o,"/index.php?lang=zh_cn"),u=document.createElement("form"),c='<input type="text" name="pma_username" id="pma_username" value="'.concat(r,'" />\n <input type="password" name="pma_password" id="pma_password" value="').concat(a,'" />\n <input type="text" name="server" value="1" />\n <input type="text" name="target" value="index.php" />\n <input type="text" name="db" id="db" value="').concat(n,'" />');u.action=l,u.setAttribute("public-data",l),u.method="post",u.target="_blank",u.style.display="none",u.innerHTML=c,document.body.appendChild(u),u.submit(),document.body.removeChild(u),s(u)}),imitatePhpAdminPanelForm=async(n,r)=>{const a="/phpmyadmin/index.php?lang=zh_cn",o=document.createElement("form"),{data:s}=await axios.get(a),l={session:"",token:""},u=s.match(/\"set_session\"\s+value=\"(\w+)\"/),c=s.match(/\"token\"\s+value=\"(\w+)\"/);u&&u.length>1&&(l.session=u[1]||""),c&&c.length>1&&(l.token=c[1]||""),o.action="/phpmyadmin/index.php",o.method="post",o.target="_blank",o.style.display="none",o.innerHTML='\n <input name="set_session" id="input_session" value="'.concat(l.session,'">\n <input type=x"text" name="pma_username" id="input_username" value="').concat(n,'" size="24">\n <input type="password" name="pma_password" id="input_password" value="').concat(r,'" size="24">\n <input name="token" id="input_token" value="').concat(l.token,'">\n <input name="target" id="input_target" value="index.php">\n <input name="server" value="1" id="input_server">'),document.body.appendChild(o),o.submit(),document.body.removeChild(o),Promise.resolve(o)},getPckageVm=n=>n.$children[0],clearCache=()=>{const n=localStorage.getItem("color-scheme");localStorage.clear(),sessionStorage.clear(),n&&localStorage.setItem("color-scheme",n)},jumpRouter=async n=>{const{router:r}=await __vitePreload(()=>Promise.resolve().then(()=>index$3),void 0,import.meta.url),{useGlobalStore:a}=await __vitePreload(()=>Promise.resolve().then(()=>global$1),void 0,import.meta.url),{routerActive:o}=a();r.push({path:n}),o.value=n},isCurrentRouter=(n,r)=>{if(r){if(r.indexOf(n)>-1)return!0}else if(useRoute().path.indexOf(n)>-1)return!0;return!1},setColumnCustom=(n,r)=>{try{const a=JSON.parse(localStorage.getItem(r)||"[]");return a.length&&n.forEach((o,s)=>{var l;has$2("isCustom",o)&&(o.isCustom=(l=a[s])==null?void 0:l.isCustom)}),n}catch(a){}},getRandomChart=(n=10,r="default")=>{let a="";const s={default:"ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz123456789",password:"AaBbCcDdEeFfGHhiJjKkLMmNnPpRSrTsWtXwYxZyz2345678",wp:"AaBbCcDdEeFfGHhiJjKkLMmNnPpRSrTsWtXwYxZyz12345678!@#$%^&*?",letter:"ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz",lowercaseNumber:"abcdefhijkmnprstwxyz123456789"}[r];for(let l=0;l<n;l++)a+=s.charAt(Math.floor(Math.random()*s.length));return a},getRandomPrefix=(n,r,a="-")=>{const o=getRandomChart(r);return"".concat(n).concat(a).concat(o)},getRandomPwd=(n=16)=>getRandomChart(n,"password"),getRandom=(n=8)=>Math.random().toString(16).slice(2,2+n),getComplexRandomString=(n=8)=>{if(n<3)throw new Error("长度必须大于或等于3");const r="ABCDEFGHJKMNPQRSTWXYZ",a="abcdefhijkmnprstwxyz",o="123456789";let s="";s+=r.charAt(Math.floor(Math.random()*r.length)),s+=a.charAt(Math.floor(Math.random()*a.length)),s+=o.charAt(Math.floor(Math.random()*o.length));const l=r+a+o;for(let u=3;u<n;u++)s+=l.charAt(Math.floor(Math.random()*l.length));return s.split("").sort(()=>Math.random()-.5).join("")},generatePasswordByConfig=n=>{const r=Number(n.validatePasswordLength)||16,a=Number(n.validatePasswordMixedCaseCount)||1,o=Number(n.validatePasswordNumberCount)||1,s=Number(n.validatePasswordSpecialCharCount)||1,l="ABCDEFGHIJKLMNOPQRSTUVWXYZ",u="abcdefghijklmnopqrstuvwxyz",c="0123456789",d="!@#$%^&*()_+-=[]{}|;:,.<>?";let f="";for(let g=0;g<a;g++)f+=l[Math.floor(Math.random()*l.length)];for(let g=0;g<a;g++)f+=u[Math.floor(Math.random()*u.length)];for(let g=0;g<o;g++)f+=c[Math.floor(Math.random()*c.length)];for(let g=0;g<s;g++){const y=Math.floor(Math.random()*d.length);f+=d[y]}const p=r-f.length,v=l+u+c+d;for(let g=0;g<p;g++)f+=v[Math.floor(Math.random()*v.length)];return f.split("").sort(()=>Math.random()-.5).join("")},defaultVerify=({message:n,trigger:r}={})=>({required:!0,message:n||"参数不能为空",trigger:r||["blur","change"]}),pawVerify=({message:n,complex:r,prefix:a,trigger:o}={})=>(isObject$4(n)||(n={}),isString$1(a)||(a=""),{validator:(s,l,u)=>{l=l.trim(),l===""?u(new Error(n.value||"密码不能为空")):r.length&&l.length<r.length?u(new Error(n.length||"密码长度必须大于等于".concat(r.length,"位"))):r?u():r.small&&!/[a-z]/.test(l)?u(new Error(n.small||"".concat(a,"密码至少包含一个小写字母"))):r.big&&!/[A-Z]/.test(l)?u(new Error(n.big||"".concat(a,"密码至少包含一个大写字母"))):r.number&&!/[0-9]/.test(l)?u(new Error(n.number||"".concat(a,"密码至少包含一个数字"))):r.special&&!/[~!@#$%^&*()_+<>?:"{},.\/;'[\]]/.test(l)&&u(new Error(n.special||"".concat(a,"密码至少包含一个特殊字符")))},trigger:o||["blur","change"]}),ipVerify=({message:n,trigger:r}={})=>(isObject$4(n)||(n={}),{validator:(a,o,s)=>{o=o.trim(),o===""?s(new Error(n.value||"IP地址不能为空")):checkIp(o)?s():s(new Error(n.ip||"IP地址格式错误"))},trigger:r||["blur","change"]}),pathVerify=({message:n,trigger:r}={})=>(isObject$4(n)||(n={}),{validator:(a,o,s)=>{const l=["/","/www","/bin","/boot","/dev","/etc","/lib","/media","/mnt","/opt","/proc","/root","/run","/sbin","/srv","/sys","/tmp","/usr","/var"],u=Array.from(new Set(l));o=o.trim(),o===""?s(new Error(n.value||"目录不能为空")):u.includes(o)?s(new Error("目录为系统保留目录, 请重新选择")):s()},trigger:r||["blur","change"]}),portVerify=({message:n,trigger:r}={})=>(isObject$4(n)||(n={}),{validator:(a,o,s)=>{checkPort(o)?s():s(new Error(n.port||"请填写正确的端口"))},trigger:r||["blur","change"],required:!0}),domainOrIpPortVerify=({message:n,trigger:r}={})=>(isObject$4(n)||(n={}),{validator:(a,o,s)=>{o.split("\n").filter(u=>u.trim().length).map((u,c)=>{if(!u.startsWith("[")&&u.split(":")[0].length<3)return s(new Error("第 ".concat(c+1," 行地址长度不符合要求(必须大于3个字符)")));checkDomainOrIpPort(u)||s(new Error("当前域名格式错误,第".concat(c+1,"行,内容:").concat(u)))}),s()},trigger:r||["blur","change"]}),panelUrlVerify=({message:n,trigger:r}={})=>(isObject$4(n)||(n={}),{required:!0,validator:(a,o,s)=>{o===""?s(new Error(n.value||"面板地址不能为空")):checkPanelUrl(o)?s():s(new Error(n.node||"请输入正确的面板地址"))},trigger:r||["blur","change"]}),PRESET_COLOR_CACHE_KEY="theme-preset-colors-cache",PRESET_COLOR_CACHE=new Map;try{const n=localStorage.getItem(PRESET_COLOR_CACHE_KEY);if(n){const r=JSON.parse(n);Object.entries(r).forEach(([a,o])=>{PRESET_COLOR_CACHE.set(a,o)})}}catch(n){}function getCachedColorScale(n){return PRESET_COLOR_CACHE.get(n)}function setCachedColorScale(n,r){PRESET_COLOR_CACHE.set(n,r);try{const a=Object.fromEntries(PRESET_COLOR_CACHE);localStorage.setItem(PRESET_COLOR_CACHE_KEY,JSON.stringify(a))}catch(a){}}function hasCachedColorScale(n){return PRESET_COLOR_CACHE.has(n)}const colorConversionCache=new Map,MAX_CACHE_SIZE=500,colorAnalysisCache=new Map;function clearCacheIfNeeded(n){if(n.size>MAX_CACHE_SIZE){const r=Array.from(n.entries());r.slice(0,Math.floor(r.length/2)).forEach(([o])=>n.delete(o))}}function hexToRgb(n,r=!1){const a="hexToRgb:".concat(n,":").concat(r);if(colorConversionCache.has(a))return colorConversionCache.get(a);const o=n.replace("#","");if(!/^[a-fA-F0-9]{6}$/.test(o))return null;const s={r:parseInt(o.slice(0,2),16),g:parseInt(o.slice(2,4),16),b:parseInt(o.slice(4,6),16)};clearCacheIfNeeded(colorConversionCache);const l=r?"".concat(s.r,",").concat(s.g,",").concat(s.b):s;return colorConversionCache.set(a,l),l}function rgbToHex(n,r,a){const o=c=>Math.max(0,Math.min(255,Math.round(c))),s=o(n).toString(16).padStart(2,"0"),l=o(r).toString(16).padStart(2,"0"),u=o(a).toString(16).padStart(2,"0");return"#".concat(s).concat(l).concat(u)}function rgbObjectToHex(n){return rgbToHex(n.r,n.g,n.b)}function rgbToHsl(n,r,a){const o=n/255,s=r/255,l=a/255,u=Math.max(o,s,l),c=Math.min(o,s,l);let d=0,f=0;const p=(u+c)/2;if(u!==c){const v=u-c;switch(f=p>.5?v/(2-u-c):v/(u+c),u){case o:d=(s-l)/v+(s<l?6:0);break;case s:d=(l-o)/v+2;break;case l:d=(o-s)/v+4;break}d/=6}return{h:d,s:f,l:p}}function hslToRgb(n,r,a){let o,s,l;if(r===0)o=s=l=a;else{const u=(f,p,v)=>(v<0&&(v+=1),v>1&&(v-=1),v<.16666666666666666?f+(p-f)*6*v:v<.5?p:v<.6666666666666666?f+(p-f)*(.6666666666666666-v)*6:f),c=a<.5?a*(1+r):a+r-a*r,d=2*a-c;o=u(d,c,n+1/3),s=u(d,c,n),l=u(d,c,n-1/3)}return{r:Math.round(o*255),g:Math.round(s*255),b:Math.round(l*255)}}function normalizeColorInput(n){if(n==null)return null;if(typeof n=="string")return hexToRgb(n);if(typeof n=="object"){if("r"in n&&"g"in n&&"b"in n)return n;if("h"in n&&"s"in n&&"l"in n)return hslToRgb(n.h,n.s,n.l)}return null}function calculateLuminance(n){const r=a=>{const o=a/255;return o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4)};return .2126*r(n.r)+.7152*r(n.g)+.0722*r(n.b)}function calculateContrast(n,r){const a=calculateLuminance(n),o=calculateLuminance(r);return(Math.max(a,o)+.05)/(Math.min(a,o)+.05)}function analyzeColor(n){const r=normalizeColorInput(n);if(!r)return null;const a=calculateLuminance(r),o=Math.max(calculateContrast(r,{r:255,g:255,b:255}),calculateContrast(r,{r:0,g:0,b:0}));return{isLight:a>.5,luminance:a,contrast:o,wcagAA:o>=4.5,wcagAAA:o>=7}}const DEFAULT_LIGHT_COLOR_SCALE={base:"#20a53a","base-rgb":"32,165,58",light3:"#63c075","light3-rgb":"99,192,117",light5:"#90d29d","light5-rgb":"144,210,157",light7:"#bce4c4","light7-rgb":"188,228,196",light8:"#d2edd8","light8-rgb":"210,237,216",light9:"#e9f6eb","light9-rgb":"233,246,235",dark2:"#1a842e","dark2-rgb":"26,132,46"},DEFAULT_DARK_COLOR_SCALE={base:"#1e7e34","base-rgb":"30,126,52",light3:"#1c7a2f","light3-rgb":"28,122,47",light5:"#1a5d27","light5-rgb":"26,93,39",light7:"#18401f","light7-rgb":"24,64,31",light8:"#16311c","light8-rgb":"22,49,28",light9:"#152318","light9-rgb":"21,35,24",dark2:"#4db761","dark2-rgb":"77,183,97"};function formatColorScale(n,r){const a=Array.isArray(r)?r:[r];if(a.length===1&&a[0]==="hex")return n;if(a.length===1){const l=a[0],u={};return Object.keys(n).forEach(c=>{const d=c,f=n[d];if(typeof f!="string")return;const p=hexToRgb(f);if(l==="rgb")u[d]="".concat(p.r,",").concat(p.g,",").concat(p.b);else if(l==="hsl"){const v=rgbToHsl(p.r,p.g,p.b),g=Math.round(v.h*360),y=Math.round(v.s*100),_=Math.round(v.l*100);u[d]="".concat(g,",").concat(y,"%,").concat(_,"%")}}),u}const o={...n},s=Object.keys(n);return a.forEach(l=>{l!=="hex"&&s.forEach(u=>{const c=n[u];if(typeof c!="string")return;const d=hexToRgb(c);let f="";if(l==="rgb")f="".concat(d.r,",").concat(d.g,",").concat(d.b);else if(l==="hsl"){const p=rgbToHsl(d.r,d.g,d.b),v=Math.round(p.h*360),g=Math.round(p.s*100),y=Math.round(p.l*100);f="".concat(v,",").concat(g,"%,").concat(y,"%")}f&&(o["".concat(u,"-").concat(l)]=f)})}),o}function initColorCache(n,r="hex"){Object.values(n).forEach(a=>{if(a.primary)try{const o="light:".concat(a.primary),s="dark:".concat(a.primary);hasCachedColorScale(o)||generateStandardColorScale(a.primary,"light",r),hasCachedColorScale(s)||generateStandardColorScale(a.primary,"dark",r)}catch(o){}})}function generateStandardColorScale(n,r="light",a="hex"){const o=normalizeColorInput(n);if(!o)throw new Error("Invalid color");const s=rgbObjectToHex(o),l="".concat(r,":").concat(s);let u=getCachedColorScale(l);if(!u&&s==="#20a53a"&&(u=r==="dark"?DEFAULT_DARK_COLOR_SCALE:DEFAULT_LIGHT_COLOR_SCALE,setCachedColorScale(l,u)),!u){let p=colorAnalysisCache.get(s);p||(p={hsl:rgbToHsl(o.r,o.g,o.b),analysis:analyzeColor(o)},colorAnalysisCache.set(s,p),clearCacheIfNeeded(colorAnalysisCache));const{hsl:v,analysis:g}=p;let y=s;if(r==="dark"){if(y.toUpperCase()!=="#F4D1B4"){const b=Math.max(.2,v.l*.95),x=Math.max(.1,v.s*.95);y=rgbObjectToHex(hslToRgb(v.h,x,b))}const _=b=>{const A={3:.12,5:.28,7:.45,8:.58,9:.72}[b]||.5,w=A*(.8+g.luminance*.4),E=Math.max(.08,v.l*(1-w)),D=Math.min(1,v.s*(1+Math.min(.15,A*.12)));return rgbObjectToHex(hslToRgb(v.h,D,E))},S=()=>{const b=g.isLight?.35:.5,x=Math.min(.92,v.l+(1-v.l)*b),A=Math.max(.15,v.s*.85);return rgbObjectToHex(hslToRgb(v.h,A,x))};u={base:y,light3:_(3),light5:_(5),light7:_(7),light8:_(8),light9:_(9),dark2:S()}}else{const _=b=>{const A={3:.25,5:.45,7:.65,8:.78,9:.88}[b]||.5,w=A*(.9+(1-g.luminance)*.2),E=Math.min(.98,v.l+(1-v.l)*w),D=Math.max(.05,v.s*(1-Math.min(.5,A*.45)));return rgbObjectToHex(hslToRgb(v.h,D,E))},S=()=>{const b=g.isLight?.25:.18,x=Math.max(.05,v.l*(1-b)),A=Math.min(1,v.s*(1+Math.min(.15,b*.6)));return rgbObjectToHex(hslToRgb(v.h,A,x))};u={base:y,light3:_(3),light5:_(5),light7:_(7),light8:_(8),light9:_(9),dark2:S()}}setCachedColorScale(l,u)}const c=Array.isArray(a)?a:[a];let d=!1;const f={...u};if(c.forEach(p=>{if(p==="hex")return;const v="base-".concat(p);if(f[v])return;const g={};Object.keys(f).forEach(_=>{!_.includes("-")&&typeof f[_]=="string"&&f[_].startsWith("#")&&(g[_]=f[_])});const y=formatColorScale(g,p);Object.keys(y).forEach(_=>{f["".concat(_,"-").concat(p)]=y[_]}),d=!0}),c.length===1&&c[0]!=="hex"){const p=c[0],v={};return u&&Object.keys(u).forEach(g=>{if(g.includes("-"))return;const y="".concat(g,"-").concat(p);u!=null&&u[y]&&(v[g]=u[y])}),v}return d&&(setCachedColorScale(l,f),u=f),{...u}}function generateColorScale(n,r={}){const{mode:a="light",format:o="hex"}=r;return generateStandardColorScale(n,a,o)}function generateCssVariables(n,r={}){const{prefix:a="el-color-primary"}=r,o={};return o["--".concat(a)]=n.base,o["--".concat(a,"-light-3")]=n.light3,o["--".concat(a,"-light-5")]=n.light5,o["--".concat(a,"-light-7")]=n.light7,o["--".concat(a,"-light-8")]=n.light8,o["--".concat(a,"-light-9")]=n.light9,o["--".concat(a,"-dark-2")]=n.dark2,o["--".concat(a,"-rgb")]=n["base-rgb"],o["--".concat(a,"-light-3-rgb")]=n["light3-rgb"],o["--".concat(a,"-light-5-rgb")]=n["light5-rgb"],o["--".concat(a,"-light-7-rgb")]=n["light7-rgb"],o["--".concat(a,"-light-8-rgb")]=n["light8-rgb"],o["--".concat(a,"-light-9-rgb")]=n["light9-rgb"],o["--".concat(a,"-dark-2-rgb")]=n["dark2-rgb"],o}const Te=class Te{constructor(){se(this,"state");se(this,"listeners",new Set);se(this,"lastPresets",{});this.state={preset:void 0,view:void 0,color:void 0,sidebarColor:void 0,sidebarOpacity:void 0,interfaceRadius:void 0,interfaceBgImage:void 0,interfaceBgImageShow:void 0,interfaceShadowColor:void 0,interfaceBgImageOpacity:void 0,interfaceContentOpacity:void 0,interfaceShadowOpacity:void 0,interfaceContainerWidth:void 0,homeOverviewSize:void 0}}static getInstance(){return Te.instance||(Te.instance=new Te),Te.instance}getState(){return{...this.state}}checkAndCommitState(r,a,o=!0){let s=!0;const l=this.state.preset;if(o&&r!=="preset"){const u=this.lastPresets[r];l!==u&&(s=!1)}return a===void 0&&s||this.state[r]===a&&s?!0:(this.state[r]=a,r!=="preset"&&(this.lastPresets[r]=l),this.notifyListeners(),!1)}setState(r){Object.assign(this.state,r),this.notifyListeners()}subscribe(r){return this.listeners.add(r),()=>{this.listeners.delete(r)}}notifyListeners(){const r=this.getState();this.listeners.forEach(a=>a(r))}};se(Te,"instance");let ThemeStateManager=Te;const themeState=ThemeStateManager.getInstance(),DEFAULT_CONFIG={theme:{preset:"light",color:"#20a53a",view:"default"},logo:{image:"/static/icons/logo-white.svg",favicon:"/static/favicon.ico"},sidebar:{dark:!0,color:"#3c444d",opacity:100},interface:{rounded:"smaller",is_show_bg:!0,bg_image:"/static/images/bg-default.png",bg_image_opacity:20,content_opacity:70,shadow_color:"#000000",shadow_opacity:5,container_width:"100%"},home:{overview_view:"default",overview_size:24},login:{is_show_logo:!0,logo:"/static/icons/logo-green.svg",is_show_bg:!1,bg_image:"",bg_image_opacity:70,content_opacity:100},terminal:{show:!1,url:"",opacity:70,ai_opacity:100}},DEFAULT_COLOR_PRESETS={grey:{primary:"#3c444d",label:"深灰蓝",gradient:"linear-gradient(135deg, #3c444d 0%, #5a6c7d 100%)"},light:{primary:"#ffffff",label:"纯白色",gradient:"linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%)"},default:{primary:"#20a53a",label:"宝塔绿",gradient:"linear-gradient(135deg, #20a53a 0%, #47a559 100%)"},forest:{primary:"#14892b",label:"森林绿",gradient:"linear-gradient(135deg, #14892b 0%, #1ea639 100%)"},emerald:{primary:"#10B981",label:"翡翠绿",gradient:"linear-gradient(135deg, #10b981 0%, #34d399 100%)"},violet:{primary:"#8B5CF6",label:"紫罗兰",gradient:"linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%)"},sky:{primary:"#0EA5E9",label:"天空蓝",gradient:"linear-gradient(135deg, #0ea5e9 0%, #38bdf8 100%)"},pink:{primary:"#F472B6",label:"樱花粉",gradient:"linear-gradient(135deg, #f472b6 0%, #ec4899 100%)"},gold:{primary:"#F4D1B4",label:"暗金色",gradient:"linear-gradient(135deg, #F4D1B4 0%, #EAC2A5 100%)"}},STYLE_MODULE_IDS={themeColor:"bt-theme-colors",homeOverviewSize:"bt-theme-home-overview-size",sidebar:"bt-theme-sidebar",sidebarOpacity:"bt-theme-sidebar-opacity",interfaceRadius:"bt-theme-interface-radius",interfaceBackgroundImage:"bt-theme-interface-background-image",interfaceContentOpacity:"bt-theme-interface-content-opacity",interfaceBackgroundImageOpacity:"bt-theme-interface-background-image-opacity",interfaceShadowColor:"bt-theme-interface-shadow-color",interfaceShadowOpacity:"bt-theme-interface-shadow-opacity",common:"bt-theme-common"},getSystemTheme=()=>{try{return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}catch(n){return"light"}},setThemeClass=(n,r="")=>{const a=document.documentElement;a.classList.forEach(o=>o.startsWith("theme-".concat(r,"-"))&&a.classList.remove(o)),a.classList.add("theme-".concat(r,"-").concat(n))},getPresetColor=n=>n?checkPresetColor(n)?n:n in DEFAULT_COLOR_PRESETS?DEFAULT_COLOR_PRESETS[n].primary.toUpperCase():n:"",contrastColors=(n,r)=>n.toUpperCase()===r.toUpperCase(),checkPresetColor=n=>Object.values(DEFAULT_COLOR_PRESETS).some(r=>contrastColors(r.primary,n||"")),getColorName=n=>{const r=Object.entries(DEFAULT_COLOR_PRESETS).find(([,a])=>contrastColors(a.primary,n));return r?r[0]:"custom"},getDefaultConfigPart=(n,r=DEFAULT_CONFIG)=>{const a=n.split("."),o=a.reduce((s,l)=>{if(s&&typeof s=="object"&&l in s)return s[l]},r);return a.reduceRight((s,l,u)=>u===a.length-1?{[l]:o}:{[l]:s},void 0)},createConfigPart=(n,r)=>{const a=n.split("."),o={};let s=o;for(let l=0;l<a.length-1;l++)s[a[l]]||(s[a[l]]={}),s=s[a[l]];return s[a[a.length-1]]=r,o};initColorCache(DEFAULT_COLOR_PRESETS,["hex","rgb"]);let pendingMap=new Map;const getPendingUrl=n=>[n.method,n.url].join("&");class AxiosCanceler{addPending(r){const a=getPendingUrl(r);r.cancelToken=r.cancelToken||new axios.CancelToken(o=>{pendingMap.has(a)||pendingMap.set(a,o)})}removePending(r){const a=getPendingUrl(r);if(pendingMap.has(a)){const o=pendingMap.get(a);isFunction$1(o)&&o(),pendingMap.delete(a)}}removeAllPending(){pendingMap.forEach(r=>{isFunction$1(r)&&r()}),pendingMap.clear()}reset(){pendingMap=new Map}}const useRequestCanceler=n=>{const{removePending:r}=new AxiosCanceler;n.forEach(a=>{let o;typeof a=="string"?o={url:a,method:"post"}:o=a,r(o)})};function createDefaultOption(n={}){const r={baseURL:"",timeout:25e4,headers:{"Content-Type":"application/x-www-form-urlencoded"}};{const a=window.location.protocol.indexOf("https:")===0?"https_request_token":"request_token",o=getCookie(a);r.headers={...r.headers,"x-http-token":window.vite_public_request_token,...o?{"x-cookie-token":o}:{}}}return{...r,...n}}function createUrl({url:n,customType:r="default"}){if(!n)throw new Error("请求路径为空");const a=n?n.split("/"):[];if(a.length!==2&&r!=="model")throw new Error("传统请求/插件请求路径格式错误,正确格式为:模块名/方法名");switch(r){case"default":return"/".concat(a[0],"?action=").concat(a[1]);case"model":return"/".concat(n).replace(/\/+/g,"/");case"plugin":return"/plugin?action=a&name=".concat(a[0],"&s=").concat(a[1]);default:return"/".concat(n).replace(/\/+/g,"/")}}const handleTransformRequest=pipe(toPairs,map$2(([n,r])=>"".concat(encodeURIComponent(n),"=").concat(encodeURIComponent(r))),join("&")),__unplugin_components_3=defineComponent({props:{src:{type:String,default:""},type:{type:String,default:"images"},all:{type:Boolean,default:!1}},setup(n,{attrs:r,slots:a}){const o=ref(n.all?n.src:"/static/".concat(n.type,"/").concat(n.src));return watch(()=>n.src,()=>{o.value=n.all?n.src:"/static/".concat(n.type,"/").concat(n.src)}),()=>createVNode$1(ElImage,mergeProps({src:o.value.replace("//","/")},r),{error:()=>a.error&&a.error()})}});function _isSlot$7(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!isVNode$1(n)}const __unplugin_components_0$4=defineComponent({name:"BtLink",props:{...linkProps,type:{type:String,default:"primary"},title:{type:String,default:""},target:{type:String,default:"_blank"},underline:{type:Boolean,default:!1},href:{type:String,default:""},size:{type:String,default:"12px"},onClick:{type:Function,default:void 0}},setup(n,{attrs:r,slots:a}){const{size:o,href:s,target:l,underline:u,type:c,title:d,onClick:f}=toRefs(n),p=computed(()=>Number.isNaN(Number(o.value))?o.value:"".concat(o.value,"rem"));return()=>{var v;return createVNode$1(Fragment,null,[s.value?createVNode$1(ElLink,mergeProps(r,{href:s.value,type:c.value,title:d.value||"",target:s.value!=="javascript:;"?l.value:"",underline:u.value,rel:"noreferrer noopener",style:{fontSize:p.value},onClick:f.value}),_isSlot$7(a)?a:{default:()=>[a]}):createVNode$1("span",mergeProps({class:"bt-link",style:{fontSize:p.value}},r,{onClick:f.value}),[(a==null?void 0:a.default)&&((v=a.default)==null?void 0:v.call(a))])])}}}),_hoisted_1$5={key:0,class:"p-[20px]"},_hoisted_2$5={class:"h-108 w-full whitespace-pre-wrap mb-0"},_hoisted_3$5={class:""},_hoisted_4$5={class:"help-info-text err_project_ul inline-block"},_hoisted_5$4={class:"list-none leading-[3.2rem]"},_hoisted_6$4={class:"list-none leading-[3.2rem]"},_hoisted_7$4={key:0,class:"list-none leading-[3.2rem]"},_hoisted_8$2={key:0,class:"relative mt-20 mr-10 text-center text-xs pull-right"},_hoisted_9$2={id:"err_kefu_img",class:"p-5 border border-green-500 inline-block h-28"},_hoisted_10$1={key:1},_hoisted_11$1=["innerHTML"],_sfc_main$5=defineComponent({__name:"error-popup",props:{compData:{default:()=>({errorBody:"",errorFind:!1})}},setup(n){const r=n,a=useMessage(),{isBuy:o}=useGlobalStore(),{errorFind:s,errorBody:l}=toRefs(r.compData),u=ref(isNumber$1(s.value)),c=()=>{if(u.value){l.value=l.value.split("<!--")[2].replace("-->","");const p=l.value.split("During handling of the above exception, another exception occurred:");l.value=p[p.length-1]}},d=()=>{const p=u.value?l.value.trim():"".concat(l.value.trim(),"\n").concat(l.value.trim());try{navigator.clipboard.writeText(p)}catch(v){copyText({value:p})}finally{a.success("复制成功")}},f=async()=>{await useDataHandle({loading:"正在获取数据,请稍后...",request:repairPanelNew(),success:async p=>{const{data:v}=p;v.upgrade===1?(await useConfirm({title:"修复面板",content:'<div class="flex items-center">\n <div class="mr-1rem w-[4rem]"><img width="40" src="/static/icons/icon-upgrade.svg"></img></div>\n <div class="flex-1">\n <div class="text-medium leading-2.4rem">发现新版本,继续修复面板能修复使用中遇到的各种异常问题</div>\n </div>\n </div>\n <div class="pl-5rem mt-[4px]">\n <div>最新版本:'.concat(v.cloud.version,"</div>\n <div>更新时间:").concat(formatTime$1(v.cloud.update_time*1e3),"</div>\n </div>"),icon:!1,width:"40rem",isHtml:!0,confirmText:"继续修复"}),useDataHandle({loading:"正在修复面板,请稍后...",request:repairPanelNew({force:1}),message:!0,success:g=>{clearCache(),g.status&&setTimeout(()=>{useDialog({title:"正在".concat(v.type==="repair"?"修复":"更新","面板,请耐心等候..."),area:70,compData:{type:"repair"},component:()=>__vitePreload(()=>import("./index2.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)})},1500)}})):a.msg({message:"<div>\n <div>当前已是最新版本</div>\n <div>当前版本:".concat(v.local.version,"</div>\n <div>更新时间:").concat(formatTime$1(v.local.update_time*1e3),"</div>\n </div>"),type:"success",dangerouslyUseHTMLString:!0})}})};return onMounted(()=>c()),(p,v)=>{const g=ElButton,y=__unplugin_components_0$4,_=__unplugin_components_3;return openBlock(),createElementBlock("div",null,[unref(u)?(openBlock(),createElementBlock("div",_hoisted_10$1,[createBaseVNode("div",{class:"p-[2rem]",innerHTML:unref(l)},null,8,_hoisted_11$1)])):(openBlock(),createElementBlock("div",_hoisted_1$5,[v[8]||(v[8]=createBaseVNode("h3",{class:"mb-10"},"出错了,面板运行时发生错误!",-1)),createBaseVNode("pre",_hoisted_2$5,toDisplayString(unref(l).trim()),1),createBaseVNode("div",_hoisted_3$5,[createVNode$1(g,{onClick:d},{default:withCtx(()=>[...v[0]||(v[0]=[createTextVNode("点击复制错误信息",-1)])]),_:1})]),createBaseVNode("ul",_hoisted_4$5,[v[6]||(v[6]=createBaseVNode("li",{class:"list-none leading-[3.2rem]"},[createBaseVNode("b",null,"很抱歉,面板运行时意外发生错误,请尝试按以下顺序尝试解除此错误:")],-1)),createBaseVNode("li",_hoisted_5$4,[v[2]||(v[2]=createTextVNode("修复方案一:在[首页]右上角点击修复面板,并退出面板重新登录。",-1)),createVNode$1(y,{href:"javascript:;",class:"bt-link ml-4",onClick:f},{default:withCtx(()=>[...v[1]||(v[1]=[createTextVNode("尝试点击修复",-1)])]),_:1})]),createBaseVNode("li",_hoisted_6$4,[v[4]||(v[4]=createTextVNode("修复方案二:如上述尝试未能解除此错误,请截图此窗口到宝塔论坛发贴寻求帮助, 论坛地址:",-1)),createVNode$1(y,{class:"btlink",href:"https://www.bt.cn/bbs",target:"_blank"},{default:withCtx(()=>[...v[3]||(v[3]=[createTextVNode("https://www.bt.cn/bbs",-1)])]),_:1})]),unref(o)?(openBlock(),createElementBlock("li",_hoisted_7$4,[...v[5]||(v[5]=[createTextVNode("修复方案三(",-1),createBaseVNode("span",{class:"text-warning-500"},"推荐",-1),createTextVNode("):使用微信扫描右侧二维码,联系技术客服。",-1)])])):createCommentVNode("",!0)]),unref(o)?(openBlock(),createElementBlock("div",_hoisted_8$2,[createBaseVNode("span",_hoisted_9$2,[createVNode$1(_,{src:"customer/customer-qrcode.png"})]),v[7]||(v[7]=createBaseVNode("div",null,"【微信客服】",-1))])):createCommentVNode("",!0)]))])}}}),_export_sfc=(n,r)=>{const a=n.__vccOpts||n;for(const[o,s]of r)a[o]=s;return a},ErrorPopup=_export_sfc(_sfc_main$5,[["__scopeId","data-v-a3eb6cd2"]]),_hoisted_1$4={class:"cloud-error-page"},_hoisted_2$4={class:"flex items-center gap-[4rem]"},_hoisted_3$4={class:"flex-1"},_hoisted_4$4={class:"text-small text-grey-666 mb-[16px] leading-[1.6]"},_hoisted_5$3={class:"flex flex-wrap gap-[8px]"},_hoisted_6$3={class:"solution-list text-small text-default"},_hoisted_7$3=["onClick"],_sfc_main$4=defineComponent({__name:"cloud-error",props:{compData:{default:()=>({errorInfo:""})}},setup(n){const r=n,a=computed(()=>r.compData.errorInfo||""),o=ref(["本地服务器网络异常","本地服务器DNS配置异常","云端服务器故障"]),s=ref([{text:"在【设置】>【面板设置】中修改【云端节点请求方式】",link:"/config/panel",linkText:"点击前往"},{text:"在【设置】>【面板设置】中重置【云端通讯节点】",link:"/config/panel",linkText:"点击前往"},{text:"在【首页】右上角点击【修复】按钮尝试修复面板"},{text:"打开宝塔官网查看云端服务器是否在维护:",link:"https://www.bt.cn",linkText:"打开宝塔官网"},{text:"排查本地服务器网络是否存在异常"},{text:"向服务器提供商请求协助"},{text:"到宝塔官方论坛发帖求助:",link:"https://www.bt.cn/bbs",linkText:"打开宝塔论坛"}]),l=u=>{u&&(u.startsWith("http")?window.open(u,"_blank"):router.push(u))};return(u,c)=>{const d=ElTag,f=ElDivider;return openBlock(),createElementBlock("div",_hoisted_1$4,[createBaseVNode("div",_hoisted_2$4,[c[2]||(c[2]=createStaticVNode('<div class="relative flex-shrink-0" data-v-270a61e0><svg viewBox="0 0 187.472 132.276" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="187.472000" height="132.276001" fill="none" data-v-270a61e0><defs data-v-270a61e0><linearGradient id="paint_linear_27" x1="86.0563965" x2="154.535889" y1="-0.00100708008" y2="102.784721" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(223,223,223)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="0" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_28" x1="-0.00833129883" x2="53.8443108" y1="28.5800018" y2="104.917236" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(227,226,226)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="0" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_29" x1="19" x2="19.6784611" y1="119.157043" y2="135.526398" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(227,226,226)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="0.600000024" stop-opacity="0.501999974" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="0" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_30" x1="67.2510681" x2="67.6075134" y1="90.6710205" y2="92.2056656" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(168,168,168)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(219,218,218)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_31" x1="60.8450317" x2="64.0989151" y1="97.2300415" y2="98.8166046" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(140,140,140)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_32" x1="60.7590332" x2="64.7004395" y1="76.0589905" y2="76.8980408" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(149,149,149)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(214,214,214)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_33" x1="48.9510498" x2="49.2617912" y1="91.0339966" y2="93.2987976" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(147,147,147)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(208,208,208)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_34" x1="49.0864983" x2="63.6288681" y1="88.0272903" y2="72.1247635" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(172,172,172)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(236,235,235)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_35" x1="50.8613892" x2="75.600029" y1="78.3011856" y2="95.5663605" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(231,231,231)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(201,201,201)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_36" x1="110.310097" x2="84.0782242" y1="73.0940475" y2="87.6867981" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(142,142,142)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(201,201,201)" offset="0.245000005" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(239,239,239)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_37" x1="90.1219864" x2="92.2109909" y1="79.0149841" y2="79.0149841" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(242,242,242)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_38" x1="92.6749954" x2="94.5319901" y1="92.0129776" y2="92.0129776" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(229,229,229)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(253,253,253)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_39" x1="98.940979" x2="101.957977" y1="78.7829895" y2="78.7829895" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(242,242,242)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_40" x1="81.9089737" x2="111.015495" y1="88.989418" y2="80.1209946" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(213,213,213)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_41" x1="118.043434" x2="82.1127319" y1="78.686203" y2="99.8522873" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(239,239,239)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(244,243,243)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_42" x1="112.882225" x2="97.8576736" y1="83.2102966" y2="115.951485" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(201,201,201)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(255,255,255)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_43" x1="140.13205" x2="140.488495" y1="90.6699829" y2="92.204628" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(168,168,168)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(219,218,218)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_44" x1="133.726013" x2="136.979904" y1="97.2290649" y2="98.8156281" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(140,140,140)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_45" x1="133.640015" x2="137.581421" y1="76.0579834" y2="76.8970337" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(149,149,149)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(214,214,214)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_46" x1="121.832031" x2="122.142769" y1="91.03302" y2="93.297821" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(147,147,147)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(208,208,208)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_47" x1="121.967484" x2="136.509857" y1="88.0262833" y2="72.1237564" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(172,172,172)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(236,235,235)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_48" x1="123.742371" x2="148.481018" y1="78.3001785" y2="95.5653534" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(231,231,231)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(201,201,201)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_49" x1="87.6359177" x2="87.6359177" y1="46.8150024" y2="42.4461555" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(201,201,201)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(172,172,172)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_50" x1="75.8600388" x2="75.8600388" y1="34.0639954" y2="31.9658813" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(201,201,201)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(172,172,172)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_51" x1="108.917877" x2="109.440331" y1="15.9551601" y2="9.80280495" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(232,232,232)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_52" x1="102.299835" x2="102.822289" y1="7.13716698" y2="0.984811783" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(232,232,232)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient><linearGradient id="paint_linear_53" x1="117.366234" x2="117.727646" y1="17.9389172" y2="13.6791496" gradientUnits="userSpaceOnUse" data-v-270a61e0><stop stop-color="rgb(234,234,234)" offset="0" stop-opacity="1" data-v-270a61e0></stop><stop stop-color="rgb(220,219,219)" offset="1" stop-opacity="1" data-v-270a61e0></stop></linearGradient></defs><rect id="svg 4" width="187.472000" height="132.276001" x="0.000000" y="0.000000" data-v-270a61e0></rect><g id="缺省页" data-v-270a61e0><g id="组_6667" data-v-270a61e0><path id="路径_15693" d="M182.402 124.456C185.202 124.456 187.472 112.225 187.472 97.136C187.472 82.047 185.202 69.816 182.402 69.816C181.258 69.8307 180.126 69.5804 179.096 69.0845C178.065 68.5887 177.162 67.8608 176.46 66.958C175.453 65.6413 174.689 64.1561 174.202 62.5717C173.715 60.9872 173.514 59.3288 173.608 57.674C173.608 44.674 168.955 35.439 164.656 33.651C163.416 33.39 161.487 33.961 159.585 31.999C158.728 31.2193 158.056 30.2581 157.617 29.1855C157.178 28.1129 156.985 26.9559 157.05 25.799C157.05 11.55 153.077 -0.00100708 148.177 -0.00100708C143.277 -0.00100708 139.304 11.551 139.304 25.799C139.304 28.44 139.515 29.717 137.614 31.68C135.713 33.643 132.936 33.386 131.698 33.648C127.398 35.437 124.093 46.19 124.093 59.189C124.059 61.7348 123.812 64.2734 123.355 66.778C123.355 66.778 121.934 71.271 119.869 68.865C117.804 66.459 116.975 63.217 116.62 60.187C115.611 51.571 113.442 45.529 111.42 45.529C109.354 45.529 107.577 51.815 106.779 60.921C106.684 63.2893 105.972 65.5917 104.713 67.6C104.373 68.222 103.883 68.7497 103.288 69.1359C102.693 69.5221 102.012 69.7548 101.305 69.813L101.279 69.813C99.2234 69.813 97.4534 76.039 96.6472 85.107C96.7139 86.1156 96.5056 87.1235 96.0449 88.0231C95.584 88.9228 94.8877 89.6806 94.03 90.2158C93.1726 90.7509 92.1858 91.0434 91.175 91.062L91.1382 91.062C90.4531 91.062 89.7891 91.744 89.1641 93.09C88.417 94.8661 87.876 96.7219 87.5508 98.621C86.4949 104.645 85.9963 110.753 86.062 116.868C86.062 119.455 86.137 122.008 86.2849 124.457L182.402 124.457L182.402 124.456Z" fill="url(#paint_linear_27)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_15694" d="M19.835 124.457L73.443 124.457C73.658 121.483 73.766 118.381 73.766 115.238C73.8614 107.793 73.137 100.36 71.606 93.074C71.1242 90.7415 70.336 88.4829 69.262 86.357C68.353 84.723 67.387 83.894 66.391 83.894L66.338 83.894C66.338 83.894 62.811 83.782 60.822 81.974C58.833 80.166 58.609 78.84 58.379 76.661C57.206 65.644 54.631 58.08 51.641 58.08C51.1191 57.9776 50.6094 57.8211 50.12 57.613C49.7584 57.4535 49.4341 57.2202 49.168 56.928C46.168 54.005 44.96 50.067 44.443 46.386C42.975 35.92 39.821 28.58 36.875 28.58C33.875 28.58 31.286 36.216 30.125 47.28C29.9618 50.2251 28.9142 53.0526 27.119 55.393C26.5429 56.1796 25.7994 56.8286 24.9423 57.2932C24.0851 57.7579 23.1355 58.0266 22.162 58.08L22.125 58.08C19.135 58.08 16.56 65.644 15.387 76.659C15.157 78.837 14.934 80.159 12.944 81.972C10.954 83.785 7.42799 83.892 7.42799 83.892L7.37499 83.892C6.37499 83.892 5.41399 84.722 4.50399 86.355C3.42977 88.4815 2.6416 90.7408 2.15999 93.074C0.629009 100.36 -0.0953491 107.793 -1.21593e-05 115.238C-1.21593e-05 118.38 0.108988 121.48 0.322988 124.457L19.835 124.457Z" fill="url(#paint_linear_28)" fill-rule="nonzero" data-v-270a61e0></path></g><path id="路径_8510" d="M177.25 132.275C177.25 128.654 141.824 119.157 98.125 119.157C54.426 119.157 19 128.657 19 132.275L177.25 132.275Z" fill="url(#paint_linear_29)" fill-rule="nonzero" data-v-270a61e0></path><g id="组_5953" data-v-270a61e0><g id="组_5944" data-v-270a61e0><g id="组_5940" data-v-270a61e0><path id="路径_8521" d="M68.8361 91.318L67.2511 90.81L71.2371 90.671L72.8221 91.179L68.8361 91.318Z" fill="url(#paint_linear_30)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5941" data-v-270a61e0><path id="路径_8522" d="M62.456 103.838L60.87 103.33L60.845 97.23L62.43 97.7371L62.456 103.838Z" fill="url(#paint_linear_31)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5942" data-v-270a61e0><path id="路径_8523" d="M62.407 91.542L60.821 91.034L60.759 76.059L62.344 76.567L62.407 91.542Z" fill="url(#paint_linear_32)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5943" data-v-270a61e0><path id="路径_8524" d="M50.5361 91.957L48.951 91.449L60.819 91.034L62.405 91.542L50.5361 91.957Z" fill="url(#paint_linear_33)" fill-rule="nonzero" data-v-270a61e0></path></g><path id="路径_8525" d="M68.741 68.565L67.156 68.057L58.684 68.357L41.743 90.491L41.773 97.899L43.358 98.407L43.328 90.998L60.273 68.857L68.741 68.565Z" fill="url(#paint_linear_34)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_8526" d="M68.741 68.565L68.841 91.317L72.827 91.178L72.853 97.378L68.8671 97.517L68.892 103.617L62.461 103.841L62.4361 97.741L43.364 98.407L43.334 90.999L60.276 68.861L68.741 68.565ZM62.405 91.542L62.343 76.567L50.537 91.957L62.405 91.542Z" fill="url(#paint_linear_35)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="编组-20" data-v-270a61e0><circle id="椭圆形" cx="96.1559982" cy="84.3529892" r="14.6219997" fill="url(#paint_linear_36)" data-v-270a61e0></circle><g id="椭圆形-2" data-v-270a61e0><circle id="椭圆_26" cx="89.8209991" cy="79.0899811" r="1.94599998" fill="rgb(229,229,229)" data-v-270a61e0></circle><circle id="椭圆_27" cx="89.8209991" cy="79.0899811" r="1.94599998" fill="rgb(153,152,152)" data-v-270a61e0></circle></g><ellipse id="椭圆形-3" rx="2.089000" ry="1.857000" cx="90.1219864" cy="79.0149841" fill="url(#paint_linear_37)" data-v-270a61e0></ellipse><g id="椭圆形-4" data-v-270a61e0><circle id="椭圆_28" cx="92.496994" cy="92.2759857" r="1.94599998" fill="rgb(159,159,159)" data-v-270a61e0></circle><circle id="椭圆_29" cx="92.496994" cy="92.2759857" r="1.94599998" fill="rgb(159,159,159)" data-v-270a61e0></circle></g><circle id="椭圆形-5" cx="92.6749954" cy="92.0129776" r="1.85699999" fill="url(#paint_linear_38)" data-v-270a61e0></circle><circle id="椭圆形-6" cx="98.940979" cy="78.7829895" r="3.01699996" fill="rgb(226,226,226)" data-v-270a61e0></circle><circle id="椭圆形-7" cx="98.940979" cy="78.7829895" r="3.01699996" fill="url(#paint_linear_39)" data-v-270a61e0></circle><path id="路径-14" d="M85.489 93.366L110.232 80.258C110.487 81.2919 110.664 82.3435 110.761 83.404C110.804 84.2983 110.774 85.1946 110.671 86.084L86.171 94.738C86.171 94.738 85.19 93.95 85.489 93.366Z" opacity="0.699000001" fill="url(#paint_linear_40)" fill-rule="evenodd" data-v-270a61e0></path><path id="形状结合" d="M82.259 88.362L82.839 90.049C81.815 91.3463 81.5673 92.276 82.096 92.838C82.889 93.681 95.462 88.021 98.858 86.038C102.254 84.055 111.422 76.584 110.852 75.768C110.472 75.224 109.506 75.22 107.965 75.768L106.926 74.568C112.895 71.176 116.41 69.951 117.812 71.759C119.788 74.059 108.704 82.882 100.09 87.396C91.476 91.91 77.135 98.973 75.449 96.568C74.325 94.9653 76.595 92.23 82.259 88.362Z" fill="url(#paint_linear_41)" fill-rule="evenodd" data-v-270a61e0></path><path id="形状结合-2" d="M82.243 88.362L82.683 89.856C81.4163 91.284 81.045 92.279 81.569 92.841C82.357 93.684 93.869 88.41 98.243 86.041C102.617 83.672 108.806 78.688 110.493 76.566C112.18 74.444 109.231 74.931 107.693 75.474L106.649 74.236C112.587 70.844 115.823 70.249 117.133 71.782C119.099 74.082 108.033 82.882 99.461 87.397C90.889 91.912 76.634 98.973 74.957 96.568C73.839 94.9653 76.2676 92.23 82.243 88.362Z" fill="url(#paint_linear_42)" fill-rule="evenodd" data-v-270a61e0></path><path id="路径-4" d="M83.034 77.937C72.43 89.989 80.458 86.9043 107.118 68.683" stroke="rgb(220,219,219)" stroke-linecap="round" stroke-dasharray="2 4 " stroke-width="1.000000" data-v-270a61e0></path><g id="火箭" data-v-270a61e0><path id="形状" d="M111.826 64.317C111.82 64.2929 111.807 64.2709 111.79 64.2533C111.772 64.2357 111.75 64.2232 111.726 64.217C111.281 64.112 110.814 64.1403 110.385 64.2981C109.956 64.456 109.582 64.7366 109.311 65.105C109.301 65.1183 109.289 65.1298 109.276 65.139C109.262 65.1483 109.247 65.155 109.231 65.159C108.908 65.2399 108.613 65.4076 108.378 65.644C108.268 65.7542 108.172 65.8779 108.092 66.012C108.078 66.0372 108.072 66.0661 108.075 66.0947C108.078 66.1234 108.09 66.1504 108.109 66.1722C108.128 66.194 108.153 66.2095 108.181 66.2166C108.209 66.2237 108.238 66.2221 108.265 66.212C108.466 66.1392 108.678 66.1027 108.892 66.104C108.892 66.123 108.885 66.141 108.882 66.16C109.035 66.3387 109.195 66.5113 109.361 66.678C109.527 66.8447 109.7 67.0043 109.879 67.157L109.932 67.153C109.933 67.3667 109.897 67.579 109.824 67.78C109.814 67.807 109.812 67.8364 109.819 67.8643C109.827 67.8922 109.842 67.9172 109.864 67.9361C109.886 67.9549 109.913 67.9666 109.941 67.9697C109.97 67.9727 109.999 67.9669 110.024 67.953C110.158 67.8734 110.282 67.7773 110.392 67.667C110.628 67.4322 110.796 67.1372 110.877 66.814C110.881 66.798 110.888 66.7829 110.897 66.7692C110.906 66.7556 110.918 66.7437 110.931 66.734C111.026 66.6642 111.116 66.5873 111.199 66.504C111.481 66.223 111.687 65.8746 111.796 65.4919C111.906 65.1092 111.916 64.7048 111.826 64.317ZM110.871 65.834C110.805 65.9001 110.721 65.9452 110.629 65.9634C110.537 65.9816 110.442 65.9723 110.356 65.9365C110.269 65.9007 110.195 65.84 110.143 65.7623C110.091 65.6845 110.064 65.593 110.064 65.4995C110.064 65.4059 110.091 65.3145 110.143 65.2367C110.195 65.1589 110.269 65.0983 110.356 65.0625C110.442 65.0267 110.537 65.0173 110.629 65.0356C110.721 65.0538 110.805 65.0988 110.871 65.165C110.93 65.2237 110.972 65.2968 110.993 65.377C111.015 65.4573 111.015 65.5417 110.993 65.6219C110.972 65.7021 110.93 65.7753 110.871 65.834Z" fill="rgb(160,160,160)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径" d="M108.488 66.876C108.334 67.03 107.679 67.986 107.866 68.176C108.053 68.366 109.008 67.708 109.166 67.554C109.214 67.4945 109.247 67.4234 109.259 67.3477C109.272 67.272 109.264 67.1943 109.238 67.1223C109.211 67.0503 109.167 66.9864 109.108 66.937C109.059 66.8774 108.995 66.8318 108.922 66.8047C108.85 66.7776 108.772 66.7699 108.696 66.7824C108.619 66.7949 108.548 66.8272 108.488 66.876Z" fill="rgb(160,160,160)" fill-rule="nonzero" data-v-270a61e0></path></g></g><g id="组_5954" data-v-270a61e0><g id="组_5940-2" data-v-270a61e0><path id="路径_8521-2" d="M141.717 91.317L140.132 90.809L144.118 90.67L145.703 91.178L141.717 91.317Z" fill="url(#paint_linear_43)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5941-2" data-v-270a61e0><path id="路径_8522-2" d="M135.337 103.837L133.751 103.329L133.726 97.2291L135.311 97.7361L135.337 103.837Z" fill="url(#paint_linear_44)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5942-2" data-v-270a61e0><path id="路径_8523-2" d="M135.288 91.541L133.702 91.033L133.64 76.058L135.225 76.566L135.288 91.541Z" fill="url(#paint_linear_45)" fill-rule="nonzero" data-v-270a61e0></path></g><g id="组_5943-2" data-v-270a61e0><path id="路径_8524-2" d="M123.417 91.956L121.832 91.448L133.7 91.033L135.286 91.541L123.417 91.956Z" fill="url(#paint_linear_46)" fill-rule="nonzero" data-v-270a61e0></path></g><path id="路径_8525-2" d="M141.622 68.564L140.037 68.056L131.565 68.356L114.624 90.49L114.654 97.898L116.239 98.406L116.209 90.997L133.154 68.856L141.622 68.564Z" fill="url(#paint_linear_47)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_8526-2" d="M141.622 68.564L141.722 91.316L145.708 91.177L145.734 97.377L141.748 97.516L141.773 103.616L135.342 103.84L135.317 97.74L116.245 98.406L116.215 90.998L133.157 68.86L141.622 68.564ZM135.286 91.541L135.224 76.566L123.418 91.956L135.286 91.541Z" fill="url(#paint_linear_48)" fill-rule="nonzero" data-v-270a61e0></path></g></g><path id="路径_16335" d="M87.6359 46.815L87.6359 46.793C86.4209 43.209 82.4689 41.527 79.1129 42.044C81.5999 40.425 85.7069 39.993 87.6359 42.476L87.6359 42.497C89.5639 40.036 93.6909 40.446 96.1589 42.065C92.8029 41.565 88.8509 43.254 87.6359 46.814L87.6359 46.815Z" fill="url(#paint_linear_49)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_16336" d="M75.86 34.064L75.86 34.053C75.6508 33.5273 75.3241 33.0564 74.9048 32.6765C74.4855 32.2966 73.9849 32.0176 73.4412 31.861C72.8975 31.7044 72.3252 31.6743 71.768 31.773C72.962 30.995 74.934 30.788 75.86 31.98L75.86 31.99C76.785 30.808 78.767 31.005 79.952 31.783C79.3951 31.6877 78.8239 31.72 78.2813 31.8775C77.7387 32.0349 77.2389 32.3134 76.8195 32.692C76.4001 33.0705 76.072 33.5393 75.86 34.063L75.86 34.064Z" fill="url(#paint_linear_50)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_16337" d="M100.511 38.15L100.511 38.143C100.366 37.7783 100.139 37.4515 99.8484 37.1879C99.5575 36.9242 99.2102 36.7306 98.8329 36.622C98.4557 36.5133 98.0586 36.4925 97.672 36.561C97.947 36.3539 98.2664 36.2138 98.6049 36.1518C98.9435 36.0897 99.2918 36.1074 99.6223 36.2034C99.9528 36.2995 100.256 36.4712 100.509 36.705L100.509 36.712C100.762 36.4793 101.066 36.3084 101.396 36.2128C101.727 36.1172 102.075 36.0996 102.413 36.1612C102.751 36.2228 103.071 36.3621 103.346 36.568C102.96 36.5019 102.564 36.5242 102.188 36.6334C101.811 36.7426 101.465 36.9357 101.174 37.1982C100.883 37.4608 100.656 37.7858 100.509 38.149L100.511 38.15Z" fill="url(#paint_linear_51)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_16338" d="M93.893 29.332L93.893 29.325C93.7479 28.9603 93.5212 28.6335 93.2304 28.3699C92.9395 28.1062 92.5921 27.9126 92.2149 27.804C91.8376 27.6953 91.4405 27.6745 91.054 27.743C91.3289 27.5359 91.6483 27.3958 91.9869 27.3338C92.3254 27.2717 92.6738 27.2894 93.0043 27.3854C93.3348 27.4815 93.6384 27.6532 93.891 27.887L93.891 27.894C94.1441 27.6613 94.4478 27.4904 94.7781 27.3948C95.1085 27.2993 95.4565 27.2816 95.7948 27.3432C96.1331 27.4048 96.4526 27.5441 96.728 27.75C96.3419 27.6839 95.9458 27.7062 95.5695 27.8154C95.1933 27.9246 94.8468 28.1177 94.556 28.3802C94.2653 28.6428 94.0379 28.9678 93.891 29.331L93.893 29.332Z" fill="url(#paint_linear_52)" fill-rule="nonzero" data-v-270a61e0></path><path id="路径_16339" d="M111.541 33.306C111.441 33.0527 111.284 32.8257 111.082 32.6425C110.881 32.4593 110.64 32.3247 110.378 32.249C110.117 32.1733 109.841 32.1586 109.573 32.206C109.764 32.0625 109.985 31.9655 110.22 31.9225C110.454 31.8795 110.696 31.8918 110.925 31.9583C111.154 32.0249 111.364 32.1439 111.539 32.306C111.714 32.1447 111.925 32.0264 112.154 31.9602C112.383 31.894 112.624 31.8817 112.858 31.9243C113.093 31.967 113.314 32.0634 113.505 32.206C113.237 32.1607 112.963 32.1767 112.702 32.2529C112.442 32.3291 112.202 32.4635 112 32.6459C111.799 32.8283 111.642 33.054 111.541 33.306Z" fill="url(#paint_linear_53)" fill-rule="nonzero" data-v-270a61e0></path></g></svg></div>',1)),createBaseVNode("div",_hoisted_3$4,[c[1]||(c[1]=createBaseVNode("h3",{class:"text-subtitleLarge font-semibold text-grey-333 mb-[8px]"},"请求云端异常",-1)),createBaseVNode("p",_hoisted_4$4,toDisplayString(unref(a)),1),createBaseVNode("div",_hoisted_5$3,[c[0]||(c[0]=createBaseVNode("div",{class:"text-small text-tertiary flex items-center"},"可能的原因:",-1)),(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(o),p=>(openBlock(),createBlock(d,{key:p,size:"small",effect:"plain",type:"info"},{default:withCtx(()=>[createTextVNode(toDisplayString(p),1)]),_:2},1024))),128))])])]),createVNode$1(f,{class:"my-[4rem]"}),createBaseVNode("div",null,[c[3]||(c[3]=createStaticVNode('<div class="flex items-center gap-[8px] mb-[16px]" data-v-270a61e0><svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="20.000000" height="20.000000" fill="none" data-v-270a61e0><rect id="svg 5" width="20.000000" height="20.000000" x="0.000000" y="0.000000" data-v-270a61e0></rect><path id="矢量 1" d="M3.30267 8.05334C3.30267 8.17036 3.27187 8.28533 3.21336 8.38667C3.15484 8.48802 3.07069 8.57218 2.96934 8.63069C2.86799 8.6892 2.75303 8.72001 2.63601 8.72L1.46934 8.72C1.32855 8.72 1.19138 8.67543 1.07748 8.59268C0.963585 8.50993 0.878808 8.39324 0.835302 8.25935C0.791797 8.12545 0.791797 7.98122 0.835302 7.84733C0.878808 7.71343 0.963585 7.59674 1.07748 7.51399C1.19138 7.43124 1.32855 7.38667 1.46934 7.38667L2.63601 7.38667C2.75303 7.38667 2.86799 7.41747 2.96934 7.47599C3.07069 7.5345 3.15484 7.61866 3.21336 7.72C3.27187 7.82135 3.30267 7.93631 3.30267 8.05334ZM19.3333 8.05334C19.3333 8.17036 19.3025 8.28533 19.244 8.38667C19.1855 8.48802 19.1013 8.57218 19 8.63069C18.8987 8.6892 18.7837 8.72001 18.6667 8.72L17.5 8.72C17.3592 8.72 17.222 8.67543 17.1081 8.59268C16.9942 8.50993 16.9095 8.39324 16.866 8.25935C16.8225 8.12545 16.8225 7.98122 16.866 7.84733C16.9095 7.71343 16.9942 7.59674 17.1081 7.51399C17.222 7.43124 17.3592 7.38667 17.5 7.38667L18.6667 7.38667C18.7837 7.38667 18.8987 7.41747 19 7.47599C19.1013 7.5345 19.1855 7.61866 19.244 7.72C19.3025 7.82135 19.3333 7.93631 19.3333 8.05334ZM4.51734 1.80267L5.34267 2.62667C5.44235 2.72621 5.50796 2.85474 5.53009 2.99386C5.55223 3.13297 5.52975 3.27552 5.46589 3.40108C5.40203 3.52664 5.30005 3.62875 5.17459 3.69279C5.04912 3.75683 4.9066 3.77951 4.76746 3.75757C4.62831 3.73563 4.49968 3.67021 4.40001 3.57067L3.57334 2.744C3.47676 2.64374 3.414 2.51576 3.39385 2.37802C3.37369 2.24028 3.39716 2.09968 3.46097 1.97596C3.52477 1.85223 3.62571 1.75158 3.74961 1.68813C3.87352 1.62467 4.01418 1.6016 4.15187 1.62214C4.28955 1.64268 4.41735 1.70581 4.51734 1.80267L4.51734 1.80267ZM17.2173 1.80267C17.3001 1.88542 17.3595 1.98847 17.3898 2.10149C17.4201 2.21451 17.4201 2.3335 17.3898 2.44652C17.3595 2.55953 17.3001 2.66259 17.2173 2.74534L16.392 3.57067C16.2923 3.67021 16.1637 3.73563 16.0246 3.75757C15.8854 3.77951 15.7429 3.75683 15.6174 3.69279C15.492 3.62875 15.39 3.52664 15.3261 3.40108C15.2623 3.27552 15.2398 3.13297 15.2619 2.99386C15.2841 2.85474 15.3497 2.72621 15.4493 2.62667L16.2747 1.80267C16.3574 1.71995 16.4605 1.66046 16.5735 1.63019C16.6865 1.59991 16.8055 1.59991 16.9185 1.63019C17.0315 1.66046 17.1346 1.71995 17.2173 1.80267L17.2173 1.80267ZM11.9973 17.3547C12.1381 17.3547 12.2753 17.3992 12.3892 17.482C12.5031 17.5647 12.5879 17.6814 12.6314 17.8153C12.6749 17.9492 12.6749 18.0935 12.6314 18.2273C12.5879 18.3612 12.5031 18.4779 12.3892 18.5607C12.2753 18.6434 12.1381 18.688 11.9973 18.688L8.08401 18.688C7.94322 18.688 7.80605 18.6434 7.69215 18.5607C7.57825 18.4779 7.49347 18.3612 7.44997 18.2273C7.40646 18.0935 7.40646 17.9492 7.44997 17.8153C7.49347 17.6814 7.57825 17.5647 7.69215 17.482C7.80605 17.3992 7.94322 17.3547 8.08401 17.3547L11.9973 17.3547L11.9973 17.3547ZM10 3.43734C10.934 3.43699 11.8517 3.68192 12.6613 4.14761C13.4708 4.61331 14.1439 5.28344 14.6132 6.09096C15.0825 6.89848 15.3315 7.81507 15.3353 8.74904C15.3391 9.683 15.0975 10.6016 14.6348 11.4129C14.1721 12.2242 13.5045 12.8998 12.6987 13.372L12.6667 16.5227C12.6664 16.5518 12.6586 16.5803 12.6439 16.6054C12.6292 16.6306 12.6082 16.6514 12.583 16.6659C12.5577 16.6804 12.5291 16.688 12.5 16.688L7.51601 16.688C7.48675 16.688 7.45801 16.6803 7.43267 16.6657C7.40734 16.651 7.3863 16.63 7.37167 16.6047C7.35704 16.5793 7.34934 16.5506 7.34934 16.5213L7.34934 13.4C6.53534 12.9343 5.85852 12.2623 5.38712 11.4516C4.91573 10.6409 4.66643 9.72021 4.66436 8.78242C4.6623 7.84464 4.90754 6.92289 5.37535 6.11012C5.84317 5.29735 6.51702 4.62231 7.32896 4.15305C8.1409 3.6838 9.06222 3.43693 10 3.43734ZM10.0413 0.104004C10.1584 0.104004 10.2733 0.134808 10.3747 0.19332C10.476 0.251832 10.5602 0.335991 10.6187 0.437337C10.6772 0.538683 10.708 0.653646 10.708 0.770671L10.708 1.93734C10.708 2.07812 10.6634 2.2153 10.5807 2.32919C10.4979 2.44309 10.3812 2.52787 10.2474 2.57137C10.1135 2.61488 9.96923 2.61488 9.83533 2.57137C9.70144 2.52787 9.58475 2.44309 9.502 2.32919C9.41924 2.2153 9.37467 2.07812 9.37467 1.93734L9.37467 0.770671C9.37467 0.653646 9.40548 0.538683 9.46399 0.437337C9.5225 0.335991 9.60666 0.251832 9.70801 0.19332C9.80935 0.134808 9.92432 0.104004 10.0413 0.104004L10.0413 0.104004Z" fill="rgb(255,186,39)" fill-rule="nonzero" data-v-270a61e0></path></svg><span class="text-medium text-secondary" data-v-270a61e0>解决方案</span><span class="text-small text-tertiary" data-v-270a61e0>请按顺序逐一尝试</span></div>',1)),createBaseVNode("ol",_hoisted_6$3,[(openBlock(!0),createElementBlock(Fragment,null,renderList(unref(s),(p,v)=>(openBlock(),createElementBlock("li",{key:v,class:"mb-[8px] leading-[1.8]"},[createTextVNode(toDisplayString(v+1)+". "+toDisplayString(p.text),1),p.linkText&&p.link?(openBlock(),createElementBlock("span",{key:0,class:"bt-link ml-[4px]",onClick:g=>l(p.link)},toDisplayString(p.linkText),9,_hoisted_7$3)):createCommentVNode("",!0)]))),128))])])])}}}),CloudError=_export_sfc(_sfc_main$4,[["__scopeId","data-v-270a61e0"]]),openBtError=(n,r,a)=>{useDialog({area:"120",title:!1,component:ErrorPopup,compData:{errorBody:n,errorFind:r,isBuy:a}})},openCloudError=n=>{useDialog({area:"80",title:!1,component:CloudError,compData:{errorInfo:n}})},Message$1=useMessage();class HttpRequest{constructor(r={}){se(this,"instance");se(this,"requestTemplate",{data:{},code:0,msg:"success",status:!0,default:!0,timestamp:0});const a=createDefaultOption(r);this.instance=axios.create(a),this.handleRequestInterceptors(),this.handleResponseInterceptors()}handleRequestInterceptors(){const r=new AxiosCanceler;this.instance.interceptors.request.use(a=>(a.skipPending||r.addPending(a),a),a=>Promise.reject(a))}handleResponseInterceptors(){const r=new AxiosCanceler;this.instance.interceptors.response.use(a=>(a&&r.removePending(a.config),a),a=>Promise.reject(a))}handleToken(r){const a=Date.now(),o=md5(String(a).concat(md5(r)));return{request_time:a,request_token:o}}requestMiddleware(r,a="default"){const{data:o,status:s}=r;let l={...this.requestTemplate,timestamp:new Date().getTime(),default:!1,code:s};const u=has$2("status",o)&&has$2("msg",o);if(u&&has$2("data",o)&&(l.default=!0),a==="ignore")return r;const c=["string","object","boolean","array","number","default"],{msg:d,status:f,redirect:p}=o;if(p)return window.location.href=p;if(isNumber$1(f)&&isUndefined(o==null?void 0:o.code)&&isObject$4(o==null?void 0:o.message)){let v="";return isUndefined(o.message.result)||(v=o.message.result),{code:200,status:f>-1,msg:v,data:o.message,default:!1,timestamp:o.timestamp}}if(isNumber$1(f)&&!isUndefined(o.msg)&&!isUndefined(o.error_msg))return{code:o.code,status:f>-1,msg:o.msg||o.error_msg,data:o.message||o,default:!1,timestamp:o.timestamp};if(c.includes(a)){const v=isBoolean(f);if(isObject$4(o)&&u&&a==="default"&&v){if(isString$1(d)&&!isEmpty(d)&&(l={...l,...o}),isObject$4(d)){if(!has$2("status",d))return{...l,data:{...d,status:f}};l={...l,data:{...d,newStatus:f}}}isString$1(d)||(l={...l,status:!0,data:{value:d,status:f},msg:o.status?"success":"error"})}else isString$1(d)&&(l.msg=d),isBoolean(f)&&(l.status=f),l={...l,data:o};return l}if(u&&a==="msg")return has$2("data",o)&&isObject$4(o.data)?l={...l,...o}:l={...l,...o,data:o},isString$1(o.msg)?l={...l,msg:o.msg}:(has$2("status",o)&&(l.msg=o.status?"success":"error"),l={...l,data:o.msg}),l;if(isFunction$1(a))return a(o);throw Error(o,r.request.responseURL)}handleError(r){const a="We need to make sure this has a favicon so that the debugger does";if(has$2("response",r)){const{response:o,message:s}=r,l=o==null?void 0:o.data.indexOf(a);if(s.indexOf("Network Error")>-1&&s.indexOf("timeout")>-1&&useMessage().error("请求超时,请稍后重试"),s.indexOf("code 500")>-1)if(o.data.indexOf("请先绑定宝塔帐号")>-1)setTimeout(()=>{window.location.href="/bind"},1e3);else if(o.data.indexOf("建议按顺序逐一尝试以下解决方案")>-1){const u=o.data.split("Error: ")[1].split("</pre>")[0].replace("面板运行时发生错误:","").replace("public.PanelError:","").trim();Message$1.msg({customClass:"panel-cloud-error",dangerouslyUseHTMLString:!0,message:u,type:"error",duration:0,showClose:!0})}else return o.data.indexOf("抱歉,连接云端服务器失败")>-1?openCloudError(o.data):o.data?openBtError(o.data,l,!1):!1;if(s.indexOf("code 404")>-1&&Message$1.error("请求错误,请稍后重试"),s.indexOf("code 401")>-1&&(window.location.href="/"),s.indexOf("Traceback")>-1)return openBtError(s,!0,!1)}else{if(axios.isCancel(r))return Promise.reject(r);const{message:o}=r;return o.indexOf("Traceback")>-1?openBtError(o,!0,!1):(o.indexOf("TypeError Middle")>-1&&Message$1.msg({customClass:"panel-cloud-error",dangerouslyUseHTMLString:!0,message:"请求中间件类型验证失败,请检查请求数据类型是否正确<br />".concat(o),type:"error",duration:0,showClose:!0}),new Error(o))}return r}async request({url:r,method:a="POST",data:o={},customType:s="default",loading:l="",check:u="default",skipPending:c=!1}){var v;const d=createUrl({url:r,customType:s});let f=null,p=null;l&&(f=Message$1.load(l));try{return p=await this.instance.request({url:d,method:a,data:o,transformRequest:[handleTransformRequest],skipPending:c}),isString$1(p==null?void 0:p.data)&&((v=p==null?void 0:p.data)==null?void 0:v.indexOf("密码已过期,请修改"))>-1?window.location.reload():this.requestMiddleware(p,u)}catch(g){return u==="ignore"?g:this.handleError(g)}finally{f==null||f.close()}}get(r,a={}){return(isString$1(a)||isFunction$1(a))&&(a={check:a}),this.request({url:r,method:"GET",...a})}post(r,a={}){return(isString$1(a)||isFunction$1(a))&&(a={check:a}),this.request({url:r,method:"POST",...a})}}const createAxios=(n={})=>new HttpRequest(n),useAxios=createAxios(),_hoisted_1$3={class:"content flex items-center"},_hoisted_2$3={class:"message flex-1 ml-4 py-[.3rem] leading-[2.4rem] text-base"},_hoisted_3$3=["innerHTML"],_hoisted_4$3={key:1,class:"text text-medium leading-[2.5rem] flex !flex-wrap break-all"},_hoisted_5$2={key:0,class:"vcode flex items-center h-[4.8rem] mt-4 pl-[1.2rem] text-base"},_hoisted_6$2={class:"mx-[1rem]"},_hoisted_7$2={key:1,class:"bg-darker flex flex-col p-[12px] mt-[12px]"},_hoisted_8$1={class:"mb-[8px]"},_hoisted_9$1={class:"text-danger"},_hoisted_10={key:2,class:"flex p-[12px] mt-[8px] ml-[24px]"},_hoisted_11=["innerHTML"],_sfc_main$3=defineComponent({__name:"index",props:{compData:{default:()=>({content:"",type:"default",isHtml:!1,icon:!0,iconColor:"warning",input:{content:""},check:{content:"",value:!1,onConfirm:()=>{}}})}},emits:["cancel","confirm","close"],setup(n,{expose:r,emit:a}){var A;const o=useMessage(),s=n,l=a,u=ref(((A=s.compData.check)==null?void 0:A.value)||!1),c=reactive({num1:0,num2:0,gentle:void 0}),d=ref(""),f=computed(()=>isBoolean(s.compData.icon)&&s.compData.icon?"warning":s.compData.icon),p=computed(()=>s.compData.type==="calc"),v=computed(()=>s.compData.type==="input"),g=computed(()=>s.compData.type==="check"),y=()=>{c.num1=Math.round(Math.random()*9+1),c.num2=Math.round(Math.random()*9+1),c.gentle=void 0},_=(w=!0)=>c.gentle===c.num1+c.num2?(w&&l("cancel"),!1):(o.error("计算错误,请重新计算!"),!0),S=(w=!0)=>{var E,D;return d.value===((D=(E=s.compData)==null?void 0:E.input)==null?void 0:D.content)?(w&&l("cancel"),!1):(o.error("输入错误,请重新输入!"),!0)},b=()=>{const w=setTimeout(()=>{x(),clearTimeout(w)},0)},x=()=>{var w,E;try{return p.value&&_(!1)||v.value&&S(!1)?void 0:(g.value&&((E=(w=s.compData.check)==null?void 0:w.onConfirm)==null||E.call(w,u.value)),!0)}catch(D){}};return onMounted(()=>{d.value="",p.value&&y()}),r({onConfirm:x}),(w,E)=>{var M;const D=ElInputNumber,C=ElInput,$=ElCheckbox,P=resolveDirective("focus");return openBlock(),createElementBlock("div",{class:normalizeClass(["confirm-".concat(n.compData.type),"text-de relative p-2rem"])},[createBaseVNode("div",_hoisted_1$3,[withDirectives(createBaseVNode("i",{class:normalizeClass("svgtofont-el-".concat(unref(f)==="warning"?unref(f)+"-filled":unref(f)," !text-titleLarge text-").concat(n.compData.iconColor)),style:normalizeStyle$1(n.compData.iconColor!=="warning"?"color:".concat(n.compData.iconColor):"")},null,6),[[vShow,n.compData.icon]]),renderSlot(w.$slots,"default",{},()=>[createBaseVNode("div",_hoisted_2$3,[n.compData.isHtml?(openBlock(),createElementBlock("div",{key:0,class:"text",innerHTML:n.compData.content},null,8,_hoisted_3$3)):(openBlock(),createElementBlock("div",_hoisted_4$3,[unref(isString$1)(n.compData.content)?(openBlock(),createElementBlock(Fragment,{key:0},[createTextVNode(toDisplayString(n.compData.content),1)],64)):(openBlock(),createBlock(resolveDynamicComponent(n.compData.content),{key:1}))]))])],!0)]),unref(p)?(openBlock(),createElementBlock("div",_hoisted_5$2,[E[4]||(E[4]=createBaseVNode("span",null,"计算结果:",-1)),createBaseVNode("span",_hoisted_6$2,toDisplayString(unref(c).num1)+" + "+toDisplayString(unref(c).num2),1),E[5]||(E[5]=createBaseVNode("span",{class:"mr-[1rem]"},"=",-1)),withDirectives(createVNode$1(D,{modelValue:unref(c).gentle,"onUpdate:modelValue":E[0]||(E[0]=I=>unref(c).gentle=I),autofocus:"true","controls-position":"right",size:"small",onKeydown:withKeys(b,["native","enter"])},null,8,["modelValue"]),[[P]])])):createCommentVNode("",!0),unref(v)?(openBlock(),createElementBlock("div",_hoisted_7$2,[createBaseVNode("p",_hoisted_8$1,[E[6]||(E[6]=createTextVNode(" 请手动输入 ",-1)),createBaseVNode("span",_hoisted_9$1,'"'+toDisplayString((M=n.compData.input)==null?void 0:M.content)+'"',1),E[7]||(E[7]=createTextVNode(" ,完成验证 ",-1))]),withDirectives(createVNode$1(C,{modelValue:unref(d),"onUpdate:modelValue":E[1]||(E[1]=I=>isRef(d)?d.value=I:null),size:"small",onKeydown:withKeys(b,["native","enter"]),onPasteCapture:E[2]||(E[2]=withModifiers(()=>{},["prevent"]))},null,8,["modelValue"]),[[P]])])):createCommentVNode("",!0),unref(g)?(openBlock(),createElementBlock("div",_hoisted_10,[createVNode$1($,{modelValue:unref(u),"onUpdate:modelValue":E[3]||(E[3]=I=>isRef(u)?u.value=I:null)},{default:withCtx(()=>{var I;return[createBaseVNode("span",{innerHTML:(I=n.compData.check)==null?void 0:I.content},null,8,_hoisted_11)]}),_:1},8,["modelValue"])])):createCommentVNode("",!0)],2)}}}),confirmApp=_export_sfc(_sfc_main$3,[["__scopeId","data-v-a60fbeb1"]]),useConfirm=async n=>{const r={title:"提示",type:"default",width:"38rem",content:"",isHtml:!1,cancelText:"取消",confirmText:"确定",icon:!0,iconColor:"warning",input:{content:""},check:{content:"",value:!1,onConfirm:void 0}},{title:a,type:o,icon:s,iconColor:l,input:u,check:c,isHtml:d,content:f,width:p,confirmText:v,cancelText:g,showClose:y}={...r,...n};if(f==="")throw new Error("弹窗内容不能为空");if(o==="input"&&((u==null?void 0:u.content)===""||!(u!=null&&u.content)))throw new Error("输入文字验证值不能为空");if(o==="check"){if((c==null?void 0:c.content)===""||!(c!=null&&c.content))throw new Error("复选框文字验证值不能为空");if(!(c!=null&&c.onConfirm))throw new Error("复选框事件验证值不能为空")}return new Promise((_,S)=>{const b=useDialog({title:a,area:p,component:confirmApp,showClose:y,cancelText:g,confirmText:v,showFooter:!0,compData:{content:f,isHtml:d,type:o,icon:s,iconColor:l,input:u,check:c},onConfirm:()=>{n.onConfirm?_(n.onConfirm(b)):_(!0)},onCancel:()=>{n.onCancel&&n.onCancel(b),S("cancel")}})})},useHandleError=(n,r)=>{},Message=useMessage();class DataHandle{constructor(r,a){se(this,"data",{});se(this,"newData",{});se(this,"name","DataHandle");se(this,"_asyncPromiseData",async(r,a={})=>{has$2("data",r)&&has$2("code",r)?this.data=r.data:this.data=r,this.newData={},isEmpty$1(a)||this._dataVerify(a)});se(this,"_findAndAddProperty",(r,a,o,s)=>{try{let l=r;for(let u=0;u<a.length;u++){const c=a[u];if(!has$2(c,l))throw new Error("".concat(a.join("."),"字段中不存在").concat(c));if(u===a.length-1){if(!is(o,l[c]))throw new Error("".concat(a.join("."),"数据类型错误:").concat(c," 期望类型为:").concat(o));return this._dataModify(a.join("."),s,l[c])}l=l[c]}}catch(l){this._dataErrorHandle(l)}});se(this,"_dataModify",(r,a,o)=>{const s=isFunction$1(a)?a(o):o;isRef(a)&&(a.value=o),isReactive(a)&&(a[r]=o),isString$1(a)?this.newData[a]=o:isObject$4(s)?this.newData={...this.newData,...s}:this.newData[r]=s});se(this,"dataType",r=>{switch(r){case Array:return[];case Boolean:return!1;case Object:return{};case String:return"";case Number:return 0;default:return null}});se(this,"_dataErrorHandle",r=>{useHandleError(r,this.name)});se(this,"_dataVerify",r=>{try{if(isEmpty$1(this.data))throw new Error("传入数据为空或undefined");Object.entries(r).forEach(([a,o])=>{const[s,l]=isArray$2(o)?o:[o,null],u=a.split(".");if(u.length>1)return this._findAndAddProperty(this.data,u,s,l);if(has$2(a,this.data)){const c=this.data[a];if(isFunction$1(s)&&isNil(this.dataType(s))){const d=s;this._dataModify(a,l,d(c));return}if(!is(s,c))throw this._dataModify(a,l,this.dataType(s)),new Error("数据类型错误:".concat(a," 期望类型为:").concat(s));this._dataModify(a,l,c)}else this._dataModify(a,l,this.dataType(s))})}catch(a){this._dataErrorHandle(a)}});se(this,"exportData",(r=!0)=>{const a=this.newData;return this.destroy(),r?a:a.data});se(this,"destroy",()=>{this.data={},this.newData={}});this._asyncPromiseData(r,a)}capitalizeFirstLetter(r){return r&&r.charAt(0).toUpperCase()+r.slice(1)}}const useDataHandle=async n=>{if(isNil(n.request))return Message.error("请求挂载参数不能为空:request 为空"),{};const r=shallowRef(!0);let a={},{loading:o}=n;n.message&&isNil(n.data)&&(n.data={status:[Boolean,"status"],msg:[String,"msg"]}),isNil(n.data)&&(r.value=!1),isString$1(n.loading)&&(o=Message.load(o));try{isRef(o)&&(o.value=!0);const s=await n.request;let{data:l}=s;!(has$2("code",s)&&has$2("status",s))&&isObject$4(s)&&(l=s);const u=isObject$4(l);return u?!isObject$4(n.data)&&!r.value&&!isNil(n.data)?Message.error("数据验证格式错误,必须为 Record<string, KeyArray> 对象"):l=s:(l={data:l},isObject$4(n.data)?Message.error("当前请求返回值为非对象类型,请直接使用 data:[KeyArray] 进行数据验证"):n.data={data:n.data}),a=r.value?new DataHandle(l,n.data).exportData(u):l,has$2("status",l)&&has$2("msg",l)&&!l.status&&!r.value&&Message.error(l.msg),n.message&&Message.request(l),n.success&&n.success(a),Promise.resolve(a)}catch(s){return useHandleError(s,JSON.stringify(n)),n.error&&n.error(s),Promise.reject(s)}finally{isRef(o)?o.value=!1:isObject$4(o)&&o.close()}},useDataPage=(n=null)=>[String,r=>{const a=getPageTotal(r);return isRef(n)?(n.value=a,{total:n.value}):isReactive(n)&&!isNil(n)?(n.total=a,{total:n.total}):isNil(n)?{total:a}:Message.error("分页数据处理错误,请检查数据类型")}],showLoading=n=>{n==null||n.classList.add("custom-loading--show")},hideLoading=n=>{n==null||n.classList.remove("custom-loading--show")},mountDirective=n=>{n.directive("focus",{mounted(l,u){(typeof u.value>"u"||u.value)&&nextTick(()=>{inputFocus(l)})}}),n.directive("scroll-bottom",{beforeUpdate(l,u){typeof u.value=="boolean"&&!u.value||nextTick(()=>{const{scrollHeight:c,clientHeight:d}=l;l.scrollTop=c+d})}}),n.directive("trim",{mounted(l){l.addEventListener("change",function(u){u.target.value=u.target.value.trim()})}});const r=(l,u,c)=>{const d=document.createElement("div");d.className="custom-loading",d.dataset.id=c,d.innerHTML='<div class="custom-loading__mask"></div> <div class="custom-loading__content"> <div class="custom-loading__icon">\n <svg aria-hidden="true"><use href="#icon-tools-logo"></use></svg>\n </div> <div class="custom-loading__title hidden"></div> </div>',l.setAttribute("style","position: relative!important;"),l.appendChild(d),o(d,u,!0)},a=l=>!(!isUndefined(l.oldValue)&&l.oldValue===l.value),o=(l,u,c=!1)=>{var d;if(!l||!a(u)&&!c)return!1;if(!u.arg)isBoolean(u.value)&&u.value?showLoading(l):hideLoading(l);else switch(u.arg){case"title":const f=l.querySelector(".custom-loading__title");f==null||f.classList.remove("hidden"),f&&(f.innerHTML=u.value);break;case"type":(d=l.querySelector(".custom-loading__content"))==null||d.classList.add(u.value);break;case"size":l&&l.classList.add(u.value);break}};n.directive("bt-loading",{created(l,u){if(!l)return!1;if(l.dataset.id){const d=l.querySelector('.custom-loading[data-id="'.concat(l.dataset.id,'"]'));return o(d,u,!0),!1}const c=getRandom(8);l.dataset.id=c,r(l,u,c)},updated(l,u){if(!l||!l.dataset.id||!a(u))return!1;const c=l.dataset.id,d=l.querySelector('.custom-loading[data-id="'.concat(c,'"]'));o(d,u)}}),n.directive("scroll-shadow",{updated(l){nextTick(()=>{const{scrollHeight:u,clientHeight:c}=l;u>c&&l.setAttribute("data-scroll-bottom","true")}),l.setAttribute("data-scroll-top","false"),l.setAttribute("data-scroll-bottom","false"),!l.getAttribute("data-scroll")&&(l.setAttribute("data-scroll","true"),l.addEventListener("scroll",()=>{l.scrollTop>0?(l.dataset.scrollTop="true",l.dataset.scrollBottom="true"):l.scrollTop===0&&(l.dataset.scrollTop="false",l.dataset.scrollBottom="true"),l.scrollTop+l.clientHeight===l.scrollHeight&&(l.dataset.scrollBottom="false")}))}}),n.directive("table-scroll-load",{mounted(l,u){const c=l.querySelector(".el-table__body-wrapper");c.addEventListener("scroll",()=>{c.scrollHeight-c.scrollTop-c.clientHeight<=0&&u.value()})}});const s=l=>l instanceof HTMLInputElement?l:l.querySelector("input");n.directive("input-select",{mounted(l,u){typeof u.value=="boolean"&&!u.value||setTimeout(()=>{var c;(c=s(l))==null||c.select()},500)}}),n.directive("load-more",{mounted(l,u,c){const{expand:d}=u.modifiers,f=function(p,v){let g=null;return function(){g&&clearTimeout(g),g=null;const y=arguments;g=setTimeout(()=>{p.apply(this,y)},v)}};if(d){const{target:p,distance:v=0,func:g,delay:y=200}=u.value;if(typeof p!="string")return;const _=l.querySelector(p);if(!_)return;u.handler=f(function(){const{scrollTop:S,scrollHeight:b,clientHeight:x}=_;let A=l.getAttribute("load-more-disabled");if(A=c[A]||A,b<=S+x+v){if(A)return;g&&g(),_.scrollTop=S}},y),_.addEventListener("scroll",u.handler)}else u.handler=f(function(){const{scrollTop:p,scrollHeight:v,clientHeight:g}=l;v===p+g&&u.value&&u.value()},200),l.addEventListener("scroll",u.handler)},updated(l,u){const{arg:c}=u;if(c==="expand"){const{target:d}=u.value;if(typeof d!="string")return;let f=l.querySelector(d);f&&f.removeEventListener("scroll",u.handler),f=null}else l.removeEventListener("scroll",u.handler),l=null}}),n.directive("popup-drag",{mounted(l){const u=l.querySelector(".el-dialog__header"),c=l.querySelector(".el-dialog");let d=c;u.style.cssText+=";cursor:move;";function f(){c.className.includes("el-custom-class")&&(d=l,l.style.cssText="position: fixed; ".concat(c.style.cssText," ; bottom: null;"),l.className="el-dialog__container",setTimeout(()=>{p()},0))}function p(){nextTick(()=>{const g=document.documentElement.clientWidth,y=document.documentElement.clientHeight,_=l.offsetWidth,S=l.offsetHeight,b=(g-_)/2,x=(y-S)/2;l.style.left="".concat(b,"px"),l.style.top="".concat(x,"px")})}f();const v=function(){const g=getBody();return hasOwnProperty(g,"currentStyle")?(y,_)=>g.currentStyle[_]:(y,_)=>getComputedStyle(y,null)[_]}();u.onmousedown=g=>{if(c.className.includes("is-fullscreen"))return;const y=g.clientX-u.offsetLeft,_=g.clientY-u.offsetTop,S=document.body.clientWidth,b=document.documentElement.clientHeight,x=d.offsetWidth,A=d.offsetHeight,w=d.offsetLeft,E=S-d.offsetLeft-x-20,D=d.offsetTop-15,C=b-d.offsetTop-A;let $=v(d,"left");$==="auto"&&($="0px");let P=v(d,"top");return $.includes("%")?($=+document.body.clientWidth*(+$.replace(/%/g,"")/100),P=+document.body.clientHeight*(+P.replace(/%/g,"")/100)):($=+$.replace(/px/g,""),P=+P.replace(/px/g,"")),document.onmousemove=function(M){let I=M.clientX-y,L=M.clientY-_;-I>w?I=-w:I>E&&(I=E),-L>D?L=-D:L>C&&(L=C),d.style.cssText+=";left:".concat(I+$,"px;top:").concat(L+P,"px;")},document.onmouseup=function(){document.onmousemove=null,document.onmouseup=null},!1}}}),n.directive("blur-check",{mounted(l,u){const c=s(l);if(!c)return;let d=!1;const f=v=>{d=!0,c.setAttribute("data-clicked-outside","true")},p=v=>{d&&c.getAttribute("data-clicked-outside")==="true"&&(u.value(v),c.removeAttribute("data-clicked-outside")),d=!1};u.handleMouseDown=f,u.handleBlur=p,document.removeEventListener("mousedown",u.handleMouseDown),document.addEventListener("mousedown",u.handleMouseDown),c.removeEventListener("blur",u.handleBlur,!0),c.addEventListener("blur",u.handleBlur,!0)},unmounted(l,u){const c=s(l);c&&(document.removeEventListener("mousedown",u.handleMouseDown),c.removeEventListener("blur",u.handleBlur,!0))}})},cacheData=async n=>new Promise(r=>{const a=n.split("\n")[0].trim(),o=md5(a);setTimeout(()=>localStorage.removeItem("ERROR-CACHE"),1e4);const s=JSON.parse(localStorage.getItem("ERROR-CACHE")||"[]");s.includes(o)?r({status:!0,uniqueVal:o}):(s.push(o),localStorage.setItem("ERROR-CACHE",JSON.stringify(s)),r(!1))}),errorHandler=(n,r,a)=>{nextTick(async()=>{var c;const o=window.location.pathname,s=n.stack||n.message||n,l=await cacheData(String(s)),u=((c=r==null?void 0:r.$.vnode.type)==null?void 0:c.__file)||"未知组件";l||await useAxios.post("config/err_collection",{data:{errinfo:"组件:".concat(u," \n发生错误:").concat(s," \n所在生命周期:").concat(a),uri:o}})})},onerror=async(n,r,a,o)=>{const s=window.location.pathname;await useAxios.post("config/err_collection",{data:{errinfo:"错误文件:".concat(r,"\n错误位置: ").concat(a,":").concat(o,"\n错误原因:").concat(n),uri:s}})},mountErrorHandler=n=>{Number(window.vite_public_error)&&(n.config.errorHandler=errorHandler,window.onerror=onerror)},_hoisted_1$2={id:"dialogBox",class:"relative"},_hoisted_2$2=["innerHTML"],_hoisted_3$2={key:0,class:"p-8 flex justify-center items-center"},_hoisted_4$2={class:"text-subtitleLarge flex !flex-wrap"},_hoisted_5$1={class:"flex items-center justify-between flex-row-reverse"},_hoisted_6$1={key:0,id:"dialogMinimize",ref:"dialogMinimize",class:"dialog-minimize fixed bg-white flex items-center p-[1rem] justify-between z-9999 w-[19.4rem]",style:"bottom:0px;left:200px"},_hoisted_7$1={class:"lefts"},_hoisted_8={class:"w-[10rem] truncate inline-block"},_hoisted_9={class:"centers flex items-center"},_sfc_main$2=defineComponent({__name:"index",props:mergeModels({title:{type:[String,Boolean],default:""},customClass:{default:""},area:{default:()=>["auto","auto"]},confirmText:{default:"确定"},cancelText:{default:"取消"},component:{type:Boolean,default:!1},compData:{default:()=>({})},showFooter:{type:Boolean,default:!1},contentText:{default:""},confirmBtnType:{},showClose:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},isFullScreen:{type:Boolean,default:!1},closeBtn:{default:1},disabledEsc:{type:Boolean,default:!1},appendToBody:{type:Boolean,default:!0},onCancel:{},onConfirm:{}},{modelValue:{default:!1,type:Boolean},modelModifiers:{}}),emits:mergeModels(["open","close","cancel","confirm","resize","refresh"],["update:modelValue"]),setup(n,{expose:r,emit:a}){const o=n,s=a,{mainHeight:l}=useGlobalStore(),u=useModel(n,"modelValue"),c=!!useSlots().header,d=ref(!1),f=useTemplateRef("dialogContentRef"),p=computed(()=>{var j;return(j=f.value)==null?void 0:j.closest(".el-dialog")}),v=ref(),g=ref(o.area),y=ref(o.closeBtn),_=ref(!1),S=ref(!0),b=ref(o.showFooter),x=ref(o.confirmText);watch(()=>u.value,j=>{j&&!d.value?(d.value=!0,nextTick(()=>{H(D.value.height,"rem")}),Y()):d.value=!1});const A=reactive({loading:!1,loadingText:"提交中..."}),w=reactive({disabled:!1}),E=computed(()=>o.title||""),D=computed(()=>{const j={width:"auto",height:"auto"};if(Array.isArray(g.value)){const[q,J]=g.value;j.width=P(q,"rem"),J&&(j.height=P(J,"rem"))}else j.width=P(g.value,"rem");return j}),C=computed(()=>!!(isString$1(o.title)&&o.title!=="")),$=computed(()=>A.loading?A.loadingText:x.value),P=(j,q="rem")=>{const J=Number(j);return Number.isNaN(J)?"".concat(j):j+q},M=j=>{var J;const q=(J=f.value)==null?void 0:J.closest(".el-dialog");return q?q.querySelectorAll(j)[0]:document.createElement("div")},I=()=>{u.value=!1,s("cancel",I)},L=()=>{s("close")},O=(j,q="加载中...")=>(j.value=!0,A.loading=j.value,A.loadingText=q,{close:()=>{A.loading=!1}}),R=async()=>{var J;const j=(J=v.value)==null?void 0:J.onCancel;if(j){const X=await j(I);if(isBoolean(X)&&!X)return}const q=s("cancel",I);isBoolean(q)&&!q||I()},N=async()=>{var J;const j=(J=v.value)==null?void 0:J.onConfirm,q=o.onConfirm;if(j||q){if(j){const X=!!await j(I);if(!X)return X}if(q){const X=await q(I);if(!isUndefined(X)&&!X)return X}}else s("confirm",I);I()},V=()=>{!c&&!o.title&&nextTick(()=>{const j=M(".el-dialog__header");j&&(j.style.display="none")})},F=j=>{_.value=j,y.value=j?2:o.closeBtn},U=()=>{u.value=!1,S.value=!0,document.querySelectorAll("#dialogMinimize,#dialogBox").forEach(q=>q.remove()),R()},H=(j,q)=>{const J=M(".el-dialog__body");J&&(J.style.height=P(j,q))},W=j=>{Object.keys(j).forEach(q=>{w[q]=j[q]})},G=j=>{if(isBoolean(j))return!1;if(isObject$4(j)&&has$2("__name",j))return j;if(isFunction$1(j)){const q=j();return isPromise(q)?defineAsyncComponent(()=>q):q}return j},B=()=>{u.value&&s("resize")},Y=async()=>{nextTick(()=>{const j=p.value,q=M(".el-dialog__header"),J=M(".el-dialog__footer"),X=M(".el-dialog__body");if(!j)return;const re=0,Q=q?q.offsetHeight:0,te=J?J.offsetHeight:0;if(!X||!q)return;const ie=window.innerHeight-Q-te-re;X.style.maxHeight="".concat(ie,"px"),X.style.overflowX="hidden";const ne=q.getBoundingClientRect();(ne.top<15||window.innerHeight<ne.bottom)&&ne.width>0&&ne.height>0?(y.value=2,X.style.overflowY="auto"):(y.value=o.closeBtn,X.style.overflowY="visible")})},Z=async()=>{s("open"),V(),nextTick(()=>{var J;const j=(J=v.value)==null?void 0:J.onOpen;j&&j(),d.value||H(D.value.height,"rem");const q=p.value;useResizeObserver(q,()=>{Y()})})},K=useThrottleFn(()=>{Y()},100);watch(()=>l.value,j=>{if(o.modal){const{height:q}=D.value;K(),Number(q)*10>l.value?H(j/10,"rem"):H(D.value.height,"rem")}});const ee=j=>{b.value=j};return provide("popupLoading",O),provide("popupClose",I),provide("fullData",_),provide("popupSetFooter",ee),provide("buttonText",x),provide("confirmBtn",w),onMounted(()=>{nextTick(()=>Z())}),r({close:I,onCancel:R,onConfirm:N,loading:O,setConfirmBtn:W,showFooterFun:ee}),(j,q)=>{const J=ElConfigProvider,X=ElButton,re=ElDialog;return openBlock(),createElementBlock("div",_hoisted_1$2,[withDirectives(createBaseVNode("div",null,[createVNode$1(re,{modelValue:u.value,"onUpdate:modelValue":q[3]||(q[3]=Q=>u.value=Q),"destroy-on-close":"","align-center":"",center:"",draggable:"","modal-class":o.modal?"":"el-custom-class m-auto w-max h-max "+(unref(_)?"full-screen":""),class:normalizeClass("bt-dialog rounded-base "+o.customClass+(unref(C)?"is-title":"")),width:unref(D).width,"show-close":!1,"close-on-click-modal":!1,"close-on-press-escape":n.disabledEsc,modal:o.modal,fullscreen:unref(_),"append-to-body":o.appendToBody,onClosed:L},createSlots({default:withCtx(()=>[n.isFullScreen?(openBlock(),createElementBlock("div",{key:0,class:normalizeClass(["absolute top-0 z-999 flex items-center",unref(_)||unref(y)==2?"right-[4.6rem]":"right-[2rem]"]),style:{gap:"8px"}},[createBaseVNode("i",{class:"svgtofont-el-semi-select icon-group",onClick:q[0]||(q[0]=Q=>S.value=!1)}),unref(_)?createCommentVNode("",!0):(openBlock(),createElementBlock("i",{key:0,class:"svgtofont-el-fullscreen-expand icon-group",onClick:q[1]||(q[1]=Q=>F(!0))})),unref(_)?(openBlock(),createElementBlock("i",{key:1,class:"svgtofont-el-fullscreen-shrink icon-group",onClick:q[2]||(q[2]=Q=>F(!1))})):createCommentVNode("",!0)],2)):createCommentVNode("",!0),n.showClose&&unref(y)==1?(openBlock(),createElementBlock("div",{key:1,class:"absolute z-999 right-[1.4rem] top-[1rem] h-[2.4rem] w-[2.4rem] cursor-pointer p-[3px] rounded-base hover:bg-darker dark:bg-[#333]",onClick:R},[...q[5]||(q[5]=[createBaseVNode("svg",{viewBox:"0 0 12 12",version:"1.1",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true"},[createBaseVNode("g",{stroke:"none","stroke-width":"2",fill:"none","fill-rule":"evenodd"},[createBaseVNode("g",{fill:"currentColor","fill-rule":"nonzero"},[createBaseVNode("path",{d:"M2.08859116,2.2156945 L2.14644661,2.14644661 C2.32001296,1.97288026 2.58943736,1.95359511 2.7843055,2.08859116 L2.85355339,2.14644661 L6,5.293 L9.14644661,2.14644661 C9.34170876,1.95118446 9.65829124,1.95118446 9.85355339,2.14644661 C10.0488155,2.34170876 10.0488155,2.65829124 9.85355339,2.85355339 L6.707,6 L9.85355339,9.14644661 C10.0271197,9.32001296 10.0464049,9.58943736 9.91140884,9.7843055 L9.85355339,9.85355339 C9.67998704,10.0271197 9.41056264,10.0464049 9.2156945,9.91140884 L9.14644661,9.85355339 L6,6.707 L2.85355339,9.85355339 C2.65829124,10.0488155 2.34170876,10.0488155 2.14644661,9.85355339 C1.95118446,9.65829124 1.95118446,9.34170876 2.14644661,9.14644661 L5.293,6 L2.14644661,2.85355339 C1.97288026,2.67998704 1.95359511,2.41056264 2.08859116,2.2156945 L2.14644661,2.14644661 L2.08859116,2.2156945 Z"})])])],-1)])])):createCommentVNode("",!0),n.showClose&&unref(y)==2?(openBlock(),createElementBlock("div",{key:2,class:"absolute right-[1.4rem] top-[1rem] z-999 h-[2.4rem] w-[2.4rem] rounded-base cursor-pointer hover:bg-darker flex justify-center items-center",onClick:R},[...q[6]||(q[6]=[createBaseVNode("i",{class:"!text-3xl svgtofont-el-close icon-group"},null,-1)])])):createCommentVNode("",!0),createBaseVNode("div",{class:"h-[inherit]",ref_key:"dialogContentRef",ref:f},[n.component?(openBlock(),createBlock(J,{key:0,locale:unref(zhCn)},{default:withCtx(()=>[(openBlock(),createBlock(resolveDynamicComponent(G(n.component)),{ref_key:"compRef",ref:v,"comp-data":n.compData,class:"!h-[inherit]",onResize:B,onOpen:Z,onClose:I,onConfirm:N,onSetConfirmBtn:W},null,40,["comp-data"]))]),_:1},8,["locale"])):renderSlot(j.$slots,"default",{key:1},()=>[n.contentText?(openBlock(),createElementBlock("div",_hoisted_3$2,[q[7]||(q[7]=createBaseVNode("i",{class:"svgtofont-el-warning-filled ml-[0.4rem] mr-[1.2rem] text-titleLarge text-warning"},null,-1)),createBaseVNode("span",_hoisted_4$2,toDisplayString(o.contentText),1)])):createCommentVNode("",!0)],!0)],512)]),_:2},[unref(C)?{name:"header",fn:withCtx(()=>[c?renderSlot(j.$slots,"header",{key:0},void 0,!0):(openBlock(),createElementBlock("span",{key:1,class:"text-base leading-[1.8rem] text-grey-333 truncate",innerHTML:unref(E)},null,8,_hoisted_2$2))]),key:"0"}:void 0,unref(b)?{name:"footer",fn:withCtx(()=>[createBaseVNode("div",_hoisted_5$1,[createBaseVNode("div",null,[n.cancelText.trim()?(openBlock(),createBlock(X,{key:0,type:"info",disabled:unref(A).loading,onClick:R},{default:withCtx(()=>[createTextVNode(toDisplayString(n.cancelText),1)]),_:1},8,["disabled"])):createCommentVNode("",!0),n.confirmBtnType?createCommentVNode("",!0):(openBlock(),createBlock(X,{key:1,type:"primary",disabled:unref(w).disabled||unref(A).loading,loading:unref(A).loading,onClick:N},{default:withCtx(()=>[createTextVNode(toDisplayString(unref($)),1)]),_:1},8,["disabled","loading"])),n.confirmBtnType?(openBlock(),createBlock(X,{key:2,type:n.confirmBtnType==="danger"?"danger":n.confirmBtnType,class:normalizeClass(n.confirmBtnType==="danger"?"danger-button":""),onClick:N},{default:withCtx(()=>[createTextVNode(toDisplayString(unref(x)||"下一步"),1)]),_:1},8,["type","class"])):createCommentVNode("",!0)])])]),key:"1"}:void 0]),1032,["modelValue","modal-class","class","width","close-on-press-escape","modal","fullscreen","append-to-body"])],512),[[vShow,unref(S)]]),unref(S)?createCommentVNode("",!0):(openBlock(),createElementBlock("div",_hoisted_6$1,[createBaseVNode("div",_hoisted_7$1,[createBaseVNode("span",_hoisted_8,toDisplayString(unref(E)),1)]),createBaseVNode("div",_hoisted_9,[createBaseVNode("i",{class:"svgtofont-el-fullscreen-expand cursor-pointer text-subtitleLarge mr-[5px]",onClick:q[4]||(q[4]=Q=>S.value=!0)}),createBaseVNode("div",{class:"rights",onClick:U},[...q[8]||(q[8]=[createBaseVNode("i",{class:"svgtofont-el-close cursor-pointer text-subtitleLarge"},null,-1)])])])],512))])}}}),__unplugin_components_5$2=_export_sfc(_sfc_main$2,[["__scopeId","data-v-a2e15a5e"]]),dialogInstanceList={},useDialog=async n=>{var l;const r=document.createElement("div");if(isFunction$1(n.component)){const u=n.component();isPromise(u)?n.component=(await n.component()).default:u.default?n.component=u.default:n.component=u}const a=Object.prototype.toString.call(n.btn).slice(8,-1).toLowerCase();if(!isUndefined(a)&&a!=="undefined"){let u="确认",c="取消";if(isString$1(a)&&!isBoolean(n.btn)&&(u=n.btn),isArray$2(n.btn)){const{0:d,1:f}=n.btn;u=d,c=f}n.showFooter=(l=n.showFooter)!=null?l:!0,n.confirmText=u,n.cancelText=c,delete n.btn}const o=createApp(__unplugin_components_5$2,{...n,modelValue:!0,onCancel:()=>{n.onCancel&&n.onCancel(o),n.close&&n.close(),o.unmount(),document.body.removeChild(r)},onConfirm:async()=>{if(n.onConfirm){const u=await n.onConfirm(o);return u&&(o.unmount(),r&&document.body.removeChild(r)),u}}});n.autoClose===!1&&(o.config.globalProperties.autoClose=!1),o.config.globalProperties.close=()=>{n.onCancel&&n.onCancel(o),n.close&&n.close(),o.unmount(),r&&document.body.contains(r)&&document.body.removeChild(r)},mountDirective(o),mountErrorHandler(o),o.directive("loading",ElLoading.directive),document.body.appendChild(r),o.mount(r),n.onOpen&&n.onOpen(o);const s=()=>"dialog_".concat(Math.random().toString(36).substr(2,9));return dialogInstanceList[s()]=o,o},closeAllDialog=()=>{forEachObjIndexed(n=>{is(Function,n==null?void 0:n.config.globalProperties.close)&&(n==null?void 0:n.config.globalProperties.autoClose)!==!1&&(n==null||n.config.globalProperties.close())},dialogInstanceList)};var extendStatics=function(n,r){return extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var s in o)Object.prototype.hasOwnProperty.call(o,s)&&(a[s]=o[s])},extendStatics(n,r)};function __extends(n,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");extendStatics(n,r);function a(){this.constructor=n}n.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}var Browser=function(){function n(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return n}(),Env=function(){function n(){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 n}(),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?(env.node=!0,env.svgSupported=!0):detect(navigator.userAgent,env);function detect(n,r){var a=r.browser,o=n.match(/Firefox\/([\d.]+)/),s=n.match(/MSIE\s([\d.]+)/)||n.match(/Trident\/.+?rv:(([\d.]+))/),l=n.match(/Edge?\/([\d.]+)/),u=/micromessenger/i.test(n);o&&(a.firefox=!0,a.version=o[1]),s&&(a.ie=!0,a.version=s[1]),l&&(a.edge=!0,a.version=l[1],a.newEdge=+l[1].split(".")[0]>18),u&&(a.weChat=!0),r.svgSupported=typeof SVGRect<"u",r.touchEventsSupported="ontouchstart"in window&&!a.ie&&!a.edge,r.pointerEventsSupported="onpointerdown"in window&&(a.edge||a.ie&&+a.version>=11),r.domSupported=typeof document<"u";var c=document.documentElement.style;r.transform3dSupported=(a.ie&&"transition"in c||a.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in c)&&!("OTransition"in c),r.transformSupported=r.transform3dSupported||a.ie&&+a.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(n){var r={};if(typeof JSON>"u")return r;for(var a=0;a<n.length;a++){var o=String.fromCharCode(a+32),s=(n.charCodeAt(a)-OFFSET)/SCALE;r[o]=s}return r}var DEFAULT_TEXT_WIDTH_MAP=getTextWidthMap(defaultWidthMapStr),platformApi={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var n,r;return function(a,o){if(!n){var s=platformApi.createCanvas();n=s&&s.getContext("2d")}if(n)return r!==o&&(r=n.font=o||DEFAULT_FONT),n.measureText(a);a=a||"",o=o||DEFAULT_FONT;var l=/((?:\d+)?\.?\d*)px/.exec(o),u=l&&+l[1]||DEFAULT_FONT_SIZE,c=0;if(o.indexOf("mono")>=0)c=u*a.length;else for(var d=0;d<a.length;d++){var f=DEFAULT_TEXT_WIDTH_MAP[a[d]];c+=f==null?u:f*u}return{width:c}}}(),loadImage:function(n,r,a){var o=new Image;return o.onload=r,o.onerror=a,o.src=n,o}};function setPlatformAPI(n){for(var r in platformApi)n[r]&&(platformApi[r]=n[r])}var BUILTIN_OBJECT=reduce(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(n,r){return n["[object "+r+"]"]=!0,n},{}),TYPED_ARRAY=reduce(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(n,r){return n["[object "+r+"Array]"]=!0,n},{}),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 n=[],r=0;r<arguments.length;r++)n[r]=arguments[r]}function clone$6(n){if(n==null||typeof n!="object")return n;var r=n,a=objToString.call(n);if(a==="[object Array]"){if(!isPrimitive(n)){r=[];for(var o=0,s=n.length;o<s;o++)r[o]=clone$6(n[o])}}else if(TYPED_ARRAY[a]){if(!isPrimitive(n)){var l=n.constructor;if(l.from)r=l.from(n);else{r=new l(n.length);for(var o=0,s=n.length;o<s;o++)r[o]=n[o]}}}else if(!BUILTIN_OBJECT[a]&&!isPrimitive(n)&&!isDom(n)){r={};for(var u in n)n.hasOwnProperty(u)&&u!==protoKey&&(r[u]=clone$6(n[u]))}return r}function merge(n,r,a){if(!isObject$3(r)||!isObject$3(n))return a?clone$6(r):n;for(var o in r)if(r.hasOwnProperty(o)&&o!==protoKey){var s=n[o],l=r[o];isObject$3(l)&&isObject$3(s)&&!isArray$1(l)&&!isArray$1(s)&&!isDom(l)&&!isDom(s)&&!isBuiltInObject(l)&&!isBuiltInObject(s)&&!isPrimitive(l)&&!isPrimitive(s)?merge(s,l,a):(a||!(o in n))&&(n[o]=clone$6(r[o]))}return n}function mergeAll(n,r){for(var a=n[0],o=1,s=n.length;o<s;o++)a=merge(a,n[o],r);return a}function extend$2(n,r){if(Object.assign)Object.assign(n,r);else for(var a in r)r.hasOwnProperty(a)&&a!==protoKey&&(n[a]=r[a]);return n}function defaults$2(n,r,a){for(var o=keys(r),s=0,l=o.length;s<l;s++){var u=o[s];(a?r[u]!=null:n[u]==null)&&(n[u]=r[u])}return n}var createCanvas=platformApi.createCanvas;function indexOf(n,r){if(n){if(n.indexOf)return n.indexOf(r);for(var a=0,o=n.length;a<o;a++)if(n[a]===r)return a}return-1}function inherits(n,r){var a=n.prototype;function o(){}o.prototype=r.prototype,n.prototype=new o;for(var s in a)a.hasOwnProperty(s)&&(n.prototype[s]=a[s]);n.prototype.constructor=n,n.superClass=r}function mixin(n,r,a){if(n="prototype"in n?n.prototype:n,r="prototype"in r?r.prototype:r,Object.getOwnPropertyNames)for(var o=Object.getOwnPropertyNames(r),s=0;s<o.length;s++){var l=o[s];l!=="constructor"&&(a?r[l]!=null:n[l]==null)&&(n[l]=r[l])}else defaults$2(n,r,a)}function isArrayLike(n){return!n||typeof n=="string"?!1:typeof n.length=="number"}function each$f(n,r,a){if(n&&r)if(n.forEach&&n.forEach===nativeForEach)n.forEach(r,a);else if(n.length===+n.length)for(var o=0,s=n.length;o<s;o++)r.call(a,n[o],o,n);else for(var l in n)n.hasOwnProperty(l)&&r.call(a,n[l],l,n)}function map$1(n,r,a){if(!n)return[];if(!r)return slice(n);if(n.map&&n.map===nativeMap)return n.map(r,a);for(var o=[],s=0,l=n.length;s<l;s++)o.push(r.call(a,n[s],s,n));return o}function reduce(n,r,a,o){if(n&&r){for(var s=0,l=n.length;s<l;s++)a=r.call(o,a,n[s],s,n);return a}}function filter(n,r,a){if(!n)return[];if(!r)return slice(n);if(n.filter&&n.filter===nativeFilter)return n.filter(r,a);for(var o=[],s=0,l=n.length;s<l;s++)r.call(a,n[s],s,n)&&o.push(n[s]);return o}function find$2(n,r,a){if(n&&r){for(var o=0,s=n.length;o<s;o++)if(r.call(a,n[o],o,n))return n[o]}}function keys(n){if(!n)return[];if(Object.keys)return Object.keys(n);var r=[];for(var a in n)n.hasOwnProperty(a)&&r.push(a);return r}function bindPolyfill(n,r){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];return function(){return n.apply(r,a.concat(nativeSlice.call(arguments)))}}var bind$1=protoFunction&&isFunction(protoFunction.bind)?protoFunction.call.bind(protoFunction.bind):bindPolyfill;function curry$1(n){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return function(){return n.apply(this,r.concat(nativeSlice.call(arguments)))}}function isArray$1(n){return Array.isArray?Array.isArray(n):objToString.call(n)==="[object Array]"}function isFunction(n){return typeof n=="function"}function isString(n){return typeof n=="string"}function isStringSafe(n){return objToString.call(n)==="[object String]"}function isNumber(n){return typeof n=="number"}function isObject$3(n){var r=typeof n;return r==="function"||!!n&&r==="object"}function isBuiltInObject(n){return!!BUILTIN_OBJECT[objToString.call(n)]}function isTypedArray(n){return!!TYPED_ARRAY[objToString.call(n)]}function isDom(n){return typeof n=="object"&&typeof n.nodeType=="number"&&typeof n.ownerDocument=="object"}function isGradientObject(n){return n.colorStops!=null}function isImagePatternObject(n){return n.image!=null}function isRegExp(n){return objToString.call(n)==="[object RegExp]"}function eqNaN(n){return n!==n}function retrieve(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];for(var a=0,o=n.length;a<o;a++)if(n[a]!=null)return n[a]}function retrieve2(n,r){return n!=null?n:r}function retrieve3(n,r,a){return n!=null?n:r!=null?r:a}function slice(n){for(var r=[],a=1;a<arguments.length;a++)r[a-1]=arguments[a];return nativeSlice.apply(n,r)}function normalizeCssArray$1(n){if(typeof n=="number")return[n,n,n,n];var r=n.length;return r===2?[n[0],n[1],n[0],n[1]]:r===3?[n[0],n[1],n[2],n[1]]:n}function assert(n,r){if(!n)throw new Error(r)}function trim$1(n){return n==null?null:typeof n.trim=="function"?n.trim():n.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var primitiveKey="__ec_primitive__";function setAsPrimitive(n){n[primitiveKey]=!0}function isPrimitive(n){return n[primitiveKey]}var MapPolyfill=function(){function n(){this.data={}}return n.prototype.delete=function(r){var a=this.has(r);return a&&delete this.data[r],a},n.prototype.has=function(r){return this.data.hasOwnProperty(r)},n.prototype.get=function(r){return this.data[r]},n.prototype.set=function(r,a){return this.data[r]=a,this},n.prototype.keys=function(){return keys(this.data)},n.prototype.forEach=function(r){var a=this.data;for(var o in a)a.hasOwnProperty(o)&&r(a[o],o)},n}(),isNativeMapSupported=typeof Map=="function";function maybeNativeMap(){return isNativeMapSupported?new Map:new MapPolyfill}var HashMap=function(){function n(r){var a=isArray$1(r);this.data=maybeNativeMap();var o=this;r instanceof n?r.each(s):r&&each$f(r,s);function s(l,u){a?o.set(l,u):o.set(u,l)}}return n.prototype.hasKey=function(r){return this.data.has(r)},n.prototype.get=function(r){return this.data.get(r)},n.prototype.set=function(r,a){return this.data.set(r,a),a},n.prototype.each=function(r,a){this.data.forEach(function(o,s){r.call(a,o,s)})},n.prototype.keys=function(){var r=this.data.keys();return isNativeMapSupported?Array.from(r):r},n.prototype.removeKey=function(r){this.data.delete(r)},n}();function createHashMap(n){return new HashMap(n)}function concatArray(n,r){for(var a=new n.constructor(n.length+r.length),o=0;o<n.length;o++)a[o]=n[o];for(var s=n.length,o=0;o<r.length;o++)a[o+s]=r[o];return a}function createObject(n,r){var a;if(Object.create)a=Object.create(n);else{var o=function(){};o.prototype=n,a=new o}return r&&extend$2(a,r),a}function disableUserSelect(n){var r=n.style;r.webkitUserSelect="none",r.userSelect="none",r.webkitTapHighlightColor="rgba(0,0,0,0)",r["-webkit-touch-callout"]="none"}function hasOwn(n,r){return n.hasOwnProperty(r)}function noop(){}var RADIAN_TO_DEGREE=180/Math.PI;const util$1=Object.freeze(Object.defineProperty({__proto__:null,HashMap,RADIAN_TO_DEGREE,assert,bind:bind$1,clone:clone$6,concatArray,createCanvas,createHashMap,createObject,curry:curry$1,defaults:defaults$2,disableUserSelect,each:each$f,eqNaN,extend:extend$2,filter,find:find$2,guid,hasOwn,indexOf,inherits,isArray:isArray$1,isArrayLike,isBuiltInObject,isDom,isFunction,isGradientObject,isImagePatternObject,isNumber,isObject:isObject$3,isPrimitive,isRegExp,isString,isStringSafe,isTypedArray,keys,logError,map:map$1,merge,mergeAll,mixin,noop,normalizeCssArray:normalizeCssArray$1,reduce,retrieve,retrieve2,retrieve3,setAsPrimitive,slice,trim:trim$1},Symbol.toStringTag,{value:"Module"}));function create$2(n,r){return n==null&&(n=0),r==null&&(r=0),[n,r]}function copy$1(n,r){return n[0]=r[0],n[1]=r[1],n}function clone$5(n){return[n[0],n[1]]}function set$1(n,r,a){return n[0]=r,n[1]=a,n}function add(n,r,a){return n[0]=r[0]+a[0],n[1]=r[1]+a[1],n}function scaleAndAdd$1(n,r,a,o){return n[0]=r[0]+a[0]*o,n[1]=r[1]+a[1]*o,n}function sub(n,r,a){return n[0]=r[0]-a[0],n[1]=r[1]-a[1],n}function len(n){return Math.sqrt(lenSquare(n))}var length=len;function lenSquare(n){return n[0]*n[0]+n[1]*n[1]}var lengthSquare=lenSquare;function mul$1(n,r,a){return n[0]=r[0]*a[0],n[1]=r[1]*a[1],n}function div(n,r,a){return n[0]=r[0]/a[0],n[1]=r[1]/a[1],n}function dot(n,r){return n[0]*r[0]+n[1]*r[1]}function scale$2(n,r,a){return n[0]=r[0]*a,n[1]=r[1]*a,n}function normalize$3(n,r){var a=len(r);return a===0?(n[0]=0,n[1]=0):(n[0]=r[0]/a,n[1]=r[1]/a),n}function distance(n,r){return Math.sqrt((n[0]-r[0])*(n[0]-r[0])+(n[1]-r[1])*(n[1]-r[1]))}var dist$1=distance;function distanceSquare(n,r){return(n[0]-r[0])*(n[0]-r[0])+(n[1]-r[1])*(n[1]-r[1])}var distSquare=distanceSquare;function negate(n,r){return n[0]=-r[0],n[1]=-r[1],n}function lerp$1(n,r,a,o){return n[0]=r[0]+o*(a[0]-r[0]),n[1]=r[1]+o*(a[1]-r[1]),n}function applyTransform$1(n,r,a){var o=r[0],s=r[1];return n[0]=a[0]*o+a[2]*s+a[4],n[1]=a[1]*o+a[3]*s+a[5],n}function min$1(n,r,a){return n[0]=Math.min(r[0],a[0]),n[1]=Math.min(r[1],a[1]),n}function max$1(n,r,a){return n[0]=Math.max(r[0],a[0]),n[1]=Math.max(r[1],a[1]),n}const vector=Object.freeze(Object.defineProperty({__proto__:null,add,applyTransform:applyTransform$1,clone:clone$5,copy:copy$1,create:create$2,dist:dist$1,distSquare,distance,distanceSquare,div,dot,len,lenSquare,length,lengthSquare,lerp:lerp$1,max:max$1,min:min$1,mul:mul$1,negate,normalize:normalize$3,scale:scale$2,scaleAndAdd:scaleAndAdd$1,set:set$1,sub},Symbol.toStringTag,{value:"Module"}));var Param=function(){function n(r,a){this.target=r,this.topTarget=a&&a.topTarget}return n}(),Draggable=function(){function n(r){this.handler=r,r.on("mousedown",this._dragStart,this),r.on("mousemove",this._drag,this),r.on("mouseup",this._dragEnd,this)}return n.prototype._dragStart=function(r){for(var a=r.target;a&&!a.draggable;)a=a.parent||a.__hostTarget;a&&(this._draggingTarget=a,a.dragging=!0,this._x=r.offsetX,this._y=r.offsetY,this.handler.dispatchToElement(new Param(a,r),"dragstart",r.event))},n.prototype._drag=function(r){var a=this._draggingTarget;if(a){var o=r.offsetX,s=r.offsetY,l=o-this._x,u=s-this._y;this._x=o,this._y=s,a.drift(l,u,r),this.handler.dispatchToElement(new Param(a,r),"drag",r.event);var c=this.handler.findHover(o,s,a).target,d=this._dropTarget;this._dropTarget=c,a!==c&&(d&&c!==d&&this.handler.dispatchToElement(new Param(d,r),"dragleave",r.event),c&&c!==d&&this.handler.dispatchToElement(new Param(c,r),"dragenter",r.event))}},n.prototype._dragEnd=function(r){var a=this._draggingTarget;a&&(a.dragging=!1),this.handler.dispatchToElement(new Param(a,r),"dragend",r.event),this._dropTarget&&this.handler.dispatchToElement(new Param(this._dropTarget,r),"drop",r.event),this._draggingTarget=null,this._dropTarget=null},n}(),Eventful=function(){function n(r){r&&(this._$eventProcessor=r)}return n.prototype.on=function(r,a,o,s){this._$handlers||(this._$handlers={});var l=this._$handlers;if(typeof a=="function"&&(s=o,o=a,a=null),!o||!r)return this;var u=this._$eventProcessor;a!=null&&u&&u.normalizeQuery&&(a=u.normalizeQuery(a)),l[r]||(l[r]=[]);for(var c=0;c<l[r].length;c++)if(l[r][c].h===o)return this;var d={h:o,query:a,ctx:s||this,callAtLast:o.zrEventfulCallAtLast},f=l[r].length-1,p=l[r][f];return p&&p.callAtLast?l[r].splice(f,0,d):l[r].push(d),this},n.prototype.isSilent=function(r){var a=this._$handlers;return!a||!a[r]||!a[r].length},n.prototype.off=function(r,a){var o=this._$handlers;if(!o)return this;if(!r)return this._$handlers={},this;if(a){if(o[r]){for(var s=[],l=0,u=o[r].length;l<u;l++)o[r][l].h!==a&&s.push(o[r][l]);o[r]=s}o[r]&&o[r].length===0&&delete o[r]}else delete o[r];return this},n.prototype.trigger=function(r){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];if(!this._$handlers)return this;var s=this._$handlers[r],l=this._$eventProcessor;if(s)for(var u=a.length,c=s.length,d=0;d<c;d++){var f=s[d];if(!(l&&l.filter&&f.query!=null&&!l.filter(r,f.query)))switch(u){case 0:f.h.call(f.ctx);break;case 1:f.h.call(f.ctx,a[0]);break;case 2:f.h.call(f.ctx,a[0],a[1]);break;default:f.h.apply(f.ctx,a);break}}return l&&l.afterTrigger&&l.afterTrigger(r),this},n.prototype.triggerWithContext=function(r){for(var a=[],o=1;o<arguments.length;o++)a[o-1]=arguments[o];if(!this._$handlers)return this;var s=this._$handlers[r],l=this._$eventProcessor;if(s)for(var u=a.length,c=a[u-1],d=s.length,f=0;f<d;f++){var p=s[f];if(!(l&&l.filter&&p.query!=null&&!l.filter(r,p.query)))switch(u){case 0:p.h.call(c);break;case 1:p.h.call(c,a[0]);break;case 2:p.h.call(c,a[0],a[1]);break;default:p.h.apply(c,a.slice(1,u-1));break}}return l&&l.afterTrigger&&l.afterTrigger(r),this},n}(),LN2=Math.log(2);function determinant(n,r,a,o,s,l){var u=o+"-"+s,c=n.length;if(l.hasOwnProperty(u))return l[u];if(r===1){var d=Math.round(Math.log((1<<c)-1&~s)/LN2);return n[a][d]}for(var f=o|1<<a,p=a+1;o&1<<p;)p++;for(var v=0,g=0,y=0;g<c;g++){var _=1<<g;_&s||(v+=(y%2?-1:1)*n[a][g]*determinant(n,r-1,p,f,s|_,l),y++)}return l[u]=v,v}function buildTransformer(n,r){var a=[[n[0],n[1],1,0,0,0,-r[0]*n[0],-r[0]*n[1]],[0,0,0,n[0],n[1],1,-r[1]*n[0],-r[1]*n[1]],[n[2],n[3],1,0,0,0,-r[2]*n[2],-r[2]*n[3]],[0,0,0,n[2],n[3],1,-r[3]*n[2],-r[3]*n[3]],[n[4],n[5],1,0,0,0,-r[4]*n[4],-r[4]*n[5]],[0,0,0,n[4],n[5],1,-r[5]*n[4],-r[5]*n[5]],[n[6],n[7],1,0,0,0,-r[6]*n[6],-r[6]*n[7]],[0,0,0,n[6],n[7],1,-r[7]*n[6],-r[7]*n[7]]],o={},s=determinant(a,8,0,0,0,o);if(s!==0){for(var l=[],u=0;u<8;u++)for(var c=0;c<8;c++)l[c]==null&&(l[c]=0),l[c]+=((u+c)%2?-1:1)*determinant(a,7,u===0?1:0,1<<u,1<<c,o)/s*r[u];return function(d,f,p){var v=f*l[6]+p*l[7]+1;d[0]=(f*l[0]+p*l[1]+l[2])/v,d[1]=(f*l[3]+p*l[4]+l[5])/v}}}var EVENT_SAVED_PROP="___zrEVENTSAVED",_calcOut$1=[];function transformLocalCoord(n,r,a,o,s){return transformCoordWithViewport(_calcOut$1,r,o,s,!0)&&transformCoordWithViewport(n,a,_calcOut$1[0],_calcOut$1[1])}function transformCoordWithViewport(n,r,a,o,s){if(r.getBoundingClientRect&&env.domSupported&&!isCanvasEl(r)){var l=r[EVENT_SAVED_PROP]||(r[EVENT_SAVED_PROP]={}),u=prepareCoordMarkers(r,l),c=preparePointerTransformer(u,l,s);if(c)return c(n,a,o),!0}return!1}function prepareCoordMarkers(n,r){var a=r.markers;if(a)return a;a=r.markers=[];for(var o=["left","right"],s=["top","bottom"],l=0;l<4;l++){var u=document.createElement("div"),c=u.style,d=l%2,f=(l>>1)%2;c.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",o[d]+":0",s[f]+":0",o[1-d]+":auto",s[1-f]+":auto",""].join("!important;"),n.appendChild(u),a.push(u)}return a}function preparePointerTransformer(n,r,a){for(var o=a?"invTrans":"trans",s=r[o],l=r.srcCoords,u=[],c=[],d=!0,f=0;f<4;f++){var p=n[f].getBoundingClientRect(),v=2*f,g=p.left,y=p.top;u.push(g,y),d=d&&l&&g===l[v]&&y===l[v+1],c.push(n[f].offsetLeft,n[f].offsetTop)}return d&&s?s:(r.srcCoords=u,r[o]=a?buildTransformer(c,u):buildTransformer(u,c))}function isCanvasEl(n){return n.nodeName.toUpperCase()==="CANVAS"}var replaceReg=/([&<>"'])/g,replaceMap={"&":"&","<":"<",">":">",'"':""","'":"'"};function encodeHTML(n){return n==null?"":(n+"").replace(replaceReg,function(r,a){return replaceMap[a]})}var MOUSE_EVENT_REG=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,_calcOut=[],firefoxNotSupportOffsetXY=env.browser.firefox&&+env.browser.version.split(".")[0]<39;function clientToLocal(n,r,a,o){return a=a||{},o?calculateZrXY(n,r,a):firefoxNotSupportOffsetXY&&r.layerX!=null&&r.layerX!==r.offsetX?(a.zrX=r.layerX,a.zrY=r.layerY):r.offsetX!=null?(a.zrX=r.offsetX,a.zrY=r.offsetY):calculateZrXY(n,r,a),a}function calculateZrXY(n,r,a){if(env.domSupported&&n.getBoundingClientRect){var o=r.clientX,s=r.clientY;if(isCanvasEl(n)){var l=n.getBoundingClientRect();a.zrX=o-l.left,a.zrY=s-l.top;return}else if(transformCoordWithViewport(_calcOut,n,o,s)){a.zrX=_calcOut[0],a.zrY=_calcOut[1];return}}a.zrX=a.zrY=0}function getNativeEvent(n){return n||window.event}function normalizeEvent(n,r,a){if(r=getNativeEvent(r),r.zrX!=null)return r;var o=r.type,s=o&&o.indexOf("touch")>=0;if(s){var u=o!=="touchend"?r.targetTouches[0]:r.changedTouches[0];u&&clientToLocal(n,u,r,a)}else{clientToLocal(n,r,r,a);var l=getWheelDeltaMayPolyfill(r);r.zrDelta=l?l/120:-(r.detail||0)/3}var c=r.button;return r.which==null&&c!==void 0&&MOUSE_EVENT_REG.test(r.type)&&(r.which=c&1?1:c&2?3:c&4?2:0),r}function getWheelDeltaMayPolyfill(n){var r=n.wheelDelta;if(r)return r;var a=n.deltaX,o=n.deltaY;if(a==null||o==null)return r;var s=Math.abs(o!==0?o:a),l=o>0?-1:o<0?1:a>0?-1:1;return 3*s*l}function addEventListener(n,r,a,o){n.addEventListener(r,a,o)}function removeEventListener(n,r,a,o){n.removeEventListener(r,a,o)}var stop=function(n){n.preventDefault(),n.stopPropagation(),n.cancelBubble=!0};function isMiddleOrRightButtonOnMouseUpDown(n){return n.which===2||n.which===3}var GestureMgr=function(){function n(){this._track=[]}return n.prototype.recognize=function(r,a,o){return this._doTrack(r,a,o),this._recognize(r)},n.prototype.clear=function(){return this._track.length=0,this},n.prototype._doTrack=function(r,a,o){var s=r.touches;if(s){for(var l={points:[],touches:[],target:a,event:r},u=0,c=s.length;u<c;u++){var d=s[u],f=clientToLocal(o,d,{});l.points.push([f.zrX,f.zrY]),l.touches.push(d)}this._track.push(l)}},n.prototype._recognize=function(r){for(var a in recognizers)if(recognizers.hasOwnProperty(a)){var o=recognizers[a](this._track,r);if(o)return o}},n}();function dist(n){var r=n[1][0]-n[0][0],a=n[1][1]-n[0][1];return Math.sqrt(r*r+a*a)}function center$1(n){return[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]}var recognizers={pinch:function(n,r){var a=n.length;if(a){var o=(n[a-1]||{}).points,s=(n[a-2]||{}).points||o;if(s&&s.length>1&&o&&o.length>1){var l=dist(o)/dist(s);!isFinite(l)&&(l=1),r.pinchScale=l;var u=center$1(o);return r.pinchX=u[0],r.pinchY=u[1],{type:"pinch",target:n[0].target,event:r}}}}};function create$1(){return[1,0,0,1,0,0]}function identity(n){return n[0]=1,n[1]=0,n[2]=0,n[3]=1,n[4]=0,n[5]=0,n}function copy(n,r){return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4],n[5]=r[5],n}function mul(n,r,a){var o=r[0]*a[0]+r[2]*a[1],s=r[1]*a[0]+r[3]*a[1],l=r[0]*a[2]+r[2]*a[3],u=r[1]*a[2]+r[3]*a[3],c=r[0]*a[4]+r[2]*a[5]+r[4],d=r[1]*a[4]+r[3]*a[5]+r[5];return n[0]=o,n[1]=s,n[2]=l,n[3]=u,n[4]=c,n[5]=d,n}function translate(n,r,a){return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n[4]=r[4]+a[0],n[5]=r[5]+a[1],n}function rotate(n,r,a,o){o===void 0&&(o=[0,0]);var s=r[0],l=r[2],u=r[4],c=r[1],d=r[3],f=r[5],p=Math.sin(a),v=Math.cos(a);return n[0]=s*v+c*p,n[1]=-s*p+c*v,n[2]=l*v+d*p,n[3]=-l*p+v*d,n[4]=v*(u-o[0])+p*(f-o[1])+o[0],n[5]=v*(f-o[1])-p*(u-o[0])+o[1],n}function scale$1(n,r,a){var o=a[0],s=a[1];return n[0]=r[0]*o,n[1]=r[1]*s,n[2]=r[2]*o,n[3]=r[3]*s,n[4]=r[4]*o,n[5]=r[5]*s,n}function invert(n,r){var a=r[0],o=r[2],s=r[4],l=r[1],u=r[3],c=r[5],d=a*u-l*o;return d?(d=1/d,n[0]=u*d,n[1]=-l*d,n[2]=-o*d,n[3]=a*d,n[4]=(o*c-u*s)*d,n[5]=(l*s-a*c)*d,n):null}function clone$4(n){var r=create$1();return copy(r,n),r}const matrix$2=Object.freeze(Object.defineProperty({__proto__:null,clone:clone$4,copy,create:create$1,identity,invert,mul,rotate,scale:scale$1,translate},Symbol.toStringTag,{value:"Module"}));var Point=function(){function n(r,a){this.x=r||0,this.y=a||0}return n.prototype.copy=function(r){return this.x=r.x,this.y=r.y,this},n.prototype.clone=function(){return new n(this.x,this.y)},n.prototype.set=function(r,a){return this.x=r,this.y=a,this},n.prototype.equal=function(r){return r.x===this.x&&r.y===this.y},n.prototype.add=function(r){return this.x+=r.x,this.y+=r.y,this},n.prototype.scale=function(r){this.x*=r,this.y*=r},n.prototype.scaleAndAdd=function(r,a){this.x+=r.x*a,this.y+=r.y*a},n.prototype.sub=function(r){return this.x-=r.x,this.y-=r.y,this},n.prototype.dot=function(r){return this.x*r.x+this.y*r.y},n.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},n.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},n.prototype.normalize=function(){var r=this.len();return this.x/=r,this.y/=r,this},n.prototype.distance=function(r){var a=this.x-r.x,o=this.y-r.y;return Math.sqrt(a*a+o*o)},n.prototype.distanceSquare=function(r){var a=this.x-r.x,o=this.y-r.y;return a*a+o*o},n.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},n.prototype.transform=function(r){if(r){var a=this.x,o=this.y;return this.x=r[0]*a+r[2]*o+r[4],this.y=r[1]*a+r[3]*o+r[5],this}},n.prototype.toArray=function(r){return r[0]=this.x,r[1]=this.y,r},n.prototype.fromArray=function(r){this.x=r[0],this.y=r[1]},n.set=function(r,a,o){r.x=a,r.y=o},n.copy=function(r,a){r.x=a.x,r.y=a.y},n.len=function(r){return Math.sqrt(r.x*r.x+r.y*r.y)},n.lenSquare=function(r){return r.x*r.x+r.y*r.y},n.dot=function(r,a){return r.x*a.x+r.y*a.y},n.add=function(r,a,o){r.x=a.x+o.x,r.y=a.y+o.y},n.sub=function(r,a,o){r.x=a.x-o.x,r.y=a.y-o.y},n.scale=function(r,a,o){r.x=a.x*o,r.y=a.y*o},n.scaleAndAdd=function(r,a,o,s){r.x=a.x+o.x*s,r.y=a.y+o.y*s},n.lerp=function(r,a,o,s){var l=1-s;r.x=l*a.x+s*o.x,r.y=l*a.y+s*o.y},n}(),mathMin$a=Math.min,mathMax$a=Math.max,lt=new Point,rb=new Point,lb=new Point,rt=new Point,minTv$1=new Point,maxTv$1=new Point,BoundingRect=function(){function n(r,a,o,s){o<0&&(r=r+o,o=-o),s<0&&(a=a+s,s=-s),this.x=r,this.y=a,this.width=o,this.height=s}return n.prototype.union=function(r){var a=mathMin$a(r.x,this.x),o=mathMin$a(r.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=mathMax$a(r.x+r.width,this.x+this.width)-a:this.width=r.width,isFinite(this.y)&&isFinite(this.height)?this.height=mathMax$a(r.y+r.height,this.y+this.height)-o:this.height=r.height,this.x=a,this.y=o},n.prototype.applyTransform=function(r){n.applyTransform(this,this,r)},n.prototype.calculateTransform=function(r){var a=this,o=r.width/a.width,s=r.height/a.height,l=create$1();return translate(l,l,[-a.x,-a.y]),scale$1(l,l,[o,s]),translate(l,l,[r.x,r.y]),l},n.prototype.intersect=function(r,a){if(!r)return!1;r instanceof n||(r=n.create(r));var o=this,s=o.x,l=o.x+o.width,u=o.y,c=o.y+o.height,d=r.x,f=r.x+r.width,p=r.y,v=r.y+r.height,g=!(l<d||f<s||c<p||v<u);if(a){var y=1/0,_=0,S=Math.abs(l-d),b=Math.abs(f-s),x=Math.abs(c-p),A=Math.abs(v-u),w=Math.min(S,b),E=Math.min(x,A);l<d||f<s?w>_&&(_=w,S<b?Point.set(maxTv$1,-S,0):Point.set(maxTv$1,b,0)):w<y&&(y=w,S<b?Point.set(minTv$1,S,0):Point.set(minTv$1,-b,0)),c<p||v<u?E>_&&(_=E,x<A?Point.set(maxTv$1,0,-x):Point.set(maxTv$1,0,A)):w<y&&(y=w,x<A?Point.set(minTv$1,0,x):Point.set(minTv$1,0,-A))}return a&&Point.copy(a,g?minTv$1:maxTv$1),g},n.prototype.contain=function(r,a){var o=this;return r>=o.x&&r<=o.x+o.width&&a>=o.y&&a<=o.y+o.height},n.prototype.clone=function(){return new n(this.x,this.y,this.width,this.height)},n.prototype.copy=function(r){n.copy(this,r)},n.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},n.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},n.prototype.isZero=function(){return this.width===0||this.height===0},n.create=function(r){return new n(r.x,r.y,r.width,r.height)},n.copy=function(r,a){r.x=a.x,r.y=a.y,r.width=a.width,r.height=a.height},n.applyTransform=function(r,a,o){if(!o){r!==a&&n.copy(r,a);return}if(o[1]<1e-5&&o[1]>-1e-5&&o[2]<1e-5&&o[2]>-1e-5){var s=o[0],l=o[3],u=o[4],c=o[5];r.x=a.x*s+u,r.y=a.y*l+c,r.width=a.width*s,r.height=a.height*l,r.width<0&&(r.x+=r.width,r.width=-r.width),r.height<0&&(r.y+=r.height,r.height=-r.height);return}lt.x=lb.x=a.x,lt.y=rt.y=a.y,rb.x=rt.x=a.x+a.width,rb.y=lb.y=a.y+a.height,lt.transform(o),rt.transform(o),rb.transform(o),lb.transform(o),r.x=mathMin$a(lt.x,rb.x,lb.x,rt.x),r.y=mathMin$a(lt.y,rb.y,lb.y,rt.y);var d=mathMax$a(lt.x,rb.x,lb.x,rt.x),f=mathMax$a(lt.y,rb.y,lb.y,rt.y);r.width=d-r.x,r.height=f-r.y},n}(),SILENT="silent";function makeEventPacket(n,r,a){return{type:n,event:a,target:r.target,topTarget:r.topTarget,cancelBubble:!1,offsetX:a.zrX,offsetY:a.zrY,gestureEvent:a.gestureEvent,pinchX:a.pinchX,pinchY:a.pinchY,pinchScale:a.pinchScale,wheelDelta:a.zrDelta,zrByTouch:a.zrByTouch,which:a.which,stop:stopEvent}}function stopEvent(){stop(this.event)}var EmptyProxy=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.handler=null,a}return r.prototype.dispose=function(){},r.prototype.setCursor=function(){},r}(Eventful),HoveredResult=function(){function n(r,a){this.x=r,this.y=a}return n}(),handlerNames=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],tmpRect$1=new BoundingRect(0,0,0,0),Handler=function(n){__extends(r,n);function r(a,o,s,l,u){var c=n.call(this)||this;return c._hovered=new HoveredResult(0,0),c.storage=a,c.painter=o,c.painterRoot=l,c._pointerSize=u,s=s||new EmptyProxy,c.proxy=null,c.setHandlerProxy(s),c._draggingMgr=new Draggable(c),c}return r.prototype.setHandlerProxy=function(a){this.proxy&&this.proxy.dispose(),a&&(each$f(handlerNames,function(o){a.on&&a.on(o,this[o],this)},this),a.handler=this),this.proxy=a},r.prototype.mousemove=function(a){var o=a.zrX,s=a.zrY,l=isOutsideBoundary(this,o,s),u=this._hovered,c=u.target;c&&!c.__zr&&(u=this.findHover(u.x,u.y),c=u.target);var d=this._hovered=l?new HoveredResult(o,s):this.findHover(o,s),f=d.target,p=this.proxy;p.setCursor&&p.setCursor(f?f.cursor:"default"),c&&f!==c&&this.dispatchToElement(u,"mouseout",a),this.dispatchToElement(d,"mousemove",a),f&&f!==c&&this.dispatchToElement(d,"mouseover",a)},r.prototype.mouseout=function(a){var o=a.zrEventControl;o!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",a),o!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:a})},r.prototype.resize=function(){this._hovered=new HoveredResult(0,0)},r.prototype.dispatch=function(a,o){var s=this[a];s&&s.call(this,o)},r.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},r.prototype.setCursorStyle=function(a){var o=this.proxy;o.setCursor&&o.setCursor(a)},r.prototype.dispatchToElement=function(a,o,s){a=a||{};var l=a.target;if(!(l&&l.silent)){for(var u="on"+o,c=makeEventPacket(o,a,s);l&&(l[u]&&(c.cancelBubble=!!l[u].call(l,c)),l.trigger(o,c),l=l.__hostTarget?l.__hostTarget:l.parent,!c.cancelBubble););c.cancelBubble||(this.trigger(o,c),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(d){typeof d[u]=="function"&&d[u].call(d,c),d.trigger&&d.trigger(o,c)}))}},r.prototype.findHover=function(a,o,s){var l=this.storage.getDisplayList(),u=new HoveredResult(a,o);if(setHoverTarget(l,u,a,o,s),this._pointerSize&&!u.target){for(var c=[],d=this._pointerSize,f=d/2,p=new BoundingRect(a-f,o-f,d,d),v=l.length-1;v>=0;v--){var g=l[v];g!==s&&!g.ignore&&!g.ignoreCoarsePointer&&(!g.parent||!g.parent.ignoreCoarsePointer)&&(tmpRect$1.copy(g.getBoundingRect()),g.transform&&tmpRect$1.applyTransform(g.transform),tmpRect$1.intersect(p)&&c.push(g))}if(c.length)for(var y=4,_=Math.PI/12,S=Math.PI*2,b=0;b<f;b+=y)for(var x=0;x<S;x+=_){var A=a+b*Math.cos(x),w=o+b*Math.sin(x);if(setHoverTarget(c,u,A,w,s),u.target)return u}}return u},r.prototype.processGesture=function(a,o){this._gestureMgr||(this._gestureMgr=new GestureMgr);var s=this._gestureMgr;o==="start"&&s.clear();var l=s.recognize(a,this.findHover(a.zrX,a.zrY,null).target,this.proxy.dom);if(o==="end"&&s.clear(),l){var u=l.type;a.gestureEvent=u;var c=new HoveredResult;c.target=l.target,this.dispatchToElement(c,u,l.event)}},r}(Eventful);each$f(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(n){Handler.prototype[n]=function(r){var a=r.zrX,o=r.zrY,s=isOutsideBoundary(this,a,o),l,u;if((n!=="mouseup"||!s)&&(l=this.findHover(a,o),u=l.target),n==="mousedown")this._downEl=u,this._downPoint=[r.zrX,r.zrY],this._upEl=u;else if(n==="mouseup")this._upEl=u;else if(n==="click"){if(this._downEl!==this._upEl||!this._downPoint||dist$1(this._downPoint,[r.zrX,r.zrY])>4)return;this._downPoint=null}this.dispatchToElement(l,n,r)}});function isHover(n,r,a){if(n[n.rectHover?"rectContain":"contain"](r,a)){for(var o=n,s=void 0,l=!1;o;){if(o.ignoreClip&&(l=!0),!l){var u=o.getClipPath();if(u&&!u.contain(r,a))return!1}o.silent&&(s=!0);var c=o.__hostTarget;o=c||o.parent}return s?SILENT:!0}return!1}function setHoverTarget(n,r,a,o,s){for(var l=n.length-1;l>=0;l--){var u=n[l],c=void 0;if(u!==s&&!u.ignore&&(c=isHover(u,a,o))&&(!r.topTarget&&(r.topTarget=u),c!==SILENT)){r.target=u;break}}}function isOutsideBoundary(n,r,a){var o=n.painter;return r<0||r>o.getWidth()||a<0||a>o.getHeight()}var DEFAULT_MIN_MERGE=32,DEFAULT_MIN_GALLOPING=7;function minRunLength(n){for(var r=0;n>=DEFAULT_MIN_MERGE;)r|=n&1,n>>=1;return n+r}function makeAscendingRun(n,r,a,o){var s=r+1;if(s===a)return 1;if(o(n[s++],n[r])<0){for(;s<a&&o(n[s],n[s-1])<0;)s++;reverseRun(n,r,s)}else for(;s<a&&o(n[s],n[s-1])>=0;)s++;return s-r}function reverseRun(n,r,a){for(a--;r<a;){var o=n[r];n[r++]=n[a],n[a--]=o}}function binaryInsertionSort(n,r,a,o,s){for(o===r&&o++;o<a;o++){for(var l=n[o],u=r,c=o,d;u<c;)d=u+c>>>1,s(l,n[d])<0?c=d:u=d+1;var f=o-u;switch(f){case 3:n[u+3]=n[u+2];case 2:n[u+2]=n[u+1];case 1:n[u+1]=n[u];break;default:for(;f>0;)n[u+f]=n[u+f-1],f--}n[u]=l}}function gallopLeft(n,r,a,o,s,l){var u=0,c=0,d=1;if(l(n,r[a+s])>0){for(c=o-s;d<c&&l(n,r[a+s+d])>0;)u=d,d=(d<<1)+1,d<=0&&(d=c);d>c&&(d=c),u+=s,d+=s}else{for(c=s+1;d<c&&l(n,r[a+s-d])<=0;)u=d,d=(d<<1)+1,d<=0&&(d=c);d>c&&(d=c);var f=u;u=s-d,d=s-f}for(u++;u<d;){var p=u+(d-u>>>1);l(n,r[a+p])>0?u=p+1:d=p}return d}function gallopRight(n,r,a,o,s,l){var u=0,c=0,d=1;if(l(n,r[a+s])<0){for(c=s+1;d<c&&l(n,r[a+s-d])<0;)u=d,d=(d<<1)+1,d<=0&&(d=c);d>c&&(d=c);var f=u;u=s-d,d=s-f}else{for(c=o-s;d<c&&l(n,r[a+s+d])>=0;)u=d,d=(d<<1)+1,d<=0&&(d=c);d>c&&(d=c),u+=s,d+=s}for(u++;u<d;){var p=u+(d-u>>>1);l(n,r[a+p])<0?d=p:u=p+1}return d}function TimSort(n,r){var a=DEFAULT_MIN_GALLOPING,o,s,l=0,u=[];o=[],s=[];function c(y,_){o[l]=y,s[l]=_,l+=1}function d(){for(;l>1;){var y=l-2;if(y>=1&&s[y-1]<=s[y]+s[y+1]||y>=2&&s[y-2]<=s[y]+s[y-1])s[y-1]<s[y+1]&&y--;else if(s[y]>s[y+1])break;p(y)}}function f(){for(;l>1;){var y=l-2;y>0&&s[y-1]<s[y+1]&&y--,p(y)}}function p(y){var _=o[y],S=s[y],b=o[y+1],x=s[y+1];s[y]=S+x,y===l-3&&(o[y+1]=o[y+2],s[y+1]=s[y+2]),l--;var A=gallopRight(n[b],n,_,S,0,r);_+=A,S-=A,S!==0&&(x=gallopLeft(n[_+S-1],n,b,x,x-1,r),x!==0&&(S<=x?v(_,S,b,x):g(_,S,b,x)))}function v(y,_,S,b){var x=0;for(x=0;x<_;x++)u[x]=n[y+x];var A=0,w=S,E=y;if(n[E++]=n[w++],--b===0){for(x=0;x<_;x++)n[E+x]=u[A+x];return}if(_===1){for(x=0;x<b;x++)n[E+x]=n[w+x];n[E+b]=u[A];return}for(var D=a,C,$,P;;){C=0,$=0,P=!1;do if(r(n[w],u[A])<0){if(n[E++]=n[w++],$++,C=0,--b===0){P=!0;break}}else if(n[E++]=u[A++],C++,$=0,--_===1){P=!0;break}while((C|$)<D);if(P)break;do{if(C=gallopRight(n[w],u,A,_,0,r),C!==0){for(x=0;x<C;x++)n[E+x]=u[A+x];if(E+=C,A+=C,_-=C,_<=1){P=!0;break}}if(n[E++]=n[w++],--b===0){P=!0;break}if($=gallopLeft(u[A],n,w,b,0,r),$!==0){for(x=0;x<$;x++)n[E+x]=n[w+x];if(E+=$,w+=$,b-=$,b===0){P=!0;break}}if(n[E++]=u[A++],--_===1){P=!0;break}D--}while(C>=DEFAULT_MIN_GALLOPING||$>=DEFAULT_MIN_GALLOPING);if(P)break;D<0&&(D=0),D+=2}if(a=D,a<1&&(a=1),_===1){for(x=0;x<b;x++)n[E+x]=n[w+x];n[E+b]=u[A]}else{if(_===0)throw new Error;for(x=0;x<_;x++)n[E+x]=u[A+x]}}function g(y,_,S,b){var x=0;for(x=0;x<b;x++)u[x]=n[S+x];var A=y+_-1,w=b-1,E=S+b-1,D=0,C=0;if(n[E--]=n[A--],--_===0){for(D=E-(b-1),x=0;x<b;x++)n[D+x]=u[x];return}if(b===1){for(E-=_,A-=_,C=E+1,D=A+1,x=_-1;x>=0;x--)n[C+x]=n[D+x];n[E]=u[w];return}for(var $=a;;){var P=0,M=0,I=!1;do if(r(u[w],n[A])<0){if(n[E--]=n[A--],P++,M=0,--_===0){I=!0;break}}else if(n[E--]=u[w--],M++,P=0,--b===1){I=!0;break}while((P|M)<$);if(I)break;do{if(P=_-gallopRight(u[w],n,y,_,_-1,r),P!==0){for(E-=P,A-=P,_-=P,C=E+1,D=A+1,x=P-1;x>=0;x--)n[C+x]=n[D+x];if(_===0){I=!0;break}}if(n[E--]=u[w--],--b===1){I=!0;break}if(M=b-gallopLeft(n[A],u,0,b,b-1,r),M!==0){for(E-=M,w-=M,b-=M,C=E+1,D=w+1,x=0;x<M;x++)n[C+x]=u[D+x];if(b<=1){I=!0;break}}if(n[E--]=n[A--],--_===0){I=!0;break}$--}while(P>=DEFAULT_MIN_GALLOPING||M>=DEFAULT_MIN_GALLOPING);if(I)break;$<0&&($=0),$+=2}if(a=$,a<1&&(a=1),b===1){for(E-=_,A-=_,C=E+1,D=A+1,x=_-1;x>=0;x--)n[C+x]=n[D+x];n[E]=u[w]}else{if(b===0)throw new Error;for(D=E-(b-1),x=0;x<b;x++)n[D+x]=u[x]}}return{mergeRuns:d,forceMergeRuns:f,pushRun:c}}function sort$2(n,r,a,o){a||(a=0),o||(o=n.length);var s=o-a;if(!(s<2)){var l=0;if(s<DEFAULT_MIN_MERGE){l=makeAscendingRun(n,a,o,r),binaryInsertionSort(n,a,o,a+l,r);return}var u=TimSort(n,r),c=minRunLength(s);do{if(l=makeAscendingRun(n,a,o,r),l<c){var d=s;d>c&&(d=c),binaryInsertionSort(n,a,a+d,a+l,r),l=d}u.pushRun(a,l),u.mergeRuns(),s-=l,a+=l}while(s!==0);u.forceMergeRuns()}}var REDRAW_BIT=1,STYLE_CHANGED_BIT=2,SHAPE_CHANGED_BIT=4,invalidZErrorLogged=!1;function logInvalidZError(){invalidZErrorLogged||(invalidZErrorLogged=!0)}function shapeCompareFunc(n,r){return n.zlevel===r.zlevel?n.z===r.z?n.z2-r.z2:n.z-r.z:n.zlevel-r.zlevel}var Storage=function(){function n(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=shapeCompareFunc}return n.prototype.traverse=function(r,a){for(var o=0;o<this._roots.length;o++)this._roots[o].traverse(r,a)},n.prototype.getDisplayList=function(r,a){a=a||!1;var o=this._displayList;return(r||!o.length)&&this.updateDisplayList(a),o},n.prototype.updateDisplayList=function(r){this._displayListLen=0;for(var a=this._roots,o=this._displayList,s=0,l=a.length;s<l;s++)this._updateAndAddDisplayable(a[s],null,r);o.length=this._displayListLen,sort$2(o,shapeCompareFunc)},n.prototype._updateAndAddDisplayable=function(r,a,o){if(!(r.ignore&&!o)){r.beforeUpdate(),r.update(),r.afterUpdate();var s=r.getClipPath();if(r.ignoreClip)a=null;else if(s){a?a=a.slice():a=[];for(var l=s,u=r;l;)l.parent=u,l.updateTransform(),a.push(l),u=l,l=l.getClipPath()}if(r.childrenRef){for(var c=r.childrenRef(),d=0;d<c.length;d++){var f=c[d];r.__dirty&&(f.__dirty|=REDRAW_BIT),this._updateAndAddDisplayable(f,a,o)}r.__dirty=0}else{var p=r;a&&a.length?p.__clipPaths=a:p.__clipPaths&&p.__clipPaths.length>0&&(p.__clipPaths=[]),isNaN(p.z)&&(logInvalidZError(),p.z=0),isNaN(p.z2)&&(logInvalidZError(),p.z2=0),isNaN(p.zlevel)&&(logInvalidZError(),p.zlevel=0),this._displayList[this._displayListLen++]=p}var v=r.getDecalElement&&r.getDecalElement();v&&this._updateAndAddDisplayable(v,a,o);var g=r.getTextGuideLine();g&&this._updateAndAddDisplayable(g,a,o);var y=r.getTextContent();y&&this._updateAndAddDisplayable(y,a,o)}},n.prototype.addRoot=function(r){r.__zr&&r.__zr.storage===this||this._roots.push(r)},n.prototype.delRoot=function(r){if(r instanceof Array){for(var a=0,o=r.length;a<o;a++)this.delRoot(r[a]);return}var s=indexOf(this._roots,r);s>=0&&this._roots.splice(s,1)},n.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},n.prototype.getRoots=function(){return this._roots},n.prototype.dispose=function(){this._displayList=null,this._roots=null},n}(),requestAnimationFrame$1;requestAnimationFrame$1=env.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(n){return setTimeout(n,16)};var easingFuncs={linear:function(n){return n},quadraticIn:function(n){return n*n},quadraticOut:function(n){return n*(2-n)},quadraticInOut:function(n){return(n*=2)<1?.5*n*n:-.5*(--n*(n-2)-1)},cubicIn:function(n){return n*n*n},cubicOut:function(n){return--n*n*n+1},cubicInOut:function(n){return(n*=2)<1?.5*n*n*n:.5*((n-=2)*n*n+2)},quarticIn:function(n){return n*n*n*n},quarticOut:function(n){return 1- --n*n*n*n},quarticInOut:function(n){return(n*=2)<1?.5*n*n*n*n:-.5*((n-=2)*n*n*n-2)},quinticIn:function(n){return n*n*n*n*n},quinticOut:function(n){return--n*n*n*n*n+1},quinticInOut:function(n){return(n*=2)<1?.5*n*n*n*n*n:.5*((n-=2)*n*n*n*n+2)},sinusoidalIn:function(n){return 1-Math.cos(n*Math.PI/2)},sinusoidalOut:function(n){return Math.sin(n*Math.PI/2)},sinusoidalInOut:function(n){return .5*(1-Math.cos(Math.PI*n))},exponentialIn:function(n){return n===0?0:Math.pow(1024,n-1)},exponentialOut:function(n){return n===1?1:1-Math.pow(2,-10*n)},exponentialInOut:function(n){return n===0?0:n===1?1:(n*=2)<1?.5*Math.pow(1024,n-1):.5*(-Math.pow(2,-10*(n-1))+2)},circularIn:function(n){return 1-Math.sqrt(1-n*n)},circularOut:function(n){return Math.sqrt(1- --n*n)},circularInOut:function(n){return(n*=2)<1?-.5*(Math.sqrt(1-n*n)-1):.5*(Math.sqrt(1-(n-=2)*n)+1)},elasticIn:function(n){var r,a=.1,o=.4;return n===0?0:n===1?1:(!a||a<1?(a=1,r=o/4):r=o*Math.asin(1/a)/(2*Math.PI),-(a*Math.pow(2,10*(n-=1))*Math.sin((n-r)*(2*Math.PI)/o)))},elasticOut:function(n){var r,a=.1,o=.4;return n===0?0:n===1?1:(!a||a<1?(a=1,r=o/4):r=o*Math.asin(1/a)/(2*Math.PI),a*Math.pow(2,-10*n)*Math.sin((n-r)*(2*Math.PI)/o)+1)},elasticInOut:function(n){var r,a=.1,o=.4;return n===0?0:n===1?1:(!a||a<1?(a=1,r=o/4):r=o*Math.asin(1/a)/(2*Math.PI),(n*=2)<1?-.5*(a*Math.pow(2,10*(n-=1))*Math.sin((n-r)*(2*Math.PI)/o)):a*Math.pow(2,-10*(n-=1))*Math.sin((n-r)*(2*Math.PI)/o)*.5+1)},backIn:function(n){var r=1.70158;return n*n*((r+1)*n-r)},backOut:function(n){var r=1.70158;return--n*n*((r+1)*n+r)+1},backInOut:function(n){var r=2.5949095;return(n*=2)<1?.5*(n*n*((r+1)*n-r)):.5*((n-=2)*n*((r+1)*n+r)+2)},bounceIn:function(n){return 1-easingFuncs.bounceOut(1-n)},bounceOut:function(n){return n<1/2.75?7.5625*n*n:n<2/2.75?7.5625*(n-=1.5/2.75)*n+.75:n<2.5/2.75?7.5625*(n-=2.25/2.75)*n+.9375:7.5625*(n-=2.625/2.75)*n+.984375},bounceInOut:function(n){return n<.5?easingFuncs.bounceIn(n*2)*.5:easingFuncs.bounceOut(n*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(n){return n>-EPSILON$4&&n<EPSILON$4}function isNotAroundZero$1(n){return n>EPSILON$4||n<-EPSILON$4}function cubicAt(n,r,a,o,s){var l=1-s;return l*l*(l*n+3*s*r)+s*s*(s*o+3*l*a)}function cubicDerivativeAt(n,r,a,o,s){var l=1-s;return 3*(((r-n)*l+2*(a-r)*s)*l+(o-a)*s*s)}function cubicRootAt(n,r,a,o,s,l){var u=o+3*(r-a)-n,c=3*(a-r*2+n),d=3*(r-n),f=n-s,p=c*c-3*u*d,v=c*d-9*u*f,g=d*d-3*c*f,y=0;if(isAroundZero$1(p)&&isAroundZero$1(v))if(isAroundZero$1(c))l[0]=0;else{var _=-d/c;_>=0&&_<=1&&(l[y++]=_)}else{var S=v*v-4*p*g;if(isAroundZero$1(S)){var b=v/p,_=-c/u+b,x=-b/2;_>=0&&_<=1&&(l[y++]=_),x>=0&&x<=1&&(l[y++]=x)}else if(S>0){var A=mathSqrt$3(S),w=p*c+1.5*u*(-v+A),E=p*c+1.5*u*(-v-A);w<0?w=-mathPow$2(-w,ONE_THIRD):w=mathPow$2(w,ONE_THIRD),E<0?E=-mathPow$2(-E,ONE_THIRD):E=mathPow$2(E,ONE_THIRD);var _=(-c-(w+E))/(3*u);_>=0&&_<=1&&(l[y++]=_)}else{var D=(2*p*c-3*u*v)/(2*mathSqrt$3(p*p*p)),C=Math.acos(D)/3,$=mathSqrt$3(p),P=Math.cos(C),_=(-c-2*$*P)/(3*u),x=(-c+$*(P+THREE_SQRT*Math.sin(C)))/(3*u),M=(-c+$*(P-THREE_SQRT*Math.sin(C)))/(3*u);_>=0&&_<=1&&(l[y++]=_),x>=0&&x<=1&&(l[y++]=x),M>=0&&M<=1&&(l[y++]=M)}}return y}function cubicExtrema(n,r,a,o,s){var l=6*a-12*r+6*n,u=9*r+3*o-3*n-9*a,c=3*r-3*n,d=0;if(isAroundZero$1(u)){if(isNotAroundZero$1(l)){var f=-c/l;f>=0&&f<=1&&(s[d++]=f)}}else{var p=l*l-4*u*c;if(isAroundZero$1(p))s[0]=-l/(2*u);else if(p>0){var v=mathSqrt$3(p),f=(-l+v)/(2*u),g=(-l-v)/(2*u);f>=0&&f<=1&&(s[d++]=f),g>=0&&g<=1&&(s[d++]=g)}}return d}function cubicSubdivide(n,r,a,o,s,l){var u=(r-n)*s+n,c=(a-r)*s+r,d=(o-a)*s+a,f=(c-u)*s+u,p=(d-c)*s+c,v=(p-f)*s+f;l[0]=n,l[1]=u,l[2]=f,l[3]=v,l[4]=v,l[5]=p,l[6]=d,l[7]=o}function cubicProjectPoint(n,r,a,o,s,l,u,c,d,f,p){var v,g=.005,y=1/0,_,S,b,x;_v0[0]=d,_v0[1]=f;for(var A=0;A<1;A+=.05)_v1[0]=cubicAt(n,a,s,u,A),_v1[1]=cubicAt(r,o,l,c,A),b=distSquare(_v0,_v1),b<y&&(v=A,y=b);y=1/0;for(var w=0;w<32&&!(g<EPSILON_NUMERIC);w++)_=v-g,S=v+g,_v1[0]=cubicAt(n,a,s,u,_),_v1[1]=cubicAt(r,o,l,c,_),b=distSquare(_v1,_v0),_>=0&&b<y?(v=_,y=b):(_v2[0]=cubicAt(n,a,s,u,S),_v2[1]=cubicAt(r,o,l,c,S),x=distSquare(_v2,_v0),S<=1&&x<y?(v=S,y=x):g*=.5);return p&&(p[0]=cubicAt(n,a,s,u,v),p[1]=cubicAt(r,o,l,c,v)),mathSqrt$3(y)}function cubicLength(n,r,a,o,s,l,u,c,d){for(var f=n,p=r,v=0,g=1/d,y=1;y<=d;y++){var _=y*g,S=cubicAt(n,a,s,u,_),b=cubicAt(r,o,l,c,_),x=S-f,A=b-p;v+=Math.sqrt(x*x+A*A),f=S,p=b}return v}function quadraticAt$1(n,r,a,o){var s=1-o;return s*(s*n+2*o*r)+o*o*a}function quadraticDerivativeAt(n,r,a,o){return 2*((1-o)*(r-n)+o*(a-r))}function quadraticRootAt(n,r,a,o,s){var l=n-2*r+a,u=2*(r-n),c=n-o,d=0;if(isAroundZero$1(l)){if(isNotAroundZero$1(u)){var f=-c/u;f>=0&&f<=1&&(s[d++]=f)}}else{var p=u*u-4*l*c;if(isAroundZero$1(p)){var f=-u/(2*l);f>=0&&f<=1&&(s[d++]=f)}else if(p>0){var v=mathSqrt$3(p),f=(-u+v)/(2*l),g=(-u-v)/(2*l);f>=0&&f<=1&&(s[d++]=f),g>=0&&g<=1&&(s[d++]=g)}}return d}function quadraticExtremum(n,r,a){var o=n+a-2*r;return o===0?.5:(n-r)/o}function quadraticSubdivide(n,r,a,o,s){var l=(r-n)*o+n,u=(a-r)*o+r,c=(u-l)*o+l;s[0]=n,s[1]=l,s[2]=c,s[3]=c,s[4]=u,s[5]=a}function quadraticProjectPoint(n,r,a,o,s,l,u,c,d){var f,p=.005,v=1/0;_v0[0]=u,_v0[1]=c;for(var g=0;g<1;g+=.05){_v1[0]=quadraticAt$1(n,a,s,g),_v1[1]=quadraticAt$1(r,o,l,g);var y=distSquare(_v0,_v1);y<v&&(f=g,v=y)}v=1/0;for(var _=0;_<32&&!(p<EPSILON_NUMERIC);_++){var S=f-p,b=f+p;_v1[0]=quadraticAt$1(n,a,s,S),_v1[1]=quadraticAt$1(r,o,l,S);var y=distSquare(_v1,_v0);if(S>=0&&y<v)f=S,v=y;else{_v2[0]=quadraticAt$1(n,a,s,b),_v2[1]=quadraticAt$1(r,o,l,b);var x=distSquare(_v2,_v0);b<=1&&x<v?(f=b,v=x):p*=.5}}return d&&(d[0]=quadraticAt$1(n,a,s,f),d[1]=quadraticAt$1(r,o,l,f)),mathSqrt$3(v)}function quadraticLength(n,r,a,o,s,l,u){for(var c=n,d=r,f=0,p=1/u,v=1;v<=u;v++){var g=v*p,y=quadraticAt$1(n,a,s,g),_=quadraticAt$1(r,o,l,g),S=y-c,b=_-d;f+=Math.sqrt(S*S+b*b),c=y,d=_}return f}var regexp=/cubic-bezier\(([0-9,\.e ]+)\)/;function createCubicEasingFunc(n){var r=n&®exp.exec(n);if(r){var a=r[1].split(","),o=+trim$1(a[0]),s=+trim$1(a[1]),l=+trim$1(a[2]),u=+trim$1(a[3]);if(isNaN(o+s+l+u))return;var c=[];return function(d){return d<=0?0:d>=1?1:cubicRootAt(0,o,l,1,d,c)&&cubicAt(0,s,u,1,c[0])}}}var Clip=function(){function n(r){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=r.life||1e3,this._delay=r.delay||0,this.loop=r.loop||!1,this.onframe=r.onframe||noop,this.ondestroy=r.ondestroy||noop,this.onrestart=r.onrestart||noop,r.easing&&this.setEasing(r.easing)}return n.prototype.step=function(r,a){if(this._inited||(this._startTime=r+this._delay,this._inited=!0),this._paused){this._pausedTime+=a;return}var o=this._life,s=r-this._startTime-this._pausedTime,l=s/o;l<0&&(l=0),l=Math.min(l,1);var u=this.easingFunc,c=u?u(l):l;if(this.onframe(c),l===1)if(this.loop){var d=s%o;this._startTime=r-d,this._pausedTime=0,this.onrestart()}else return!0;return!1},n.prototype.pause=function(){this._paused=!0},n.prototype.resume=function(){this._paused=!1},n.prototype.setEasing=function(r){this.easing=r,this.easingFunc=isFunction(r)?r:easingFuncs[r]||createCubicEasingFunc(r)},n}(),Entry=function(){function n(r){this.value=r}return n}(),LinkedList=function(){function n(){this._len=0}return n.prototype.insert=function(r){var a=new Entry(r);return this.insertEntry(a),a},n.prototype.insertEntry=function(r){this.head?(this.tail.next=r,r.prev=this.tail,r.next=null,this.tail=r):this.head=this.tail=r,this._len++},n.prototype.remove=function(r){var a=r.prev,o=r.next;a?a.next=o:this.head=o,o?o.prev=a:this.tail=a,r.next=r.prev=null,this._len--},n.prototype.len=function(){return this._len},n.prototype.clear=function(){this.head=this.tail=null,this._len=0},n}(),LRU=function(){function n(r){this._list=new LinkedList,this._maxSize=10,this._map={},this._maxSize=r}return n.prototype.put=function(r,a){var o=this._list,s=this._map,l=null;if(s[r]==null){var u=o.len(),c=this._lastRemovedEntry;if(u>=this._maxSize&&u>0){var d=o.head;o.remove(d),delete s[d.key],l=d.value,this._lastRemovedEntry=d}c?c.value=a:c=new Entry(a),c.key=r,o.insertEntry(c),s[r]=c}return l},n.prototype.get=function(r){var a=this._map[r],o=this._list;if(a!=null)return a!==o.tail&&(o.remove(a),o.insertEntry(a)),a.value},n.prototype.clear=function(){this._list.clear(),this._map={}},n.prototype.len=function(){return this._list.len()},n}(),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(n){return n=Math.round(n),n<0?0:n>255?255:n}function clampCssAngle(n){return n=Math.round(n),n<0?0:n>360?360:n}function clampCssFloat(n){return n<0?0:n>1?1:n}function parseCssInt(n){var r=n;return r.length&&r.charAt(r.length-1)==="%"?clampCssByte(parseFloat(r)/100*255):clampCssByte(parseInt(r,10))}function parseCssFloat(n){var r=n;return r.length&&r.charAt(r.length-1)==="%"?clampCssFloat(parseFloat(r)/100):clampCssFloat(parseFloat(r))}function cssHueToRgb(n,r,a){return a<0?a+=1:a>1&&(a-=1),a*6<1?n+(r-n)*a*6:a*2<1?r:a*3<2?n+(r-n)*(2/3-a)*6:n}function lerpNumber(n,r,a){return n+(r-n)*a}function setRgba(n,r,a,o,s){return n[0]=r,n[1]=a,n[2]=o,n[3]=s,n}function copyRgba(n,r){return n[0]=r[0],n[1]=r[1],n[2]=r[2],n[3]=r[3],n}var colorCache=new LRU(20),lastRemovedArr=null;function putToCache(n,r){lastRemovedArr&©Rgba(lastRemovedArr,r),lastRemovedArr=colorCache.put(n,lastRemovedArr||r.slice())}function parse(n,r){if(n){r=r||[];var a=colorCache.get(n);if(a)return copyRgba(r,a);n=n+"";var o=n.replace(/ /g,"").toLowerCase();if(o in kCSSColorTable)return copyRgba(r,kCSSColorTable[o]),putToCache(n,r),r;var s=o.length;if(o.charAt(0)==="#"){if(s===4||s===5){var l=parseInt(o.slice(1,4),16);if(!(l>=0&&l<=4095)){setRgba(r,0,0,0,1);return}return setRgba(r,(l&3840)>>4|(l&3840)>>8,l&240|(l&240)>>4,l&15|(l&15)<<4,s===5?parseInt(o.slice(4),16)/15:1),putToCache(n,r),r}else if(s===7||s===9){var l=parseInt(o.slice(1,7),16);if(!(l>=0&&l<=16777215)){setRgba(r,0,0,0,1);return}return setRgba(r,(l&16711680)>>16,(l&65280)>>8,l&255,s===9?parseInt(o.slice(7),16)/255:1),putToCache(n,r),r}return}var u=o.indexOf("("),c=o.indexOf(")");if(u!==-1&&c+1===s){var d=o.substr(0,u),f=o.substr(u+1,c-(u+1)).split(","),p=1;switch(d){case"rgba":if(f.length!==4)return f.length===3?setRgba(r,+f[0],+f[1],+f[2],1):setRgba(r,0,0,0,1);p=parseCssFloat(f.pop());case"rgb":if(f.length>=3)return setRgba(r,parseCssInt(f[0]),parseCssInt(f[1]),parseCssInt(f[2]),f.length===3?p:parseCssFloat(f[3])),putToCache(n,r),r;setRgba(r,0,0,0,1);return;case"hsla":if(f.length!==4){setRgba(r,0,0,0,1);return}return f[3]=parseCssFloat(f[3]),hsla2rgba(f,r),putToCache(n,r),r;case"hsl":if(f.length!==3){setRgba(r,0,0,0,1);return}return hsla2rgba(f,r),putToCache(n,r),r;default:return}}setRgba(r,0,0,0,1)}}function hsla2rgba(n,r){var a=(parseFloat(n[0])%360+360)%360/360,o=parseCssFloat(n[1]),s=parseCssFloat(n[2]),l=s<=.5?s*(o+1):s+o-s*o,u=s*2-l;return r=r||[],setRgba(r,clampCssByte(cssHueToRgb(u,l,a+1/3)*255),clampCssByte(cssHueToRgb(u,l,a)*255),clampCssByte(cssHueToRgb(u,l,a-1/3)*255),1),n.length===4&&(r[3]=n[3]),r}function rgba2hsla(n){if(n){var r=n[0]/255,a=n[1]/255,o=n[2]/255,s=Math.min(r,a,o),l=Math.max(r,a,o),u=l-s,c=(l+s)/2,d,f;if(u===0)d=0,f=0;else{c<.5?f=u/(l+s):f=u/(2-l-s);var p=((l-r)/6+u/2)/u,v=((l-a)/6+u/2)/u,g=((l-o)/6+u/2)/u;r===l?d=g-v:a===l?d=1/3+p-g:o===l&&(d=2/3+v-p),d<0&&(d+=1),d>1&&(d-=1)}var y=[d*360,f,c];return n[3]!=null&&y.push(n[3]),y}}function lift(n,r){var a=parse(n);if(a){for(var o=0;o<3;o++)r<0?a[o]=a[o]*(1-r)|0:a[o]=(255-a[o])*r+a[o]|0,a[o]>255?a[o]=255:a[o]<0&&(a[o]=0);return stringify(a,a.length===4?"rgba":"rgb")}}function toHex(n){var r=parse(n);if(r)return((1<<24)+(r[0]<<16)+(r[1]<<8)+ +r[2]).toString(16).slice(1)}function fastLerp(n,r,a){if(!(!(r&&r.length)||!(n>=0&&n<=1))){a=a||[];var o=n*(r.length-1),s=Math.floor(o),l=Math.ceil(o),u=r[s],c=r[l],d=o-s;return a[0]=clampCssByte(lerpNumber(u[0],c[0],d)),a[1]=clampCssByte(lerpNumber(u[1],c[1],d)),a[2]=clampCssByte(lerpNumber(u[2],c[2],d)),a[3]=clampCssFloat(lerpNumber(u[3],c[3],d)),a}}var fastMapToColor=fastLerp;function lerp(n,r,a){if(!(!(r&&r.length)||!(n>=0&&n<=1))){var o=n*(r.length-1),s=Math.floor(o),l=Math.ceil(o),u=parse(r[s]),c=parse(r[l]),d=o-s,f=stringify([clampCssByte(lerpNumber(u[0],c[0],d)),clampCssByte(lerpNumber(u[1],c[1],d)),clampCssByte(lerpNumber(u[2],c[2],d)),clampCssFloat(lerpNumber(u[3],c[3],d))],"rgba");return a?{color:f,leftIndex:s,rightIndex:l,value:o}:f}}var mapToColor=lerp;function modifyHSL(n,r,a,o){var s=parse(n);if(n)return s=rgba2hsla(s),r!=null&&(s[0]=clampCssAngle(r)),a!=null&&(s[1]=parseCssFloat(a)),o!=null&&(s[2]=parseCssFloat(o)),stringify(hsla2rgba(s),"rgba")}function modifyAlpha(n,r){var a=parse(n);if(a&&r!=null)return a[3]=clampCssFloat(r),stringify(a,"rgba")}function stringify(n,r){if(!(!n||!n.length)){var a=n[0]+","+n[1]+","+n[2];return(r==="rgba"||r==="hsva"||r==="hsla")&&(a+=","+n[3]),r+"("+a+")"}}function lum(n,r){var a=parse(n);return a?(.299*a[0]+.587*a[1]+.114*a[2])*a[3]/255+(1-a[3])*r:0}function random(){return stringify([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var liftedColorCache=new LRU(100);function liftColor(n){if(isString(n)){var r=liftedColorCache.get(n);return r||(r=lift(n,-.1),liftedColorCache.put(n,r)),r}else if(isGradientObject(n)){var a=extend$2({},n);return a.colorStops=map$1(n.colorStops,function(o){return{offset:o.offset,color:lift(o.color,-.1)}}),a}return n}const color=Object.freeze(Object.defineProperty({__proto__:null,fastLerp,fastMapToColor,lerp,lift,liftColor,lum,mapToColor,modifyAlpha,modifyHSL,parse,random,stringify,toHex},Symbol.toStringTag,{value:"Module"}));var mathRound$1=Math.round;function normalizeColor(n){var r;if(!n||n==="transparent")n="none";else if(typeof n=="string"&&n.indexOf("rgba")>-1){var a=parse(n);a&&(n="rgb("+a[0]+","+a[1]+","+a[2]+")",r=a[3])}return{color:n,opacity:r==null?1:r}}var EPSILON$3=1e-4;function isAroundZero(n){return n<EPSILON$3&&n>-EPSILON$3}function round3(n){return mathRound$1(n*1e3)/1e3}function round4(n){return mathRound$1(n*1e4)/1e4}function getMatrixStr(n){return"matrix("+round3(n[0])+","+round3(n[1])+","+round3(n[2])+","+round3(n[3])+","+round4(n[4])+","+round4(n[5])+")"}var TEXT_ALIGN_TO_ANCHOR={left:"start",right:"end",center:"middle",middle:"middle"};function adjustTextY$1(n,r,a){return a==="top"?n+=r/2:a==="bottom"&&(n-=r/2),n}function hasShadow(n){return n&&(n.shadowBlur||n.shadowOffsetX||n.shadowOffsetY)}function getShadowKey(n){var r=n.style,a=n.getGlobalScale();return[r.shadowColor,(r.shadowBlur||0).toFixed(2),(r.shadowOffsetX||0).toFixed(2),(r.shadowOffsetY||0).toFixed(2),a[0],a[1]].join(",")}function isImagePattern(n){return n&&!!n.image}function isSVGPattern(n){return n&&!!n.svgElement}function isPattern(n){return isImagePattern(n)||isSVGPattern(n)}function isLinearGradient(n){return n.type==="linear"}function isRadialGradient(n){return n.type==="radial"}function isGradient(n){return n&&(n.type==="linear"||n.type==="radial")}function getIdURL(n){return"url(#"+n+")"}function getPathPrecision(n){var r=n.getGlobalScale(),a=Math.max(r[0],r[1]);return Math.max(Math.ceil(Math.log(a)/Math.log(10)),1)}function getSRTTransformString(n){var r=n.x||0,a=n.y||0,o=(n.rotation||0)*RADIAN_TO_DEGREE,s=retrieve2(n.scaleX,1),l=retrieve2(n.scaleY,1),u=n.skewX||0,c=n.skewY||0,d=[];return(r||a)&&d.push("translate("+r+"px,"+a+"px)"),o&&d.push("rotate("+o+")"),(s!==1||l!==1)&&d.push("scale("+s+","+l+")"),(u||c)&&d.push("skew("+mathRound$1(u*RADIAN_TO_DEGREE)+"deg, "+mathRound$1(c*RADIAN_TO_DEGREE)+"deg)"),d.join(" ")}var encodeBase64=function(){return env.hasGlobalWindow&&isFunction(window.btoa)?function(n){return window.btoa(unescape(encodeURIComponent(n)))}:typeof Buffer<"u"?function(n){return Buffer.from(n).toString("base64")}:function(n){return null}}(),arraySlice=Array.prototype.slice;function interpolateNumber$1(n,r,a){return(r-n)*a+n}function interpolate1DArray(n,r,a,o){for(var s=r.length,l=0;l<s;l++)n[l]=interpolateNumber$1(r[l],a[l],o);return n}function interpolate2DArray(n,r,a,o){for(var s=r.length,l=s&&r[0].length,u=0;u<s;u++){n[u]||(n[u]=[]);for(var c=0;c<l;c++)n[u][c]=interpolateNumber$1(r[u][c],a[u][c],o)}return n}function add1DArray(n,r,a,o){for(var s=r.length,l=0;l<s;l++)n[l]=r[l]+a[l]*o;return n}function add2DArray(n,r,a,o){for(var s=r.length,l=s&&r[0].length,u=0;u<s;u++){n[u]||(n[u]=[]);for(var c=0;c<l;c++)n[u][c]=r[u][c]+a[u][c]*o}return n}function fillColorStops(n,r){for(var a=n.length,o=r.length,s=a>o?r:n,l=Math.min(a,o),u=s[l-1]||{color:[0,0,0,0],offset:0},c=l;c<Math.max(a,o);c++)s.push({offset:u.offset,color:u.color.slice()})}function fillArray(n,r,a){var o=n,s=r;if(!(!o.push||!s.push)){var l=o.length,u=s.length;if(l!==u){var c=l>u;if(c)o.length=u;else for(var d=l;d<u;d++)o.push(a===1?s[d]:arraySlice.call(s[d]))}for(var f=o[0]&&o[0].length,d=0;d<o.length;d++)if(a===1)isNaN(o[d])&&(o[d]=s[d]);else for(var p=0;p<f;p++)isNaN(o[d][p])&&(o[d][p]=s[d][p])}}function cloneValue(n){if(isArrayLike(n)){var r=n.length;if(isArrayLike(n[0])){for(var a=[],o=0;o<r;o++)a.push(arraySlice.call(n[o]));return a}return arraySlice.call(n)}return n}function rgba2String(n){return n[0]=Math.floor(n[0])||0,n[1]=Math.floor(n[1])||0,n[2]=Math.floor(n[2])||0,n[3]=n[3]==null?1:n[3],"rgba("+n.join(",")+")"}function guessArrayDim(n){return isArrayLike(n&&n[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(n){return n===VALUE_TYPE_LINEAR_GRADIENT||n===VALUE_TYPE_RADIAL_GRADIENT}function isArrayValueType(n){return n===VALUE_TYPE_1D_ARRAY||n===VALUE_TYPE_2D_ARRAY}var tmpRgba=[0,0,0,0],Track=function(){function n(r){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=r}return n.prototype.isFinished=function(){return this._finished},n.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},n.prototype.needsAnimate=function(){return this.keyframes.length>=1},n.prototype.getAdditiveTrack=function(){return this._additiveTrack},n.prototype.addKeyframe=function(r,a,o){this._needsSort=!0;var s=this.keyframes,l=s.length,u=!1,c=VALUE_TYPE_UNKOWN,d=a;if(isArrayLike(a)){var f=guessArrayDim(a);c=f,(f===1&&!isNumber(a[0])||f===2&&!isNumber(a[0][0]))&&(u=!0)}else if(isNumber(a)&&!eqNaN(a))c=VALUE_TYPE_NUMBER;else if(isString(a))if(!isNaN(+a))c=VALUE_TYPE_NUMBER;else{var p=parse(a);p&&(d=p,c=VALUE_TYPE_COLOR)}else if(isGradientObject(a)){var v=extend$2({},d);v.colorStops=map$1(a.colorStops,function(y){return{offset:y.offset,color:parse(y.color)}}),isLinearGradient(a)?c=VALUE_TYPE_LINEAR_GRADIENT:isRadialGradient(a)&&(c=VALUE_TYPE_RADIAL_GRADIENT),d=v}l===0?this.valType=c:(c!==this.valType||c===VALUE_TYPE_UNKOWN)&&(u=!0),this.discrete=this.discrete||u;var g={time:r,value:d,rawValue:a,percent:0};return o&&(g.easing=o,g.easingFunc=isFunction(o)?o:easingFuncs[o]||createCubicEasingFunc(o)),s.push(g),g},n.prototype.prepare=function(r,a){var o=this.keyframes;this._needsSort&&o.sort(function(S,b){return S.time-b.time});for(var s=this.valType,l=o.length,u=o[l-1],c=this.discrete,d=isArrayValueType(s),f=isGradientValueType(s),p=0;p<l;p++){var v=o[p],g=v.value,y=u.value;v.percent=v.time/r,c||(d&&p!==l-1?fillArray(g,y,s):f&&fillColorStops(g.colorStops,y.colorStops))}if(!c&&s!==VALUE_TYPE_RADIAL_GRADIENT&&a&&this.needsAnimate()&&a.needsAnimate()&&s===a.valType&&!a._finished){this._additiveTrack=a;for(var _=o[0].value,p=0;p<l;p++)s===VALUE_TYPE_NUMBER?o[p].additiveValue=o[p].value-_:s===VALUE_TYPE_COLOR?o[p].additiveValue=add1DArray([],o[p].value,_,-1):isArrayValueType(s)&&(o[p].additiveValue=s===VALUE_TYPE_1D_ARRAY?add1DArray([],o[p].value,_,-1):add2DArray([],o[p].value,_,-1))}},n.prototype.step=function(r,a){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var o=this._additiveTrack!=null,s=o?"additiveValue":"value",l=this.valType,u=this.keyframes,c=u.length,d=this.propName,f=l===VALUE_TYPE_COLOR,p,v=this._lastFr,g=Math.min,y,_;if(c===1)y=_=u[0];else{if(a<0)p=0;else if(a<this._lastFrP){var S=g(v+1,c-1);for(p=S;p>=0&&!(u[p].percent<=a);p--);p=g(p,c-2)}else{for(p=v;p<c&&!(u[p].percent>a);p++);p=g(p-1,c-2)}_=u[p+1],y=u[p]}if(y&&_){this._lastFr=p,this._lastFrP=a;var b=_.percent-y.percent,x=b===0?1:g((a-y.percent)/b,1);_.easingFunc&&(x=_.easingFunc(x));var A=o?this._additiveValue:f?tmpRgba:r[d];if((isArrayValueType(l)||f)&&!A&&(A=this._additiveValue=[]),this.discrete)r[d]=x<1?y.rawValue:_.rawValue;else if(isArrayValueType(l))l===VALUE_TYPE_1D_ARRAY?interpolate1DArray(A,y[s],_[s],x):interpolate2DArray(A,y[s],_[s],x);else if(isGradientValueType(l)){var w=y[s],E=_[s],D=l===VALUE_TYPE_LINEAR_GRADIENT;r[d]={type:D?"linear":"radial",x:interpolateNumber$1(w.x,E.x,x),y:interpolateNumber$1(w.y,E.y,x),colorStops:map$1(w.colorStops,function($,P){var M=E.colorStops[P];return{offset:interpolateNumber$1($.offset,M.offset,x),color:rgba2String(interpolate1DArray([],$.color,M.color,x))}}),global:E.global},D?(r[d].x2=interpolateNumber$1(w.x2,E.x2,x),r[d].y2=interpolateNumber$1(w.y2,E.y2,x)):r[d].r=interpolateNumber$1(w.r,E.r,x)}else if(f)interpolate1DArray(A,y[s],_[s],x),o||(r[d]=rgba2String(A));else{var C=interpolateNumber$1(y[s],_[s],x);o?this._additiveValue=C:r[d]=C}o&&this._addToTarget(r)}}},n.prototype._addToTarget=function(r){var a=this.valType,o=this.propName,s=this._additiveValue;a===VALUE_TYPE_NUMBER?r[o]=r[o]+s:a===VALUE_TYPE_COLOR?(parse(r[o],tmpRgba),add1DArray(tmpRgba,tmpRgba,s,1),r[o]=rgba2String(tmpRgba)):a===VALUE_TYPE_1D_ARRAY?add1DArray(r[o],r[o],s,1):a===VALUE_TYPE_2D_ARRAY&&add2DArray(r[o],r[o],s,1)},n}(),Animator=function(){function n(r,a,o,s){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=r,this._loop=a,a&&s){logError("Can' use additive animation on looped animation.");return}this._additiveAnimators=s,this._allowDiscrete=o}return n.prototype.getMaxTime=function(){return this._maxTime},n.prototype.getDelay=function(){return this._delay},n.prototype.getLoop=function(){return this._loop},n.prototype.getTarget=function(){return this._target},n.prototype.changeTarget=function(r){this._target=r},n.prototype.when=function(r,a,o){return this.whenWithKeys(r,a,keys(a),o)},n.prototype.whenWithKeys=function(r,a,o,s){for(var l=this._tracks,u=0;u<o.length;u++){var c=o[u],d=l[c];if(!d){d=l[c]=new Track(c);var f=void 0,p=this._getAdditiveTrack(c);if(p){var v=p.keyframes,g=v[v.length-1];f=g&&g.value,p.valType===VALUE_TYPE_COLOR&&f&&(f=rgba2String(f))}else f=this._target[c];if(f==null)continue;r>0&&d.addKeyframe(0,cloneValue(f),s),this._trackKeys.push(c)}d.addKeyframe(r,cloneValue(a[c]),s)}return this._maxTime=Math.max(this._maxTime,r),this},n.prototype.pause=function(){this._clip.pause(),this._paused=!0},n.prototype.resume=function(){this._clip.resume(),this._paused=!1},n.prototype.isPaused=function(){return!!this._paused},n.prototype.duration=function(r){return this._maxTime=r,this._force=!0,this},n.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var r=this._doneCbs;if(r)for(var a=r.length,o=0;o<a;o++)r[o].call(this)},n.prototype._abortedCallback=function(){this._setTracksFinished();var r=this.animation,a=this._abortedCbs;if(r&&r.removeClip(this._clip),this._clip=null,a)for(var o=0;o<a.length;o++)a[o].call(this)},n.prototype._setTracksFinished=function(){for(var r=this._tracks,a=this._trackKeys,o=0;o<a.length;o++)r[a[o]].setFinished()},n.prototype._getAdditiveTrack=function(r){var a,o=this._additiveAnimators;if(o)for(var s=0;s<o.length;s++){var l=o[s].getTrack(r);l&&(a=l)}return a},n.prototype.start=function(r){if(!(this._started>0)){this._started=1;for(var a=this,o=[],s=this._maxTime||0,l=0;l<this._trackKeys.length;l++){var u=this._trackKeys[l],c=this._tracks[u],d=this._getAdditiveTrack(u),f=c.keyframes,p=f.length;if(c.prepare(s,d),c.needsAnimate())if(!this._allowDiscrete&&c.discrete){var v=f[p-1];v&&(a._target[c.propName]=v.rawValue),c.setFinished()}else o.push(c)}if(o.length||this._force){var g=new Clip({life:s,loop:this._loop,delay:this._delay||0,onframe:function(y){a._started=2;var _=a._additiveAnimators;if(_){for(var S=!1,b=0;b<_.length;b++)if(_[b]._clip){S=!0;break}S||(a._additiveAnimators=null)}for(var b=0;b<o.length;b++)o[b].step(a._target,y);var x=a._onframeCbs;if(x)for(var b=0;b<x.length;b++)x[b](a._target,y)},ondestroy:function(){a._doneCallback()}});this._clip=g,this.animation&&this.animation.addClip(g),r&&g.setEasing(r)}else this._doneCallback();return this}},n.prototype.stop=function(r){if(this._clip){var a=this._clip;r&&a.onframe(1),this._abortedCallback()}},n.prototype.delay=function(r){return this._delay=r,this},n.prototype.during=function(r){return r&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(r)),this},n.prototype.done=function(r){return r&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(r)),this},n.prototype.aborted=function(r){return r&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(r)),this},n.prototype.getClip=function(){return this._clip},n.prototype.getTrack=function(r){return this._tracks[r]},n.prototype.getTracks=function(){var r=this;return map$1(this._trackKeys,function(a){return r._tracks[a]})},n.prototype.stopTracks=function(r,a){if(!r.length||!this._clip)return!0;for(var o=this._tracks,s=this._trackKeys,l=0;l<r.length;l++){var u=o[r[l]];u&&!u.isFinished()&&(a?u.step(this._target,1):this._started===1&&u.step(this._target,0),u.setFinished())}for(var c=!0,l=0;l<s.length;l++)if(!o[s[l]].isFinished()){c=!1;break}return c&&this._abortedCallback(),c},n.prototype.saveTo=function(r,a,o){if(r){a=a||this._trackKeys;for(var s=0;s<a.length;s++){var l=a[s],u=this._tracks[l];if(!(!u||u.isFinished())){var c=u.keyframes,d=c[o?0:c.length-1];d&&(r[l]=cloneValue(d.rawValue))}}}},n.prototype.__changeFinalValue=function(r,a){a=a||keys(r);for(var o=0;o<a.length;o++){var s=a[o],l=this._tracks[s];if(l){var u=l.keyframes;if(u.length>1){var c=u.pop();l.addKeyframe(c.time,r[s]),l.prepare(this._maxTime,l.getAdditiveTrack())}}}},n}();function getTime(){return new Date().getTime()}var Animation=function(n){__extends(r,n);function r(a){var o=n.call(this)||this;return o._running=!1,o._time=0,o._pausedTime=0,o._pauseStart=0,o._paused=!1,a=a||{},o.stage=a.stage||{},o}return r.prototype.addClip=function(a){a.animation&&this.removeClip(a),this._head?(this._tail.next=a,a.prev=this._tail,a.next=null,this._tail=a):this._head=this._tail=a,a.animation=this},r.prototype.addAnimator=function(a){a.animation=this;var o=a.getClip();o&&this.addClip(o)},r.prototype.removeClip=function(a){if(a.animation){var o=a.prev,s=a.next;o?o.next=s:this._head=s,s?s.prev=o:this._tail=o,a.next=a.prev=a.animation=null}},r.prototype.removeAnimator=function(a){var o=a.getClip();o&&this.removeClip(o),a.animation=null},r.prototype.update=function(a){for(var o=getTime()-this._pausedTime,s=o-this._time,l=this._head;l;){var u=l.next,c=l.step(o,s);c&&(l.ondestroy(),this.removeClip(l)),l=u}this._time=o,a||(this.trigger("frame",s),this.stage.update&&this.stage.update())},r.prototype._startLoop=function(){var a=this;this._running=!0;function o(){a._running&&(requestAnimationFrame$1(o),!a._paused&&a.update())}requestAnimationFrame$1(o)},r.prototype.start=function(){this._running||(this._time=getTime(),this._pausedTime=0,this._startLoop())},r.prototype.stop=function(){this._running=!1},r.prototype.pause=function(){this._paused||(this._pauseStart=getTime(),this._paused=!0)},r.prototype.resume=function(){this._paused&&(this._pausedTime+=getTime()-this._pauseStart,this._paused=!1)},r.prototype.clear=function(){for(var a=this._head;a;){var o=a.next;a.prev=a.next=a.animation=null,a=o}this._head=this._tail=null},r.prototype.isFinished=function(){return this._head==null},r.prototype.animate=function(a,o){o=o||{},this.start();var s=new Animator(a,o.loop);return this.addAnimator(s),s},r}(Eventful),TOUCH_CLICK_DELAY=300,globalEventSupported=env.domSupported,localNativeListenerNames=function(){var n=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],r=["touchstart","touchend","touchmove"],a={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},o=map$1(n,function(s){var l=s.replace("mouse","pointer");return a.hasOwnProperty(l)?l:s});return{mouse:n,touch:r,pointer:o}}(),globalNativeListenerNames={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},wheelEventSupported=!1;function isPointerFromTouch(n){var r=n.pointerType;return r==="pen"||r==="touch"}function setTouchTimer(n){n.touching=!0,n.touchTimer!=null&&(clearTimeout(n.touchTimer),n.touchTimer=null),n.touchTimer=setTimeout(function(){n.touching=!1,n.touchTimer=null},700)}function markTouch(n){n&&(n.zrByTouch=!0)}function normalizeGlobalEvent(n,r){return normalizeEvent(n.dom,new FakeGlobalEvent(n,r),!0)}function isLocalEl(n,r){for(var a=r,o=!1;a&&a.nodeType!==9&&!(o=a.domBelongToZr||a!==r&&a===n.painterRoot);)a=a.parentNode;return o}var FakeGlobalEvent=function(){function n(r,a){this.stopPropagation=noop,this.stopImmediatePropagation=noop,this.preventDefault=noop,this.type=a.type,this.target=this.currentTarget=r.dom,this.pointerType=a.pointerType,this.clientX=a.clientX,this.clientY=a.clientY}return n}(),localDOMHandlers={mousedown:function(n){n=normalizeEvent(this.dom,n),this.__mayPointerCapture=[n.zrX,n.zrY],this.trigger("mousedown",n)},mousemove:function(n){n=normalizeEvent(this.dom,n);var r=this.__mayPointerCapture;r&&(n.zrX!==r[0]||n.zrY!==r[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",n)},mouseup:function(n){n=normalizeEvent(this.dom,n),this.__togglePointerCapture(!1),this.trigger("mouseup",n)},mouseout:function(n){n=normalizeEvent(this.dom,n);var r=n.toElement||n.relatedTarget;isLocalEl(this,r)||(this.__pointerCapturing&&(n.zrEventControl="no_globalout"),this.trigger("mouseout",n))},wheel:function(n){wheelEventSupported=!0,n=normalizeEvent(this.dom,n),this.trigger("mousewheel",n)},mousewheel:function(n){wheelEventSupported||(n=normalizeEvent(this.dom,n),this.trigger("mousewheel",n))},touchstart:function(n){n=normalizeEvent(this.dom,n),markTouch(n),this.__lastTouchMoment=new Date,this.handler.processGesture(n,"start"),localDOMHandlers.mousemove.call(this,n),localDOMHandlers.mousedown.call(this,n)},touchmove:function(n){n=normalizeEvent(this.dom,n),markTouch(n),this.handler.processGesture(n,"change"),localDOMHandlers.mousemove.call(this,n)},touchend:function(n){n=normalizeEvent(this.dom,n),markTouch(n),this.handler.processGesture(n,"end"),localDOMHandlers.mouseup.call(this,n),+new Date-+this.__lastTouchMoment<TOUCH_CLICK_DELAY&&localDOMHandlers.click.call(this,n)},pointerdown:function(n){localDOMHandlers.mousedown.call(this,n)},pointermove:function(n){isPointerFromTouch(n)||localDOMHandlers.mousemove.call(this,n)},pointerup:function(n){localDOMHandlers.mouseup.call(this,n)},pointerout:function(n){isPointerFromTouch(n)||localDOMHandlers.mouseout.call(this,n)}};each$f(["click","dblclick","contextmenu"],function(n){localDOMHandlers[n]=function(r){r=normalizeEvent(this.dom,r),this.trigger(n,r)}});var globalDOMHandlers={pointermove:function(n){isPointerFromTouch(n)||globalDOMHandlers.mousemove.call(this,n)},pointerup:function(n){globalDOMHandlers.mouseup.call(this,n)},mousemove:function(n){this.trigger("mousemove",n)},mouseup:function(n){var r=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",n),r&&(n.zrEventControl="only_globalout",this.trigger("mouseout",n))}};function mountLocalDOMEventListeners(n,r){var a=r.domHandlers;env.pointerEventsSupported?each$f(localNativeListenerNames.pointer,function(o){mountSingleDOMEventListener(r,o,function(s){a[o].call(n,s)})}):(env.touchEventsSupported&&each$f(localNativeListenerNames.touch,function(o){mountSingleDOMEventListener(r,o,function(s){a[o].call(n,s),setTouchTimer(r)})}),each$f(localNativeListenerNames.mouse,function(o){mountSingleDOMEventListener(r,o,function(s){s=getNativeEvent(s),r.touching||a[o].call(n,s)})}))}function mountGlobalDOMEventListeners(n,r){env.pointerEventsSupported?each$f(globalNativeListenerNames.pointer,a):env.touchEventsSupported||each$f(globalNativeListenerNames.mouse,a);function a(o){function s(l){l=getNativeEvent(l),isLocalEl(n,l.target)||(l=normalizeGlobalEvent(n,l),r.domHandlers[o].call(n,l))}mountSingleDOMEventListener(r,o,s,{capture:!0})}}function mountSingleDOMEventListener(n,r,a,o){n.mounted[r]=a,n.listenerOpts[r]=o,addEventListener(n.domTarget,r,a,o)}function unmountDOMEventListeners(n){var r=n.mounted;for(var a in r)r.hasOwnProperty(a)&&removeEventListener(n.domTarget,a,r[a],n.listenerOpts[a]);n.mounted={}}var DOMHandlerScope=function(){function n(r,a){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=r,this.domHandlers=a}return n}(),HandlerDomProxy=function(n){__extends(r,n);function r(a,o){var s=n.call(this)||this;return s.__pointerCapturing=!1,s.dom=a,s.painterRoot=o,s._localHandlerScope=new DOMHandlerScope(a,localDOMHandlers),globalEventSupported&&(s._globalHandlerScope=new DOMHandlerScope(document,globalDOMHandlers)),mountLocalDOMEventListeners(s,s._localHandlerScope),s}return r.prototype.dispose=function(){unmountDOMEventListeners(this._localHandlerScope),globalEventSupported&&unmountDOMEventListeners(this._globalHandlerScope)},r.prototype.setCursor=function(a){this.dom.style&&(this.dom.style.cursor=a||"default")},r.prototype.__togglePointerCapture=function(a){if(this.__mayPointerCapture=null,globalEventSupported&&+this.__pointerCapturing^+a){this.__pointerCapturing=a;var o=this._globalHandlerScope;a?mountGlobalDOMEventListeners(this,o):unmountDOMEventListeners(o)}},r}(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(n){return n>EPSILON$2||n<-EPSILON$2}var scaleTmp=[],tmpTransform=[],originTransform=create$1(),abs=Math.abs,Transformable=function(){function n(){}return n.prototype.getLocalTransform=function(r){return n.getLocalTransform(this,r)},n.prototype.setPosition=function(r){this.x=r[0],this.y=r[1]},n.prototype.setScale=function(r){this.scaleX=r[0],this.scaleY=r[1]},n.prototype.setSkew=function(r){this.skewX=r[0],this.skewY=r[1]},n.prototype.setOrigin=function(r){this.originX=r[0],this.originY=r[1]},n.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)},n.prototype.updateTransform=function(){var r=this.parent&&this.parent.transform,a=this.needLocalTransform(),o=this.transform;if(!(a||r)){o&&(mIdentity(o),this.invTransform=null);return}o=o||create$1(),a?this.getLocalTransform(o):mIdentity(o),r&&(a?mul(o,r,o):copy(o,r)),this.transform=o,this._resolveGlobalScaleRatio(o)},n.prototype._resolveGlobalScaleRatio=function(r){var a=this.globalScaleRatio;if(a!=null&&a!==1){this.getGlobalScale(scaleTmp);var o=scaleTmp[0]<0?-1:1,s=scaleTmp[1]<0?-1:1,l=((scaleTmp[0]-o)*a+o)/scaleTmp[0]||0,u=((scaleTmp[1]-s)*a+s)/scaleTmp[1]||0;r[0]*=l,r[1]*=l,r[2]*=u,r[3]*=u}this.invTransform=this.invTransform||create$1(),invert(this.invTransform,r)},n.prototype.getComputedTransform=function(){for(var r=this,a=[];r;)a.push(r),r=r.parent;for(;r=a.pop();)r.updateTransform();return this.transform},n.prototype.setLocalTransform=function(r){if(r){var a=r[0]*r[0]+r[1]*r[1],o=r[2]*r[2]+r[3]*r[3],s=Math.atan2(r[1],r[0]),l=Math.PI/2+s-Math.atan2(r[3],r[2]);o=Math.sqrt(o)*Math.cos(l),a=Math.sqrt(a),this.skewX=l,this.skewY=0,this.rotation=-s,this.x=+r[4],this.y=+r[5],this.scaleX=a,this.scaleY=o,this.originX=0,this.originY=0}},n.prototype.decomposeTransform=function(){if(this.transform){var r=this.parent,a=this.transform;r&&r.transform&&(r.invTransform=r.invTransform||create$1(),mul(tmpTransform,r.invTransform,a),a=tmpTransform);var o=this.originX,s=this.originY;(o||s)&&(originTransform[4]=o,originTransform[5]=s,mul(tmpTransform,a,originTransform),tmpTransform[4]-=o,tmpTransform[5]-=s,a=tmpTransform),this.setLocalTransform(a)}},n.prototype.getGlobalScale=function(r){var a=this.transform;return r=r||[],a?(r[0]=Math.sqrt(a[0]*a[0]+a[1]*a[1]),r[1]=Math.sqrt(a[2]*a[2]+a[3]*a[3]),a[0]<0&&(r[0]=-r[0]),a[3]<0&&(r[1]=-r[1]),r):(r[0]=1,r[1]=1,r)},n.prototype.transformCoordToLocal=function(r,a){var o=[r,a],s=this.invTransform;return s&&applyTransform$1(o,o,s),o},n.prototype.transformCoordToGlobal=function(r,a){var o=[r,a],s=this.transform;return s&&applyTransform$1(o,o,s),o},n.prototype.getLineScale=function(){var r=this.transform;return r&&abs(r[0]-1)>1e-10&&abs(r[3]-1)>1e-10?Math.sqrt(abs(r[0]*r[3]-r[2]*r[1])):1},n.prototype.copyTransform=function(r){copyTransform(this,r)},n.getLocalTransform=function(r,a){a=a||[];var o=r.originX||0,s=r.originY||0,l=r.scaleX,u=r.scaleY,c=r.anchorX,d=r.anchorY,f=r.rotation||0,p=r.x,v=r.y,g=r.skewX?Math.tan(r.skewX):0,y=r.skewY?Math.tan(-r.skewY):0;if(o||s||c||d){var _=o+c,S=s+d;a[4]=-_*l-g*S*u,a[5]=-S*u-y*_*l}else a[4]=a[5]=0;return a[0]=l,a[3]=u,a[1]=y*l,a[2]=g*u,f&&rotate(a,a,f),a[4]+=o+p,a[5]+=s+v,a},n.initDefaultProps=function(){var r=n.prototype;r.scaleX=r.scaleY=r.globalScaleRatio=1,r.x=r.y=r.originX=r.originY=r.skewX=r.skewY=r.rotation=r.anchorX=r.anchorY=0}(),n}(),TRANSFORMABLE_PROPS=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function copyTransform(n,r){for(var a=0;a<TRANSFORMABLE_PROPS.length;a++){var o=TRANSFORMABLE_PROPS[a];n[o]=r[o]}}var textWidthCache={};function getWidth(n,r){r=r||DEFAULT_FONT;var a=textWidthCache[r];a||(a=textWidthCache[r]=new LRU(500));var o=a.get(n);return o==null&&(o=platformApi.measureText(n,r).width,a.put(n,o)),o}function innerGetBoundingRect(n,r,a,o){var s=getWidth(n,r),l=getLineHeight(r),u=adjustTextX(0,s,a),c=adjustTextY(0,l,o),d=new BoundingRect(u,c,s,l);return d}function getBoundingRect(n,r,a,o){var s=((n||"")+"").split("\n"),l=s.length;if(l===1)return innerGetBoundingRect(s[0],r,a,o);for(var u=new BoundingRect(0,0,0,0),c=0;c<s.length;c++){var d=innerGetBoundingRect(s[c],r,a,o);c===0?u.copy(d):u.union(d)}return u}function adjustTextX(n,r,a){return a==="right"?n-=r:a==="center"&&(n-=r/2),n}function adjustTextY(n,r,a){return a==="middle"?n-=r/2:a==="bottom"&&(n-=r),n}function getLineHeight(n){return getWidth("国",n)}function parsePercent$1(n,r){return typeof n=="string"?n.lastIndexOf("%")>=0?parseFloat(n)/100*r:parseFloat(n):n}function calculateTextPosition(n,r,a){var o=r.position||"inside",s=r.distance!=null?r.distance:5,l=a.height,u=a.width,c=l/2,d=a.x,f=a.y,p="left",v="top";if(o instanceof Array)d+=parsePercent$1(o[0],a.width),f+=parsePercent$1(o[1],a.height),p=null,v=null;else switch(o){case"left":d-=s,f+=c,p="right",v="middle";break;case"right":d+=s+u,f+=c,v="middle";break;case"top":d+=u/2,f-=s,p="center",v="bottom";break;case"bottom":d+=u/2,f+=l+s,p="center";break;case"inside":d+=u/2,f+=c,p="center",v="middle";break;case"insideLeft":d+=s,f+=c,v="middle";break;case"insideRight":d+=u-s,f+=c,p="right",v="middle";break;case"insideTop":d+=u/2,f+=s,p="center";break;case"insideBottom":d+=u/2,f+=l-s,p="center",v="bottom";break;case"insideTopLeft":d+=s,f+=s;break;case"insideTopRight":d+=u-s,f+=s,p="right";break;case"insideBottomLeft":d+=s,f+=l-s,v="bottom";break;case"insideBottomRight":d+=u-s,f+=l-s,p="right",v="bottom";break}return n=n||{},n.x=d,n.y=f,n.align=p,n.verticalAlign=v,n}var PRESERVED_NORMAL_STATE="__zr_normal__",PRIMARY_STATES_KEYS$1=TRANSFORMABLE_PROPS.concat(["ignore"]),DEFAULT_ANIMATABLE_MAP=reduce(TRANSFORMABLE_PROPS,function(n,r){return n[r]=!0,n},{ignore:!1}),tmpTextPosCalcRes={},tmpBoundingRect=new BoundingRect(0,0,0,0),Element$1=function(){function n(r){this.id=guid(),this.animators=[],this.currentStates=[],this.states={},this._init(r)}return n.prototype._init=function(r){this.attr(r)},n.prototype.drift=function(r,a,o){switch(this.draggable){case"horizontal":a=0;break;case"vertical":r=0;break}var s=this.transform;s||(s=this.transform=[1,0,0,1,0,0]),s[4]+=r,s[5]+=a,this.decomposeTransform(),this.markRedraw()},n.prototype.beforeUpdate=function(){},n.prototype.afterUpdate=function(){},n.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},n.prototype.updateInnerText=function(r){var a=this._textContent;if(a&&(!a.ignore||r)){this.textConfig||(this.textConfig={});var o=this.textConfig,s=o.local,l=a.innerTransformable,u=void 0,c=void 0,d=!1;l.parent=s?this:null;var f=!1;if(l.copyTransform(a),o.position!=null){var p=tmpBoundingRect;o.layoutRect?p.copy(o.layoutRect):p.copy(this.getBoundingRect()),s||p.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(tmpTextPosCalcRes,o,p):calculateTextPosition(tmpTextPosCalcRes,o,p),l.x=tmpTextPosCalcRes.x,l.y=tmpTextPosCalcRes.y,u=tmpTextPosCalcRes.align,c=tmpTextPosCalcRes.verticalAlign;var v=o.origin;if(v&&o.rotation!=null){var g=void 0,y=void 0;v==="center"?(g=p.width*.5,y=p.height*.5):(g=parsePercent$1(v[0],p.width),y=parsePercent$1(v[1],p.height)),f=!0,l.originX=-l.x+g+(s?0:p.x),l.originY=-l.y+y+(s?0:p.y)}}o.rotation!=null&&(l.rotation=o.rotation);var _=o.offset;_&&(l.x+=_[0],l.y+=_[1],f||(l.originX=-_[0],l.originY=-_[1]));var S=o.inside==null?typeof o.position=="string"&&o.position.indexOf("inside")>=0:o.inside,b=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),x=void 0,A=void 0,w=void 0;S&&this.canBeInsideText()?(x=o.insideFill,A=o.insideStroke,(x==null||x==="auto")&&(x=this.getInsideTextFill()),(A==null||A==="auto")&&(A=this.getInsideTextStroke(x),w=!0)):(x=o.outsideFill,A=o.outsideStroke,(x==null||x==="auto")&&(x=this.getOutsideFill()),(A==null||A==="auto")&&(A=this.getOutsideStroke(x),w=!0)),x=x||"#000",(x!==b.fill||A!==b.stroke||w!==b.autoStroke||u!==b.align||c!==b.verticalAlign)&&(d=!0,b.fill=x,b.stroke=A,b.autoStroke=w,b.align=u,b.verticalAlign=c,a.setDefaultTextStyle(b)),a.__dirty|=REDRAW_BIT,d&&a.dirtyStyle(!0)}},n.prototype.canBeInsideText=function(){return!0},n.prototype.getInsideTextFill=function(){return"#fff"},n.prototype.getInsideTextStroke=function(r){return"#000"},n.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?LIGHT_LABEL_COLOR:DARK_LABEL_COLOR},n.prototype.getOutsideStroke=function(r){var a=this.__zr&&this.__zr.getBackgroundColor(),o=typeof a=="string"&&parse(a);o||(o=[255,255,255,1]);for(var s=o[3],l=this.__zr.isDarkMode(),u=0;u<3;u++)o[u]=o[u]*s+(l?0:255)*(1-s);return o[3]=1,stringify(o,"rgba")},n.prototype.traverse=function(r,a){},n.prototype.attrKV=function(r,a){r==="textConfig"?this.setTextConfig(a):r==="textContent"?this.setTextContent(a):r==="clipPath"?this.setClipPath(a):r==="extra"?(this.extra=this.extra||{},extend$2(this.extra,a)):this[r]=a},n.prototype.hide=function(){this.ignore=!0,this.markRedraw()},n.prototype.show=function(){this.ignore=!1,this.markRedraw()},n.prototype.attr=function(r,a){if(typeof r=="string")this.attrKV(r,a);else if(isObject$3(r))for(var o=r,s=keys(o),l=0;l<s.length;l++){var u=s[l];this.attrKV(u,r[u])}return this.markRedraw(),this},n.prototype.saveCurrentToNormalState=function(r){this._innerSaveToNormal(r);for(var a=this._normalState,o=0;o<this.animators.length;o++){var s=this.animators[o],l=s.__fromStateTransition;if(!(s.getLoop()||l&&l!==PRESERVED_NORMAL_STATE)){var u=s.targetName,c=u?a[u]:a;s.saveTo(c)}}},n.prototype._innerSaveToNormal=function(r){var a=this._normalState;a||(a=this._normalState={}),r.textConfig&&!a.textConfig&&(a.textConfig=this.textConfig),this._savePrimaryToNormal(r,a,PRIMARY_STATES_KEYS$1)},n.prototype._savePrimaryToNormal=function(r,a,o){for(var s=0;s<o.length;s++){var l=o[s];r[l]!=null&&!(l in a)&&(a[l]=this[l])}},n.prototype.hasState=function(){return this.currentStates.length>0},n.prototype.getState=function(r){return this.states[r]},n.prototype.ensureState=function(r){var a=this.states;return a[r]||(a[r]={}),a[r]},n.prototype.clearStates=function(r){this.useState(PRESERVED_NORMAL_STATE,!1,r)},n.prototype.useState=function(r,a,o,s){var l=r===PRESERVED_NORMAL_STATE,u=this.hasState();if(!(!u&&l)){var c=this.currentStates,d=this.stateTransition;if(!(indexOf(c,r)>=0&&(a||c.length===1))){var f;if(this.stateProxy&&!l&&(f=this.stateProxy(r)),f||(f=this.states&&this.states[r]),!f&&!l){logError("State "+r+" not exists.");return}l||this.saveCurrentToNormalState(f);var p=!!(f&&f.hoverLayer||s);p&&this._toggleHoverLayerFlag(!0),this._applyStateObj(r,f,this._normalState,a,!o&&!this.__inHover&&d&&d.duration>0,d);var v=this._textContent,g=this._textGuide;return v&&v.useState(r,a,o,p),g&&g.useState(r,a,o,p),l?(this.currentStates=[],this._normalState={}):a?this.currentStates.push(r):this.currentStates=[r],this._updateAnimationTargets(),this.markRedraw(),!p&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~REDRAW_BIT),f}}},n.prototype.useStates=function(r,a,o){if(!r.length)this.clearStates();else{var s=[],l=this.currentStates,u=r.length,c=u===l.length;if(c){for(var d=0;d<u;d++)if(r[d]!==l[d]){c=!1;break}}if(c)return;for(var d=0;d<u;d++){var f=r[d],p=void 0;this.stateProxy&&(p=this.stateProxy(f,r)),p||(p=this.states[f]),p&&s.push(p)}var v=s[u-1],g=!!(v&&v.hoverLayer||o);g&&this._toggleHoverLayerFlag(!0);var y=this._mergeStates(s),_=this.stateTransition;this.saveCurrentToNormalState(y),this._applyStateObj(r.join(","),y,this._normalState,!1,!a&&!this.__inHover&&_&&_.duration>0,_);var S=this._textContent,b=this._textGuide;S&&S.useStates(r,a,g),b&&b.useStates(r,a,g),this._updateAnimationTargets(),this.currentStates=r.slice(),this.markRedraw(),!g&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~REDRAW_BIT)}},n.prototype.isSilent=function(){for(var r=this.silent,a=this.parent;!r&&a;){if(a.silent){r=!0;break}a=a.parent}return r},n.prototype._updateAnimationTargets=function(){for(var r=0;r<this.animators.length;r++){var a=this.animators[r];a.targetName&&a.changeTarget(this[a.targetName])}},n.prototype.removeState=function(r){var a=indexOf(this.currentStates,r);if(a>=0){var o=this.currentStates.slice();o.splice(a,1),this.useStates(o)}},n.prototype.replaceState=function(r,a,o){var s=this.currentStates.slice(),l=indexOf(s,r),u=indexOf(s,a)>=0;l>=0?u?s.splice(l,1):s[l]=a:o&&!u&&s.push(a),this.useStates(s)},n.prototype.toggleState=function(r,a){a?this.useState(r,!0):this.removeState(r)},n.prototype._mergeStates=function(r){for(var a={},o,s=0;s<r.length;s++){var l=r[s];extend$2(a,l),l.textConfig&&(o=o||{},extend$2(o,l.textConfig))}return o&&(a.textConfig=o),a},n.prototype._applyStateObj=function(r,a,o,s,l,u){var c=!(a&&s);a&&a.textConfig?(this.textConfig=extend$2({},s?this.textConfig:o.textConfig),extend$2(this.textConfig,a.textConfig)):c&&o.textConfig&&(this.textConfig=o.textConfig);for(var d={},f=!1,p=0;p<PRIMARY_STATES_KEYS$1.length;p++){var v=PRIMARY_STATES_KEYS$1[p],g=l&&DEFAULT_ANIMATABLE_MAP[v];a&&a[v]!=null?g?(f=!0,d[v]=a[v]):this[v]=a[v]:c&&o[v]!=null&&(g?(f=!0,d[v]=o[v]):this[v]=o[v])}if(!l)for(var p=0;p<this.animators.length;p++){var y=this.animators[p],_=y.targetName;y.getLoop()||y.__changeFinalValue(_?(a||o)[_]:a||o)}f&&this._transitionState(r,d,u)},n.prototype._attachComponent=function(r){if(!(r.__zr&&!r.__hostTarget)&&r!==this){var a=this.__zr;a&&r.addSelfToZr(a),r.__zr=a,r.__hostTarget=this}},n.prototype._detachComponent=function(r){r.__zr&&r.removeSelfFromZr(r.__zr),r.__zr=null,r.__hostTarget=null},n.prototype.getClipPath=function(){return this._clipPath},n.prototype.setClipPath=function(r){this._clipPath&&this._clipPath!==r&&this.removeClipPath(),this._attachComponent(r),this._clipPath=r,this.markRedraw()},n.prototype.removeClipPath=function(){var r=this._clipPath;r&&(this._detachComponent(r),this._clipPath=null,this.markRedraw())},n.prototype.getTextContent=function(){return this._textContent},n.prototype.setTextContent=function(r){var a=this._textContent;a!==r&&(a&&a!==r&&this.removeTextContent(),r.innerTransformable=new Transformable,this._attachComponent(r),this._textContent=r,this.markRedraw())},n.prototype.setTextConfig=function(r){this.textConfig||(this.textConfig={}),extend$2(this.textConfig,r),this.markRedraw()},n.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},n.prototype.removeTextContent=function(){var r=this._textContent;r&&(r.innerTransformable=null,this._detachComponent(r),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},n.prototype.getTextGuideLine=function(){return this._textGuide},n.prototype.setTextGuideLine=function(r){this._textGuide&&this._textGuide!==r&&this.removeTextGuideLine(),this._attachComponent(r),this._textGuide=r,this.markRedraw()},n.prototype.removeTextGuideLine=function(){var r=this._textGuide;r&&(this._detachComponent(r),this._textGuide=null,this.markRedraw())},n.prototype.markRedraw=function(){this.__dirty|=REDRAW_BIT;var r=this.__zr;r&&(this.__inHover?r.refreshHover():r.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},n.prototype.dirty=function(){this.markRedraw()},n.prototype._toggleHoverLayerFlag=function(r){this.__inHover=r;var a=this._textContent,o=this._textGuide;a&&(a.__inHover=r),o&&(o.__inHover=r)},n.prototype.addSelfToZr=function(r){if(this.__zr!==r){this.__zr=r;var a=this.animators;if(a)for(var o=0;o<a.length;o++)r.animation.addAnimator(a[o]);this._clipPath&&this._clipPath.addSelfToZr(r),this._textContent&&this._textContent.addSelfToZr(r),this._textGuide&&this._textGuide.addSelfToZr(r)}},n.prototype.removeSelfFromZr=function(r){if(this.__zr){this.__zr=null;var a=this.animators;if(a)for(var o=0;o<a.length;o++)r.animation.removeAnimator(a[o]);this._clipPath&&this._clipPath.removeSelfFromZr(r),this._textContent&&this._textContent.removeSelfFromZr(r),this._textGuide&&this._textGuide.removeSelfFromZr(r)}},n.prototype.animate=function(r,a,o){var s=r?this[r]:this,l=new Animator(s,a,o);return r&&(l.targetName=r),this.addAnimator(l,r),l},n.prototype.addAnimator=function(r,a){var o=this.__zr,s=this;r.during(function(){s.updateDuringAnimation(a)}).done(function(){var l=s.animators,u=indexOf(l,r);u>=0&&l.splice(u,1)}),this.animators.push(r),o&&o.animation.addAnimator(r),o&&o.wakeUp()},n.prototype.updateDuringAnimation=function(r){this.markRedraw()},n.prototype.stopAnimation=function(r,a){for(var o=this.animators,s=o.length,l=[],u=0;u<s;u++){var c=o[u];!r||r===c.scope?c.stop(a):l.push(c)}return this.animators=l,this},n.prototype.animateTo=function(r,a,o){animateTo(this,r,a,o)},n.prototype.animateFrom=function(r,a,o){animateTo(this,r,a,o,!0)},n.prototype._transitionState=function(r,a,o,s){for(var l=animateTo(this,a,o,s),u=0;u<l.length;u++)l[u].__fromStateTransition=r},n.prototype.getBoundingRect=function(){return null},n.prototype.getPaintRect=function(){return null},n.initDefaultProps=function(){var r=n.prototype;r.type="element",r.name="",r.ignore=r.silent=r.isGroup=r.draggable=r.dragging=r.ignoreClip=r.__inHover=!1,r.__dirty=REDRAW_BIT;function a(o,s,l,u){Object.defineProperty(r,o,{get:function(){if(!this[s]){var d=this[s]=[];c(this,d)}return this[s]},set:function(d){this[l]=d[0],this[u]=d[1],this[s]=d,c(this,d)}});function c(d,f){Object.defineProperty(f,0,{get:function(){return d[l]},set:function(p){d[l]=p}}),Object.defineProperty(f,1,{get:function(){return d[u]},set:function(p){d[u]=p}})}}Object.defineProperty&&(a("position","_legacyPos","x","y"),a("scale","_legacyScale","scaleX","scaleY"),a("origin","_legacyOrigin","originX","originY"))}(),n}();mixin(Element$1,Eventful);mixin(Element$1,Transformable);function animateTo(n,r,a,o,s){a=a||{};var l=[];animateToShallow(n,"",n,r,a,o,l,s);var u=l.length,c=!1,d=a.done,f=a.aborted,p=function(){c=!0,u--,u<=0&&(c?d&&d():f&&f())},v=function(){u--,u<=0&&(c?d&&d():f&&f())};u||d&&d(),l.length>0&&a.during&&l[0].during(function(_,S){a.during(S)});for(var g=0;g<l.length;g++){var y=l[g];p&&y.done(p),v&&y.aborted(v),a.force&&y.duration(a.duration),y.start(a.easing)}return l}function copyArrShallow(n,r,a){for(var o=0;o<a;o++)n[o]=r[o]}function is2DArray(n){return isArrayLike(n[0])}function copyValue(n,r,a){if(isArrayLike(r[a]))if(isArrayLike(n[a])||(n[a]=[]),isTypedArray(r[a])){var o=r[a].length;n[a].length!==o&&(n[a]=new r[a].constructor(o),copyArrShallow(n[a],r[a],o))}else{var s=r[a],l=n[a],u=s.length;if(is2DArray(s))for(var c=s[0].length,d=0;d<u;d++)l[d]?copyArrShallow(l[d],s[d],c):l[d]=Array.prototype.slice.call(s[d]);else copyArrShallow(l,s,u);l.length=s.length}else n[a]=r[a]}function isValueSame(n,r){return n===r||isArrayLike(n)&&isArrayLike(r)&&is1DArraySame(n,r)}function is1DArraySame(n,r){var a=n.length;if(a!==r.length)return!1;for(var o=0;o<a;o++)if(n[o]!==r[o])return!1;return!0}function animateToShallow(n,r,a,o,s,l,u,c){for(var d=keys(o),f=s.duration,p=s.delay,v=s.additive,g=s.setToFinal,y=!isObject$3(l),_=n.animators,S=[],b=0;b<d.length;b++){var x=d[b],A=o[x];if(A!=null&&a[x]!=null&&(y||l[x]))if(isObject$3(A)&&!isArrayLike(A)&&!isGradientObject(A)){if(r){c||(a[x]=A,n.updateDuringAnimation(r));continue}animateToShallow(n,x,a[x],A,s,l&&l[x],u,c)}else S.push(x);else c||(a[x]=A,n.updateDuringAnimation(r),S.push(x))}var w=S.length;if(!v&&w)for(var E=0;E<_.length;E++){var D=_[E];if(D.targetName===r){var C=D.stopTracks(S);if(C){var $=indexOf(_,D);_.splice($,1)}}}if(s.force||(S=filter(S,function(L){return!isValueSame(o[L],a[L])}),w=S.length),w>0||s.force&&!u.length){var P=void 0,M=void 0,I=void 0;if(c){M={},g&&(P={});for(var E=0;E<w;E++){var x=S[E];M[x]=a[x],g?P[x]=o[x]:a[x]=o[x]}}else if(g){I={};for(var E=0;E<w;E++){var x=S[E];I[x]=cloneValue(a[x]),copyValue(a,o,x)}}var D=new Animator(a,!1,!1,v?filter(_,function(O){return O.targetName===r}):null);D.targetName=r,s.scope&&(D.scope=s.scope),g&&P&&D.whenWithKeys(0,P,S),I&&D.whenWithKeys(0,I,S),D.whenWithKeys(f==null?500:f,c?M:o,S).delay(p||0),n.addAnimator(D,r),u.push(D)}}var Group$3=function(n){__extends(r,n);function r(a){var o=n.call(this)||this;return o.isGroup=!0,o._children=[],o.attr(a),o}return r.prototype.childrenRef=function(){return this._children},r.prototype.children=function(){return this._children.slice()},r.prototype.childAt=function(a){return this._children[a]},r.prototype.childOfName=function(a){for(var o=this._children,s=0;s<o.length;s++)if(o[s].name===a)return o[s]},r.prototype.childCount=function(){return this._children.length},r.prototype.add=function(a){return a&&a!==this&&a.parent!==this&&(this._children.push(a),this._doAdd(a)),this},r.prototype.addBefore=function(a,o){if(a&&a!==this&&a.parent!==this&&o&&o.parent===this){var s=this._children,l=s.indexOf(o);l>=0&&(s.splice(l,0,a),this._doAdd(a))}return this},r.prototype.replace=function(a,o){var s=indexOf(this._children,a);return s>=0&&this.replaceAt(o,s),this},r.prototype.replaceAt=function(a,o){var s=this._children,l=s[o];if(a&&a!==this&&a.parent!==this&&a!==l){s[o]=a,l.parent=null;var u=this.__zr;u&&l.removeSelfFromZr(u),this._doAdd(a)}return this},r.prototype._doAdd=function(a){a.parent&&a.parent.remove(a),a.parent=this;var o=this.__zr;o&&o!==a.__zr&&a.addSelfToZr(o),o&&o.refresh()},r.prototype.remove=function(a){var o=this.__zr,s=this._children,l=indexOf(s,a);return l<0?this:(s.splice(l,1),a.parent=null,o&&a.removeSelfFromZr(o),o&&o.refresh(),this)},r.prototype.removeAll=function(){for(var a=this._children,o=this.__zr,s=0;s<a.length;s++){var l=a[s];o&&l.removeSelfFromZr(o),l.parent=null}return a.length=0,this},r.prototype.eachChild=function(a,o){for(var s=this._children,l=0;l<s.length;l++){var u=s[l];a.call(o,u,l)}return this},r.prototype.traverse=function(a,o){for(var s=0;s<this._children.length;s++){var l=this._children[s],u=a.call(o,l);l.isGroup&&!u&&l.traverse(a,o)}return this},r.prototype.addSelfToZr=function(a){n.prototype.addSelfToZr.call(this,a);for(var o=0;o<this._children.length;o++){var s=this._children[o];s.addSelfToZr(a)}},r.prototype.removeSelfFromZr=function(a){n.prototype.removeSelfFromZr.call(this,a);for(var o=0;o<this._children.length;o++){var s=this._children[o];s.removeSelfFromZr(a)}},r.prototype.getBoundingRect=function(a){for(var o=new BoundingRect(0,0,0,0),s=a||this._children,l=[],u=null,c=0;c<s.length;c++){var d=s[c];if(!(d.ignore||d.invisible)){var f=d.getBoundingRect(),p=d.getLocalTransform(l);p?(BoundingRect.applyTransform(o,f,p),u=u||o.clone(),u.union(o)):(u=u||f.clone(),u.union(f))}}return u||o},r}(Element$1);Group$3.prototype.type="group";var painterCtors={},instances$1={};function delInstance(n){delete instances$1[n]}function isDarkMode(n){if(!n)return!1;if(typeof n=="string")return lum(n,1)<DARK_MODE_THRESHOLD;if(n.colorStops){for(var r=n.colorStops,a=0,o=r.length,s=0;s<o;s++)a+=lum(r[s].color,1);return a/=o,a<DARK_MODE_THRESHOLD}return!1}var ZRender=function(){function n(r,a,o){var s=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,o=o||{},this.dom=a,this.id=r;var l=new Storage,u=o.renderer||"canvas";painterCtors[u]||(u=keys(painterCtors)[0]),o.useDirtyRect=o.useDirtyRect==null?!1:o.useDirtyRect;var c=new painterCtors[u](a,l,o,r),d=o.ssr||c.ssrOnly;this.storage=l,this.painter=c;var f=!env.node&&!env.worker&&!d?new HandlerDomProxy(c.getViewportRoot(),c.root):null,p=o.useCoarsePointer,v=p==null||p==="auto"?env.touchEventsSupported:!!p,g=44,y;v&&(y=retrieve2(o.pointerSize,g)),this.handler=new Handler(l,c,f,c.root,y),this.animation=new Animation({stage:{update:d?null:function(){return s._flush(!0)}}}),d||this.animation.start()}return n.prototype.add=function(r){this._disposed||!r||(this.storage.addRoot(r),r.addSelfToZr(this),this.refresh())},n.prototype.remove=function(r){this._disposed||!r||(this.storage.delRoot(r),r.removeSelfFromZr(this),this.refresh())},n.prototype.configLayer=function(r,a){this._disposed||(this.painter.configLayer&&this.painter.configLayer(r,a),this.refresh())},n.prototype.setBackgroundColor=function(r){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(r),this.refresh(),this._backgroundColor=r,this._darkMode=isDarkMode(r))},n.prototype.getBackgroundColor=function(){return this._backgroundColor},n.prototype.setDarkMode=function(r){this._darkMode=r},n.prototype.isDarkMode=function(){return this._darkMode},n.prototype.refreshImmediately=function(r){this._disposed||(r||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},n.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},n.prototype.flush=function(){this._disposed||this._flush(!1)},n.prototype._flush=function(r){var a,o=getTime();this._needsRefresh&&(a=!0,this.refreshImmediately(r)),this._needsRefreshHover&&(a=!0,this.refreshHoverImmediately());var s=getTime();a?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:s-o})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},n.prototype.setSleepAfterStill=function(r){this._sleepAfterStill=r},n.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},n.prototype.refreshHover=function(){this._needsRefreshHover=!0},n.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},n.prototype.resize=function(r){this._disposed||(r=r||{},this.painter.resize(r.width,r.height),this.handler.resize())},n.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},n.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},n.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},n.prototype.setCursorStyle=function(r){this._disposed||this.handler.setCursorStyle(r)},n.prototype.findHover=function(r,a){if(!this._disposed)return this.handler.findHover(r,a)},n.prototype.on=function(r,a,o){return this._disposed||this.handler.on(r,a,o),this},n.prototype.off=function(r,a){this._disposed||this.handler.off(r,a)},n.prototype.trigger=function(r,a){this._disposed||this.handler.trigger(r,a)},n.prototype.clear=function(){if(!this._disposed){for(var r=this.storage.getRoots(),a=0;a<r.length;a++)r[a]instanceof Group$3&&r[a].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},n.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))},n}();function init$2(n,r){var a=new ZRender(guid(),n,r);return instances$1[a.id]=a,a}function dispose$1(n){n.dispose()}function disposeAll(){for(var n in instances$1)instances$1.hasOwnProperty(n)&&instances$1[n].dispose();instances$1={}}function getInstance(n){return instances$1[n]}function registerPainter(n,r){painterCtors[n]=r}var ssrDataGetter;function getElementSSRData(n){if(typeof ssrDataGetter=="function")return ssrDataGetter(n)}function registerSSRDataGetter(n){ssrDataGetter=n}var version$3="5.6.1";const zrender=Object.freeze(Object.defineProperty({__proto__:null,dispose:dispose$1,disposeAll,getElementSSRData,getInstance,init:init$2,registerPainter,registerSSRDataGetter,version:version$3},Symbol.toStringTag,{value:"Module"}));var RADIAN_EPSILON=1e-4,ROUND_SUPPORTED_PRECISION_MAX=20;function _trim(n){return n.replace(/^\s+|\s+$/g,"")}function linearMap$2(n,r,a,o){var s=r[0],l=r[1],u=a[0],c=a[1],d=l-s,f=c-u;if(d===0)return f===0?u:(u+c)/2;if(o)if(d>0){if(n<=s)return u;if(n>=l)return c}else{if(n>=s)return u;if(n<=l)return c}else{if(n===s)return u;if(n===l)return c}return(n-s)/d*f+u}function parsePercent(n,r){switch(n){case"center":case"middle":n="50%";break;case"left":case"top":n="0%";break;case"right":case"bottom":n="100%";break}return isString(n)?_trim(n).match(/%$/)?parseFloat(n)/100*r:parseFloat(n):n==null?NaN:+n}function round$3(n,r,a){return r==null&&(r=10),r=Math.min(Math.max(0,r),ROUND_SUPPORTED_PRECISION_MAX),n=(+n).toFixed(r),a?n:+n}function asc$2(n){return n.sort(function(r,a){return r-a}),n}function getPrecision(n){if(n=+n,isNaN(n))return 0;if(n>1e-14){for(var r=1,a=0;a<15;a++,r*=10)if(Math.round(n*r)/r===n)return a}return getPrecisionSafe(n)}function getPrecisionSafe(n){var r=n.toString().toLowerCase(),a=r.indexOf("e"),o=a>0?+r.slice(a+1):0,s=a>0?a:r.length,l=r.indexOf("."),u=l<0?0:s-1-l;return Math.max(0,u-o)}function getPixelPrecision(n,r){var a=Math.log,o=Math.LN10,s=Math.floor(a(n[1]-n[0])/o),l=Math.round(a(Math.abs(r[1]-r[0]))/o),u=Math.min(Math.max(-s+l,0),20);return isFinite(u)?u:20}function getPercentWithPrecision(n,r,a){if(!n[r])return 0;var o=getPercentSeats(n,a);return o[r]||0}function getPercentSeats(n,r){var a=reduce(n,function(y,_){return y+(isNaN(_)?0:_)},0);if(a===0)return[];for(var o=Math.pow(10,r),s=map$1(n,function(y){return(isNaN(y)?0:y)/a*o*100}),l=o*100,u=map$1(s,function(y){return Math.floor(y)}),c=reduce(u,function(y,_){return y+_},0),d=map$1(s,function(y,_){return y-u[_]});c<l;){for(var f=Number.NEGATIVE_INFINITY,p=null,v=0,g=d.length;v<g;++v)d[v]>f&&(f=d[v],p=v);++u[p],d[p]=0,++c}return map$1(u,function(y){return y/o})}function addSafe(n,r){var a=Math.max(getPrecision(n),getPrecision(r)),o=n+r;return a>ROUND_SUPPORTED_PRECISION_MAX?o:round$3(o,a)}var MAX_SAFE_INTEGER=9007199254740991;function remRadian(n){var r=Math.PI*2;return(n%r+r)%r}function isRadianAroundZero(n){return n>-RADIAN_EPSILON&&n<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(n){if(n instanceof Date)return n;if(isString(n)){var r=TIME_REG.exec(n);if(!r)return new Date(NaN);if(r[8]){var a=+r[4]||0;return r[8].toUpperCase()!=="Z"&&(a-=+r[8].slice(0,3)),new Date(Date.UTC(+r[1],+(r[2]||1)-1,+r[3]||1,a,+(r[5]||0),+r[6]||0,r[7]?+r[7].substring(0,3):0))}else return new Date(+r[1],+(r[2]||1)-1,+r[3]||1,+r[4]||0,+(r[5]||0),+r[6]||0,r[7]?+r[7].substring(0,3):0)}else if(n==null)return new Date(NaN);return new Date(Math.round(n))}function quantity(n){return Math.pow(10,quantityExponent(n))}function quantityExponent(n){if(n===0)return 0;var r=Math.floor(Math.log(n)/Math.LN10);return n/Math.pow(10,r)>=10&&r++,r}function nice(n,r){var a=quantityExponent(n),o=Math.pow(10,a),s=n/o,l;return r?s<1.5?l=1:s<2.5?l=2:s<4?l=3:s<7?l=5:l=10:s<1?l=1:s<2?l=2:s<3?l=3:s<5?l=5:l=10,n=l*o,a>=-20?+n.toFixed(a<0?-a:0):n}function quantile(n,r){var a=(n.length-1)*r+1,o=Math.floor(a),s=+n[o-1],l=a-o;return l?s+l*(n[o]-s):s}function reformIntervals(n){n.sort(function(d,f){return c(d,f,0)?-1:1});for(var r=-1/0,a=1,o=0;o<n.length;){for(var s=n[o].interval,l=n[o].close,u=0;u<2;u++)s[u]<=r&&(s[u]=r,l[u]=u?1:1-a),r=s[u],a=l[u];s[0]===s[1]&&l[0]*l[1]!==1?n.splice(o,1):o++}return n;function c(d,f,p){return d.interval[p]<f.interval[p]||d.interval[p]===f.interval[p]&&(d.close[p]-f.close[p]===(p?-1:1)||!p&&c(d,f,1))}}function numericToNumber(n){var r=parseFloat(n);return r==n&&(r!==0||!isString(n)||n.indexOf("x")<=0)?r:NaN}function isNumeric(n){return!isNaN(numericToNumber(n))}function getRandomIdBase(){return Math.round(Math.random()*9)}function getGreatestCommonDividor(n,r){return r===0?n:getGreatestCommonDividor(r,n%r)}function getLeastCommonMultiple(n,r){return n==null?r:r==null?n:n*r/getGreatestCommonDividor(n,r)}var ECHARTS_PREFIX="[ECharts] ",storedLogs={},hasConsole=typeof console<"u"&&console.warn&&console.log;function outputLog(n,r,a){if(hasConsole){if(storedLogs[r])return;storedLogs[r]=!0}}function warn(n,r){outputLog("warn",n)}function throwError(n){throw new Error(n)}function interpolateNumber(n,r,a){return(r-n)*a+n}var DUMMY_COMPONENT_NAME_PREFIX="series\0",INTERNAL_COMPONENT_ID_PREFIX="\0_ec_\0";function normalizeToArray(n){return n instanceof Array?n:n==null?[]:[n]}function defaultEmphasis(n,r,a){if(n){n[r]=n[r]||{},n.emphasis=n.emphasis||{},n.emphasis[r]=n.emphasis[r]||{};for(var o=0,s=a.length;o<s;o++){var l=a[o];!n.emphasis[r].hasOwnProperty(l)&&n[r].hasOwnProperty(l)&&(n.emphasis[r][l]=n[r][l])}}}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(n){return isObject$3(n)&&!isArray$1(n)&&!(n instanceof Date)?n.value:n}function isDataItemOption(n){return isObject$3(n)&&!(n instanceof Array)}function mappingToExists(n,r,a){var o=a==="normalMerge",s=a==="replaceMerge",l=a==="replaceAll";n=n||[],r=(r||[]).slice();var u=createHashMap();each$f(r,function(d,f){if(!isObject$3(d)){r[f]=null;return}});var c=prepareResult(n,u,a);return(o||s)&&mappingById(c,n,u,r),o&&mappingByName(c,r),o||s?mappingByIndex(c,r,s):l&&mappingInReplaceAllMode(c,r),makeIdAndName(c),c}function prepareResult(n,r,a){var o=[];if(a==="replaceAll")return o;for(var s=0;s<n.length;s++){var l=n[s];l&&l.id!=null&&r.set(l.id,s),o.push({existing:a==="replaceMerge"||isComponentIdInternal(l)?null:l,newOption:null,keyInfo:null,brandNew:null})}return o}function mappingById(n,r,a,o){each$f(o,function(s,l){if(!(!s||s.id==null)){var u=makeComparableKey(s.id),c=a.get(u);if(c!=null){var d=n[c];assert(!d.newOption,'Duplicated option on id "'+u+'".'),d.newOption=s,d.existing=r[c],o[l]=null}}})}function mappingByName(n,r){each$f(r,function(a,o){if(!(!a||a.name==null))for(var s=0;s<n.length;s++){var l=n[s].existing;if(!n[s].newOption&&l&&(l.id==null||a.id==null)&&!isComponentIdInternal(a)&&!isComponentIdInternal(l)&&keyExistAndEqual("name",l,a)){n[s].newOption=a,r[o]=null;return}}})}function mappingByIndex(n,r,a){each$f(r,function(o){if(o){for(var s,l=0;(s=n[l])&&(s.newOption||isComponentIdInternal(s.existing)||s.existing&&o.id!=null&&!keyExistAndEqual("id",o,s.existing));)l++;s?(s.newOption=o,s.brandNew=a):n.push({newOption:o,brandNew:a,existing:null,keyInfo:null}),l++}})}function mappingInReplaceAllMode(n,r){each$f(r,function(a){n.push({newOption:a,brandNew:!0,existing:null,keyInfo:null})})}function makeIdAndName(n){var r=createHashMap();each$f(n,function(a){var o=a.existing;o&&r.set(o.id,a)}),each$f(n,function(a){var o=a.newOption;assert(!o||o.id==null||!r.get(o.id)||r.get(o.id)===a,"id duplicates: "+(o&&o.id)),o&&o.id!=null&&r.set(o.id,a),!a.keyInfo&&(a.keyInfo={})}),each$f(n,function(a,o){var s=a.existing,l=a.newOption,u=a.keyInfo;if(isObject$3(l)){if(u.name=l.name!=null?makeComparableKey(l.name):s?s.name:DUMMY_COMPONENT_NAME_PREFIX+o,s)u.id=makeComparableKey(s.id);else if(l.id!=null)u.id=makeComparableKey(l.id);else{var c=0;do u.id="\0"+u.name+"\0"+c++;while(r.get(u.id))}r.set(u.id,a)}})}function keyExistAndEqual(n,r,a){var o=convertOptionIdName(r[n],null),s=convertOptionIdName(a[n],null);return o!=null&&s!=null&&o===s}function makeComparableKey(n){return convertOptionIdName(n,"")}function convertOptionIdName(n,r){return n==null?r:isString(n)?n:isNumber(n)||isStringSafe(n)?n+"":r}function isNameSpecified(n){var r=n.name;return!!(r&&r.indexOf(DUMMY_COMPONENT_NAME_PREFIX))}function isComponentIdInternal(n){return n&&n.id!=null&&makeComparableKey(n.id).indexOf(INTERNAL_COMPONENT_ID_PREFIX)===0}function makeInternalComponentId(n){return INTERNAL_COMPONENT_ID_PREFIX+n}function setComponentTypeToKeyInfo(n,r,a){each$f(n,function(o){var s=o.newOption;isObject$3(s)&&(o.keyInfo.mainType=r,o.keyInfo.subType=determineSubType(r,s,o.existing,a))})}function determineSubType(n,r,a,o){var s=r.type?r.type:a?a.subType:o.determineSubType(n,r);return s}function compressBatches(n,r){var a={},o={};return s(n||[],a),s(r||[],o,a),[l(a),l(o)];function s(u,c,d){for(var f=0,p=u.length;f<p;f++){var v=convertOptionIdName(u[f].seriesId,null);if(v==null)return;for(var g=normalizeToArray(u[f].dataIndex),y=d&&d[v],_=0,S=g.length;_<S;_++){var b=g[_];y&&y[b]?y[b]=null:(c[v]||(c[v]={}))[b]=1}}}function l(u,c){var d=[];for(var f in u)if(u.hasOwnProperty(f)&&u[f]!=null)if(c)d.push(+f);else{var p=l(u[f],!0);p.length&&d.push({seriesId:f,dataIndex:p})}return d}}function queryDataIndex(n,r){if(r.dataIndexInside!=null)return r.dataIndexInside;if(r.dataIndex!=null)return isArray$1(r.dataIndex)?map$1(r.dataIndex,function(a){return n.indexOfRawIndex(a)}):n.indexOfRawIndex(r.dataIndex);if(r.name!=null)return isArray$1(r.name)?map$1(r.name,function(a){return n.indexOfName(a)}):n.indexOfName(r.name)}function makeInner(){var n="__ec_inner_"+innerUniqueIndex++;return function(r){return r[n]||(r[n]={})}}var innerUniqueIndex=getRandomIdBase();function parseFinder$1(n,r,a){var o=preParseFinder(r,a),s=o.mainTypeSpecified,l=o.queryOptionMap,u=o.others,c=u,d=a?a.defaultMainType:null;return!s&&d&&l.set(d,{}),l.each(function(f,p){var v=queryReferringComponents(n,p,f,{useDefault:d===p,enableAll:a&&a.enableAll!=null?a.enableAll:!0,enableNone:a&&a.enableNone!=null?a.enableNone:!0});c[p+"Models"]=v.models,c[p+"Model"]=v.models[0]}),c}function preParseFinder(n,r){var a;if(isString(n)){var o={};o[n+"Index"]=0,a=o}else a=n;var s=createHashMap(),l={},u=!1;return each$f(a,function(c,d){if(d==="dataIndex"||d==="dataIndexInside"){l[d]=c;return}var f=d.match(/^(\w+)(Index|Id|Name)$/)||[],p=f[1],v=(f[2]||"").toLowerCase();if(!(!p||!v||r&&r.includeMainTypes&&indexOf(r.includeMainTypes,p)<0)){u=u||!!p;var g=s.get(p)||s.set(p,{});g[v]=c}}),{mainTypeSpecified:u,queryOptionMap:s,others:l}}var SINGLE_REFERRING={useDefault:!0,enableAll:!1,enableNone:!1},MULTIPLE_REFERRING={useDefault:!1,enableAll:!0,enableNone:!0};function queryReferringComponents(n,r,a,o){o=o||SINGLE_REFERRING;var s=a.index,l=a.id,u=a.name,c={models:null,specified:s!=null||l!=null||u!=null};if(!c.specified){var d=void 0;return c.models=o.useDefault&&(d=n.getComponent(r))?[d]:[],c}return s==="none"||s===!1?(assert(o.enableNone,'`"none"` or `false` is not a valid value on index option.'),c.models=[],c):(s==="all"&&(assert(o.enableAll,'`"all"` is not a valid value on index option.'),s=l=u=null),c.models=n.queryComponents({mainType:r,index:s,id:l,name:u}),c)}function setAttribute(n,r,a){n.setAttribute?n.setAttribute(r,a):n[r]=a}function getAttribute(n,r){return n.getAttribute?n.getAttribute(r):n[r]}function getTooltipRenderMode(n){return n==="auto"?env.domSupported?"html":"richText":n||"html"}function groupData(n,r){var a=createHashMap(),o=[];return each$f(n,function(s){var l=r(s);(a.get(l)||(o.push(l),a.set(l,[]))).push(s)}),{keys:o,buckets:a}}function interpolateRawValues(n,r,a,o,s){var l=r==null||r==="auto";if(o==null)return o;if(isNumber(o)){var u=interpolateNumber(a||0,o,s);return round$3(u,l?Math.max(getPrecision(a||0),getPrecision(o)):r)}else{if(isString(o))return s<1?a:o;for(var c=[],d=a,f=o,p=Math.max(d?d.length:0,f.length),v=0;v<p;++v){var g=n.getDimensionInfo(v);if(g&&g.type==="ordinal")c[v]=(s<1&&d?d:f)[v];else{var y=d&&d[v]?d[v]:0,_=f[v],u=interpolateNumber(y,_,s);c[v]=round$3(u,l?Math.max(getPrecision(y),getPrecision(_)):r)}}return c}}var TYPE_DELIMITER=".",IS_CONTAINER="___EC__COMPONENT__CONTAINER___",IS_EXTENDED_CLASS="___EC__EXTENDED_CLASS___";function parseClassType(n){var r={main:"",sub:""};if(n){var a=n.split(TYPE_DELIMITER);r.main=a[0]||"",r.sub=a[1]||""}return r}function checkClassType(n){assert(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(n),'componentType "'+n+'" illegal')}function isExtendedClass(n){return!!(n&&n[IS_EXTENDED_CLASS])}function enableClassExtend(n,r){n.$constructor=n,n.extend=function(a){var o=this,s;return isESClass(o)?s=function(l){__extends(u,l);function u(){return l.apply(this,arguments)||this}return u}(o):(s=function(){(a.$constructor||o).apply(this,arguments)},inherits(s,this)),extend$2(s.prototype,a),s[IS_EXTENDED_CLASS]=!0,s.extend=this.extend,s.superCall=superCall,s.superApply=superApply,s.superClass=o,s}}function isESClass(n){return isFunction(n)&&/^class\s/.test(Function.prototype.toString.call(n))}function mountExtend(n,r){n.extend=r.extend}var classBase=Math.round(Math.random()*10);function enableClassCheck(n){var r=["__\0is_clz",classBase++].join("_");n.prototype[r]=!0,n.isInstance=function(a){return!!(a&&a[r])}}function superCall(n,r){for(var a=[],o=2;o<arguments.length;o++)a[o-2]=arguments[o];return this.superClass.prototype[r].apply(n,a)}function superApply(n,r,a){return this.superClass.prototype[r].apply(n,a)}function enableClassManagement(n){var r={};n.registerClass=function(o){var s=o.type||o.prototype.type;if(s){checkClassType(s),o.prototype.type=s;var l=parseClassType(s);if(!l.sub)r[l.main]=o;else if(l.sub!==IS_CONTAINER){var u=a(l);u[l.sub]=o}}return o},n.getClass=function(o,s,l){var u=r[o];if(u&&u[IS_CONTAINER]&&(u=s?u[s]:null),l&&!u)throw new Error(s?"Component "+o+"."+(s||"")+" is used but not imported.":o+".type should be specified.");return u},n.getClassesByMainType=function(o){var s=parseClassType(o),l=[],u=r[s.main];return u&&u[IS_CONTAINER]?each$f(u,function(c,d){d!==IS_CONTAINER&&l.push(c)}):l.push(u),l},n.hasClass=function(o){var s=parseClassType(o);return!!r[s.main]},n.getAllClassMainTypes=function(){var o=[];return each$f(r,function(s,l){o.push(l)}),o},n.hasSubTypes=function(o){var s=parseClassType(o),l=r[s.main];return l&&l[IS_CONTAINER]};function a(o){var s=r[o.main];return(!s||!s[IS_CONTAINER])&&(s=r[o.main]={},s[IS_CONTAINER]=!0),s}}function makeStyleMapper(n,r){for(var a=0;a<n.length;a++)n[a][1]||(n[a][1]=n[a][0]);return r=r||!1,function(o,s,l){for(var u={},c=0;c<n.length;c++){var d=n[c][1];if(!(s&&indexOf(s,d)>=0||l&&indexOf(l,d)<0)){var f=o.getShallow(d,r);f!=null&&(u[n[c][0]]=f)}}return u}}var AREA_STYLE_KEY_MAP=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],getAreaStyle=makeStyleMapper(AREA_STYLE_KEY_MAP),AreaStyleMixin=function(){function n(){}return n.prototype.getAreaStyle=function(r,a){return getAreaStyle(this,r,a)},n}(),globalImageCache=new LRU(50);function findExistImage(n){if(typeof n=="string"){var r=globalImageCache.get(n);return r&&r.image}else return n}function createOrUpdateImage(n,r,a,o,s){if(n)if(typeof n=="string"){if(r&&r.__zrImageSrc===n||!a)return r;var l=globalImageCache.get(n),u={hostEl:a,cb:o,cbPayload:s};return l?(r=l.image,!isImageReady(r)&&l.pending.push(u)):(r=platformApi.loadImage(n,imageOnLoad,imageOnLoad),r.__zrImageSrc=n,globalImageCache.put(n,r.__cachedImgObj={image:r,pending:[u]})),r}else return n;else return r}function imageOnLoad(){var n=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var r=0;r<n.pending.length;r++){var a=n.pending[r],o=a.cb;o&&o(this,a.cbPayload),a.hostEl.dirty()}n.pending.length=0}function isImageReady(n){return n&&n.width&&n.height}var STYLE_REG=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function truncateText(n,r,a,o,s){var l={};return truncateText2(l,n,r,a,o,s),l.text}function truncateText2(n,r,a,o,s,l){if(!a){n.text="",n.isTruncated=!1;return}var u=(r+"").split("\n");l=prepareTruncateOptions(a,o,s,l);for(var c=!1,d={},f=0,p=u.length;f<p;f++)truncateSingleLine(d,u[f],l),u[f]=d.textLine,c=c||d.isTruncated;n.text=u.join("\n"),n.isTruncated=c}function prepareTruncateOptions(n,r,a,o){o=o||{};var s=extend$2({},o);s.font=r,a=retrieve2(a,"..."),s.maxIterations=retrieve2(o.maxIterations,2);var l=s.minChar=retrieve2(o.minChar,0);s.cnCharWidth=getWidth("国",r);var u=s.ascCharWidth=getWidth("a",r);s.placeholder=retrieve2(o.placeholder,"");for(var c=n=Math.max(0,n-1),d=0;d<l&&c>=u;d++)c-=u;var f=getWidth(a,r);return f>c&&(a="",f=0),c=n-f,s.ellipsis=a,s.ellipsisWidth=f,s.contentWidth=c,s.containerWidth=n,s}function truncateSingleLine(n,r,a){var o=a.containerWidth,s=a.font,l=a.contentWidth;if(!o){n.textLine="",n.isTruncated=!1;return}var u=getWidth(r,s);if(u<=o){n.textLine=r,n.isTruncated=!1;return}for(var c=0;;c++){if(u<=l||c>=a.maxIterations){r+=a.ellipsis;break}var d=c===0?estimateLength(r,l,a.ascCharWidth,a.cnCharWidth):u>0?Math.floor(r.length*l/u):0;r=r.substr(0,d),u=getWidth(r,s)}r===""&&(r=a.placeholder),n.textLine=r,n.isTruncated=!0}function estimateLength(n,r,a,o){for(var s=0,l=0,u=n.length;l<u&&s<r;l++){var c=n.charCodeAt(l);s+=0<=c&&c<=127?a:o}return l}function parsePlainText(n,r){n!=null&&(n+="");var a=r.overflow,o=r.padding,s=r.font,l=a==="truncate",u=getLineHeight(s),c=retrieve2(r.lineHeight,u),d=!!r.backgroundColor,f=r.lineOverflow==="truncate",p=!1,v=r.width,g;v!=null&&(a==="break"||a==="breakAll")?g=n?wrapText(n,r.font,v,a==="breakAll",0).lines:[]:g=n?n.split("\n"):[];var y=g.length*c,_=retrieve2(r.height,y);if(y>_&&f){var S=Math.floor(_/c);p=p||g.length>S,g=g.slice(0,S)}if(n&&l&&v!=null)for(var b=prepareTruncateOptions(v,s,r.ellipsis,{minChar:r.truncateMinChar,placeholder:r.placeholder}),x={},A=0;A<g.length;A++)truncateSingleLine(x,g[A],b),g[A]=x.textLine,p=p||x.isTruncated;for(var w=_,E=0,A=0;A<g.length;A++)E=Math.max(getWidth(g[A],s),E);v==null&&(v=E);var D=E;return o&&(w+=o[0]+o[2],D+=o[1]+o[3],v+=o[1]+o[3]),d&&(D=v),{lines:g,height:_,outerWidth:D,outerHeight:w,lineHeight:c,calculatedLineHeight:u,contentWidth:E,contentHeight:y,width:v,isTruncated:p}}var RichTextToken=function(){function n(){}return n}(),RichTextLine=function(){function n(r){this.tokens=[],r&&(this.tokens=r)}return n}(),RichTextContentBlock=function(){function n(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return n}();function parseRichText(n,r){var a=new RichTextContentBlock;if(n!=null&&(n+=""),!n)return a;for(var o=r.width,s=r.height,l=r.overflow,u=(l==="break"||l==="breakAll")&&o!=null?{width:o,accumWidth:0,breakAll:l==="breakAll"}:null,c=STYLE_REG.lastIndex=0,d;(d=STYLE_REG.exec(n))!=null;){var f=d.index;f>c&&pushTokens(a,n.substring(c,f),r,u),pushTokens(a,d[2],r,u,d[1]),c=STYLE_REG.lastIndex}c<n.length&&pushTokens(a,n.substring(c,n.length),r,u);var p=[],v=0,g=0,y=r.padding,_=l==="truncate",S=r.lineOverflow==="truncate",b={};function x(G,B,Y){G.width=B,G.lineHeight=Y,v+=Y,g=Math.max(g,B)}e:for(var A=0;A<a.lines.length;A++){for(var w=a.lines[A],E=0,D=0,C=0;C<w.tokens.length;C++){var $=w.tokens[C],P=$.styleName&&r.rich[$.styleName]||{},M=$.textPadding=P.padding,I=M?M[1]+M[3]:0,L=$.font=P.font||r.font;$.contentHeight=getLineHeight(L);var O=retrieve2(P.height,$.contentHeight);if($.innerHeight=O,M&&(O+=M[0]+M[2]),$.height=O,$.lineHeight=retrieve3(P.lineHeight,r.lineHeight,O),$.align=P&&P.align||r.align,$.verticalAlign=P&&P.verticalAlign||"middle",S&&s!=null&&v+$.lineHeight>s){var R=a.lines.length;C>0?(w.tokens=w.tokens.slice(0,C),x(w,D,E),a.lines=a.lines.slice(0,A+1)):a.lines=a.lines.slice(0,A),a.isTruncated=a.isTruncated||a.lines.length<R;break e}var N=P.width,V=N==null||N==="auto";if(typeof N=="string"&&N.charAt(N.length-1)==="%")$.percentWidth=N,p.push($),$.contentWidth=getWidth($.text,L);else{if(V){var F=P.backgroundColor,U=F&&F.image;U&&(U=findExistImage(U),isImageReady(U)&&($.width=Math.max($.width,U.width*O/U.height)))}var H=_&&o!=null?o-D:null;H!=null&&H<$.width?!V||H<I?($.text="",$.width=$.contentWidth=0):(truncateText2(b,$.text,H-I,L,r.ellipsis,{minChar:r.truncateMinChar}),$.text=b.text,a.isTruncated=a.isTruncated||b.isTruncated,$.width=$.contentWidth=getWidth($.text,L)):$.contentWidth=getWidth($.text,L)}$.width+=I,D+=$.width,P&&(E=Math.max(E,$.lineHeight))}x(w,D,E)}a.outerWidth=a.width=retrieve2(o,g),a.outerHeight=a.height=retrieve2(s,v),a.contentHeight=v,a.contentWidth=g,y&&(a.outerWidth+=y[1]+y[3],a.outerHeight+=y[0]+y[2]);for(var A=0;A<p.length;A++){var $=p[A],W=$.percentWidth;$.width=parseInt(W,10)/100*a.width}return a}function pushTokens(n,r,a,o,s){var l=r==="",u=s&&a.rich[s]||{},c=n.lines,d=u.font||a.font,f=!1,p,v;if(o){var g=u.padding,y=g?g[1]+g[3]:0;if(u.width!=null&&u.width!=="auto"){var _=parsePercent$1(u.width,o.width)+y;c.length>0&&_+o.accumWidth>o.width&&(p=r.split("\n"),f=!0),o.accumWidth=_}else{var S=wrapText(r,d,o.width,o.breakAll,o.accumWidth);o.accumWidth=S.accumWidth+y,v=S.linesWidths,p=S.lines}}else p=r.split("\n");for(var b=0;b<p.length;b++){var x=p[b],A=new RichTextToken;if(A.styleName=s,A.text=x,A.isLineHolder=!x&&!l,typeof u.width=="number"?A.width=u.width:A.width=v?v[b]:getWidth(x,d),!b&&!f){var w=(c[c.length-1]||(c[0]=new RichTextLine)).tokens,E=w.length;E===1&&w[0].isLineHolder?w[0]=A:(x||!E||l)&&w.push(A)}else c.push(new RichTextLine([A]))}}function isAlphabeticLetter(n){var r=n.charCodeAt(0);return r>=32&&r<=591||r>=880&&r<=4351||r>=4608&&r<=5119||r>=7680&&r<=8303}var breakCharMap=reduce(",&?/;] ".split(""),function(n,r){return n[r]=!0,n},{});function isWordBreakChar(n){return isAlphabeticLetter(n)?!!breakCharMap[n]:!0}function wrapText(n,r,a,o,s){for(var l=[],u=[],c="",d="",f=0,p=0,v=0;v<n.length;v++){var g=n.charAt(v);if(g==="\n"){d&&(c+=d,p+=f),l.push(c),u.push(p),c="",d="",f=0,p=0;continue}var y=getWidth(g,r),_=o?!1:!isWordBreakChar(g);if(l.length?p+y>a:s+p+y>a){p?(c||d)&&(_?(c||(c=d,d="",f=0,p=f),l.push(c),u.push(p-f),d+=g,f+=y,c="",p=f):(d&&(c+=d,d="",f=0),l.push(c),u.push(p),c=g,p=y)):_?(l.push(d),u.push(f),d=g,f=y):(l.push(g),u.push(y));continue}p+=y,_?(d+=g,f+=y):(d&&(c+=d,d="",f=0),c+=g)}return!l.length&&!c&&(c=n,d="",f=0),d&&(c+=d),c&&(l.push(c),u.push(p)),l.length===1&&(p+=s),{accumWidth:p,lines:l,linesWidths:u}}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(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype._init=function(a){for(var o=keys(a),s=0;s<o.length;s++){var l=o[s];l==="style"?this.useStyle(a[l]):n.prototype.attrKV.call(this,l,a[l])}this.style||this.useStyle({})},r.prototype.beforeBrush=function(){},r.prototype.afterBrush=function(){},r.prototype.innerBeforeBrush=function(){},r.prototype.innerAfterBrush=function(){},r.prototype.shouldBePainted=function(a,o,s,l){var u=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&isDisplayableCulled(this,a,o)||u&&!u[0]&&!u[3])return!1;if(s&&this.__clipPaths){for(var c=0;c<this.__clipPaths.length;++c)if(this.__clipPaths[c].isZeroArea())return!1}if(l&&this.parent)for(var d=this.parent;d;){if(d.ignore)return!1;d=d.parent}return!0},r.prototype.contain=function(a,o){return this.rectContain(a,o)},r.prototype.traverse=function(a,o){a.call(o,this)},r.prototype.rectContain=function(a,o){var s=this.transformCoordToLocal(a,o),l=this.getBoundingRect();return l.contain(s[0],s[1])},r.prototype.getPaintRect=function(){var a=this._paintRect;if(!this._paintRect||this.__dirty){var o=this.transform,s=this.getBoundingRect(),l=this.style,u=l.shadowBlur||0,c=l.shadowOffsetX||0,d=l.shadowOffsetY||0;a=this._paintRect||(this._paintRect=new BoundingRect(0,0,0,0)),o?BoundingRect.applyTransform(a,s,o):a.copy(s),(u||c||d)&&(a.width+=u*2+Math.abs(c),a.height+=u*2+Math.abs(d),a.x=Math.min(a.x,a.x+c-u),a.y=Math.min(a.y,a.y+d-u));var f=this.dirtyRectTolerance;a.isZero()||(a.x=Math.floor(a.x-f),a.y=Math.floor(a.y-f),a.width=Math.ceil(a.width+1+f*2),a.height=Math.ceil(a.height+1+f*2))}return a},r.prototype.setPrevPaintRect=function(a){a?(this._prevPaintRect=this._prevPaintRect||new BoundingRect(0,0,0,0),this._prevPaintRect.copy(a)):this._prevPaintRect=null},r.prototype.getPrevPaintRect=function(){return this._prevPaintRect},r.prototype.animateStyle=function(a){return this.animate("style",a)},r.prototype.updateDuringAnimation=function(a){a==="style"?this.dirtyStyle():this.markRedraw()},r.prototype.attrKV=function(a,o){a!=="style"?n.prototype.attrKV.call(this,a,o):this.style?this.setStyle(o):this.useStyle(o)},r.prototype.setStyle=function(a,o){return typeof a=="string"?this.style[a]=o:extend$2(this.style,a),this.dirtyStyle(),this},r.prototype.dirtyStyle=function(a){a||this.markRedraw(),this.__dirty|=STYLE_CHANGED_BIT,this._rect&&(this._rect=null)},r.prototype.dirty=function(){this.dirtyStyle()},r.prototype.styleChanged=function(){return!!(this.__dirty&STYLE_CHANGED_BIT)},r.prototype.styleUpdated=function(){this.__dirty&=~STYLE_CHANGED_BIT},r.prototype.createStyle=function(a){return createObject(DEFAULT_COMMON_STYLE,a)},r.prototype.useStyle=function(a){a[STYLE_MAGIC_KEY]||(a=this.createStyle(a)),this.__inHover?this.__hoverStyle=a:this.style=a,this.dirtyStyle()},r.prototype.isStyleObject=function(a){return a[STYLE_MAGIC_KEY]},r.prototype._innerSaveToNormal=function(a){n.prototype._innerSaveToNormal.call(this,a);var o=this._normalState;a.style&&!o.style&&(o.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(a,o,PRIMARY_STATES_KEYS)},r.prototype._applyStateObj=function(a,o,s,l,u,c){n.prototype._applyStateObj.call(this,a,o,s,l,u,c);var d=!(o&&l),f;if(o&&o.style?u?l?f=o.style:(f=this._mergeStyle(this.createStyle(),s.style),this._mergeStyle(f,o.style)):(f=this._mergeStyle(this.createStyle(),l?this.style:s.style),this._mergeStyle(f,o.style)):d&&(f=s.style),f)if(u){var p=this.style;if(this.style=this.createStyle(d?{}:p),d)for(var v=keys(p),g=0;g<v.length;g++){var y=v[g];y in f&&(f[y]=f[y],this.style[y]=p[y])}for(var _=keys(f),g=0;g<_.length;g++){var y=_[g];this.style[y]=this.style[y]}this._transitionState(a,{style:f},c,this.getAnimationStyleProps())}else this.useStyle(f);for(var S=this.__inHover?PRIMARY_STATES_KEYS_IN_HOVER_LAYER:PRIMARY_STATES_KEYS,g=0;g<S.length;g++){var y=S[g];o&&o[y]!=null?this[y]=o[y]:d&&s[y]!=null&&(this[y]=s[y])}},r.prototype._mergeStates=function(a){for(var o=n.prototype._mergeStates.call(this,a),s,l=0;l<a.length;l++){var u=a[l];u.style&&(s=s||{},this._mergeStyle(s,u.style))}return s&&(o.style=s),o},r.prototype._mergeStyle=function(a,o){return extend$2(a,o),a},r.prototype.getAnimationStyleProps=function(){return DEFAULT_COMMON_ANIMATION_PROPS},r.initDefaultProps=function(){var a=r.prototype;a.type="displayable",a.invisible=!1,a.z=0,a.z2=0,a.zlevel=0,a.culling=!1,a.cursor="pointer",a.rectHover=!1,a.incremental=!1,a._rect=null,a.dirtyRectTolerance=0,a.__dirty=REDRAW_BIT|STYLE_CHANGED_BIT}(),r}(Element$1),tmpRect=new BoundingRect(0,0,0,0),viewRect=new BoundingRect(0,0,0,0);function isDisplayableCulled(n,r,a){return tmpRect.copy(n.getBoundingRect()),n.transform&&tmpRect.applyTransform(n.transform),viewRect.width=r,viewRect.height=a,!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(n,r,a){if(n.length!==0){for(var o=n[0],s=o[0],l=o[0],u=o[1],c=o[1],d=1;d<n.length;d++)o=n[d],s=mathMin$9(s,o[0]),l=mathMax$9(l,o[0]),u=mathMin$9(u,o[1]),c=mathMax$9(c,o[1]);r[0]=s,r[1]=u,a[0]=l,a[1]=c}}function fromLine(n,r,a,o,s,l){s[0]=mathMin$9(n,a),s[1]=mathMin$9(r,o),l[0]=mathMax$9(n,a),l[1]=mathMax$9(r,o)}var xDim=[],yDim=[];function fromCubic(n,r,a,o,s,l,u,c,d,f){var p=cubicExtrema,v=cubicAt,g=p(n,a,s,u,xDim);d[0]=1/0,d[1]=1/0,f[0]=-1/0,f[1]=-1/0;for(var y=0;y<g;y++){var _=v(n,a,s,u,xDim[y]);d[0]=mathMin$9(_,d[0]),f[0]=mathMax$9(_,f[0])}g=p(r,o,l,c,yDim);for(var y=0;y<g;y++){var S=v(r,o,l,c,yDim[y]);d[1]=mathMin$9(S,d[1]),f[1]=mathMax$9(S,f[1])}d[0]=mathMin$9(n,d[0]),f[0]=mathMax$9(n,f[0]),d[0]=mathMin$9(u,d[0]),f[0]=mathMax$9(u,f[0]),d[1]=mathMin$9(r,d[1]),f[1]=mathMax$9(r,f[1]),d[1]=mathMin$9(c,d[1]),f[1]=mathMax$9(c,f[1])}function fromQuadratic(n,r,a,o,s,l,u,c){var d=quadraticExtremum,f=quadraticAt$1,p=mathMax$9(mathMin$9(d(n,a,s),1),0),v=mathMax$9(mathMin$9(d(r,o,l),1),0),g=f(n,a,s,p),y=f(r,o,l,v);u[0]=mathMin$9(n,s,g),u[1]=mathMin$9(r,l,y),c[0]=mathMax$9(n,s,g),c[1]=mathMax$9(r,l,y)}function fromArc(n,r,a,o,s,l,u,c,d){var f=min$1,p=max$1,v=Math.abs(s-l);if(v%PI2$8<1e-4&&v>1e-4){c[0]=n-a,c[1]=r-o,d[0]=n+a,d[1]=r+o;return}if(start[0]=mathCos$4(s)*a+n,start[1]=mathSin$4(s)*o+r,end[0]=mathCos$4(l)*a+n,end[1]=mathSin$4(l)*o+r,f(c,start,end),p(d,start,end),s=s%PI2$8,s<0&&(s=s+PI2$8),l=l%PI2$8,l<0&&(l=l+PI2$8),s>l&&!u?l+=PI2$8:s<l&&u&&(s+=PI2$8),u){var g=l;l=s,s=g}for(var y=0;y<l;y+=Math.PI/2)y>s&&(extremity[0]=mathCos$4(y)*a+n,extremity[1]=mathSin$4(y)*o+r,f(c,extremity,c),p(d,extremity,d))}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$2=Math.abs,PI$8=Math.PI,PI2$7=PI$8*2,hasTypedArray=typeof Float32Array<"u",tmpAngles=[];function modPI2(n){var r=Math.round(n/PI$8*1e8)/1e8;return r%2*PI$8}function normalizeArcAngles(n,r){var a=modPI2(n[0]);a<0&&(a+=PI2$7);var o=a-n[0],s=n[1];s+=o,!r&&s-a>=PI2$7?s=a+PI2$7:r&&a-s>=PI2$7?s=a-PI2$7:!r&&a>s?s=a+(PI2$7-modPI2(a-s)):r&&a<s&&(s=a-(PI2$7-modPI2(s-a))),n[0]=a,n[1]=s}var PathProxy=function(){function n(r){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,r&&(this._saveData=!1),this._saveData&&(this.data=[])}return n.prototype.increaseVersion=function(){this._version++},n.prototype.getVersion=function(){return this._version},n.prototype.setScale=function(r,a,o){o=o||0,o>0&&(this._ux=mathAbs$2(o/devicePixelRatio/r)||0,this._uy=mathAbs$2(o/devicePixelRatio/a)||0)},n.prototype.setDPR=function(r){this.dpr=r},n.prototype.setContext=function(r){this._ctx=r},n.prototype.getContext=function(){return this._ctx},n.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},n.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},n.prototype.moveTo=function(r,a){return this._drawPendingPt(),this.addData(CMD$4.M,r,a),this._ctx&&this._ctx.moveTo(r,a),this._x0=r,this._y0=a,this._xi=r,this._yi=a,this},n.prototype.lineTo=function(r,a){var o=mathAbs$2(r-this._xi),s=mathAbs$2(a-this._yi),l=o>this._ux||s>this._uy;if(this.addData(CMD$4.L,r,a),this._ctx&&l&&this._ctx.lineTo(r,a),l)this._xi=r,this._yi=a,this._pendingPtDist=0;else{var u=o*o+s*s;u>this._pendingPtDist&&(this._pendingPtX=r,this._pendingPtY=a,this._pendingPtDist=u)}return this},n.prototype.bezierCurveTo=function(r,a,o,s,l,u){return this._drawPendingPt(),this.addData(CMD$4.C,r,a,o,s,l,u),this._ctx&&this._ctx.bezierCurveTo(r,a,o,s,l,u),this._xi=l,this._yi=u,this},n.prototype.quadraticCurveTo=function(r,a,o,s){return this._drawPendingPt(),this.addData(CMD$4.Q,r,a,o,s),this._ctx&&this._ctx.quadraticCurveTo(r,a,o,s),this._xi=o,this._yi=s,this},n.prototype.arc=function(r,a,o,s,l,u){this._drawPendingPt(),tmpAngles[0]=s,tmpAngles[1]=l,normalizeArcAngles(tmpAngles,u),s=tmpAngles[0],l=tmpAngles[1];var c=l-s;return this.addData(CMD$4.A,r,a,o,o,s,c,0,u?0:1),this._ctx&&this._ctx.arc(r,a,o,s,l,u),this._xi=mathCos$3(l)*o+r,this._yi=mathSin$3(l)*o+a,this},n.prototype.arcTo=function(r,a,o,s,l){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(r,a,o,s,l),this},n.prototype.rect=function(r,a,o,s){return this._drawPendingPt(),this._ctx&&this._ctx.rect(r,a,o,s),this.addData(CMD$4.R,r,a,o,s),this},n.prototype.closePath=function(){this._drawPendingPt(),this.addData(CMD$4.Z);var r=this._ctx,a=this._x0,o=this._y0;return r&&r.closePath(),this._xi=a,this._yi=o,this},n.prototype.fill=function(r){r&&r.fill(),this.toStatic()},n.prototype.stroke=function(r){r&&r.stroke(),this.toStatic()},n.prototype.len=function(){return this._len},n.prototype.setData=function(r){var a=r.length;!(this.data&&this.data.length===a)&&hasTypedArray&&(this.data=new Float32Array(a));for(var o=0;o<a;o++)this.data[o]=r[o];this._len=a},n.prototype.appendPath=function(r){r instanceof Array||(r=[r]);for(var a=r.length,o=0,s=this._len,l=0;l<a;l++)o+=r[l].len();hasTypedArray&&this.data instanceof Float32Array&&(this.data=new Float32Array(s+o));for(var l=0;l<a;l++)for(var u=r[l].data,c=0;c<u.length;c++)this.data[s++]=u[c];this._len=s},n.prototype.addData=function(r,a,o,s,l,u,c,d,f){if(this._saveData){var p=this.data;this._len+arguments.length>p.length&&(this._expandData(),p=this.data);for(var v=0;v<arguments.length;v++)p[this._len++]=arguments[v]}},n.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},n.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var r=[],a=0;a<this._len;a++)r[a]=this.data[a];this.data=r}},n.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var r=this.data;r instanceof Array&&(r.length=this._len,hasTypedArray&&this._len>11&&(this.data=new Float32Array(r)))}},n.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 r=this.data,a=0,o=0,s=0,l=0,u;for(u=0;u<this._len;){var c=r[u++],d=u===1;switch(d&&(a=r[u],o=r[u+1],s=a,l=o),c){case CMD$4.M:a=s=r[u++],o=l=r[u++],min2[0]=s,min2[1]=l,max2[0]=s,max2[1]=l;break;case CMD$4.L:fromLine(a,o,r[u],r[u+1],min2,max2),a=r[u++],o=r[u++];break;case CMD$4.C:fromCubic(a,o,r[u++],r[u++],r[u++],r[u++],r[u],r[u+1],min2,max2),a=r[u++],o=r[u++];break;case CMD$4.Q:fromQuadratic(a,o,r[u++],r[u++],r[u],r[u+1],min2,max2),a=r[u++],o=r[u++];break;case CMD$4.A:var f=r[u++],p=r[u++],v=r[u++],g=r[u++],y=r[u++],_=r[u++]+y;u+=1;var S=!r[u++];d&&(s=mathCos$3(y)*v+f,l=mathSin$3(y)*g+p),fromArc(f,p,v,g,y,_,S,min2,max2),a=mathCos$3(_)*v+f,o=mathSin$3(_)*g+p;break;case CMD$4.R:s=a=r[u++],l=o=r[u++];var b=r[u++],x=r[u++];fromLine(s,l,s+b,l+x,min2,max2);break;case CMD$4.Z:a=s,o=l;break}min$1(min,min,min2),max$1(max,max,max2)}return u===0&&(min[0]=min[1]=max[0]=max[1]=0),new BoundingRect(min[0],min[1],max[0]-min[0],max[1]-min[1])},n.prototype._calculateLength=function(){var r=this.data,a=this._len,o=this._ux,s=this._uy,l=0,u=0,c=0,d=0;this._pathSegLen||(this._pathSegLen=[]);for(var f=this._pathSegLen,p=0,v=0,g=0;g<a;){var y=r[g++],_=g===1;_&&(l=r[g],u=r[g+1],c=l,d=u);var S=-1;switch(y){case CMD$4.M:l=c=r[g++],u=d=r[g++];break;case CMD$4.L:{var b=r[g++],x=r[g++],A=b-l,w=x-u;(mathAbs$2(A)>o||mathAbs$2(w)>s||g===a-1)&&(S=Math.sqrt(A*A+w*w),l=b,u=x);break}case CMD$4.C:{var E=r[g++],D=r[g++],b=r[g++],x=r[g++],C=r[g++],$=r[g++];S=cubicLength(l,u,E,D,b,x,C,$,10),l=C,u=$;break}case CMD$4.Q:{var E=r[g++],D=r[g++],b=r[g++],x=r[g++];S=quadraticLength(l,u,E,D,b,x,10),l=b,u=x;break}case CMD$4.A:var P=r[g++],M=r[g++],I=r[g++],L=r[g++],O=r[g++],R=r[g++],N=R+O;g+=1,_&&(c=mathCos$3(O)*I+P,d=mathSin$3(O)*L+M),S=mathMax$8(I,L)*mathMin$8(PI2$7,Math.abs(R)),l=mathCos$3(N)*I+P,u=mathSin$3(N)*L+M;break;case CMD$4.R:{c=l=r[g++],d=u=r[g++];var V=r[g++],F=r[g++];S=V*2+F*2;break}case CMD$4.Z:{var A=c-l,w=d-u;S=Math.sqrt(A*A+w*w),l=c,u=d;break}}S>=0&&(f[v++]=S,p+=S)}return this._pathLen=p,p},n.prototype.rebuildPath=function(r,a){var o=this.data,s=this._ux,l=this._uy,u=this._len,c,d,f,p,v,g,y=a<1,_,S,b=0,x=0,A,w=0,E,D;if(!(y&&(this._pathSegLen||this._calculateLength(),_=this._pathSegLen,S=this._pathLen,A=a*S,!A)))e:for(var C=0;C<u;){var $=o[C++],P=C===1;switch(P&&(f=o[C],p=o[C+1],c=f,d=p),$!==CMD$4.L&&w>0&&(r.lineTo(E,D),w=0),$){case CMD$4.M:c=f=o[C++],d=p=o[C++],r.moveTo(f,p);break;case CMD$4.L:{v=o[C++],g=o[C++];var M=mathAbs$2(v-f),I=mathAbs$2(g-p);if(M>s||I>l){if(y){var L=_[x++];if(b+L>A){var O=(A-b)/L;r.lineTo(f*(1-O)+v*O,p*(1-O)+g*O);break e}b+=L}r.lineTo(v,g),f=v,p=g,w=0}else{var R=M*M+I*I;R>w&&(E=v,D=g,w=R)}break}case CMD$4.C:{var N=o[C++],V=o[C++],F=o[C++],U=o[C++],H=o[C++],W=o[C++];if(y){var L=_[x++];if(b+L>A){var O=(A-b)/L;cubicSubdivide(f,N,F,H,O,tmpOutX),cubicSubdivide(p,V,U,W,O,tmpOutY),r.bezierCurveTo(tmpOutX[1],tmpOutY[1],tmpOutX[2],tmpOutY[2],tmpOutX[3],tmpOutY[3]);break e}b+=L}r.bezierCurveTo(N,V,F,U,H,W),f=H,p=W;break}case CMD$4.Q:{var N=o[C++],V=o[C++],F=o[C++],U=o[C++];if(y){var L=_[x++];if(b+L>A){var O=(A-b)/L;quadraticSubdivide(f,N,F,O,tmpOutX),quadraticSubdivide(p,V,U,O,tmpOutY),r.quadraticCurveTo(tmpOutX[1],tmpOutY[1],tmpOutX[2],tmpOutY[2]);break e}b+=L}r.quadraticCurveTo(N,V,F,U),f=F,p=U;break}case CMD$4.A:var G=o[C++],B=o[C++],Y=o[C++],Z=o[C++],K=o[C++],ee=o[C++],j=o[C++],q=!o[C++],J=Y>Z?Y:Z,X=mathAbs$2(Y-Z)>.001,re=K+ee,Q=!1;if(y){var L=_[x++];b+L>A&&(re=K+ee*(A-b)/L,Q=!0),b+=L}if(X&&r.ellipse?r.ellipse(G,B,Y,Z,j,K,re,q):r.arc(G,B,J,K,re,q),Q)break e;P&&(c=mathCos$3(K)*Y+G,d=mathSin$3(K)*Z+B),f=mathCos$3(re)*Y+G,p=mathSin$3(re)*Z+B;break;case CMD$4.R:c=f=o[C],d=p=o[C+1],v=o[C++],g=o[C++];var te=o[C++],ie=o[C++];if(y){var L=_[x++];if(b+L>A){var ne=A-b;r.moveTo(v,g),r.lineTo(v+mathMin$8(ne,te),g),ne-=te,ne>0&&r.lineTo(v+te,g+mathMin$8(ne,ie)),ne-=ie,ne>0&&r.lineTo(v+mathMax$8(te-ne,0),g+ie),ne-=te,ne>0&&r.lineTo(v,g+mathMax$8(ie-ne,0));break e}b+=L}r.rect(v,g,te,ie);break;case CMD$4.Z:if(y){var L=_[x++];if(b+L>A){var O=(A-b)/L;r.lineTo(f*(1-O)+c*O,p*(1-O)+d*O);break e}b+=L}r.closePath(),f=c,p=d}}},n.prototype.clone=function(){var r=new n,a=this.data;return r.data=a.slice?a.slice():Array.prototype.slice.call(a),r._len=this._len,r},n.CMD=CMD$4,n.initDefaultProps=function(){var r=n.prototype;r._saveData=!0,r._ux=0,r._uy=0,r._pendingPtDist=0,r._version=0}(),n}();function containStroke$4(n,r,a,o,s,l,u){if(s===0)return!1;var c=s,d=0,f=n;if(u>r+c&&u>o+c||u<r-c&&u<o-c||l>n+c&&l>a+c||l<n-c&&l<a-c)return!1;if(n!==a)d=(r-o)/(n-a),f=(n*o-a*r)/(n-a);else return Math.abs(l-n)<=c/2;var p=d*l-u+f,v=p*p/(d*d+1);return v<=c/2*c/2}function containStroke$3(n,r,a,o,s,l,u,c,d,f,p){if(d===0)return!1;var v=d;if(p>r+v&&p>o+v&&p>l+v&&p>c+v||p<r-v&&p<o-v&&p<l-v&&p<c-v||f>n+v&&f>a+v&&f>s+v&&f>u+v||f<n-v&&f<a-v&&f<s-v&&f<u-v)return!1;var g=cubicProjectPoint(n,r,a,o,s,l,u,c,f,p,null);return g<=v/2}function containStroke$2(n,r,a,o,s,l,u,c,d){if(u===0)return!1;var f=u;if(d>r+f&&d>o+f&&d>l+f||d<r-f&&d<o-f&&d<l-f||c>n+f&&c>a+f&&c>s+f||c<n-f&&c<a-f&&c<s-f)return!1;var p=quadraticProjectPoint(n,r,a,o,s,l,c,d,null);return p<=f/2}var PI2$6=Math.PI*2;function normalizeRadian(n){return n%=PI2$6,n<0&&(n+=PI2$6),n}var PI2$5=Math.PI*2;function containStroke$1(n,r,a,o,s,l,u,c,d){if(u===0)return!1;var f=u;c-=n,d-=r;var p=Math.sqrt(c*c+d*d);if(p-f>a||p+f<a)return!1;if(Math.abs(o-s)%PI2$5<1e-4)return!0;if(l){var v=o;o=normalizeRadian(s),s=normalizeRadian(v)}else o=normalizeRadian(o),s=normalizeRadian(s);o>s&&(s+=PI2$5);var g=Math.atan2(d,c);return g<0&&(g+=PI2$5),g>=o&&g<=s||g+PI2$5>=o&&g+PI2$5<=s}function windingLine(n,r,a,o,s,l){if(l>r&&l>o||l<r&&l<o||o===r)return 0;var u=(l-r)/(o-r),c=o<r?1:-1;(u===1||u===0)&&(c=o<r?.5:-.5);var d=u*(a-n)+n;return d===s?1/0:d>s?c:0}var CMD$3=PathProxy.CMD,PI2$4=Math.PI*2,EPSILON$1=1e-4;function isAroundEqual$1(n,r){return Math.abs(n-r)<EPSILON$1}var roots=[-1,-1,-1],extrema=[-1,-1];function swapExtrema(){var n=extrema[0];extrema[0]=extrema[1],extrema[1]=n}function windingCubic(n,r,a,o,s,l,u,c,d,f){if(f>r&&f>o&&f>l&&f>c||f<r&&f<o&&f<l&&f<c)return 0;var p=cubicRootAt(r,o,l,c,f,roots);if(p===0)return 0;for(var v=0,g=-1,y=void 0,_=void 0,S=0;S<p;S++){var b=roots[S],x=b===0||b===1?.5:1,A=cubicAt(n,a,s,u,b);A<d||(g<0&&(g=cubicExtrema(r,o,l,c,extrema),extrema[1]<extrema[0]&&g>1&&swapExtrema(),y=cubicAt(r,o,l,c,extrema[0]),g>1&&(_=cubicAt(r,o,l,c,extrema[1]))),g===2?b<extrema[0]?v+=y<r?x:-x:b<extrema[1]?v+=_<y?x:-x:v+=c<_?x:-x:b<extrema[0]?v+=y<r?x:-x:v+=c<y?x:-x)}return v}function windingQuadratic(n,r,a,o,s,l,u,c){if(c>r&&c>o&&c>l||c<r&&c<o&&c<l)return 0;var d=quadraticRootAt(r,o,l,c,roots);if(d===0)return 0;var f=quadraticExtremum(r,o,l);if(f>=0&&f<=1){for(var p=0,v=quadraticAt$1(r,o,l,f),g=0;g<d;g++){var y=roots[g]===0||roots[g]===1?.5:1,_=quadraticAt$1(n,a,s,roots[g]);_<u||(roots[g]<f?p+=v<r?y:-y:p+=l<v?y:-y)}return p}else{var y=roots[0]===0||roots[0]===1?.5:1,_=quadraticAt$1(n,a,s,roots[0]);return _<u?0:l<r?y:-y}}function windingArc(n,r,a,o,s,l,u,c){if(c-=r,c>a||c<-a)return 0;var d=Math.sqrt(a*a-c*c);roots[0]=-d,roots[1]=d;var f=Math.abs(o-s);if(f<1e-4)return 0;if(f>=PI2$4-1e-4){o=0,s=PI2$4;var p=l?1:-1;return u>=roots[0]+n&&u<=roots[1]+n?p:0}if(o>s){var v=o;o=s,s=v}o<0&&(o+=PI2$4,s+=PI2$4);for(var g=0,y=0;y<2;y++){var _=roots[y];if(_+n>u){var S=Math.atan2(c,_),p=l?1:-1;S<0&&(S=PI2$4+S),(S>=o&&S<=s||S+PI2$4>=o&&S+PI2$4<=s)&&(S>Math.PI/2&&S<Math.PI*1.5&&(p=-p),g+=p)}}return g}function containPath(n,r,a,o,s){for(var l=n.data,u=n.len(),c=0,d=0,f=0,p=0,v=0,g,y,_=0;_<u;){var S=l[_++],b=_===1;switch(S===CMD$3.M&&_>1&&(a||(c+=windingLine(d,f,p,v,o,s))),b&&(d=l[_],f=l[_+1],p=d,v=f),S){case CMD$3.M:p=l[_++],v=l[_++],d=p,f=v;break;case CMD$3.L:if(a){if(containStroke$4(d,f,l[_],l[_+1],r,o,s))return!0}else c+=windingLine(d,f,l[_],l[_+1],o,s)||0;d=l[_++],f=l[_++];break;case CMD$3.C:if(a){if(containStroke$3(d,f,l[_++],l[_++],l[_++],l[_++],l[_],l[_+1],r,o,s))return!0}else c+=windingCubic(d,f,l[_++],l[_++],l[_++],l[_++],l[_],l[_+1],o,s)||0;d=l[_++],f=l[_++];break;case CMD$3.Q:if(a){if(containStroke$2(d,f,l[_++],l[_++],l[_],l[_+1],r,o,s))return!0}else c+=windingQuadratic(d,f,l[_++],l[_++],l[_],l[_+1],o,s)||0;d=l[_++],f=l[_++];break;case CMD$3.A:var x=l[_++],A=l[_++],w=l[_++],E=l[_++],D=l[_++],C=l[_++];_+=1;var $=!!(1-l[_++]);g=Math.cos(D)*w+x,y=Math.sin(D)*E+A,b?(p=g,v=y):c+=windingLine(d,f,g,y,o,s);var P=(o-x)*E/w+x;if(a){if(containStroke$1(x,A,E,D,D+C,$,r,P,s))return!0}else c+=windingArc(x,A,E,D,D+C,$,P,s);d=Math.cos(D+C)*w+x,f=Math.sin(D+C)*E+A;break;case CMD$3.R:p=d=l[_++],v=f=l[_++];var M=l[_++],I=l[_++];if(g=p+M,y=v+I,a){if(containStroke$4(p,v,g,v,r,o,s)||containStroke$4(g,v,g,y,r,o,s)||containStroke$4(g,y,p,y,r,o,s)||containStroke$4(p,y,p,v,r,o,s))return!0}else c+=windingLine(g,v,g,y,o,s),c+=windingLine(p,y,p,v,o,s);break;case CMD$3.Z:if(a){if(containStroke$4(d,f,p,v,r,o,s))return!0}else c+=windingLine(d,f,p,v,o,s);d=p,f=v;break}}return!a&&!isAroundEqual$1(f,v)&&(c+=windingLine(d,f,p,v,o,s)||0),c!==0}function contain$2(n,r,a){return containPath(n,0,!1,r,a)}function containStroke(n,r,a,o){return containPath(n,r,!0,a,o)}var DEFAULT_PATH_STYLE=defaults$2({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$2({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(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.update=function(){var a=this;n.prototype.update.call(this);var o=this.style;if(o.decal){var s=this._decalEl=this._decalEl||new r;s.buildPath===r.prototype.buildPath&&(s.buildPath=function(d){a.buildPath(d,a.shape)}),s.silent=!0;var l=s.style;for(var u in o)l[u]!==o[u]&&(l[u]=o[u]);l.fill=o.fill?o.decal:null,l.decal=null,l.shadowColor=null,o.strokeFirst&&(l.stroke=null);for(var c=0;c<pathCopyParams.length;++c)s[pathCopyParams[c]]=this[pathCopyParams[c]];s.__dirty|=REDRAW_BIT}else this._decalEl&&(this._decalEl=null)},r.prototype.getDecalElement=function(){return this._decalEl},r.prototype._init=function(a){var o=keys(a);this.shape=this.getDefaultShape();var s=this.getDefaultStyle();s&&this.useStyle(s);for(var l=0;l<o.length;l++){var u=o[l],c=a[u];u==="style"?this.style?extend$2(this.style,c):this.useStyle(c):u==="shape"?extend$2(this.shape,c):n.prototype.attrKV.call(this,u,c)}this.style||this.useStyle({})},r.prototype.getDefaultStyle=function(){return null},r.prototype.getDefaultShape=function(){return{}},r.prototype.canBeInsideText=function(){return this.hasFill()},r.prototype.getInsideTextFill=function(){var a=this.style.fill;if(a!=="none"){if(isString(a)){var o=lum(a,0);return o>.5?DARK_LABEL_COLOR:o>.2?LIGHTER_LABEL_COLOR:LIGHT_LABEL_COLOR}else if(a)return LIGHT_LABEL_COLOR}return DARK_LABEL_COLOR},r.prototype.getInsideTextStroke=function(a){var o=this.style.fill;if(isString(o)){var s=this.__zr,l=!!(s&&s.isDarkMode()),u=lum(a,0)<DARK_MODE_THRESHOLD;if(l===u)return o}},r.prototype.buildPath=function(a,o,s){},r.prototype.pathUpdated=function(){this.__dirty&=~SHAPE_CHANGED_BIT},r.prototype.getUpdatedPathProxy=function(a){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,a),this.path},r.prototype.createPathProxy=function(){this.path=new PathProxy(!1)},r.prototype.hasStroke=function(){var a=this.style,o=a.stroke;return!(o==null||o==="none"||!(a.lineWidth>0))},r.prototype.hasFill=function(){var a=this.style,o=a.fill;return o!=null&&o!=="none"},r.prototype.getBoundingRect=function(){var a=this._rect,o=this.style,s=!a;if(s){var l=!1;this.path||(l=!0,this.createPathProxy());var u=this.path;(l||this.__dirty&SHAPE_CHANGED_BIT)&&(u.beginPath(),this.buildPath(u,this.shape,!1),this.pathUpdated()),a=u.getBoundingRect()}if(this._rect=a,this.hasStroke()&&this.path&&this.path.len()>0){var c=this._rectStroke||(this._rectStroke=a.clone());if(this.__dirty||s){c.copy(a);var d=o.strokeNoScale?this.getLineScale():1,f=o.lineWidth;if(!this.hasFill()){var p=this.strokeContainThreshold;f=Math.max(f,p==null?4:p)}d>1e-10&&(c.width+=f/d,c.height+=f/d,c.x-=f/d/2,c.y-=f/d/2)}return c}return a},r.prototype.contain=function(a,o){var s=this.transformCoordToLocal(a,o),l=this.getBoundingRect(),u=this.style;if(a=s[0],o=s[1],l.contain(a,o)){var c=this.path;if(this.hasStroke()){var d=u.lineWidth,f=u.strokeNoScale?this.getLineScale():1;if(f>1e-10&&(this.hasFill()||(d=Math.max(d,this.strokeContainThreshold)),containStroke(c,d/f,a,o)))return!0}if(this.hasFill())return contain$2(c,a,o)}return!1},r.prototype.dirtyShape=function(){this.__dirty|=SHAPE_CHANGED_BIT,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},r.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},r.prototype.animateShape=function(a){return this.animate("shape",a)},r.prototype.updateDuringAnimation=function(a){a==="style"?this.dirtyStyle():a==="shape"?this.dirtyShape():this.markRedraw()},r.prototype.attrKV=function(a,o){a==="shape"?this.setShape(o):n.prototype.attrKV.call(this,a,o)},r.prototype.setShape=function(a,o){var s=this.shape;return s||(s=this.shape={}),typeof a=="string"?s[a]=o:extend$2(s,a),this.dirtyShape(),this},r.prototype.shapeChanged=function(){return!!(this.__dirty&SHAPE_CHANGED_BIT)},r.prototype.createStyle=function(a){return createObject(DEFAULT_PATH_STYLE,a)},r.prototype._innerSaveToNormal=function(a){n.prototype._innerSaveToNormal.call(this,a);var o=this._normalState;a.shape&&!o.shape&&(o.shape=extend$2({},this.shape))},r.prototype._applyStateObj=function(a,o,s,l,u,c){n.prototype._applyStateObj.call(this,a,o,s,l,u,c);var d=!(o&&l),f;if(o&&o.shape?u?l?f=o.shape:(f=extend$2({},s.shape),extend$2(f,o.shape)):(f=extend$2({},l?this.shape:s.shape),extend$2(f,o.shape)):d&&(f=s.shape),f)if(u){this.shape=extend$2({},this.shape);for(var p={},v=keys(f),g=0;g<v.length;g++){var y=v[g];typeof f[y]=="object"?this.shape[y]=f[y]:p[y]=f[y]}this._transitionState(a,{shape:p},c)}else this.shape=f,this.dirtyShape()},r.prototype._mergeStates=function(a){for(var o=n.prototype._mergeStates.call(this,a),s,l=0;l<a.length;l++){var u=a[l];u.shape&&(s=s||{},this._mergeStyle(s,u.shape))}return s&&(o.shape=s),o},r.prototype.getAnimationStyleProps=function(){return DEFAULT_PATH_ANIMATION_PROPS},r.prototype.isZeroArea=function(){return!1},r.extend=function(a){var o=function(l){__extends(u,l);function u(c){var d=l.call(this,c)||this;return a.init&&a.init.call(d,c),d}return u.prototype.getDefaultStyle=function(){return clone$6(a.style)},u.prototype.getDefaultShape=function(){return clone$6(a.shape)},u}(r);for(var s in a)typeof a[s]=="function"&&(o.prototype[s]=a[s]);return o},r.initDefaultProps=function(){var a=r.prototype;a.type="path",a.strokeContainThreshold=5,a.segmentIgnoreThreshold=0,a.subPixelOptimize=!1,a.autoBatch=!1,a.__dirty=REDRAW_BIT|STYLE_CHANGED_BIT|SHAPE_CHANGED_BIT}(),r}(Displayable),DEFAULT_TSPAN_STYLE=defaults$2({strokeFirst:!0,font:DEFAULT_FONT,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},DEFAULT_PATH_STYLE),TSpan=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.hasStroke=function(){var a=this.style,o=a.stroke;return o!=null&&o!=="none"&&a.lineWidth>0},r.prototype.hasFill=function(){var a=this.style,o=a.fill;return o!=null&&o!=="none"},r.prototype.createStyle=function(a){return createObject(DEFAULT_TSPAN_STYLE,a)},r.prototype.setBoundingRect=function(a){this._rect=a},r.prototype.getBoundingRect=function(){var a=this.style;if(!this._rect){var o=a.text;o!=null?o+="":o="";var s=getBoundingRect(o,a.font,a.textAlign,a.textBaseline);if(s.x+=a.x||0,s.y+=a.y||0,this.hasStroke()){var l=a.lineWidth;s.x-=l/2,s.y-=l/2,s.width+=l,s.height+=l}this._rect=s}return this._rect},r.initDefaultProps=function(){var a=r.prototype;a.dirtyRectTolerance=10}(),r}(Displayable);TSpan.prototype.type="tspan";var DEFAULT_IMAGE_STYLE=defaults$2({x:0,y:0},DEFAULT_COMMON_STYLE),DEFAULT_IMAGE_ANIMATION_PROPS={style:defaults$2({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},DEFAULT_COMMON_ANIMATION_PROPS.style)};function isImageLike$1(n){return!!(n&&typeof n!="string"&&n.width&&n.height)}var ZRImage=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.createStyle=function(a){return createObject(DEFAULT_IMAGE_STYLE,a)},r.prototype._getSize=function(a){var o=this.style,s=o[a];if(s!=null)return s;var l=isImageLike$1(o.image)?o.image:this.__image;if(!l)return 0;var u=a==="width"?"height":"width",c=o[u];return c==null?l[a]:l[a]/l[u]*c},r.prototype.getWidth=function(){return this._getSize("width")},r.prototype.getHeight=function(){return this._getSize("height")},r.prototype.getAnimationStyleProps=function(){return DEFAULT_IMAGE_ANIMATION_PROPS},r.prototype.getBoundingRect=function(){var a=this.style;return this._rect||(this._rect=new BoundingRect(a.x||0,a.y||0,this.getWidth(),this.getHeight())),this._rect},r}(Displayable);ZRImage.prototype.type="image";function buildPath$2(n,r){var a=r.x,o=r.y,s=r.width,l=r.height,u=r.r,c,d,f,p;s<0&&(a=a+s,s=-s),l<0&&(o=o+l,l=-l),typeof u=="number"?c=d=f=p=u:u instanceof Array?u.length===1?c=d=f=p=u[0]:u.length===2?(c=f=u[0],d=p=u[1]):u.length===3?(c=u[0],d=p=u[1],f=u[2]):(c=u[0],d=u[1],f=u[2],p=u[3]):c=d=f=p=0;var v;c+d>s&&(v=c+d,c*=s/v,d*=s/v),f+p>s&&(v=f+p,f*=s/v,p*=s/v),d+f>l&&(v=d+f,d*=l/v,f*=l/v),c+p>l&&(v=c+p,c*=l/v,p*=l/v),n.moveTo(a+c,o),n.lineTo(a+s-d,o),d!==0&&n.arc(a+s-d,o+d,d,-Math.PI/2,0),n.lineTo(a+s,o+l-f),f!==0&&n.arc(a+s-f,o+l-f,f,0,Math.PI/2),n.lineTo(a+p,o+l),p!==0&&n.arc(a+p,o+l-p,p,Math.PI/2,Math.PI),n.lineTo(a,o+c),c!==0&&n.arc(a+c,o+c,c,Math.PI,Math.PI*1.5)}var round$2=Math.round;function subPixelOptimizeLine$1(n,r,a){if(r){var o=r.x1,s=r.x2,l=r.y1,u=r.y2;n.x1=o,n.x2=s,n.y1=l,n.y2=u;var c=a&&a.lineWidth;return c&&(round$2(o*2)===round$2(s*2)&&(n.x1=n.x2=subPixelOptimize$1(o,c,!0)),round$2(l*2)===round$2(u*2)&&(n.y1=n.y2=subPixelOptimize$1(l,c,!0))),n}}function subPixelOptimizeRect$1(n,r,a){if(r){var o=r.x,s=r.y,l=r.width,u=r.height;n.x=o,n.y=s,n.width=l,n.height=u;var c=a&&a.lineWidth;return c&&(n.x=subPixelOptimize$1(o,c,!0),n.y=subPixelOptimize$1(s,c,!0),n.width=Math.max(subPixelOptimize$1(o+l,c,!1)-n.x,l===0?0:1),n.height=Math.max(subPixelOptimize$1(s+u,c,!1)-n.y,u===0?0:1)),n}}function subPixelOptimize$1(n,r,a){if(!r)return n;var o=round$2(n*2);return(o+round$2(r))%2===0?o/2:(o+(a?1:-1))/2}var RectShape=function(){function n(){this.x=0,this.y=0,this.width=0,this.height=0}return n}(),subPixelOptimizeOutputShape$1={},Rect$2=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultShape=function(){return new RectShape},r.prototype.buildPath=function(a,o){var s,l,u,c;if(this.subPixelOptimize){var d=subPixelOptimizeRect$1(subPixelOptimizeOutputShape$1,o,this.style);s=d.x,l=d.y,u=d.width,c=d.height,d.r=o.r,o=d}else s=o.x,l=o.y,u=o.width,c=o.height;o.r?buildPath$2(a,o):a.rect(s,l,u,c)},r.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},r}(Path);Rect$2.prototype.type="rect";var DEFAULT_RICH_TEXT_COLOR={fill:"#000"},DEFAULT_STROKE_LINE_WIDTH=2,DEFAULT_TEXT_ANIMATION_PROPS={style:defaults$2({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(n){__extends(r,n);function r(a){var o=n.call(this)||this;return o.type="text",o._children=[],o._defaultStyle=DEFAULT_RICH_TEXT_COLOR,o.attr(a),o}return r.prototype.childrenRef=function(){return this._children},r.prototype.update=function(){n.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var a=0;a<this._children.length;a++){var o=this._children[a];o.zlevel=this.zlevel,o.z=this.z,o.z2=this.z2,o.culling=this.culling,o.cursor=this.cursor,o.invisible=this.invisible}},r.prototype.updateTransform=function(){var a=this.innerTransformable;a?(a.updateTransform(),a.transform&&(this.transform=a.transform)):n.prototype.updateTransform.call(this)},r.prototype.getLocalTransform=function(a){var o=this.innerTransformable;return o?o.getLocalTransform(a):n.prototype.getLocalTransform.call(this,a)},r.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),n.prototype.getComputedTransform.call(this)},r.prototype._updateSubTexts=function(){this._childCursor=0,normalizeTextStyle(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},r.prototype.addSelfToZr=function(a){n.prototype.addSelfToZr.call(this,a);for(var o=0;o<this._children.length;o++)this._children[o].__zr=a},r.prototype.removeSelfFromZr=function(a){n.prototype.removeSelfFromZr.call(this,a);for(var o=0;o<this._children.length;o++)this._children[o].__zr=null},r.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var a=new BoundingRect(0,0,0,0),o=this._children,s=[],l=null,u=0;u<o.length;u++){var c=o[u],d=c.getBoundingRect(),f=c.getLocalTransform(s);f?(a.copy(d),a.applyTransform(f),l=l||a.clone(),l.union(a)):(l=l||d.clone(),l.union(d))}this._rect=l||a}return this._rect},r.prototype.setDefaultTextStyle=function(a){this._defaultStyle=a||DEFAULT_RICH_TEXT_COLOR},r.prototype.setTextContent=function(a){},r.prototype._mergeStyle=function(a,o){if(!o)return a;var s=o.rich,l=a.rich||s&&{};return extend$2(a,o),s&&l?(this._mergeRich(l,s),a.rich=l):l&&(a.rich=l),a},r.prototype._mergeRich=function(a,o){for(var s=keys(o),l=0;l<s.length;l++){var u=s[l];a[u]=a[u]||{},extend$2(a[u],o[u])}},r.prototype.getAnimationStyleProps=function(){return DEFAULT_TEXT_ANIMATION_PROPS},r.prototype._getOrCreateChild=function(a){var o=this._children[this._childCursor];return(!o||!(o instanceof a))&&(o=new a),this._children[this._childCursor++]=o,o.__zr=this.__zr,o.parent=this,o},r.prototype._updatePlainTexts=function(){var a=this.style,o=a.font||DEFAULT_FONT,s=a.padding,l=getStyleText(a),u=parsePlainText(l,a),c=needDrawBackground(a),d=!!a.backgroundColor,f=u.outerHeight,p=u.outerWidth,v=u.contentWidth,g=u.lines,y=u.lineHeight,_=this._defaultStyle;this.isTruncated=!!u.isTruncated;var S=a.x||0,b=a.y||0,x=a.align||_.align||"left",A=a.verticalAlign||_.verticalAlign||"top",w=S,E=adjustTextY(b,u.contentHeight,A);if(c||s){var D=adjustTextX(S,p,x),C=adjustTextY(b,f,A);c&&this._renderBackground(a,a,D,C,p,f)}E+=y/2,s&&(w=getTextXForPadding(S,x,s),A==="top"?E+=s[0]:A==="bottom"&&(E-=s[2]));for(var $=0,P=!1,M=getFill("fill"in a?a.fill:(P=!0,_.fill)),I=getStroke("stroke"in a?a.stroke:!d&&(!_.autoStroke||P)?($=DEFAULT_STROKE_LINE_WIDTH,_.stroke):null),L=a.textShadowBlur>0,O=a.width!=null&&(a.overflow==="truncate"||a.overflow==="break"||a.overflow==="breakAll"),R=u.calculatedLineHeight,N=0;N<g.length;N++){var V=this._getOrCreateChild(TSpan),F=V.createStyle();V.useStyle(F),F.text=g[N],F.x=w,F.y=E,x&&(F.textAlign=x),F.textBaseline="middle",F.opacity=a.opacity,F.strokeFirst=!0,L&&(F.shadowBlur=a.textShadowBlur||0,F.shadowColor=a.textShadowColor||"transparent",F.shadowOffsetX=a.textShadowOffsetX||0,F.shadowOffsetY=a.textShadowOffsetY||0),F.stroke=I,F.fill=M,I&&(F.lineWidth=a.lineWidth||$,F.lineDash=a.lineDash,F.lineDashOffset=a.lineDashOffset||0),F.font=o,setSeparateFont(F,a),E+=y,O&&V.setBoundingRect(new BoundingRect(adjustTextX(F.x,v,F.textAlign),adjustTextY(F.y,R,F.textBaseline),v,R))}},r.prototype._updateRichTexts=function(){var a=this.style,o=getStyleText(a),s=parseRichText(o,a),l=s.width,u=s.outerWidth,c=s.outerHeight,d=a.padding,f=a.x||0,p=a.y||0,v=this._defaultStyle,g=a.align||v.align,y=a.verticalAlign||v.verticalAlign;this.isTruncated=!!s.isTruncated;var _=adjustTextX(f,u,g),S=adjustTextY(p,c,y),b=_,x=S;d&&(b+=d[3],x+=d[0]);var A=b+l;needDrawBackground(a)&&this._renderBackground(a,a,_,S,u,c);for(var w=!!a.backgroundColor,E=0;E<s.lines.length;E++){for(var D=s.lines[E],C=D.tokens,$=C.length,P=D.lineHeight,M=D.width,I=0,L=b,O=A,R=$-1,N=void 0;I<$&&(N=C[I],!N.align||N.align==="left");)this._placeToken(N,a,P,x,L,"left",w),M-=N.width,L+=N.width,I++;for(;R>=0&&(N=C[R],N.align==="right");)this._placeToken(N,a,P,x,O,"right",w),M-=N.width,O-=N.width,R--;for(L+=(l-(L-b)-(A-O)-M)/2;I<=R;)N=C[I],this._placeToken(N,a,P,x,L+N.width/2,"center",w),L+=N.width,I++;x+=P}},r.prototype._placeToken=function(a,o,s,l,u,c,d){var f=o.rich[a.styleName]||{};f.text=a.text;var p=a.verticalAlign,v=l+s/2;p==="top"?v=l+a.height/2:p==="bottom"&&(v=l+s-a.height/2);var g=!a.isLineHolder&&needDrawBackground(f);g&&this._renderBackground(f,o,c==="right"?u-a.width:c==="center"?u-a.width/2:u,v-a.height/2,a.width,a.height);var y=!!f.backgroundColor,_=a.textPadding;_&&(u=getTextXForPadding(u,c,_),v-=a.height/2-_[0]-a.innerHeight/2);var S=this._getOrCreateChild(TSpan),b=S.createStyle();S.useStyle(b);var x=this._defaultStyle,A=!1,w=0,E=getFill("fill"in f?f.fill:"fill"in o?o.fill:(A=!0,x.fill)),D=getStroke("stroke"in f?f.stroke:"stroke"in o?o.stroke:!y&&!d&&(!x.autoStroke||A)?(w=DEFAULT_STROKE_LINE_WIDTH,x.stroke):null),C=f.textShadowBlur>0||o.textShadowBlur>0;b.text=a.text,b.x=u,b.y=v,C&&(b.shadowBlur=f.textShadowBlur||o.textShadowBlur||0,b.shadowColor=f.textShadowColor||o.textShadowColor||"transparent",b.shadowOffsetX=f.textShadowOffsetX||o.textShadowOffsetX||0,b.shadowOffsetY=f.textShadowOffsetY||o.textShadowOffsetY||0),b.textAlign=c,b.textBaseline="middle",b.font=a.font||DEFAULT_FONT,b.opacity=retrieve3(f.opacity,o.opacity,1),setSeparateFont(b,f),D&&(b.lineWidth=retrieve3(f.lineWidth,o.lineWidth,w),b.lineDash=retrieve2(f.lineDash,o.lineDash),b.lineDashOffset=o.lineDashOffset||0,b.stroke=D),E&&(b.fill=E);var $=a.contentWidth,P=a.contentHeight;S.setBoundingRect(new BoundingRect(adjustTextX(b.x,$,b.textAlign),adjustTextY(b.y,P,b.textBaseline),$,P))},r.prototype._renderBackground=function(a,o,s,l,u,c){var d=a.backgroundColor,f=a.borderWidth,p=a.borderColor,v=d&&d.image,g=d&&!v,y=a.borderRadius,_=this,S,b;if(g||a.lineHeight||f&&p){S=this._getOrCreateChild(Rect$2),S.useStyle(S.createStyle()),S.style.fill=null;var x=S.shape;x.x=s,x.y=l,x.width=u,x.height=c,x.r=y,S.dirtyShape()}if(g){var A=S.style;A.fill=d||null,A.fillOpacity=retrieve2(a.fillOpacity,1)}else if(v){b=this._getOrCreateChild(ZRImage),b.onload=function(){_.dirtyStyle()};var w=b.style;w.image=d.image,w.x=s,w.y=l,w.width=u,w.height=c}if(f&&p){var A=S.style;A.lineWidth=f,A.stroke=p,A.strokeOpacity=retrieve2(a.strokeOpacity,1),A.lineDash=a.borderDash,A.lineDashOffset=a.borderDashOffset||0,S.strokeContainThreshold=0,S.hasFill()&&S.hasStroke()&&(A.strokeFirst=!0,A.lineWidth*=2)}var E=(S||b).style;E.shadowBlur=a.shadowBlur||0,E.shadowColor=a.shadowColor||"transparent",E.shadowOffsetX=a.shadowOffsetX||0,E.shadowOffsetY=a.shadowOffsetY||0,E.opacity=retrieve3(a.opacity,o.opacity,1)},r.makeFont=function(a){var o="";return hasSeparateFont(a)&&(o=[a.fontStyle,a.fontWeight,parseFontSize(a.fontSize),a.fontFamily||"sans-serif"].join(" ")),o&&trim$1(o)||a.textFont||a.font},r}(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(n){return typeof n=="string"&&(n.indexOf("px")!==-1||n.indexOf("rem")!==-1||n.indexOf("em")!==-1)?n:isNaN(+n)?DEFAULT_FONT_SIZE+"px":n+"px"}function setSeparateFont(n,r){for(var a=0;a<FONT_PARTS.length;a++){var o=FONT_PARTS[a],s=r[o];s!=null&&(n[o]=s)}}function hasSeparateFont(n){return n.fontSize!=null||n.fontFamily||n.fontWeight}function normalizeTextStyle(n){return normalizeStyle(n),each$f(n.rich,normalizeStyle),n}function normalizeStyle(n){if(n){n.font=ZRText.makeFont(n);var r=n.align;r==="middle"&&(r="center"),n.align=r==null||VALID_TEXT_ALIGN[r]?r:"left";var a=n.verticalAlign;a==="center"&&(a="middle"),n.verticalAlign=a==null||VALID_TEXT_VERTICAL_ALIGN[a]?a:"top";var o=n.padding;o&&(n.padding=normalizeCssArray$1(n.padding))}}function getStroke(n,r){return n==null||r<=0||n==="transparent"||n==="none"?null:n.image||n.colorStops?"#000":n}function getFill(n){return n==null||n==="none"?null:n.image||n.colorStops?"#000":n}function getTextXForPadding(n,r,a){return r==="right"?n-a[1]:r==="center"?n+a[3]/2-a[1]/2:n+a[3]}function getStyleText(n){var r=n.text;return r!=null&&(r+=""),r}function needDrawBackground(n){return!!(n.backgroundColor||n.lineHeight||n.borderWidth&&n.borderColor)}var getECData=makeInner(),setCommonECData=function(n,r,a,o){if(o){var s=getECData(o);s.dataIndex=a,s.dataType=r,s.seriesIndex=n,s.ssrType="chart",o.type==="group"&&o.traverse(function(l){var u=getECData(l);u.seriesIndex=n,u.dataIndex=a,u.dataType=r,u.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";function hasFillOrStroke(n){return n!=null&&n!=="none"}function doChangeHoverState(n,r,a){n.onHoverStateChange&&(n.hoverState||0)!==a&&n.onHoverStateChange(r),n.hoverState=a}function singleEnterEmphasis(n){doChangeHoverState(n,"emphasis",HOVER_STATE_EMPHASIS)}function singleLeaveEmphasis(n){n.hoverState===HOVER_STATE_EMPHASIS&&doChangeHoverState(n,"normal",HOVER_STATE_NORMAL)}function singleEnterBlur(n){doChangeHoverState(n,"blur",HOVER_STATE_BLUR)}function singleLeaveBlur(n){n.hoverState===HOVER_STATE_BLUR&&doChangeHoverState(n,"normal",HOVER_STATE_NORMAL)}function singleEnterSelect(n){n.selected=!0}function singleLeaveSelect(n){n.selected=!1}function updateElementState(n,r,a){r(n,a)}function traverseUpdateState(n,r,a){updateElementState(n,r,a),n.isGroup&&n.traverse(function(o){updateElementState(o,r,a)})}function setStatesFlag(n,r){switch(r){case"emphasis":n.hoverState=HOVER_STATE_EMPHASIS;break;case"normal":n.hoverState=HOVER_STATE_NORMAL;break;case"blur":n.hoverState=HOVER_STATE_BLUR;break;case"select":n.selected=!0}}function getFromStateStyle(n,r,a,o){for(var s=n.style,l={},u=0;u<r.length;u++){var c=r[u],d=s[c];l[c]=d==null?o&&o[c]:d}for(var u=0;u<n.animators.length;u++){var f=n.animators[u];f.__fromStateTransition&&f.__fromStateTransition.indexOf(a)<0&&f.targetName==="style"&&f.saveTo(l,r)}return l}function createEmphasisDefaultState(n,r,a,o){var s=a&&indexOf(a,"select")>=0,l=!1;if(n instanceof Path){var u=getSavedStates(n),c=s&&u.selectFill||u.normalFill,d=s&&u.selectStroke||u.normalStroke;if(hasFillOrStroke(c)||hasFillOrStroke(d)){o=o||{};var f=o.style||{};f.fill==="inherit"?(l=!0,o=extend$2({},o),f=extend$2({},f),f.fill=c):!hasFillOrStroke(f.fill)&&hasFillOrStroke(c)?(l=!0,o=extend$2({},o),f=extend$2({},f),f.fill=liftColor(c)):!hasFillOrStroke(f.stroke)&&hasFillOrStroke(d)&&(l||(o=extend$2({},o),f=extend$2({},f)),f.stroke=liftColor(d)),o.style=f}}if(o&&o.z2==null){l||(o=extend$2({},o));var p=n.z2EmphasisLift;o.z2=n.z2+(p!=null?p:Z2_EMPHASIS_LIFT)}return o}function createSelectDefaultState(n,r,a){if(a&&a.z2==null){a=extend$2({},a);var o=n.z2SelectLift;a.z2=n.z2+(o!=null?o:Z2_SELECT_LIFT)}return a}function createBlurDefaultState(n,r,a){var o=indexOf(n.currentStates,r)>=0,s=n.style.opacity,l=o?null:getFromStateStyle(n,["opacity"],r,{opacity:1});a=a||{};var u=a.style||{};return u.opacity==null&&(a=extend$2({},a),u=extend$2({opacity:o?s:l.opacity*.1},u),a.style=u),a}function elementStateProxy(n,r){var a=this.states[n];if(this.style){if(n==="emphasis")return createEmphasisDefaultState(this,n,r,a);if(n==="blur")return createBlurDefaultState(this,n,a);if(n==="select")return createSelectDefaultState(this,n,a)}return a}function setDefaultStateProxy(n){n.stateProxy=elementStateProxy;var r=n.getTextContent(),a=n.getTextGuideLine();r&&(r.stateProxy=elementStateProxy),a&&(a.stateProxy=elementStateProxy)}function enterEmphasisWhenMouseOver(n,r){!shouldSilent(n,r)&&!n.__highByOuter&&traverseUpdateState(n,singleEnterEmphasis)}function leaveEmphasisWhenMouseOut(n,r){!shouldSilent(n,r)&&!n.__highByOuter&&traverseUpdateState(n,singleLeaveEmphasis)}function enterEmphasis(n,r){n.__highByOuter|=1<<(r||0),traverseUpdateState(n,singleEnterEmphasis)}function leaveEmphasis(n,r){!(n.__highByOuter&=~(1<<(r||0)))&&traverseUpdateState(n,singleLeaveEmphasis)}function enterBlur(n){traverseUpdateState(n,singleEnterBlur)}function leaveBlur(n){traverseUpdateState(n,singleLeaveBlur)}function enterSelect(n){traverseUpdateState(n,singleEnterSelect)}function leaveSelect(n){traverseUpdateState(n,singleLeaveSelect)}function shouldSilent(n,r){return n.__highDownSilentOnTouch&&r.zrByTouch}function allLeaveBlur(n){var r=n.getModel(),a=[],o=[];r.eachComponent(function(s,l){var u=getComponentStates(l),c=s==="series",d=c?n.getViewOfSeriesModel(l):n.getViewOfComponentModel(l);!c&&o.push(d),u.isBlured&&(d.group.traverse(function(f){singleLeaveBlur(f)}),c&&a.push(l)),u.isBlured=!1}),each$f(o,function(s){s&&s.toggleBlurSeries&&s.toggleBlurSeries(a,!1,r)})}function blurSeries(n,r,a,o){var s=o.getModel();a=a||"coordinateSystem";function l(f,p){for(var v=0;v<p.length;v++){var g=f.getItemGraphicEl(p[v]);g&&leaveBlur(g)}}if(n!=null&&!(!r||r==="none")){var u=s.getSeriesByIndex(n),c=u.coordinateSystem;c&&c.master&&(c=c.master);var d=[];s.eachSeries(function(f){var p=u===f,v=f.coordinateSystem;v&&v.master&&(v=v.master);var g=v&&c?v===c:p;if(!(a==="series"&&!p||a==="coordinateSystem"&&!g||r==="series"&&p)){var y=o.getViewOfSeriesModel(f);if(y.group.traverse(function(b){b.__highByOuter&&p&&r==="self"||singleEnterBlur(b)}),isArrayLike(r))l(f.getData(),r);else if(isObject$3(r))for(var _=keys(r),S=0;S<_.length;S++)l(f.getData(_[S]),r[_[S]]);d.push(f),getComponentStates(f).isBlured=!0}}),s.eachComponent(function(f,p){if(f!=="series"){var v=o.getViewOfComponentModel(p);v&&v.toggleBlurSeries&&v.toggleBlurSeries(d,!0,s)}})}}function blurComponent(n,r,a){if(!(n==null||r==null)){var o=a.getModel().getComponent(n,r);if(o){getComponentStates(o).isBlured=!0;var s=a.getViewOfComponentModel(o);!s||!s.focusBlurEnabled||s.group.traverse(function(l){singleEnterBlur(l)})}}}function blurSeriesFromHighlightPayload(n,r,a){var o=n.seriesIndex,s=n.getData(r.dataType);if(s){var l=queryDataIndex(s,r);l=(isArray$1(l)?l[0]:l)||0;var u=s.getItemGraphicEl(l);if(!u)for(var c=s.count(),d=0;!u&&d<c;)u=s.getItemGraphicEl(d++);if(u){var f=getECData(u);blurSeries(o,f.focus,f.blurScope,a)}else{var p=n.get(["emphasis","focus"]),v=n.get(["emphasis","blurScope"]);p!=null&&blurSeries(o,p,v,a)}}}function findComponentHighDownDispatchers(n,r,a,o){var s={focusSelf:!1,dispatchers:null};if(n==null||n==="series"||r==null||a==null)return s;var l=o.getModel().getComponent(n,r);if(!l)return s;var u=o.getViewOfComponentModel(l);if(!u||!u.findHighDownDispatchers)return s;for(var c=u.findHighDownDispatchers(a),d,f=0;f<c.length;f++)if(getECData(c[f]).focus==="self"){d=!0;break}return{focusSelf:d,dispatchers:c}}function handleGlobalMouseOverForHighDown(n,r,a){var o=getECData(n),s=findComponentHighDownDispatchers(o.componentMainType,o.componentIndex,o.componentHighDownName,a),l=s.dispatchers,u=s.focusSelf;l?(u&&blurComponent(o.componentMainType,o.componentIndex,a),each$f(l,function(c){return enterEmphasisWhenMouseOver(c,r)})):(blurSeries(o.seriesIndex,o.focus,o.blurScope,a),o.focus==="self"&&blurComponent(o.componentMainType,o.componentIndex,a),enterEmphasisWhenMouseOver(n,r))}function handleGlobalMouseOutForHighDown(n,r,a){allLeaveBlur(a);var o=getECData(n),s=findComponentHighDownDispatchers(o.componentMainType,o.componentIndex,o.componentHighDownName,a).dispatchers;s?each$f(s,function(l){return leaveEmphasisWhenMouseOut(l,r)}):leaveEmphasisWhenMouseOut(n,r)}function toggleSelectionFromPayload(n,r,a){if(isSelectChangePayload(r)){var o=r.dataType,s=n.getData(o),l=queryDataIndex(s,r);isArray$1(l)||(l=[l]),n[r.type===TOGGLE_SELECT_ACTION_TYPE?"toggleSelect":r.type===SELECT_ACTION_TYPE?"select":"unselect"](l,o)}}function updateSeriesElementSelection(n){var r=n.getAllData();each$f(r,function(a){var o=a.data,s=a.type;o.eachItemGraphicEl(function(l,u){n.isSelected(u,s)?enterSelect(l):leaveSelect(l)})})}function getAllSelectedIndices(n){var r=[];return n.eachSeries(function(a){var o=a.getAllData();each$f(o,function(s){s.data;var l=s.type,u=a.getSelectedDataIndices();if(u.length>0){var c={dataIndex:u,seriesIndex:a.seriesIndex};l!=null&&(c.dataType=l),r.push(c)}})}),r}function enableHoverEmphasis(n,r,a){setAsHighDownDispatcher(n,!0),traverseUpdateState(n,setDefaultStateProxy),enableHoverFocus(n,r,a)}function disableHoverEmphasis(n){setAsHighDownDispatcher(n,!1)}function toggleHoverEmphasis(n,r,a,o){o?disableHoverEmphasis(n):enableHoverEmphasis(n,r,a)}function enableHoverFocus(n,r,a){var o=getECData(n);r!=null?(o.focus=r,o.blurScope=a):o.focus&&(o.focus=null)}var OTHER_STATES=["emphasis","blur","select"],defaultStyleGetterMap={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function setStatesStylesFromModel(n,r,a,o){a=a||"itemStyle";for(var s=0;s<OTHER_STATES.length;s++){var l=OTHER_STATES[s],u=r.getModel([l,a]),c=n.ensureState(l);c.style=o?o(u):u[defaultStyleGetterMap[a]]()}}function setAsHighDownDispatcher(n,r){var a=r===!1,o=n;n.highDownSilentOnTouch&&(o.__highDownSilentOnTouch=n.highDownSilentOnTouch),(!a||o.__highDownDispatcher)&&(o.__highByOuter=o.__highByOuter||0,o.__highDownDispatcher=!a)}function isHighDownDispatcher(n){return!!(n&&n.__highDownDispatcher)}function enableComponentHighDownFeatures(n,r,a){var o=getECData(n);o.componentMainType=r.mainType,o.componentIndex=r.componentIndex,o.componentHighDownName=a}function getHighlightDigit(n){var r=_highlightKeyMap[n];return r==null&&_highlightNextDigit<=32&&(r=_highlightKeyMap[n]=_highlightNextDigit++),r}function isSelectChangePayload(n){var r=n.type;return r===SELECT_ACTION_TYPE||r===UNSELECT_ACTION_TYPE||r===TOGGLE_SELECT_ACTION_TYPE}function isHighDownPayload(n){var r=n.type;return r===HIGHLIGHT_ACTION_TYPE||r===DOWNPLAY_ACTION_TYPE}function savePathStates(n){var r=getSavedStates(n);r.normalFill=n.style.fill,r.normalStroke=n.style.stroke;var a=n.states.select||{};r.selectFill=a.style&&a.style.fill||null,r.selectStroke=a.style&&a.style.stroke||null}var CMD$2=PathProxy.CMD,points$2=[[],[],[]],mathSqrt$2=Math.sqrt,mathAtan2=Math.atan2;function transformPath(n,r){if(r){var a=n.data,o=n.len(),s,l,u,c,d,f,p=CMD$2.M,v=CMD$2.C,g=CMD$2.L,y=CMD$2.R,_=CMD$2.A,S=CMD$2.Q;for(u=0,c=0;u<o;){switch(s=a[u++],c=u,l=0,s){case p:l=1;break;case g:l=1;break;case v:l=3;break;case S:l=2;break;case _:var b=r[4],x=r[5],A=mathSqrt$2(r[0]*r[0]+r[1]*r[1]),w=mathSqrt$2(r[2]*r[2]+r[3]*r[3]),E=mathAtan2(-r[1]/w,r[0]/A);a[u]*=A,a[u++]+=b,a[u]*=w,a[u++]+=x,a[u++]*=A,a[u++]*=w,a[u++]+=E,a[u++]+=E,u+=2,c=u;break;case y:f[0]=a[u++],f[1]=a[u++],applyTransform$1(f,f,r),a[c++]=f[0],a[c++]=f[1],f[0]+=a[u++],f[1]+=a[u++],applyTransform$1(f,f,r),a[c++]=f[0],a[c++]=f[1]}for(d=0;d<l;d++){var D=points$2[d];D[0]=a[u++],D[1]=a[u++],applyTransform$1(D,D,r),a[c++]=D[0],a[c++]=D[1]}}n.increaseVersion()}}var mathSqrt$1=Math.sqrt,mathSin$2=Math.sin,mathCos$2=Math.cos,PI$7=Math.PI;function vMag(n){return Math.sqrt(n[0]*n[0]+n[1]*n[1])}function vRatio(n,r){return(n[0]*r[0]+n[1]*r[1])/(vMag(n)*vMag(r))}function vAngle(n,r){return(n[0]*r[1]<n[1]*r[0]?-1:1)*Math.acos(vRatio(n,r))}function processArc(n,r,a,o,s,l,u,c,d,f,p){var v=d*(PI$7/180),g=mathCos$2(v)*(n-a)/2+mathSin$2(v)*(r-o)/2,y=-1*mathSin$2(v)*(n-a)/2+mathCos$2(v)*(r-o)/2,_=g*g/(u*u)+y*y/(c*c);_>1&&(u*=mathSqrt$1(_),c*=mathSqrt$1(_));var S=(s===l?-1:1)*mathSqrt$1((u*u*(c*c)-u*u*(y*y)-c*c*(g*g))/(u*u*(y*y)+c*c*(g*g)))||0,b=S*u*y/c,x=S*-c*g/u,A=(n+a)/2+mathCos$2(v)*b-mathSin$2(v)*x,w=(r+o)/2+mathSin$2(v)*b+mathCos$2(v)*x,E=vAngle([1,0],[(g-b)/u,(y-x)/c]),D=[(g-b)/u,(y-x)/c],C=[(-1*g-b)/u,(-1*y-x)/c],$=vAngle(D,C);if(vRatio(D,C)<=-1&&($=PI$7),vRatio(D,C)>=1&&($=0),$<0){var P=Math.round($/PI$7*1e6)/1e6;$=PI$7*2+P%2*PI$7}p.addData(f,A,w,u,c,E,$,v,l)}var commandReg=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,numberReg$1=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function createPathProxyFromString(n){var r=new PathProxy;if(!n)return r;var a=0,o=0,s=a,l=o,u,c=PathProxy.CMD,d=n.match(commandReg);if(!d)return r;for(var f=0;f<d.length;f++){for(var p=d[f],v=p.charAt(0),g=void 0,y=p.match(numberReg$1)||[],_=y.length,S=0;S<_;S++)y[S]=parseFloat(y[S]);for(var b=0;b<_;){var x=void 0,A=void 0,w=void 0,E=void 0,D=void 0,C=void 0,$=void 0,P=a,M=o,I=void 0,L=void 0;switch(v){case"l":a+=y[b++],o+=y[b++],g=c.L,r.addData(g,a,o);break;case"L":a=y[b++],o=y[b++],g=c.L,r.addData(g,a,o);break;case"m":a+=y[b++],o+=y[b++],g=c.M,r.addData(g,a,o),s=a,l=o,v="l";break;case"M":a=y[b++],o=y[b++],g=c.M,r.addData(g,a,o),s=a,l=o,v="L";break;case"h":a+=y[b++],g=c.L,r.addData(g,a,o);break;case"H":a=y[b++],g=c.L,r.addData(g,a,o);break;case"v":o+=y[b++],g=c.L,r.addData(g,a,o);break;case"V":o=y[b++],g=c.L,r.addData(g,a,o);break;case"C":g=c.C,r.addData(g,y[b++],y[b++],y[b++],y[b++],y[b++],y[b++]),a=y[b-2],o=y[b-1];break;case"c":g=c.C,r.addData(g,y[b++]+a,y[b++]+o,y[b++]+a,y[b++]+o,y[b++]+a,y[b++]+o),a+=y[b-2],o+=y[b-1];break;case"S":x=a,A=o,I=r.len(),L=r.data,u===c.C&&(x+=a-L[I-4],A+=o-L[I-3]),g=c.C,P=y[b++],M=y[b++],a=y[b++],o=y[b++],r.addData(g,x,A,P,M,a,o);break;case"s":x=a,A=o,I=r.len(),L=r.data,u===c.C&&(x+=a-L[I-4],A+=o-L[I-3]),g=c.C,P=a+y[b++],M=o+y[b++],a+=y[b++],o+=y[b++],r.addData(g,x,A,P,M,a,o);break;case"Q":P=y[b++],M=y[b++],a=y[b++],o=y[b++],g=c.Q,r.addData(g,P,M,a,o);break;case"q":P=y[b++]+a,M=y[b++]+o,a+=y[b++],o+=y[b++],g=c.Q,r.addData(g,P,M,a,o);break;case"T":x=a,A=o,I=r.len(),L=r.data,u===c.Q&&(x+=a-L[I-4],A+=o-L[I-3]),a=y[b++],o=y[b++],g=c.Q,r.addData(g,x,A,a,o);break;case"t":x=a,A=o,I=r.len(),L=r.data,u===c.Q&&(x+=a-L[I-4],A+=o-L[I-3]),a+=y[b++],o+=y[b++],g=c.Q,r.addData(g,x,A,a,o);break;case"A":w=y[b++],E=y[b++],D=y[b++],C=y[b++],$=y[b++],P=a,M=o,a=y[b++],o=y[b++],g=c.A,processArc(P,M,a,o,C,$,w,E,D,g,r);break;case"a":w=y[b++],E=y[b++],D=y[b++],C=y[b++],$=y[b++],P=a,M=o,a+=y[b++],o+=y[b++],g=c.A,processArc(P,M,a,o,C,$,w,E,D,g,r);break}}(v==="z"||v==="Z")&&(g=c.Z,r.addData(g),a=s,o=l),u=g}return r.toStatic(),r}var SVGPath=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.applyTransform=function(a){},r}(Path);function isPathProxy(n){return n.setData!=null}function createPathOptions(n,r){var a=createPathProxyFromString(n),o=extend$2({},r);return o.buildPath=function(s){if(isPathProxy(s)){s.setData(a.data);var l=s.getContext();l&&s.rebuildPath(l,1)}else{var l=s;a.rebuildPath(l,1)}},o.applyTransform=function(s){transformPath(a,s),this.dirtyShape()},o}function createFromString(n,r){return new SVGPath(createPathOptions(n,r))}function extendFromString(n,r){var a=createPathOptions(n,r),o=function(s){__extends(l,s);function l(u){var c=s.call(this,u)||this;return c.applyTransform=a.applyTransform,c.buildPath=a.buildPath,c}return l}(SVGPath);return o}function mergePath$1(n,r){for(var a=[],o=n.length,s=0;s<o;s++){var l=n[s];a.push(l.getUpdatedPathProxy(!0))}var u=new Path(r);return u.createPathProxy(),u.buildPath=function(c){if(isPathProxy(c)){c.appendPath(a);var d=c.getContext();d&&c.rebuildPath(d,1)}},u}function clonePath(n,r){r=r||{};var a=new Path;return n.shape&&a.setShape(n.shape),a.setStyle(n.style),r.bakeTransform?transformPath(a.path,n.getComputedTransform()):r.toLocal?a.setLocalTransform(n.getComputedTransform()):a.copyTransform(n),a.buildPath=n.buildPath,a.applyTransform=a.applyTransform,a.z=n.z,a.z2=n.z2,a.zlevel=n.zlevel,a}var CircleShape=function(){function n(){this.cx=0,this.cy=0,this.r=0}return n}(),Circle=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultShape=function(){return new CircleShape},r.prototype.buildPath=function(a,o){a.moveTo(o.cx+o.r,o.cy),a.arc(o.cx,o.cy,o.r,0,Math.PI*2)},r}(Path);Circle.prototype.type="circle";var EllipseShape=function(){function n(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return n}(),Ellipse=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultShape=function(){return new EllipseShape},r.prototype.buildPath=function(a,o){var s=.5522848,l=o.cx,u=o.cy,c=o.rx,d=o.ry,f=c*s,p=d*s;a.moveTo(l-c,u),a.bezierCurveTo(l-c,u-p,l-f,u-d,l,u-d),a.bezierCurveTo(l+f,u-d,l+c,u-p,l+c,u),a.bezierCurveTo(l+c,u+p,l+f,u+d,l,u+d),a.bezierCurveTo(l-f,u+d,l-c,u+p,l-c,u),a.closePath()},r}(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$1=Math.abs,mathSqrt=Math.sqrt,mathMax$7=Math.max,mathMin$7=Math.min,e=1e-4;function intersect(n,r,a,o,s,l,u,c){var d=a-n,f=o-r,p=u-s,v=c-l,g=v*d-p*f;if(!(g*g<e))return g=(p*(r-l)-v*(n-s))/g,[n+g*d,r+g*f]}function computeCornerTangents(n,r,a,o,s,l,u){var c=n-a,d=r-o,f=(u?l:-l)/mathSqrt(c*c+d*d),p=f*d,v=-f*c,g=n+p,y=r+v,_=a+p,S=o+v,b=(g+_)/2,x=(y+S)/2,A=_-g,w=S-y,E=A*A+w*w,D=s-l,C=g*S-_*y,$=(w<0?-1:1)*mathSqrt(mathMax$7(0,D*D*E-C*C)),P=(C*w-A*$)/E,M=(-C*A-w*$)/E,I=(C*w+A*$)/E,L=(-C*A+w*$)/E,O=P-b,R=M-x,N=I-b,V=L-x;return O*O+R*R>N*N+V*V&&(P=I,M=L),{cx:P,cy:M,x0:-p,y0:-v,x1:P*(s/D-1),y1:M*(s/D-1)}}function normalizeCornerRadius(n){var r;if(isArray$1(n)){var a=n.length;if(!a)return n;a===1?r=[n[0],n[0],0,0]:a===2?r=[n[0],n[0],n[1],n[1]]:a===3?r=n.concat(n[2]):r=n}else r=[n,n,n,n];return r}function buildPath$1(n,r){var a,o=mathMax$7(r.r,0),s=mathMax$7(r.r0||0,0),l=o>0,u=s>0;if(!(!l&&!u)){if(l||(o=s,s=0),s>o){var c=o;o=s,s=c}var d=r.startAngle,f=r.endAngle;if(!(isNaN(d)||isNaN(f))){var p=r.cx,v=r.cy,g=!!r.clockwise,y=mathAbs$1(f-d),_=y>PI2$3&&y%PI2$3;if(_>e&&(y=_),!(o>e))n.moveTo(p,v);else if(y>PI2$3-e)n.moveTo(p+o*mathCos$1(d),v+o*mathSin$1(d)),n.arc(p,v,o,d,f,!g),s>e&&(n.moveTo(p+s*mathCos$1(f),v+s*mathSin$1(f)),n.arc(p,v,s,f,d,g));else{var S=void 0,b=void 0,x=void 0,A=void 0,w=void 0,E=void 0,D=void 0,C=void 0,$=void 0,P=void 0,M=void 0,I=void 0,L=void 0,O=void 0,R=void 0,N=void 0,V=o*mathCos$1(d),F=o*mathSin$1(d),U=s*mathCos$1(f),H=s*mathSin$1(f),W=y>e;if(W){var G=r.cornerRadius;G&&(a=normalizeCornerRadius(G),S=a[0],b=a[1],x=a[2],A=a[3]);var B=mathAbs$1(o-s)/2;if(w=mathMin$7(B,x),E=mathMin$7(B,A),D=mathMin$7(B,S),C=mathMin$7(B,b),M=$=mathMax$7(w,E),I=P=mathMax$7(D,C),($>e||P>e)&&(L=o*mathCos$1(f),O=o*mathSin$1(f),R=s*mathCos$1(d),N=s*mathSin$1(d),y<PI$6)){var Y=intersect(V,F,R,N,L,O,U,H);if(Y){var Z=V-Y[0],K=F-Y[1],ee=L-Y[0],j=O-Y[1],q=1/mathSin$1(mathACos((Z*ee+K*j)/(mathSqrt(Z*Z+K*K)*mathSqrt(ee*ee+j*j)))/2),J=mathSqrt(Y[0]*Y[0]+Y[1]*Y[1]);M=mathMin$7($,(o-J)/(q+1)),I=mathMin$7(P,(s-J)/(q-1))}}}if(!W)n.moveTo(p+V,v+F);else if(M>e){var X=mathMin$7(x,M),re=mathMin$7(A,M),Q=computeCornerTangents(R,N,V,F,o,X,g),te=computeCornerTangents(L,O,U,H,o,re,g);n.moveTo(p+Q.cx+Q.x0,v+Q.cy+Q.y0),M<$&&X===re?n.arc(p+Q.cx,v+Q.cy,M,mathATan2(Q.y0,Q.x0),mathATan2(te.y0,te.x0),!g):(X>0&&n.arc(p+Q.cx,v+Q.cy,X,mathATan2(Q.y0,Q.x0),mathATan2(Q.y1,Q.x1),!g),n.arc(p,v,o,mathATan2(Q.cy+Q.y1,Q.cx+Q.x1),mathATan2(te.cy+te.y1,te.cx+te.x1),!g),re>0&&n.arc(p+te.cx,v+te.cy,re,mathATan2(te.y1,te.x1),mathATan2(te.y0,te.x0),!g))}else n.moveTo(p+V,v+F),n.arc(p,v,o,d,f,!g);if(!(s>e)||!W)n.lineTo(p+U,v+H);else if(I>e){var X=mathMin$7(S,I),re=mathMin$7(b,I),Q=computeCornerTangents(U,H,L,O,s,-re,g),te=computeCornerTangents(V,F,R,N,s,-X,g);n.lineTo(p+Q.cx+Q.x0,v+Q.cy+Q.y0),I<P&&X===re?n.arc(p+Q.cx,v+Q.cy,I,mathATan2(Q.y0,Q.x0),mathATan2(te.y0,te.x0),!g):(re>0&&n.arc(p+Q.cx,v+Q.cy,re,mathATan2(Q.y0,Q.x0),mathATan2(Q.y1,Q.x1),!g),n.arc(p,v,s,mathATan2(Q.cy+Q.y1,Q.cx+Q.x1),mathATan2(te.cy+te.y1,te.cx+te.x1),g),X>0&&n.arc(p+te.cx,v+te.cy,X,mathATan2(te.y1,te.x1),mathATan2(te.y0,te.x0),!g))}else n.lineTo(p+U,v+H),n.arc(p,v,s,f,d,g)}n.closePath()}}}var SectorShape=function(){function n(){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 n}(),Sector=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultShape=function(){return new SectorShape},r.prototype.buildPath=function(a,o){buildPath$1(a,o)},r.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},r}(Path);Sector.prototype.type="sector";var RingShape=function(){function n(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return n}(),Ring=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultShape=function(){return new RingShape},r.prototype.buildPath=function(a,o){var s=o.cx,l=o.cy,u=Math.PI*2;a.moveTo(s+o.r,l),a.arc(s,l,o.r,0,u,!1),a.moveTo(s+o.r0,l),a.arc(s,l,o.r0,0,u,!0)},r}(Path);Ring.prototype.type="ring";function smoothBezier(n,r,a,o){var s=[],l=[],u=[],c=[],d,f,p,v;if(o){p=[1/0,1/0],v=[-1/0,-1/0];for(var g=0,y=n.length;g<y;g++)min$1(p,p,n[g]),max$1(v,v,n[g]);min$1(p,p,o[0]),max$1(v,v,o[1])}for(var g=0,y=n.length;g<y;g++){var _=n[g];if(a)d=n[g?g-1:y-1],f=n[(g+1)%y];else if(g===0||g===y-1){s.push(clone$5(n[g]));continue}else d=n[g-1],f=n[g+1];sub(l,f,d),scale$2(l,l,r);var S=distance(_,d),b=distance(_,f),x=S+b;x!==0&&(S/=x,b/=x),scale$2(u,l,-S),scale$2(c,l,b);var A=add([],_,u),w=add([],_,c);o&&(max$1(A,A,p),min$1(A,A,v),max$1(w,w,p),min$1(w,w,v)),s.push(A),s.push(w)}return a&&s.push(s.shift()),s}function buildPath(n,r,a){var o=r.smooth,s=r.points;if(s&&s.length>=2){if(o){var l=smoothBezier(s,o,a,r.smoothConstraint);n.moveTo(s[0][0],s[0][1]);for(var u=s.length,c=0;c<(a?u:u-1);c++){var d=l[c*2],f=l[c*2+1],p=s[(c+1)%u];n.bezierCurveTo(d[0],d[1],f[0],f[1],p[0],p[1])}}else{n.moveTo(s[0][0],s[0][1]);for(var c=1,v=s.length;c<v;c++)n.lineTo(s[c][0],s[c][1])}a&&n.closePath()}}var PolygonShape=function(){function n(){this.points=null,this.smooth=0,this.smoothConstraint=null}return n}(),Polygon=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultShape=function(){return new PolygonShape},r.prototype.buildPath=function(a,o){buildPath(a,o,!0)},r}(Path);Polygon.prototype.type="polygon";var PolylineShape=function(){function n(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return n}(),Polyline$1=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new PolylineShape},r.prototype.buildPath=function(a,o){buildPath(a,o,!1)},r}(Path);Polyline$1.prototype.type="polyline";var subPixelOptimizeOutputShape={},LineShape=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return n}(),Line$1=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new LineShape},r.prototype.buildPath=function(a,o){var s,l,u,c;if(this.subPixelOptimize){var d=subPixelOptimizeLine$1(subPixelOptimizeOutputShape,o,this.style);s=d.x1,l=d.y1,u=d.x2,c=d.y2}else s=o.x1,l=o.y1,u=o.x2,c=o.y2;var f=o.percent;f!==0&&(a.moveTo(s,l),f<1&&(u=s*(1-f)+u*f,c=l*(1-f)+c*f),a.lineTo(u,c))},r.prototype.pointAt=function(a){var o=this.shape;return[o.x1*(1-a)+o.x2*a,o.y1*(1-a)+o.y2*a]},r}(Path);Line$1.prototype.type="line";var out=[],BezierCurveShape=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return n}();function someVectorAt(n,r,a){var o=n.cpx2,s=n.cpy2;return o!=null||s!=null?[(a?cubicDerivativeAt:cubicAt)(n.x1,n.cpx1,n.cpx2,n.x2,r),(a?cubicDerivativeAt:cubicAt)(n.y1,n.cpy1,n.cpy2,n.y2,r)]:[(a?quadraticDerivativeAt:quadraticAt$1)(n.x1,n.cpx1,n.x2,r),(a?quadraticDerivativeAt:quadraticAt$1)(n.y1,n.cpy1,n.y2,r)]}var BezierCurve=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new BezierCurveShape},r.prototype.buildPath=function(a,o){var s=o.x1,l=o.y1,u=o.x2,c=o.y2,d=o.cpx1,f=o.cpy1,p=o.cpx2,v=o.cpy2,g=o.percent;g!==0&&(a.moveTo(s,l),p==null||v==null?(g<1&&(quadraticSubdivide(s,d,u,g,out),d=out[1],u=out[2],quadraticSubdivide(l,f,c,g,out),f=out[1],c=out[2]),a.quadraticCurveTo(d,f,u,c)):(g<1&&(cubicSubdivide(s,d,p,u,g,out),d=out[1],p=out[2],u=out[3],cubicSubdivide(l,f,v,c,g,out),f=out[1],v=out[2],c=out[3]),a.bezierCurveTo(d,f,p,v,u,c)))},r.prototype.pointAt=function(a){return someVectorAt(this.shape,a,!1)},r.prototype.tangentAt=function(a){var o=someVectorAt(this.shape,a,!0);return normalize$3(o,o)},r}(Path);BezierCurve.prototype.type="bezier-curve";var ArcShape=function(){function n(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return n}(),Arc=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new ArcShape},r.prototype.buildPath=function(a,o){var s=o.cx,l=o.cy,u=Math.max(o.r,0),c=o.startAngle,d=o.endAngle,f=o.clockwise,p=Math.cos(c),v=Math.sin(c);a.moveTo(p*u+s,v*u+l),a.arc(s,l,u,c,d,!f)},r}(Path);Arc.prototype.type="arc";var CompoundPath=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type="compound",a}return r.prototype._updatePathDirty=function(){for(var a=this.shape.paths,o=this.shapeChanged(),s=0;s<a.length;s++)o=o||a[s].shapeChanged();o&&this.dirtyShape()},r.prototype.beforeBrush=function(){this._updatePathDirty();for(var a=this.shape.paths||[],o=this.getGlobalScale(),s=0;s<a.length;s++)a[s].path||a[s].createPathProxy(),a[s].path.setScale(o[0],o[1],a[s].segmentIgnoreThreshold)},r.prototype.buildPath=function(a,o){for(var s=o.paths||[],l=0;l<s.length;l++)s[l].buildPath(a,s[l].shape,!0)},r.prototype.afterBrush=function(){for(var a=this.shape.paths||[],o=0;o<a.length;o++)a[o].pathUpdated()},r.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),Path.prototype.getBoundingRect.call(this)},r}(Path),Gradient=function(){function n(r){this.colorStops=r||[]}return n.prototype.addColorStop=function(r,a){this.colorStops.push({offset:r,color:a})},n}(),LinearGradient=function(n){__extends(r,n);function r(a,o,s,l,u,c){var d=n.call(this,u)||this;return d.x=a==null?0:a,d.y=o==null?0:o,d.x2=s==null?1:s,d.y2=l==null?0:l,d.type="linear",d.global=c||!1,d}return r}(Gradient),RadialGradient=function(n){__extends(r,n);function r(a,o,s,l,u){var c=n.call(this,l)||this;return c.x=a==null?.5:a,c.y=o==null?.5:o,c.r=s==null?.5:s,c.type="radial",c.global=u||!1,c}return r}(Gradient),extent=[0,0],extent2=[0,0],minTv=new Point,maxTv=new Point,OrientedBoundingRect=function(){function n(r,a){this._corners=[],this._axes=[],this._origin=[0,0];for(var o=0;o<4;o++)this._corners[o]=new Point;for(var o=0;o<2;o++)this._axes[o]=new Point;r&&this.fromBoundingRect(r,a)}return n.prototype.fromBoundingRect=function(r,a){var o=this._corners,s=this._axes,l=r.x,u=r.y,c=l+r.width,d=u+r.height;if(o[0].set(l,u),o[1].set(c,u),o[2].set(c,d),o[3].set(l,d),a)for(var f=0;f<4;f++)o[f].transform(a);Point.sub(s[0],o[1],o[0]),Point.sub(s[1],o[3],o[0]),s[0].normalize(),s[1].normalize();for(var f=0;f<2;f++)this._origin[f]=s[f].dot(o[0])},n.prototype.intersect=function(r,a){var o=!0,s=!a;return minTv.set(1/0,1/0),maxTv.set(0,0),!this._intersectCheckOneSide(this,r,minTv,maxTv,s,1)&&(o=!1,s)||!this._intersectCheckOneSide(r,this,minTv,maxTv,s,-1)&&(o=!1,s)||s||Point.copy(a,o?minTv:maxTv),o},n.prototype._intersectCheckOneSide=function(r,a,o,s,l,u){for(var c=!0,d=0;d<2;d++){var f=this._axes[d];if(this._getProjMinMaxOnAxis(d,r._corners,extent),this._getProjMinMaxOnAxis(d,a._corners,extent2),extent[1]<extent2[0]||extent[0]>extent2[1]){if(c=!1,l)return c;var p=Math.abs(extent2[0]-extent[1]),v=Math.abs(extent[0]-extent2[1]);Math.min(p,v)>s.len()&&(p<v?Point.scale(s,f,-p*u):Point.scale(s,f,v*u))}else if(o){var p=Math.abs(extent2[0]-extent[1]),v=Math.abs(extent[0]-extent2[1]);Math.min(p,v)<o.len()&&(p<v?Point.scale(o,f,p*u):Point.scale(o,f,-v*u))}}return c},n.prototype._getProjMinMaxOnAxis=function(r,a,o){for(var s=this._axes[r],l=this._origin,u=a[0].dot(s)+l[r],c=u,d=u,f=1;f<a.length;f++){var p=a[f].dot(s)+l[r];c=Math.min(p,c),d=Math.max(p,d)}o[0]=c,o[1]=d},n}(),m=[],IncrementalDisplayable=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.notClear=!0,a.incremental=!0,a._displayables=[],a._temporaryDisplayables=[],a._cursor=0,a}return r.prototype.traverse=function(a,o){a.call(o,this)},r.prototype.useStyle=function(){this.style={}},r.prototype.getCursor=function(){return this._cursor},r.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},r.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},r.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},r.prototype.addDisplayable=function(a,o){o?this._temporaryDisplayables.push(a):this._displayables.push(a),this.markRedraw()},r.prototype.addDisplayables=function(a,o){o=o||!1;for(var s=0;s<a.length;s++)this.addDisplayable(a[s],o)},r.prototype.getDisplayables=function(){return this._displayables},r.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},r.prototype.eachPendingDisplayable=function(a){for(var o=this._cursor;o<this._displayables.length;o++)a&&a(this._displayables[o]);for(var o=0;o<this._temporaryDisplayables.length;o++)a&&a(this._temporaryDisplayables[o])},r.prototype.update=function(){this.updateTransform();for(var a=this._cursor;a<this._displayables.length;a++){var o=this._displayables[a];o.parent=this,o.update(),o.parent=null}for(var a=0;a<this._temporaryDisplayables.length;a++){var o=this._temporaryDisplayables[a];o.parent=this,o.update(),o.parent=null}},r.prototype.getBoundingRect=function(){if(!this._rect){for(var a=new BoundingRect(1/0,1/0,-1/0,-1/0),o=0;o<this._displayables.length;o++){var s=this._displayables[o],l=s.getBoundingRect().clone();s.needLocalTransform()&&l.applyTransform(s.getLocalTransform(m)),a.union(l)}this._rect=a}return this._rect},r.prototype.contain=function(a,o){var s=this.transformCoordToLocal(a,o),l=this.getBoundingRect();if(l.contain(s[0],s[1]))for(var u=0;u<this._displayables.length;u++){var c=this._displayables[u];if(c.contain(a,o))return!0}return!1},r}(Displayable),transitionStore=makeInner();function getAnimationConfig(n,r,a,o,s){var l;if(r&&r.ecModel){var u=r.ecModel.getUpdatePayload();l=u&&u.animation}var c=r&&r.isAnimationEnabled(),d=n==="update";if(c){var f=void 0,p=void 0,v=void 0;o?(f=retrieve2(o.duration,200),p=retrieve2(o.easing,"cubicOut"),v=0):(f=r.getShallow(d?"animationDurationUpdate":"animationDuration"),p=r.getShallow(d?"animationEasingUpdate":"animationEasing"),v=r.getShallow(d?"animationDelayUpdate":"animationDelay")),l&&(l.duration!=null&&(f=l.duration),l.easing!=null&&(p=l.easing),l.delay!=null&&(v=l.delay)),isFunction(v)&&(v=v(a,s)),isFunction(f)&&(f=f(a));var g={duration:f||0,delay:v,easing:p};return g}else return null}function animateOrSetProps(n,r,a,o,s,l,u){var c=!1,d;isFunction(s)?(u=l,l=s,s=null):isObject$3(s)&&(l=s.cb,u=s.during,c=s.isFrom,d=s.removeOpt,s=s.dataIndex);var f=n==="leave";f||r.stopAnimation("leave");var p=getAnimationConfig(n,o,s,f?d||{}:null,o&&o.getAnimationDelayParams?o.getAnimationDelayParams(r,s):null);if(p&&p.duration>0){var v=p.duration,g=p.delay,y=p.easing,_={duration:v,delay:g||0,easing:y,done:l,force:!!l||!!u,setToFinal:!f,scope:n,during:u};c?r.animateFrom(a,_):r.animateTo(a,_)}else r.stopAnimation(),!c&&r.attr(a),u&&u(1),l&&l()}function updateProps$1(n,r,a,o,s,l){animateOrSetProps("update",n,r,a,o,s,l)}function initProps(n,r,a,o,s,l){animateOrSetProps("enter",n,r,a,o,s,l)}function isElementRemoved(n){if(!n.__zr)return!0;for(var r=0;r<n.animators.length;r++){var a=n.animators[r];if(a.scope==="leave")return!0}return!1}function removeElement(n,r,a,o,s,l){isElementRemoved(n)||animateOrSetProps("leave",n,r,a,o,s,l)}function fadeOutDisplayable(n,r,a,o){n.removeTextContent(),n.removeTextGuideLine(),removeElement(n,{style:{opacity:0}},r,a,o)}function removeElementWithFadeOut(n,r,a){function o(){n.parent&&n.parent.remove(n)}n.isGroup?n.traverse(function(s){s.isGroup||fadeOutDisplayable(s,r,a,o)}):fadeOutDisplayable(n,r,a,o)}function saveOldStyle(n){transitionStore(n).oldStyle=n.style}function getOldStyle(n){return transitionStore(n).oldStyle}var mathMax$6=Math.max,mathMin$6=Math.min,_customShapeMap={};function extendShape(n){return Path.extend(n)}var extendPathFromString=extendFromString;function extendPath(n,r){return extendPathFromString(n,r)}function registerShape(n,r){_customShapeMap[n]=r}function getShapeClass(n){if(_customShapeMap.hasOwnProperty(n))return _customShapeMap[n]}function makePath(n,r,a,o){var s=createFromString(n,r);return a&&(o==="center"&&(a=centerGraphic(a,s.getBoundingRect())),resizePath(s,a)),s}function makeImage(n,r,a){var o=new ZRImage({style:{image:n,x:r.x,y:r.y,width:r.width,height:r.height},onload:function(s){if(a==="center"){var l={width:s.width,height:s.height};o.setStyle(centerGraphic(r,l))}}});return o}function centerGraphic(n,r){var a=r.width/r.height,o=n.height*a,s;o<=n.width?s=n.height:(o=n.width,s=o/a);var l=n.x+n.width/2,u=n.y+n.height/2;return{x:l-o/2,y:u-s/2,width:o,height:s}}var mergePath=mergePath$1;function resizePath(n,r){if(n.applyTransform){var a=n.getBoundingRect(),o=a.calculateTransform(r);n.applyTransform(o)}}function subPixelOptimizeLine(n,r){return subPixelOptimizeLine$1(n,n,{lineWidth:r}),n}function subPixelOptimizeRect(n){return subPixelOptimizeRect$1(n.shape,n.shape,n.style),n}var subPixelOptimize=subPixelOptimize$1;function getTransform$1(n,r){for(var a=identity([]);n&&n!==r;)mul(a,n.getLocalTransform(),a),n=n.parent;return a}function applyTransform(n,r,a){return r&&!isArrayLike(r)&&(r=Transformable.getLocalTransform(r)),a&&(r=invert([],r)),applyTransform$1([],n,r)}function transformDirection(n,r,a){var o=r[4]===0||r[5]===0||r[0]===0?1:Math.abs(2*r[4]/r[0]),s=r[4]===0||r[5]===0||r[2]===0?1:Math.abs(2*r[4]/r[2]),l=[n==="left"?-o:n==="right"?o:0,n==="top"?-s:n==="bottom"?s:0];return l=applyTransform(l,r,a),Math.abs(l[0])>Math.abs(l[1])?l[0]>0?"right":"left":l[1]>0?"bottom":"top"}function isNotGroup(n){return!n.isGroup}function isPath$1(n){return n.shape!=null}function groupTransition(n,r,a){if(!n||!r)return;function o(u){var c={};return u.traverse(function(d){isNotGroup(d)&&d.anid&&(c[d.anid]=d)}),c}function s(u){var c={x:u.x,y:u.y,rotation:u.rotation};return isPath$1(u)&&(c.shape=extend$2({},u.shape)),c}var l=o(n);r.traverse(function(u){if(isNotGroup(u)&&u.anid){var c=l[u.anid];if(c){var d=s(u);u.attr(s(c)),updateProps$1(u,d,a,getECData(u).dataIndex)}}})}function clipPointsByRect(n,r){return map$1(n,function(a){var o=a[0];o=mathMax$6(o,r.x),o=mathMin$6(o,r.x+r.width);var s=a[1];return s=mathMax$6(s,r.y),s=mathMin$6(s,r.y+r.height),[o,s]})}function clipRectByRect(n,r){var a=mathMax$6(n.x,r.x),o=mathMin$6(n.x+n.width,r.x+r.width),s=mathMax$6(n.y,r.y),l=mathMin$6(n.y+n.height,r.y+r.height);if(o>=a&&l>=s)return{x:a,y:s,width:o-a,height:l-s}}function createIcon(n,r,a){var o=extend$2({rectHover:!0},r),s=o.style={strokeNoScale:!0};if(a=a||{x:-1,y:-1,width:2,height:2},n)return n.indexOf("image://")===0?(s.image=n.slice(8),defaults$2(s,a),new ZRImage(o)):makePath(n.replace("path://",""),o,a,"center")}function linePolygonIntersect(n,r,a,o,s){for(var l=0,u=s[s.length-1];l<s.length;l++){var c=s[l];if(lineLineIntersect$1(n,r,a,o,c[0],c[1],u[0],u[1]))return!0;u=c}}function lineLineIntersect$1(n,r,a,o,s,l,u,c){var d=a-n,f=o-r,p=u-s,v=c-l,g=crossProduct2d$1(p,v,d,f);if(nearZero(g))return!1;var y=n-s,_=r-l,S=crossProduct2d$1(y,_,d,f)/g;if(S<0||S>1)return!1;var b=crossProduct2d$1(y,_,p,v)/g;return!(b<0||b>1)}function crossProduct2d$1(n,r,a,o){return n*o-a*r}function nearZero(n){return n<=1e-6&&n>=-1e-6}function setTooltipConfig(n){var r=n.itemTooltipOption,a=n.componentModel,o=n.itemName,s=isString(r)?{formatter:r}:r,l=a.mainType,u=a.componentIndex,c={componentType:l,name:o,$vars:["name"]};c[l+"Index"]=u;var d=n.formatterParamsExtra;d&&each$f(keys(d),function(p){hasOwn(c,p)||(c[p]=d[p],c.$vars.push(p))});var f=getECData(n.el);f.componentMainType=l,f.componentIndex=u,f.tooltipConfig={name:o,option:defaults$2({content:o,encodeHTMLContent:!0,formatterParams:c},s)}}function traverseElement(n,r){var a;n.isGroup&&(a=r(n)),a||n.traverse(r)}function traverseElements(n,r){if(n)if(isArray$1(n))for(var a=0;a<n.length;a++)traverseElement(n[a],r);else traverseElement(n,r)}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$1=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,applyTransform,clipPointsByRect,clipRectByRect,createIcon,extendPath,extendShape,getShapeClass,getTransform:getTransform$1,groupTransition,initProps,isElementRemoved,lineLineIntersect:lineLineIntersect$1,linePolygonIntersect,makeImage,makePath,mergePath,registerShape,removeElement,removeElementWithFadeOut,resizePath,setTooltipConfig,subPixelOptimize,subPixelOptimizeLine,subPixelOptimizeRect,transformDirection,traverseElements,updateProps:updateProps$1},Symbol.toStringTag,{value:"Module"}));var EMPTY_OBJ={};function setLabelText(n,r){for(var a=0;a<SPECIAL_STATES.length;a++){var o=SPECIAL_STATES[a],s=r[o],l=n.ensureState(o);l.style=l.style||{},l.style.text=s}var u=n.currentStates.slice();n.clearStates(!0),n.setStyle({text:r.normal}),n.useStates(u,!0)}function getLabelText(n,r,a){var o=n.labelFetcher,s=n.labelDataIndex,l=n.labelDimIndex,u=r.normal,c;o&&(c=o.getFormattedLabel(s,"normal",null,l,u&&u.get("formatter"),a!=null?{interpolatedValue:a}:null)),c==null&&(c=isFunction(n.defaultText)?n.defaultText(s,n,a):n.defaultText);for(var d={normal:c},f=0;f<SPECIAL_STATES.length;f++){var p=SPECIAL_STATES[f],v=r[p];d[p]=retrieve2(o?o.getFormattedLabel(s,p,null,l,v&&v.get("formatter")):null,c)}return d}function setLabelStyle(n,r,a,o){a=a||EMPTY_OBJ;for(var s=n instanceof ZRText,l=!1,u=0;u<DISPLAY_STATES.length;u++){var c=r[DISPLAY_STATES[u]];if(c&&c.getShallow("show")){l=!0;break}}var d=s?n:n.getTextContent();if(l){s||(d||(d=new ZRText,n.setTextContent(d)),n.stateProxy&&(d.stateProxy=n.stateProxy));var f=getLabelText(a,r),p=r.normal,v=!!p.getShallow("show"),g=createTextStyle$1(p,o&&o.normal,a,!1,!s);g.text=f.normal,s||n.setTextConfig(createTextConfig(p,a,!1));for(var u=0;u<SPECIAL_STATES.length;u++){var y=SPECIAL_STATES[u],c=r[y];if(c){var _=d.ensureState(y),S=!!retrieve2(c.getShallow("show"),v);if(S!==v&&(_.ignore=!S),_.style=createTextStyle$1(c,o&&o[y],a,!0,!s),_.style.text=f[y],!s){var b=n.ensureState(y);b.textConfig=createTextConfig(c,a,!0)}}}d.silent=!!p.getShallow("silent"),d.style.x!=null&&(g.x=d.style.x),d.style.y!=null&&(g.y=d.style.y),d.ignore=!v,d.useStyle(g),d.dirty(),a.enableTextSetter&&(labelInner(d).setLabelText=function(x){var A=getLabelText(a,r,x);setLabelText(d,A)})}else d&&(d.ignore=!0);n.dirty()}function getLabelStatesModels(n,r){r=r||"label";for(var a={normal:n.getModel(r)},o=0;o<SPECIAL_STATES.length;o++){var s=SPECIAL_STATES[o];a[s]=n.getModel([s,r])}return a}function createTextStyle$1(n,r,a,o,s){var l={};return setTextStyleCommon(l,n,a,o,s),r&&extend$2(l,r),l}function createTextConfig(n,r,a){r=r||{};var o={},s,l=n.getShallow("rotate"),u=retrieve2(n.getShallow("distance"),a?null:5),c=n.getShallow("offset");return s=n.getShallow("position")||(a?null:"inside"),s==="outside"&&(s=r.defaultOutsidePosition||"top"),s!=null&&(o.position=s),c!=null&&(o.offset=c),l!=null&&(l*=Math.PI/180,o.rotation=l),u!=null&&(o.distance=u),o.outsideFill=n.get("color")==="inherit"?r.inheritColor||null:"auto",o}function setTextStyleCommon(n,r,a,o,s){a=a||EMPTY_OBJ;var l=r.ecModel,u=l&&l.option.textStyle,c=getRichItemNames(r),d;if(c){d={};for(var f in c)if(c.hasOwnProperty(f)){var p=r.getModel(["rich",f]);setTokenTextStyle(d[f]={},p,u,a,o,s,!1,!0)}}d&&(n.rich=d);var v=r.get("overflow");v&&(n.overflow=v);var g=r.get("minMargin");g!=null&&(n.margin=g),setTokenTextStyle(n,r,u,a,o,s,!0,!1)}function getRichItemNames(n){for(var r;n&&n!==n.ecModel;){var a=(n.option||EMPTY_OBJ).rich;if(a){r=r||{};for(var o=keys(a),s=0;s<o.length;s++){var l=o[s];r[l]=1}}n=n.parentModel}return r}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(n,r,a,o,s,l,u,c){a=!s&&a||EMPTY_OBJ;var d=o&&o.inheritColor,f=r.getShallow("color"),p=r.getShallow("textBorderColor"),v=retrieve2(r.getShallow("opacity"),a.opacity);(f==="inherit"||f==="auto")&&(d?f=d:f=null),(p==="inherit"||p==="auto")&&(d?p=d:p=null),l||(f=f||a.color,p=p||a.textBorderColor),f!=null&&(n.fill=f),p!=null&&(n.stroke=p);var g=retrieve2(r.getShallow("textBorderWidth"),a.textBorderWidth);g!=null&&(n.lineWidth=g);var y=retrieve2(r.getShallow("textBorderType"),a.textBorderType);y!=null&&(n.lineDash=y);var _=retrieve2(r.getShallow("textBorderDashOffset"),a.textBorderDashOffset);_!=null&&(n.lineDashOffset=_),!s&&v==null&&!c&&(v=o&&o.defaultOpacity),v!=null&&(n.opacity=v),!s&&!l&&n.fill==null&&o.inheritColor&&(n.fill=o.inheritColor);for(var S=0;S<TEXT_PROPS_WITH_GLOBAL.length;S++){var b=TEXT_PROPS_WITH_GLOBAL[S],x=retrieve2(r.getShallow(b),a[b]);x!=null&&(n[b]=x)}for(var S=0;S<TEXT_PROPS_SELF.length;S++){var b=TEXT_PROPS_SELF[S],x=r.getShallow(b);x!=null&&(n[b]=x)}if(n.verticalAlign==null){var A=r.getShallow("baseline");A!=null&&(n.verticalAlign=A)}if(!u||!o.disableBox){for(var S=0;S<TEXT_PROPS_BOX.length;S++){var b=TEXT_PROPS_BOX[S],x=r.getShallow(b);x!=null&&(n[b]=x)}var w=r.getShallow("borderType");w!=null&&(n.borderDash=w),(n.backgroundColor==="auto"||n.backgroundColor==="inherit")&&d&&(n.backgroundColor=d),(n.borderColor==="auto"||n.borderColor==="inherit")&&d&&(n.borderColor=d)}}function getFont(n,r){var a=r&&r.getModel("textStyle");return trim$1([n.fontStyle||a&&a.getShallow("fontStyle")||"",n.fontWeight||a&&a.getShallow("fontWeight")||"",(n.fontSize||a&&a.getShallow("fontSize")||12)+"px",n.fontFamily||a&&a.getShallow("fontFamily")||"sans-serif"].join(" "))}var labelInner=makeInner();function setLabelValueAnimation(n,r,a,o){if(n){var s=labelInner(n);s.prevValue=s.value,s.value=a;var l=r.normal;s.valueAnimation=l.get("valueAnimation"),s.valueAnimation&&(s.precision=l.get("precision"),s.defaultInterpolatedText=o,s.statesModels=r)}}function animateLabelValue(n,r,a,o,s){var l=labelInner(n);if(!l.valueAnimation||l.prevValue===l.value)return;var u=l.defaultInterpolatedText,c=retrieve2(l.interpolatedValue,l.prevValue),d=l.value;function f(p){var v=interpolateRawValues(a,l.precision,c,d,p);l.interpolatedValue=p===1?null:v;var g=getLabelText({labelDataIndex:r,labelFetcher:s,defaultText:u?u(v):v+""},l.statesModels,v);setLabelText(n,g)}n.percent=0,(l.prevValue==null?initProps:updateProps$1)(n,{percent:1},o,r,null,f)}var PATH_COLOR=["textStyle","color"],textStyleParams=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],tmpText=new ZRText,TextStyleMixin=function(){function n(){}return n.prototype.getTextColor=function(r){var a=this.ecModel;return this.getShallow("color")||(!r&&a?a.get(PATH_COLOR):null)},n.prototype.getFont=function(){return getFont({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},n.prototype.getTextRect=function(r){for(var a={text:r,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},o=0;o<textStyleParams.length;o++)a[textStyleParams[o]]=this.getShallow(textStyleParams[o]);return tmpText.useStyle(a),tmpText.update(),tmpText.getBoundingRect()},n}(),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 n(){}return n.prototype.getLineStyle=function(r){return getLineStyle(this,r)},n}(),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 n(){}return n.prototype.getItemStyle=function(r,a){return getItemStyle(this,r,a)},n}(),Model=function(){function n(r,a,o){this.parentModel=a,this.ecModel=o,this.option=r}return n.prototype.init=function(r,a,o){},n.prototype.mergeOption=function(r,a){merge(this.option,r,!0)},n.prototype.get=function(r,a){return r==null?this.option:this._doGet(this.parsePath(r),!a&&this.parentModel)},n.prototype.getShallow=function(r,a){var o=this.option,s=o==null?o:o[r];if(s==null&&!a){var l=this.parentModel;l&&(s=l.getShallow(r))}return s},n.prototype.getModel=function(r,a){var o=r!=null,s=o?this.parsePath(r):null,l=o?this._doGet(s):this.option;return a=a||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(s)),new n(l,a,this.ecModel)},n.prototype.isEmpty=function(){return this.option==null},n.prototype.restoreData=function(){},n.prototype.clone=function(){var r=this.constructor;return new r(clone$6(this.option))},n.prototype.parsePath=function(r){return typeof r=="string"?r.split("."):r},n.prototype.resolveParentPath=function(r){return r},n.prototype.isAnimationEnabled=function(){if(!env.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},n.prototype._doGet=function(r,a){var o=this.option;if(!r)return o;for(var s=0;s<r.length&&!(r[s]&&(o=o&&typeof o=="object"?o[r[s]]:null,o==null));s++);return o==null&&a&&(o=a._doGet(this.resolveParentPath(r),a.parentModel)),o},n}();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(n){return[n||"",base++].join("_")}function enableSubTypeDefaulter(n){var r={};n.registerSubTypeDefaulter=function(a,o){var s=parseClassType(a);r[s.main]=o},n.determineSubType=function(a,o){var s=o.type;if(!s){var l=parseClassType(a).main;n.hasSubTypes(a)&&r[l]&&(s=r[l](o))}return s}}function enableTopologicalTravel(n,r){n.topologicalTravel=function(l,u,c,d){if(!l.length)return;var f=a(u),p=f.graph,v=f.noEntryList,g={};for(each$f(l,function(A){g[A]=!0});v.length;){var y=v.pop(),_=p[y],S=!!g[y];S&&(c.call(d,y,_.originalDeps.slice()),delete g[y]),each$f(_.successor,S?x:b)}each$f(g,function(){var A="";throw new Error(A)});function b(A){p[A].entryCount--,p[A].entryCount===0&&v.push(A)}function x(A){g[A]=!0,b(A)}};function a(l){var u={},c=[];return each$f(l,function(d){var f=o(u,d),p=f.originalDeps=r(d),v=s(p,l);f.entryCount=v.length,f.entryCount===0&&c.push(d),each$f(v,function(g){indexOf(f.predecessor,g)<0&&f.predecessor.push(g);var y=o(u,g);indexOf(y.successor,g)<0&&y.successor.push(d)})}),{graph:u,noEntryList:c}}function o(l,u){return l[u]||(l[u]={predecessor:[],successor:[]}),l[u]}function s(l,u){var c=[];return each$f(l,function(d){indexOf(u,d)>=0&&c.push(d)}),c}}function inheritDefaultOption(n,r){return merge(merge({},n,!0),r,!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 n=(document.documentElement.lang||navigator.language||navigator.browserLanguage||DEFAULT_LOCALE).toUpperCase();return n.indexOf(LOCALE_ZH)>-1?LOCALE_ZH:DEFAULT_LOCALE}():DEFAULT_LOCALE;function registerLocale(n,r){n=n.toUpperCase(),localeModels[n]=new Model(r),localeStorage[n]=r}function createLocaleObject(n){if(isString(n)){var r=localeStorage[n.toUpperCase()]||{};return n===LOCALE_ZH||n===LOCALE_EN?clone$6(r):merge(clone$6(r),clone$6(localeStorage[DEFAULT_LOCALE]),!1)}else return merge(clone$6(n),clone$6(localeStorage[DEFAULT_LOCALE]),!1)}function getLocaleModel(n){return localeModels[n]}function getDefaultLocaleModel(){return localeModels[DEFAULT_LOCALE]}registerLocale(LOCALE_EN,langEN);registerLocale(LOCALE_ZH,langZH);var ONE_SECOND=1e3,ONE_MINUTE=ONE_SECOND*60,ONE_HOUR=ONE_MINUTE*60,ONE_DAY=ONE_HOUR*24,ONE_YEAR=ONE_DAY*365,defaultLeveledFormatter={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},fullDayFormatter="{yyyy}-{MM}-{dd}",fullLeveledFormatter={year:"{yyyy}",month:"{yyyy}-{MM}",day:fullDayFormatter,hour:fullDayFormatter+" "+defaultLeveledFormatter.hour,minute:fullDayFormatter+" "+defaultLeveledFormatter.minute,second:fullDayFormatter+" "+defaultLeveledFormatter.second,millisecond:defaultLeveledFormatter.none},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 pad(n,r){return n+="","0000".substr(0,r-n.length)+n}function getPrimaryTimeUnit(n){switch(n){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return n}}function isPrimaryTimeUnit(n){return n===getPrimaryTimeUnit(n)}function getDefaultFormatPrecisionOfInterval(n){switch(n){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function format$1(n,r,a,o){var s=parseDate(n),l=s[fullYearGetterName(a)](),u=s[monthGetterName(a)]()+1,c=Math.floor((u-1)/3)+1,d=s[dateGetterName(a)](),f=s["get"+(a?"UTC":"")+"Day"](),p=s[hoursGetterName(a)](),v=(p-1)%12+1,g=s[minutesGetterName(a)](),y=s[secondsGetterName(a)](),_=s[millisecondsGetterName(a)](),S=p>=12?"pm":"am",b=S.toUpperCase(),x=o instanceof Model?o:getLocaleModel(o||SYSTEM_LANG)||getDefaultLocaleModel(),A=x.getModel("time"),w=A.get("month"),E=A.get("monthAbbr"),D=A.get("dayOfWeek"),C=A.get("dayOfWeekAbbr");return(r||"").replace(/{a}/g,S+"").replace(/{A}/g,b+"").replace(/{yyyy}/g,l+"").replace(/{yy}/g,pad(l%100+"",2)).replace(/{Q}/g,c+"").replace(/{MMMM}/g,w[u-1]).replace(/{MMM}/g,E[u-1]).replace(/{MM}/g,pad(u,2)).replace(/{M}/g,u+"").replace(/{dd}/g,pad(d,2)).replace(/{d}/g,d+"").replace(/{eeee}/g,D[f]).replace(/{ee}/g,C[f]).replace(/{e}/g,f+"").replace(/{HH}/g,pad(p,2)).replace(/{H}/g,p+"").replace(/{hh}/g,pad(v+"",2)).replace(/{h}/g,v+"").replace(/{mm}/g,pad(g,2)).replace(/{m}/g,g+"").replace(/{ss}/g,pad(y,2)).replace(/{s}/g,y+"").replace(/{SSS}/g,pad(_,3)).replace(/{S}/g,_+"")}function leveledFormat(n,r,a,o,s){var l=null;if(isString(a))l=a;else if(isFunction(a))l=a(n.value,r,{level:n.level});else{var u=extend$2({},defaultLeveledFormatter);if(n.level>0)for(var c=0;c<primaryTimeUnits.length;++c)u[primaryTimeUnits[c]]="{primary|"+u[primaryTimeUnits[c]]+"}";var d=a?a.inherit===!1?a:defaults$2(a,u):u,f=getUnitFromValue(n.value,s);if(d[f])l=d[f];else if(d.inherit){for(var p=timeUnits.indexOf(f),c=p-1;c>=0;--c)if(d[f]){l=d[f];break}l=l||u.none}if(isArray$1(l)){var v=n.level==null?0:n.level>=0?n.level:l.length+n.level;v=Math.min(v,l.length-1),l=l[v]}}return format$1(new Date(n.value),l,s,o)}function getUnitFromValue(n,r){var a=parseDate(n),o=a[monthGetterName(r)]()+1,s=a[dateGetterName(r)](),l=a[hoursGetterName(r)](),u=a[minutesGetterName(r)](),c=a[secondsGetterName(r)](),d=a[millisecondsGetterName(r)](),f=d===0,p=f&&c===0,v=p&&u===0,g=v&&l===0,y=g&&s===1,_=y&&o===1;return _?"year":y?"month":g?"day":v?"hour":p?"minute":f?"second":"millisecond"}function getUnitValue(n,r,a){var o=isNumber(n)?parseDate(n):n;switch(r=r||getUnitFromValue(n,a),r){case"year":return o[fullYearGetterName(a)]();case"half-year":return o[monthGetterName(a)]()>=6?1:0;case"quarter":return Math.floor((o[monthGetterName(a)]()+1)/4);case"month":return o[monthGetterName(a)]();case"day":return o[dateGetterName(a)]();case"half-day":return o[hoursGetterName(a)]()/24;case"hour":return o[hoursGetterName(a)]();case"minute":return o[minutesGetterName(a)]();case"second":return o[secondsGetterName(a)]();case"millisecond":return o[millisecondsGetterName(a)]()}}function fullYearGetterName(n){return n?"getUTCFullYear":"getFullYear"}function monthGetterName(n){return n?"getUTCMonth":"getMonth"}function dateGetterName(n){return n?"getUTCDate":"getDate"}function hoursGetterName(n){return n?"getUTCHours":"getHours"}function minutesGetterName(n){return n?"getUTCMinutes":"getMinutes"}function secondsGetterName(n){return n?"getUTCSeconds":"getSeconds"}function millisecondsGetterName(n){return n?"getUTCMilliseconds":"getMilliseconds"}function fullYearSetterName(n){return n?"setUTCFullYear":"setFullYear"}function monthSetterName(n){return n?"setUTCMonth":"setMonth"}function dateSetterName(n){return n?"setUTCDate":"setDate"}function hoursSetterName(n){return n?"setUTCHours":"setHours"}function minutesSetterName(n){return n?"setUTCMinutes":"setMinutes"}function secondsSetterName(n){return n?"setUTCSeconds":"setSeconds"}function millisecondsSetterName(n){return n?"setUTCMilliseconds":"setMilliseconds"}function getTextRect(n,r,a,o,s,l,u,c){var d=new ZRText({style:{text:n,font:r,align:a,verticalAlign:o,padding:s,rich:l,overflow:u?"truncate":null,lineHeight:c}});return d.getBoundingRect()}function addCommas(n){if(!isNumeric(n))return isString(n)?n:"-";var r=(n+"").split(".");return r[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(r.length>1?"."+r[1]:"")}function toCamelCase(n,r){return n=(n||"").toLowerCase().replace(/-(.)/g,function(a,o){return o.toUpperCase()}),r&&n&&(n=n.charAt(0).toUpperCase()+n.slice(1)),n}var normalizeCssArray=normalizeCssArray$1;function makeValueReadable(n,r,a){var o="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function s(p){return p&&trim$1(p)?p:"-"}function l(p){return!!(p!=null&&!isNaN(p)&&isFinite(p))}var u=r==="time",c=n instanceof Date;if(u||c){var d=u?parseDate(n):n;if(isNaN(+d)){if(c)return"-"}else return format$1(d,o,a)}if(r==="ordinal")return isStringSafe(n)?s(n):isNumber(n)&&l(n)?n+"":"-";var f=numericToNumber(n);return l(f)?addCommas(f):isStringSafe(n)?s(n):typeof n=="boolean"?n+"":"-"}var TPL_VAR_ALIAS=["a","b","c","d","e","f","g"],wrapVar=function(n,r){return"{"+n+(r==null?"":r)+"}"};function formatTpl(n,r,a){isArray$1(r)||(r=[r]);var o=r.length;if(!o)return"";for(var s=r[0].$vars||[],l=0;l<s.length;l++){var u=TPL_VAR_ALIAS[l];n=n.replace(wrapVar(u),wrapVar(u,0))}for(var c=0;c<o;c++)for(var d=0;d<s.length;d++){var f=r[c][s[d]];n=n.replace(wrapVar(TPL_VAR_ALIAS[d],c),a?encodeHTML(f):f)}return n}function formatTplSimple(n,r,a){return each$f(r,function(o,s){n=n.replace("{"+s+"}",o)}),n}function getTooltipMarker(n,r){var a=isString(n)?{color:n,extraCssText:r}:n||{},o=a.color,s=a.type;r=a.extraCssText;var l=a.renderMode||"html";if(!o)return"";if(l==="html")return s==="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(o)+";"+(r||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+encodeHTML(o)+";"+(r||"")+'"></span>';var u=a.markerId||"markerX";return{renderMode:l,content:"{"+u+"|} ",style:s==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:o}:{width:10,height:10,borderRadius:5,backgroundColor:o}}}function formatTime(n,r,a){(n==="week"||n==="month"||n==="quarter"||n==="half-year"||n==="year")&&(n="MM-dd\nyyyy");var o=parseDate(r),s=a?"getUTC":"get",l=o[s+"FullYear"](),u=o[s+"Month"]()+1,c=o[s+"Date"](),d=o[s+"Hours"](),f=o[s+"Minutes"](),p=o[s+"Seconds"](),v=o[s+"Milliseconds"]();return n=n.replace("MM",pad(u,2)).replace("M",u).replace("yyyy",l).replace("yy",pad(l%100+"",2)).replace("dd",pad(c,2)).replace("d",c).replace("hh",pad(d,2)).replace("h",d).replace("mm",pad(f,2)).replace("m",f).replace("ss",pad(p,2)).replace("s",p).replace("SSS",pad(v,3)),n}function capitalFirst(n){return n&&n.charAt(0).toUpperCase()+n.substr(1)}function convertToColorString(n,r){return r=r||"transparent",isString(n)?n:isObject$3(n)&&n.colorStops&&(n.colorStops[0]||{}).color||r}function windowOpen(n,r){if(r==="_blank"||r==="blank"){var a=window.open();a.opener=null,a.location.href=n}else window.open(n,r)}var each$e=each$f,LOCATION_PARAMS=["left","right","top","bottom","width","height"],HV_NAMES=[["width","left","right"],["height","top","bottom"]];function boxLayout(n,r,a,o,s){var l=0,u=0;o==null&&(o=1/0),s==null&&(s=1/0);var c=0;r.eachChild(function(d,f){var p=d.getBoundingRect(),v=r.childAt(f+1),g=v&&v.getBoundingRect(),y,_;if(n==="horizontal"){var S=p.width+(g?-g.x+p.x:0);y=l+S,y>o||d.newline?(l=0,y=S,u+=c+a,c=p.height):c=Math.max(c,p.height)}else{var b=p.height+(g?-g.y+p.y:0);_=u+b,_>s||d.newline?(l+=c+a,u=0,_=b,c=p.width):c=Math.max(c,p.width)}d.newline||(d.x=l,d.y=u,d.markRedraw(),n==="horizontal"?l=y+a:u=_+a)})}var box=boxLayout;curry$1(boxLayout,"vertical");curry$1(boxLayout,"horizontal");function getAvailableSize(n,r,a){var o=r.width,s=r.height,l=parsePercent(n.left,o),u=parsePercent(n.top,s),c=parsePercent(n.right,o),d=parsePercent(n.bottom,s);return(isNaN(l)||isNaN(parseFloat(n.left)))&&(l=0),(isNaN(c)||isNaN(parseFloat(n.right)))&&(c=o),(isNaN(u)||isNaN(parseFloat(n.top)))&&(u=0),(isNaN(d)||isNaN(parseFloat(n.bottom)))&&(d=s),a=normalizeCssArray(a||0),{width:Math.max(c-l-a[1]-a[3],0),height:Math.max(d-u-a[0]-a[2],0)}}function getLayoutRect(n,r,a){a=normalizeCssArray(a||0);var o=r.width,s=r.height,l=parsePercent(n.left,o),u=parsePercent(n.top,s),c=parsePercent(n.right,o),d=parsePercent(n.bottom,s),f=parsePercent(n.width,o),p=parsePercent(n.height,s),v=a[2]+a[0],g=a[1]+a[3],y=n.aspect;switch(isNaN(f)&&(f=o-c-g-l),isNaN(p)&&(p=s-d-v-u),y!=null&&(isNaN(f)&&isNaN(p)&&(y>o/s?f=o*.8:p=s*.8),isNaN(f)&&(f=y*p),isNaN(p)&&(p=f/y)),isNaN(l)&&(l=o-c-f-g),isNaN(u)&&(u=s-d-p-v),n.left||n.right){case"center":l=o/2-f/2-a[3];break;case"right":l=o-f-g;break}switch(n.top||n.bottom){case"middle":case"center":u=s/2-p/2-a[0];break;case"bottom":u=s-p-v;break}l=l||0,u=u||0,isNaN(f)&&(f=o-g-l-(c||0)),isNaN(p)&&(p=s-v-u-(d||0));var _=new BoundingRect(l+a[3],u+a[0],f,p);return _.margin=a,_}function positionElement(n,r,a,o,s,l){var u=!s||!s.hv||s.hv[0],c=!s||!s.hv||s.hv[1],d=s&&s.boundingMode||"all";if(l=l||n,l.x=n.x,l.y=n.y,!u&&!c)return!1;var f;if(d==="raw")f=n.type==="group"?new BoundingRect(0,0,+r.width||0,+r.height||0):n.getBoundingRect();else if(f=n.getBoundingRect(),n.needLocalTransform()){var p=n.getLocalTransform();f=f.clone(),f.applyTransform(p)}var v=getLayoutRect(defaults$2({width:f.width,height:f.height},r),a,o),g=u?v.x-f.x:0,y=c?v.y-f.y:0;return d==="raw"?(l.x=g,l.y=y):(l.x+=g,l.y+=y),l===n&&n.markRedraw(),!0}function sizeCalculable(n,r){return n[HV_NAMES[r][0]]!=null||n[HV_NAMES[r][1]]!=null&&n[HV_NAMES[r][2]]!=null}function fetchLayoutMode(n){var r=n.layoutMode||n.constructor.layoutMode;return isObject$3(r)?r:r?{type:r}:null}function mergeLayoutParam(n,r,a){var o=a&&a.ignoreSize;!isArray$1(o)&&(o=[o,o]);var s=u(HV_NAMES[0],0),l=u(HV_NAMES[1],1);f(HV_NAMES[0],n,s),f(HV_NAMES[1],n,l);function u(p,v){var g={},y=0,_={},S=0,b=2;if(each$e(p,function(w){_[w]=n[w]}),each$e(p,function(w){c(r,w)&&(g[w]=_[w]=r[w]),d(g,w)&&y++,d(_,w)&&S++}),o[v])return d(r,p[1])?_[p[2]]=null:d(r,p[2])&&(_[p[1]]=null),_;if(S===b||!y)return _;if(y>=b)return g;for(var x=0;x<p.length;x++){var A=p[x];if(!c(g,A)&&c(n,A)){g[A]=n[A];break}}return g}function c(p,v){return p.hasOwnProperty(v)}function d(p,v){return p[v]!=null&&p[v]!=="auto"}function f(p,v,g){each$e(p,function(y){v[y]=g[y]})}}function getLayoutParams(n){return copyLayoutParams({},n)}function copyLayoutParams(n,r){return r&&n&&each$e(LOCATION_PARAMS,function(a){r.hasOwnProperty(a)&&(n[a]=r[a])}),n}var inner$l=makeInner(),ComponentModel=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this,a,o,s)||this;return l.uid=getUID("ec_cpt_model"),l}return r.prototype.init=function(a,o,s){this.mergeDefaultAndTheme(a,s)},r.prototype.mergeDefaultAndTheme=function(a,o){var s=fetchLayoutMode(this),l=s?getLayoutParams(a):{},u=o.getTheme();merge(a,u.get(this.mainType)),merge(a,this.getDefaultOption()),s&&mergeLayoutParam(a,l,s)},r.prototype.mergeOption=function(a,o){merge(this.option,a,!0);var s=fetchLayoutMode(this);s&&mergeLayoutParam(this.option,a,s)},r.prototype.optionUpdated=function(a,o){},r.prototype.getDefaultOption=function(){var a=this.constructor;if(!isExtendedClass(a))return a.defaultOption;var o=inner$l(this);if(!o.defaultOption){for(var s=[],l=a;l;){var u=l.prototype.defaultOption;u&&s.push(u),l=l.superClass}for(var c={},d=s.length-1;d>=0;d--)c=merge(c,s[d],!0);o.defaultOption=c}return o.defaultOption},r.prototype.getReferringComponents=function(a,o){var s=a+"Index",l=a+"Id";return queryReferringComponents(this.ecModel,a,{index:this.get(s,!0),id:this.get(l,!0)},o)},r.prototype.getBoxLayoutParams=function(){var a=this;return{left:a.get("left"),top:a.get("top"),right:a.get("right"),bottom:a.get("bottom"),width:a.get("width"),height:a.get("height")}},r.prototype.getZLevelKey=function(){return""},r.prototype.setZLevel=function(a){this.option.zlevel=a},r.protoInitialize=function(){var a=r.prototype;a.type="component",a.id="",a.name="",a.mainType="",a.subType="",a.componentIndex=0}(),r}(Model);mountExtend(ComponentModel,Model);enableClassManagement(ComponentModel);enableSubTypeDefaulter(ComponentModel);enableTopologicalTravel(ComponentModel,getDependencies);function getDependencies(n){var r=[];return each$f(ComponentModel.getClassesByMainType(n),function(a){r=r.concat(a.dependencies||a.prototype.dependencies||[])}),r=map$1(r,function(a){return parseClassType(a).main}),n!=="dataset"&&indexOf(r,"dataset")<=0&&r.unshift("dataset"),r}var platform="";typeof navigator<"u"&&(platform=navigator.platform||"");var decalColor="rgba(0, 0, 0, 0.2)";const globalDefault={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],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(n){innerGlobalModel(n).datasetMap=createHashMap()}function makeSeriesEncodeForAxisCoordSys(n,r,a){var o={},s=querySeriesUpstreamDatasetModel(r);if(!s||!n)return o;var l=[],u=[],c=r.ecModel,d=innerGlobalModel(c).datasetMap,f=s.uid+"_"+a.seriesLayoutBy,p,v;n=n.slice(),each$f(n,function(S,b){var x=isObject$3(S)?S:n[b]={name:S};x.type==="ordinal"&&p==null&&(p=b,v=_(x)),o[x.name]=[]});var g=d.get(f)||d.set(f,{categoryWayDim:v,valueWayDim:0});each$f(n,function(S,b){var x=S.name,A=_(S);if(p==null){var w=g.valueWayDim;y(o[x],w,A),y(u,w,A),g.valueWayDim+=A}else if(p===b)y(o[x],0,A),y(l,0,A);else{var w=g.categoryWayDim;y(o[x],w,A),y(u,w,A),g.categoryWayDim+=A}});function y(S,b,x){for(var A=0;A<x;A++)S.push(b+A)}function _(S){var b=S.dimsDef;return b?b.length:1}return l.length&&(o.itemName=l),u.length&&(o.seriesName=u),o}function makeSeriesEncodeForNameBased(n,r,a){var o={},s=querySeriesUpstreamDatasetModel(n);if(!s)return o;var l=r.sourceFormat,u=r.dimensionsDefine,c;(l===SOURCE_FORMAT_OBJECT_ROWS||l===SOURCE_FORMAT_KEYED_COLUMNS)&&each$f(u,function(p,v){(isObject$3(p)?p.name:p)==="name"&&(c=v)});var d=function(){for(var p={},v={},g=[],y=0,_=Math.min(5,a);y<_;y++){var S=doGuessOrdinal(r.data,l,r.seriesLayoutBy,u,r.startIndex,y);g.push(S);var b=S===BE_ORDINAL.Not;if(b&&p.v==null&&y!==c&&(p.v=y),(p.n==null||p.n===p.v||!b&&g[p.n]===BE_ORDINAL.Not)&&(p.n=y),x(p)&&g[p.n]!==BE_ORDINAL.Not)return p;b||(S===BE_ORDINAL.Might&&v.v==null&&y!==c&&(v.v=y),(v.n==null||v.n===v.v)&&(v.n=y))}function x(A){return A.v!=null&&A.n!=null}return x(p)?p:x(v)?v:null}();if(d){o.value=[d.v];var f=c!=null?c:d.n;o.itemName=[f],o.seriesName=[f]}return o}function querySeriesUpstreamDatasetModel(n){var r=n.get("data",!0);if(!r)return queryReferringComponents(n.ecModel,"dataset",{index:n.get("datasetIndex",!0),id:n.get("datasetId",!0)},SINGLE_REFERRING).models[0]}function queryDatasetUpstreamDatasetModels(n){return!n.get("transform",!0)&&!n.get("fromTransformResult",!0)?[]:queryReferringComponents(n.ecModel,"dataset",{index:n.get("fromDatasetIndex",!0),id:n.get("fromDatasetId",!0)},SINGLE_REFERRING).models}function guessOrdinal(n,r){return doGuessOrdinal(n.data,n.sourceFormat,n.seriesLayoutBy,n.dimensionsDefine,n.startIndex,r)}function doGuessOrdinal(n,r,a,o,s,l){var u,c=5;if(isTypedArray(n))return BE_ORDINAL.Not;var d,f;if(o){var p=o[l];isObject$3(p)?(d=p.name,f=p.type):isString(p)&&(d=p)}if(f!=null)return f==="ordinal"?BE_ORDINAL.Must:BE_ORDINAL.Not;if(r===SOURCE_FORMAT_ARRAY_ROWS){var v=n;if(a===SERIES_LAYOUT_BY_ROW){for(var g=v[l],y=0;y<(g||[]).length&&y<c;y++)if((u=E(g[s+y]))!=null)return u}else for(var y=0;y<v.length&&y<c;y++){var _=v[s+y];if(_&&(u=E(_[l]))!=null)return u}}else if(r===SOURCE_FORMAT_OBJECT_ROWS){var S=n;if(!d)return BE_ORDINAL.Not;for(var y=0;y<S.length&&y<c;y++){var b=S[y];if(b&&(u=E(b[d]))!=null)return u}}else if(r===SOURCE_FORMAT_KEYED_COLUMNS){var x=n;if(!d)return BE_ORDINAL.Not;var g=x[d];if(!g||isTypedArray(g))return BE_ORDINAL.Not;for(var y=0;y<g.length&&y<c;y++)if((u=E(g[y]))!=null)return u}else if(r===SOURCE_FORMAT_ORIGINAL)for(var A=n,y=0;y<A.length&&y<c;y++){var b=A[y],w=getDataItemValue(b);if(!isArray$1(w))return BE_ORDINAL.Not;if((u=E(w[l]))!=null)return u}function E(D){var C=isString(D);if(D!=null&&Number.isFinite(Number(D))&&D!=="")return C?BE_ORDINAL.Might:BE_ORDINAL.Not;if(C&&D!=="-")return BE_ORDINAL.Must}return BE_ORDINAL.Not}var internalOptionCreatorMap=createHashMap();function registerInternalOptionCreator(n,r){assert(internalOptionCreatorMap.get(n)==null&&r),internalOptionCreatorMap.set(n,r)}function concatInternalOptions(n,r,a){var o=internalOptionCreatorMap.get(r);if(!o)return a;var s=o(n);return s?a.concat(s):a}var innerColor=makeInner(),innerDecal=makeInner(),PaletteMixin=function(){function n(){}return n.prototype.getColorFromPalette=function(r,a,o){var s=normalizeToArray(this.get("color",!0)),l=this.get("colorLayer",!0);return getFromPalette(this,innerColor,s,l,r,a,o)},n.prototype.clearColorPalette=function(){clearPalette(this,innerColor)},n}();function getDecalFromPalette(n,r,a,o){var s=normalizeToArray(n.get(["aria","decal","decals"]));return getFromPalette(n,innerDecal,s,null,r,a,o)}function getNearestPalette(n,r){for(var a=n.length,o=0;o<a;o++)if(n[o].length>r)return n[o];return n[a-1]}function getFromPalette(n,r,a,o,s,l,u){l=l||n;var c=r(l),d=c.paletteIdx||0,f=c.paletteNameMap=c.paletteNameMap||{};if(f.hasOwnProperty(s))return f[s];var p=u==null||!o?a:getNearestPalette(o,u);if(p=p||a,!(!p||!p.length)){var v=p[d];return s&&(f[s]=v),c.paletteIdx=(d+1)%p.length,v}}function clearPalette(n,r){r(n).paletteIdx=0,r(n).paletteNameMap={}}var reCreateSeriesIndices,assertSeriesInitialized,initBase,OPTION_INNER_KEY="\0_ec_inner",OPTION_INNER_VALUE=1,GlobalModel=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.init=function(a,o,s,l,u,c){l=l||{},this.option=null,this._theme=new Model(l),this._locale=new Model(u),this._optionManager=c},r.prototype.setOption=function(a,o,s){var l=normalizeSetOptionInput(o);this._optionManager.setOption(a,s,l),this._resetOption(null,l)},r.prototype.resetOption=function(a,o){return this._resetOption(a,normalizeSetOptionInput(o))},r.prototype._resetOption=function(a,o){var s=!1,l=this._optionManager;if(!a||a==="recreate"){var u=l.mountOption(a==="recreate");!this.option||a==="recreate"?initBase(this,u):(this.restoreData(),this._mergeOption(u,o)),s=!0}if((a==="timeline"||a==="media")&&this.restoreData(),!a||a==="recreate"||a==="timeline"){var c=l.getTimelineOption(this);c&&(s=!0,this._mergeOption(c,o))}if(!a||a==="recreate"||a==="media"){var d=l.getMediaOption(this);d.length&&each$f(d,function(f){s=!0,this._mergeOption(f,o)},this)}return s},r.prototype.mergeOption=function(a){this._mergeOption(a,null)},r.prototype._mergeOption=function(a,o){var s=this.option,l=this._componentsMap,u=this._componentsCount,c=[],d=createHashMap(),f=o&&o.replaceMergeMainTypeMap;resetSourceDefaulter(this),each$f(a,function(v,g){v!=null&&(ComponentModel.hasClass(g)?g&&(c.push(g),d.set(g,!0)):s[g]=s[g]==null?clone$6(v):merge(s[g],v,!0))}),f&&f.each(function(v,g){ComponentModel.hasClass(g)&&!d.get(g)&&(c.push(g),d.set(g,!0))}),ComponentModel.topologicalTravel(c,ComponentModel.getAllClassMainTypes(),p,this);function p(v){var g=concatInternalOptions(this,v,normalizeToArray(a[v])),y=l.get(v),_=y?f&&f.get(v)?"replaceMerge":"normalMerge":"replaceAll",S=mappingToExists(y,g,_);setComponentTypeToKeyInfo(S,v,ComponentModel),s[v]=null,l.set(v,null),u.set(v,0);var b=[],x=[],A=0,w;each$f(S,function(E,D){var C=E.existing,$=E.newOption;if(!$)C&&(C.mergeOption({},this),C.optionUpdated({},!1));else{var P=v==="series",M=ComponentModel.getClass(v,E.keyInfo.subType,!P);if(!M)return;if(v==="tooltip"){if(w)return;w=!0}if(C&&C.constructor===M)C.name=E.keyInfo.name,C.mergeOption($,this),C.optionUpdated($,!1);else{var I=extend$2({componentIndex:D},E.keyInfo);C=new M($,this,this,I),extend$2(C,I),E.brandNew&&(C.__requireNewView=!0),C.init($,this,this),C.optionUpdated(null,!0)}}C?(b.push(C.option),x.push(C),A++):(b.push(void 0),x.push(void 0))},this),s[v]=b,l.set(v,x),u.set(v,A),v==="series"&&reCreateSeriesIndices(this)}this._seriesIndices||reCreateSeriesIndices(this)},r.prototype.getOption=function(){var a=clone$6(this.option);return each$f(a,function(o,s){if(ComponentModel.hasClass(s)){for(var l=normalizeToArray(o),u=l.length,c=!1,d=u-1;d>=0;d--)l[d]&&!isComponentIdInternal(l[d])?c=!0:(l[d]=null,!c&&u--);l.length=u,a[s]=l}}),delete a[OPTION_INNER_KEY],a},r.prototype.getTheme=function(){return this._theme},r.prototype.getLocaleModel=function(){return this._locale},r.prototype.setUpdatePayload=function(a){this._payload=a},r.prototype.getUpdatePayload=function(){return this._payload},r.prototype.getComponent=function(a,o){var s=this._componentsMap.get(a);if(s){var l=s[o||0];if(l)return l;if(o==null){for(var u=0;u<s.length;u++)if(s[u])return s[u]}}},r.prototype.queryComponents=function(a){var o=a.mainType;if(!o)return[];var s=a.index,l=a.id,u=a.name,c=this._componentsMap.get(o);if(!c||!c.length)return[];var d;return s!=null?(d=[],each$f(normalizeToArray(s),function(f){c[f]&&d.push(c[f])})):l!=null?d=queryByIdOrName("id",l,c):u!=null?d=queryByIdOrName("name",u,c):d=filter(c,function(f){return!!f}),filterBySubType(d,a)},r.prototype.findComponents=function(a){var o=a.query,s=a.mainType,l=c(o),u=l?this.queryComponents(l):filter(this._componentsMap.get(s),function(f){return!!f});return d(filterBySubType(u,a));function c(f){var p=s+"Index",v=s+"Id",g=s+"Name";return f&&(f[p]!=null||f[v]!=null||f[g]!=null)?{mainType:s,index:f[p],id:f[v],name:f[g]}:null}function d(f){return a.filter?filter(f,a.filter):f}},r.prototype.eachComponent=function(a,o,s){var l=this._componentsMap;if(isFunction(a)){var u=o,c=a;l.each(function(v,g){for(var y=0;v&&y<v.length;y++){var _=v[y];_&&c.call(u,g,_,_.componentIndex)}})}else for(var d=isString(a)?l.get(a):isObject$3(a)?this.findComponents(a):null,f=0;d&&f<d.length;f++){var p=d[f];p&&o.call(s,p,p.componentIndex)}},r.prototype.getSeriesByName=function(a){var o=convertOptionIdName(a,null);return filter(this._componentsMap.get("series"),function(s){return!!s&&o!=null&&s.name===o})},r.prototype.getSeriesByIndex=function(a){return this._componentsMap.get("series")[a]},r.prototype.getSeriesByType=function(a){return filter(this._componentsMap.get("series"),function(o){return!!o&&o.subType===a})},r.prototype.getSeries=function(){return filter(this._componentsMap.get("series"),function(a){return!!a})},r.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},r.prototype.eachSeries=function(a,o){assertSeriesInitialized(this),each$f(this._seriesIndices,function(s){var l=this._componentsMap.get("series")[s];a.call(o,l,s)},this)},r.prototype.eachRawSeries=function(a,o){each$f(this._componentsMap.get("series"),function(s){s&&a.call(o,s,s.componentIndex)})},r.prototype.eachSeriesByType=function(a,o,s){assertSeriesInitialized(this),each$f(this._seriesIndices,function(l){var u=this._componentsMap.get("series")[l];u.subType===a&&o.call(s,u,l)},this)},r.prototype.eachRawSeriesByType=function(a,o,s){return each$f(this.getSeriesByType(a),o,s)},r.prototype.isSeriesFiltered=function(a){return assertSeriesInitialized(this),this._seriesIndicesMap.get(a.componentIndex)==null},r.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},r.prototype.filterSeries=function(a,o){assertSeriesInitialized(this);var s=[];each$f(this._seriesIndices,function(l){var u=this._componentsMap.get("series")[l];a.call(o,u,l)&&s.push(l)},this),this._seriesIndices=s,this._seriesIndicesMap=createHashMap(s)},r.prototype.restoreData=function(a){reCreateSeriesIndices(this);var o=this._componentsMap,s=[];o.each(function(l,u){ComponentModel.hasClass(u)&&s.push(u)}),ComponentModel.topologicalTravel(s,ComponentModel.getAllClassMainTypes(),function(l){each$f(o.get(l),function(u){u&&(l!=="series"||!isNotTargetSeries(u,a))&&u.restoreData()})})},r.internalField=function(){reCreateSeriesIndices=function(a){var o=a._seriesIndices=[];each$f(a._componentsMap.get("series"),function(s){s&&o.push(s.componentIndex)}),a._seriesIndicesMap=createHashMap(o)},assertSeriesInitialized=function(a){},initBase=function(a,o){a.option={},a.option[OPTION_INNER_KEY]=OPTION_INNER_VALUE,a._componentsMap=createHashMap({series:[]}),a._componentsCount=createHashMap();var s=o.aria;isObject$3(s)&&s.enabled==null&&(s.enabled=!0),mergeTheme(o,a._theme.option),merge(o,globalDefault,!1),a._mergeOption(o,null)}}(),r}(Model);function isNotTargetSeries(n,r){if(r){var a=r.seriesIndex,o=r.seriesId,s=r.seriesName;return a!=null&&n.componentIndex!==a||o!=null&&n.id!==o||s!=null&&n.name!==s}}function mergeTheme(n,r){var a=n.color&&!n.colorLayer;each$f(r,function(o,s){s==="colorLayer"&&a||ComponentModel.hasClass(s)||(typeof o=="object"?n[s]=n[s]?merge(n[s],o,!1):clone$6(o):n[s]==null&&(n[s]=o))})}function queryByIdOrName(n,r,a){if(isArray$1(r)){var o=createHashMap();return each$f(r,function(l){if(l!=null){var u=convertOptionIdName(l,null);u!=null&&o.set(l,!0)}}),filter(a,function(l){return l&&o.get(l[n])})}else{var s=convertOptionIdName(r,null);return filter(a,function(l){return l&&s!=null&&l[n]===s})}}function filterBySubType(n,r){return r.hasOwnProperty("subType")?filter(n,function(a){return a&&a.subType===r.subType}):n}function normalizeSetOptionInput(n){var r=createHashMap();return n&&each$f(normalizeToArray(n.replaceMerge),function(a){r.set(a,!0)}),{replaceMergeMainTypeMap:r}}mixin(GlobalModel,PaletteMixin);var availableMethods=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],ExtensionAPI=function(){function n(r){each$f(availableMethods,function(a){this[a]=bind$1(r[a],r)},this)}return n}(),coordinateSystemCreators={},CoordinateSystemManager=function(){function n(){this._coordinateSystems=[]}return n.prototype.create=function(r,a){var o=[];each$f(coordinateSystemCreators,function(s,l){var u=s.create(r,a);o=o.concat(u||[])}),this._coordinateSystems=o},n.prototype.update=function(r,a){each$f(this._coordinateSystems,function(o){o.update&&o.update(r,a)})},n.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},n.register=function(r,a){coordinateSystemCreators[r]=a},n.get=function(r){return coordinateSystemCreators[r]},n}(),QUERY_REG=/^(min|max)?(.+)$/,OptionManager=function(){function n(r){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=r}return n.prototype.setOption=function(r,a,o){r&&(each$f(normalizeToArray(r.series),function(u){u&&u.data&&isTypedArray(u.data)&&setAsPrimitive(u.data)}),each$f(normalizeToArray(r.dataset),function(u){u&&u.source&&isTypedArray(u.source)&&setAsPrimitive(u.source)})),r=clone$6(r);var s=this._optionBackup,l=parseRawOption(r,a,!s);this._newBaseOption=l.baseOption,s?(l.timelineOptions.length&&(s.timelineOptions=l.timelineOptions),l.mediaList.length&&(s.mediaList=l.mediaList),l.mediaDefault&&(s.mediaDefault=l.mediaDefault)):this._optionBackup=l},n.prototype.mountOption=function(r){var a=this._optionBackup;return this._timelineOptions=a.timelineOptions,this._mediaList=a.mediaList,this._mediaDefault=a.mediaDefault,this._currentMediaIndices=[],clone$6(r?a.baseOption:this._newBaseOption)},n.prototype.getTimelineOption=function(r){var a,o=this._timelineOptions;if(o.length){var s=r.getComponent("timeline");s&&(a=clone$6(o[s.getCurrentIndex()]))}return a},n.prototype.getMediaOption=function(r){var a=this._api.getWidth(),o=this._api.getHeight(),s=this._mediaList,l=this._mediaDefault,u=[],c=[];if(!s.length&&!l)return c;for(var d=0,f=s.length;d<f;d++)applyMediaQuery(s[d].query,a,o)&&u.push(d);return!u.length&&l&&(u=[-1]),u.length&&!indicesEquals(u,this._currentMediaIndices)&&(c=map$1(u,function(p){return clone$6(p===-1?l.option:s[p].option)})),this._currentMediaIndices=u,c},n}();function parseRawOption(n,r,a){var o=[],s,l,u=n.baseOption,c=n.timeline,d=n.options,f=n.media,p=!!n.media,v=!!(d||c||u&&u.timeline);u?(l=u,l.timeline||(l.timeline=c)):((v||p)&&(n.options=n.media=null),l=n),p&&isArray$1(f)&&each$f(f,function(y){y&&y.option&&(y.query?o.push(y):s||(s=y))}),g(l),each$f(d,function(y){return g(y)}),each$f(o,function(y){return g(y.option)});function g(y){each$f(r,function(_){_(y,a)})}return{baseOption:l,timelineOptions:d||[],mediaDefault:s,mediaList:o}}function applyMediaQuery(n,r,a){var o={width:r,height:a,aspectratio:r/a},s=!0;return each$f(n,function(l,u){var c=u.match(QUERY_REG);if(!(!c||!c[1]||!c[2])){var d=c[1],f=c[2].toLowerCase();compare(o[f],l,d)||(s=!1)}}),s}function compare(n,r,a){return a==="min"?n>=r:a==="max"?n<=r:n===r}function indicesEquals(n,r){return n.join(",")===r.join(",")}var each$d=each$f,isObject$2=isObject$3,POSSIBLE_STYLES=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function compatEC2ItemStyle(n){var r=n&&n.itemStyle;if(r)for(var a=0,o=POSSIBLE_STYLES.length;a<o;a++){var s=POSSIBLE_STYLES[a],l=r.normal,u=r.emphasis;l&&l[s]&&(n[s]=n[s]||{},n[s].normal?merge(n[s].normal,l[s]):n[s].normal=l[s],l[s]=null),u&&u[s]&&(n[s]=n[s]||{},n[s].emphasis?merge(n[s].emphasis,u[s]):n[s].emphasis=u[s],u[s]=null)}}function convertNormalEmphasis(n,r,a){if(n&&n[r]&&(n[r].normal||n[r].emphasis)){var o=n[r].normal,s=n[r].emphasis;o&&(a?(n[r].normal=n[r].emphasis=null,defaults$2(n[r],o)):n[r]=o),s&&(n.emphasis=n.emphasis||{},n.emphasis[r]=s,s.focus&&(n.emphasis.focus=s.focus),s.blurScope&&(n.emphasis.blurScope=s.blurScope))}}function removeEC3NormalStatus(n){convertNormalEmphasis(n,"itemStyle"),convertNormalEmphasis(n,"lineStyle"),convertNormalEmphasis(n,"areaStyle"),convertNormalEmphasis(n,"label"),convertNormalEmphasis(n,"labelLine"),convertNormalEmphasis(n,"upperLabel"),convertNormalEmphasis(n,"edgeLabel")}function compatTextStyle(n,r){var a=isObject$2(n)&&n[r],o=isObject$2(a)&&a.textStyle;if(o)for(var s=0,l=TEXT_STYLE_OPTIONS.length;s<l;s++){var u=TEXT_STYLE_OPTIONS[s];o.hasOwnProperty(u)&&(a[u]=o[u])}}function compatEC3CommonStyles(n){n&&(removeEC3NormalStatus(n),compatTextStyle(n,"label"),n.emphasis&&compatTextStyle(n.emphasis,"label"))}function processSeries(n){if(isObject$2(n)){compatEC2ItemStyle(n),removeEC3NormalStatus(n),compatTextStyle(n,"label"),compatTextStyle(n,"upperLabel"),compatTextStyle(n,"edgeLabel"),n.emphasis&&(compatTextStyle(n.emphasis,"label"),compatTextStyle(n.emphasis,"upperLabel"),compatTextStyle(n.emphasis,"edgeLabel"));var r=n.markPoint;r&&(compatEC2ItemStyle(r),compatEC3CommonStyles(r));var a=n.markLine;a&&(compatEC2ItemStyle(a),compatEC3CommonStyles(a));var o=n.markArea;o&&compatEC3CommonStyles(o);var s=n.data;if(n.type==="graph"){s=s||n.nodes;var l=n.links||n.edges;if(l&&!isTypedArray(l))for(var u=0;u<l.length;u++)compatEC3CommonStyles(l[u]);each$f(n.categories,function(f){removeEC3NormalStatus(f)})}if(s&&!isTypedArray(s))for(var u=0;u<s.length;u++)compatEC3CommonStyles(s[u]);if(r=n.markPoint,r&&r.data)for(var c=r.data,u=0;u<c.length;u++)compatEC3CommonStyles(c[u]);if(a=n.markLine,a&&a.data)for(var d=a.data,u=0;u<d.length;u++)isArray$1(d[u])?(compatEC3CommonStyles(d[u][0]),compatEC3CommonStyles(d[u][1])):compatEC3CommonStyles(d[u]);n.type==="gauge"?(compatTextStyle(n,"axisLabel"),compatTextStyle(n,"title"),compatTextStyle(n,"detail")):n.type==="treemap"?(convertNormalEmphasis(n.breadcrumb,"itemStyle"),each$f(n.levels,function(f){removeEC3NormalStatus(f)})):n.type==="tree"&&removeEC3NormalStatus(n.leaves)}}function toArr(n){return isArray$1(n)?n:n?[n]:[]}function toObj(n){return(isArray$1(n)?n[0]:n)||{}}function globalCompatStyle(n,r){each$d(toArr(n.series),function(o){isObject$2(o)&&processSeries(o)});var a=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];r&&a.push("valueAxis","categoryAxis","logAxis","timeAxis"),each$d(a,function(o){each$d(toArr(n[o]),function(s){s&&(compatTextStyle(s,"axisLabel"),compatTextStyle(s.axisPointer,"label"))})}),each$d(toArr(n.parallel),function(o){var s=o&&o.parallelAxisDefault;compatTextStyle(s,"axisLabel"),compatTextStyle(s&&s.axisPointer,"label")}),each$d(toArr(n.calendar),function(o){convertNormalEmphasis(o,"itemStyle"),compatTextStyle(o,"dayLabel"),compatTextStyle(o,"monthLabel"),compatTextStyle(o,"yearLabel")}),each$d(toArr(n.radar),function(o){compatTextStyle(o,"name"),o.name&&o.axisName==null&&(o.axisName=o.name,delete o.name),o.nameGap!=null&&o.axisNameGap==null&&(o.axisNameGap=o.nameGap,delete o.nameGap)}),each$d(toArr(n.geo),function(o){isObject$2(o)&&(compatEC3CommonStyles(o),each$d(toArr(o.regions),function(s){compatEC3CommonStyles(s)}))}),each$d(toArr(n.timeline),function(o){compatEC3CommonStyles(o),convertNormalEmphasis(o,"label"),convertNormalEmphasis(o,"itemStyle"),convertNormalEmphasis(o,"controlStyle",!0);var s=o.data;isArray$1(s)&&each$f(s,function(l){isObject$3(l)&&(convertNormalEmphasis(l,"label"),convertNormalEmphasis(l,"itemStyle"))})}),each$d(toArr(n.toolbox),function(o){convertNormalEmphasis(o,"iconStyle"),each$d(o.feature,function(s){convertNormalEmphasis(s,"iconStyle")})}),compatTextStyle(toObj(n.axisPointer),"label"),compatTextStyle(toObj(n.tooltip).axisPointer,"label")}function get(n,r){for(var a=r.split(","),o=n,s=0;s<a.length&&(o=o&&o[a[s]],o!=null);s++);return o}function set(n,r,a,o){for(var s=r.split(","),l=n,u,c=0;c<s.length-1;c++)u=s[c],l[u]==null&&(l[u]={}),l=l[u];l[s[c]]==null&&(l[s[c]]=a)}function compatLayoutProperties(n){n&&each$f(LAYOUT_PROPERTIES,function(r){r[0]in n&&!(r[1]in n)&&(n[r[1]]=n[r[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(n){var r=n&&n.itemStyle;if(r)for(var a=0;a<BAR_ITEM_STYLE_MAP.length;a++){var o=BAR_ITEM_STYLE_MAP[a][1],s=BAR_ITEM_STYLE_MAP[a][0];r[o]!=null&&(r[s]=r[o])}}function compatPieLabel(n){n&&n.alignTo==="edge"&&n.margin!=null&&n.edgeDistance==null&&(n.edgeDistance=n.margin)}function compatSunburstState(n){n&&n.downplay&&!n.blur&&(n.blur=n.downplay)}function compatGraphFocus(n){n&&n.focusNodeAdjacency!=null&&(n.emphasis=n.emphasis||{},n.emphasis.focus==null&&(n.emphasis.focus="adjacency"))}function traverseTree(n,r){if(n)for(var a=0;a<n.length;a++)r(n[a]),n[a]&&traverseTree(n[a].children,r)}function globalBackwardCompat(n,r){globalCompatStyle(n,r),n.series=normalizeToArray(n.series),each$f(n.series,function(a){if(isObject$3(a)){var o=a.type;if(o==="line")a.clipOverflow!=null&&(a.clip=a.clipOverflow);else if(o==="pie"||o==="gauge"){a.clockWise!=null&&(a.clockwise=a.clockWise),compatPieLabel(a.label);var s=a.data;if(s&&!isTypedArray(s))for(var l=0;l<s.length;l++)compatPieLabel(s[l]);a.hoverOffset!=null&&(a.emphasis=a.emphasis||{},(a.emphasis.scaleSize=null)&&(a.emphasis.scaleSize=a.hoverOffset))}else if(o==="gauge"){var u=get(a,"pointer.color");u!=null&&set(a,"itemStyle.color",u)}else if(o==="bar"){compatBarItemStyle(a),compatBarItemStyle(a.backgroundStyle),compatBarItemStyle(a.emphasis);var s=a.data;if(s&&!isTypedArray(s))for(var l=0;l<s.length;l++)typeof s[l]=="object"&&(compatBarItemStyle(s[l]),compatBarItemStyle(s[l]&&s[l].emphasis))}else if(o==="sunburst"){var c=a.highlightPolicy;c&&(a.emphasis=a.emphasis||{},a.emphasis.focus||(a.emphasis.focus=c)),compatSunburstState(a),traverseTree(a.data,compatSunburstState)}else o==="graph"||o==="sankey"?compatGraphFocus(a):o==="map"&&(a.mapType&&!a.map&&(a.map=a.mapType),a.mapLocation&&defaults$2(a,a.mapLocation));a.hoverAnimation!=null&&(a.emphasis=a.emphasis||{},a.emphasis&&a.emphasis.scale==null&&(a.emphasis.scale=a.hoverAnimation)),compatLayoutProperties(a)}}),n.dataRange&&(n.visualMap=n.dataRange),each$f(COMPATITABLE_COMPONENTS,function(a){var o=n[a];o&&(isArray$1(o)||(o=[o]),each$f(o,function(s){compatLayoutProperties(s)}))})}function dataStack$1(n){var r=createHashMap();n.eachSeries(function(a){var o=a.get("stack");if(o){var s=r.get(o)||r.set(o,[]),l=a.getData(),u={stackResultDimension:l.getCalculationInfo("stackResultDimension"),stackedOverDimension:l.getCalculationInfo("stackedOverDimension"),stackedDimension:l.getCalculationInfo("stackedDimension"),stackedByDimension:l.getCalculationInfo("stackedByDimension"),isStackedByIndex:l.getCalculationInfo("isStackedByIndex"),data:l,seriesModel:a};if(!u.stackedDimension||!(u.isStackedByIndex||u.stackedByDimension))return;s.length&&l.setCalculationInfo("stackedOnSeries",s[s.length-1].seriesModel),s.push(u)}}),r.each(calculateStack)}function calculateStack(n){each$f(n,function(r,a){var o=[],s=[NaN,NaN],l=[r.stackResultDimension,r.stackedOverDimension],u=r.data,c=r.isStackedByIndex,d=r.seriesModel.get("stackStrategy")||"samesign";u.modify(l,function(f,p,v){var g=u.get(r.stackedDimension,v);if(isNaN(g))return s;var y,_;c?_=u.getRawIndex(v):y=u.get(r.stackedByDimension,v);for(var S=NaN,b=a-1;b>=0;b--){var x=n[b];if(c||(_=x.data.rawIndexOf(x.stackedByDimension,y)),_>=0){var A=x.data.getByRawIndex(x.stackResultDimension,_);if(d==="all"||d==="positive"&&A>0||d==="negative"&&A<0||d==="samesign"&&g>=0&&A>0||d==="samesign"&&g<=0&&A<0){g=addSafe(g,A),S=A;break}}}return o[0]=g,o[1]=S,o})})}var SourceImpl=function(){function n(r){this.data=r.data||(r.sourceFormat===SOURCE_FORMAT_KEYED_COLUMNS?{}:[]),this.sourceFormat=r.sourceFormat||SOURCE_FORMAT_UNKNOWN,this.seriesLayoutBy=r.seriesLayoutBy||SERIES_LAYOUT_BY_COLUMN,this.startIndex=r.startIndex||0,this.dimensionsDetectedCount=r.dimensionsDetectedCount,this.metaRawOption=r.metaRawOption;var a=this.dimensionsDefine=r.dimensionsDefine;if(a)for(var o=0;o<a.length;o++){var s=a[o];s.type==null&&guessOrdinal(this,o)===BE_ORDINAL.Must&&(s.type="ordinal")}}return n}();function isSourceInstance(n){return n instanceof SourceImpl}function createSource(n,r,a){a=a||detectSourceFormat(n);var o=r.seriesLayoutBy,s=determineSourceDimensions(n,a,o,r.sourceHeader,r.dimensions),l=new SourceImpl({data:n,sourceFormat:a,seriesLayoutBy:o,dimensionsDefine:s.dimensionsDefine,startIndex:s.startIndex,dimensionsDetectedCount:s.dimensionsDetectedCount,metaRawOption:clone$6(r)});return l}function createSourceFromSeriesDataOption(n){return new SourceImpl({data:n,sourceFormat:isTypedArray(n)?SOURCE_FORMAT_TYPED_ARRAY:SOURCE_FORMAT_ORIGINAL})}function cloneSourceShallow(n){return new SourceImpl({data:n.data,sourceFormat:n.sourceFormat,seriesLayoutBy:n.seriesLayoutBy,dimensionsDefine:clone$6(n.dimensionsDefine),startIndex:n.startIndex,dimensionsDetectedCount:n.dimensionsDetectedCount})}function detectSourceFormat(n){var r=SOURCE_FORMAT_UNKNOWN;if(isTypedArray(n))r=SOURCE_FORMAT_TYPED_ARRAY;else if(isArray$1(n)){n.length===0&&(r=SOURCE_FORMAT_ARRAY_ROWS);for(var a=0,o=n.length;a<o;a++){var s=n[a];if(s!=null){if(isArray$1(s)||isTypedArray(s)){r=SOURCE_FORMAT_ARRAY_ROWS;break}else if(isObject$3(s)){r=SOURCE_FORMAT_OBJECT_ROWS;break}}}}else if(isObject$3(n)){for(var l in n)if(hasOwn(n,l)&&isArrayLike(n[l])){r=SOURCE_FORMAT_KEYED_COLUMNS;break}}return r}function determineSourceDimensions(n,r,a,o,s){var l,u;if(!n)return{dimensionsDefine:normalizeDimensionsOption(s),startIndex:u,dimensionsDetectedCount:l};if(r===SOURCE_FORMAT_ARRAY_ROWS){var c=n;o==="auto"||o==null?arrayRowsTravelFirst(function(f){f!=null&&f!=="-"&&(isString(f)?u==null&&(u=1):u=0)},a,c,10):u=isNumber(o)?o:o?1:0,!s&&u===1&&(s=[],arrayRowsTravelFirst(function(f,p){s[p]=f!=null?f+"":""},a,c,1/0)),l=s?s.length:a===SERIES_LAYOUT_BY_ROW?c.length:c[0]?c[0].length:null}else if(r===SOURCE_FORMAT_OBJECT_ROWS)s||(s=objectRowsCollectDimensions(n));else if(r===SOURCE_FORMAT_KEYED_COLUMNS)s||(s=[],each$f(n,function(f,p){s.push(p)}));else if(r===SOURCE_FORMAT_ORIGINAL){var d=getDataItemValue(n[0]);l=isArray$1(d)&&d.length||1}return{startIndex:u,dimensionsDefine:normalizeDimensionsOption(s),dimensionsDetectedCount:l}}function objectRowsCollectDimensions(n){for(var r=0,a;r<n.length&&!(a=n[r++]););if(a)return keys(a)}function normalizeDimensionsOption(n){if(n){var r=createHashMap();return map$1(n,function(a,o){a=isObject$3(a)?a:{name:a};var s={name:a.name,displayName:a.displayName,type:a.type};if(s.name==null)return s;s.name+="",s.displayName==null&&(s.displayName=s.name);var l=r.get(s.name);return l?s.name+="-"+l.count++:r.set(s.name,{count:1}),s})}}function arrayRowsTravelFirst(n,r,a,o){if(r===SERIES_LAYOUT_BY_ROW)for(var s=0;s<a.length&&s<o;s++)n(a[s]?a[s][0]:null,s);else for(var l=a[0]||[],s=0;s<l.length&&s<o;s++)n(l[s],s)}function shouldRetrieveDataByName(n){var r=n.sourceFormat;return r===SOURCE_FORMAT_OBJECT_ROWS||r===SOURCE_FORMAT_KEYED_COLUMNS}var _a,_b,_c,providerMethods,mountMethods,DefaultDataProvider=function(){function n(r,a){var o=isSourceInstance(r)?r:createSourceFromSeriesDataOption(r);this._source=o;var s=this._data=o.data;o.sourceFormat===SOURCE_FORMAT_TYPED_ARRAY&&(this._offset=0,this._dimSize=a,this._data=s),mountMethods(this,s,o)}return n.prototype.getSource=function(){return this._source},n.prototype.count=function(){return 0},n.prototype.getItem=function(r,a){},n.prototype.appendData=function(r){},n.prototype.clean=function(){},n.protoInitialize=function(){var r=n.prototype;r.pure=!1,r.persistent=!0}(),n.internalField=function(){var r;mountMethods=function(u,c,d){var f=d.sourceFormat,p=d.seriesLayoutBy,v=d.startIndex,g=d.dimensionsDefine,y=providerMethods[getMethodMapKey(f,p)];if(extend$2(u,y),f===SOURCE_FORMAT_TYPED_ARRAY)u.getItem=a,u.count=s,u.fillStorage=o;else{var _=getRawSourceItemGetter(f,p);u.getItem=bind$1(_,null,c,v,g);var S=getRawSourceDataCounter(f,p);u.count=bind$1(S,null,c,v,g)}};var a=function(u,c){u=u-this._offset,c=c||[];for(var d=this._data,f=this._dimSize,p=f*u,v=0;v<f;v++)c[v]=d[p+v];return c},o=function(u,c,d,f){for(var p=this._data,v=this._dimSize,g=0;g<v;g++){for(var y=f[g],_=y[0]==null?1/0:y[0],S=y[1]==null?-1/0:y[1],b=c-u,x=d[g],A=0;A<b;A++){var w=p[A*v+g];x[u+A]=w,w<_&&(_=w),w>S&&(S=w)}y[0]=_,y[1]=S}},s=function(){return this._data?this._data.length/this._dimSize:0};providerMethods=(r={},r[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]={pure:!0,appendData:l},r[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},r[SOURCE_FORMAT_OBJECT_ROWS]={pure:!0,appendData:l},r[SOURCE_FORMAT_KEYED_COLUMNS]={pure:!0,appendData:function(u){var c=this._data;each$f(u,function(d,f){for(var p=c[f]||(c[f]=[]),v=0;v<(d||[]).length;v++)p.push(d[v])})}},r[SOURCE_FORMAT_ORIGINAL]={appendData:l},r[SOURCE_FORMAT_TYPED_ARRAY]={persistent:!1,pure:!0,appendData:function(u){this._data=u},clean:function(){this._offset+=this.count(),this._data=null}},r);function l(u){for(var c=0;c<u.length;c++)this._data.push(u[c])}}(),n}(),getItemSimply=function(n,r,a,o){return n[o]},rawSourceItemGetterMap=(_a={},_a[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]=function(n,r,a,o){return n[o+r]},_a[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]=function(n,r,a,o,s){o+=r;for(var l=s||[],u=n,c=0;c<u.length;c++){var d=u[c];l[c]=d?d[o]:null}return l},_a[SOURCE_FORMAT_OBJECT_ROWS]=getItemSimply,_a[SOURCE_FORMAT_KEYED_COLUMNS]=function(n,r,a,o,s){for(var l=s||[],u=0;u<a.length;u++){var c=a[u].name,d=n[c];l[u]=d?d[o]:null}return l},_a[SOURCE_FORMAT_ORIGINAL]=getItemSimply,_a);function getRawSourceItemGetter(n,r){var a=rawSourceItemGetterMap[getMethodMapKey(n,r)];return a}var countSimply=function(n,r,a){return n.length},rawSourceDataCounterMap=(_b={},_b[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_COLUMN]=function(n,r,a){return Math.max(0,n.length-r)},_b[SOURCE_FORMAT_ARRAY_ROWS+"_"+SERIES_LAYOUT_BY_ROW]=function(n,r,a){var o=n[0];return o?Math.max(0,o.length-r):0},_b[SOURCE_FORMAT_OBJECT_ROWS]=countSimply,_b[SOURCE_FORMAT_KEYED_COLUMNS]=function(n,r,a){var o=a[0].name,s=n[o];return s?s.length:0},_b[SOURCE_FORMAT_ORIGINAL]=countSimply,_b);function getRawSourceDataCounter(n,r){var a=rawSourceDataCounterMap[getMethodMapKey(n,r)];return a}var getRawValueSimply=function(n,r,a){return n[r]},rawSourceValueGetterMap=(_c={},_c[SOURCE_FORMAT_ARRAY_ROWS]=getRawValueSimply,_c[SOURCE_FORMAT_OBJECT_ROWS]=function(n,r,a){return n[a]},_c[SOURCE_FORMAT_KEYED_COLUMNS]=getRawValueSimply,_c[SOURCE_FORMAT_ORIGINAL]=function(n,r,a){var o=getDataItemValue(n);return o instanceof Array?o[r]:o},_c[SOURCE_FORMAT_TYPED_ARRAY]=getRawValueSimply,_c);function getRawSourceValueGetter(n){var r=rawSourceValueGetterMap[n];return r}function getMethodMapKey(n,r){return n===SOURCE_FORMAT_ARRAY_ROWS?n+"_"+r:n}function retrieveRawValue(n,r,a){if(n){var o=n.getRawDataItem(r);if(o!=null){var s=n.getStore(),l=s.getSource().sourceFormat;if(a!=null){var u=n.getDimensionIndex(a),c=s.getDimensionProperty(u);return getRawSourceValueGetter(l)(o,u,c)}else{var d=o;return l===SOURCE_FORMAT_ORIGINAL&&(d=getDataItemValue(o)),d}}}}var DIMENSION_LABEL_REG=/\{@(.+?)\}/g,DataFormatMixin=function(){function n(){}return n.prototype.getDataParams=function(r,a){var o=this.getData(a),s=this.getRawValue(r,a),l=o.getRawIndex(r),u=o.getName(r),c=o.getRawDataItem(r),d=o.getItemVisual(r,"style"),f=d&&d[o.getItemVisual(r,"drawType")||"fill"],p=d&&d.stroke,v=this.mainType,g=v==="series",y=o.userOutput&&o.userOutput.get();return{componentType:v,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:g?this.subType:null,seriesIndex:this.seriesIndex,seriesId:g?this.id:null,seriesName:g?this.name:null,name:u,dataIndex:l,data:c,dataType:a,value:s,color:f,borderColor:p,dimensionNames:y?y.fullDimensions:null,encode:y?y.encode:null,$vars:["seriesName","name","value"]}},n.prototype.getFormattedLabel=function(r,a,o,s,l,u){a=a||"normal";var c=this.getData(o),d=this.getDataParams(r,o);if(u&&(d.value=u.interpolatedValue),s!=null&&isArray$1(d.value)&&(d.value=d.value[s]),!l){var f=c.getItemModel(r);l=f.get(a==="normal"?["label","formatter"]:[a,"label","formatter"])}if(isFunction(l))return d.status=a,d.dimensionIndex=s,l(d);if(isString(l)){var p=formatTpl(l,d);return p.replace(DIMENSION_LABEL_REG,function(v,g){var y=g.length,_=g;_.charAt(0)==="["&&_.charAt(y-1)==="]"&&(_=+_.slice(1,y-1));var S=retrieveRawValue(c,r,_);if(u&&isArray$1(u.interpolatedValue)){var b=c.getDimensionIndex(_);b>=0&&(S=u.interpolatedValue[b])}return S!=null?S+"":""})}},n.prototype.getRawValue=function(r,a){return retrieveRawValue(this.getData(a),r)},n.prototype.formatTooltip=function(r,a,o){},n}();function normalizeTooltipFormatResult(n){var r,a;return isObject$3(n)?n.type&&(a=n):r=n,{text:r,frag:a}}function createTask(n){return new Task(n)}var Task=function(){function n(r){r=r||{},this._reset=r.reset,this._plan=r.plan,this._count=r.count,this._onDirty=r.onDirty,this._dirty=!0}return n.prototype.perform=function(r){var a=this._upstream,o=r&&r.skip;if(this._dirty&&a){var s=this.context;s.data=s.outputData=a.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var l;this._plan&&!o&&(l=this._plan(this.context));var u=p(this._modBy),c=this._modDataCount||0,d=p(r&&r.modBy),f=r&&r.modDataCount||0;(u!==d||c!==f)&&(l="reset");function p(A){return!(A>=1)&&(A=1),A}var v;(this._dirty||l==="reset")&&(this._dirty=!1,v=this._doReset(o)),this._modBy=d,this._modDataCount=f;var g=r&&r.step;if(a?this._dueEnd=a._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var y=this._dueIndex,_=Math.min(g!=null?this._dueIndex+g:1/0,this._dueEnd);if(!o&&(v||y<_)){var S=this._progress;if(isArray$1(S))for(var b=0;b<S.length;b++)this._doProgress(S[b],y,_,d,f);else this._doProgress(S,y,_,d,f)}this._dueIndex=_;var x=this._settedOutputEnd!=null?this._settedOutputEnd:_;this._outputDueEnd=x}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},n.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},n.prototype._doProgress=function(r,a,o,s,l){iterator.reset(a,o,s,l),this._callingProgress=r,this._callingProgress({start:a,end:o,count:o-a,next:iterator.next},this.context)},n.prototype._doReset=function(r){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var a,o;!r&&this._reset&&(a=this._reset(this.context),a&&a.progress&&(o=a.forceFirstProgress,a=a.progress),isArray$1(a)&&!a.length&&(a=null)),this._progress=a,this._modBy=this._modDataCount=null;var s=this._downstream;return s&&s.dirty(),o},n.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},n.prototype.pipe=function(r){(this._downstream!==r||this._dirty)&&(this._downstream=r,r._upstream=this,r.dirty())},n.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},n.prototype.getUpstream=function(){return this._upstream},n.prototype.getDownstream=function(){return this._downstream},n.prototype.setOutputEnd=function(r){this._outputDueEnd=this._settedOutputEnd=r},n}(),iterator=function(){var n,r,a,o,s,l={reset:function(d,f,p,v){r=d,n=f,a=p,o=v,s=Math.ceil(o/a),l.next=a>1&&o>0?c:u}};return l;function u(){return r<n?r++:null}function c(){var d=r%s*a+Math.ceil(r/s),f=r>=n?null:d<o?d:r;return r++,f}}();function parseDataValue(n,r){var a=r&&r.type;return a==="ordinal"?n:(a==="time"&&!isNumber(n)&&n!=null&&n!=="-"&&(n=+parseDate(n)),n==null||n===""?NaN:Number(n))}var valueParserMap=createHashMap({number:function(n){return parseFloat(n)},time:function(n){return+parseDate(n)},trim:function(n){return isString(n)?trim$1(n):n}});function getRawValueParser(n){return valueParserMap.get(n)}var ORDER_COMPARISON_OP_MAP={lt:function(n,r){return n<r},lte:function(n,r){return n<=r},gt:function(n,r){return n>r},gte:function(n,r){return n>=r}},FilterOrderComparator=function(){function n(r,a){if(!isNumber(a)){var o="";throwError(o)}this._opFn=ORDER_COMPARISON_OP_MAP[r],this._rvalFloat=numericToNumber(a)}return n.prototype.evaluate=function(r){return isNumber(r)?this._opFn(r,this._rvalFloat):this._opFn(numericToNumber(r),this._rvalFloat)},n}(),SortOrderComparator=function(){function n(r,a){var o=r==="desc";this._resultLT=o?1:-1,a==null&&(a=o?"min":"max"),this._incomparable=a==="min"?-1/0:1/0}return n.prototype.evaluate=function(r,a){var o=isNumber(r)?r:numericToNumber(r),s=isNumber(a)?a:numericToNumber(a),l=isNaN(o),u=isNaN(s);if(l&&(o=this._incomparable),u&&(s=this._incomparable),l&&u){var c=isString(r),d=isString(a);c&&(o=d?r:0),d&&(s=c?a:0)}return o<s?this._resultLT:o>s?-this._resultLT:0},n}(),FilterEqualityComparator=function(){function n(r,a){this._rval=a,this._isEQ=r,this._rvalTypeof=typeof a,this._rvalFloat=numericToNumber(a)}return n.prototype.evaluate=function(r){var a=r===this._rval;if(!a){var o=typeof r;o!==this._rvalTypeof&&(o==="number"||this._rvalTypeof==="number")&&(a=numericToNumber(r)===this._rvalFloat)}return this._isEQ?a:!a},n}();function createFilterComparator(n,r){return n==="eq"||n==="ne"?new FilterEqualityComparator(n==="eq",r):hasOwn(ORDER_COMPARISON_OP_MAP,n)?new FilterOrderComparator(n,r):null}var ExternalSource=function(){function n(){}return n.prototype.getRawData=function(){throw new Error("not supported")},n.prototype.getRawDataItem=function(r){throw new Error("not supported")},n.prototype.cloneRawData=function(){},n.prototype.getDimensionInfo=function(r){},n.prototype.cloneAllDimensionInfo=function(){},n.prototype.count=function(){},n.prototype.retrieveValue=function(r,a){},n.prototype.retrieveValueFromItem=function(r,a){},n.prototype.convertValue=function(r,a){return parseDataValue(r,a)},n}();function createExternalSource(n,r){var a=new ExternalSource,o=n.data,s=a.sourceFormat=n.sourceFormat,l=n.startIndex,u="";n.seriesLayoutBy!==SERIES_LAYOUT_BY_COLUMN&&throwError(u);var c=[],d={},f=n.dimensionsDefine;if(f)each$f(f,function(S,b){var x=S.name,A={index:b,name:x,displayName:S.displayName};if(c.push(A),x!=null){var w="";hasOwn(d,x)&&throwError(w),d[x]=A}});else for(var p=0;p<n.dimensionsDetectedCount;p++)c.push({index:p});var v=getRawSourceItemGetter(s,SERIES_LAYOUT_BY_COLUMN);r.__isBuiltIn&&(a.getRawDataItem=function(S){return v(o,l,c,S)},a.getRawData=bind$1(getRawData,null,n)),a.cloneRawData=bind$1(cloneRawData,null,n);var g=getRawSourceDataCounter(s,SERIES_LAYOUT_BY_COLUMN);a.count=bind$1(g,null,o,l,c);var y=getRawSourceValueGetter(s);a.retrieveValue=function(S,b){var x=v(o,l,c,S);return _(x,b)};var _=a.retrieveValueFromItem=function(S,b){if(S!=null){var x=c[b];if(x)return y(S,b,x.name)}};return a.getDimensionInfo=bind$1(getDimensionInfo,null,c,d),a.cloneAllDimensionInfo=bind$1(cloneAllDimensionInfo,null,c),a}function getRawData(n){var r=n.sourceFormat;if(!isSupportedSourceFormat(r)){var a="";throwError(a)}return n.data}function cloneRawData(n){var r=n.sourceFormat,a=n.data;if(!isSupportedSourceFormat(r)){var o="";throwError(o)}if(r===SOURCE_FORMAT_ARRAY_ROWS){for(var s=[],l=0,u=a.length;l<u;l++)s.push(a[l].slice());return s}else if(r===SOURCE_FORMAT_OBJECT_ROWS){for(var s=[],l=0,u=a.length;l<u;l++)s.push(extend$2({},a[l]));return s}}function getDimensionInfo(n,r,a){if(a!=null){if(isNumber(a)||!isNaN(a)&&!hasOwn(r,a))return n[a];if(hasOwn(r,a))return r[a]}}function cloneAllDimensionInfo(n){return clone$6(n)}var externalTransformMap=createHashMap();function registerExternalTransform(n){n=clone$6(n);var r=n.type,a="";r||throwError(a);var o=r.split(":");o.length!==2&&throwError(a);var s=!1;o[0]==="echarts"&&(r=o[1],s=!0),n.__isBuiltIn=s,externalTransformMap.set(r,n)}function applyDataTransform(n,r,a){var o=normalizeToArray(n),s=o.length,l="";s||throwError(l);for(var u=0,c=s;u<c;u++){var d=o[u];r=applySingleDataTransform(d,r),u!==c-1&&(r.length=Math.max(r.length,1))}return r}function applySingleDataTransform(n,r,a,o){var s="";r.length||throwError(s),isObject$3(n)||throwError(s);var l=n.type,u=externalTransformMap.get(l);u||throwError(s);var c=map$1(r,function(f){return createExternalSource(f,u)}),d=normalizeToArray(u.transform({upstream:c[0],upstreamList:c,config:clone$6(n.config)}));return map$1(d,function(f,p){var v="";isObject$3(f)||throwError(v),f.data||throwError(v);var g=detectSourceFormat(f.data);isSupportedSourceFormat(g)||throwError(v);var y,_=r[0];if(_&&p===0&&!f.dimensions){var S=_.startIndex;S&&(f.data=_.data.slice(0,S).concat(f.data)),y={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN,sourceHeader:S,dimensions:_.metaRawOption.dimensions}}else y={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN,sourceHeader:0,dimensions:f.dimensions};return createSource(f.data,y,null)})}function isSupportedSourceFormat(n){return n===SOURCE_FORMAT_ARRAY_ROWS||n===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(n){return n>65535?CtorUint32Array:CtorUint16Array}function getInitialExtent(){return[1/0,-1/0]}function cloneChunk(n){var r=n.constructor;return r===Array?n.slice():new r(n)}function prepareStore(n,r,a,o,s){var l=dataCtors[a||"float"];if(s){var u=n[r],c=u&&u.length;if(c!==o){for(var d=new l(o),f=0;f<c;f++)d[f]=u[f];n[r]=d}}else n[r]=new l(o)}var DataStore=function(){function n(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=createHashMap()}return n.prototype.initData=function(r,a,o){this._provider=r,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var s=r.getSource(),l=this.defaultDimValueGetter=defaultDimValueGetters[s.sourceFormat];this._dimValueGetter=o||l,this._rawExtent=[],shouldRetrieveDataByName(s),this._dimensions=map$1(a,function(u){return{type:u.type,property:u.property}}),this._initDataFromProvider(0,r.count())},n.prototype.getProvider=function(){return this._provider},n.prototype.getSource=function(){return this._provider.getSource()},n.prototype.ensureCalculationDimension=function(r,a){var o=this._calcDimNameToIdx,s=this._dimensions,l=o.get(r);if(l!=null){if(s[l].type===a)return l}else l=s.length;return s[l]={type:a},o.set(r,l),this._chunks[l]=new dataCtors[a||"float"](this._rawCount),this._rawExtent[l]=getInitialExtent(),l},n.prototype.collectOrdinalMeta=function(r,a){var o=this._chunks[r],s=this._dimensions[r],l=this._rawExtent,u=s.ordinalOffset||0,c=o.length;u===0&&(l[r]=getInitialExtent());for(var d=l[r],f=u;f<c;f++){var p=o[f]=a.parseAndCollect(o[f]);isNaN(p)||(d[0]=Math.min(p,d[0]),d[1]=Math.max(p,d[1]))}s.ordinalMeta=a,s.ordinalOffset=c,s.type="ordinal"},n.prototype.getOrdinalMeta=function(r){var a=this._dimensions[r],o=a.ordinalMeta;return o},n.prototype.getDimensionProperty=function(r){var a=this._dimensions[r];return a&&a.property},n.prototype.appendData=function(r){var a=this._provider,o=this.count();a.appendData(r);var s=a.count();return a.persistent||(s+=o),o<s&&this._initDataFromProvider(o,s,!0),[o,s]},n.prototype.appendValues=function(r,a){for(var o=this._chunks,s=this._dimensions,l=s.length,u=this._rawExtent,c=this.count(),d=c+Math.max(r.length,a||0),f=0;f<l;f++){var p=s[f];prepareStore(o,f,p.type,d,!0)}for(var v=[],g=c;g<d;g++)for(var y=g-c,_=0;_<l;_++){var p=s[_],S=defaultDimValueGetters.arrayRows.call(this,r[y]||v,p.property,y,_);o[_][g]=S;var b=u[_];S<b[0]&&(b[0]=S),S>b[1]&&(b[1]=S)}return this._rawCount=this._count=d,{start:c,end:d}},n.prototype._initDataFromProvider=function(r,a,o){for(var s=this._provider,l=this._chunks,u=this._dimensions,c=u.length,d=this._rawExtent,f=map$1(u,function(A){return A.property}),p=0;p<c;p++){var v=u[p];d[p]||(d[p]=getInitialExtent()),prepareStore(l,p,v.type,a,o)}if(s.fillStorage)s.fillStorage(r,a,l,d);else for(var g=[],y=r;y<a;y++){g=s.getItem(y,g);for(var _=0;_<c;_++){var S=l[_],b=this._dimValueGetter(g,f[_],y,_);S[y]=b;var x=d[_];b<x[0]&&(x[0]=b),b>x[1]&&(x[1]=b)}}!s.persistent&&s.clean&&s.clean(),this._rawCount=this._count=a,this._extent=[]},n.prototype.count=function(){return this._count},n.prototype.get=function(r,a){if(!(a>=0&&a<this._count))return NaN;var o=this._chunks[r];return o?o[this.getRawIndex(a)]:NaN},n.prototype.getValues=function(r,a){var o=[],s=[];if(a==null){a=r,r=[];for(var l=0;l<this._dimensions.length;l++)s.push(l)}else s=r;for(var l=0,u=s.length;l<u;l++)o.push(this.get(s[l],a));return o},n.prototype.getByRawIndex=function(r,a){if(!(a>=0&&a<this._rawCount))return NaN;var o=this._chunks[r];return o?o[a]:NaN},n.prototype.getSum=function(r){var a=this._chunks[r],o=0;if(a)for(var s=0,l=this.count();s<l;s++){var u=this.get(r,s);isNaN(u)||(o+=u)}return o},n.prototype.getMedian=function(r){var a=[];this.each([r],function(l){isNaN(l)||a.push(l)});var o=a.sort(function(l,u){return l-u}),s=this.count();return s===0?0:s%2===1?o[(s-1)/2]:(o[s/2]+o[s/2-1])/2},n.prototype.indexOfRawIndex=function(r){if(r>=this._rawCount||r<0)return-1;if(!this._indices)return r;var a=this._indices,o=a[r];if(o!=null&&o<this._count&&o===r)return r;for(var s=0,l=this._count-1;s<=l;){var u=(s+l)/2|0;if(a[u]<r)s=u+1;else if(a[u]>r)l=u-1;else return u}return-1},n.prototype.indicesOfNearest=function(r,a,o){var s=this._chunks,l=s[r],u=[];if(!l)return u;o==null&&(o=1/0);for(var c=1/0,d=-1,f=0,p=0,v=this.count();p<v;p++){var g=this.getRawIndex(p),y=a-l[g],_=Math.abs(y);_<=o&&((_<c||_===c&&y>=0&&d<0)&&(c=_,d=y,f=0),y===d&&(u[f++]=p))}return u.length=f,u},n.prototype.getIndices=function(){var r,a=this._indices;if(a){var o=a.constructor,s=this._count;if(o===Array){r=new o(s);for(var l=0;l<s;l++)r[l]=a[l]}else r=new o(a.buffer,0,s)}else{var o=getIndicesCtor(this._rawCount);r=new o(this.count());for(var l=0;l<r.length;l++)r[l]=l}return r},n.prototype.filter=function(r,a){if(!this._count)return this;for(var o=this.clone(),s=o.count(),l=getIndicesCtor(o._rawCount),u=new l(s),c=[],d=r.length,f=0,p=r[0],v=o._chunks,g=0;g<s;g++){var y=void 0,_=o.getRawIndex(g);if(d===0)y=a(g);else if(d===1){var S=v[p][_];y=a(S,g)}else{for(var b=0;b<d;b++)c[b]=v[r[b]][_];c[b]=g,y=a.apply(null,c)}y&&(u[f++]=_)}return f<s&&(o._indices=u),o._count=f,o._extent=[],o._updateGetRawIdx(),o},n.prototype.selectRange=function(r){var a=this.clone(),o=a._count;if(!o)return this;var s=keys(r),l=s.length;if(!l)return this;var u=a.count(),c=getIndicesCtor(a._rawCount),d=new c(u),f=0,p=s[0],v=r[p][0],g=r[p][1],y=a._chunks,_=!1;if(!a._indices){var S=0;if(l===1){for(var b=y[s[0]],x=0;x<o;x++){var A=b[x];(A>=v&&A<=g||isNaN(A))&&(d[f++]=S),S++}_=!0}else if(l===2){for(var b=y[s[0]],w=y[s[1]],E=r[s[1]][0],D=r[s[1]][1],x=0;x<o;x++){var A=b[x],C=w[x];(A>=v&&A<=g||isNaN(A))&&(C>=E&&C<=D||isNaN(C))&&(d[f++]=S),S++}_=!0}}if(!_)if(l===1)for(var x=0;x<u;x++){var $=a.getRawIndex(x),A=y[s[0]][$];(A>=v&&A<=g||isNaN(A))&&(d[f++]=$)}else for(var x=0;x<u;x++){for(var P=!0,$=a.getRawIndex(x),M=0;M<l;M++){var I=s[M],A=y[I][$];(A<r[I][0]||A>r[I][1])&&(P=!1)}P&&(d[f++]=a.getRawIndex(x))}return f<u&&(a._indices=d),a._count=f,a._extent=[],a._updateGetRawIdx(),a},n.prototype.map=function(r,a){var o=this.clone(r);return this._updateDims(o,r,a),o},n.prototype.modify=function(r,a){this._updateDims(this,r,a)},n.prototype._updateDims=function(r,a,o){for(var s=r._chunks,l=[],u=a.length,c=r.count(),d=[],f=r._rawExtent,p=0;p<a.length;p++)f[a[p]]=getInitialExtent();for(var v=0;v<c;v++){for(var g=r.getRawIndex(v),y=0;y<u;y++)d[y]=s[a[y]][g];d[u]=v;var _=o&&o.apply(null,d);if(_!=null){typeof _!="object"&&(l[0]=_,_=l);for(var p=0;p<_.length;p++){var S=a[p],b=_[p],x=f[S],A=s[S];A&&(A[g]=b),b<x[0]&&(x[0]=b),b>x[1]&&(x[1]=b)}}}},n.prototype.lttbDownSample=function(r,a){var o=this.clone([r],!0),s=o._chunks,l=s[r],u=this.count(),c=0,d=Math.floor(1/a),f=this.getRawIndex(0),p,v,g,y=new(getIndicesCtor(this._rawCount))(Math.min((Math.ceil(u/d)+2)*2,u));y[c++]=f;for(var _=1;_<u-1;_+=d){for(var S=Math.min(_+d,u-1),b=Math.min(_+d*2,u),x=(b+S)/2,A=0,w=S;w<b;w++){var E=this.getRawIndex(w),D=l[E];isNaN(D)||(A+=D)}A/=b-S;var C=_,$=Math.min(_+d,u),P=_-1,M=l[f];p=-1,g=C;for(var I=-1,L=0,w=C;w<$;w++){var E=this.getRawIndex(w),D=l[E];if(isNaN(D)){L++,I<0&&(I=E);continue}v=Math.abs((P-x)*(D-M)-(P-w)*(A-M)),v>p&&(p=v,g=E)}L>0&&L<$-C&&(y[c++]=Math.min(I,g),g=Math.max(I,g)),y[c++]=g,f=g}return y[c++]=this.getRawIndex(u-1),o._count=c,o._indices=y,o.getRawIndex=this._getRawIdx,o},n.prototype.minmaxDownSample=function(r,a){for(var o=this.clone([r],!0),s=o._chunks,l=Math.floor(1/a),u=s[r],c=this.count(),d=new(getIndicesCtor(this._rawCount))(Math.ceil(c/l)*2),f=0,p=0;p<c;p+=l){var v=p,g=u[this.getRawIndex(v)],y=p,_=u[this.getRawIndex(y)],S=l;p+l>c&&(S=c-p);for(var b=0;b<S;b++){var x=this.getRawIndex(p+b),A=u[x];A<g&&(g=A,v=p+b),A>_&&(_=A,y=p+b)}var w=this.getRawIndex(v),E=this.getRawIndex(y);v<y?(d[f++]=w,d[f++]=E):(d[f++]=E,d[f++]=w)}return o._count=f,o._indices=d,o._updateGetRawIdx(),o},n.prototype.downSample=function(r,a,o,s){for(var l=this.clone([r],!0),u=l._chunks,c=[],d=Math.floor(1/a),f=u[r],p=this.count(),v=l._rawExtent[r]=getInitialExtent(),g=new(getIndicesCtor(this._rawCount))(Math.ceil(p/d)),y=0,_=0;_<p;_+=d){d>p-_&&(d=p-_,c.length=d);for(var S=0;S<d;S++){var b=this.getRawIndex(_+S);c[S]=f[b]}var x=o(c),A=this.getRawIndex(Math.min(_+s(c,x)||0,p-1));f[A]=x,x<v[0]&&(v[0]=x),x>v[1]&&(v[1]=x),g[y++]=A}return l._count=y,l._indices=g,l._updateGetRawIdx(),l},n.prototype.each=function(r,a){if(this._count)for(var o=r.length,s=this._chunks,l=0,u=this.count();l<u;l++){var c=this.getRawIndex(l);switch(o){case 0:a(l);break;case 1:a(s[r[0]][c],l);break;case 2:a(s[r[0]][c],s[r[1]][c],l);break;default:for(var d=0,f=[];d<o;d++)f[d]=s[r[d]][c];f[d]=l,a.apply(null,f)}}},n.prototype.getDataExtent=function(r){var a=this._chunks[r],o=getInitialExtent();if(!a)return o;var s=this.count(),l=!this._indices,u;if(l)return this._rawExtent[r].slice();if(u=this._extent[r],u)return u.slice();u=o;for(var c=u[0],d=u[1],f=0;f<s;f++){var p=this.getRawIndex(f),v=a[p];v<c&&(c=v),v>d&&(d=v)}return u=[c,d],this._extent[r]=u,u},n.prototype.getRawDataItem=function(r){var a=this.getRawIndex(r);if(this._provider.persistent)return this._provider.getItem(a);for(var o=[],s=this._chunks,l=0;l<s.length;l++)o.push(s[l][a]);return o},n.prototype.clone=function(r,a){var o=new n,s=this._chunks,l=r&&reduce(r,function(c,d){return c[d]=!0,c},{});if(l)for(var u=0;u<s.length;u++)o._chunks[u]=l[u]?cloneChunk(s[u]):s[u];else o._chunks=s;return this._copyCommonProps(o),a||(o._indices=this._cloneIndices()),o._updateGetRawIdx(),o},n.prototype._copyCommonProps=function(r){r._count=this._count,r._rawCount=this._rawCount,r._provider=this._provider,r._dimensions=this._dimensions,r._extent=clone$6(this._extent),r._rawExtent=clone$6(this._rawExtent)},n.prototype._cloneIndices=function(){if(this._indices){var r=this._indices.constructor,a=void 0;if(r===Array){var o=this._indices.length;a=new r(o);for(var s=0;s<o;s++)a[s]=this._indices[s]}else a=new r(this._indices);return a}return null},n.prototype._getRawIdxIdentity=function(r){return r},n.prototype._getRawIdx=function(r){return r<this._count&&r>=0?this._indices[r]:-1},n.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},n.internalField=function(){function r(a,o,s,l){return parseDataValue(a[l],this._dimensions[l])}defaultDimValueGetters={arrayRows:r,objectRows:function(a,o,s,l){return parseDataValue(a[o],this._dimensions[l])},keyedColumns:r,original:function(a,o,s,l){var u=a&&(a.value==null?a:a.value);return parseDataValue(u instanceof Array?u[l]:u,this._dimensions[l])},typedArray:function(a,o,s,l){return a[l]}}}(),n}(),SourceManager=function(){function n(r){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=r}return n.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},n.prototype._setLocalSource=function(r,a){this._sourceList=r,this._upstreamSignList=a,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},n.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},n.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},n.prototype._createSource=function(){this._setLocalSource([],[]);var r=this._sourceHost,a=this._getUpstreamSourceManagers(),o=!!a.length,s,l;if(isSeries(r)){var u=r,c=void 0,d=void 0,f=void 0;if(o){var p=a[0];p.prepareSource(),f=p.getSource(),c=f.data,d=f.sourceFormat,l=[p._getVersionSign()]}else c=u.get("data",!0),d=isTypedArray(c)?SOURCE_FORMAT_TYPED_ARRAY:SOURCE_FORMAT_ORIGINAL,l=[];var v=this._getSourceMetaRawOption()||{},g=f&&f.metaRawOption||{},y=retrieve2(v.seriesLayoutBy,g.seriesLayoutBy)||null,_=retrieve2(v.sourceHeader,g.sourceHeader),S=retrieve2(v.dimensions,g.dimensions),b=y!==g.seriesLayoutBy||!!_!=!!g.sourceHeader||S;s=b?[createSource(c,{seriesLayoutBy:y,sourceHeader:_,dimensions:S},d)]:[]}else{var x=r;if(o){var A=this._applyTransform(a);s=A.sourceList,l=A.upstreamSignList}else{var w=x.get("source",!0);s=[createSource(w,this._getSourceMetaRawOption(),null)],l=[]}}this._setLocalSource(s,l)},n.prototype._applyTransform=function(r){var a=this._sourceHost,o=a.get("transform",!0),s=a.get("fromTransformResult",!0);if(s!=null){var l="";r.length!==1&&doThrow(l)}var u,c=[],d=[];return each$f(r,function(f){f.prepareSource();var p=f.getSource(s||0),v="";s!=null&&!p&&doThrow(v),c.push(p),d.push(f._getVersionSign())}),o?u=applyDataTransform(o,c,{datasetIndex:a.componentIndex}):s!=null&&(u=[cloneSourceShallow(c[0])]),{sourceList:u,upstreamSignList:d}},n.prototype._isDirty=function(){if(this._dirty)return!0;for(var r=this._getUpstreamSourceManagers(),a=0;a<r.length;a++){var o=r[a];if(o._isDirty()||this._upstreamSignList[a]!==o._getVersionSign())return!0}},n.prototype.getSource=function(r){r=r||0;var a=this._sourceList[r];if(!a){var o=this._getUpstreamSourceManagers();return o[0]&&o[0].getSource(r)}return a},n.prototype.getSharedDataStore=function(r){var a=r.makeStoreSchema();return this._innerGetDataStore(a.dimensions,r.source,a.hash)},n.prototype._innerGetDataStore=function(r,a,o){var s=0,l=this._storeList,u=l[s];u||(u=l[s]={});var c=u[o];if(!c){var d=this._getUpstreamSourceManagers()[0];isSeries(this._sourceHost)&&d?c=d._innerGetDataStore(r,a,o):(c=new DataStore,c.initData(new DefaultDataProvider(a,r.length),r)),u[o]=c}return c},n.prototype._getUpstreamSourceManagers=function(){var r=this._sourceHost;if(isSeries(r)){var a=querySeriesUpstreamDatasetModel(r);return a?[a.getSourceManager()]:[]}else return map$1(queryDatasetUpstreamDatasetModels(r),function(o){return o.getSourceManager()})},n.prototype._getSourceMetaRawOption=function(){var r=this._sourceHost,a,o,s;if(isSeries(r))a=r.get("seriesLayoutBy",!0),o=r.get("sourceHeader",!0),s=r.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var l=r;a=l.get("seriesLayoutBy",!0),o=l.get("sourceHeader",!0),s=l.get("dimensions",!0)}return{seriesLayoutBy:a,sourceHeader:o,dimensions:s}},n}();function disableTransformOptionMerge(n){var r=n.option.transform;r&&setAsPrimitive(n.option.transform)}function isSeries(n){return n.mainType==="series"}function doThrow(n){throw new Error(n)}var TOOLTIP_LINE_HEIGHT_CSS="line-height:1";function getTooltipLineHeight(n){var r=n.lineHeight;return r==null?TOOLTIP_LINE_HEIGHT_CSS:"line-height:"+encodeHTML(r+"")+"px"}function getTooltipTextStyle(n,r){var a=n.color||"#6e7079",o=n.fontSize||12,s=n.fontWeight||"400",l=n.color||"#464646",u=n.fontSize||14,c=n.fontWeight||"900";return r==="html"?{nameStyle:"font-size:"+encodeHTML(o+"")+"px;color:"+encodeHTML(a)+";font-weight:"+encodeHTML(s+""),valueStyle:"font-size:"+encodeHTML(u+"")+"px;color:"+encodeHTML(l)+";font-weight:"+encodeHTML(c+"")}:{nameStyle:{fontSize:o,fill:a,fontWeight:s},valueStyle:{fontSize:u,fill:l,fontWeight:c}}}var HTML_GAPS=[0,10,20,30],RICH_TEXT_GAPS=["","\n","\n\n","\n\n\n"];function createTooltipMarkup(n,r){return r.type=n,r}function isSectionFragment(n){return n.type==="section"}function getBuilder(n){return isSectionFragment(n)?buildSection:buildNameValue}function getBlockGapLevel(n){if(isSectionFragment(n)){var r=0,a=n.blocks.length,o=a>1||a>0&&!n.noHeader;return each$f(n.blocks,function(s){var l=getBlockGapLevel(s);l>=r&&(r=l+ +(o&&(!l||isSectionFragment(s)&&!s.noHeader)))}),r}return 0}function buildSection(n,r,a,o){var s=r.noHeader,l=getGap(getBlockGapLevel(r)),u=[],c=r.blocks||[];assert(!c||isArray$1(c)),c=c||[];var d=n.orderMode;if(r.sortBlocks&&d){c=c.slice();var f={valueAsc:"asc",valueDesc:"desc"};if(hasOwn(f,d)){var p=new SortOrderComparator(f[d],null);c.sort(function(S,b){return p.evaluate(S.sortParam,b.sortParam)})}else d==="seriesDesc"&&c.reverse()}each$f(c,function(S,b){var x=r.valueFormatter,A=getBuilder(S)(x?extend$2(extend$2({},n),{valueFormatter:x}):n,S,b>0?l.html:0,o);A!=null&&u.push(A)});var v=n.renderMode==="richText"?u.join(l.richText):wrapBlockHTML(o,u.join(""),s?a:l.html);if(s)return v;var g=makeValueReadable(r.header,"ordinal",n.useUTC),y=getTooltipTextStyle(o,n.renderMode).nameStyle,_=getTooltipLineHeight(o);return n.renderMode==="richText"?wrapInlineNameRichText(n,g,y)+l.richText+v:wrapBlockHTML(o,'<div style="'+y+";"+_+';">'+encodeHTML(g)+"</div>"+v,a)}function buildNameValue(n,r,a,o){var s=n.renderMode,l=r.noName,u=r.noValue,c=!r.markerType,d=r.name,f=n.useUTC,p=r.valueFormatter||n.valueFormatter||function(E){return E=isArray$1(E)?E:[E],map$1(E,function(D,C){return makeValueReadable(D,isArray$1(y)?y[C]:y,f)})};if(!(l&&u)){var v=c?"":n.markupStyleCreator.makeTooltipMarker(r.markerType,r.markerColor||"#333",s),g=l?"":makeValueReadable(d,"ordinal",f),y=r.valueType,_=u?[]:p(r.value,r.dataIndex),S=!c||!l,b=!c&&l,x=getTooltipTextStyle(o,s),A=x.nameStyle,w=x.valueStyle;return s==="richText"?(c?"":v)+(l?"":wrapInlineNameRichText(n,g,A))+(u?"":wrapInlineValueRichText(n,_,S,b,w)):wrapBlockHTML(o,(c?"":v)+(l?"":wrapInlineNameHTML(g,!c,A))+(u?"":wrapInlineValueHTML(_,S,b,w)),a)}}function buildTooltipMarkup(n,r,a,o,s,l){if(n){var u=getBuilder(n),c={useUTC:s,renderMode:a,orderMode:o,markupStyleCreator:r,valueFormatter:n.valueFormatter};return u(c,n,0,l)}}function getGap(n){return{html:HTML_GAPS[n],richText:RICH_TEXT_GAPS[n]}}function wrapBlockHTML(n,r,a){var o='<div style="clear:both"></div>',s="margin: "+a+"px 0 0",l=getTooltipLineHeight(n);return'<div style="'+s+";"+l+';">'+r+o+"</div>"}function wrapInlineNameHTML(n,r,a){var o=r?"margin-left:2px":"";return'<span style="'+a+";"+o+'">'+encodeHTML(n)+"</span>"}function wrapInlineValueHTML(n,r,a,o){var s=a?"10px":"20px",l=r?"float:right;margin-left:"+s:"";return n=isArray$1(n)?n:[n],'<span style="'+l+";"+o+'">'+map$1(n,function(u){return encodeHTML(u)}).join(" ")+"</span>"}function wrapInlineNameRichText(n,r,a){return n.markupStyleCreator.wrapRichTextStyle(r,a)}function wrapInlineValueRichText(n,r,a,o,s){var l=[s],u=o?10:20;return a&&l.push({padding:[0,0,0,u],align:"right"}),n.markupStyleCreator.wrapRichTextStyle(isArray$1(r)?r.join(" "):r,l)}function retrieveVisualColorForTooltipMarker(n,r){var a=n.getData().getItemVisual(r,"style"),o=a[n.visualDrawType];return convertToColorString(o)}function getPaddingFromTooltipModel(n,r){var a=n.get("padding");return a!=null?a:r==="richText"?[8,10]:10}var TooltipMarkupStyleCreator=function(){function n(){this.richTextStyles={},this._nextStyleNameId=getRandomIdBase()}return n.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},n.prototype.makeTooltipMarker=function(r,a,o){var s=o==="richText"?this._generateStyleName():null,l=getTooltipMarker({color:a,type:r,renderMode:o,markerId:s});return isString(l)?l:(this.richTextStyles[s]=l.style,l.content)},n.prototype.wrapRichTextStyle=function(r,a){var o={};isArray$1(a)?each$f(a,function(l){return extend$2(o,l)}):extend$2(o,a);var s=this._generateStyleName();return this.richTextStyles[s]=o,"{"+s+"|"+r+"}"},n}();function defaultSeriesFormatTooltip(n){var r=n.series,a=n.dataIndex,o=n.multipleSeries,s=r.getData(),l=s.mapDimensionsAll("defaultedTooltip"),u=l.length,c=r.getRawValue(a),d=isArray$1(c),f=retrieveVisualColorForTooltipMarker(r,a),p,v,g,y;if(u>1||d&&!u){var _=formatTooltipArrayValue(c,r,a,l,f);p=_.inlineValues,v=_.inlineValueTypes,g=_.blocks,y=_.inlineValues[0]}else if(u){var S=s.getDimensionInfo(l[0]);y=p=retrieveRawValue(s,a,l[0]),v=S.type}else y=p=d?c[0]:c;var b=isNameSpecified(r),x=b&&r.name||"",A=s.getName(a),w=o?x:A;return createTooltipMarkup("section",{header:x,noHeader:o||!b,sortParam:y,blocks:[createTooltipMarkup("nameValue",{markerType:"item",markerColor:f,name:w,noName:!trim$1(w),value:p,valueType:v,dataIndex:a})].concat(g||[])})}function formatTooltipArrayValue(n,r,a,o,s){var l=r.getData(),u=reduce(n,function(v,g,y){var _=l.getDimensionInfo(y);return v=v||_&&_.tooltip!==!1&&_.displayName!=null},!1),c=[],d=[],f=[];o.length?each$f(o,function(v){p(retrieveRawValue(l,a,v),v)}):each$f(n,p);function p(v,g){var y=l.getDimensionInfo(g);!y||y.otherDims.tooltip===!1||(u?f.push(createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:s,name:y.displayName,value:v,valueType:y.type})):(c.push(v),d.push(y.type)))}return{inlineValues:c,inlineValueTypes:d,blocks:f}}var inner$k=makeInner();function getSelectionKey(n,r){return n.getName(r)||n.getId(r)}var SERIES_UNIVERSAL_TRANSITION_PROP="__universalTransitionEnabled",SeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a._selectedDataIndicesMap={},a}return r.prototype.init=function(a,o,s){this.seriesIndex=this.componentIndex,this.dataTask=createTask({count:dataTaskCount,reset:dataTaskReset}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(a,s);var l=inner$k(this).sourceManager=new SourceManager(this);l.prepareSource();var u=this.getInitialData(a,s);wrapData(u,this),this.dataTask.context.data=u,inner$k(this).dataBeforeProcessed=u,autoSeriesName(this),this._initSelectedMapFromData(u)},r.prototype.mergeDefaultAndTheme=function(a,o){var s=fetchLayoutMode(this),l=s?getLayoutParams(a):{},u=this.subType;ComponentModel.hasClass(u)&&(u+="Series"),merge(a,o.getTheme().get(this.subType)),merge(a,this.getDefaultOption()),defaultEmphasis(a,"label",["show"]),this.fillDataTextStyle(a.data),s&&mergeLayoutParam(a,l,s)},r.prototype.mergeOption=function(a,o){a=merge(this.option,a,!0),this.fillDataTextStyle(a.data);var s=fetchLayoutMode(this);s&&mergeLayoutParam(this.option,a,s);var l=inner$k(this).sourceManager;l.dirty(),l.prepareSource();var u=this.getInitialData(a,o);wrapData(u,this),this.dataTask.dirty(),this.dataTask.context.data=u,inner$k(this).dataBeforeProcessed=u,autoSeriesName(this),this._initSelectedMapFromData(u)},r.prototype.fillDataTextStyle=function(a){if(a&&!isTypedArray(a))for(var o=["show"],s=0;s<a.length;s++)a[s]&&a[s].label&&defaultEmphasis(a[s],"label",o)},r.prototype.getInitialData=function(a,o){},r.prototype.appendData=function(a){var o=this.getRawData();o.appendData(a.data)},r.prototype.getData=function(a){var o=getCurrentTask(this);if(o){var s=o.context.data;return a==null||!s.getLinkedData?s:s.getLinkedData(a)}else return inner$k(this).data},r.prototype.getAllData=function(){var a=this.getData();return a&&a.getLinkedDataAll?a.getLinkedDataAll():[{data:a}]},r.prototype.setData=function(a){var o=getCurrentTask(this);if(o){var s=o.context;s.outputData=a,o!==this.dataTask&&(s.data=a)}inner$k(this).data=a},r.prototype.getEncode=function(){var a=this.get("encode",!0);if(a)return createHashMap(a)},r.prototype.getSourceManager=function(){return inner$k(this).sourceManager},r.prototype.getSource=function(){return this.getSourceManager().getSource()},r.prototype.getRawData=function(){return inner$k(this).dataBeforeProcessed},r.prototype.getColorBy=function(){var a=this.get("colorBy");return a||"series"},r.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},r.prototype.getBaseAxis=function(){var a=this.coordinateSystem;return a&&a.getBaseAxis&&a.getBaseAxis()},r.prototype.formatTooltip=function(a,o,s){return defaultSeriesFormatTooltip({series:this,dataIndex:a,multipleSeries:o})},r.prototype.isAnimationEnabled=function(){var a=this.ecModel;if(env.node&&!(a&&a.ssr))return!1;var o=this.getShallow("animation");return o&&this.getData().count()>this.getShallow("animationThreshold")&&(o=!1),!!o},r.prototype.restoreData=function(){this.dataTask.dirty()},r.prototype.getColorFromPalette=function(a,o,s){var l=this.ecModel,u=PaletteMixin.prototype.getColorFromPalette.call(this,a,o,s);return u||(u=l.getColorFromPalette(a,o,s)),u},r.prototype.coordDimToDataDim=function(a){return this.getRawData().mapDimensionsAll(a)},r.prototype.getProgressive=function(){return this.get("progressive")},r.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},r.prototype.select=function(a,o){this._innerSelect(this.getData(o),a)},r.prototype.unselect=function(a,o){var s=this.option.selectedMap;if(s){var l=this.option.selectedMode,u=this.getData(o);if(l==="series"||s==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var c=0;c<a.length;c++){var d=a[c],f=getSelectionKey(u,d);s[f]=!1,this._selectedDataIndicesMap[f]=-1}}},r.prototype.toggleSelect=function(a,o){for(var s=[],l=0;l<a.length;l++)s[0]=a[l],this.isSelected(a[l],o)?this.unselect(s,o):this.select(s,o)},r.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var a=this._selectedDataIndicesMap,o=keys(a),s=[],l=0;l<o.length;l++){var u=a[o[l]];u>=0&&s.push(u)}return s},r.prototype.isSelected=function(a,o){var s=this.option.selectedMap;if(!s)return!1;var l=this.getData(o);return(s==="all"||s[getSelectionKey(l,a)])&&!l.getItemModel(a).get(["select","disabled"])},r.prototype.isUniversalTransitionEnabled=function(){if(this[SERIES_UNIVERSAL_TRANSITION_PROP])return!0;var a=this.option.universalTransition;return a?a===!0?!0:a&&a.enabled:!1},r.prototype._innerSelect=function(a,o){var s,l,u=this.option,c=u.selectedMode,d=o.length;if(!(!c||!d)){if(c==="series")u.selectedMap="all";else if(c==="multiple"){isObject$3(u.selectedMap)||(u.selectedMap={});for(var f=u.selectedMap,p=0;p<d;p++){var v=o[p],g=getSelectionKey(a,v);f[g]=!0,this._selectedDataIndicesMap[g]=a.getRawIndex(v)}}else if(c==="single"||c===!0){var y=o[d-1],g=getSelectionKey(a,y);u.selectedMap=(s={},s[g]=!0,s),this._selectedDataIndicesMap=(l={},l[g]=a.getRawIndex(y),l)}}},r.prototype._initSelectedMapFromData=function(a){if(!this.option.selectedMap){var o=[];a.hasItemOption&&a.each(function(s){var l=a.getRawDataItem(s);l&&l.selected&&o.push(s)}),o.length>0&&this._innerSelect(a,o)}},r.registerClass=function(a){return ComponentModel.registerClass(a)},r.protoInitialize=function(){var a=r.prototype;a.type="series.__base__",a.seriesIndex=0,a.ignoreStyleOnData=!1,a.hasSymbolVisual=!1,a.defaultSymbol="circle",a.visualStyleAccessPath="itemStyle",a.visualDrawType="fill"}(),r}(ComponentModel);mixin(SeriesModel,DataFormatMixin);mixin(SeriesModel,PaletteMixin);mountExtend(SeriesModel,ComponentModel);function autoSeriesName(n){var r=n.name;isNameSpecified(n)||(n.name=getSeriesAutoName(n)||r)}function getSeriesAutoName(n){var r=n.getRawData(),a=r.mapDimensionsAll("seriesName"),o=[];return each$f(a,function(s){var l=r.getDimensionInfo(s);l.displayName&&o.push(l.displayName)}),o.join(" ")}function dataTaskCount(n){return n.model.getRawData().count()}function dataTaskReset(n){var r=n.model;return r.setData(r.getRawData().cloneShallow()),dataTaskProgress}function dataTaskProgress(n,r){r.outputData&&n.end>r.outputData.count()&&r.model.getRawData().cloneShallow(r.outputData)}function wrapData(n,r){each$f(concatArray(n.CHANGABLE_METHODS,n.DOWNSAMPLE_METHODS),function(a){n.wrapMethod(a,curry$1(onDataChange,r))})}function onDataChange(n,r){var a=getCurrentTask(n);return a&&a.setOutputEnd((r||this).count()),r}function getCurrentTask(n){var r=(n.ecModel||{}).scheduler,a=r&&r.getPipeline(n.uid);if(a){var o=a.currentTask;if(o){var s=o.agentStubMap;s&&(o=s.get(n.uid))}return o}}var ComponentView=function(){function n(){this.group=new Group$3,this.uid=getUID("viewComponent")}return n.prototype.init=function(r,a){},n.prototype.render=function(r,a,o,s){},n.prototype.dispose=function(r,a){},n.prototype.updateView=function(r,a,o,s){},n.prototype.updateLayout=function(r,a,o,s){},n.prototype.updateVisual=function(r,a,o,s){},n.prototype.toggleBlurSeries=function(r,a,o){},n.prototype.eachRendered=function(r){var a=this.group;a&&a.traverse(r)},n}();enableClassExtend(ComponentView);enableClassManagement(ComponentView);function createRenderPlanner(){var n=makeInner();return function(r){var a=n(r),o=r.pipelineContext,s=!!a.large,l=!!a.progressiveRender,u=a.large=!!(o&&o.large),c=a.progressiveRender=!!(o&&o.progressiveRender);return(s!==u||l!==c)&&"reset"}}var inner$j=makeInner(),renderPlanner=createRenderPlanner(),ChartView=function(){function n(){this.group=new Group$3,this.uid=getUID("viewChart"),this.renderTask=createTask({plan:renderTaskPlan,reset:renderTaskReset}),this.renderTask.context={view:this}}return n.prototype.init=function(r,a){},n.prototype.render=function(r,a,o,s){},n.prototype.highlight=function(r,a,o,s){var l=r.getData(s&&s.dataType);l&&toggleHighlight(l,s,"emphasis")},n.prototype.downplay=function(r,a,o,s){var l=r.getData(s&&s.dataType);l&&toggleHighlight(l,s,"normal")},n.prototype.remove=function(r,a){this.group.removeAll()},n.prototype.dispose=function(r,a){},n.prototype.updateView=function(r,a,o,s){this.render(r,a,o,s)},n.prototype.updateLayout=function(r,a,o,s){this.render(r,a,o,s)},n.prototype.updateVisual=function(r,a,o,s){this.render(r,a,o,s)},n.prototype.eachRendered=function(r){traverseElements(this.group,r)},n.markUpdateMethod=function(r,a){inner$j(r).updateMethod=a},n.protoInitialize=function(){var r=n.prototype;r.type="chart"}(),n}();function elSetState(n,r,a){n&&isHighDownDispatcher(n)&&(r==="emphasis"?enterEmphasis:leaveEmphasis)(n,a)}function toggleHighlight(n,r,a){var o=queryDataIndex(n,r),s=r&&r.highlightKey!=null?getHighlightDigit(r.highlightKey):null;o!=null?each$f(normalizeToArray(o),function(l){elSetState(n.getItemGraphicEl(l),a,s)}):n.eachItemGraphicEl(function(l){elSetState(l,a,s)})}enableClassExtend(ChartView);enableClassManagement(ChartView);function renderTaskPlan(n){return renderPlanner(n.model)}function renderTaskReset(n){var r=n.model,a=n.ecModel,o=n.api,s=n.payload,l=r.pipelineContext.progressiveRender,u=n.view,c=s&&inner$j(s).updateMethod,d=l?"incrementalPrepareRender":c&&u[c]?c:"render";return d!=="render"&&u[d](r,a,o,s),progressMethodMap[d]}var progressMethodMap={incrementalPrepareRender:{progress:function(n,r){r.view.incrementalRender(n,r.model,r.ecModel,r.api,r.payload)}},render:{forceFirstProgress:!0,progress:function(n,r){r.view.render(r.model,r.ecModel,r.api,r.payload)}}},ORIGIN_METHOD="\0__throttleOriginMethod",RATE="\0__throttleRate",THROTTLE_TYPE="\0__throttleType";function throttle$2(n,r,a){var o,s=0,l=0,u=null,c,d,f,p;r=r||0;function v(){l=new Date().getTime(),u=null,n.apply(d,f||[])}var g=function(){for(var y=[],_=0;_<arguments.length;_++)y[_]=arguments[_];o=new Date().getTime(),d=this,f=y;var S=p||r,b=p||a;p=null,c=o-(b?s:l)-S,clearTimeout(u),b?u=setTimeout(v,S):c>=0?v():u=setTimeout(v,-c),s=o};return g.clear=function(){u&&(clearTimeout(u),u=null)},g.debounceNextCall=function(y){p=y},g}function createOrUpdate(n,r,a,o){var s=n[r];if(s){var l=s[ORIGIN_METHOD]||s,u=s[THROTTLE_TYPE],c=s[RATE];if(c!==a||u!==o){if(a==null||!o)return n[r]=l;s=n[r]=throttle$2(l,a,o==="debounce"),s[ORIGIN_METHOD]=l,s[THROTTLE_TYPE]=o,s[RATE]=a}return s}}function clear$1(n,r){var a=n[r];a&&a[ORIGIN_METHOD]&&(a.clear&&a.clear(),n[r]=a[ORIGIN_METHOD])}var inner$i=makeInner(),defaultStyleMappers={itemStyle:makeStyleMapper(ITEM_STYLE_KEY_MAP,!0),lineStyle:makeStyleMapper(LINE_STYLE_KEY_MAP,!0)},defaultColorKey={lineStyle:"stroke",itemStyle:"fill"};function getStyleMapper(n,r){var a=n.visualStyleMapper||defaultStyleMappers[r];return a||defaultStyleMappers.itemStyle}function getDefaultColorKey(n,r){var a=n.visualDrawType||defaultColorKey[r];return a||"fill"}var seriesStyleTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,r){var a=n.getData(),o=n.visualStyleAccessPath||"itemStyle",s=n.getModel(o),l=getStyleMapper(n,o),u=l(s),c=s.getShallow("decal");c&&(a.setVisual("decal",c),c.dirty=!0);var d=getDefaultColorKey(n,o),f=u[d],p=isFunction(f)?f:null,v=u.fill==="auto"||u.stroke==="auto";if(!u[d]||p||v){var g=n.getColorFromPalette(n.name,null,r.getSeriesCount());u[d]||(u[d]=g,a.setVisual("colorFromPalette",!0)),u.fill=u.fill==="auto"||isFunction(u.fill)?g:u.fill,u.stroke=u.stroke==="auto"||isFunction(u.stroke)?g:u.stroke}if(a.setVisual("style",u),a.setVisual("drawType",d),!r.isSeriesFiltered(n)&&p)return a.setVisual("colorFromPalette",!1),{dataEach:function(y,_){var S=n.getDataParams(_),b=extend$2({},u);b[d]=p(S),y.setItemVisual(_,"style",b)}}}},sharedModel=new Model,dataStyleTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,r){if(!(n.ignoreStyleOnData||r.isSeriesFiltered(n))){var a=n.getData(),o=n.visualStyleAccessPath||"itemStyle",s=getStyleMapper(n,o),l=a.getVisual("drawType");return{dataEach:a.hasItemOption?function(u,c){var d=u.getRawDataItem(c);if(d&&d[o]){sharedModel.option=d[o];var f=s(sharedModel),p=u.ensureUniqueItemVisual(c,"style");extend$2(p,f),sharedModel.option.decal&&(u.setItemVisual(c,"decal",sharedModel.option.decal),sharedModel.option.decal.dirty=!0),l in f&&u.setItemVisual(c,"colorFromPalette",!1)}}:null}}}},dataColorPaletteTask={performRawSeries:!0,overallReset:function(n){var r=createHashMap();n.eachSeries(function(a){var o=a.getColorBy();if(!a.isColorBySeries()){var s=a.type+"-"+o,l=r.get(s);l||(l={},r.set(s,l)),inner$i(a).scope=l}}),n.eachSeries(function(a){if(!(a.isColorBySeries()||n.isSeriesFiltered(a))){var o=a.getRawData(),s={},l=a.getData(),u=inner$i(a).scope,c=a.visualStyleAccessPath||"itemStyle",d=getDefaultColorKey(a,c);l.each(function(f){var p=l.getRawIndex(f);s[p]=f}),o.each(function(f){var p=s[f],v=l.getItemVisual(p,"colorFromPalette");if(v){var g=l.ensureUniqueItemVisual(p,"style"),y=o.getName(f)||f+"",_=o.count();g[d]=a.getColorFromPalette(y,u,_)}})}})}},PI$5=Math.PI;function defaultLoading(n,r){r=r||{},defaults$2(r,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var a=new Group$3,o=new Rect$2({style:{fill:r.maskColor},zlevel:r.zlevel,z:1e4});a.add(o);var s=new ZRText({style:{text:r.text,fill:r.textColor,fontSize:r.fontSize,fontWeight:r.fontWeight,fontStyle:r.fontStyle,fontFamily:r.fontFamily},zlevel:r.zlevel,z:10001}),l=new Rect$2({style:{fill:"none"},textContent:s,textConfig:{position:"right",distance:10},zlevel:r.zlevel,z:10001});a.add(l);var u;return r.showSpinner&&(u=new Arc({shape:{startAngle:-PI$5/2,endAngle:-PI$5/2+.1,r:r.spinnerRadius},style:{stroke:r.color,lineCap:"round",lineWidth:r.lineWidth},zlevel:r.zlevel,z:10001}),u.animateShape(!0).when(1e3,{endAngle:PI$5*3/2}).start("circularInOut"),u.animateShape(!0).when(1e3,{startAngle:PI$5*3/2}).delay(300).start("circularInOut"),a.add(u)),a.resize=function(){var c=s.getBoundingRect().width,d=r.showSpinner?r.spinnerRadius:0,f=(n.getWidth()-d*2-(r.showSpinner&&c?10:0)-c)/2-(r.showSpinner&&c?0:5+c/2)+(r.showSpinner?0:c/2)+(c?0:d),p=n.getHeight()/2;r.showSpinner&&u.setShape({cx:f,cy:p}),l.setShape({x:f-d,y:p-d,width:d*2,height:d*2}),o.setShape({x:0,y:0,width:n.getWidth(),height:n.getHeight()})},a.resize(),a}var Scheduler=function(){function n(r,a,o,s){this._stageTaskMap=createHashMap(),this.ecInstance=r,this.api=a,o=this._dataProcessorHandlers=o.slice(),s=this._visualHandlers=s.slice(),this._allHandlers=o.concat(s)}return n.prototype.restoreData=function(r,a){r.restoreData(a),this._stageTaskMap.each(function(o){var s=o.overallTask;s&&s.dirty()})},n.prototype.getPerformArgs=function(r,a){if(r.__pipeline){var o=this._pipelineMap.get(r.__pipeline.id),s=o.context,l=!a&&o.progressiveEnabled&&(!s||s.progressiveRender)&&r.__idxInPipeline>o.blockIndex,u=l?o.step:null,c=s&&s.modDataCount,d=c!=null?Math.ceil(c/u):null;return{step:u,modBy:d,modDataCount:c}}},n.prototype.getPipeline=function(r){return this._pipelineMap.get(r)},n.prototype.updateStreamModes=function(r,a){var o=this._pipelineMap.get(r.uid),s=r.getData(),l=s.count(),u=o.progressiveEnabled&&a.incrementalPrepareRender&&l>=o.threshold,c=r.get("large")&&l>=r.get("largeThreshold"),d=r.get("progressiveChunkMode")==="mod"?l:null;r.pipelineContext=o.context={progressiveRender:u,modDataCount:d,large:c}},n.prototype.restorePipelines=function(r){var a=this,o=a._pipelineMap=createHashMap();r.eachSeries(function(s){var l=s.getProgressive(),u=s.uid;o.set(u,{id:u,head:null,tail:null,threshold:s.getProgressiveThreshold(),progressiveEnabled:l&&!(s.preventIncremental&&s.preventIncremental()),blockIndex:-1,step:Math.round(l||700),count:0}),a._pipe(s,s.dataTask)})},n.prototype.prepareStageTasks=function(){var r=this._stageTaskMap,a=this.api.getModel(),o=this.api;each$f(this._allHandlers,function(s){var l=r.get(s.uid)||r.set(s.uid,{}),u="";assert(!(s.reset&&s.overallReset),u),s.reset&&this._createSeriesStageTask(s,l,a,o),s.overallReset&&this._createOverallStageTask(s,l,a,o)},this)},n.prototype.prepareView=function(r,a,o,s){var l=r.renderTask,u=l.context;u.model=a,u.ecModel=o,u.api=s,l.__block=!r.incrementalPrepareRender,this._pipe(a,l)},n.prototype.performDataProcessorTasks=function(r,a){this._performStageTasks(this._dataProcessorHandlers,r,a,{block:!0})},n.prototype.performVisualTasks=function(r,a,o){this._performStageTasks(this._visualHandlers,r,a,o)},n.prototype._performStageTasks=function(r,a,o,s){s=s||{};var l=!1,u=this;each$f(r,function(d,f){if(!(s.visualType&&s.visualType!==d.visualType)){var p=u._stageTaskMap.get(d.uid),v=p.seriesTaskMap,g=p.overallTask;if(g){var y,_=g.agentStubMap;_.each(function(b){c(s,b)&&(b.dirty(),y=!0)}),y&&g.dirty(),u.updatePayload(g,o);var S=u.getPerformArgs(g,s.block);_.each(function(b){b.perform(S)}),g.perform(S)&&(l=!0)}else v&&v.each(function(b,x){c(s,b)&&b.dirty();var A=u.getPerformArgs(b,s.block);A.skip=!d.performRawSeries&&a.isSeriesFiltered(b.context.model),u.updatePayload(b,o),b.perform(A)&&(l=!0)})}});function c(d,f){return d.setDirty&&(!d.dirtyMap||d.dirtyMap.get(f.__pipeline.id))}this.unfinished=l||this.unfinished},n.prototype.performSeriesTasks=function(r){var a;r.eachSeries(function(o){a=o.dataTask.perform()||a}),this.unfinished=a||this.unfinished},n.prototype.plan=function(){this._pipelineMap.each(function(r){var a=r.tail;do{if(a.__block){r.blockIndex=a.__idxInPipeline;break}a=a.getUpstream()}while(a)})},n.prototype.updatePayload=function(r,a){a!=="remain"&&(r.context.payload=a)},n.prototype._createSeriesStageTask=function(r,a,o,s){var l=this,u=a.seriesTaskMap,c=a.seriesTaskMap=createHashMap(),d=r.seriesType,f=r.getTargetSeries;r.createOnAllSeries?o.eachRawSeries(p):d?o.eachRawSeriesByType(d,p):f&&f(o,s).each(p);function p(v){var g=v.uid,y=c.set(g,u&&u.get(g)||createTask({plan:seriesTaskPlan,reset:seriesTaskReset,count:seriesTaskCount}));y.context={model:v,ecModel:o,api:s,useClearVisual:r.isVisual&&!r.isLayout,plan:r.plan,reset:r.reset,scheduler:l},l._pipe(v,y)}},n.prototype._createOverallStageTask=function(r,a,o,s){var l=this,u=a.overallTask=a.overallTask||createTask({reset:overallTaskReset});u.context={ecModel:o,api:s,overallReset:r.overallReset,scheduler:l};var c=u.agentStubMap,d=u.agentStubMap=createHashMap(),f=r.seriesType,p=r.getTargetSeries,v=!0,g=!1,y="";assert(!r.createOnAllSeries,y),f?o.eachRawSeriesByType(f,_):p?p(o,s).each(_):(v=!1,each$f(o.getSeries(),_));function _(S){var b=S.uid,x=d.set(b,c&&c.get(b)||(g=!0,createTask({reset:stubReset,onDirty:stubOnDirty})));x.context={model:S,overallProgress:v},x.agent=u,x.__block=v,l._pipe(S,x)}g&&u.dirty()},n.prototype._pipe=function(r,a){var o=r.uid,s=this._pipelineMap.get(o);!s.head&&(s.head=a),s.tail&&s.tail.pipe(a),s.tail=a,a.__idxInPipeline=s.count++,a.__pipeline=s},n.wrapStageHandler=function(r,a){return isFunction(r)&&(r={overallReset:r,seriesType:detectSeriseType(r)}),r.uid=getUID("stageHandler"),a&&(r.visualType=a),r},n}();function overallTaskReset(n){n.overallReset(n.ecModel,n.api,n.payload)}function stubReset(n){return n.overallProgress&&stubProgress}function stubProgress(){this.agent.dirty(),this.getDownstream().dirty()}function stubOnDirty(){this.agent&&this.agent.dirty()}function seriesTaskPlan(n){return n.plan?n.plan(n.model,n.ecModel,n.api,n.payload):null}function seriesTaskReset(n){n.useClearVisual&&n.data.clearAllVisual();var r=n.resetDefines=normalizeToArray(n.reset(n.model,n.ecModel,n.api,n.payload));return r.length>1?map$1(r,function(a,o){return makeSeriesTaskProgress(o)}):singleSeriesTaskProgress}var singleSeriesTaskProgress=makeSeriesTaskProgress(0);function makeSeriesTaskProgress(n){return function(r,a){var o=a.data,s=a.resetDefines[n];if(s&&s.dataEach)for(var l=r.start;l<r.end;l++)s.dataEach(o,l);else s&&s.progress&&s.progress(r,o)}}function seriesTaskCount(n){return n.data.count()}function detectSeriseType(n){seriesType=null;try{n(ecModelMock,apiMock)}catch(r){}return seriesType}var ecModelMock={},apiMock={},seriesType;mockMethods(ecModelMock,GlobalModel);mockMethods(apiMock,ExtensionAPI);ecModelMock.eachSeriesByType=ecModelMock.eachRawSeriesByType=function(n){seriesType=n};ecModelMock.eachComponent=function(n){n.mainType==="series"&&n.subType&&(seriesType=n.subType)};function mockMethods(n,r){for(var a in r.prototype)n[a]=noop}var colorAll=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const lightTheme={color:colorAll,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],colorAll]};var contrastColor="#B9B8CE",backgroundColor="#100C2A",axisCommon=function(){return{axisLine:{lineStyle:{color:contrastColor}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},colorPalette=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],theme={darkMode:!0,color:colorPalette,backgroundColor,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:contrastColor},pageTextStyle:{color:contrastColor}},textStyle:{color:contrastColor},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:contrastColor}},dataZoom:{borderColor:"#71708A",textStyle:{color:contrastColor},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:contrastColor}},timeline:{lineStyle:{color:contrastColor},label:{color:contrastColor},controlStyle:{color:contrastColor,borderColor:contrastColor}},calendar:{itemStyle:{color:backgroundColor},dayLabel:{color:contrastColor},monthLabel:{color:contrastColor},yearLabel:{color:contrastColor}},timeAxis:axisCommon(),logAxis:axisCommon(),valueAxis:axisCommon(),categoryAxis:axisCommon(),line:{symbol:"circle"},graph:{color:colorPalette},gauge:{title:{color:contrastColor},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:contrastColor},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};theme.categoryAxis.splitLine.show=!1;var ECEventProcessor=function(){function n(){}return n.prototype.normalizeQuery=function(r){var a={},o={},s={};if(isString(r)){var l=parseClassType(r);a.mainType=l.main||null,a.subType=l.sub||null}else{var u=["Index","Name","Id"],c={name:1,dataIndex:1,dataType:1};each$f(r,function(d,f){for(var p=!1,v=0;v<u.length;v++){var g=u[v],y=f.lastIndexOf(g);if(y>0&&y===f.length-g.length){var _=f.slice(0,y);_!=="data"&&(a.mainType=_,a[g.toLowerCase()]=d,p=!0)}}c.hasOwnProperty(f)&&(o[f]=d,p=!0),p||(s[f]=d)})}return{cptQuery:a,dataQuery:o,otherQuery:s}},n.prototype.filter=function(r,a){var o=this.eventInfo;if(!o)return!0;var s=o.targetEl,l=o.packedEvent,u=o.model,c=o.view;if(!u||!c)return!0;var d=a.cptQuery,f=a.dataQuery;return p(d,u,"mainType")&&p(d,u,"subType")&&p(d,u,"index","componentIndex")&&p(d,u,"name")&&p(d,u,"id")&&p(f,l,"name")&&p(f,l,"dataIndex")&&p(f,l,"dataType")&&(!c.filterForExposedEvent||c.filterForExposedEvent(r,a.otherQuery,s,l));function p(v,g,y,_){return v[y]==null||g[_||y]===v[y]}},n.prototype.afterTrigger=function(){this.eventInfo=null},n}(),SYMBOL_PROPS_WITH_CB=["symbol","symbolSize","symbolRotate","symbolOffset"],SYMBOL_PROPS=SYMBOL_PROPS_WITH_CB.concat(["symbolKeepAspect"]),seriesSymbolTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,r){var a=n.getData();if(n.legendIcon&&a.setVisual("legendIcon",n.legendIcon),!n.hasSymbolVisual)return;for(var o={},s={},l=!1,u=0;u<SYMBOL_PROPS_WITH_CB.length;u++){var c=SYMBOL_PROPS_WITH_CB[u],d=n.get(c);isFunction(d)?(l=!0,s[c]=d):o[c]=d}if(o.symbol=o.symbol||n.defaultSymbol,a.setVisual(extend$2({legendIcon:n.legendIcon||o.symbol,symbolKeepAspect:n.get("symbolKeepAspect")},o)),r.isSeriesFiltered(n))return;var f=keys(s);function p(v,g){for(var y=n.getRawValue(g),_=n.getDataParams(g),S=0;S<f.length;S++){var b=f[S];v.setItemVisual(g,b,s[b](y,_))}}return{dataEach:l?p:null}}},dataSymbolTask={createOnAllSeries:!0,performRawSeries:!0,reset:function(n,r){if(!n.hasSymbolVisual||r.isSeriesFiltered(n))return;var a=n.getData();function o(s,l){for(var u=s.getItemModel(l),c=0;c<SYMBOL_PROPS.length;c++){var d=SYMBOL_PROPS[c],f=u.getShallow(d,!0);f!=null&&s.setItemVisual(l,d,f)}}return{dataEach:a.hasItemOption?o:null}}};function getItemVisualFromData(n,r,a){switch(a){case"color":var o=n.getItemVisual(r,"style");return o[n.getVisual("drawType")];case"opacity":return n.getItemVisual(r,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return n.getItemVisual(r,a)}}function getVisualFromData(n,r){switch(r){case"color":var a=n.getVisual("style");return a[n.getVisual("drawType")];case"opacity":return n.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return n.getVisual(r)}}function setItemVisualFromData(n,r,a,o){switch(a){case"color":var s=n.ensureUniqueItemVisual(r,"style");s[n.getVisual("drawType")]=o,n.setItemVisual(r,"colorFromPalette",!1);break;case"opacity":n.ensureUniqueItemVisual(r,"style").opacity=o;break;case"symbol":case"symbolSize":case"liftZ":n.setItemVisual(r,a,o);break}}function createLegacyDataSelectAction(n,r){function a(o,s){var l=[];return o.eachComponent({mainType:"series",subType:n,query:s},function(u){l.push(u.seriesIndex)}),l}each$f([[n+"ToggleSelect","toggleSelect"],[n+"Select","select"],[n+"UnSelect","unselect"]],function(o){r(o[0],function(s,l,u){s=extend$2({},s),u.dispatchAction(extend$2(s,{type:o[1],seriesIndex:a(l,s)}))})})}function handleSeriesLegacySelectEvents(n,r,a,o,s){var l=n+r;a.isSilent(l)||o.eachComponent({mainType:"series",subType:"pie"},function(u){for(var c=u.seriesIndex,d=u.option.selectedMap,f=s.selected,p=0;p<f.length;p++)if(f[p].seriesIndex===c){var v=u.getData(),g=queryDataIndex(v,s.fromActionPayload);a.trigger(l,{type:l,seriesId:u.id,name:isArray$1(g)?v.getName(g[0]):v.getName(g),selected:isString(d)?d:extend$2({},d)})}})}function handleLegacySelectEvents(n,r,a){n.on("selectchanged",function(o){var s=a.getModel();o.isFromClick?(handleSeriesLegacySelectEvents("map","selectchanged",r,s,o),handleSeriesLegacySelectEvents("pie","selectchanged",r,s,o)):o.fromAction==="select"?(handleSeriesLegacySelectEvents("map","selected",r,s,o),handleSeriesLegacySelectEvents("pie","selected",r,s,o)):o.fromAction==="unselect"&&(handleSeriesLegacySelectEvents("map","unselected",r,s,o),handleSeriesLegacySelectEvents("pie","unselected",r,s,o))})}function findEventDispatcher(n,r,a){for(var o;n&&!(r(n)&&(o=n,a));)n=n.__hostTarget||n.parent;return o}var wmUniqueIndex=Math.round(Math.random()*9),supportDefineProperty=typeof Object.defineProperty=="function",WeakMap$1=function(){function n(){this._id="__ec_inner_"+wmUniqueIndex++}return n.prototype.get=function(r){return this._guard(r)[this._id]},n.prototype.set=function(r,a){var o=this._guard(r);return supportDefineProperty?Object.defineProperty(o,this._id,{value:a,enumerable:!1,configurable:!0}):o[this._id]=a,this},n.prototype.delete=function(r){return this.has(r)?(delete this._guard(r)[this._id],!0):!1},n.prototype.has=function(r){return!!this._guard(r)[this._id]},n.prototype._guard=function(r){if(r!==Object(r))throw TypeError("Value of WeakMap is not a non-null object.");return r},n}(),Triangle=Path.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(n,r){var a=r.cx,o=r.cy,s=r.width/2,l=r.height/2;n.moveTo(a,o-l),n.lineTo(a+s,o+l),n.lineTo(a-s,o+l),n.closePath()}}),Diamond=Path.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(n,r){var a=r.cx,o=r.cy,s=r.width/2,l=r.height/2;n.moveTo(a,o-l),n.lineTo(a+s,o),n.lineTo(a,o+l),n.lineTo(a-s,o),n.closePath()}}),Pin=Path.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(n,r){var a=r.x,o=r.y,s=r.width/5*3,l=Math.max(s,r.height),u=s/2,c=u*u/(l-u),d=o-l+u+c,f=Math.asin(c/u),p=Math.cos(f)*u,v=Math.sin(f),g=Math.cos(f),y=u*.6,_=u*.7;n.moveTo(a-p,d+c),n.arc(a,d,u,Math.PI-f,Math.PI*2+f),n.bezierCurveTo(a+p-v*y,d+c+g*y,a,o-_,a,o),n.bezierCurveTo(a,o-_,a-p+v*y,d+c+g*y,a-p,d+c),n.closePath()}}),Arrow=Path.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(n,r){var a=r.height,o=r.width,s=r.x,l=r.y,u=o/3*2;n.moveTo(s,l),n.lineTo(s+u,l+a),n.lineTo(s,l+a/4*3),n.lineTo(s-u,l+a),n.lineTo(s,l),n.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(n,r,a,o,s){s.x1=n,s.y1=r+o/2,s.x2=n+a,s.y2=r+o/2},rect:function(n,r,a,o,s){s.x=n,s.y=r,s.width=a,s.height=o},roundRect:function(n,r,a,o,s){s.x=n,s.y=r,s.width=a,s.height=o,s.r=Math.min(a,o)/4},square:function(n,r,a,o,s){var l=Math.min(a,o);s.x=n,s.y=r,s.width=l,s.height=l},circle:function(n,r,a,o,s){s.cx=n+a/2,s.cy=r+o/2,s.r=Math.min(a,o)/2},diamond:function(n,r,a,o,s){s.cx=n+a/2,s.cy=r+o/2,s.width=a,s.height=o},pin:function(n,r,a,o,s){s.x=n+a/2,s.y=r+o/2,s.width=a,s.height=o},arrow:function(n,r,a,o,s){s.x=n+a/2,s.y=r+o/2,s.width=a,s.height=o},triangle:function(n,r,a,o,s){s.cx=n+a/2,s.cy=r+o/2,s.width=a,s.height=o}},symbolBuildProxies={};each$f(symbolCtors,function(n,r){symbolBuildProxies[r]=new n});var SymbolClz=Path.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(n,r,a){var o=calculateTextPosition(n,r,a),s=this.shape;return s&&s.symbolType==="pin"&&r.position==="inside"&&(o.y=a.y+a.height*.4),o},buildPath:function(n,r,a){var o=r.symbolType;if(o!=="none"){var s=symbolBuildProxies[o];s||(o="rect",s=symbolBuildProxies[o]),symbolShapeMakers[o](r.x,r.y,r.width,r.height,s.shape),s.buildPath(n,s.shape,a)}}});function symbolPathSetColor(n,r){if(this.type!=="image"){var a=this.style;this.__isEmptyBrush?(a.stroke=n,a.fill=r||"#fff",a.lineWidth=2):this.shape.symbolType==="line"?a.stroke=n:a.fill=n,this.markRedraw()}}function createSymbol$1(n,r,a,o,s,l,u){var c=n.indexOf("empty")===0;c&&(n=n.substr(5,1).toLowerCase()+n.substr(6));var d;return n.indexOf("image://")===0?d=makeImage(n.slice(8),new BoundingRect(r,a,o,s),u?"center":"cover"):n.indexOf("path://")===0?d=makePath(n.slice(7),{},new BoundingRect(r,a,o,s),u?"center":"cover"):d=new SymbolClz({shape:{symbolType:n,x:r,y:a,width:o,height:s}}),d.__isEmptyBrush=c,d.setColor=symbolPathSetColor,l&&d.setColor(l),d}function normalizeSymbolSize(n){return isArray$1(n)||(n=[+n,+n]),[n[0]||0,n[1]||0]}function normalizeSymbolOffset(n,r){if(n!=null)return isArray$1(n)||(n=[n,n]),[parsePercent(n[0],r[0])||0,parsePercent(retrieve2(n[1],n[0]),r[1])||0]}function isSafeNum(n){return isFinite(n)}function createLinearGradient(n,r,a){var o=r.x==null?0:r.x,s=r.x2==null?1:r.x2,l=r.y==null?0:r.y,u=r.y2==null?0:r.y2;r.global||(o=o*a.width+a.x,s=s*a.width+a.x,l=l*a.height+a.y,u=u*a.height+a.y),o=isSafeNum(o)?o:0,s=isSafeNum(s)?s:1,l=isSafeNum(l)?l:0,u=isSafeNum(u)?u:0;var c=n.createLinearGradient(o,l,s,u);return c}function createRadialGradient(n,r,a){var o=a.width,s=a.height,l=Math.min(o,s),u=r.x==null?.5:r.x,c=r.y==null?.5:r.y,d=r.r==null?.5:r.r;r.global||(u=u*o+a.x,c=c*s+a.y,d=d*l),u=isSafeNum(u)?u:.5,c=isSafeNum(c)?c:.5,d=d>=0&&isSafeNum(d)?d:.5;var f=n.createRadialGradient(u,c,0,u,c,d);return f}function getCanvasGradient(n,r,a){for(var o=r.type==="radial"?createRadialGradient(n,r,a):createLinearGradient(n,r,a),s=r.colorStops,l=0;l<s.length;l++)o.addColorStop(s[l].offset,s[l].color);return o}function isClipPathChanged(n,r){if(n===r||!n&&!r)return!1;if(!n||!r||n.length!==r.length)return!0;for(var a=0;a<n.length;a++)if(n[a]!==r[a])return!0;return!1}function parseInt10(n){return parseInt(n,10)}function getSize$1(n,r,a){var o=["width","height"][r],s=["clientWidth","clientHeight"][r],l=["paddingLeft","paddingTop"][r],u=["paddingRight","paddingBottom"][r];if(a[o]!=null&&a[o]!=="auto")return parseFloat(a[o]);var c=document.defaultView.getComputedStyle(n);return(n[s]||parseInt10(c[o])||parseInt10(n.style[o]))-(parseInt10(c[l])||0)-(parseInt10(c[u])||0)|0}function normalizeLineDash(n,r){return!n||n==="solid"||!(r>0)?null:n==="dashed"?[4*r,2*r]:n==="dotted"?[r]:isNumber(n)?[n]:isArray$1(n)?n:null}function getLineDash(n){var r=n.style,a=r.lineDash&&r.lineWidth>0&&normalizeLineDash(r.lineDash,r.lineWidth),o=r.lineDashOffset;if(a){var s=r.strokeNoScale&&n.getLineScale?n.getLineScale():1;s&&s!==1&&(a=map$1(a,function(l){return l/s}),o/=s)}return[a,o]}var pathProxyForDraw=new PathProxy(!0);function styleHasStroke(n){var r=n.stroke;return!(r==null||r==="none"||!(n.lineWidth>0))}function isValidStrokeFillStyle(n){return typeof n=="string"&&n!=="none"}function styleHasFill(n){var r=n.fill;return r!=null&&r!=="none"}function doFillPath(n,r){if(r.fillOpacity!=null&&r.fillOpacity!==1){var a=n.globalAlpha;n.globalAlpha=r.fillOpacity*r.opacity,n.fill(),n.globalAlpha=a}else n.fill()}function doStrokePath(n,r){if(r.strokeOpacity!=null&&r.strokeOpacity!==1){var a=n.globalAlpha;n.globalAlpha=r.strokeOpacity*r.opacity,n.stroke(),n.globalAlpha=a}else n.stroke()}function createCanvasPattern(n,r,a){var o=createOrUpdateImage(r.image,r.__image,a);if(isImageReady(o)){var s=n.createPattern(o,r.repeat||"repeat");if(typeof DOMMatrix=="function"&&s&&s.setTransform){var l=new DOMMatrix;l.translateSelf(r.x||0,r.y||0),l.rotateSelf(0,0,(r.rotation||0)*RADIAN_TO_DEGREE),l.scaleSelf(r.scaleX||1,r.scaleY||1),s.setTransform(l)}return s}}function brushPath(n,r,a,o){var s,l=styleHasStroke(a),u=styleHasFill(a),c=a.strokePercent,d=c<1,f=!r.path;(!r.silent||d)&&f&&r.createPathProxy();var p=r.path||pathProxyForDraw,v=r.__dirty;if(!o){var g=a.fill,y=a.stroke,_=u&&!!g.colorStops,S=l&&!!y.colorStops,b=u&&!!g.image,x=l&&!!y.image,A=void 0,w=void 0,E=void 0,D=void 0,C=void 0;(_||S)&&(C=r.getBoundingRect()),_&&(A=v?getCanvasGradient(n,g,C):r.__canvasFillGradient,r.__canvasFillGradient=A),S&&(w=v?getCanvasGradient(n,y,C):r.__canvasStrokeGradient,r.__canvasStrokeGradient=w),b&&(E=v||!r.__canvasFillPattern?createCanvasPattern(n,g,r):r.__canvasFillPattern,r.__canvasFillPattern=E),x&&(D=v||!r.__canvasStrokePattern?createCanvasPattern(n,y,r):r.__canvasStrokePattern,r.__canvasStrokePattern=E),_?n.fillStyle=A:b&&(E?n.fillStyle=E:u=!1),S?n.strokeStyle=w:x&&(D?n.strokeStyle=D:l=!1)}var $=r.getGlobalScale();p.setScale($[0],$[1],r.segmentIgnoreThreshold);var P,M;n.setLineDash&&a.lineDash&&(s=getLineDash(r),P=s[0],M=s[1]);var I=!0;(f||v&SHAPE_CHANGED_BIT)&&(p.setDPR(n.dpr),d?p.setContext(null):(p.setContext(n),I=!1),p.reset(),r.buildPath(p,r.shape,o),p.toStatic(),r.pathUpdated()),I&&p.rebuildPath(n,d?c:1),P&&(n.setLineDash(P),n.lineDashOffset=M),o||(a.strokeFirst?(l&&doStrokePath(n,a),u&&doFillPath(n,a)):(u&&doFillPath(n,a),l&&doStrokePath(n,a))),P&&n.setLineDash([])}function brushImage(n,r,a){var o=r.__image=createOrUpdateImage(a.image,r.__image,r,r.onload);if(!(!o||!isImageReady(o))){var s=a.x||0,l=a.y||0,u=r.getWidth(),c=r.getHeight(),d=o.width/o.height;if(u==null&&c!=null?u=c*d:c==null&&u!=null?c=u/d:u==null&&c==null&&(u=o.width,c=o.height),a.sWidth&&a.sHeight){var f=a.sx||0,p=a.sy||0;n.drawImage(o,f,p,a.sWidth,a.sHeight,s,l,u,c)}else if(a.sx&&a.sy){var f=a.sx,p=a.sy,v=u-f,g=c-p;n.drawImage(o,f,p,v,g,s,l,u,c)}else n.drawImage(o,s,l,u,c)}}function brushText(n,r,a){var o,s=a.text;if(s!=null&&(s+=""),s){n.font=a.font||DEFAULT_FONT,n.textAlign=a.textAlign,n.textBaseline=a.textBaseline;var l=void 0,u=void 0;n.setLineDash&&a.lineDash&&(o=getLineDash(r),l=o[0],u=o[1]),l&&(n.setLineDash(l),n.lineDashOffset=u),a.strokeFirst?(styleHasStroke(a)&&n.strokeText(s,a.x,a.y),styleHasFill(a)&&n.fillText(s,a.x,a.y)):(styleHasFill(a)&&n.fillText(s,a.x,a.y),styleHasStroke(a)&&n.strokeText(s,a.x,a.y)),l&&n.setLineDash([])}}var SHADOW_NUMBER_PROPS=["shadowBlur","shadowOffsetX","shadowOffsetY"],STROKE_PROPS=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function bindCommonProps(n,r,a,o,s){var l=!1;if(!o&&(a=a||{},r===a))return!1;if(o||r.opacity!==a.opacity){flushPathDrawn(n,s),l=!0;var u=Math.max(Math.min(r.opacity,1),0);n.globalAlpha=isNaN(u)?DEFAULT_COMMON_STYLE.opacity:u}(o||r.blend!==a.blend)&&(l||(flushPathDrawn(n,s),l=!0),n.globalCompositeOperation=r.blend||DEFAULT_COMMON_STYLE.blend);for(var c=0;c<SHADOW_NUMBER_PROPS.length;c++){var d=SHADOW_NUMBER_PROPS[c];(o||r[d]!==a[d])&&(l||(flushPathDrawn(n,s),l=!0),n[d]=n.dpr*(r[d]||0))}return(o||r.shadowColor!==a.shadowColor)&&(l||(flushPathDrawn(n,s),l=!0),n.shadowColor=r.shadowColor||DEFAULT_COMMON_STYLE.shadowColor),l}function bindPathAndTextCommonStyle(n,r,a,o,s){var l=getStyle(r,s.inHover),u=o?null:a&&getStyle(a,s.inHover)||{};if(l===u)return!1;var c=bindCommonProps(n,l,u,o,s);if((o||l.fill!==u.fill)&&(c||(flushPathDrawn(n,s),c=!0),isValidStrokeFillStyle(l.fill)&&(n.fillStyle=l.fill)),(o||l.stroke!==u.stroke)&&(c||(flushPathDrawn(n,s),c=!0),isValidStrokeFillStyle(l.stroke)&&(n.strokeStyle=l.stroke)),(o||l.opacity!==u.opacity)&&(c||(flushPathDrawn(n,s),c=!0),n.globalAlpha=l.opacity==null?1:l.opacity),r.hasStroke()){var d=l.lineWidth,f=d/(l.strokeNoScale&&r.getLineScale?r.getLineScale():1);n.lineWidth!==f&&(c||(flushPathDrawn(n,s),c=!0),n.lineWidth=f)}for(var p=0;p<STROKE_PROPS.length;p++){var v=STROKE_PROPS[p],g=v[0];(o||l[g]!==u[g])&&(c||(flushPathDrawn(n,s),c=!0),n[g]=l[g]||v[1])}return c}function bindImageStyle(n,r,a,o,s){return bindCommonProps(n,getStyle(r,s.inHover),a&&getStyle(a,s.inHover),o,s)}function setContextTransform(n,r){var a=r.transform,o=n.dpr||1;a?n.setTransform(o*a[0],o*a[1],o*a[2],o*a[3],o*a[4],o*a[5]):n.setTransform(o,0,0,o,0,0)}function updateClipStatus(n,r,a){for(var o=!1,s=0;s<n.length;s++){var l=n[s];o=o||l.isZeroArea(),setContextTransform(r,l),r.beginPath(),l.buildPath(r,l.shape),r.clip()}a.allClipped=o}function isTransformChanged(n,r){return n&&r?n[0]!==r[0]||n[1]!==r[1]||n[2]!==r[2]||n[3]!==r[3]||n[4]!==r[4]||n[5]!==r[5]:!(!n&&!r)}var DRAW_TYPE_PATH=1,DRAW_TYPE_IMAGE=2,DRAW_TYPE_TEXT=3,DRAW_TYPE_INCREMENTAL=4;function canPathBatch(n){var r=styleHasFill(n),a=styleHasStroke(n);return!(n.lineDash||!(+r^+a)||r&&typeof n.fill!="string"||a&&typeof n.stroke!="string"||n.strokePercent<1||n.strokeOpacity<1||n.fillOpacity<1)}function flushPathDrawn(n,r){r.batchFill&&n.fill(),r.batchStroke&&n.stroke(),r.batchFill="",r.batchStroke=""}function getStyle(n,r){return r&&n.__hoverStyle||n.style}function brushSingle(n,r){brush$1(n,r,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function brush$1(n,r,a,o){var s=r.transform;if(!r.shouldBePainted(a.viewWidth,a.viewHeight,!1,!1)){r.__dirty&=~REDRAW_BIT,r.__isRendered=!1;return}var l=r.__clipPaths,u=a.prevElClipPaths,c=!1,d=!1;if((!u||isClipPathChanged(l,u))&&(u&&u.length&&(flushPathDrawn(n,a),n.restore(),d=c=!0,a.prevElClipPaths=null,a.allClipped=!1,a.prevEl=null),l&&l.length&&(flushPathDrawn(n,a),n.save(),updateClipStatus(l,n,a),c=!0),a.prevElClipPaths=l),a.allClipped){r.__isRendered=!1;return}r.beforeBrush&&r.beforeBrush(),r.innerBeforeBrush();var f=a.prevEl;f||(d=c=!0);var p=r instanceof Path&&r.autoBatch&&canPathBatch(r.style);c||isTransformChanged(s,f.transform)?(flushPathDrawn(n,a),setContextTransform(n,r)):p||flushPathDrawn(n,a);var v=getStyle(r,a.inHover);r instanceof Path?(a.lastDrawType!==DRAW_TYPE_PATH&&(d=!0,a.lastDrawType=DRAW_TYPE_PATH),bindPathAndTextCommonStyle(n,r,f,d,a),(!p||!a.batchFill&&!a.batchStroke)&&n.beginPath(),brushPath(n,r,v,p),p&&(a.batchFill=v.fill||"",a.batchStroke=v.stroke||"")):r instanceof TSpan?(a.lastDrawType!==DRAW_TYPE_TEXT&&(d=!0,a.lastDrawType=DRAW_TYPE_TEXT),bindPathAndTextCommonStyle(n,r,f,d,a),brushText(n,r,v)):r instanceof ZRImage?(a.lastDrawType!==DRAW_TYPE_IMAGE&&(d=!0,a.lastDrawType=DRAW_TYPE_IMAGE),bindImageStyle(n,r,f,d,a),brushImage(n,r,v)):r.getTemporalDisplayables&&(a.lastDrawType!==DRAW_TYPE_INCREMENTAL&&(d=!0,a.lastDrawType=DRAW_TYPE_INCREMENTAL),brushIncremental(n,r,a)),p&&o&&flushPathDrawn(n,a),r.innerAfterBrush(),r.afterBrush&&r.afterBrush(),a.prevEl=r,r.__dirty=0,r.__isRendered=!0}function brushIncremental(n,r,a){var o=r.getDisplayables(),s=r.getTemporalDisplayables();n.save();var l={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:a.viewWidth,viewHeight:a.viewHeight,inHover:a.inHover},u,c;for(u=r.getCursor(),c=o.length;u<c;u++){var d=o[u];d.beforeBrush&&d.beforeBrush(),d.innerBeforeBrush(),brush$1(n,d,l,u===c-1),d.innerAfterBrush(),d.afterBrush&&d.afterBrush(),l.prevEl=d}for(var f=0,p=s.length;f<p;f++){var d=s[f];d.beforeBrush&&d.beforeBrush(),d.innerBeforeBrush(),brush$1(n,d,l,f===p-1),d.innerAfterBrush(),d.afterBrush&&d.afterBrush(),l.prevEl=d}r.clearTemporalDisplayables(),r.notClear=!0,n.restore()}var decalMap=new WeakMap$1,decalCache=new LRU(100),decalKeys=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function createOrUpdatePatternFromDecal(n,r){if(n==="none")return null;var a=r.getDevicePixelRatio(),o=r.getZr(),s=o.painter.type==="svg";n.dirty&&decalMap.delete(n);var l=decalMap.get(n);if(l)return l;var u=defaults$2(n,{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});u.backgroundColor==="none"&&(u.backgroundColor=null);var c={repeat:"repeat"};return d(c),c.rotation=u.rotation,c.scaleX=c.scaleY=s?1:1/a,decalMap.set(n,c),n.dirty=!1,c;function d(f){for(var p=[a],v=!0,g=0;g<decalKeys.length;++g){var y=u[decalKeys[g]];if(y!=null&&!isArray$1(y)&&!isString(y)&&!isNumber(y)&&typeof y!="boolean"){v=!1;break}p.push(y)}var _;if(v){_=p.join(",")+(s?"-svg":"");var S=decalCache.get(_);S&&(s?f.svgElement=S:f.image=S)}var b=normalizeDashArrayX(u.dashArrayX),x=normalizeDashArrayY(u.dashArrayY),A=normalizeSymbolArray(u.symbol),w=getLineBlockLengthX(b),E=getLineBlockLengthY(x),D=!s&&platformApi.createCanvas(),C=s&&{tag:"g",attrs:{},key:"dcl",children:[]},$=M(),P;D&&(D.width=$.width*a,D.height=$.height*a,P=D.getContext("2d")),I(),v&&decalCache.put(_,D||C),f.image=D,f.svgElement=C,f.svgWidth=$.width,f.svgHeight=$.height;function M(){for(var L=1,O=0,R=w.length;O<R;++O)L=getLeastCommonMultiple(L,w[O]);for(var N=1,O=0,R=A.length;O<R;++O)N=getLeastCommonMultiple(N,A[O].length);L*=N;var V=E*w.length*A.length;return{width:Math.max(1,Math.min(L,u.maxTileWidth)),height:Math.max(1,Math.min(V,u.maxTileHeight))}}function I(){P&&(P.clearRect(0,0,D.width,D.height),u.backgroundColor&&(P.fillStyle=u.backgroundColor,P.fillRect(0,0,D.width,D.height)));for(var L=0,O=0;O<x.length;++O)L+=x[O];if(L<=0)return;for(var R=-E,N=0,V=0,F=0;R<$.height;){if(N%2===0){for(var U=V/2%A.length,H=0,W=0,G=0;H<$.width*2;){for(var B=0,O=0;O<b[F].length;++O)B+=b[F][O];if(B<=0)break;if(W%2===0){var Y=(1-u.symbolSize)*.5,Z=H+b[F][W]*Y,K=R+x[N]*Y,ee=b[F][W]*u.symbolSize,j=x[N]*u.symbolSize,q=G/2%A[U].length;J(Z,K,ee,j,A[U][q])}H+=b[F][W],++G,++W,W===b[F].length&&(W=0)}++F,F===b.length&&(F=0)}R+=x[N],++V,++N,N===x.length&&(N=0)}function J(X,re,Q,te,ie){var ne=s?1:a,oe=createSymbol$1(ie,X*ne,re*ne,Q*ne,te*ne,u.color,u.symbolKeepAspect);if(s){var le=o.painter.renderOneToVNode(oe);le&&C.children.push(le)}else brushSingle(P,oe)}}}}function normalizeSymbolArray(n){if(!n||n.length===0)return[["rect"]];if(isString(n))return[[n]];for(var r=!0,a=0;a<n.length;++a)if(!isString(n[a])){r=!1;break}if(r)return normalizeSymbolArray([n]);for(var o=[],a=0;a<n.length;++a)isString(n[a])?o.push([n[a]]):o.push(n[a]);return o}function normalizeDashArrayX(n){if(!n||n.length===0)return[[0,0]];if(isNumber(n)){var r=Math.ceil(n);return[[r,r]]}for(var a=!0,o=0;o<n.length;++o)if(!isNumber(n[o])){a=!1;break}if(a)return normalizeDashArrayX([n]);for(var s=[],o=0;o<n.length;++o)if(isNumber(n[o])){var r=Math.ceil(n[o]);s.push([r,r])}else{var r=map$1(n[o],function(c){return Math.ceil(c)});r.length%2===1?s.push(r.concat(r)):s.push(r)}return s}function normalizeDashArrayY(n){if(!n||typeof n=="object"&&n.length===0)return[0,0];if(isNumber(n)){var r=Math.ceil(n);return[r,r]}var a=map$1(n,function(o){return Math.ceil(o)});return n.length%2?a.concat(a):a}function getLineBlockLengthX(n){return map$1(n,function(r){return getLineBlockLengthY(r)})}function getLineBlockLengthY(n){for(var r=0,a=0;a<n.length;++a)r+=n[a];return n.length%2===1?r*2:r}function decalVisual(n,r){n.eachRawSeries(function(a){if(!n.isSeriesFiltered(a)){var o=a.getData();o.hasItemVisual()&&o.each(function(u){var c=o.getItemVisual(u,"decal");if(c){var d=o.ensureUniqueItemVisual(u,"style");d.decal=createOrUpdatePatternFromDecal(c,r)}});var s=o.getVisual("decal");if(s){var l=o.getVisual("style");l.decal=createOrUpdatePatternFromDecal(s,r)}}})}var lifecycle=new Eventful,implsStore={};function registerImpl(n,r){implsStore[n]=r}function getImpl(n){return implsStore[n]}var version$2="5.6.0",dependencies={zrender:"5.6.1"},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",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(n){return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];if(this.isDisposed()){this.id;return}return toLowercaseNameAndCallEventful(this,n,r)}}function createRegisterEventWithLowercaseMessageCenter(n){return function(){for(var r=[],a=0;a<arguments.length;a++)r[a]=arguments[a];return toLowercaseNameAndCallEventful(this,n,r)}}function toLowercaseNameAndCallEventful(n,r,a){return a[0]=a[0]&&a[0].toLowerCase(),Eventful.prototype[r].apply(n,a)}var MessageCenter=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r}(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,ECharts=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this,new ECEventProcessor)||this;l._chartsViews=[],l._chartsMap={},l._componentsViews=[],l._componentsMap={},l._pendingActions=[],s=s||{},isString(o)&&(o=themeStorage[o]),l._dom=a;var u="canvas",c="auto",d=!1;s.ssr&®isterSSRDataGetter(function(g){var y=getECData(g),_=y.dataIndex;if(_!=null){var S=createHashMap();return S.set("series_index",y.seriesIndex),S.set("data_index",_),y.ssrType&&S.set("ssr_type",y.ssrType),S}});var f=l._zr=init$2(a,{renderer:s.renderer||u,devicePixelRatio:s.devicePixelRatio,width:s.width,height:s.height,ssr:s.ssr,useDirtyRect:retrieve2(s.useDirtyRect,d),useCoarsePointer:retrieve2(s.useCoarsePointer,c),pointerSize:s.pointerSize});l._ssr=s.ssr,l._throttledZrFlush=throttle$2(bind$1(f.flush,f),17),o=clone$6(o),o&&globalBackwardCompat(o,!0),l._theme=o,l._locale=createLocaleObject(s.locale||SYSTEM_LANG),l._coordSysMgr=new CoordinateSystemManager;var p=l._api=createExtensionAPI(l);function v(g,y){return g.__prio-y.__prio}return sort$2(visualFuncs,v),sort$2(dataProcessorFuncs,v),l._scheduler=new Scheduler(l,p,dataProcessorFuncs,visualFuncs),l._messageCenter=new MessageCenter,l._initEvents(),l.resize=bind$1(l.resize,l),f.animation.on("frame",l._onframe,l),bindRenderedEvent(f,l),bindMouseEvent(f,l),setAsPrimitive(l),l}return r.prototype._onframe=function(){if(!this._disposed){applyChangedStates(this);var a=this._scheduler;if(this[PENDING_UPDATE]){var o=this[PENDING_UPDATE].silent;this[IN_MAIN_PROCESS_KEY]=!0;try{prepare(this),updateMethods.update.call(this,null,this[PENDING_UPDATE].updateParams)}catch(d){throw this[IN_MAIN_PROCESS_KEY]=!1,this[PENDING_UPDATE]=null,d}this._zr.flush(),this[IN_MAIN_PROCESS_KEY]=!1,this[PENDING_UPDATE]=null,flushPendingActions.call(this,o),triggerUpdatedEvent.call(this,o)}else if(a.unfinished){var s=TEST_FRAME_REMAIN_TIME,l=this._model,u=this._api;a.unfinished=!1;do{var c=+new Date;a.performSeriesTasks(l),a.performDataProcessorTasks(l),updateStreamModes(this,l),a.performVisualTasks(l),renderSeries(this,this._model,u,"remain",{}),s-=+new Date-c}while(s>0&&a.unfinished);a.unfinished||this._zr.flush()}}},r.prototype.getDom=function(){return this._dom},r.prototype.getId=function(){return this.id},r.prototype.getZr=function(){return this._zr},r.prototype.isSSR=function(){return this._ssr},r.prototype.setOption=function(a,o,s){if(!this[IN_MAIN_PROCESS_KEY]){if(this._disposed){this.id;return}var l,u,c;if(isObject$3(o)&&(s=o.lazyUpdate,l=o.silent,u=o.replaceMerge,c=o.transition,o=o.notMerge),this[IN_MAIN_PROCESS_KEY]=!0,!this._model||o){var d=new OptionManager(this._api),f=this._theme,p=this._model=new GlobalModel;p.scheduler=this._scheduler,p.ssr=this._ssr,p.init(null,null,null,f,this._locale,d)}this._model.setOption(a,{replaceMerge:u},optionPreprocessorFuncs);var v={seriesTransition:c,optionChanged:!0};if(s)this[PENDING_UPDATE]={silent:l,updateParams:v},this[IN_MAIN_PROCESS_KEY]=!1,this.getZr().wakeUp();else{try{prepare(this),updateMethods.update.call(this,null,v)}catch(g){throw this[PENDING_UPDATE]=null,this[IN_MAIN_PROCESS_KEY]=!1,g}this._ssr||this._zr.flush(),this[PENDING_UPDATE]=null,this[IN_MAIN_PROCESS_KEY]=!1,flushPendingActions.call(this,l),triggerUpdatedEvent.call(this,l)}}},r.prototype.setTheme=function(){},r.prototype.getModel=function(){return this._model},r.prototype.getOption=function(){return this._model&&this._model.getOption()},r.prototype.getWidth=function(){return this._zr.getWidth()},r.prototype.getHeight=function(){return this._zr.getHeight()},r.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||env.hasGlobalWindow&&window.devicePixelRatio||1},r.prototype.getRenderedCanvas=function(a){return this.renderToCanvas(a)},r.prototype.renderToCanvas=function(a){a=a||{};var o=this._zr.painter;return o.getRenderedCanvas({backgroundColor:a.backgroundColor||this._model.get("backgroundColor"),pixelRatio:a.pixelRatio||this.getDevicePixelRatio()})},r.prototype.renderToSVGString=function(a){a=a||{};var o=this._zr.painter;return o.renderToString({useViewBox:a.useViewBox})},r.prototype.getSvgDataURL=function(){if(env.svgSupported){var a=this._zr,o=a.storage.getDisplayList();return each$f(o,function(s){s.stopAnimation(null,!0)}),a.painter.toDataURL()}},r.prototype.getDataURL=function(a){if(this._disposed){this.id;return}a=a||{};var o=a.excludeComponents,s=this._model,l=[],u=this;each$f(o,function(d){s.eachComponent({mainType:d},function(f){var p=u._componentsMap[f.__viewId];p.group.ignore||(l.push(p),p.group.ignore=!0)})});var c=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(a).toDataURL("image/"+(a&&a.type||"png"));return each$f(l,function(d){d.group.ignore=!1}),c},r.prototype.getConnectedDataURL=function(a){if(this._disposed){this.id;return}var o=a.type==="svg",s=this.group,l=Math.min,u=Math.max,c=1/0;if(connectedGroups[s]){var d=c,f=c,p=-c,v=-c,g=[],y=a&&a.pixelRatio||this.getDevicePixelRatio();each$f(instances,function(w,E){if(w.group===s){var D=o?w.getZr().painter.getSvgDom().innerHTML:w.renderToCanvas(clone$6(a)),C=w.getDom().getBoundingClientRect();d=l(C.left,d),f=l(C.top,f),p=u(C.right,p),v=u(C.bottom,v),g.push({dom:D,left:C.left,top:C.top})}}),d*=y,f*=y,p*=y,v*=y;var _=p-d,S=v-f,b=platformApi.createCanvas(),x=init$2(b,{renderer:o?"svg":"canvas"});if(x.resize({width:_,height:S}),o){var A="";return each$f(g,function(w){var E=w.left-d,D=w.top-f;A+='<g transform="translate('+E+","+D+')">'+w.dom+"</g>"}),x.painter.getSvgRoot().innerHTML=A,a.connectedBackgroundColor&&x.painter.setBackgroundColor(a.connectedBackgroundColor),x.refreshImmediately(),x.painter.toDataURL()}else return a.connectedBackgroundColor&&x.add(new Rect$2({shape:{x:0,y:0,width:_,height:S},style:{fill:a.connectedBackgroundColor}})),each$f(g,function(w){var E=new ZRImage({style:{x:w.left*y-d,y:w.top*y-f,image:w.dom}});x.add(E)}),x.refreshImmediately(),b.toDataURL("image/"+(a&&a.type||"png"))}else return this.getDataURL(a)},r.prototype.convertToPixel=function(a,o){return doConvertPixel(this,"convertToPixel",a,o)},r.prototype.convertFromPixel=function(a,o){return doConvertPixel(this,"convertFromPixel",a,o)},r.prototype.containPixel=function(a,o){if(this._disposed){this.id;return}var s=this._model,l,u=parseFinder$1(s,a);return each$f(u,function(c,d){d.indexOf("Models")>=0&&each$f(c,function(f){var p=f.coordinateSystem;if(p&&p.containPoint)l=l||!!p.containPoint(o);else if(d==="seriesModels"){var v=this._chartsMap[f.__viewId];v&&v.containPoint&&(l=l||v.containPoint(o,f))}},this)},this),!!l},r.prototype.getVisual=function(a,o){var s=this._model,l=parseFinder$1(s,a,{defaultMainType:"series"}),u=l.seriesModel,c=u.getData(),d=l.hasOwnProperty("dataIndexInside")?l.dataIndexInside:l.hasOwnProperty("dataIndex")?c.indexOfRawIndex(l.dataIndex):null;return d!=null?getItemVisualFromData(c,d,o):getVisualFromData(c,o)},r.prototype.getViewOfComponentModel=function(a){return this._componentsMap[a.__viewId]},r.prototype.getViewOfSeriesModel=function(a){return this._chartsMap[a.__viewId]},r.prototype._initEvents=function(){var a=this;each$f(MOUSE_EVENT_NAMES,function(o){var s=function(l){var u=a.getModel(),c=l.target,d,f=o==="globalout";if(f?d={}:c&&findEventDispatcher(c,function(_){var S=getECData(_);if(S&&S.dataIndex!=null){var b=S.dataModel||u.getSeriesByIndex(S.seriesIndex);return d=b&&b.getDataParams(S.dataIndex,S.dataType,c)||{},!0}else if(S.eventData)return d=extend$2({},S.eventData),!0},!0),d){var p=d.componentType,v=d.componentIndex;(p==="markLine"||p==="markPoint"||p==="markArea")&&(p="series",v=d.seriesIndex);var g=p&&v!=null&&u.getComponent(p,v),y=g&&a[g.mainType==="series"?"_chartsMap":"_componentsMap"][g.__viewId];d.event=l,d.type=o,a._$eventProcessor.eventInfo={targetEl:c,packedEvent:d,model:g,view:y},a.trigger(o,d)}};s.zrEventfulCallAtLast=!0,a._zr.on(o,s,a)}),each$f(eventActionMap,function(o,s){a._messageCenter.on(s,function(l){this.trigger(s,l)},a)}),each$f(["selectchanged"],function(o){a._messageCenter.on(o,function(s){this.trigger(o,s)},a)}),handleLegacySelectEvents(this._messageCenter,this,this._api)},r.prototype.isDisposed=function(){return this._disposed},r.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},r.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var a=this.getDom();a&&setAttribute(this.getDom(),DOM_ATTRIBUTE_KEY,"");var o=this,s=o._api,l=o._model;each$f(o._componentsViews,function(u){u.dispose(l,s)}),each$f(o._chartsViews,function(u){u.dispose(l,s)}),o._zr.dispose(),o._dom=o._model=o._chartsMap=o._componentsMap=o._chartsViews=o._componentsViews=o._scheduler=o._api=o._zr=o._throttledZrFlush=o._theme=o._coordSysMgr=o._messageCenter=null,delete instances[o.id]},r.prototype.resize=function(a){if(!this[IN_MAIN_PROCESS_KEY]){if(this._disposed){this.id;return}this._zr.resize(a);var o=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!o){var s=o.resetOption("media"),l=a&&a.silent;this[PENDING_UPDATE]&&(l==null&&(l=this[PENDING_UPDATE].silent),s=!0,this[PENDING_UPDATE]=null),this[IN_MAIN_PROCESS_KEY]=!0;try{s&&prepare(this),updateMethods.update.call(this,{type:"resize",animation:extend$2({duration:0},a&&a.animation)})}catch(u){throw this[IN_MAIN_PROCESS_KEY]=!1,u}this[IN_MAIN_PROCESS_KEY]=!1,flushPendingActions.call(this,l),triggerUpdatedEvent.call(this,l)}}},r.prototype.showLoading=function(a,o){if(this._disposed){this.id;return}if(isObject$3(a)&&(o=a,a=""),a=a||"default",this.hideLoading(),!!loadingEffects[a]){var s=loadingEffects[a](this._api,o),l=this._zr;this._loadingFX=s,l.add(s)}},r.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},r.prototype.makeActionFromEvent=function(a){var o=extend$2({},a);return o.type=eventActionMap[a.type],o},r.prototype.dispatchAction=function(a,o){if(this._disposed){this.id;return}if(isObject$3(o)||(o={silent:!!o}),!!actions[a.type]&&this._model){if(this[IN_MAIN_PROCESS_KEY]){this._pendingActions.push(a);return}var s=o.silent;doDispatchAction.call(this,a,s);var l=o.flush;l?this._zr.flush():l!==!1&&env.browser.weChat&&this._throttledZrFlush(),flushPendingActions.call(this,s),triggerUpdatedEvent.call(this,s)}},r.prototype.updateLabelLayout=function(){lifecycle.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},r.prototype.appendData=function(a){if(this._disposed){this.id;return}var o=a.seriesIndex,s=this.getModel(),l=s.getSeriesByIndex(o);l.appendData(a),this._scheduler.unfinished=!0,this.getZr().wakeUp()},r.internalField=function(){prepare=function(v){var g=v._scheduler;g.restorePipelines(v._model),g.prepareStageTasks(),prepareView(v,!0),prepareView(v,!1),g.plan()},prepareView=function(v,g){for(var y=v._model,_=v._scheduler,S=g?v._componentsViews:v._chartsViews,b=g?v._componentsMap:v._chartsMap,x=v._zr,A=v._api,w=0;w<S.length;w++)S[w].__alive=!1;g?y.eachComponent(function(C,$){C!=="series"&&E($)}):y.eachSeries(E);function E(C){var $=C.__requireNewView;C.__requireNewView=!1;var P="_ec_"+C.id+"_"+C.type,M=!$&&b[P];if(!M){var I=parseClassType(C.type),L=g?ComponentView.getClass(I.main,I.sub):ChartView.getClass(I.sub);M=new L,M.init(y,A),b[P]=M,S.push(M),x.add(M.group)}C.__viewId=M.__id=P,M.__alive=!0,M.__model=C,M.group.__ecComponentInfo={mainType:C.mainType,index:C.componentIndex},!g&&_.prepareView(M,C,y,A)}for(var w=0;w<S.length;){var D=S[w];D.__alive?w++:(!g&&D.renderTask.dispose(),x.remove(D.group),D.dispose(y,A),S.splice(w,1),b[D.__id]===D&&delete b[D.__id],D.__id=D.group.__ecComponentInfo=null)}},updateDirectly=function(v,g,y,_,S){var b=v._model;if(b.setUpdatePayload(y),!_){each$f([].concat(v._componentsViews).concat(v._chartsViews),D);return}var x={};x[_+"Id"]=y[_+"Id"],x[_+"Index"]=y[_+"Index"],x[_+"Name"]=y[_+"Name"];var A={mainType:_,query:x};S&&(A.subType=S);var w=y.excludeSeriesId,E;w!=null&&(E=createHashMap(),each$f(normalizeToArray(w),function(C){var $=convertOptionIdName(C,null);$!=null&&E.set($,!0)})),b&&b.eachComponent(A,function(C){var $=E&&E.get(C.id)!=null;if(!$)if(isHighDownPayload(y))if(C instanceof SeriesModel)y.type===HIGHLIGHT_ACTION_TYPE&&!y.notBlur&&!C.get(["emphasis","disabled"])&&blurSeriesFromHighlightPayload(C,y,v._api);else{var P=findComponentHighDownDispatchers(C.mainType,C.componentIndex,y.name,v._api),M=P.focusSelf,I=P.dispatchers;y.type===HIGHLIGHT_ACTION_TYPE&&M&&!y.notBlur&&blurComponent(C.mainType,C.componentIndex,v._api),I&&each$f(I,function(L){y.type===HIGHLIGHT_ACTION_TYPE?enterEmphasis(L):leaveEmphasis(L)})}else isSelectChangePayload(y)&&C instanceof SeriesModel&&(toggleSelectionFromPayload(C,y,v._api),updateSeriesElementSelection(C),markStatusToUpdate(v))},v),b&&b.eachComponent(A,function(C){var $=E&&E.get(C.id)!=null;$||D(v[_==="series"?"_chartsMap":"_componentsMap"][C.__viewId])},v);function D(C){C&&C.__alive&&C[g]&&C[g](C.__model,b,v._api,y)}},updateMethods={prepareAndUpdate:function(v){prepare(this),updateMethods.update.call(this,v,{optionChanged:v.newOption!=null})},update:function(v,g){var y=this._model,_=this._api,S=this._zr,b=this._coordSysMgr,x=this._scheduler;if(y){y.setUpdatePayload(v),x.restoreData(y,v),x.performSeriesTasks(y),b.create(y,_),x.performDataProcessorTasks(y,v),updateStreamModes(this,y),b.update(y,_),a(y),x.performVisualTasks(y,v),render(this,y,_,v,g);var A=y.get("backgroundColor")||"transparent",w=y.get("darkMode");S.setBackgroundColor(A),w!=null&&w!=="auto"&&S.setDarkMode(w),lifecycle.trigger("afterupdate",y,_)}},updateTransform:function(v){var g=this,y=this._model,_=this._api;if(y){y.setUpdatePayload(v);var S=[];y.eachComponent(function(x,A){if(x!=="series"){var w=g.getViewOfComponentModel(A);if(w&&w.__alive)if(w.updateTransform){var E=w.updateTransform(A,y,_,v);E&&E.update&&S.push(w)}else S.push(w)}});var b=createHashMap();y.eachSeries(function(x){var A=g._chartsMap[x.__viewId];if(A.updateTransform){var w=A.updateTransform(x,y,_,v);w&&w.update&&b.set(x.uid,1)}else b.set(x.uid,1)}),a(y),this._scheduler.performVisualTasks(y,v,{setDirty:!0,dirtyMap:b}),renderSeries(this,y,_,v,{},b),lifecycle.trigger("afterupdate",y,_)}},updateView:function(v){var g=this._model;g&&(g.setUpdatePayload(v),ChartView.markUpdateMethod(v,"updateView"),a(g),this._scheduler.performVisualTasks(g,v,{setDirty:!0}),render(this,g,this._api,v,{}),lifecycle.trigger("afterupdate",g,this._api))},updateVisual:function(v){var g=this,y=this._model;y&&(y.setUpdatePayload(v),y.eachSeries(function(_){_.getData().clearAllVisual()}),ChartView.markUpdateMethod(v,"updateVisual"),a(y),this._scheduler.performVisualTasks(y,v,{visualType:"visual",setDirty:!0}),y.eachComponent(function(_,S){if(_!=="series"){var b=g.getViewOfComponentModel(S);b&&b.__alive&&b.updateVisual(S,y,g._api,v)}}),y.eachSeries(function(_){var S=g._chartsMap[_.__viewId];S.updateVisual(_,y,g._api,v)}),lifecycle.trigger("afterupdate",y,this._api))},updateLayout:function(v){updateMethods.update.call(this,v)}},doConvertPixel=function(v,g,y,_){if(v._disposed){v.id;return}for(var S=v._model,b=v._coordSysMgr.getCoordinateSystems(),x,A=parseFinder$1(S,y),w=0;w<b.length;w++){var E=b[w];if(E[g]&&(x=E[g](S,A,_))!=null)return x}},updateStreamModes=function(v,g){var y=v._chartsMap,_=v._scheduler;g.eachSeries(function(S){_.updateStreamModes(S,y[S.__viewId])})},doDispatchAction=function(v,g){var y=this,_=this.getModel(),S=v.type,b=v.escapeConnect,x=actions[S],A=x.actionInfo,w=(A.update||"update").split(":"),E=w.pop(),D=w[0]!=null&&parseClassType(w[0]);this[IN_MAIN_PROCESS_KEY]=!0;var C=[v],$=!1;v.batch&&($=!0,C=map$1(v.batch,function(N){return N=defaults$2(extend$2({},N),v),N.batch=null,N}));var P=[],M,I=isSelectChangePayload(v),L=isHighDownPayload(v);if(L&&allLeaveBlur(this._api),each$f(C,function(N){if(M=x.action(N,y._model,y._api),M=M||extend$2({},N),M.type=A.event||M.type,P.push(M),L){var V=preParseFinder(v),F=V.queryOptionMap,U=V.mainTypeSpecified,H=U?F.keys()[0]:"series";updateDirectly(y,E,N,H),markStatusToUpdate(y)}else I?(updateDirectly(y,E,N,"series"),markStatusToUpdate(y)):D&&updateDirectly(y,E,N,D.main,D.sub)}),E!=="none"&&!L&&!I&&!D)try{this[PENDING_UPDATE]?(prepare(this),updateMethods.update.call(this,v),this[PENDING_UPDATE]=null):updateMethods[E].call(this,v)}catch(N){throw this[IN_MAIN_PROCESS_KEY]=!1,N}if($?M={type:A.event||S,escapeConnect:b,batch:P}:M=P[0],this[IN_MAIN_PROCESS_KEY]=!1,!g){var O=this._messageCenter;if(O.trigger(M.type,M),I){var R={type:"selectchanged",escapeConnect:b,selected:getAllSelectedIndices(_),isFromClick:v.isFromClick||!1,fromAction:v.type,fromActionPayload:v};O.trigger(R.type,R)}}},flushPendingActions=function(v){for(var g=this._pendingActions;g.length;){var y=g.shift();doDispatchAction.call(this,y,v)}},triggerUpdatedEvent=function(v){!v&&this.trigger("updated")},bindRenderedEvent=function(v,g){v.on("rendered",function(y){g.trigger("rendered",y),v.animation.isFinished()&&!g[PENDING_UPDATE]&&!g._scheduler.unfinished&&!g._pendingActions.length&&g.trigger("finished")})},bindMouseEvent=function(v,g){v.on("mouseover",function(y){var _=y.target,S=findEventDispatcher(_,isHighDownDispatcher);S&&(handleGlobalMouseOverForHighDown(S,y,g._api),markStatusToUpdate(g))}).on("mouseout",function(y){var _=y.target,S=findEventDispatcher(_,isHighDownDispatcher);S&&(handleGlobalMouseOutForHighDown(S,y,g._api),markStatusToUpdate(g))}).on("click",function(y){var _=y.target,S=findEventDispatcher(_,function(A){return getECData(A).dataIndex!=null},!0);if(S){var b=S.selected?"unselect":"select",x=getECData(S);g._api.dispatchAction({type:b,dataType:x.dataType,dataIndexInside:x.dataIndex,seriesIndex:x.seriesIndex,isFromClick:!0})}})};function a(v){v.clearColorPalette(),v.eachSeries(function(g){g.clearColorPalette()})}function o(v){var g=[],y=[],_=!1;if(v.eachComponent(function(A,w){var E=w.get("zlevel")||0,D=w.get("z")||0,C=w.getZLevelKey();_=_||!!C,(A==="series"?y:g).push({zlevel:E,z:D,idx:w.componentIndex,type:A,key:C})}),_){var S=g.concat(y),b,x;sort$2(S,function(A,w){return A.zlevel===w.zlevel?A.z-w.z:A.zlevel-w.zlevel}),each$f(S,function(A){var w=v.getComponent(A.type,A.idx),E=A.zlevel,D=A.key;b!=null&&(E=Math.max(b,E)),D?(E===b&&D!==x&&E++,x=D):x&&(E===b&&E++,x=""),b=E,w.setZLevel(E)})}}render=function(v,g,y,_,S){o(g),renderComponents(v,g,y,_,S),each$f(v._chartsViews,function(b){b.__alive=!1}),renderSeries(v,g,y,_,S),each$f(v._chartsViews,function(b){b.__alive||b.remove(g,y)})},renderComponents=function(v,g,y,_,S,b){each$f(b||v._componentsViews,function(x){var A=x.__model;f(A,x),x.render(A,g,y,_),c(A,x),p(A,x)})},renderSeries=function(v,g,y,_,S,b){var x=v._scheduler;S=extend$2(S||{},{updatedSeries:g.getSeries()}),lifecycle.trigger("series:beforeupdate",g,y,S);var A=!1;g.eachSeries(function(w){var E=v._chartsMap[w.__viewId];E.__alive=!0;var D=E.renderTask;x.updatePayload(D,_),f(w,E),b&&b.get(w.uid)&&D.dirty(),D.perform(x.getPerformArgs(D))&&(A=!0),E.group.silent=!!w.get("silent"),u(w,E),updateSeriesElementSelection(w)}),x.unfinished=A||x.unfinished,lifecycle.trigger("series:layoutlabels",g,y,S),lifecycle.trigger("series:transition",g,y,S),g.eachSeries(function(w){var E=v._chartsMap[w.__viewId];c(w,E),p(w,E)}),l(v,g),lifecycle.trigger("series:afterupdate",g,y,S)},markStatusToUpdate=function(v){v[STATUS_NEEDS_UPDATE_KEY]=!0,v.getZr().wakeUp()},applyChangedStates=function(v){v[STATUS_NEEDS_UPDATE_KEY]&&(v.getZr().storage.traverse(function(g){isElementRemoved(g)||s(g)}),v[STATUS_NEEDS_UPDATE_KEY]=!1)};function s(v){for(var g=[],y=v.currentStates,_=0;_<y.length;_++){var S=y[_];S==="emphasis"||S==="blur"||S==="select"||g.push(S)}v.selected&&v.states.select&&g.push("select"),v.hoverState===HOVER_STATE_EMPHASIS&&v.states.emphasis?g.push("emphasis"):v.hoverState===HOVER_STATE_BLUR&&v.states.blur&&g.push("blur"),v.useStates(g)}function l(v,g){var y=v._zr,_=y.storage,S=0;_.traverse(function(b){b.isGroup||S++}),S>g.get("hoverLayerThreshold")&&!env.node&&!env.worker&&g.eachSeries(function(b){if(!b.preventUsingHoverLayer){var x=v._chartsMap[b.__viewId];x.__alive&&x.eachRendered(function(A){A.states.emphasis&&(A.states.emphasis.hoverLayer=!0)})}})}function u(v,g){var y=v.get("blendMode")||null;g.eachRendered(function(_){_.isGroup||(_.style.blend=y)})}function c(v,g){if(!v.preventAutoZ){var y=v.get("z")||0,_=v.get("zlevel")||0;g.eachRendered(function(S){return d(S,y,_,-1/0),!0})}}function d(v,g,y,_){var S=v.getTextContent(),b=v.getTextGuideLine(),x=v.isGroup;if(x)for(var A=v.childrenRef(),w=0;w<A.length;w++)_=Math.max(d(A[w],g,y,_),_);else v.z=g,v.zlevel=y,_=Math.max(v.z2,_);if(S&&(S.z=g,S.zlevel=y,isFinite(_)&&(S.z2=_+2)),b){var E=v.textGuideLineConfig;b.z=g,b.zlevel=y,isFinite(_)&&(b.z2=_+(E&&E.showAbove?1:-1))}return _}function f(v,g){g.eachRendered(function(y){if(!isElementRemoved(y)){var _=y.getTextContent(),S=y.getTextGuideLine();y.stateTransition&&(y.stateTransition=null),_&&_.stateTransition&&(_.stateTransition=null),S&&S.stateTransition&&(S.stateTransition=null),y.hasState()?(y.prevStates=y.currentStates,y.clearStates()):y.prevStates&&(y.prevStates=null)}})}function p(v,g){var y=v.getModel("stateAnimation"),_=v.isAnimationEnabled(),S=y.get("duration"),b=S>0?{duration:S,delay:y.get("delay"),easing:y.get("easing")}:null;g.eachRendered(function(x){if(x.states&&x.states.emphasis){if(isElementRemoved(x))return;if(x instanceof Path&&savePathStates(x),x.__dirty){var A=x.prevStates;A&&x.useStates(A)}if(_){x.stateTransition=b;var w=x.getTextContent(),E=x.getTextGuideLine();w&&(w.stateTransition=b),E&&(E.stateTransition=b)}x.__dirty&&s(x)}})}createExtensionAPI=function(v){return new(function(g){__extends(y,g);function y(){return g!==null&&g.apply(this,arguments)||this}return y.prototype.getCoordinateSystems=function(){return v._coordSysMgr.getCoordinateSystems()},y.prototype.getComponentByElement=function(_){for(;_;){var S=_.__ecComponentInfo;if(S!=null)return v._model.getComponent(S.mainType,S.index);_=_.parent}},y.prototype.enterEmphasis=function(_,S){enterEmphasis(_,S),markStatusToUpdate(v)},y.prototype.leaveEmphasis=function(_,S){leaveEmphasis(_,S),markStatusToUpdate(v)},y.prototype.enterBlur=function(_){enterBlur(_),markStatusToUpdate(v)},y.prototype.leaveBlur=function(_){leaveBlur(_),markStatusToUpdate(v)},y.prototype.enterSelect=function(_){enterSelect(_),markStatusToUpdate(v)},y.prototype.leaveSelect=function(_){leaveSelect(_),markStatusToUpdate(v)},y.prototype.getModel=function(){return v.getModel()},y.prototype.getViewOfComponentModel=function(_){return v.getViewOfComponentModel(_)},y.prototype.getViewOfSeriesModel=function(_){return v.getViewOfSeriesModel(_)},y}(ExtensionAPI))(v)},enableConnect=function(v){function g(y,_){for(var S=0;S<y.length;S++){var b=y[S];b[CONNECT_STATUS_KEY]=_}}each$f(eventActionMap,function(y,_){v._messageCenter.on(_,function(S){if(connectedGroups[v.group]&&v[CONNECT_STATUS_KEY]!==CONNECT_STATUS_PENDING){if(S&&S.escapeConnect)return;var b=v.makeActionFromEvent(S),x=[];each$f(instances,function(A){A!==v&&A.group===v.group&&x.push(A)}),g(x,CONNECT_STATUS_PENDING),each$f(x,function(A){A[CONNECT_STATUS_KEY]!==CONNECT_STATUS_UPDATING&&A.dispatchAction(b)}),g(x,CONNECT_STATUS_UPDATED)}})})}}(),r}(Eventful),echartsProto=ECharts.prototype;echartsProto.on=createRegisterEventWithLowercaseECharts("on");echartsProto.off=createRegisterEventWithLowercaseECharts("off");echartsProto.one=function(n,r,a){var o=this;function s(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];r&&r.apply&&r.apply(this,l),o.off(n,s)}this.on.call(this,n,s,a)};var MOUSE_EVENT_NAMES=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function disposedWarning(n){}var actions={},eventActionMap={},dataProcessorFuncs=[],optionPreprocessorFuncs=[],visualFuncs=[],themeStorage={},loadingEffects={},instances={},connectedGroups={},idBase=+new Date-0,groupIdBase=+new Date-0,DOM_ATTRIBUTE_KEY="_echarts_instance_";function init$1(n,r,a){var o=!(a&&a.ssr);if(o){var s=getInstanceByDom(n);if(s)return s}var l=new ECharts(n,r,a);return l.id="ec_"+idBase++,instances[l.id]=l,o&&setAttribute(n,DOM_ATTRIBUTE_KEY,l.id),enableConnect(l),lifecycle.trigger("afterinit",l),l}function connect(n){if(isArray$1(n)){var r=n;n=null,each$f(r,function(a){a.group!=null&&(n=a.group)}),n=n||"g_"+groupIdBase++,each$f(r,function(a){a.group=n})}return connectedGroups[n]=!0,n}function disconnect(n){connectedGroups[n]=!1}var disConnect=disconnect;function dispose(n){isString(n)?n=instances[n]:n instanceof ECharts||(n=getInstanceByDom(n)),n instanceof ECharts&&!n.isDisposed()&&n.dispose()}function getInstanceByDom(n){return instances[getAttribute(n,DOM_ATTRIBUTE_KEY)]}function getInstanceById(n){return instances[n]}function registerTheme(n,r){themeStorage[n]=r}function registerPreprocessor(n){indexOf(optionPreprocessorFuncs,n)<0&&optionPreprocessorFuncs.push(n)}function registerProcessor(n,r){normalizeRegister(dataProcessorFuncs,n,r,PRIORITY_PROCESSOR_DEFAULT)}function registerPostInit(n){registerUpdateLifecycle("afterinit",n)}function registerPostUpdate(n){registerUpdateLifecycle("afterupdate",n)}function registerUpdateLifecycle(n,r){lifecycle.on(n,r)}function registerAction(n,r,a){isFunction(r)&&(a=r,r="");var o=isObject$3(n)?n.type:[n,n={event:r}][0];n.event=(n.event||o).toLowerCase(),r=n.event,!eventActionMap[r]&&(assert(ACTION_REG.test(o)&&ACTION_REG.test(r)),actions[o]||(actions[o]={action:a,actionInfo:n}),eventActionMap[r]=o)}function registerCoordinateSystem(n,r){CoordinateSystemManager.register(n,r)}function getCoordinateSystemDimensions(n){var r=CoordinateSystemManager.get(n);if(r)return r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice()}function registerLayout(n,r){normalizeRegister(visualFuncs,n,r,PRIORITY_VISUAL_LAYOUT,"layout")}function registerVisual(n,r){normalizeRegister(visualFuncs,n,r,PRIORITY_VISUAL_CHART,"visual")}var registeredTasks=[];function normalizeRegister(n,r,a,o,s){if((isFunction(r)||isObject$3(r))&&(a=r,r=o),!(indexOf(registeredTasks,a)>=0)){registeredTasks.push(a);var l=Scheduler.wrapStageHandler(a,s);l.__prio=r,l.__raw=a,n.push(l)}}function registerLoading(n,r){loadingEffects[n]=r}function setCanvasCreator(n){setPlatformAPI({createCanvas:n})}function registerMap$1(n,r,a){var o=getImpl("registerMap");o&&o(n,r,a)}function getMap(n){var r=getImpl("getMap");return r&&r(n)}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$1);registerLoading("default",defaultLoading);registerAction({type:HIGHLIGHT_ACTION_TYPE,event:HIGHLIGHT_ACTION_TYPE,update:HIGHLIGHT_ACTION_TYPE},noop);registerAction({type:DOWNPLAY_ACTION_TYPE,event:DOWNPLAY_ACTION_TYPE,update:DOWNPLAY_ACTION_TYPE},noop);registerAction({type:SELECT_ACTION_TYPE,event:SELECT_ACTION_TYPE,update:SELECT_ACTION_TYPE},noop);registerAction({type:UNSELECT_ACTION_TYPE,event:UNSELECT_ACTION_TYPE,update:UNSELECT_ACTION_TYPE},noop);registerAction({type:TOGGLE_SELECT_ACTION_TYPE,event:TOGGLE_SELECT_ACTION_TYPE,update:TOGGLE_SELECT_ACTION_TYPE},noop);registerTheme("light",lightTheme);registerTheme("dark",theme);var dataTool={};function dataIndexMapValueLength(n){return n==null?0:n.length||1}function defaultKeyGetter(n){return n}var DataDiffer=function(){function n(r,a,o,s,l,u){this._old=r,this._new=a,this._oldKeyGetter=o||defaultKeyGetter,this._newKeyGetter=s||defaultKeyGetter,this.context=l,this._diffModeMultiple=u==="multiple"}return n.prototype.add=function(r){return this._add=r,this},n.prototype.update=function(r){return this._update=r,this},n.prototype.updateManyToOne=function(r){return this._updateManyToOne=r,this},n.prototype.updateOneToMany=function(r){return this._updateOneToMany=r,this},n.prototype.updateManyToMany=function(r){return this._updateManyToMany=r,this},n.prototype.remove=function(r){return this._remove=r,this},n.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},n.prototype._executeOneToOne=function(){var r=this._old,a=this._new,o={},s=new Array(r.length),l=new Array(a.length);this._initIndexMap(r,null,s,"_oldKeyGetter"),this._initIndexMap(a,o,l,"_newKeyGetter");for(var u=0;u<r.length;u++){var c=s[u],d=o[c],f=dataIndexMapValueLength(d);if(f>1){var p=d.shift();d.length===1&&(o[c]=d[0]),this._update&&this._update(p,u)}else f===1?(o[c]=null,this._update&&this._update(d,u)):this._remove&&this._remove(u)}this._performRestAdd(l,o)},n.prototype._executeMultiple=function(){var r=this._old,a=this._new,o={},s={},l=[],u=[];this._initIndexMap(r,o,l,"_oldKeyGetter"),this._initIndexMap(a,s,u,"_newKeyGetter");for(var c=0;c<l.length;c++){var d=l[c],f=o[d],p=s[d],v=dataIndexMapValueLength(f),g=dataIndexMapValueLength(p);if(v>1&&g===1)this._updateManyToOne&&this._updateManyToOne(p,f),s[d]=null;else if(v===1&&g>1)this._updateOneToMany&&this._updateOneToMany(p,f),s[d]=null;else if(v===1&&g===1)this._update&&this._update(p,f),s[d]=null;else if(v>1&&g>1)this._updateManyToMany&&this._updateManyToMany(p,f),s[d]=null;else if(v>1)for(var y=0;y<v;y++)this._remove&&this._remove(f[y]);else this._remove&&this._remove(f)}this._performRestAdd(u,s)},n.prototype._performRestAdd=function(r,a){for(var o=0;o<r.length;o++){var s=r[o],l=a[s],u=dataIndexMapValueLength(l);if(u>1)for(var c=0;c<u;c++)this._add&&this._add(l[c]);else u===1&&this._add&&this._add(l);a[s]=null}},n.prototype._initIndexMap=function(r,a,o,s){for(var l=this._diffModeMultiple,u=0;u<r.length;u++){var c="_ec_"+this[s](r[u],u);if(l||(o[u]=c),!!a){var d=a[c],f=dataIndexMapValueLength(d);f===0?(a[c]=u,l&&o.push(c)):f===1?a[c]=[d,u]:d.push(u)}}},n}(),DimensionUserOuput=function(){function n(r,a){this._encode=r,this._schema=a}return n.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},n.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},n}();function summarizeDimensions(n,r){var a={},o=a.encode={},s=createHashMap(),l=[],u=[],c={};each$f(n.dimensions,function(g){var y=n.getDimensionInfo(g),_=y.coordDim;if(_){var S=y.coordDimIndex;getOrCreateEncodeArr(o,_)[S]=g,y.isExtraCoord||(s.set(_,1),mayLabelDimType(y.type)&&(l[0]=g),getOrCreateEncodeArr(c,_)[S]=n.getDimensionIndex(y.name)),y.defaultTooltip&&u.push(g)}VISUAL_DIMENSIONS.each(function(b,x){var A=getOrCreateEncodeArr(o,x),w=y.otherDims[x];w!=null&&w!==!1&&(A[w]=y.name)})});var d=[],f={};s.each(function(g,y){var _=o[y];f[y]=_[0],d=d.concat(_)}),a.dataDimsOnCoord=d,a.dataDimIndicesOnCoord=map$1(d,function(g){return n.getDimensionInfo(g).storeDimIndex}),a.encodeFirstDimNotExtra=f;var p=o.label;p&&p.length&&(l=p.slice());var v=o.tooltip;return v&&v.length?u=v.slice():u.length||(u=l.slice()),o.defaultedLabel=l,o.defaultedTooltip=u,a.userOutput=new DimensionUserOuput(c,r),a}function getOrCreateEncodeArr(n,r){return n.hasOwnProperty(r)||(n[r]=[]),n[r]}function getDimensionTypeByAxis(n){return n==="category"?"ordinal":n==="time"?"time":"float"}function mayLabelDimType(n){return!(n==="ordinal"||n==="time")}var SeriesDimensionDefine=function(){function n(r){this.otherDims={},r!=null&&extend$2(this,r)}return n}(),inner$h=makeInner(),dimTypeShort={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},SeriesDataSchema=function(){function n(r){this.dimensions=r.dimensions,this._dimOmitted=r.dimensionOmitted,this.source=r.source,this._fullDimCount=r.fullDimensionCount,this._updateDimOmitted(r.dimensionOmitted)}return n.prototype.isDimensionOmitted=function(){return this._dimOmitted},n.prototype._updateDimOmitted=function(r){this._dimOmitted=r,r&&(this._dimNameMap||(this._dimNameMap=ensureSourceDimNameMap(this.source)))},n.prototype.getSourceDimensionIndex=function(r){return retrieve2(this._dimNameMap.get(r),-1)},n.prototype.getSourceDimension=function(r){var a=this.source.dimensionsDefine;if(a)return a[r]},n.prototype.makeStoreSchema=function(){for(var r=this._fullDimCount,a=shouldRetrieveDataByName(this.source),o=!shouldOmitUnusedDimensions(r),s="",l=[],u=0,c=0;u<r;u++){var d=void 0,f=void 0,p=void 0,v=this.dimensions[c];if(v&&v.storeDimIndex===u)d=a?v.name:null,f=v.type,p=v.ordinalMeta,c++;else{var g=this.getSourceDimension(u);g&&(d=a?g.name:null,f=g.type)}l.push({property:d,type:f,ordinalMeta:p}),a&&d!=null&&(!v||!v.isCalculationCoord)&&(s+=o?d.replace(/\`/g,"`1").replace(/\$/g,"`2"):d),s+="$",s+=dimTypeShort[f]||"f",p&&(s+=p.uid),s+="$"}var y=this.source,_=[y.seriesLayoutBy,y.startIndex,s].join("$$");return{dimensions:l,hash:_}},n.prototype.makeOutputDimensionNames=function(){for(var r=[],a=0,o=0;a<this._fullDimCount;a++){var s=void 0,l=this.dimensions[o];if(l&&l.storeDimIndex===a)l.isCalculationCoord||(s=l.name),o++;else{var u=this.getSourceDimension(a);u&&(s=u.name)}r.push(s)}return r},n.prototype.appendCalculationDimension=function(r){this.dimensions.push(r),r.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},n}();function isSeriesDataSchema(n){return n instanceof SeriesDataSchema}function createDimNameMap(n){for(var r=createHashMap(),a=0;a<(n||[]).length;a++){var o=n[a],s=isObject$3(o)?o.name:o;s!=null&&r.get(s)==null&&r.set(s,a)}return r}function ensureSourceDimNameMap(n){var r=inner$h(n);return r.dimNameMap||(r.dimNameMap=createDimNameMap(n.dimensionsDefine))}function shouldOmitUnusedDimensions(n){return n>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 n(r,a){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 o,s=!1;isSeriesDataSchema(r)?(o=r.dimensions,this._dimOmitted=r.isDimensionOmitted(),this._schema=r):(s=!0,o=r),o=o||["x","y"];for(var l={},u=[],c={},d=!1,f={},p=0;p<o.length;p++){var v=o[p],g=isString(v)?new SeriesDimensionDefine({name:v}):v instanceof SeriesDimensionDefine?v:new SeriesDimensionDefine(v),y=g.name;g.type=g.type||"float",g.coordDim||(g.coordDim=y,g.coordDimIndex=0);var _=g.otherDims=g.otherDims||{};u.push(y),l[y]=g,f[y]!=null&&(d=!0),g.createInvertedIndices&&(c[y]=[]),_.itemName===0&&(this._nameDimIdx=p),_.itemId===0&&(this._idDimIdx=p),s&&(g.storeDimIndex=p)}if(this.dimensions=u,this._dimInfos=l,this._initGetDimensionInfo(d),this.hostModel=a,this._invertedIndicesMap=c,this._dimOmitted){var S=this._dimIdxToName=createHashMap();each$f(u,function(b){S.set(l[b].storeDimIndex,b)})}}return n.prototype.getDimension=function(r){var a=this._recognizeDimIndex(r);if(a==null)return r;if(a=r,!this._dimOmitted)return this.dimensions[a];var o=this._dimIdxToName.get(a);if(o!=null)return o;var s=this._schema.getSourceDimension(a);if(s)return s.name},n.prototype.getDimensionIndex=function(r){var a=this._recognizeDimIndex(r);if(a!=null)return a;if(r==null)return-1;var o=this._getDimInfo(r);return o?o.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(r):-1},n.prototype._recognizeDimIndex=function(r){if(isNumber(r)||r!=null&&!isNaN(r)&&!this._getDimInfo(r)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(r)<0))return+r},n.prototype._getStoreDimIndex=function(r){var a=this.getDimensionIndex(r);return a},n.prototype.getDimensionInfo=function(r){return this._getDimInfo(this.getDimension(r))},n.prototype._initGetDimensionInfo=function(r){var a=this._dimInfos;this._getDimInfo=r?function(o){return a.hasOwnProperty(o)?a[o]:void 0}:function(o){return a[o]}},n.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},n.prototype.mapDimension=function(r,a){var o=this._dimSummary;if(a==null)return o.encodeFirstDimNotExtra[r];var s=o.encode[r];return s?s[a]:null},n.prototype.mapDimensionsAll=function(r){var a=this._dimSummary,o=a.encode[r];return(o||[]).slice()},n.prototype.getStore=function(){return this._store},n.prototype.initData=function(r,a,o){var s=this,l;if(r instanceof DataStore&&(l=r),!l){var u=this.dimensions,c=isSourceInstance(r)||isArrayLike(r)?new DefaultDataProvider(r,u.length):r;l=new DataStore;var d=map(u,function(f){return{type:s._dimInfos[f].type,property:f}});l.initData(c,d,o)}this._store=l,this._nameList=(a||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,l.count()),this._dimSummary=summarizeDimensions(this,this._schema),this.userOutput=this._dimSummary.userOutput},n.prototype.appendData=function(r){var a=this._store.appendData(r);this._doInit(a[0],a[1])},n.prototype.appendValues=function(r,a){var o=this._store.appendValues(r,a&&a.length),s=o.start,l=o.end,u=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),a)for(var c=s;c<l;c++){var d=c-s;this._nameList[c]=a[d],u&&makeIdFromName(this,c)}},n.prototype._updateOrdinalMeta=function(){for(var r=this._store,a=this.dimensions,o=0;o<a.length;o++){var s=this._dimInfos[a[o]];s.ordinalMeta&&r.collectOrdinalMeta(s.storeDimIndex,s.ordinalMeta)}},n.prototype._shouldMakeIdFromName=function(){var r=this._store.getProvider();return this._idDimIdx==null&&r.getSource().sourceFormat!==SOURCE_FORMAT_TYPED_ARRAY&&!r.fillStorage},n.prototype._doInit=function(r,a){if(!(r>=a)){var o=this._store,s=o.getProvider();this._updateOrdinalMeta();var l=this._nameList,u=this._idList,c=s.getSource().sourceFormat,d=c===SOURCE_FORMAT_ORIGINAL;if(d&&!s.pure)for(var f=[],p=r;p<a;p++){var v=s.getItem(p,f);if(!this.hasItemOption&&isDataItemOption(v)&&(this.hasItemOption=!0),v){var g=v.name;l[p]==null&&g!=null&&(l[p]=convertOptionIdName(g,null));var y=v.id;u[p]==null&&y!=null&&(u[p]=convertOptionIdName(y,null))}}if(this._shouldMakeIdFromName())for(var p=r;p<a;p++)makeIdFromName(this,p);prepareInvertedIndex(this)}},n.prototype.getApproximateExtent=function(r){return this._approximateExtent[r]||this._store.getDataExtent(this._getStoreDimIndex(r))},n.prototype.setApproximateExtent=function(r,a){a=this.getDimension(a),this._approximateExtent[a]=r.slice()},n.prototype.getCalculationInfo=function(r){return this._calculationInfo[r]},n.prototype.setCalculationInfo=function(r,a){isObject$1(r)?extend$2(this._calculationInfo,r):this._calculationInfo[r]=a},n.prototype.getName=function(r){var a=this.getRawIndex(r),o=this._nameList[a];return o==null&&this._nameDimIdx!=null&&(o=getIdNameFromStore(this,this._nameDimIdx,a)),o==null&&(o=""),o},n.prototype._getCategory=function(r,a){var o=this._store.get(r,a),s=this._store.getOrdinalMeta(r);return s?s.categories[o]:o},n.prototype.getId=function(r){return getId(this,this.getRawIndex(r))},n.prototype.count=function(){return this._store.count()},n.prototype.get=function(r,a){var o=this._store,s=this._dimInfos[r];if(s)return o.get(s.storeDimIndex,a)},n.prototype.getByRawIndex=function(r,a){var o=this._store,s=this._dimInfos[r];if(s)return o.getByRawIndex(s.storeDimIndex,a)},n.prototype.getIndices=function(){return this._store.getIndices()},n.prototype.getDataExtent=function(r){return this._store.getDataExtent(this._getStoreDimIndex(r))},n.prototype.getSum=function(r){return this._store.getSum(this._getStoreDimIndex(r))},n.prototype.getMedian=function(r){return this._store.getMedian(this._getStoreDimIndex(r))},n.prototype.getValues=function(r,a){var o=this,s=this._store;return isArray$1(r)?s.getValues(map(r,function(l){return o._getStoreDimIndex(l)}),a):s.getValues(r)},n.prototype.hasValue=function(r){for(var a=this._dimSummary.dataDimIndicesOnCoord,o=0,s=a.length;o<s;o++)if(isNaN(this._store.get(a[o],r)))return!1;return!0},n.prototype.indexOfName=function(r){for(var a=0,o=this._store.count();a<o;a++)if(this.getName(a)===r)return a;return-1},n.prototype.getRawIndex=function(r){return this._store.getRawIndex(r)},n.prototype.indexOfRawIndex=function(r){return this._store.indexOfRawIndex(r)},n.prototype.rawIndexOf=function(r,a){var o=r&&this._invertedIndicesMap[r],s=o&&o[a];return s==null||isNaN(s)?INDEX_NOT_FOUND:s},n.prototype.indicesOfNearest=function(r,a,o){return this._store.indicesOfNearest(this._getStoreDimIndex(r),a,o)},n.prototype.each=function(r,a,o){isFunction(r)&&(o=a,a=r,r=[]);var s=o||this,l=map(normalizeDimensions(r),this._getStoreDimIndex,this);this._store.each(l,s?bind$1(a,s):a)},n.prototype.filterSelf=function(r,a,o){isFunction(r)&&(o=a,a=r,r=[]);var s=o||this,l=map(normalizeDimensions(r),this._getStoreDimIndex,this);return this._store=this._store.filter(l,s?bind$1(a,s):a),this},n.prototype.selectRange=function(r){var a=this,o={},s=keys(r);return each$f(s,function(l){var u=a._getStoreDimIndex(l);o[u]=r[l]}),this._store=this._store.selectRange(o),this},n.prototype.mapArray=function(r,a,o){isFunction(r)&&(o=a,a=r,r=[]),o=o||this;var s=[];return this.each(r,function(){s.push(a&&a.apply(this,arguments))},o),s},n.prototype.map=function(r,a,o,s){var l=o||s||this,u=map(normalizeDimensions(r),this._getStoreDimIndex,this),c=cloneListForMapAndSample(this);return c._store=this._store.map(u,l?bind$1(a,l):a),c},n.prototype.modify=function(r,a,o,s){var l=o||s||this,u=map(normalizeDimensions(r),this._getStoreDimIndex,this);this._store.modify(u,l?bind$1(a,l):a)},n.prototype.downSample=function(r,a,o,s){var l=cloneListForMapAndSample(this);return l._store=this._store.downSample(this._getStoreDimIndex(r),a,o,s),l},n.prototype.minmaxDownSample=function(r,a){var o=cloneListForMapAndSample(this);return o._store=this._store.minmaxDownSample(this._getStoreDimIndex(r),a),o},n.prototype.lttbDownSample=function(r,a){var o=cloneListForMapAndSample(this);return o._store=this._store.lttbDownSample(this._getStoreDimIndex(r),a),o},n.prototype.getRawDataItem=function(r){return this._store.getRawDataItem(r)},n.prototype.getItemModel=function(r){var a=this.hostModel,o=this.getRawDataItem(r);return new Model(o,a,a&&a.ecModel)},n.prototype.diff=function(r){var a=this;return new DataDiffer(r?r.getStore().getIndices():[],this.getStore().getIndices(),function(o){return getId(r,o)},function(o){return getId(a,o)})},n.prototype.getVisual=function(r){var a=this._visual;return a&&a[r]},n.prototype.setVisual=function(r,a){this._visual=this._visual||{},isObject$1(r)?extend$2(this._visual,r):this._visual[r]=a},n.prototype.getItemVisual=function(r,a){var o=this._itemVisuals[r],s=o&&o[a];return s==null?this.getVisual(a):s},n.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},n.prototype.ensureUniqueItemVisual=function(r,a){var o=this._itemVisuals,s=o[r];s||(s=o[r]={});var l=s[a];return l==null&&(l=this.getVisual(a),isArray$1(l)?l=l.slice():isObject$1(l)&&(l=extend$2({},l)),s[a]=l),l},n.prototype.setItemVisual=function(r,a,o){var s=this._itemVisuals[r]||{};this._itemVisuals[r]=s,isObject$1(a)?extend$2(s,a):s[a]=o},n.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},n.prototype.setLayout=function(r,a){isObject$1(r)?extend$2(this._layout,r):this._layout[r]=a},n.prototype.getLayout=function(r){return this._layout[r]},n.prototype.getItemLayout=function(r){return this._itemLayouts[r]},n.prototype.setItemLayout=function(r,a,o){this._itemLayouts[r]=o?extend$2(this._itemLayouts[r]||{},a):a},n.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},n.prototype.setItemGraphicEl=function(r,a){var o=this.hostModel&&this.hostModel.seriesIndex;setCommonECData(o,this.dataType,r,a),this._graphicEls[r]=a},n.prototype.getItemGraphicEl=function(r){return this._graphicEls[r]},n.prototype.eachItemGraphicEl=function(r,a){each$f(this._graphicEls,function(o,s){o&&r&&r.call(a,o,s)})},n.prototype.cloneShallow=function(r){return r||(r=new n(this._schema?this._schema:map(this.dimensions,this._getDimInfo,this),this.hostModel)),transferProperties(r,this),r._store=this._store,r},n.prototype.wrapMethod=function(r,a){var o=this[r];isFunction(o)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(r),this[r]=function(){var s=o.apply(this,arguments);return a.apply(this,[s].concat(slice(arguments)))})},n.internalField=function(){prepareInvertedIndex=function(r){var a=r._invertedIndicesMap;each$f(a,function(o,s){var l=r._dimInfos[s],u=l.ordinalMeta,c=r._store;if(u){o=a[s]=new CtorInt32Array(u.categories.length);for(var d=0;d<o.length;d++)o[d]=INDEX_NOT_FOUND;for(var d=0;d<c.count();d++)o[c.get(l.storeDimIndex,d)]=d}})},getIdNameFromStore=function(r,a,o){return convertOptionIdName(r._getCategory(a,o),null)},getId=function(r,a){var o=r._idList[a];return o==null&&r._idDimIdx!=null&&(o=getIdNameFromStore(r,r._idDimIdx,a)),o==null&&(o=ID_PREFIX+a),o},normalizeDimensions=function(r){return isArray$1(r)||(r=r!=null?[r]:[]),r},cloneListForMapAndSample=function(r){var a=new n(r._schema?r._schema:map(r.dimensions,r._getDimInfo,r),r.hostModel);return transferProperties(a,r),a},transferProperties=function(r,a){each$f(TRANSFERABLE_PROPERTIES.concat(a.__wrappedMethods||[]),function(o){a.hasOwnProperty(o)&&(r[o]=a[o])}),r.__wrappedMethods=a.__wrappedMethods,each$f(CLONE_PROPERTIES,function(o){r[o]=clone$6(a[o])}),r._calculationInfo=extend$2({},a._calculationInfo)},makeIdFromName=function(r,a){var o=r._nameList,s=r._idList,l=r._nameDimIdx,u=r._idDimIdx,c=o[a],d=s[a];if(c==null&&l!=null&&(o[a]=c=getIdNameFromStore(r,l,a)),d==null&&u!=null&&(s[a]=d=getIdNameFromStore(r,u,a)),d==null&&c!=null){var f=r._nameRepeatCount,p=f[c]=(f[c]||0)+1;d=c,p>1&&(d+="__ec__"+p),s[a]=d}}}(),n}();function createDimensions(n,r){return prepareSeriesDataSchema(n,r).dimensions}function prepareSeriesDataSchema(n,r){isSourceInstance(n)||(n=createSourceFromSeriesDataOption(n)),r=r||{};var a=r.coordDimensions||[],o=r.dimensionsDefine||n.dimensionsDefine||[],s=createHashMap(),l=[],u=getDimCount(n,a,o,r.dimensionsCount),c=r.canOmitUnusedDimensions&&shouldOmitUnusedDimensions(u),d=o===n.dimensionsDefine,f=d?ensureSourceDimNameMap(n):createDimNameMap(o),p=r.encodeDefine;!p&&r.encodeDefaulter&&(p=r.encodeDefaulter(n,u));for(var v=createHashMap(p),g=new CtorInt32Array$1(u),y=0;y<g.length;y++)g[y]=-1;function _(M){var I=g[M];if(I<0){var L=o[M],O=isObject$3(L)?L:{name:L},R=new SeriesDimensionDefine,N=O.name;N!=null&&f.get(N)!=null&&(R.name=R.displayName=N),O.type!=null&&(R.type=O.type),O.displayName!=null&&(R.displayName=O.displayName);var V=l.length;return g[M]=V,R.storeDimIndex=M,l.push(R),R}return l[I]}if(!c)for(var y=0;y<u;y++)_(y);v.each(function(M,I){var L=normalizeToArray(M).slice();if(L.length===1&&!isString(L[0])&&L[0]<0){v.set(I,!1);return}var O=v.set(I,[]);each$f(L,function(R,N){var V=isString(R)?f.get(R):R;V!=null&&V<u&&(O[N]=V,b(_(V),I,N))})});var S=0;each$f(a,function(M){var I,L,O,R;if(isString(M))I=M,R={};else{R=M,I=R.name;var N=R.ordinalMeta;R.ordinalMeta=null,R=extend$2({},R),R.ordinalMeta=N,L=R.dimsDef,O=R.otherDims,R.name=R.coordDim=R.coordDimIndex=R.dimsDef=R.otherDims=null}var V=v.get(I);if(V!==!1){if(V=normalizeToArray(V),!V.length)for(var F=0;F<(L&&L.length||1);F++){for(;S<u&&_(S).coordDim!=null;)S++;S<u&&V.push(S++)}each$f(V,function(U,H){var W=_(U);if(d&&R.type!=null&&(W.type=R.type),b(defaults$2(W,R),I,H),W.name==null&&L){var G=L[H];!isObject$3(G)&&(G={name:G}),W.name=W.displayName=G.name,W.defaultTooltip=G.defaultTooltip}O&&defaults$2(W.otherDims,O)})}});function b(M,I,L){VISUAL_DIMENSIONS.get(I)!=null?M.otherDims[I]=L:(M.coordDim=I,M.coordDimIndex=L,s.set(I,!0))}var x=r.generateCoord,A=r.generateCoordCount,w=A!=null;A=x?A||1:0;var E=x||"value";function D(M){M.name==null&&(M.name=M.coordDim)}if(c)each$f(l,function(M){D(M)}),l.sort(function(M,I){return M.storeDimIndex-I.storeDimIndex});else for(var C=0;C<u;C++){var $=_(C),P=$.coordDim;P==null&&($.coordDim=genCoordDimName(E,s,w),$.coordDimIndex=0,(!x||A<=0)&&($.isExtraCoord=!0),A--),D($),$.type==null&&(guessOrdinal(n,C)===BE_ORDINAL.Must||$.isExtraCoord&&($.otherDims.itemName!=null||$.otherDims.seriesName!=null))&&($.type="ordinal")}return removeDuplication(l),new SeriesDataSchema({source:n,dimensions:l,fullDimensionCount:u,dimensionOmitted:c})}function removeDuplication(n){for(var r=createHashMap(),a=0;a<n.length;a++){var o=n[a],s=o.name,l=r.get(s)||0;l>0&&(o.name=s+(l-1)),l++,r.set(s,l)}}function getDimCount(n,r,a,o){var s=Math.max(n.dimensionsDetectedCount||1,r.length,a.length,o||0);return each$f(r,function(l){var u;isObject$3(l)&&(u=l.dimsDef)&&(s=Math.max(s,u.length))}),s}function genCoordDimName(n,r,a){if(a||r.hasKey(n)){for(var o=0;r.hasKey(n+o);)o++;n+=o}return r.set(n,!0),n}var CoordSysInfo=function(){function n(r){this.coordSysDims=[],this.axisMap=createHashMap(),this.categoryAxisMap=createHashMap(),this.coordSysName=r}return n}();function getCoordSysInfoBySeries(n){var r=n.get("coordinateSystem"),a=new CoordSysInfo(r),o=fetchers[r];if(o)return o(n,a,a.axisMap,a.categoryAxisMap),a}var fetchers={cartesian2d:function(n,r,a,o){var s=n.getReferringComponents("xAxis",SINGLE_REFERRING).models[0],l=n.getReferringComponents("yAxis",SINGLE_REFERRING).models[0];r.coordSysDims=["x","y"],a.set("x",s),a.set("y",l),isCategory(s)&&(o.set("x",s),r.firstCategoryDimIndex=0),isCategory(l)&&(o.set("y",l),r.firstCategoryDimIndex==null&&(r.firstCategoryDimIndex=1))},singleAxis:function(n,r,a,o){var s=n.getReferringComponents("singleAxis",SINGLE_REFERRING).models[0];r.coordSysDims=["single"],a.set("single",s),isCategory(s)&&(o.set("single",s),r.firstCategoryDimIndex=0)},polar:function(n,r,a,o){var s=n.getReferringComponents("polar",SINGLE_REFERRING).models[0],l=s.findAxisModel("radiusAxis"),u=s.findAxisModel("angleAxis");r.coordSysDims=["radius","angle"],a.set("radius",l),a.set("angle",u),isCategory(l)&&(o.set("radius",l),r.firstCategoryDimIndex=0),isCategory(u)&&(o.set("angle",u),r.firstCategoryDimIndex==null&&(r.firstCategoryDimIndex=1))},geo:function(n,r,a,o){r.coordSysDims=["lng","lat"]},parallel:function(n,r,a,o){var s=n.ecModel,l=s.getComponent("parallel",n.get("parallelIndex")),u=r.coordSysDims=l.dimensions.slice();each$f(l.parallelAxisIndex,function(c,d){var f=s.getComponent("parallelAxis",c),p=u[d];a.set(p,f),isCategory(f)&&(o.set(p,f),r.firstCategoryDimIndex==null&&(r.firstCategoryDimIndex=d))})}};function isCategory(n){return n.get("type")==="category"}function enableDataStack(n,r,a){a=a||{};var o=a.byIndex,s=a.stackedCoordDimension,l,u,c;isLegacyDimensionsInput(r)?l=r:(u=r.schema,l=u.dimensions,c=r.store);var d=!!(n&&n.get("stack")),f,p,v,g;if(each$f(l,function(A,w){isString(A)&&(l[w]=A={name:A}),d&&!A.isExtraCoord&&(!o&&!f&&A.ordinalMeta&&(f=A),!p&&A.type!=="ordinal"&&A.type!=="time"&&(!s||s===A.coordDim)&&(p=A))}),p&&!o&&!f&&(o=!0),p){v="__\0ecstackresult_"+n.id,g="__\0ecstackedover_"+n.id,f&&(f.createInvertedIndices=!0);var y=p.coordDim,_=p.type,S=0;each$f(l,function(A){A.coordDim===y&&S++});var b={name:v,coordDim:y,coordDimIndex:S,type:_,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:l.length},x={name:g,coordDim:g,coordDimIndex:S+1,type:_,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:l.length+1};u?(c&&(b.storeDimIndex=c.ensureCalculationDimension(g,_),x.storeDimIndex=c.ensureCalculationDimension(v,_)),u.appendCalculationDimension(b),u.appendCalculationDimension(x)):(l.push(b),l.push(x))}return{stackedDimension:p&&p.name,stackedByDimension:f&&f.name,isStackedByIndex:o,stackedOverDimension:g,stackResultDimension:v}}function isLegacyDimensionsInput(n){return!isSeriesDataSchema(n.schema)}function isDimensionStacked(n,r){return!!r&&r===n.getCalculationInfo("stackedDimension")}function getStackedDimension(n,r){return isDimensionStacked(n,r)?n.getCalculationInfo("stackResultDimension"):r}function getCoordSysDimDefs(n,r){var a=n.get("coordinateSystem"),o=CoordinateSystemManager.get(a),s;return r&&r.coordSysDims&&(s=map$1(r.coordSysDims,function(l){var u={name:l},c=r.axisMap.get(l);if(c){var d=c.get("type");u.type=getDimensionTypeByAxis(d)}return u})),s||(s=o&&(o.getDimensionsInfo?o.getDimensionsInfo():o.dimensions.slice())||["x","y"]),s}function injectOrdinalMeta(n,r,a){var o,s;return a&&each$f(n,function(l,u){var c=l.coordDim,d=a.categoryAxisMap.get(c);d&&(o==null&&(o=u),l.ordinalMeta=d.getOrdinalMeta(),r&&(l.createInvertedIndices=!0)),l.otherDims.itemName!=null&&(s=!0)}),!s&&o!=null&&(n[o].otherDims.itemName=0),o}function createSeriesData(n,r,a){a=a||{};var o=r.getSourceManager(),s,l=!1;n?(l=!0,s=createSourceFromSeriesDataOption(n)):(s=o.getSource(),l=s.sourceFormat===SOURCE_FORMAT_ORIGINAL);var u=getCoordSysInfoBySeries(r),c=getCoordSysDimDefs(r,u),d=a.useEncodeDefaulter,f=isFunction(d)?d:d?curry$1(makeSeriesEncodeForAxisCoordSys,c,r):null,p={coordDimensions:c,generateCoord:a.generateCoord,encodeDefine:r.getEncode(),encodeDefaulter:f,canOmitUnusedDimensions:!l},v=prepareSeriesDataSchema(s,p),g=injectOrdinalMeta(v.dimensions,a.createInvertedIndices,u),y=l?null:o.getSharedDataStore(v),_=enableDataStack(r,{schema:v,store:y}),S=new SeriesData(v,r);S.setCalculationInfo(_);var b=g!=null&&isNeedCompleteOrdinalData(s)?function(x,A,w,E){return E===g?w:this.defaultDimValueGetter(x,A,w,E)}:null;return S.hasItemOption=!1,S.initData(l?s:y,null,b),S}function isNeedCompleteOrdinalData(n){if(n.sourceFormat===SOURCE_FORMAT_ORIGINAL){var r=firstDataNotNull(n.data||[]);return!isArray$1(getDataItemValue(r))}}function firstDataNotNull(n){for(var r=0;r<n.length&&n[r]==null;)r++;return n[r]}var Scale=function(){function n(r){this._setting=r||{},this._extent=[1/0,-1/0]}return n.prototype.getSetting=function(r){return this._setting[r]},n.prototype.unionExtent=function(r){var a=this._extent;r[0]<a[0]&&(a[0]=r[0]),r[1]>a[1]&&(a[1]=r[1])},n.prototype.unionExtentFromData=function(r,a){this.unionExtent(r.getApproximateExtent(a))},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.setExtent=function(r,a){var o=this._extent;isNaN(r)||(o[0]=r),isNaN(a)||(o[1]=a)},n.prototype.isInExtentRange=function(r){return this._extent[0]<=r&&this._extent[1]>=r},n.prototype.isBlank=function(){return this._isBlank},n.prototype.setBlank=function(r){this._isBlank=r},n}();enableClassManagement(Scale);var uidBase=0,OrdinalMeta=function(){function n(r){this.categories=r.categories||[],this._needCollect=r.needCollect,this._deduplication=r.deduplication,this.uid=++uidBase}return n.createByAxisModel=function(r){var a=r.option,o=a.data,s=o&&map$1(o,getName);return new n({categories:s,needCollect:!s,deduplication:a.dedplication!==!1})},n.prototype.getOrdinal=function(r){return this._getOrCreateMap().get(r)},n.prototype.parseAndCollect=function(r){var a,o=this._needCollect;if(!isString(r)&&!o)return r;if(o&&!this._deduplication)return a=this.categories.length,this.categories[a]=r,a;var s=this._getOrCreateMap();return a=s.get(r),a==null&&(o?(a=this.categories.length,this.categories[a]=r,s.set(r,a)):a=NaN),a},n.prototype._getOrCreateMap=function(){return this._map||(this._map=createHashMap(this.categories))},n}();function getName(n){return isObject$3(n)&&n.value!=null?n.value:n+""}function isIntervalOrLogScale(n){return n.type==="interval"||n.type==="log"}function intervalScaleNiceTicks(n,r,a,o){var s={},l=n[1]-n[0],u=s.interval=nice(l/r,!0);a!=null&&u<a&&(u=s.interval=a),o!=null&&u>o&&(u=s.interval=o);var c=s.intervalPrecision=getIntervalPrecision(u),d=s.niceTickExtent=[round$3(Math.ceil(n[0]/u)*u,c),round$3(Math.floor(n[1]/u)*u,c)];return fixExtent(d,n),s}function increaseInterval(n){var r=Math.pow(10,quantityExponent(n)),a=n/r;return a?a===2?a=3:a===3?a=5:a*=2:a=1,round$3(a*r)}function getIntervalPrecision(n){return getPrecision(n)+2}function clamp(n,r,a){n[r]=Math.max(Math.min(n[r],a[1]),a[0])}function fixExtent(n,r){!isFinite(n[0])&&(n[0]=r[0]),!isFinite(n[1])&&(n[1]=r[1]),clamp(n,0,r),clamp(n,1,r),n[0]>n[1]&&(n[0]=n[1])}function contain$1(n,r){return n>=r[0]&&n<=r[1]}function normalize$2(n,r){return r[1]===r[0]?.5:(n-r[0])/(r[1]-r[0])}function scale(n,r){return n*(r[1]-r[0])+r[0]}var OrdinalScale=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;o.type="ordinal";var s=o.getSetting("ordinalMeta");return s||(s=new OrdinalMeta({})),isArray$1(s)&&(s=new OrdinalMeta({categories:map$1(s,function(l){return isObject$3(l)?l.value:l})})),o._ordinalMeta=s,o._extent=o.getSetting("extent")||[0,s.categories.length-1],o}return r.prototype.parse=function(a){return a==null?NaN:isString(a)?this._ordinalMeta.getOrdinal(a):Math.round(a)},r.prototype.contain=function(a){return a=this.parse(a),contain$1(a,this._extent)&&this._ordinalMeta.categories[a]!=null},r.prototype.normalize=function(a){return a=this._getTickNumber(this.parse(a)),normalize$2(a,this._extent)},r.prototype.scale=function(a){return a=Math.round(scale(a,this._extent)),this.getRawOrdinalNumber(a)},r.prototype.getTicks=function(){for(var a=[],o=this._extent,s=o[0];s<=o[1];)a.push({value:s}),s++;return a},r.prototype.getMinorTicks=function(a){},r.prototype.setSortInfo=function(a){if(a==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var o=a.ordinalNumbers,s=this._ordinalNumbersByTick=[],l=this._ticksByOrdinalNumber=[],u=0,c=this._ordinalMeta.categories.length,d=Math.min(c,o.length);u<d;++u){var f=o[u];s[u]=f,l[f]=u}for(var p=0;u<c;++u){for(;l[p]!=null;)p++;s.push(p),l[p]=u}},r.prototype._getTickNumber=function(a){var o=this._ticksByOrdinalNumber;return o&&a>=0&&a<o.length?o[a]:a},r.prototype.getRawOrdinalNumber=function(a){var o=this._ordinalNumbersByTick;return o&&a>=0&&a<o.length?o[a]:a},r.prototype.getLabel=function(a){if(!this.isBlank()){var o=this.getRawOrdinalNumber(a.value),s=this._ordinalMeta.categories[o];return s==null?"":s+""}},r.prototype.count=function(){return this._extent[1]-this._extent[0]+1},r.prototype.unionExtentFromData=function(a,o){this.unionExtent(a.getApproximateExtent(o))},r.prototype.isInExtentRange=function(a){return a=this._getTickNumber(a),this._extent[0]<=a&&this._extent[1]>=a},r.prototype.getOrdinalMeta=function(){return this._ordinalMeta},r.prototype.calcNiceTicks=function(){},r.prototype.calcNiceExtent=function(){},r.type="ordinal",r}(Scale);Scale.registerClass(OrdinalScale);var roundNumber=round$3,IntervalScale=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type="interval",a._interval=0,a._intervalPrecision=2,a}return r.prototype.parse=function(a){return a},r.prototype.contain=function(a){return contain$1(a,this._extent)},r.prototype.normalize=function(a){return normalize$2(a,this._extent)},r.prototype.scale=function(a){return scale(a,this._extent)},r.prototype.setExtent=function(a,o){var s=this._extent;isNaN(a)||(s[0]=parseFloat(a)),isNaN(o)||(s[1]=parseFloat(o))},r.prototype.unionExtent=function(a){var o=this._extent;a[0]<o[0]&&(o[0]=a[0]),a[1]>o[1]&&(o[1]=a[1]),this.setExtent(o[0],o[1])},r.prototype.getInterval=function(){return this._interval},r.prototype.setInterval=function(a){this._interval=a,this._niceExtent=this._extent.slice(),this._intervalPrecision=getIntervalPrecision(a)},r.prototype.getTicks=function(a){var o=this._interval,s=this._extent,l=this._niceExtent,u=this._intervalPrecision,c=[];if(!o)return c;var d=1e4;s[0]<l[0]&&(a?c.push({value:roundNumber(l[0]-o,u)}):c.push({value:s[0]}));for(var f=l[0];f<=l[1]&&(c.push({value:f}),f=roundNumber(f+o,u),f!==c[c.length-1].value);)if(c.length>d)return[];var p=c.length?c[c.length-1].value:l[1];return s[1]>p&&(a?c.push({value:roundNumber(p+o,u)}):c.push({value:s[1]})),c},r.prototype.getMinorTicks=function(a){for(var o=this.getTicks(!0),s=[],l=this.getExtent(),u=1;u<o.length;u++){for(var c=o[u],d=o[u-1],f=0,p=[],v=c.value-d.value,g=v/a;f<a-1;){var y=roundNumber(d.value+(f+1)*g);y>l[0]&&y<l[1]&&p.push(y),f++}s.push(p)}return s},r.prototype.getLabel=function(a,o){if(a==null)return"";var s=o&&o.precision;s==null?s=getPrecision(a.value)||0:s==="auto"&&(s=this._intervalPrecision);var l=roundNumber(a.value,s,!0);return addCommas(l)},r.prototype.calcNiceTicks=function(a,o,s){a=a||5;var l=this._extent,u=l[1]-l[0];if(isFinite(u)){u<0&&(u=-u,l.reverse());var c=intervalScaleNiceTicks(l,a,o,s);this._intervalPrecision=c.intervalPrecision,this._interval=c.interval,this._niceExtent=c.niceTickExtent}},r.prototype.calcNiceExtent=function(a){var o=this._extent;if(o[0]===o[1])if(o[0]!==0){var s=Math.abs(o[0]);a.fixMax||(o[1]+=s/2),o[0]-=s/2}else o[1]=1;var l=o[1]-o[0];isFinite(l)||(o[0]=0,o[1]=1),this.calcNiceTicks(a.splitNumber,a.minInterval,a.maxInterval);var u=this._interval;a.fixMin||(o[0]=roundNumber(Math.floor(o[0]/u)*u)),a.fixMax||(o[1]=roundNumber(Math.ceil(o[1]/u)*u))},r.prototype.setNiceExtent=function(a,o){this._niceExtent=[a,o]},r.type="interval",r}(Scale);Scale.registerClass(IntervalScale);var supportFloat32Array=typeof Float32Array<"u",Float32ArrayCtor=supportFloat32Array?Float32Array:Array;function createFloat32Array(n){return isArray$1(n)?supportFloat32Array?new Float32Array(n):n:new Float32ArrayCtor(n)}var STACK_PREFIX="__ec_stack_";function getSeriesStackId$1(n){return n.get("stack")||STACK_PREFIX+n.seriesIndex}function getAxisKey$1(n){return n.dim+n.index}function getLayoutOnAxis(n){var r=[],a=n.axis,o="axis0";if(a.type==="category"){for(var s=a.getBandWidth(),l=0;l<n.count;l++)r.push(defaults$2({bandWidth:s,axisKey:o,stackId:STACK_PREFIX+l},n));for(var u=doCalBarWidthAndOffset(r),c=[],l=0;l<n.count;l++){var d=u[o][STACK_PREFIX+l];d.offsetCenter=d.offset+d.width/2,c.push(d)}return c}}function prepareLayoutBarSeries(n,r){var a=[];return r.eachSeriesByType(n,function(o){isOnCartesian(o)&&a.push(o)}),a}function getValueAxesMinGaps(n){var r={};each$f(n,function(d){var f=d.coordinateSystem,p=f.getBaseAxis();if(!(p.type!=="time"&&p.type!=="value"))for(var v=d.getData(),g=p.dim+"_"+p.index,y=v.getDimensionIndex(v.mapDimension(p.dim)),_=v.getStore(),S=0,b=_.count();S<b;++S){var x=_.get(y,S);r[g]?r[g].push(x):r[g]=[x]}});var a={};for(var o in r)if(r.hasOwnProperty(o)){var s=r[o];if(s){s.sort(function(d,f){return d-f});for(var l=null,u=1;u<s.length;++u){var c=s[u]-s[u-1];c>0&&(l=l===null?c:Math.min(l,c))}a[o]=l}}return a}function makeColumnLayout(n){var r=getValueAxesMinGaps(n),a=[];return each$f(n,function(o){var s=o.coordinateSystem,l=s.getBaseAxis(),u=l.getExtent(),c;if(l.type==="category")c=l.getBandWidth();else if(l.type==="value"||l.type==="time"){var d=l.dim+"_"+l.index,f=r[d],p=Math.abs(u[1]-u[0]),v=l.scale.getExtent(),g=Math.abs(v[1]-v[0]);c=f?p/g*f:p}else{var y=o.getData();c=Math.abs(u[1]-u[0])/y.count()}var _=parsePercent(o.get("barWidth"),c),S=parsePercent(o.get("barMaxWidth"),c),b=parsePercent(o.get("barMinWidth")||(isInLargeMode(o)?.5:1),c),x=o.get("barGap"),A=o.get("barCategoryGap");a.push({bandWidth:c,barWidth:_,barMaxWidth:S,barMinWidth:b,barGap:x,barCategoryGap:A,axisKey:getAxisKey$1(l),stackId:getSeriesStackId$1(o)})}),doCalBarWidthAndOffset(a)}function doCalBarWidthAndOffset(n){var r={};each$f(n,function(o,s){var l=o.axisKey,u=o.bandWidth,c=r[l]||{bandWidth:u,remainedWidth:u,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},d=c.stacks;r[l]=c;var f=o.stackId;d[f]||c.autoWidthCount++,d[f]=d[f]||{width:0,maxWidth:0};var p=o.barWidth;p&&!d[f].width&&(d[f].width=p,p=Math.min(c.remainedWidth,p),c.remainedWidth-=p);var v=o.barMaxWidth;v&&(d[f].maxWidth=v);var g=o.barMinWidth;g&&(d[f].minWidth=g);var y=o.barGap;y!=null&&(c.gap=y);var _=o.barCategoryGap;_!=null&&(c.categoryGap=_)});var a={};return each$f(r,function(o,s){a[s]={};var l=o.stacks,u=o.bandWidth,c=o.categoryGap;if(c==null){var d=keys(l).length;c=Math.max(35-d*4,15)+"%"}var f=parsePercent(c,u),p=parsePercent(o.gap,1),v=o.remainedWidth,g=o.autoWidthCount,y=(v-f)/(g+(g-1)*p);y=Math.max(y,0),each$f(l,function(x){var A=x.maxWidth,w=x.minWidth;if(x.width){var E=x.width;A&&(E=Math.min(E,A)),w&&(E=Math.max(E,w)),x.width=E,v-=E+p*E,g--}else{var E=y;A&&A<E&&(E=Math.min(A,v)),w&&w>E&&(E=w),E!==y&&(x.width=E,v-=E+p*E,g--)}}),y=(v-f)/(g+(g-1)*p),y=Math.max(y,0);var _=0,S;each$f(l,function(x,A){x.width||(x.width=y),S=x,_+=x.width*(1+p)}),S&&(_-=S.width*p);var b=-_/2;each$f(l,function(x,A){a[s][A]=a[s][A]||{bandWidth:u,offset:b,width:x.width},b+=x.width*(1+p)})}),a}function retrieveColumnLayout(n,r,a){if(n&&r){var o=n[getAxisKey$1(r)];return o!=null&&a!=null?o[getSeriesStackId$1(a)]:o}}function layout$3(n,r){var a=prepareLayoutBarSeries(n,r),o=makeColumnLayout(a);each$f(a,function(s){var l=s.getData(),u=s.coordinateSystem,c=u.getBaseAxis(),d=getSeriesStackId$1(s),f=o[getAxisKey$1(c)][d],p=f.offset,v=f.width;l.setLayout({bandWidth:f.bandWidth,offset:p,size:v})})}function createProgressiveLayout(n){return{seriesType:n,plan:createRenderPlanner(),reset:function(r){if(isOnCartesian(r)){var a=r.getData(),o=r.coordinateSystem,s=o.getBaseAxis(),l=o.getOtherAxis(s),u=a.getDimensionIndex(a.mapDimension(l.dim)),c=a.getDimensionIndex(a.mapDimension(s.dim)),d=r.get("showBackground",!0),f=a.mapDimension(l.dim),p=a.getCalculationInfo("stackResultDimension"),v=isDimensionStacked(a,f)&&!!a.getCalculationInfo("stackedOnSeries"),g=l.isHorizontal(),y=getValueAxisStart(s,l),_=isInLargeMode(r),S=r.get("barMinHeight")||0,b=p&&a.getDimensionIndex(p),x=a.getLayout("size"),A=a.getLayout("offset");return{progress:function(w,E){for(var D=w.count,C=_&&createFloat32Array(D*3),$=_&&d&&createFloat32Array(D*3),P=_&&createFloat32Array(D),M=o.master.getRect(),I=g?M.width:M.height,L,O=E.getStore(),R=0;(L=w.next())!=null;){var N=O.get(v?b:u,L),V=O.get(c,L),F=y,U=void 0;v&&(U=+N-O.get(u,L));var H=void 0,W=void 0,G=void 0,B=void 0;if(g){var Y=o.dataToPoint([N,V]);if(v){var Z=o.dataToPoint([U,V]);F=Z[0]}H=F,W=Y[1]+A,G=Y[0]-F,B=x,Math.abs(G)<S&&(G=(G<0?-1:1)*S)}else{var Y=o.dataToPoint([V,N]);if(v){var Z=o.dataToPoint([V,U]);F=Z[1]}H=Y[0]+A,W=F,G=x,B=Y[1]-F,Math.abs(B)<S&&(B=(B<=0?-1:1)*S)}_?(C[R]=H,C[R+1]=W,C[R+2]=g?G:B,$&&($[R]=g?M.x:H,$[R+1]=g?W:M.y,$[R+2]=I),P[L]=L):E.setItemLayout(L,{x:H,y:W,width:G,height:B}),R+=3}_&&E.setLayout({largePoints:C,largeDataIndices:P,largeBackgroundPoints:$,valueAxisHorizontal:g})}}}}}}function isOnCartesian(n){return n.coordinateSystem&&n.coordinateSystem.type==="cartesian2d"}function isInLargeMode(n){return n.pipelineContext&&n.pipelineContext.large}function getValueAxisStart(n,r){var a=r.model.get("startValue");return a||(a=0),r.toGlobalCoord(r.dataToCoord(r.type==="log"?a>0?a:1:a))}var bisect=function(n,r,a,o){for(;a<o;){var s=a+o>>>1;n[s][1]<r?a=s+1:o=s}return a},TimeScale=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="time",o}return r.prototype.getLabel=function(a){var o=this.getSetting("useUTC");return format$1(a.value,fullLeveledFormatter[getDefaultFormatPrecisionOfInterval(getPrimaryTimeUnit(this._minLevelUnit))]||fullLeveledFormatter.second,o,this.getSetting("locale"))},r.prototype.getFormattedLabel=function(a,o,s){var l=this.getSetting("useUTC"),u=this.getSetting("locale");return leveledFormat(a,o,s,u,l)},r.prototype.getTicks=function(){var a=this._interval,o=this._extent,s=[];if(!a)return s;s.push({value:o[0],level:0});var l=this.getSetting("useUTC"),u=getIntervalTicks(this._minLevelUnit,this._approxInterval,l,o);return s=s.concat(u),s.push({value:o[1],level:0}),s},r.prototype.calcNiceExtent=function(a){var o=this._extent;if(o[0]===o[1]&&(o[0]-=ONE_DAY,o[1]+=ONE_DAY),o[1]===-1/0&&o[0]===1/0){var s=new Date;o[1]=+new Date(s.getFullYear(),s.getMonth(),s.getDate()),o[0]=o[1]-ONE_DAY}this.calcNiceTicks(a.splitNumber,a.minInterval,a.maxInterval)},r.prototype.calcNiceTicks=function(a,o,s){a=a||10;var l=this._extent,u=l[1]-l[0];this._approxInterval=u/a,o!=null&&this._approxInterval<o&&(this._approxInterval=o),s!=null&&this._approxInterval>s&&(this._approxInterval=s);var c=scaleIntervals.length,d=Math.min(bisect(scaleIntervals,this._approxInterval,0,c),c-1);this._interval=scaleIntervals[d][1],this._minLevelUnit=scaleIntervals[Math.max(d-1,0)][0]},r.prototype.parse=function(a){return isNumber(a)?a:+parseDate(a)},r.prototype.contain=function(a){return contain$1(this.parse(a),this._extent)},r.prototype.normalize=function(a){return normalize$2(this.parse(a),this._extent)},r.prototype.scale=function(a){return scale(a,this._extent)},r.type="time",r}(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 isUnitValueSame(n,r,a,o){var s=parseDate(r),l=parseDate(a),u=function(_){return getUnitValue(s,_,o)===getUnitValue(l,_,o)},c=function(){return u("year")},d=function(){return c()&&u("month")},f=function(){return d()&&u("day")},p=function(){return f()&&u("hour")},v=function(){return p()&&u("minute")},g=function(){return v()&&u("second")},y=function(){return g()&&u("millisecond")};switch(n){case"year":return c();case"month":return d();case"day":return f();case"hour":return p();case"minute":return v();case"second":return g();case"millisecond":return y()}}function getDateInterval(n,r){return n/=ONE_DAY,n>16?16:n>7.5?7:n>3.5?4:n>1.5?2:1}function getMonthInterval(n){var r=30*ONE_DAY;return n/=r,n>6?6:n>3?3:n>2?2:1}function getHourInterval(n){return n/=ONE_HOUR,n>12?12:n>6?6:n>3.5?4:n>2?2:1}function getMinutesAndSecondsInterval(n,r){return n/=r?ONE_MINUTE:ONE_SECOND,n>30?30:n>20?20:n>15?15:n>10?10:n>5?5:n>2?2:1}function getMillisecondsInterval(n){return nice(n,!0)}function getFirstTimestampOfUnit(n,r,a){var o=new Date(n);switch(getPrimaryTimeUnit(r)){case"year":case"month":o[monthSetterName(a)](0);case"day":o[dateSetterName(a)](1);case"hour":o[hoursSetterName(a)](0);case"minute":o[minutesSetterName(a)](0);case"second":o[secondsSetterName(a)](0),o[millisecondsSetterName(a)](0)}return o.getTime()}function getIntervalTicks(n,r,a,o){var s=1e4,l=timeUnits,u=0;function c(I,L,O,R,N,V,F){for(var U=new Date(L),H=L,W=U[R]();H<O&&H<=o[1];)F.push({value:H}),W+=I,U[N](W),H=U.getTime();F.push({value:H,notAdd:!0})}function d(I,L,O){var R=[],N=!L.length;if(!isUnitValueSame(getPrimaryTimeUnit(I),o[0],o[1],a)){N&&(L=[{value:getFirstTimestampOfUnit(new Date(o[0]),I,a)},{value:o[1]}]);for(var V=0;V<L.length-1;V++){var F=L[V].value,U=L[V+1].value;if(F!==U){var H=void 0,W=void 0,G=void 0,B=!1;switch(I){case"year":H=Math.max(1,Math.round(r/ONE_DAY/365)),W=fullYearGetterName(a),G=fullYearSetterName(a);break;case"half-year":case"quarter":case"month":H=getMonthInterval(r),W=monthGetterName(a),G=monthSetterName(a);break;case"week":case"half-week":case"day":H=getDateInterval(r),W=dateGetterName(a),G=dateSetterName(a),B=!0;break;case"half-day":case"quarter-day":case"hour":H=getHourInterval(r),W=hoursGetterName(a),G=hoursSetterName(a);break;case"minute":H=getMinutesAndSecondsInterval(r,!0),W=minutesGetterName(a),G=minutesSetterName(a);break;case"second":H=getMinutesAndSecondsInterval(r,!1),W=secondsGetterName(a),G=secondsSetterName(a);break;case"millisecond":H=getMillisecondsInterval(r),W=millisecondsGetterName(a),G=millisecondsSetterName(a);break}c(H,F,U,W,G,B,R),I==="year"&&O.length>1&&V===0&&O.unshift({value:O[0].value-H})}}for(var V=0;V<R.length;V++)O.push(R[V]);return R}}for(var f=[],p=[],v=0,g=0,y=0;y<l.length&&u++<s;++y){var _=getPrimaryTimeUnit(l[y]);if(isPrimaryTimeUnit(l[y])){d(l[y],f[f.length-1]||[],p);var S=l[y+1]?getPrimaryTimeUnit(l[y+1]):null;if(_!==S){if(p.length){g=v,p.sort(function(I,L){return I.value-L.value});for(var b=[],x=0;x<p.length;++x){var A=p[x].value;(x===0||p[x-1].value!==A)&&(b.push(p[x]),A>=o[0]&&A<=o[1]&&v++)}var w=(o[1]-o[0])/r;if(v>w*1.5&&g>w/1.5||(f.push(b),v>w||n===l[y]))break}p=[]}}}for(var E=filter(map$1(f,function(I){return filter(I,function(L){return L.value>=o[0]&&L.value<=o[1]&&!L.notAdd})}),function(I){return I.length>0}),D=[],C=E.length-1,y=0;y<E.length;++y)for(var $=E[y],P=0;P<$.length;++P)D.push({value:$[P].value,level:C-y});D.sort(function(I,L){return I.value-L.value});for(var M=[],y=0;y<D.length;++y)(y===0||D[y].value!==D[y-1].value)&&M.push(D[y]);return M}Scale.registerClass(TimeScale);var scaleProto=Scale.prototype,intervalScaleProto=IntervalScale.prototype,roundingErrorFix=round$3,mathFloor$1=Math.floor,mathCeil$1=Math.ceil,mathPow$1=Math.pow,mathLog$1=Math.log,LogScale=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type="log",a.base=10,a._originalScale=new IntervalScale,a._interval=0,a}return r.prototype.getTicks=function(a){var o=this._originalScale,s=this._extent,l=o.getExtent(),u=intervalScaleProto.getTicks.call(this,a);return map$1(u,function(c){var d=c.value,f=round$3(mathPow$1(this.base,d));return f=d===s[0]&&this._fixMin?fixRoundingError(f,l[0]):f,f=d===s[1]&&this._fixMax?fixRoundingError(f,l[1]):f,{value:f}},this)},r.prototype.setExtent=function(a,o){var s=mathLog$1(this.base);a=mathLog$1(Math.max(0,a))/s,o=mathLog$1(Math.max(0,o))/s,intervalScaleProto.setExtent.call(this,a,o)},r.prototype.getExtent=function(){var a=this.base,o=scaleProto.getExtent.call(this);o[0]=mathPow$1(a,o[0]),o[1]=mathPow$1(a,o[1]);var s=this._originalScale,l=s.getExtent();return this._fixMin&&(o[0]=fixRoundingError(o[0],l[0])),this._fixMax&&(o[1]=fixRoundingError(o[1],l[1])),o},r.prototype.unionExtent=function(a){this._originalScale.unionExtent(a);var o=this.base;a[0]=mathLog$1(a[0])/mathLog$1(o),a[1]=mathLog$1(a[1])/mathLog$1(o),scaleProto.unionExtent.call(this,a)},r.prototype.unionExtentFromData=function(a,o){this.unionExtent(a.getApproximateExtent(o))},r.prototype.calcNiceTicks=function(a){a=a||10;var o=this._extent,s=o[1]-o[0];if(!(s===1/0||s<=0)){var l=quantity(s),u=a/s*l;for(u<=.5&&(l*=10);!isNaN(l)&&Math.abs(l)<1&&Math.abs(l)>0;)l*=10;var c=[round$3(mathCeil$1(o[0]/l)*l),round$3(mathFloor$1(o[1]/l)*l)];this._interval=l,this._niceExtent=c}},r.prototype.calcNiceExtent=function(a){intervalScaleProto.calcNiceExtent.call(this,a),this._fixMin=a.fixMin,this._fixMax=a.fixMax},r.prototype.parse=function(a){return a},r.prototype.contain=function(a){return a=mathLog$1(a)/mathLog$1(this.base),contain$1(a,this._extent)},r.prototype.normalize=function(a){return a=mathLog$1(a)/mathLog$1(this.base),normalize$2(a,this._extent)},r.prototype.scale=function(a){return a=scale(a,this._extent),mathPow$1(this.base,a)},r.type="log",r}(Scale),proto=LogScale.prototype;proto.getMinorTicks=intervalScaleProto.getMinorTicks;proto.getLabel=intervalScaleProto.getLabel;function fixRoundingError(n,r){return roundingErrorFix(n,getPrecision(r))}Scale.registerClass(LogScale);var ScaleRawExtentInfo=function(){function n(r,a,o){this._prepareParams(r,a,o)}return n.prototype._prepareParams=function(r,a,o){o[1]<o[0]&&(o=[NaN,NaN]),this._dataMin=o[0],this._dataMax=o[1];var s=this._isOrdinal=r.type==="ordinal";this._needCrossZero=r.type==="interval"&&a.getNeedCrossZero&&a.getNeedCrossZero();var l=a.get("min",!0);l==null&&(l=a.get("startValue",!0));var u=this._modelMinRaw=l;isFunction(u)?this._modelMinNum=parseAxisModelMinMax(r,u({min:o[0],max:o[1]})):u!=="dataMin"&&(this._modelMinNum=parseAxisModelMinMax(r,u));var c=this._modelMaxRaw=a.get("max",!0);if(isFunction(c)?this._modelMaxNum=parseAxisModelMinMax(r,c({min:o[0],max:o[1]})):c!=="dataMax"&&(this._modelMaxNum=parseAxisModelMinMax(r,c)),s)this._axisDataLen=a.getCategories().length;else{var d=a.get("boundaryGap"),f=isArray$1(d)?d:[d||0,d||0];typeof f[0]=="boolean"||typeof f[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[parsePercent$1(f[0],1),parsePercent$1(f[1],1)]}},n.prototype.calculate=function(){var r=this._isOrdinal,a=this._dataMin,o=this._dataMax,s=this._axisDataLen,l=this._boundaryGapInner,u=r?null:o-a||Math.abs(a),c=this._modelMinRaw==="dataMin"?a:this._modelMinNum,d=this._modelMaxRaw==="dataMax"?o:this._modelMaxNum,f=c!=null,p=d!=null;c==null&&(c=r?s?0:NaN:a-l[0]*u),d==null&&(d=r?s?s-1:NaN:o+l[1]*u),(c==null||!isFinite(c))&&(c=NaN),(d==null||!isFinite(d))&&(d=NaN);var v=eqNaN(c)||eqNaN(d)||r&&!s;this._needCrossZero&&(c>0&&d>0&&!f&&(c=0),c<0&&d<0&&!p&&(d=0));var g=this._determinedMin,y=this._determinedMax;return g!=null&&(c=g,f=!0),y!=null&&(d=y,p=!0),{min:c,max:d,minFixed:f,maxFixed:p,isBlank:v}},n.prototype.modifyDataMinMax=function(r,a){this[DATA_MIN_MAX_ATTR[r]]=a},n.prototype.setDeterminedMinMax=function(r,a){var o=DETERMINED_MIN_MAX_ATTR[r];this[o]=a},n.prototype.freeze=function(){this.frozen=!0},n}(),DETERMINED_MIN_MAX_ATTR={min:"_determinedMin",max:"_determinedMax"},DATA_MIN_MAX_ATTR={min:"_dataMin",max:"_dataMax"};function ensureScaleRawExtentInfo(n,r,a){var o=n.rawExtentInfo;return o||(o=new ScaleRawExtentInfo(n,r,a),n.rawExtentInfo=o,o)}function parseAxisModelMinMax(n,r){return r==null?null:eqNaN(r)?NaN:n.parse(r)}function getScaleExtent(n,r){var a=n.type,o=ensureScaleRawExtentInfo(n,r,n.getExtent()).calculate();n.setBlank(o.isBlank);var s=o.min,l=o.max,u=r.ecModel;if(u&&a==="time"){var c=prepareLayoutBarSeries("bar",u),d=!1;if(each$f(c,function(v){d=d||v.getBaseAxis()===r.axis}),d){var f=makeColumnLayout(c),p=adjustScaleForOverflow(s,l,r,f);s=p.min,l=p.max}}return{extent:[s,l],fixMin:o.minFixed,fixMax:o.maxFixed}}function adjustScaleForOverflow(n,r,a,o){var s=a.axis.getExtent(),l=Math.abs(s[1]-s[0]),u=retrieveColumnLayout(o,a.axis);if(u===void 0)return{min:n,max:r};var c=1/0;each$f(u,function(y){c=Math.min(y.offset,c)});var d=-1/0;each$f(u,function(y){d=Math.max(y.offset+y.width,d)}),c=Math.abs(c),d=Math.abs(d);var f=c+d,p=r-n,v=1-(c+d)/l,g=p/v-p;return r+=g*(d/f),n-=g*(c/f),{min:n,max:r}}function niceScaleExtent(n,r){var a=r,o=getScaleExtent(n,a),s=o.extent,l=a.get("splitNumber");n instanceof LogScale&&(n.base=a.get("logBase"));var u=n.type,c=a.get("interval"),d=u==="interval"||u==="time";n.setExtent(s[0],s[1]),n.calcNiceExtent({splitNumber:l,fixMin:o.fixMin,fixMax:o.fixMax,minInterval:d?a.get("minInterval"):null,maxInterval:d?a.get("maxInterval"):null}),c!=null&&n.setInterval&&n.setInterval(c)}function createScaleByModel$1(n,r){if(r=r||n.get("type"),r)switch(r){case"category":return new OrdinalScale({ordinalMeta:n.getOrdinalMeta?n.getOrdinalMeta():n.getCategories(),extent:[1/0,-1/0]});case"time":return new TimeScale({locale:n.ecModel.getLocaleModel(),useUTC:n.ecModel.get("useUTC")});default:return new(Scale.getClass(r)||IntervalScale)}}function ifAxisCrossZero(n){var r=n.scale.getExtent(),a=r[0],o=r[1];return!(a>0&&o>0||a<0&&o<0)}function makeLabelFormatter(n){var r=n.getLabelModel().get("formatter"),a=n.type==="category"?n.scale.getExtent()[0]:null;return n.scale.type==="time"?function(o){return function(s,l){return n.scale.getFormattedLabel(s,l,o)}}(r):isString(r)?function(o){return function(s){var l=n.scale.getLabel(s),u=o.replace("{value}",l!=null?l:"");return u}}(r):isFunction(r)?function(o){return function(s,l){return a!=null&&(l=s.value-a),o(getAxisRawValue(n,s),l,s.level!=null?{level:s.level}:null)}}(r):function(o){return n.scale.getLabel(o)}}function getAxisRawValue(n,r){return n.type==="category"?n.scale.getLabel(r):r.value}function estimateLabelUnionRect(n){var r=n.model,a=n.scale;if(!(!r.get(["axisLabel","show"])||a.isBlank())){var o,s,l=a.getExtent();a instanceof OrdinalScale?s=a.count():(o=a.getTicks(),s=o.length);var u=n.getLabelModel(),c=makeLabelFormatter(n),d,f=1;s>40&&(f=Math.ceil(s/40));for(var p=0;p<s;p+=f){var v=o?o[p]:{value:l[0]+p},g=c(v,p),y=u.getTextRect(g),_=rotateTextRect(y,u.get("rotate")||0);d?d.union(_):d=_}return d}}function rotateTextRect(n,r){var a=r*Math.PI/180,o=n.width,s=n.height,l=o*Math.abs(Math.cos(a))+Math.abs(s*Math.sin(a)),u=o*Math.abs(Math.sin(a))+Math.abs(s*Math.cos(a)),c=new BoundingRect(n.x,n.y,l,u);return c}function getOptionCategoryInterval(n){var r=n.get("interval");return r==null?"auto":r}function shouldShowAllLabels(n){return n.type==="category"&&getOptionCategoryInterval(n.getLabelModel())===0}function getDataDimensionsOnAxis(n,r){var a={};return each$f(n.mapDimensionsAll(r),function(o){a[getStackedDimension(n,o)]=!0}),keys(a)}function unionAxisExtentFromData(n,r,a){r&&each$f(getDataDimensionsOnAxis(r,a),function(o){var s=r.getApproximateExtent(o);s[0]<n[0]&&(n[0]=s[0]),s[1]>n[1]&&(n[1]=s[1])})}var AxisModelCommonMixin=function(){function n(){}return n.prototype.getNeedCrossZero=function(){var r=this.option;return!r.scale},n.prototype.getCoordSysModel=function(){},n}();function createList$2(n){return createSeriesData(null,n)}var dataStack={isDimensionStacked,enableDataStack,getStackedDimension};function createScale(n,r){var a=r;r instanceof Model||(a=new Model(r));var o=createScaleByModel$1(a);return o.setExtent(n[0],n[1]),niceScaleExtent(o,a),o}function mixinAxisModelCommonMethods(n){mixin(n,AxisModelCommonMixin)}function createTextStyle(n,r){return r=r||{},createTextStyle$1(n,null,null,r.state!=="normal")}const helper=Object.freeze(Object.defineProperty({__proto__:null,createDimensions,createList:createList$2,createScale,createSymbol:createSymbol$1,createTextStyle,dataStack,enableHoverEmphasis,getECData,getLayoutRect,mixinAxisModelCommonMethods},Symbol.toStringTag,{value:"Module"}));var extensions=[],extensionRegisters={registerPreprocessor,registerProcessor,registerPostInit,registerPostUpdate,registerUpdateLifecycle,registerAction,registerCoordinateSystem,registerLayout,registerVisual,registerTransform,registerLoading,registerMap:registerMap$1,registerImpl,PRIORITY,ComponentModel,ComponentView,SeriesModel,ChartView,registerComponentModel:function(n){ComponentModel.registerClass(n)},registerComponentView:function(n){ComponentView.registerClass(n)},registerSeriesModel:function(n){SeriesModel.registerClass(n)},registerChartView:function(n){ChartView.registerClass(n)},registerSubTypeDefaulter:function(n,r){ComponentModel.registerSubTypeDefaulter(n,r)},registerPainter:function(n,r){registerPainter(n,r)}};function use(n){if(isArray$1(n)){each$f(n,function(r){use(r)});return}indexOf(extensions,n)>=0||(extensions.push(n),isFunction(n)&&(n={install:n}),n.install(extensionRegisters))}var EPSILON=1e-8;function isAroundEqual(n,r){return Math.abs(n-r)<EPSILON}function contain(n,r,a){var o=0,s=n[0];if(!s)return!1;for(var l=1;l<n.length;l++){var u=n[l];o+=windingLine(s[0],s[1],u[0],u[1],r,a),s=u}var c=n[0];return(!isAroundEqual(s[0],c[0])||!isAroundEqual(s[1],c[1]))&&(o+=windingLine(s[0],s[1],c[0],c[1],r,a)),o!==0}var TMP_TRANSFORM=[];function transformPoints(n,r){for(var a=0;a<n.length;a++)applyTransform$1(n[a],n[a],r)}function updateBBoxFromPoints(n,r,a,o){for(var s=0;s<n.length;s++){var l=n[s];o&&(l=o.project(l)),l&&isFinite(l[0])&&isFinite(l[1])&&(min$1(r,r,l),max$1(a,a,l))}}function centroid$1(n){for(var r=0,a=0,o=0,s=n.length,l=n[s-1][0],u=n[s-1][1],c=0;c<s;c++){var d=n[c][0],f=n[c][1],p=l*f-d*u;r+=p,a+=(l+d)*p,o+=(u+f)*p,l=d,u=f}return r?[a/r/3,o/r/3,r]:[n[0][0]||0,n[0][1]||0]}var Region=function(){function n(r){this.name=r}return n.prototype.setCenter=function(r){this._center=r},n.prototype.getCenter=function(){var r=this._center;return r||(r=this._center=this.calcCenter()),r},n}(),GeoJSONPolygonGeometry=function(){function n(r,a){this.type="polygon",this.exterior=r,this.interiors=a}return n}(),GeoJSONLineStringGeometry=function(){function n(r){this.type="linestring",this.points=r}return n}(),GeoJSONRegion=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this,a)||this;return l.type="geoJSON",l.geometries=o,l._center=s&&[s[0],s[1]],l}return r.prototype.calcCenter=function(){for(var a=this.geometries,o,s=0,l=0;l<a.length;l++){var u=a[l],c=u.exterior,d=c&&c.length;d>s&&(o=u,s=d)}if(o)return centroid$1(o.exterior);var f=this.getBoundingRect();return[f.x+f.width/2,f.y+f.height/2]},r.prototype.getBoundingRect=function(a){var o=this._rect;if(o&&!a)return o;var s=[1/0,1/0],l=[-1/0,-1/0],u=this.geometries;return each$f(u,function(c){c.type==="polygon"?updateBBoxFromPoints(c.exterior,s,l,a):each$f(c.points,function(d){updateBBoxFromPoints(d,s,l,a)})}),isFinite(s[0])&&isFinite(s[1])&&isFinite(l[0])&&isFinite(l[1])||(s[0]=s[1]=l[0]=l[1]=0),o=new BoundingRect(s[0],s[1],l[0]-s[0],l[1]-s[1]),a||(this._rect=o),o},r.prototype.contain=function(a){var o=this.getBoundingRect(),s=this.geometries;if(!o.contain(a[0],a[1]))return!1;e:for(var l=0,u=s.length;l<u;l++){var c=s[l];if(c.type==="polygon"){var d=c.exterior,f=c.interiors;if(contain(d,a[0],a[1])){for(var p=0;p<(f?f.length:0);p++)if(contain(f[p],a[0],a[1]))continue e;return!0}}}return!1},r.prototype.transformTo=function(a,o,s,l){var u=this.getBoundingRect(),c=u.width/u.height;s?l||(l=s/c):s=c*l;for(var d=new BoundingRect(a,o,s,l),f=u.calculateTransform(d),p=this.geometries,v=0;v<p.length;v++){var g=p[v];g.type==="polygon"?(transformPoints(g.exterior,f),each$f(g.interiors,function(y){transformPoints(y,f)})):each$f(g.points,function(y){transformPoints(y,f)})}u=this._rect,u.copy(d),this._center=[u.x+u.width/2,u.y+u.height/2]},r.prototype.cloneShallow=function(a){a==null&&(a=this.name);var o=new r(a,this.geometries,this._center);return o._rect=this._rect,o.transformTo=null,o},r}(Region),GeoSVGRegion=function(n){__extends(r,n);function r(a,o){var s=n.call(this,a)||this;return s.type="geoSVG",s._elOnlyForCalculate=o,s}return r.prototype.calcCenter=function(){for(var a=this._elOnlyForCalculate,o=a.getBoundingRect(),s=[o.x+o.width/2,o.y+o.height/2],l=identity(TMP_TRANSFORM),u=a;u&&!u.isGeoSVGGraphicRoot;)mul(l,u.getLocalTransform(),l),u=u.parent;return invert(l,l),applyTransform$1(s,s,l),s},r}(Region);function decode(n){if(!n.UTF8Encoding)return n;var r=n,a=r.UTF8Scale;a==null&&(a=1024);var o=r.features;return each$f(o,function(s){var l=s.geometry,u=l.encodeOffsets,c=l.coordinates;if(u)switch(l.type){case"LineString":l.coordinates=decodeRing(c,u,a);break;case"Polygon":decodeRings(c,u,a);break;case"MultiLineString":decodeRings(c,u,a);break;case"MultiPolygon":each$f(c,function(d,f){return decodeRings(d,u[f],a)})}}),r.UTF8Encoding=!1,r}function decodeRings(n,r,a){for(var o=0;o<n.length;o++)n[o]=decodeRing(n[o],r[o],a)}function decodeRing(n,r,a){for(var o=[],s=r[0],l=r[1],u=0;u<n.length;u+=2){var c=n.charCodeAt(u)-64,d=n.charCodeAt(u+1)-64;c=c>>1^-(c&1),d=d>>1^-(d&1),c+=s,d+=l,s=c,l=d,o.push([c/a,d/a])}return o}function parseGeoJSON(n,r){return n=decode(n),map$1(filter(n.features,function(a){return a.geometry&&a.properties&&a.geometry.coordinates.length>0}),function(a){var o=a.properties,s=a.geometry,l=[];switch(s.type){case"Polygon":var u=s.coordinates;l.push(new GeoJSONPolygonGeometry(u[0],u.slice(1)));break;case"MultiPolygon":each$f(s.coordinates,function(d){d[0]&&l.push(new GeoJSONPolygonGeometry(d[0],d.slice(1)))});break;case"LineString":l.push(new GeoJSONLineStringGeometry([s.coordinates]));break;case"MultiLineString":l.push(new GeoJSONLineStringGeometry(s.coordinates))}var c=new GeoJSONRegion(o[r||"name"],l,o.cp);return c.properties=o,c})}const number=Object.freeze(Object.defineProperty({__proto__:null,MAX_SAFE_INTEGER,asc:asc$2,getPercentWithPrecision,getPixelPrecision,getPrecision,getPrecisionSafe,isNumeric,isRadianAroundZero,linearMap:linearMap$2,nice,numericToNumber,parseDate,quantile,quantity,quantityExponent,reformIntervals,remRadian,round:round$3},Symbol.toStringTag,{value:"Module"})),time=Object.freeze(Object.defineProperty({__proto__:null,format:format$1,parse:parseDate},Symbol.toStringTag,{value:"Module"})),graphic=Object.freeze(Object.defineProperty({__proto__:null,Arc,BezierCurve,BoundingRect,Circle,CompoundPath,Ellipse,Group:Group$3,Image:ZRImage,IncrementalDisplayable,Line:Line$1,LinearGradient,Polygon,Polyline:Polyline$1,RadialGradient,Rect:Rect$2,Ring,Sector,Text:ZRText,clipPointsByRect,clipRectByRect,createIcon,extendPath,extendShape,getShapeClass,getTransform:getTransform$1,initProps,makeImage,makePath,mergePath,registerShape,resizePath,updateProps:updateProps$1},Symbol.toStringTag,{value:"Module"})),format=Object.freeze(Object.defineProperty({__proto__:null,addCommas,capitalFirst,encodeHTML,formatTime,formatTpl,getTextRect,getTooltipMarker,normalizeCssArray,toCamelCase,truncateText},Symbol.toStringTag,{value:"Module"})),util=Object.freeze(Object.defineProperty({__proto__:null,bind:bind$1,clone:clone$6,curry:curry$1,defaults:defaults$2,each:each$f,extend:extend$2,filter,indexOf,inherits,isArray:isArray$1,isFunction,isObject:isObject$3,isString,map:map$1,merge,reduce},Symbol.toStringTag,{value:"Module"}));var inner$g=makeInner();function tickValuesToNumbers(n,r){var a=map$1(r,function(o){return n.scale.parse(o)});return n.type==="time"&&a.length>0&&(a.sort(),a.unshift(a[0]),a.push(a[a.length-1])),a}function createAxisLabels(n){var r=n.getLabelModel().get("customValues");if(r){var a=makeLabelFormatter(n),o=n.scale.getExtent(),s=tickValuesToNumbers(n,r),l=filter(s,function(u){return u>=o[0]&&u<=o[1]});return{labels:map$1(l,function(u){var c={value:u};return{formattedLabel:a(c),rawLabel:n.scale.getLabel(c),tickValue:u}})}}return n.type==="category"?makeCategoryLabels(n):makeRealNumberLabels(n)}function createAxisTicks(n,r){var a=n.getTickModel().get("customValues");if(a){var o=n.scale.getExtent(),s=tickValuesToNumbers(n,a);return{ticks:filter(s,function(l){return l>=o[0]&&l<=o[1]})}}return n.type==="category"?makeCategoryTicks(n,r):{ticks:map$1(n.scale.getTicks(),function(l){return l.value})}}function makeCategoryLabels(n){var r=n.getLabelModel(),a=makeCategoryLabelsActually(n,r);return!r.get("show")||n.scale.isBlank()?{labels:[],labelCategoryInterval:a.labelCategoryInterval}:a}function makeCategoryLabelsActually(n,r){var a=getListCache(n,"labels"),o=getOptionCategoryInterval(r),s=listCacheGet(a,o);if(s)return s;var l,u;return isFunction(o)?l=makeLabelsByCustomizedCategoryInterval(n,o):(u=o==="auto"?makeAutoCategoryInterval(n):o,l=makeLabelsByNumericCategoryInterval(n,u)),listCacheSet(a,o,{labels:l,labelCategoryInterval:u})}function makeCategoryTicks(n,r){var a=getListCache(n,"ticks"),o=getOptionCategoryInterval(r),s=listCacheGet(a,o);if(s)return s;var l,u;if((!r.get("show")||n.scale.isBlank())&&(l=[]),isFunction(o))l=makeLabelsByCustomizedCategoryInterval(n,o,!0);else if(o==="auto"){var c=makeCategoryLabelsActually(n,n.getLabelModel());u=c.labelCategoryInterval,l=map$1(c.labels,function(d){return d.tickValue})}else u=o,l=makeLabelsByNumericCategoryInterval(n,u,!0);return listCacheSet(a,o,{ticks:l,tickCategoryInterval:u})}function makeRealNumberLabels(n){var r=n.scale.getTicks(),a=makeLabelFormatter(n);return{labels:map$1(r,function(o,s){return{level:o.level,formattedLabel:a(o,s),rawLabel:n.scale.getLabel(o),tickValue:o.value}})}}function getListCache(n,r){return inner$g(n)[r]||(inner$g(n)[r]=[])}function listCacheGet(n,r){for(var a=0;a<n.length;a++)if(n[a].key===r)return n[a].value}function listCacheSet(n,r,a){return n.push({key:r,value:a}),a}function makeAutoCategoryInterval(n){var r=inner$g(n).autoInterval;return r!=null?r:inner$g(n).autoInterval=n.calculateCategoryInterval()}function calculateCategoryInterval(n){var r=fetchAutoCategoryIntervalCalculationParams(n),a=makeLabelFormatter(n),o=(r.axisRotate-r.labelRotate)/180*Math.PI,s=n.scale,l=s.getExtent(),u=s.count();if(l[1]-l[0]<1)return 0;var c=1;u>40&&(c=Math.max(1,Math.floor(u/40)));for(var d=l[0],f=n.dataToCoord(d+1)-n.dataToCoord(d),p=Math.abs(f*Math.cos(o)),v=Math.abs(f*Math.sin(o)),g=0,y=0;d<=l[1];d+=c){var _=0,S=0,b=getBoundingRect(a({value:d}),r.font,"center","top");_=b.width*1.3,S=b.height*1.3,g=Math.max(g,_,7),y=Math.max(y,S,7)}var x=g/p,A=y/v;isNaN(x)&&(x=1/0),isNaN(A)&&(A=1/0);var w=Math.max(0,Math.floor(Math.min(x,A))),E=inner$g(n.model),D=n.getExtent(),C=E.lastAutoInterval,$=E.lastTickCount;return C!=null&&$!=null&&Math.abs(C-w)<=1&&Math.abs($-u)<=1&&C>w&&E.axisExtent0===D[0]&&E.axisExtent1===D[1]?w=C:(E.lastTickCount=u,E.lastAutoInterval=w,E.axisExtent0=D[0],E.axisExtent1=D[1]),w}function fetchAutoCategoryIntervalCalculationParams(n){var r=n.getLabelModel();return{axisRotate:n.getRotate?n.getRotate():n.isHorizontal&&!n.isHorizontal()?90:0,labelRotate:r.get("rotate")||0,font:r.getFont()}}function makeLabelsByNumericCategoryInterval(n,r,a){var o=makeLabelFormatter(n),s=n.scale,l=s.getExtent(),u=n.getLabelModel(),c=[],d=Math.max((r||0)+1,1),f=l[0],p=s.count();f!==0&&d>1&&p/d>2&&(f=Math.round(Math.ceil(f/d)*d));var v=shouldShowAllLabels(n),g=u.get("showMinLabel")||v,y=u.get("showMaxLabel")||v;g&&f!==l[0]&&S(l[0]);for(var _=f;_<=l[1];_+=d)S(_);y&&_-d!==l[1]&&S(l[1]);function S(b){var x={value:b};c.push(a?b:{formattedLabel:o(x),rawLabel:s.getLabel(x),tickValue:b})}return c}function makeLabelsByCustomizedCategoryInterval(n,r,a){var o=n.scale,s=makeLabelFormatter(n),l=[];return each$f(o.getTicks(),function(u){var c=o.getLabel(u),d=u.value;r(u.value,c)&&l.push(a?d:{formattedLabel:s(u),rawLabel:c,tickValue:d})}),l}var NORMALIZED_EXTENT=[0,1],Axis=function(){function n(r,a,o){this.onBand=!1,this.inverse=!1,this.dim=r,this.scale=a,this._extent=o||[0,0]}return n.prototype.contain=function(r){var a=this._extent,o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);return r>=o&&r<=s},n.prototype.containData=function(r){return this.scale.contain(r)},n.prototype.getExtent=function(){return this._extent.slice()},n.prototype.getPixelPrecision=function(r){return getPixelPrecision(r||this.scale.getExtent(),this._extent)},n.prototype.setExtent=function(r,a){var o=this._extent;o[0]=r,o[1]=a},n.prototype.dataToCoord=function(r,a){var o=this._extent,s=this.scale;return r=s.normalize(r),this.onBand&&s.type==="ordinal"&&(o=o.slice(),fixExtentWithBands(o,s.count())),linearMap$2(r,NORMALIZED_EXTENT,o,a)},n.prototype.coordToData=function(r,a){var o=this._extent,s=this.scale;this.onBand&&s.type==="ordinal"&&(o=o.slice(),fixExtentWithBands(o,s.count()));var l=linearMap$2(r,o,NORMALIZED_EXTENT,a);return this.scale.scale(l)},n.prototype.pointToData=function(r,a){},n.prototype.getTicksCoords=function(r){r=r||{};var a=r.tickModel||this.getTickModel(),o=createAxisTicks(this,a),s=o.ticks,l=map$1(s,function(c){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(c):c),tickValue:c}},this),u=a.get("alignWithLabel");return fixOnBandTicksCoords(this,l,u,r.clamp),l},n.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var r=this.model.getModel("minorTick"),a=r.get("splitNumber");a>0&&a<100||(a=5);var o=this.scale.getMinorTicks(a),s=map$1(o,function(l){return map$1(l,function(u){return{coord:this.dataToCoord(u),tickValue:u}},this)},this);return s},n.prototype.getViewLabels=function(){return createAxisLabels(this).labels},n.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},n.prototype.getTickModel=function(){return this.model.getModel("axisTick")},n.prototype.getBandWidth=function(){var r=this._extent,a=this.scale.getExtent(),o=a[1]-a[0]+(this.onBand?1:0);o===0&&(o=1);var s=Math.abs(r[1]-r[0]);return Math.abs(s)/o},n.prototype.calculateCategoryInterval=function(){return calculateCategoryInterval(this)},n}();function fixExtentWithBands(n,r){var a=n[1]-n[0],o=r,s=a/o/2;n[0]+=s,n[1]-=s}function fixOnBandTicksCoords(n,r,a,o){var s=r.length;if(!n.onBand||a||!s)return;var l=n.getExtent(),u,c;if(s===1)r[0].coord=l[0],u=r[1]={coord:l[1],tickValue:r[0].tickValue};else{var d=r[s-1].tickValue-r[0].tickValue,f=(r[s-1].coord-r[0].coord)/d;each$f(r,function(y){y.coord-=f/2});var p=n.scale.getExtent();c=1+p[1]-r[s-1].tickValue,u={coord:r[s-1].coord+f*c,tickValue:p[1]+1},r.push(u)}var v=l[0]>l[1];g(r[0].coord,l[0])&&(o?r[0].coord=l[0]:r.shift()),o&&g(l[0],r[0].coord)&&r.unshift({coord:l[0]}),g(l[1],u.coord)&&(o?u.coord=l[1]:r.pop()),o&&g(u.coord,l[1])&&r.push({coord:l[1]});function g(y,_){return y=round$3(y),_=round$3(_),v?y>_:y<_}}function extendComponentModel(n){var r=ComponentModel.extend(n);return ComponentModel.registerClass(r),r}function extendComponentView(n){var r=ComponentView.extend(n);return ComponentView.registerClass(r),r}function extendSeriesModel(n){var r=SeriesModel.extend(n);return SeriesModel.registerClass(r),r}function extendChartView(n){var r=ChartView.extend(n);return ChartView.registerClass(r),r}var PI2$2=Math.PI*2,CMD$1=PathProxy.CMD,DEFAULT_SEARCH_SPACE=["top","right","bottom","left"];function getCandidateAnchor(n,r,a,o,s){var l=a.width,u=a.height;switch(n){case"top":o.set(a.x+l/2,a.y-r),s.set(0,-1);break;case"bottom":o.set(a.x+l/2,a.y+u+r),s.set(0,1);break;case"left":o.set(a.x-r,a.y+u/2),s.set(-1,0);break;case"right":o.set(a.x+l+r,a.y+u/2),s.set(1,0);break}}function projectPointToArc(n,r,a,o,s,l,u,c,d){u-=n,c-=r;var f=Math.sqrt(u*u+c*c);u/=f,c/=f;var p=u*a+n,v=c*a+r;if(Math.abs(o-s)%PI2$2<1e-4)return d[0]=p,d[1]=v,f-a;if(l){var g=o;o=normalizeRadian(s),s=normalizeRadian(g)}else o=normalizeRadian(o),s=normalizeRadian(s);o>s&&(s+=PI2$2);var y=Math.atan2(c,u);if(y<0&&(y+=PI2$2),y>=o&&y<=s||y+PI2$2>=o&&y+PI2$2<=s)return d[0]=p,d[1]=v,f-a;var _=a*Math.cos(o)+n,S=a*Math.sin(o)+r,b=a*Math.cos(s)+n,x=a*Math.sin(s)+r,A=(_-u)*(_-u)+(S-c)*(S-c),w=(b-u)*(b-u)+(x-c)*(x-c);return A<w?(d[0]=_,d[1]=S,Math.sqrt(A)):(d[0]=b,d[1]=x,Math.sqrt(w))}function projectPointToLine(n,r,a,o,s,l,u,c){var d=s-n,f=l-r,p=a-n,v=o-r,g=Math.sqrt(p*p+v*v);p/=g,v/=g;var y=d*p+f*v,_=y/g;c&&(_=Math.min(Math.max(_,0),1)),_*=g;var S=u[0]=n+_*p,b=u[1]=r+_*v;return Math.sqrt((S-s)*(S-s)+(b-l)*(b-l))}function projectPointToRect(n,r,a,o,s,l,u){a<0&&(n=n+a,a=-a),o<0&&(r=r+o,o=-o);var c=n+a,d=r+o,f=u[0]=Math.min(Math.max(s,n),c),p=u[1]=Math.min(Math.max(l,r),d);return Math.sqrt((f-s)*(f-s)+(p-l)*(p-l))}var tmpPt=[];function nearestPointOnRect(n,r,a){var o=projectPointToRect(r.x,r.y,r.width,r.height,n.x,n.y,tmpPt);return a.set(tmpPt[0],tmpPt[1]),o}function nearestPointOnPath(n,r,a){for(var o=0,s=0,l=0,u=0,c,d,f=1/0,p=r.data,v=n.x,g=n.y,y=0;y<p.length;){var _=p[y++];y===1&&(o=p[y],s=p[y+1],l=o,u=s);var S=f;switch(_){case CMD$1.M:l=p[y++],u=p[y++],o=l,s=u;break;case CMD$1.L:S=projectPointToLine(o,s,p[y],p[y+1],v,g,tmpPt,!0),o=p[y++],s=p[y++];break;case CMD$1.C:S=cubicProjectPoint(o,s,p[y++],p[y++],p[y++],p[y++],p[y],p[y+1],v,g,tmpPt),o=p[y++],s=p[y++];break;case CMD$1.Q:S=quadraticProjectPoint(o,s,p[y++],p[y++],p[y],p[y+1],v,g,tmpPt),o=p[y++],s=p[y++];break;case CMD$1.A:var b=p[y++],x=p[y++],A=p[y++],w=p[y++],E=p[y++],D=p[y++];y+=1;var C=!!(1-p[y++]);c=Math.cos(E)*A+b,d=Math.sin(E)*w+x,y<=1&&(l=c,u=d);var $=(v-b)*w/A+b;S=projectPointToArc(b,x,w,E,E+D,C,$,g,tmpPt),o=Math.cos(E+D)*A+b,s=Math.sin(E+D)*w+x;break;case CMD$1.R:l=o=p[y++],u=s=p[y++];var P=p[y++],M=p[y++];S=projectPointToRect(l,u,P,M,v,g,tmpPt);break;case CMD$1.Z:S=projectPointToLine(o,s,l,u,v,g,tmpPt,!0),o=l,s=u;break}S<f&&(f=S,a.set(tmpPt[0],tmpPt[1]))}return f}var pt0=new Point,pt1=new Point,pt2=new Point,dir=new Point,dir2=new Point;function updateLabelLinePoints(n,r){if(n){var a=n.getTextGuideLine(),o=n.getTextContent();if(o&&a){var s=n.textGuideLineConfig||{},l=[[0,0],[0,0],[0,0]],u=s.candidates||DEFAULT_SEARCH_SPACE,c=o.getBoundingRect().clone();c.applyTransform(o.getComputedTransform());var d=1/0,f=s.anchor,p=n.getComputedTransform(),v=p&&invert([],p),g=r.get("length2")||0;f&&pt2.copy(f);for(var y=0;y<u.length;y++){var _=u[y];getCandidateAnchor(_,0,c,pt0,dir),Point.scaleAndAdd(pt1,pt0,dir,g),pt1.transform(v);var S=n.getBoundingRect(),b=f?f.distance(pt1):n instanceof Path?nearestPointOnPath(pt1,n.path,pt2):nearestPointOnRect(pt1,S,pt2);b<d&&(d=b,pt1.transform(p),pt2.transform(p),pt2.toArray(l[0]),pt1.toArray(l[1]),pt0.toArray(l[2]))}limitTurnAngle(l,r.get("minTurnAngle")),a.setShape({points:l})}}}var tmpArr=[],tmpProjPoint=new Point;function limitTurnAngle(n,r){if(r<=180&&r>0){r=r/180*Math.PI,pt0.fromArray(n[0]),pt1.fromArray(n[1]),pt2.fromArray(n[2]),Point.sub(dir,pt0,pt1),Point.sub(dir2,pt2,pt1);var a=dir.len(),o=dir2.len();if(!(a<.001||o<.001)){dir.scale(1/a),dir2.scale(1/o);var s=dir.dot(dir2),l=Math.cos(r);if(l<s){var u=projectPointToLine(pt1.x,pt1.y,pt2.x,pt2.y,pt0.x,pt0.y,tmpArr,!1);tmpProjPoint.fromArray(tmpArr),tmpProjPoint.scaleAndAdd(dir2,u/Math.tan(Math.PI-r));var c=pt2.x!==pt1.x?(tmpProjPoint.x-pt1.x)/(pt2.x-pt1.x):(tmpProjPoint.y-pt1.y)/(pt2.y-pt1.y);if(isNaN(c))return;c<0?Point.copy(tmpProjPoint,pt1):c>1&&Point.copy(tmpProjPoint,pt2),tmpProjPoint.toArray(n[1])}}}}function limitSurfaceAngle(n,r,a){if(a<=180&&a>0){a=a/180*Math.PI,pt0.fromArray(n[0]),pt1.fromArray(n[1]),pt2.fromArray(n[2]),Point.sub(dir,pt1,pt0),Point.sub(dir2,pt2,pt1);var o=dir.len(),s=dir2.len();if(!(o<.001||s<.001)){dir.scale(1/o),dir2.scale(1/s);var l=dir.dot(r),u=Math.cos(a);if(l<u){var c=projectPointToLine(pt1.x,pt1.y,pt2.x,pt2.y,pt0.x,pt0.y,tmpArr,!1);tmpProjPoint.fromArray(tmpArr);var d=Math.PI/2,f=Math.acos(dir2.dot(r)),p=d+f-a;if(p>=d)Point.copy(tmpProjPoint,pt2);else{tmpProjPoint.scaleAndAdd(dir2,c/Math.tan(Math.PI/2-p));var v=pt2.x!==pt1.x?(tmpProjPoint.x-pt1.x)/(pt2.x-pt1.x):(tmpProjPoint.y-pt1.y)/(pt2.y-pt1.y);if(isNaN(v))return;v<0?Point.copy(tmpProjPoint,pt1):v>1&&Point.copy(tmpProjPoint,pt2)}tmpProjPoint.toArray(n[1])}}}}function setLabelLineState(n,r,a,o){var s=a==="normal",l=s?n:n.ensureState(a);l.ignore=r;var u=o.get("smooth");u&&u===!0&&(u=.3),l.shape=l.shape||{},u>0&&(l.shape.smooth=u);var c=o.getModel("lineStyle").getLineStyle();s?n.useStyle(c):l.style=c}function buildLabelLinePath(n,r){var a=r.smooth,o=r.points;if(o)if(n.moveTo(o[0][0],o[0][1]),a>0&&o.length>=3){var s=dist$1(o[0],o[1]),l=dist$1(o[1],o[2]);if(!s||!l){n.lineTo(o[1][0],o[1][1]),n.lineTo(o[2][0],o[2][1]);return}var u=Math.min(s,l)*a,c=lerp$1([],o[1],o[0],u/s),d=lerp$1([],o[1],o[2],u/l),f=lerp$1([],c,d,.5);n.bezierCurveTo(c[0],c[1],c[0],c[1],f[0],f[1]),n.bezierCurveTo(d[0],d[1],d[0],d[1],o[2][0],o[2][1])}else for(var p=1;p<o.length;p++)n.lineTo(o[p][0],o[p][1])}function setLabelLineStyle(n,r,a){var o=n.getTextGuideLine(),s=n.getTextContent();if(!s){o&&n.removeTextGuideLine();return}for(var l=r.normal,u=l.get("show"),c=s.ignore,d=0;d<DISPLAY_STATES.length;d++){var f=DISPLAY_STATES[d],p=r[f],v=f==="normal";if(p){var g=p.get("show"),y=v?c:retrieve2(s.states[f]&&s.states[f].ignore,c);if(y||!retrieve2(g,u)){var _=v?o:o&&o.states[f];_&&(_.ignore=!0),o&&setLabelLineState(o,!0,f,p);continue}o||(o=new Polyline$1,n.setTextGuideLine(o),!v&&(c||!u)&&setLabelLineState(o,!0,"normal",r.normal),n.stateProxy&&(o.stateProxy=n.stateProxy)),setLabelLineState(o,!1,f,p)}}if(o){defaults$2(o.style,a),o.style.fill=null;var S=l.get("showAbove"),b=n.textGuideLineConfig=n.textGuideLineConfig||{};b.showAbove=S||!1,o.buildPath=buildLabelLinePath}}function getLabelLineStatesModels(n,r){r=r||"labelLine";for(var a={normal:n.getModel(r)},o=0;o<SPECIAL_STATES.length;o++){var s=SPECIAL_STATES[o];a[s]=n.getModel([s,r])}return a}function prepareLayoutList(n){for(var r=[],a=0;a<n.length;a++){var o=n[a];if(!o.defaultAttr.ignore){var s=o.label,l=s.getComputedTransform(),u=s.getBoundingRect(),c=!l||l[1]<1e-5&&l[2]<1e-5,d=s.style.margin||0,f=u.clone();f.applyTransform(l),f.x-=d/2,f.y-=d/2,f.width+=d,f.height+=d;var p=c?new OrientedBoundingRect(u,l):null;r.push({label:s,labelLine:o.labelLine,rect:f,localRect:u,obb:p,priority:o.priority,defaultAttr:o.defaultAttr,layoutOption:o.computedLayoutOption,axisAligned:c,transform:l})}}return r}function shiftLayout(n,r,a,o,s,l){var u=n.length;if(u<2)return;n.sort(function(P,M){return P.rect[r]-M.rect[r]});for(var c=0,d,f=!1,p=0,v=0;v<u;v++){var g=n[v],y=g.rect;d=y[r]-c,d<0&&(y[r]-=d,g.label[r]-=d,f=!0);var _=Math.max(-d,0);p+=_,c=y[r]+y[a]}p>0&&l&&D(-p/u,0,u);var S=n[0],b=n[u-1],x,A;w(),x<0&&C(-x,.8),A<0&&C(A,.8),w(),E(x,A,1),E(A,x,-1),w(),x<0&&$(-x),A<0&&$(A);function w(){x=S.rect[r]-o,A=s-b.rect[r]-b.rect[a]}function E(P,M,I){if(P<0){var L=Math.min(M,-P);if(L>0){D(L*I,0,u);var O=L+P;O<0&&C(-O*I,1)}else C(-P*I,1)}}function D(P,M,I){P!==0&&(f=!0);for(var L=M;L<I;L++){var O=n[L],R=O.rect;R[r]+=P,O.label[r]+=P}}function C(P,M){for(var I=[],L=0,O=1;O<u;O++){var R=n[O-1].rect,N=Math.max(n[O].rect[r]-R[r]-R[a],0);I.push(N),L+=N}if(L){var V=Math.min(Math.abs(P)/L,M);if(P>0)for(var O=0;O<u-1;O++){var F=I[O]*V;D(F,0,O+1)}else for(var O=u-1;O>0;O--){var F=I[O-1]*V;D(-F,O,u)}}}function $(P){var M=P<0?-1:1;P=Math.abs(P);for(var I=Math.ceil(P/(u-1)),L=0;L<u-1;L++)if(M>0?D(I,0,L+1):D(-I,u-L-1,u),P-=I,P<=0)return}return f}function shiftLayoutOnX(n,r,a,o){return shiftLayout(n,"x","width",r,a,o)}function shiftLayoutOnY(n,r,a,o){return shiftLayout(n,"y","height",r,a,o)}function hideOverlap(n){var r=[];n.sort(function(S,b){return b.priority-S.priority});var a=new BoundingRect(0,0,0,0);function o(S){if(!S.ignore){var b=S.ensureState("emphasis");b.ignore==null&&(b.ignore=!1)}S.ignore=!0}for(var s=0;s<n.length;s++){var l=n[s],u=l.axisAligned,c=l.localRect,d=l.transform,f=l.label,p=l.labelLine;a.copy(l.rect),a.width-=.1,a.height-=.1,a.x+=.05,a.y+=.05;for(var v=l.obb,g=!1,y=0;y<r.length;y++){var _=r[y];if(a.intersect(_.rect)){if(u&&_.axisAligned){g=!0;break}if(_.obb||(_.obb=new OrientedBoundingRect(_.localRect,_.transform)),v||(v=new OrientedBoundingRect(c,d)),v.intersect(_.obb)){g=!0;break}}}g?(o(f),p&&o(p)):(f.attr("ignore",l.defaultAttr.ignore),p&&p.attr("ignore",l.defaultAttr.labelGuideIgnore),r.push(l))}}function cloneArr(n){if(n){for(var r=[],a=0;a<n.length;a++)r.push(n[a].slice());return r}}function prepareLayoutCallbackParams(n,r){var a=n.label,o=r&&r.getTextGuideLine();return{dataIndex:n.dataIndex,dataType:n.dataType,seriesIndex:n.seriesModel.seriesIndex,text:n.label.style.text,rect:n.hostRect,labelRect:n.rect,align:a.style.align,verticalAlign:a.style.verticalAlign,labelLinePoints:cloneArr(o&&o.shape.points)}}var LABEL_OPTION_TO_STYLE_KEYS=["align","verticalAlign","width","height","fontSize"],dummyTransformable=new Transformable,labelLayoutInnerStore=makeInner(),labelLineAnimationStore=makeInner();function extendWithKeys(n,r,a){for(var o=0;o<a.length;o++){var s=a[o];r[s]!=null&&(n[s]=r[s])}}var LABEL_LAYOUT_PROPS=["x","y","rotation"],LabelManager=function(){function n(){this._labelList=[],this._chartViewList=[]}return n.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},n.prototype._addLabel=function(r,a,o,s,l){var u=s.style,c=s.__hostTarget,d=c.textConfig||{},f=s.getComputedTransform(),p=s.getBoundingRect().plain();BoundingRect.applyTransform(p,p,f),f?dummyTransformable.setLocalTransform(f):(dummyTransformable.x=dummyTransformable.y=dummyTransformable.rotation=dummyTransformable.originX=dummyTransformable.originY=0,dummyTransformable.scaleX=dummyTransformable.scaleY=1),dummyTransformable.rotation=normalizeRadian(dummyTransformable.rotation);var v=s.__hostTarget,g;if(v){g=v.getBoundingRect().plain();var y=v.getComputedTransform();BoundingRect.applyTransform(g,g,y)}var _=g&&v.getTextGuideLine();this._labelList.push({label:s,labelLine:_,seriesModel:o,dataIndex:r,dataType:a,layoutOption:l,computedLayoutOption:null,rect:p,hostRect:g,priority:g?g.width*g.height:0,defaultAttr:{ignore:s.ignore,labelGuideIgnore:_&&_.ignore,x:dummyTransformable.x,y:dummyTransformable.y,scaleX:dummyTransformable.scaleX,scaleY:dummyTransformable.scaleY,rotation:dummyTransformable.rotation,style:{x:u.x,y:u.y,align:u.align,verticalAlign:u.verticalAlign,width:u.width,height:u.height,fontSize:u.fontSize},cursor:s.cursor,attachedPos:d.position,attachedRot:d.rotation}})},n.prototype.addLabelsOfSeries=function(r){var a=this;this._chartViewList.push(r);var o=r.__model,s=o.get("labelLayout");(isFunction(s)||keys(s).length)&&r.group.traverse(function(l){if(l.ignore)return!0;var u=l.getTextContent(),c=getECData(l);u&&!u.disableLabelLayout&&a._addLabel(c.dataIndex,c.dataType,o,u,s)})},n.prototype.updateLayoutConfig=function(r){var a=r.getWidth(),o=r.getHeight();function s(w,E){return function(){updateLabelLinePoints(w,E)}}for(var l=0;l<this._labelList.length;l++){var u=this._labelList[l],c=u.label,d=c.__hostTarget,f=u.defaultAttr,p=void 0;isFunction(u.layoutOption)?p=u.layoutOption(prepareLayoutCallbackParams(u,d)):p=u.layoutOption,p=p||{},u.computedLayoutOption=p;var v=Math.PI/180;d&&d.setTextConfig({local:!1,position:p.x!=null||p.y!=null?null:f.attachedPos,rotation:p.rotate!=null?p.rotate*v:f.attachedRot,offset:[p.dx||0,p.dy||0]});var g=!1;if(p.x!=null?(c.x=parsePercent(p.x,a),c.setStyle("x",0),g=!0):(c.x=f.x,c.setStyle("x",f.style.x)),p.y!=null?(c.y=parsePercent(p.y,o),c.setStyle("y",0),g=!0):(c.y=f.y,c.setStyle("y",f.style.y)),p.labelLinePoints){var y=d.getTextGuideLine();y&&(y.setShape({points:p.labelLinePoints}),g=!1)}var _=labelLayoutInnerStore(c);_.needsUpdateLabelLine=g,c.rotation=p.rotate!=null?p.rotate*v:f.rotation,c.scaleX=f.scaleX,c.scaleY=f.scaleY;for(var S=0;S<LABEL_OPTION_TO_STYLE_KEYS.length;S++){var b=LABEL_OPTION_TO_STYLE_KEYS[S];c.setStyle(b,p[b]!=null?p[b]:f.style[b])}if(p.draggable){if(c.draggable=!0,c.cursor="move",d){var x=u.seriesModel;if(u.dataIndex!=null){var A=u.seriesModel.getData(u.dataType);x=A.getItemModel(u.dataIndex)}c.on("drag",s(d,x.getModel("labelLine")))}}else c.off("drag"),c.cursor=f.cursor}},n.prototype.layout=function(r){var a=r.getWidth(),o=r.getHeight(),s=prepareLayoutList(this._labelList),l=filter(s,function(d){return d.layoutOption.moveOverlap==="shiftX"}),u=filter(s,function(d){return d.layoutOption.moveOverlap==="shiftY"});shiftLayoutOnX(l,0,a),shiftLayoutOnY(u,0,o);var c=filter(s,function(d){return d.layoutOption.hideOverlap});hideOverlap(c)},n.prototype.processLabelsOverall=function(){var r=this;each$f(this._chartViewList,function(a){var o=a.__model,s=a.ignoreLabelLineUpdate,l=o.isAnimationEnabled();a.group.traverse(function(u){if(u.ignore&&!u.forceLabelAnimation)return!0;var c=!s,d=u.getTextContent();!c&&d&&(c=labelLayoutInnerStore(d).needsUpdateLabelLine),c&&r._updateLabelLine(u,o),l&&r._animateLabels(u,o)})})},n.prototype._updateLabelLine=function(r,a){var o=r.getTextContent(),s=getECData(r),l=s.dataIndex;if(o&&l!=null){var u=a.getData(s.dataType),c=u.getItemModel(l),d={},f=u.getItemVisual(l,"style");if(f){var p=u.getVisual("drawType");d.stroke=f[p]}var v=c.getModel("labelLine");setLabelLineStyle(r,getLabelLineStatesModels(c),d),updateLabelLinePoints(r,v)}},n.prototype._animateLabels=function(r,a){var o=r.getTextContent(),s=r.getTextGuideLine();if(o&&(r.forceLabelAnimation||!o.ignore&&!o.invisible&&!r.disableLabelAnimation&&!isElementRemoved(r))){var l=labelLayoutInnerStore(o),u=l.oldLayout,c=getECData(r),d=c.dataIndex,f={x:o.x,y:o.y,rotation:o.rotation},p=a.getData(c.dataType);if(u){o.attr(u);var g=r.prevStates;g&&(indexOf(g,"select")>=0&&o.attr(l.oldLayoutSelect),indexOf(g,"emphasis")>=0&&o.attr(l.oldLayoutEmphasis)),updateProps$1(o,f,a,d)}else if(o.attr(f),!labelInner(o).valueAnimation){var v=retrieve2(o.style.opacity,1);o.style.opacity=0,initProps(o,{style:{opacity:v}},a,d)}if(l.oldLayout=f,o.states.select){var y=l.oldLayoutSelect={};extendWithKeys(y,f,LABEL_LAYOUT_PROPS),extendWithKeys(y,o.states.select,LABEL_LAYOUT_PROPS)}if(o.states.emphasis){var _=l.oldLayoutEmphasis={};extendWithKeys(_,f,LABEL_LAYOUT_PROPS),extendWithKeys(_,o.states.emphasis,LABEL_LAYOUT_PROPS)}animateLabelValue(o,d,p,a,a)}if(s&&!s.ignore&&!s.invisible){var l=labelLineAnimationStore(s),u=l.oldLayout,S={points:s.shape.points};u?(s.attr({shape:u}),updateProps$1(s,{shape:S},a)):(s.setShape(S),s.style.strokePercent=0,initProps(s,{style:{strokePercent:1}},a)),l.oldLayout=S}},n}(),getLabelManager=makeInner();function installLabelLayout(n){n.registerUpdateLifecycle("series:beforeupdate",function(r,a,o){var s=getLabelManager(a).labelManager;s||(s=getLabelManager(a).labelManager=new LabelManager),s.clearLabels()}),n.registerUpdateLifecycle("series:layoutlabels",function(r,a,o){var s=getLabelManager(a).labelManager;o.updatedSeries.forEach(function(l){s.addLabelsOfSeries(a.getViewOfSeriesModel(l))}),s.updateLayoutConfig(a),s.layout(a),s.processLabelsOverall()})}var LineSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.hasSymbolVisual=!0,a}return r.prototype.getInitialData=function(a){return createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.getLegendIcon=function(a){var o=new Group$3,s=createSymbol$1("line",0,a.itemHeight/2,a.itemWidth,0,a.lineStyle.stroke,!1);o.add(s),s.setStyle(a.lineStyle);var l=this.getData().getVisual("symbol"),u=this.getData().getVisual("symbolRotate"),c=l==="none"?"circle":l,d=a.itemHeight*.8,f=createSymbol$1(c,(a.itemWidth-d)/2,(a.itemHeight-d)/2,d,d,a.itemStyle.fill);o.add(f),f.setStyle(a.itemStyle);var p=a.iconRotate==="inherit"?u:a.iconRotate||0;return f.rotation=p*Math.PI/180,f.setOrigin([a.itemWidth/2,a.itemHeight/2]),c.indexOf("empty")>-1&&(f.style.stroke=f.style.fill,f.style.fill="#fff",f.style.lineWidth=2),o},r.type="series.line",r.dependencies=["grid","polar"],r.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:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},r}(SeriesModel);function getDefaultLabel(n,r){var a=n.mapDimensionsAll("defaultedLabel"),o=a.length;if(o===1){var s=retrieveRawValue(n,r,a[0]);return s!=null?s+"":null}else if(o){for(var l=[],u=0;u<a.length;u++)l.push(retrieveRawValue(n,r,a[u]));return l.join(" ")}}function getDefaultInterpolatedLabel(n,r){var a=n.mapDimensionsAll("defaultedLabel");if(!isArray$1(r))return r+"";for(var o=[],s=0;s<a.length;s++){var l=n.getDimensionIndex(a[s]);l>=0&&o.push(r[l])}return o.join(" ")}var Symbol$1=function(n){__extends(r,n);function r(a,o,s,l){var u=n.call(this)||this;return u.updateData(a,o,s,l),u}return r.prototype._createSymbol=function(a,o,s,l,u){this.removeAll();var c=createSymbol$1(a,-1,-1,2,2,null,u);c.attr({z2:100,culling:!0,scaleX:l[0]/2,scaleY:l[1]/2}),c.drift=driftSymbol,this._symbolType=a,this.add(c)},r.prototype.stopSymbolAnimation=function(a){this.childAt(0).stopAnimation(null,a)},r.prototype.getSymbolType=function(){return this._symbolType},r.prototype.getSymbolPath=function(){return this.childAt(0)},r.prototype.highlight=function(){enterEmphasis(this.childAt(0))},r.prototype.downplay=function(){leaveEmphasis(this.childAt(0))},r.prototype.setZ=function(a,o){var s=this.childAt(0);s.zlevel=a,s.z=o},r.prototype.setDraggable=function(a,o){var s=this.childAt(0);s.draggable=a,s.cursor=!o&&a?"move":s.cursor},r.prototype.updateData=function(a,o,s,l){this.silent=!1;var u=a.getItemVisual(o,"symbol")||"circle",c=a.hostModel,d=r.getSymbolSize(a,o),f=u!==this._symbolType,p=l&&l.disableAnimation;if(f){var v=a.getItemVisual(o,"symbolKeepAspect");this._createSymbol(u,a,o,d,v)}else{var g=this.childAt(0);g.silent=!1;var y={scaleX:d[0]/2,scaleY:d[1]/2};p?g.attr(y):updateProps$1(g,y,c,o),saveOldStyle(g)}if(this._updateCommon(a,o,d,s,l),f){var g=this.childAt(0);if(!p){var y={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:g.style.opacity}};g.scaleX=g.scaleY=0,g.style.opacity=0,initProps(g,y,c,o)}}p&&this.childAt(0).stopAnimation("leave")},r.prototype._updateCommon=function(a,o,s,l,u){var c=this.childAt(0),d=a.hostModel,f,p,v,g,y,_,S,b,x;if(l&&(f=l.emphasisItemStyle,p=l.blurItemStyle,v=l.selectItemStyle,g=l.focus,y=l.blurScope,S=l.labelStatesModels,b=l.hoverScale,x=l.cursorStyle,_=l.emphasisDisabled),!l||a.hasItemOption){var A=l&&l.itemModel?l.itemModel:a.getItemModel(o),w=A.getModel("emphasis");f=w.getModel("itemStyle").getItemStyle(),v=A.getModel(["select","itemStyle"]).getItemStyle(),p=A.getModel(["blur","itemStyle"]).getItemStyle(),g=w.get("focus"),y=w.get("blurScope"),_=w.get("disabled"),S=getLabelStatesModels(A),b=w.getShallow("scale"),x=A.getShallow("cursor")}var E=a.getItemVisual(o,"symbolRotate");c.attr("rotation",(E||0)*Math.PI/180||0);var D=normalizeSymbolOffset(a.getItemVisual(o,"symbolOffset"),s);D&&(c.x=D[0],c.y=D[1]),x&&c.attr("cursor",x);var C=a.getItemVisual(o,"style"),$=C.fill;if(c instanceof ZRImage){var P=c.style;c.useStyle(extend$2({image:P.image,x:P.x,y:P.y,width:P.width,height:P.height},C))}else c.__isEmptyBrush?c.useStyle(extend$2({},C)):c.useStyle(C),c.style.decal=null,c.setColor($,u&&u.symbolInnerColor),c.style.strokeNoScale=!0;var M=a.getItemVisual(o,"liftZ"),I=this._z2;M!=null?I==null&&(this._z2=c.z2,c.z2+=M):I!=null&&(c.z2=I,this._z2=null);var L=u&&u.useNameLabel;setLabelStyle(c,S,{labelFetcher:d,labelDataIndex:o,defaultText:O,inheritColor:$,defaultOpacity:C.opacity});function O(V){return L?a.getName(V):getDefaultLabel(a,V)}this._sizeX=s[0]/2,this._sizeY=s[1]/2;var R=c.ensureState("emphasis");R.style=f,c.ensureState("select").style=v,c.ensureState("blur").style=p;var N=b==null||b===!0?Math.max(1.1,3/this._sizeY):isFinite(b)&&b>0?+b:1;R.scaleX=this._sizeX*N,R.scaleY=this._sizeY*N,this.setSymbolScale(1),toggleHoverEmphasis(this,g,y,_)},r.prototype.setSymbolScale=function(a){this.scaleX=this.scaleY=a},r.prototype.fadeOut=function(a,o,s){var l=this.childAt(0),u=getECData(this).dataIndex,c=s&&s.animation;if(this.silent=l.silent=!0,s&&s.fadeLabel){var d=l.getTextContent();d&&removeElement(d,{style:{opacity:0}},o,{dataIndex:u,removeOpt:c,cb:function(){l.removeTextContent()}})}else l.removeTextContent();removeElement(l,{style:{opacity:0},scaleX:0,scaleY:0},o,{dataIndex:u,cb:a,removeOpt:c})},r.getSymbolSize=function(a,o){return normalizeSymbolSize(a.getItemVisual(o,"symbolSize"))},r}(Group$3);function driftSymbol(n,r){this.parent.drift(n,r)}function symbolNeedsDraw$1(n,r,a,o){return r&&!isNaN(r[0])&&!isNaN(r[1])&&!(o.isIgnore&&o.isIgnore(a))&&!(o.clipShape&&!o.clipShape.contain(r[0],r[1]))&&n.getItemVisual(a,"symbol")!=="none"}function normalizeUpdateOpt(n){return n!=null&&!isObject$3(n)&&(n={isIgnore:n}),n||{}}function makeSeriesScope$2(n){var r=n.hostModel,a=r.getModel("emphasis");return{emphasisItemStyle:a.getModel("itemStyle").getItemStyle(),blurItemStyle:r.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:r.getModel(["select","itemStyle"]).getItemStyle(),focus:a.get("focus"),blurScope:a.get("blurScope"),emphasisDisabled:a.get("disabled"),hoverScale:a.get("scale"),labelStatesModels:getLabelStatesModels(r),cursorStyle:r.get("cursor")}}var SymbolDraw=function(){function n(r){this.group=new Group$3,this._SymbolCtor=r||Symbol$1}return n.prototype.updateData=function(r,a){this._progressiveEls=null,a=normalizeUpdateOpt(a);var o=this.group,s=r.hostModel,l=this._data,u=this._SymbolCtor,c=a.disableAnimation,d=makeSeriesScope$2(r),f={disableAnimation:c},p=a.getSymbolPoint||function(v){return r.getItemLayout(v)};l||o.removeAll(),r.diff(l).add(function(v){var g=p(v);if(symbolNeedsDraw$1(r,g,v,a)){var y=new u(r,v,d,f);y.setPosition(g),r.setItemGraphicEl(v,y),o.add(y)}}).update(function(v,g){var y=l.getItemGraphicEl(g),_=p(v);if(!symbolNeedsDraw$1(r,_,v,a)){o.remove(y);return}var S=r.getItemVisual(v,"symbol")||"circle",b=y&&y.getSymbolType&&y.getSymbolType();if(!y||b&&b!==S)o.remove(y),y=new u(r,v,d,f),y.setPosition(_);else{y.updateData(r,v,d,f);var x={x:_[0],y:_[1]};c?y.attr(x):updateProps$1(y,x,s)}o.add(y),r.setItemGraphicEl(v,y)}).remove(function(v){var g=l.getItemGraphicEl(v);g&&g.fadeOut(function(){o.remove(g)},s)}).execute(),this._getSymbolPoint=p,this._data=r},n.prototype.updateLayout=function(){var r=this,a=this._data;a&&a.eachItemGraphicEl(function(o,s){var l=r._getSymbolPoint(s);o.setPosition(l),o.markRedraw()})},n.prototype.incrementalPrepareUpdate=function(r){this._seriesScope=makeSeriesScope$2(r),this._data=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(r,a,o){this._progressiveEls=[],o=normalizeUpdateOpt(o);function s(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var l=r.start;l<r.end;l++){var u=a.getItemLayout(l);if(symbolNeedsDraw$1(a,u,l,o)){var c=new this._SymbolCtor(a,l,this._seriesScope);c.traverse(s),c.setPosition(u),this.group.add(c),a.setItemGraphicEl(l,c),this._progressiveEls.push(c)}}},n.prototype.eachRendered=function(r){traverseElements(this._progressiveEls||this.group,r)},n.prototype.remove=function(r){var a=this.group,o=this._data;o&&r?o.eachItemGraphicEl(function(s){s.fadeOut(function(){a.remove(s)},o.hostModel)}):a.removeAll()},n}();function prepareDataCoordInfo(n,r,a){var o=n.getBaseAxis(),s=n.getOtherAxis(o),l=getValueStart(s,a),u=o.dim,c=s.dim,d=r.mapDimension(c),f=r.mapDimension(u),p=c==="x"||c==="radius"?1:0,v=map$1(n.dimensions,function(_){return r.mapDimension(_)}),g=!1,y=r.getCalculationInfo("stackResultDimension");return isDimensionStacked(r,v[0])&&(g=!0,v[0]=y),isDimensionStacked(r,v[1])&&(g=!0,v[1]=y),{dataDimsForPoint:v,valueStart:l,valueAxisDim:c,baseAxisDim:u,stacked:!!g,valueDim:d,baseDim:f,baseDataOffset:p,stackedOverDimension:r.getCalculationInfo("stackedOverDimension")}}function getValueStart(n,r){var a=0,o=n.scale.getExtent();return r==="start"?a=o[0]:r==="end"?a=o[1]:isNumber(r)&&!isNaN(r)?a=r:o[0]>0?a=o[0]:o[1]<0&&(a=o[1]),a}function getStackedOnPoint(n,r,a,o){var s=NaN;n.stacked&&(s=a.get(a.getCalculationInfo("stackedOverDimension"),o)),isNaN(s)&&(s=n.valueStart);var l=n.baseDataOffset,u=[];return u[l]=a.get(n.baseDim,o),u[1-l]=s,r.dataToPoint(u)}function diffData(n,r){var a=[];return r.diff(n).add(function(o){a.push({cmd:"+",idx:o})}).update(function(o,s){a.push({cmd:"=",idx:s,idx1:o})}).remove(function(o){a.push({cmd:"-",idx:o})}).execute(),a}function lineAnimationDiff(n,r,a,o,s,l,u,c){for(var d=diffData(n,r),f=[],p=[],v=[],g=[],y=[],_=[],S=[],b=prepareDataCoordInfo(s,r,u),x=n.getLayout("points")||[],A=r.getLayout("points")||[],w=0;w<d.length;w++){var E=d[w],D=!0,C=void 0,$=void 0;switch(E.cmd){case"=":C=E.idx*2,$=E.idx1*2;var P=x[C],M=x[C+1],I=A[$],L=A[$+1];(isNaN(P)||isNaN(M))&&(P=I,M=L),f.push(P,M),p.push(I,L),v.push(a[C],a[C+1]),g.push(o[$],o[$+1]),S.push(r.getRawIndex(E.idx1));break;case"+":var O=E.idx,R=b.dataDimsForPoint,N=s.dataToPoint([r.get(R[0],O),r.get(R[1],O)]);$=O*2,f.push(N[0],N[1]),p.push(A[$],A[$+1]);var V=getStackedOnPoint(b,s,r,O);v.push(V[0],V[1]),g.push(o[$],o[$+1]),S.push(r.getRawIndex(O));break;case"-":D=!1}D&&(y.push(E),_.push(_.length))}_.sort(function(ee,j){return S[ee]-S[j]});for(var F=f.length,U=createFloat32Array(F),H=createFloat32Array(F),W=createFloat32Array(F),G=createFloat32Array(F),B=[],w=0;w<_.length;w++){var Y=_[w],Z=w*2,K=Y*2;U[Z]=f[K],U[Z+1]=f[K+1],H[Z]=p[K],H[Z+1]=p[K+1],W[Z]=v[K],W[Z+1]=v[K+1],G[Z]=g[K],G[Z+1]=g[K+1],B[w]=y[Y]}return{current:U,next:H,stackedOnCurrent:W,stackedOnNext:G,status:B}}var mathMin$5=Math.min,mathMax$5=Math.max;function isPointNull$1(n,r){return isNaN(n)||isNaN(r)}function drawSegment(n,r,a,o,s,l,u,c,d){for(var f,p,v,g,y,_,S=a,b=0;b<o;b++){var x=r[S*2],A=r[S*2+1];if(S>=s||S<0)break;if(isPointNull$1(x,A)){if(d){S+=l;continue}break}if(S===a)n[l>0?"moveTo":"lineTo"](x,A),v=x,g=A;else{var w=x-f,E=A-p;if(w*w+E*E<.5){S+=l;continue}if(u>0){for(var D=S+l,C=r[D*2],$=r[D*2+1];C===x&&$===A&&b<o;)b++,D+=l,S+=l,C=r[D*2],$=r[D*2+1],x=r[S*2],A=r[S*2+1],w=x-f,E=A-p;var P=b+1;if(d)for(;isPointNull$1(C,$)&&P<o;)P++,D+=l,C=r[D*2],$=r[D*2+1];var M=.5,I=0,L=0,O=void 0,R=void 0;if(P>=o||isPointNull$1(C,$))y=x,_=A;else{I=C-f,L=$-p;var N=x-f,V=C-x,F=A-p,U=$-A,H=void 0,W=void 0;if(c==="x"){H=Math.abs(N),W=Math.abs(V);var G=I>0?1:-1;y=x-G*H*u,_=A,O=x+G*W*u,R=A}else if(c==="y"){H=Math.abs(F),W=Math.abs(U);var B=L>0?1:-1;y=x,_=A-B*H*u,O=x,R=A+B*W*u}else H=Math.sqrt(N*N+F*F),W=Math.sqrt(V*V+U*U),M=W/(W+H),y=x-I*u*(1-M),_=A-L*u*(1-M),O=x+I*u*M,R=A+L*u*M,O=mathMin$5(O,mathMax$5(C,x)),R=mathMin$5(R,mathMax$5($,A)),O=mathMax$5(O,mathMin$5(C,x)),R=mathMax$5(R,mathMin$5($,A)),I=O-x,L=R-A,y=x-I*H/W,_=A-L*H/W,y=mathMin$5(y,mathMax$5(f,x)),_=mathMin$5(_,mathMax$5(p,A)),y=mathMax$5(y,mathMin$5(f,x)),_=mathMax$5(_,mathMin$5(p,A)),I=x-y,L=A-_,O=x+I*W/H,R=A+L*W/H}n.bezierCurveTo(v,g,y,_,x,A),v=O,g=R}else n.lineTo(x,A)}f=x,p=A,S+=l}return b}var ECPolylineShape=function(){function n(){this.smooth=0,this.smoothConstraint=!0}return n}(),ECPolyline=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="ec-polyline",o}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new ECPolylineShape},r.prototype.buildPath=function(a,o){var s=o.points,l=0,u=s.length/2;if(o.connectNulls){for(;u>0&&isPointNull$1(s[u*2-2],s[u*2-1]);u--);for(;l<u&&isPointNull$1(s[l*2],s[l*2+1]);l++);}for(;l<u;)l+=drawSegment(a,s,l,u,u,1,o.smooth,o.smoothMonotone,o.connectNulls)+1},r.prototype.getPointOn=function(a,o){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var s=this.path,l=s.data,u=PathProxy.CMD,c,d,f=o==="x",p=[],v=0;v<l.length;){var g=l[v++],y=void 0,_=void 0,S=void 0,b=void 0,x=void 0,A=void 0,w=void 0;switch(g){case u.M:c=l[v++],d=l[v++];break;case u.L:if(y=l[v++],_=l[v++],w=f?(a-c)/(y-c):(a-d)/(_-d),w<=1&&w>=0){var E=f?(_-d)*w+d:(y-c)*w+c;return f?[a,E]:[E,a]}c=y,d=_;break;case u.C:y=l[v++],_=l[v++],S=l[v++],b=l[v++],x=l[v++],A=l[v++];var D=f?cubicRootAt(c,y,S,x,a,p):cubicRootAt(d,_,b,A,a,p);if(D>0)for(var C=0;C<D;C++){var $=p[C];if($<=1&&$>=0){var E=f?cubicAt(d,_,b,A,$):cubicAt(c,y,S,x,$);return f?[a,E]:[E,a]}}c=x,d=A;break}}},r}(Path),ECPolygonShape=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r}(ECPolylineShape),ECPolygon=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="ec-polygon",o}return r.prototype.getDefaultShape=function(){return new ECPolygonShape},r.prototype.buildPath=function(a,o){var s=o.points,l=o.stackedOnPoints,u=0,c=s.length/2,d=o.smoothMonotone;if(o.connectNulls){for(;c>0&&isPointNull$1(s[c*2-2],s[c*2-1]);c--);for(;u<c&&isPointNull$1(s[u*2],s[u*2+1]);u++);}for(;u<c;){var f=drawSegment(a,s,u,c,c,1,o.smooth,d,o.connectNulls);drawSegment(a,l,u+f-1,f,c,-1,o.stackedOnSmooth,d,o.connectNulls),u+=f+1,a.closePath()}},r}(Path);function createGridClipPath(n,r,a,o,s){var l=n.getArea(),u=l.x,c=l.y,d=l.width,f=l.height,p=a.get(["lineStyle","width"])||0;u-=p/2,c-=p/2,d+=p,f+=p,d=Math.ceil(d),u!==Math.floor(u)&&(u=Math.floor(u),d++);var v=new Rect$2({shape:{x:u,y:c,width:d,height:f}});if(r){var g=n.getBaseAxis(),y=g.isHorizontal(),_=g.inverse;y?(_&&(v.shape.x+=d),v.shape.width=0):(_||(v.shape.y+=f),v.shape.height=0);var S=isFunction(s)?function(b){s(b,v)}:null;initProps(v,{shape:{width:d,height:f,x:u,y:c}},a,null,o,S)}return v}function createPolarClipPath(n,r,a){var o=n.getArea(),s=round$3(o.r0,1),l=round$3(o.r,1),u=new Sector({shape:{cx:round$3(n.cx,1),cy:round$3(n.cy,1),r0:s,r:l,startAngle:o.startAngle,endAngle:o.endAngle,clockwise:o.clockwise}});if(r){var c=n.getBaseAxis().dim==="angle";c?u.shape.endAngle=o.startAngle:u.shape.r=s,initProps(u,{shape:{endAngle:o.endAngle,r:l}},a)}return u}function createClipPath(n,r,a,o,s){if(n){if(n.type==="polar")return createPolarClipPath(n,r,a);if(n.type==="cartesian2d")return createGridClipPath(n,r,a,o,s)}else return null;return null}function isCoordinateSystemType(n,r){return n.type===r}function isPointsSame(n,r){if(n.length===r.length){for(var a=0;a<n.length;a++)if(n[a]!==r[a])return;return!0}}function bboxFromPoints(n){for(var r=1/0,a=1/0,o=-1/0,s=-1/0,l=0;l<n.length;){var u=n[l++],c=n[l++];isNaN(u)||(r=Math.min(u,r),o=Math.max(u,o)),isNaN(c)||(a=Math.min(c,a),s=Math.max(c,s))}return[[r,a],[o,s]]}function getBoundingDiff(n,r){var a=bboxFromPoints(n),o=a[0],s=a[1],l=bboxFromPoints(r),u=l[0],c=l[1];return Math.max(Math.abs(o[0]-u[0]),Math.abs(o[1]-u[1]),Math.abs(s[0]-c[0]),Math.abs(s[1]-c[1]))}function getSmooth(n){return isNumber(n)?n:n?.5:0}function getStackedOnPoints(n,r,a){if(!a.valueDim)return[];for(var o=r.count(),s=createFloat32Array(o*2),l=0;l<o;l++){var u=getStackedOnPoint(a,n,r,l);s[l*2]=u[0],s[l*2+1]=u[1]}return s}function turnPointsIntoStep(n,r,a,o,s){var l=a.getBaseAxis(),u=l.dim==="x"||l.dim==="radius"?0:1,c=[],d=0,f=[],p=[],v=[],g=[];if(s){for(d=0;d<n.length;d+=2){var y=r||n;!isNaN(y[d])&&!isNaN(y[d+1])&&g.push(n[d],n[d+1])}n=g}for(d=0;d<n.length-2;d+=2)switch(v[0]=n[d+2],v[1]=n[d+3],p[0]=n[d],p[1]=n[d+1],c.push(p[0],p[1]),o){case"end":f[u]=v[u],f[1-u]=p[1-u],c.push(f[0],f[1]);break;case"middle":var _=(p[u]+v[u])/2,S=[];f[u]=S[u]=_,f[1-u]=p[1-u],S[1-u]=v[1-u],c.push(f[0],f[1]),c.push(S[0],S[1]);break;default:f[u]=p[u],f[1-u]=v[1-u],c.push(f[0],f[1])}return c.push(n[d++],n[d++]),c}function clipColorStops(n,r){var a=[],o=n.length,s,l;function u(p,v,g){var y=p.coord,_=(g-y)/(v.coord-y),S=lerp(_,[p.color,v.color]);return{coord:g,color:S}}for(var c=0;c<o;c++){var d=n[c],f=d.coord;if(f<0)s=d;else if(f>r){l?a.push(u(l,d,r)):s&&a.push(u(s,d,0),u(s,d,r));break}else s&&(a.push(u(s,d,0)),s=null),a.push(d),l=d}return a}function getVisualGradient(n,r,a){var o=n.getVisual("visualMeta");if(!(!o||!o.length||!n.count())&&r.type==="cartesian2d"){for(var s,l,u=o.length-1;u>=0;u--){var c=n.getDimensionInfo(o[u].dimension);if(s=c&&c.coordDim,s==="x"||s==="y"){l=o[u];break}}if(l){var d=r.getAxis(s),f=map$1(l.stops,function(w){return{coord:d.toGlobalCoord(d.dataToCoord(w.value)),color:w.color}}),p=f.length,v=l.outerColors.slice();p&&f[0].coord>f[p-1].coord&&(f.reverse(),v.reverse());var g=clipColorStops(f,s==="x"?a.getWidth():a.getHeight()),y=g.length;if(!y&&p)return f[0].coord<0?v[1]?v[1]:f[p-1].color:v[0]?v[0]:f[0].color;var _=10,S=g[0].coord-_,b=g[y-1].coord+_,x=b-S;if(x<.001)return"transparent";each$f(g,function(w){w.offset=(w.coord-S)/x}),g.push({offset:y?g[y-1].offset:.5,color:v[1]||"transparent"}),g.unshift({offset:y?g[0].offset:.5,color:v[0]||"transparent"});var A=new LinearGradient(0,0,0,0,g,!0);return A[s]=S,A[s+"2"]=b,A}}}function getIsIgnoreFunc(n,r,a){var o=n.get("showAllSymbol"),s=o==="auto";if(!(o&&!s)){var l=a.getAxesByScale("ordinal")[0];if(l&&!(s&&canShowAllSymbolForCategory(l,r))){var u=r.mapDimension(l.dim),c={};return each$f(l.getViewLabels(),function(d){var f=l.scale.getRawOrdinalNumber(d.tickValue);c[f]=1}),function(d){return!c.hasOwnProperty(r.get(u,d))}}}}function canShowAllSymbolForCategory(n,r){var a=n.getExtent(),o=Math.abs(a[1]-a[0])/n.scale.count();isNaN(o)&&(o=0);for(var s=r.count(),l=Math.max(1,Math.round(s/5)),u=0;u<s;u+=l)if(Symbol$1.getSymbolSize(r,u)[n.isHorizontal()?1:0]*1.5>o)return!1;return!0}function isPointNull(n,r){return isNaN(n)||isNaN(r)}function getLastIndexNotNull(n){for(var r=n.length/2;r>0&&isPointNull(n[r*2-2],n[r*2-1]);r--);return r-1}function getPointAtIndex(n,r){return[n[r*2],n[r*2+1]]}function getIndexRange(n,r,a){for(var o=n.length/2,s=a==="x"?0:1,l,u,c=0,d=-1,f=0;f<o;f++)if(u=n[f*2+s],!(isNaN(u)||isNaN(n[f*2+1-s]))){if(f===0){l=u;continue}if(l<=r&&u>=r||l>=r&&u<=r){d=f;break}c=f,l=u}return{range:[c,d],t:(r-l)/(u-l)}}function anyStateShowEndLabel(n){if(n.get(["endLabel","show"]))return!0;for(var r=0;r<SPECIAL_STATES.length;r++)if(n.get([SPECIAL_STATES[r],"endLabel","show"]))return!0;return!1}function createLineClipPath(n,r,a,o){if(isCoordinateSystemType(r,"cartesian2d")){var s=o.getModel("endLabel"),l=s.get("valueAnimation"),u=o.getData(),c={lastFrameIndex:0},d=anyStateShowEndLabel(o)?function(y,_){n._endLabelOnDuring(y,_,u,c,l,s,r)}:null,f=r.getBaseAxis().isHorizontal(),p=createGridClipPath(r,a,o,function(){var y=n._endLabel;y&&a&&c.originalX!=null&&y.attr({x:c.originalX,y:c.originalY})},d);if(!o.get("clip",!0)){var v=p.shape,g=Math.max(v.width,v.height);f?(v.y-=g,v.height+=g*2):(v.x-=g,v.width+=g*2)}return d&&d(1,p),p}else return createPolarClipPath(r,a,o)}function getEndLabelStateSpecified(n,r){var a=r.getBaseAxis(),o=a.isHorizontal(),s=a.inverse,l=o?s?"right":"left":"center",u=o?"middle":s?"top":"bottom";return{normal:{align:n.get("align")||l,verticalAlign:n.get("verticalAlign")||u}}}var LineView=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.init=function(){var a=new Group$3,o=new SymbolDraw;this.group.add(o.group),this._symbolDraw=o,this._lineGroup=a,this._changePolyState=bind$1(this._changePolyState,this)},r.prototype.render=function(a,o,s){var l=a.coordinateSystem,u=this.group,c=a.getData(),d=a.getModel("lineStyle"),f=a.getModel("areaStyle"),p=c.getLayout("points")||[],v=l.type==="polar",g=this._coordSys,y=this._symbolDraw,_=this._polyline,S=this._polygon,b=this._lineGroup,x=!o.ssr&&a.get("animation"),A=!f.isEmpty(),w=f.get("origin"),E=prepareDataCoordInfo(l,c,w),D=A&&getStackedOnPoints(l,c,E),C=a.get("showSymbol"),$=a.get("connectNulls"),P=C&&!v&&getIsIgnoreFunc(a,c,l),M=this._data;M&&M.eachItemGraphicEl(function(ee,j){ee.__temp&&(u.remove(ee),M.setItemGraphicEl(j,null))}),C||y.remove(),u.add(b);var I=v?!1:a.get("step"),L;l&&l.getArea&&a.get("clip",!0)&&(L=l.getArea(),L.width!=null?(L.x-=.1,L.y-=.1,L.width+=.2,L.height+=.2):L.r0&&(L.r0-=.5,L.r+=.5)),this._clipShapeForSymbol=L;var O=getVisualGradient(c,l,s)||c.getVisual("style")[c.getVisual("drawType")];if(!(_&&g.type===l.type&&I===this._step))C&&y.updateData(c,{isIgnore:P,clipShape:L,disableAnimation:!0,getSymbolPoint:function(ee){return[p[ee*2],p[ee*2+1]]}}),x&&this._initSymbolLabelAnimation(c,l,L),I&&(D&&(D=turnPointsIntoStep(D,p,l,I,$)),p=turnPointsIntoStep(p,null,l,I,$)),_=this._newPolyline(p),A?S=this._newPolygon(p,D):S&&(b.remove(S),S=this._polygon=null),v||this._initOrUpdateEndLabel(a,l,convertToColorString(O)),b.setClipPath(createLineClipPath(this,l,!0,a));else{A&&!S?S=this._newPolygon(p,D):S&&!A&&(b.remove(S),S=this._polygon=null),v||this._initOrUpdateEndLabel(a,l,convertToColorString(O));var R=b.getClipPath();if(R){var N=createLineClipPath(this,l,!1,a);initProps(R,{shape:N.shape},a)}else b.setClipPath(createLineClipPath(this,l,!0,a));C&&y.updateData(c,{isIgnore:P,clipShape:L,disableAnimation:!0,getSymbolPoint:function(ee){return[p[ee*2],p[ee*2+1]]}}),(!isPointsSame(this._stackedOnPoints,D)||!isPointsSame(this._points,p))&&(x?this._doUpdateAnimation(c,D,l,s,I,w,$):(I&&(D&&(D=turnPointsIntoStep(D,p,l,I,$)),p=turnPointsIntoStep(p,null,l,I,$)),_.setShape({points:p}),S&&S.setShape({points:p,stackedOnPoints:D})))}var V=a.getModel("emphasis"),F=V.get("focus"),U=V.get("blurScope"),H=V.get("disabled");if(_.useStyle(defaults$2(d.getLineStyle(),{fill:"none",stroke:O,lineJoin:"bevel"})),setStatesStylesFromModel(_,a,"lineStyle"),_.style.lineWidth>0&&a.get(["emphasis","lineStyle","width"])==="bolder"){var W=_.getState("emphasis").style;W.lineWidth=+_.style.lineWidth+1}getECData(_).seriesIndex=a.seriesIndex,toggleHoverEmphasis(_,F,U,H);var G=getSmooth(a.get("smooth")),B=a.get("smoothMonotone");if(_.setShape({smooth:G,smoothMonotone:B,connectNulls:$}),S){var Y=c.getCalculationInfo("stackedOnSeries"),Z=0;S.useStyle(defaults$2(f.getAreaStyle(),{fill:O,opacity:.7,lineJoin:"bevel",decal:c.getVisual("style").decal})),Y&&(Z=getSmooth(Y.get("smooth"))),S.setShape({smooth:G,stackedOnSmooth:Z,smoothMonotone:B,connectNulls:$}),setStatesStylesFromModel(S,a,"areaStyle"),getECData(S).seriesIndex=a.seriesIndex,toggleHoverEmphasis(S,F,U,H)}var K=this._changePolyState;c.eachItemGraphicEl(function(ee){ee&&(ee.onHoverStateChange=K)}),this._polyline.onHoverStateChange=K,this._data=c,this._coordSys=l,this._stackedOnPoints=D,this._points=p,this._step=I,this._valueOrigin=w,a.get("triggerLineEvent")&&(this.packEventData(a,_),S&&this.packEventData(a,S))},r.prototype.packEventData=function(a,o){getECData(o).eventData={componentType:"series",componentSubType:"line",componentIndex:a.componentIndex,seriesIndex:a.seriesIndex,seriesName:a.name,seriesType:"line"}},r.prototype.highlight=function(a,o,s,l){var u=a.getData(),c=queryDataIndex(u,l);if(this._changePolyState("emphasis"),!(c instanceof Array)&&c!=null&&c>=0){var d=u.getLayout("points"),f=u.getItemGraphicEl(c);if(!f){var p=d[c*2],v=d[c*2+1];if(isNaN(p)||isNaN(v)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(p,v))return;var g=a.get("zlevel")||0,y=a.get("z")||0;f=new Symbol$1(u,c),f.x=p,f.y=v,f.setZ(g,y);var _=f.getSymbolPath().getTextContent();_&&(_.zlevel=g,_.z=y,_.z2=this._polyline.z2+1),f.__temp=!0,u.setItemGraphicEl(c,f),f.stopSymbolAnimation(!0),this.group.add(f)}f.highlight()}else ChartView.prototype.highlight.call(this,a,o,s,l)},r.prototype.downplay=function(a,o,s,l){var u=a.getData(),c=queryDataIndex(u,l);if(this._changePolyState("normal"),c!=null&&c>=0){var d=u.getItemGraphicEl(c);d&&(d.__temp?(u.setItemGraphicEl(c,null),this.group.remove(d)):d.downplay())}else ChartView.prototype.downplay.call(this,a,o,s,l)},r.prototype._changePolyState=function(a){var o=this._polygon;setStatesFlag(this._polyline,a),o&&setStatesFlag(o,a)},r.prototype._newPolyline=function(a){var o=this._polyline;return o&&this._lineGroup.remove(o),o=new ECPolyline({shape:{points:a},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(o),this._polyline=o,o},r.prototype._newPolygon=function(a,o){var s=this._polygon;return s&&this._lineGroup.remove(s),s=new ECPolygon({shape:{points:a,stackedOnPoints:o},segmentIgnoreThreshold:2}),this._lineGroup.add(s),this._polygon=s,s},r.prototype._initSymbolLabelAnimation=function(a,o,s){var l,u,c=o.getBaseAxis(),d=c.inverse;o.type==="cartesian2d"?(l=c.isHorizontal(),u=!1):o.type==="polar"&&(l=c.dim==="angle",u=!0);var f=a.hostModel,p=f.get("animationDuration");isFunction(p)&&(p=p(null));var v=f.get("animationDelay")||0,g=isFunction(v)?v(null):v;a.eachItemGraphicEl(function(y,_){var S=y;if(S){var b=[y.x,y.y],x=void 0,A=void 0,w=void 0;if(s)if(u){var E=s,D=o.pointToCoord(b);l?(x=E.startAngle,A=E.endAngle,w=-D[1]/180*Math.PI):(x=E.r0,A=E.r,w=D[0])}else{var C=s;l?(x=C.x,A=C.x+C.width,w=y.x):(x=C.y+C.height,A=C.y,w=y.y)}var $=A===x?0:(w-x)/(A-x);d&&($=1-$);var P=isFunction(v)?v(_):p*$+g,M=S.getSymbolPath(),I=M.getTextContent();S.attr({scaleX:0,scaleY:0}),S.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:P}),I&&I.animateFrom({style:{opacity:0}},{duration:300,delay:P}),M.disableLabelAnimation=!0}})},r.prototype._initOrUpdateEndLabel=function(a,o,s){var l=a.getModel("endLabel");if(anyStateShowEndLabel(a)){var u=a.getData(),c=this._polyline,d=u.getLayout("points");if(!d){c.removeTextContent(),this._endLabel=null;return}var f=this._endLabel;f||(f=this._endLabel=new ZRText({z2:200}),f.ignoreClip=!0,c.setTextContent(this._endLabel),c.disableLabelAnimation=!0);var p=getLastIndexNotNull(d);p>=0&&(setLabelStyle(c,getLabelStatesModels(a,"endLabel"),{inheritColor:s,labelFetcher:a,labelDataIndex:p,defaultText:function(v,g,y){return y!=null?getDefaultInterpolatedLabel(u,y):getDefaultLabel(u,v)},enableTextSetter:!0},getEndLabelStateSpecified(l,o)),c.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},r.prototype._endLabelOnDuring=function(a,o,s,l,u,c,d){var f=this._endLabel,p=this._polyline;if(f){a<1&&l.originalX==null&&(l.originalX=f.x,l.originalY=f.y);var v=s.getLayout("points"),g=s.hostModel,y=g.get("connectNulls"),_=c.get("precision"),S=c.get("distance")||0,b=d.getBaseAxis(),x=b.isHorizontal(),A=b.inverse,w=o.shape,E=A?x?w.x:w.y+w.height:x?w.x+w.width:w.y,D=(x?S:0)*(A?-1:1),C=(x?0:-S)*(A?-1:1),$=x?"x":"y",P=getIndexRange(v,E,$),M=P.range,I=M[1]-M[0],L=void 0;if(I>=1){if(I>1&&!y){var O=getPointAtIndex(v,M[0]);f.attr({x:O[0]+D,y:O[1]+C}),u&&(L=g.getRawValue(M[0]))}else{var O=p.getPointOn(E,$);O&&f.attr({x:O[0]+D,y:O[1]+C});var R=g.getRawValue(M[0]),N=g.getRawValue(M[1]);u&&(L=interpolateRawValues(s,_,R,N,P.t))}l.lastFrameIndex=M[0]}else{var V=a===1||l.lastFrameIndex>0?M[0]:0,O=getPointAtIndex(v,V);u&&(L=g.getRawValue(V)),f.attr({x:O[0]+D,y:O[1]+C})}if(u){var F=labelInner(f);typeof F.setLabelText=="function"&&F.setLabelText(L)}}},r.prototype._doUpdateAnimation=function(a,o,s,l,u,c,d){var f=this._polyline,p=this._polygon,v=a.hostModel,g=lineAnimationDiff(this._data,a,this._stackedOnPoints,o,this._coordSys,s,this._valueOrigin),y=g.current,_=g.stackedOnCurrent,S=g.next,b=g.stackedOnNext;if(u&&(_=turnPointsIntoStep(g.stackedOnCurrent,g.current,s,u,d),y=turnPointsIntoStep(g.current,null,s,u,d),b=turnPointsIntoStep(g.stackedOnNext,g.next,s,u,d),S=turnPointsIntoStep(g.next,null,s,u,d)),getBoundingDiff(y,S)>3e3||p&&getBoundingDiff(_,b)>3e3){f.stopAnimation(),f.setShape({points:S}),p&&(p.stopAnimation(),p.setShape({points:S,stackedOnPoints:b}));return}f.shape.__points=g.current,f.shape.points=y;var x={shape:{points:S}};g.current!==y&&(x.shape.__points=g.next),f.stopAnimation(),updateProps$1(f,x,v),p&&(p.setShape({points:y,stackedOnPoints:_}),p.stopAnimation(),updateProps$1(p,{shape:{stackedOnPoints:b}},v),f.shape.points!==p.shape.points&&(p.shape.points=f.shape.points));for(var A=[],w=g.status,E=0;E<w.length;E++){var D=w[E].cmd;if(D==="="){var C=a.getItemGraphicEl(w[E].idx1);C&&A.push({el:C,ptIdx:E})}}f.animators&&f.animators.length&&f.animators[0].during(function(){p&&p.dirtyShape();for(var $=f.shape.__points,P=0;P<A.length;P++){var M=A[P].el,I=A[P].ptIdx*2;M.x=$[I],M.y=$[I+1],M.markRedraw()}})},r.prototype.remove=function(a){var o=this.group,s=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),s&&s.eachItemGraphicEl(function(l,u){l.__temp&&(o.remove(l),s.setItemGraphicEl(u,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},r.type="line",r}(ChartView);function pointsLayout(n,r){return{seriesType:n,plan:createRenderPlanner(),reset:function(a){var o=a.getData(),s=a.coordinateSystem,l=a.pipelineContext,u=r||l.large;if(s){var c=map$1(s.dimensions,function(y){return o.mapDimension(y)}).slice(0,2),d=c.length,f=o.getCalculationInfo("stackResultDimension");isDimensionStacked(o,c[0])&&(c[0]=f),isDimensionStacked(o,c[1])&&(c[1]=f);var p=o.getStore(),v=o.getDimensionIndex(c[0]),g=o.getDimensionIndex(c[1]);return d&&{progress:function(y,_){for(var S=y.end-y.start,b=u&&createFloat32Array(S*d),x=[],A=[],w=y.start,E=0;w<y.end;w++){var D=void 0;if(d===1){var C=p.get(v,w);D=s.dataToPoint(C,null,A)}else x[0]=p.get(v,w),x[1]=p.get(g,w),D=s.dataToPoint(x,null,A);u?(b[E++]=D[0],b[E++]=D[1]):_.setItemLayout(w,D.slice())}u&&_.setLayout("points",b)}}}}}}var samplers={average:function(n){for(var r=0,a=0,o=0;o<n.length;o++)isNaN(n[o])||(r+=n[o],a++);return a===0?NaN:r/a},sum:function(n){for(var r=0,a=0;a<n.length;a++)r+=n[a]||0;return r},max:function(n){for(var r=-1/0,a=0;a<n.length;a++)n[a]>r&&(r=n[a]);return isFinite(r)?r:NaN},min:function(n){for(var r=1/0,a=0;a<n.length;a++)n[a]<r&&(r=n[a]);return isFinite(r)?r:NaN},nearest:function(n){return n[0]}},indexSampler=function(n){return Math.round(n.length/2)};function dataSample(n){return{seriesType:n,reset:function(r,a,o){var s=r.getData(),l=r.get("sampling"),u=r.coordinateSystem,c=s.count();if(c>10&&u.type==="cartesian2d"&&l){var d=u.getBaseAxis(),f=u.getOtherAxis(d),p=d.getExtent(),v=o.getDevicePixelRatio(),g=Math.abs(p[1]-p[0])*(v||1),y=Math.round(c/g);if(isFinite(y)&&y>1){l==="lttb"?r.setData(s.lttbDownSample(s.mapDimension(f.dim),1/y)):l==="minmax"&&r.setData(s.minmaxDownSample(s.mapDimension(f.dim),1/y));var _=void 0;isString(l)?_=samplers[l]:isFunction(l)&&(_=l),_&&r.setData(s.downSample(s.mapDimension(f.dim),1/y,_,indexSampler))}}}}}function install$S(n){n.registerChartView(LineView),n.registerSeriesModel(LineSeriesModel),n.registerLayout(pointsLayout("line",!0)),n.registerVisual({seriesType:"line",reset:function(r){var a=r.getData(),o=r.getModel("lineStyle").getLineStyle();o&&!o.stroke&&(o.stroke=a.getVisual("style").fill),a.setVisual("legendLineStyle",o)}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,dataSample("line"))}var BaseBarSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.getInitialData=function(a,o){return createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.getMarkerPosition=function(a,o,s){var l=this.coordinateSystem;if(l&&l.clampData){var u=l.clampData(a),c=l.dataToPoint(u);if(s)each$f(l.getAxes(),function(g,y){if(g.type==="category"&&o!=null){var _=g.getTicksCoords(),S=g.getTickModel().get("alignWithLabel"),b=u[y],x=o[y]==="x1"||o[y]==="y1";if(x&&!S&&(b+=1),_.length<2)return;if(_.length===2){c[y]=g.toGlobalCoord(g.getExtent()[x?1:0]);return}for(var A=void 0,w=void 0,E=1,D=0;D<_.length;D++){var C=_[D].coord,$=D===_.length-1?_[D-1].tickValue+E:_[D].tickValue;if($===b){w=C;break}else if($<b)A=C;else if(A!=null&&$>b){w=(C+A)/2;break}D===1&&(E=$-_[0].tickValue)}w==null&&(A?A&&(w=_[_.length-1].coord):w=_[0].coord),c[y]=g.toGlobalCoord(w)}});else{var d=this.getData(),f=d.getLayout("offset"),p=d.getLayout("size"),v=l.getBaseAxis().isHorizontal()?0:1;c[v]+=f+p/2}return c}return[NaN,NaN]},r.type="series.__base_bar__",r.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},r}(SeriesModel);SeriesModel.registerClass(BaseBarSeriesModel);var BarSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.getInitialData=function(){return createSeriesData(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},r.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},r.prototype.getProgressiveThreshold=function(){var a=this.get("progressiveThreshold"),o=this.get("largeThreshold");return o>a&&(a=o),a},r.prototype.brushSelector=function(a,o,s){return s.rect(o.getItemLayout(a))},r.type="series.bar",r.dependencies=["grid","polar"],r.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:"#212121"}},realtimeSort:!1}),r}(BaseBarSeriesModel),SausageShape=function(){function n(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return n}(),SausagePath=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="sausage",o}return r.prototype.getDefaultShape=function(){return new SausageShape},r.prototype.buildPath=function(a,o){var s=o.cx,l=o.cy,u=Math.max(o.r0||0,0),c=Math.max(o.r,0),d=(c-u)*.5,f=u+d,p=o.startAngle,v=o.endAngle,g=o.clockwise,y=Math.PI*2,_=g?v-p<y:p-v<y;_||(p=v-(g?y:-y));var S=Math.cos(p),b=Math.sin(p),x=Math.cos(v),A=Math.sin(v);_?(a.moveTo(S*u+s,b*u+l),a.arc(S*f+s,b*f+l,d,-Math.PI+p,p,!g)):a.moveTo(S*c+s,b*c+l),a.arc(s,l,c,p,v,!g),a.arc(x*f+s,A*f+l,d,v-Math.PI*2,v-Math.PI,!g),u!==0&&a.arc(s,l,u,v,p,g)},r}(Path);function createSectorCalculateTextPosition(n,r){r=r||{};var a=r.isRoundCap;return function(o,s,l){var u=s.position;if(!u||u instanceof Array)return calculateTextPosition(o,s,l);var c=n(u),d=s.distance!=null?s.distance:5,f=this.shape,p=f.cx,v=f.cy,g=f.r,y=f.r0,_=(g+y)/2,S=f.startAngle,b=f.endAngle,x=(S+b)/2,A=a?Math.abs(g-y)/2:0,w=Math.cos,E=Math.sin,D=p+g*w(S),C=v+g*E(S),$="left",P="top";switch(c){case"startArc":D=p+(y-d)*w(x),C=v+(y-d)*E(x),$="center",P="top";break;case"insideStartArc":D=p+(y+d)*w(x),C=v+(y+d)*E(x),$="center",P="bottom";break;case"startAngle":D=p+_*w(S)+adjustAngleDistanceX(S,d+A,!1),C=v+_*E(S)+adjustAngleDistanceY(S,d+A,!1),$="right",P="middle";break;case"insideStartAngle":D=p+_*w(S)+adjustAngleDistanceX(S,-d+A,!1),C=v+_*E(S)+adjustAngleDistanceY(S,-d+A,!1),$="left",P="middle";break;case"middle":D=p+_*w(x),C=v+_*E(x),$="center",P="middle";break;case"endArc":D=p+(g+d)*w(x),C=v+(g+d)*E(x),$="center",P="bottom";break;case"insideEndArc":D=p+(g-d)*w(x),C=v+(g-d)*E(x),$="center",P="top";break;case"endAngle":D=p+_*w(b)+adjustAngleDistanceX(b,d+A,!0),C=v+_*E(b)+adjustAngleDistanceY(b,d+A,!0),$="left",P="middle";break;case"insideEndAngle":D=p+_*w(b)+adjustAngleDistanceX(b,-d+A,!0),C=v+_*E(b)+adjustAngleDistanceY(b,-d+A,!0),$="right",P="middle";break;default:return calculateTextPosition(o,s,l)}return o=o||{},o.x=D,o.y=C,o.align=$,o.verticalAlign=P,o}}function setSectorTextRotation(n,r,a,o){if(isNumber(o)){n.setTextConfig({rotation:o});return}else if(isArray$1(r)){n.setTextConfig({rotation:0});return}var s=n.shape,l=s.clockwise?s.startAngle:s.endAngle,u=s.clockwise?s.endAngle:s.startAngle,c=(l+u)/2,d,f=a(r);switch(f){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":d=c;break;case"startAngle":case"insideStartAngle":d=l;break;case"endAngle":case"insideEndAngle":d=u;break;default:n.setTextConfig({rotation:0});return}var p=Math.PI*1.5-d;f==="middle"&&p>Math.PI/2&&p<Math.PI*1.5&&(p-=Math.PI),n.setTextConfig({rotation:p})}function adjustAngleDistanceX(n,r,a){return r*Math.sin(n)*(a?-1:1)}function adjustAngleDistanceY(n,r,a){return r*Math.cos(n)*(a?1:-1)}function getSectorCornerRadius(n,r,a){var o=n.get("borderRadius");if(o==null)return a?{cornerRadius:0}:null;isArray$1(o)||(o=[o,o,o,o]);var s=Math.abs(r.r||0-r.r0||0);return{cornerRadius:map$1(o,function(l){return parsePercent$1(l,s)})}}var mathMax$4=Math.max,mathMin$4=Math.min;function getClipArea(n,r){var a=n.getArea&&n.getArea();if(isCoordinateSystemType(n,"cartesian2d")){var o=n.getBaseAxis();if(o.type!=="category"||!o.onBand){var s=r.getLayout("bandWidth");o.isHorizontal()?(a.x-=s,a.width+=s*2):(a.y-=s,a.height+=s*2)}}return a}var BarView=function(n){__extends(r,n);function r(){var a=n.call(this)||this;return a.type=r.type,a._isFirstFrame=!0,a}return r.prototype.render=function(a,o,s,l){this._model=a,this._removeOnRenderedListener(s),this._updateDrawMode(a);var u=a.get("coordinateSystem");(u==="cartesian2d"||u==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(a,o,s):this._renderNormal(a,o,s,l))},r.prototype.incrementalPrepareRender=function(a){this._clear(),this._updateDrawMode(a),this._updateLargeClip(a)},r.prototype.incrementalRender=function(a,o){this._progressiveEls=[],this._incrementalRenderLarge(a,o)},r.prototype.eachRendered=function(a){traverseElements(this._progressiveEls||this.group,a)},r.prototype._updateDrawMode=function(a){var o=a.pipelineContext.large;(this._isLargeDraw==null||o!==this._isLargeDraw)&&(this._isLargeDraw=o,this._clear())},r.prototype._renderNormal=function(a,o,s,l){var u=this.group,c=a.getData(),d=this._data,f=a.coordinateSystem,p=f.getBaseAxis(),v;f.type==="cartesian2d"?v=p.isHorizontal():f.type==="polar"&&(v=p.dim==="angle");var g=a.isAnimationEnabled()?a:null,y=shouldRealtimeSort(a,f);y&&this._enableRealtimeSort(y,c,s);var _=a.get("clip",!0)||y,S=getClipArea(f,c);u.removeClipPath();var b=a.get("roundCap",!0),x=a.get("showBackground",!0),A=a.getModel("backgroundStyle"),w=A.get("borderRadius")||0,E=[],D=this._backgroundEls,C=l&&l.isInitSort,$=l&&l.type==="changeAxisOrder";function P(L){var O=getLayout[f.type](c,L),R=createBackgroundEl(f,v,O);return R.useStyle(A.getItemStyle()),f.type==="cartesian2d"?R.setShape("r",w):R.setShape("cornerRadius",w),E[L]=R,R}c.diff(d).add(function(L){var O=c.getItemModel(L),R=getLayout[f.type](c,L,O);if(x&&P(L),!(!c.hasValue(L)||!isValidLayout[f.type](R))){var N=!1;_&&(N=clip[f.type](S,R));var V=elementCreator[f.type](a,c,L,R,v,g,p.model,!1,b);y&&(V.forceLabelAnimation=!0),updateStyle(V,c,L,O,R,a,v,f.type==="polar"),C?V.attr({shape:R}):y?updateRealtimeAnimation(y,g,V,R,L,v,!1,!1):initProps(V,{shape:R},a,L),c.setItemGraphicEl(L,V),u.add(V),V.ignore=N}}).update(function(L,O){var R=c.getItemModel(L),N=getLayout[f.type](c,L,R);if(x){var V=void 0;D.length===0?V=P(O):(V=D[O],V.useStyle(A.getItemStyle()),f.type==="cartesian2d"?V.setShape("r",w):V.setShape("cornerRadius",w),E[L]=V);var F=getLayout[f.type](c,L),U=createBackgroundShape(v,F,f);updateProps$1(V,{shape:U},g,L)}var H=d.getItemGraphicEl(O);if(!c.hasValue(L)||!isValidLayout[f.type](N)){u.remove(H);return}var W=!1;if(_&&(W=clip[f.type](S,N),W&&u.remove(H)),H?saveOldStyle(H):H=elementCreator[f.type](a,c,L,N,v,g,p.model,!!H,b),y&&(H.forceLabelAnimation=!0),$){var G=H.getTextContent();if(G){var B=labelInner(G);B.prevValue!=null&&(B.prevValue=B.value)}}else updateStyle(H,c,L,R,N,a,v,f.type==="polar");C?H.attr({shape:N}):y?updateRealtimeAnimation(y,g,H,N,L,v,!0,$):updateProps$1(H,{shape:N},a,L,null),c.setItemGraphicEl(L,H),H.ignore=W,u.add(H)}).remove(function(L){var O=d.getItemGraphicEl(L);O&&removeElementWithFadeOut(O,a,L)}).execute();var M=this._backgroundGroup||(this._backgroundGroup=new Group$3);M.removeAll();for(var I=0;I<E.length;++I)M.add(E[I]);u.add(M),this._backgroundEls=E,this._data=c},r.prototype._renderLarge=function(a,o,s){this._clear(),createLarge$1(a,this.group),this._updateLargeClip(a)},r.prototype._incrementalRenderLarge=function(a,o){this._removeBackground(),createLarge$1(o,this.group,this._progressiveEls,!0)},r.prototype._updateLargeClip=function(a){var o=a.get("clip",!0)&&createClipPath(a.coordinateSystem,!1,a),s=this.group;o?s.setClipPath(o):s.removeClipPath()},r.prototype._enableRealtimeSort=function(a,o,s){var l=this;if(o.count()){var u=a.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(o,a,s),this._isFirstFrame=!1;else{var c=function(d){var f=o.getItemGraphicEl(d),p=f&&f.shape;return p&&Math.abs(u.isHorizontal()?p.height:p.width)||0};this._onRendered=function(){l._updateSortWithinSameData(o,c,u,s)},s.getZr().on("rendered",this._onRendered)}}},r.prototype._dataSort=function(a,o,s){var l=[];return a.each(a.mapDimension(o.dim),function(u,c){var d=s(c);d=d==null?NaN:d,l.push({dataIndex:c,mappedValue:d,ordinalNumber:u})}),l.sort(function(u,c){return c.mappedValue-u.mappedValue}),{ordinalNumbers:map$1(l,function(u){return u.ordinalNumber})}},r.prototype._isOrderChangedWithinSameData=function(a,o,s){for(var l=s.scale,u=a.mapDimension(s.dim),c=Number.MAX_VALUE,d=0,f=l.getOrdinalMeta().categories.length;d<f;++d){var p=a.rawIndexOf(u,l.getRawOrdinalNumber(d)),v=p<0?Number.MIN_VALUE:o(a.indexOfRawIndex(p));if(v>c)return!0;c=v}return!1},r.prototype._isOrderDifferentInView=function(a,o){for(var s=o.scale,l=s.getExtent(),u=Math.max(0,l[0]),c=Math.min(l[1],s.getOrdinalMeta().categories.length-1);u<=c;++u)if(a.ordinalNumbers[u]!==s.getRawOrdinalNumber(u))return!0},r.prototype._updateSortWithinSameData=function(a,o,s,l){if(this._isOrderChangedWithinSameData(a,o,s)){var u=this._dataSort(a,s,o);this._isOrderDifferentInView(u,s)&&(this._removeOnRenderedListener(l),l.dispatchAction({type:"changeAxisOrder",componentType:s.dim+"Axis",axisId:s.index,sortInfo:u}))}},r.prototype._dispatchInitSort=function(a,o,s){var l=o.baseAxis,u=this._dataSort(a,l,function(c){return a.get(a.mapDimension(o.otherAxis.dim),c)});s.dispatchAction({type:"changeAxisOrder",componentType:l.dim+"Axis",isInitSort:!0,axisId:l.index,sortInfo:u})},r.prototype.remove=function(a,o){this._clear(this._model),this._removeOnRenderedListener(o)},r.prototype.dispose=function(a,o){this._removeOnRenderedListener(o)},r.prototype._removeOnRenderedListener=function(a){this._onRendered&&(a.getZr().off("rendered",this._onRendered),this._onRendered=null)},r.prototype._clear=function(a){var o=this.group,s=this._data;a&&a.isAnimationEnabled()&&s&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],s.eachItemGraphicEl(function(l){removeElementWithFadeOut(l,a,getECData(l).dataIndex)})):o.removeAll(),this._data=null,this._isFirstFrame=!0},r.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},r.type="bar",r}(ChartView),clip={cartesian2d:function(n,r){var a=r.width<0?-1:1,o=r.height<0?-1:1;a<0&&(r.x+=r.width,r.width=-r.width),o<0&&(r.y+=r.height,r.height=-r.height);var s=n.x+n.width,l=n.y+n.height,u=mathMax$4(r.x,n.x),c=mathMin$4(r.x+r.width,s),d=mathMax$4(r.y,n.y),f=mathMin$4(r.y+r.height,l),p=c<u,v=f<d;return r.x=p&&u>s?c:u,r.y=v&&d>l?f:d,r.width=p?0:c-u,r.height=v?0:f-d,a<0&&(r.x+=r.width,r.width=-r.width),o<0&&(r.y+=r.height,r.height=-r.height),p||v},polar:function(n,r){var a=r.r0<=r.r?1:-1;if(a<0){var o=r.r;r.r=r.r0,r.r0=o}var s=mathMin$4(r.r,n.r),l=mathMax$4(r.r0,n.r0);r.r=s,r.r0=l;var u=s-l<0;if(a<0){var o=r.r;r.r=r.r0,r.r0=o}return u}},elementCreator={cartesian2d:function(n,r,a,o,s,l,u,c,d){var f=new Rect$2({shape:extend$2({},o),z2:1});if(f.__dataIndex=a,f.name="item",l){var p=f.shape,v=s?"height":"width";p[v]=0}return f},polar:function(n,r,a,o,s,l,u,c,d){var f=!s&&d?SausagePath:Sector,p=new f({shape:o,z2:1});p.name="item";var v=createPolarPositionMapping(s);if(p.calculateTextPosition=createSectorCalculateTextPosition(v,{isRoundCap:f===SausagePath}),l){var g=p.shape,y=s?"r":"endAngle",_={};g[y]=s?o.r0:o.startAngle,_[y]=o[y],(c?updateProps$1:initProps)(p,{shape:_},l)}return p}};function shouldRealtimeSort(n,r){var a=n.get("realtimeSort",!0),o=r.getBaseAxis();if(a&&o.type==="category"&&r.type==="cartesian2d")return{baseAxis:o,otherAxis:r.getOtherAxis(o)}}function updateRealtimeAnimation(n,r,a,o,s,l,u,c){var d,f;l?(f={x:o.x,width:o.width},d={y:o.y,height:o.height}):(f={y:o.y,height:o.height},d={x:o.x,width:o.width}),c||(u?updateProps$1:initProps)(a,{shape:d},r,s,null);var p=r?n.baseAxis.model:null;(u?updateProps$1:initProps)(a,{shape:f},p,s)}function checkPropertiesNotValid(n,r){for(var a=0;a<r.length;a++)if(!isFinite(n[r[a]]))return!0;return!1}var rectPropties=["x","y","width","height"],polarPropties=["cx","cy","r","startAngle","endAngle"],isValidLayout={cartesian2d:function(n){return!checkPropertiesNotValid(n,rectPropties)},polar:function(n){return!checkPropertiesNotValid(n,polarPropties)}},getLayout={cartesian2d:function(n,r,a){var o=n.getItemLayout(r),s=a?getLineWidth(a,o):0,l=o.width>0?1:-1,u=o.height>0?1:-1;return{x:o.x+l*s/2,y:o.y+u*s/2,width:o.width-l*s,height:o.height-u*s}},polar:function(n,r,a){var o=n.getItemLayout(r);return{cx:o.cx,cy:o.cy,r0:o.r0,r:o.r,startAngle:o.startAngle,endAngle:o.endAngle,clockwise:o.clockwise}}};function isZeroOnPolar(n){return n.startAngle!=null&&n.endAngle!=null&&n.startAngle===n.endAngle}function createPolarPositionMapping(n){return function(r){var a=r?"Arc":"Angle";return function(o){switch(o){case"start":case"insideStart":case"end":case"insideEnd":return o+a;default:return o}}}(n)}function updateStyle(n,r,a,o,s,l,u,c){var d=r.getItemVisual(a,"style");if(c){if(!l.get("roundCap")){var p=n.shape,v=getSectorCornerRadius(o.getModel("itemStyle"),p,!0);extend$2(p,v),n.setShape(p)}}else{var f=o.get(["itemStyle","borderRadius"])||0;n.setShape("r",f)}n.useStyle(d);var g=o.getShallow("cursor");g&&n.attr("cursor",g);var y=c?u?s.r>=s.r0?"endArc":"startArc":s.endAngle>=s.startAngle?"endAngle":"startAngle":u?s.height>=0?"bottom":"top":s.width>=0?"right":"left",_=getLabelStatesModels(o);setLabelStyle(n,_,{labelFetcher:l,labelDataIndex:a,defaultText:getDefaultLabel(l.getData(),a),inheritColor:d.fill,defaultOpacity:d.opacity,defaultOutsidePosition:y});var S=n.getTextContent();if(c&&S){var b=o.get(["label","position"]);n.textConfig.inside=b==="middle"?!0:null,setSectorTextRotation(n,b==="outside"?y:b,createPolarPositionMapping(u),o.get(["label","rotate"]))}setLabelValueAnimation(S,_,l.getRawValue(a),function(A){return getDefaultInterpolatedLabel(r,A)});var x=o.getModel(["emphasis"]);toggleHoverEmphasis(n,x.get("focus"),x.get("blurScope"),x.get("disabled")),setStatesStylesFromModel(n,o),isZeroOnPolar(s)&&(n.style.fill="none",n.style.stroke="none",each$f(n.states,function(A){A.style&&(A.style.fill=A.style.stroke="none")}))}function getLineWidth(n,r){var a=n.get(["itemStyle","borderColor"]);if(!a||a==="none")return 0;var o=n.get(["itemStyle","borderWidth"])||0,s=isNaN(r.width)?Number.MAX_VALUE:Math.abs(r.width),l=isNaN(r.height)?Number.MAX_VALUE:Math.abs(r.height);return Math.min(o,s,l)}var LagePathShape=function(){function n(){}return n}(),LargePath=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="largeBar",o}return r.prototype.getDefaultShape=function(){return new LagePathShape},r.prototype.buildPath=function(a,o){for(var s=o.points,l=this.baseDimIdx,u=1-this.baseDimIdx,c=[],d=[],f=this.barWidth,p=0;p<s.length;p+=3)d[l]=f,d[u]=s[p+2],c[l]=s[p+l],c[u]=s[p+u],a.rect(c[0],c[1],d[0],d[1])},r}(Path);function createLarge$1(n,r,a,o){var s=n.getData(),l=s.getLayout("valueAxisHorizontal")?1:0,u=s.getLayout("largeDataIndices"),c=s.getLayout("size"),d=n.getModel("backgroundStyle"),f=s.getLayout("largeBackgroundPoints");if(f){var p=new LargePath({shape:{points:f},incremental:!!o,silent:!0,z2:0});p.baseDimIdx=l,p.largeDataIndices=u,p.barWidth=c,p.useStyle(d.getItemStyle()),r.add(p),a&&a.push(p)}var v=new LargePath({shape:{points:s.getLayout("largePoints")},incremental:!!o,ignoreCoarsePointer:!0,z2:1});v.baseDimIdx=l,v.largeDataIndices=u,v.barWidth=c,r.add(v),v.useStyle(s.getVisual("style")),v.style.stroke=null,getECData(v).seriesIndex=n.seriesIndex,n.get("silent")||(v.on("mousedown",largePathUpdateDataIndex),v.on("mousemove",largePathUpdateDataIndex)),a&&a.push(v)}var largePathUpdateDataIndex=throttle$2(function(n){var r=this,a=largePathFindDataIndex(r,n.offsetX,n.offsetY);getECData(r).dataIndex=a>=0?a:null},30,!1);function largePathFindDataIndex(n,r,a){for(var o=n.baseDimIdx,s=1-o,l=n.shape.points,u=n.largeDataIndices,c=[],d=[],f=n.barWidth,p=0,v=l.length/3;p<v;p++){var g=p*3;if(d[o]=f,d[s]=l[g+2],c[o]=l[g+o],c[s]=l[g+s],d[s]<0&&(c[s]+=d[s],d[s]=-d[s]),r>=c[0]&&r<=c[0]+d[0]&&a>=c[1]&&a<=c[1]+d[1])return u[p]}return-1}function createBackgroundShape(n,r,a){if(isCoordinateSystemType(a,"cartesian2d")){var o=r,s=a.getArea();return{x:n?o.x:s.x,y:n?s.y:o.y,width:n?o.width:s.width,height:n?s.height:o.height}}else{var s=a.getArea(),l=r;return{cx:s.cx,cy:s.cy,r0:n?s.r0:l.r0,r:n?s.r:l.r,startAngle:n?l.startAngle:0,endAngle:n?l.endAngle:Math.PI*2}}}function createBackgroundEl(n,r,a){var o=n.type==="polar"?Sector:Rect$2;return new o({shape:createBackgroundShape(r,a,n),silent:!0,z2:0})}function install$R(n){n.registerChartView(BarView),n.registerSeriesModel(BarSeriesModel),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,curry$1(layout$3,"bar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,createProgressiveLayout("bar")),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,dataSample("bar")),n.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(r,a){var o=r.componentType||"series";a.eachComponent({mainType:o,query:r},function(s){r.sortInfo&&s.axis.setCategorySortInfo(r.sortInfo)})})}var PI2$1=Math.PI*2,RADIAN$2=Math.PI/180;function getViewRect$5(n,r){return getLayoutRect(n.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})}function getBasicPieLayout(n,r){var a=getViewRect$5(n,r),o=n.get("center"),s=n.get("radius");isArray$1(s)||(s=[0,s]);var l=parsePercent(a.width,r.getWidth()),u=parsePercent(a.height,r.getHeight()),c=Math.min(l,u),d=parsePercent(s[0],c/2),f=parsePercent(s[1],c/2),p,v,g=n.coordinateSystem;if(g){var y=g.dataToPoint(o);p=y[0]||0,v=y[1]||0}else isArray$1(o)||(o=[o,o]),p=parsePercent(o[0],l)+a.x,v=parsePercent(o[1],u)+a.y;return{cx:p,cy:v,r0:d,r:f}}function pieLayout(n,r,a){r.eachSeriesByType(n,function(o){var s=o.getData(),l=s.mapDimension("value"),u=getViewRect$5(o,a),c=getBasicPieLayout(o,a),d=c.cx,f=c.cy,p=c.r,v=c.r0,g=-o.get("startAngle")*RADIAN$2,y=o.get("endAngle"),_=o.get("padAngle")*RADIAN$2;y=y==="auto"?g-PI2$1:-y*RADIAN$2;var S=o.get("minAngle")*RADIAN$2,b=S+_,x=0;s.each(l,function(U){!isNaN(U)&&x++});var A=s.getSum(l),w=Math.PI/(A||x)*2,E=o.get("clockwise"),D=o.get("roseType"),C=o.get("stillShowZeroSum"),$=s.getDataExtent(l);$[0]=0;var P=E?1:-1,M=[g,y],I=P*_/2;normalizeArcAngles(M,!E),g=M[0],y=M[1];var L=getSeriesLayoutData(o);L.startAngle=g,L.endAngle=y,L.clockwise=E;var O=Math.abs(y-g),R=O,N=0,V=g;if(s.setLayout({viewRect:u,r:p}),s.each(l,function(U,H){var W;if(isNaN(U)){s.setItemLayout(H,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:E,cx:d,cy:f,r0:v,r:D?NaN:p});return}D!=="area"?W=A===0&&C?w:U*w:W=O/x,W<b?(W=b,R-=b):N+=U;var G=V+P*W,B=0,Y=0;_>W?(B=V+P*W/2,Y=B):(B=V+I,Y=G-I),s.setItemLayout(H,{angle:W,startAngle:B,endAngle:Y,clockwise:E,cx:d,cy:f,r0:v,r:D?linearMap$2(U,$,[v,p]):p}),V=G}),R<PI2$1&&x)if(R<=.001){var F=O/x;s.each(l,function(U,H){if(!isNaN(U)){var W=s.getItemLayout(H);W.angle=F;var G=0,B=0;F<_?(G=g+P*(H+1/2)*F,B=G):(G=g+P*H*F+I,B=g+P*(H+1)*F-I),W.startAngle=G,W.endAngle=B}})}else w=R/N,V=g,s.each(l,function(U,H){if(!isNaN(U)){var W=s.getItemLayout(H),G=W.angle===b?b:U*w,B=0,Y=0;G<_?(B=V+P*G/2,Y=B):(B=V+I,Y=V+P*G-I),W.startAngle=B,W.endAngle=Y,V+=P*G}})})}var getSeriesLayoutData=makeInner();function dataFilter$1(n){return{seriesType:n,reset:function(r,a){var o=a.findComponents({mainType:"legend"});if(!(!o||!o.length)){var s=r.getData();s.filterSelf(function(l){for(var u=s.getName(l),c=0;c<o.length;c++)if(!o[c].isSelected(u))return!1;return!0})}}}}var RADIAN$1=Math.PI/180;function adjustSingleSide(n,r,a,o,s,l,u,c,d,f){if(n.length<2)return;function p(S){for(var b=S.rB,x=b*b,A=0;A<S.list.length;A++){var w=S.list[A],E=Math.abs(w.label.y-a),D=o+w.len,C=D*D,$=Math.sqrt(Math.abs((1-E*E/x)*C)),P=r+($+w.len2)*s,M=P-w.label.x,I=w.targetTextWidth-M*s;constrainTextWidth(w,I,!0),w.label.x=P}}function v(S){for(var b={list:[],maxY:0},x={list:[],maxY:0},A=0;A<S.length;A++)if(S[A].labelAlignTo==="none"){var w=S[A],E=w.label.y>a?x:b,D=Math.abs(w.label.y-a);if(D>=E.maxY){var C=w.label.x-r-w.len2*s,$=o+w.len,P=Math.abs(C)<$?Math.sqrt(D*D/(1-C*C/$/$)):$;E.rB=P,E.maxY=D}E.list.push(w)}p(b),p(x)}for(var g=n.length,y=0;y<g;y++)if(n[y].position==="outer"&&n[y].labelAlignTo==="labelLine"){var _=n[y].label.x-f;n[y].linePoints[1][0]+=_,n[y].label.x=f}shiftLayoutOnY(n,d,d+u)&&v(n)}function avoidOverlap(n,r,a,o,s,l,u,c){for(var d=[],f=[],p=Number.MAX_VALUE,v=-Number.MAX_VALUE,g=0;g<n.length;g++){var y=n[g].label;isPositionCenter(n[g])||(y.x<r?(p=Math.min(p,y.x),d.push(n[g])):(v=Math.max(v,y.x),f.push(n[g])))}for(var g=0;g<n.length;g++){var _=n[g];if(!isPositionCenter(_)&&_.linePoints){if(_.labelStyleWidth!=null)continue;var y=_.label,S=_.linePoints,b=void 0;_.labelAlignTo==="edge"?y.x<r?b=S[2][0]-_.labelDistance-u-_.edgeDistance:b=u+s-_.edgeDistance-S[2][0]-_.labelDistance:_.labelAlignTo==="labelLine"?y.x<r?b=p-u-_.bleedMargin:b=u+s-v-_.bleedMargin:y.x<r?b=y.x-u-_.bleedMargin:b=u+s-y.x-_.bleedMargin,_.targetTextWidth=b,constrainTextWidth(_,b)}}adjustSingleSide(f,r,a,o,1,s,l,u,c,v),adjustSingleSide(d,r,a,o,-1,s,l,u,c,p);for(var g=0;g<n.length;g++){var _=n[g];if(!isPositionCenter(_)&&_.linePoints){var y=_.label,S=_.linePoints,x=_.labelAlignTo==="edge",A=y.style.padding,w=A?A[1]+A[3]:0,E=y.style.backgroundColor?0:w,D=_.rect.width+E,C=S[1][0]-S[2][0];x?y.x<r?S[2][0]=u+_.edgeDistance+D+_.labelDistance:S[2][0]=u+s-_.edgeDistance-D-_.labelDistance:(y.x<r?S[2][0]=y.x+_.labelDistance:S[2][0]=y.x-_.labelDistance,S[1][0]=S[2][0]+C),S[1][1]=S[2][1]=y.y}}}function constrainTextWidth(n,r,a){if(a===void 0&&(a=!1),n.labelStyleWidth==null){var o=n.label,s=o.style,l=n.rect,u=s.backgroundColor,c=s.padding,d=c?c[1]+c[3]:0,f=s.overflow,p=l.width+(u?0:d);if(r<p||a){var v=l.height;if(f&&f.match("break")){o.setStyle("backgroundColor",null),o.setStyle("width",r-d);var g=o.getBoundingRect();o.setStyle("width",Math.ceil(g.width)),o.setStyle("backgroundColor",u)}else{var y=r-d,_=r<p?y:a?y>n.unconstrainedWidth?null:y:null;o.setStyle("width",_)}var S=o.getBoundingRect();l.width=S.width;var b=(o.style.margin||0)+2.1;l.height=S.height+b,l.y-=(l.height-v)/2}}}function isPositionCenter(n){return n.position==="center"}function pieLabelLayout(n){var r=n.getData(),a=[],o,s,l=!1,u=(n.get("minShowLabelAngle")||0)*RADIAN$1,c=r.getLayout("viewRect"),d=r.getLayout("r"),f=c.width,p=c.x,v=c.y,g=c.height;function y(C){C.ignore=!0}function _(C){if(!C.ignore)return!0;for(var $ in C.states)if(C.states[$].ignore===!1)return!0;return!1}r.each(function(C){var $=r.getItemGraphicEl(C),P=$.shape,M=$.getTextContent(),I=$.getTextGuideLine(),L=r.getItemModel(C),O=L.getModel("label"),R=O.get("position")||L.get(["emphasis","label","position"]),N=O.get("distanceToLabelLine"),V=O.get("alignTo"),F=parsePercent(O.get("edgeDistance"),f),U=O.get("bleedMargin"),H=L.getModel("labelLine"),W=H.get("length");W=parsePercent(W,f);var G=H.get("length2");if(G=parsePercent(G,f),Math.abs(P.endAngle-P.startAngle)<u){each$f(M.states,y),M.ignore=!0,I&&(each$f(I.states,y),I.ignore=!0);return}if(_(M)){var B=(P.startAngle+P.endAngle)/2,Y=Math.cos(B),Z=Math.sin(B),K,ee,j,q;o=P.cx,s=P.cy;var J=R==="inside"||R==="inner";if(R==="center")K=P.cx,ee=P.cy,q="center";else{var X=(J?(P.r+P.r0)/2*Y:P.r*Y)+o,re=(J?(P.r+P.r0)/2*Z:P.r*Z)+s;if(K=X+Y*3,ee=re+Z*3,!J){var Q=X+Y*(W+d-P.r),te=re+Z*(W+d-P.r),ie=Q+(Y<0?-1:1)*G,ne=te;V==="edge"?K=Y<0?p+F:p+f-F:K=ie+(Y<0?-N:N),ee=ne,j=[[X,re],[Q,te],[ie,ne]]}q=J?"center":V==="edge"?Y>0?"right":"left":Y>0?"left":"right"}var oe=Math.PI,le=0,ce=O.get("rotate");if(isNumber(ce))le=ce*(oe/180);else if(R==="center")le=0;else if(ce==="radial"||ce===!0){var de=Y<0?-B+oe:-B;le=de}else if(ce==="tangential"&&R!=="outside"&&R!=="outer"){var fe=Math.atan2(Y,Z);fe<0&&(fe=oe*2+fe);var pe=Z>0;pe&&(fe=oe+fe),le=fe-oe}if(l=!!le,M.x=K,M.y=ee,M.rotation=le,M.setStyle({verticalAlign:"middle"}),J){M.setStyle({align:q});var xe=M.states.select;xe&&(xe.x+=M.x,xe.y+=M.y)}else{var me=M.getBoundingRect().clone();me.applyTransform(M.getComputedTransform());var Se=(M.style.margin||0)+2.1;me.y-=Se/2,me.height+=Se,a.push({label:M,labelLine:I,position:R,len:W,len2:G,minTurnAngle:H.get("minTurnAngle"),maxSurfaceAngle:H.get("maxSurfaceAngle"),surfaceNormal:new Point(Y,Z),linePoints:j,textAlign:q,labelDistance:N,labelAlignTo:V,edgeDistance:F,bleedMargin:U,rect:me,unconstrainedWidth:me.width,labelStyleWidth:M.style.width})}$.setTextConfig({inside:J})}}),!l&&n.get("avoidLabelOverlap")&&avoidOverlap(a,o,s,d,f,g,p,v);for(var S=0;S<a.length;S++){var b=a[S],x=b.label,A=b.labelLine,w=isNaN(x.x)||isNaN(x.y);if(x){x.setStyle({align:b.textAlign}),w&&(each$f(x.states,y),x.ignore=!0);var E=x.states.select;E&&(E.x+=x.x,E.y+=x.y)}if(A){var D=b.linePoints;w||!D?(each$f(A.states,y),A.ignore=!0):(limitTurnAngle(D,b.minTurnAngle),limitSurfaceAngle(D,b.surfaceNormal,b.maxSurfaceAngle),A.setShape({points:D}),x.__hostTarget.textGuideLineConfig={anchor:new Point(D[0][0],D[0][1])})}}}var PiePiece=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this)||this;l.z2=2;var u=new ZRText;return l.setTextContent(u),l.updateData(a,o,s,!0),l}return r.prototype.updateData=function(a,o,s,l){var u=this,c=a.hostModel,d=a.getItemModel(o),f=d.getModel("emphasis"),p=a.getItemLayout(o),v=extend$2(getSectorCornerRadius(d.getModel("itemStyle"),p,!0),p);if(isNaN(v.startAngle)){u.setShape(v);return}if(l){u.setShape(v);var g=c.getShallow("animationType");c.ecModel.ssr?(initProps(u,{scaleX:0,scaleY:0},c,{dataIndex:o,isFrom:!0}),u.originX=v.cx,u.originY=v.cy):g==="scale"?(u.shape.r=p.r0,initProps(u,{shape:{r:p.r}},c,o)):s!=null?(u.setShape({startAngle:s,endAngle:s}),initProps(u,{shape:{startAngle:p.startAngle,endAngle:p.endAngle}},c,o)):(u.shape.endAngle=p.startAngle,updateProps$1(u,{shape:{endAngle:p.endAngle}},c,o))}else saveOldStyle(u),updateProps$1(u,{shape:v},c,o);u.useStyle(a.getItemVisual(o,"style")),setStatesStylesFromModel(u,d);var y=(p.startAngle+p.endAngle)/2,_=c.get("selectedOffset"),S=Math.cos(y)*_,b=Math.sin(y)*_,x=d.getShallow("cursor");x&&u.attr("cursor",x),this._updateLabel(c,a,o),u.ensureState("emphasis").shape=extend$2({r:p.r+(f.get("scale")&&f.get("scaleSize")||0)},getSectorCornerRadius(f.getModel("itemStyle"),p)),extend$2(u.ensureState("select"),{x:S,y:b,shape:getSectorCornerRadius(d.getModel(["select","itemStyle"]),p)}),extend$2(u.ensureState("blur"),{shape:getSectorCornerRadius(d.getModel(["blur","itemStyle"]),p)});var A=u.getTextGuideLine(),w=u.getTextContent();A&&extend$2(A.ensureState("select"),{x:S,y:b}),extend$2(w.ensureState("select"),{x:S,y:b}),toggleHoverEmphasis(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},r.prototype._updateLabel=function(a,o,s){var l=this,u=o.getItemModel(s),c=u.getModel("labelLine"),d=o.getItemVisual(s,"style"),f=d&&d.fill,p=d&&d.opacity;setLabelStyle(l,getLabelStatesModels(u),{labelFetcher:o.hostModel,labelDataIndex:s,inheritColor:f,defaultOpacity:p,defaultText:a.getFormattedLabel(s,"normal")||o.getName(s)});var v=l.getTextContent();l.setTextConfig({position:null,rotation:null}),v.attr({z2:10});var g=a.get(["label","position"]);if(g!=="outside"&&g!=="outer")l.removeTextGuideLine();else{var y=this.getTextGuideLine();y||(y=new Polyline$1,this.setTextGuideLine(y)),setLabelLineStyle(this,getLabelLineStatesModels(u),{stroke:f,opacity:retrieve3(c.get(["lineStyle","opacity"]),p,1)})}},r}(Sector),PieView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.ignoreLabelLineUpdate=!0,a}return r.prototype.render=function(a,o,s,l){var u=a.getData(),c=this._data,d=this.group,f;if(!c&&u.count()>0){for(var p=u.getItemLayout(0),v=1;isNaN(p&&p.startAngle)&&v<u.count();++v)p=u.getItemLayout(v);p&&(f=p.startAngle)}if(this._emptyCircleSector&&d.remove(this._emptyCircleSector),u.count()===0&&a.get("showEmptyCircle")){var g=getSeriesLayoutData(a),y=new Sector({shape:extend$2(getBasicPieLayout(a,s),g)});y.useStyle(a.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=y,d.add(y)}u.diff(c).add(function(_){var S=new PiePiece(u,_,f);u.setItemGraphicEl(_,S),d.add(S)}).update(function(_,S){var b=c.getItemGraphicEl(S);b.updateData(u,_,f),b.off("click"),d.add(b),u.setItemGraphicEl(_,b)}).remove(function(_){var S=c.getItemGraphicEl(_);removeElementWithFadeOut(S,a,_)}).execute(),pieLabelLayout(a),a.get("animationTypeUpdate")!=="expansion"&&(this._data=u)},r.prototype.dispose=function(){},r.prototype.containPoint=function(a,o){var s=o.getData(),l=s.getItemLayout(0);if(l){var u=a[0]-l.cx,c=a[1]-l.cy,d=Math.sqrt(u*u+c*c);return d<=l.r&&d>=l.r0}},r.type="pie",r}(ChartView);function createSeriesDataSimply(n,r,a){r=isArray$1(r)&&{coordDimensions:r}||extend$2({encodeDefine:n.getEncode()},r);var o=n.getSource(),s=prepareSeriesDataSchema(o,r).dimensions,l=new SeriesData(s,n);return l.initData(o,a),l}var LegendVisualProvider=function(){function n(r,a){this._getDataWithEncodedVisual=r,this._getRawData=a}return n.prototype.getAllNames=function(){var r=this._getRawData();return r.mapArray(r.getName)},n.prototype.containName=function(r){var a=this._getRawData();return a.indexOfName(r)>=0},n.prototype.indexOfName=function(r){var a=this._getDataWithEncodedVisual();return a.indexOfName(r)},n.prototype.getItemVisual=function(r,a){var o=this._getDataWithEncodedVisual();return o.getItemVisual(r,a)},n}(),innerData=makeInner(),PieSeriesModel=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.init=function(a){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this)),this._defaultLabelLine(a)},r.prototype.mergeOption=function(){n.prototype.mergeOption.apply(this,arguments)},r.prototype.getInitialData=function(){return createSeriesDataSimply(this,{coordDimensions:["value"],encodeDefaulter:curry$1(makeSeriesEncodeForNameBased,this)})},r.prototype.getDataParams=function(a){var o=this.getData(),s=innerData(o),l=s.seats;if(!l){var u=[];o.each(o.mapDimension("value"),function(d){u.push(d)}),l=s.seats=getPercentSeats(u,o.hostModel.get("percentPrecision"))}var c=n.prototype.getDataParams.call(this,a);return c.percent=l[a]||0,c.$vars.push("percent"),c},r.prototype._defaultLabelLine=function(a){defaultEmphasis(a,"labelLine",["show"]);var o=a.labelLine,s=a.emphasis.labelLine;o.show=o.show&&a.label.show,s.show=s.show&&a.emphasis.label.show},r.type="series.pie",r.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,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%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,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"},r}(SeriesModel);function negativeDataFilter(n){return{seriesType:n,reset:function(r,a){var o=r.getData();o.filterSelf(function(s){var l=o.mapDimension("value"),u=o.get(l,s);return!(isNumber(u)&&!isNaN(u)&&u<0)})}}}function install$Q(n){n.registerChartView(PieView),n.registerSeriesModel(PieSeriesModel),createLegacyDataSelectAction("pie",n.registerAction),n.registerLayout(curry$1(pieLayout,"pie")),n.registerProcessor(dataFilter$1("pie")),n.registerProcessor(negativeDataFilter("pie"))}var ScatterSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.hasSymbolVisual=!0,a}return r.prototype.getInitialData=function(a,o){return createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.getProgressive=function(){var a=this.option.progressive;return a==null?this.option.large?5e3:this.get("progressive"):a},r.prototype.getProgressiveThreshold=function(){var a=this.option.progressiveThreshold;return a==null?this.option.large?1e4:this.get("progressiveThreshold"):a},r.prototype.brushSelector=function(a,o,s){return s.point(o.getItemLayout(a))},r.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},r.type="series.scatter",r.dependencies=["grid","polar","geo","singleAxis","calendar"],r.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},r}(SeriesModel),BOOST_SIZE_THRESHOLD=4,LargeSymbolPathShape=function(){function n(){}return n}(),LargeSymbolPath=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o._off=0,o.hoverDataIdx=-1,o}return r.prototype.getDefaultShape=function(){return new LargeSymbolPathShape},r.prototype.reset=function(){this.notClear=!1,this._off=0},r.prototype.buildPath=function(a,o){var s=o.points,l=o.size,u=this.symbolProxy,c=u.shape,d=a.getContext?a.getContext():a,f=d&&l[0]<BOOST_SIZE_THRESHOLD,p=this.softClipShape,v;if(f){this._ctx=d;return}for(this._ctx=null,v=this._off;v<s.length;){var g=s[v++],y=s[v++];isNaN(g)||isNaN(y)||p&&!p.contain(g,y)||(c.x=g-l[0]/2,c.y=y-l[1]/2,c.width=l[0],c.height=l[1],u.buildPath(a,c,!0))}this.incremental&&(this._off=v,this.notClear=!0)},r.prototype.afterBrush=function(){var a=this.shape,o=a.points,s=a.size,l=this._ctx,u=this.softClipShape,c;if(l){for(c=this._off;c<o.length;){var d=o[c++],f=o[c++];isNaN(d)||isNaN(f)||u&&!u.contain(d,f)||l.fillRect(d-s[0]/2,f-s[1]/2,s[0],s[1])}this.incremental&&(this._off=c,this.notClear=!0)}},r.prototype.findDataIndex=function(a,o){for(var s=this.shape,l=s.points,u=s.size,c=Math.max(u[0],4),d=Math.max(u[1],4),f=l.length/2-1;f>=0;f--){var p=f*2,v=l[p]-c/2,g=l[p+1]-d/2;if(a>=v&&o>=g&&a<=v+c&&o<=g+d)return f}return-1},r.prototype.contain=function(a,o){var s=this.transformCoordToLocal(a,o),l=this.getBoundingRect();if(a=s[0],o=s[1],l.contain(a,o)){var u=this.hoverDataIdx=this.findDataIndex(a,o);return u>=0}return this.hoverDataIdx=-1,!1},r.prototype.getBoundingRect=function(){var a=this._rect;if(!a){for(var o=this.shape,s=o.points,l=o.size,u=l[0],c=l[1],d=1/0,f=1/0,p=-1/0,v=-1/0,g=0;g<s.length;){var y=s[g++],_=s[g++];d=Math.min(y,d),p=Math.max(y,p),f=Math.min(_,f),v=Math.max(_,v)}a=this._rect=new BoundingRect(d-u/2,f-c/2,p-d+u,v-f+c)}return a},r}(Path),LargeSymbolDraw=function(){function n(){this.group=new Group$3}return n.prototype.updateData=function(r,a){this._clear();var o=this._create();o.setShape({points:r.getLayout("points")}),this._setCommon(o,r,a)},n.prototype.updateLayout=function(r){var a=r.getLayout("points");this.group.eachChild(function(o){if(o.startIndex!=null){var s=(o.endIndex-o.startIndex)*2,l=o.startIndex*4*2;a=new Float32Array(a.buffer,l,s)}o.setShape("points",a),o.reset()})},n.prototype.incrementalPrepareUpdate=function(r){this._clear()},n.prototype.incrementalUpdate=function(r,a,o){var s=this._newAdded[0],l=a.getLayout("points"),u=s&&s.shape.points;if(u&&u.length<2e4){var c=u.length,d=new Float32Array(c+l.length);d.set(u),d.set(l,c),s.endIndex=r.end,s.setShape({points:d})}else{this._newAdded=[];var f=this._create();f.startIndex=r.start,f.endIndex=r.end,f.incremental=!0,f.setShape({points:l}),this._setCommon(f,a,o)}},n.prototype.eachRendered=function(r){this._newAdded[0]&&r(this._newAdded[0])},n.prototype._create=function(){var r=new LargeSymbolPath({cursor:"default"});return r.ignoreCoarsePointer=!0,this.group.add(r),this._newAdded.push(r),r},n.prototype._setCommon=function(r,a,o){var s=a.hostModel;o=o||{};var l=a.getVisual("symbolSize");r.setShape("size",l instanceof Array?l:[l,l]),r.softClipShape=o.clipShape||null,r.symbolProxy=createSymbol$1(a.getVisual("symbol"),0,0,0,0),r.setColor=r.symbolProxy.setColor;var u=r.shape.size[0]<BOOST_SIZE_THRESHOLD;r.useStyle(s.getModel("itemStyle").getItemStyle(u?["color","shadowBlur","shadowColor"]:["color"]));var c=a.getVisual("style"),d=c&&c.fill;d&&r.setColor(d);var f=getECData(r);f.seriesIndex=s.seriesIndex,r.on("mousemove",function(p){f.dataIndex=null;var v=r.hoverDataIdx;v>=0&&(f.dataIndex=v+(r.startIndex||0))})},n.prototype.remove=function(){this._clear()},n.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},n}(),ScatterView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){var l=a.getData(),u=this._updateSymbolDraw(l,a);u.updateData(l,{clipShape:this._getClipShape(a)}),this._finished=!0},r.prototype.incrementalPrepareRender=function(a,o,s){var l=a.getData(),u=this._updateSymbolDraw(l,a);u.incrementalPrepareUpdate(l),this._finished=!1},r.prototype.incrementalRender=function(a,o,s){this._symbolDraw.incrementalUpdate(a,o.getData(),{clipShape:this._getClipShape(o)}),this._finished=a.end===o.getData().count()},r.prototype.updateTransform=function(a,o,s){var l=a.getData();if(this.group.dirty(),!this._finished||l.count()>1e4)return{update:!0};var u=pointsLayout("").reset(a,o,s);u.progress&&u.progress({start:0,end:l.count(),count:l.count()},l),this._symbolDraw.updateLayout(l)},r.prototype.eachRendered=function(a){this._symbolDraw&&this._symbolDraw.eachRendered(a)},r.prototype._getClipShape=function(a){if(a.get("clip",!0)){var o=a.coordinateSystem;return o&&o.getArea&&o.getArea(.1)}},r.prototype._updateSymbolDraw=function(a,o){var s=this._symbolDraw,l=o.pipelineContext,u=l.large;return(!s||u!==this._isLargeDraw)&&(s&&s.remove(),s=this._symbolDraw=u?new LargeSymbolDraw:new SymbolDraw,this._isLargeDraw=u,this.group.removeAll()),this.group.add(s.group),s},r.prototype.remove=function(a,o){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},r.prototype.dispose=function(){},r.type="scatter",r}(ChartView),GridModel=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.type="grid",r.dependencies=["xAxis","yAxis"],r.layoutMode="box",r.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},r}(ComponentModel),CartesianAxisModel=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",SINGLE_REFERRING).models[0]},r.type="cartesian2dAxis",r}(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:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},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},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},categoryAxis=merge({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"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:"#F4F7FD",width:1}}},defaultOption$1),timeAxis=merge({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},valueAxis),logAxis=defaults$2({logBase:10},valueAxis);const axisDefault={category:categoryAxis,value:valueAxis,time:timeAxis,log:logAxis};var AXIS_TYPES={value:1,category:1,time:1,log:1};function axisModelCreator(n,r,a,o){each$f(AXIS_TYPES,function(s,l){var u=merge(merge({},axisDefault[l],!0),o,!0),c=function(d){__extends(f,d);function f(){var p=d!==null&&d.apply(this,arguments)||this;return p.type=r+"Axis."+l,p}return f.prototype.mergeDefaultAndTheme=function(p,v){var g=fetchLayoutMode(this),y=g?getLayoutParams(p):{},_=v.getTheme();merge(p,_.get(l+"Axis")),merge(p,this.getDefaultOption()),p.type=getAxisType(p),g&&mergeLayoutParam(p,y,g)},f.prototype.optionUpdated=function(){var p=this.option;p.type==="category"&&(this.__ordinalMeta=OrdinalMeta.createByAxisModel(this))},f.prototype.getCategories=function(p){var v=this.option;if(v.type==="category")return p?v.data:this.__ordinalMeta.categories},f.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},f.type=r+"Axis."+l,f.defaultOption=u,f}(a);n.registerComponentModel(c)}),n.registerSubTypeDefaulter(r+"Axis",getAxisType)}function getAxisType(n){return n.type||(n.data?"category":"value")}var Cartesian=function(){function n(r){this.type="cartesian",this._dimList=[],this._axes={},this.name=r||""}return n.prototype.getAxis=function(r){return this._axes[r]},n.prototype.getAxes=function(){return map$1(this._dimList,function(r){return this._axes[r]},this)},n.prototype.getAxesByScale=function(r){return r=r.toLowerCase(),filter(this.getAxes(),function(a){return a.scale.type===r})},n.prototype.addAxis=function(r){var a=r.dim;this._axes[a]=r,this._dimList.push(a)},n}(),cartesian2DDimensions=["x","y"];function canCalculateAffineTransform(n){return n.type==="interval"||n.type==="time"}var Cartesian2D=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type="cartesian2d",a.dimensions=cartesian2DDimensions,a}return r.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var a=this.getAxis("x").scale,o=this.getAxis("y").scale;if(!(!canCalculateAffineTransform(a)||!canCalculateAffineTransform(o))){var s=a.getExtent(),l=o.getExtent(),u=this.dataToPoint([s[0],l[0]]),c=this.dataToPoint([s[1],l[1]]),d=s[1]-s[0],f=l[1]-l[0];if(!(!d||!f)){var p=(c[0]-u[0])/d,v=(c[1]-u[1])/f,g=u[0]-s[0]*p,y=u[1]-l[0]*v,_=this._transform=[p,0,0,v,g,y];this._invTransform=invert([],_)}}},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},r.prototype.containPoint=function(a){var o=this.getAxis("x"),s=this.getAxis("y");return o.contain(o.toLocalCoord(a[0]))&&s.contain(s.toLocalCoord(a[1]))},r.prototype.containData=function(a){return this.getAxis("x").containData(a[0])&&this.getAxis("y").containData(a[1])},r.prototype.containZone=function(a,o){var s=this.dataToPoint(a),l=this.dataToPoint(o),u=this.getArea(),c=new BoundingRect(s[0],s[1],l[0]-s[0],l[1]-s[1]);return u.intersect(c)},r.prototype.dataToPoint=function(a,o,s){s=s||[];var l=a[0],u=a[1];if(this._transform&&l!=null&&isFinite(l)&&u!=null&&isFinite(u))return applyTransform$1(s,a,this._transform);var c=this.getAxis("x"),d=this.getAxis("y");return s[0]=c.toGlobalCoord(c.dataToCoord(l,o)),s[1]=d.toGlobalCoord(d.dataToCoord(u,o)),s},r.prototype.clampData=function(a,o){var s=this.getAxis("x").scale,l=this.getAxis("y").scale,u=s.getExtent(),c=l.getExtent(),d=s.parse(a[0]),f=l.parse(a[1]);return o=o||[],o[0]=Math.min(Math.max(Math.min(u[0],u[1]),d),Math.max(u[0],u[1])),o[1]=Math.min(Math.max(Math.min(c[0],c[1]),f),Math.max(c[0],c[1])),o},r.prototype.pointToData=function(a,o){var s=[];if(this._invTransform)return applyTransform$1(s,a,this._invTransform);var l=this.getAxis("x"),u=this.getAxis("y");return s[0]=l.coordToData(l.toLocalCoord(a[0]),o),s[1]=u.coordToData(u.toLocalCoord(a[1]),o),s},r.prototype.getOtherAxis=function(a){return this.getAxis(a.dim==="x"?"y":"x")},r.prototype.getArea=function(a){a=a||0;var o=this.getAxis("x").getGlobalExtent(),s=this.getAxis("y").getGlobalExtent(),l=Math.min(o[0],o[1])-a,u=Math.min(s[0],s[1])-a,c=Math.max(o[0],o[1])-l+a,d=Math.max(s[0],s[1])-u+a;return new BoundingRect(l,u,c,d)},r}(Cartesian),Axis2D=function(n){__extends(r,n);function r(a,o,s,l,u){var c=n.call(this,a,o,s)||this;return c.index=0,c.type=l||"value",c.position=u||"bottom",c}return r.prototype.isHorizontal=function(){var a=this.position;return a==="top"||a==="bottom"},r.prototype.getGlobalExtent=function(a){var o=this.getExtent();return o[0]=this.toGlobalCoord(o[0]),o[1]=this.toGlobalCoord(o[1]),a&&o[0]>o[1]&&o.reverse(),o},r.prototype.pointToData=function(a,o){return this.coordToData(this.toLocalCoord(a[this.dim==="x"?0:1]),o)},r.prototype.setCategorySortInfo=function(a){if(this.type!=="category")return!1;this.model.option.categorySortInfo=a,this.scale.setSortInfo(a)},r}(Axis);function layout$2(n,r,a){a=a||{};var o=n.coordinateSystem,s=r.axis,l={},u=s.getAxesOnZeroOf()[0],c=s.position,d=u?"onZero":c,f=s.dim,p=o.getRect(),v=[p.x,p.x+p.width,p.y,p.y+p.height],g={left:0,right:1,top:0,bottom:1,onZero:2},y=r.get("offset")||0,_=f==="x"?[v[2]-y,v[3]+y]:[v[0]-y,v[1]+y];if(u){var S=u.toGlobalCoord(u.dataToCoord(0));_[g.onZero]=Math.max(Math.min(S,_[1]),_[0])}l.position=[f==="y"?_[g[d]]:v[0],f==="x"?_[g[d]]:v[3]],l.rotation=Math.PI/2*(f==="x"?0:1);var b={top:-1,bottom:1,left:-1,right:1};l.labelDirection=l.tickDirection=l.nameDirection=b[c],l.labelOffset=u?_[g[c]]-_[g.onZero]:0,r.get(["axisTick","inside"])&&(l.tickDirection=-l.tickDirection),retrieve(a.labelInside,r.get(["axisLabel","inside"]))&&(l.labelDirection=-l.labelDirection);var x=r.get(["axisLabel","rotate"]);return l.labelRotate=d==="top"?-x:x,l.z2=1,l}function isCartesian2DSeries(n){return n.get("coordinateSystem")==="cartesian2d"}function findAxisModels(n){var r={xAxisModel:null,yAxisModel:null};return each$f(r,function(a,o){var s=o.replace(/Model$/,""),l=n.getReferringComponents(s,SINGLE_REFERRING).models[0];r[o]=l}),r}var mathLog=Math.log;function alignScaleTicks(n,r,a){var o=IntervalScale.prototype,s=o.getTicks.call(a),l=o.getTicks.call(a,!0),u=s.length-1,c=o.getInterval.call(a),d=getScaleExtent(n,r),f=d.extent,p=d.fixMin,v=d.fixMax;if(n.type==="log"){var g=mathLog(n.base);f=[mathLog(f[0])/g,mathLog(f[1])/g]}n.setExtent(f[0],f[1]),n.calcNiceExtent({splitNumber:u,fixMin:p,fixMax:v});var y=o.getExtent.call(n);p&&(f[0]=y[0]),v&&(f[1]=y[1]);var _=o.getInterval.call(n),S=f[0],b=f[1];if(p&&v)_=(b-S)/u;else if(p)for(b=f[0]+_*u;b<f[1]&&isFinite(b)&&isFinite(f[1]);)_=increaseInterval(_),b=f[0]+_*u;else if(v)for(S=f[1]-_*u;S>f[0]&&isFinite(S)&&isFinite(f[0]);)_=increaseInterval(_),S=f[1]-_*u;else{var x=n.getTicks().length-1;x>u&&(_=increaseInterval(_));var A=_*u;b=Math.ceil(f[1]/_)*_,S=round$3(b-A),S<0&&f[0]>=0?(S=0,b=round$3(A)):b>0&&f[1]<=0&&(b=0,S=-round$3(A))}var w=(s[0].value-l[0].value)/c,E=(s[u].value-l[u].value)/c;o.setExtent.call(n,S+_*w,b+_*E),o.setInterval.call(n,_),(w||E)&&o.setNiceExtent.call(n,S+_,b-_)}var Grid=function(){function n(r,a,o){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=cartesian2DDimensions,this._initCartesian(r,a,o),this.model=r}return n.prototype.getRect=function(){return this._rect},n.prototype.update=function(r,a){var o=this._axesMap;this._updateScale(r,this.model);function s(u){var c,d=keys(u),f=d.length;if(f){for(var p=[],v=f-1;v>=0;v--){var g=+d[v],y=u[g],_=y.model,S=y.scale;isIntervalOrLogScale(S)&&_.get("alignTicks")&&_.get("interval")==null?p.push(y):(niceScaleExtent(S,_),isIntervalOrLogScale(S)&&(c=y))}p.length&&(c||(c=p.pop(),niceScaleExtent(c.scale,c.model)),each$f(p,function(b){alignScaleTicks(b.scale,b.model,c.scale)}))}}s(o.x),s(o.y);var l={};each$f(o.x,function(u){fixAxisOnZero(o,"y",u,l)}),each$f(o.y,function(u){fixAxisOnZero(o,"x",u,l)}),this.resize(this.model,a)},n.prototype.resize=function(r,a,o){var s=r.getBoxLayoutParams(),l=!o&&r.get("containLabel"),u=getLayoutRect(s,{width:a.getWidth(),height:a.getHeight()});this._rect=u;var c=this._axesList;d(),l&&(each$f(c,function(f){if(!f.model.get(["axisLabel","inside"])){var p=estimateLabelUnionRect(f);if(p){var v=f.isHorizontal()?"height":"width",g=f.model.get(["axisLabel","margin"]);u[v]-=p[v]+g,f.position==="top"?u.y+=p.height+g:f.position==="left"&&(u.x+=p.width+g)}}}),d()),each$f(this._coordsList,function(f){f.calcAffineTransform()});function d(){each$f(c,function(f){var p=f.isHorizontal(),v=p?[0,u.width]:[0,u.height],g=f.inverse?1:0;f.setExtent(v[g],v[1-g]),updateAxisTransform(f,p?u.x:u.y)})}},n.prototype.getAxis=function(r,a){var o=this._axesMap[r];if(o!=null)return o[a||0]},n.prototype.getAxes=function(){return this._axesList.slice()},n.prototype.getCartesian=function(r,a){if(r!=null&&a!=null){var o="x"+r+"y"+a;return this._coordsMap[o]}isObject$3(r)&&(a=r.yAxisIndex,r=r.xAxisIndex);for(var s=0,l=this._coordsList;s<l.length;s++)if(l[s].getAxis("x").index===r||l[s].getAxis("y").index===a)return l[s]},n.prototype.getCartesians=function(){return this._coordsList.slice()},n.prototype.convertToPixel=function(r,a,o){var s=this._findConvertTarget(a);return s.cartesian?s.cartesian.dataToPoint(o):s.axis?s.axis.toGlobalCoord(s.axis.dataToCoord(o)):null},n.prototype.convertFromPixel=function(r,a,o){var s=this._findConvertTarget(a);return s.cartesian?s.cartesian.pointToData(o):s.axis?s.axis.coordToData(s.axis.toLocalCoord(o)):null},n.prototype._findConvertTarget=function(r){var a=r.seriesModel,o=r.xAxisModel||a&&a.getReferringComponents("xAxis",SINGLE_REFERRING).models[0],s=r.yAxisModel||a&&a.getReferringComponents("yAxis",SINGLE_REFERRING).models[0],l=r.gridModel,u=this._coordsList,c,d;if(a)c=a.coordinateSystem,indexOf(u,c)<0&&(c=null);else if(o&&s)c=this.getCartesian(o.componentIndex,s.componentIndex);else if(o)d=this.getAxis("x",o.componentIndex);else if(s)d=this.getAxis("y",s.componentIndex);else if(l){var f=l.coordinateSystem;f===this&&(c=this._coordsList[0])}return{cartesian:c,axis:d}},n.prototype.containPoint=function(r){var a=this._coordsList[0];if(a)return a.containPoint(r)},n.prototype._initCartesian=function(r,a,o){var s=this,l=this,u={left:!1,right:!1,top:!1,bottom:!1},c={x:{},y:{}},d={x:0,y:0};if(a.eachComponent("xAxis",f("x"),this),a.eachComponent("yAxis",f("y"),this),!d.x||!d.y){this._axesMap={},this._axesList=[];return}this._axesMap=c,each$f(c.x,function(p,v){each$f(c.y,function(g,y){var _="x"+v+"y"+y,S=new Cartesian2D(_);S.master=s,S.model=r,s._coordsMap[_]=S,s._coordsList.push(S),S.addAxis(p),S.addAxis(g)})});function f(p){return function(v,g){if(isAxisUsedInTheGrid(v,r)){var y=v.get("position");p==="x"?y!=="top"&&y!=="bottom"&&(y=u.bottom?"top":"bottom"):y!=="left"&&y!=="right"&&(y=u.left?"right":"left"),u[y]=!0;var _=new Axis2D(p,createScaleByModel$1(v),[0,0],v.get("type"),y),S=_.type==="category";_.onBand=S&&v.get("boundaryGap"),_.inverse=v.get("inverse"),v.axis=_,_.model=v,_.grid=l,_.index=g,l._axesList.push(_),c[p][g]=_,d[p]++}}}},n.prototype._updateScale=function(r,a){each$f(this._axesList,function(s){if(s.scale.setExtent(1/0,-1/0),s.type==="category"){var l=s.model.get("categorySortInfo");s.scale.setSortInfo(l)}}),r.eachSeries(function(s){if(isCartesian2DSeries(s)){var l=findAxisModels(s),u=l.xAxisModel,c=l.yAxisModel;if(!isAxisUsedInTheGrid(u,a)||!isAxisUsedInTheGrid(c,a))return;var d=this.getCartesian(u.componentIndex,c.componentIndex),f=s.getData(),p=d.getAxis("x"),v=d.getAxis("y");o(f,p),o(f,v)}},this);function o(s,l){each$f(getDataDimensionsOnAxis(s,l.dim),function(u){l.scale.unionExtentFromData(s,u)})}},n.prototype.getTooltipAxes=function(r){var a=[],o=[];return each$f(this.getCartesians(),function(s){var l=r!=null&&r!=="auto"?s.getAxis(r):s.getBaseAxis(),u=s.getOtherAxis(l);indexOf(a,l)<0&&a.push(l),indexOf(o,u)<0&&o.push(u)}),{baseAxes:a,otherAxes:o}},n.create=function(r,a){var o=[];return r.eachComponent("grid",function(s,l){var u=new n(s,r,a);u.name="grid_"+l,u.resize(s,a,!0),s.coordinateSystem=u,o.push(u)}),r.eachSeries(function(s){if(isCartesian2DSeries(s)){var l=findAxisModels(s),u=l.xAxisModel,c=l.yAxisModel,d=u.getCoordSysModel(),f=d.coordinateSystem;s.coordinateSystem=f.getCartesian(u.componentIndex,c.componentIndex)}}),o},n.dimensions=cartesian2DDimensions,n}();function isAxisUsedInTheGrid(n,r){return n.getCoordSysModel()===r}function fixAxisOnZero(n,r,a,o){a.getAxesOnZeroOf=function(){return l?[l]:[]};var s=n[r],l,u=a.model,c=u.get(["axisLine","onZero"]),d=u.get(["axisLine","onZeroAxisIndex"]);if(!c)return;if(d!=null)canOnZeroToAxis(s[d])&&(l=s[d]);else for(var f in s)if(s.hasOwnProperty(f)&&canOnZeroToAxis(s[f])&&!o[p(s[f])]){l=s[f];break}l&&(o[p(l)]=!0);function p(v){return v.dim+"_"+v.index}}function canOnZeroToAxis(n){return n&&n.type!=="category"&&n.type!=="time"&&ifAxisCrossZero(n)}function updateAxisTransform(n,r){var a=n.getExtent(),o=a[0]+a[1];n.toGlobalCoord=n.dim==="x"?function(s){return s+r}:function(s){return o-s+r},n.toLocalCoord=n.dim==="x"?function(s){return s-r}:function(s){return o-s+r}}var PI$4=Math.PI,AxisBuilder=function(){function n(r,a){this.group=new Group$3,this.opt=a,this.axisModel=r,defaults$2(a,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var o=new Group$3({x:a.position[0],y:a.position[1],rotation:a.rotation});o.updateTransform(),this._transformGroup=o}return n.prototype.hasBuilder=function(r){return!!builders[r]},n.prototype.add=function(r){builders[r](this.opt,this.axisModel,this.group,this._transformGroup)},n.prototype.getGroup=function(){return this.group},n.innerTextLayout=function(r,a,o){var s=remRadian(a-r),l,u;return isRadianAroundZero(s)?(u=o>0?"top":"bottom",l="center"):isRadianAroundZero(s-PI$4)?(u=o>0?"bottom":"top",l="center"):(u="middle",s>0&&s<PI$4?l=o>0?"right":"left":l=o>0?"left":"right"),{rotation:s,textAlign:l,textVerticalAlign:u}},n.makeAxisEventDataBase=function(r){var a={componentType:r.mainType,componentIndex:r.componentIndex};return a[r.mainType+"Index"]=r.componentIndex,a},n.isLabelSilent=function(r){var a=r.get("tooltip");return r.get("silent")||!(r.get("triggerEvent")||a&&a.show)},n}(),builders={axisLine:function(n,r,a,o){var s=r.get(["axisLine","show"]);if(s==="auto"&&n.handleAutoShown&&(s=n.handleAutoShown("axisLine")),!!s){var l=r.axis.getExtent(),u=o.transform,c=[l[0],0],d=[l[1],0],f=c[0]>d[0];u&&(applyTransform$1(c,c,u),applyTransform$1(d,d,u));var p=extend$2({lineCap:"round"},r.getModel(["axisLine","lineStyle"]).getLineStyle()),v=new Line$1({shape:{x1:c[0],y1:c[1],x2:d[0],y2:d[1]},style:p,strokeContainThreshold:n.strokeContainThreshold||5,silent:!0,z2:1});subPixelOptimizeLine(v.shape,v.style.lineWidth),v.anid="line",a.add(v);var g=r.get(["axisLine","symbol"]);if(g!=null){var y=r.get(["axisLine","symbolSize"]);isString(g)&&(g=[g,g]),(isString(y)||isNumber(y))&&(y=[y,y]);var _=normalizeSymbolOffset(r.get(["axisLine","symbolOffset"])||0,y),S=y[0],b=y[1];each$f([{rotate:n.rotation+Math.PI/2,offset:_[0],r:0},{rotate:n.rotation-Math.PI/2,offset:_[1],r:Math.sqrt((c[0]-d[0])*(c[0]-d[0])+(c[1]-d[1])*(c[1]-d[1]))}],function(x,A){if(g[A]!=="none"&&g[A]!=null){var w=createSymbol$1(g[A],-S/2,-b/2,S,b,p.stroke,!0),E=x.r+x.offset,D=f?d:c;w.attr({rotation:x.rotate,x:D[0]+E*Math.cos(n.rotation),y:D[1]-E*Math.sin(n.rotation),silent:!0,z2:11}),a.add(w)}})}}},axisTickLabel:function(n,r,a,o){var s=buildAxisMajorTicks(a,o,r,n),l=buildAxisLabel(a,o,r,n);if(fixMinMaxLabelShow(r,l,s),buildAxisMinorTicks(a,o,r,n.tickDirection),r.get(["axisLabel","hideOverlap"])){var u=prepareLayoutList(map$1(l,function(c){return{label:c,priority:c.z2,defaultAttr:{ignore:c.ignore}}}));hideOverlap(u)}},axisName:function(n,r,a,o){var s=retrieve(n.axisName,r.get("name"));if(s){var l=r.get("nameLocation"),u=n.nameDirection,c=r.getModel("nameTextStyle"),d=r.get("nameGap")||0,f=r.axis.getExtent(),p=f[0]>f[1]?-1:1,v=[l==="start"?f[0]-p*d:l==="end"?f[1]+p*d:(f[0]+f[1])/2,isNameLocationCenter(l)?n.labelOffset+u*d:0],g,y=r.get("nameRotate");y!=null&&(y=y*PI$4/180);var _;isNameLocationCenter(l)?g=AxisBuilder.innerTextLayout(n.rotation,y!=null?y:n.rotation,u):(g=endTextLayout(n.rotation,l,y||0,f),_=n.axisNameAvailableWidth,_!=null&&(_=Math.abs(_/Math.sin(g.rotation)),!isFinite(_)&&(_=null)));var S=c.getFont(),b=r.get("nameTruncate",!0)||{},x=b.ellipsis,A=retrieve(n.nameTruncateMaxWidth,b.maxWidth,_),w=new ZRText({x:v[0],y:v[1],rotation:g.rotation,silent:AxisBuilder.isLabelSilent(r),style:createTextStyle$1(c,{text:s,font:S,overflow:"truncate",width:A,ellipsis:x,fill:c.getTextColor()||r.get(["axisLine","lineStyle","color"]),align:c.get("align")||g.textAlign,verticalAlign:c.get("verticalAlign")||g.textVerticalAlign}),z2:1});if(setTooltipConfig({el:w,componentModel:r,itemName:s}),w.__fullText=s,w.anid="name",r.get("triggerEvent")){var E=AxisBuilder.makeAxisEventDataBase(r);E.targetType="axisName",E.name=s,getECData(w).eventData=E}o.add(w),w.updateTransform(),a.add(w),w.decomposeTransform()}}};function endTextLayout(n,r,a,o){var s=remRadian(a-n),l,u,c=o[0]>o[1],d=r==="start"&&!c||r!=="start"&&c;return isRadianAroundZero(s-PI$4/2)?(u=d?"bottom":"top",l="center"):isRadianAroundZero(s-PI$4*1.5)?(u=d?"top":"bottom",l="center"):(u="middle",s<PI$4*1.5&&s>PI$4/2?l=d?"left":"right":l=d?"right":"left"),{rotation:s,textAlign:l,textVerticalAlign:u}}function fixMinMaxLabelShow(n,r,a){if(!shouldShowAllLabels(n.axis)){var o=n.get(["axisLabel","showMinLabel"]),s=n.get(["axisLabel","showMaxLabel"]);r=r||[],a=a||[];var l=r[0],u=r[1],c=r[r.length-1],d=r[r.length-2],f=a[0],p=a[1],v=a[a.length-1],g=a[a.length-2];o===!1?(ignoreEl(l),ignoreEl(f)):isTwoLabelOverlapped(l,u)&&(o?(ignoreEl(u),ignoreEl(p)):(ignoreEl(l),ignoreEl(f))),s===!1?(ignoreEl(c),ignoreEl(v)):isTwoLabelOverlapped(d,c)&&(s?(ignoreEl(d),ignoreEl(g)):(ignoreEl(c),ignoreEl(v)))}}function ignoreEl(n){n&&(n.ignore=!0)}function isTwoLabelOverlapped(n,r){var a=n&&n.getBoundingRect().clone(),o=r&&r.getBoundingRect().clone();if(!(!a||!o)){var s=identity([]);return rotate(s,s,-n.rotation),a.applyTransform(mul([],s,n.getLocalTransform())),o.applyTransform(mul([],s,r.getLocalTransform())),a.intersect(o)}}function isNameLocationCenter(n){return n==="middle"||n==="center"}function createTicks(n,r,a,o,s){for(var l=[],u=[],c=[],d=0;d<n.length;d++){var f=n[d].coord;u[0]=f,u[1]=0,c[0]=f,c[1]=a,r&&(applyTransform$1(u,u,r),applyTransform$1(c,c,r));var p=new Line$1({shape:{x1:u[0],y1:u[1],x2:c[0],y2:c[1]},style:o,z2:2,autoBatch:!0,silent:!0});subPixelOptimizeLine(p.shape,p.style.lineWidth),p.anid=s+"_"+n[d].tickValue,l.push(p)}return l}function buildAxisMajorTicks(n,r,a,o){var s=a.axis,l=a.getModel("axisTick"),u=l.get("show");if(u==="auto"&&o.handleAutoShown&&(u=o.handleAutoShown("axisTick")),!(!u||s.scale.isBlank())){for(var c=l.getModel("lineStyle"),d=o.tickDirection*l.get("length"),f=s.getTicksCoords(),p=createTicks(f,r.transform,d,defaults$2(c.getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])}),"ticks"),v=0;v<p.length;v++)n.add(p[v]);return p}}function buildAxisMinorTicks(n,r,a,o){var s=a.axis,l=a.getModel("minorTick");if(!(!l.get("show")||s.scale.isBlank())){var u=s.getMinorTicksCoords();if(u.length)for(var c=l.getModel("lineStyle"),d=o*l.get("length"),f=defaults$2(c.getLineStyle(),defaults$2(a.getModel("axisTick").getLineStyle(),{stroke:a.get(["axisLine","lineStyle","color"])})),p=0;p<u.length;p++)for(var v=createTicks(u[p],r.transform,d,f,"minorticks_"+p),g=0;g<v.length;g++)n.add(v[g])}}function buildAxisLabel(n,r,a,o){var s=a.axis,l=retrieve(o.axisLabelShow,a.get(["axisLabel","show"]));if(!(!l||s.scale.isBlank())){var u=a.getModel("axisLabel"),c=u.get("margin"),d=s.getViewLabels(),f=(retrieve(o.labelRotate,u.get("rotate"))||0)*PI$4/180,p=AxisBuilder.innerTextLayout(o.rotation,f,o.labelDirection),v=a.getCategories&&a.getCategories(!0),g=[],y=AxisBuilder.isLabelSilent(a),_=a.get("triggerEvent");return each$f(d,function(S,b){var x=s.scale.type==="ordinal"?s.scale.getRawOrdinalNumber(S.tickValue):S.tickValue,A=S.formattedLabel,w=S.rawLabel,E=u;if(v&&v[x]){var D=v[x];isObject$3(D)&&D.textStyle&&(E=new Model(D.textStyle,u,a.ecModel))}var C=E.getTextColor()||a.get(["axisLine","lineStyle","color"]),$=s.dataToCoord(x),P=E.getShallow("align",!0)||p.textAlign,M=retrieve2(E.getShallow("alignMinLabel",!0),P),I=retrieve2(E.getShallow("alignMaxLabel",!0),P),L=E.getShallow("verticalAlign",!0)||E.getShallow("baseline",!0)||p.textVerticalAlign,O=retrieve2(E.getShallow("verticalAlignMinLabel",!0),L),R=retrieve2(E.getShallow("verticalAlignMaxLabel",!0),L),N=new ZRText({x:$,y:o.labelOffset+o.labelDirection*c,rotation:p.rotation,silent:y,z2:10+(S.level||0),style:createTextStyle$1(E,{text:A,align:b===0?M:b===d.length-1?I:P,verticalAlign:b===0?O:b===d.length-1?R:L,fill:isFunction(C)?C(s.type==="category"?w:s.type==="value"?x+"":x,b):C})});if(N.anid="label_"+x,setTooltipConfig({el:N,componentModel:a,itemName:A,formatterParamsExtra:{isTruncated:function(){return N.isTruncated},value:w,tickIndex:b}}),_){var V=AxisBuilder.makeAxisEventDataBase(a);V.targetType="axisLabel",V.value=w,V.tickIndex=b,s.type==="category"&&(V.dataIndex=x),getECData(N).eventData=V}r.add(N),N.updateTransform(),g.push(N),n.add(N),N.decomposeTransform()}),g}}function collect(n,r){var a={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return collectAxesInfo(a,n,r),a.seriesInvolved&&collectSeriesInfo(a,n),a}function collectAxesInfo(n,r,a){var o=r.getComponent("tooltip"),s=r.getComponent("axisPointer"),l=s.get("link",!0)||[],u=[];each$f(a.getCoordinateSystems(),function(c){if(!c.axisPointerEnabled)return;var d=makeKey(c.model),f=n.coordSysAxesInfo[d]={};n.coordSysMap[d]=c;var p=c.model,v=p.getModel("tooltip",o);if(each$f(c.getAxes(),curry$1(S,!1,null)),c.getTooltipAxes&&o&&v.get("show")){var g=v.get("trigger")==="axis",y=v.get(["axisPointer","type"])==="cross",_=c.getTooltipAxes(v.get(["axisPointer","axis"]));(g||y)&&each$f(_.baseAxes,curry$1(S,y?"cross":!0,g)),y&&each$f(_.otherAxes,curry$1(S,"cross",!1))}function S(b,x,A){var w=A.model.getModel("axisPointer",s),E=w.get("show");if(!(!E||E==="auto"&&!b&&!isHandleTrigger(w))){x==null&&(x=w.get("triggerTooltip")),w=b?makeAxisPointerModel(A,v,s,r,b,x):w;var D=w.get("snap"),C=w.get("triggerEmphasis"),$=makeKey(A.model),P=x||D||A.type==="category",M=n.axesInfo[$]={key:$,axis:A,coordSys:c,axisPointerModel:w,triggerTooltip:x,triggerEmphasis:C,involveSeries:P,snap:D,useHandle:isHandleTrigger(w),seriesModels:[],linkGroup:null};f[$]=M,n.seriesInvolved=n.seriesInvolved||P;var I=getLinkGroupIndex(l,A);if(I!=null){var L=u[I]||(u[I]={axesInfo:{}});L.axesInfo[$]=M,L.mapper=l[I].mapper,M.linkGroup=L}}}})}function makeAxisPointerModel(n,r,a,o,s,l){var u=r.getModel("axisPointer"),c=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],d={};each$f(c,function(g){d[g]=clone$6(u.get(g))}),d.snap=n.type!=="category"&&!!l,u.get("type")==="cross"&&(d.type="line");var f=d.label||(d.label={});if(f.show==null&&(f.show=!1),s==="cross"){var p=u.get(["label","show"]);if(f.show=p!=null?p:!0,!l){var v=d.lineStyle=u.get("crossStyle");v&&defaults$2(f,v.textStyle)}}return n.model.getModel("axisPointer",new Model(d,a,o))}function collectSeriesInfo(n,r){r.eachSeries(function(a){var o=a.coordinateSystem,s=a.get(["tooltip","trigger"],!0),l=a.get(["tooltip","show"],!0);!o||s==="none"||s===!1||s==="item"||l===!1||a.get(["axisPointer","show"],!0)===!1||each$f(n.coordSysAxesInfo[makeKey(o.model)],function(u){var c=u.axis;o.getAxis(c.dim)===c&&(u.seriesModels.push(a),u.seriesDataCount==null&&(u.seriesDataCount=0),u.seriesDataCount+=a.getData().count())})})}function getLinkGroupIndex(n,r){for(var a=r.model,o=r.dim,s=0;s<n.length;s++){var l=n[s]||{};if(checkPropInLink(l[o+"AxisId"],a.id)||checkPropInLink(l[o+"AxisIndex"],a.componentIndex)||checkPropInLink(l[o+"AxisName"],a.name))return s}}function checkPropInLink(n,r){return n==="all"||isArray$1(n)&&indexOf(n,r)>=0||n===r}function fixValue(n){var r=getAxisInfo$1(n);if(r){var a=r.axisPointerModel,o=r.axis.scale,s=a.option,l=a.get("status"),u=a.get("value");u!=null&&(u=o.parse(u));var c=isHandleTrigger(a);l==null&&(s.status=c?"show":"hide");var d=o.getExtent().slice();d[0]>d[1]&&d.reverse(),(u==null||u>d[1])&&(u=d[1]),u<d[0]&&(u=d[0]),s.value=u,c&&(s.status=r.axis.scale.isBlank()?"hide":"show")}}function getAxisInfo$1(n){var r=(n.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return r&&r.axesInfo[makeKey(n)]}function getAxisPointerModel(n){var r=getAxisInfo$1(n);return r&&r.axisPointerModel}function isHandleTrigger(n){return!!n.get(["handle","show"])}function makeKey(n){return n.type+"||"+n.id}var axisPointerClazz={},AxisView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s,l){this.axisPointerClass&&fixValue(a),n.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(a,s,!0)},r.prototype.updateAxisPointer=function(a,o,s,l){this._doUpdateAxisPointerClass(a,s,!1)},r.prototype.remove=function(a,o){var s=this._axisPointer;s&&s.remove(o)},r.prototype.dispose=function(a,o){this._disposeAxisPointer(o),n.prototype.dispose.apply(this,arguments)},r.prototype._doUpdateAxisPointerClass=function(a,o,s){var l=r.getAxisPointerClass(this.axisPointerClass);if(l){var u=getAxisPointerModel(a);u?(this._axisPointer||(this._axisPointer=new l)).render(a,u,o,s):this._disposeAxisPointer(o)}},r.prototype._disposeAxisPointer=function(a){this._axisPointer&&this._axisPointer.dispose(a),this._axisPointer=null},r.registerAxisPointerClass=function(a,o){axisPointerClazz[a]=o},r.getAxisPointerClass=function(a){return a&&axisPointerClazz[a]},r.type="axis",r}(ComponentView),inner$f=makeInner();function rectCoordAxisBuildSplitArea(n,r,a,o){var s=a.axis;if(!s.scale.isBlank()){var l=a.getModel("splitArea"),u=l.getModel("areaStyle"),c=u.get("color"),d=o.coordinateSystem.getRect(),f=s.getTicksCoords({tickModel:l,clamp:!0});if(f.length){var p=c.length,v=inner$f(n).splitAreaColors,g=createHashMap(),y=0;if(v)for(var _=0;_<f.length;_++){var S=v.get(f[_].tickValue);if(S!=null){y=(S+(p-1)*_)%p;break}}var b=s.toGlobalCoord(f[0].coord),x=u.getAreaStyle();c=isArray$1(c)?c:[c];for(var _=1;_<f.length;_++){var A=s.toGlobalCoord(f[_].coord),w=void 0,E=void 0,D=void 0,C=void 0;s.isHorizontal()?(w=b,E=d.y,D=A-w,C=d.height,b=w+D):(w=d.x,E=b,D=d.width,C=A-E,b=E+C);var $=f[_-1].tickValue;$!=null&&g.set($,y),r.add(new Rect$2({anid:$!=null?"area_"+$:null,shape:{x:w,y:E,width:D,height:C},style:defaults$2({fill:c[y]},x),autoBatch:!0,silent:!0})),y=(y+1)%p}inner$f(n).splitAreaColors=g}}}function rectCoordAxisHandleRemove(n){inner$f(n).splitAreaColors=null}var axisBuilderAttrs$3=["axisLine","axisTickLabel","axisName"],selfBuilderAttrs$2=["splitArea","splitLine","minorSplitLine"],CartesianAxisView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.axisPointerClass="CartesianAxisPointer",a}return r.prototype.render=function(a,o,s,l){this.group.removeAll();var u=this._axisGroup;if(this._axisGroup=new Group$3,this.group.add(this._axisGroup),!!a.get("show")){var c=a.getCoordSysModel(),d=layout$2(c,a),f=new AxisBuilder(a,extend$2({handleAutoShown:function(v){for(var g=c.coordinateSystem.getCartesians(),y=0;y<g.length;y++)if(isIntervalOrLogScale(g[y].getOtherAxis(a.axis).scale))return!0;return!1}},d));each$f(axisBuilderAttrs$3,f.add,f),this._axisGroup.add(f.getGroup()),each$f(selfBuilderAttrs$2,function(v){a.get([v,"show"])&&axisElementBuilders$2[v](this,this._axisGroup,a,c)},this);var p=l&&l.type==="changeAxisOrder"&&l.isInitSort;p||groupTransition(u,this._axisGroup,a),n.prototype.render.call(this,a,o,s,l)}},r.prototype.remove=function(){rectCoordAxisHandleRemove(this)},r.type="cartesianAxis",r}(AxisView),axisElementBuilders$2={splitLine:function(n,r,a,o){var s=a.axis;if(!s.scale.isBlank()){var l=a.getModel("splitLine"),u=l.getModel("lineStyle"),c=u.get("color"),d=l.get("showMinLine")!==!1,f=l.get("showMaxLine")!==!1;c=isArray$1(c)?c:[c];for(var p=o.coordinateSystem.getRect(),v=s.isHorizontal(),g=0,y=s.getTicksCoords({tickModel:l}),_=[],S=[],b=u.getLineStyle(),x=0;x<y.length;x++){var A=s.toGlobalCoord(y[x].coord);if(!(x===0&&!d||x===y.length-1&&!f)){var w=y[x].tickValue;v?(_[0]=A,_[1]=p.y,S[0]=A,S[1]=p.y+p.height):(_[0]=p.x,_[1]=A,S[0]=p.x+p.width,S[1]=A);var E=g++%c.length,D=new Line$1({anid:w!=null?"line_"+w:null,autoBatch:!0,shape:{x1:_[0],y1:_[1],x2:S[0],y2:S[1]},style:defaults$2({stroke:c[E]},b),silent:!0});subPixelOptimizeLine(D.shape,b.lineWidth),r.add(D)}}}},minorSplitLine:function(n,r,a,o){var s=a.axis,l=a.getModel("minorSplitLine"),u=l.getModel("lineStyle"),c=o.coordinateSystem.getRect(),d=s.isHorizontal(),f=s.getMinorTicksCoords();if(f.length)for(var p=[],v=[],g=u.getLineStyle(),y=0;y<f.length;y++)for(var _=0;_<f[y].length;_++){var S=s.toGlobalCoord(f[y][_].coord);d?(p[0]=S,p[1]=c.y,v[0]=S,v[1]=c.y+c.height):(p[0]=c.x,p[1]=S,v[0]=c.x+c.width,v[1]=S);var b=new Line$1({anid:"minor_line_"+f[y][_].tickValue,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:v[0],y2:v[1]},style:g,silent:!0});subPixelOptimizeLine(b.shape,g.lineWidth),r.add(b)}},splitArea:function(n,r,a,o){rectCoordAxisBuildSplitArea(n,r,a,o)}},CartesianXAxisView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="xAxis",r}(CartesianAxisView),CartesianYAxisView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=CartesianXAxisView.type,a}return r.type="yAxis",r}(CartesianAxisView),GridView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type="grid",a}return r.prototype.render=function(a,o){this.group.removeAll(),a.get("show")&&this.group.add(new Rect$2({shape:a.coordinateSystem.getRect(),style:defaults$2({fill:a.get("backgroundColor")},a.getItemStyle()),silent:!0,z2:-1}))},r.type="grid",r}(ComponentView),extraOption={offset:0};function install$P(n){n.registerComponentView(GridView),n.registerComponentModel(GridModel),n.registerCoordinateSystem("cartesian2d",Grid),axisModelCreator(n,"x",CartesianAxisModel,extraOption),axisModelCreator(n,"y",CartesianAxisModel,extraOption),n.registerComponentView(CartesianXAxisView),n.registerComponentView(CartesianYAxisView),n.registerPreprocessor(function(r){r.xAxis&&r.yAxis&&!r.grid&&(r.grid={})})}function install$O(n){use(install$P),n.registerSeriesModel(ScatterSeriesModel),n.registerChartView(ScatterView),n.registerLayout(pointsLayout("scatter"))}function radarLayout(n){n.eachSeriesByType("radar",function(r){var a=r.getData(),o=[],s=r.coordinateSystem;if(s){var l=s.getIndicatorAxes();each$f(l,function(u,c){a.each(a.mapDimension(l[c].dim),function(d,f){o[f]=o[f]||[];var p=s.dataToPoint(d,c);o[f][c]=isValidPoint(p)?p:getValueMissingPoint(s)})}),a.each(function(u){var c=find$2(o[u],function(d){return isValidPoint(d)})||getValueMissingPoint(s);o[u].push(c.slice()),a.setItemLayout(u,o[u])})}})}function isValidPoint(n){return!isNaN(n[0])&&!isNaN(n[1])}function getValueMissingPoint(n){return[n.cx,n.cy]}function radarBackwardCompat(n){var r=n.polar;if(r){isArray$1(r)||(r=[r]);var a=[];each$f(r,function(o,s){o.indicator?(o.type&&!o.shape&&(o.shape=o.type),n.radar=n.radar||[],isArray$1(n.radar)||(n.radar=[n.radar]),n.radar.push(o)):a.push(o)}),n.polar=a}each$f(n.series,function(o){o&&o.type==="radar"&&o.polarIndex&&(o.radarIndex=o.polarIndex)})}var RadarView$1=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){var l=a.coordinateSystem,u=this.group,c=a.getData(),d=this._data;function f(g,y){var _=g.getItemVisual(y,"symbol")||"circle";if(_!=="none"){var S=normalizeSymbolSize(g.getItemVisual(y,"symbolSize")),b=createSymbol$1(_,-1,-1,2,2),x=g.getItemVisual(y,"symbolRotate")||0;return b.attr({style:{strokeNoScale:!0},z2:100,scaleX:S[0]/2,scaleY:S[1]/2,rotation:x*Math.PI/180||0}),b}}function p(g,y,_,S,b,x){_.removeAll();for(var A=0;A<y.length-1;A++){var w=f(S,b);w&&(w.__dimIdx=A,g[A]?(w.setPosition(g[A]),graphic$1[x?"initProps":"updateProps"](w,{x:y[A][0],y:y[A][1]},a,b)):w.setPosition(y[A]),_.add(w))}}function v(g){return map$1(g,function(y){return[l.cx,l.cy]})}c.diff(d).add(function(g){var y=c.getItemLayout(g);if(y){var _=new Polygon,S=new Polyline$1,b={shape:{points:y}};_.shape.points=v(y),S.shape.points=v(y),initProps(_,b,a,g),initProps(S,b,a,g);var x=new Group$3,A=new Group$3;x.add(S),x.add(_),x.add(A),p(S.shape.points,y,A,c,g,!0),c.setItemGraphicEl(g,x)}}).update(function(g,y){var _=d.getItemGraphicEl(y),S=_.childAt(0),b=_.childAt(1),x=_.childAt(2),A={shape:{points:c.getItemLayout(g)}};A.shape.points&&(p(S.shape.points,A.shape.points,x,c,g,!1),saveOldStyle(b),saveOldStyle(S),updateProps$1(S,A,a),updateProps$1(b,A,a),c.setItemGraphicEl(g,_))}).remove(function(g){u.remove(d.getItemGraphicEl(g))}).execute(),c.eachItemGraphicEl(function(g,y){var _=c.getItemModel(y),S=g.childAt(0),b=g.childAt(1),x=g.childAt(2),A=c.getItemVisual(y,"style"),w=A.fill;u.add(g),S.useStyle(defaults$2(_.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:w})),setStatesStylesFromModel(S,_,"lineStyle"),setStatesStylesFromModel(b,_,"areaStyle");var E=_.getModel("areaStyle"),D=E.isEmpty()&&E.parentModel.isEmpty();b.ignore=D,each$f(["emphasis","select","blur"],function(P){var M=_.getModel([P,"areaStyle"]),I=M.isEmpty()&&M.parentModel.isEmpty();b.ensureState(P).ignore=I&&D}),b.useStyle(defaults$2(E.getAreaStyle(),{fill:w,opacity:.7,decal:A.decal}));var C=_.getModel("emphasis"),$=C.getModel("itemStyle").getItemStyle();x.eachChild(function(P){if(P instanceof ZRImage){var M=P.style;P.useStyle(extend$2({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},A))}else P.useStyle(A),P.setColor(w),P.style.strokeNoScale=!0;var I=P.ensureState("emphasis");I.style=clone$6($);var L=c.getStore().get(c.getDimensionIndex(P.__dimIdx),y);(L==null||isNaN(L))&&(L=""),setLabelStyle(P,getLabelStatesModels(_),{labelFetcher:c.hostModel,labelDataIndex:y,labelDimIndex:P.__dimIdx,defaultText:L,inheritColor:w,defaultOpacity:A.opacity})}),toggleHoverEmphasis(g,C.get("focus"),C.get("blurScope"),C.get("disabled"))}),this._data=c},r.prototype.remove=function(){this.group.removeAll(),this._data=null},r.type="radar",r}(ChartView),RadarSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.hasSymbolVisual=!0,a}return r.prototype.init=function(a){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this))},r.prototype.getInitialData=function(a,o){return createSeriesDataSimply(this,{generateCoord:"indicator_",generateCoordCount:1/0})},r.prototype.formatTooltip=function(a,o,s){var l=this.getData(),u=this.coordinateSystem,c=u.getIndicatorAxes(),d=this.getData().getName(a),f=d===""?this.name:d,p=retrieveVisualColorForTooltipMarker(this,a);return createTooltipMarkup("section",{header:f,sortBlocks:!0,blocks:map$1(c,function(v){var g=l.get(l.mapDimension(v.dim),a);return createTooltipMarkup("nameValue",{markerType:"subItem",markerColor:p,name:v.name,value:g,sortParam:g})})})},r.prototype.getTooltipPosition=function(a){if(a!=null){for(var o=this.getData(),s=this.coordinateSystem,l=o.getValues(map$1(s.dimensions,function(f){return o.mapDimension(f)}),a),u=0,c=l.length;u<c;u++)if(!isNaN(l[u])){var d=s.getIndicatorAxes();return s.coordToPoint(d[u].dataToCoord(l[u]),u)}}},r.type="series.radar",r.dependencies=["radar"],r.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},r}(SeriesModel),valueAxisDefault=axisDefault.value;function defaultsShow(n,r){return defaults$2({show:r},n)}var RadarModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.optionUpdated=function(){var a=this.get("boundaryGap"),o=this.get("splitNumber"),s=this.get("scale"),l=this.get("axisLine"),u=this.get("axisTick"),c=this.get("axisLabel"),d=this.get("axisName"),f=this.get(["axisName","show"]),p=this.get(["axisName","formatter"]),v=this.get("axisNameGap"),g=this.get("triggerEvent"),y=map$1(this.get("indicator")||[],function(_){_.max!=null&&_.max>0&&!_.min?_.min=0:_.min!=null&&_.min<0&&!_.max&&(_.max=0);var S=d;_.color!=null&&(S=defaults$2({color:_.color},d));var b=merge(clone$6(_),{boundaryGap:a,splitNumber:o,scale:s,axisLine:l,axisTick:u,axisLabel:c,name:_.text,showName:f,nameLocation:"end",nameGap:v,nameTextStyle:S,triggerEvent:g},!1);if(isString(p)){var x=b.name;b.name=p.replace("{value}",x!=null?x:"")}else isFunction(p)&&(b.name=p(b.name,b));var A=new Model(b,null,this.ecModel);return mixin(A,AxisModelCommonMixin.prototype),A.mainType="radar",A.componentIndex=this.componentIndex,A},this);this._indicatorModels=y},r.prototype.getIndicatorModels=function(){return this._indicatorModels},r.type="radar",r.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:merge({lineStyle:{color:"#bbb"}},valueAxisDefault.axisLine),axisLabel:defaultsShow(valueAxisDefault.axisLabel,!1),axisTick:defaultsShow(valueAxisDefault.axisTick,!1),splitLine:defaultsShow(valueAxisDefault.splitLine,!0),splitArea:defaultsShow(valueAxisDefault.splitArea,!0),indicator:[]},r}(ComponentModel),axisBuilderAttrs$2=["axisLine","axisTickLabel","axisName"],RadarView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){var l=this.group;l.removeAll(),this._buildAxes(a),this._buildSplitLineAndArea(a)},r.prototype._buildAxes=function(a){var o=a.coordinateSystem,s=o.getIndicatorAxes(),l=map$1(s,function(u){var c=u.model.get("showName")?u.name:"",d=new AxisBuilder(u.model,{axisName:c,position:[o.cx,o.cy],rotation:u.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return d});each$f(l,function(u){each$f(axisBuilderAttrs$2,u.add,u),this.group.add(u.getGroup())},this)},r.prototype._buildSplitLineAndArea=function(a){var o=a.coordinateSystem,s=o.getIndicatorAxes();if(!s.length)return;var l=a.get("shape"),u=a.getModel("splitLine"),c=a.getModel("splitArea"),d=u.getModel("lineStyle"),f=c.getModel("areaStyle"),p=u.get("show"),v=c.get("show"),g=d.get("color"),y=f.get("color"),_=isArray$1(g)?g:[g],S=isArray$1(y)?y:[y],b=[],x=[];function A(V,F,U){var H=U%F.length;return V[H]=V[H]||[],H}if(l==="circle")for(var w=s[0].getTicksCoords(),E=o.cx,D=o.cy,C=0;C<w.length;C++){if(p){var $=A(b,_,C);b[$].push(new Circle({shape:{cx:E,cy:D,r:w[C].coord}}))}if(v&&C<w.length-1){var $=A(x,S,C);x[$].push(new Ring({shape:{cx:E,cy:D,r0:w[C].coord,r:w[C+1].coord}}))}}else for(var P,M=map$1(s,function(V,F){var U=V.getTicksCoords();return P=P==null?U.length-1:Math.min(U.length-1,P),map$1(U,function(H){return o.coordToPoint(H.coord,F)})}),I=[],C=0;C<=P;C++){for(var L=[],O=0;O<s.length;O++)L.push(M[O][C]);if(L[0]&&L.push(L[0].slice()),p){var $=A(b,_,C);b[$].push(new Polyline$1({shape:{points:L}}))}if(v&&I){var $=A(x,S,C-1);x[$].push(new Polygon({shape:{points:L.concat(I)}}))}I=L.slice().reverse()}var R=d.getLineStyle(),N=f.getAreaStyle();each$f(x,function(V,F){this.group.add(mergePath(V,{style:defaults$2({stroke:"none",fill:S[F%S.length]},N),silent:!0}))},this),each$f(b,function(V,F){this.group.add(mergePath(V,{style:defaults$2({fill:"none",stroke:_[F%_.length]},R),silent:!0}))},this)},r.type="radar",r}(ComponentView),IndicatorAxis=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this,a,o,s)||this;return l.type="value",l.angle=0,l.name="",l}return r}(Axis),Radar=function(){function n(r,a,o){this.dimensions=[],this._model=r,this._indicatorAxes=map$1(r.getIndicatorModels(),function(s,l){var u="indicator_"+l,c=new IndicatorAxis(u,new IntervalScale);return c.name=s.get("name"),c.model=s,s.axis=c,this.dimensions.push(u),c},this),this.resize(r,o)}return n.prototype.getIndicatorAxes=function(){return this._indicatorAxes},n.prototype.dataToPoint=function(r,a){var o=this._indicatorAxes[a];return this.coordToPoint(o.dataToCoord(r),a)},n.prototype.coordToPoint=function(r,a){var o=this._indicatorAxes[a],s=o.angle,l=this.cx+r*Math.cos(s),u=this.cy-r*Math.sin(s);return[l,u]},n.prototype.pointToData=function(r){var a=r[0]-this.cx,o=r[1]-this.cy,s=Math.sqrt(a*a+o*o);a/=s,o/=s;for(var l=Math.atan2(-o,a),u=1/0,c,d=-1,f=0;f<this._indicatorAxes.length;f++){var p=this._indicatorAxes[f],v=Math.abs(l-p.angle);v<u&&(c=p,d=f,u=v)}return[d,+(c&&c.coordToData(s))]},n.prototype.resize=function(r,a){var o=r.get("center"),s=a.getWidth(),l=a.getHeight(),u=Math.min(s,l)/2;this.cx=parsePercent(o[0],s),this.cy=parsePercent(o[1],l),this.startAngle=r.get("startAngle")*Math.PI/180;var c=r.get("radius");(isString(c)||isNumber(c))&&(c=[0,c]),this.r0=parsePercent(c[0],u),this.r=parsePercent(c[1],u),each$f(this._indicatorAxes,function(d,f){d.setExtent(this.r0,this.r);var p=this.startAngle+f*Math.PI*2/this._indicatorAxes.length;p=Math.atan2(Math.sin(p),Math.cos(p)),d.angle=p},this)},n.prototype.update=function(r,a){var o=this._indicatorAxes,s=this._model;each$f(o,function(c){c.scale.setExtent(1/0,-1/0)}),r.eachSeriesByType("radar",function(c,d){if(!(c.get("coordinateSystem")!=="radar"||r.getComponent("radar",c.get("radarIndex"))!==s)){var f=c.getData();each$f(o,function(p){p.scale.unionExtentFromData(f,f.mapDimension(p.dim))})}},this);var l=s.get("splitNumber"),u=new IntervalScale;u.setExtent(0,l),u.setInterval(1),each$f(o,function(c,d){alignScaleTicks(c.scale,c.model,u)})},n.prototype.convertToPixel=function(r,a,o){return null},n.prototype.convertFromPixel=function(r,a,o){return null},n.prototype.containPoint=function(r){return!1},n.create=function(r,a){var o=[];return r.eachComponent("radar",function(s){var l=new n(s,r,a);o.push(l),s.coordinateSystem=l}),r.eachSeriesByType("radar",function(s){s.get("coordinateSystem")==="radar"&&(s.coordinateSystem=o[s.get("radarIndex")||0])}),o},n.dimensions=[],n}();function install$N(n){n.registerCoordinateSystem("radar",Radar),n.registerComponentModel(RadarModel),n.registerComponentView(RadarView),n.registerVisual({seriesType:"radar",reset:function(r){var a=r.getData();a.each(function(o){a.setItemVisual(o,"legendIcon","roundRect")}),a.setVisual("legendIcon","roundRect")}})}function install$M(n){use(install$N),n.registerChartView(RadarView$1),n.registerSeriesModel(RadarSeriesModel),n.registerLayout(radarLayout),n.registerProcessor(dataFilter$1("radar")),n.registerPreprocessor(radarBackwardCompat)}var ATTR="\0_ec_interaction_mutex";function take(n,r,a){var o=getStore(n);o[r]=a}function release(n,r,a){var o=getStore(n),s=o[r];s===a&&(o[r]=null)}function isTaken(n,r){return!!getStore(n)[r]}function getStore(n){return n[ATTR]||(n[ATTR]={})}registerAction({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},noop);var RoamController=function(n){__extends(r,n);function r(a){var o=n.call(this)||this;o._zr=a;var s=bind$1(o._mousedownHandler,o),l=bind$1(o._mousemoveHandler,o),u=bind$1(o._mouseupHandler,o),c=bind$1(o._mousewheelHandler,o),d=bind$1(o._pinchHandler,o);return o.enable=function(f,p){this.disable(),this._opt=defaults$2(clone$6(p)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),f==null&&(f=!0),(f===!0||f==="move"||f==="pan")&&(a.on("mousedown",s),a.on("mousemove",l),a.on("mouseup",u)),(f===!0||f==="scale"||f==="zoom")&&(a.on("mousewheel",c),a.on("pinch",d))},o.disable=function(){a.off("mousedown",s),a.off("mousemove",l),a.off("mouseup",u),a.off("mousewheel",c),a.off("pinch",d)},o}return r.prototype.isDragging=function(){return this._dragging},r.prototype.isPinching=function(){return this._pinching},r.prototype.setPointerChecker=function(a){this.pointerChecker=a},r.prototype.dispose=function(){this.disable()},r.prototype._mousedownHandler=function(a){if(!isMiddleOrRightButtonOnMouseUpDown(a)){for(var o=a.target;o;){if(o.draggable)return;o=o.__hostTarget||o.parent}var s=a.offsetX,l=a.offsetY;this.pointerChecker&&this.pointerChecker(a,s,l)&&(this._x=s,this._y=l,this._dragging=!0)}},r.prototype._mousemoveHandler=function(a){if(!(!this._dragging||!isAvailableBehavior("moveOnMouseMove",a,this._opt)||a.gestureEvent==="pinch"||isTaken(this._zr,"globalPan"))){var o=a.offsetX,s=a.offsetY,l=this._x,u=this._y,c=o-l,d=s-u;this._x=o,this._y=s,this._opt.preventDefaultMouseMove&&stop(a.event),trigger$1(this,"pan","moveOnMouseMove",a,{dx:c,dy:d,oldX:l,oldY:u,newX:o,newY:s,isAvailableBehavior:null})}},r.prototype._mouseupHandler=function(a){isMiddleOrRightButtonOnMouseUpDown(a)||(this._dragging=!1)},r.prototype._mousewheelHandler=function(a){var o=isAvailableBehavior("zoomOnMouseWheel",a,this._opt),s=isAvailableBehavior("moveOnMouseWheel",a,this._opt),l=a.wheelDelta,u=Math.abs(l),c=a.offsetX,d=a.offsetY;if(!(l===0||!o&&!s)){if(o){var f=u>3?1.4:u>1?1.2:1.1,p=l>0?f:1/f;checkPointerAndTrigger(this,"zoom","zoomOnMouseWheel",a,{scale:p,originX:c,originY:d,isAvailableBehavior:null})}if(s){var v=Math.abs(l),g=(l>0?1:-1)*(v>3?.4:v>1?.15:.05);checkPointerAndTrigger(this,"scrollMove","moveOnMouseWheel",a,{scrollDelta:g,originX:c,originY:d,isAvailableBehavior:null})}}},r.prototype._pinchHandler=function(a){if(!isTaken(this._zr,"globalPan")){var o=a.pinchScale>1?1.1:1/1.1;checkPointerAndTrigger(this,"zoom",null,a,{scale:o,originX:a.pinchX,originY:a.pinchY,isAvailableBehavior:null})}},r}(Eventful);function checkPointerAndTrigger(n,r,a,o,s){n.pointerChecker&&n.pointerChecker(o,s.originX,s.originY)&&(stop(o.event),trigger$1(n,r,a,o,s))}function trigger$1(n,r,a,o,s){s.isAvailableBehavior=bind$1(isAvailableBehavior,null,a,o),n.trigger(r,s)}function isAvailableBehavior(n,r,a){var o=a[n];return!n||o&&(!isString(o)||r.event[o+"Key"])}function updateViewOnPan(n,r,a){var o=n.target;o.x+=r,o.y+=a,o.dirty()}function updateViewOnZoom(n,r,a,o){var s=n.target,l=n.zoomLimit,u=n.zoom=n.zoom||1;if(u*=r,l){var c=l.min||0,d=l.max||1/0;u=Math.max(Math.min(d,u),c)}var f=u/n.zoom;n.zoom=u,s.x-=(a-s.x)*(f-1),s.y-=(o-s.y)*(f-1),s.scaleX*=f,s.scaleY*=f,s.dirty()}var IRRELEVANT_EXCLUDES={axisPointer:1,tooltip:1,brush:1};function onIrrelevantElement(n,r,a){var o=r.getComponentByElement(n.topTarget),s=o&&o.coordinateSystem;return o&&o!==a&&!IRRELEVANT_EXCLUDES.hasOwnProperty(o.mainType)&&s&&s.model!==a}function parseXML(n){if(isString(n)){var r=new DOMParser;n=r.parseFromString(n,"text/xml")}var a=n;for(a.nodeType===9&&(a=a.firstChild);a.nodeName.toLowerCase()!=="svg"||a.nodeType!==1;)a=a.nextSibling;return a}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 n(){this._defs={},this._root=null}return n.prototype.parse=function(r,a){a=a||{};var o=parseXML(r);this._defsUsePending=[];var s=new Group$3;this._root=s;var l=[],u=o.getAttribute("viewBox")||"",c=parseFloat(o.getAttribute("width")||a.width),d=parseFloat(o.getAttribute("height")||a.height);isNaN(c)&&(c=null),isNaN(d)&&(d=null),parseAttributes(o,s,null,!0,!1);for(var f=o.firstChild;f;)this._parseNode(f,s,l,null,!1,!1),f=f.nextSibling;applyDefs(this._defs,this._defsUsePending),this._defsUsePending=[];var p,v;if(u){var g=splitNumberSequence(u);g.length>=4&&(p={x:parseFloat(g[0]||0),y:parseFloat(g[1]||0),width:parseFloat(g[2]),height:parseFloat(g[3])})}if(p&&c!=null&&d!=null&&(v=makeViewBoxTransform(p,{x:0,y:0,width:c,height:d}),!a.ignoreViewBox)){var y=s;s=new Group$3,s.add(y),y.scaleX=y.scaleY=v.scale,y.x=v.x,y.y=v.y}return!a.ignoreRootClip&&c!=null&&d!=null&&s.setClipPath(new Rect$2({shape:{x:0,y:0,width:c,height:d}})),{root:s,width:c,height:d,viewBoxRect:p,viewBoxTransform:v,named:l}},n.prototype._parseNode=function(r,a,o,s,l,u){var c=r.nodeName.toLowerCase(),d,f=s;if(c==="defs"&&(l=!0),c==="text"&&(u=!0),c==="defs"||c==="switch")d=a;else{if(!l){var p=nodeParsers[c];if(p&&hasOwn(nodeParsers,c)){d=p.call(this,r,a);var v=r.getAttribute("name");if(v){var g={name:v,namedFrom:null,svgNodeTagLower:c,el:d};o.push(g),c==="g"&&(f=g)}else s&&o.push({name:s.name,namedFrom:s,svgNodeTagLower:c,el:d});a.add(d)}}var y=paintServerParsers[c];if(y&&hasOwn(paintServerParsers,c)){var _=y.call(this,r),S=r.getAttribute("id");S&&(this._defs[S]=_)}}if(d&&d.isGroup)for(var b=r.firstChild;b;)b.nodeType===1?this._parseNode(b,d,o,f,l,u):b.nodeType===3&&u&&this._parseText(b,d),b=b.nextSibling},n.prototype._parseText=function(r,a){var o=new TSpan({style:{text:r.textContent},silent:!0,x:this._textX||0,y:this._textY||0});inheritStyle(a,o),parseAttributes(r,o,this._defsUsePending,!1,!1),applyTextAlignment(o,a);var s=o.style,l=s.fontSize;l&&l<9&&(s.fontSize=9,o.scaleX*=l/9,o.scaleY*=l/9);var u=(s.fontSize||s.fontFamily)&&[s.fontStyle,s.fontWeight,(s.fontSize||12)+"px",s.fontFamily||"sans-serif"].join(" ");s.font=u;var c=o.getBoundingRect();return this._textX+=c.width,a.add(o),o},n.internalField=function(){nodeParsers={g:function(r,a){var o=new Group$3;return inheritStyle(a,o),parseAttributes(r,o,this._defsUsePending,!1,!1),o},rect:function(r,a){var o=new Rect$2;return inheritStyle(a,o),parseAttributes(r,o,this._defsUsePending,!1,!1),o.setShape({x:parseFloat(r.getAttribute("x")||"0"),y:parseFloat(r.getAttribute("y")||"0"),width:parseFloat(r.getAttribute("width")||"0"),height:parseFloat(r.getAttribute("height")||"0")}),o.silent=!0,o},circle:function(r,a){var o=new Circle;return inheritStyle(a,o),parseAttributes(r,o,this._defsUsePending,!1,!1),o.setShape({cx:parseFloat(r.getAttribute("cx")||"0"),cy:parseFloat(r.getAttribute("cy")||"0"),r:parseFloat(r.getAttribute("r")||"0")}),o.silent=!0,o},line:function(r,a){var o=new Line$1;return inheritStyle(a,o),parseAttributes(r,o,this._defsUsePending,!1,!1),o.setShape({x1:parseFloat(r.getAttribute("x1")||"0"),y1:parseFloat(r.getAttribute("y1")||"0"),x2:parseFloat(r.getAttribute("x2")||"0"),y2:parseFloat(r.getAttribute("y2")||"0")}),o.silent=!0,o},ellipse:function(r,a){var o=new Ellipse;return inheritStyle(a,o),parseAttributes(r,o,this._defsUsePending,!1,!1),o.setShape({cx:parseFloat(r.getAttribute("cx")||"0"),cy:parseFloat(r.getAttribute("cy")||"0"),rx:parseFloat(r.getAttribute("rx")||"0"),ry:parseFloat(r.getAttribute("ry")||"0")}),o.silent=!0,o},polygon:function(r,a){var o=r.getAttribute("points"),s;o&&(s=parsePoints(o));var l=new Polygon({shape:{points:s||[]},silent:!0});return inheritStyle(a,l),parseAttributes(r,l,this._defsUsePending,!1,!1),l},polyline:function(r,a){var o=r.getAttribute("points"),s;o&&(s=parsePoints(o));var l=new Polyline$1({shape:{points:s||[]},silent:!0});return inheritStyle(a,l),parseAttributes(r,l,this._defsUsePending,!1,!1),l},image:function(r,a){var o=new ZRImage;return inheritStyle(a,o),parseAttributes(r,o,this._defsUsePending,!1,!1),o.setStyle({image:r.getAttribute("xlink:href")||r.getAttribute("href"),x:+r.getAttribute("x"),y:+r.getAttribute("y"),width:+r.getAttribute("width"),height:+r.getAttribute("height")}),o.silent=!0,o},text:function(r,a){var o=r.getAttribute("x")||"0",s=r.getAttribute("y")||"0",l=r.getAttribute("dx")||"0",u=r.getAttribute("dy")||"0";this._textX=parseFloat(o)+parseFloat(l),this._textY=parseFloat(s)+parseFloat(u);var c=new Group$3;return inheritStyle(a,c),parseAttributes(r,c,this._defsUsePending,!1,!0),c},tspan:function(r,a){var o=r.getAttribute("x"),s=r.getAttribute("y");o!=null&&(this._textX=parseFloat(o)),s!=null&&(this._textY=parseFloat(s));var l=r.getAttribute("dx")||"0",u=r.getAttribute("dy")||"0",c=new Group$3;return inheritStyle(a,c),parseAttributes(r,c,this._defsUsePending,!1,!0),this._textX+=parseFloat(l),this._textY+=parseFloat(u),c},path:function(r,a){var o=r.getAttribute("d")||"",s=createFromString(o);return inheritStyle(a,s),parseAttributes(r,s,this._defsUsePending,!1,!1),s.silent=!0,s}}}(),n}(),paintServerParsers={lineargradient:function(n){var r=parseInt(n.getAttribute("x1")||"0",10),a=parseInt(n.getAttribute("y1")||"0",10),o=parseInt(n.getAttribute("x2")||"10",10),s=parseInt(n.getAttribute("y2")||"0",10),l=new LinearGradient(r,a,o,s);return parsePaintServerUnit(n,l),parseGradientColorStops(n,l),l},radialgradient:function(n){var r=parseInt(n.getAttribute("cx")||"0",10),a=parseInt(n.getAttribute("cy")||"0",10),o=parseInt(n.getAttribute("r")||"0",10),s=new RadialGradient(r,a,o);return parsePaintServerUnit(n,s),parseGradientColorStops(n,s),s}};function parsePaintServerUnit(n,r){var a=n.getAttribute("gradientUnits");a==="userSpaceOnUse"&&(r.global=!0)}function parseGradientColorStops(n,r){for(var a=n.firstChild;a;){if(a.nodeType===1&&a.nodeName.toLocaleLowerCase()==="stop"){var o=a.getAttribute("offset"),s=void 0;o&&o.indexOf("%")>0?s=parseInt(o,10)/100:o?s=parseFloat(o):s=0;var l={};parseInlineStyle(a,l,l);var u=l.stopColor||a.getAttribute("stop-color")||"#000000";r.colorStops.push({offset:s,color:u})}a=a.nextSibling}}function inheritStyle(n,r){n&&n.__inheritedStyle&&(r.__inheritedStyle||(r.__inheritedStyle={}),defaults$2(r.__inheritedStyle,n.__inheritedStyle))}function parsePoints(n){for(var r=splitNumberSequence(n),a=[],o=0;o<r.length;o+=2){var s=parseFloat(r[o]),l=parseFloat(r[o+1]);a.push([s,l])}return a}function parseAttributes(n,r,a,o,s){var l=r,u=l.__inheritedStyle=l.__inheritedStyle||{},c={};n.nodeType===1&&(parseTransformAttribute(n,r),parseInlineStyle(n,u,c),o||parseAttributeStyle(n,u,c)),l.style=l.style||{},u.fill!=null&&(l.style.fill=getFillStrokeStyle(l,"fill",u.fill,a)),u.stroke!=null&&(l.style.stroke=getFillStrokeStyle(l,"stroke",u.stroke,a)),each$f(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(d){u[d]!=null&&(l.style[d]=parseFloat(u[d]))}),each$f(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(d){u[d]!=null&&(l.style[d]=u[d])}),s&&(l.__selfStyle=c),u.lineDash&&(l.style.lineDash=map$1(splitNumberSequence(u.lineDash),function(d){return parseFloat(d)})),(u.visibility==="hidden"||u.visibility==="collapse")&&(l.invisible=!0),u.display==="none"&&(l.ignore=!0)}function applyTextAlignment(n,r){var a=r.__selfStyle;if(a){var o=a.textBaseline,s=o;!o||o==="auto"||o==="baseline"?s="alphabetic":o==="before-edge"||o==="text-before-edge"?s="top":o==="after-edge"||o==="text-after-edge"?s="bottom":(o==="central"||o==="mathematical")&&(s="middle"),n.style.textBaseline=s}var l=r.__inheritedStyle;if(l){var u=l.textAlign,c=u;u&&(u==="middle"&&(c="center"),n.style.textAlign=c)}}var urlRegex=/^url\(\s*#(.*?)\)/;function getFillStrokeStyle(n,r,a,o){var s=a&&a.match(urlRegex);if(s){var l=trim$1(s[1]);o.push([n,r,l]);return}return a==="none"&&(a=null),a}function applyDefs(n,r){for(var a=0;a<r.length;a++){var o=r[a];o[0].style[o[1]]=n[o[2]]}}var numberReg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function splitNumberSequence(n){return n.match(numberReg)||[]}var transformRegex=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,DEGREE_TO_ANGLE=Math.PI/180;function parseTransformAttribute(n,r){var a=n.getAttribute("transform");if(a){a=a.replace(/,/g," ");var o=[],s=null;a.replace(transformRegex,function(v,g,y){return o.push(g,y),""});for(var l=o.length-1;l>0;l-=2){var u=o[l],c=o[l-1],d=splitNumberSequence(u);switch(s=s||create$1(),c){case"translate":translate(s,s,[parseFloat(d[0]),parseFloat(d[1]||"0")]);break;case"scale":scale$1(s,s,[parseFloat(d[0]),parseFloat(d[1]||d[0])]);break;case"rotate":rotate(s,s,-parseFloat(d[0])*DEGREE_TO_ANGLE,[parseFloat(d[1]||"0"),parseFloat(d[2]||"0")]);break;case"skewX":var f=Math.tan(parseFloat(d[0])*DEGREE_TO_ANGLE);mul(s,[1,0,f,1,0,0],s);break;case"skewY":var p=Math.tan(parseFloat(d[0])*DEGREE_TO_ANGLE);mul(s,[1,p,0,1,0,0],s);break;case"matrix":s[0]=parseFloat(d[0]),s[1]=parseFloat(d[1]),s[2]=parseFloat(d[2]),s[3]=parseFloat(d[3]),s[4]=parseFloat(d[4]),s[5]=parseFloat(d[5]);break}}r.setLocalTransform(s)}}var styleRegex=/([^\s:;]+)\s*:\s*([^:;]+)/g;function parseInlineStyle(n,r,a){var o=n.getAttribute("style");if(o){styleRegex.lastIndex=0;for(var s;(s=styleRegex.exec(o))!=null;){var l=s[1],u=hasOwn(INHERITABLE_STYLE_ATTRIBUTES_MAP,l)?INHERITABLE_STYLE_ATTRIBUTES_MAP[l]:null;u&&(r[u]=s[2]);var c=hasOwn(SELF_STYLE_ATTRIBUTES_MAP,l)?SELF_STYLE_ATTRIBUTES_MAP[l]:null;c&&(a[c]=s[2])}}}function parseAttributeStyle(n,r,a){for(var o=0;o<INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS.length;o++){var s=INHERITABLE_STYLE_ATTRIBUTES_MAP_KEYS[o],l=n.getAttribute(s);l!=null&&(r[INHERITABLE_STYLE_ATTRIBUTES_MAP[s]]=l)}for(var o=0;o<SELF_STYLE_ATTRIBUTES_MAP_KEYS.length;o++){var s=SELF_STYLE_ATTRIBUTES_MAP_KEYS[o],l=n.getAttribute(s);l!=null&&(a[SELF_STYLE_ATTRIBUTES_MAP[s]]=l)}}function makeViewBoxTransform(n,r){var a=r.width/n.width,o=r.height/n.height,s=Math.min(a,o);return{scale:s,x:-(n.x+n.width/2)*s+(r.x+r.width/2),y:-(n.y+n.height/2)*s+(r.y+r.height/2)}}function parseSVG(n,r){var a=new SVGParser;return a.parse(n,r)}var REGION_AVAILABLE_SVG_TAG_MAP=createHashMap(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),GeoSVGResource=function(){function n(r,a){this.type="geoSVG",this._usedGraphicMap=createHashMap(),this._freedGraphics=[],this._mapName=r,this._parsedXML=parseXML(a)}return n.prototype.load=function(){var r=this._firstGraphic;if(!r){r=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(r),this._boundingRect=this._firstGraphic.boundingRect.clone();var a=createRegions(r.named),o=a.regions,s=a.regionsMap;this._regions=o,this._regionsMap=s}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},n.prototype._buildGraphic=function(r){var a,o;try{a=r&&parseSVG(r,{ignoreViewBox:!0,ignoreRootClip:!0})||{},o=a.root,assert(o!=null)}catch(b){throw new Error("Invalid svg format\n"+b.message)}var s=new Group$3;s.add(o),s.isGeoSVGGraphicRoot=!0;var l=a.width,u=a.height,c=a.viewBoxRect,d=this._boundingRect;if(!d){var f=void 0,p=void 0,v=void 0,g=void 0;if(l!=null?(f=0,v=l):c&&(f=c.x,v=c.width),u!=null?(p=0,g=u):c&&(p=c.y,g=c.height),f==null||p==null){var y=o.getBoundingRect();f==null&&(f=y.x,v=y.width),p==null&&(p=y.y,g=y.height)}d=this._boundingRect=new BoundingRect(f,p,v,g)}if(c){var _=makeViewBoxTransform(c,d);o.scaleX=o.scaleY=_.scale,o.x=_.x,o.y=_.y}s.setClipPath(new Rect$2({shape:d.plain()}));var S=[];return each$f(a.named,function(b){REGION_AVAILABLE_SVG_TAG_MAP.get(b.svgNodeTagLower)!=null&&(S.push(b),setSilent(b.el))}),{root:s,boundingRect:d,named:S}},n.prototype.useGraphic=function(r){var a=this._usedGraphicMap,o=a.get(r);return o||(o=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),a.set(r,o),o)},n.prototype.freeGraphic=function(r){var a=this._usedGraphicMap,o=a.get(r);o&&(a.removeKey(r),this._freedGraphics.push(o))},n}();function setSilent(n){n.silent=!1,n.isGroup&&n.traverse(function(r){r.silent=!1})}function createRegions(n){var r=[],a=createHashMap();return each$f(n,function(o){if(o.namedFrom==null){var s=new GeoSVGRegion(o.name,o.el);r.push(s),a.set(o.name,s)}}),{regions:r,regionsMap:a}}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]]];for(var 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(n,r){if(n==="china"){for(var a=0;a<r.length;a++)if(r[a].name===nanhaiName)return;r.push(new GeoJSONRegion(nanhaiName,map$1(points$1,function(o){return{type:"polygon",exterior:o}}),geoCoord))}}var coordsOffsetMap={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function fixTextCoords(n,r){if(n==="china"){var a=coordsOffsetMap[r.name];if(a){var o=r.getCenter();o[0]+=a[0]/10.5,o[1]+=-a[1]/(10.5/.75),r.setCenter(o)}}}var points=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function fixDiaoyuIsland(n,r){n==="china"&&r.name==="台湾"&&r.geometries.push({type:"polygon",exterior:points[0]})}var DEFAULT_NAME_PROPERTY="name",GeoJSONResource=function(){function n(r,a,o){this.type="geoJSON",this._parsedMap=createHashMap(),this._mapName=r,this._specialAreas=o,this._geoJSON=parseInput(a)}return n.prototype.load=function(r,a){a=a||DEFAULT_NAME_PROPERTY;var o=this._parsedMap.get(a);if(!o){var s=this._parseToRegions(a);o=this._parsedMap.set(a,{regions:s,boundingRect:calculateBoundingRect(s)})}var l=createHashMap(),u=[];return each$f(o.regions,function(c){var d=c.name;r&&hasOwn(r,d)&&(c=c.cloneShallow(d=r[d])),u.push(c),l.set(d,c)}),{regions:u,boundingRect:o.boundingRect||new BoundingRect(0,0,0,0),regionsMap:l}},n.prototype._parseToRegions=function(r){var a=this._mapName,o=this._geoJSON,s;try{s=o?parseGeoJSON(o,r):[]}catch(l){throw new Error("Invalid geoJson format\n"+l.message)}return fixNanhai(a,s),each$f(s,function(l){var u=l.name;fixTextCoords(a,l),fixDiaoyuIsland(a,l);var c=this._specialAreas&&this._specialAreas[u];c&&l.transformTo(c.left,c.top,c.width,c.height)},this),s},n.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},n}();function calculateBoundingRect(n){for(var r,a=0;a<n.length;a++){var o=n[a].getBoundingRect();r=r||o.clone(),r.union(o)}return r}function parseInput(n){return isString(n)?typeof JSON<"u"&&JSON.parse?JSON.parse(n):new Function("return ("+n+");")():n}var storage=createHashMap();const geoSourceManager={registerMap:function(n,r,a){if(r.svg){var o=new GeoSVGResource(n,r.svg);storage.set(n,o)}else{var s=r.geoJson||r.geoJSON;s&&!r.features?a=r.specialAreas:s=r;var o=new GeoJSONResource(n,s,a);storage.set(n,o)}},getGeoResource:function(n){return storage.get(n)},getMapForUser:function(n){var r=storage.get(n);return r&&r.type==="geoJSON"&&r.getMapForUser()},load:function(n,r,a){var o=storage.get(n);if(o)return o.load(r,a)}};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(n){var r=n.getItemStyle(),a=n.get("areaColor");return a!=null&&(r.fill=a),r}function fixLineStyle(n){var r=n.style;r&&(r.stroke=r.stroke||r.fill,r.fill=null)}var MapDraw=function(){function n(r){var a=new Group$3;this.uid=getUID("ec_map_draw"),this._controller=new RoamController(r.getZr()),this._controllerHost={target:a},this.group=a,a.add(this._regionsGroup=new Group$3),a.add(this._svgGroup=new Group$3)}return n.prototype.draw=function(r,a,o,s,l){var u=r.mainType==="geo",c=r.getData&&r.getData();u&&a.eachComponent({mainType:"series",subType:"map"},function(x){!c&&x.getHostGeoModel()===r&&(c=x.getData())});var d=r.coordinateSystem,f=this._regionsGroup,p=this.group,v=d.getTransformInfo(),g=v.raw,y=v.roam,_=!f.childAt(0)||l;_?(p.x=y.x,p.y=y.y,p.scaleX=y.scaleX,p.scaleY=y.scaleY,p.dirty()):updateProps$1(p,y,r);var S=c&&c.getVisual("visualMeta")&&c.getVisual("visualMeta").length>0,b={api:o,geo:d,mapOrGeoModel:r,data:c,isVisualEncodedByVisualMap:S,isGeo:u,transformInfoRaw:g};d.resourceType==="geoJSON"?this._buildGeoJSON(b):d.resourceType==="geoSVG"&&this._buildSVG(b),this._updateController(r,a,o),this._updateMapSelectHandler(r,f,o,s)},n.prototype._buildGeoJSON=function(r){var a=this._regionsGroupByName=createHashMap(),o=createHashMap(),s=this._regionsGroup,l=r.transformInfoRaw,u=r.mapOrGeoModel,c=r.data,d=r.geo.projection,f=d&&d.stream;function p(y,_){return _&&(y=_(y)),y&&[y[0]*l.scaleX+l.x,y[1]*l.scaleY+l.y]}function v(y){for(var _=[],S=!f&&d&&d.project,b=0;b<y.length;++b){var x=p(y[b],S);x&&_.push(x)}return _}function g(y){return{shape:{points:v(y)}}}s.removeAll(),each$f(r.geo.regions,function(y){var _=y.name,S=a.get(_),b=o.get(_)||{},x=b.dataIdx,A=b.regionModel;if(!S){S=a.set(_,new Group$3),s.add(S),x=c?c.indexOfName(_):null,A=r.isGeo?u.getRegionModel(_):c?c.getItemModel(x):null;var w=A.get("silent",!0);w!=null&&(S.silent=w),o.set(_,{dataIdx:x,regionModel:A})}var E=[],D=[];each$f(y.geometries,function(P){if(P.type==="polygon"){var M=[P.exterior].concat(P.interiors||[]);f&&(M=projectPolys(M,f)),each$f(M,function(L){E.push(new Polygon(g(L)))})}else{var I=P.points;f&&(I=projectPolys(I,f,!0)),each$f(I,function(L){D.push(new Polyline$1(g(L)))})}});var C=p(y.getCenter(),d&&d.project);function $(P,M){if(P.length){var I=new CompoundPath({culling:!0,segmentIgnoreThreshold:1,shape:{paths:P}});S.add(I),applyOptionStyleForRegion(r,I,x,A),resetLabelForRegion(r,I,_,A,u,x,C),M&&(fixLineStyle(I),each$f(I.states,fixLineStyle))}}$(E),$(D,!0)}),a.each(function(y,_){var S=o.get(_),b=S.dataIdx,x=S.regionModel;resetEventTriggerForRegion(r,y,_,x,u,b),resetTooltipForRegion(r,y,_,x,u),resetStateTriggerForRegion(r,y,_,x,u)},this)},n.prototype._buildSVG=function(r){var a=r.geo.map,o=r.transformInfoRaw;this._svgGroup.x=o.x,this._svgGroup.y=o.y,this._svgGroup.scaleX=o.scaleX,this._svgGroup.scaleY=o.scaleY,this._svgResourceChanged(a)&&(this._freeSVG(),this._useSVG(a));var s=this._svgDispatcherMap=createHashMap(),l=!1;each$f(this._svgGraphicRecord.named,function(u){var c=u.name,d=r.mapOrGeoModel,f=r.data,p=u.svgNodeTagLower,v=u.el,g=f?f.indexOfName(c):null,y=d.getRegionModel(c);OPTION_STYLE_ENABLED_TAG_MAP.get(p)!=null&&v instanceof Displayable&&applyOptionStyleForRegion(r,v,g,y),v instanceof Displayable&&(v.culling=!0);var _=y.get("silent",!0);if(_!=null&&(v.silent=_),v.z2EmphasisLift=0,!u.namedFrom&&(LABEL_HOST_MAP.get(p)!=null&&resetLabelForRegion(r,v,c,y,d,g,null),resetEventTriggerForRegion(r,v,c,y,d,g),resetTooltipForRegion(r,v,c,y,d),STATE_TRIGGER_TAG_MAP.get(p)!=null)){var S=resetStateTriggerForRegion(r,v,c,y,d);S==="self"&&(l=!0);var b=s.get(c)||s.set(c,[]);b.push(v)}},this),this._enableBlurEntireSVG(l,r)},n.prototype._enableBlurEntireSVG=function(r,a){if(r&&a.isGeo){var o=a.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),s=o.opacity;this._svgGraphicRecord.root.traverse(function(l){if(!l.isGroup){setDefaultStateProxy(l);var u=l.ensureState("blur").style||{};u.opacity==null&&s!=null&&(u.opacity=s),l.ensureState("emphasis")}})}},n.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},n.prototype.findHighDownDispatchers=function(r,a){if(r==null)return[];var o=a.coordinateSystem;if(o.resourceType==="geoJSON"){var s=this._regionsGroupByName;if(s){var l=s.get(r);return l?[l]:[]}}else if(o.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(r)||[]},n.prototype._svgResourceChanged=function(r){return this._svgMapName!==r},n.prototype._useSVG=function(r){var a=geoSourceManager.getGeoResource(r);if(a&&a.type==="geoSVG"){var o=a.useGraphic(this.uid);this._svgGroup.add(o.root),this._svgGraphicRecord=o,this._svgMapName=r}},n.prototype._freeSVG=function(){var r=this._svgMapName;if(r!=null){var a=geoSourceManager.getGeoResource(r);a&&a.type==="geoSVG"&&a.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},n.prototype._updateController=function(r,a,o){var s=r.coordinateSystem,l=this._controller,u=this._controllerHost;u.zoomLimit=r.get("scaleLimit"),u.zoom=s.getZoom(),l.enable(r.get("roam")||!1);var c=r.mainType;function d(){var f={type:"geoRoam",componentType:c};return f[c+"Id"]=r.id,f}l.off("pan").on("pan",function(f){this._mouseDownFlag=!1,updateViewOnPan(u,f.dx,f.dy),o.dispatchAction(extend$2(d(),{dx:f.dx,dy:f.dy,animation:{duration:0}}))},this),l.off("zoom").on("zoom",function(f){this._mouseDownFlag=!1,updateViewOnZoom(u,f.scale,f.originX,f.originY),o.dispatchAction(extend$2(d(),{totalZoom:u.zoom,zoom:f.scale,originX:f.originX,originY:f.originY,animation:{duration:0}}))},this),l.setPointerChecker(function(f,p,v){return s.containPoint([p,v])&&!onIrrelevantElement(f,o,r)})},n.prototype.resetForLabelLayout=function(){this.group.traverse(function(r){var a=r.getTextContent();a&&(a.ignore=mapLabelRaw(a).ignore)})},n.prototype._updateMapSelectHandler=function(r,a,o,s){var l=this;a.off("mousedown"),a.off("click"),r.get("selectedMode")&&(a.on("mousedown",function(){l._mouseDownFlag=!0}),a.on("click",function(u){l._mouseDownFlag&&(l._mouseDownFlag=!1)}))},n}();function applyOptionStyleForRegion(n,r,a,o){var s=o.getModel("itemStyle"),l=o.getModel(["emphasis","itemStyle"]),u=o.getModel(["blur","itemStyle"]),c=o.getModel(["select","itemStyle"]),d=getFixedItemStyle(s),f=getFixedItemStyle(l),p=getFixedItemStyle(c),v=getFixedItemStyle(u),g=n.data;if(g){var y=g.getItemVisual(a,"style"),_=g.getItemVisual(a,"decal");n.isVisualEncodedByVisualMap&&y.fill&&(d.fill=y.fill),_&&(d.decal=createOrUpdatePatternFromDecal(_,n.api))}r.setStyle(d),r.style.strokeNoScale=!0,r.ensureState("emphasis").style=f,r.ensureState("select").style=p,r.ensureState("blur").style=v,setDefaultStateProxy(r)}function resetLabelForRegion(n,r,a,o,s,l,u){var c=n.data,d=n.isGeo,f=c&&isNaN(c.get(c.mapDimension("value"),l)),p=c&&c.getItemLayout(l);if(d||f||p&&p.showLabel){var v=d?a:l,g=void 0;(!c||l>=0)&&(g=s);var y=u?{normal:{align:"center",verticalAlign:"middle"}}:null;setLabelStyle(r,getLabelStatesModels(o),{labelFetcher:g,labelDataIndex:v,defaultText:a},y);var _=r.getTextContent();if(_&&(mapLabelRaw(_).ignore=_.ignore,r.textConfig&&u)){var S=r.getBoundingRect().clone();r.textConfig.layoutRect=S,r.textConfig.position=[(u[0]-S.x)/S.width*100+"%",(u[1]-S.y)/S.height*100+"%"]}r.disableLabelAnimation=!0}else r.removeTextContent(),r.removeTextConfig(),r.disableLabelAnimation=null}function resetEventTriggerForRegion(n,r,a,o,s,l){n.data?n.data.setItemGraphicEl(l,r):getECData(r).eventData={componentType:"geo",componentIndex:s.componentIndex,geoIndex:s.componentIndex,name:a,region:o&&o.option||{}}}function resetTooltipForRegion(n,r,a,o,s){n.data||setTooltipConfig({el:r,componentModel:s,itemName:a,itemTooltipOption:o.get("tooltip")})}function resetStateTriggerForRegion(n,r,a,o,s){r.highDownSilentOnTouch=!!s.get("selectedMode");var l=o.getModel("emphasis"),u=l.get("focus");return toggleHoverEmphasis(r,u,l.get("blurScope"),l.get("disabled")),n.isGeo&&enableComponentHighDownFeatures(r,s,a),u}function projectPolys(n,r,a){var o=[],s;function l(){s=[]}function u(){s.length&&(o.push(s),s=[])}var c=r({polygonStart:l,polygonEnd:u,lineStart:l,lineEnd:u,point:function(d,f){isFinite(d)&&isFinite(f)&&s.push([d,f])},sphere:function(){}});return!a&&c.polygonStart(),each$f(n,function(d){c.lineStart();for(var f=0;f<d.length;f++)c.point(d[f][0],d[f][1]);c.lineEnd()}),!a&&c.polygonEnd(),o}var MapView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s,l){if(!(l&&l.type==="mapToggleSelect"&&l.from===this.uid)){var u=this.group;if(u.removeAll(),!a.getHostGeoModel()){if(this._mapDraw&&l&&l.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),l&&l.type==="geoRoam"&&l.componentType==="series"&&l.seriesId===a.id){var c=this._mapDraw;c&&u.add(c.group)}else if(a.needsDrawMap){var c=this._mapDraw||new MapDraw(s);u.add(c.group),c.draw(a,o,s,this,l),this._mapDraw=c}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;a.get("showLegendSymbol")&&o.getComponent("legend")&&this._renderSymbols(a,o,s)}}},r.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},r.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},r.prototype._renderSymbols=function(a,o,s){var l=a.originalData,u=this.group;l.each(l.mapDimension("value"),function(c,d){if(!isNaN(c)){var f=l.getItemLayout(d);if(!(!f||!f.point)){var p=f.point,v=f.offset,g=new Circle({style:{fill:a.getData().getVisual("style").fill},shape:{cx:p[0]+v*9,cy:p[1],r:3},silent:!0,z2:8+(v?0:Z2_EMPHASIS_LIFT+1)});if(!v){var y=a.mainSeries.getData(),_=l.getName(d),S=y.indexOfName(_),b=l.getItemModel(d),x=b.getModel("label"),A=y.getItemGraphicEl(S);setLabelStyle(g,getLabelStatesModels(b),{labelFetcher:{getFormattedLabel:function(w,E){return a.getFormattedLabel(S,E)}},defaultText:_}),g.disableLabelAnimation=!0,x.get("position")||g.setTextConfig({position:"bottom"}),A.onHoverStateChange=function(w){setStatesFlag(g,w)}}u.add(g)}}})},r.type="map",r}(ChartView),MapSeries=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.needsDrawMap=!1,a.seriesGroup=[],a.getTooltipPosition=function(o){if(o!=null){var s=this.getData().getName(o),l=this.coordinateSystem,u=l.getRegion(s);return u&&l.dataToPoint(u.getCenter())}},a}return r.prototype.getInitialData=function(a){for(var o=createSeriesDataSimply(this,{coordDimensions:["value"],encodeDefaulter:curry$1(makeSeriesEncodeForNameBased,this)}),s=createHashMap(),l=[],u=0,c=o.count();u<c;u++){var d=o.getName(u);s.set(d,u)}var f=geoSourceManager.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return each$f(f.regions,function(p){var v=p.name,g=s.get(v),y=p.properties&&p.properties.echartsStyle,_;g==null?(_={name:v},l.push(_)):_=o.getRawDataItem(g),y&&merge(_,y)}),o.appendData(l),o},r.prototype.getHostGeoModel=function(){var a=this.option.geoIndex;return a!=null?this.ecModel.getComponent("geo",a):null},r.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},r.prototype.getRawValue=function(a){var o=this.getData();return o.get(o.mapDimension("value"),a)},r.prototype.getRegionModel=function(a){var o=this.getData();return o.getItemModel(o.indexOfName(a))},r.prototype.formatTooltip=function(a,o,s){for(var l=this.getData(),u=this.getRawValue(a),c=l.getName(a),d=this.seriesGroup,f=[],p=0;p<d.length;p++){var v=d[p].originalData.indexOfName(c),g=l.mapDimension("value");isNaN(d[p].originalData.get(g,v))||f.push(d[p].name)}return createTooltipMarkup("section",{header:f.join(", "),noHeader:!f.length,blocks:[createTooltipMarkup("nameValue",{name:c,value:u})]})},r.prototype.setZoom=function(a){this.option.zoom=a},r.prototype.setCenter=function(a){this.option.center=a},r.prototype.getLegendIcon=function(a){var o=a.icon||"roundRect",s=createSymbol$1(o,0,0,a.itemWidth,a.itemHeight,a.itemStyle.fill);return s.setStyle(a.itemStyle),s.style.stroke="none",o.indexOf("empty")>-1&&(s.style.stroke=s.style.fill,s.style.fill="#fff",s.style.lineWidth=2),s},r.type="series.map",r.dependencies=["geo"],r.layoutMode="box",r.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:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},r}(SeriesModel);function dataStatistics(n,r){var a={};return each$f(n,function(o){o.each(o.mapDimension("value"),function(s,l){var u="ec-"+o.getName(l);a[u]=a[u]||[],isNaN(s)||a[u].push(s)})}),n[0].map(n[0].mapDimension("value"),function(o,s){for(var l="ec-"+n[0].getName(s),u=0,c=1/0,d=-1/0,f=a[l].length,p=0;p<f;p++)c=Math.min(c,a[l][p]),d=Math.max(d,a[l][p]),u+=a[l][p];var v;return r==="min"?v=c:r==="max"?v=d:r==="average"?v=u/f:v=u,f===0?NaN:v})}function mapDataStatistic(n){var r={};n.eachSeriesByType("map",function(a){var o=a.getHostGeoModel(),s=o?"o"+o.id:"i"+a.getMapType();(r[s]=r[s]||[]).push(a)}),each$f(r,function(a,o){for(var s=dataStatistics(map$1(a,function(u){return u.getData()}),a[0].get("mapValueCalculation")),l=0;l<a.length;l++)a[l].originalData=a[l].getData();for(var l=0;l<a.length;l++)a[l].seriesGroup=a,a[l].needsDrawMap=l===0&&!a[l].getHostGeoModel(),a[l].setData(s.cloneShallow()),a[l].mainSeries=a[0]})}function mapSymbolLayout(n){var r={};n.eachSeriesByType("map",function(a){var o=a.getMapType();if(!(a.getHostGeoModel()||r[o])){var s={};each$f(a.seriesGroup,function(u){var c=u.coordinateSystem,d=u.originalData;u.get("showLegendSymbol")&&n.getComponent("legend")&&d.each(d.mapDimension("value"),function(f,p){var v=d.getName(p),g=c.getRegion(v);if(!(!g||isNaN(f))){var y=s[v]||0,_=c.dataToPoint(g.getCenter());s[v]=y+1,d.setItemLayout(p,{point:_,offset:y})}})});var l=a.getData();l.each(function(u){var c=l.getName(u),d=l.getItemLayout(u)||{};d.showLabel=!s[c],l.setItemLayout(u,d)}),r[o]=!0}})}var v2ApplyTransform=applyTransform$1,View=function(n){__extends(r,n);function r(a){var o=n.call(this)||this;return o.type="view",o.dimensions=["x","y"],o._roamTransformable=new Transformable,o._rawTransformable=new Transformable,o.name=a,o}return r.prototype.setBoundingRect=function(a,o,s,l){return this._rect=new BoundingRect(a,o,s,l),this._rect},r.prototype.getBoundingRect=function(){return this._rect},r.prototype.setViewRect=function(a,o,s,l){this._transformTo(a,o,s,l),this._viewRect=new BoundingRect(a,o,s,l)},r.prototype._transformTo=function(a,o,s,l){var u=this.getBoundingRect(),c=this._rawTransformable;c.transform=u.calculateTransform(new BoundingRect(a,o,s,l));var d=c.parent;c.parent=null,c.decomposeTransform(),c.parent=d,this._updateTransform()},r.prototype.setCenter=function(a,o){a&&(this._center=[parsePercent(a[0],o.getWidth()),parsePercent(a[1],o.getHeight())],this._updateCenterAndZoom())},r.prototype.setZoom=function(a){a=a||1;var o=this.zoomLimit;o&&(o.max!=null&&(a=Math.min(o.max,a)),o.min!=null&&(a=Math.max(o.min,a))),this._zoom=a,this._updateCenterAndZoom()},r.prototype.getDefaultCenter=function(){var a=this.getBoundingRect(),o=a.x+a.width/2,s=a.y+a.height/2;return[o,s]},r.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},r.prototype.getZoom=function(){return this._zoom||1},r.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},r.prototype._updateCenterAndZoom=function(){var a=this._rawTransformable.getLocalTransform(),o=this._roamTransformable,s=this.getDefaultCenter(),l=this.getCenter(),u=this.getZoom();l=applyTransform$1([],l,a),s=applyTransform$1([],s,a),o.originX=l[0],o.originY=l[1],o.x=s[0]-l[0],o.y=s[1]-l[1],o.scaleX=o.scaleY=u,this._updateTransform()},r.prototype._updateTransform=function(){var a=this._roamTransformable,o=this._rawTransformable;o.parent=a,a.updateTransform(),o.updateTransform(),copy(this.transform||(this.transform=[]),o.transform||create$1()),this._rawTransform=o.getLocalTransform(),this.invTransform=this.invTransform||[],invert(this.invTransform,this.transform),this.decomposeTransform()},r.prototype.getTransformInfo=function(){var a=this._rawTransformable,o=this._roamTransformable,s=new Transformable;return s.transform=o.transform,s.decomposeTransform(),{roam:{x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY},raw:{x:a.x,y:a.y,scaleX:a.scaleX,scaleY:a.scaleY}}},r.prototype.getViewRect=function(){return this._viewRect},r.prototype.getViewRectAfterRoam=function(){var a=this.getBoundingRect().clone();return a.applyTransform(this.transform),a},r.prototype.dataToPoint=function(a,o,s){var l=o?this._rawTransform:this.transform;return s=s||[],l?v2ApplyTransform(s,a,l):copy$1(s,a)},r.prototype.pointToData=function(a){var o=this.invTransform;return o?v2ApplyTransform([],a,o):[a[0],a[1]]},r.prototype.convertToPixel=function(a,o,s){var l=getCoordSys$4(o);return l===this?l.dataToPoint(s):null},r.prototype.convertFromPixel=function(a,o,s){var l=getCoordSys$4(o);return l===this?l.pointToData(s):null},r.prototype.containPoint=function(a){return this.getViewRectAfterRoam().contain(a[0],a[1])},r.dimensions=["x","y"],r}(Transformable);function getCoordSys$4(n){var r=n.seriesModel;return r?r.coordinateSystem:null}var GEO_DEFAULT_PARAMS={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},geo2DDimensions=["lng","lat"],Geo=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this,a)||this;l.dimensions=geo2DDimensions,l.type="geo",l._nameCoordMap=createHashMap(),l.map=o;var u=s.projection,c=geoSourceManager.load(o,s.nameMap,s.nameProperty),d=geoSourceManager.getGeoResource(o);l.resourceType=d?d.type:null;var f=l.regions=c.regions,p=GEO_DEFAULT_PARAMS[d.type];l._regionsMap=c.regionsMap,l.regions=c.regions,l.projection=u;var v;if(u)for(var g=0;g<f.length;g++){var y=f[g].getBoundingRect(u);v=v||y.clone(),v.union(y)}else v=c.boundingRect;return l.setBoundingRect(v.x,v.y,v.width,v.height),l.aspectScale=u?1:retrieve2(s.aspectScale,p.aspectScale),l._invertLongitute=u?!1:p.invertLongitute,l}return r.prototype._transformTo=function(a,o,s,l){var u=this.getBoundingRect(),c=this._invertLongitute;u=u.clone(),c&&(u.y=-u.y-u.height);var d=this._rawTransformable;d.transform=u.calculateTransform(new BoundingRect(a,o,s,l));var f=d.parent;d.parent=null,d.decomposeTransform(),d.parent=f,c&&(d.scaleY=-d.scaleY),this._updateTransform()},r.prototype.getRegion=function(a){return this._regionsMap.get(a)},r.prototype.getRegionByCoord=function(a){for(var o=this.regions,s=0;s<o.length;s++){var l=o[s];if(l.type==="geoJSON"&&l.contain(a))return o[s]}},r.prototype.addGeoCoord=function(a,o){this._nameCoordMap.set(a,o)},r.prototype.getGeoCoord=function(a){var o=this._regionsMap.get(a);return this._nameCoordMap.get(a)||o&&o.getCenter()},r.prototype.dataToPoint=function(a,o,s){if(isString(a)&&(a=this.getGeoCoord(a)),a){var l=this.projection;return l&&(a=l.project(a)),a&&this.projectedToPoint(a,o,s)}},r.prototype.pointToData=function(a){var o=this.projection;return o&&(a=o.unproject(a)),a&&this.pointToProjected(a)},r.prototype.pointToProjected=function(a){return n.prototype.pointToData.call(this,a)},r.prototype.projectedToPoint=function(a,o,s){return n.prototype.dataToPoint.call(this,a,o,s)},r.prototype.convertToPixel=function(a,o,s){var l=getCoordSys$3(o);return l===this?l.dataToPoint(s):null},r.prototype.convertFromPixel=function(a,o,s){var l=getCoordSys$3(o);return l===this?l.pointToData(s):null},r}(View);mixin(Geo,View);function getCoordSys$3(n){var r=n.geoModel,a=n.seriesModel;return r?r.coordinateSystem:a?a.coordinateSystem||(a.getReferringComponents("geo",SINGLE_REFERRING).models[0]||{}).coordinateSystem:null}function resizeGeo(n,r){var a=n.get("boundingCoords");if(a!=null){var o=a[0],s=a[1];if(isFinite(o[0])&&isFinite(o[1])&&isFinite(s[0])&&isFinite(s[1])){var l=this.projection;if(l){var u=o[0],c=o[1],d=s[0],f=s[1];o=[1/0,1/0],s=[-1/0,-1/0];var p=function(C,$,P,M){for(var I=P-C,L=M-$,O=0;O<=100;O++){var R=O/100,N=l.project([C+I*R,$+L*R]);min$1(o,o,N),max$1(s,s,N)}};p(u,c,d,c),p(d,c,d,f),p(d,f,u,f),p(u,f,d,c)}this.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1])}}var v=this.getBoundingRect(),g=n.get("layoutCenter"),y=n.get("layoutSize"),_=r.getWidth(),S=r.getHeight(),b=v.width/v.height*this.aspectScale,x=!1,A,w;g&&y&&(A=[parsePercent(g[0],_),parsePercent(g[1],S)],w=parsePercent(y,Math.min(_,S)),!isNaN(A[0])&&!isNaN(A[1])&&!isNaN(w)&&(x=!0));var E;if(x)E={},b>1?(E.width=w,E.height=w/b):(E.height=w,E.width=w*b),E.y=A[1]-E.height/2,E.x=A[0]-E.width/2;else{var D=n.getBoxLayoutParams();D.aspect=b,E=getLayoutRect(D,{width:_,height:S})}this.setViewRect(E.x,E.y,E.width,E.height),this.setCenter(n.get("center"),r),this.setZoom(n.get("zoom"))}function setGeoCoords(n,r){each$f(r.get("geoCoord"),function(a,o){n.addGeoCoord(o,a)})}var GeoCreator=function(){function n(){this.dimensions=geo2DDimensions}return n.prototype.create=function(r,a){var o=[];function s(u){return{nameProperty:u.get("nameProperty"),aspectScale:u.get("aspectScale"),projection:u.get("projection")}}r.eachComponent("geo",function(u,c){var d=u.get("map"),f=new Geo(d+c,d,extend$2({nameMap:u.get("nameMap")},s(u)));f.zoomLimit=u.get("scaleLimit"),o.push(f),u.coordinateSystem=f,f.model=u,f.resize=resizeGeo,f.resize(u,a)}),r.eachSeries(function(u){var c=u.get("coordinateSystem");if(c==="geo"){var d=u.get("geoIndex")||0;u.coordinateSystem=o[d]}});var l={};return r.eachSeriesByType("map",function(u){if(!u.getHostGeoModel()){var c=u.getMapType();l[c]=l[c]||[],l[c].push(u)}}),each$f(l,function(u,c){var d=map$1(u,function(p){return p.get("nameMap")}),f=new Geo(c,c,extend$2({nameMap:mergeAll(d)},s(u[0])));f.zoomLimit=retrieve.apply(null,map$1(u,function(p){return p.get("scaleLimit")})),o.push(f),f.resize=resizeGeo,f.resize(u[0],a),each$f(u,function(p){p.coordinateSystem=f,setGeoCoords(f,p)})}),o},n.prototype.getFilledRegions=function(r,a,o,s){for(var l=(r||[]).slice(),u=createHashMap(),c=0;c<l.length;c++)u.set(l[c].name,l[c]);var d=geoSourceManager.load(a,o,s);return each$f(d.regions,function(f){var p=f.name,v=u.get(p),g=f.properties&&f.properties.echartsStyle;v||(v={name:p},l.push(v)),g&&merge(v,g)}),l},n}(),geoCreator=new GeoCreator,GeoModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(a,o,s){var l=geoSourceManager.getGeoResource(a.map);if(l&&l.type==="geoJSON"){var u=a.itemStyle=a.itemStyle||{};"color"in u||(u.color="#eee")}this.mergeDefaultAndTheme(a,s),defaultEmphasis(a,"label",["show"])},r.prototype.optionUpdated=function(){var a=this,o=this.option;o.regions=geoCreator.getFilledRegions(o.regions,o.map,o.nameMap,o.nameProperty);var s={};this._optionModelMap=reduce(o.regions||[],function(l,u){var c=u.name;return c&&(l.set(c,new Model(u,a,a.ecModel)),u.selected&&(s[c]=!0)),l},createHashMap()),o.selectedMap||(o.selectedMap=s)},r.prototype.getRegionModel=function(a){return this._optionModelMap.get(a)||new Model(null,this,this.ecModel)},r.prototype.getFormattedLabel=function(a,o){var s=this.getRegionModel(a),l=o==="normal"?s.get(["label","formatter"]):s.get(["emphasis","label","formatter"]),u={name:a};if(isFunction(l))return u.status=o,l(u);if(isString(l))return l.replace("{a}",a!=null?a:"")},r.prototype.setZoom=function(a){this.option.zoom=a},r.prototype.setCenter=function(a){this.option.center=a},r.prototype.select=function(a){var o=this.option,s=o.selectedMode;if(s){s!=="multiple"&&(o.selectedMap=null);var l=o.selectedMap||(o.selectedMap={});l[a]=!0}},r.prototype.unSelect=function(a){var o=this.option.selectedMap;o&&(o[a]=!1)},r.prototype.toggleSelected=function(a){this[this.isSelected(a)?"unSelect":"select"](a)},r.prototype.isSelected=function(a){var o=this.option.selectedMap;return!!(o&&o[a])},r.type="geo",r.layoutMode="box",r.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:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},r}(ComponentModel);function getCenterCoord(n,r){return n.pointToProjected?n.pointToProjected(r):n.pointToData(r)}function updateCenterAndZoom(n,r,a,o){var s=n.getZoom(),l=n.getCenter(),u=r.zoom,c=n.projectedToPoint?n.projectedToPoint(l):n.dataToPoint(l);if(r.dx!=null&&r.dy!=null&&(c[0]-=r.dx,c[1]-=r.dy,n.setCenter(getCenterCoord(n,c),o)),u!=null){if(a){var d=a.min||0,f=a.max||1/0;u=Math.max(Math.min(s*u,f),d)/s}n.scaleX*=u,n.scaleY*=u;var p=(r.originX-n.x)*(u-1),v=(r.originY-n.y)*(u-1);n.x-=p,n.y-=v,n.updateTransform(),n.setCenter(getCenterCoord(n,c),o),n.setZoom(u*s)}return{center:n.getCenter(),zoom:n.getZoom()}}var GeoView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.focusBlurEnabled=!0,a}return r.prototype.init=function(a,o){this._api=o},r.prototype.render=function(a,o,s,l){if(this._model=a,!a.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new MapDraw(s));var u=this._mapDraw;u.draw(a,o,s,this,l),u.group.on("click",this._handleRegionClick,this),u.group.silent=a.get("silent"),this.group.add(u.group),this.updateSelectStatus(a,o,s)},r.prototype._handleRegionClick=function(a){var o;findEventDispatcher(a.target,function(s){return(o=getECData(s).eventData)!=null},!0),o&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:o.name})},r.prototype.updateSelectStatus=function(a,o,s){var l=this;this._mapDraw.group.traverse(function(u){var c=getECData(u).eventData;if(c)return l._model.isSelected(c.name)?s.enterSelect(u):s.leaveSelect(u),!0})},r.prototype.findHighDownDispatchers=function(a){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(a,this._model)},r.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},r.type="geo",r}(ComponentView);function registerMap(n,r,a){geoSourceManager.registerMap(n,r,a)}function install$L(n){n.registerCoordinateSystem("geo",geoCreator),n.registerComponentModel(GeoModel),n.registerComponentView(GeoView),n.registerImpl("registerMap",registerMap),n.registerImpl("getMap",function(a){return geoSourceManager.getMapForUser(a)});function r(a,o){o.update="geo:updateSelectStatus",n.registerAction(o,function(s,l){var u={},c=[];return l.eachComponent({mainType:"geo",query:s},function(d){d[a](s.name);var f=d.coordinateSystem;each$f(f.regions,function(v){u[v.name]=d.isSelected(v.name)||!1});var p=[];each$f(u,function(v,g){u[g]&&p.push(g)}),c.push({geoIndex:d.componentIndex,name:p})}),{selected:u,allSelected:c,name:s.name}})}r("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),r("select",{type:"geoSelect",event:"geoselected"}),r("unSelect",{type:"geoUnSelect",event:"geounselected"}),n.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(a,o,s){var l=a.componentType||"series";o.eachComponent({mainType:l,query:a},function(u){var c=u.coordinateSystem;if(c.type==="geo"){var d=updateCenterAndZoom(c,a,u.get("scaleLimit"),s);u.setCenter&&u.setCenter(d.center),u.setZoom&&u.setZoom(d.zoom),l==="series"&&each$f(u.seriesGroup,function(f){f.setCenter(d.center),f.setZoom(d.zoom)})}})})}function install$K(n){use(install$L),n.registerChartView(MapView),n.registerSeriesModel(MapSeries),n.registerLayout(mapSymbolLayout),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,mapDataStatistic),createLegacyDataSelectAction("map",n.registerAction)}function init(n){var r=n;r.hierNode={defaultAncestor:null,ancestor:r,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var a=[r],o,s;o=a.pop();)if(s=o.children,o.isExpand&&s.length)for(var l=s.length,u=l-1;u>=0;u--){var c=s[u];c.hierNode={defaultAncestor:null,ancestor:c,prelim:0,modifier:0,change:0,shift:0,i:u,thread:null},a.push(c)}}function firstWalk(n,r){var a=n.isExpand?n.children:[],o=n.parentNode.children,s=n.hierNode.i?o[n.hierNode.i-1]:null;if(a.length){executeShifts(n);var l=(a[0].hierNode.prelim+a[a.length-1].hierNode.prelim)/2;s?(n.hierNode.prelim=s.hierNode.prelim+r(n,s),n.hierNode.modifier=n.hierNode.prelim-l):n.hierNode.prelim=l}else s&&(n.hierNode.prelim=s.hierNode.prelim+r(n,s));n.parentNode.hierNode.defaultAncestor=apportion(n,s,n.parentNode.hierNode.defaultAncestor||o[0],r)}function secondWalk(n){var r=n.hierNode.prelim+n.parentNode.hierNode.modifier;n.setLayout({x:r},!0),n.hierNode.modifier+=n.parentNode.hierNode.modifier}function separation(n){return arguments.length?n:defaultSeparation}function radialCoordinate(n,r){return n-=Math.PI/2,{x:r*Math.cos(n),y:r*Math.sin(n)}}function getViewRect$4(n,r){return getLayoutRect(n.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})}function executeShifts(n){for(var r=n.children,a=r.length,o=0,s=0;--a>=0;){var l=r[a];l.hierNode.prelim+=o,l.hierNode.modifier+=o,s+=l.hierNode.change,o+=l.hierNode.shift+s}}function apportion(n,r,a,o){if(r){for(var s=n,l=n,u=l.parentNode.children[0],c=r,d=s.hierNode.modifier,f=l.hierNode.modifier,p=u.hierNode.modifier,v=c.hierNode.modifier;c=nextRight(c),l=nextLeft(l),c&&l;){s=nextRight(s),u=nextLeft(u),s.hierNode.ancestor=n;var g=c.hierNode.prelim+v-l.hierNode.prelim-f+o(c,l);g>0&&(moveSubtree(nextAncestor(c,n,a),n,g),f+=g,d+=g),v+=c.hierNode.modifier,f+=l.hierNode.modifier,d+=s.hierNode.modifier,p+=u.hierNode.modifier}c&&!nextRight(s)&&(s.hierNode.thread=c,s.hierNode.modifier+=v-d),l&&!nextLeft(u)&&(u.hierNode.thread=l,u.hierNode.modifier+=f-p,a=n)}return a}function nextRight(n){var r=n.children;return r.length&&n.isExpand?r[r.length-1]:n.hierNode.thread}function nextLeft(n){var r=n.children;return r.length&&n.isExpand?r[0]:n.hierNode.thread}function nextAncestor(n,r,a){return n.hierNode.ancestor.parentNode===r.parentNode?n.hierNode.ancestor:a}function moveSubtree(n,r,a){var o=a/(r.hierNode.i-n.hierNode.i);r.hierNode.change-=o,r.hierNode.shift+=a,r.hierNode.modifier+=a,r.hierNode.prelim+=a,n.hierNode.change+=o}function defaultSeparation(n,r){return n.parentNode===r.parentNode?1:2}var TreeEdgeShape=function(){function n(){this.parentPoint=[],this.childPoints=[]}return n}(),TreePath=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new TreeEdgeShape},r.prototype.buildPath=function(a,o){var s=o.childPoints,l=s.length,u=o.parentPoint,c=s[0],d=s[l-1];if(l===1){a.moveTo(u[0],u[1]),a.lineTo(c[0],c[1]);return}var f=o.orient,p=f==="TB"||f==="BT"?0:1,v=1-p,g=parsePercent(o.forkPosition,1),y=[];y[p]=u[p],y[v]=u[v]+(d[v]-u[v])*g,a.moveTo(u[0],u[1]),a.lineTo(y[0],y[1]),a.moveTo(c[0],c[1]),y[p]=c[p],a.lineTo(y[0],y[1]),y[p]=d[p],a.lineTo(y[0],y[1]),a.lineTo(d[0],d[1]);for(var _=1;_<l-1;_++){var S=s[_];a.moveTo(S[0],S[1]),y[p]=S[p],a.lineTo(y[0],y[1])}},r}(Path),TreeView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a._mainGroup=new Group$3,a}return r.prototype.init=function(a,o){this._controller=new RoamController(o.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},r.prototype.render=function(a,o,s){var l=a.getData(),u=a.layoutInfo,c=this._mainGroup,d=a.get("layout");d==="radial"?(c.x=u.x+u.width/2,c.y=u.y+u.height/2):(c.x=u.x,c.y=u.y),this._updateViewCoordSys(a,s),this._updateController(a,o,s);var f=this._data;l.diff(f).add(function(p){symbolNeedsDraw(l,p)&&updateNode(l,p,null,c,a)}).update(function(p,v){var g=f.getItemGraphicEl(v);if(!symbolNeedsDraw(l,p)){g&&removeNode(f,v,g,c,a);return}updateNode(l,p,g,c,a)}).remove(function(p){var v=f.getItemGraphicEl(p);v&&removeNode(f,p,v,c,a)}).execute(),this._nodeScaleRatio=a.get("nodeScaleRatio"),this._updateNodeAndLinkScale(a),a.get("expandAndCollapse")===!0&&l.eachItemGraphicEl(function(p,v){p.off("click").on("click",function(){s.dispatchAction({type:"treeExpandAndCollapse",seriesId:a.id,dataIndex:v})})}),this._data=l},r.prototype._updateViewCoordSys=function(a,o){var s=a.getData(),l=[];s.each(function(v){var g=s.getItemLayout(v);g&&!isNaN(g.x)&&!isNaN(g.y)&&l.push([+g.x,+g.y])});var u=[],c=[];fromPoints(l,u,c);var d=this._min,f=this._max;c[0]-u[0]===0&&(u[0]=d?d[0]:u[0]-1,c[0]=f?f[0]:c[0]+1),c[1]-u[1]===0&&(u[1]=d?d[1]:u[1]-1,c[1]=f?f[1]:c[1]+1);var p=a.coordinateSystem=new View;p.zoomLimit=a.get("scaleLimit"),p.setBoundingRect(u[0],u[1],c[0]-u[0],c[1]-u[1]),p.setCenter(a.get("center"),o),p.setZoom(a.get("zoom")),this.group.attr({x:p.x,y:p.y,scaleX:p.scaleX,scaleY:p.scaleY}),this._min=u,this._max=c},r.prototype._updateController=function(a,o,s){var l=this,u=this._controller,c=this._controllerHost,d=this.group;u.setPointerChecker(function(f,p,v){var g=d.getBoundingRect();return g.applyTransform(d.transform),g.contain(p,v)&&!onIrrelevantElement(f,s,a)}),u.enable(a.get("roam")),c.zoomLimit=a.get("scaleLimit"),c.zoom=a.coordinateSystem.getZoom(),u.off("pan").off("zoom").on("pan",function(f){updateViewOnPan(c,f.dx,f.dy),s.dispatchAction({seriesId:a.id,type:"treeRoam",dx:f.dx,dy:f.dy})}).on("zoom",function(f){updateViewOnZoom(c,f.scale,f.originX,f.originY),s.dispatchAction({seriesId:a.id,type:"treeRoam",zoom:f.scale,originX:f.originX,originY:f.originY}),l._updateNodeAndLinkScale(a),s.updateLabelLayout()})},r.prototype._updateNodeAndLinkScale=function(a){var o=a.getData(),s=this._getNodeGlobalScale(a);o.eachItemGraphicEl(function(l,u){l.setSymbolScale(s)})},r.prototype._getNodeGlobalScale=function(a){var o=a.coordinateSystem;if(o.type!=="view")return 1;var s=this._nodeScaleRatio,l=o.scaleX||1,u=o.getZoom(),c=(u-1)*s+1;return c/l},r.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},r.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},r.type="tree",r}(ChartView);function symbolNeedsDraw(n,r){var a=n.getItemLayout(r);return a&&!isNaN(a.x)&&!isNaN(a.y)}function updateNode(n,r,a,o,s){var l=!a,u=n.tree.getNodeByDataIndex(r),c=u.getModel(),d=u.getVisual("style").fill,f=u.isExpand===!1&&u.children.length!==0?d:"#fff",p=n.tree.root,v=u.parentNode===p?u:u.parentNode||u,g=n.getItemGraphicEl(v.dataIndex),y=v.getLayout(),_=g?{x:g.__oldX,y:g.__oldY,rawX:g.__radialOldRawX,rawY:g.__radialOldRawY}:y,S=u.getLayout();l?(a=new Symbol$1(n,r,null,{symbolInnerColor:f,useNameLabel:!0}),a.x=_.x,a.y=_.y):a.updateData(n,r,null,{symbolInnerColor:f,useNameLabel:!0}),a.__radialOldRawX=a.__radialRawX,a.__radialOldRawY=a.__radialRawY,a.__radialRawX=S.rawX,a.__radialRawY=S.rawY,o.add(a),n.setItemGraphicEl(r,a),a.__oldX=a.x,a.__oldY=a.y,updateProps$1(a,{x:S.x,y:S.y},s);var b=a.getSymbolPath();if(s.get("layout")==="radial"){var x=p.children[0],A=x.getLayout(),w=x.children.length,E=void 0,D=void 0;if(S.x===A.x&&u.isExpand===!0&&x.children.length){var C={x:(x.children[0].getLayout().x+x.children[w-1].getLayout().x)/2,y:(x.children[0].getLayout().y+x.children[w-1].getLayout().y)/2};E=Math.atan2(C.y-A.y,C.x-A.x),E<0&&(E=Math.PI*2+E),D=C.x<A.x,D&&(E=E-Math.PI)}else E=Math.atan2(S.y-A.y,S.x-A.x),E<0&&(E=Math.PI*2+E),u.children.length===0||u.children.length!==0&&u.isExpand===!1?(D=S.x<A.x,D&&(E=E-Math.PI)):(D=S.x>A.x,D||(E=E-Math.PI));var $=D?"left":"right",P=c.getModel("label"),M=P.get("rotate"),I=M*(Math.PI/180),L=b.getTextContent();L&&(b.setTextConfig({position:P.get("position")||$,rotation:M==null?-E:I,origin:"center"}),L.setStyle("verticalAlign","middle"))}var O=c.get(["emphasis","focus"]),R=O==="relative"?concatArray(u.getAncestorsIndices(),u.getDescendantIndices()):O==="ancestor"?u.getAncestorsIndices():O==="descendant"?u.getDescendantIndices():null;R&&(getECData(a).focus=R),drawEdge(s,u,p,a,_,y,S,o),a.__edge&&(a.onHoverStateChange=function(N){if(N!=="blur"){var V=u.parentNode&&n.getItemGraphicEl(u.parentNode.dataIndex);V&&V.hoverState===HOVER_STATE_BLUR||setStatesFlag(a.__edge,N)}})}function drawEdge(n,r,a,o,s,l,u,c){var d=r.getModel(),f=n.get("edgeShape"),p=n.get("layout"),v=n.getOrient(),g=n.get(["lineStyle","curveness"]),y=n.get("edgeForkPosition"),_=d.getModel("lineStyle").getLineStyle(),S=o.__edge;if(f==="curve")r.parentNode&&r.parentNode!==a&&(S||(S=o.__edge=new BezierCurve({shape:getEdgeShape(p,v,g,s,s)})),updateProps$1(S,{shape:getEdgeShape(p,v,g,l,u)},n));else if(f==="polyline"&&p==="orthogonal"&&r!==a&&r.children&&r.children.length!==0&&r.isExpand===!0){for(var b=r.children,x=[],A=0;A<b.length;A++){var w=b[A].getLayout();x.push([w.x,w.y])}S||(S=o.__edge=new TreePath({shape:{parentPoint:[u.x,u.y],childPoints:[[u.x,u.y]],orient:v,forkPosition:y}})),updateProps$1(S,{shape:{parentPoint:[u.x,u.y],childPoints:x}},n)}S&&!(f==="polyline"&&!r.isExpand)&&(S.useStyle(defaults$2({strokeNoScale:!0,fill:null},_)),setStatesStylesFromModel(S,d,"lineStyle"),setDefaultStateProxy(S),c.add(S))}function removeNodeEdge(n,r,a,o,s){var l=r.tree.root,u=getSourceNode(l,n),c=u.source,d=u.sourceLayout,f=r.getItemGraphicEl(n.dataIndex);if(f){var p=r.getItemGraphicEl(c.dataIndex),v=p.__edge,g=f.__edge||(c.isExpand===!1||c.children.length===1?v:void 0),y=o.get("edgeShape"),_=o.get("layout"),S=o.get("orient"),b=o.get(["lineStyle","curveness"]);g&&(y==="curve"?removeElement(g,{shape:getEdgeShape(_,S,b,d,d),style:{opacity:0}},o,{cb:function(){a.remove(g)},removeOpt:s}):y==="polyline"&&o.get("layout")==="orthogonal"&&removeElement(g,{shape:{parentPoint:[d.x,d.y],childPoints:[[d.x,d.y]]},style:{opacity:0}},o,{cb:function(){a.remove(g)},removeOpt:s}))}}function getSourceNode(n,r){for(var a=r.parentNode===n?r:r.parentNode||r,o;o=a.getLayout(),o==null;)a=a.parentNode===n?a:a.parentNode||a;return{source:a,sourceLayout:o}}function removeNode(n,r,a,o,s){var l=n.tree.getNodeByDataIndex(r),u=n.tree.root,c=getSourceNode(u,l).sourceLayout,d={duration:s.get("animationDurationUpdate"),easing:s.get("animationEasingUpdate")};removeElement(a,{x:c.x+1,y:c.y+1},s,{cb:function(){o.remove(a),n.setItemGraphicEl(r,null)},removeOpt:d}),a.fadeOut(null,n.hostModel,{fadeLabel:!0,animation:d}),l.children.forEach(function(f){removeNodeEdge(f,n,o,s,d)}),removeNodeEdge(l,n,o,s,d)}function getEdgeShape(n,r,a,o,s){var l,u,c,d,f,p,v,g;if(n==="radial"){f=o.rawX,v=o.rawY,p=s.rawX,g=s.rawY;var y=radialCoordinate(f,v),_=radialCoordinate(f,v+(g-v)*a),S=radialCoordinate(p,g+(v-g)*a),b=radialCoordinate(p,g);return{x1:y.x||0,y1:y.y||0,x2:b.x||0,y2:b.y||0,cpx1:_.x||0,cpy1:_.y||0,cpx2:S.x||0,cpy2:S.y||0}}else f=o.x,v=o.y,p=s.x,g=s.y,(r==="LR"||r==="RL")&&(l=f+(p-f)*a,u=v,c=p+(f-p)*a,d=g),(r==="TB"||r==="BT")&&(l=f,u=v+(g-v)*a,c=p,d=g+(v-g)*a);return{x1:f,y1:v,x2:p,y2:g,cpx1:l,cpy1:u,cpx2:c,cpy2:d}}var inner$e=makeInner();function linkSeriesData(n){var r=n.mainData,a=n.datas;a||(a={main:r},n.datasAttr={main:"data"}),n.datas=n.mainData=null,linkAll(r,a,n),each$f(a,function(o){each$f(r.TRANSFERABLE_METHODS,function(s){o.wrapMethod(s,curry$1(transferInjection,n))})}),r.wrapMethod("cloneShallow",curry$1(cloneShallowInjection,n)),each$f(r.CHANGABLE_METHODS,function(o){r.wrapMethod(o,curry$1(changeInjection,n))}),assert(a[r.dataType]===r)}function transferInjection(n,r){if(isMainData(this)){var a=extend$2({},inner$e(this).datas);a[this.dataType]=r,linkAll(r,a,n)}else linkSingle(r,this.dataType,inner$e(this).mainData,n);return r}function changeInjection(n,r){return n.struct&&n.struct.update(),r}function cloneShallowInjection(n,r){return each$f(inner$e(r).datas,function(a,o){a!==r&&linkSingle(a.cloneShallow(),o,r,n)}),r}function getLinkedData(n){var r=inner$e(this).mainData;return n==null||r==null?r:inner$e(r).datas[n]}function getLinkedDataAll(){var n=inner$e(this).mainData;return n==null?[{data:n}]:map$1(keys(inner$e(n).datas),function(r){return{type:r,data:inner$e(n).datas[r]}})}function isMainData(n){return inner$e(n).mainData===n}function linkAll(n,r,a){inner$e(n).datas={},each$f(r,function(o,s){linkSingle(o,s,n,a)})}function linkSingle(n,r,a,o){inner$e(a).datas[r]=n,inner$e(n).mainData=a,n.dataType=r,o.struct&&(n[o.structAttr]=o.struct,o.struct[o.datasAttr[r]]=n),n.getLinkedData=getLinkedData,n.getLinkedDataAll=getLinkedDataAll}var TreeNode=function(){function n(r,a){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=r||"",this.hostTree=a}return n.prototype.isRemoved=function(){return this.dataIndex<0},n.prototype.eachNode=function(r,a,o){isFunction(r)&&(o=a,a=r,r=null),r=r||{},isString(r)&&(r={order:r});var s=r.order||"preorder",l=this[r.attr||"children"],u;s==="preorder"&&(u=a.call(o,this));for(var c=0;!u&&c<l.length;c++)l[c].eachNode(r,a,o);s==="postorder"&&a.call(o,this)},n.prototype.updateDepthAndHeight=function(r){var a=0;this.depth=r;for(var o=0;o<this.children.length;o++){var s=this.children[o];s.updateDepthAndHeight(r+1),s.height>a&&(a=s.height)}this.height=a+1},n.prototype.getNodeById=function(r){if(this.getId()===r)return this;for(var a=0,o=this.children,s=o.length;a<s;a++){var l=o[a].getNodeById(r);if(l)return l}},n.prototype.contains=function(r){if(r===this)return!0;for(var a=0,o=this.children,s=o.length;a<s;a++){var l=o[a].contains(r);if(l)return l}},n.prototype.getAncestors=function(r){for(var a=[],o=r?this:this.parentNode;o;)a.push(o),o=o.parentNode;return a.reverse(),a},n.prototype.getAncestorsIndices=function(){for(var r=[],a=this;a;)r.push(a.dataIndex),a=a.parentNode;return r.reverse(),r},n.prototype.getDescendantIndices=function(){var r=[];return this.eachNode(function(a){r.push(a.dataIndex)}),r},n.prototype.getValue=function(r){var a=this.hostTree.data;return a.getStore().get(a.getDimensionIndex(r||"value"),this.dataIndex)},n.prototype.setLayout=function(r,a){this.dataIndex>=0&&this.hostTree.data.setItemLayout(this.dataIndex,r,a)},n.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},n.prototype.getModel=function(r){if(!(this.dataIndex<0)){var a=this.hostTree,o=a.data.getItemModel(this.dataIndex);return o.getModel(r)}},n.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},n.prototype.setVisual=function(r,a){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,r,a)},n.prototype.getVisual=function(r){return this.hostTree.data.getItemVisual(this.dataIndex,r)},n.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},n.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},n.prototype.getChildIndex=function(){if(this.parentNode){for(var r=this.parentNode.children,a=0;a<r.length;++a)if(r[a]===this)return a;return-1}return-1},n.prototype.isAncestorOf=function(r){for(var a=r.parentNode;a;){if(a===this)return!0;a=a.parentNode}return!1},n.prototype.isDescendantOf=function(r){return r!==this&&r.isAncestorOf(this)},n}(),Tree=function(){function n(r){this.type="tree",this._nodes=[],this.hostModel=r}return n.prototype.eachNode=function(r,a,o){this.root.eachNode(r,a,o)},n.prototype.getNodeByDataIndex=function(r){var a=this.data.getRawIndex(r);return this._nodes[a]},n.prototype.getNodeById=function(r){return this.root.getNodeById(r)},n.prototype.update=function(){for(var r=this.data,a=this._nodes,o=0,s=a.length;o<s;o++)a[o].dataIndex=-1;for(var o=0,s=r.count();o<s;o++)a[r.getRawIndex(o)].dataIndex=o},n.prototype.clearLayouts=function(){this.data.clearItemLayouts()},n.createTree=function(r,a,o){var s=new n(a),l=[],u=1;c(r);function c(p,v){var g=p.value;u=Math.max(u,isArray$1(g)?g.length:1),l.push(p);var y=new TreeNode(convertOptionIdName(p.name,""),s);v?addChild(y,v):s.root=y,s._nodes.push(y);var _=p.children;if(_)for(var S=0;S<_.length;S++)c(_[S],y)}s.root.updateDepthAndHeight(0);var d=prepareSeriesDataSchema(l,{coordDimensions:["value"],dimensionsCount:u}).dimensions,f=new SeriesData(d,a);return f.initData(l),o&&o(f),linkSeriesData({mainData:f,struct:s,structAttr:"tree"}),s.update(),s},n}();function addChild(n,r){var a=r.children;n.parentNode!==r&&(a.push(n),n.parentNode=r)}function retrieveTargetInfo(n,r,a){if(n&&indexOf(r,n.type)>=0){var o=a.getData().tree.root,s=n.targetNode;if(isString(s)&&(s=o.getNodeById(s)),s&&o.contains(s))return{node:s};var l=n.targetNodeId;if(l!=null&&(s=o.getNodeById(l)))return{node:s}}}function getPathToRoot(n){for(var r=[];n;)n=n.parentNode,n&&r.push(n);return r.reverse()}function aboveViewRoot(n,r){var a=getPathToRoot(n);return indexOf(a,r)>=0}function wrapTreePathInfo(n,r){for(var a=[];n;){var o=n.dataIndex;a.push({name:n.name,dataIndex:o,value:r.getRawValue(o)}),n=n.parentNode}return a.reverse(),a}var TreeSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.hasSymbolVisual=!0,a.ignoreStyleOnData=!0,a}return r.prototype.getInitialData=function(a){var o={name:a.name,children:a.data},s=a.leaves||{},l=new Model(s,this,this.ecModel),u=Tree.createTree(o,this,c);function c(v){v.wrapMethod("getItemModel",function(g,y){var _=u.getNodeByDataIndex(y);return _&&_.children.length&&_.isExpand||(g.parentModel=l),g})}var d=0;u.eachNode("preorder",function(v){v.depth>d&&(d=v.depth)});var f=a.expandAndCollapse,p=f&&a.initialTreeDepth>=0?a.initialTreeDepth:d;return u.root.eachNode("preorder",function(v){var g=v.hostTree.data.getRawDataItem(v.dataIndex);v.isExpand=g&&g.collapsed!=null?!g.collapsed:v.depth<=p}),u.data},r.prototype.getOrient=function(){var a=this.get("orient");return a==="horizontal"?a="LR":a==="vertical"&&(a="TB"),a},r.prototype.setZoom=function(a){this.option.zoom=a},r.prototype.setCenter=function(a){this.option.center=a},r.prototype.formatTooltip=function(a,o,s){for(var l=this.getData().tree,u=l.root.children[0],c=l.getNodeByDataIndex(a),d=c.getValue(),f=c.name;c&&c!==u;)f=c.parentNode.name+"."+f,c=c.parentNode;return createTooltipMarkup("nameValue",{name:f,value:d,noValue:isNaN(d)||d==null})},r.prototype.getDataParams=function(a){var o=n.prototype.getDataParams.apply(this,arguments),s=this.getData().tree.getNodeByDataIndex(a);return o.treeAncestors=wrapTreePathInfo(s,this),o.collapsed=!s.isExpand,o},r.type="series.tree",r.layoutMode="box",r.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},r}(SeriesModel);function eachAfter(n,r,a){for(var o=[n],s=[],l;l=o.pop();)if(s.push(l),l.isExpand){var u=l.children;if(u.length)for(var c=0;c<u.length;c++)o.push(u[c])}for(;l=s.pop();)r(l,a)}function eachBefore(n,r){for(var a=[n],o;o=a.pop();)if(r(o),o.isExpand){var s=o.children;if(s.length)for(var l=s.length-1;l>=0;l--)a.push(s[l])}}function treeLayout(n,r){n.eachSeriesByType("tree",function(a){commonLayout(a,r)})}function commonLayout(n,r){var a=getViewRect$4(n,r);n.layoutInfo=a;var o=n.get("layout"),s=0,l=0,u=null;o==="radial"?(s=2*Math.PI,l=Math.min(a.height,a.width)/2,u=separation(function(w,E){return(w.parentNode===E.parentNode?1:2)/w.depth})):(s=a.width,l=a.height,u=separation());var c=n.getData().tree.root,d=c.children[0];if(d){init(c),eachAfter(d,firstWalk,u),c.hierNode.modifier=-d.hierNode.prelim,eachBefore(d,secondWalk);var f=d,p=d,v=d;eachBefore(d,function(w){var E=w.getLayout().x;E<f.getLayout().x&&(f=w),E>p.getLayout().x&&(p=w),w.depth>v.depth&&(v=w)});var g=f===p?1:u(f,p)/2,y=g-f.getLayout().x,_=0,S=0,b=0,x=0;if(o==="radial")_=s/(p.getLayout().x+g+y),S=l/(v.depth-1||1),eachBefore(d,function(w){b=(w.getLayout().x+y)*_,x=(w.depth-1)*S;var E=radialCoordinate(b,x);w.setLayout({x:E.x,y:E.y,rawX:b,rawY:x},!0)});else{var A=n.getOrient();A==="RL"||A==="LR"?(S=l/(p.getLayout().x+g+y),_=s/(v.depth-1||1),eachBefore(d,function(w){x=(w.getLayout().x+y)*S,b=A==="LR"?(w.depth-1)*_:s-(w.depth-1)*_,w.setLayout({x:b,y:x},!0)})):(A==="TB"||A==="BT")&&(_=s/(p.getLayout().x+g+y),S=l/(v.depth-1||1),eachBefore(d,function(w){b=(w.getLayout().x+y)*_,x=A==="TB"?(w.depth-1)*S:l-(w.depth-1)*S,w.setLayout({x:b,y:x},!0)}))}}}function treeVisual(n){n.eachSeriesByType("tree",function(r){var a=r.getData(),o=a.tree;o.eachNode(function(s){var l=s.getModel(),u=l.getModel("itemStyle").getItemStyle(),c=a.ensureUniqueItemVisual(s.dataIndex,"style");extend$2(c,u)})})}function installTreeAction(n){n.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(r,a){a.eachComponent({mainType:"series",subType:"tree",query:r},function(o){var s=r.dataIndex,l=o.getData().tree,u=l.getNodeByDataIndex(s);u.isExpand=!u.isExpand})}),n.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(r,a,o){a.eachComponent({mainType:"series",subType:"tree",query:r},function(s){var l=s.coordinateSystem,u=updateCenterAndZoom(l,r,void 0,o);s.setCenter&&s.setCenter(u.center),s.setZoom&&s.setZoom(u.zoom)})})}function install$J(n){n.registerChartView(TreeView),n.registerSeriesModel(TreeSeriesModel),n.registerLayout(treeLayout),n.registerVisual(treeVisual),installTreeAction(n)}var actionTypes=["treemapZoomToNode","treemapRender","treemapMove"];function installTreemapAction(n){for(var r=0;r<actionTypes.length;r++)n.registerAction({type:actionTypes[r],update:"updateView"},noop);n.registerAction({type:"treemapRootToNode",update:"updateView"},function(a,o){o.eachComponent({mainType:"series",subType:"treemap",query:a},s);function s(l,u){var c=["treemapZoomToNode","treemapRootToNode"],d=retrieveTargetInfo(a,c,l);if(d){var f=l.getViewRoot();f&&(a.direction=aboveViewRoot(f,d.node)?"rollUp":"drillDown"),l.resetViewRoot(d.node)}}})}function enableAriaDecalForTree(n){var r=n.getData(),a=r.tree,o={};a.eachNode(function(s){for(var l=s;l&&l.depth>1;)l=l.parentNode;var u=getDecalFromPalette(n.ecModel,l.name||l.dataIndex+"",o);s.setVisual("decal",u)})}var TreemapSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.preventUsingHoverLayer=!0,a}return r.prototype.getInitialData=function(a,o){var s={name:a.name,children:a.data};completeTreeValue$1(s);var l=a.levels||[],u=this.designatedVisualItemStyle={},c=new Model({itemStyle:u},this,o);l=a.levels=setDefault(l,o);var d=map$1(l||[],function(v){return new Model(v,c,o)},this),f=Tree.createTree(s,this,p);function p(v){v.wrapMethod("getItemModel",function(g,y){var _=f.getNodeByDataIndex(y),S=_?d[_.depth]:null;return g.parentModel=S||c,g})}return f.data},r.prototype.optionUpdated=function(){this.resetViewRoot()},r.prototype.formatTooltip=function(a,o,s){var l=this.getData(),u=this.getRawValue(a),c=l.getName(a);return createTooltipMarkup("nameValue",{name:c,value:u})},r.prototype.getDataParams=function(a){var o=n.prototype.getDataParams.apply(this,arguments),s=this.getData().tree.getNodeByDataIndex(a);return o.treeAncestors=wrapTreePathInfo(s,this),o.treePathInfo=o.treeAncestors,o},r.prototype.setLayoutInfo=function(a){this.layoutInfo=this.layoutInfo||{},extend$2(this.layoutInfo,a)},r.prototype.mapIdToIndex=function(a){var o=this._idIndexMap;o||(o=this._idIndexMap=createHashMap(),this._idIndexMapCount=0);var s=o.get(a);return s==null&&o.set(a,s=this._idIndexMapCount++),s},r.prototype.getViewRoot=function(){return this._viewRoot},r.prototype.resetViewRoot=function(a){a?this._viewRoot=a:a=this._viewRoot;var o=this.getRawData().tree.root;(!a||a!==o&&!o.contains(a))&&(this._viewRoot=o)},r.prototype.enableAriaDecal=function(){enableAriaDecalForTree(this)},r.type="series.treemap",r.layoutMode="box",r.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",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:"#fff",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:[]},r}(SeriesModel);function completeTreeValue$1(n){var r=0;each$f(n.children,function(o){completeTreeValue$1(o);var s=o.value;isArray$1(s)&&(s=s[0]),r+=s});var a=n.value;isArray$1(a)&&(a=a[0]),(a==null||isNaN(a))&&(a=r),a<0&&(a=0),isArray$1(n.value)?n.value[0]=a:n.value=a}function setDefault(n,r){var a=normalizeToArray(r.get("color")),o=normalizeToArray(r.get(["aria","decal","decals"]));if(a){n=n||[];var s,l;each$f(n,function(c){var d=new Model(c),f=d.get("color"),p=d.get("decal");(d.get(["itemStyle","color"])||f&&f!=="none")&&(s=!0),(d.get(["itemStyle","decal"])||p&&p!=="none")&&(l=!0)});var u=n[0]||(n[0]={});return s||(u.color=a.slice()),!l&&o&&(u.decal=o.slice()),n}}var TEXT_PADDING=8,ITEM_GAP=8,ARRAY_LENGTH=5,Breadcrumb=function(){function n(r){this.group=new Group$3,r.add(this.group)}return n.prototype.render=function(r,a,o,s){var l=r.getModel("breadcrumb"),u=this.group;if(u.removeAll(),!(!l.get("show")||!o)){var c=l.getModel("itemStyle"),d=l.getModel("emphasis"),f=c.getModel("textStyle"),p=d.getModel(["itemStyle","textStyle"]),v={pos:{left:l.get("left"),right:l.get("right"),top:l.get("top"),bottom:l.get("bottom")},box:{width:a.getWidth(),height:a.getHeight()},emptyItemWidth:l.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(o,v,f),this._renderContent(r,v,c,d,f,p,s),positionElement(u,v.pos,v.box)}},n.prototype._prepare=function(r,a,o){for(var s=r;s;s=s.parentNode){var l=convertOptionIdName(s.getModel().get("name"),""),u=o.getTextRect(l),c=Math.max(u.width+TEXT_PADDING*2,a.emptyItemWidth);a.totalWidth+=c+ITEM_GAP,a.renderList.push({node:s,text:l,width:c})}},n.prototype._renderContent=function(r,a,o,s,l,u,c){for(var d=0,f=a.emptyItemWidth,p=r.get(["breadcrumb","height"]),v=getAvailableSize(a.pos,a.box),g=a.totalWidth,y=a.renderList,_=s.getModel("itemStyle").getItemStyle(),S=y.length-1;S>=0;S--){var b=y[S],x=b.node,A=b.width,w=b.text;g>v.width&&(g-=A-f,A=f,w=null);var E=new Polygon({shape:{points:makeItemPoints(d,0,A,p,S===y.length-1,S===0)},style:defaults$2(o.getItemStyle(),{lineJoin:"bevel"}),textContent:new ZRText({style:createTextStyle$1(l,{text:w})}),textConfig:{position:"inside"},z2:Z2_EMPHASIS_LIFT*1e4,onclick:curry$1(c,x)});E.disableLabelAnimation=!0,E.getTextContent().ensureState("emphasis").style=createTextStyle$1(u,{text:w}),E.ensureState("emphasis").style=_,toggleHoverEmphasis(E,s.get("focus"),s.get("blurScope"),s.get("disabled")),this.group.add(E),packEventData(E,r,x),d+=A+ITEM_GAP}},n.prototype.remove=function(){this.group.removeAll()},n}();function makeItemPoints(n,r,a,o,s,l){var u=[[s?n:n-ARRAY_LENGTH,r],[n+a,r],[n+a,r+o],[s?n:n-ARRAY_LENGTH,r+o]];return!l&&u.splice(2,0,[n+a+ARRAY_LENGTH,r+o/2]),!s&&u.push([n,r+o/2]),u}function packEventData(n,r,a){getECData(n).eventData={componentType:"series",componentSubType:"treemap",componentIndex:r.componentIndex,seriesIndex:r.seriesIndex,seriesName:r.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:a&&a.dataIndex,name:a&&a.name},treePathInfo:a&&wrapTreePathInfo(a,r)}}var AnimationWrap=function(){function n(){this._storage=[],this._elExistsMap={}}return n.prototype.add=function(r,a,o,s,l){return this._elExistsMap[r.id]?!1:(this._elExistsMap[r.id]=!0,this._storage.push({el:r,target:a,duration:o,delay:s,easing:l}),!0)},n.prototype.finished=function(r){return this._finishedCallback=r,this},n.prototype.start=function(){for(var r=this,a=this._storage.length,o=function(){a--,a<=0&&(r._storage.length=0,r._elExistsMap={},r._finishedCallback&&r._finishedCallback())},s=0,l=this._storage.length;s<l;s++){var u=this._storage[s];u.el.animateTo(u.target,{duration:u.duration,delay:u.delay,easing:u.easing,setToFinal:!0,done:o,aborted:o})}return this},n}();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(n){var r=getStateItemStyle(n);return r.stroke=r.fill=r.lineWidth=null,r},inner$d=makeInner(),TreemapView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a._state="ready",a._storage=createStorage(),a}return r.prototype.render=function(a,o,s,l){var u=o.findComponents({mainType:"series",subType:"treemap",query:l});if(!(indexOf(u,a)<0)){this.seriesModel=a,this.api=s,this.ecModel=o;var c=["treemapZoomToNode","treemapRootToNode"],d=retrieveTargetInfo(l,c,a),f=l&&l.type,p=a.layoutInfo,v=!this._oldTree,g=this._storage,y=f==="treemapRootToNode"&&d&&g?{rootNodeGroup:g.nodeGroup[d.node.getRawIndex()],direction:l.direction}:null,_=this._giveContainerGroup(p),S=a.get("animation"),b=this._doRender(_,a,y);S&&!v&&(!f||f==="treemapZoomToNode"||f==="treemapRootToNode")?this._doAnimation(_,b,a,y):b.renderFinally(),this._resetController(s),this._renderBreadcrumb(a,s,d)}},r.prototype._giveContainerGroup=function(a){var o=this._containerGroup;return o||(o=this._containerGroup=new Group$2,this._initEvents(o),this.group.add(o)),o.x=a.x,o.y=a.y,o},r.prototype._doRender=function(a,o,s){var l=o.getData().tree,u=this._oldTree,c=createStorage(),d=createStorage(),f=this._storage,p=[];function v(A,w,E,D){return renderNode(o,d,f,s,c,p,A,w,E,D)}S(l.root?[l.root]:[],u&&u.root?[u.root]:[],a,l===u||!u,0);var g=b(f);if(this._oldTree=l,this._storage=d,this._controllerHost){var y=this.seriesModel.layoutInfo,_=l.root.getLayout();_.width===y.width&&_.height===y.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:c,willDeleteEls:g,renderFinally:x};function S(A,w,E,D,C){D?(w=A,each$f(A,function(M,I){!M.isRemoved()&&P(I,I)})):new DataDiffer(w,A,$,$).add(P).update(P).remove(curry$1(P,null)).execute();function $(M){return M.getId()}function P(M,I){var L=M!=null?A[M]:null,O=I!=null?w[I]:null,R=v(L,O,E,C);R&&S(L&&L.viewChildren||[],O&&O.viewChildren||[],R,D,C+1)}}function b(A){var w=createStorage();return A&&each$f(A,function(E,D){var C=w[D];each$f(E,function($){$&&(C.push($),inner$d($).willDelete=!0)})}),w}function x(){each$f(g,function(A){each$f(A,function(w){w.parent&&w.parent.remove(w)})}),each$f(p,function(A){A.invisible=!0,A.dirty()})}},r.prototype._doAnimation=function(a,o,s,l){var u=s.get("animationDurationUpdate"),c=s.get("animationEasing"),d=(isFunction(u)?0:u)||0,f=(isFunction(c)?null:c)||"cubicOut",p=createWrap();each$f(o.willDeleteEls,function(v,g){each$f(v,function(y,_){if(!y.invisible){var S=y.parent,b,x=inner$d(S);if(l&&l.direction==="drillDown")b=S===l.rootNodeGroup?{shape:{x:0,y:0,width:x.nodeWidth,height:x.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var A=0,w=0;x.willDelete||(A=x.nodeWidth/2,w=x.nodeHeight/2),b=g==="nodeGroup"?{x:A,y:w,style:{opacity:0}}:{shape:{x:A,y:w,width:0,height:0},style:{opacity:0}}}b&&p.add(y,b,d,0,f)}})}),each$f(this._storage,function(v,g){each$f(v,function(y,_){var S=o.lastsForAnimation[g][_],b={};S&&(y instanceof Group$3?S.oldX!=null&&(b.x=y.x,b.y=y.y,y.x=S.oldX,y.y=S.oldY):(S.oldShape&&(b.shape=extend$2({},y.shape),y.setShape(S.oldShape)),S.fadein?(y.setStyle("opacity",0),b.style={opacity:1}):y.style.opacity!==1&&(b.style={opacity:1})),p.add(y,b,d,0,f))})},this),this._state="animating",p.finished(bind$1(function(){this._state="ready",o.renderFinally()},this)).start()},r.prototype._resetController=function(a){var o=this._controller,s=this._controllerHost;s||(this._controllerHost={target:this.group},s=this._controllerHost),o||(o=this._controller=new RoamController(a.getZr()),o.enable(this.seriesModel.get("roam")),s.zoomLimit=this.seriesModel.get("scaleLimit"),s.zoom=this.seriesModel.get("zoom"),o.on("pan",bind$1(this._onPan,this)),o.on("zoom",bind$1(this._onZoom,this)));var l=new BoundingRect(0,0,a.getWidth(),a.getHeight());o.setPointerChecker(function(u,c,d){return l.contain(c,d)})},r.prototype._clearController=function(){var a=this._controller;this._controllerHost=null,a&&(a.dispose(),a=null)},r.prototype._onPan=function(a){if(this._state!=="animating"&&(Math.abs(a.dx)>DRAG_THRESHOLD||Math.abs(a.dy)>DRAG_THRESHOLD)){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:s.x+a.dx,y:s.y+a.dy,width:s.width,height:s.height}})}},r.prototype._onZoom=function(a){var o=a.originX,s=a.originY,l=a.scale;if(this._state!=="animating"){var u=this.seriesModel.getData().tree.root;if(!u)return;var c=u.getLayout();if(!c)return;var d=new BoundingRect(c.x,c.y,c.width,c.height),f=null,p=this._controllerHost;f=p.zoomLimit;var v=p.zoom=p.zoom||1;if(v*=l,f){var g=f.min||0,y=f.max||1/0;v=Math.max(Math.min(y,v),g)}var _=v/p.zoom;p.zoom=v;var S=this.seriesModel.layoutInfo;o-=S.x,s-=S.y;var b=create$1();translate(b,b,[-o,-s]),scale$1(b,b,[_,_]),translate(b,b,[o,s]),d.applyTransform(b),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:d.x,y:d.y,width:d.width,height:d.height}})}},r.prototype._initEvents=function(a){var o=this;a.on("click",function(s){if(o._state==="ready"){var l=o.seriesModel.get("nodeClick",!0);if(l){var u=o.findTarget(s.offsetX,s.offsetY);if(u){var c=u.node;if(c.getLayout().isLeafRoot)o._rootToNode(u);else if(l==="zoomToNode")o._zoomToNode(u);else if(l==="link"){var d=c.hostTree.data.getItemModel(c.dataIndex),f=d.get("link",!0),p=d.get("target",!0)||"blank";f&&windowOpen(f,p)}}}}},this)},r.prototype._renderBreadcrumb=function(a,o,s){var l=this;s||(s=a.get("leafDepth",!0)!=null?{node:a.getViewRoot()}:this.findTarget(o.getWidth()/2,o.getHeight()/2),s||(s={node:a.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Breadcrumb(this.group))).render(a,o,s.node,function(u){l._state!=="animating"&&(aboveViewRoot(a.getViewRoot(),u)?l._rootToNode({node:u}):l._zoomToNode({node:u}))})},r.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=createStorage(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},r.prototype.dispose=function(){this._clearController()},r.prototype._zoomToNode=function(a){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:a.node})},r.prototype._rootToNode=function(a){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:a.node})},r.prototype.findTarget=function(a,o){var s,l=this.seriesModel.getViewRoot();return l.eachNode({attr:"viewChildren",order:"preorder"},function(u){var c=this._storage.background[u.getRawIndex()];if(c){var d=c.transformCoordToLocal(a,o),f=c.shape;if(f.x<=d[0]&&d[0]<=f.x+f.width&&f.y<=d[1]&&d[1]<=f.y+f.height)s={node:u,offsetX:d[0],offsetY:d[1]};else return!1}},this),s},r.type="treemap",r}(ChartView);function createStorage(){return{nodeGroup:[],background:[],content:[]}}function renderNode(n,r,a,o,s,l,u,c,d,f){if(!u)return;var p=u.getLayout(),v=n.getData(),g=u.getModel();if(v.setItemGraphicEl(u.dataIndex,null),!p||!p.isInView)return;var y=p.width,_=p.height,S=p.borderWidth,b=p.invisible,x=u.getRawIndex(),A=c&&c.getRawIndex(),w=u.viewChildren,E=p.upperHeight,D=w&&w.length,C=g.getModel("itemStyle"),$=g.getModel(["emphasis","itemStyle"]),P=g.getModel(["blur","itemStyle"]),M=g.getModel(["select","itemStyle"]),I=C.get("borderRadius")||0,L=ee("nodeGroup",Group$2);if(!L)return;if(d.add(L),L.x=p.x||0,L.y=p.y||0,L.markRedraw(),inner$d(L).nodeWidth=y,inner$d(L).nodeHeight=_,p.isAboveViewRoot)return L;var O=ee("background",Rect$1,f,Z2_BG);O&&G(L,O,D&&p.upperLabelHeight);var R=g.getModel("emphasis"),N=R.get("focus"),V=R.get("blurScope"),F=R.get("disabled"),U=N==="ancestor"?u.getAncestorsIndices():N==="descendant"?u.getDescendantIndices():N;if(D)isHighDownDispatcher(L)&&setAsHighDownDispatcher(L,!1),O&&(setAsHighDownDispatcher(O,!F),v.setItemGraphicEl(u.dataIndex,O),enableHoverFocus(O,U,V));else{var H=ee("content",Rect$1,f,Z2_CONTENT);H&&B(L,H),O.disableMorphing=!0,O&&isHighDownDispatcher(O)&&setAsHighDownDispatcher(O,!1),setAsHighDownDispatcher(L,!F),v.setItemGraphicEl(u.dataIndex,L);var W=g.getShallow("cursor");W&&H.attr("cursor",W),enableHoverFocus(L,U,V)}return L;function G(J,X,re){var Q=getECData(X);if(Q.dataIndex=u.dataIndex,Q.seriesIndex=n.seriesIndex,X.setShape({x:0,y:0,width:y,height:_,r:I}),b)Y(X);else{X.invisible=!1;var te=u.getVisual("style"),ie=te.stroke,ne=getItemStyleNormal(C);ne.fill=ie;var oe=getStateItemStyle($);oe.fill=$.get("borderColor");var le=getStateItemStyle(P);le.fill=P.get("borderColor");var ce=getStateItemStyle(M);if(ce.fill=M.get("borderColor"),re){var de=y-2*S;Z(X,ie,te.opacity,{x:S,y:0,width:de,height:E})}else X.removeTextContent();X.setStyle(ne),X.ensureState("emphasis").style=oe,X.ensureState("blur").style=le,X.ensureState("select").style=ce,setDefaultStateProxy(X)}J.add(X)}function B(J,X){var re=getECData(X);re.dataIndex=u.dataIndex,re.seriesIndex=n.seriesIndex;var Q=Math.max(y-2*S,0),te=Math.max(_-2*S,0);if(X.culling=!0,X.setShape({x:S,y:S,width:Q,height:te,r:I}),b)Y(X);else{X.invisible=!1;var ie=u.getVisual("style"),ne=ie.fill,oe=getItemStyleNormal(C);oe.fill=ne,oe.decal=ie.decal;var le=getStateItemStyle($),ce=getStateItemStyle(P),de=getStateItemStyle(M);Z(X,ne,ie.opacity,null),X.setStyle(oe),X.ensureState("emphasis").style=le,X.ensureState("blur").style=ce,X.ensureState("select").style=de,setDefaultStateProxy(X)}J.add(X)}function Y(J){!J.invisible&&l.push(J)}function Z(J,X,re,Q){var te=g.getModel(Q?PATH_UPPERLABEL_NORMAL:PATH_LABEL_NOAMAL),ie=convertOptionIdName(g.get("name"),null),ne=te.getShallow("show");setLabelStyle(J,getLabelStatesModels(g,Q?PATH_UPPERLABEL_NORMAL:PATH_LABEL_NOAMAL),{defaultText:ne?ie:null,inheritColor:X,defaultOpacity:re,labelFetcher:n,labelDataIndex:u.dataIndex});var oe=J.getTextContent();if(oe){var le=oe.style,ce=normalizeCssArray$1(le.padding||0);Q&&(J.setTextConfig({layoutRect:Q}),oe.disableLabelLayout=!0),oe.beforeUpdate=function(){var fe=Math.max((Q?Q.width:J.shape.width)-ce[1]-ce[3],0),pe=Math.max((Q?Q.height:J.shape.height)-ce[0]-ce[2],0);(le.width!==fe||le.height!==pe)&&oe.setStyle({width:fe,height:pe})},le.truncateMinChar=2,le.lineOverflow="truncate",K(le,Q,p);var de=oe.getState("emphasis");K(de?de.style:null,Q,p)}}function K(J,X,re){var Q=J?J.text:null;if(!X&&re.isLeafRoot&&Q!=null){var te=n.get("drillDownIcon",!0);J.text=te?te+" "+Q:Q}}function ee(J,X,re,Q){var te=A!=null&&a[J][A],ie=s[J];return te?(a[J][A]=null,j(ie,te)):b||(te=new X,te instanceof Displayable&&(te.z2=calculateZ2(re,Q)),q(ie,te)),r[J][x]=te}function j(J,X){var re=J[x]={};X instanceof Group$2?(re.oldX=X.x,re.oldY=X.y):re.oldShape=extend$2({},X.shape)}function q(J,X){var re=J[x]={},Q=u.parentNode,te=X instanceof Group$3;if(Q&&(!o||o.direction==="drillDown")){var ie=0,ne=0,oe=s.background[Q.getRawIndex()];!o&&oe&&oe.oldShape&&(ie=oe.oldShape.width,ne=oe.oldShape.height),te?(re.oldX=0,re.oldY=ne):re.oldShape={x:ie,y:ne,width:0,height:0}}re.fadein=!te}}function calculateZ2(n,r){return n*Z2_BASE+r}var each$c=each$f,isObject=isObject$3,CATEGORY_DEFAULT_VISUAL_INDEX=-1,VisualMapping=function(){function n(r){var a=r.mappingMethod,o=r.type,s=this.option=clone$6(r);this.type=o,this.mappingMethod=a,this._normalizeData=normalizers[a];var l=n.visualHandlers[o];this.applyVisual=l.applyVisual,this.getColorMapper=l.getColorMapper,this._normalizedToVisual=l._normalizedToVisual[a],a==="piecewise"?(normalizeVisualRange(s),preprocessForPiecewise(s)):a==="category"?s.categories?preprocessForSpecifiedCategory(s):normalizeVisualRange(s,!0):(assert(a!=="linear"||s.dataExtent),normalizeVisualRange(s))}return n.prototype.mapValueToVisual=function(r){var a=this._normalizeData(r);return this._normalizedToVisual(a,r)},n.prototype.getNormalizer=function(){return bind$1(this._normalizeData,this)},n.listVisualTypes=function(){return keys(n.visualHandlers)},n.isValidType=function(r){return n.visualHandlers.hasOwnProperty(r)},n.eachVisual=function(r,a,o){isObject$3(r)?each$f(r,a,o):a.call(o,r)},n.mapVisual=function(r,a,o){var s,l=isArray$1(r)?[]:isObject$3(r)?{}:(s=!0,null);return n.eachVisual(r,function(u,c){var d=a.call(o,u,c);s?l=d:l[c]=d}),l},n.retrieveVisuals=function(r){var a={},o;return r&&each$c(n.visualHandlers,function(s,l){r.hasOwnProperty(l)&&(a[l]=r[l],o=!0)}),o?a:null},n.prepareVisualTypes=function(r){if(isArray$1(r))r=r.slice();else if(isObject(r)){var a=[];each$c(r,function(o,s){a.push(s)}),r=a}else return[];return r.sort(function(o,s){return s==="color"&&o!=="color"&&o.indexOf("color")===0?1:-1}),r},n.dependsOn=function(r,a){return a==="color"?!!(r&&r.indexOf(a)===0):r===a},n.findPieceIndex=function(r,a,o){for(var s,l=1/0,u=0,c=a.length;u<c;u++){var d=a[u].value;if(d!=null){if(d===r||isString(d)&&d===r+"")return u;o&&g(d,u)}}for(var u=0,c=a.length;u<c;u++){var f=a[u],p=f.interval,v=f.close;if(p){if(p[0]===-1/0){if(littleThan(v[1],r,p[1]))return u}else if(p[1]===1/0){if(littleThan(v[0],p[0],r))return u}else if(littleThan(v[0],p[0],r)&&littleThan(v[1],r,p[1]))return u;o&&g(p[0],u),o&&g(p[1],u)}}if(o)return r===1/0?a.length-1:r===-1/0?0:s;function g(y,_){var S=Math.abs(y-r);S<l&&(l=S,s=_)}},n.visualHandlers={color:{applyVisual:makeApplyVisual("color"),getColorMapper:function(){var r=this.option;return bind$1(r.mappingMethod==="category"?function(a,o){return!o&&(a=this._normalizeData(a)),doMapCategory.call(this,a)}:function(a,o,s){var l=!!s;return!o&&(a=this._normalizeData(a)),s=fastLerp(a,r.parsedVisual,s),l?s:stringify(s,"rgba")},this)},_normalizedToVisual:{linear:function(r){return stringify(fastLerp(r,this.option.parsedVisual),"rgba")},category:doMapCategory,piecewise:function(r,a){var o=getSpecifiedVisual.call(this,a);return o==null&&(o=stringify(fastLerp(r,this.option.parsedVisual),"rgba")),o},fixed:doMapFixed}},colorHue:makePartialColorVisualHandler(function(r,a){return modifyHSL(r,a)}),colorSaturation:makePartialColorVisualHandler(function(r,a){return modifyHSL(r,null,a)}),colorLightness:makePartialColorVisualHandler(function(r,a){return modifyHSL(r,null,null,a)}),colorAlpha:makePartialColorVisualHandler(function(r,a){return modifyAlpha(r,a)}),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(r,a,o){var s=this.mapValueToVisual(r);o("symbol",s)},_normalizedToVisual:{linear:doMapToArray,category:doMapCategory,piecewise:function(r,a){var o=getSpecifiedVisual.call(this,a);return o==null&&(o=doMapToArray.call(this,r)),o},fixed:doMapFixed}},symbolSize:{applyVisual:makeApplyVisual("symbolSize"),_normalizedToVisual:createNormalizedToNumericVisual([0,1])}},n}();function preprocessForPiecewise(n){var r=n.pieceList;n.hasSpecialVisual=!1,each$f(r,function(a,o){a.originIndex=o,a.visual!=null&&(n.hasSpecialVisual=!0)})}function preprocessForSpecifiedCategory(n){var r=n.categories,a=n.categoryMap={},o=n.visual;if(each$c(r,function(u,c){a[u]=c}),!isArray$1(o)){var s=[];isObject$3(o)?each$c(o,function(u,c){var d=a[c];s[d!=null?d:CATEGORY_DEFAULT_VISUAL_INDEX]=u}):s[CATEGORY_DEFAULT_VISUAL_INDEX]=o,o=setVisualToOption(n,s)}for(var l=r.length-1;l>=0;l--)o[l]==null&&(delete a[r[l]],r.pop())}function normalizeVisualRange(n,r){var a=n.visual,o=[];isObject$3(a)?each$c(a,function(l){o.push(l)}):a!=null&&o.push(a);var s={color:1,symbol:1};!r&&o.length===1&&!s.hasOwnProperty(n.type)&&(o[1]=o[0]),setVisualToOption(n,o)}function makePartialColorVisualHandler(n){return{applyVisual:function(r,a,o){var s=this.mapValueToVisual(r);o("color",n(a("color"),s))},_normalizedToVisual:createNormalizedToNumericVisual([0,1])}}function doMapToArray(n){var r=this.option.visual;return r[Math.round(linearMap$2(n,[0,1],[0,r.length-1],!0))]||{}}function makeApplyVisual(n){return function(r,a,o){o(n,this.mapValueToVisual(r))}}function doMapCategory(n){var r=this.option.visual;return r[this.option.loop&&n!==CATEGORY_DEFAULT_VISUAL_INDEX?n%r.length:n]}function doMapFixed(){return this.option.visual[0]}function createNormalizedToNumericVisual(n){return{linear:function(r){return linearMap$2(r,n,this.option.visual,!0)},category:doMapCategory,piecewise:function(r,a){var o=getSpecifiedVisual.call(this,a);return o==null&&(o=linearMap$2(r,n,this.option.visual,!0)),o},fixed:doMapFixed}}function getSpecifiedVisual(n){var r=this.option,a=r.pieceList;if(r.hasSpecialVisual){var o=VisualMapping.findPieceIndex(n,a),s=a[o];if(s&&s.visual)return s.visual[this.type]}}function setVisualToOption(n,r){return n.visual=r,n.type==="color"&&(n.parsedVisual=map$1(r,function(a){var o=parse(a);return o||[0,0,0,1]})),r}var normalizers={linear:function(n){return linearMap$2(n,this.option.dataExtent,[0,1],!0)},piecewise:function(n){var r=this.option.pieceList,a=VisualMapping.findPieceIndex(n,r,!0);if(a!=null)return linearMap$2(a,[0,r.length-1],[0,1],!0)},category:function(n){var r=this.option.categories?this.option.categoryMap[n]:n;return r==null?CATEGORY_DEFAULT_VISUAL_INDEX:r},fixed:noop};function littleThan(n,r,a){return n?r<=a:r<a}var ITEM_STYLE_NORMAL="itemStyle",inner$c=makeInner();const treemapVisual={seriesType:"treemap",reset:function(n){var r=n.getData().tree,a=r.root;a.isRemoved()||travelTree(a,{},n.getViewRoot().getAncestors(),n)}};function travelTree(n,r,a,o){var s=n.getModel(),l=n.getLayout(),u=n.hostTree.data;if(!(!l||l.invisible||!l.isInView)){var c=s.getModel(ITEM_STYLE_NORMAL),d=buildVisuals(c,r,o),f=u.ensureUniqueItemVisual(n.dataIndex,"style"),p=c.get("borderColor"),v=c.get("borderColorSaturation"),g;v!=null&&(g=calculateColor(d),p=calculateBorderColor(v,g)),f.stroke=p;var y=n.viewChildren;if(!y||!y.length)g=calculateColor(d),f.fill=g;else{var _=buildVisualMapping(n,s,l,c,d,y);each$f(y,function(S,b){if(S.depth>=a.length||S===a[S.depth]){var x=mapVisual$1(s,d,S,b,_,o);travelTree(S,x,a,o)}})}}}function buildVisuals(n,r,a){var o=extend$2({},r),s=a.designatedVisualItemStyle;return each$f(["color","colorAlpha","colorSaturation"],function(l){s[l]=r[l];var u=n.get(l);s[l]=null,u!=null&&(o[l]=u)}),o}function calculateColor(n){var r=getValueVisualDefine(n,"color");if(r){var a=getValueVisualDefine(n,"colorAlpha"),o=getValueVisualDefine(n,"colorSaturation");return o&&(r=modifyHSL(r,null,null,o)),a&&(r=modifyAlpha(r,a)),r}}function calculateBorderColor(n,r){return r!=null?modifyHSL(r,null,null,n):null}function getValueVisualDefine(n,r){var a=n[r];if(a!=null&&a!=="none")return a}function buildVisualMapping(n,r,a,o,s,l){if(!(!l||!l.length)){var u=getRangeVisual(r,"color")||s.color!=null&&s.color!=="none"&&(getRangeVisual(r,"colorAlpha")||getRangeVisual(r,"colorSaturation"));if(u){var c=r.get("visualMin"),d=r.get("visualMax"),f=a.dataExtent.slice();c!=null&&c<f[0]&&(f[0]=c),d!=null&&d>f[1]&&(f[1]=d);var p=r.get("colorMappingBy"),v={type:u.name,dataExtent:f,visual:u.range};v.type==="color"&&(p==="index"||p==="id")?(v.mappingMethod="category",v.loop=!0):v.mappingMethod="linear";var g=new VisualMapping(v);return inner$c(g).drColorMappingBy=p,g}}}function getRangeVisual(n,r){var a=n.get(r);return isArray$1(a)&&a.length?{name:r,range:a}:null}function mapVisual$1(n,r,a,o,s,l){var u=extend$2({},r);if(s){var c=s.type,d=c==="color"&&inner$c(s).drColorMappingBy,f=d==="index"?o:d==="id"?l.mapIdToIndex(a.getId()):a.getValue(n.get("visualDimension"));u[c]=s.mapValueToVisual(f)}return u}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(n,r,a,o){var s=a.getWidth(),l=a.getHeight(),u=n.option,c=getLayoutRect(n.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()}),d=u.size||[],f=parsePercent(retrieveValue(c.width,d[0]),s),p=parsePercent(retrieveValue(c.height,d[1]),l),v=o&&o.type,g=["treemapZoomToNode","treemapRootToNode"],y=retrieveTargetInfo(o,g,n),_=v==="treemapRender"||v==="treemapMove"?o.rootRect:null,S=n.getViewRoot(),b=getPathToRoot(S);if(v!=="treemapMove"){var x=v==="treemapZoomToNode"?estimateRootSize(n,y,S,f,p):_?[_.width,_.height]:[f,p],A=u.sort;A&&A!=="asc"&&A!=="desc"&&(A="desc");var w={squareRatio:u.squareRatio,sort:A,leafDepth:u.leafDepth};S.hostTree.clearLayouts();var E={x:0,y:0,width:x[0],height:x[1],area:x[0]*x[1]};S.setLayout(E),squarify(S,w,!1,0),E=S.getLayout(),each$b(b,function(C,$){var P=(b[$+1]||S).getValue();C.setLayout(extend$2({dataExtent:[P,P],borderWidth:0,upperHeight:0},E))})}var D=n.getData().tree.root;D.setLayout(calculateRootPosition(c,_,y),!0),n.setLayoutInfo(c),prunning(D,new BoundingRect(-c.x,-c.y,s,l),b,S,0)}};function squarify(n,r,a,o){var s,l;if(!n.isRemoved()){var u=n.getLayout();s=u.width,l=u.height;var c=n.getModel(),d=c.get(PATH_BORDER_WIDTH),f=c.get(PATH_GAP_WIDTH)/2,p=getUpperLabelHeight(c),v=Math.max(d,p),g=d-f,y=v-f;n.setLayout({borderWidth:d,upperHeight:v,upperLabelHeight:p},!0),s=mathMax$3(s-2*g,0),l=mathMax$3(l-g-y,0);var _=s*l,S=initChildren$1(n,c,_,r,a,o);if(S.length){var b={x:g,y,width:s,height:l},x=mathMin$3(s,l),A=1/0,w=[];w.area=0;for(var E=0,D=S.length;E<D;){var C=S[E];w.push(C),w.area+=C.getLayout().area;var $=worst(w,x,r.squareRatio);$<=A?(E++,A=$):(w.area-=w.pop().getLayout().area,position(w,x,b,f,!1),x=mathMin$3(b.width,b.height),w.length=w.area=0,A=1/0)}if(w.length&&position(w,x,b,f,!0),!a){var P=c.get("childrenVisibleMin");P!=null&&_<P&&(a=!0)}for(var E=0,D=S.length;E<D;E++)squarify(S[E],r,a,o+1)}}}function initChildren$1(n,r,a,o,s,l){var u=n.children||[],c=o.sort;c!=="asc"&&c!=="desc"&&(c=null);var d=o.leafDepth!=null&&o.leafDepth<=l;if(s&&!d)return n.viewChildren=[];u=filter(u,function(y){return!y.isRemoved()}),sort$1(u,c);var f=statistic(r,u,c);if(f.sum===0)return n.viewChildren=[];if(f.sum=filterByThreshold(r,a,f.sum,c,u),f.sum===0)return n.viewChildren=[];for(var p=0,v=u.length;p<v;p++){var g=u[p].getValue()/f.sum*a;u[p].setLayout({area:g})}return d&&(u.length&&n.setLayout({isLeafRoot:!0},!0),u.length=0),n.viewChildren=u,n.setLayout({dataExtent:f.dataExtent},!0),u}function filterByThreshold(n,r,a,o,s){if(!o)return a;for(var l=n.get("visibleMin"),u=s.length,c=u,d=u-1;d>=0;d--){var f=s[o==="asc"?u-d-1:d].getValue();f/a*r<l&&(c=d,a-=f)}return o==="asc"?s.splice(0,u-c):s.splice(c,u-c),a}function sort$1(n,r){return r&&n.sort(function(a,o){var s=r==="asc"?a.getValue()-o.getValue():o.getValue()-a.getValue();return s===0?r==="asc"?a.dataIndex-o.dataIndex:o.dataIndex-a.dataIndex:s}),n}function statistic(n,r,a){for(var o=0,s=0,l=r.length;s<l;s++)o+=r[s].getValue();var u=n.get("visualDimension"),c;return!r||!r.length?c=[NaN,NaN]:u==="value"&&a?(c=[r[r.length-1].getValue(),r[0].getValue()],a==="asc"&&c.reverse()):(c=[1/0,-1/0],each$b(r,function(d){var f=d.getValue(u);f<c[0]&&(c[0]=f),f>c[1]&&(c[1]=f)})),{sum:o,dataExtent:c}}function worst(n,r,a){for(var o=0,s=1/0,l=0,u=void 0,c=n.length;l<c;l++)u=n[l].getLayout().area,u&&(u<s&&(s=u),u>o&&(o=u));var d=n.area*n.area,f=r*r*a;return d?mathMax$3(f*o/d,d/(f*s)):1/0}function position(n,r,a,o,s){var l=r===a.width?0:1,u=1-l,c=["x","y"],d=["width","height"],f=a[c[l]],p=r?n.area/r:0;(s||p>a[d[u]])&&(p=a[d[u]]);for(var v=0,g=n.length;v<g;v++){var y=n[v],_={},S=p?y.getLayout().area/p:0,b=_[d[u]]=mathMax$3(p-2*o,0),x=a[c[l]]+a[d[l]]-f,A=v===g-1||x<S?x:S,w=_[d[l]]=mathMax$3(A-2*o,0);_[c[u]]=a[c[u]]+mathMin$3(o,b/2),_[c[l]]=f+mathMin$3(o,w/2),f+=A,y.setLayout(_,!0)}a[c[u]]+=p,a[d[u]]-=p}function estimateRootSize(n,r,a,o,s){var l=(r||{}).node,u=[o,s];if(!l||l===a)return u;for(var c,d=o*s,f=d*n.option.zoomToNodeRatio;c=l.parentNode;){for(var p=0,v=c.children,g=0,y=v.length;g<y;g++)p+=v[g].getValue();var _=l.getValue();if(_===0)return u;f*=p/_;var S=c.getModel(),b=S.get(PATH_BORDER_WIDTH),x=Math.max(b,getUpperLabelHeight(S));f+=4*b*b+(3*b+x)*Math.pow(f,.5),f>MAX_SAFE_INTEGER&&(f=MAX_SAFE_INTEGER),l=c}f<d&&(f=d);var A=Math.pow(f/d,.5);return[o*A,s*A]}function calculateRootPosition(n,r,a){if(r)return{x:r.x,y:r.y};var o={x:0,y:0};if(!a)return o;var s=a.node,l=s.getLayout();if(!l)return o;for(var u=[l.width/2,l.height/2],c=s;c;){var d=c.getLayout();u[0]+=d.x,u[1]+=d.y,c=c.parentNode}return{x:n.width/2-u[0],y:n.height/2-u[1]}}function prunning(n,r,a,o,s){var l=n.getLayout(),u=a[s],c=u&&u===n;if(!(u&&!c||s===a.length&&n!==o)){n.setLayout({isInView:!0,invisible:!c&&!r.intersect(l),isAboveViewRoot:c},!0);var d=new BoundingRect(r.x-l.x,r.y-l.y,r.width,r.height);each$b(n.viewChildren||[],function(f){prunning(f,d,a,o,s+1)})}}function getUpperLabelHeight(n){return n.get(PATH_UPPER_LABEL_SHOW)?n.get(PATH_UPPER_LABEL_HEIGHT):0}function install$I(n){n.registerSeriesModel(TreemapSeriesModel),n.registerChartView(TreemapView),n.registerVisual(treemapVisual),n.registerLayout(treemapLayout),installTreemapAction(n)}function categoryFilter(n){var r=n.findComponents({mainType:"legend"});!r||!r.length||n.eachSeriesByType("graph",function(a){var o=a.getCategoriesData(),s=a.getGraph(),l=s.data,u=o.mapArray(o.getName);l.filterSelf(function(c){var d=l.getItemModel(c),f=d.getShallow("category");if(f!=null){isNumber(f)&&(f=u[f]);for(var p=0;p<r.length;p++)if(!r[p].isSelected(f))return!1}return!0})})}function categoryVisual(n){var r={};n.eachSeriesByType("graph",function(a){var o=a.getCategoriesData(),s=a.getData(),l={};o.each(function(u){var c=o.getName(u);l["ec-"+c]=u;var d=o.getItemModel(u),f=d.getModel("itemStyle").getItemStyle();f.fill||(f.fill=a.getColorFromPalette(c,r)),o.setItemVisual(u,"style",f);for(var p=["symbol","symbolSize","symbolKeepAspect"],v=0;v<p.length;v++){var g=d.getShallow(p[v],!0);g!=null&&o.setItemVisual(u,p[v],g)}}),o.count()&&s.each(function(u){var c=s.getItemModel(u),d=c.getShallow("category");if(d!=null){isString(d)&&(d=l["ec-"+d]);var f=o.getItemVisual(d,"style"),p=s.ensureUniqueItemVisual(u,"style");extend$2(p,f);for(var v=["symbol","symbolSize","symbolKeepAspect"],g=0;g<v.length;g++)s.setItemVisual(u,v[g],o.getItemVisual(d,v[g]))}})})}function normalize$1(n){return n instanceof Array||(n=[n,n]),n}function graphEdgeVisual(n){n.eachSeriesByType("graph",function(r){var a=r.getGraph(),o=r.getEdgeData(),s=normalize$1(r.get("edgeSymbol")),l=normalize$1(r.get("edgeSymbolSize"));o.setVisual("fromSymbol",s&&s[0]),o.setVisual("toSymbol",s&&s[1]),o.setVisual("fromSymbolSize",l&&l[0]),o.setVisual("toSymbolSize",l&&l[1]),o.setVisual("style",r.getModel("lineStyle").getLineStyle()),o.each(function(u){var c=o.getItemModel(u),d=a.getEdgeByIndex(u),f=normalize$1(c.getShallow("symbol",!0)),p=normalize$1(c.getShallow("symbolSize",!0)),v=c.getModel("lineStyle").getLineStyle(),g=o.ensureUniqueItemVisual(u,"style");switch(extend$2(g,v),g.stroke){case"source":{var y=d.node1.getVisual("style");g.stroke=y&&y.fill;break}case"target":{var y=d.node2.getVisual("style");g.stroke=y&&y.fill;break}}f[0]&&d.setVisual("fromSymbol",f[0]),f[1]&&d.setVisual("toSymbol",f[1]),p[0]&&d.setVisual("fromSymbolSize",p[0]),p[1]&&d.setVisual("toSymbolSize",p[1])})})}var KEY_DELIMITER="-->",getAutoCurvenessParams=function(n){return n.get("autoCurveness")||null},createCurveness=function(n,r){var a=getAutoCurvenessParams(n),o=20,s=[];if(isNumber(a))o=a;else if(isArray$1(a)){n.__curvenessList=a;return}r>o&&(o=r);var l=o%2?o+2:o+3;s=[];for(var u=0;u<l;u++)s.push((u%2?u+1:u)/10*(u%2?-1:1));n.__curvenessList=s},getKeyOfEdges=function(n,r,a){var o=[n.id,n.dataIndex].join("."),s=[r.id,r.dataIndex].join(".");return[a.uid,o,s].join(KEY_DELIMITER)},getOppositeKey=function(n){var r=n.split(KEY_DELIMITER);return[r[0],r[2],r[1]].join(KEY_DELIMITER)},getEdgeFromMap=function(n,r){var a=getKeyOfEdges(n.node1,n.node2,r);return r.__edgeMap[a]},getTotalLengthBetweenNodes=function(n,r){var a=getEdgeMapLengthWithKey(getKeyOfEdges(n.node1,n.node2,r),r),o=getEdgeMapLengthWithKey(getKeyOfEdges(n.node2,n.node1,r),r);return a+o},getEdgeMapLengthWithKey=function(n,r){var a=r.__edgeMap;return a[n]?a[n].length:0};function initCurvenessList(n){getAutoCurvenessParams(n)&&(n.__curvenessList=[],n.__edgeMap={},createCurveness(n))}function createEdgeMapForCurveness(n,r,a,o){if(getAutoCurvenessParams(a)){var s=getKeyOfEdges(n,r,a),l=a.__edgeMap,u=l[getOppositeKey(s)];l[s]&&!u?l[s].isForward=!0:u&&l[s]&&(u.isForward=!0,l[s].isForward=!1),l[s]=l[s]||[],l[s].push(o)}}function getCurvenessForEdge(n,r,a,o){var s=getAutoCurvenessParams(r),l=isArray$1(s);if(!s)return null;var u=getEdgeFromMap(n,r);if(!u)return null;for(var c=-1,d=0;d<u.length;d++)if(u[d]===a){c=d;break}var f=getTotalLengthBetweenNodes(n,r);createCurveness(r,f),n.lineStyle=n.lineStyle||{};var p=getKeyOfEdges(n.node1,n.node2,r),v=r.__curvenessList,g=l||f%2?0:1;if(u.isForward)return v[g+c];var y=getOppositeKey(p),_=getEdgeMapLengthWithKey(y,r),S=v[c+_+g];return o?l?s&&s[0]===0?(_+g)%2?S:-S:((_%2?0:1)+g)%2?S:-S:(_+g)%2?S:-S:v[c+_+g]}function simpleLayout(n){var r=n.coordinateSystem;if(!(r&&r.type!=="view")){var a=n.getGraph();a.eachNode(function(o){var s=o.getModel();o.setLayout([+s.get("x"),+s.get("y")])}),simpleLayoutEdge(a,n)}}function simpleLayoutEdge(n,r){n.eachEdge(function(a,o){var s=retrieve3(a.getModel().get(["lineStyle","curveness"]),-getCurvenessForEdge(a,r,o,!0),0),l=clone$5(a.node1.getLayout()),u=clone$5(a.node2.getLayout()),c=[l,u];+s&&c.push([(l[0]+u[0])/2-(l[1]-u[1])*s,(l[1]+u[1])/2-(u[0]-l[0])*s]),a.setLayout(c)})}function graphSimpleLayout(n,r){n.eachSeriesByType("graph",function(a){var o=a.get("layout"),s=a.coordinateSystem;if(s&&s.type!=="view"){var l=a.getData(),u=[];each$f(s.dimensions,function(g){u=u.concat(l.mapDimensionsAll(g))});for(var c=0;c<l.count();c++){for(var d=[],f=!1,p=0;p<u.length;p++){var v=l.get(u[p],c);isNaN(v)||(f=!0),d.push(v)}f?l.setItemLayout(c,s.dataToPoint(d)):l.setItemLayout(c,[NaN,NaN])}simpleLayoutEdge(l.graph,a)}else(!o||o==="none")&&simpleLayout(a)})}function getNodeGlobalScale(n){var r=n.coordinateSystem;if(r.type!=="view")return 1;var a=n.option.nodeScaleRatio,o=r.scaleX,s=r.getZoom(),l=(s-1)*a+1;return l/o}function getSymbolSize(n){var r=n.getVisual("symbolSize");return r instanceof Array&&(r=(r[0]+r[1])/2),+r}var PI$3=Math.PI,_symbolRadiansHalf=[];function circularLayout(n,r,a,o){var s=n.coordinateSystem;if(!(s&&s.type!=="view")){var l=s.getBoundingRect(),u=n.getData(),c=u.graph,d=l.width/2+l.x,f=l.height/2+l.y,p=Math.min(l.width,l.height)/2,v=u.count();if(u.setLayout({cx:d,cy:f}),!!v){if(a){var g=s.pointToData(o),y=g[0],_=g[1],S=[y-d,_-f];normalize$3(S,S),scale$2(S,S,p),a.setLayout([d+S[0],f+S[1]],!0);var b=n.get(["circular","rotateLabel"]);rotateNodeLabel(a,b,d,f)}_layoutNodesBasedOn[r](n,c,u,p,d,f,v),c.eachEdge(function(x,A){var w=retrieve3(x.getModel().get(["lineStyle","curveness"]),getCurvenessForEdge(x,n,A),0),E=clone$5(x.node1.getLayout()),D=clone$5(x.node2.getLayout()),C,$=(E[0]+D[0])/2,P=(E[1]+D[1])/2;+w&&(w*=3,C=[d*w+$*(1-w),f*w+P*(1-w)]),x.setLayout([E,D,C])})}}}var _layoutNodesBasedOn={value:function(n,r,a,o,s,l,u){var c=0,d=a.getSum("value"),f=Math.PI*2/(d||u);r.eachNode(function(p){var v=p.getValue("value"),g=f*(d?v:1)/2;c+=g,p.setLayout([o*Math.cos(c)+s,o*Math.sin(c)+l]),c+=g})},symbolSize:function(n,r,a,o,s,l,u){var c=0;_symbolRadiansHalf.length=u;var d=getNodeGlobalScale(n);r.eachNode(function(v){var g=getSymbolSize(v);isNaN(g)&&(g=2),g<0&&(g=0),g*=d;var y=Math.asin(g/2/o);isNaN(y)&&(y=PI$3/2),_symbolRadiansHalf[v.dataIndex]=y,c+=y*2});var f=(2*PI$3-c)/u/2,p=0;r.eachNode(function(v){var g=f+_symbolRadiansHalf[v.dataIndex];p+=g,(!v.getLayout()||!v.getLayout().fixed)&&v.setLayout([o*Math.cos(p)+s,o*Math.sin(p)+l]),p+=g})}};function rotateNodeLabel(n,r,a,o){var s=n.getGraphicEl();if(s){var l=n.getModel(),u=l.get(["label","rotate"])||0,c=s.getSymbolPath();if(r){var d=n.getLayout(),f=Math.atan2(d[1]-o,d[0]-a);f<0&&(f=Math.PI*2+f);var p=d[0]<a;p&&(f=f-Math.PI);var v=p?"left":"right";c.setTextConfig({rotation:-f,position:v,origin:"center"});var g=c.ensureState("emphasis");extend$2(g.textConfig||(g.textConfig={}),{position:v})}else c.setTextConfig({rotation:u*=Math.PI/180})}}function graphCircularLayout(n){n.eachSeriesByType("graph",function(r){r.get("layout")==="circular"&&circularLayout(r,"symbolSize")})}var scaleAndAdd=scaleAndAdd$1;function forceLayout(n,r,a){for(var o=n,s=r,l=a.rect,u=l.width,c=l.height,d=[l.x+u/2,l.y+c/2],f=a.gravity==null?.1:a.gravity,p=0;p<o.length;p++){var v=o[p];v.p||(v.p=create$2(u*(Math.random()-.5)+d[0],c*(Math.random()-.5)+d[1])),v.pp=clone$5(v.p),v.edges=null}var g=a.friction==null?.6:a.friction,y=g,_,S;return{warmUp:function(){y=g*.8},setFixed:function(b){o[b].fixed=!0},setUnfixed:function(b){o[b].fixed=!1},beforeStep:function(b){_=b},afterStep:function(b){S=b},step:function(b){_&&_(o,s);for(var x=[],A=o.length,w=0;w<s.length;w++){var E=s[w];if(!E.ignoreForceLayout){var D=E.n1,C=E.n2;sub(x,C.p,D.p);var $=len(x)-E.d,P=C.w/(D.w+C.w);isNaN(P)&&(P=0),normalize$3(x,x),!D.fixed&&scaleAndAdd(D.p,D.p,x,P*$*y),!C.fixed&&scaleAndAdd(C.p,C.p,x,-(1-P)*$*y)}}for(var w=0;w<A;w++){var M=o[w];M.fixed||(sub(x,d,M.p),scaleAndAdd(M.p,M.p,x,f*y))}for(var w=0;w<A;w++)for(var D=o[w],I=w+1;I<A;I++){var C=o[I];sub(x,C.p,D.p);var $=len(x);$===0&&(set$1(x,Math.random()-.5,Math.random()-.5),$=1);var L=(D.rep+C.rep)/$/$;!D.fixed&&scaleAndAdd(D.pp,D.pp,x,L),!C.fixed&&scaleAndAdd(C.pp,C.pp,x,-L)}for(var O=[],w=0;w<A;w++){var M=o[w];M.fixed||(sub(O,M.p,M.pp),scaleAndAdd(M.p,M.p,O,y),copy$1(M.pp,M.p))}y=y*.992;var R=y<.01;S&&S(o,s,R),b&&b(R)}}}function graphForceLayout(n){n.eachSeriesByType("graph",function(r){var a=r.coordinateSystem;if(!(a&&a.type!=="view"))if(r.get("layout")==="force"){var o=r.preservedPoints||{},s=r.getGraph(),l=s.data,u=s.edgeData,c=r.getModel("force"),d=c.get("initLayout");r.preservedPoints?l.each(function(w){var E=l.getId(w);l.setItemLayout(w,o[E]||[NaN,NaN])}):!d||d==="none"?simpleLayout(r):d==="circular"&&circularLayout(r,"value");var f=l.getDataExtent("value"),p=u.getDataExtent("value"),v=c.get("repulsion"),g=c.get("edgeLength"),y=isArray$1(v)?v:[v,v],_=isArray$1(g)?g:[g,g];_=[_[1],_[0]];var S=l.mapArray("value",function(w,E){var D=l.getItemLayout(E),C=linearMap$2(w,f,y);return isNaN(C)&&(C=(y[0]+y[1])/2),{w:C,rep:C,fixed:l.getItemModel(E).get("fixed"),p:!D||isNaN(D[0])||isNaN(D[1])?null:D}}),b=u.mapArray("value",function(w,E){var D=s.getEdgeByIndex(E),C=linearMap$2(w,p,_);isNaN(C)&&(C=(_[0]+_[1])/2);var $=D.getModel(),P=retrieve3(D.getModel().get(["lineStyle","curveness"]),-getCurvenessForEdge(D,r,E,!0),0);return{n1:S[D.node1.dataIndex],n2:S[D.node2.dataIndex],d:C,curveness:P,ignoreForceLayout:$.get("ignoreForceLayout")}}),x=a.getBoundingRect(),A=forceLayout(S,b,{rect:x,gravity:c.get("gravity"),friction:c.get("friction")});A.beforeStep(function(w,E){for(var D=0,C=w.length;D<C;D++)w[D].fixed&©$1(w[D].p,s.getNodeByIndex(D).getLayout())}),A.afterStep(function(w,E,D){for(var C=0,$=w.length;C<$;C++)w[C].fixed||s.getNodeByIndex(C).setLayout(w[C].p),o[l.getId(C)]=w[C].p;for(var C=0,$=E.length;C<$;C++){var P=E[C],M=s.getEdgeByIndex(C),I=P.n1.p,L=P.n2.p,O=M.getLayout();O=O?O.slice():[],O[0]=O[0]||[],O[1]=O[1]||[],copy$1(O[0],I),copy$1(O[1],L),+P.curveness&&(O[2]=[(I[0]+L[0])/2-(I[1]-L[1])*P.curveness,(I[1]+L[1])/2-(L[0]-I[0])*P.curveness]),M.setLayout(O)}}),r.forceLayout=A,r.preservedPoints=o,A.step()}else r.forceLayout=null})}function getViewRect$3(n,r,a){var o=extend$2(n.getBoxLayoutParams(),{aspect:a});return getLayoutRect(o,{width:r.getWidth(),height:r.getHeight()})}function createViewCoordSys(n,r){var a=[];return n.eachSeriesByType("graph",function(o){var s=o.get("coordinateSystem");if(!s||s==="view"){var l=o.getData(),u=l.mapArray(function(b){var x=l.getItemModel(b);return[+x.get("x"),+x.get("y")]}),c=[],d=[];fromPoints(u,c,d),d[0]-c[0]===0&&(d[0]+=1,c[0]-=1),d[1]-c[1]===0&&(d[1]+=1,c[1]-=1);var f=(d[0]-c[0])/(d[1]-c[1]),p=getViewRect$3(o,r,f);isNaN(f)&&(c=[p.x,p.y],d=[p.x+p.width,p.y+p.height]);var v=d[0]-c[0],g=d[1]-c[1],y=p.width,_=p.height,S=o.coordinateSystem=new View;S.zoomLimit=o.get("scaleLimit"),S.setBoundingRect(c[0],c[1],v,g),S.setViewRect(p.x,p.y,y,_),S.setCenter(o.get("center"),r),S.setZoom(o.get("zoom")),a.push(S)}}),a}var straightLineProto=Line$1.prototype,bezierCurveProto=BezierCurve.prototype,StraightLineShape=function(){function n(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return n}();(function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r})(StraightLineShape);function isStraightLine(n){return isNaN(+n.cpx1)||isNaN(+n.cpy1)}var ECLinePath=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="ec-line",o}return r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new StraightLineShape},r.prototype.buildPath=function(a,o){isStraightLine(o)?straightLineProto.buildPath.call(this,a,o):bezierCurveProto.buildPath.call(this,a,o)},r.prototype.pointAt=function(a){return isStraightLine(this.shape)?straightLineProto.pointAt.call(this,a):bezierCurveProto.pointAt.call(this,a)},r.prototype.tangentAt=function(a){var o=this.shape,s=isStraightLine(o)?[o.x2-o.x1,o.y2-o.y1]:bezierCurveProto.tangentAt.call(this,a);return normalize$3(s,s)},r}(Path),SYMBOL_CATEGORIES=["fromSymbol","toSymbol"];function makeSymbolTypeKey(n){return"_"+n+"Type"}function makeSymbolTypeValue(n,r,a){var o=r.getItemVisual(a,n);if(!o||o==="none")return o;var s=r.getItemVisual(a,n+"Size"),l=r.getItemVisual(a,n+"Rotate"),u=r.getItemVisual(a,n+"Offset"),c=r.getItemVisual(a,n+"KeepAspect"),d=normalizeSymbolSize(s),f=normalizeSymbolOffset(u||0,d);return o+d+f+(l||"")+(c||"")}function createSymbol(n,r,a){var o=r.getItemVisual(a,n);if(!(!o||o==="none")){var s=r.getItemVisual(a,n+"Size"),l=r.getItemVisual(a,n+"Rotate"),u=r.getItemVisual(a,n+"Offset"),c=r.getItemVisual(a,n+"KeepAspect"),d=normalizeSymbolSize(s),f=normalizeSymbolOffset(u||0,d),p=createSymbol$1(o,-d[0]/2+f[0],-d[1]/2+f[1],d[0],d[1],null,c);return p.__specifiedRotation=l==null||isNaN(l)?void 0:+l*Math.PI/180||0,p.name=n,p}}function createLine(n){var r=new ECLinePath({name:"line",subPixelOptimize:!0});return setLinePoints(r.shape,n),r}function setLinePoints(n,r){n.x1=r[0][0],n.y1=r[0][1],n.x2=r[1][0],n.y2=r[1][1],n.percent=1;var a=r[2];a?(n.cpx1=a[0],n.cpy1=a[1]):(n.cpx1=NaN,n.cpy1=NaN)}var Line=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this)||this;return l._createLine(a,o,s),l}return r.prototype._createLine=function(a,o,s){var l=a.hostModel,u=a.getItemLayout(o),c=createLine(u);c.shape.percent=0,initProps(c,{shape:{percent:1}},l,o),this.add(c),each$f(SYMBOL_CATEGORIES,function(d){var f=createSymbol(d,a,o);this.add(f),this[makeSymbolTypeKey(d)]=makeSymbolTypeValue(d,a,o)},this),this._updateCommonStl(a,o,s)},r.prototype.updateData=function(a,o,s){var l=a.hostModel,u=this.childOfName("line"),c=a.getItemLayout(o),d={shape:{}};setLinePoints(d.shape,c),updateProps$1(u,d,l,o),each$f(SYMBOL_CATEGORIES,function(f){var p=makeSymbolTypeValue(f,a,o),v=makeSymbolTypeKey(f);if(this[v]!==p){this.remove(this.childOfName(f));var g=createSymbol(f,a,o);this.add(g)}this[v]=p},this),this._updateCommonStl(a,o,s)},r.prototype.getLinePath=function(){return this.childAt(0)},r.prototype._updateCommonStl=function(a,o,s){var l=a.hostModel,u=this.childOfName("line"),c=s&&s.emphasisLineStyle,d=s&&s.blurLineStyle,f=s&&s.selectLineStyle,p=s&&s.labelStatesModels,v=s&&s.emphasisDisabled,g=s&&s.focus,y=s&&s.blurScope;if(!s||a.hasItemOption){var _=a.getItemModel(o),S=_.getModel("emphasis");c=S.getModel("lineStyle").getLineStyle(),d=_.getModel(["blur","lineStyle"]).getLineStyle(),f=_.getModel(["select","lineStyle"]).getLineStyle(),v=S.get("disabled"),g=S.get("focus"),y=S.get("blurScope"),p=getLabelStatesModels(_)}var b=a.getItemVisual(o,"style"),x=b.stroke;u.useStyle(b),u.style.fill=null,u.style.strokeNoScale=!0,u.ensureState("emphasis").style=c,u.ensureState("blur").style=d,u.ensureState("select").style=f,each$f(SYMBOL_CATEGORIES,function(C){var $=this.childOfName(C);if($){$.setColor(x),$.style.opacity=b.opacity;for(var P=0;P<SPECIAL_STATES.length;P++){var M=SPECIAL_STATES[P],I=u.getState(M);if(I){var L=I.style||{},O=$.ensureState(M),R=O.style||(O.style={});L.stroke!=null&&(R[$.__isEmptyBrush?"stroke":"fill"]=L.stroke),L.opacity!=null&&(R.opacity=L.opacity)}}$.markRedraw()}},this);var A=l.getRawValue(o);setLabelStyle(this,p,{labelDataIndex:o,labelFetcher:{getFormattedLabel:function(C,$){return l.getFormattedLabel(C,$,a.dataType)}},inheritColor:x||"#000",defaultOpacity:b.opacity,defaultText:(A==null?a.getName(o):isFinite(A)?round$3(A):A)+""});var w=this.getTextContent();if(w){var E=p.normal;w.__align=w.style.align,w.__verticalAlign=w.style.verticalAlign,w.__position=E.get("position")||"middle";var D=E.get("distance");isArray$1(D)||(D=[D,D]),w.__labelDistance=D}this.setTextConfig({position:null,local:!0,inside:!1}),toggleHoverEmphasis(this,g,y,v)},r.prototype.highlight=function(){enterEmphasis(this)},r.prototype.downplay=function(){leaveEmphasis(this)},r.prototype.updateLayout=function(a,o){this.setLinePoints(a.getItemLayout(o))},r.prototype.setLinePoints=function(a){var o=this.childOfName("line");setLinePoints(o.shape,a),o.dirty()},r.prototype.beforeUpdate=function(){var a=this,o=a.childOfName("fromSymbol"),s=a.childOfName("toSymbol"),l=a.getTextContent();if(!o&&!s&&(!l||l.ignore))return;for(var u=1,c=this.parent;c;)c.scaleX&&(u/=c.scaleX),c=c.parent;var d=a.childOfName("line");if(!this.__dirty&&!d.__dirty)return;var f=d.shape.percent,p=d.pointAt(0),v=d.pointAt(f),g=sub([],v,p);normalize$3(g,g);function y(I,L){var O=I.__specifiedRotation;if(O==null){var R=d.tangentAt(L);I.attr("rotation",(L===1?-1:1)*Math.PI/2-Math.atan2(R[1],R[0]))}else I.attr("rotation",O)}if(o&&(o.setPosition(p),y(o,0),o.scaleX=o.scaleY=u*f,o.markRedraw()),s&&(s.setPosition(v),y(s,1),s.scaleX=s.scaleY=u*f,s.markRedraw()),l&&!l.ignore){l.x=l.y=0,l.originX=l.originY=0;var _=void 0,S=void 0,b=l.__labelDistance,x=b[0]*u,A=b[1]*u,w=f/2,E=d.tangentAt(w),D=[E[1],-E[0]],C=d.pointAt(w);D[1]>0&&(D[0]=-D[0],D[1]=-D[1]);var $=E[0]<0?-1:1;if(l.__position!=="start"&&l.__position!=="end"){var P=-Math.atan2(E[1],E[0]);v[0]<p[0]&&(P=Math.PI+P),l.rotation=P}var M=void 0;switch(l.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":M=-A,S="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":M=A,S="top";break;default:M=0,S="middle"}switch(l.__position){case"end":l.x=g[0]*x+v[0],l.y=g[1]*A+v[1],_=g[0]>.8?"left":g[0]<-.8?"right":"center",S=g[1]>.8?"top":g[1]<-.8?"bottom":"middle";break;case"start":l.x=-g[0]*x+p[0],l.y=-g[1]*A+p[1],_=g[0]>.8?"right":g[0]<-.8?"left":"center",S=g[1]>.8?"bottom":g[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":l.x=x*$+p[0],l.y=p[1]+M,_=E[0]<0?"right":"left",l.originX=-x*$,l.originY=-M;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":l.x=C[0],l.y=C[1]+M,_="center",l.originY=-M;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":l.x=-x*$+v[0],l.y=v[1]+M,_=E[0]>=0?"right":"left",l.originX=x*$,l.originY=-M;break}l.scaleX=l.scaleY=u,l.setStyle({verticalAlign:l.__verticalAlign||S,align:l.__align||_})}},r}(Group$3),LineDraw=function(){function n(r){this.group=new Group$3,this._LineCtor=r||Line}return n.prototype.updateData=function(r){var a=this;this._progressiveEls=null;var o=this,s=o.group,l=o._lineData;o._lineData=r,l||s.removeAll();var u=makeSeriesScope$1(r);r.diff(l).add(function(c){a._doAdd(r,c,u)}).update(function(c,d){a._doUpdate(l,r,d,c,u)}).remove(function(c){s.remove(l.getItemGraphicEl(c))}).execute()},n.prototype.updateLayout=function(){var r=this._lineData;r&&r.eachItemGraphicEl(function(a,o){a.updateLayout(r,o)},this)},n.prototype.incrementalPrepareUpdate=function(r){this._seriesScope=makeSeriesScope$1(r),this._lineData=null,this.group.removeAll()},n.prototype.incrementalUpdate=function(r,a){this._progressiveEls=[];function o(c){!c.isGroup&&!isEffectObject(c)&&(c.incremental=!0,c.ensureState("emphasis").hoverLayer=!0)}for(var s=r.start;s<r.end;s++){var l=a.getItemLayout(s);if(lineNeedsDraw(l)){var u=new this._LineCtor(a,s,this._seriesScope);u.traverse(o),this.group.add(u),a.setItemGraphicEl(s,u),this._progressiveEls.push(u)}}},n.prototype.remove=function(){this.group.removeAll()},n.prototype.eachRendered=function(r){traverseElements(this._progressiveEls||this.group,r)},n.prototype._doAdd=function(r,a,o){var s=r.getItemLayout(a);if(lineNeedsDraw(s)){var l=new this._LineCtor(r,a,o);r.setItemGraphicEl(a,l),this.group.add(l)}},n.prototype._doUpdate=function(r,a,o,s,l){var u=r.getItemGraphicEl(o);if(!lineNeedsDraw(a.getItemLayout(s))){this.group.remove(u);return}u?u.updateData(a,s,l):u=new this._LineCtor(a,s,l),a.setItemGraphicEl(s,u),this.group.add(u)},n}();function isEffectObject(n){return n.animators&&n.animators.length>0}function makeSeriesScope$1(n){var r=n.hostModel,a=r.getModel("emphasis");return{lineStyle:r.getModel("lineStyle").getLineStyle(),emphasisLineStyle:a.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:r.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:r.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:a.get("disabled"),blurScope:a.get("blurScope"),focus:a.get("focus"),labelStatesModels:getLabelStatesModels(r)}}function isPointNaN(n){return isNaN(n[0])||isNaN(n[1])}function lineNeedsDraw(n){return n&&!isPointNaN(n[0])&&!isPointNaN(n[1])}var v1=[],v2=[],v3=[],quadraticAt=quadraticAt$1,v2DistSquare=distSquare,mathAbs=Math.abs;function intersectCurveCircle(n,r,a){for(var o=n[0],s=n[1],l=n[2],u=1/0,c,d=a*a,f=.1,p=.1;p<=.9;p+=.1){v1[0]=quadraticAt(o[0],s[0],l[0],p),v1[1]=quadraticAt(o[1],s[1],l[1],p);var v=mathAbs(v2DistSquare(v1,r)-d);v<u&&(u=v,c=p)}for(var g=0;g<32;g++){var y=c+f;v2[0]=quadraticAt(o[0],s[0],l[0],c),v2[1]=quadraticAt(o[1],s[1],l[1],c),v3[0]=quadraticAt(o[0],s[0],l[0],y),v3[1]=quadraticAt(o[1],s[1],l[1],y);var v=v2DistSquare(v2,r)-d;if(mathAbs(v)<.01)break;var _=v2DistSquare(v3,r)-d;f/=2,v<0?_>=0?c=c+f:c=c-f:_>=0?c=c-f:c=c+f}return c}function adjustEdge(n,r){var a=[],o=quadraticSubdivide,s=[[],[],[]],l=[[],[]],u=[];r/=2,n.eachEdge(function(c,d){var f=c.getLayout(),p=c.getVisual("fromSymbol"),v=c.getVisual("toSymbol");f.__original||(f.__original=[clone$5(f[0]),clone$5(f[1])],f[2]&&f.__original.push(clone$5(f[2])));var g=f.__original;if(f[2]!=null){if(copy$1(s[0],g[0]),copy$1(s[1],g[2]),copy$1(s[2],g[1]),p&&p!=="none"){var y=getSymbolSize(c.node1),_=intersectCurveCircle(s,g[0],y*r);o(s[0][0],s[1][0],s[2][0],_,a),s[0][0]=a[3],s[1][0]=a[4],o(s[0][1],s[1][1],s[2][1],_,a),s[0][1]=a[3],s[1][1]=a[4]}if(v&&v!=="none"){var y=getSymbolSize(c.node2),_=intersectCurveCircle(s,g[1],y*r);o(s[0][0],s[1][0],s[2][0],_,a),s[1][0]=a[1],s[2][0]=a[2],o(s[0][1],s[1][1],s[2][1],_,a),s[1][1]=a[1],s[2][1]=a[2]}copy$1(f[0],s[0]),copy$1(f[1],s[2]),copy$1(f[2],s[1])}else{if(copy$1(l[0],g[0]),copy$1(l[1],g[1]),sub(u,l[1],l[0]),normalize$3(u,u),p&&p!=="none"){var y=getSymbolSize(c.node1);scaleAndAdd$1(l[0],l[0],u,y*r)}if(v&&v!=="none"){var y=getSymbolSize(c.node2);scaleAndAdd$1(l[1],l[1],u,-y*r)}copy$1(f[0],l[0]),copy$1(f[1],l[1])}})}function isViewCoordSys(n){return n.type==="view"}var GraphView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(a,o){var s=new SymbolDraw,l=new LineDraw,u=this.group;this._controller=new RoamController(o.getZr()),this._controllerHost={target:u},u.add(s.group),u.add(l.group),this._symbolDraw=s,this._lineDraw=l,this._firstRender=!0},r.prototype.render=function(a,o,s){var l=this,u=a.coordinateSystem;this._model=a;var c=this._symbolDraw,d=this._lineDraw,f=this.group;if(isViewCoordSys(u)){var p={x:u.x,y:u.y,scaleX:u.scaleX,scaleY:u.scaleY};this._firstRender?f.attr(p):updateProps$1(f,p,a)}adjustEdge(a.getGraph(),getNodeGlobalScale(a));var v=a.getData();c.updateData(v);var g=a.getEdgeData();d.updateData(g),this._updateNodeAndLinkScale(),this._updateController(a,o,s),clearTimeout(this._layoutTimeout);var y=a.forceLayout,_=a.get(["force","layoutAnimation"]);y&&this._startForceLayoutIteration(y,_);var S=a.get("layout");v.graph.eachNode(function(w){var E=w.dataIndex,D=w.getGraphicEl(),C=w.getModel();if(D){D.off("drag").off("dragend");var $=C.get("draggable");$&&D.on("drag",function(M){switch(S){case"force":y.warmUp(),!l._layouting&&l._startForceLayoutIteration(y,_),y.setFixed(E),v.setItemLayout(E,[D.x,D.y]);break;case"circular":v.setItemLayout(E,[D.x,D.y]),w.setLayout({fixed:!0},!0),circularLayout(a,"symbolSize",w,[M.offsetX,M.offsetY]),l.updateLayout(a);break;case"none":default:v.setItemLayout(E,[D.x,D.y]),simpleLayoutEdge(a.getGraph(),a),l.updateLayout(a);break}}).on("dragend",function(){y&&y.setUnfixed(E)}),D.setDraggable($,!!C.get("cursor"));var P=C.get(["emphasis","focus"]);P==="adjacency"&&(getECData(D).focus=w.getAdjacentDataIndices())}}),v.graph.eachEdge(function(w){var E=w.getGraphicEl(),D=w.getModel().get(["emphasis","focus"]);E&&D==="adjacency"&&(getECData(E).focus={edge:[w.dataIndex],node:[w.node1.dataIndex,w.node2.dataIndex]})});var b=a.get("layout")==="circular"&&a.get(["circular","rotateLabel"]),x=v.getLayout("cx"),A=v.getLayout("cy");v.graph.eachNode(function(w){rotateNodeLabel(w,b,x,A)}),this._firstRender=!1},r.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},r.prototype._startForceLayoutIteration=function(a,o){var s=this;(function l(){a.step(function(u){s.updateLayout(s._model),(s._layouting=!u)&&(o?s._layoutTimeout=setTimeout(l,16):l())})})()},r.prototype._updateController=function(a,o,s){var l=this,u=this._controller,c=this._controllerHost,d=this.group;if(u.setPointerChecker(function(f,p,v){var g=d.getBoundingRect();return g.applyTransform(d.transform),g.contain(p,v)&&!onIrrelevantElement(f,s,a)}),!isViewCoordSys(a.coordinateSystem)){u.disable();return}u.enable(a.get("roam")),c.zoomLimit=a.get("scaleLimit"),c.zoom=a.coordinateSystem.getZoom(),u.off("pan").off("zoom").on("pan",function(f){updateViewOnPan(c,f.dx,f.dy),s.dispatchAction({seriesId:a.id,type:"graphRoam",dx:f.dx,dy:f.dy})}).on("zoom",function(f){updateViewOnZoom(c,f.scale,f.originX,f.originY),s.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:f.scale,originX:f.originX,originY:f.originY}),l._updateNodeAndLinkScale(),adjustEdge(a.getGraph(),getNodeGlobalScale(a)),l._lineDraw.updateLayout(),s.updateLabelLayout()})},r.prototype._updateNodeAndLinkScale=function(){var a=this._model,o=a.getData(),s=getNodeGlobalScale(a);o.eachItemGraphicEl(function(l,u){l&&l.setSymbolScale(s)})},r.prototype.updateLayout=function(a){adjustEdge(a.getGraph(),getNodeGlobalScale(a)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},r.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},r.type="graph",r}(ChartView);function generateNodeKey(n){return"_EC_"+n}var Graph=function(){function n(r){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=r||!1}return n.prototype.isDirected=function(){return this._directed},n.prototype.addNode=function(r,a){r=r==null?""+a:""+r;var o=this._nodesMap;if(!o[generateNodeKey(r)]){var s=new GraphNode(r,a);return s.hostGraph=this,this.nodes.push(s),o[generateNodeKey(r)]=s,s}},n.prototype.getNodeByIndex=function(r){var a=this.data.getRawIndex(r);return this.nodes[a]},n.prototype.getNodeById=function(r){return this._nodesMap[generateNodeKey(r)]},n.prototype.addEdge=function(r,a,o){var s=this._nodesMap,l=this._edgesMap;if(isNumber(r)&&(r=this.nodes[r]),isNumber(a)&&(a=this.nodes[a]),r instanceof GraphNode||(r=s[generateNodeKey(r)]),a instanceof GraphNode||(a=s[generateNodeKey(a)]),!(!r||!a)){var u=r.id+"-"+a.id,c=new GraphEdge(r,a,o);return c.hostGraph=this,this._directed&&(r.outEdges.push(c),a.inEdges.push(c)),r.edges.push(c),r!==a&&a.edges.push(c),this.edges.push(c),l[u]=c,c}},n.prototype.getEdgeByIndex=function(r){var a=this.edgeData.getRawIndex(r);return this.edges[a]},n.prototype.getEdge=function(r,a){r instanceof GraphNode&&(r=r.id),a instanceof GraphNode&&(a=a.id);var o=this._edgesMap;return this._directed?o[r+"-"+a]:o[r+"-"+a]||o[a+"-"+r]},n.prototype.eachNode=function(r,a){for(var o=this.nodes,s=o.length,l=0;l<s;l++)o[l].dataIndex>=0&&r.call(a,o[l],l)},n.prototype.eachEdge=function(r,a){for(var o=this.edges,s=o.length,l=0;l<s;l++)o[l].dataIndex>=0&&o[l].node1.dataIndex>=0&&o[l].node2.dataIndex>=0&&r.call(a,o[l],l)},n.prototype.breadthFirstTraverse=function(r,a,o,s){if(a instanceof GraphNode||(a=this._nodesMap[generateNodeKey(a)]),!!a){for(var l=o==="out"?"outEdges":o==="in"?"inEdges":"edges",u=0;u<this.nodes.length;u++)this.nodes[u].__visited=!1;if(!r.call(s,a,null))for(var c=[a];c.length;)for(var d=c.shift(),f=d[l],u=0;u<f.length;u++){var p=f[u],v=p.node1===d?p.node2:p.node1;if(!v.__visited){if(r.call(s,v,d))return;c.push(v),v.__visited=!0}}}},n.prototype.update=function(){for(var r=this.data,a=this.edgeData,o=this.nodes,s=this.edges,l=0,u=o.length;l<u;l++)o[l].dataIndex=-1;for(var l=0,u=r.count();l<u;l++)o[r.getRawIndex(l)].dataIndex=l;a.filterSelf(function(c){var d=s[a.getRawIndex(c)];return d.node1.dataIndex>=0&&d.node2.dataIndex>=0});for(var l=0,u=s.length;l<u;l++)s[l].dataIndex=-1;for(var l=0,u=a.count();l<u;l++)s[a.getRawIndex(l)].dataIndex=l},n.prototype.clone=function(){for(var r=new n(this._directed),a=this.nodes,o=this.edges,s=0;s<a.length;s++)r.addNode(a[s].id,a[s].dataIndex);for(var s=0;s<o.length;s++){var l=o[s];r.addEdge(l.node1.id,l.node2.id,l.dataIndex)}return r},n}(),GraphNode=function(){function n(r,a){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=r==null?"":r,this.dataIndex=a==null?-1:a}return n.prototype.degree=function(){return this.edges.length},n.prototype.inDegree=function(){return this.inEdges.length},n.prototype.outDegree=function(){return this.outEdges.length},n.prototype.getModel=function(r){if(!(this.dataIndex<0)){var a=this.hostGraph,o=a.data.getItemModel(this.dataIndex);return o.getModel(r)}},n.prototype.getAdjacentDataIndices=function(){for(var r={edge:[],node:[]},a=0;a<this.edges.length;a++){var o=this.edges[a];o.dataIndex<0||(r.edge.push(o.dataIndex),r.node.push(o.node1.dataIndex,o.node2.dataIndex))}return r},n.prototype.getTrajectoryDataIndices=function(){for(var r=createHashMap(),a=createHashMap(),o=0;o<this.edges.length;o++){var s=this.edges[o];if(!(s.dataIndex<0)){r.set(s.dataIndex,!0);for(var l=[s.node1],u=[s.node2],c=0;c<l.length;){var d=l[c];c++,a.set(d.dataIndex,!0);for(var f=0;f<d.inEdges.length;f++)r.set(d.inEdges[f].dataIndex,!0),l.push(d.inEdges[f].node1)}for(c=0;c<u.length;){var p=u[c];c++,a.set(p.dataIndex,!0);for(var f=0;f<p.outEdges.length;f++)r.set(p.outEdges[f].dataIndex,!0),u.push(p.outEdges[f].node2)}}}return{edge:r.keys(),node:a.keys()}},n}(),GraphEdge=function(){function n(r,a,o){this.dataIndex=-1,this.node1=r,this.node2=a,this.dataIndex=o==null?-1:o}return n.prototype.getModel=function(r){if(!(this.dataIndex<0)){var a=this.hostGraph,o=a.edgeData.getItemModel(this.dataIndex);return o.getModel(r)}},n.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},n.prototype.getTrajectoryDataIndices=function(){var r=createHashMap(),a=createHashMap();r.set(this.dataIndex,!0);for(var o=[this.node1],s=[this.node2],l=0;l<o.length;){var u=o[l];l++,a.set(u.dataIndex,!0);for(var c=0;c<u.inEdges.length;c++)r.set(u.inEdges[c].dataIndex,!0),o.push(u.inEdges[c].node1)}for(l=0;l<s.length;){var d=s[l];l++,a.set(d.dataIndex,!0);for(var c=0;c<d.outEdges.length;c++)r.set(d.outEdges[c].dataIndex,!0),s.push(d.outEdges[c].node2)}return{edge:r.keys(),node:a.keys()}},n}();function createGraphDataProxyMixin(n,r){return{getValue:function(a){var o=this[n][r];return o.getStore().get(o.getDimensionIndex(a||"value"),this.dataIndex)},setVisual:function(a,o){this.dataIndex>=0&&this[n][r].setItemVisual(this.dataIndex,a,o)},getVisual:function(a){return this[n][r].getItemVisual(this.dataIndex,a)},setLayout:function(a,o){this.dataIndex>=0&&this[n][r].setItemLayout(this.dataIndex,a,o)},getLayout:function(){return this[n][r].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[n][r].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[n][r].getRawIndex(this.dataIndex)}}}mixin(GraphNode,createGraphDataProxyMixin("hostGraph","data"));mixin(GraphEdge,createGraphDataProxyMixin("hostGraph","edgeData"));function createGraphFromNodeEdge(n,r,a,o,s){for(var l=new Graph(o),u=0;u<n.length;u++)l.addNode(retrieve(n[u].id,n[u].name,u),u);for(var c=[],d=[],f=0,u=0;u<r.length;u++){var p=r[u],v=p.source,g=p.target;l.addEdge(v,g,f)&&(d.push(p),c.push(retrieve(convertOptionIdName(p.id,null),v+" > "+g)),f++)}var y=a.get("coordinateSystem"),_;if(y==="cartesian2d"||y==="polar")_=createSeriesData(n,a);else{var S=CoordinateSystemManager.get(y),b=S?S.dimensions||[]:[];indexOf(b,"value")<0&&b.concat(["value"]);var x=prepareSeriesDataSchema(n,{coordDimensions:b,encodeDefine:a.getEncode()}).dimensions;_=new SeriesData(x,a),_.initData(n)}var A=new SeriesData(["value"],a);return A.initData(d,c),s&&s(_,A),linkSeriesData({mainData:_,struct:l,structAttr:"graph",datas:{node:_,edge:A},datasAttr:{node:"data",edge:"edgeData"}}),l.update(),l}var GraphSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.hasSymbolVisual=!0,a}return r.prototype.init=function(a){n.prototype.init.apply(this,arguments);var o=this;function s(){return o._categoriesData}this.legendVisualProvider=new LegendVisualProvider(s,s),this.fillDataTextStyle(a.edges||a.links),this._updateCategoriesData()},r.prototype.mergeOption=function(a){n.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(a.edges||a.links),this._updateCategoriesData()},r.prototype.mergeDefaultAndTheme=function(a){n.prototype.mergeDefaultAndTheme.apply(this,arguments),defaultEmphasis(a,"edgeLabel",["show"])},r.prototype.getInitialData=function(a,o){var s=a.edges||a.links||[],l=a.data||a.nodes||[],u=this;if(l&&s){initCurvenessList(this);var c=createGraphFromNodeEdge(l,s,this,!0,d);return each$f(c.edges,function(f){createEdgeMapForCurveness(f.node1,f.node2,this,f.dataIndex)},this),c.data}function d(f,p){f.wrapMethod("getItemModel",function(_){var S=u._categoriesModels,b=_.getShallow("category"),x=S[b];return x&&(x.parentModel=_.parentModel,_.parentModel=x),_});var v=Model.prototype.getModel;function g(_,S){var b=v.call(this,_,S);return b.resolveParentPath=y,b}p.wrapMethod("getItemModel",function(_){return _.resolveParentPath=y,_.getModel=g,_});function y(_){if(_&&(_[0]==="label"||_[1]==="label")){var S=_.slice();return _[0]==="label"?S[0]="edgeLabel":_[1]==="label"&&(S[1]="edgeLabel"),S}return _}}},r.prototype.getGraph=function(){return this.getData().graph},r.prototype.getEdgeData=function(){return this.getGraph().edgeData},r.prototype.getCategoriesData=function(){return this._categoriesData},r.prototype.formatTooltip=function(a,o,s){if(s==="edge"){var l=this.getData(),u=this.getDataParams(a,s),c=l.graph.getEdgeByIndex(a),d=l.getName(c.node1.dataIndex),f=l.getName(c.node2.dataIndex),p=[];return d!=null&&p.push(d),f!=null&&p.push(f),createTooltipMarkup("nameValue",{name:p.join(" > "),value:u.value,noValue:u.value==null})}var v=defaultSeriesFormatTooltip({series:this,dataIndex:a,multipleSeries:o});return v},r.prototype._updateCategoriesData=function(){var a=map$1(this.option.categories||[],function(s){return s.value!=null?s:extend$2({value:0},s)}),o=new SeriesData(["value"],this);o.initData(a),this._categoriesData=o,this._categoriesModels=o.mapArray(function(s){return o.getItemModel(s)})},r.prototype.setZoom=function(a){this.option.zoom=a},r.prototype.setCenter=function(a){this.option.center=a},r.prototype.isAnimationEnabled=function(){return n.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},r.type="series.graph",r.dependencies=["grid","polar","geo","singleAxis","calendar"],r.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:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},r}(SeriesModel),actionInfo$1={type:"graphRoam",event:"graphRoam",update:"none"};function install$H(n){n.registerChartView(GraphView),n.registerSeriesModel(GraphSeriesModel),n.registerProcessor(categoryFilter),n.registerVisual(categoryVisual),n.registerVisual(graphEdgeVisual),n.registerLayout(graphSimpleLayout),n.registerLayout(n.PRIORITY.VISUAL.POST_CHART_LAYOUT,graphCircularLayout),n.registerLayout(graphForceLayout),n.registerCoordinateSystem("graphView",{dimensions:View.dimensions,create:createViewCoordSys}),n.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},noop),n.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},noop),n.registerAction(actionInfo$1,function(r,a,o){a.eachComponent({mainType:"series",query:r},function(s){var l=s.coordinateSystem,u=updateCenterAndZoom(l,r,void 0,o);s.setCenter&&s.setCenter(u.center),s.setZoom&&s.setZoom(u.zoom)})})}var PointerShape=function(){function n(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return n}(),PointerPath=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="pointer",o}return r.prototype.getDefaultShape=function(){return new PointerShape},r.prototype.buildPath=function(a,o){var s=Math.cos,l=Math.sin,u=o.r,c=o.width,d=o.angle,f=o.x-s(d)*c*(c>=u/3?1:2),p=o.y-l(d)*c*(c>=u/3?1:2);d=o.angle-Math.PI/2,a.moveTo(f,p),a.lineTo(o.x+s(d)*c,o.y+l(d)*c),a.lineTo(o.x+s(o.angle)*u,o.y+l(o.angle)*u),a.lineTo(o.x-s(d)*c,o.y-l(d)*c),a.lineTo(f,p)},r}(Path);function parsePosition(n,r){var a=n.get("center"),o=r.getWidth(),s=r.getHeight(),l=Math.min(o,s),u=parsePercent(a[0],r.getWidth()),c=parsePercent(a[1],r.getHeight()),d=parsePercent(n.get("radius"),l/2);return{cx:u,cy:c,r:d}}function formatLabel(n,r){var a=n==null?"":n+"";return r&&(isString(r)?a=r.replace("{value}",a):isFunction(r)&&(a=r(n))),a}var GaugeView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){this.group.removeAll();var l=a.get(["axisLine","lineStyle","color"]),u=parsePosition(a,s);this._renderMain(a,o,s,l,u),this._data=a.getData()},r.prototype.dispose=function(){},r.prototype._renderMain=function(a,o,s,l,u){var c=this.group,d=a.get("clockwise"),f=-a.get("startAngle")/180*Math.PI,p=-a.get("endAngle")/180*Math.PI,v=a.getModel("axisLine"),g=v.get("roundCap"),y=g?SausagePath:Sector,_=v.get("show"),S=v.getModel("lineStyle"),b=S.get("width"),x=[f,p];normalizeArcAngles(x,!d),f=x[0],p=x[1];for(var A=p-f,w=f,E=[],D=0;_&&D<l.length;D++){var C=Math.min(Math.max(l[D][0],0),1);p=f+A*C;var $=new y({shape:{startAngle:w,endAngle:p,cx:u.cx,cy:u.cy,clockwise:d,r0:u.r-b,r:u.r},silent:!0});$.setStyle({fill:l[D][1]}),$.setStyle(S.getLineStyle(["color","width"])),E.push($),w=p}E.reverse(),each$f(E,function(M){return c.add(M)});var P=function(M){if(M<=0)return l[0][1];var I;for(I=0;I<l.length;I++)if(l[I][0]>=M&&(I===0?0:l[I-1][0])<M)return l[I][1];return l[I-1][1]};this._renderTicks(a,o,s,P,u,f,p,d,b),this._renderTitleAndDetail(a,o,s,P,u),this._renderAnchor(a,u),this._renderPointer(a,o,s,P,u,f,p,d,b)},r.prototype._renderTicks=function(a,o,s,l,u,c,d,f,p){for(var v=this.group,g=u.cx,y=u.cy,_=u.r,S=+a.get("min"),b=+a.get("max"),x=a.getModel("splitLine"),A=a.getModel("axisTick"),w=a.getModel("axisLabel"),E=a.get("splitNumber"),D=A.get("splitNumber"),C=parsePercent(x.get("length"),_),$=parsePercent(A.get("length"),_),P=c,M=(d-c)/E,I=M/D,L=x.getModel("lineStyle").getLineStyle(),O=A.getModel("lineStyle").getLineStyle(),R=x.get("distance"),N,V,F=0;F<=E;F++){if(N=Math.cos(P),V=Math.sin(P),x.get("show")){var U=R?R+p:p,H=new Line$1({shape:{x1:N*(_-U)+g,y1:V*(_-U)+y,x2:N*(_-C-U)+g,y2:V*(_-C-U)+y},style:L,silent:!0});L.stroke==="auto"&&H.setStyle({stroke:l(F/E)}),v.add(H)}if(w.get("show")){var U=w.get("distance")+R,W=formatLabel(round$3(F/E*(b-S)+S),w.get("formatter")),G=l(F/E),B=N*(_-C-U)+g,Y=V*(_-C-U)+y,Z=w.get("rotate"),K=0;Z==="radial"?(K=-P+2*Math.PI,K>Math.PI/2&&(K+=Math.PI)):Z==="tangential"?K=-P-Math.PI/2:isNumber(Z)&&(K=Z*Math.PI/180),K===0?v.add(new ZRText({style:createTextStyle$1(w,{text:W,x:B,y:Y,verticalAlign:V<-.8?"top":V>.8?"bottom":"middle",align:N<-.4?"left":N>.4?"right":"center"},{inheritColor:G}),silent:!0})):v.add(new ZRText({style:createTextStyle$1(w,{text:W,x:B,y:Y,verticalAlign:"middle",align:"center"},{inheritColor:G}),silent:!0,originX:B,originY:Y,rotation:K}))}if(A.get("show")&&F!==E){var U=A.get("distance");U=U?U+p:p;for(var ee=0;ee<=D;ee++){N=Math.cos(P),V=Math.sin(P);var j=new Line$1({shape:{x1:N*(_-U)+g,y1:V*(_-U)+y,x2:N*(_-$-U)+g,y2:V*(_-$-U)+y},silent:!0,style:O});O.stroke==="auto"&&j.setStyle({stroke:l((F+ee/D)/E)}),v.add(j),P+=I}P-=I}else P+=M}},r.prototype._renderPointer=function(a,o,s,l,u,c,d,f,p){var v=this.group,g=this._data,y=this._progressEls,_=[],S=a.get(["pointer","show"]),b=a.getModel("progress"),x=b.get("show"),A=a.getData(),w=A.mapDimension("value"),E=+a.get("min"),D=+a.get("max"),C=[E,D],$=[c,d];function P(I,L){var O=A.getItemModel(I),R=O.getModel("pointer"),N=parsePercent(R.get("width"),u.r),V=parsePercent(R.get("length"),u.r),F=a.get(["pointer","icon"]),U=R.get("offsetCenter"),H=parsePercent(U[0],u.r),W=parsePercent(U[1],u.r),G=R.get("keepAspect"),B;return F?B=createSymbol$1(F,H-N/2,W-V,N,V,null,G):B=new PointerPath({shape:{angle:-Math.PI/2,width:N,r:V,x:H,y:W}}),B.rotation=-(L+Math.PI/2),B.x=u.cx,B.y=u.cy,B}function M(I,L){var O=b.get("roundCap"),R=O?SausagePath:Sector,N=b.get("overlap"),V=N?b.get("width"):p/A.count(),F=N?u.r-V:u.r-(I+1)*V,U=N?u.r:u.r-I*V,H=new R({shape:{startAngle:c,endAngle:L,cx:u.cx,cy:u.cy,clockwise:f,r0:F,r:U}});return N&&(H.z2=linearMap$2(A.get(w,I),[E,D],[100,0],!0)),H}(x||S)&&(A.diff(g).add(function(I){var L=A.get(w,I);if(S){var O=P(I,c);initProps(O,{rotation:-((isNaN(+L)?$[0]:linearMap$2(L,C,$,!0))+Math.PI/2)},a),v.add(O),A.setItemGraphicEl(I,O)}if(x){var R=M(I,c),N=b.get("clip");initProps(R,{shape:{endAngle:linearMap$2(L,C,$,N)}},a),v.add(R),setCommonECData(a.seriesIndex,A.dataType,I,R),_[I]=R}}).update(function(I,L){var O=A.get(w,I);if(S){var R=g.getItemGraphicEl(L),N=R?R.rotation:c,V=P(I,N);V.rotation=N,updateProps$1(V,{rotation:-((isNaN(+O)?$[0]:linearMap$2(O,C,$,!0))+Math.PI/2)},a),v.add(V),A.setItemGraphicEl(I,V)}if(x){var F=y[L],U=F?F.shape.endAngle:c,H=M(I,U),W=b.get("clip");updateProps$1(H,{shape:{endAngle:linearMap$2(O,C,$,W)}},a),v.add(H),setCommonECData(a.seriesIndex,A.dataType,I,H),_[I]=H}}).execute(),A.each(function(I){var L=A.getItemModel(I),O=L.getModel("emphasis"),R=O.get("focus"),N=O.get("blurScope"),V=O.get("disabled");if(S){var F=A.getItemGraphicEl(I),U=A.getItemVisual(I,"style"),H=U.fill;if(F instanceof ZRImage){var W=F.style;F.useStyle(extend$2({image:W.image,x:W.x,y:W.y,width:W.width,height:W.height},U))}else F.useStyle(U),F.type!=="pointer"&&F.setColor(H);F.setStyle(L.getModel(["pointer","itemStyle"]).getItemStyle()),F.style.fill==="auto"&&F.setStyle("fill",l(linearMap$2(A.get(w,I),C,[0,1],!0))),F.z2EmphasisLift=0,setStatesStylesFromModel(F,L),toggleHoverEmphasis(F,R,N,V)}if(x){var G=_[I];G.useStyle(A.getItemVisual(I,"style")),G.setStyle(L.getModel(["progress","itemStyle"]).getItemStyle()),G.z2EmphasisLift=0,setStatesStylesFromModel(G,L),toggleHoverEmphasis(G,R,N,V)}}),this._progressEls=_)},r.prototype._renderAnchor=function(a,o){var s=a.getModel("anchor"),l=s.get("show");if(l){var u=s.get("size"),c=s.get("icon"),d=s.get("offsetCenter"),f=s.get("keepAspect"),p=createSymbol$1(c,o.cx-u/2+parsePercent(d[0],o.r),o.cy-u/2+parsePercent(d[1],o.r),u,u,null,f);p.z2=s.get("showAbove")?1:0,p.setStyle(s.getModel("itemStyle").getItemStyle()),this.group.add(p)}},r.prototype._renderTitleAndDetail=function(a,o,s,l,u){var c=this,d=a.getData(),f=d.mapDimension("value"),p=+a.get("min"),v=+a.get("max"),g=new Group$3,y=[],_=[],S=a.isAnimationEnabled(),b=a.get(["pointer","showAbove"]);d.diff(this._data).add(function(x){y[x]=new ZRText({silent:!0}),_[x]=new ZRText({silent:!0})}).update(function(x,A){y[x]=c._titleEls[A],_[x]=c._detailEls[A]}).execute(),d.each(function(x){var A=d.getItemModel(x),w=d.get(f,x),E=new Group$3,D=l(linearMap$2(w,[p,v],[0,1],!0)),C=A.getModel("title");if(C.get("show")){var $=C.get("offsetCenter"),P=u.cx+parsePercent($[0],u.r),M=u.cy+parsePercent($[1],u.r),I=y[x];I.attr({z2:b?0:2,style:createTextStyle$1(C,{x:P,y:M,text:d.getName(x),align:"center",verticalAlign:"middle"},{inheritColor:D})}),E.add(I)}var L=A.getModel("detail");if(L.get("show")){var O=L.get("offsetCenter"),R=u.cx+parsePercent(O[0],u.r),N=u.cy+parsePercent(O[1],u.r),V=parsePercent(L.get("width"),u.r),F=parsePercent(L.get("height"),u.r),U=a.get(["progress","show"])?d.getItemVisual(x,"style").fill:D,I=_[x],H=L.get("formatter");I.attr({z2:b?0:2,style:createTextStyle$1(L,{x:R,y:N,text:formatLabel(w,H),width:isNaN(V)?null:V,height:isNaN(F)?null:F,align:"center",verticalAlign:"middle"},{inheritColor:U})}),setLabelValueAnimation(I,{normal:L},w,function(G){return formatLabel(G,H)}),S&&animateLabelValue(I,x,d,a,{getFormattedLabel:function(G,B,Y,Z,K,ee){return formatLabel(ee?ee.interpolatedValue:w,H)}}),E.add(I)}g.add(E)}),this.group.add(g),this._titleEls=y,this._detailEls=_},r.type="gauge",r}(ChartView),GaugeSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.visualStyleAccessPath="itemStyle",a}return r.prototype.getInitialData=function(a,o){return createSeriesDataSimply(this,["value"])},r.type="series.gauge",r.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,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",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:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},r}(SeriesModel);function install$G(n){n.registerChartView(GaugeView),n.registerSeriesModel(GaugeSeriesModel)}var opacityAccessPath$1=["itemStyle","opacity"],FunnelPiece=function(n){__extends(r,n);function r(a,o){var s=n.call(this)||this,l=s,u=new Polyline$1,c=new ZRText;return l.setTextContent(c),s.setTextGuideLine(u),s.updateData(a,o,!0),s}return r.prototype.updateData=function(a,o,s){var l=this,u=a.hostModel,c=a.getItemModel(o),d=a.getItemLayout(o),f=c.getModel("emphasis"),p=c.get(opacityAccessPath$1);p=p==null?1:p,s||saveOldStyle(l),l.useStyle(a.getItemVisual(o,"style")),l.style.lineJoin="round",s?(l.setShape({points:d.points}),l.style.opacity=0,initProps(l,{style:{opacity:p}},u,o)):updateProps$1(l,{style:{opacity:p},shape:{points:d.points}},u,o),setStatesStylesFromModel(l,c),this._updateLabel(a,o),toggleHoverEmphasis(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},r.prototype._updateLabel=function(a,o){var s=this,l=this.getTextGuideLine(),u=s.getTextContent(),c=a.hostModel,d=a.getItemModel(o),f=a.getItemLayout(o),p=f.label,v=a.getItemVisual(o,"style"),g=v.fill;setLabelStyle(u,getLabelStatesModels(d),{labelFetcher:a.hostModel,labelDataIndex:o,defaultOpacity:v.opacity,defaultText:a.getName(o)},{normal:{align:p.textAlign,verticalAlign:p.verticalAlign}}),s.setTextConfig({local:!0,inside:!!p.inside,insideStroke:g,outsideFill:g});var y=p.linePoints;l.setShape({points:y}),s.textGuideLineConfig={anchor:y?new Point(y[0][0],y[0][1]):null},updateProps$1(u,{style:{x:p.x,y:p.y}},c,o),u.attr({rotation:p.rotation,originX:p.x,originY:p.y,z2:10}),setLabelLineStyle(s,getLabelLineStatesModels(d),{stroke:g})},r}(Polygon),FunnelView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.ignoreLabelLineUpdate=!0,a}return r.prototype.render=function(a,o,s){var l=a.getData(),u=this._data,c=this.group;l.diff(u).add(function(d){var f=new FunnelPiece(l,d);l.setItemGraphicEl(d,f),c.add(f)}).update(function(d,f){var p=u.getItemGraphicEl(f);p.updateData(l,d),c.add(p),l.setItemGraphicEl(d,p)}).remove(function(d){var f=u.getItemGraphicEl(d);removeElementWithFadeOut(f,a,d)}).execute(),this._data=l},r.prototype.remove=function(){this.group.removeAll(),this._data=null},r.prototype.dispose=function(){},r.type="funnel",r}(ChartView),FunnelSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(a){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this)),this._defaultLabelLine(a)},r.prototype.getInitialData=function(a,o){return createSeriesDataSimply(this,{coordDimensions:["value"],encodeDefaulter:curry$1(makeSeriesEncodeForNameBased,this)})},r.prototype._defaultLabelLine=function(a){defaultEmphasis(a,"labelLine",["show"]);var o=a.labelLine,s=a.emphasis.labelLine;o.show=o.show&&a.label.show,s.show=s.show&&a.emphasis.label.show},r.prototype.getDataParams=function(a){var o=this.getData(),s=n.prototype.getDataParams.call(this,a),l=o.mapDimension("value"),u=o.getSum(l);return s.percent=u?+(o.get(l,a)/u*100).toFixed(2):0,s.$vars.push("percent"),s},r.type="series.funnel",r.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,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:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},r}(SeriesModel);function getViewRect$2(n,r){return getLayoutRect(n.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})}function getSortedIndices(n,r){for(var a=n.mapDimension("value"),o=n.mapArray(a,function(d){return d}),s=[],l=r==="ascending",u=0,c=n.count();u<c;u++)s[u]=u;return isFunction(r)?s.sort(r):r!=="none"&&s.sort(function(d,f){return l?o[d]-o[f]:o[f]-o[d]}),s}function labelLayout(n){var r=n.hostModel,a=r.get("orient");n.each(function(o){var s=n.getItemModel(o),l=s.getModel("label"),u=l.get("position"),c=s.getModel("labelLine"),d=n.getItemLayout(o),f=d.points,p=u==="inner"||u==="inside"||u==="center"||u==="insideLeft"||u==="insideRight",v,g,y,_;if(p)u==="insideLeft"?(g=(f[0][0]+f[3][0])/2+5,y=(f[0][1]+f[3][1])/2,v="left"):u==="insideRight"?(g=(f[1][0]+f[2][0])/2-5,y=(f[1][1]+f[2][1])/2,v="right"):(g=(f[0][0]+f[1][0]+f[2][0]+f[3][0])/4,y=(f[0][1]+f[1][1]+f[2][1]+f[3][1])/4,v="center"),_=[[g,y],[g,y]];else{var S=void 0,b=void 0,x=void 0,A=void 0,w=c.get("length");u==="left"?(S=(f[3][0]+f[0][0])/2,b=(f[3][1]+f[0][1])/2,x=S-w,g=x-5,v="right"):u==="right"?(S=(f[1][0]+f[2][0])/2,b=(f[1][1]+f[2][1])/2,x=S+w,g=x+5,v="left"):u==="top"?(S=(f[3][0]+f[0][0])/2,b=(f[3][1]+f[0][1])/2,A=b-w,y=A-5,v="center"):u==="bottom"?(S=(f[1][0]+f[2][0])/2,b=(f[1][1]+f[2][1])/2,A=b+w,y=A+5,v="center"):u==="rightTop"?(S=a==="horizontal"?f[3][0]:f[1][0],b=a==="horizontal"?f[3][1]:f[1][1],a==="horizontal"?(A=b-w,y=A-5,v="center"):(x=S+w,g=x+5,v="top")):u==="rightBottom"?(S=f[2][0],b=f[2][1],a==="horizontal"?(A=b+w,y=A+5,v="center"):(x=S+w,g=x+5,v="bottom")):u==="leftTop"?(S=f[0][0],b=a==="horizontal"?f[0][1]:f[1][1],a==="horizontal"?(A=b-w,y=A-5,v="center"):(x=S-w,g=x-5,v="right")):u==="leftBottom"?(S=a==="horizontal"?f[1][0]:f[3][0],b=a==="horizontal"?f[1][1]:f[2][1],a==="horizontal"?(A=b+w,y=A+5,v="center"):(x=S-w,g=x-5,v="right")):(S=(f[1][0]+f[2][0])/2,b=(f[1][1]+f[2][1])/2,a==="horizontal"?(A=b+w,y=A+5,v="center"):(x=S+w,g=x+5,v="left")),a==="horizontal"?(x=S,g=x):(A=b,y=A),_=[[S,b],[x,A]]}d.label={linePoints:_,x:g,y,verticalAlign:"middle",textAlign:v,inside:p}})}function funnelLayout(n,r){n.eachSeriesByType("funnel",function(a){var o=a.getData(),s=o.mapDimension("value"),l=a.get("sort"),u=getViewRect$2(a,r),c=a.get("orient"),d=u.width,f=u.height,p=getSortedIndices(o,l),v=u.x,g=u.y,y=c==="horizontal"?[parsePercent(a.get("minSize"),f),parsePercent(a.get("maxSize"),f)]:[parsePercent(a.get("minSize"),d),parsePercent(a.get("maxSize"),d)],_=o.getDataExtent(s),S=a.get("min"),b=a.get("max");S==null&&(S=Math.min(_[0],0)),b==null&&(b=_[1]);var x=a.get("funnelAlign"),A=a.get("gap"),w=c==="horizontal"?d:f,E=(w-A*(o.count()-1))/o.count(),D=function(N,V){if(c==="horizontal"){var F=o.get(s,N)||0,U=linearMap$2(F,[S,b],y,!0),H=void 0;switch(x){case"top":H=g;break;case"center":H=g+(f-U)/2;break;case"bottom":H=g+(f-U);break}return[[V,H],[V,H+U]]}var W=o.get(s,N)||0,G=linearMap$2(W,[S,b],y,!0),B;switch(x){case"left":B=v;break;case"center":B=v+(d-G)/2;break;case"right":B=v+d-G;break}return[[B,V],[B+G,V]]};l==="ascending"&&(E=-E,A=-A,c==="horizontal"?v+=d:g+=f,p=p.reverse());for(var C=0;C<p.length;C++){var $=p[C],P=p[C+1],M=o.getItemModel($);if(c==="horizontal"){var I=M.get(["itemStyle","width"]);I==null?I=E:(I=parsePercent(I,d),l==="ascending"&&(I=-I));var L=D($,v),O=D(P,v+I);v+=I+A,o.setItemLayout($,{points:L.concat(O.slice().reverse())})}else{var R=M.get(["itemStyle","height"]);R==null?R=E:(R=parsePercent(R,f),l==="ascending"&&(R=-R));var L=D($,g),O=D(P,g+R);g+=R+A,o.setItemLayout($,{points:L.concat(O.slice().reverse())})}}labelLayout(o)})}function install$F(n){n.registerChartView(FunnelView),n.registerSeriesModel(FunnelSeriesModel),n.registerLayout(funnelLayout),n.registerProcessor(dataFilter$1("funnel"))}var DEFAULT_SMOOTH=.3,ParallelView$1=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a._dataGroup=new Group$3,a._initialized=!1,a}return r.prototype.init=function(){this.group.add(this._dataGroup)},r.prototype.render=function(a,o,s,l){this._progressiveEls=null;var u=this._dataGroup,c=a.getData(),d=this._data,f=a.coordinateSystem,p=f.dimensions,v=makeSeriesScope(a);c.diff(d).add(g).update(y).remove(_).execute();function g(b){var x=addEl(c,u,b,p,f);updateElCommon(x,c,b,v)}function y(b,x){var A=d.getItemGraphicEl(x),w=createLinePoints(c,b,p,f);c.setItemGraphicEl(b,A),updateProps$1(A,{shape:{points:w}},a,b),saveOldStyle(A),updateElCommon(A,c,b,v)}function _(b){var x=d.getItemGraphicEl(b);u.remove(x)}if(!this._initialized){this._initialized=!0;var S=createGridClipShape$2(f,a,function(){setTimeout(function(){u.removeClipPath()})});u.setClipPath(S)}this._data=c},r.prototype.incrementalPrepareRender=function(a,o,s){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},r.prototype.incrementalRender=function(a,o,s){for(var l=o.getData(),u=o.coordinateSystem,c=u.dimensions,d=makeSeriesScope(o),f=this._progressiveEls=[],p=a.start;p<a.end;p++){var v=addEl(l,this._dataGroup,p,c,u);v.incremental=!0,updateElCommon(v,l,p,d),f.push(v)}},r.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},r.type="parallel",r}(ChartView);function createGridClipShape$2(n,r,a){var o=n.model,s=n.getRect(),l=new Rect$2({shape:{x:s.x,y:s.y,width:s.width,height:s.height}}),u=o.get("layout")==="horizontal"?"width":"height";return l.setShape(u,0),initProps(l,{shape:{width:s.width,height:s.height}},r,a),l}function createLinePoints(n,r,a,o){for(var s=[],l=0;l<a.length;l++){var u=a[l],c=n.get(n.mapDimension(u),r);isEmptyValue(c,o.getAxis(u).type)||s.push(o.dataToPoint(c,u))}return s}function addEl(n,r,a,o,s){var l=createLinePoints(n,a,o,s),u=new Polyline$1({shape:{points:l},z2:10});return r.add(u),n.setItemGraphicEl(a,u),u}function makeSeriesScope(n){var r=n.get("smooth",!0);return r===!0&&(r=DEFAULT_SMOOTH),r=numericToNumber(r),eqNaN(r)&&(r=0),{smooth:r}}function updateElCommon(n,r,a,o){n.useStyle(r.getItemVisual(a,"style")),n.style.fill=null,n.setShape("smooth",o.smooth);var s=r.getItemModel(a),l=s.getModel("emphasis");setStatesStylesFromModel(n,s,"lineStyle"),toggleHoverEmphasis(n,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function isEmptyValue(n,r){return r==="category"?n==null:n==null||isNaN(n)}var ParallelSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.visualStyleAccessPath="lineStyle",a.visualDrawType="stroke",a}return r.prototype.getInitialData=function(a,o){return createSeriesData(null,this,{useEncodeDefaulter:bind$1(makeDefaultEncode,null,this)})},r.prototype.getRawIndicesByActiveState=function(a){var o=this.coordinateSystem,s=this.getData(),l=[];return o.eachActiveState(s,function(u,c){a===u&&l.push(s.getRawIndex(c))}),l},r.type="series.parallel",r.dependencies=["parallel"],r.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"},r}(SeriesModel);function makeDefaultEncode(n){var r=n.ecModel.getComponent("parallel",n.get("parallelIndex"));if(r){var a={};return each$f(r.dimensions,function(o){var s=convertDimNameToNumber(o);a[o]=s}),a}}function convertDimNameToNumber(n){return+n.replace("dim","")}var opacityAccessPath=["lineStyle","opacity"],parallelVisual={seriesType:"parallel",reset:function(n,r){var a=n.coordinateSystem,o={normal:n.get(["lineStyle","opacity"]),active:n.get("activeOpacity"),inactive:n.get("inactiveOpacity")};return{progress:function(s,l){a.eachActiveState(l,function(u,c){var d=o[u];if(u==="normal"&&l.hasItemOption){var f=l.getItemModel(c).get(opacityAccessPath,!0);f!=null&&(d=f)}var p=l.ensureUniqueItemVisual(c,"style");p.opacity=d},s.start,s.end)}}}};function parallelPreprocessor(n){createParallelIfNeeded(n),mergeAxisOptionFromParallel(n)}function createParallelIfNeeded(n){if(!n.parallel){var r=!1;each$f(n.series,function(a){a&&a.type==="parallel"&&(r=!0)}),r&&(n.parallel=[{}])}}function mergeAxisOptionFromParallel(n){var r=normalizeToArray(n.parallelAxis);each$f(r,function(a){if(isObject$3(a)){var o=a.parallelIndex||0,s=normalizeToArray(n.parallel)[o];s&&s.parallelAxisDefault&&merge(a,s.parallelAxisDefault,!1)}})}var CLICK_THRESHOLD=5,ParallelView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){this._model=a,this._api=s,this._handlers||(this._handlers={},each$f(handlers$1,function(l,u){s.getZr().on(u,this._handlers[u]=bind$1(l,this))},this)),createOrUpdate(this,"_throttledDispatchExpand",a.get("axisExpandRate"),"fixRate")},r.prototype.dispose=function(a,o){clear$1(this,"_throttledDispatchExpand"),each$f(this._handlers,function(s,l){o.getZr().off(l,s)}),this._handlers=null},r.prototype._throttledDispatchExpand=function(a){this._dispatchExpand(a)},r.prototype._dispatchExpand=function(a){a&&this._api.dispatchAction(extend$2({type:"parallelAxisExpand"},a))},r.type="parallel",r}(ComponentView),handlers$1={mousedown:function(n){checkTrigger(this,"click")&&(this._mouseDownPoint=[n.offsetX,n.offsetY])},mouseup:function(n){var r=this._mouseDownPoint;if(checkTrigger(this,"click")&&r){var a=[n.offsetX,n.offsetY],o=Math.pow(r[0]-a[0],2)+Math.pow(r[1]-a[1],2);if(o>CLICK_THRESHOLD)return;var s=this._model.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]);s.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:s.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(n){if(!(this._mouseDownPoint||!checkTrigger(this,"mousemove"))){var r=this._model,a=r.coordinateSystem.getSlidedAxisExpandWindow([n.offsetX,n.offsetY]),o=a.behavior;o==="jump"&&this._throttledDispatchExpand.debounceNextCall(r.get("axisExpandDebounce")),this._throttledDispatchExpand(o==="none"?null:{axisExpandWindow:a.axisExpandWindow,animation:o==="jump"?null:{duration:0}})}}};function checkTrigger(n,r){var a=n._model;return a.get("axisExpandable")&&a.get("axisExpandTriggerOn")===r}var ParallelModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(){n.prototype.init.apply(this,arguments),this.mergeOption({})},r.prototype.mergeOption=function(a){var o=this.option;a&&merge(o,a,!0),this._initDimensions()},r.prototype.contains=function(a,o){var s=a.get("parallelIndex");return s!=null&&o.getComponent("parallel",s)===this},r.prototype.setAxisExpand=function(a){each$f(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(o){a.hasOwnProperty(o)&&(this.option[o]=a[o])},this)},r.prototype._initDimensions=function(){var a=this.dimensions=[],o=this.parallelAxisIndex=[],s=filter(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(l){return(l.get("parallelIndex")||0)===this.componentIndex},this);each$f(s,function(l){a.push("dim"+l.get("dim")),o.push(l.componentIndex)})},r.type="parallel",r.dependencies=["parallelAxis"],r.layoutMode="box",r.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},r}(ComponentModel),ParallelAxis=function(n){__extends(r,n);function r(a,o,s,l,u){var c=n.call(this,a,o,s)||this;return c.type=l||"value",c.axisIndex=u,c}return r.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},r}(Axis);function sliderMove(n,r,a,o,s,l){n=n||0;var u=a[1]-a[0];if(s!=null&&(s=restrict$1(s,[0,u])),l!=null&&(l=Math.max(l,s!=null?s:0)),o==="all"){var c=Math.abs(r[1]-r[0]);c=restrict$1(c,[0,u]),s=l=restrict$1(c,[s,l]),o=0}r[0]=restrict$1(r[0],a),r[1]=restrict$1(r[1],a);var d=getSpanSign(r,o);r[o]+=n;var f=s||0,p=a.slice();d.sign<0?p[0]+=f:p[1]-=f,r[o]=restrict$1(r[o],p);var v;return v=getSpanSign(r,o),s!=null&&(v.sign!==d.sign||v.span<s)&&(r[1-o]=r[o]+d.sign*s),v=getSpanSign(r,o),l!=null&&v.span>l&&(r[1-o]=r[o]+v.sign*l),r}function getSpanSign(n,r){var a=n[r]-n[1-r];return{span:Math.abs(a),sign:a>0?-1:a<0?1:r?-1:1}}function restrict$1(n,r){return Math.min(r[1]!=null?r[1]:1/0,Math.max(r[0]!=null?r[0]:-1/0,n))}var each$a=each$f,mathMin$2=Math.min,mathMax$2=Math.max,mathFloor=Math.floor,mathCeil=Math.ceil,round$1=round$3,PI$2=Math.PI,Parallel=function(){function n(r,a,o){this.type="parallel",this._axesMap=createHashMap(),this._axesLayout={},this.dimensions=r.dimensions,this._model=r,this._init(r,a,o)}return n.prototype._init=function(r,a,o){var s=r.dimensions,l=r.parallelAxisIndex;each$a(s,function(u,c){var d=l[c],f=a.getComponent("parallelAxis",d),p=this._axesMap.set(u,new ParallelAxis(u,createScaleByModel$1(f),[0,0],f.get("type"),d)),v=p.type==="category";p.onBand=v&&f.get("boundaryGap"),p.inverse=f.get("inverse"),f.axis=p,p.model=f,p.coordinateSystem=f.coordinateSystem=this},this)},n.prototype.update=function(r,a){this._updateAxesFromSeries(this._model,r)},n.prototype.containPoint=function(r){var a=this._makeLayoutInfo(),o=a.axisBase,s=a.layoutBase,l=a.pixelDimIndex,u=r[1-l],c=r[l];return u>=o&&u<=o+a.axisLength&&c>=s&&c<=s+a.layoutLength},n.prototype.getModel=function(){return this._model},n.prototype._updateAxesFromSeries=function(r,a){a.eachSeries(function(o){if(r.contains(o,a)){var s=o.getData();each$a(this.dimensions,function(l){var u=this._axesMap.get(l);u.scale.unionExtentFromData(s,s.mapDimension(l)),niceScaleExtent(u.scale,u.model)},this)}},this)},n.prototype.resize=function(r,a){this._rect=getLayoutRect(r.getBoxLayoutParams(),{width:a.getWidth(),height:a.getHeight()}),this._layoutAxes()},n.prototype.getRect=function(){return this._rect},n.prototype._makeLayoutInfo=function(){var r=this._model,a=this._rect,o=["x","y"],s=["width","height"],l=r.get("layout"),u=l==="horizontal"?0:1,c=a[s[u]],d=[0,c],f=this.dimensions.length,p=restrict(r.get("axisExpandWidth"),d),v=restrict(r.get("axisExpandCount")||0,[0,f]),g=r.get("axisExpandable")&&f>3&&f>v&&v>1&&p>0&&c>0,y=r.get("axisExpandWindow"),_;if(y)_=restrict(y[1]-y[0],d),y[1]=y[0]+_;else{_=restrict(p*(v-1),d);var S=r.get("axisExpandCenter")||mathFloor(f/2);y=[p*S-_/2],y[1]=y[0]+_}var b=(c-_)/(f-v);b<3&&(b=0);var x=[mathFloor(round$1(y[0]/p,1))+1,mathCeil(round$1(y[1]/p,1))-1],A=b/p*y[0];return{layout:l,pixelDimIndex:u,layoutBase:a[o[u]],layoutLength:c,axisBase:a[o[1-u]],axisLength:a[s[1-u]],axisExpandable:g,axisExpandWidth:p,axisCollapseWidth:b,axisExpandWindow:y,axisCount:f,winInnerIndices:x,axisExpandWindow0Pos:A}},n.prototype._layoutAxes=function(){var r=this._rect,a=this._axesMap,o=this.dimensions,s=this._makeLayoutInfo(),l=s.layout;a.each(function(u){var c=[0,s.axisLength],d=u.inverse?1:0;u.setExtent(c[d],c[1-d])}),each$a(o,function(u,c){var d=(s.axisExpandable?layoutAxisWithExpand:layoutAxisWithoutExpand)(c,s),f={horizontal:{x:d.position,y:s.axisLength},vertical:{x:0,y:d.position}},p={horizontal:PI$2/2,vertical:0},v=[f[l].x+r.x,f[l].y+r.y],g=p[l],y=create$1();rotate(y,y,g),translate(y,y,v),this._axesLayout[u]={position:v,rotation:g,transform:y,axisNameAvailableWidth:d.axisNameAvailableWidth,axisLabelShow:d.axisLabelShow,nameTruncateMaxWidth:d.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},n.prototype.getAxis=function(r){return this._axesMap.get(r)},n.prototype.dataToPoint=function(r,a){return this.axisCoordToPoint(this._axesMap.get(a).dataToCoord(r),a)},n.prototype.eachActiveState=function(r,a,o,s){o==null&&(o=0),s==null&&(s=r.count());var l=this._axesMap,u=this.dimensions,c=[],d=[];each$f(u,function(b){c.push(r.mapDimension(b)),d.push(l.get(b).model)});for(var f=this.hasAxisBrushed(),p=o;p<s;p++){var v=void 0;if(!f)v="normal";else{v="active";for(var g=r.getValues(c,p),y=0,_=u.length;y<_;y++){var S=d[y].getActiveState(g[y]);if(S==="inactive"){v="inactive";break}}}a(v,p)}},n.prototype.hasAxisBrushed=function(){for(var r=this.dimensions,a=this._axesMap,o=!1,s=0,l=r.length;s<l;s++)a.get(r[s]).model.getActiveState()!=="normal"&&(o=!0);return o},n.prototype.axisCoordToPoint=function(r,a){var o=this._axesLayout[a];return applyTransform([r,0],o.transform)},n.prototype.getAxisLayout=function(r){return clone$6(this._axesLayout[r])},n.prototype.getSlidedAxisExpandWindow=function(r){var a=this._makeLayoutInfo(),o=a.pixelDimIndex,s=a.axisExpandWindow.slice(),l=s[1]-s[0],u=[0,a.axisExpandWidth*(a.axisCount-1)];if(!this.containPoint(r))return{behavior:"none",axisExpandWindow:s};var c=r[o]-a.layoutBase-a.axisExpandWindow0Pos,d,f="slide",p=a.axisCollapseWidth,v=this._model.get("axisExpandSlideTriggerArea"),g=v[0]!=null;if(p)g&&p&&c<l*v[0]?(f="jump",d=c-l*v[2]):g&&p&&c>l*(1-v[0])?(f="jump",d=c-l*(1-v[2])):(d=c-l*v[1])>=0&&(d=c-l*(1-v[1]))<=0&&(d=0),d*=a.axisExpandWidth/p,d?sliderMove(d,s,u,"all"):f="none";else{var y=s[1]-s[0],_=u[1]*c/y;s=[mathMax$2(0,_-y/2)],s[1]=mathMin$2(u[1],s[0]+y),s[0]=s[1]-y}return{axisExpandWindow:s,behavior:f}},n}();function restrict(n,r){return mathMin$2(mathMax$2(n,r[0]),r[1])}function layoutAxisWithoutExpand(n,r){var a=r.layoutLength/(r.axisCount-1);return{position:a*n,axisNameAvailableWidth:a,axisLabelShow:!0}}function layoutAxisWithExpand(n,r){var a=r.layoutLength,o=r.axisExpandWidth,s=r.axisCount,l=r.axisCollapseWidth,u=r.winInnerIndices,c,d=l,f=!1,p;return n<u[0]?(c=n*l,p=l):n<=u[1]?(c=r.axisExpandWindow0Pos+n*o-r.axisExpandWindow[0],d=o,f=!0):(c=a-(s-1-n)*l,p=l),{position:c,axisNameAvailableWidth:d,axisLabelShow:f,nameTruncateMaxWidth:p}}function createParallelCoordSys(n,r){var a=[];return n.eachComponent("parallel",function(o,s){var l=new Parallel(o,n,r);l.name="parallel_"+s,l.resize(o,r),o.coordinateSystem=l,l.model=o,a.push(l)}),n.eachSeries(function(o){if(o.get("coordinateSystem")==="parallel"){var s=o.getReferringComponents("parallel",SINGLE_REFERRING).models[0];o.coordinateSystem=s.coordinateSystem}}),a}var parallelCoordSysCreator={create:createParallelCoordSys},ParallelAxisModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.activeIntervals=[],a}return r.prototype.getAreaSelectStyle=function(){return makeStyleMapper([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},r.prototype.setActiveIntervals=function(a){var o=this.activeIntervals=clone$6(a);if(o)for(var s=o.length-1;s>=0;s--)asc$2(o[s])},r.prototype.getActiveState=function(a){var o=this.activeIntervals;if(!o.length)return"normal";if(a==null||isNaN(+a))return"inactive";if(o.length===1){var s=o[0];if(s[0]<=a&&a<=s[1])return"active"}else for(var l=0,u=o.length;l<u;l++)if(o[l][0]<=a&&a<=o[l][1])return"active";return"inactive"},r}(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:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},baseUID=0,BrushController=function(n){__extends(r,n);function r(a){var o=n.call(this)||this;return o._track=[],o._covers=[],o._handlers={},o._zr=a,o.group=new Group$3,o._uid="brushController_"+baseUID++,each$f(pointerHandlers,function(s,l){this._handlers[l]=bind$1(s,this)},o),o}return r.prototype.enableBrush=function(a){return this._brushType&&this._doDisableBrush(),a.brushType&&this._doEnableBrush(a),this},r.prototype._doEnableBrush=function(a){var o=this._zr;this._enableGlobalPan||take(o,MUTEX_RESOURCE_KEY,this._uid),each$f(this._handlers,function(s,l){o.on(l,s)}),this._brushType=a.brushType,this._brushOption=merge(clone$6(DEFAULT_BRUSH_OPT),a,!0)},r.prototype._doDisableBrush=function(){var a=this._zr;release(a,MUTEX_RESOURCE_KEY,this._uid),each$f(this._handlers,function(o,s){a.off(s,o)}),this._brushType=this._brushOption=null},r.prototype.setPanels=function(a){if(a&&a.length){var o=this._panels={};each$f(a,function(s){o[s.panelId]=clone$6(s)})}else this._panels=null;return this},r.prototype.mount=function(a){a=a||{},this._enableGlobalPan=a.enableGlobalPan;var o=this.group;return this._zr.add(o),o.attr({x:a.x||0,y:a.y||0,rotation:a.rotation||0,scaleX:a.scaleX||1,scaleY:a.scaleY||1}),this._transform=o.getLocalTransform(),this},r.prototype.updateCovers=function(a){a=map$1(a,function(g){return merge(clone$6(DEFAULT_BRUSH_OPT),g,!0)});var o="\0-brush-index-",s=this._covers,l=this._covers=[],u=this,c=this._creatingCover;return new DataDiffer(s,a,f,d).add(p).update(p).remove(v).execute(),this;function d(g,y){return(g.id!=null?g.id:o+y)+"-"+g.brushType}function f(g,y){return d(g.__brushOption,y)}function p(g,y){var _=a[g];if(y!=null&&s[y]===c)l[g]=s[y];else{var S=l[g]=y!=null?(s[y].__brushOption=_,s[y]):endCreating(u,createCover(u,_));updateCoverAfterCreation(u,S)}}function v(g){s[g]!==c&&u.group.remove(s[g])}},r.prototype.unmount=function(){return this.enableBrush(!1),clearCovers(this),this._zr.remove(this.group),this},r.prototype.dispose=function(){this.unmount(),this.off()},r}(Eventful);function createCover(n,r){var a=coverRenderers[r.brushType].createCover(n,r);return a.__brushOption=r,updateZ$1(a,r),n.group.add(a),a}function endCreating(n,r){var a=getCoverRenderer(r);return a.endCreating&&(a.endCreating(n,r),updateZ$1(r,r.__brushOption)),r}function updateCoverShape(n,r){var a=r.__brushOption;getCoverRenderer(r).updateCoverShape(n,r,a.range,a)}function updateZ$1(n,r){var a=r.z;a==null&&(a=COVER_Z),n.traverse(function(o){o.z=a,o.z2=a})}function updateCoverAfterCreation(n,r){getCoverRenderer(r).updateCommon(n,r),updateCoverShape(n,r)}function getCoverRenderer(n){return coverRenderers[n.__brushOption.brushType]}function getPanelByPoint(n,r,a){var o=n._panels;if(!o)return BRUSH_PANEL_GLOBAL;var s,l=n._transform;return each$f(o,function(u){u.isTargetByCursor(r,a,l)&&(s=u)}),s}function getPanelByCover(n,r){var a=n._panels;if(!a)return BRUSH_PANEL_GLOBAL;var o=r.__brushOption.panelId;return o!=null?a[o]:BRUSH_PANEL_GLOBAL}function clearCovers(n){var r=n._covers,a=r.length;return each$f(r,function(o){n.group.remove(o)},n),r.length=0,!!a}function trigger(n,r){var a=map$1(n._covers,function(o){var s=o.__brushOption,l=clone$6(s.range);return{brushType:s.brushType,panelId:s.panelId,range:l}});n.trigger("brush",{areas:a,isEnd:!!r.isEnd,removeOnClick:!!r.removeOnClick})}function shouldShowCover(n){var r=n._track;if(!r.length)return!1;var a=r[r.length-1],o=r[0],s=a[0]-o[0],l=a[1]-o[1],u=mathPow(s*s+l*l,.5);return u>UNSELECT_THRESHOLD}function getTrackEnds(n){var r=n.length-1;return r<0&&(r=0),[n[0],n[r]]}function createBaseRectCover(n,r,a,o){var s=new Group$3;return s.add(new Rect$2({name:"main",style:makeStyle(a),silent:!0,draggable:!0,cursor:"move",drift:curry$1(driftRect,n,r,s,["n","s","w","e"]),ondragend:curry$1(trigger,r,{isEnd:!0})})),each$f(o,function(l){s.add(new Rect$2({name:l.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:curry$1(driftRect,n,r,s,l),ondragend:curry$1(trigger,r,{isEnd:!0})}))}),s}function updateBaseRect(n,r,a,o){var s=o.brushStyle.lineWidth||0,l=mathMax$1(s,MIN_RESIZE_LINE_WIDTH),u=a[0][0],c=a[1][0],d=u-s/2,f=c-s/2,p=a[0][1],v=a[1][1],g=p-l+s/2,y=v-l+s/2,_=p-u,S=v-c,b=_+s,x=S+s;updateRectShape(n,r,"main",u,c,_,S),o.transformable&&(updateRectShape(n,r,"w",d,f,l,x),updateRectShape(n,r,"e",g,f,l,x),updateRectShape(n,r,"n",d,f,b,l),updateRectShape(n,r,"s",d,y,b,l),updateRectShape(n,r,"nw",d,f,l,l),updateRectShape(n,r,"ne",g,f,l,l),updateRectShape(n,r,"sw",d,y,l,l),updateRectShape(n,r,"se",g,y,l,l))}function updateCommon$1(n,r){var a=r.__brushOption,o=a.transformable,s=r.childAt(0);s.useStyle(makeStyle(a)),s.attr({silent:!o,cursor:o?"move":"default"}),each$f([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(l){var u=r.childOfName(l.join("")),c=l.length===1?getGlobalDirection1(n,l[0]):getGlobalDirection2(n,l);u&&u.attr({silent:!o,invisible:!o,cursor:o?CURSOR_MAP[c]+"-resize":null})})}function updateRectShape(n,r,a,o,s,l,u){var c=r.childOfName(a);c&&c.setShape(pointsToRect(clipByPanel(n,r,[[o,s],[o+l,s+u]])))}function makeStyle(n){return defaults$2({strokeNoScale:!0},n.brushStyle)}function formatRectRange(n,r,a,o){var s=[mathMin$1(n,a),mathMin$1(r,o)],l=[mathMax$1(n,a),mathMax$1(r,o)];return[[s[0],l[0]],[s[1],l[1]]]}function getTransform(n){return getTransform$1(n.group)}function getGlobalDirection1(n,r){var a={w:"left",e:"right",n:"top",s:"bottom"},o={left:"w",right:"e",top:"n",bottom:"s"},s=transformDirection(a[r],getTransform(n));return o[s]}function getGlobalDirection2(n,r){var a=[getGlobalDirection1(n,r[0]),getGlobalDirection1(n,r[1])];return(a[0]==="e"||a[0]==="w")&&a.reverse(),a.join("")}function driftRect(n,r,a,o,s,l){var u=a.__brushOption,c=n.toRectRange(u.range),d=toLocalDelta(r,s,l);each$f(o,function(f){var p=DIRECTION_MAP[f];c[p[0]][p[1]]+=d[p[0]]}),u.range=n.fromRectRange(formatRectRange(c[0][0],c[1][0],c[0][1],c[1][1])),updateCoverAfterCreation(r,a),trigger(r,{isEnd:!1})}function driftPolygon(n,r,a,o){var s=r.__brushOption.range,l=toLocalDelta(n,a,o);each$f(s,function(u){u[0]+=l[0],u[1]+=l[1]}),updateCoverAfterCreation(n,r),trigger(n,{isEnd:!1})}function toLocalDelta(n,r,a){var o=n.group,s=o.transformCoordToLocal(r,a),l=o.transformCoordToLocal(0,0);return[s[0]-l[0],s[1]-l[1]]}function clipByPanel(n,r,a){var o=getPanelByCover(n,r);return o&&o!==BRUSH_PANEL_GLOBAL?o.clipPath(a,n._transform):clone$6(a)}function pointsToRect(n){var r=mathMin$1(n[0][0],n[1][0]),a=mathMin$1(n[0][1],n[1][1]),o=mathMax$1(n[0][0],n[1][0]),s=mathMax$1(n[0][1],n[1][1]);return{x:r,y:a,width:o-r,height:s-a}}function resetCursor(n,r,a){if(!(!n._brushType||isOutsideZrArea(n,r.offsetX,r.offsetY))){var o=n._zr,s=n._covers,l=getPanelByPoint(n,r,a);if(!n._dragging)for(var u=0;u<s.length;u++){var c=s[u].__brushOption;if(l&&(l===BRUSH_PANEL_GLOBAL||c.panelId===l.panelId)&&coverRenderers[c.brushType].contain(s[u],a[0],a[1]))return}l&&o.setCursorStyle("crosshair")}}function preventDefault(n){var r=n.event;r.preventDefault&&r.preventDefault()}function mainShapeContain(n,r,a){return n.childOfName("main").contain(r,a)}function updateCoverByMouse(n,r,a,o){var s=n._creatingCover,l=n._creatingPanel,u=n._brushOption,c;if(n._track.push(a.slice()),shouldShowCover(n)||s){if(l&&!s){u.brushMode==="single"&&clearCovers(n);var d=clone$6(u);d.brushType=determineBrushType(d.brushType,l),d.panelId=l===BRUSH_PANEL_GLOBAL?null:l.panelId,s=n._creatingCover=createCover(n,d),n._covers.push(s)}if(s){var f=coverRenderers[determineBrushType(n._brushType,l)],p=s.__brushOption;p.range=f.getCreatingRange(clipByPanel(n,s,n._track)),o&&(endCreating(n,s),f.updateCommon(n,s)),updateCoverShape(n,s),c={isEnd:o}}}else o&&u.brushMode==="single"&&u.removeOnClick&&getPanelByPoint(n,r,a)&&clearCovers(n)&&(c={isEnd:o,removeOnClick:!0});return c}function determineBrushType(n,r){return n==="auto"?r.defaultBrushType:n}var pointerHandlers={mousedown:function(n){if(this._dragging)handleDragEnd(this,n);else if(!n.target||!n.target.draggable){preventDefault(n);var r=this.group.transformCoordToLocal(n.offsetX,n.offsetY);this._creatingCover=null;var a=this._creatingPanel=getPanelByPoint(this,n,r);a&&(this._dragging=!0,this._track=[r.slice()])}},mousemove:function(n){var r=n.offsetX,a=n.offsetY,o=this.group.transformCoordToLocal(r,a);if(resetCursor(this,n,o),this._dragging){preventDefault(n);var s=updateCoverByMouse(this,n,o,!1);s&&trigger(this,s)}},mouseup:function(n){handleDragEnd(this,n)}};function handleDragEnd(n,r){if(n._dragging){preventDefault(r);var a=r.offsetX,o=r.offsetY,s=n.group.transformCoordToLocal(a,o),l=updateCoverByMouse(n,r,s,!0);n._dragging=!1,n._track=[],n._creatingCover=null,l&&trigger(n,l)}}function isOutsideZrArea(n,r,a){var o=n._zr;return r<0||r>o.getWidth()||a<0||a>o.getHeight()}var coverRenderers={lineX:getLineRenderer(0),lineY:getLineRenderer(1),rect:{createCover:function(n,r){function a(o){return o}return createBaseRectCover({toRectRange:a,fromRectRange:a},n,r,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(n){var r=getTrackEnds(n);return formatRectRange(r[1][0],r[1][1],r[0][0],r[0][1])},updateCoverShape:function(n,r,a,o){updateBaseRect(n,r,a,o)},updateCommon:updateCommon$1,contain:mainShapeContain},polygon:{createCover:function(n,r){var a=new Group$3;return a.add(new Polyline$1({name:"main",style:makeStyle(r),silent:!0})),a},getCreatingRange:function(n){return n},endCreating:function(n,r){r.remove(r.childAt(0)),r.add(new Polygon({name:"main",draggable:!0,drift:curry$1(driftPolygon,n,r),ondragend:curry$1(trigger,n,{isEnd:!0})}))},updateCoverShape:function(n,r,a,o){r.childAt(0).setShape({points:clipByPanel(n,r,a)})},updateCommon:updateCommon$1,contain:mainShapeContain}};function getLineRenderer(n){return{createCover:function(r,a){return createBaseRectCover({toRectRange:function(o){var s=[o,[0,100]];return n&&s.reverse(),s},fromRectRange:function(o){return o[n]}},r,a,[[["w"],["e"]],[["n"],["s"]]][n])},getCreatingRange:function(r){var a=getTrackEnds(r),o=mathMin$1(a[0][n],a[1][n]),s=mathMax$1(a[0][n],a[1][n]);return[o,s]},updateCoverShape:function(r,a,o,s){var l,u=getPanelByCover(r,a);if(u!==BRUSH_PANEL_GLOBAL&&u.getLinearBrushOtherExtent)l=u.getLinearBrushOtherExtent(n);else{var c=r._zr;l=[0,[c.getWidth(),c.getHeight()][1-n]]}var d=[o,l];n&&d.reverse(),updateBaseRect(r,a,d,s)},updateCommon:updateCommon$1,contain:mainShapeContain}}function makeRectPanelClipPath(n){return n=normalizeRect(n),function(r){return clipPointsByRect(r,n)}}function makeLinearBrushOtherExtent(n,r){return n=normalizeRect(n),function(a){var o=r!=null?r:a,s=o?n.width:n.height,l=o?n.x:n.y;return[l,l+(s||0)]}}function makeRectIsTargetByCursor(n,r,a){var o=normalizeRect(n);return function(s,l){return o.contain(l[0],l[1])&&!onIrrelevantElement(s,r,a)}}function normalizeRect(n){return BoundingRect.create(n)}var elementList$1=["axisLine","axisTickLabel","axisName"],ParallelAxisView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(a,o){n.prototype.init.apply(this,arguments),(this._brushController=new BrushController(o.getZr())).on("brush",bind$1(this._onBrush,this))},r.prototype.render=function(a,o,s,l){if(!fromAxisAreaSelect(a,o,l)){this.axisModel=a,this.api=s,this.group.removeAll();var u=this._axisGroup;if(this._axisGroup=new Group$3,this.group.add(this._axisGroup),!!a.get("show")){var c=getCoordSysModel(a,o),d=c.coordinateSystem,f=a.getAreaSelectStyle(),p=f.width,v=a.axis.dim,g=d.getAxisLayout(v),y=extend$2({strokeContainThreshold:p},g),_=new AxisBuilder(a,y);each$f(elementList$1,_.add,_),this._axisGroup.add(_.getGroup()),this._refreshBrushController(y,f,a,c,p,s),groupTransition(u,this._axisGroup,a)}}},r.prototype._refreshBrushController=function(a,o,s,l,u,c){var d=s.axis.getExtent(),f=d[1]-d[0],p=Math.min(30,Math.abs(f)*.1),v=BoundingRect.create({x:d[0],y:-u/2,width:f,height:u});v.x-=p,v.width+=2*p,this._brushController.mount({enableGlobalPan:!0,rotation:a.rotation,x:a.position[0],y:a.position[1]}).setPanels([{panelId:"pl",clipPath:makeRectPanelClipPath(v),isTargetByCursor:makeRectIsTargetByCursor(v,c,l),getLinearBrushOtherExtent:makeLinearBrushOtherExtent(v,0)}]).enableBrush({brushType:"lineX",brushStyle:o,removeOnClick:!0}).updateCovers(getCoverInfoList(s))},r.prototype._onBrush=function(a){var o=a.areas,s=this.axisModel,l=s.axis,u=map$1(o,function(c){return[l.coordToData(c.range[0],!0),l.coordToData(c.range[1],!0)]});(!s.option.realtime===a.isEnd||a.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:s.id,intervals:u})},r.prototype.dispose=function(){this._brushController.dispose()},r.type="parallelAxis",r}(ComponentView);function fromAxisAreaSelect(n,r,a){return a&&a.type==="axisAreaSelect"&&r.findComponents({mainType:"parallelAxis",query:a})[0]===n}function getCoverInfoList(n){var r=n.axis;return map$1(n.activeIntervals,function(a){return{brushType:"lineX",panelId:"pl",range:[r.dataToCoord(a[0],!0),r.dataToCoord(a[1],!0)]}})}function getCoordSysModel(n,r){return r.getComponent("parallel",n.get("parallelIndex"))}var actionInfo={type:"axisAreaSelect",event:"axisAreaSelected"};function installParallelActions(n){n.registerAction(actionInfo,function(r,a){a.eachComponent({mainType:"parallelAxis",query:r},function(o){o.axis.model.setActiveIntervals(r.intervals)})}),n.registerAction("parallelAxisExpand",function(r,a){a.eachComponent({mainType:"parallel",query:r},function(o){o.setAxisExpand(r)})})}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$E(n){n.registerComponentView(ParallelView),n.registerComponentModel(ParallelModel),n.registerCoordinateSystem("parallel",parallelCoordSysCreator),n.registerPreprocessor(parallelPreprocessor),n.registerComponentModel(ParallelAxisModel),n.registerComponentView(ParallelAxisView),axisModelCreator(n,"parallel",ParallelAxisModel,defaultAxisOption),installParallelActions(n)}function install$D(n){use(install$E),n.registerChartView(ParallelView$1),n.registerSeriesModel(ParallelSeriesModel),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,parallelVisual)}var SankeyPathShape=function(){function n(){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 n}(),SankeyPath=function(n){__extends(r,n);function r(a){return n.call(this,a)||this}return r.prototype.getDefaultShape=function(){return new SankeyPathShape},r.prototype.buildPath=function(a,o){var s=o.extent;a.moveTo(o.x1,o.y1),a.bezierCurveTo(o.cpx1,o.cpy1,o.cpx2,o.cpy2,o.x2,o.y2),o.orient==="vertical"?(a.lineTo(o.x2+s,o.y2),a.bezierCurveTo(o.cpx2+s,o.cpy2,o.cpx1+s,o.cpy1,o.x1+s,o.y1)):(a.lineTo(o.x2,o.y2+s),a.bezierCurveTo(o.cpx2,o.cpy2+s,o.cpx1,o.cpy1+s,o.x1,o.y1+s)),a.closePath()},r.prototype.highlight=function(){enterEmphasis(this)},r.prototype.downplay=function(){leaveEmphasis(this)},r}(Path),SankeyView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a._focusAdjacencyDisabled=!1,a}return r.prototype.render=function(a,o,s){var l=this,u=a.getGraph(),c=this.group,d=a.layoutInfo,f=d.width,p=d.height,v=a.getData(),g=a.getData("edge"),y=a.get("orient");this._model=a,c.removeAll(),c.x=d.x,c.y=d.y,u.eachEdge(function(_){var S=new SankeyPath,b=getECData(S);b.dataIndex=_.dataIndex,b.seriesIndex=a.seriesIndex,b.dataType="edge";var x=_.getModel(),A=x.getModel("lineStyle"),w=A.get("curveness"),E=_.node1.getLayout(),D=_.node1.getModel(),C=D.get("localX"),$=D.get("localY"),P=_.node2.getLayout(),M=_.node2.getModel(),I=M.get("localX"),L=M.get("localY"),O=_.getLayout(),R,N,V,F,U,H,W,G;S.shape.extent=Math.max(1,O.dy),S.shape.orient=y,y==="vertical"?(R=(C!=null?C*f:E.x)+O.sy,N=($!=null?$*p:E.y)+E.dy,V=(I!=null?I*f:P.x)+O.ty,F=L!=null?L*p:P.y,U=R,H=N*(1-w)+F*w,W=V,G=N*w+F*(1-w)):(R=(C!=null?C*f:E.x)+E.dx,N=($!=null?$*p:E.y)+O.sy,V=I!=null?I*f:P.x,F=(L!=null?L*p:P.y)+O.ty,U=R*(1-w)+V*w,H=N,W=R*w+V*(1-w),G=F),S.setShape({x1:R,y1:N,x2:V,y2:F,cpx1:U,cpy1:H,cpx2:W,cpy2:G}),S.useStyle(A.getItemStyle()),applyCurveStyle(S.style,y,_);var B=""+x.get("value"),Y=getLabelStatesModels(x,"edgeLabel");setLabelStyle(S,Y,{labelFetcher:{getFormattedLabel:function(ee,j,q,J,X,re){return a.getFormattedLabel(ee,j,"edge",J,retrieve3(X,Y.normal&&Y.normal.get("formatter"),B),re)}},labelDataIndex:_.dataIndex,defaultText:B}),S.setTextConfig({position:"inside"});var Z=x.getModel("emphasis");setStatesStylesFromModel(S,x,"lineStyle",function(ee){var j=ee.getItemStyle();return applyCurveStyle(j,y,_),j}),c.add(S),g.setItemGraphicEl(_.dataIndex,S);var K=Z.get("focus");toggleHoverEmphasis(S,K==="adjacency"?_.getAdjacentDataIndices():K==="trajectory"?_.getTrajectoryDataIndices():K,Z.get("blurScope"),Z.get("disabled"))}),u.eachNode(function(_){var S=_.getLayout(),b=_.getModel(),x=b.get("localX"),A=b.get("localY"),w=b.getModel("emphasis"),E=b.get(["itemStyle","borderRadius"])||0,D=new Rect$2({shape:{x:x!=null?x*f:S.x,y:A!=null?A*p:S.y,width:S.dx,height:S.dy,r:E},style:b.getModel("itemStyle").getItemStyle(),z2:10});setLabelStyle(D,getLabelStatesModels(b),{labelFetcher:{getFormattedLabel:function($,P){return a.getFormattedLabel($,P,"node")}},labelDataIndex:_.dataIndex,defaultText:_.id}),D.disableLabelAnimation=!0,D.setStyle("fill",_.getVisual("color")),D.setStyle("decal",_.getVisual("style").decal),setStatesStylesFromModel(D,b),c.add(D),v.setItemGraphicEl(_.dataIndex,D),getECData(D).dataType="node";var C=w.get("focus");toggleHoverEmphasis(D,C==="adjacency"?_.getAdjacentDataIndices():C==="trajectory"?_.getTrajectoryDataIndices():C,w.get("blurScope"),w.get("disabled"))}),v.eachItemGraphicEl(function(_,S){var b=v.getItemModel(S);b.get("draggable")&&(_.drift=function(x,A){l._focusAdjacencyDisabled=!0,this.shape.x+=x,this.shape.y+=A,this.dirty(),s.dispatchAction({type:"dragNode",seriesId:a.id,dataIndex:v.getRawIndex(S),localX:this.shape.x/f,localY:this.shape.y/p})},_.ondragend=function(){l._focusAdjacencyDisabled=!1},_.draggable=!0,_.cursor="move")}),!this._data&&a.isAnimationEnabled()&&c.setClipPath(createGridClipShape$1(c.getBoundingRect(),a,function(){c.removeClipPath()})),this._data=a.getData()},r.prototype.dispose=function(){},r.type="sankey",r}(ChartView);function applyCurveStyle(n,r,a){switch(n.fill){case"source":n.fill=a.node1.getVisual("color"),n.decal=a.node1.getVisual("style").decal;break;case"target":n.fill=a.node2.getVisual("color"),n.decal=a.node2.getVisual("style").decal;break;case"gradient":var o=a.node1.getVisual("color"),s=a.node2.getVisual("color");isString(o)&&isString(s)&&(n.fill=new LinearGradient(0,0,+(r==="horizontal"),+(r==="vertical"),[{color:o,offset:0},{color:s,offset:1}]))}}function createGridClipShape$1(n,r,a){var o=new Rect$2({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}});return initProps(o,{shape:{width:n.width+20}},r,a),o}var SankeySeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.getInitialData=function(a,o){var s=a.edges||a.links||[],l=a.data||a.nodes||[],u=a.levels||[];this.levelModels=[];for(var c=this.levelModels,d=0;d<u.length;d++)u[d].depth!=null&&u[d].depth>=0&&(c[u[d].depth]=new Model(u[d],this,o));var f=createGraphFromNodeEdge(l,s,this,!0,p);return f.data;function p(v,g){v.wrapMethod("getItemModel",function(y,_){var S=y.parentModel,b=S.getData().getItemLayout(_);if(b){var x=b.depth,A=S.levelModels[x];A&&(y.parentModel=A)}return y}),g.wrapMethod("getItemModel",function(y,_){var S=y.parentModel,b=S.getGraph().getEdgeByIndex(_),x=b.node1.getLayout();if(x){var A=x.depth,w=S.levelModels[A];w&&(y.parentModel=w)}return y})}},r.prototype.setNodePosition=function(a,o){var s=this.option.data||this.option.nodes,l=s[a];l.localX=o[0],l.localY=o[1]},r.prototype.getGraph=function(){return this.getData().graph},r.prototype.getEdgeData=function(){return this.getGraph().edgeData},r.prototype.formatTooltip=function(a,o,s){function l(y){return isNaN(y)||y==null}if(s==="edge"){var u=this.getDataParams(a,s),c=u.data,d=u.value,f=c.source+" -- "+c.target;return createTooltipMarkup("nameValue",{name:f,value:d,noValue:l(d)})}else{var p=this.getGraph().getNodeByIndex(a),v=p.getLayout().value,g=this.getDataParams(a,s).data.name;return createTooltipMarkup("nameValue",{name:g!=null?g+"":null,value:v,noValue:l(v)})}},r.prototype.optionUpdated=function(){},r.prototype.getDataParams=function(a,o){var s=n.prototype.getDataParams.call(this,a,o);if(s.value==null&&o==="node"){var l=this.getGraph().getNodeByIndex(a),u=l.getLayout().value;s.value=u}return s},r.type="series.sankey",r.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},r}(SeriesModel);function sankeyLayout(n,r){n.eachSeriesByType("sankey",function(a){var o=a.get("nodeWidth"),s=a.get("nodeGap"),l=getViewRect$1(a,r);a.layoutInfo=l;var u=l.width,c=l.height,d=a.getGraph(),f=d.nodes,p=d.edges;computeNodeValues(f);var v=filter(f,function(S){return S.getLayout().value===0}),g=v.length!==0?0:a.get("layoutIterations"),y=a.get("orient"),_=a.get("nodeAlign");layoutSankey(f,p,o,s,u,c,g,y,_)})}function getViewRect$1(n,r){return getLayoutRect(n.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()})}function layoutSankey(n,r,a,o,s,l,u,c,d){computeNodeBreadths(n,r,a,s,l,c,d),computeNodeDepths(n,r,l,s,o,u,c),computeEdgeDepths(n,c)}function computeNodeValues(n){each$f(n,function(r){var a=sum(r.outEdges,getEdgeValue),o=sum(r.inEdges,getEdgeValue),s=r.getValue()||0,l=Math.max(a,o,s);r.setLayout({value:l},!0)})}function computeNodeBreadths(n,r,a,o,s,l,u){for(var c=[],d=[],f=[],p=[],v=0,g=0;g<r.length;g++)c[g]=1;for(var g=0;g<n.length;g++)d[g]=n[g].inEdges.length,d[g]===0&&f.push(n[g]);for(var y=-1;f.length;){for(var _=0;_<f.length;_++){var S=f[_],b=S.hostGraph.data.getRawDataItem(S.dataIndex),x=b.depth!=null&&b.depth>=0;x&&b.depth>y&&(y=b.depth),S.setLayout({depth:x?b.depth:v},!0),l==="vertical"?S.setLayout({dy:a},!0):S.setLayout({dx:a},!0);for(var A=0;A<S.outEdges.length;A++){var w=S.outEdges[A],E=r.indexOf(w);c[E]=0;var D=w.node2,C=n.indexOf(D);--d[C]===0&&p.indexOf(D)<0&&p.push(D)}}++v,f=p,p=[]}for(var g=0;g<c.length;g++)if(c[g]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var $=y>v-1?y:v-1;u&&u!=="left"&&adjustNodeWithNodeAlign(n,u,l,$);var P=l==="vertical"?(s-a)/$:(o-a)/$;scaleNodeBreadths(n,P,l)}function isNodeDepth(n){var r=n.hostGraph.data.getRawDataItem(n.dataIndex);return r.depth!=null&&r.depth>=0}function adjustNodeWithNodeAlign(n,r,a,o){if(r==="right"){for(var s=[],l=n,u=0;l.length;){for(var c=0;c<l.length;c++){var d=l[c];d.setLayout({skNodeHeight:u},!0);for(var f=0;f<d.inEdges.length;f++){var p=d.inEdges[f];s.indexOf(p.node1)<0&&s.push(p.node1)}}l=s,s=[],++u}each$f(n,function(v){isNodeDepth(v)||v.setLayout({depth:Math.max(0,o-v.getLayout().skNodeHeight)},!0)})}else r==="justify"&&moveSinksRight(n,o)}function moveSinksRight(n,r){each$f(n,function(a){!isNodeDepth(a)&&!a.outEdges.length&&a.setLayout({depth:r},!0)})}function scaleNodeBreadths(n,r,a){each$f(n,function(o){var s=o.getLayout().depth*r;a==="vertical"?o.setLayout({y:s},!0):o.setLayout({x:s},!0)})}function computeNodeDepths(n,r,a,o,s,l,u){var c=prepareNodesByBreadth(n,u);initializeNodeDepth(c,r,a,o,s,u),resolveCollisions(c,s,a,o,u);for(var d=1;l>0;l--)d*=.99,relaxRightToLeft(c,d,u),resolveCollisions(c,s,a,o,u),relaxLeftToRight(c,d,u),resolveCollisions(c,s,a,o,u)}function prepareNodesByBreadth(n,r){var a=[],o=r==="vertical"?"y":"x",s=groupData(n,function(l){return l.getLayout()[o]});return s.keys.sort(function(l,u){return l-u}),each$f(s.keys,function(l){a.push(s.buckets.get(l))}),a}function initializeNodeDepth(n,r,a,o,s,l){var u=1/0;each$f(n,function(c){var d=c.length,f=0;each$f(c,function(v){f+=v.getLayout().value});var p=l==="vertical"?(o-(d-1)*s)/f:(a-(d-1)*s)/f;p<u&&(u=p)}),each$f(n,function(c){each$f(c,function(d,f){var p=d.getLayout().value*u;l==="vertical"?(d.setLayout({x:f},!0),d.setLayout({dx:p},!0)):(d.setLayout({y:f},!0),d.setLayout({dy:p},!0))})}),each$f(r,function(c){var d=+c.getValue()*u;c.setLayout({dy:d},!0)})}function resolveCollisions(n,r,a,o,s){var l=s==="vertical"?"x":"y";each$f(n,function(u){u.sort(function(S,b){return S.getLayout()[l]-b.getLayout()[l]});for(var c,d,f,p=0,v=u.length,g=s==="vertical"?"dx":"dy",y=0;y<v;y++)d=u[y],f=p-d.getLayout()[l],f>0&&(c=d.getLayout()[l]+f,s==="vertical"?d.setLayout({x:c},!0):d.setLayout({y:c},!0)),p=d.getLayout()[l]+d.getLayout()[g]+r;var _=s==="vertical"?o:a;if(f=p-r-_,f>0){c=d.getLayout()[l]-f,s==="vertical"?d.setLayout({x:c},!0):d.setLayout({y:c},!0),p=c;for(var y=v-2;y>=0;--y)d=u[y],f=d.getLayout()[l]+d.getLayout()[g]+r-p,f>0&&(c=d.getLayout()[l]-f,s==="vertical"?d.setLayout({x:c},!0):d.setLayout({y:c},!0)),p=d.getLayout()[l]}})}function relaxRightToLeft(n,r,a){each$f(n.slice().reverse(),function(o){each$f(o,function(s){if(s.outEdges.length){var l=sum(s.outEdges,weightedTarget,a)/sum(s.outEdges,getEdgeValue);if(isNaN(l)){var u=s.outEdges.length;l=u?sum(s.outEdges,centerTarget,a)/u:0}if(a==="vertical"){var c=s.getLayout().x+(l-center(s,a))*r;s.setLayout({x:c},!0)}else{var d=s.getLayout().y+(l-center(s,a))*r;s.setLayout({y:d},!0)}}})})}function weightedTarget(n,r){return center(n.node2,r)*n.getValue()}function centerTarget(n,r){return center(n.node2,r)}function weightedSource(n,r){return center(n.node1,r)*n.getValue()}function centerSource(n,r){return center(n.node1,r)}function center(n,r){return r==="vertical"?n.getLayout().x+n.getLayout().dx/2:n.getLayout().y+n.getLayout().dy/2}function getEdgeValue(n){return n.getValue()}function sum(n,r,a){for(var o=0,s=n.length,l=-1;++l<s;){var u=+r(n[l],a);isNaN(u)||(o+=u)}return o}function relaxLeftToRight(n,r,a){each$f(n,function(o){each$f(o,function(s){if(s.inEdges.length){var l=sum(s.inEdges,weightedSource,a)/sum(s.inEdges,getEdgeValue);if(isNaN(l)){var u=s.inEdges.length;l=u?sum(s.inEdges,centerSource,a)/u:0}if(a==="vertical"){var c=s.getLayout().x+(l-center(s,a))*r;s.setLayout({x:c},!0)}else{var d=s.getLayout().y+(l-center(s,a))*r;s.setLayout({y:d},!0)}}})})}function computeEdgeDepths(n,r){var a=r==="vertical"?"x":"y";each$f(n,function(o){o.outEdges.sort(function(s,l){return s.node2.getLayout()[a]-l.node2.getLayout()[a]}),o.inEdges.sort(function(s,l){return s.node1.getLayout()[a]-l.node1.getLayout()[a]})}),each$f(n,function(o){var s=0,l=0;each$f(o.outEdges,function(u){u.setLayout({sy:s},!0),s+=u.getLayout().dy}),each$f(o.inEdges,function(u){u.setLayout({ty:l},!0),l+=u.getLayout().dy})})}function sankeyVisual(n){n.eachSeriesByType("sankey",function(r){var a=r.getGraph(),o=a.nodes,s=a.edges;if(o.length){var l=1/0,u=-1/0;each$f(o,function(c){var d=c.getLayout().value;d<l&&(l=d),d>u&&(u=d)}),each$f(o,function(c){var d=new VisualMapping({type:"color",mappingMethod:"linear",dataExtent:[l,u],visual:r.get("color")}),f=d.mapValueToVisual(c.getLayout().value),p=c.getModel().get(["itemStyle","color"]);p!=null?(c.setVisual("color",p),c.setVisual("style",{fill:p})):(c.setVisual("color",f),c.setVisual("style",{fill:f}))})}s.length&&each$f(s,function(c){var d=c.getModel().get("lineStyle");c.setVisual("style",d)})})}function install$C(n){n.registerChartView(SankeyView),n.registerSeriesModel(SankeySeriesModel),n.registerLayout(sankeyLayout),n.registerVisual(sankeyVisual),n.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(r,a){a.eachComponent({mainType:"series",subType:"sankey",query:r},function(o){o.setNodePosition(r.dataIndex,[r.localX,r.localY])})})}var WhiskerBoxCommonMixin=function(){function n(){}return n.prototype._hasEncodeRule=function(r){var a=this.getEncode();return a&&a.get(r)!=null},n.prototype.getInitialData=function(r,a){var o,s=a.getComponent("xAxis",this.get("xAxisIndex")),l=a.getComponent("yAxis",this.get("yAxisIndex")),u=s.get("type"),c=l.get("type"),d;u==="category"?(r.layout="horizontal",o=s.getOrdinalMeta(),d=!this._hasEncodeRule("x")):c==="category"?(r.layout="vertical",o=l.getOrdinalMeta(),d=!this._hasEncodeRule("y")):r.layout=r.layout||"horizontal";var f=["x","y"],p=r.layout==="horizontal"?0:1,v=this._baseAxisDim=f[p],g=f[1-p],y=[s,l],_=y[p].get("type"),S=y[1-p].get("type"),b=r.data;if(b&&d){var x=[];each$f(b,function(E,D){var C;isArray$1(E)?(C=E.slice(),E.unshift(D)):isArray$1(E.value)?(C=extend$2({},E),C.value=C.value.slice(),E.value.unshift(D)):C=E,x.push(C)}),r.data=x}var A=this.defaultValueDimensions,w=[{name:v,type:getDimensionTypeByAxis(_),ordinalMeta:o,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:g,type:getDimensionTypeByAxis(S),dimsDef:A.slice()}];return createSeriesDataSimply(this,{coordDimensions:w,dimensionsCount:A.length+1,encodeDefaulter:curry$1(makeSeriesEncodeForAxisCoordSys,w,this)})},n.prototype.getBaseAxis=function(){var r=this._baseAxisDim;return this.ecModel.getComponent(r+"Axis",this.get(r+"AxisIndex")).axis},n}(),BoxplotSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],a.visualDrawType="stroke",a}return r.type="series.boxplot",r.dependencies=["xAxis","yAxis","grid"],r.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},r}(SeriesModel);mixin(BoxplotSeriesModel,WhiskerBoxCommonMixin,!0);var BoxplotView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){var l=a.getData(),u=this.group,c=this._data;this._data||u.removeAll();var d=a.get("layout")==="horizontal"?1:0;l.diff(c).add(function(f){if(l.hasValue(f)){var p=l.getItemLayout(f),v=createNormalBox$1(p,l,f,d,!0);l.setItemGraphicEl(f,v),u.add(v)}}).update(function(f,p){var v=c.getItemGraphicEl(p);if(!l.hasValue(f)){u.remove(v);return}var g=l.getItemLayout(f);v?(saveOldStyle(v),updateNormalBoxData(g,v,l,f)):v=createNormalBox$1(g,l,f,d),u.add(v),l.setItemGraphicEl(f,v)}).remove(function(f){var p=c.getItemGraphicEl(f);p&&u.remove(p)}).execute(),this._data=l},r.prototype.remove=function(a){var o=this.group,s=this._data;this._data=null,s&&s.eachItemGraphicEl(function(l){l&&o.remove(l)})},r.type="boxplot",r}(ChartView),BoxPathShape=function(){function n(){}return n}(),BoxPath=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="boxplotBoxPath",o}return r.prototype.getDefaultShape=function(){return new BoxPathShape},r.prototype.buildPath=function(a,o){var s=o.points,l=0;for(a.moveTo(s[l][0],s[l][1]),l++;l<4;l++)a.lineTo(s[l][0],s[l][1]);for(a.closePath();l<s.length;l++)a.moveTo(s[l][0],s[l][1]),l++,a.lineTo(s[l][0],s[l][1])},r}(Path);function createNormalBox$1(n,r,a,o,s){var l=n.ends,u=new BoxPath({shape:{points:s?transInit$1(l,o,n):l}});return updateNormalBoxData(n,u,r,a,s),u}function updateNormalBoxData(n,r,a,o,s){var l=a.hostModel,u=graphic$1[s?"initProps":"updateProps"];u(r,{shape:{points:n.ends}},l,o),r.useStyle(a.getItemVisual(o,"style")),r.style.strokeNoScale=!0,r.z2=100;var c=a.getItemModel(o),d=c.getModel("emphasis");setStatesStylesFromModel(r,c),toggleHoverEmphasis(r,d.get("focus"),d.get("blurScope"),d.get("disabled"))}function transInit$1(n,r,a){return map$1(n,function(o){return o=o.slice(),o[r]=a.initBaseline,o})}var each$9=each$f;function boxplotLayout(n){var r=groupSeriesByAxis(n);each$9(r,function(a){var o=a.seriesModels;o.length&&(calculateBase(a),each$9(o,function(s,l){layoutSingleSeries(s,a.boxOffsetList[l],a.boxWidthList[l])}))})}function groupSeriesByAxis(n){var r=[],a=[];return n.eachSeriesByType("boxplot",function(o){var s=o.getBaseAxis(),l=indexOf(a,s);l<0&&(l=a.length,a[l]=s,r[l]={axis:s,seriesModels:[]}),r[l].seriesModels.push(o)}),r}function calculateBase(n){var r=n.axis,a=n.seriesModels,o=a.length,s=n.boxWidthList=[],l=n.boxOffsetList=[],u=[],c;if(r.type==="category")c=r.getBandWidth();else{var d=0;each$9(a,function(_){d=Math.max(d,_.getData().count())});var f=r.getExtent();c=Math.abs(f[1]-f[0])/d}each$9(a,function(_){var S=_.get("boxWidth");isArray$1(S)||(S=[S,S]),u.push([parsePercent(S[0],c)||0,parsePercent(S[1],c)||0])});var p=c*.8-2,v=p/o*.3,g=(p-v*(o-1))/o,y=g/2-p/2;each$9(a,function(_,S){l.push(y),y+=v+g,s.push(Math.min(Math.max(g,u[S][0]),u[S][1]))})}function layoutSingleSeries(n,r,a){var o=n.coordinateSystem,s=n.getData(),l=a/2,u=n.get("layout")==="horizontal"?0:1,c=1-u,d=["x","y"],f=s.mapDimension(d[u]),p=s.mapDimensionsAll(d[c]);if(f==null||p.length<5)return;for(var v=0;v<s.count();v++){var g=s.get(f,v),y=w(g,p[2],v),_=w(g,p[0],v),S=w(g,p[1],v),b=w(g,p[3],v),x=w(g,p[4],v),A=[];E(A,S,!1),E(A,b,!0),A.push(_,S,x,b),D(A,_),D(A,x),D(A,y),s.setItemLayout(v,{initBaseline:y[c],ends:A})}function w(C,$,P){var M=s.get($,P),I=[];I[u]=C,I[c]=M;var L;return isNaN(C)||isNaN(M)?L=[NaN,NaN]:(L=o.dataToPoint(I),L[u]+=r),L}function E(C,$,P){var M=$.slice(),I=$.slice();M[u]+=l,I[u]-=l,P?C.push(M,I):C.push(I,M)}function D(C,$){var P=$.slice(),M=$.slice();P[u]-=l,M[u]+=l,C.push(P,M)}}function prepareBoxplotData(n,r){r=r||{};for(var a=[],o=[],s=r.boundIQR,l=s==="none"||s===0,u=0;u<n.length;u++){var c=asc$2(n[u].slice()),d=quantile(c,.25),f=quantile(c,.5),p=quantile(c,.75),v=c[0],g=c[c.length-1],y=(s==null?1.5:s)*(p-d),_=l?v:Math.max(v,d-y),S=l?g:Math.min(g,p+y),b=r.itemNameFormatter,x=isFunction(b)?b({value:u}):isString(b)?b.replace("{value}",u+""):u+"";a.push([x,_,d,f,p,S]);for(var A=0;A<c.length;A++){var w=c[A];if(w<_||w>S){var E=[x,w];o.push(E)}}}return{boxData:a,outliers:o}}var boxplotTransform={type:"echarts:boxplot",transform:function(r){var a=r.upstream;if(a.sourceFormat!==SOURCE_FORMAT_ARRAY_ROWS){var o="";throwError(o)}var s=prepareBoxplotData(a.getRawData(),r.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:s.boxData},{data:s.outliers}]}};function install$B(n){n.registerSeriesModel(BoxplotSeriesModel),n.registerChartView(BoxplotView),n.registerLayout(boxplotLayout),n.registerTransform(boxplotTransform)}var positiveBorderColorQuery=["itemStyle","borderColor"],negativeBorderColorQuery=["itemStyle","borderColor0"],dojiBorderColorQuery=["itemStyle","borderColorDoji"],positiveColorQuery=["itemStyle","color"],negativeColorQuery=["itemStyle","color0"];function getColor(n,r){return r.get(n>0?positiveColorQuery:negativeColorQuery)}function getBorderColor(n,r){return r.get(n===0?dojiBorderColorQuery:n>0?positiveBorderColorQuery:negativeBorderColorQuery)}var candlestickVisual={seriesType:"candlestick",plan:createRenderPlanner(),performRawSeries:!0,reset:function(n,r){if(!r.isSeriesFiltered(n)){var a=n.pipelineContext.large;return!a&&{progress:function(o,s){for(var l;(l=o.next())!=null;){var u=s.getItemModel(l),c=s.getItemLayout(l).sign,d=u.getItemStyle();d.fill=getColor(c,u),d.stroke=getBorderColor(c,u)||d.fill;var f=s.ensureUniqueItemVisual(l,"style");extend$2(f,d)}}}}}},SKIP_PROPS=["color","borderColor"],CandlestickView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(a),this._isLargeDraw?this._renderLarge(a):this._renderNormal(a)},r.prototype.incrementalPrepareRender=function(a,o,s){this._clear(),this._updateDrawMode(a)},r.prototype.incrementalRender=function(a,o,s,l){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(a,o):this._incrementalRenderNormal(a,o)},r.prototype.eachRendered=function(a){traverseElements(this._progressiveEls||this.group,a)},r.prototype._updateDrawMode=function(a){var o=a.pipelineContext.large;(this._isLargeDraw==null||o!==this._isLargeDraw)&&(this._isLargeDraw=o,this._clear())},r.prototype._renderNormal=function(a){var o=a.getData(),s=this._data,l=this.group,u=o.getLayout("isSimpleBox"),c=a.get("clip",!0),d=a.coordinateSystem,f=d.getArea&&d.getArea();this._data||l.removeAll(),o.diff(s).add(function(p){if(o.hasValue(p)){var v=o.getItemLayout(p);if(c&&isNormalBoxClipped(f,v))return;var g=createNormalBox(v,p,!0);initProps(g,{shape:{points:v.ends}},a,p),setBoxCommon(g,o,p,u),l.add(g),o.setItemGraphicEl(p,g)}}).update(function(p,v){var g=s.getItemGraphicEl(v);if(!o.hasValue(p)){l.remove(g);return}var y=o.getItemLayout(p);if(c&&isNormalBoxClipped(f,y)){l.remove(g);return}g?(updateProps$1(g,{shape:{points:y.ends}},a,p),saveOldStyle(g)):g=createNormalBox(y),setBoxCommon(g,o,p,u),l.add(g),o.setItemGraphicEl(p,g)}).remove(function(p){var v=s.getItemGraphicEl(p);v&&l.remove(v)}).execute(),this._data=o},r.prototype._renderLarge=function(a){this._clear(),createLarge(a,this.group);var o=a.get("clip",!0)?createClipPath(a.coordinateSystem,!1,a):null;o?this.group.setClipPath(o):this.group.removeClipPath()},r.prototype._incrementalRenderNormal=function(a,o){for(var s=o.getData(),l=s.getLayout("isSimpleBox"),u;(u=a.next())!=null;){var c=s.getItemLayout(u),d=createNormalBox(c);setBoxCommon(d,s,u,l),d.incremental=!0,this.group.add(d),this._progressiveEls.push(d)}},r.prototype._incrementalRenderLarge=function(a,o){createLarge(o,this.group,this._progressiveEls,!0)},r.prototype.remove=function(a){this._clear()},r.prototype._clear=function(){this.group.removeAll(),this._data=null},r.type="candlestick",r}(ChartView),NormalBoxPathShape=function(){function n(){}return n}(),NormalBoxPath=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="normalCandlestickBox",o}return r.prototype.getDefaultShape=function(){return new NormalBoxPathShape},r.prototype.buildPath=function(a,o){var s=o.points;this.__simpleBox?(a.moveTo(s[4][0],s[4][1]),a.lineTo(s[6][0],s[6][1])):(a.moveTo(s[0][0],s[0][1]),a.lineTo(s[1][0],s[1][1]),a.lineTo(s[2][0],s[2][1]),a.lineTo(s[3][0],s[3][1]),a.closePath(),a.moveTo(s[4][0],s[4][1]),a.lineTo(s[5][0],s[5][1]),a.moveTo(s[6][0],s[6][1]),a.lineTo(s[7][0],s[7][1]))},r}(Path);function createNormalBox(n,r,a){var o=n.ends;return new NormalBoxPath({shape:{points:a?transInit(o,n):o},z2:100})}function isNormalBoxClipped(n,r){for(var a=!0,o=0;o<r.ends.length;o++)if(n.contain(r.ends[o][0],r.ends[o][1])){a=!1;break}return a}function setBoxCommon(n,r,a,o){var s=r.getItemModel(a);n.useStyle(r.getItemVisual(a,"style")),n.style.strokeNoScale=!0,n.__simpleBox=o,setStatesStylesFromModel(n,s);var l=r.getItemLayout(a).sign;each$f(n.states,function(c,d){var f=s.getModel(d),p=getColor(l,f),v=getBorderColor(l,f)||p,g=c.style||(c.style={});p&&(g.fill=p),v&&(g.stroke=v)});var u=s.getModel("emphasis");toggleHoverEmphasis(n,u.get("focus"),u.get("blurScope"),u.get("disabled"))}function transInit(n,r){return map$1(n,function(a){return a=a.slice(),a[1]=r.initBaseline,a})}var LargeBoxPathShape=function(){function n(){}return n}(),LargeBoxPath=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o.type="largeCandlestickBox",o}return r.prototype.getDefaultShape=function(){return new LargeBoxPathShape},r.prototype.buildPath=function(a,o){for(var s=o.points,l=0;l<s.length;)if(this.__sign===s[l++]){var u=s[l++];a.moveTo(u,s[l++]),a.lineTo(u,s[l++])}else l+=3},r}(Path);function createLarge(n,r,a,o){var s=n.getData(),l=s.getLayout("largePoints"),u=new LargeBoxPath({shape:{points:l},__sign:1,ignoreCoarsePointer:!0});r.add(u);var c=new LargeBoxPath({shape:{points:l},__sign:-1,ignoreCoarsePointer:!0});r.add(c);var d=new LargeBoxPath({shape:{points:l},__sign:0,ignoreCoarsePointer:!0});r.add(d),setLargeStyle(1,u,n),setLargeStyle(-1,c,n),setLargeStyle(0,d,n),o&&(u.incremental=!0,c.incremental=!0),a&&a.push(u,c)}function setLargeStyle(n,r,a,o){var s=getBorderColor(n,a)||getColor(n,a),l=a.getModel("itemStyle").getItemStyle(SKIP_PROPS);r.useStyle(l),r.style.fill=null,r.style.stroke=s}var CandlestickSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],a}return r.prototype.getShadowDim=function(){return"open"},r.prototype.brushSelector=function(a,o,s){var l=o.getItemLayout(a);return l&&s.rect(l.brushRect)},r.type="series.candlestick",r.dependencies=["xAxis","yAxis","grid"],r.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},r}(SeriesModel);mixin(CandlestickSeriesModel,WhiskerBoxCommonMixin,!0);function candlestickPreprocessor(n){!n||!isArray$1(n.series)||each$f(n.series,function(r){isObject$3(r)&&r.type==="k"&&(r.type="candlestick")})}var candlestickLayout={seriesType:"candlestick",plan:createRenderPlanner(),reset:function(n){var r=n.coordinateSystem,a=n.getData(),o=calculateCandleWidth(n,a),s=0,l=1,u=["x","y"],c=a.getDimensionIndex(a.mapDimension(u[s])),d=map$1(a.mapDimensionsAll(u[l]),a.getDimensionIndex,a),f=d[0],p=d[1],v=d[2],g=d[3];if(a.setLayout({candleWidth:o,isSimpleBox:o<=1.3}),c<0||d.length<4)return;return{progress:n.pipelineContext.large?_:y};function y(S,b){for(var x,A=b.getStore();(x=S.next())!=null;){var w=A.get(c,x),E=A.get(f,x),D=A.get(p,x),C=A.get(v,x),$=A.get(g,x),P=Math.min(E,D),M=Math.max(E,D),I=U(P,w),L=U(M,w),O=U(C,w),R=U($,w),N=[];H(N,L,0),H(N,I,1),N.push(G(R),G(L),G(O),G(I));var V=b.getItemModel(x),F=!!V.get(["itemStyle","borderColorDoji"]);b.setItemLayout(x,{sign:getSign(A,x,E,D,p,F),initBaseline:E>D?L[l]:I[l],ends:N,brushRect:W(C,$,w)})}function U(B,Y){var Z=[];return Z[s]=Y,Z[l]=B,isNaN(Y)||isNaN(B)?[NaN,NaN]:r.dataToPoint(Z)}function H(B,Y,Z){var K=Y.slice(),ee=Y.slice();K[s]=subPixelOptimize(K[s]+o/2,1,!1),ee[s]=subPixelOptimize(ee[s]-o/2,1,!0),Z?B.push(K,ee):B.push(ee,K)}function W(B,Y,Z){var K=U(B,Z),ee=U(Y,Z);return K[s]-=o/2,ee[s]-=o/2,{x:K[0],y:K[1],width:o,height:ee[1]-K[1]}}function G(B){return B[s]=subPixelOptimize(B[s],1),B}}function _(S,b){for(var x=createFloat32Array(S.count*4),A=0,w,E=[],D=[],C,$=b.getStore(),P=!!n.get(["itemStyle","borderColorDoji"]);(C=S.next())!=null;){var M=$.get(c,C),I=$.get(f,C),L=$.get(p,C),O=$.get(v,C),R=$.get(g,C);if(isNaN(M)||isNaN(O)||isNaN(R)){x[A++]=NaN,A+=3;continue}x[A++]=getSign($,C,I,L,p,P),E[s]=M,E[l]=O,w=r.dataToPoint(E,null,D),x[A++]=w?w[0]:NaN,x[A++]=w?w[1]:NaN,E[l]=R,w=r.dataToPoint(E,null,D),x[A++]=w?w[1]:NaN}b.setLayout("largePoints",x)}}};function getSign(n,r,a,o,s,l){var u;return a>o?u=-1:a<o?u=1:u=l?0:r>0?n.get(s,r-1)<=o?1:-1:1,u}function calculateCandleWidth(n,r){var a=n.getBaseAxis(),o,s=a.type==="category"?a.getBandWidth():(o=a.getExtent(),Math.abs(o[1]-o[0])/r.count()),l=parsePercent(retrieve2(n.get("barMaxWidth"),s),s),u=parsePercent(retrieve2(n.get("barMinWidth"),1),s),c=n.get("barWidth");return c!=null?parsePercent(c,s):Math.max(Math.min(s/2,l),u)}function install$A(n){n.registerChartView(CandlestickView),n.registerSeriesModel(CandlestickSeriesModel),n.registerPreprocessor(candlestickPreprocessor),n.registerVisual(candlestickVisual),n.registerLayout(candlestickLayout)}function updateRipplePath(n,r){var a=r.rippleEffectColor||r.color;n.eachChild(function(o){o.attr({z:r.z,zlevel:r.zlevel,style:{stroke:r.brushType==="stroke"?a:null,fill:r.brushType==="fill"?a:null}})})}var EffectSymbol=function(n){__extends(r,n);function r(a,o){var s=n.call(this)||this,l=new Symbol$1(a,o),u=new Group$3;return s.add(l),s.add(u),s.updateData(a,o),s}return r.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},r.prototype.startEffectAnimation=function(a){for(var o=a.symbolType,s=a.color,l=a.rippleNumber,u=this.childAt(1),c=0;c<l;c++){var d=createSymbol$1(o,-1,-1,2,2,s);d.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var f=-c/l*a.period+a.effectOffset;d.animate("",!0).when(a.period,{scaleX:a.rippleScale/2,scaleY:a.rippleScale/2}).delay(f).start(),d.animateStyle(!0).when(a.period,{opacity:0}).delay(f).start(),u.add(d)}updateRipplePath(u,a)},r.prototype.updateEffectAnimation=function(a){for(var o=this._effectCfg,s=this.childAt(1),l=["symbolType","period","rippleScale","rippleNumber"],u=0;u<l.length;u++){var c=l[u];if(o[c]!==a[c]){this.stopEffectAnimation(),this.startEffectAnimation(a);return}}updateRipplePath(s,a)},r.prototype.highlight=function(){enterEmphasis(this)},r.prototype.downplay=function(){leaveEmphasis(this)},r.prototype.getSymbolType=function(){var a=this.childAt(0);return a&&a.getSymbolType()},r.prototype.updateData=function(a,o){var s=this,l=a.hostModel;this.childAt(0).updateData(a,o);var u=this.childAt(1),c=a.getItemModel(o),d=a.getItemVisual(o,"symbol"),f=normalizeSymbolSize(a.getItemVisual(o,"symbolSize")),p=a.getItemVisual(o,"style"),v=p&&p.fill,g=c.getModel("emphasis");u.setScale(f),u.traverse(function(b){b.setStyle("fill",v)});var y=normalizeSymbolOffset(a.getItemVisual(o,"symbolOffset"),f);y&&(u.x=y[0],u.y=y[1]);var _=a.getItemVisual(o,"symbolRotate");u.rotation=(_||0)*Math.PI/180||0;var S={};S.showEffectOn=l.get("showEffectOn"),S.rippleScale=c.get(["rippleEffect","scale"]),S.brushType=c.get(["rippleEffect","brushType"]),S.period=c.get(["rippleEffect","period"])*1e3,S.effectOffset=o/a.count(),S.z=l.getShallow("z")||0,S.zlevel=l.getShallow("zlevel")||0,S.symbolType=d,S.color=v,S.rippleEffectColor=c.get(["rippleEffect","color"]),S.rippleNumber=c.get(["rippleEffect","number"]),S.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(S):this.startEffectAnimation(S),this._effectCfg=S):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(b){b==="emphasis"?S.showEffectOn!=="render"&&s.startEffectAnimation(S):b==="normal"&&S.showEffectOn!=="render"&&s.stopEffectAnimation()}),this._effectCfg=S,toggleHoverEmphasis(this,g.get("focus"),g.get("blurScope"),g.get("disabled"))},r.prototype.fadeOut=function(a){a&&a()},r}(Group$3),EffectScatterView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(){this._symbolDraw=new SymbolDraw(EffectSymbol)},r.prototype.render=function(a,o,s){var l=a.getData(),u=this._symbolDraw;u.updateData(l,{clipShape:this._getClipShape(a)}),this.group.add(u.group)},r.prototype._getClipShape=function(a){var o=a.coordinateSystem,s=o&&o.getArea&&o.getArea();return a.get("clip",!0)?s:null},r.prototype.updateTransform=function(a,o,s){var l=a.getData();this.group.dirty();var u=pointsLayout("").reset(a,o,s);u.progress&&u.progress({start:0,end:l.count(),count:l.count()},l),this._symbolDraw.updateLayout()},r.prototype._updateGroupTransform=function(a){var o=a.coordinateSystem;o&&o.getRoamTransform&&(this.group.transform=clone$4(o.getRoamTransform()),this.group.decomposeTransform())},r.prototype.remove=function(a,o){this._symbolDraw&&this._symbolDraw.remove(!0)},r.type="effectScatter",r}(ChartView),EffectScatterSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.hasSymbolVisual=!0,a}return r.prototype.getInitialData=function(a,o){return createSeriesData(null,this,{useEncodeDefaulter:!0})},r.prototype.brushSelector=function(a,o,s){return s.point(o.getItemLayout(a))},r.type="series.effectScatter",r.dependencies=["grid","polar"],r.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},r}(SeriesModel);function install$z(n){n.registerChartView(EffectScatterView),n.registerSeriesModel(EffectScatterSeriesModel),n.registerLayout(pointsLayout("effectScatter"))}var EffectLine=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this)||this;return l.add(l.createLine(a,o,s)),l._updateEffectSymbol(a,o),l}return r.prototype.createLine=function(a,o,s){return new Line(a,o,s)},r.prototype._updateEffectSymbol=function(a,o){var s=a.getItemModel(o),l=s.getModel("effect"),u=l.get("symbolSize"),c=l.get("symbol");isArray$1(u)||(u=[u,u]);var d=a.getItemVisual(o,"style"),f=l.get("color")||d&&d.stroke,p=this.childAt(1);this._symbolType!==c&&(this.remove(p),p=createSymbol$1(c,-.5,-.5,1,1,f),p.z2=100,p.culling=!0,this.add(p)),p&&(p.setStyle("shadowColor",f),p.setStyle(l.getItemStyle(["color"])),p.scaleX=u[0],p.scaleY=u[1],p.setColor(f),this._symbolType=c,this._symbolScale=u,this._updateEffectAnimation(a,l,o))},r.prototype._updateEffectAnimation=function(a,o,s){var l=this.childAt(1);if(l){var u=a.getItemLayout(s),c=o.get("period")*1e3,d=o.get("loop"),f=o.get("roundTrip"),p=o.get("constantSpeed"),v=retrieve(o.get("delay"),function(y){return y/a.count()*c/3});if(l.ignore=!0,this._updateAnimationPoints(l,u),p>0&&(c=this._getLineLength(l)/p*1e3),c!==this._period||d!==this._loop||f!==this._roundTrip){l.stopAnimation();var g=void 0;isFunction(v)?g=v(s):g=v,l.__t>0&&(g=-c*l.__t),this._animateSymbol(l,c,g,d,f)}this._period=c,this._loop=d,this._roundTrip=f}},r.prototype._animateSymbol=function(a,o,s,l,u){if(o>0){a.__t=0;var c=this,d=a.animate("",l).when(u?o*2:o,{__t:u?2:1}).delay(s).during(function(){c._updateSymbolPosition(a)});l||d.done(function(){c.remove(a)}),d.start()}},r.prototype._getLineLength=function(a){return dist$1(a.__p1,a.__cp1)+dist$1(a.__cp1,a.__p2)},r.prototype._updateAnimationPoints=function(a,o){a.__p1=o[0],a.__p2=o[1],a.__cp1=o[2]||[(o[0][0]+o[1][0])/2,(o[0][1]+o[1][1])/2]},r.prototype.updateData=function(a,o,s){this.childAt(0).updateData(a,o,s),this._updateEffectSymbol(a,o)},r.prototype._updateSymbolPosition=function(a){var o=a.__p1,s=a.__p2,l=a.__cp1,u=a.__t<1?a.__t:2-a.__t,c=[a.x,a.y],d=c.slice(),f=quadraticAt$1,p=quadraticDerivativeAt;c[0]=f(o[0],l[0],s[0],u),c[1]=f(o[1],l[1],s[1],u);var v=a.__t<1?p(o[0],l[0],s[0],u):p(s[0],l[0],o[0],1-u),g=a.__t<1?p(o[1],l[1],s[1],u):p(s[1],l[1],o[1],1-u);a.rotation=-Math.atan2(g,v)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(a.__lastT!==void 0&&a.__lastT<a.__t?(a.scaleY=dist$1(d,c)*1.05,u===1&&(c[0]=d[0]+(c[0]-d[0])/2,c[1]=d[1]+(c[1]-d[1])/2)):a.__lastT===1?a.scaleY=2*dist$1(o,c):a.scaleY=this._symbolScale[1]),a.__lastT=a.__t,a.ignore=!1,a.x=c[0],a.y=c[1]},r.prototype.updateLayout=function(a,o){this.childAt(0).updateLayout(a,o);var s=a.getItemModel(o).getModel("effect");this._updateEffectAnimation(a,s,o)},r}(Group$3),Polyline=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this)||this;return l._createPolyline(a,o,s),l}return r.prototype._createPolyline=function(a,o,s){var l=a.getItemLayout(o),u=new Polyline$1({shape:{points:l}});this.add(u),this._updateCommonStl(a,o,s)},r.prototype.updateData=function(a,o,s){var l=a.hostModel,u=this.childAt(0),c={shape:{points:a.getItemLayout(o)}};updateProps$1(u,c,l,o),this._updateCommonStl(a,o,s)},r.prototype._updateCommonStl=function(a,o,s){var l=this.childAt(0),u=a.getItemModel(o),c=s&&s.emphasisLineStyle,d=s&&s.focus,f=s&&s.blurScope,p=s&&s.emphasisDisabled;if(!s||a.hasItemOption){var v=u.getModel("emphasis");c=v.getModel("lineStyle").getLineStyle(),p=v.get("disabled"),d=v.get("focus"),f=v.get("blurScope")}l.useStyle(a.getItemVisual(o,"style")),l.style.fill=null,l.style.strokeNoScale=!0;var g=l.ensureState("emphasis");g.style=c,toggleHoverEmphasis(this,d,f,p)},r.prototype.updateLayout=function(a,o){var s=this.childAt(0);s.setShape("points",a.getItemLayout(o))},r}(Group$3),EffectPolyline=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a._lastFrame=0,a._lastFramePercent=0,a}return r.prototype.createLine=function(a,o,s){return new Polyline(a,o,s)},r.prototype._updateAnimationPoints=function(a,o){this._points=o;for(var s=[0],l=0,u=1;u<o.length;u++){var c=o[u-1],d=o[u];l+=dist$1(c,d),s.push(l)}if(l===0){this._length=0;return}for(var u=0;u<s.length;u++)s[u]/=l;this._offsets=s,this._length=l},r.prototype._getLineLength=function(){return this._length},r.prototype._updateSymbolPosition=function(a){var o=a.__t<1?a.__t:2-a.__t,s=this._points,l=this._offsets,u=s.length;if(l){var c=this._lastFrame,d;if(o<this._lastFramePercent){var f=Math.min(c+1,u-1);for(d=f;d>=0&&!(l[d]<=o);d--);d=Math.min(d,u-2)}else{for(d=c;d<u&&!(l[d]>o);d++);d=Math.min(d-1,u-2)}var p=(o-l[d])/(l[d+1]-l[d]),v=s[d],g=s[d+1];a.x=v[0]*(1-p)+p*g[0],a.y=v[1]*(1-p)+p*g[1];var y=a.__t<1?g[0]-v[0]:v[0]-g[0],_=a.__t<1?g[1]-v[1]:v[1]-g[1];a.rotation=-Math.atan2(_,y)-Math.PI/2,this._lastFrame=d,this._lastFramePercent=o,a.ignore=!1}},r}(EffectLine),LargeLinesPathShape=function(){function n(){this.polyline=!1,this.curveness=0,this.segs=[]}return n}(),LargeLinesPath=function(n){__extends(r,n);function r(a){var o=n.call(this,a)||this;return o._off=0,o.hoverDataIdx=-1,o}return r.prototype.reset=function(){this.notClear=!1,this._off=0},r.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},r.prototype.getDefaultShape=function(){return new LargeLinesPathShape},r.prototype.buildPath=function(a,o){var s=o.segs,l=o.curveness,u;if(o.polyline)for(u=this._off;u<s.length;){var c=s[u++];if(c>0){a.moveTo(s[u++],s[u++]);for(var d=1;d<c;d++)a.lineTo(s[u++],s[u++])}}else for(u=this._off;u<s.length;){var f=s[u++],p=s[u++],v=s[u++],g=s[u++];if(a.moveTo(f,p),l>0){var y=(f+v)/2-(p-g)*l,_=(p+g)/2-(v-f)*l;a.quadraticCurveTo(y,_,v,g)}else a.lineTo(v,g)}this.incremental&&(this._off=u,this.notClear=!0)},r.prototype.findDataIndex=function(a,o){var s=this.shape,l=s.segs,u=s.curveness,c=this.style.lineWidth;if(s.polyline)for(var d=0,f=0;f<l.length;){var p=l[f++];if(p>0)for(var v=l[f++],g=l[f++],y=1;y<p;y++){var _=l[f++],S=l[f++];if(containStroke$4(v,g,_,S,c,a,o))return d}d++}else for(var d=0,f=0;f<l.length;){var v=l[f++],g=l[f++],_=l[f++],S=l[f++];if(u>0){var b=(v+_)/2-(g-S)*u,x=(g+S)/2-(_-v)*u;if(containStroke$2(v,g,b,x,_,S,c,a,o))return d}else if(containStroke$4(v,g,_,S,c,a,o))return d;d++}return-1},r.prototype.contain=function(a,o){var s=this.transformCoordToLocal(a,o),l=this.getBoundingRect();if(a=s[0],o=s[1],l.contain(a,o)){var u=this.hoverDataIdx=this.findDataIndex(a,o);return u>=0}return this.hoverDataIdx=-1,!1},r.prototype.getBoundingRect=function(){var a=this._rect;if(!a){for(var o=this.shape,s=o.segs,l=1/0,u=1/0,c=-1/0,d=-1/0,f=0;f<s.length;){var p=s[f++],v=s[f++];l=Math.min(p,l),c=Math.max(p,c),u=Math.min(v,u),d=Math.max(v,d)}a=this._rect=new BoundingRect(l,u,c,d)}return a},r}(Path),LargeLineDraw=function(){function n(){this.group=new Group$3}return n.prototype.updateData=function(r){this._clear();var a=this._create();a.setShape({segs:r.getLayout("linesPoints")}),this._setCommon(a,r)},n.prototype.incrementalPrepareUpdate=function(r){this.group.removeAll(),this._clear()},n.prototype.incrementalUpdate=function(r,a){var o=this._newAdded[0],s=a.getLayout("linesPoints"),l=o&&o.shape.segs;if(l&&l.length<2e4){var u=l.length,c=new Float32Array(u+s.length);c.set(l),c.set(s,u),o.setShape({segs:c})}else{this._newAdded=[];var d=this._create();d.incremental=!0,d.setShape({segs:s}),this._setCommon(d,a),d.__startIndex=r.start}},n.prototype.remove=function(){this._clear()},n.prototype.eachRendered=function(r){this._newAdded[0]&&r(this._newAdded[0])},n.prototype._create=function(){var r=new LargeLinesPath({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(r),this.group.add(r),r},n.prototype._setCommon=function(r,a,o){var s=a.hostModel;r.setShape({polyline:s.get("polyline"),curveness:s.get(["lineStyle","curveness"])}),r.useStyle(s.getModel("lineStyle").getLineStyle()),r.style.strokeNoScale=!0;var l=a.getVisual("style");l&&l.stroke&&r.setStyle("stroke",l.stroke),r.setStyle("fill",null);var u=getECData(r);u.seriesIndex=s.seriesIndex,r.on("mousemove",function(c){u.dataIndex=null;var d=r.hoverDataIdx;d>0&&(u.dataIndex=d+r.__startIndex)})},n.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},n}(),linesLayout={seriesType:"lines",plan:createRenderPlanner(),reset:function(n){var r=n.coordinateSystem;if(r){var a=n.get("polyline"),o=n.pipelineContext.large;return{progress:function(s,l){var u=[];if(o){var c=void 0,d=s.end-s.start;if(a){for(var f=0,p=s.start;p<s.end;p++)f+=n.getLineCoordsCount(p);c=new Float32Array(d+f*2)}else c=new Float32Array(d*4);for(var v=0,g=[],p=s.start;p<s.end;p++){var y=n.getLineCoords(p,u);a&&(c[v++]=y);for(var _=0;_<y;_++)g=r.dataToPoint(u[_],!1,g),c[v++]=g[0],c[v++]=g[1]}l.setLayout("linesPoints",c)}else for(var p=s.start;p<s.end;p++){var S=l.getItemModel(p),y=n.getLineCoords(p,u),b=[];if(a)for(var x=0;x<y;x++)b.push(r.dataToPoint(u[x]));else{b[0]=r.dataToPoint(u[0]),b[1]=r.dataToPoint(u[1]);var A=S.get(["lineStyle","curveness"]);+A&&(b[2]=[(b[0][0]+b[1][0])/2-(b[0][1]-b[1][1])*A,(b[0][1]+b[1][1])/2-(b[1][0]-b[0][0])*A])}l.setItemLayout(p,b)}}}}}},LinesView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){var l=a.getData(),u=this._updateLineDraw(l,a),c=a.get("zlevel"),d=a.get(["effect","trailLength"]),f=s.getZr(),p=f.painter.getType()==="svg";p||f.painter.getLayer(c).clear(!0),this._lastZlevel!=null&&!p&&f.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(a)&&d>0&&(p||f.configLayer(c,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(d/10+.9,1),0)})),u.updateData(l);var v=a.get("clip",!0)&&createClipPath(a.coordinateSystem,!1,a);v?this.group.setClipPath(v):this.group.removeClipPath(),this._lastZlevel=c,this._finished=!0},r.prototype.incrementalPrepareRender=function(a,o,s){var l=a.getData(),u=this._updateLineDraw(l,a);u.incrementalPrepareUpdate(l),this._clearLayer(s),this._finished=!1},r.prototype.incrementalRender=function(a,o,s){this._lineDraw.incrementalUpdate(a,o.getData()),this._finished=a.end===o.getData().count()},r.prototype.eachRendered=function(a){this._lineDraw&&this._lineDraw.eachRendered(a)},r.prototype.updateTransform=function(a,o,s){var l=a.getData(),u=a.pipelineContext;if(!this._finished||u.large||u.progressiveRender)return{update:!0};var c=linesLayout.reset(a,o,s);c.progress&&c.progress({start:0,end:l.count(),count:l.count()},l),this._lineDraw.updateLayout(),this._clearLayer(s)},r.prototype._updateLineDraw=function(a,o){var s=this._lineDraw,l=this._showEffect(o),u=!!o.get("polyline"),c=o.pipelineContext,d=c.large;return(!s||l!==this._hasEffet||u!==this._isPolyline||d!==this._isLargeDraw)&&(s&&s.remove(),s=this._lineDraw=d?new LargeLineDraw:new LineDraw(u?l?EffectPolyline:Polyline:l?EffectLine:Line),this._hasEffet=l,this._isPolyline=u,this._isLargeDraw=d),this.group.add(s.group),s},r.prototype._showEffect=function(a){return!!a.get(["effect","show"])},r.prototype._clearLayer=function(a){var o=a.getZr(),s=o.painter.getType()==="svg";!s&&this._lastZlevel!=null&&o.painter.getLayer(this._lastZlevel).clear(!0)},r.prototype.remove=function(a,o){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(o)},r.prototype.dispose=function(a,o){this.remove(a,o)},r.type="lines",r}(ChartView),Uint32Arr=typeof Uint32Array>"u"?Array:Uint32Array,Float64Arr=typeof Float64Array>"u"?Array:Float64Array;function compatEc2(n){var r=n.data;r&&r[0]&&r[0][0]&&r[0][0].coord&&(n.data=map$1(r,function(a){var o=[a[0].coord,a[1].coord],s={coords:o};return a[0].name&&(s.fromName=a[0].name),a[1].name&&(s.toName=a[1].name),mergeAll([s,a[0],a[1]])}))}var LinesSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.visualStyleAccessPath="lineStyle",a.visualDrawType="stroke",a}return r.prototype.init=function(a){a.data=a.data||[],compatEc2(a);var o=this._processFlatCoordsArray(a.data);this._flatCoords=o.flatCoords,this._flatCoordsOffset=o.flatCoordsOffset,o.flatCoords&&(a.data=new Float32Array(o.count)),n.prototype.init.apply(this,arguments)},r.prototype.mergeOption=function(a){if(compatEc2(a),a.data){var o=this._processFlatCoordsArray(a.data);this._flatCoords=o.flatCoords,this._flatCoordsOffset=o.flatCoordsOffset,o.flatCoords&&(a.data=new Float32Array(o.count))}n.prototype.mergeOption.apply(this,arguments)},r.prototype.appendData=function(a){var o=this._processFlatCoordsArray(a.data);o.flatCoords&&(this._flatCoords?(this._flatCoords=concatArray(this._flatCoords,o.flatCoords),this._flatCoordsOffset=concatArray(this._flatCoordsOffset,o.flatCoordsOffset)):(this._flatCoords=o.flatCoords,this._flatCoordsOffset=o.flatCoordsOffset),a.data=new Float32Array(o.count)),this.getRawData().appendData(a.data)},r.prototype._getCoordsFromItemModel=function(a){var o=this.getData().getItemModel(a),s=o.option instanceof Array?o.option:o.getShallow("coords");return s},r.prototype.getLineCoordsCount=function(a){return this._flatCoordsOffset?this._flatCoordsOffset[a*2+1]:this._getCoordsFromItemModel(a).length},r.prototype.getLineCoords=function(a,o){if(this._flatCoordsOffset){for(var s=this._flatCoordsOffset[a*2],l=this._flatCoordsOffset[a*2+1],u=0;u<l;u++)o[u]=o[u]||[],o[u][0]=this._flatCoords[s+u*2],o[u][1]=this._flatCoords[s+u*2+1];return l}else{for(var c=this._getCoordsFromItemModel(a),u=0;u<c.length;u++)o[u]=o[u]||[],o[u][0]=c[u][0],o[u][1]=c[u][1];return c.length}},r.prototype._processFlatCoordsArray=function(a){var o=0;if(this._flatCoords&&(o=this._flatCoords.length),isNumber(a[0])){for(var s=a.length,l=new Uint32Arr(s),u=new Float64Arr(s),c=0,d=0,f=0,p=0;p<s;){f++;var v=a[p++];l[d++]=c+o,l[d++]=v;for(var g=0;g<v;g++){var y=a[p++],_=a[p++];u[c++]=y,u[c++]=_}}return{flatCoordsOffset:new Uint32Array(l.buffer,0,d),flatCoords:u,count:f}}return{flatCoordsOffset:null,flatCoords:null,count:a.length}},r.prototype.getInitialData=function(a,o){var s=new SeriesData(["value"],this);return s.hasItemOption=!1,s.initData(a.data,[],function(l,u,c,d){if(l instanceof Array)return NaN;s.hasItemOption=!0;var f=l.value;if(f!=null)return f instanceof Array?f[d]:f}),s},r.prototype.formatTooltip=function(a,o,s){var l=this.getData(),u=l.getItemModel(a),c=u.get("name");if(c)return c;var d=u.get("fromName"),f=u.get("toName"),p=[];return d!=null&&p.push(d),f!=null&&p.push(f),createTooltipMarkup("nameValue",{name:p.join(" > ")})},r.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},r.prototype.getProgressive=function(){var a=this.option.progressive;return a==null?this.option.large?1e4:this.get("progressive"):a},r.prototype.getProgressiveThreshold=function(){var a=this.option.progressiveThreshold;return a==null?this.option.large?2e4:this.get("progressiveThreshold"):a},r.prototype.getZLevelKey=function(){var a=this.getModel("effect"),o=a.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:a.get("show")&&o>0?o+"":""},r.type="series.lines",r.dependencies=["grid","polar","geo","calendar"],r.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}},r}(SeriesModel);function normalize(n){return n instanceof Array||(n=[n,n]),n}var linesVisual={seriesType:"lines",reset:function(n){var r=normalize(n.get("symbol")),a=normalize(n.get("symbolSize")),o=n.getData();o.setVisual("fromSymbol",r&&r[0]),o.setVisual("toSymbol",r&&r[1]),o.setVisual("fromSymbolSize",a&&a[0]),o.setVisual("toSymbolSize",a&&a[1]);function s(l,u){var c=l.getItemModel(u),d=normalize(c.getShallow("symbol",!0)),f=normalize(c.getShallow("symbolSize",!0));d[0]&&l.setItemVisual(u,"fromSymbol",d[0]),d[1]&&l.setItemVisual(u,"toSymbol",d[1]),f[0]&&l.setItemVisual(u,"fromSymbolSize",f[0]),f[1]&&l.setItemVisual(u,"toSymbolSize",f[1])}return{dataEach:o.hasItemOption?s:null}}};function install$y(n){n.registerChartView(LinesView),n.registerSeriesModel(LinesSeriesModel),n.registerLayout(linesLayout),n.registerVisual(linesVisual)}var GRADIENT_LEVELS=256,HeatmapLayer=function(){function n(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var r=platformApi.createCanvas();this.canvas=r}return n.prototype.update=function(r,a,o,s,l,u){var c=this._getBrush(),d=this._getGradient(l,"inRange"),f=this._getGradient(l,"outOfRange"),p=this.pointSize+this.blurSize,v=this.canvas,g=v.getContext("2d"),y=r.length;v.width=a,v.height=o;for(var _=0;_<y;++_){var S=r[_],b=S[0],x=S[1],A=S[2],w=s(A);g.globalAlpha=w,g.drawImage(c,b-p,x-p)}if(!v.width||!v.height)return v;for(var E=g.getImageData(0,0,v.width,v.height),D=E.data,C=0,$=D.length,P=this.minOpacity,M=this.maxOpacity,I=M-P;C<$;){var w=D[C+3]/256,L=Math.floor(w*(GRADIENT_LEVELS-1))*4;if(w>0){var O=u(w)?d:f;w>0&&(w=w*I+P),D[C++]=O[L],D[C++]=O[L+1],D[C++]=O[L+2],D[C++]=O[L+3]*w*256}else C+=4}return g.putImageData(E,0,0),v},n.prototype._getBrush=function(){var r=this._brushCanvas||(this._brushCanvas=platformApi.createCanvas()),a=this.pointSize+this.blurSize,o=a*2;r.width=o,r.height=o;var s=r.getContext("2d");return s.clearRect(0,0,o,o),s.shadowOffsetX=o,s.shadowBlur=this.blurSize,s.shadowColor="#000",s.beginPath(),s.arc(-a,a,this.pointSize,0,Math.PI*2,!0),s.closePath(),s.fill(),r},n.prototype._getGradient=function(r,a){for(var o=this._gradientPixels,s=o[a]||(o[a]=new Uint8ClampedArray(256*4)),l=[0,0,0,0],u=0,c=0;c<256;c++)r[a](c/255,!0,l),s[u++]=l[0],s[u++]=l[1],s[u++]=l[2],s[u++]=l[3];return s},n}();function getIsInPiecewiseRange(n,r,a){var o=n[1]-n[0];r=map$1(r,function(u){return{interval:[(u.interval[0]-n[0])/o,(u.interval[1]-n[0])/o]}});var s=r.length,l=0;return function(u){var c;for(c=l;c<s;c++){var d=r[c].interval;if(d[0]<=u&&u<=d[1]){l=c;break}}if(c===s)for(c=l-1;c>=0;c--){var d=r[c].interval;if(d[0]<=u&&u<=d[1]){l=c;break}}return c>=0&&c<s&&a[c]}}function getIsInContinuousRange(n,r){var a=n[1]-n[0];return r=[(r[0]-n[0])/a,(r[1]-n[0])/a],function(o){return o>=r[0]&&o<=r[1]}}function isGeoCoordSys(n){var r=n.dimensions;return r[0]==="lng"&&r[1]==="lat"}var HeatmapView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){var l;o.eachComponent("visualMap",function(c){c.eachTargetSeries(function(d){d===a&&(l=c)})}),this._progressiveEls=null,this.group.removeAll();var u=a.coordinateSystem;u.type==="cartesian2d"||u.type==="calendar"?this._renderOnCartesianAndCalendar(a,s,0,a.getData().count()):isGeoCoordSys(u)&&this._renderOnGeo(u,a,l,s)},r.prototype.incrementalPrepareRender=function(a,o,s){this.group.removeAll()},r.prototype.incrementalRender=function(a,o,s,l){var u=o.coordinateSystem;u&&(isGeoCoordSys(u)?this.render(o,s,l):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(o,l,a.start,a.end,!0)))},r.prototype.eachRendered=function(a){traverseElements(this._progressiveEls||this.group,a)},r.prototype._renderOnCartesianAndCalendar=function(a,o,s,l,u){var c=a.coordinateSystem,d=isCoordinateSystemType(c,"cartesian2d"),f,p,v,g;if(d){var y=c.getAxis("x"),_=c.getAxis("y");f=y.getBandWidth()+.5,p=_.getBandWidth()+.5,v=y.scale.getExtent(),g=_.scale.getExtent()}for(var S=this.group,b=a.getData(),x=a.getModel(["emphasis","itemStyle"]).getItemStyle(),A=a.getModel(["blur","itemStyle"]).getItemStyle(),w=a.getModel(["select","itemStyle"]).getItemStyle(),E=a.get(["itemStyle","borderRadius"]),D=getLabelStatesModels(a),C=a.getModel("emphasis"),$=C.get("focus"),P=C.get("blurScope"),M=C.get("disabled"),I=d?[b.mapDimension("x"),b.mapDimension("y"),b.mapDimension("value")]:[b.mapDimension("time"),b.mapDimension("value")],L=s;L<l;L++){var O=void 0,R=b.getItemVisual(L,"style");if(d){var N=b.get(I[0],L),V=b.get(I[1],L);if(isNaN(b.get(I[2],L))||isNaN(N)||isNaN(V)||N<v[0]||N>v[1]||V<g[0]||V>g[1])continue;var F=c.dataToPoint([N,V]);O=new Rect$2({shape:{x:F[0]-f/2,y:F[1]-p/2,width:f,height:p},style:R})}else{if(isNaN(b.get(I[1],L)))continue;O=new Rect$2({z2:1,shape:c.dataToRect([b.get(I[0],L)]).contentShape,style:R})}if(b.hasItemOption){var U=b.getItemModel(L),H=U.getModel("emphasis");x=H.getModel("itemStyle").getItemStyle(),A=U.getModel(["blur","itemStyle"]).getItemStyle(),w=U.getModel(["select","itemStyle"]).getItemStyle(),E=U.get(["itemStyle","borderRadius"]),$=H.get("focus"),P=H.get("blurScope"),M=H.get("disabled"),D=getLabelStatesModels(U)}O.shape.r=E;var W=a.getRawValue(L),G="-";W&&W[2]!=null&&(G=W[2]+""),setLabelStyle(O,D,{labelFetcher:a,labelDataIndex:L,defaultOpacity:R.opacity,defaultText:G}),O.ensureState("emphasis").style=x,O.ensureState("blur").style=A,O.ensureState("select").style=w,toggleHoverEmphasis(O,$,P,M),O.incremental=u,u&&(O.states.emphasis.hoverLayer=!0),S.add(O),b.setItemGraphicEl(L,O),this._progressiveEls&&this._progressiveEls.push(O)}},r.prototype._renderOnGeo=function(a,o,s,l){var u=s.targetVisuals.inRange,c=s.targetVisuals.outOfRange,d=o.getData(),f=this._hmLayer||this._hmLayer||new HeatmapLayer;f.blurSize=o.get("blurSize"),f.pointSize=o.get("pointSize"),f.minOpacity=o.get("minOpacity"),f.maxOpacity=o.get("maxOpacity");var p=a.getViewRect().clone(),v=a.getRoamTransform();p.applyTransform(v);var g=Math.max(p.x,0),y=Math.max(p.y,0),_=Math.min(p.width+p.x,l.getWidth()),S=Math.min(p.height+p.y,l.getHeight()),b=_-g,x=S-y,A=[d.mapDimension("lng"),d.mapDimension("lat"),d.mapDimension("value")],w=d.mapArray(A,function($,P,M){var I=a.dataToPoint([$,P]);return I[0]-=g,I[1]-=y,I.push(M),I}),E=s.getExtent(),D=s.type==="visualMap.continuous"?getIsInContinuousRange(E,s.option.range):getIsInPiecewiseRange(E,s.getPieceList(),s.option.selected);f.update(w,b,x,u.color.getNormalizer(),{inRange:u.color.getColorMapper(),outOfRange:c.color.getColorMapper()},D);var C=new ZRImage({style:{width:b,height:x,x:g,y,image:f.canvas},silent:!0});this.group.add(C)},r.type="heatmap",r}(ChartView),HeatmapSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.getInitialData=function(a,o){return createSeriesData(null,this,{generateCoord:"value"})},r.prototype.preventIncremental=function(){var a=CoordinateSystemManager.get(this.get("coordinateSystem"));if(a&&a.dimensions)return a.dimensions[0]==="lng"&&a.dimensions[1]==="lat"},r.type="series.heatmap",r.dependencies=["grid","geo","calendar"],r.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},r}(SeriesModel);function install$x(n){n.registerChartView(HeatmapView),n.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(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){var l=this.group,u=a.getData(),c=this._data,d=a.coordinateSystem,f=d.getBaseAxis(),p=f.isHorizontal(),v=d.master.getRect(),g={ecSize:{width:s.getWidth(),height:s.getHeight()},seriesModel:a,coordSys:d,coordSysExtent:[[v.x,v.x+v.width],[v.y,v.y+v.height]],isHorizontal:p,valueDim:LAYOUT_ATTRS[+p],categoryDim:LAYOUT_ATTRS[1-+p]};u.diff(c).add(function(_){if(u.hasValue(_)){var S=getItemModel(u,_),b=getSymbolMeta(u,_,S,g),x=createBar(u,g,b);u.setItemGraphicEl(_,x),l.add(x),updateCommon(x,g,b)}}).update(function(_,S){var b=c.getItemGraphicEl(S);if(!u.hasValue(_)){l.remove(b);return}var x=getItemModel(u,_),A=getSymbolMeta(u,_,x,g),w=getShapeStr(u,A);b&&w!==b.__pictorialShapeStr&&(l.remove(b),u.setItemGraphicEl(_,null),b=null),b?updateBar(b,g,A):b=createBar(u,g,A,!0),u.setItemGraphicEl(_,b),b.__pictorialSymbolMeta=A,l.add(b),updateCommon(b,g,A)}).remove(function(_){var S=c.getItemGraphicEl(_);S&&removeBar(c,_,S.__pictorialSymbolMeta.animationModel,S)}).execute();var y=a.get("clip",!0)?createClipPath(a.coordinateSystem,!1,a):null;return y?l.setClipPath(y):l.removeClipPath(),this._data=u,this.group},r.prototype.remove=function(a,o){var s=this.group,l=this._data;a.get("animation")?l&&l.eachItemGraphicEl(function(u){removeBar(l,getECData(u).dataIndex,a,u)}):s.removeAll()},r.type="pictorialBar",r}(ChartView);function getSymbolMeta(n,r,a,o){var s=n.getItemLayout(r),l=a.get("symbolRepeat"),u=a.get("symbolClip"),c=a.get("symbolPosition")||"start",d=a.get("symbolRotate"),f=(d||0)*Math.PI/180||0,p=a.get("symbolPatternSize")||2,v=a.isAnimationEnabled(),g={dataIndex:r,layout:s,itemModel:a,symbolType:n.getItemVisual(r,"symbol")||"circle",style:n.getItemVisual(r,"style"),symbolClip:u,symbolRepeat:l,symbolRepeatDirection:a.get("symbolRepeatDirection"),symbolPatternSize:p,rotation:f,animationModel:v?a:null,hoverScale:v&&a.get(["emphasis","scale"]),z2:a.getShallow("z",!0)||0};prepareBarLength(a,l,s,o,g),prepareSymbolSize(n,r,s,l,u,g.boundingLength,g.pxSign,p,o,g),prepareLineWidth(a,g.symbolScale,f,o,g);var y=g.symbolSize,_=normalizeSymbolOffset(a.get("symbolOffset"),y);return prepareLayoutInfo(a,y,s,l,u,_,c,g.valueLineWidth,g.boundingLength,g.repeatCutLength,o,g),g}function prepareBarLength(n,r,a,o,s){var l=o.valueDim,u=n.get("symbolBoundingData"),c=o.coordSys.getOtherAxis(o.coordSys.getBaseAxis()),d=c.toGlobalCoord(c.dataToCoord(0)),f=1-+(a[l.wh]<=0),p;if(isArray$1(u)){var v=[convertToCoordOnAxis(c,u[0])-d,convertToCoordOnAxis(c,u[1])-d];v[1]<v[0]&&v.reverse(),p=v[f]}else u!=null?p=convertToCoordOnAxis(c,u)-d:r?p=o.coordSysExtent[l.index][f]-d:p=a[l.wh];s.boundingLength=p,r&&(s.repeatCutLength=a[l.wh]);var g=l.xy==="x",y=c.inverse;s.pxSign=g&&!y||!g&&y?p>=0?1:-1:p>0?1:-1}function convertToCoordOnAxis(n,r){return n.toGlobalCoord(n.dataToCoord(n.scale.parse(r)))}function prepareSymbolSize(n,r,a,o,s,l,u,c,d,f){var p=d.valueDim,v=d.categoryDim,g=Math.abs(a[v.wh]),y=n.getItemVisual(r,"symbolSize"),_;isArray$1(y)?_=y.slice():y==null?_=["100%","100%"]:_=[y,y],_[v.index]=parsePercent(_[v.index],g),_[p.index]=parsePercent(_[p.index],o?g:Math.abs(l)),f.symbolSize=_;var S=f.symbolScale=[_[0]/c,_[1]/c];S[p.index]*=(d.isHorizontal?-1:1)*u}function prepareLineWidth(n,r,a,o,s){var l=n.get(BAR_BORDER_WIDTH_QUERY)||0;l&&(pathForLineWidth.attr({scaleX:r[0],scaleY:r[1],rotation:a}),pathForLineWidth.updateTransform(),l/=pathForLineWidth.getLineScale(),l*=r[o.valueDim.index]),s.valueLineWidth=l||0}function prepareLayoutInfo(n,r,a,o,s,l,u,c,d,f,p,v){var g=p.categoryDim,y=p.valueDim,_=v.pxSign,S=Math.max(r[y.index]+c,0),b=S;if(o){var x=Math.abs(d),A=retrieve(n.get("symbolMargin"),"15%")+"",w=!1;A.lastIndexOf("!")===A.length-1&&(w=!0,A=A.slice(0,A.length-1));var E=parsePercent(A,r[y.index]),D=Math.max(S+E*2,0),C=w?0:E*2,$=isNumeric(o),P=$?o:toIntTimes((x+C)/D),M=x-P*S;E=M/2/(w?P:Math.max(P-1,1)),D=S+E*2,C=w?0:E*2,!$&&o!=="fixed"&&(P=f?toIntTimes((Math.abs(f)+C)/D):0),b=P*D-C,v.repeatTimes=P,v.symbolMargin=E}var I=_*(b/2),L=v.pathPosition=[];L[g.index]=a[g.wh]/2,L[y.index]=u==="start"?I:u==="end"?d-I:d/2,l&&(L[0]+=l[0],L[1]+=l[1]);var O=v.bundlePosition=[];O[g.index]=a[g.xy],O[y.index]=a[y.xy];var R=v.barRectShape=extend$2({},a);R[y.wh]=_*Math.max(Math.abs(a[y.wh]),Math.abs(L[y.index]+I)),R[g.wh]=a[g.wh];var N=v.clipShape={};N[g.xy]=-a[g.xy],N[g.wh]=p.ecSize[g.wh],N[y.xy]=0,N[y.wh]=a[y.wh]}function createPath(n){var r=n.symbolPatternSize,a=createSymbol$1(n.symbolType,-r/2,-r/2,r,r);return a.attr({culling:!0}),a.type!=="image"&&a.setStyle({strokeNoScale:!0}),a}function createOrUpdateRepeatSymbols(n,r,a,o){var s=n.__pictorialBundle,l=a.symbolSize,u=a.valueLineWidth,c=a.pathPosition,d=r.valueDim,f=a.repeatTimes||0,p=0,v=l[r.valueDim.index]+u+a.symbolMargin*2;for(eachPath(n,function(S){S.__pictorialAnimationIndex=p,S.__pictorialRepeatTimes=f,p<f?updateAttr(S,null,_(p),a,o):updateAttr(S,null,{scaleX:0,scaleY:0},a,o,function(){s.remove(S)}),p++});p<f;p++){var g=createPath(a);g.__pictorialAnimationIndex=p,g.__pictorialRepeatTimes=f,s.add(g);var y=_(p);updateAttr(g,{x:y.x,y:y.y,scaleX:0,scaleY:0},{scaleX:y.scaleX,scaleY:y.scaleY,rotation:y.rotation},a,o)}function _(S){var b=c.slice(),x=a.pxSign,A=S;return(a.symbolRepeatDirection==="start"?x>0:x<0)&&(A=f-1-S),b[d.index]=v*(A-f/2+.5)+c[d.index],{x:b[0],y:b[1],scaleX:a.symbolScale[0],scaleY:a.symbolScale[1],rotation:a.rotation}}}function createOrUpdateSingleSymbol(n,r,a,o){var s=n.__pictorialBundle,l=n.__pictorialMainPath;l?updateAttr(l,null,{x:a.pathPosition[0],y:a.pathPosition[1],scaleX:a.symbolScale[0],scaleY:a.symbolScale[1],rotation:a.rotation},a,o):(l=n.__pictorialMainPath=createPath(a),s.add(l),updateAttr(l,{x:a.pathPosition[0],y:a.pathPosition[1],scaleX:0,scaleY:0,rotation:a.rotation},{scaleX:a.symbolScale[0],scaleY:a.symbolScale[1]},a,o))}function createOrUpdateBarRect(n,r,a){var o=extend$2({},r.barRectShape),s=n.__pictorialBarRect;s?updateAttr(s,null,{shape:o},r,a):(s=n.__pictorialBarRect=new Rect$2({z2:2,shape:o,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),s.disableMorphing=!0,n.add(s))}function createOrUpdateClip(n,r,a,o){if(a.symbolClip){var s=n.__pictorialClipPath,l=extend$2({},a.clipShape),u=r.valueDim,c=a.animationModel,d=a.dataIndex;if(s)updateProps$1(s,{shape:l},c,d);else{l[u.wh]=0,s=new Rect$2({shape:l}),n.__pictorialBundle.setClipPath(s),n.__pictorialClipPath=s;var f={};f[u.wh]=a.clipShape[u.wh],graphic$1[o?"updateProps":"initProps"](s,{shape:f},c,d)}}}function getItemModel(n,r){var a=n.getItemModel(r);return a.getAnimationDelayParams=getAnimationDelayParams,a.isAnimationEnabled=isAnimationEnabled,a}function getAnimationDelayParams(n){return{index:n.__pictorialAnimationIndex,count:n.__pictorialRepeatTimes}}function isAnimationEnabled(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function createBar(n,r,a,o){var s=new Group$3,l=new Group$3;return s.add(l),s.__pictorialBundle=l,l.x=a.bundlePosition[0],l.y=a.bundlePosition[1],a.symbolRepeat?createOrUpdateRepeatSymbols(s,r,a):createOrUpdateSingleSymbol(s,r,a),createOrUpdateBarRect(s,a,o),createOrUpdateClip(s,r,a,o),s.__pictorialShapeStr=getShapeStr(n,a),s.__pictorialSymbolMeta=a,s}function updateBar(n,r,a){var o=a.animationModel,s=a.dataIndex,l=n.__pictorialBundle;updateProps$1(l,{x:a.bundlePosition[0],y:a.bundlePosition[1]},o,s),a.symbolRepeat?createOrUpdateRepeatSymbols(n,r,a,!0):createOrUpdateSingleSymbol(n,r,a,!0),createOrUpdateBarRect(n,a,!0),createOrUpdateClip(n,r,a,!0)}function removeBar(n,r,a,o){var s=o.__pictorialBarRect;s&&s.removeTextContent();var l=[];eachPath(o,function(u){l.push(u)}),o.__pictorialMainPath&&l.push(o.__pictorialMainPath),o.__pictorialClipPath&&(a=null),each$f(l,function(u){removeElement(u,{scaleX:0,scaleY:0},a,r,function(){o.parent&&o.parent.remove(o)})}),n.setItemGraphicEl(r,null)}function getShapeStr(n,r){return[n.getItemVisual(r.dataIndex,"symbol")||"none",!!r.symbolRepeat,!!r.symbolClip].join(":")}function eachPath(n,r,a){each$f(n.__pictorialBundle.children(),function(o){o!==n.__pictorialBarRect&&r.call(a,o)})}function updateAttr(n,r,a,o,s,l){r&&n.attr(r),o.symbolClip&&!s?a&&n.attr(a):a&&graphic$1[s?"updateProps":"initProps"](n,a,o.animationModel,o.dataIndex,l)}function updateCommon(n,r,a){var o=a.dataIndex,s=a.itemModel,l=s.getModel("emphasis"),u=l.getModel("itemStyle").getItemStyle(),c=s.getModel(["blur","itemStyle"]).getItemStyle(),d=s.getModel(["select","itemStyle"]).getItemStyle(),f=s.getShallow("cursor"),p=l.get("focus"),v=l.get("blurScope"),g=l.get("scale");eachPath(n,function(S){if(S instanceof ZRImage){var b=S.style;S.useStyle(extend$2({image:b.image,x:b.x,y:b.y,width:b.width,height:b.height},a.style))}else S.useStyle(a.style);var x=S.ensureState("emphasis");x.style=u,g&&(x.scaleX=S.scaleX*1.1,x.scaleY=S.scaleY*1.1),S.ensureState("blur").style=c,S.ensureState("select").style=d,f&&(S.cursor=f),S.z2=a.z2});var y=r.valueDim.posDesc[+(a.boundingLength>0)],_=n.__pictorialBarRect;_.ignoreClip=!0,setLabelStyle(_,getLabelStatesModels(s),{labelFetcher:r.seriesModel,labelDataIndex:o,defaultText:getDefaultLabel(r.seriesModel.getData(),o),inheritColor:a.style.fill,defaultOpacity:a.style.opacity,defaultOutsidePosition:y}),toggleHoverEmphasis(n,p,v,l.get("disabled"))}function toIntTimes(n){var r=Math.round(n);return Math.abs(n-r)<1e-4?r:Math.ceil(n)}var PictorialBarSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.hasSymbolVisual=!0,a.defaultSymbol="roundRect",a}return r.prototype.getInitialData=function(a){return a.stack=null,n.prototype.getInitialData.apply(this,arguments)},r.type="series.pictorialBar",r.dependencies=["grid"],r.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:"#212121"}}}),r}(BaseBarSeriesModel);function install$w(n){n.registerChartView(PictorialBarView),n.registerSeriesModel(PictorialBarSeriesModel),n.registerLayout(n.PRIORITY.VISUAL.LAYOUT,curry$1(layout$3,"pictorialBar")),n.registerLayout(n.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,createProgressiveLayout("pictorialBar"))}var ThemeRiverView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a._layers=[],a}return r.prototype.render=function(a,o,s){var l=a.getData(),u=this,c=this.group,d=a.getLayerSeries(),f=l.getLayout("layoutInfo"),p=f.rect,v=f.boundaryGap;c.x=0,c.y=p.y+v[0];function g(b){return b.name}var y=new DataDiffer(this._layersSeries||[],d,g,g),_=[];y.add(bind$1(S,this,"add")).update(bind$1(S,this,"update")).remove(bind$1(S,this,"remove")).execute();function S(b,x,A){var w=u._layers;if(b==="remove"){c.remove(w[x]);return}for(var E=[],D=[],C,$=d[x].indices,P=0;P<$.length;P++){var M=l.getItemLayout($[P]),I=M.x,L=M.y0,O=M.y;E.push(I,L),D.push(I,L+O),C=l.getItemVisual($[P],"style")}var R,N=l.getItemLayout($[0]),V=a.getModel("label"),F=V.get("margin"),U=a.getModel("emphasis");if(b==="add"){var H=_[x]=new Group$3;R=new ECPolygon({shape:{points:E,stackedOnPoints:D,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),H.add(R),c.add(H),a.isAnimationEnabled()&&R.setClipPath(createGridClipShape(R.getBoundingRect(),a,function(){R.removeClipPath()}))}else{var H=w[A];R=H.childAt(0),c.add(H),_[x]=H,updateProps$1(R,{shape:{points:E,stackedOnPoints:D}},a),saveOldStyle(R)}setLabelStyle(R,getLabelStatesModels(a),{labelDataIndex:$[P-1],defaultText:l.getName($[P-1]),inheritColor:C.fill},{normal:{verticalAlign:"middle"}}),R.setTextConfig({position:null,local:!0});var W=R.getTextContent();W&&(W.x=N.x-F,W.y=N.y0+N.y/2),R.useStyle(C),l.setItemGraphicEl(x,R),setStatesStylesFromModel(R,a),toggleHoverEmphasis(R,U.get("focus"),U.get("blurScope"),U.get("disabled"))}this._layersSeries=d,this._layers=_},r.type="themeRiver",r}(ChartView);function createGridClipShape(n,r,a){var o=new Rect$2({shape:{x:n.x-10,y:n.y-10,width:0,height:n.height+20}});return initProps(o,{shape:{x:n.x-50,width:n.width+100,height:n.height+20}},r,a),o}var DATA_NAME_INDEX=2,ThemeRiverSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(a){n.prototype.init.apply(this,arguments),this.legendVisualProvider=new LegendVisualProvider(bind$1(this.getData,this),bind$1(this.getRawData,this))},r.prototype.fixData=function(a){var o=a.length,s={},l=groupData(a,function(g){return s.hasOwnProperty(g[0]+"")||(s[g[0]+""]=-1),g[2]}),u=[];l.buckets.each(function(g,y){u.push({name:y,dataList:g})});for(var c=u.length,d=0;d<c;++d){for(var f=u[d].name,p=0;p<u[d].dataList.length;++p){var v=u[d].dataList[p][0]+"";s[v]=d}for(var v in s)s.hasOwnProperty(v)&&s[v]!==d&&(s[v]=d,a[o]=[v,0,f],o++)}return a},r.prototype.getInitialData=function(a,o){for(var s=this.getReferringComponents("singleAxis",SINGLE_REFERRING).models[0],l=s.get("type"),u=filter(a.data,function(_){return _[2]!==void 0}),c=this.fixData(u||[]),d=[],f=this.nameMap=createHashMap(),p=0,v=0;v<c.length;++v)d.push(c[v][DATA_NAME_INDEX]),f.get(c[v][DATA_NAME_INDEX])||(f.set(c[v][DATA_NAME_INDEX],p),p++);var g=prepareSeriesDataSchema(c,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:getDimensionTypeByAxis(l)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,y=new SeriesData(g,this);return y.initData(c),y},r.prototype.getLayerSeries=function(){for(var a=this.getData(),o=a.count(),s=[],l=0;l<o;++l)s[l]=l;var u=a.mapDimension("single"),c=groupData(s,function(f){return a.get("name",f)}),d=[];return c.buckets.each(function(f,p){f.sort(function(v,g){return a.get(u,v)-a.get(u,g)}),d.push({name:p,indices:f})}),d},r.prototype.getAxisTooltipData=function(a,o,s){isArray$1(a)||(a=a?[a]:[]);for(var l=this.getData(),u=this.getLayerSeries(),c=[],d=u.length,f,p=0;p<d;++p){for(var v=Number.MAX_VALUE,g=-1,y=u[p].indices.length,_=0;_<y;++_){var S=l.get(a[0],u[p].indices[_]),b=Math.abs(S-o);b<=v&&(f=S,v=b,g=u[p].indices[_])}c.push(g)}return{dataIndices:c,nestestValue:f}},r.prototype.formatTooltip=function(a,o,s){var l=this.getData(),u=l.getName(a),c=l.get(l.mapDimension("value"),a);return createTooltipMarkup("nameValue",{name:u,value:c})},r.type="series.themeRiver",r.dependencies=["singleAxis"],r.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}}},r}(SeriesModel);function themeRiverLayout(n,r){n.eachSeriesByType("themeRiver",function(a){var o=a.getData(),s=a.coordinateSystem,l={},u=s.getRect();l.rect=u;var c=a.get("boundaryGap"),d=s.getAxis();if(l.boundaryGap=c,d.orient==="horizontal"){c[0]=parsePercent(c[0],u.height),c[1]=parsePercent(c[1],u.height);var f=u.height-c[0]-c[1];doThemeRiverLayout(o,a,f)}else{c[0]=parsePercent(c[0],u.width),c[1]=parsePercent(c[1],u.width);var p=u.width-c[0]-c[1];doThemeRiverLayout(o,a,p)}o.setLayout("layoutInfo",l)})}function doThemeRiverLayout(n,r,a){if(n.count())for(var o=r.coordinateSystem,s=r.getLayerSeries(),l=n.mapDimension("single"),u=n.mapDimension("value"),c=map$1(s,function(b){return map$1(b.indices,function(x){var A=o.dataToPoint(n.get(l,x));return A[1]=n.get(u,x),A})}),d=computeBaseline(c),f=d.y0,p=a/d.max,v=s.length,g=s[0].indices.length,y,_=0;_<g;++_){y=f[_]*p,n.setItemLayout(s[0].indices[_],{layerIndex:0,x:c[0][_][0],y0:y,y:c[0][_][1]*p});for(var S=1;S<v;++S)y+=c[S-1][_][1]*p,n.setItemLayout(s[S].indices[_],{layerIndex:S,x:c[S][_][0],y0:y,y:c[S][_][1]*p})}}function computeBaseline(n){for(var r=n.length,a=n[0].length,o=[],s=[],l=0,u=0;u<a;++u){for(var c=0,d=0;d<r;++d)c+=n[d][u][1];c>l&&(l=c),o.push(c)}for(var f=0;f<a;++f)s[f]=(l-o[f])/2;l=0;for(var p=0;p<a;++p){var v=o[p]+s[p];v>l&&(l=v)}return{y0:s,max:l}}function install$v(n){n.registerChartView(ThemeRiverView),n.registerSeriesModel(ThemeRiverSeriesModel),n.registerLayout(themeRiverLayout),n.registerProcessor(dataFilter$1("themeRiver"))}var DEFAULT_SECTOR_Z=2,DEFAULT_TEXT_Z=4,SunburstPiece=function(n){__extends(r,n);function r(a,o,s,l){var u=n.call(this)||this;u.z2=DEFAULT_SECTOR_Z,u.textConfig={inside:!0},getECData(u).seriesIndex=o.seriesIndex;var c=new ZRText({z2:DEFAULT_TEXT_Z,silent:a.getModel().get(["label","silent"])});return u.setTextContent(c),u.updateData(!0,a,o,s,l),u}return r.prototype.updateData=function(a,o,s,l,u){this.node=o,o.piece=this,s=s||this._seriesModel,l=l||this._ecModel;var c=this;getECData(c).dataIndex=o.dataIndex;var d=o.getModel(),f=d.getModel("emphasis"),p=o.getLayout(),v=extend$2({},p);v.label=null;var g=o.getVisual("style");g.lineJoin="bevel";var y=o.getVisual("decal");y&&(g.decal=createOrUpdatePatternFromDecal(y,u));var _=getSectorCornerRadius(d.getModel("itemStyle"),v,!0);extend$2(v,_),each$f(SPECIAL_STATES,function(A){var w=c.ensureState(A),E=d.getModel([A,"itemStyle"]);w.style=E.getItemStyle();var D=getSectorCornerRadius(E,v);D&&(w.shape=D)}),a?(c.setShape(v),c.shape.r=p.r0,initProps(c,{shape:{r:p.r}},s,o.dataIndex)):(updateProps$1(c,{shape:v},s),saveOldStyle(c)),c.useStyle(g),this._updateLabel(s);var S=d.getShallow("cursor");S&&c.attr("cursor",S),this._seriesModel=s||this._seriesModel,this._ecModel=l||this._ecModel;var b=f.get("focus"),x=b==="relative"?concatArray(o.getAncestorsIndices(),o.getDescendantIndices()):b==="ancestor"?o.getAncestorsIndices():b==="descendant"?o.getDescendantIndices():b;toggleHoverEmphasis(this,x,f.get("blurScope"),f.get("disabled"))},r.prototype._updateLabel=function(a){var o=this,s=this.node.getModel(),l=s.getModel("label"),u=this.node.getLayout(),c=u.endAngle-u.startAngle,d=(u.startAngle+u.endAngle)/2,f=Math.cos(d),p=Math.sin(d),v=this,g=v.getTextContent(),y=this.node.dataIndex,_=l.get("minAngle")/180*Math.PI,S=l.get("show")&&!(_!=null&&Math.abs(c)<_);g.ignore=!S,each$f(DISPLAY_STATES,function(x){var A=x==="normal"?s.getModel("label"):s.getModel([x,"label"]),w=x==="normal",E=w?g:g.ensureState(x),D=a.getFormattedLabel(y,x);w&&(D=D||o.node.name),E.style=createTextStyle$1(A,{},null,x!=="normal",!0),D&&(E.style.text=D);var C=A.get("show");C!=null&&!w&&(E.ignore=!C);var $=b(A,"position"),P=w?v:v.states[x],M=P.style.fill;P.textConfig={outsideFill:A.get("color")==="inherit"?M:null,inside:$!=="outside"};var I,L=b(A,"distance")||0,O=b(A,"align"),R=b(A,"rotate"),N=Math.PI*.5,V=Math.PI*1.5,F=normalizeRadian(R==="tangential"?Math.PI/2-d:d),U=F>N&&!isRadianAroundZero(F-N)&&F<V;$==="outside"?(I=u.r+L,O=U?"right":"left"):!O||O==="center"?(c===2*Math.PI&&u.r0===0?I=0:I=(u.r+u.r0)/2,O="center"):O==="left"?(I=u.r0+L,O=U?"right":"left"):O==="right"&&(I=u.r-L,O=U?"left":"right"),E.style.align=O,E.style.verticalAlign=b(A,"verticalAlign")||"middle",E.x=I*f+u.cx,E.y=I*p+u.cy;var H=0;R==="radial"?H=normalizeRadian(-d)+(U?Math.PI:0):R==="tangential"?H=normalizeRadian(Math.PI/2-d)+(U?Math.PI:0):isNumber(R)&&(H=R*Math.PI/180),E.rotation=normalizeRadian(H)});function b(x,A){var w=x.get(A);return w==null?l.get(A):w}g.dirtyStyle()},r}(Sector),ROOT_TO_NODE_ACTION="sunburstRootToNode",HIGHLIGHT_ACTION="sunburstHighlight",UNHIGHLIGHT_ACTION="sunburstUnhighlight";function installSunburstAction(n){n.registerAction({type:ROOT_TO_NODE_ACTION,update:"updateView"},function(r,a){a.eachComponent({mainType:"series",subType:"sunburst",query:r},o);function o(s,l){var u=retrieveTargetInfo(r,[ROOT_TO_NODE_ACTION],s);if(u){var c=s.getViewRoot();c&&(r.direction=aboveViewRoot(c,u.node)?"rollUp":"drillDown"),s.resetViewRoot(u.node)}}}),n.registerAction({type:HIGHLIGHT_ACTION,update:"none"},function(r,a,o){r=extend$2({},r),a.eachComponent({mainType:"series",subType:"sunburst",query:r},s);function s(l){var u=retrieveTargetInfo(r,[HIGHLIGHT_ACTION],l);u&&(r.dataIndex=u.node.dataIndex)}o.dispatchAction(extend$2(r,{type:"highlight"}))}),n.registerAction({type:UNHIGHLIGHT_ACTION,update:"updateView"},function(r,a,o){r=extend$2({},r),o.dispatchAction(extend$2(r,{type:"downplay"}))})}var SunburstView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s,l){var u=this;this.seriesModel=a,this.api=s,this.ecModel=o;var c=a.getData(),d=c.tree.root,f=a.getViewRoot(),p=this.group,v=a.get("renderLabelForZeroData"),g=[];f.eachNode(function(A){g.push(A)});var y=this._oldChildren||[];_(g,y),x(d,f),this._initEvents(),this._oldChildren=g;function _(A,w){if(A.length===0&&w.length===0)return;new DataDiffer(w,A,E,E).add(D).update(D).remove(curry$1(D,null)).execute();function E(C){return C.getId()}function D(C,$){var P=C==null?null:A[C],M=$==null?null:w[$];S(P,M)}}function S(A,w){if(!v&&A&&!A.getValue()&&(A=null),A!==d&&w!==d){if(w&&w.piece)A?(w.piece.updateData(!1,A,a,o,s),c.setItemGraphicEl(A.dataIndex,w.piece)):b(w);else if(A){var E=new SunburstPiece(A,a,o,s);p.add(E),c.setItemGraphicEl(A.dataIndex,E)}}}function b(A){A&&A.piece&&(p.remove(A.piece),A.piece=null)}function x(A,w){w.depth>0?(u.virtualPiece?u.virtualPiece.updateData(!1,A,a,o,s):(u.virtualPiece=new SunburstPiece(A,a,o,s),p.add(u.virtualPiece)),w.piece.off("click"),u.virtualPiece.on("click",function(E){u._rootToNode(w.parentNode)})):u.virtualPiece&&(p.remove(u.virtualPiece),u.virtualPiece=null)}},r.prototype._initEvents=function(){var a=this;this.group.off("click"),this.group.on("click",function(o){var s=!1,l=a.seriesModel.getViewRoot();l.eachNode(function(u){if(!s&&u.piece&&u.piece===o.target){var c=u.getModel().get("nodeClick");if(c==="rootToNode")a._rootToNode(u);else if(c==="link"){var d=u.getModel(),f=d.get("link");if(f){var p=d.get("target",!0)||"_blank";windowOpen(f,p)}}s=!0}})})},r.prototype._rootToNode=function(a){a!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:ROOT_TO_NODE_ACTION,from:this.uid,seriesId:this.seriesModel.id,targetNode:a})},r.prototype.containPoint=function(a,o){var s=o.getData(),l=s.getItemLayout(0);if(l){var u=a[0]-l.cx,c=a[1]-l.cy,d=Math.sqrt(u*u+c*c);return d<=l.r&&d>=l.r0}},r.type="sunburst",r}(ChartView),SunburstSeriesModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.ignoreStyleOnData=!0,a}return r.prototype.getInitialData=function(a,o){var s={name:a.name,children:a.data};completeTreeValue(s);var l=this._levelModels=map$1(a.levels||[],function(d){return new Model(d,this,o)},this),u=Tree.createTree(s,this,c);function c(d){d.wrapMethod("getItemModel",function(f,p){var v=u.getNodeByDataIndex(p),g=l[v.depth];return g&&(f.parentModel=g),f})}return u.data},r.prototype.optionUpdated=function(){this.resetViewRoot()},r.prototype.getDataParams=function(a){var o=n.prototype.getDataParams.apply(this,arguments),s=this.getData().tree.getNodeByDataIndex(a);return o.treePathInfo=wrapTreePathInfo(s,this),o},r.prototype.getLevelModel=function(a){return this._levelModels&&this._levelModels[a.depth]},r.prototype.getViewRoot=function(){return this._viewRoot},r.prototype.resetViewRoot=function(a){a?this._viewRoot=a:a=this._viewRoot;var o=this.getRawData().tree.root;(!a||a!==o&&!o.contains(a))&&(this._viewRoot=o)},r.prototype.enableAriaDecal=function(){enableAriaDecalForTree(this)},r.type="series.sunburst",r.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"},r}(SeriesModel);function completeTreeValue(n){var r=0;each$f(n.children,function(o){completeTreeValue(o);var s=o.value;isArray$1(s)&&(s=s[0]),r+=s});var a=n.value;isArray$1(a)&&(a=a[0]),(a==null||isNaN(a))&&(a=r),a<0&&(a=0),isArray$1(n.value)?n.value[0]=a:n.value=a}var RADIAN=Math.PI/180;function sunburstLayout(n,r,a){r.eachSeriesByType(n,function(o){var s=o.get("center"),l=o.get("radius");isArray$1(l)||(l=[0,l]),isArray$1(s)||(s=[s,s]);var u=a.getWidth(),c=a.getHeight(),d=Math.min(u,c),f=parsePercent(s[0],u),p=parsePercent(s[1],c),v=parsePercent(l[0],d/2),g=parsePercent(l[1],d/2),y=-o.get("startAngle")*RADIAN,_=o.get("minAngle")*RADIAN,S=o.getData().tree.root,b=o.getViewRoot(),x=b.depth,A=o.get("sort");A!=null&&initChildren(b,A);var w=0;each$f(b.children,function(F){!isNaN(F.getValue())&&w++});var E=b.getValue(),D=Math.PI/(E||w)*2,C=b.depth>0,$=b.height-(C?-1:1),P=(g-v)/($||1),M=o.get("clockwise"),I=o.get("stillShowZeroSum"),L=M?1:-1,O=function(F,U){if(F){var H=U;if(F!==S){var W=F.getValue(),G=E===0&&I?D:W*D;G<_&&(G=_),H=U+L*G;var B=F.depth-x-(C?-1:1),Y=v+P*B,Z=v+P*(B+1),K=o.getLevelModel(F);if(K){var ee=K.get("r0",!0),j=K.get("r",!0),q=K.get("radius",!0);q!=null&&(ee=q[0],j=q[1]),ee!=null&&(Y=parsePercent(ee,d/2)),j!=null&&(Z=parsePercent(j,d/2))}F.setLayout({angle:G,startAngle:U,endAngle:H,clockwise:M,cx:f,cy:p,r0:Y,r:Z})}if(F.children&&F.children.length){var J=0;each$f(F.children,function(X){J+=O(X,U+J)})}return H-U}};if(C){var R=v,N=v+P,V=Math.PI*2;S.setLayout({angle:V,startAngle:y,endAngle:y+V,clockwise:M,cx:f,cy:p,r0:R,r:N})}O(b,y)})}function initChildren(n,r){var a=n.children||[];n.children=sort(a,r),a.length&&each$f(n.children,function(o){initChildren(o,r)})}function sort(n,r){if(isFunction(r)){var a=map$1(n,function(s,l){var u=s.getValue();return{params:{depth:s.depth,height:s.height,dataIndex:s.dataIndex,getValue:function(){return u}},index:l}});return a.sort(function(s,l){return r(s.params,l.params)}),map$1(a,function(s){return n[s.index]})}else{var o=r==="asc";return n.sort(function(s,l){var u=(s.getValue()-l.getValue())*(o?1:-1);return u===0?(s.dataIndex-l.dataIndex)*(o?-1:1):u})}}function sunburstVisual(n){var r={};function a(o,s,l){for(var u=o;u&&u.depth>1;)u=u.parentNode;var c=s.getColorFromPalette(u.name||u.dataIndex+"",r);return o.depth>1&&isString(c)&&(c=lift(c,(o.depth-1)/(l-1)*.5)),c}n.eachSeriesByType("sunburst",function(o){var s=o.getData(),l=s.tree;l.eachNode(function(u){var c=u.getModel(),d=c.getModel("itemStyle").getItemStyle();d.fill||(d.fill=a(u,o,l.root.height));var f=s.ensureUniqueItemVisual(u.dataIndex,"style");extend$2(f,d)})})}function install$u(n){n.registerChartView(SunburstView),n.registerSeriesModel(SunburstSeriesModel),n.registerLayout(curry$1(sunburstLayout,"sunburst")),n.registerProcessor(curry$1(dataFilter$1,"sunburst")),n.registerVisual(sunburstVisual),installSunburstAction(n)}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(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},r.prototype.getInitialData=function(a,o){return createSeriesData(null,this)},r.prototype.getDataParams=function(a,o,s){var l=n.prototype.getDataParams.call(this,a,o);return s&&(l.info=customInnerStore(s).info),l},r.type="series.custom",r.dependencies=["grid","polar","geo","singleAxis","calendar"],r.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},r}(SeriesModel);function dataToCoordSize$3(n,r){return r=r||[0,0],map$1(["x","y"],function(a,o){var s=this.getAxis(a),l=r[o],u=n[o]/2;return s.type==="category"?s.getBandWidth():Math.abs(s.dataToCoord(l-u)-s.dataToCoord(l+u))},this)}function cartesianPrepareCustom(n){var r=n.master.getRect();return{coordSys:{type:"cartesian2d",x:r.x,y:r.y,width:r.width,height:r.height},api:{coord:function(a){return n.dataToPoint(a)},size:bind$1(dataToCoordSize$3,n)}}}function dataToCoordSize$2(n,r){return r=r||[0,0],map$1([0,1],function(a){var o=r[a],s=n[a]/2,l=[],u=[];return l[a]=o-s,u[a]=o+s,l[1-a]=u[1-a]=r[1-a],Math.abs(this.dataToPoint(l)[a]-this.dataToPoint(u)[a])},this)}function geoPrepareCustom(n){var r=n.getBoundingRect();return{coordSys:{type:"geo",x:r.x,y:r.y,width:r.width,height:r.height,zoom:n.getZoom()},api:{coord:function(a){return n.dataToPoint(a)},size:bind$1(dataToCoordSize$2,n)}}}function dataToCoordSize$1(n,r){var a=this.getAxis(),o=r instanceof Array?r[0]:r,s=(n instanceof Array?n[0]:n)/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s))}function singlePrepareCustom(n){var r=n.getRect();return{coordSys:{type:"singleAxis",x:r.x,y:r.y,width:r.width,height:r.height},api:{coord:function(a){return n.dataToPoint(a)},size:bind$1(dataToCoordSize$1,n)}}}function dataToCoordSize(n,r){return r=r||[0,0],map$1(["Radius","Angle"],function(a,o){var s="get"+a+"Axis",l=this[s](),u=r[o],c=n[o]/2,d=l.type==="category"?l.getBandWidth():Math.abs(l.dataToCoord(u-c)-l.dataToCoord(u+c));return a==="Angle"&&(d=d*Math.PI/180),d},this)}function polarPrepareCustom(n){var r=n.getRadiusAxis(),a=n.getAngleAxis(),o=r.getExtent();return o[0]>o[1]&&o.reverse(),{coordSys:{type:"polar",cx:n.cx,cy:n.cy,r:o[1],r0:o[0]},api:{coord:function(s){var l=r.dataToRadius(s[0]),u=a.dataToAngle(s[1]),c=n.coordToPoint([l,u]);return c.push(l,u*Math.PI/180),c},size:bind$1(dataToCoordSize,n)}}}function calendarPrepareCustom(n){var r=n.getRect(),a=n.getRangeInfo();return{coordSys:{type:"calendar",x:r.x,y:r.y,width:r.width,height:r.height,cellWidth:n.getCellWidth(),cellHeight:n.getCellHeight(),rangeInfo:{start:a.start,end:a.end,weeks:a.weeks,dayCount:a.allDay}},api:{coord:function(o,s){return n.dataToPoint(o,s)}}}}function isEC4CompatibleStyle(n,r,a,o){return n&&(n.legacy||n.legacy!==!1&&!a&&!o&&r!=="tspan"&&(r==="text"||hasOwn(n,"text")))}function convertFromEC4CompatibleStyle(n,r,a){var o=n,s,l,u;if(r==="text")u=o;else{u={},hasOwn(o,"text")&&(u.text=o.text),hasOwn(o,"rich")&&(u.rich=o.rich),hasOwn(o,"textFill")&&(u.fill=o.textFill),hasOwn(o,"textStroke")&&(u.stroke=o.textStroke),hasOwn(o,"fontFamily")&&(u.fontFamily=o.fontFamily),hasOwn(o,"fontSize")&&(u.fontSize=o.fontSize),hasOwn(o,"fontStyle")&&(u.fontStyle=o.fontStyle),hasOwn(o,"fontWeight")&&(u.fontWeight=o.fontWeight),l={type:"text",style:u,silent:!0},s={};var c=hasOwn(o,"textPosition");a?s.position=c?o.textPosition:"inside":c&&(s.position=o.textPosition),hasOwn(o,"textPosition")&&(s.position=o.textPosition),hasOwn(o,"textOffset")&&(s.offset=o.textOffset),hasOwn(o,"textRotation")&&(s.rotation=o.textRotation),hasOwn(o,"textDistance")&&(s.distance=o.textDistance)}return convertEC4CompatibleRichItem(u,n),each$f(u.rich,function(d){convertEC4CompatibleRichItem(d,d)}),{textConfig:s,textContent:l}}function convertEC4CompatibleRichItem(n,r){r&&(r.font=r.textFont||r.font,hasOwn(r,"textStrokeWidth")&&(n.lineWidth=r.textStrokeWidth),hasOwn(r,"textAlign")&&(n.align=r.textAlign),hasOwn(r,"textVerticalAlign")&&(n.verticalAlign=r.textVerticalAlign),hasOwn(r,"textLineHeight")&&(n.lineHeight=r.textLineHeight),hasOwn(r,"textWidth")&&(n.width=r.textWidth),hasOwn(r,"textHeight")&&(n.height=r.textHeight),hasOwn(r,"textBackgroundColor")&&(n.backgroundColor=r.textBackgroundColor),hasOwn(r,"textPadding")&&(n.padding=r.textPadding),hasOwn(r,"textBorderColor")&&(n.borderColor=r.textBorderColor),hasOwn(r,"textBorderWidth")&&(n.borderWidth=r.textBorderWidth),hasOwn(r,"textBorderRadius")&&(n.borderRadius=r.textBorderRadius),hasOwn(r,"textBoxShadowColor")&&(n.shadowColor=r.textBoxShadowColor),hasOwn(r,"textBoxShadowBlur")&&(n.shadowBlur=r.textBoxShadowBlur),hasOwn(r,"textBoxShadowOffsetX")&&(n.shadowOffsetX=r.textBoxShadowOffsetX),hasOwn(r,"textBoxShadowOffsetY")&&(n.shadowOffsetY=r.textBoxShadowOffsetY))}function convertToEC4StyleForCustomSerise(n,r,a){var o=n;o.textPosition=o.textPosition||a.position||"inside",a.offset!=null&&(o.textOffset=a.offset),a.rotation!=null&&(o.textRotation=a.rotation),a.distance!=null&&(o.textDistance=a.distance);var s=o.textPosition.indexOf("inside")>=0,l=n.fill||"#000";convertToEC4RichItem(o,r);var u=o.textFill==null;return s?u&&(o.textFill=a.insideFill||"#fff",!o.textStroke&&a.insideStroke&&(o.textStroke=a.insideStroke),!o.textStroke&&(o.textStroke=l),o.textStrokeWidth==null&&(o.textStrokeWidth=2)):(u&&(o.textFill=n.fill||a.outsideFill||"#000"),!o.textStroke&&a.outsideStroke&&(o.textStroke=a.outsideStroke)),o.text=r.text,o.rich=r.rich,each$f(r.rich,function(c){convertToEC4RichItem(c,c)}),o}function convertToEC4RichItem(n,r){r&&(hasOwn(r,"fill")&&(n.textFill=r.fill),hasOwn(r,"stroke")&&(n.textStroke=r.fill),hasOwn(r,"lineWidth")&&(n.textStrokeWidth=r.lineWidth),hasOwn(r,"font")&&(n.font=r.font),hasOwn(r,"fontStyle")&&(n.fontStyle=r.fontStyle),hasOwn(r,"fontWeight")&&(n.fontWeight=r.fontWeight),hasOwn(r,"fontSize")&&(n.fontSize=r.fontSize),hasOwn(r,"fontFamily")&&(n.fontFamily=r.fontFamily),hasOwn(r,"align")&&(n.textAlign=r.align),hasOwn(r,"verticalAlign")&&(n.textVerticalAlign=r.verticalAlign),hasOwn(r,"lineHeight")&&(n.textLineHeight=r.lineHeight),hasOwn(r,"width")&&(n.textWidth=r.width),hasOwn(r,"height")&&(n.textHeight=r.height),hasOwn(r,"backgroundColor")&&(n.textBackgroundColor=r.backgroundColor),hasOwn(r,"padding")&&(n.textPadding=r.padding),hasOwn(r,"borderColor")&&(n.textBorderColor=r.borderColor),hasOwn(r,"borderWidth")&&(n.textBorderWidth=r.borderWidth),hasOwn(r,"borderRadius")&&(n.textBorderRadius=r.borderRadius),hasOwn(r,"shadowColor")&&(n.textBoxShadowColor=r.shadowColor),hasOwn(r,"shadowBlur")&&(n.textBoxShadowBlur=r.shadowBlur),hasOwn(r,"shadowOffsetX")&&(n.textBoxShadowOffsetX=r.shadowOffsetX),hasOwn(r,"shadowOffsetY")&&(n.textBoxShadowOffsetY=r.shadowOffsetY),hasOwn(r,"textShadowColor")&&(n.textShadowColor=r.textShadowColor),hasOwn(r,"textShadowBlur")&&(n.textShadowBlur=r.textShadowBlur),hasOwn(r,"textShadowOffsetX")&&(n.textShadowOffsetX=r.textShadowOffsetX),hasOwn(r,"textShadowOffsetY")&&(n.textShadowOffsetY=r.textShadowOffsetY))}var LEGACY_TRANSFORM_PROPS_MAP={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},LEGACY_TRANSFORM_PROPS=keys(LEGACY_TRANSFORM_PROPS_MAP);reduce(TRANSFORMABLE_PROPS,function(n,r){return n[r]=1,n},{});TRANSFORMABLE_PROPS.join(", ");var ELEMENT_ANIMATABLE_PROPS=["","style","shape","extra"],transitionInnerStore=makeInner();function getElementAnimationConfig(n,r,a,o,s){var l=n+"Animation",u=getAnimationConfig(n,o,s)||{},c=transitionInnerStore(r).userDuring;return u.duration>0&&(u.during=c?bind$1(duringCall,{el:r,userDuring:c}):null,u.setToFinal=!0,u.scope=n),extend$2(u,a[l]),u}function applyUpdateTransition(n,r,a,o){o=o||{};var s=o.dataIndex,l=o.isInit,u=o.clearStyle,c=a.isAnimationEnabled(),d=transitionInnerStore(n),f=r.style;d.userDuring=r.during;var p={},v={};if(prepareTransformAllPropsFinal(n,r,v),prepareShapeOrExtraAllPropsFinal("shape",r,v),prepareShapeOrExtraAllPropsFinal("extra",r,v),!l&&c&&(prepareTransformTransitionFrom(n,r,p),prepareShapeOrExtraTransitionFrom("shape",n,r,p),prepareShapeOrExtraTransitionFrom("extra",n,r,p),prepareStyleTransitionFrom(n,r,f,p)),v.style=f,applyPropsDirectly(n,v,u),applyMiscProps(n,r),c)if(l){var g={};each$f(ELEMENT_ANIMATABLE_PROPS,function(_){var S=_?r[_]:r;S&&S.enterFrom&&(_&&(g[_]=g[_]||{}),extend$2(_?g[_]:g,S.enterFrom))});var y=getElementAnimationConfig("enter",n,r,a,s);y.duration>0&&n.animateFrom(g,y)}else applyPropsTransition(n,r,s||0,a,p);updateLeaveTo(n,r),f?n.dirty():n.markRedraw()}function updateLeaveTo(n,r){for(var a=transitionInnerStore(n).leaveToProps,o=0;o<ELEMENT_ANIMATABLE_PROPS.length;o++){var s=ELEMENT_ANIMATABLE_PROPS[o],l=s?r[s]:r;l&&l.leaveTo&&(a||(a=transitionInnerStore(n).leaveToProps={}),s&&(a[s]=a[s]||{}),extend$2(s?a[s]:a,l.leaveTo))}}function applyLeaveTransition(n,r,a,o){if(n){var s=n.parent,l=transitionInnerStore(n).leaveToProps;if(l){var u=getElementAnimationConfig("update",n,r,a,0);u.done=function(){s.remove(n)},n.animateTo(l,u)}else s.remove(n)}}function isTransitionAll(n){return n==="all"}function applyPropsDirectly(n,r,a){var o=r.style;if(!n.isGroup&&o){if(a){n.useStyle({});for(var s=n.animators,l=0;l<s.length;l++){var u=s[l];u.targetName==="style"&&u.changeTarget(n.style)}}n.setStyle(o)}r&&(r.style=null,r&&n.attr(r),r.style=o)}function applyPropsTransition(n,r,a,o,s){if(s){var l=getElementAnimationConfig("update",n,r,o,a);l.duration>0&&n.animateFrom(s,l)}}function applyMiscProps(n,r){hasOwn(r,"silent")&&(n.silent=r.silent),hasOwn(r,"ignore")&&(n.ignore=r.ignore),n instanceof Displayable&&hasOwn(r,"invisible")&&(n.invisible=r.invisible),n instanceof Path&&hasOwn(r,"autoBatch")&&(n.autoBatch=r.autoBatch)}var tmpDuringScope={},transitionDuringAPI={setTransform:function(n,r){return tmpDuringScope.el[n]=r,this},getTransform:function(n){return tmpDuringScope.el[n]},setShape:function(n,r){var a=tmpDuringScope.el,o=a.shape||(a.shape={});return o[n]=r,a.dirtyShape&&a.dirtyShape(),this},getShape:function(n){var r=tmpDuringScope.el.shape;if(r)return r[n]},setStyle:function(n,r){var a=tmpDuringScope.el,o=a.style;return o&&(o[n]=r,a.dirtyStyle&&a.dirtyStyle()),this},getStyle:function(n){var r=tmpDuringScope.el.style;if(r)return r[n]},setExtra:function(n,r){var a=tmpDuringScope.el.extra||(tmpDuringScope.el.extra={});return a[n]=r,this},getExtra:function(n){var r=tmpDuringScope.el.extra;if(r)return r[n]}};function duringCall(){var n=this,r=n.el;if(r){var a=transitionInnerStore(r).userDuring,o=n.userDuring;if(a!==o){n.el=n.userDuring=null;return}tmpDuringScope.el=r,o(transitionDuringAPI)}}function prepareShapeOrExtraTransitionFrom(n,r,a,o){var s=a[n];if(s){var l=r[n],u;if(l){var c=a.transition,d=s.transition;if(d)if(!u&&(u=o[n]={}),isTransitionAll(d))extend$2(u,l);else for(var f=normalizeToArray(d),p=0;p<f.length;p++){var v=f[p],g=l[v];u[v]=g}else if(isTransitionAll(c)||indexOf(c,n)>=0){!u&&(u=o[n]={});for(var y=keys(l),p=0;p<y.length;p++){var v=y[p],g=l[v];isNonStyleTransitionEnabled(s[v],g)&&(u[v]=g)}}}}}function prepareShapeOrExtraAllPropsFinal(n,r,a){var o=r[n];if(o)for(var s=a[n]={},l=keys(o),u=0;u<l.length;u++){var c=l[u];s[c]=cloneValue(o[c])}}function prepareTransformTransitionFrom(n,r,a){for(var o=r.transition,s=isTransitionAll(o)?TRANSFORMABLE_PROPS:normalizeToArray(o||[]),l=0;l<s.length;l++){var u=s[l];if(!(u==="style"||u==="shape"||u==="extra")){var c=n[u];a[u]=c}}}function prepareTransformAllPropsFinal(n,r,a){for(var o=0;o<LEGACY_TRANSFORM_PROPS.length;o++){var s=LEGACY_TRANSFORM_PROPS[o],l=LEGACY_TRANSFORM_PROPS_MAP[s],u=r[s];u&&(a[l[0]]=u[0],a[l[1]]=u[1])}for(var o=0;o<TRANSFORMABLE_PROPS.length;o++){var c=TRANSFORMABLE_PROPS[o];r[c]!=null&&(a[c]=r[c])}}function prepareStyleTransitionFrom(n,r,a,o){if(a){var s=n.style,l;if(s){var u=a.transition,c=r.transition;if(u&&!isTransitionAll(u)){var d=normalizeToArray(u);!l&&(l=o.style={});for(var f=0;f<d.length;f++){var p=d[f],v=s[p];l[p]=v}}else if(n.getAnimationStyleProps&&(isTransitionAll(c)||isTransitionAll(u)||indexOf(c,"style")>=0)){var g=n.getAnimationStyleProps(),y=g?g.style:null;if(y){!l&&(l=o.style={});for(var _=keys(a),f=0;f<_.length;f++){var p=_[f];if(y[p]){var v=s[p];l[p]=v}}}}}}}function isNonStyleTransitionEnabled(n,r){return isArrayLike(n)?n!==r:n!=null&&isFinite(n)}var getStateToRestore=makeInner(),KEYFRAME_EXCLUDE_KEYS=["percent","easing","shape","style","extra"];function stopPreviousKeyframeAnimationAndRestore(n){n.stopAnimation("keyframe"),n.attr(getStateToRestore(n))}function applyKeyframeAnimation(n,r,a){if(!(!a.isAnimationEnabled()||!r)){if(isArray$1(r)){each$f(r,function(c){applyKeyframeAnimation(n,c,a)});return}var o=r.keyframes,s=r.duration;if(a&&s==null){var l=getAnimationConfig("enter",a,0);s=l&&l.duration}if(!(!o||!s)){var u=getStateToRestore(n);each$f(ELEMENT_ANIMATABLE_PROPS,function(c){if(!(c&&!n[c])){var d;o.sort(function(f,p){return f.percent-p.percent}),each$f(o,function(f){var p=n.animators,v=c?f[c]:f;if(v){var g=keys(v);if(c||(g=filter(g,function(S){return indexOf(KEYFRAME_EXCLUDE_KEYS,S)<0})),!!g.length){d||(d=n.animate(c,r.loop,!0),d.scope="keyframe");for(var y=0;y<p.length;y++)p[y]!==d&&p[y].targetName===d.targetName&&p[y].stopTracks(g);c&&(u[c]=u[c]||{});var _=c?u[c]:u;each$f(g,function(S){_[S]=((c?n[c]:n)||{})[S]}),d.whenWithKeys(s*f.percent,v,g,f.easing)}}}),d&&d.delay(r.delay||0).duration(s).start(r.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};function isPath(n){return n instanceof Path}function isDisplayable(n){return n instanceof Displayable}function copyElement(n,r){r.copyTransform(n),isDisplayable(r)&&isDisplayable(n)&&(r.setStyle(n.style),r.z=n.z,r.z2=n.z2,r.zlevel=n.zlevel,r.invisible=n.invisible,r.ignore=n.ignore,isPath(r)&&isPath(n)&&r.setShape(n.shape))}var CustomChartView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s,l){this._progressiveEls=null;var u=this._data,c=a.getData(),d=this.group,f=makeRenderItem(a,c,o,s);u||d.removeAll(),c.diff(u).add(function(v){createOrUpdateItem(s,null,v,f(v,l),a,d,c)}).remove(function(v){var g=u.getItemGraphicEl(v);g&&applyLeaveTransition(g,customInnerStore(g).option,a)}).update(function(v,g){var y=u.getItemGraphicEl(g);createOrUpdateItem(s,y,v,f(v,l),a,d,c)}).execute();var p=a.get("clip",!0)?createClipPath(a.coordinateSystem,!1,a):null;p?d.setClipPath(p):d.removeClipPath(),this._data=c},r.prototype.incrementalPrepareRender=function(a,o,s){this.group.removeAll(),this._data=null},r.prototype.incrementalRender=function(a,o,s,l,u){var c=o.getData(),d=makeRenderItem(o,c,s,l),f=this._progressiveEls=[];function p(y){y.isGroup||(y.incremental=!0,y.ensureState("emphasis").hoverLayer=!0)}for(var v=a.start;v<a.end;v++){var g=createOrUpdateItem(null,null,v,d(v,u),o,this.group,c);g&&(g.traverse(p),f.push(g))}},r.prototype.eachRendered=function(a){traverseElements(this._progressiveEls||this.group,a)},r.prototype.filterForExposedEvent=function(a,o,s,l){var u=o.element;if(u==null||s.name===u)return!0;for(;(s=s.__hostTarget||s.parent)&&s!==this.group;)if(s.name===u)return!0;return!1},r.type="custom",r}(ChartView);function createEl$1(n){var r=n.type,a;if(r==="path"){var o=n.shape,s=o.width!=null&&o.height!=null?{x:o.x||0,y:o.y||0,width:o.width,height:o.height}:null,l=getPathData(o);a=makePath(l,null,s,o.layout||"center"),customInnerStore(a).customPathData=l}else if(r==="image")a=new ZRImage({}),customInnerStore(a).customImagePath=n.style.image;else if(r==="text")a=new ZRText({});else if(r==="group")a=new Group$3;else{if(r==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var u=getShapeClass(r);if(!u){var c="";throwError(c)}a=new u}return customInnerStore(a).customGraphicType=r,a.name=n.name,a.z2EmphasisLift=1,a.z2SelectLift=1,a}function updateElNormal(n,r,a,o,s,l,u){stopPreviousKeyframeAnimationAndRestore(r);var c=s&&s.normal.cfg;c&&r.setTextConfig(c),o&&o.transition==null&&(o.transition=DEFAULT_TRANSITION);var d=o&&o.style;if(d){if(r.type==="text"){var f=d;hasOwn(f,"textFill")&&(f.fill=f.textFill),hasOwn(f,"textStroke")&&(f.stroke=f.textStroke)}var p=void 0,v=isPath(r)?d.decal:null;n&&v&&(v.dirty=!0,p=createOrUpdatePatternFromDecal(v,n)),d.__decalPattern=p}if(isDisplayable(r)&&d){var p=d.__decalPattern;p&&(d.decal=p)}applyUpdateTransition(r,o,l,{dataIndex:a,isInit:u,clearStyle:!0}),applyKeyframeAnimation(r,o.keyframeAnimation,l)}function updateElOnState(n,r,a,o,s){var l=r.isGroup?null:r,u=s&&s[n].cfg;if(l){var c=l.ensureState(n);if(o===!1){var d=l.getState(n);d&&(d.style=null)}else c.style=o||null;u&&(c.textConfig=u),setDefaultStateProxy(l)}}function updateZ(n,r,a){if(!n.isGroup){var o=n,s=a.currentZ,l=a.currentZLevel;o.z=s,o.zlevel=l;var u=r.z2;u!=null&&(o.z2=u||0);for(var c=0;c<STATES.length;c++)updateZForEachState(o,r,STATES[c])}}function updateZForEachState(n,r,a){var o=a===NORMAL,s=o?r:retrieveStateOption(r,a),l=s?s.z2:null,u;l!=null&&(u=o?n:n.ensureState(a),u.z2=l||0)}function makeRenderItem(n,r,a,o){var s=n.get("renderItem"),l=n.coordinateSystem,u={};l&&(u=l.prepareCustoms?l.prepareCustoms(l):prepareCustoms[l.type](l));for(var c=defaults$2({getWidth:o.getWidth,getHeight:o.getHeight,getZr:o.getZr,getDevicePixelRatio:o.getDevicePixelRatio,value:E,style:C,ordinalRawValue:D,styleEmphasis:$,visual:I,barLayout:L,currentSeriesIndices:O,font:R},u.api||{}),d={context:{},seriesId:n.id,seriesName:n.name,seriesIndex:n.seriesIndex,coordSys:u.coordSys,dataInsideLength:r.count(),encode:wrapEncodeDef(n.getData())},f,p,v={},g={},y={},_={},S=0;S<STATES.length;S++){var b=STATES[S];y[b]=n.getModel(PATH_ITEM_STYLE[b]),_[b]=n.getModel(PATH_LABEL[b])}function x(N){return N===f?p||(p=r.getItemModel(N)):r.getItemModel(N)}function A(N,V){return r.hasItemOption?N===f?v[V]||(v[V]=x(N).getModel(PATH_ITEM_STYLE[V])):x(N).getModel(PATH_ITEM_STYLE[V]):y[V]}function w(N,V){return r.hasItemOption?N===f?g[V]||(g[V]=x(N).getModel(PATH_LABEL[V])):x(N).getModel(PATH_LABEL[V]):_[V]}return function(N,V){return f=N,p=null,v={},g={},s&&s(defaults$2({dataIndexInside:N,dataIndex:r.getRawIndex(N),actionType:V?V.type:null},d),c)};function E(N,V){return V==null&&(V=f),r.getStore().get(r.getDimensionIndex(N||0),V)}function D(N,V){V==null&&(V=f),N=N||0;var F=r.getDimensionInfo(N);if(!F){var U=r.getDimensionIndex(N);return U>=0?r.getStore().get(U,V):void 0}var H=r.get(F.name,V),W=F&&F.ordinalMeta;return W?W.categories[H]:H}function C(N,V){V==null&&(V=f);var F=r.getItemVisual(V,"style"),U=F&&F.fill,H=F&&F.opacity,W=A(V,NORMAL).getItemStyle();U!=null&&(W.fill=U),H!=null&&(W.opacity=H);var G={inheritColor:isString(U)?U:"#000"},B=w(V,NORMAL),Y=createTextStyle$1(B,null,G,!1,!0);Y.text=B.getShallow("show")?retrieve2(n.getFormattedLabel(V,NORMAL),getDefaultLabel(r,V)):null;var Z=createTextConfig(B,G,!1);return M(N,W),W=convertToEC4StyleForCustomSerise(W,Y,Z),N&&P(W,N),W.legacy=!0,W}function $(N,V){V==null&&(V=f);var F=A(V,EMPHASIS).getItemStyle(),U=w(V,EMPHASIS),H=createTextStyle$1(U,null,null,!0,!0);H.text=U.getShallow("show")?retrieve3(n.getFormattedLabel(V,EMPHASIS),n.getFormattedLabel(V,NORMAL),getDefaultLabel(r,V)):null;var W=createTextConfig(U,null,!0);return M(N,F),F=convertToEC4StyleForCustomSerise(F,H,W),N&&P(F,N),F.legacy=!0,F}function P(N,V){for(var F in V)hasOwn(V,F)&&(N[F]=V[F])}function M(N,V){N&&(N.textFill&&(V.textFill=N.textFill),N.textPosition&&(V.textPosition=N.textPosition))}function I(N,V){if(V==null&&(V=f),hasOwn(STYLE_VISUAL_TYPE,N)){var F=r.getItemVisual(V,"style");return F?F[STYLE_VISUAL_TYPE[N]]:null}if(hasOwn(NON_STYLE_VISUAL_PROPS,N))return r.getItemVisual(V,N)}function L(N){if(l.type==="cartesian2d"){var V=l.getBaseAxis();return getLayoutOnAxis(defaults$2({axis:V},N))}}function O(){return a.getCurrentSeriesIndices()}function R(N){return getFont(N,a)}}function wrapEncodeDef(n){var r={};return each$f(n.dimensions,function(a){var o=n.getDimensionInfo(a);if(!o.isExtraCoord){var s=o.coordDim,l=r[s]=r[s]||[];l[o.coordDimIndex]=n.getDimensionIndex(a)}}),r}function createOrUpdateItem(n,r,a,o,s,l,u){if(!o){l.remove(r);return}var c=doCreateOrUpdateEl(n,r,a,o,s,l);return c&&u.setItemGraphicEl(a,c),c&&toggleHoverEmphasis(c,o.focus,o.blurScope,o.emphasisDisabled),c}function doCreateOrUpdateEl(n,r,a,o,s,l){var u=-1,c=r;r&&doesElNeedRecreate(r,o,s)&&(u=indexOf(l.childrenRef(),r),r=null);var d=!r,f=r;f?f.clearStates():(f=createEl$1(o),c&©Element(c,f)),o.morph===!1?f.disableMorphing=!0:f.disableMorphing&&(f.disableMorphing=!1),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(f,a,o,s,d,attachedTxInfoTmp),doCreateOrUpdateClipPath(f,a,o,s,d),updateElNormal(n,f,a,o,attachedTxInfoTmp,s,d),hasOwn(o,"info")&&(customInnerStore(f).info=o.info);for(var p=0;p<STATES.length;p++){var v=STATES[p];if(v!==NORMAL){var g=retrieveStateOption(o,v),y=retrieveStyleOptionOnState(o,g,v);updateElOnState(v,f,g,y,attachedTxInfoTmp)}}return updateZ(f,o,s),o.type==="group"&&mergeChildren(n,f,a,o,s),u>=0?l.replaceAt(f,u):l.add(f),f}function doesElNeedRecreate(n,r,a){var o=customInnerStore(n),s=r.type,l=r.shape,u=r.style;return a.isUniversalTransitionEnabled()||s!=null&&s!==o.customGraphicType||s==="path"&&hasOwnPathData(l)&&getPathData(l)!==o.customPathData||s==="image"&&hasOwn(u,"image")&&u.image!==o.customImagePath}function doCreateOrUpdateClipPath(n,r,a,o,s){var l=a.clipPath;if(l===!1)n&&n.getClipPath()&&n.removeClipPath();else if(l){var u=n.getClipPath();u&&doesElNeedRecreate(u,l,o)&&(u=null),u||(u=createEl$1(l),n.setClipPath(u)),updateElNormal(null,u,r,l,null,o,s)}}function doCreateOrUpdateAttachedTx(n,r,a,o,s,l){if(!n.isGroup){processTxInfo(a,null,l),processTxInfo(a,EMPHASIS,l);var u=l.normal.conOpt,c=l.emphasis.conOpt,d=l.blur.conOpt,f=l.select.conOpt;if(u!=null||c!=null||f!=null||d!=null){var p=n.getTextContent();if(u===!1)p&&n.removeTextContent();else{u=l.normal.conOpt=u||{type:"text"},p?p.clearStates():(p=createEl$1(u),n.setTextContent(p)),updateElNormal(null,p,r,u,null,o,s);for(var v=u&&u.style,g=0;g<STATES.length;g++){var y=STATES[g];if(y!==NORMAL){var _=l[y].conOpt;updateElOnState(y,p,_,retrieveStyleOptionOnState(u,_,y),null)}}v?p.dirty():p.markRedraw()}}}}function processTxInfo(n,r,a){var o=r?retrieveStateOption(n,r):n,s=r?retrieveStyleOptionOnState(n,o,EMPHASIS):n.style,l=n.type,u=o?o.textConfig:null,c=n.textContent,d=c?r?retrieveStateOption(c,r):c:null;if(s&&(a.isLegacy||isEC4CompatibleStyle(s,l,!!u,!!d))){a.isLegacy=!0;var f=convertFromEC4CompatibleStyle(s,l,!r);!u&&f.textConfig&&(u=f.textConfig),!d&&f.textContent&&(d=f.textContent)}if(!r&&d){var p=d;!p.type&&(p.type="text")}var v=r?a[r]:a.normal;v.cfg=u,v.conOpt=d}function retrieveStateOption(n,r){return r?n?n[r]:null:n}function retrieveStyleOptionOnState(n,r,a){var o=r&&r.style;return o==null&&a===EMPHASIS&&n&&(o=n.styleEmphasis),o}function mergeChildren(n,r,a,o,s){var l=o.children,u=l?l.length:0,c=o.$mergeChildren,d=c==="byName"||o.diffChildrenByName,f=c===!1;if(!(!u&&!d&&!f)){if(d){diffGroupChildren({api:n,oldChildren:r.children()||[],newChildren:l||[],dataIndex:a,seriesModel:s,group:r});return}f&&r.removeAll();for(var p=0;p<u;p++){var v=l[p],g=r.childAt(p);v?(v.ignore==null&&(v.ignore=!1),doCreateOrUpdateEl(n,g,a,v,s,r)):g.ignore=!0}for(var y=r.childCount()-1;y>=p;y--){var _=r.childAt(y);removeChildFromGroup(r,_,s)}}}function removeChildFromGroup(n,r,a){r&&applyLeaveTransition(r,customInnerStore(n).option,a)}function diffGroupChildren(n){new DataDiffer(n.oldChildren,n.newChildren,getKey$1,getKey$1,n).add(processAddUpdate).update(processAddUpdate).remove(processRemove).execute()}function getKey$1(n,r){var a=n&&n.name;return a!=null?a:GROUP_DIFF_PREFIX+r}function processAddUpdate(n,r){var a=this.context,o=n!=null?a.newChildren[n]:null,s=r!=null?a.oldChildren[r]:null;doCreateOrUpdateEl(a.api,s,a.dataIndex,o,a.seriesModel,a.group)}function processRemove(n){var r=this.context,a=r.oldChildren[n];a&&applyLeaveTransition(a,customInnerStore(a).option,r.seriesModel)}function getPathData(n){return n&&(n.pathData||n.d)}function hasOwnPathData(n){return n&&(hasOwn(n,"pathData")||hasOwn(n,"d"))}function install$t(n){n.registerChartView(CustomChartView),n.registerSeriesModel(CustomSeriesModel)}var inner$b=makeInner(),clone$3=clone$6,bind=bind$1,BaseAxisPointer=function(){function n(){this._dragging=!1,this.animationThreshold=15}return n.prototype.render=function(r,a,o,s){var l=a.get("value"),u=a.get("status");if(this._axisModel=r,this._axisPointerModel=a,this._api=o,!(!s&&this._lastValue===l&&this._lastStatus===u)){this._lastValue=l,this._lastStatus=u;var c=this._group,d=this._handle;if(!u||u==="hide"){c&&c.hide(),d&&d.hide();return}c&&c.show(),d&&d.show();var f={};this.makeElOption(f,l,r,a,o);var p=f.graphicKey;p!==this._lastGraphicKey&&this.clear(o),this._lastGraphicKey=p;var v=this._moveAnimation=this.determineAnimation(r,a);if(!c)c=this._group=new Group$3,this.createPointerEl(c,f,r,a),this.createLabelEl(c,f,r,a),o.getZr().add(c);else{var g=curry$1(updateProps,a,v);this.updatePointerEl(c,f,g),this.updateLabelEl(c,f,g,a)}updateMandatoryProps(c,a,!0),this._renderHandle(l)}},n.prototype.remove=function(r){this.clear(r)},n.prototype.dispose=function(r){this.clear(r)},n.prototype.determineAnimation=function(r,a){var o=a.get("animation"),s=r.axis,l=s.type==="category",u=a.get("snap");if(!u&&!l)return!1;if(o==="auto"||o==null){var c=this.animationThreshold;if(l&&s.getBandWidth()>c)return!0;if(u){var d=getAxisInfo$1(r).seriesDataCount,f=s.getExtent();return Math.abs(f[0]-f[1])/d>c}return!1}return o===!0},n.prototype.makeElOption=function(r,a,o,s,l){},n.prototype.createPointerEl=function(r,a,o,s){var l=a.pointer;if(l){var u=inner$b(r).pointerEl=new graphic$1[l.type](clone$3(a.pointer));r.add(u)}},n.prototype.createLabelEl=function(r,a,o,s){if(a.label){var l=inner$b(r).labelEl=new ZRText(clone$3(a.label));r.add(l),updateLabelShowHide(l,s)}},n.prototype.updatePointerEl=function(r,a,o){var s=inner$b(r).pointerEl;s&&a.pointer&&(s.setStyle(a.pointer.style),o(s,{shape:a.pointer.shape}))},n.prototype.updateLabelEl=function(r,a,o,s){var l=inner$b(r).labelEl;l&&(l.setStyle(a.label.style),o(l,{x:a.label.x,y:a.label.y}),updateLabelShowHide(l,s))},n.prototype._renderHandle=function(r){if(!(this._dragging||!this.updateHandleTransform)){var a=this._axisPointerModel,o=this._api.getZr(),s=this._handle,l=a.getModel("handle"),u=a.get("status");if(!l.get("show")||!u||u==="hide"){s&&o.remove(s),this._handle=null;return}var c;this._handle||(c=!0,s=this._handle=createIcon(l.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(f){stop(f.event)},onmousedown:bind(this._onHandleDragMove,this,0,0),drift:bind(this._onHandleDragMove,this),ondragend:bind(this._onHandleDragEnd,this)}),o.add(s)),updateMandatoryProps(s,a,!1),s.setStyle(l.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var d=l.get("size");isArray$1(d)||(d=[d,d]),s.scaleX=d[0]/2,s.scaleY=d[1]/2,createOrUpdate(this,"_doDispatchAxisPointer",l.get("throttle")||0,"fixRate"),this._moveHandleToValue(r,c)}},n.prototype._moveHandleToValue=function(r,a){updateProps(this._axisPointerModel,!a&&this._moveAnimation,this._handle,getHandleTransProps(this.getHandleTransform(r,this._axisModel,this._axisPointerModel)))},n.prototype._onHandleDragMove=function(r,a){var o=this._handle;if(o){this._dragging=!0;var s=this.updateHandleTransform(getHandleTransProps(o),[r,a],this._axisModel,this._axisPointerModel);this._payloadInfo=s,o.stopAnimation(),o.attr(getHandleTransProps(s)),inner$b(o).lastProp=null,this._doDispatchAxisPointer()}},n.prototype._doDispatchAxisPointer=function(){var r=this._handle;if(r){var a=this._payloadInfo,o=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:a.cursorPoint[0],y:a.cursorPoint[1],tooltipOption:a.tooltipOption,axesInfo:[{axisDim:o.axis.dim,axisIndex:o.componentIndex}]})}},n.prototype._onHandleDragEnd=function(){this._dragging=!1;var r=this._handle;if(r){var a=this._axisPointerModel.get("value");this._moveHandleToValue(a),this._api.dispatchAction({type:"hideTip"})}},n.prototype.clear=function(r){this._lastValue=null,this._lastStatus=null;var a=r.getZr(),o=this._group,s=this._handle;a&&o&&(this._lastGraphicKey=null,o&&a.remove(o),s&&a.remove(s),this._group=null,this._handle=null,this._payloadInfo=null),clear$1(this,"_doDispatchAxisPointer")},n.prototype.doClear=function(){},n.prototype.buildLabel=function(r,a,o){return o=o||0,{x:r[o],y:r[1-o],width:a[o],height:a[1-o]}},n}();function updateProps(n,r,a,o){propsEqual(inner$b(a).lastProp,o)||(inner$b(a).lastProp=o,r?updateProps$1(a,o,n):(a.stopAnimation(),a.attr(o)))}function propsEqual(n,r){if(isObject$3(n)&&isObject$3(r)){var a=!0;return each$f(r,function(o,s){a=a&&propsEqual(n[s],o)}),!!a}else return n===r}function updateLabelShowHide(n,r){n[r.get(["label","show"])?"show":"hide"]()}function getHandleTransProps(n){return{x:n.x||0,y:n.y||0,rotation:n.rotation||0}}function updateMandatoryProps(n,r,a){var o=r.get("z"),s=r.get("zlevel");n&&n.traverse(function(l){l.type!=="group"&&(o!=null&&(l.z=o),s!=null&&(l.zlevel=s),l.silent=a)})}function buildElStyle(n){var r=n.get("type"),a=n.getModel(r+"Style"),o;return r==="line"?(o=a.getLineStyle(),o.fill=null):r==="shadow"&&(o=a.getAreaStyle(),o.stroke=null),o}function buildLabelElOption(n,r,a,o,s){var l=a.get("value"),u=getValueLabel(l,r.axis,r.ecModel,a.get("seriesDataIndices"),{precision:a.get(["label","precision"]),formatter:a.get(["label","formatter"])}),c=a.getModel("label"),d=normalizeCssArray(c.get("padding")||0),f=c.getFont(),p=getBoundingRect(u,f),v=s.position,g=p.width+d[1]+d[3],y=p.height+d[0]+d[2],_=s.align;_==="right"&&(v[0]-=g),_==="center"&&(v[0]-=g/2);var S=s.verticalAlign;S==="bottom"&&(v[1]-=y),S==="middle"&&(v[1]-=y/2),confineInContainer(v,g,y,o);var b=c.get("backgroundColor");(!b||b==="auto")&&(b=r.get(["axisLine","lineStyle","color"])),n.label={x:v[0],y:v[1],style:createTextStyle$1(c,{text:u,font:f,fill:c.getTextColor(),padding:d,backgroundColor:b}),z2:10}}function confineInContainer(n,r,a,o){var s=o.getWidth(),l=o.getHeight();n[0]=Math.min(n[0]+r,s)-r,n[1]=Math.min(n[1]+a,l)-a,n[0]=Math.max(n[0],0),n[1]=Math.max(n[1],0)}function getValueLabel(n,r,a,o,s){n=r.scale.parse(n);var l=r.scale.getLabel({value:n},{precision:s.precision}),u=s.formatter;if(u){var c={value:getAxisRawValue(r,{value:n}),axisDimension:r.dim,axisIndex:r.index,seriesData:[]};each$f(o,function(d){var f=a.getSeriesByIndex(d.seriesIndex),p=d.dataIndexInside,v=f&&f.getDataParams(p);v&&c.seriesData.push(v)}),isString(u)?l=u.replace("{value}",l):isFunction(u)&&(l=u(c))}return l}function getTransformedPosition(n,r,a){var o=create$1();return rotate(o,o,a.rotation),translate(o,o,a.position),applyTransform([n.dataToCoord(r),(a.labelOffset||0)+(a.labelDirection||1)*(a.labelMargin||0)],o)}function buildCartesianSingleLabelElOption(n,r,a,o,s,l){var u=AxisBuilder.innerTextLayout(a.rotation,0,a.labelDirection);a.labelMargin=s.get(["label","margin"]),buildLabelElOption(r,o,s,l,{position:getTransformedPosition(o.axis,n,a),align:u.textAlign,verticalAlign:u.textVerticalAlign})}function makeLineShape(n,r,a){return a=a||0,{x1:n[a],y1:n[1-a],x2:r[a],y2:r[1-a]}}function makeRectShape(n,r,a){return a=a||0,{x:n[a],y:n[1-a],width:r[a],height:r[1-a]}}function makeSectorShape(n,r,a,o,s,l){return{cx:n,cy:r,r0:a,r:o,startAngle:s,endAngle:l,clockwise:!0}}var CartesianAxisPointer=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.makeElOption=function(a,o,s,l,u){var c=s.axis,d=c.grid,f=l.get("type"),p=getCartesian(d,c).getOtherAxis(c).getGlobalExtent(),v=c.toGlobalCoord(c.dataToCoord(o,!0));if(f&&f!=="none"){var g=buildElStyle(l),y=pointerShapeBuilder$2[f](c,v,p);y.style=g,a.graphicKey=y.type,a.pointer=y}var _=layout$2(d.model,s);buildCartesianSingleLabelElOption(o,a,_,s,l,u)},r.prototype.getHandleTransform=function(a,o,s){var l=layout$2(o.axis.grid.model,o,{labelInside:!1});l.labelMargin=s.get(["handle","margin"]);var u=getTransformedPosition(o.axis,a,l);return{x:u[0],y:u[1],rotation:l.rotation+(l.labelDirection<0?Math.PI:0)}},r.prototype.updateHandleTransform=function(a,o,s,l){var u=s.axis,c=u.grid,d=u.getGlobalExtent(!0),f=getCartesian(c,u).getOtherAxis(u).getGlobalExtent(),p=u.dim==="x"?0:1,v=[a.x,a.y];v[p]+=o[p],v[p]=Math.min(d[1],v[p]),v[p]=Math.max(d[0],v[p]);var g=(f[1]+f[0])/2,y=[g,g];y[p]=v[p];var _=[{verticalAlign:"middle"},{align:"center"}];return{x:v[0],y:v[1],rotation:a.rotation,cursorPoint:y,tooltipOption:_[p]}},r}(BaseAxisPointer);function getCartesian(n,r){var a={};return a[r.dim+"AxisIndex"]=r.index,n.getCartesian(a)}var pointerShapeBuilder$2={line:function(n,r,a){var o=makeLineShape([r,a[0]],[r,a[1]],getAxisDimIndex(n));return{type:"Line",subPixelOptimize:!0,shape:o}},shadow:function(n,r,a){var o=Math.max(1,n.getBandWidth()),s=a[1]-a[0];return{type:"Rect",shape:makeRectShape([r-o/2,a[0]],[o,s],getAxisDimIndex(n))}}};function getAxisDimIndex(n){return n.dim==="x"?0:1}var AxisPointerModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="axisPointer",r.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",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:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},r}(ComponentModel),inner$a=makeInner(),each$8=each$f;function register(n,r,a){if(!env.node){var o=r.getZr();inner$a(o).records||(inner$a(o).records={}),initGlobalListeners(o,r);var s=inner$a(o).records[n]||(inner$a(o).records[n]={});s.handler=a}}function initGlobalListeners(n,r){if(inner$a(n).initialized)return;inner$a(n).initialized=!0,a("click",curry$1(doEnter,"click")),a("mousemove",curry$1(doEnter,"mousemove")),a("globalout",onLeave);function a(o,s){n.on(o,function(l){var u=makeDispatchAction$1(r);each$8(inner$a(n).records,function(c){c&&s(c,l,u.dispatchAction)}),dispatchTooltipFinally(u.pendings,r)})}}function dispatchTooltipFinally(n,r){var a=n.showTip.length,o=n.hideTip.length,s;a?s=n.showTip[a-1]:o&&(s=n.hideTip[o-1]),s&&(s.dispatchAction=null,r.dispatchAction(s))}function onLeave(n,r,a){n.handler("leave",null,a)}function doEnter(n,r,a,o){r.handler(n,a,o)}function makeDispatchAction$1(n){var r={showTip:[],hideTip:[]},a=function(o){var s=r[o.type];s?s.push(o):(o.dispatchAction=a,n.dispatchAction(o))};return{dispatchAction:a,pendings:r}}function unregister(n,r){if(!env.node){var a=r.getZr(),o=(inner$a(a).records||{})[n];o&&(inner$a(a).records[n]=null)}}var AxisPointerView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){var l=o.getComponent("tooltip"),u=a.get("triggerOn")||l&&l.get("triggerOn")||"mousemove|click";register("axisPointer",s,function(c,d,f){u!=="none"&&(c==="leave"||u.indexOf(c)>=0)&&f({type:"updateAxisPointer",currTrigger:c,x:d&&d.offsetX,y:d&&d.offsetY})})},r.prototype.remove=function(a,o){unregister("axisPointer",o)},r.prototype.dispose=function(a,o){unregister("axisPointer",o)},r.type="axisPointer",r}(ComponentView);function findPointFromSeries(n,r){var a=[],o=n.seriesIndex,s;if(o==null||!(s=r.getSeriesByIndex(o)))return{point:[]};var l=s.getData(),u=queryDataIndex(l,n);if(u==null||u<0||isArray$1(u))return{point:[]};var c=l.getItemGraphicEl(u),d=s.coordinateSystem;if(s.getTooltipPosition)a=s.getTooltipPosition(u)||[];else if(d&&d.dataToPoint)if(n.isStacked){var f=d.getBaseAxis(),p=d.getOtherAxis(f),v=p.dim,g=f.dim,y=v==="x"||v==="radius"?1:0,_=l.mapDimension(g),S=[];S[y]=l.get(_,u),S[1-y]=l.get(l.getCalculationInfo("stackResultDimension"),u),a=d.dataToPoint(S)||[]}else a=d.dataToPoint(l.getValues(map$1(d.dimensions,function(x){return l.mapDimension(x)}),u))||[];else if(c){var b=c.getBoundingRect().clone();b.applyTransform(c.transform),a=[b.x+b.width/2,b.y+b.height/2]}return{point:a,el:c}}var inner$9=makeInner();function axisTrigger(n,r,a){var o=n.currTrigger,s=[n.x,n.y],l=n,u=n.dispatchAction||bind$1(a.dispatchAction,a),c=r.getComponent("axisPointer").coordSysAxesInfo;if(c){illegalPoint(s)&&(s=findPointFromSeries({seriesIndex:l.seriesIndex,dataIndex:l.dataIndex},r).point);var d=illegalPoint(s),f=l.axesInfo,p=c.axesInfo,v=o==="leave"||illegalPoint(s),g={},y={},_={list:[],map:{}},S={showPointer:curry$1(showPointer,y),showTooltip:curry$1(showTooltip,_)};each$f(c.coordSysMap,function(x,A){var w=d||x.containPoint(s);each$f(c.coordSysAxesInfo[A],function(E,D){var C=E.axis,$=findInputAxisInfo(f,E);if(!v&&w&&(!f||$)){var P=$&&$.value;P==null&&!d&&(P=C.pointToData(s)),P!=null&&processOnAxis(E,P,S,!1,g)}})});var b={};return each$f(p,function(x,A){var w=x.linkGroup;w&&!y[A]&&each$f(w.axesInfo,function(E,D){var C=y[D];if(E!==x&&C){var $=C.value;w.mapper&&($=x.axis.scale.parse(w.mapper($,makeMapperParam(E),makeMapperParam(x)))),b[x.key]=$}})}),each$f(b,function(x,A){processOnAxis(p[A],x,S,!0,g)}),updateModelActually(y,p,g),dispatchTooltipActually(_,s,n,u),dispatchHighDownActually(p,u,a),g}}function processOnAxis(n,r,a,o,s){var l=n.axis;if(!(l.scale.isBlank()||!l.containData(r))){if(!n.involveSeries){a.showPointer(n,r);return}var u=buildPayloadsBySeries(r,n),c=u.payloadBatch,d=u.snapToValue;c[0]&&s.seriesIndex==null&&extend$2(s,c[0]),!o&&n.snap&&l.containData(d)&&d!=null&&(r=d),a.showPointer(n,r,c),a.showTooltip(n,u,d)}}function buildPayloadsBySeries(n,r){var a=r.axis,o=a.dim,s=n,l=[],u=Number.MAX_VALUE,c=-1;return each$f(r.seriesModels,function(d,f){var p=d.getData().mapDimensionsAll(o),v,g;if(d.getAxisTooltipData){var y=d.getAxisTooltipData(p,n,a);g=y.dataIndices,v=y.nestestValue}else{if(g=d.getData().indicesOfNearest(p[0],n,a.type==="category"?.5:null),!g.length)return;v=d.getData().get(p[0],g[0])}if(!(v==null||!isFinite(v))){var _=n-v,S=Math.abs(_);S<=u&&((S<u||_>=0&&c<0)&&(u=S,c=_,s=v,l.length=0),each$f(g,function(b){l.push({seriesIndex:d.seriesIndex,dataIndexInside:b,dataIndex:d.getData().getRawIndex(b)})}))}}),{payloadBatch:l,snapToValue:s}}function showPointer(n,r,a,o){n[r.key]={value:a,payloadBatch:o}}function showTooltip(n,r,a,o){var s=a.payloadBatch,l=r.axis,u=l.model,c=r.axisPointerModel;if(!(!r.triggerTooltip||!s.length)){var d=r.coordSys.model,f=makeKey(d),p=n.map[f];p||(p=n.map[f]={coordSysId:d.id,coordSysIndex:d.componentIndex,coordSysType:d.type,coordSysMainType:d.mainType,dataByAxis:[]},n.list.push(p)),p.dataByAxis.push({axisDim:l.dim,axisIndex:u.componentIndex,axisType:u.type,axisId:u.id,value:o,valueLabelOpt:{precision:c.get(["label","precision"]),formatter:c.get(["label","formatter"])},seriesDataIndices:s.slice()})}}function updateModelActually(n,r,a){var o=a.axesInfo=[];each$f(r,function(s,l){var u=s.axisPointerModel.option,c=n[l];c?(!s.useHandle&&(u.status="show"),u.value=c.value,u.seriesDataIndices=(c.payloadBatch||[]).slice()):!s.useHandle&&(u.status="hide"),u.status==="show"&&o.push({axisDim:s.axis.dim,axisIndex:s.axis.model.componentIndex,value:u.value})})}function dispatchTooltipActually(n,r,a,o){if(illegalPoint(r)||!n.list.length){o({type:"hideTip"});return}var s=((n.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};o({type:"showTip",escapeConnect:!0,x:r[0],y:r[1],tooltipOption:a.tooltipOption,position:a.position,dataIndexInside:s.dataIndexInside,dataIndex:s.dataIndex,seriesIndex:s.seriesIndex,dataByCoordSys:n.list})}function dispatchHighDownActually(n,r,a){var o=a.getZr(),s="axisPointerLastHighlights",l=inner$9(o)[s]||{},u=inner$9(o)[s]={};each$f(n,function(f,p){var v=f.axisPointerModel.option;v.status==="show"&&f.triggerEmphasis&&each$f(v.seriesDataIndices,function(g){var y=g.seriesIndex+" | "+g.dataIndex;u[y]=g})});var c=[],d=[];each$f(l,function(f,p){!u[p]&&d.push(f)}),each$f(u,function(f,p){!l[p]&&c.push(f)}),d.length&&a.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:d}),c.length&&a.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:c})}function findInputAxisInfo(n,r){for(var a=0;a<(n||[]).length;a++){var o=n[a];if(r.axis.dim===o.axisDim&&r.axis.model.componentIndex===o.axisIndex)return o}}function makeMapperParam(n){var r=n.axis.model,a={},o=a.axisDim=n.axis.dim;return a.axisIndex=a[o+"AxisIndex"]=r.componentIndex,a.axisName=a[o+"AxisName"]=r.name,a.axisId=a[o+"AxisId"]=r.id,a}function illegalPoint(n){return!n||n[0]==null||isNaN(n[0])||n[1]==null||isNaN(n[1])}function install$s(n){AxisView.registerAxisPointerClass("CartesianAxisPointer",CartesianAxisPointer),n.registerComponentModel(AxisPointerModel),n.registerComponentView(AxisPointerView),n.registerPreprocessor(function(r){if(r){(!r.axisPointer||r.axisPointer.length===0)&&(r.axisPointer={});var a=r.axisPointer.link;a&&!isArray$1(a)&&(r.axisPointer.link=[a])}}),n.registerProcessor(n.PRIORITY.PROCESSOR.STATISTIC,function(r,a){r.getComponent("axisPointer").coordSysAxesInfo=collect(r,a)}),n.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},axisTrigger)}function install$r(n){use(install$P),use(install$s)}var PolarAxisPointer=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.makeElOption=function(a,o,s,l,u){var c=s.axis;c.dim==="angle"&&(this.animationThreshold=Math.PI/18);var d=c.polar,f=d.getOtherAxis(c),p=f.getExtent(),v=c.dataToCoord(o),g=l.get("type");if(g&&g!=="none"){var y=buildElStyle(l),_=pointerShapeBuilder$1[g](c,d,v,p);_.style=y,a.graphicKey=_.type,a.pointer=_}var S=l.get(["label","margin"]),b=getLabelPosition(o,s,l,d,S);buildLabelElOption(a,s,l,u,b)},r}(BaseAxisPointer);function getLabelPosition(n,r,a,o,s){var l=r.axis,u=l.dataToCoord(n),c=o.getAngleAxis().getExtent()[0];c=c/180*Math.PI;var d=o.getRadiusAxis().getExtent(),f,p,v;if(l.dim==="radius"){var g=create$1();rotate(g,g,c),translate(g,g,[o.cx,o.cy]),f=applyTransform([u,-s],g);var y=r.getModel("axisLabel").get("rotate")||0,_=AxisBuilder.innerTextLayout(c,y*Math.PI/180,-1);p=_.textAlign,v=_.textVerticalAlign}else{var S=d[1];f=o.coordToPoint([S+s,u]);var b=o.cx,x=o.cy;p=Math.abs(f[0]-b)/S<.3?"center":f[0]>b?"left":"right",v=Math.abs(f[1]-x)/S<.3?"middle":f[1]>x?"top":"bottom"}return{position:f,align:p,verticalAlign:v}}var pointerShapeBuilder$1={line:function(n,r,a,o){return n.dim==="angle"?{type:"Line",shape:makeLineShape(r.coordToPoint([o[0],a]),r.coordToPoint([o[1],a]))}:{type:"Circle",shape:{cx:r.cx,cy:r.cy,r:a}}},shadow:function(n,r,a,o){var s=Math.max(1,n.getBandWidth()),l=Math.PI/180;return n.dim==="angle"?{type:"Sector",shape:makeSectorShape(r.cx,r.cy,o[0],o[1],(-a-s/2)*l,(-a+s/2)*l)}:{type:"Sector",shape:makeSectorShape(r.cx,r.cy,a-s/2,a+s/2,0,Math.PI*2)}}},PolarModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.findAxisModel=function(a){var o,s=this.ecModel;return s.eachComponent(a,function(l){l.getCoordSysModel()===this&&(o=l)},this),o},r.type="polar",r.dependencies=["radiusAxis","angleAxis"],r.defaultOption={z:0,center:["50%","50%"],radius:"80%"},r}(ComponentModel),PolarAxisModel=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",SINGLE_REFERRING).models[0]},r.type="polarAxis",r}(ComponentModel);mixin(PolarAxisModel,AxisModelCommonMixin);var AngleAxisModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="angleAxis",r}(PolarAxisModel),RadiusAxisModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="radiusAxis",r}(PolarAxisModel),RadiusAxis=function(n){__extends(r,n);function r(a,o){return n.call(this,"radius",a,o)||this}return r.prototype.pointToData=function(a,o){return this.polar.pointToData(a,o)[this.dim==="radius"?0:1]},r}(Axis);RadiusAxis.prototype.dataToRadius=Axis.prototype.dataToCoord;RadiusAxis.prototype.radiusToData=Axis.prototype.coordToData;var inner$8=makeInner(),AngleAxis=function(n){__extends(r,n);function r(a,o){return n.call(this,"angle",a,o||[0,360])||this}return r.prototype.pointToData=function(a,o){return this.polar.pointToData(a,o)[this.dim==="radius"?0:1]},r.prototype.calculateCategoryInterval=function(){var a=this,o=a.getLabelModel(),s=a.scale,l=s.getExtent(),u=s.count();if(l[1]-l[0]<1)return 0;var c=l[0],d=a.dataToCoord(c+1)-a.dataToCoord(c),f=Math.abs(d),p=getBoundingRect(c==null?"":c+"",o.getFont(),"center","top"),v=Math.max(p.height,7),g=v/f;isNaN(g)&&(g=1/0);var y=Math.max(0,Math.floor(g)),_=inner$8(a.model),S=_.lastAutoInterval,b=_.lastTickCount;return S!=null&&b!=null&&Math.abs(S-y)<=1&&Math.abs(b-u)<=1&&S>y?y=S:(_.lastTickCount=u,_.lastAutoInterval=y),y},r}(Axis);AngleAxis.prototype.dataToAngle=Axis.prototype.dataToCoord;AngleAxis.prototype.angleToData=Axis.prototype.coordToData;var polarDimensions=["radius","angle"],Polar=function(){function n(r){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=r||"",this._radiusAxis.polar=this._angleAxis.polar=this}return n.prototype.containPoint=function(r){var a=this.pointToCoord(r);return this._radiusAxis.contain(a[0])&&this._angleAxis.contain(a[1])},n.prototype.containData=function(r){return this._radiusAxis.containData(r[0])&&this._angleAxis.containData(r[1])},n.prototype.getAxis=function(r){var a="_"+r+"Axis";return this[a]},n.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},n.prototype.getAxesByScale=function(r){var a=[],o=this._angleAxis,s=this._radiusAxis;return o.scale.type===r&&a.push(o),s.scale.type===r&&a.push(s),a},n.prototype.getAngleAxis=function(){return this._angleAxis},n.prototype.getRadiusAxis=function(){return this._radiusAxis},n.prototype.getOtherAxis=function(r){var a=this._angleAxis;return r===a?this._radiusAxis:a},n.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},n.prototype.getTooltipAxes=function(r){var a=r!=null&&r!=="auto"?this.getAxis(r):this.getBaseAxis();return{baseAxes:[a],otherAxes:[this.getOtherAxis(a)]}},n.prototype.dataToPoint=function(r,a){return this.coordToPoint([this._radiusAxis.dataToRadius(r[0],a),this._angleAxis.dataToAngle(r[1],a)])},n.prototype.pointToData=function(r,a){var o=this.pointToCoord(r);return[this._radiusAxis.radiusToData(o[0],a),this._angleAxis.angleToData(o[1],a)]},n.prototype.pointToCoord=function(r){var a=r[0]-this.cx,o=r[1]-this.cy,s=this.getAngleAxis(),l=s.getExtent(),u=Math.min(l[0],l[1]),c=Math.max(l[0],l[1]);s.inverse?u=c-360:c=u+360;var d=Math.sqrt(a*a+o*o);a/=d,o/=d;for(var f=Math.atan2(-o,a)/Math.PI*180,p=f<u?1:-1;f<u||f>c;)f+=p*360;return[d,f]},n.prototype.coordToPoint=function(r){var a=r[0],o=r[1]/180*Math.PI,s=Math.cos(o)*a+this.cx,l=-Math.sin(o)*a+this.cy;return[s,l]},n.prototype.getArea=function(){var r=this.getAngleAxis(),a=this.getRadiusAxis(),o=a.getExtent().slice();o[0]>o[1]&&o.reverse();var s=r.getExtent(),l=Math.PI/180,u=1e-4;return{cx:this.cx,cy:this.cy,r0:o[0],r:o[1],startAngle:-s[0]*l,endAngle:-s[1]*l,clockwise:r.inverse,contain:function(c,d){var f=c-this.cx,p=d-this.cy,v=f*f+p*p,g=this.r,y=this.r0;return g!==y&&v-u<=g*g&&v+u>=y*y}}},n.prototype.convertToPixel=function(r,a,o){var s=getCoordSys$2(a);return s===this?this.dataToPoint(o):null},n.prototype.convertFromPixel=function(r,a,o){var s=getCoordSys$2(a);return s===this?this.pointToData(o):null},n}();function getCoordSys$2(n){var r=n.seriesModel,a=n.polarModel;return a&&a.coordinateSystem||r&&r.coordinateSystem}function resizePolar(n,r,a){var o=r.get("center"),s=a.getWidth(),l=a.getHeight();n.cx=parsePercent(o[0],s),n.cy=parsePercent(o[1],l);var u=n.getRadiusAxis(),c=Math.min(s,l)/2,d=r.get("radius");d==null?d=[0,"100%"]:isArray$1(d)||(d=[0,d]);var f=[parsePercent(d[0],c),parsePercent(d[1],c)];u.inverse?u.setExtent(f[1],f[0]):u.setExtent(f[0],f[1])}function updatePolarScale(n,r){var a=this,o=a.getAngleAxis(),s=a.getRadiusAxis();if(o.scale.setExtent(1/0,-1/0),s.scale.setExtent(1/0,-1/0),n.eachSeries(function(c){if(c.coordinateSystem===a){var d=c.getData();each$f(getDataDimensionsOnAxis(d,"radius"),function(f){s.scale.unionExtentFromData(d,f)}),each$f(getDataDimensionsOnAxis(d,"angle"),function(f){o.scale.unionExtentFromData(d,f)})}}),niceScaleExtent(o.scale,o.model),niceScaleExtent(s.scale,s.model),o.type==="category"&&!o.onBand){var l=o.getExtent(),u=360/o.scale.count();o.inverse?l[1]+=u:l[1]-=u,o.setExtent(l[0],l[1])}}function isAngleAxisModel(n){return n.mainType==="angleAxis"}function setAxis(n,r){var a;if(n.type=r.get("type"),n.scale=createScaleByModel$1(r),n.onBand=r.get("boundaryGap")&&n.type==="category",n.inverse=r.get("inverse"),isAngleAxisModel(r)){n.inverse=n.inverse!==r.get("clockwise");var o=r.get("startAngle"),s=(a=r.get("endAngle"))!==null&&a!==void 0?a:o+(n.inverse?-360:360);n.setExtent(o,s)}r.axis=n,n.model=r}var polarCreator={dimensions:polarDimensions,create:function(n,r){var a=[];return n.eachComponent("polar",function(o,s){var l=new Polar(s+"");l.update=updatePolarScale;var u=l.getRadiusAxis(),c=l.getAngleAxis(),d=o.findAxisModel("radiusAxis"),f=o.findAxisModel("angleAxis");setAxis(u,d),setAxis(c,f),resizePolar(l,o,r),a.push(l),o.coordinateSystem=l,l.model=o}),n.eachSeries(function(o){if(o.get("coordinateSystem")==="polar"){var s=o.getReferringComponents("polar",SINGLE_REFERRING).models[0];o.coordinateSystem=s.coordinateSystem}}),a}},elementList=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function getAxisLineShape(n,r,a){r[1]>r[0]&&(r=r.slice().reverse());var o=n.coordToPoint([r[0],a]),s=n.coordToPoint([r[1],a]);return{x1:o[0],y1:o[1],x2:s[0],y2:s[1]}}function getRadiusIdx(n){var r=n.getRadiusAxis();return r.inverse?0:1}function fixAngleOverlap(n){var r=n[0],a=n[n.length-1];r&&a&&Math.abs(Math.abs(r.coord-a.coord)-360)<1e-4&&n.pop()}var AngleAxisView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.axisPointerClass="PolarAxisPointer",a}return r.prototype.render=function(a,o){if(this.group.removeAll(),!!a.get("show")){var s=a.axis,l=s.polar,u=l.getRadiusAxis().getExtent(),c=s.getTicksCoords(),d=s.getMinorTicksCoords(),f=map$1(s.getViewLabels(),function(p){p=clone$6(p);var v=s.scale,g=v.type==="ordinal"?v.getRawOrdinalNumber(p.tickValue):p.tickValue;return p.coord=s.dataToCoord(g),p});fixAngleOverlap(f),fixAngleOverlap(c),each$f(elementList,function(p){a.get([p,"show"])&&(!s.scale.isBlank()||p==="axisLine")&&angelAxisElementsBuilders[p](this.group,a,l,c,d,u,f)},this)}},r.type="angleAxis",r}(AxisView),angelAxisElementsBuilders={axisLine:function(n,r,a,o,s,l){var u=r.getModel(["axisLine","lineStyle"]),c=a.getAngleAxis(),d=Math.PI/180,f=c.getExtent(),p=getRadiusIdx(a),v=p?0:1,g,y=Math.abs(f[1]-f[0])===360?"Circle":"Arc";l[v]===0?g=new graphic$1[y]({shape:{cx:a.cx,cy:a.cy,r:l[p],startAngle:-f[0]*d,endAngle:-f[1]*d,clockwise:c.inverse},style:u.getLineStyle(),z2:1,silent:!0}):g=new Ring({shape:{cx:a.cx,cy:a.cy,r:l[p],r0:l[v]},style:u.getLineStyle(),z2:1,silent:!0}),g.style.fill=null,n.add(g)},axisTick:function(n,r,a,o,s,l){var u=r.getModel("axisTick"),c=(u.get("inside")?-1:1)*u.get("length"),d=l[getRadiusIdx(a)],f=map$1(o,function(p){return new Line$1({shape:getAxisLineShape(a,[d,d+c],p.coord)})});n.add(mergePath(f,{style:defaults$2(u.getModel("lineStyle").getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])})}))},minorTick:function(n,r,a,o,s,l){if(s.length){for(var u=r.getModel("axisTick"),c=r.getModel("minorTick"),d=(u.get("inside")?-1:1)*c.get("length"),f=l[getRadiusIdx(a)],p=[],v=0;v<s.length;v++)for(var g=0;g<s[v].length;g++)p.push(new Line$1({shape:getAxisLineShape(a,[f,f+d],s[v][g].coord)}));n.add(mergePath(p,{style:defaults$2(c.getModel("lineStyle").getLineStyle(),defaults$2(u.getLineStyle(),{stroke:r.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(n,r,a,o,s,l,u){var c=r.getCategories(!0),d=r.getModel("axisLabel"),f=d.get("margin"),p=r.get("triggerEvent");each$f(u,function(v,g){var y=d,_=v.tickValue,S=l[getRadiusIdx(a)],b=a.coordToPoint([S+f,v.coord]),x=a.cx,A=a.cy,w=Math.abs(b[0]-x)/S<.3?"center":b[0]>x?"left":"right",E=Math.abs(b[1]-A)/S<.3?"middle":b[1]>A?"top":"bottom";if(c&&c[_]){var D=c[_];isObject$3(D)&&D.textStyle&&(y=new Model(D.textStyle,d,d.ecModel))}var C=new ZRText({silent:AxisBuilder.isLabelSilent(r),style:createTextStyle$1(y,{x:b[0],y:b[1],fill:y.getTextColor()||r.get(["axisLine","lineStyle","color"]),text:v.formattedLabel,align:w,verticalAlign:E})});if(n.add(C),p){var $=AxisBuilder.makeAxisEventDataBase(r);$.targetType="axisLabel",$.value=v.rawLabel,getECData(C).eventData=$}},this)},splitLine:function(n,r,a,o,s,l){var u=r.getModel("splitLine"),c=u.getModel("lineStyle"),d=c.get("color"),f=0;d=d instanceof Array?d:[d];for(var p=[],v=0;v<o.length;v++){var g=f++%d.length;p[g]=p[g]||[],p[g].push(new Line$1({shape:getAxisLineShape(a,l,o[v].coord)}))}for(var v=0;v<p.length;v++)n.add(mergePath(p[v],{style:defaults$2({stroke:d[v%d.length]},c.getLineStyle()),silent:!0,z:r.get("z")}))},minorSplitLine:function(n,r,a,o,s,l){if(s.length){for(var u=r.getModel("minorSplitLine"),c=u.getModel("lineStyle"),d=[],f=0;f<s.length;f++)for(var p=0;p<s[f].length;p++)d.push(new Line$1({shape:getAxisLineShape(a,l,s[f][p].coord)}));n.add(mergePath(d,{style:c.getLineStyle(),silent:!0,z:r.get("z")}))}},splitArea:function(n,r,a,o,s,l){if(o.length){var u=r.getModel("splitArea"),c=u.getModel("areaStyle"),d=c.get("color"),f=0;d=d instanceof Array?d:[d];for(var p=[],v=Math.PI/180,g=-o[0].coord*v,y=Math.min(l[0],l[1]),_=Math.max(l[0],l[1]),S=r.get("clockwise"),b=1,x=o.length;b<=x;b++){var A=b===x?o[0].coord:o[b].coord,w=f++%d.length;p[w]=p[w]||[],p[w].push(new Sector({shape:{cx:a.cx,cy:a.cy,r0:y,r:_,startAngle:g,endAngle:-A*v,clockwise:S},silent:!0})),g=-A*v}for(var b=0;b<p.length;b++)n.add(mergePath(p[b],{style:defaults$2({fill:d[b%d.length]},c.getAreaStyle()),silent:!0}))}}},axisBuilderAttrs$1=["axisLine","axisTickLabel","axisName"],selfBuilderAttrs$1=["splitLine","splitArea","minorSplitLine"],RadiusAxisView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.axisPointerClass="PolarAxisPointer",a}return r.prototype.render=function(a,o){if(this.group.removeAll(),!!a.get("show")){var s=this._axisGroup,l=this._axisGroup=new Group$3;this.group.add(l);var u=a.axis,c=u.polar,d=c.getAngleAxis(),f=u.getTicksCoords(),p=u.getMinorTicksCoords(),v=d.getExtent()[0],g=u.getExtent(),y=layoutAxis(c,a,v),_=new AxisBuilder(a,y);each$f(axisBuilderAttrs$1,_.add,_),l.add(_.getGroup()),groupTransition(s,l,a),each$f(selfBuilderAttrs$1,function(S){a.get([S,"show"])&&!u.scale.isBlank()&&axisElementBuilders$1[S](this.group,a,c,v,g,f,p)},this)}},r.type="radiusAxis",r}(AxisView),axisElementBuilders$1={splitLine:function(n,r,a,o,s,l){var u=r.getModel("splitLine"),c=u.getModel("lineStyle"),d=c.get("color"),f=0,p=a.getAngleAxis(),v=Math.PI/180,g=p.getExtent(),y=Math.abs(g[1]-g[0])===360?"Circle":"Arc";d=d instanceof Array?d:[d];for(var _=[],S=0;S<l.length;S++){var b=f++%d.length;_[b]=_[b]||[],_[b].push(new graphic$1[y]({shape:{cx:a.cx,cy:a.cy,r:Math.max(l[S].coord,0),startAngle:-g[0]*v,endAngle:-g[1]*v,clockwise:p.inverse}}))}for(var S=0;S<_.length;S++)n.add(mergePath(_[S],{style:defaults$2({stroke:d[S%d.length],fill:null},c.getLineStyle()),silent:!0}))},minorSplitLine:function(n,r,a,o,s,l,u){if(u.length){for(var c=r.getModel("minorSplitLine"),d=c.getModel("lineStyle"),f=[],p=0;p<u.length;p++)for(var v=0;v<u[p].length;v++)f.push(new Circle({shape:{cx:a.cx,cy:a.cy,r:u[p][v].coord}}));n.add(mergePath(f,{style:defaults$2({fill:null},d.getLineStyle()),silent:!0}))}},splitArea:function(n,r,a,o,s,l){if(l.length){var u=r.getModel("splitArea"),c=u.getModel("areaStyle"),d=c.get("color"),f=0;d=d instanceof Array?d:[d];for(var p=[],v=l[0].coord,g=1;g<l.length;g++){var y=f++%d.length;p[y]=p[y]||[],p[y].push(new Sector({shape:{cx:a.cx,cy:a.cy,r0:v,r:l[g].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),v=l[g].coord}for(var g=0;g<p.length;g++)n.add(mergePath(p[g],{style:defaults$2({fill:d[g%d.length]},c.getAreaStyle()),silent:!0}))}}};function layoutAxis(n,r,a){return{position:[n.cx,n.cy],rotation:a/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:r.getModel("axisLabel").get("rotate"),z2:1}}function getSeriesStackId(n){return n.get("stack")||"__ec_stack_"+n.seriesIndex}function getAxisKey(n,r){return r.dim+n.model.componentIndex}function barLayoutPolar(n,r,a){var o={},s=calRadialBar(filter(r.getSeriesByType(n),function(l){return!r.isSeriesFiltered(l)&&l.coordinateSystem&&l.coordinateSystem.type==="polar"}));r.eachSeriesByType(n,function(l){if(l.coordinateSystem.type==="polar"){var u=l.getData(),c=l.coordinateSystem,d=c.getBaseAxis(),f=getAxisKey(c,d),p=getSeriesStackId(l),v=s[f][p],g=v.offset,y=v.width,_=c.getOtherAxis(d),S=l.coordinateSystem.cx,b=l.coordinateSystem.cy,x=l.get("barMinHeight")||0,A=l.get("barMinAngle")||0;o[p]=o[p]||[];for(var w=u.mapDimension(_.dim),E=u.mapDimension(d.dim),D=isDimensionStacked(u,w),C=d.dim!=="radius"||!l.get("roundCap",!0),$=_.model,P=$.get("startValue"),M=_.dataToCoord(P||0),I=0,L=u.count();I<L;I++){var O=u.get(w,I),R=u.get(E,I),N=O>=0?"p":"n",V=M;D&&(o[p][R]||(o[p][R]={p:M,n:M}),V=o[p][R][N]);var F=void 0,U=void 0,H=void 0,W=void 0;if(_.dim==="radius"){var G=_.dataToCoord(O)-M,B=d.dataToCoord(R);Math.abs(G)<x&&(G=(G<0?-1:1)*x),F=V,U=V+G,H=B-g,W=H-y,D&&(o[p][R][N]=U)}else{var Y=_.dataToCoord(O,C)-M,Z=d.dataToCoord(R);Math.abs(Y)<A&&(Y=(Y<0?-1:1)*A),F=Z+g,U=F+y,H=V,W=V+Y,D&&(o[p][R][N]=W)}u.setItemLayout(I,{cx:S,cy:b,r0:F,r:U,startAngle:-H*Math.PI/180,endAngle:-W*Math.PI/180,clockwise:H>=W})}}})}function calRadialBar(n){var r={};each$f(n,function(o,s){var l=o.getData(),u=o.coordinateSystem,c=u.getBaseAxis(),d=getAxisKey(u,c),f=c.getExtent(),p=c.type==="category"?c.getBandWidth():Math.abs(f[1]-f[0])/l.count(),v=r[d]||{bandWidth:p,remainedWidth:p,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},g=v.stacks;r[d]=v;var y=getSeriesStackId(o);g[y]||v.autoWidthCount++,g[y]=g[y]||{width:0,maxWidth:0};var _=parsePercent(o.get("barWidth"),p),S=parsePercent(o.get("barMaxWidth"),p),b=o.get("barGap"),x=o.get("barCategoryGap");_&&!g[y].width&&(_=Math.min(v.remainedWidth,_),g[y].width=_,v.remainedWidth-=_),S&&(g[y].maxWidth=S),b!=null&&(v.gap=b),x!=null&&(v.categoryGap=x)});var a={};return each$f(r,function(o,s){a[s]={};var l=o.stacks,u=o.bandWidth,c=parsePercent(o.categoryGap,u),d=parsePercent(o.gap,1),f=o.remainedWidth,p=o.autoWidthCount,v=(f-c)/(p+(p-1)*d);v=Math.max(v,0),each$f(l,function(S,b){var x=S.maxWidth;x&&x<v&&(x=Math.min(x,f),S.width&&(x=Math.min(x,S.width)),f-=x,S.width=x,p--)}),v=(f-c)/(p+(p-1)*d),v=Math.max(v,0);var g=0,y;each$f(l,function(S,b){S.width||(S.width=v),y=S,g+=S.width*(1+d)}),y&&(g-=y.width*d);var _=-g/2;each$f(l,function(S,b){a[s][b]=a[s][b]||{offset:_,width:S.width},_+=S.width*(1+d)})}),a}var angleAxisExtraOption={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},radiusAxisExtraOption={splitNumber:5},PolarView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="polar",r}(ComponentView);function install$q(n){use(install$s),AxisView.registerAxisPointerClass("PolarAxisPointer",PolarAxisPointer),n.registerCoordinateSystem("polar",polarCreator),n.registerComponentModel(PolarModel),n.registerComponentView(PolarView),axisModelCreator(n,"angle",AngleAxisModel,angleAxisExtraOption),axisModelCreator(n,"radius",RadiusAxisModel,radiusAxisExtraOption),n.registerComponentView(AngleAxisView),n.registerComponentView(RadiusAxisView),n.registerLayout(curry$1(barLayoutPolar,"bar"))}function layout$1(n,r){r=r||{};var a=n.coordinateSystem,o=n.axis,s={},l=o.position,u=o.orient,c=a.getRect(),d=[c.x,c.x+c.width,c.y,c.y+c.height],f={horizontal:{top:d[2],bottom:d[3]},vertical:{left:d[0],right:d[1]}};s.position=[u==="vertical"?f.vertical[l]:d[0],u==="horizontal"?f.horizontal[l]:d[3]];var p={horizontal:0,vertical:1};s.rotation=Math.PI/2*p[u];var v={top:-1,bottom:1,right:1,left:-1};s.labelDirection=s.tickDirection=s.nameDirection=v[l],n.get(["axisTick","inside"])&&(s.tickDirection=-s.tickDirection),retrieve(r.labelInside,n.get(["axisLabel","inside"]))&&(s.labelDirection=-s.labelDirection);var g=r.rotate;return g==null&&(g=n.get(["axisLabel","rotate"])),s.labelRotation=l==="top"?-g:g,s.z2=1,s}var axisBuilderAttrs=["axisLine","axisTickLabel","axisName"],selfBuilderAttrs=["splitArea","splitLine"],SingleAxisView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.axisPointerClass="SingleAxisPointer",a}return r.prototype.render=function(a,o,s,l){var u=this.group;u.removeAll();var c=this._axisGroup;this._axisGroup=new Group$3;var d=layout$1(a),f=new AxisBuilder(a,d);each$f(axisBuilderAttrs,f.add,f),u.add(this._axisGroup),u.add(f.getGroup()),each$f(selfBuilderAttrs,function(p){a.get([p,"show"])&&axisElementBuilders[p](this,this.group,this._axisGroup,a)},this),groupTransition(c,this._axisGroup,a),n.prototype.render.call(this,a,o,s,l)},r.prototype.remove=function(){rectCoordAxisHandleRemove(this)},r.type="singleAxis",r}(AxisView),axisElementBuilders={splitLine:function(n,r,a,o){var s=o.axis;if(!s.scale.isBlank()){var l=o.getModel("splitLine"),u=l.getModel("lineStyle"),c=u.get("color");c=c instanceof Array?c:[c];for(var d=u.get("width"),f=o.coordinateSystem.getRect(),p=s.isHorizontal(),v=[],g=0,y=s.getTicksCoords({tickModel:l}),_=[],S=[],b=0;b<y.length;++b){var x=s.toGlobalCoord(y[b].coord);p?(_[0]=x,_[1]=f.y,S[0]=x,S[1]=f.y+f.height):(_[0]=f.x,_[1]=x,S[0]=f.x+f.width,S[1]=x);var A=new Line$1({shape:{x1:_[0],y1:_[1],x2:S[0],y2:S[1]},silent:!0});subPixelOptimizeLine(A.shape,d);var w=g++%c.length;v[w]=v[w]||[],v[w].push(A)}for(var E=u.getLineStyle(["color"]),b=0;b<v.length;++b)r.add(mergePath(v[b],{style:defaults$2({stroke:c[b%c.length]},E),silent:!0}))}},splitArea:function(n,r,a,o){rectCoordAxisBuildSplitArea(n,a,o,o)}},SingleAxisModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.getCoordSysModel=function(){return this},r.type="singleAxis",r.layoutMode="box",r.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}}},r}(ComponentModel);mixin(SingleAxisModel,AxisModelCommonMixin.prototype);var SingleAxis=function(n){__extends(r,n);function r(a,o,s,l,u){var c=n.call(this,a,o,s)||this;return c.type=l||"value",c.position=u||"bottom",c}return r.prototype.isHorizontal=function(){var a=this.position;return a==="top"||a==="bottom"},r.prototype.pointToData=function(a,o){return this.coordinateSystem.pointToData(a)[0]},r}(Axis),singleDimensions=["single"],Single=function(){function n(r,a,o){this.type="single",this.dimension="single",this.dimensions=singleDimensions,this.axisPointerEnabled=!0,this.model=r,this._init(r,a,o)}return n.prototype._init=function(r,a,o){var s=this.dimension,l=new SingleAxis(s,createScaleByModel$1(r),[0,0],r.get("type"),r.get("position")),u=l.type==="category";l.onBand=u&&r.get("boundaryGap"),l.inverse=r.get("inverse"),l.orient=r.get("orient"),r.axis=l,l.model=r,l.coordinateSystem=this,this._axis=l},n.prototype.update=function(r,a){r.eachSeries(function(o){if(o.coordinateSystem===this){var s=o.getData();each$f(s.mapDimensionsAll(this.dimension),function(l){this._axis.scale.unionExtentFromData(s,l)},this),niceScaleExtent(this._axis.scale,this._axis.model)}},this)},n.prototype.resize=function(r,a){this._rect=getLayoutRect({left:r.get("left"),top:r.get("top"),right:r.get("right"),bottom:r.get("bottom"),width:r.get("width"),height:r.get("height")},{width:a.getWidth(),height:a.getHeight()}),this._adjustAxis()},n.prototype.getRect=function(){return this._rect},n.prototype._adjustAxis=function(){var r=this._rect,a=this._axis,o=a.isHorizontal(),s=o?[0,r.width]:[0,r.height],l=a.inverse?1:0;a.setExtent(s[l],s[1-l]),this._updateAxisTransform(a,o?r.x:r.y)},n.prototype._updateAxisTransform=function(r,a){var o=r.getExtent(),s=o[0]+o[1],l=r.isHorizontal();r.toGlobalCoord=l?function(u){return u+a}:function(u){return s-u+a},r.toLocalCoord=l?function(u){return u-a}:function(u){return s-u+a}},n.prototype.getAxis=function(){return this._axis},n.prototype.getBaseAxis=function(){return this._axis},n.prototype.getAxes=function(){return[this._axis]},n.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},n.prototype.containPoint=function(r){var a=this.getRect(),o=this.getAxis(),s=o.orient;return s==="horizontal"?o.contain(o.toLocalCoord(r[0]))&&r[1]>=a.y&&r[1]<=a.y+a.height:o.contain(o.toLocalCoord(r[1]))&&r[0]>=a.y&&r[0]<=a.y+a.height},n.prototype.pointToData=function(r){var a=this.getAxis();return[a.coordToData(a.toLocalCoord(r[a.orient==="horizontal"?0:1]))]},n.prototype.dataToPoint=function(r){var a=this.getAxis(),o=this.getRect(),s=[],l=a.orient==="horizontal"?0:1;return r instanceof Array&&(r=r[0]),s[l]=a.toGlobalCoord(a.dataToCoord(+r)),s[1-l]=l===0?o.y+o.height/2:o.x+o.width/2,s},n.prototype.convertToPixel=function(r,a,o){var s=getCoordSys$1(a);return s===this?this.dataToPoint(o):null},n.prototype.convertFromPixel=function(r,a,o){var s=getCoordSys$1(a);return s===this?this.pointToData(o):null},n}();function getCoordSys$1(n){var r=n.seriesModel,a=n.singleAxisModel;return a&&a.coordinateSystem||r&&r.coordinateSystem}function create(n,r){var a=[];return n.eachComponent("singleAxis",function(o,s){var l=new Single(o,n,r);l.name="single_"+s,l.resize(o,r),o.coordinateSystem=l,a.push(l)}),n.eachSeries(function(o){if(o.get("coordinateSystem")==="singleAxis"){var s=o.getReferringComponents("singleAxis",SINGLE_REFERRING).models[0];o.coordinateSystem=s&&s.coordinateSystem}}),a}var singleCreator={create,dimensions:singleDimensions},XY$1=["x","y"],WH$1=["width","height"],SingleAxisPointer=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.makeElOption=function(a,o,s,l,u){var c=s.axis,d=c.coordinateSystem,f=getGlobalExtent(d,1-getPointDimIndex(c)),p=d.dataToPoint(o)[0],v=l.get("type");if(v&&v!=="none"){var g=buildElStyle(l),y=pointerShapeBuilder[v](c,p,f);y.style=g,a.graphicKey=y.type,a.pointer=y}var _=layout$1(s);buildCartesianSingleLabelElOption(o,a,_,s,l,u)},r.prototype.getHandleTransform=function(a,o,s){var l=layout$1(o,{labelInside:!1});l.labelMargin=s.get(["handle","margin"]);var u=getTransformedPosition(o.axis,a,l);return{x:u[0],y:u[1],rotation:l.rotation+(l.labelDirection<0?Math.PI:0)}},r.prototype.updateHandleTransform=function(a,o,s,l){var u=s.axis,c=u.coordinateSystem,d=getPointDimIndex(u),f=getGlobalExtent(c,d),p=[a.x,a.y];p[d]+=o[d],p[d]=Math.min(f[1],p[d]),p[d]=Math.max(f[0],p[d]);var v=getGlobalExtent(c,1-d),g=(v[1]+v[0])/2,y=[g,g];return y[d]=p[d],{x:p[0],y:p[1],rotation:a.rotation,cursorPoint:y,tooltipOption:{verticalAlign:"middle"}}},r}(BaseAxisPointer),pointerShapeBuilder={line:function(n,r,a){var o=makeLineShape([r,a[0]],[r,a[1]],getPointDimIndex(n));return{type:"Line",subPixelOptimize:!0,shape:o}},shadow:function(n,r,a){var o=n.getBandWidth(),s=a[1]-a[0];return{type:"Rect",shape:makeRectShape([r-o/2,a[0]],[o,s],getPointDimIndex(n))}}};function getPointDimIndex(n){return n.isHorizontal()?0:1}function getGlobalExtent(n,r){var a=n.getRect();return[a[XY$1[r]],a[XY$1[r]]+a[WH$1[r]]]}var SingleView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="single",r}(ComponentView);function install$p(n){use(install$s),AxisView.registerAxisPointerClass("SingleAxisPointer",SingleAxisPointer),n.registerComponentView(SingleView),n.registerComponentView(SingleAxisView),n.registerComponentModel(SingleAxisModel),axisModelCreator(n,"single",SingleAxisModel,SingleAxisModel.defaultOption),n.registerCoordinateSystem("single",singleCreator)}var CalendarModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(a,o,s){var l=getLayoutParams(a);n.prototype.init.apply(this,arguments),mergeAndNormalizeLayoutParams$1(a,l)},r.prototype.mergeOption=function(a){n.prototype.mergeOption.apply(this,arguments),mergeAndNormalizeLayoutParams$1(this.option,a)},r.prototype.getCellSize=function(){return this.option.cellSize},r.type="calendar",r.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},r}(ComponentModel);function mergeAndNormalizeLayoutParams$1(n,r){var a=n.cellSize,o;isArray$1(a)?o=a:o=n.cellSize=[a,a],o.length===1&&(o[1]=o[0]);var s=map$1([0,1],function(l){return sizeCalculable(r,l)&&(o[l]="auto"),o[l]!=null&&o[l]!=="auto"});mergeLayoutParam(n,r,{type:"box",ignoreSize:s})}var CalendarView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){var l=this.group;l.removeAll();var u=a.coordinateSystem,c=u.getRangeInfo(),d=u.getOrient(),f=o.getLocaleModel();this._renderDayRect(a,c,l),this._renderLines(a,c,d,l),this._renderYearText(a,c,d,l),this._renderMonthText(a,f,d,l),this._renderWeekText(a,f,c,d,l)},r.prototype._renderDayRect=function(a,o,s){for(var l=a.coordinateSystem,u=a.getModel("itemStyle").getItemStyle(),c=l.getCellWidth(),d=l.getCellHeight(),f=o.start.time;f<=o.end.time;f=l.getNextNDay(f,1).time){var p=l.dataToRect([f],!1).tl,v=new Rect$2({shape:{x:p[0],y:p[1],width:c,height:d},cursor:"default",style:u});s.add(v)}},r.prototype._renderLines=function(a,o,s,l){var u=this,c=a.coordinateSystem,d=a.getModel(["splitLine","lineStyle"]).getLineStyle(),f=a.get(["splitLine","show"]),p=d.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var v=o.start,g=0;v.time<=o.end.time;g++){_(v.formatedDate),g===0&&(v=c.getDateInfo(o.start.y+"-"+o.start.m));var y=v.date;y.setMonth(y.getMonth()+1),v=c.getDateInfo(y)}_(c.getNextNDay(o.end.time,1).formatedDate);function _(S){u._firstDayOfMonth.push(c.getDateInfo(S)),u._firstDayPoints.push(c.dataToRect([S],!1).tl);var b=u._getLinePointsOfOneWeek(a,S,s);u._tlpoints.push(b[0]),u._blpoints.push(b[b.length-1]),f&&u._drawSplitline(b,d,l)}f&&this._drawSplitline(u._getEdgesPoints(u._tlpoints,p,s),d,l),f&&this._drawSplitline(u._getEdgesPoints(u._blpoints,p,s),d,l)},r.prototype._getEdgesPoints=function(a,o,s){var l=[a[0].slice(),a[a.length-1].slice()],u=s==="horizontal"?0:1;return l[0][u]=l[0][u]-o/2,l[1][u]=l[1][u]+o/2,l},r.prototype._drawSplitline=function(a,o,s){var l=new Polyline$1({z2:20,shape:{points:a},style:o});s.add(l)},r.prototype._getLinePointsOfOneWeek=function(a,o,s){for(var l=a.coordinateSystem,u=l.getDateInfo(o),c=[],d=0;d<7;d++){var f=l.getNextNDay(u.time,d),p=l.dataToRect([f.time],!1);c[2*f.day]=p.tl,c[2*f.day+1]=p[s==="horizontal"?"bl":"tr"]}return c},r.prototype._formatterLabel=function(a,o){return isString(a)&&a?formatTplSimple(a,o):isFunction(a)?a(o):o.nameMap},r.prototype._yearTextPositionControl=function(a,o,s,l,u){var c=o[0],d=o[1],f=["center","bottom"];l==="bottom"?(d+=u,f=["center","top"]):l==="left"?c-=u:l==="right"?(c+=u,f=["center","top"]):d-=u;var p=0;return(l==="left"||l==="right")&&(p=Math.PI/2),{rotation:p,x:c,y:d,style:{align:f[0],verticalAlign:f[1]}}},r.prototype._renderYearText=function(a,o,s,l){var u=a.getModel("yearLabel");if(u.get("show")){var c=u.get("margin"),d=u.get("position");d||(d=s!=="horizontal"?"top":"left");var f=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],p=(f[0][0]+f[1][0])/2,v=(f[0][1]+f[1][1])/2,g=s==="horizontal"?0:1,y={top:[p,f[g][1]],bottom:[p,f[1-g][1]],left:[f[1-g][0],v],right:[f[g][0],v]},_=o.start.y;+o.end.y>+o.start.y&&(_=_+"-"+o.end.y);var S=u.get("formatter"),b={start:o.start.y,end:o.end.y,nameMap:_},x=this._formatterLabel(S,b),A=new ZRText({z2:30,style:createTextStyle$1(u,{text:x}),silent:u.get("silent")});A.attr(this._yearTextPositionControl(A,y[d],s,d,c)),l.add(A)}},r.prototype._monthTextPositionControl=function(a,o,s,l,u){var c="left",d="top",f=a[0],p=a[1];return s==="horizontal"?(p=p+u,o&&(c="center"),l==="start"&&(d="bottom")):(f=f+u,o&&(d="middle"),l==="start"&&(c="right")),{x:f,y:p,align:c,verticalAlign:d}},r.prototype._renderMonthText=function(a,o,s,l){var u=a.getModel("monthLabel");if(u.get("show")){var c=u.get("nameMap"),d=u.get("margin"),f=u.get("position"),p=u.get("align"),v=[this._tlpoints,this._blpoints];(!c||isString(c))&&(c&&(o=getLocaleModel(c)||o),c=o.get(["time","monthAbbr"])||[]);var g=f==="start"?0:1,y=s==="horizontal"?0:1;d=f==="start"?-d:d;for(var _=p==="center",S=u.get("silent"),b=0;b<v[g].length-1;b++){var x=v[g][b].slice(),A=this._firstDayOfMonth[b];if(_){var w=this._firstDayPoints[b];x[y]=(w[y]+v[0][b+1][y])/2}var E=u.get("formatter"),D=c[+A.m-1],C={yyyy:A.y,yy:(A.y+"").slice(2),MM:A.m,M:+A.m,nameMap:D},$=this._formatterLabel(E,C),P=new ZRText({z2:30,style:extend$2(createTextStyle$1(u,{text:$}),this._monthTextPositionControl(x,_,s,f,d)),silent:S});l.add(P)}}},r.prototype._weekTextPositionControl=function(a,o,s,l,u){var c="center",d="middle",f=a[0],p=a[1],v=s==="start";return o==="horizontal"?(f=f+l+(v?1:-1)*u[0]/2,c=v?"right":"left"):(p=p+l+(v?1:-1)*u[1]/2,d=v?"bottom":"top"),{x:f,y:p,align:c,verticalAlign:d}},r.prototype._renderWeekText=function(a,o,s,l,u){var c=a.getModel("dayLabel");if(c.get("show")){var d=a.coordinateSystem,f=c.get("position"),p=c.get("nameMap"),v=c.get("margin"),g=d.getFirstDayOfWeek();if(!p||isString(p)){p&&(o=getLocaleModel(p)||o);var y=o.get(["time","dayOfWeekShort"]);p=y||map$1(o.get(["time","dayOfWeekAbbr"]),function(C){return C[0]})}var _=d.getNextNDay(s.end.time,7-s.lweek).time,S=[d.getCellWidth(),d.getCellHeight()];v=parsePercent(v,Math.min(S[1],S[0])),f==="start"&&(_=d.getNextNDay(s.start.time,-(7+s.fweek)).time,v=-v);for(var b=c.get("silent"),x=0;x<7;x++){var A=d.getNextNDay(_,x),w=d.dataToRect([A.time],!1).center,E=x;E=Math.abs((x+g)%7);var D=new ZRText({z2:30,style:extend$2(createTextStyle$1(c,{text:p[E]}),this._weekTextPositionControl(w,l,f,v,S)),silent:b});u.add(D)}}},r.type="calendar",r}(ComponentView),PROXIMATE_ONE_DAY=864e5,Calendar=function(){function n(r,a,o){this.type="calendar",this.dimensions=n.dimensions,this.getDimensionsInfo=n.getDimensionsInfo,this._model=r}return n.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},n.prototype.getRangeInfo=function(){return this._rangeInfo},n.prototype.getModel=function(){return this._model},n.prototype.getRect=function(){return this._rect},n.prototype.getCellWidth=function(){return this._sw},n.prototype.getCellHeight=function(){return this._sh},n.prototype.getOrient=function(){return this._orient},n.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},n.prototype.getDateInfo=function(r){r=parseDate(r);var a=r.getFullYear(),o=r.getMonth()+1,s=o<10?"0"+o:""+o,l=r.getDate(),u=l<10?"0"+l:""+l,c=r.getDay();return c=Math.abs((c+7-this.getFirstDayOfWeek())%7),{y:a+"",m:s,d:u,day:c,time:r.getTime(),formatedDate:a+"-"+s+"-"+u,date:r}},n.prototype.getNextNDay=function(r,a){return a=a||0,a===0?this.getDateInfo(r):(r=new Date(this.getDateInfo(r).time),r.setDate(r.getDate()+a),this.getDateInfo(r))},n.prototype.update=function(r,a){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 o=this._rangeInfo.weeks||1,s=["width","height"],l=this._model.getCellSize().slice(),u=this._model.getBoxLayoutParams(),c=this._orient==="horizontal"?[o,7]:[7,o];each$f([0,1],function(v){p(l,v)&&(u[s[v]]=l[v]*c[v])});var d={width:a.getWidth(),height:a.getHeight()},f=this._rect=getLayoutRect(u,d);each$f([0,1],function(v){p(l,v)||(l[v]=f[s[v]]/c[v])});function p(v,g){return v[g]!=null&&v[g]!=="auto"}this._sw=l[0],this._sh=l[1]},n.prototype.dataToPoint=function(r,a){isArray$1(r)&&(r=r[0]),a==null&&(a=!0);var o=this.getDateInfo(r),s=this._rangeInfo,l=o.formatedDate;if(a&&!(o.time>=s.start.time&&o.time<s.end.time+PROXIMATE_ONE_DAY))return[NaN,NaN];var u=o.day,c=this._getRangeInfo([s.start.time,l]).nthWeek;return this._orient==="vertical"?[this._rect.x+u*this._sw+this._sw/2,this._rect.y+c*this._sh+this._sh/2]:[this._rect.x+c*this._sw+this._sw/2,this._rect.y+u*this._sh+this._sh/2]},n.prototype.pointToData=function(r){var a=this.pointToDate(r);return a&&a.time},n.prototype.dataToRect=function(r,a){var o=this.dataToPoint(r,a);return{contentShape:{x:o[0]-(this._sw-this._lineWidth)/2,y:o[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:o,tl:[o[0]-this._sw/2,o[1]-this._sh/2],tr:[o[0]+this._sw/2,o[1]-this._sh/2],br:[o[0]+this._sw/2,o[1]+this._sh/2],bl:[o[0]-this._sw/2,o[1]+this._sh/2]}},n.prototype.pointToDate=function(r){var a=Math.floor((r[0]-this._rect.x)/this._sw)+1,o=Math.floor((r[1]-this._rect.y)/this._sh)+1,s=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(o,a-1,s):this._getDateByWeeksAndDay(a,o-1,s)},n.prototype.convertToPixel=function(r,a,o){var s=getCoordSys(a);return s===this?s.dataToPoint(o):null},n.prototype.convertFromPixel=function(r,a,o){var s=getCoordSys(a);return s===this?s.pointToData(o):null},n.prototype.containPoint=function(r){return!1},n.prototype._initRangeOption=function(){var r=this._model.get("range"),a;if(isArray$1(r)&&r.length===1&&(r=r[0]),isArray$1(r))a=r;else{var o=r.toString();if(/^\d{4}$/.test(o)&&(a=[o+"-01-01",o+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(o)){var s=this.getDateInfo(o),l=s.date;l.setMonth(l.getMonth()+1);var u=this.getNextNDay(l,-1);a=[s.formatedDate,u.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(o)&&(a=[o,o])}if(!a)return r;var c=this._getRangeInfo(a);return c.start.time>c.end.time&&a.reverse(),a},n.prototype._getRangeInfo=function(r){var a=[this.getDateInfo(r[0]),this.getDateInfo(r[1])],o;a[0].time>a[1].time&&(o=!0,a.reverse());var s=Math.floor(a[1].time/PROXIMATE_ONE_DAY)-Math.floor(a[0].time/PROXIMATE_ONE_DAY)+1,l=new Date(a[0].time),u=l.getDate(),c=a[1].date.getDate();l.setDate(u+s-1);var d=l.getDate();if(d!==c)for(var f=l.getTime()-a[1].time>0?1:-1;(d=l.getDate())!==c&&(l.getTime()-a[1].time)*f>0;)s-=f,l.setDate(d-f);var p=Math.floor((s+a[0].day+6)/7),v=o?-p+1:p-1;return o&&a.reverse(),{range:[a[0].formatedDate,a[1].formatedDate],start:a[0],end:a[1],allDay:s,weeks:p,nthWeek:v,fweek:a[0].day,lweek:a[1].day}},n.prototype._getDateByWeeksAndDay=function(r,a,o){var s=this._getRangeInfo(o);if(r>s.weeks||r===0&&a<s.fweek||r===s.weeks&&a>s.lweek)return null;var l=(r-1)*7-s.fweek+a,u=new Date(s.start.time);return u.setDate(+s.start.d+l),this.getDateInfo(u)},n.create=function(r,a){var o=[];return r.eachComponent("calendar",function(s){var l=new n(s);o.push(l),s.coordinateSystem=l}),r.eachSeries(function(s){s.get("coordinateSystem")==="calendar"&&(s.coordinateSystem=o[s.get("calendarIndex")||0])}),o},n.dimensions=["time","value"],n}();function getCoordSys(n){var r=n.calendarModel,a=n.seriesModel,o=r?r.coordinateSystem:a?a.coordinateSystem:null;return o}function install$o(n){n.registerComponentModel(CalendarModel),n.registerComponentView(CalendarView),n.registerCoordinateSystem("calendar",Calendar)}function setKeyInfoToNewElOption(n,r){var a=n.existing;if(r.id=n.keyInfo.id,!r.type&&a&&(r.type=a.type),r.parentId==null){var o=r.parentOption;o?r.parentId=o.id:a&&(r.parentId=a.parentId)}r.parentOption=null}function isSetLoc(n,r){var a;return each$f(r,function(o){n[o]!=null&&n[o]!=="auto"&&(a=!0)}),a}function mergeNewElOptionToExist(n,r,a){var o=extend$2({},a),s=n[r],l=a.$action||"merge";l==="merge"?s?(merge(s,o,!0),mergeLayoutParam(s,o,{ignoreSize:!0}),copyLayoutParams(a,s),copyTransitionInfo(a,s),copyTransitionInfo(a,s,"shape"),copyTransitionInfo(a,s,"style"),copyTransitionInfo(a,s,"extra"),a.clipPath=s.clipPath):n[r]=o:l==="replace"?n[r]=o:l==="remove"&&s&&(n[r]=null)}var TRANSITION_PROPS_TO_COPY=["transition","enterFrom","leaveTo"],ROOT_TRANSITION_PROPS_TO_COPY=TRANSITION_PROPS_TO_COPY.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function copyTransitionInfo(n,r,a){if(a&&(!n[a]&&r[a]&&(n[a]={}),n=n[a],r=r[a]),!(!n||!r))for(var o=a?TRANSITION_PROPS_TO_COPY:ROOT_TRANSITION_PROPS_TO_COPY,s=0;s<o.length;s++){var l=o[s];n[l]==null&&r[l]!=null&&(n[l]=r[l])}}function setLayoutInfoToExist(n,r){if(n&&(n.hv=r.hv=[isSetLoc(r,["left","right"]),isSetLoc(r,["top","bottom"])],n.type==="group")){var a=n,o=r;a.width==null&&(a.width=o.width=0),a.height==null&&(a.height=o.height=0)}}var GraphicComponentModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.preventAutoZ=!0,a}return r.prototype.mergeOption=function(a,o){var s=this.option.elements;this.option.elements=null,n.prototype.mergeOption.call(this,a,o),this.option.elements=s},r.prototype.optionUpdated=function(a,o){var s=this.option,l=(o?s:a).elements,u=s.elements=o?[]:s.elements,c=[];this._flatten(l,c,null);var d=mappingToExists(u,c,"normalMerge"),f=this._elOptionsToUpdate=[];each$f(d,function(p,v){var g=p.newOption;g&&(f.push(g),setKeyInfoToNewElOption(p,g),mergeNewElOptionToExist(u,v,g),setLayoutInfoToExist(u[v],g))},this),s.elements=filter(u,function(p){return p&&delete p.$action,p!=null})},r.prototype._flatten=function(a,o,s){each$f(a,function(l){if(l){s&&(l.parentOption=s),o.push(l);var u=l.children;u&&u.length&&this._flatten(u,o,l),delete l.children}},this)},r.prototype.useElOptionsToUpdate=function(){var a=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,a},r.type="graphic",r.defaultOption={elements:[]},r}(ComponentModel),nonShapeGraphicElements={path:null,compoundPath:null,group:Group$3,image:ZRImage,text:ZRText},inner$7=makeInner(),GraphicComponentView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(){this._elMap=createHashMap()},r.prototype.render=function(a,o,s){a!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=a,this._updateElements(a),this._relocate(a,s)},r.prototype._updateElements=function(a){var o=a.useElOptionsToUpdate();if(o){var s=this._elMap,l=this.group,u=a.get("z"),c=a.get("zlevel");each$f(o,function(d){var f=convertOptionIdName(d.id,null),p=f!=null?s.get(f):null,v=convertOptionIdName(d.parentId,null),g=v!=null?s.get(v):l,y=d.type,_=d.style;y==="text"&&_&&d.hv&&d.hv[1]&&(_.textVerticalAlign=_.textBaseline=_.verticalAlign=_.align=null);var S=d.textContent,b=d.textConfig;if(_&&isEC4CompatibleStyle(_,y,!!b,!!S)){var x=convertFromEC4CompatibleStyle(_,y,!0);!b&&x.textConfig&&(b=d.textConfig=x.textConfig),!S&&x.textContent&&(S=x.textContent)}var A=getCleanedElOption(d),w=d.$action||"merge",E=w==="merge",D=w==="replace";if(E){var C=!p,$=p;C?$=createEl(f,g,d.type,s):($&&(inner$7($).isNew=!1),stopPreviousKeyframeAnimationAndRestore($)),$&&(applyUpdateTransition($,A,a,{isInit:C}),updateCommonAttrs($,d,u,c))}else if(D){removeEl$1(p,d,s,a);var P=createEl(f,g,d.type,s);P&&(applyUpdateTransition(P,A,a,{isInit:!0}),updateCommonAttrs(P,d,u,c))}else w==="remove"&&(updateLeaveTo(p,d),removeEl$1(p,d,s,a));var M=s.get(f);if(M&&S)if(E){var I=M.getTextContent();I?I.attr(S):M.setTextContent(new ZRText(S))}else D&&M.setTextContent(new ZRText(S));if(M){var L=d.clipPath;if(L){var O=L.type,R=void 0,C=!1;if(E){var N=M.getClipPath();C=!N||inner$7(N).type!==O,R=C?newEl(O):N}else D&&(C=!0,R=newEl(O));M.setClipPath(R),applyUpdateTransition(R,L,a,{isInit:C}),applyKeyframeAnimation(R,L.keyframeAnimation,a)}var V=inner$7(M);M.setTextConfig(b),V.option=d,setEventData(M,a,d),setTooltipConfig({el:M,componentModel:a,itemName:M.name,itemTooltipOption:d.tooltip}),applyKeyframeAnimation(M,d.keyframeAnimation,a)}})}},r.prototype._relocate=function(a,o){for(var s=a.option.elements,l=this.group,u=this._elMap,c=o.getWidth(),d=o.getHeight(),f=["x","y"],p=0;p<s.length;p++){var v=s[p],g=convertOptionIdName(v.id,null),y=g!=null?u.get(g):null;if(!(!y||!y.isGroup)){var _=y.parent,S=_===l,b=inner$7(y),x=inner$7(_);b.width=parsePercent(b.option.width,S?c:x.width)||0,b.height=parsePercent(b.option.height,S?d:x.height)||0}}for(var p=s.length-1;p>=0;p--){var v=s[p],g=convertOptionIdName(v.id,null),y=g!=null?u.get(g):null;if(y){var _=y.parent,x=inner$7(_),A=_===l?{width:c,height:d}:{width:x.width,height:x.height},w={},E=positionElement(y,v,A,null,{hv:v.hv,boundingMode:v.bounding},w);if(!inner$7(y).isNew&&E){for(var D=v.transition,C={},$=0;$<f.length;$++){var P=f[$],M=w[P];D&&(isTransitionAll(D)||indexOf(D,P)>=0)?C[P]=M:y[P]=M}updateProps$1(y,C,a,0)}else y.attr(w)}}},r.prototype._clear=function(){var a=this,o=this._elMap;o.each(function(s){removeEl$1(s,inner$7(s).option,o,a._lastGraphicModel)}),this._elMap=createHashMap()},r.prototype.dispose=function(){this._clear()},r.type="graphic",r}(ComponentView);function newEl(n){var r=hasOwn(nonShapeGraphicElements,n)?nonShapeGraphicElements[n]:getShapeClass(n),a=new r({});return inner$7(a).type=n,a}function createEl(n,r,a,o){var s=newEl(a);return r.add(s),o.set(n,s),inner$7(s).id=n,inner$7(s).isNew=!0,s}function removeEl$1(n,r,a,o){var s=n&&n.parent;s&&(n.type==="group"&&n.traverse(function(l){removeEl$1(l,r,a,o)}),applyLeaveTransition(n,r,o),a.removeKey(inner$7(n).id))}function updateCommonAttrs(n,r,a,o){n.isGroup||each$f([["cursor",Displayable.prototype.cursor],["zlevel",o||0],["z",a||0],["z2",0]],function(s){var l=s[0];hasOwn(r,l)?n[l]=retrieve2(r[l],s[1]):n[l]==null&&(n[l]=s[1])}),each$f(keys(r),function(s){if(s.indexOf("on")===0){var l=r[s];n[s]=isFunction(l)?l:null}}),hasOwn(r,"draggable")&&(n.draggable=r.draggable),r.name!=null&&(n.name=r.name),r.id!=null&&(n.id=r.id)}function getCleanedElOption(n){return n=extend$2({},n),each$f(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(LOCATION_PARAMS),function(r){delete n[r]}),n}function setEventData(n,r,a){var o=getECData(n).eventData;!n.silent&&!n.ignore&&!o&&(o=getECData(n).eventData={componentType:"graphic",componentIndex:r.componentIndex,name:n.name}),o&&(o.info=a.info)}function install$n(n){n.registerComponentModel(GraphicComponentModel),n.registerComponentView(GraphicComponentView),n.registerPreprocessor(function(r){var a=r.graphic;isArray$1(a)?!a[0]||!a[0].elements?r.graphic=[{elements:a}]:r.graphic=[r.graphic[0]]:a&&!a.elements&&(r.graphic=[{elements:[a]}])})}var DATA_ZOOM_AXIS_DIMENSIONS=["x","y","radius","angle","single"],SERIES_COORDS=["cartesian2d","polar","singleAxis"];function isCoordSupported(n){var r=n.get("coordinateSystem");return indexOf(SERIES_COORDS,r)>=0}function getAxisMainType(n){return n+"Axis"}function findEffectedDataZooms(n,r){var a=createHashMap(),o=[],s=createHashMap();n.eachComponent({mainType:"dataZoom",query:r},function(p){s.get(p.uid)||c(p)});var l;do l=!1,n.eachComponent("dataZoom",u);while(l);function u(p){!s.get(p.uid)&&d(p)&&(c(p),l=!0)}function c(p){s.set(p.uid,!0),o.push(p),f(p)}function d(p){var v=!1;return p.eachTargetAxis(function(g,y){var _=a.get(g);_&&_[y]&&(v=!0)}),v}function f(p){p.eachTargetAxis(function(v,g){(a.get(v)||a.set(v,[]))[g]=!0})}return o}function collectReferCoordSysModelInfo(n){var r=n.ecModel,a={infoList:[],infoMap:createHashMap()};return n.eachTargetAxis(function(o,s){var l=r.getComponent(getAxisMainType(o),s);if(l){var u=l.getCoordSysModel();if(u){var c=u.uid,d=a.infoMap.get(c);d||(d={model:u,axisModels:[]},a.infoList.push(d),a.infoMap.set(c,d)),d.axisModels.push(l)}}}),a}var DataZoomAxisInfo=function(){function n(){this.indexList=[],this.indexMap=[]}return n.prototype.add=function(r){this.indexMap[r]||(this.indexList.push(r),this.indexMap[r]=!0)},n}(),DataZoomModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a._autoThrottle=!0,a._noTarget=!0,a._rangePropMode=["percent","percent"],a}return r.prototype.init=function(a,o,s){var l=retrieveRawOption(a);this.settledOption=l,this.mergeDefaultAndTheme(a,s),this._doInit(l)},r.prototype.mergeOption=function(a){var o=retrieveRawOption(a);merge(this.option,a,!0),merge(this.settledOption,o,!0),this._doInit(o)},r.prototype._doInit=function(a){var o=this.option;this._setDefaultThrottle(a),this._updateRangeUse(a);var s=this.settledOption;each$f([["start","startValue"],["end","endValue"]],function(l,u){this._rangePropMode[u]==="value"&&(o[l[0]]=s[l[0]]=null)},this),this._resetTarget()},r.prototype._resetTarget=function(){var a=this.get("orient",!0),o=this._targetAxisInfoMap=createHashMap(),s=this._fillSpecifiedTargetAxis(o);s?this._orient=a||this._makeAutoOrientByTargetAxis():(this._orient=a||"horizontal",this._fillAutoTargetAxisByOrient(o,this._orient)),this._noTarget=!0,o.each(function(l){l.indexList.length&&(this._noTarget=!1)},this)},r.prototype._fillSpecifiedTargetAxis=function(a){var o=!1;return each$f(DATA_ZOOM_AXIS_DIMENSIONS,function(s){var l=this.getReferringComponents(getAxisMainType(s),MULTIPLE_REFERRING);if(l.specified){o=!0;var u=new DataZoomAxisInfo;each$f(l.models,function(c){u.add(c.componentIndex)}),a.set(s,u)}},this),o},r.prototype._fillAutoTargetAxisByOrient=function(a,o){var s=this.ecModel,l=!0;if(l){var u=o==="vertical"?"y":"x",c=s.findComponents({mainType:u+"Axis"});d(c,u)}if(l){var c=s.findComponents({mainType:"singleAxis",filter:function(p){return p.get("orient",!0)===o}});d(c,"single")}function d(f,p){var v=f[0];if(v){var g=new DataZoomAxisInfo;if(g.add(v.componentIndex),a.set(p,g),l=!1,p==="x"||p==="y"){var y=v.getReferringComponents("grid",SINGLE_REFERRING).models[0];y&&each$f(f,function(_){v.componentIndex!==_.componentIndex&&y===_.getReferringComponents("grid",SINGLE_REFERRING).models[0]&&g.add(_.componentIndex)})}}}l&&each$f(DATA_ZOOM_AXIS_DIMENSIONS,function(f){if(l){var p=s.findComponents({mainType:getAxisMainType(f),filter:function(g){return g.get("type",!0)==="category"}});if(p[0]){var v=new DataZoomAxisInfo;v.add(p[0].componentIndex),a.set(f,v),l=!1}}},this)},r.prototype._makeAutoOrientByTargetAxis=function(){var a;return this.eachTargetAxis(function(o){!a&&(a=o)},this),a==="y"?"vertical":"horizontal"},r.prototype._setDefaultThrottle=function(a){if(a.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var o=this.ecModel.option;this.option.throttle=o.animation&&o.animationDurationUpdate>0?100:20}},r.prototype._updateRangeUse=function(a){var o=this._rangePropMode,s=this.get("rangeMode");each$f([["start","startValue"],["end","endValue"]],function(l,u){var c=a[l[0]]!=null,d=a[l[1]]!=null;c&&!d?o[u]="percent":!c&&d?o[u]="value":s?o[u]=s[u]:c&&(o[u]="percent")})},r.prototype.noTarget=function(){return this._noTarget},r.prototype.getFirstTargetAxisModel=function(){var a;return this.eachTargetAxis(function(o,s){a==null&&(a=this.ecModel.getComponent(getAxisMainType(o),s))},this),a},r.prototype.eachTargetAxis=function(a,o){this._targetAxisInfoMap.each(function(s,l){each$f(s.indexList,function(u){a.call(o,l,u)})})},r.prototype.getAxisProxy=function(a,o){var s=this.getAxisModel(a,o);if(s)return s.__dzAxisProxy},r.prototype.getAxisModel=function(a,o){var s=this._targetAxisInfoMap.get(a);if(s&&s.indexMap[o])return this.ecModel.getComponent(getAxisMainType(a),o)},r.prototype.setRawRange=function(a){var o=this.option,s=this.settledOption;each$f([["start","startValue"],["end","endValue"]],function(l){(a[l[0]]!=null||a[l[1]]!=null)&&(o[l[0]]=s[l[0]]=a[l[0]],o[l[1]]=s[l[1]]=a[l[1]])},this),this._updateRangeUse(a)},r.prototype.setCalculatedRange=function(a){var o=this.option;each$f(["start","startValue","end","endValue"],function(s){o[s]=a[s]})},r.prototype.getPercentRange=function(){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataPercentWindow()},r.prototype.getValueRange=function(a,o){if(a==null&&o==null){var s=this.findRepresentativeAxisProxy();if(s)return s.getDataValueWindow()}else return this.getAxisProxy(a,o).getDataValueWindow()},r.prototype.findRepresentativeAxisProxy=function(a){if(a)return a.__dzAxisProxy;for(var o,s=this._targetAxisInfoMap.keys(),l=0;l<s.length;l++)for(var u=s[l],c=this._targetAxisInfoMap.get(u),d=0;d<c.indexList.length;d++){var f=this.getAxisProxy(u,c.indexList[d]);if(f.hostedBy(this))return f;o||(o=f)}return o},r.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},r.prototype.getOrient=function(){return this._orient},r.type="dataZoom",r.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],r.defaultOption={z:4,filterMode:"filter",start:0,end:100},r}(ComponentModel);function retrieveRawOption(n){var r={};return each$f(["start","end","startValue","endValue","throttle"],function(a){n.hasOwnProperty(a)&&(r[a]=n[a])}),r}var SelectDataZoomModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="dataZoom.select",r}(DataZoomModel),DataZoomView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s,l){this.dataZoomModel=a,this.ecModel=o,this.api=s},r.type="dataZoom",r}(ComponentView),SelectDataZoomView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="dataZoom.select",r}(DataZoomView),each$7=each$f,asc$1=asc$2,AxisProxy=function(){function n(r,a,o,s){this._dimName=r,this._axisIndex=a,this.ecModel=s,this._dataZoomModel=o}return n.prototype.hostedBy=function(r){return this._dataZoomModel===r},n.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},n.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},n.prototype.getTargetSeriesModels=function(){var r=[];return this.ecModel.eachSeries(function(a){if(isCoordSupported(a)){var o=getAxisMainType(this._dimName),s=a.getReferringComponents(o,SINGLE_REFERRING).models[0];s&&this._axisIndex===s.componentIndex&&r.push(a)}},this),r},n.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},n.prototype.getMinMaxSpan=function(){return clone$6(this._minMaxSpan)},n.prototype.calculateDataWindow=function(r){var a=this._dataExtent,o=this.getAxisModel(),s=o.axis.scale,l=this._dataZoomModel.getRangePropMode(),u=[0,100],c=[],d=[],f;each$7(["start","end"],function(g,y){var _=r[g],S=r[g+"Value"];l[y]==="percent"?(_==null&&(_=u[y]),S=s.parse(linearMap$2(_,u,a))):(f=!0,S=S==null?a[y]:s.parse(S),_=linearMap$2(S,a,u)),d[y]=S==null||isNaN(S)?a[y]:S,c[y]=_==null||isNaN(_)?u[y]:_}),asc$1(d),asc$1(c);var p=this._minMaxSpan;f?v(d,c,a,u,!1):v(c,d,u,a,!0);function v(g,y,_,S,b){var x=b?"Span":"ValueSpan";sliderMove(0,g,_,"all",p["min"+x],p["max"+x]);for(var A=0;A<2;A++)y[A]=linearMap$2(g[A],_,S,!0),b&&(y[A]=s.parse(y[A]))}return{valueWindow:d,percentWindow:c}},n.prototype.reset=function(r){if(r===this._dataZoomModel){var a=this.getTargetSeriesModels();this._dataExtent=calculateDataExtent(this,this._dimName,a),this._updateMinMaxSpan();var o=this.calculateDataWindow(r.settledOption);this._valueWindow=o.valueWindow,this._percentWindow=o.percentWindow,this._setAxisModel()}},n.prototype.filterData=function(r,a){if(r!==this._dataZoomModel)return;var o=this._dimName,s=this.getTargetSeriesModels(),l=r.get("filterMode"),u=this._valueWindow;if(l==="none")return;each$7(s,function(d){var f=d.getData(),p=f.mapDimensionsAll(o);if(p.length){if(l==="weakFilter"){var v=f.getStore(),g=map$1(p,function(y){return f.getDimensionIndex(y)},f);f.filterSelf(function(y){for(var _,S,b,x=0;x<p.length;x++){var A=v.get(g[x],y),w=!isNaN(A),E=A<u[0],D=A>u[1];if(w&&!E&&!D)return!0;w&&(b=!0),E&&(_=!0),D&&(S=!0)}return b&&_&&S})}else each$7(p,function(y){if(l==="empty")d.setData(f=f.map(y,function(S){return c(S)?S:NaN}));else{var _={};_[y]=u,f.selectRange(_)}});each$7(p,function(y){f.setApproximateExtent(u,y)})}});function c(d){return d>=u[0]&&d<=u[1]}},n.prototype._updateMinMaxSpan=function(){var r=this._minMaxSpan={},a=this._dataZoomModel,o=this._dataExtent;each$7(["min","max"],function(s){var l=a.get(s+"Span"),u=a.get(s+"ValueSpan");u!=null&&(u=this.getAxisModel().axis.scale.parse(u)),u!=null?l=linearMap$2(o[0]+u,o,[0,100],!0):l!=null&&(u=linearMap$2(l,[0,100],o,!0)-o[0]),r[s+"Span"]=l,r[s+"ValueSpan"]=u},this)},n.prototype._setAxisModel=function(){var r=this.getAxisModel(),a=this._percentWindow,o=this._valueWindow;if(a){var s=getPixelPrecision(o,[0,500]);s=Math.min(s,20);var l=r.axis.scale.rawExtentInfo;a[0]!==0&&l.setDeterminedMinMax("min",+o[0].toFixed(s)),a[1]!==100&&l.setDeterminedMinMax("max",+o[1].toFixed(s)),l.freeze()}},n}();function calculateDataExtent(n,r,a){var o=[1/0,-1/0];each$7(a,function(u){unionAxisExtentFromData(o,u.getData(),r)});var s=n.getAxisModel(),l=ensureScaleRawExtentInfo(s.axis.scale,s,o).calculate();return[l.min,l.max]}var dataZoomProcessor={getTargetSeries:function(n){function r(s){n.eachComponent("dataZoom",function(l){l.eachTargetAxis(function(u,c){var d=n.getComponent(getAxisMainType(u),c);s(u,c,d,l)})})}r(function(s,l,u,c){u.__dzAxisProxy=null});var a=[];r(function(s,l,u,c){u.__dzAxisProxy||(u.__dzAxisProxy=new AxisProxy(s,l,c,n),a.push(u.__dzAxisProxy))});var o=createHashMap();return each$f(a,function(s){each$f(s.getTargetSeriesModels(),function(l){o.set(l.uid,l)})}),o},overallReset:function(n,r){n.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){a.getAxisProxy(o,s).reset(a)}),a.eachTargetAxis(function(o,s){a.getAxisProxy(o,s).filterData(a,r)})}),n.eachComponent("dataZoom",function(a){var o=a.findRepresentativeAxisProxy();if(o){var s=o.getDataPercentWindow(),l=o.getDataValueWindow();a.setCalculatedRange({start:s[0],end:s[1],startValue:l[0],endValue:l[1]})}})}};function installDataZoomAction(n){n.registerAction("dataZoom",function(r,a){var o=findEffectedDataZooms(a,r);each$f(o,function(s){s.setRawRange({start:r.start,end:r.end,startValue:r.startValue,endValue:r.endValue})})})}var installed$1=!1;function installCommon$1(n){installed$1||(installed$1=!0,n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,dataZoomProcessor),installDataZoomAction(n),n.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function install$m(n){n.registerComponentModel(SelectDataZoomModel),n.registerComponentView(SelectDataZoomView),installCommon$1(n)}var ToolboxFeature=function(){function n(){}return n}(),features={};function registerFeature(n,r){features[n]=r}function getFeature(n){return features[n]}var ToolboxModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.optionUpdated=function(){n.prototype.optionUpdated.apply(this,arguments);var a=this.ecModel;each$f(this.option.feature,function(o,s){var l=getFeature(s);l&&(l.getDefaultOption&&(l.defaultOption=l.getDefaultOption(a)),merge(o,l.defaultOption))})},r.type="toolbox",r.layoutMode={type:"box",ignoreSize:!0},r.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},r}(ComponentModel);function layout(n,r,a){var o=r.getBoxLayoutParams(),s=r.get("padding"),l={width:a.getWidth(),height:a.getHeight()},u=getLayoutRect(o,l,s);box(r.get("orient"),n,r.get("itemGap"),u.width,u.height),positionElement(n,o,l,s)}function makeBackground(n,r){var a=normalizeCssArray(r.get("padding")),o=r.getItemStyle(["color","opacity"]);return o.fill=r.get("backgroundColor"),n=new Rect$2({shape:{x:n.x-a[3],y:n.y-a[0],width:n.width+a[1]+a[3],height:n.height+a[0]+a[2],r:r.get("borderRadius")},style:o,silent:!0,z2:-1}),n}var ToolboxView=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.render=function(a,o,s,l){var u=this.group;if(u.removeAll(),!a.get("show"))return;var c=+a.get("itemSize"),d=a.get("orient")==="vertical",f=a.get("feature")||{},p=this._features||(this._features={}),v=[];each$f(f,function(_,S){v.push(S)}),new DataDiffer(this._featureNames||[],v).add(g).update(g).remove(curry$1(g,null)).execute(),this._featureNames=v;function g(_,S){var b=v[_],x=v[S],A=f[b],w=new Model(A,a,a.ecModel),E;if(l&&l.newTitle!=null&&l.featureName===b&&(A.title=l.newTitle),b&&!x){if(isUserFeatureName(b))E={onclick:w.option.onclick,featureName:b};else{var D=getFeature(b);if(!D)return;E=new D}p[b]=E}else if(E=p[x],!E)return;E.uid=getUID("toolbox-feature"),E.model=w,E.ecModel=o,E.api=s;var C=E instanceof ToolboxFeature;if(!b&&x){C&&E.dispose&&E.dispose(o,s);return}if(!w.get("show")||C&&E.unusable){C&&E.remove&&E.remove(o,s);return}y(w,E,b),w.setIconStatus=function($,P){var M=this.option,I=this.iconPaths;M.iconStatus=M.iconStatus||{},M.iconStatus[$]=P,I[$]&&(P==="emphasis"?enterEmphasis:leaveEmphasis)(I[$])},E instanceof ToolboxFeature&&E.render&&E.render(w,o,s,l)}function y(_,S,b){var x=_.getModel("iconStyle"),A=_.getModel(["emphasis","iconStyle"]),w=S instanceof ToolboxFeature&&S.getIcons?S.getIcons():_.get("icon"),E=_.get("title")||{},D,C;isString(w)?(D={},D[b]=w):D=w,isString(E)?(C={},C[b]=E):C=E;var $=_.iconPaths={};each$f(D,function(P,M){var I=createIcon(P,{},{x:-c/2,y:-c/2,width:c,height:c});I.setStyle(x.getItemStyle());var L=I.ensureState("emphasis");L.style=A.getItemStyle();var O=new ZRText({style:{text:C[M],align:A.get("textAlign"),borderRadius:A.get("textBorderRadius"),padding:A.get("textPadding"),fill:null,font:getFont({fontStyle:A.get("textFontStyle"),fontFamily:A.get("textFontFamily"),fontSize:A.get("textFontSize"),fontWeight:A.get("textFontWeight")},o)},ignore:!0});I.setTextContent(O),setTooltipConfig({el:I,componentModel:a,itemName:M,formatterParamsExtra:{title:C[M]}}),I.__title=C[M],I.on("mouseover",function(){var R=A.getItemStyle(),N=d?a.get("right")==null&&a.get("left")!=="right"?"right":"left":a.get("bottom")==null&&a.get("top")!=="bottom"?"bottom":"top";O.setStyle({fill:A.get("textFill")||R.fill||R.stroke||"#000",backgroundColor:A.get("textBackgroundColor")}),I.setTextConfig({position:A.get("textPosition")||N}),O.ignore=!a.get("showTitle"),s.enterEmphasis(this)}).on("mouseout",function(){_.get(["iconStatus",M])!=="emphasis"&&s.leaveEmphasis(this),O.hide()}),(_.get(["iconStatus",M])==="emphasis"?enterEmphasis:leaveEmphasis)(I),u.add(I),I.on("click",bind$1(S.onclick,S,o,s,M)),$[M]=I})}layout(u,a,s),u.add(makeBackground(u.getBoundingRect(),a)),d||u.eachChild(function(_){var S=_.__title,b=_.ensureState("emphasis"),x=b.textConfig||(b.textConfig={}),A=_.getTextContent(),w=A&&A.ensureState("emphasis");if(w&&!isFunction(w)&&S){var E=w.style||(w.style={}),D=getBoundingRect(S,ZRText.makeFont(E)),C=_.x+u.x,$=_.y+u.y+c,P=!1;$+D.height>s.getHeight()&&(x.position="top",P=!0);var M=P?-5-D.height:c+10;C+D.width/2>s.getWidth()?(x.position=["100%",M],E.align="right"):C-D.width/2<0&&(x.position=[0,M],E.align="left")}})},r.prototype.updateView=function(a,o,s,l){each$f(this._features,function(u){u instanceof ToolboxFeature&&u.updateView&&u.updateView(u.model,o,s,l)})},r.prototype.remove=function(a,o){each$f(this._features,function(s){s instanceof ToolboxFeature&&s.remove&&s.remove(a,o)}),this.group.removeAll()},r.prototype.dispose=function(a,o){each$f(this._features,function(s){s instanceof ToolboxFeature&&s.dispose&&s.dispose(a,o)})},r.type="toolbox",r}(ComponentView);function isUserFeatureName(n){return n.indexOf("my")===0}var SaveAsImage=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.onclick=function(a,o){var s=this.model,l=s.get("name")||a.get("title.0.text")||"echarts",u=o.getZr().painter.getType()==="svg",c=u?"svg":s.get("type",!0)||"png",d=o.getConnectedDataURL({type:c,backgroundColor:s.get("backgroundColor",!0)||a.get("backgroundColor")||"#fff",connectedBackgroundColor:s.get("connectedBackgroundColor"),excludeComponents:s.get("excludeComponents"),pixelRatio:s.get("pixelRatio")}),f=env.browser;if(typeof MouseEvent=="function"&&(f.newEdge||!f.ie&&!f.edge)){var p=document.createElement("a");p.download=l+"."+c,p.target="_blank",p.href=d;var v=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});p.dispatchEvent(v)}else if(window.navigator.msSaveOrOpenBlob||u){var g=d.split(","),y=g[0].indexOf("base64")>-1,_=u?decodeURIComponent(g[1]):g[1];y&&(_=window.atob(_));var S=l+"."+c;if(window.navigator.msSaveOrOpenBlob){for(var b=_.length,x=new Uint8Array(b);b--;)x[b]=_.charCodeAt(b);var A=new Blob([x]);window.navigator.msSaveOrOpenBlob(A,S)}else{var w=document.createElement("iframe");document.body.appendChild(w);var E=w.contentWindow,D=E.document;D.open("image/svg+xml","replace"),D.write(_),D.close(),E.focus(),D.execCommand("SaveAs",!0,S),document.body.removeChild(w)}}else{var C=s.get("lang"),$='<body style="margin:0;"><img src="'+d+'" style="max-width:100%;" title="'+(C&&C[0]||"")+'" /></body>',P=window.open();P.document.write($),P.document.title=l}},r.getDefaultOption=function(a){var o={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:a.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:a.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return o},r}(ToolboxFeature),INNER_STACK_KEYWORD="__ec_magicType_stack__",radioTypes=[["line","bar"],["stack"]],MagicType=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.getIcons=function(){var a=this.model,o=a.get("icon"),s={};return each$f(a.get("type"),function(l){o[l]&&(s[l]=o[l])}),s},r.getDefaultOption=function(a){var o={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:a.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return o},r.prototype.onclick=function(a,o,s){var l=this.model,u=l.get(["seriesIndex",s]);if(seriesOptGenreator[s]){var c={series:[]},d=function(v){var g=v.subType,y=v.id,_=seriesOptGenreator[s](g,y,v,l);_&&(defaults$2(_,v.option),c.series.push(_));var S=v.coordinateSystem;if(S&&S.type==="cartesian2d"&&(s==="line"||s==="bar")){var b=S.getAxesByScale("ordinal")[0];if(b){var x=b.dim,A=x+"Axis",w=v.getReferringComponents(A,SINGLE_REFERRING).models[0],E=w.componentIndex;c[A]=c[A]||[];for(var D=0;D<=E;D++)c[A][E]=c[A][E]||{};c[A][E].boundaryGap=s==="bar"}}};each$f(radioTypes,function(v){indexOf(v,s)>=0&&each$f(v,function(g){l.setIconStatus(g,"normal")})}),l.setIconStatus(s,"emphasis"),a.eachComponent({mainType:"series",query:u==null?null:{seriesIndex:u}},d);var f,p=s;s==="stack"&&(f=merge({stack:l.option.title.tiled,tiled:l.option.title.stack},l.option.title),l.get(["iconStatus",s])!=="emphasis"&&(p="tiled")),o.dispatchAction({type:"changeMagicType",currentType:p,newOption:c,newTitle:f,featureName:"magicType"})}},r}(ToolboxFeature),seriesOptGenreator={line:function(n,r,a,o){if(n==="bar")return merge({id:r,type:"line",data:a.get("data"),stack:a.get("stack"),markPoint:a.get("markPoint"),markLine:a.get("markLine")},o.get(["option","line"])||{},!0)},bar:function(n,r,a,o){if(n==="line")return merge({id:r,type:"bar",data:a.get("data"),stack:a.get("stack"),markPoint:a.get("markPoint"),markLine:a.get("markLine")},o.get(["option","bar"])||{},!0)},stack:function(n,r,a,o){var s=a.get("stack")===INNER_STACK_KEYWORD;if(n==="line"||n==="bar")return o.setIconStatus("stack",s?"normal":"emphasis"),merge({id:r,stack:s?"":INNER_STACK_KEYWORD},o.get(["option","stack"])||{},!0)}};registerAction({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(n,r){r.mergeOption(n.newOption)});var BLOCK_SPLITER=new Array(60).join("-"),ITEM_SPLITER=" ";function groupSeries(n){var r={},a=[],o=[];return n.eachRawSeries(function(s){var l=s.coordinateSystem;if(l&&(l.type==="cartesian2d"||l.type==="polar")){var u=l.getBaseAxis();if(u.type==="category"){var c=u.dim+"_"+u.index;r[c]||(r[c]={categoryAxis:u,valueAxis:l.getOtherAxis(u),series:[]},o.push({axisDim:u.dim,axisIndex:u.index})),r[c].series.push(s)}else a.push(s)}else a.push(s)}),{seriesGroupByCategoryAxis:r,other:a,meta:o}}function assembleSeriesWithCategoryAxis(n){var r=[];return each$f(n,function(a,o){var s=a.categoryAxis,l=a.valueAxis,u=l.dim,c=[" "].concat(map$1(a.series,function(y){return y.name})),d=[s.model.getCategories()];each$f(a.series,function(y){var _=y.getRawData();d.push(y.getRawData().mapArray(_.mapDimension(u),function(S){return S}))});for(var f=[c.join(ITEM_SPLITER)],p=0;p<d[0].length;p++){for(var v=[],g=0;g<d.length;g++)v.push(d[g][p]);f.push(v.join(ITEM_SPLITER))}r.push(f.join("\n"))}),r.join("\n\n"+BLOCK_SPLITER+"\n\n")}function assembleOtherSeries(n){return map$1(n,function(r){var a=r.getRawData(),o=[r.name],s=[];return a.each(a.dimensions,function(){for(var l=arguments.length,u=arguments[l-1],c=a.getName(u),d=0;d<l-1;d++)s[d]=arguments[d];o.push((c?c+ITEM_SPLITER:"")+s.join(ITEM_SPLITER))}),o.join("\n")}).join("\n\n"+BLOCK_SPLITER+"\n\n")}function getContentFromModel(n){var r=groupSeries(n);return{value:filter([assembleSeriesWithCategoryAxis(r.seriesGroupByCategoryAxis),assembleOtherSeries(r.other)],function(a){return!!a.replace(/[\n\t\s]/g,"")}).join("\n\n"+BLOCK_SPLITER+"\n\n"),meta:r.meta}}function trim(n){return n.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function isTSVFormat(n){var r=n.slice(0,n.indexOf("\n"));if(r.indexOf(ITEM_SPLITER)>=0)return!0}var itemSplitRegex=new RegExp("["+ITEM_SPLITER+"]+","g");function parseTSVContents(n){for(var r=n.split(/\n+/g),a=trim(r.shift()).split(itemSplitRegex),o=[],s=map$1(a,function(d){return{name:d,data:[]}}),l=0;l<r.length;l++){var u=trim(r[l]).split(itemSplitRegex);o.push(u.shift());for(var c=0;c<u.length;c++)s[c]&&(s[c].data[l]=u[c])}return{series:s,categories:o}}function parseListContents(n){for(var r=n.split(/\n+/g),a=trim(r.shift()),o=[],s=0;s<r.length;s++){var l=trim(r[s]);if(l){var u=l.split(itemSplitRegex),c="",d=void 0,f=!1;isNaN(u[0])?(f=!0,c=u[0],u=u.slice(1),o[s]={name:c,value:[]},d=o[s].value):d=o[s]=[];for(var p=0;p<u.length;p++)d.push(+u[p]);d.length===1&&(f?o[s].value=d[0]:o[s]=d[0])}}return{name:a,data:o}}function parseContents(n,r){var a=n.split(new RegExp("\n*"+BLOCK_SPLITER+"\n*","g")),o={series:[]};return each$f(a,function(s,l){if(isTSVFormat(s)){var u=parseTSVContents(s),c=r[l],d=c.axisDim+"Axis";c&&(o[d]=o[d]||[],o[d][c.axisIndex]={data:u.categories},o.series=o.series.concat(u.series))}else{var u=parseListContents(s);o.series.push(u)}}),o}var DataView=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.onclick=function(a,o){setTimeout(function(){o.dispatchAction({type:"hideTip"})});var s=o.getDom(),l=this.model;this._dom&&s.removeChild(this._dom);var u=document.createElement("div");u.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",u.style.backgroundColor=l.get("backgroundColor")||"#fff";var c=document.createElement("h4"),d=l.get("lang")||[];c.innerHTML=d[0]||l.get("title"),c.style.cssText="margin:10px 20px",c.style.color=l.get("textColor");var f=document.createElement("div"),p=document.createElement("textarea");f.style.cssText="overflow:auto";var v=l.get("optionToContent"),g=l.get("contentToOption"),y=getContentFromModel(a);if(isFunction(v)){var _=v(o.getOption());isString(_)?f.innerHTML=_:isDom(_)&&f.appendChild(_)}else{p.readOnly=l.get("readOnly");var S=p.style;S.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",S.color=l.get("textColor"),S.borderColor=l.get("textareaBorderColor"),S.backgroundColor=l.get("textareaColor"),p.value=y.value,f.appendChild(p)}var b=y.meta,x=document.createElement("div");x.style.cssText="position:absolute;bottom:5px;left:0;right:0";var A="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",w=document.createElement("div"),E=document.createElement("div");A+=";background-color:"+l.get("buttonColor"),A+=";color:"+l.get("buttonTextColor");var D=this;function C(){s.removeChild(u),D._dom=null}addEventListener(w,"click",C),addEventListener(E,"click",function(){if(g==null&&v!=null||g!=null&&v==null){C();return}var $;try{isFunction(g)?$=g(f,o.getOption()):$=parseContents(p.value,b)}catch(P){throw C(),new Error("Data view format error "+P)}$&&o.dispatchAction({type:"changeDataView",newOption:$}),C()}),w.innerHTML=d[1],E.innerHTML=d[2],E.style.cssText=w.style.cssText=A,!l.get("readOnly")&&x.appendChild(E),x.appendChild(w),u.appendChild(c),u.appendChild(f),u.appendChild(x),f.style.height=s.clientHeight-80+"px",s.appendChild(u),this._dom=u},r.prototype.remove=function(a,o){this._dom&&o.getDom().removeChild(this._dom)},r.prototype.dispose=function(a,o){this.remove(a,o)},r.getDefaultOption=function(a){var o={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:a.getLocaleModel().get(["toolbox","dataView","title"]),lang:a.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return o},r}(ToolboxFeature);function tryMergeDataOption(n,r){return map$1(n,function(a,o){var s=r&&r[o];if(isObject$3(s)&&!isArray$1(s)){var l=isObject$3(a)&&!isArray$1(a);l||(a={value:a});var u=s.name!=null&&a.name==null;return a=defaults$2(a,s),u&&delete a.name,a}else return a})}registerAction({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(n,r){var a=[];each$f(n.newOption.series,function(o){var s=r.getSeriesByName(o.name)[0];if(!s)a.push(extend$2({type:"scatter"},o));else{var l=s.get("data");a.push({name:o.name,data:tryMergeDataOption(o.data,l)})}}),r.mergeOption(defaults$2({series:a},n.newOption))});var each$6=each$f,inner$6=makeInner();function push(n,r){var a=getStoreSnapshots(n);each$6(r,function(o,s){for(var l=a.length-1;l>=0;l--){var u=a[l];if(u[s])break}if(l<0){var c=n.queryComponents({mainType:"dataZoom",subType:"select",id:s})[0];if(c){var d=c.getPercentRange();a[0][s]={dataZoomId:s,start:d[0],end:d[1]}}}}),a.push(r)}function pop(n){var r=getStoreSnapshots(n),a=r[r.length-1];r.length>1&&r.pop();var o={};return each$6(a,function(s,l){for(var u=r.length-1;u>=0;u--)if(s=r[u][l],s){o[l]=s;break}}),o}function clear(n){inner$6(n).snapshots=null}function count(n){return getStoreSnapshots(n).length}function getStoreSnapshots(n){var r=inner$6(n);return r.snapshots||(r.snapshots=[{}]),r.snapshots}var RestoreOption=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.onclick=function(a,o){clear(a),o.dispatchAction({type:"restore",from:this.uid})},r.getDefaultOption=function(a){var o={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:a.getLocaleModel().get(["toolbox","restore","title"])};return o},r}(ToolboxFeature);registerAction({type:"restore",event:"restore",update:"prepareAndUpdate"},function(n,r){r.resetOption("recreate")});var INCLUDE_FINDER_MAIN_TYPES=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],BrushTargetManager=function(){function n(r,a,o){var s=this;this._targetInfoList=[];var l=parseFinder(a,r);each$f(targetInfoBuilders,function(u,c){(!o||!o.include||indexOf(o.include,c)>=0)&&u(l,s._targetInfoList)})}return n.prototype.setOutputRanges=function(r,a){return this.matchOutputRanges(r,a,function(o,s,l){if((o.coordRanges||(o.coordRanges=[])).push(s),!o.coordRange){o.coordRange=s;var u=coordConvert[o.brushType](0,l,s);o.__rangeOffset={offset:diffProcessor[o.brushType](u.values,o.range,[1,1]),xyMinMax:u.xyMinMax}}}),r},n.prototype.matchOutputRanges=function(r,a,o){each$f(r,function(s){var l=this.findTargetInfo(s,a);l&&l!==!0&&each$f(l.coordSyses,function(u){var c=coordConvert[s.brushType](1,u,s.range,!0);o(s,c.values,u,a)})},this)},n.prototype.setInputRanges=function(r,a){each$f(r,function(o){var s=this.findTargetInfo(o,a);if(o.range=o.range||[],s&&s!==!0){o.panelId=s.panelId;var l=coordConvert[o.brushType](0,s.coordSys,o.coordRange),u=o.__rangeOffset;o.range=u?diffProcessor[o.brushType](l.values,u.offset,getScales(l.xyMinMax,u.xyMinMax)):l.values}},this)},n.prototype.makePanelOpts=function(r,a){return map$1(this._targetInfoList,function(o){var s=o.getPanelRect();return{panelId:o.panelId,defaultBrushType:a?a(o):null,clipPath:makeRectPanelClipPath(s),isTargetByCursor:makeRectIsTargetByCursor(s,r,o.coordSysModel),getLinearBrushOtherExtent:makeLinearBrushOtherExtent(s)}})},n.prototype.controlSeries=function(r,a,o){var s=this.findTargetInfo(r,o);return s===!0||s&&indexOf(s.coordSyses,a.coordinateSystem)>=0},n.prototype.findTargetInfo=function(r,a){for(var o=this._targetInfoList,s=parseFinder(a,r),l=0;l<o.length;l++){var u=o[l],c=r.panelId;if(c){if(u.panelId===c)return u}else for(var d=0;d<targetInfoMatchers.length;d++)if(targetInfoMatchers[d](s,u))return u}return!0},n}();function formatMinMax(n){return n[0]>n[1]&&n.reverse(),n}function parseFinder(n,r){return parseFinder$1(n,r,{includeMainTypes:INCLUDE_FINDER_MAIN_TYPES})}var targetInfoBuilders={grid:function(n,r){var a=n.xAxisModels,o=n.yAxisModels,s=n.gridModels,l=createHashMap(),u={},c={};!a&&!o&&!s||(each$f(a,function(d){var f=d.axis.grid.model;l.set(f.id,f),u[f.id]=!0}),each$f(o,function(d){var f=d.axis.grid.model;l.set(f.id,f),c[f.id]=!0}),each$f(s,function(d){l.set(d.id,d),u[d.id]=!0,c[d.id]=!0}),l.each(function(d){var f=d.coordinateSystem,p=[];each$f(f.getCartesians(),function(v,g){(indexOf(a,v.getAxis("x").model)>=0||indexOf(o,v.getAxis("y").model)>=0)&&p.push(v)}),r.push({panelId:"grid--"+d.id,gridModel:d,coordSysModel:d,coordSys:p[0],coordSyses:p,getPanelRect:panelRectBuilders.grid,xAxisDeclared:u[d.id],yAxisDeclared:c[d.id]})}))},geo:function(n,r){each$f(n.geoModels,function(a){var o=a.coordinateSystem;r.push({panelId:"geo--"+a.id,geoModel:a,coordSysModel:a,coordSys:o,coordSyses:[o],getPanelRect:panelRectBuilders.geo})})}},targetInfoMatchers=[function(n,r){var a=n.xAxisModel,o=n.yAxisModel,s=n.gridModel;return!s&&a&&(s=a.axis.grid.model),!s&&o&&(s=o.axis.grid.model),s&&s===r.gridModel},function(n,r){var a=n.geoModel;return a&&a===r.geoModel}],panelRectBuilders={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var n=this.coordSys,r=n.getBoundingRect().clone();return r.applyTransform(getTransform$1(n)),r}},coordConvert={lineX:curry$1(axisConvert,0),lineY:curry$1(axisConvert,1),rect:function(n,r,a,o){var s=n?r.pointToData([a[0][0],a[1][0]],o):r.dataToPoint([a[0][0],a[1][0]],o),l=n?r.pointToData([a[0][1],a[1][1]],o):r.dataToPoint([a[0][1],a[1][1]],o),u=[formatMinMax([s[0],l[0]]),formatMinMax([s[1],l[1]])];return{values:u,xyMinMax:u}},polygon:function(n,r,a,o){var s=[[1/0,-1/0],[1/0,-1/0]],l=map$1(a,function(u){var c=n?r.pointToData(u,o):r.dataToPoint(u,o);return s[0][0]=Math.min(s[0][0],c[0]),s[1][0]=Math.min(s[1][0],c[1]),s[0][1]=Math.max(s[0][1],c[0]),s[1][1]=Math.max(s[1][1],c[1]),c});return{values:l,xyMinMax:s}}};function axisConvert(n,r,a,o){var s=a.getAxis(["x","y"][n]),l=formatMinMax(map$1([0,1],function(c){return r?s.coordToData(s.toLocalCoord(o[c]),!0):s.toGlobalCoord(s.dataToCoord(o[c]))})),u=[];return u[n]=l,u[1-n]=[NaN,NaN],{values:l,xyMinMax:u}}var diffProcessor={lineX:curry$1(axisDiffProcessor,0),lineY:curry$1(axisDiffProcessor,1),rect:function(n,r,a){return[[n[0][0]-a[0]*r[0][0],n[0][1]-a[0]*r[0][1]],[n[1][0]-a[1]*r[1][0],n[1][1]-a[1]*r[1][1]]]},polygon:function(n,r,a){return map$1(n,function(o,s){return[o[0]-a[0]*r[s][0],o[1]-a[1]*r[s][1]]})}};function axisDiffProcessor(n,r,a,o){return[r[0]-o[n]*a[0],r[1]-o[n]*a[1]]}function getScales(n,r){var a=getSize(n),o=getSize(r),s=[a[0]/o[0],a[1]/o[1]];return isNaN(s[0])&&(s[0]=1),isNaN(s[1])&&(s[1]=1),s}function getSize(n){return n?[n[0][1]-n[0][0],n[1][1]-n[1][0]]:[NaN,NaN]}var each$5=each$f,DATA_ZOOM_ID_BASE=makeInternalComponentId("toolbox-dataZoom_"),DataZoomFeature=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.render=function(a,o,s,l){this._brushController||(this._brushController=new BrushController(s.getZr()),this._brushController.on("brush",bind$1(this._onBrush,this)).mount()),updateZoomBtnStatus(a,o,this,l,s),updateBackBtnStatus(a,o)},r.prototype.onclick=function(a,o,s){handlers[s].call(this)},r.prototype.remove=function(a,o){this._brushController&&this._brushController.unmount()},r.prototype.dispose=function(a,o){this._brushController&&this._brushController.dispose()},r.prototype._onBrush=function(a){var o=a.areas;if(!a.isEnd||!o.length)return;var s={},l=this.ecModel;this._brushController.updateCovers([]);var u=new BrushTargetManager(makeAxisFinder(this.model),l,{include:["grid"]});u.matchOutputRanges(o,l,function(f,p,v){if(v.type==="cartesian2d"){var g=f.brushType;g==="rect"?(c("x",v,p[0]),c("y",v,p[1])):c({lineX:"x",lineY:"y"}[g],v,p)}}),push(l,s),this._dispatchZoomAction(s);function c(f,p,v){var g=p.getAxis(f),y=g.model,_=d(f,y,l),S=_.findRepresentativeAxisProxy(y).getMinMaxSpan();(S.minValueSpan!=null||S.maxValueSpan!=null)&&(v=sliderMove(0,v.slice(),g.scale.getExtent(),0,S.minValueSpan,S.maxValueSpan)),_&&(s[_.id]={dataZoomId:_.id,startValue:v[0],endValue:v[1]})}function d(f,p,v){var g;return v.eachComponent({mainType:"dataZoom",subType:"select"},function(y){var _=y.getAxisModel(f,p.componentIndex);_&&(g=y)}),g}},r.prototype._dispatchZoomAction=function(a){var o=[];each$5(a,function(s,l){o.push(clone$6(s))}),o.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:o})},r.getDefaultOption=function(a){var o={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:a.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return o},r}(ToolboxFeature),handlers={zoom:function(){var n=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:n})},back:function(){this._dispatchZoomAction(pop(this.ecModel))}};function makeAxisFinder(n){var r={xAxisIndex:n.get("xAxisIndex",!0),yAxisIndex:n.get("yAxisIndex",!0),xAxisId:n.get("xAxisId",!0),yAxisId:n.get("yAxisId",!0)};return r.xAxisIndex==null&&r.xAxisId==null&&(r.xAxisIndex="all"),r.yAxisIndex==null&&r.yAxisId==null&&(r.yAxisIndex="all"),r}function updateBackBtnStatus(n,r){n.setIconStatus("back",count(r)>1?"emphasis":"normal")}function updateZoomBtnStatus(n,r,a,o,s){var l=a._isZoomActive;o&&o.type==="takeGlobalCursor"&&(l=o.key==="dataZoomSelect"?o.dataZoomSelectActive:!1),a._isZoomActive=l,n.setIconStatus("zoom",l?"emphasis":"normal");var u=new BrushTargetManager(makeAxisFinder(n),r,{include:["grid"]}),c=u.makePanelOpts(s,function(d){return d.xAxisDeclared&&!d.yAxisDeclared?"lineX":!d.xAxisDeclared&&d.yAxisDeclared?"lineY":"rect"});a._brushController.setPanels(c).enableBrush(l&&c.length?{brushType:"auto",brushStyle:n.getModel("brushStyle").getItemStyle()}:!1)}registerInternalOptionCreator("dataZoom",function(n){var r=n.getComponent("toolbox",0),a=["feature","dataZoom"];if(!r||r.get(a)==null)return;var o=r.getModel(a),s=[],l=makeAxisFinder(o),u=parseFinder$1(n,l);each$5(u.xAxisModels,function(d){return c(d,"xAxis","xAxisIndex")}),each$5(u.yAxisModels,function(d){return c(d,"yAxis","yAxisIndex")});function c(d,f,p){var v=d.componentIndex,g={type:"select",$fromToolbox:!0,filterMode:o.get("filterMode",!0)||"filter",id:DATA_ZOOM_ID_BASE+f+v};g[p]=v,s.push(g)}return s});function install$l(n){n.registerComponentModel(ToolboxModel),n.registerComponentView(ToolboxView),registerFeature("saveAsImage",SaveAsImage),registerFeature("magicType",MagicType),registerFeature("dataView",DataView),registerFeature("dataZoom",DataZoomFeature),registerFeature("restore",RestoreOption),use(install$m)}var TooltipModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="tooltip",r.dependencies=["axisPointer"],r.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},r}(ComponentModel);function shouldTooltipConfine(n){var r=n.get("confine");return r!=null?!!r:n.get("renderMode")==="richText"}function testStyle(n){if(env.domSupported){for(var r=document.documentElement.style,a=0,o=n.length;a<o;a++)if(n[a]in r)return n[a]}}var TRANSFORM_VENDOR=testStyle(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),TRANSITION_VENDOR=testStyle(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function toCSSVendorPrefix(n,r){if(!n)return r;r=toCamelCase(r,!0);var a=n.indexOf(r);return n=a===-1?r:"-"+n.slice(0,a)+"-"+r,n.toLowerCase()}function getComputedStyle$1(n,r){var a=n.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(n);return a?a[r]: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(n){return n=n==="left"?"right":n==="right"?"left":n==="top"?"bottom":"top",n}function assembleArrow(n,r,a){if(!isString(a)||a==="inside")return"";var o=n.get("backgroundColor"),s=n.get("borderWidth");r=convertToColorString(r);var l=mirrorPos(a),u=Math.max(Math.round(s)*1.5,6),c="",d=CSS_TRANSFORM_VENDOR+":",f;indexOf(["left","right"],l)>-1?(c+="top:50%",d+="translateY(-50%) rotate("+(f=l==="left"?-225:-45)+"deg)"):(c+="left:50%",d+="translateX(-50%) rotate("+(f=l==="top"?225:45)+"deg)");var p=f*Math.PI/180,v=u+s,g=v*Math.abs(Math.cos(p))+v*Math.abs(Math.sin(p)),y=Math.round(((g-Math.SQRT2*s)/2+Math.SQRT2*s-(g-v)/2)*100)/100;c+=";"+l+":-"+y+"px";var _=r+" solid "+s+"px;",S=["position:absolute;width:"+u+"px;height:"+u+"px;z-index:-1;",c+";"+d+";","border-bottom:"+_,"border-right:"+_,"background-color:"+o+";"];return'<div style="'+S.join("")+'"></div>'}function assembleTransition(n,r){var a="cubic-bezier(0.23,1,0.32,1)",o=" "+n/2+"s "+a,s="opacity"+o+",visibility"+o;return r||(o=" "+n+"s "+a,s+=env.transformSupported?","+CSS_TRANSFORM_VENDOR+o:",left"+o+",top"+o),CSS_TRANSITION_VENDOR+":"+s}function assembleTransform(n,r,a){var o=n.toFixed(0)+"px",s=r.toFixed(0)+"px";if(!env.transformSupported)return a?"top:"+s+";left:"+o+";":[["top",s],["left",o]];var l=env.transform3dSupported,u="translate"+(l?"3d":"")+"("+o+","+s+(l?",0":"")+")";return a?"top:0;left:0;"+CSS_TRANSFORM_VENDOR+":"+u+";":[["top",0],["left",0],[TRANSFORM_VENDOR,u]]}function assembleFont(n){var r=[],a=n.get("fontSize"),o=n.getTextColor();o&&r.push("color:"+o),r.push("font:"+n.getFont());var s=retrieve2(n.get("lineHeight"),Math.round(a*3/2));a&&r.push("line-height:"+s+"px");var l=n.get("textShadowColor"),u=n.get("textShadowBlur")||0,c=n.get("textShadowOffsetX")||0,d=n.get("textShadowOffsetY")||0;return l&&u&&r.push("text-shadow:"+c+"px "+d+"px "+u+"px "+l),each$f(["decoration","align"],function(f){var p=n.get(f);p&&r.push("text-"+f+":"+p)}),r.join(";")}function assembleCssText(n,r,a){var o=[],s=n.get("transitionDuration"),l=n.get("backgroundColor"),u=n.get("shadowBlur"),c=n.get("shadowColor"),d=n.get("shadowOffsetX"),f=n.get("shadowOffsetY"),p=n.getModel("textStyle"),v=getPaddingFromTooltipModel(n,"html"),g=d+"px "+f+"px "+u+"px "+c;return o.push("box-shadow:"+g),r&&s&&o.push(assembleTransition(s,a)),l&&o.push("background-color:"+l),each$f(["width","color","radius"],function(y){var _="border-"+y,S=toCamelCase(_),b=n.get(S);b!=null&&o.push(_+":"+b+(y==="color"?"":"px"))}),o.push(assembleFont(p)),v!=null&&o.push("padding:"+normalizeCssArray(v).join("px ")+"px"),o.join(";")+";"}function makeStyleCoord$1(n,r,a,o,s){var l=r&&r.painter;if(a){var u=l&&l.getViewportRoot();u&&transformLocalCoord(n,u,a,o,s)}else{n[0]=o,n[1]=s;var c=l&&l.getViewportRootOffset();c&&(n[0]+=c.offsetLeft,n[1]+=c.offsetTop)}n[2]=n[0]/r.getWidth(),n[3]=n[1]/r.getHeight()}var TooltipHTMLContent=function(){function n(r,a){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 o=document.createElement("div");o.domBelongToZr=!0,this.el=o;var s=this._zr=r.getZr(),l=a.appendTo,u=l&&(isString(l)?document.querySelector(l):isDom(l)?l:isFunction(l)&&l(r.getDom()));makeStyleCoord$1(this._styleCoord,s,u,r.getWidth()/2,r.getHeight()/2),(u||r.getDom()).appendChild(o),this._api=r,this._container=u;var c=this;o.onmouseenter=function(){c._enterable&&(clearTimeout(c._hideTimeout),c._show=!0),c._inContent=!0},o.onmousemove=function(d){if(d=d||window.event,!c._enterable){var f=s.handler,p=s.painter.getViewportRoot();normalizeEvent(p,d,!0),f.dispatch("mousemove",d)}},o.onmouseleave=function(){c._inContent=!1,c._enterable&&c._show&&c.hideLater(c._hideDelay)}}return n.prototype.update=function(r){if(!this._container){var a=this._api.getDom(),o=getComputedStyle$1(a,"position"),s=a.style;s.position!=="absolute"&&o!=="absolute"&&(s.position="relative")}var l=r.get("alwaysShowContent");l&&this._moveIfResized(),this._alwaysShowContent=l,this.el.className=r.get("className")||""},n.prototype.show=function(r,a){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var o=this.el,s=o.style,l=this._styleCoord;o.innerHTML?s.cssText=gCssText+assembleCssText(r,!this._firstShow,this._longHide)+assembleTransform(l[0],l[1],!0)+("border-color:"+convertToColorString(a)+";")+(r.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):s.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},n.prototype.setContent=function(r,a,o,s,l){var u=this.el;if(r==null){u.innerHTML="";return}var c="";if(isString(l)&&o.get("trigger")==="item"&&!shouldTooltipConfine(o)&&(c=assembleArrow(o,s,l)),isString(r))u.innerHTML=r+c;else if(r){u.innerHTML="",isArray$1(r)||(r=[r]);for(var d=0;d<r.length;d++)isDom(r[d])&&r[d].parentNode!==u&&u.appendChild(r[d]);if(c&&u.childNodes.length){var f=document.createElement("div");f.innerHTML=c,u.appendChild(f)}}},n.prototype.setEnterable=function(r){this._enterable=r},n.prototype.getSize=function(){var r=this.el;return r?[r.offsetWidth,r.offsetHeight]:[0,0]},n.prototype.moveTo=function(r,a){if(this.el){var o=this._styleCoord;if(makeStyleCoord$1(o,this._zr,this._container,r,a),o[0]!=null&&o[1]!=null){var s=this.el.style,l=assembleTransform(o[0],o[1]);each$f(l,function(u){s[u[0]]=u[1]})}}},n.prototype._moveIfResized=function(){var r=this._styleCoord[2],a=this._styleCoord[3];this.moveTo(r*this._zr.getWidth(),a*this._zr.getHeight())},n.prototype.hide=function(){var r=this,a=this.el.style;a.visibility="hidden",a.opacity="0",env.transform3dSupported&&(a.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return r._longHide=!0},500)},n.prototype.hideLater=function(r){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(r?(this._hideDelay=r,this._show=!1,this._hideTimeout=setTimeout(bind$1(this.hide,this),r)):this.hide())},n.prototype.isShow=function(){return this._show},n.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var r=this.el.parentNode;r&&r.removeChild(this.el),this.el=this._container=null},n}(),TooltipRichContent=function(){function n(r){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=r.getZr(),makeStyleCoord(this._styleCoord,this._zr,r.getWidth()/2,r.getHeight()/2)}return n.prototype.update=function(r){var a=r.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a},n.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},n.prototype.setContent=function(r,a,o,s,l){var u=this;isObject$3(r)&&throwError(""),this.el&&this._zr.remove(this.el);var c=o.getModel("textStyle");this.el=new ZRText({style:{rich:a.richTextStyles,text:r,lineHeight:22,borderWidth:1,borderColor:s,textShadowColor:c.get("textShadowColor"),fill:o.get(["textStyle","color"]),padding:getPaddingFromTooltipModel(o,"richText"),verticalAlign:"top",align:"left"},z:o.get("z")}),each$f(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(f){u.el.style[f]=o.get(f)}),each$f(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(f){u.el.style[f]=c.get(f)||0}),this._zr.add(this.el);var d=this;this.el.on("mouseover",function(){d._enterable&&(clearTimeout(d._hideTimeout),d._show=!0),d._inContent=!0}),this.el.on("mouseout",function(){d._enterable&&d._show&&d.hideLater(d._hideDelay),d._inContent=!1})},n.prototype.setEnterable=function(r){this._enterable=r},n.prototype.getSize=function(){var r=this.el,a=this.el.getBoundingRect(),o=calcShadowOuterSize(r.style);return[a.width+o.left+o.right,a.height+o.top+o.bottom]},n.prototype.moveTo=function(r,a){var o=this.el;if(o){var s=this._styleCoord;makeStyleCoord(s,this._zr,r,a),r=s[0],a=s[1];var l=o.style,u=mathMaxWith0(l.borderWidth||0),c=calcShadowOuterSize(l);o.x=r+u+c.left,o.y=a+u+c.top,o.markRedraw()}},n.prototype._moveIfResized=function(){var r=this._styleCoord[2],a=this._styleCoord[3];this.moveTo(r*this._zr.getWidth(),a*this._zr.getHeight())},n.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},n.prototype.hideLater=function(r){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(r?(this._hideDelay=r,this._show=!1,this._hideTimeout=setTimeout(bind$1(this.hide,this),r)):this.hide())},n.prototype.isShow=function(){return this._show},n.prototype.dispose=function(){this._zr.remove(this.el)},n}();function mathMaxWith0(n){return Math.max(0,n)}function calcShadowOuterSize(n){var r=mathMaxWith0(n.shadowBlur||0),a=mathMaxWith0(n.shadowOffsetX||0),o=mathMaxWith0(n.shadowOffsetY||0);return{left:mathMaxWith0(r-a),right:mathMaxWith0(r+a),top:mathMaxWith0(r-o),bottom:mathMaxWith0(r+o)}}function makeStyleCoord(n,r,a,o){n[0]=a,n[1]=o,n[2]=n[0]/r.getWidth(),n[3]=n[1]/r.getHeight()}var proxyRect=new Rect$2({shape:{x:-1,y:-1,width:2,height:2}}),TooltipView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(a,o){if(!(env.node||!o.getDom())){var s=a.getComponent("tooltip"),l=this._renderMode=getTooltipRenderMode(s.get("renderMode"));this._tooltipContent=l==="richText"?new TooltipRichContent(o):new TooltipHTMLContent(o,{appendTo:s.get("appendToBody",!0)?"body":s.get("appendTo",!0)})}},r.prototype.render=function(a,o,s){if(!(env.node||!s.getDom())){this.group.removeAll(),this._tooltipModel=a,this._ecModel=o,this._api=s;var l=this._tooltipContent;l.update(a),l.setEnterable(a.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&a.get("transitionDuration")?createOrUpdate(this,"_updatePosition",50,"fixRate"):clear$1(this,"_updatePosition")}},r.prototype._initGlobalListener=function(){var a=this._tooltipModel,o=a.get("triggerOn");register("itemTooltip",this._api,bind$1(function(s,l,u){o!=="none"&&(o.indexOf(s)>=0?this._tryShow(l,u):s==="leave"&&this._hide(u))},this))},r.prototype._keepShow=function(){var a=this._tooltipModel,o=this._ecModel,s=this._api,l=a.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&l!=="none"&&l!=="click"){var u=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!s.isDisposed()&&u.manuallyShowTip(a,o,s,{x:u._lastX,y:u._lastY,dataByCoordSys:u._lastDataByCoordSys})})}},r.prototype.manuallyShowTip=function(a,o,s,l){if(!(l.from===this.uid||env.node||!s.getDom())){var u=makeDispatchAction(l,s);this._ticket="";var c=l.dataByCoordSys,d=findComponentReference(l,o,s);if(d){var f=d.el.getBoundingRect().clone();f.applyTransform(d.el.transform),this._tryShow({offsetX:f.x+f.width/2,offsetY:f.y+f.height/2,target:d.el,position:l.position,positionDefault:"bottom"},u)}else if(l.tooltip&&l.x!=null&&l.y!=null){var p=proxyRect;p.x=l.x,p.y=l.y,p.update(),getECData(p).tooltipConfig={name:null,option:l.tooltip},this._tryShow({offsetX:l.x,offsetY:l.y,target:p},u)}else if(c)this._tryShow({offsetX:l.x,offsetY:l.y,position:l.position,dataByCoordSys:c,tooltipOption:l.tooltipOption},u);else if(l.seriesIndex!=null){if(this._manuallyAxisShowTip(a,o,s,l))return;var v=findPointFromSeries(l,o),g=v.point[0],y=v.point[1];g!=null&&y!=null&&this._tryShow({offsetX:g,offsetY:y,target:v.el,position:l.position,positionDefault:"bottom"},u)}else l.x!=null&&l.y!=null&&(s.dispatchAction({type:"updateAxisPointer",x:l.x,y:l.y}),this._tryShow({offsetX:l.x,offsetY:l.y,position:l.position,target:s.getZr().findHover(l.x,l.y).target},u))}},r.prototype.manuallyHideTip=function(a,o,s,l){var u=this._tooltipContent;this._tooltipModel&&u.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,l.from!==this.uid&&this._hide(makeDispatchAction(l,s))},r.prototype._manuallyAxisShowTip=function(a,o,s,l){var u=l.seriesIndex,c=l.dataIndex,d=o.getComponent("axisPointer").coordSysAxesInfo;if(!(u==null||c==null||d==null)){var f=o.getSeriesByIndex(u);if(f){var p=f.getData(),v=buildTooltipModel([p.getItemModel(c),f,(f.coordinateSystem||{}).model],this._tooltipModel);if(v.get("trigger")==="axis")return s.dispatchAction({type:"updateAxisPointer",seriesIndex:u,dataIndex:c,position:l.position}),!0}}},r.prototype._tryShow=function(a,o){var s=a.target,l=this._tooltipModel;if(l){this._lastX=a.offsetX,this._lastY=a.offsetY;var u=a.dataByCoordSys;if(u&&u.length)this._showAxisTooltip(u,a);else if(s){var c=getECData(s);if(c.ssrType==="legend")return;this._lastDataByCoordSys=null;var d,f;findEventDispatcher(s,function(p){if(getECData(p).dataIndex!=null)return d=p,!0;if(getECData(p).tooltipConfig!=null)return f=p,!0},!0),d?this._showSeriesItemTooltip(a,d,o):f?this._showComponentItemTooltip(a,f,o):this._hide(o)}else this._lastDataByCoordSys=null,this._hide(o)}},r.prototype._showOrMove=function(a,o){var s=a.get("showDelay");o=bind$1(o,this),clearTimeout(this._showTimout),s>0?this._showTimout=setTimeout(o,s):o()},r.prototype._showAxisTooltip=function(a,o){var s=this._ecModel,l=this._tooltipModel,u=[o.offsetX,o.offsetY],c=buildTooltipModel([o.tooltipOption],l),d=this._renderMode,f=[],p=createTooltipMarkup("section",{blocks:[],noHeader:!0}),v=[],g=new TooltipMarkupStyleCreator;each$f(a,function(A){each$f(A.dataByAxis,function(w){var E=s.getComponent(w.axisDim+"Axis",w.axisIndex),D=w.value;if(!(!E||D==null)){var C=getValueLabel(D,E.axis,s,w.seriesDataIndices,w.valueLabelOpt),$=createTooltipMarkup("section",{header:C,noHeader:!trim$1(C),sortBlocks:!0,blocks:[]});p.blocks.push($),each$f(w.seriesDataIndices,function(P){var M=s.getSeriesByIndex(P.seriesIndex),I=P.dataIndexInside,L=M.getDataParams(I);if(!(L.dataIndex<0)){L.axisDim=w.axisDim,L.axisIndex=w.axisIndex,L.axisType=w.axisType,L.axisId=w.axisId,L.axisValue=getAxisRawValue(E.axis,{value:D}),L.axisValueLabel=C,L.marker=g.makeTooltipMarker("item",convertToColorString(L.color),d);var O=normalizeTooltipFormatResult(M.formatTooltip(I,!0,null)),R=O.frag;if(R){var N=buildTooltipModel([M],l).get("valueFormatter");$.blocks.push(N?extend$2({valueFormatter:N},R):R)}O.text&&v.push(O.text),f.push(L)}})}})}),p.blocks.reverse(),v.reverse();var y=o.position,_=c.get("order"),S=buildTooltipMarkup(p,g,d,_,s.get("useUTC"),c.get("textStyle"));S&&v.unshift(S);var b=d==="richText"?"\n\n":"<br/>",x=v.join(b);this._showOrMove(c,function(){this._updateContentNotChangedOnAxis(a,f)?this._updatePosition(c,y,u[0],u[1],this._tooltipContent,f):this._showTooltipContent(c,x,f,Math.random()+"",u[0],u[1],y,null,g)})},r.prototype._showSeriesItemTooltip=function(a,o,s){var l=this._ecModel,u=getECData(o),c=u.seriesIndex,d=l.getSeriesByIndex(c),f=u.dataModel||d,p=u.dataIndex,v=u.dataType,g=f.getData(v),y=this._renderMode,_=a.positionDefault,S=buildTooltipModel([g.getItemModel(p),f,d&&(d.coordinateSystem||{}).model],this._tooltipModel,_?{position:_}:null),b=S.get("trigger");if(!(b!=null&&b!=="item")){var x=f.getDataParams(p,v),A=new TooltipMarkupStyleCreator;x.marker=A.makeTooltipMarker("item",convertToColorString(x.color),y);var w=normalizeTooltipFormatResult(f.formatTooltip(p,!1,v)),E=S.get("order"),D=S.get("valueFormatter"),C=w.frag,$=C?buildTooltipMarkup(D?extend$2({valueFormatter:D},C):C,A,y,E,l.get("useUTC"),S.get("textStyle")):w.text,P="item_"+f.name+"_"+p;this._showOrMove(S,function(){this._showTooltipContent(S,$,x,P,a.offsetX,a.offsetY,a.position,a.target,A)}),s({type:"showTip",dataIndexInside:p,dataIndex:g.getRawIndex(p),seriesIndex:c,from:this.uid})}},r.prototype._showComponentItemTooltip=function(a,o,s){var l=this._renderMode==="html",u=getECData(o),c=u.tooltipConfig,d=c.option||{},f=d.encodeHTMLContent;if(isString(d)){var p=d;d={content:p,formatter:p},f=!0}f&&l&&d.content&&(d=clone$6(d),d.content=encodeHTML(d.content));var v=[d],g=this._ecModel.getComponent(u.componentMainType,u.componentIndex);g&&v.push(g),v.push({formatter:d.content});var y=a.positionDefault,_=buildTooltipModel(v,this._tooltipModel,y?{position:y}:null),S=_.get("content"),b=Math.random()+"",x=new TooltipMarkupStyleCreator;this._showOrMove(_,function(){var A=clone$6(_.get("formatterParams")||{});this._showTooltipContent(_,S,A,b,a.offsetX,a.offsetY,a.position,o,x)}),s({type:"showTip",from:this.uid})},r.prototype._showTooltipContent=function(a,o,s,l,u,c,d,f,p){if(this._ticket="",!(!a.get("showContent")||!a.get("show"))){var v=this._tooltipContent;v.setEnterable(a.get("enterable"));var g=a.get("formatter");d=d||a.get("position");var y=o,_=this._getNearestPoint([u,c],s,a.get("trigger"),a.get("borderColor")),S=_.color;if(g)if(isString(g)){var b=a.ecModel.get("useUTC"),x=isArray$1(s)?s[0]:s,A=x&&x.axisType&&x.axisType.indexOf("time")>=0;y=g,A&&(y=format$1(x.axisValue,y,b)),y=formatTpl(y,s,!0)}else if(isFunction(g)){var w=bind$1(function(E,D){E===this._ticket&&(v.setContent(D,p,a,S,d),this._updatePosition(a,d,u,c,v,s,f))},this);this._ticket=l,y=g(s,l,w)}else y=g;v.setContent(y,p,a,S,d),v.show(a,S),this._updatePosition(a,d,u,c,v,s,f)}},r.prototype._getNearestPoint=function(a,o,s,l){if(s==="axis"||isArray$1(o))return{color:l||(this._renderMode==="html"?"#fff":"none")};if(!isArray$1(o))return{color:l||o.color||o.borderColor}},r.prototype._updatePosition=function(a,o,s,l,u,c,d){var f=this._api.getWidth(),p=this._api.getHeight();o=o||a.get("position");var v=u.getSize(),g=a.get("align"),y=a.get("verticalAlign"),_=d&&d.getBoundingRect().clone();if(d&&_.applyTransform(d.transform),isFunction(o)&&(o=o([s,l],c,u.el,_,{viewSize:[f,p],contentSize:v.slice()})),isArray$1(o))s=parsePercent(o[0],f),l=parsePercent(o[1],p);else if(isObject$3(o)){var S=o;S.width=v[0],S.height=v[1];var b=getLayoutRect(S,{width:f,height:p});s=b.x,l=b.y,g=null,y=null}else if(isString(o)&&d){var x=calcTooltipPosition(o,_,v,a.get("borderWidth"));s=x[0],l=x[1]}else{var x=refixTooltipPosition(s,l,u,f,p,g?null:20,y?null:20);s=x[0],l=x[1]}if(g&&(s-=isCenterAlign(g)?v[0]/2:g==="right"?v[0]:0),y&&(l-=isCenterAlign(y)?v[1]/2:y==="bottom"?v[1]:0),shouldTooltipConfine(a)){var x=confineTooltipPosition(s,l,u,f,p);s=x[0],l=x[1]}u.moveTo(s,l)},r.prototype._updateContentNotChangedOnAxis=function(a,o){var s=this._lastDataByCoordSys,l=this._cbParamsList,u=!!s&&s.length===a.length;return u&&each$f(s,function(c,d){var f=c.dataByAxis||[],p=a[d]||{},v=p.dataByAxis||[];u=u&&f.length===v.length,u&&each$f(f,function(g,y){var _=v[y]||{},S=g.seriesDataIndices||[],b=_.seriesDataIndices||[];u=u&&g.value===_.value&&g.axisType===_.axisType&&g.axisId===_.axisId&&S.length===b.length,u&&each$f(S,function(x,A){var w=b[A];u=u&&x.seriesIndex===w.seriesIndex&&x.dataIndex===w.dataIndex}),l&&each$f(g.seriesDataIndices,function(x){var A=x.seriesIndex,w=o[A],E=l[A];w&&E&&E.data!==w.data&&(u=!1)})})}),this._lastDataByCoordSys=a,this._cbParamsList=o,!!u},r.prototype._hide=function(a){this._lastDataByCoordSys=null,a({type:"hideTip",from:this.uid})},r.prototype.dispose=function(a,o){env.node||!o.getDom()||(clear$1(this,"_updatePosition"),this._tooltipContent.dispose(),unregister("itemTooltip",o))},r.type="tooltip",r}(ComponentView);function buildTooltipModel(n,r,a){var o=r.ecModel,s;a?(s=new Model(a,o,o),s=new Model(r.option,s,o)):s=r;for(var l=n.length-1;l>=0;l--){var u=n[l];u&&(u instanceof Model&&(u=u.get("tooltip",!0)),isString(u)&&(u={formatter:u}),u&&(s=new Model(u,s,o)))}return s}function makeDispatchAction(n,r){return n.dispatchAction||bind$1(r.dispatchAction,r)}function refixTooltipPosition(n,r,a,o,s,l,u){var c=a.getSize(),d=c[0],f=c[1];return l!=null&&(n+d+l+2>o?n-=d+l:n+=l),u!=null&&(r+f+u>s?r-=f+u:r+=u),[n,r]}function confineTooltipPosition(n,r,a,o,s){var l=a.getSize(),u=l[0],c=l[1];return n=Math.min(n+u,o)-u,r=Math.min(r+c,s)-c,n=Math.max(n,0),r=Math.max(r,0),[n,r]}function calcTooltipPosition(n,r,a,o){var s=a[0],l=a[1],u=Math.ceil(Math.SQRT2*o)+8,c=0,d=0,f=r.width,p=r.height;switch(n){case"inside":c=r.x+f/2-s/2,d=r.y+p/2-l/2;break;case"top":c=r.x+f/2-s/2,d=r.y-l-u;break;case"bottom":c=r.x+f/2-s/2,d=r.y+p+u;break;case"left":c=r.x-s-u,d=r.y+p/2-l/2;break;case"right":c=r.x+f+u,d=r.y+p/2-l/2}return[c,d]}function isCenterAlign(n){return n==="center"||n==="middle"}function findComponentReference(n,r,a){var o=preParseFinder(n).queryOptionMap,s=o.keys()[0];if(!(!s||s==="series")){var l=queryReferringComponents(r,s,o.get(s),{useDefault:!1,enableAll:!1,enableNone:!1}),u=l.models[0];if(u){var c=a.getViewOfComponentModel(u),d;if(c.group.traverse(function(f){var p=getECData(f).tooltipConfig;if(p&&p.name===n.name)return d=f,!0}),d)return{componentMainType:s,componentIndex:u.componentIndex,el:d}}}}function install$k(n){use(install$s),n.registerComponentModel(TooltipModel),n.registerComponentView(TooltipView),n.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},noop),n.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},noop)}var DEFAULT_TOOLBOX_BTNS=["rect","polygon","keep","clear"];function brushPreprocessor(n,r){var a=normalizeToArray(n?n.brush:[]);if(a.length){var o=[];each$f(a,function(d){var f=d.hasOwnProperty("toolbox")?d.toolbox:[];f instanceof Array&&(o=o.concat(f))});var s=n&&n.toolbox;isArray$1(s)&&(s=s[0]),s||(s={feature:{}},n.toolbox=[s]);var l=s.feature||(s.feature={}),u=l.brush||(l.brush={}),c=u.type||(u.type=[]);c.push.apply(c,o),removeDuplicate(c),r&&!c.length&&c.push.apply(c,DEFAULT_TOOLBOX_BTNS)}}function removeDuplicate(n){var r={};each$f(n,function(a){r[a]=1}),n.length=0,each$f(r,function(a,o){n.push(o)})}var each$4=each$f;function hasKeys(n){if(n){for(var r in n)if(n.hasOwnProperty(r))return!0}}function createVisualMappings(n,r,a){var o={};return each$4(r,function(l){var u=o[l]=s();each$4(n[l],function(c,d){if(VisualMapping.isValidType(d)){var f={type:d,visual:c};a&&a(f,l),u[d]=new VisualMapping(f),d==="opacity"&&(f=clone$6(f),f.type="colorAlpha",u.__hidden.__alphaForOpacity=new VisualMapping(f))}})}),o;function s(){var l=function(){};l.prototype.__hidden=l.prototype;var u=new l;return u}}function replaceVisualOption(n,r,a){var o;each$f(a,function(s){r.hasOwnProperty(s)&&hasKeys(r[s])&&(o=!0)}),o&&each$f(a,function(s){r.hasOwnProperty(s)&&hasKeys(r[s])?n[s]=clone$6(r[s]):delete n[s]})}function applyVisual(n,r,a,o,s,l){var u={};each$f(n,function(v){var g=VisualMapping.prepareVisualTypes(r[v]);u[v]=g});var c;function d(v){return getItemVisualFromData(a,c,v)}function f(v,g){setItemVisualFromData(a,c,v,g)}a.each(p);function p(v,g){c=v;var y=a.getRawDataItem(c);if(!(y&&y.visualMap===!1))for(var _=o.call(s,v),S=r[_],b=u[_],x=0,A=b.length;x<A;x++){var w=b[x];S[w]&&S[w].applyVisual(v,d,f)}}}function incrementalApplyVisual(n,r,a,o){var s={};return each$f(n,function(l){var u=VisualMapping.prepareVisualTypes(r[l]);s[l]=u}),{progress:function(u,c){var d;o!=null&&(d=c.getDimensionIndex(o));function f(D){return getItemVisualFromData(c,v,D)}function p(D,C){setItemVisualFromData(c,v,D,C)}for(var v,g=c.getStore();(v=u.next())!=null;){var y=c.getRawDataItem(v);if(!(y&&y.visualMap===!1))for(var _=o!=null?g.get(d,v):v,S=a(_),b=r[S],x=s[S],A=0,w=x.length;A<w;A++){var E=x[A];b[E]&&b[E].applyVisual(_,f,p)}}}}}function makeBrushCommonSelectorForSeries(n){var r=n.brushType,a={point:function(o){return selector[r].point(o,a,n)},rect:function(o){return selector[r].rect(o,a,n)}};return a}var selector={lineX:getLineSelectors(0),lineY:getLineSelectors(1),rect:{point:function(n,r,a){return n&&a.boundingRect.contain(n[0],n[1])},rect:function(n,r,a){return n&&a.boundingRect.intersect(n)}},polygon:{point:function(n,r,a){return n&&a.boundingRect.contain(n[0],n[1])&&contain(a.range,n[0],n[1])},rect:function(n,r,a){var o=a.range;if(!n||o.length<=1)return!1;var s=n.x,l=n.y,u=n.width,c=n.height,d=o[0];if(contain(o,s,l)||contain(o,s+u,l)||contain(o,s,l+c)||contain(o,s+u,l+c)||BoundingRect.create(n).contain(d[0],d[1])||linePolygonIntersect(s,l,s+u,l,o)||linePolygonIntersect(s,l,s,l+c,o)||linePolygonIntersect(s+u,l,s+u,l+c,o)||linePolygonIntersect(s,l+c,s+u,l+c,o))return!0}}};function getLineSelectors(n){var r=["x","y"],a=["width","height"];return{point:function(o,s,l){if(o){var u=l.range,c=o[n];return inLineRange(c,u)}},rect:function(o,s,l){if(o){var u=l.range,c=[o[r[n]],o[r[n]]+o[a[n]]];return c[1]<c[0]&&c.reverse(),inLineRange(c[0],u)||inLineRange(c[1],u)||inLineRange(u[0],c)||inLineRange(u[1],c)}}}}function inLineRange(n,r){return r[0]<=n&&n<=r[1]}var STATE_LIST=["inBrush","outOfBrush"],DISPATCH_METHOD="__ecBrushSelect",DISPATCH_FLAG="__ecInBrushSelectEvent";function layoutCovers(n){n.eachComponent({mainType:"brush"},function(r){var a=r.brushTargetManager=new BrushTargetManager(r.option,n);a.setInputRanges(r.areas,n)})}function brushVisual(n,r,a){var o=[],s,l;n.eachComponent({mainType:"brush"},function(u){a&&a.type==="takeGlobalCursor"&&u.setBrushOption(a.key==="brush"?a.brushOption:{brushType:!1})}),layoutCovers(n),n.eachComponent({mainType:"brush"},function(u,c){var d={brushId:u.id,brushIndex:c,brushName:u.name,areas:clone$6(u.areas),selected:[]};o.push(d);var f=u.option,p=f.brushLink,v=[],g=[],y=[],_=!1;c||(s=f.throttleType,l=f.throttleDelay);var S=map$1(u.areas,function(D){var C=boundingRectBuilders[D.brushType],$=defaults$2({boundingRect:C?C(D):void 0},D);return $.selectors=makeBrushCommonSelectorForSeries($),$}),b=createVisualMappings(u.option,STATE_LIST,function(D){D.mappingMethod="fixed"});isArray$1(p)&&each$f(p,function(D){v[D]=1});function x(D){return p==="all"||!!v[D]}function A(D){return!!D.length}n.eachSeries(function(D,C){var $=y[C]=[];D.subType==="parallel"?w(D,C):E(D,C,$)});function w(D,C){var $=D.coordinateSystem;_=_||$.hasAxisBrushed(),x(C)&&$.eachActiveState(D.getData(),function(P,M){P==="active"&&(g[M]=1)})}function E(D,C,$){if(!(!D.brushSelector||brushModelNotControll(u,C))&&(each$f(S,function(M){u.brushTargetManager.controlSeries(M,D,n)&&$.push(M),_=_||A($)}),x(C)&&A($))){var P=D.getData();P.each(function(M){checkInRange(D,$,P,M)&&(g[M]=1)})}}n.eachSeries(function(D,C){var $={seriesId:D.id,seriesIndex:C,seriesName:D.name,dataIndex:[]};d.selected.push($);var P=y[C],M=D.getData(),I=x(C)?function(L){return g[L]?($.dataIndex.push(M.getRawIndex(L)),"inBrush"):"outOfBrush"}:function(L){return checkInRange(D,P,M,L)?($.dataIndex.push(M.getRawIndex(L)),"inBrush"):"outOfBrush"};(x(C)?_:A(P))&&applyVisual(STATE_LIST,b,M,I)})}),dispatchAction$1(r,s,l,o,a)}function dispatchAction$1(n,r,a,o,s){if(s){var l=n.getZr();if(!l[DISPATCH_FLAG]){l[DISPATCH_METHOD]||(l[DISPATCH_METHOD]=doDispatch);var u=createOrUpdate(l,DISPATCH_METHOD,a,r);u(n,o)}}}function doDispatch(n,r){if(!n.isDisposed()){var a=n.getZr();a[DISPATCH_FLAG]=!0,n.dispatchAction({type:"brushSelect",batch:r}),a[DISPATCH_FLAG]=!1}}function checkInRange(n,r,a,o){for(var s=0,l=r.length;s<l;s++){var u=r[s];if(n.brushSelector(o,a,u.selectors,u))return!0}}function brushModelNotControll(n,r){var a=n.option.seriesIndex;return a!=null&&a!=="all"&&(isArray$1(a)?indexOf(a,r)<0:r!==a)}var boundingRectBuilders={rect:function(n){return getBoundingRectFromMinMax(n.range)},polygon:function(n){for(var r,a=n.range,o=0,s=a.length;o<s;o++){r=r||[[1/0,-1/0],[1/0,-1/0]];var l=a[o];l[0]<r[0][0]&&(r[0][0]=l[0]),l[0]>r[0][1]&&(r[0][1]=l[0]),l[1]<r[1][0]&&(r[1][0]=l[1]),l[1]>r[1][1]&&(r[1][1]=l[1])}return r&&getBoundingRectFromMinMax(r)}};function getBoundingRectFromMinMax(n){return new BoundingRect(n[0][0],n[1][0],n[0][1]-n[0][0],n[1][1]-n[1][0])}var BrushView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(a,o){this.ecModel=a,this.api=o,this.model,(this._brushController=new BrushController(o.getZr())).on("brush",bind$1(this._onBrush,this)).mount()},r.prototype.render=function(a,o,s,l){this.model=a,this._updateController(a,o,s,l)},r.prototype.updateTransform=function(a,o,s,l){layoutCovers(o),this._updateController(a,o,s,l)},r.prototype.updateVisual=function(a,o,s,l){this.updateTransform(a,o,s,l)},r.prototype.updateView=function(a,o,s,l){this._updateController(a,o,s,l)},r.prototype._updateController=function(a,o,s,l){(!l||l.$from!==a.id)&&this._brushController.setPanels(a.brushTargetManager.makePanelOpts(s)).enableBrush(a.brushOption).updateCovers(a.areas.slice())},r.prototype.dispose=function(){this._brushController.dispose()},r.prototype._onBrush=function(a){var o=this.model.id,s=this.model.brushTargetManager.setOutputRanges(a.areas,this.ecModel);(!a.isEnd||a.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:o,areas:clone$6(s),$from:o}),a.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:o,areas:clone$6(s),$from:o})},r.type="brush",r}(ComponentView),DEFAULT_OUT_OF_BRUSH_COLOR="#ddd",BrushModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.areas=[],a.brushOption={},a}return r.prototype.optionUpdated=function(a,o){var s=this.option;!o&&replaceVisualOption(s,a,["inBrush","outOfBrush"]);var l=s.inBrush=s.inBrush||{};s.outOfBrush=s.outOfBrush||{color:DEFAULT_OUT_OF_BRUSH_COLOR},l.hasOwnProperty("liftZ")||(l.liftZ=5)},r.prototype.setAreas=function(a){a&&(this.areas=map$1(a,function(o){return generateBrushOption(this.option,o)},this))},r.prototype.setBrushOption=function(a){this.brushOption=generateBrushOption(this.option,a),this.brushType=this.brushOption.brushType},r.type="brush",r.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],r.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},r}(ComponentModel);function generateBrushOption(n,r){return merge({brushType:n.brushType,brushMode:n.brushMode,transformable:n.transformable,brushStyle:new Model(n.brushStyle).getItemStyle(),removeOnClick:n.removeOnClick,z:n.z},r,!0)}var ICON_TYPES=["rect","polygon","lineX","lineY","keep","clear"],BrushFeature=function(n){__extends(r,n);function r(){return n!==null&&n.apply(this,arguments)||this}return r.prototype.render=function(a,o,s){var l,u,c;o.eachComponent({mainType:"brush"},function(d){l=d.brushType,u=d.brushOption.brushMode||"single",c=c||!!d.areas.length}),this._brushType=l,this._brushMode=u,each$f(a.get("type",!0),function(d){a.setIconStatus(d,(d==="keep"?u==="multiple":d==="clear"?c:d===l)?"emphasis":"normal")})},r.prototype.updateView=function(a,o,s){this.render(a,o,s)},r.prototype.getIcons=function(){var a=this.model,o=a.get("icon",!0),s={};return each$f(a.get("type",!0),function(l){o[l]&&(s[l]=o[l])}),s},r.prototype.onclick=function(a,o,s){var l=this._brushType,u=this._brushMode;s==="clear"?(o.dispatchAction({type:"axisAreaSelect",intervals:[]}),o.dispatchAction({type:"brush",command:"clear",areas:[]})):o.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:s==="keep"?l:l===s?!1:s,brushMode:s==="keep"?u==="multiple"?"single":"multiple":u}})},r.getDefaultOption=function(a){var o={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:a.getLocaleModel().get(["toolbox","brush","title"])};return o},r}(ToolboxFeature);function install$j(n){n.registerComponentView(BrushView),n.registerComponentModel(BrushModel),n.registerPreprocessor(brushPreprocessor),n.registerVisual(n.PRIORITY.VISUAL.BRUSH,brushVisual),n.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(r,a){a.eachComponent({mainType:"brush",query:r},function(o){o.setAreas(r.areas)})}),n.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},noop),n.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},noop),registerFeature("brush",BrushFeature)}var TitleModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.layoutMode={type:"box",ignoreSize:!0},a}return r.type="title",r.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},r}(ComponentModel),TitleView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.render=function(a,o,s){if(this.group.removeAll(),!!a.get("show")){var l=this.group,u=a.getModel("textStyle"),c=a.getModel("subtextStyle"),d=a.get("textAlign"),f=retrieve2(a.get("textBaseline"),a.get("textVerticalAlign")),p=new ZRText({style:createTextStyle$1(u,{text:a.get("text"),fill:u.getTextColor()},{disableBox:!0}),z2:10}),v=p.getBoundingRect(),g=a.get("subtext"),y=new ZRText({style:createTextStyle$1(c,{text:g,fill:c.getTextColor(),y:v.height+a.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),_=a.get("link"),S=a.get("sublink"),b=a.get("triggerEvent",!0);p.silent=!_&&!b,y.silent=!S&&!b,_&&p.on("click",function(){windowOpen(_,"_"+a.get("target"))}),S&&y.on("click",function(){windowOpen(S,"_"+a.get("subtarget"))}),getECData(p).eventData=getECData(y).eventData=b?{componentType:"title",componentIndex:a.componentIndex}:null,l.add(p),g&&l.add(y);var x=l.getBoundingRect(),A=a.getBoxLayoutParams();A.width=x.width,A.height=x.height;var w=getLayoutRect(A,{width:s.getWidth(),height:s.getHeight()},a.get("padding"));d||(d=a.get("left")||a.get("right"),d==="middle"&&(d="center"),d==="right"?w.x+=w.width:d==="center"&&(w.x+=w.width/2)),f||(f=a.get("top")||a.get("bottom"),f==="center"&&(f="middle"),f==="bottom"?w.y+=w.height:f==="middle"&&(w.y+=w.height/2),f=f||"top"),l.x=w.x,l.y=w.y,l.markRedraw();var E={align:d,verticalAlign:f};p.setStyle(E),y.setStyle(E),x=l.getBoundingRect();var D=w.margin,C=a.getItemStyle(["color","opacity"]);C.fill=a.get("backgroundColor");var $=new Rect$2({shape:{x:x.x-D[3],y:x.y-D[0],width:x.width+D[1]+D[3],height:x.height+D[0]+D[2],r:a.get("borderRadius")},style:C,subPixelOptimize:!0,silent:!0});l.add($)}},r.type="title",r}(ComponentView);function install$i(n){n.registerComponentModel(TitleModel),n.registerComponentView(TitleView)}var TimelineModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.layoutMode="box",a}return r.prototype.init=function(a,o,s){this.mergeDefaultAndTheme(a,s),this._initData()},r.prototype.mergeOption=function(a){n.prototype.mergeOption.apply(this,arguments),this._initData()},r.prototype.setCurrentIndex=function(a){a==null&&(a=this.option.currentIndex);var o=this._data.count();this.option.loop?a=(a%o+o)%o:(a>=o&&(a=o-1),a<0&&(a=0)),this.option.currentIndex=a},r.prototype.getCurrentIndex=function(){return this.option.currentIndex},r.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},r.prototype.setPlayState=function(a){this.option.autoPlay=!!a},r.prototype.getPlayState=function(){return!!this.option.autoPlay},r.prototype._initData=function(){var a=this.option,o=a.data||[],s=a.axisType,l=this._names=[],u;s==="category"?(u=[],each$f(o,function(f,p){var v=convertOptionIdName(getDataItemValue(f),""),g;isObject$3(f)?(g=clone$6(f),g.value=p):g=p,u.push(g),l.push(v)})):u=o;var c={category:"ordinal",time:"time",value:"number"}[s]||"number",d=this._data=new SeriesData([{name:"value",type:c}],this);d.initData(u,l)},r.prototype.getData=function(){return this._data},r.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},r.type="timeline",r.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},r}(ComponentModel),SliderTimelineModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="timeline.slider",r.defaultOption=inheritDefaultOption(TimelineModel.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),r}(TimelineModel);mixin(SliderTimelineModel,DataFormatMixin.prototype);var TimelineView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="timeline",r}(ComponentView),TimelineAxis=function(n){__extends(r,n);function r(a,o,s,l){var u=n.call(this,a,o,s)||this;return u.type=l||"value",u}return r.prototype.getLabelModel=function(){return this.model.getModel("label")},r.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},r}(Axis),PI$1=Math.PI,labelDataIndexStore=makeInner(),SliderTimelineView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(a,o){this.api=o},r.prototype.render=function(a,o,s){if(this.model=a,this.api=s,this.ecModel=o,this.group.removeAll(),a.get("show",!0)){var l=this._layout(a,s),u=this._createGroup("_mainGroup"),c=this._createGroup("_labelGroup"),d=this._axis=this._createAxis(l,a);a.formatTooltip=function(f){var p=d.scale.getLabel({value:f});return createTooltipMarkup("nameValue",{noName:!0,value:p})},each$f(["AxisLine","AxisTick","Control","CurrentPointer"],function(f){this["_render"+f](l,u,d,a)},this),this._renderAxisLabel(l,c,d,a),this._position(l,a)}this._doPlayStop(),this._updateTicksStatus()},r.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},r.prototype.dispose=function(){this._clearTimer()},r.prototype._layout=function(a,o){var s=a.get(["label","position"]),l=a.get("orient"),u=getViewRect(a,o),c;s==null||s==="auto"?c=l==="horizontal"?u.y+u.height/2<o.getHeight()/2?"-":"+":u.x+u.width/2<o.getWidth()/2?"+":"-":isString(s)?c={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[l][s]:c=s;var d={horizontal:"center",vertical:c>=0||c==="+"?"left":"right"},f={horizontal:c>=0||c==="+"?"top":"bottom",vertical:"middle"},p={horizontal:0,vertical:PI$1/2},v=l==="vertical"?u.height:u.width,g=a.getModel("controlStyle"),y=g.get("show",!0),_=y?g.get("itemSize"):0,S=y?g.get("itemGap"):0,b=_+S,x=a.get(["label","rotate"])||0;x=x*PI$1/180;var A,w,E,D=g.get("position",!0),C=y&&g.get("showPlayBtn",!0),$=y&&g.get("showPrevBtn",!0),P=y&&g.get("showNextBtn",!0),M=0,I=v;D==="left"||D==="bottom"?(C&&(A=[0,0],M+=b),$&&(w=[M,0],M+=b),P&&(E=[I-_,0],I-=b)):(C&&(A=[I-_,0],I-=b),$&&(w=[0,0],M+=b),P&&(E=[I-_,0],I-=b));var L=[M,I];return a.get("inverse")&&L.reverse(),{viewRect:u,mainLength:v,orient:l,rotation:p[l],labelRotation:x,labelPosOpt:c,labelAlign:a.get(["label","align"])||d[l],labelBaseline:a.get(["label","verticalAlign"])||a.get(["label","baseline"])||f[l],playPosition:A,prevBtnPosition:w,nextBtnPosition:E,axisExtent:L,controlSize:_,controlGap:S}},r.prototype._position=function(a,o){var s=this._mainGroup,l=this._labelGroup,u=a.viewRect;if(a.orient==="vertical"){var c=create$1(),d=u.x,f=u.y+u.height;translate(c,c,[-d,-f]),rotate(c,c,-PI$1/2),translate(c,c,[d,f]),u=u.clone(),u.applyTransform(c)}var p=A(u),v=A(s.getBoundingRect()),g=A(l.getBoundingRect()),y=[s.x,s.y],_=[l.x,l.y];_[0]=y[0]=p[0][0];var S=a.labelPosOpt;if(S==null||isString(S)){var b=S==="+"?0:1;w(y,v,p,1,b),w(_,g,p,1,1-b)}else{var b=S>=0?0:1;w(y,v,p,1,b),_[1]=y[1]+S}s.setPosition(y),l.setPosition(_),s.rotation=l.rotation=a.rotation,x(s),x(l);function x(E){E.originX=p[0][0]-E.x,E.originY=p[1][0]-E.y}function A(E){return[[E.x,E.x+E.width],[E.y,E.y+E.height]]}function w(E,D,C,$,P){E[$]+=C[$][P]-D[$][P]}},r.prototype._createAxis=function(a,o){var s=o.getData(),l=o.get("axisType"),u=createScaleByModel(o,l);u.getTicks=function(){return s.mapArray(["value"],function(f){return{value:f}})};var c=s.getDataExtent("value");u.setExtent(c[0],c[1]),u.calcNiceTicks();var d=new TimelineAxis("value",u,a.axisExtent,l);return d.model=o,d},r.prototype._createGroup=function(a){var o=this[a]=new Group$3;return this.group.add(o),o},r.prototype._renderAxisLine=function(a,o,s,l){var u=s.getExtent();if(l.get(["lineStyle","show"])){var c=new Line$1({shape:{x1:u[0],y1:0,x2:u[1],y2:0},style:extend$2({lineCap:"round"},l.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});o.add(c);var d=this._progressLine=new Line$1({shape:{x1:u[0],x2:this._currentPointer?this._currentPointer.x:u[0],y1:0,y2:0},style:defaults$2({lineCap:"round",lineWidth:c.style.lineWidth},l.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});o.add(d)}},r.prototype._renderAxisTick=function(a,o,s,l){var u=this,c=l.getData(),d=s.scale.getTicks();this._tickSymbols=[],each$f(d,function(f){var p=s.dataToCoord(f.value),v=c.getItemModel(f.value),g=v.getModel("itemStyle"),y=v.getModel(["emphasis","itemStyle"]),_=v.getModel(["progress","itemStyle"]),S={x:p,y:0,onclick:bind$1(u._changeTimeline,u,f.value)},b=giveSymbol(v,g,o,S);b.ensureState("emphasis").style=y.getItemStyle(),b.ensureState("progress").style=_.getItemStyle(),enableHoverEmphasis(b);var x=getECData(b);v.get("tooltip")?(x.dataIndex=f.value,x.dataModel=l):x.dataIndex=x.dataModel=null,u._tickSymbols.push(b)})},r.prototype._renderAxisLabel=function(a,o,s,l){var u=this,c=s.getLabelModel();if(c.get("show")){var d=l.getData(),f=s.getViewLabels();this._tickLabels=[],each$f(f,function(p){var v=p.tickValue,g=d.getItemModel(v),y=g.getModel("label"),_=g.getModel(["emphasis","label"]),S=g.getModel(["progress","label"]),b=s.dataToCoord(p.tickValue),x=new ZRText({x:b,y:0,rotation:a.labelRotation-a.rotation,onclick:bind$1(u._changeTimeline,u,v),silent:!1,style:createTextStyle$1(y,{text:p.formattedLabel,align:a.labelAlign,verticalAlign:a.labelBaseline})});x.ensureState("emphasis").style=createTextStyle$1(_),x.ensureState("progress").style=createTextStyle$1(S),o.add(x),enableHoverEmphasis(x),labelDataIndexStore(x).dataIndex=v,u._tickLabels.push(x)})}},r.prototype._renderControl=function(a,o,s,l){var u=a.controlSize,c=a.rotation,d=l.getModel("controlStyle").getItemStyle(),f=l.getModel(["emphasis","controlStyle"]).getItemStyle(),p=l.getPlayState(),v=l.get("inverse",!0);g(a.nextBtnPosition,"next",bind$1(this._changeTimeline,this,v?"-":"+")),g(a.prevBtnPosition,"prev",bind$1(this._changeTimeline,this,v?"+":"-")),g(a.playPosition,p?"stop":"play",bind$1(this._handlePlayClick,this,!p),!0);function g(y,_,S,b){if(y){var x=parsePercent$1(retrieve2(l.get(["controlStyle",_+"BtnSize"]),u),u),A=[0,-x/2,x,x],w=makeControlIcon(l,_+"Icon",A,{x:y[0],y:y[1],originX:u/2,originY:0,rotation:b?-c:0,rectHover:!0,style:d,onclick:S});w.ensureState("emphasis").style=f,o.add(w),enableHoverEmphasis(w)}}},r.prototype._renderCurrentPointer=function(a,o,s,l){var u=l.getData(),c=l.getCurrentIndex(),d=u.getItemModel(c).getModel("checkpointStyle"),f=this,p={onCreate:function(v){v.draggable=!0,v.drift=bind$1(f._handlePointerDrag,f),v.ondragend=bind$1(f._handlePointerDragend,f),pointerMoveTo(v,f._progressLine,c,s,l,!0)},onUpdate:function(v){pointerMoveTo(v,f._progressLine,c,s,l)}};this._currentPointer=giveSymbol(d,d,this._mainGroup,{},this._currentPointer,p)},r.prototype._handlePlayClick=function(a){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:a,from:this.uid})},r.prototype._handlePointerDrag=function(a,o,s){this._clearTimer(),this._pointerChangeTimeline([s.offsetX,s.offsetY])},r.prototype._handlePointerDragend=function(a){this._pointerChangeTimeline([a.offsetX,a.offsetY],!0)},r.prototype._pointerChangeTimeline=function(a,o){var s=this._toAxisCoord(a)[0],l=this._axis,u=asc$2(l.getExtent().slice());s>u[1]&&(s=u[1]),s<u[0]&&(s=u[0]),this._currentPointer.x=s,this._currentPointer.markRedraw();var c=this._progressLine;c&&(c.shape.x2=s,c.dirty());var d=this._findNearestTick(s),f=this.model;(o||d!==f.getCurrentIndex()&&f.get("realtime"))&&this._changeTimeline(d)},r.prototype._doPlayStop=function(){var a=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var o=a.model;a._changeTimeline(o.getCurrentIndex()+(o.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},r.prototype._toAxisCoord=function(a){var o=this._mainGroup.getLocalTransform();return applyTransform(a,o,!0)},r.prototype._findNearestTick=function(a){var o=this.model.getData(),s=1/0,l,u=this._axis;return o.each(["value"],function(c,d){var f=u.dataToCoord(c),p=Math.abs(f-a);p<s&&(s=p,l=d)}),l},r.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},r.prototype._changeTimeline=function(a){var o=this.model.getCurrentIndex();a==="+"?a=o+1:a==="-"&&(a=o-1),this.api.dispatchAction({type:"timelineChange",currentIndex:a,from:this.uid})},r.prototype._updateTicksStatus=function(){var a=this.model.getCurrentIndex(),o=this._tickSymbols,s=this._tickLabels;if(o)for(var l=0;l<o.length;l++)o&&o[l]&&o[l].toggleState("progress",l<a);if(s)for(var l=0;l<s.length;l++)s&&s[l]&&s[l].toggleState("progress",labelDataIndexStore(s[l]).dataIndex<=a)},r.type="timeline.slider",r}(TimelineView);function createScaleByModel(n,r){if(r=r||n.get("type"),r)switch(r){case"category":return new OrdinalScale({ordinalMeta:n.getCategories(),extent:[1/0,-1/0]});case"time":return new TimeScale({locale:n.ecModel.getLocaleModel(),useUTC:n.ecModel.get("useUTC")});default:return new IntervalScale}}function getViewRect(n,r){return getLayoutRect(n.getBoxLayoutParams(),{width:r.getWidth(),height:r.getHeight()},n.get("padding"))}function makeControlIcon(n,r,a,o){var s=o.style,l=createIcon(n.get(["controlStyle",r]),o||{},new BoundingRect(a[0],a[1],a[2],a[3]));return s&&l.setStyle(s),l}function giveSymbol(n,r,a,o,s,l){var u=r.get("color");if(s)s.setColor(u),a.add(s),l&&l.onUpdate(s);else{var c=n.get("symbol");s=createSymbol$1(c,-1,-1,2,2,u),s.setStyle("strokeNoScale",!0),a.add(s),l&&l.onCreate(s)}var d=r.getItemStyle(["color"]);s.setStyle(d),o=merge({rectHover:!0,z2:100},o,!0);var f=normalizeSymbolSize(n.get("symbolSize"));o.scaleX=f[0]/2,o.scaleY=f[1]/2;var p=normalizeSymbolOffset(n.get("symbolOffset"),f);p&&(o.x=(o.x||0)+p[0],o.y=(o.y||0)+p[1]);var v=n.get("symbolRotate");return o.rotation=(v||0)*Math.PI/180||0,s.attr(o),s.updateTransform(),s}function pointerMoveTo(n,r,a,o,s,l){if(!n.dragging){var u=s.getModel("checkpointStyle"),c=o.dataToCoord(s.getData().get("value",a));if(l||!u.get("animation",!0))n.attr({x:c,y:0}),r&&r.attr({shape:{x2:c}});else{var d={duration:u.get("animationDuration",!0),easing:u.get("animationEasing",!0)};n.stopAnimation(null,!0),n.animateTo({x:c,y:0},d),r&&r.animateTo({shape:{x2:c}},d)}}}function installTimelineAction(n){n.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(r,a,o){var s=a.getComponent("timeline");return s&&r.currentIndex!=null&&(s.setCurrentIndex(r.currentIndex),!s.get("loop",!0)&&s.isIndexMax()&&s.getPlayState()&&(s.setPlayState(!1),o.dispatchAction({type:"timelinePlayChange",playState:!1,from:r.from}))),a.resetOption("timeline",{replaceMerge:s.get("replaceMerge",!0)}),defaults$2({currentIndex:s.option.currentIndex},r)}),n.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(r,a){var o=a.getComponent("timeline");o&&r.playState!=null&&o.setPlayState(r.playState)})}function timelinePreprocessor(n){var r=n&&n.timeline;isArray$1(r)||(r=r?[r]:[]),each$f(r,function(a){a&&compatibleEC2(a)})}function compatibleEC2(n){var r=n.type,a={number:"value",time:"time"};if(a[r]&&(n.axisType=a[r],delete n.type),transferItem(n),has$1(n,"controlPosition")){var o=n.controlStyle||(n.controlStyle={});has$1(o,"position")||(o.position=n.controlPosition),o.position==="none"&&!has$1(o,"show")&&(o.show=!1,delete o.position),delete n.controlPosition}each$f(n.data||[],function(s){isObject$3(s)&&!isArray$1(s)&&(!has$1(s,"value")&&has$1(s,"name")&&(s.value=s.name),transferItem(s))})}function transferItem(n){var r=n.itemStyle||(n.itemStyle={}),a=r.emphasis||(r.emphasis={}),o=n.label||n.label||{},s=o.normal||(o.normal={}),l={normal:1,emphasis:1};each$f(o,function(u,c){!l[c]&&!has$1(s,c)&&(s[c]=u)}),a.label&&!has$1(o,"emphasis")&&(o.emphasis=a.label,delete a.label)}function has$1(n,r){return n.hasOwnProperty(r)}function install$h(n){n.registerComponentModel(SliderTimelineModel),n.registerComponentView(SliderTimelineView),n.registerSubTypeDefaulter("timeline",function(){return"slider"}),installTimelineAction(n),n.registerPreprocessor(timelinePreprocessor)}function checkMarkerInSeries(n,r){if(!n)return!1;for(var a=isArray$1(n)?n:[n],o=0;o<a.length;o++)if(a[o]&&a[o][r])return!0;return!1}function fillLabel(n){defaultEmphasis(n,"label",["show"])}var inner$5=makeInner(),MarkerModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.createdBySelf=!1,a}return r.prototype.init=function(a,o,s){this.mergeDefaultAndTheme(a,s),this._mergeOption(a,s,!1,!0)},r.prototype.isAnimationEnabled=function(){if(env.node)return!1;var a=this.__hostSeries;return this.getShallow("animation")&&a&&a.isAnimationEnabled()},r.prototype.mergeOption=function(a,o){this._mergeOption(a,o,!1,!1)},r.prototype._mergeOption=function(a,o,s,l){var u=this.mainType;s||o.eachSeries(function(c){var d=c.get(this.mainType,!0),f=inner$5(c)[u];if(!d||!d.data){inner$5(c)[u]=null;return}f?f._mergeOption(d,o,!0):(l&&fillLabel(d),each$f(d.data,function(p){p instanceof Array?(fillLabel(p[0]),fillLabel(p[1])):fillLabel(p)}),f=this.createMarkerModelFromSeries(d,this,o),extend$2(f,{mainType:this.mainType,seriesIndex:c.seriesIndex,name:c.name,createdBySelf:!0}),f.__hostSeries=c),inner$5(c)[u]=f},this)},r.prototype.formatTooltip=function(a,o,s){var l=this.getData(),u=this.getRawValue(a),c=l.getName(a);return createTooltipMarkup("section",{header:this.name,blocks:[createTooltipMarkup("nameValue",{name:c,value:u,noName:!c,noValue:u==null})]})},r.prototype.getData=function(){return this._data},r.prototype.setData=function(a){this._data=a},r.prototype.getDataParams=function(a,o){var s=DataFormatMixin.prototype.getDataParams.call(this,a,o),l=this.__hostSeries;return l&&(s.seriesId=l.id,s.seriesName=l.name,s.seriesType=l.subType),s},r.getMarkerModelFromSeries=function(a,o){return inner$5(a)[o]},r.type="marker",r.dependencies=["series","grid","polar","geo"],r}(ComponentModel);mixin(MarkerModel,DataFormatMixin.prototype);var MarkPointModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.createMarkerModelFromSeries=function(a,o,s){return new r(a,o,s)},r.type="markPoint",r.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},r}(MarkerModel);function hasXOrY(n){return!(isNaN(parseFloat(n.x))&&isNaN(parseFloat(n.y)))}function hasXAndY(n){return!isNaN(parseFloat(n.x))&&!isNaN(parseFloat(n.y))}function markerTypeCalculatorWithExtent(n,r,a,o,s,l){var u=[],c=isDimensionStacked(r,o),d=c?r.getCalculationInfo("stackResultDimension"):o,f=numCalculate(r,d,n),p=r.indicesOfNearest(d,f)[0];u[s]=r.get(a,p),u[l]=r.get(d,p);var v=r.get(o,p),g=getPrecision(r.get(o,p));return g=Math.min(g,20),g>=0&&(u[l]=+u[l].toFixed(g)),[u,v]}var markerTypeCalculator={min:curry$1(markerTypeCalculatorWithExtent,"min"),max:curry$1(markerTypeCalculatorWithExtent,"max"),average:curry$1(markerTypeCalculatorWithExtent,"average"),median:curry$1(markerTypeCalculatorWithExtent,"median")};function dataTransform(n,r){if(r){var a=n.getData(),o=n.coordinateSystem,s=o&&o.dimensions;if(!hasXAndY(r)&&!isArray$1(r.coord)&&isArray$1(s)){var l=getAxisInfo(r,a,o,n);if(r=clone$6(r),r.type&&markerTypeCalculator[r.type]&&l.baseAxis&&l.valueAxis){var u=indexOf(s,l.baseAxis.dim),c=indexOf(s,l.valueAxis.dim),d=markerTypeCalculator[r.type](a,l.baseDataDim,l.valueDataDim,u,c);r.coord=d[0],r.value=d[1]}else r.coord=[r.xAxis!=null?r.xAxis:r.radiusAxis,r.yAxis!=null?r.yAxis:r.angleAxis]}if(r.coord==null||!isArray$1(s))r.coord=[];else for(var f=r.coord,p=0;p<2;p++)markerTypeCalculator[f[p]]&&(f[p]=numCalculate(a,a.mapDimension(s[p]),f[p]));return r}}function getAxisInfo(n,r,a,o){var s={};return n.valueIndex!=null||n.valueDim!=null?(s.valueDataDim=n.valueIndex!=null?r.getDimension(n.valueIndex):n.valueDim,s.valueAxis=a.getAxis(dataDimToCoordDim(o,s.valueDataDim)),s.baseAxis=a.getOtherAxis(s.valueAxis),s.baseDataDim=r.mapDimension(s.baseAxis.dim)):(s.baseAxis=o.getBaseAxis(),s.valueAxis=a.getOtherAxis(s.baseAxis),s.baseDataDim=r.mapDimension(s.baseAxis.dim),s.valueDataDim=r.mapDimension(s.valueAxis.dim)),s}function dataDimToCoordDim(n,r){var a=n.getData().getDimensionInfo(r);return a&&a.coordDim}function dataFilter(n,r){return n&&n.containData&&r.coord&&!hasXOrY(r)?n.containData(r.coord):!0}function zoneFilter(n,r,a){return n&&n.containZone&&r.coord&&a.coord&&!hasXOrY(r)&&!hasXOrY(a)?n.containZone(r.coord,a.coord):!0}function createMarkerDimValueGetter(n,r){return n?function(a,o,s,l){var u=l<2?a.coord&&a.coord[l]:a.value;return parseDataValue(u,r[l])}:function(a,o,s,l){return parseDataValue(a.value,r[l])}}function numCalculate(n,r,a){if(a==="average"){var o=0,s=0;return n.each(r,function(l,u){isNaN(l)||(o+=l,s++)}),o/s}else return a==="median"?n.getMedian(r):n.getDataExtent(r)[a==="max"?1:0]}var inner$4=makeInner(),MarkerView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.init=function(){this.markerGroupMap=createHashMap()},r.prototype.render=function(a,o,s){var l=this,u=this.markerGroupMap;u.each(function(c){inner$4(c).keep=!1}),o.eachSeries(function(c){var d=MarkerModel.getMarkerModelFromSeries(c,l.type);d&&l.renderSeries(c,d,o,s)}),u.each(function(c){!inner$4(c).keep&&l.group.remove(c.group)})},r.prototype.markKeep=function(a){inner$4(a).keep=!0},r.prototype.toggleBlurSeries=function(a,o){var s=this;each$f(a,function(l){var u=MarkerModel.getMarkerModelFromSeries(l,s.type);if(u){var c=u.getData();c.eachItemGraphicEl(function(d){d&&(o?enterBlur(d):leaveBlur(d))})}})},r.type="marker",r}(ComponentView);function updateMarkerLayout(n,r,a){var o=r.coordinateSystem;n.each(function(s){var l=n.getItemModel(s),u,c=parsePercent(l.get("x"),a.getWidth()),d=parsePercent(l.get("y"),a.getHeight());if(!isNaN(c)&&!isNaN(d))u=[c,d];else if(r.getMarkerPosition)u=r.getMarkerPosition(n.getValues(n.dimensions,s));else if(o){var f=n.get(o.dimensions[0],s),p=n.get(o.dimensions[1],s);u=o.dataToPoint([f,p])}isNaN(c)||(u[0]=c),isNaN(d)||(u[1]=d),n.setItemLayout(s,u)})}var MarkPointView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.updateTransform=function(a,o,s){o.eachSeries(function(l){var u=MarkerModel.getMarkerModelFromSeries(l,"markPoint");u&&(updateMarkerLayout(u.getData(),l,s),this.markerGroupMap.get(l.id).updateLayout())},this)},r.prototype.renderSeries=function(a,o,s,l){var u=a.coordinateSystem,c=a.id,d=a.getData(),f=this.markerGroupMap,p=f.get(c)||f.set(c,new SymbolDraw),v=createData(u,a,o);o.setData(v),updateMarkerLayout(o.getData(),a,l),v.each(function(g){var y=v.getItemModel(g),_=y.getShallow("symbol"),S=y.getShallow("symbolSize"),b=y.getShallow("symbolRotate"),x=y.getShallow("symbolOffset"),A=y.getShallow("symbolKeepAspect");if(isFunction(_)||isFunction(S)||isFunction(b)||isFunction(x)){var w=o.getRawValue(g),E=o.getDataParams(g);isFunction(_)&&(_=_(w,E)),isFunction(S)&&(S=S(w,E)),isFunction(b)&&(b=b(w,E)),isFunction(x)&&(x=x(w,E))}var D=y.getModel("itemStyle").getItemStyle(),C=getVisualFromData(d,"color");D.fill||(D.fill=C),v.setItemVisual(g,{symbol:_,symbolSize:S,symbolRotate:b,symbolOffset:x,symbolKeepAspect:A,style:D})}),p.updateData(v),this.group.add(p.group),v.eachItemGraphicEl(function(g){g.traverse(function(y){getECData(y).dataModel=o})}),this.markKeep(p),p.group.silent=o.get("silent")||a.get("silent")},r.type="markPoint",r}(MarkerView);function createData(n,r,a){var o;n?o=map$1(n&&n.dimensions,function(c){var d=r.getData().getDimensionInfo(r.getData().mapDimension(c))||{};return extend$2(extend$2({},d),{name:c,ordinalMeta:null})}):o=[{name:"value",type:"float"}];var s=new SeriesData(o,a),l=map$1(a.get("data"),curry$1(dataTransform,r));n&&(l=filter(l,curry$1(dataFilter,n)));var u=createMarkerDimValueGetter(!!n,o);return s.initData(l,null,u),s}function install$g(n){n.registerComponentModel(MarkPointModel),n.registerComponentView(MarkPointView),n.registerPreprocessor(function(r){checkMarkerInSeries(r.series,"markPoint")&&(r.markPoint=r.markPoint||{})})}var MarkLineModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.createMarkerModelFromSeries=function(a,o,s){return new r(a,o,s)},r.type="markLine",r.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"},r}(MarkerModel),inner$3=makeInner(),markLineTransform=function(n,r,a,o){var s=n.getData(),l;if(isArray$1(o))l=o;else{var u=o.type;if(u==="min"||u==="max"||u==="average"||u==="median"||o.xAxis!=null||o.yAxis!=null){var c=void 0,d=void 0;if(o.yAxis!=null||o.xAxis!=null)c=r.getAxis(o.yAxis!=null?"y":"x"),d=retrieve(o.yAxis,o.xAxis);else{var f=getAxisInfo(o,s,r,n);c=f.valueAxis;var p=getStackedDimension(s,f.valueDataDim);d=numCalculate(s,p,u)}var v=c.dim==="x"?0:1,g=1-v,y=clone$6(o),_={coord:[]};y.type=null,y.coord=[],y.coord[g]=-1/0,_.coord[g]=1/0;var S=a.get("precision");S>=0&&isNumber(d)&&(d=+d.toFixed(Math.min(S,20))),y.coord[v]=_.coord[v]=d,l=[y,_,{type:u,valueIndex:o.valueIndex,value:d}]}else l=[]}var b=[dataTransform(n,l[0]),dataTransform(n,l[1]),extend$2({},l[2])];return b[2].type=b[2].type||null,merge(b[2],b[0]),merge(b[2],b[1]),b};function isInfinity$1(n){return!isNaN(n)&&!isFinite(n)}function ifMarkLineHasOnlyDim(n,r,a,o){var s=1-n,l=o.dimensions[n];return isInfinity$1(r[s])&&isInfinity$1(a[s])&&r[n]===a[n]&&o.getAxis(l).containData(r[n])}function markLineFilter(n,r){if(n.type==="cartesian2d"){var a=r[0].coord,o=r[1].coord;if(a&&o&&(ifMarkLineHasOnlyDim(1,a,o,n)||ifMarkLineHasOnlyDim(0,a,o,n)))return!0}return dataFilter(n,r[0])&&dataFilter(n,r[1])}function updateSingleMarkerEndLayout(n,r,a,o,s){var l=o.coordinateSystem,u=n.getItemModel(r),c,d=parsePercent(u.get("x"),s.getWidth()),f=parsePercent(u.get("y"),s.getHeight());if(!isNaN(d)&&!isNaN(f))c=[d,f];else{if(o.getMarkerPosition)c=o.getMarkerPosition(n.getValues(n.dimensions,r));else{var p=l.dimensions,v=n.get(p[0],r),g=n.get(p[1],r);c=l.dataToPoint([v,g])}if(isCoordinateSystemType(l,"cartesian2d")){var y=l.getAxis("x"),_=l.getAxis("y"),p=l.dimensions;isInfinity$1(n.get(p[0],r))?c[0]=y.toGlobalCoord(y.getExtent()[a?0:1]):isInfinity$1(n.get(p[1],r))&&(c[1]=_.toGlobalCoord(_.getExtent()[a?0:1]))}isNaN(d)||(c[0]=d),isNaN(f)||(c[1]=f)}n.setItemLayout(r,c)}var MarkLineView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.updateTransform=function(a,o,s){o.eachSeries(function(l){var u=MarkerModel.getMarkerModelFromSeries(l,"markLine");if(u){var c=u.getData(),d=inner$3(u).from,f=inner$3(u).to;d.each(function(p){updateSingleMarkerEndLayout(d,p,!0,l,s),updateSingleMarkerEndLayout(f,p,!1,l,s)}),c.each(function(p){c.setItemLayout(p,[d.getItemLayout(p),f.getItemLayout(p)])}),this.markerGroupMap.get(l.id).updateLayout()}},this)},r.prototype.renderSeries=function(a,o,s,l){var u=a.coordinateSystem,c=a.id,d=a.getData(),f=this.markerGroupMap,p=f.get(c)||f.set(c,new LineDraw);this.group.add(p.group);var v=createList$1(u,a,o),g=v.from,y=v.to,_=v.line;inner$3(o).from=g,inner$3(o).to=y,o.setData(_);var S=o.get("symbol"),b=o.get("symbolSize"),x=o.get("symbolRotate"),A=o.get("symbolOffset");isArray$1(S)||(S=[S,S]),isArray$1(b)||(b=[b,b]),isArray$1(x)||(x=[x,x]),isArray$1(A)||(A=[A,A]),v.from.each(function(E){w(g,E,!0),w(y,E,!1)}),_.each(function(E){var D=_.getItemModel(E).getModel("lineStyle").getLineStyle();_.setItemLayout(E,[g.getItemLayout(E),y.getItemLayout(E)]),D.stroke==null&&(D.stroke=g.getItemVisual(E,"style").fill),_.setItemVisual(E,{fromSymbolKeepAspect:g.getItemVisual(E,"symbolKeepAspect"),fromSymbolOffset:g.getItemVisual(E,"symbolOffset"),fromSymbolRotate:g.getItemVisual(E,"symbolRotate"),fromSymbolSize:g.getItemVisual(E,"symbolSize"),fromSymbol:g.getItemVisual(E,"symbol"),toSymbolKeepAspect:y.getItemVisual(E,"symbolKeepAspect"),toSymbolOffset:y.getItemVisual(E,"symbolOffset"),toSymbolRotate:y.getItemVisual(E,"symbolRotate"),toSymbolSize:y.getItemVisual(E,"symbolSize"),toSymbol:y.getItemVisual(E,"symbol"),style:D})}),p.updateData(_),v.line.eachItemGraphicEl(function(E){getECData(E).dataModel=o,E.traverse(function(D){getECData(D).dataModel=o})});function w(E,D,C){var $=E.getItemModel(D);updateSingleMarkerEndLayout(E,D,C,a,l);var P=$.getModel("itemStyle").getItemStyle();P.fill==null&&(P.fill=getVisualFromData(d,"color")),E.setItemVisual(D,{symbolKeepAspect:$.get("symbolKeepAspect"),symbolOffset:retrieve2($.get("symbolOffset",!0),A[C?0:1]),symbolRotate:retrieve2($.get("symbolRotate",!0),x[C?0:1]),symbolSize:retrieve2($.get("symbolSize"),b[C?0:1]),symbol:retrieve2($.get("symbol",!0),S[C?0:1]),style:P})}this.markKeep(p),p.group.silent=o.get("silent")||a.get("silent")},r.type="markLine",r}(MarkerView);function createList$1(n,r,a){var o;n?o=map$1(n&&n.dimensions,function(f){var p=r.getData().getDimensionInfo(r.getData().mapDimension(f))||{};return extend$2(extend$2({},p),{name:f,ordinalMeta:null})}):o=[{name:"value",type:"float"}];var s=new SeriesData(o,a),l=new SeriesData(o,a),u=new SeriesData([],a),c=map$1(a.get("data"),curry$1(markLineTransform,r,n,a));n&&(c=filter(c,curry$1(markLineFilter,n)));var d=createMarkerDimValueGetter(!!n,o);return s.initData(map$1(c,function(f){return f[0]}),null,d),l.initData(map$1(c,function(f){return f[1]}),null,d),u.initData(map$1(c,function(f){return f[2]})),u.hasItemOption=!0,{from:s,to:l,line:u}}function install$f(n){n.registerComponentModel(MarkLineModel),n.registerComponentView(MarkLineView),n.registerPreprocessor(function(r){checkMarkerInSeries(r.series,"markLine")&&(r.markLine=r.markLine||{})})}var MarkAreaModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.createMarkerModelFromSeries=function(a,o,s){return new r(a,o,s)},r.type="markArea",r.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},r}(MarkerModel),inner$2=makeInner(),markAreaTransform=function(n,r,a,o){var s=o[0],l=o[1];if(!(!s||!l)){var u=dataTransform(n,s),c=dataTransform(n,l),d=u.coord,f=c.coord;d[0]=retrieve(d[0],-1/0),d[1]=retrieve(d[1],-1/0),f[0]=retrieve(f[0],1/0),f[1]=retrieve(f[1],1/0);var p=mergeAll([{},u,c]);return p.coord=[u.coord,c.coord],p.x0=u.x,p.y0=u.y,p.x1=c.x,p.y1=c.y,p}};function isInfinity(n){return!isNaN(n)&&!isFinite(n)}function ifMarkAreaHasOnlyDim(n,r,a,o){var s=1-n;return isInfinity(r[s])&&isInfinity(a[s])}function markAreaFilter(n,r){var a=r.coord[0],o=r.coord[1],s={coord:a,x:r.x0,y:r.y0},l={coord:o,x:r.x1,y:r.y1};return isCoordinateSystemType(n,"cartesian2d")?a&&o&&(ifMarkAreaHasOnlyDim(1,a,o)||ifMarkAreaHasOnlyDim(0,a,o))?!0:zoneFilter(n,s,l):dataFilter(n,s)||dataFilter(n,l)}function getSingleMarkerEndPoint(n,r,a,o,s){var l=o.coordinateSystem,u=n.getItemModel(r),c,d=parsePercent(u.get(a[0]),s.getWidth()),f=parsePercent(u.get(a[1]),s.getHeight());if(!isNaN(d)&&!isNaN(f))c=[d,f];else{if(o.getMarkerPosition){var p=n.getValues(["x0","y0"],r),v=n.getValues(["x1","y1"],r),g=l.clampData(p),y=l.clampData(v),_=[];a[0]==="x0"?_[0]=g[0]>y[0]?v[0]:p[0]:_[0]=g[0]>y[0]?p[0]:v[0],a[1]==="y0"?_[1]=g[1]>y[1]?v[1]:p[1]:_[1]=g[1]>y[1]?p[1]:v[1],c=o.getMarkerPosition(_,a,!0)}else{var S=n.get(a[0],r),b=n.get(a[1],r),x=[S,b];l.clampData&&l.clampData(x,x),c=l.dataToPoint(x,!0)}if(isCoordinateSystemType(l,"cartesian2d")){var A=l.getAxis("x"),w=l.getAxis("y"),S=n.get(a[0],r),b=n.get(a[1],r);isInfinity(S)?c[0]=A.toGlobalCoord(A.getExtent()[a[0]==="x0"?0:1]):isInfinity(b)&&(c[1]=w.toGlobalCoord(w.getExtent()[a[1]==="y0"?0:1]))}isNaN(d)||(c[0]=d),isNaN(f)||(c[1]=f)}return c}var dimPermutations=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],MarkAreaView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.updateTransform=function(a,o,s){o.eachSeries(function(l){var u=MarkerModel.getMarkerModelFromSeries(l,"markArea");if(u){var c=u.getData();c.each(function(d){var f=map$1(dimPermutations,function(v){return getSingleMarkerEndPoint(c,d,v,l,s)});c.setItemLayout(d,f);var p=c.getItemGraphicEl(d);p.setShape("points",f)})}},this)},r.prototype.renderSeries=function(a,o,s,l){var u=a.coordinateSystem,c=a.id,d=a.getData(),f=this.markerGroupMap,p=f.get(c)||f.set(c,{group:new Group$3});this.group.add(p.group),this.markKeep(p);var v=createList(u,a,o);o.setData(v),v.each(function(g){var y=map$1(dimPermutations,function(P){return getSingleMarkerEndPoint(v,g,P,a,l)}),_=u.getAxis("x").scale,S=u.getAxis("y").scale,b=_.getExtent(),x=S.getExtent(),A=[_.parse(v.get("x0",g)),_.parse(v.get("x1",g))],w=[S.parse(v.get("y0",g)),S.parse(v.get("y1",g))];asc$2(A),asc$2(w);var E=!(b[0]>A[1]||b[1]<A[0]||x[0]>w[1]||x[1]<w[0]),D=!E;v.setItemLayout(g,{points:y,allClipped:D});var C=v.getItemModel(g).getModel("itemStyle").getItemStyle(),$=getVisualFromData(d,"color");C.fill||(C.fill=$,isString(C.fill)&&(C.fill=modifyAlpha(C.fill,.4))),C.stroke||(C.stroke=$),v.setItemVisual(g,"style",C)}),v.diff(inner$2(p).data).add(function(g){var y=v.getItemLayout(g);if(!y.allClipped){var _=new Polygon({shape:{points:y.points}});v.setItemGraphicEl(g,_),p.group.add(_)}}).update(function(g,y){var _=inner$2(p).data.getItemGraphicEl(y),S=v.getItemLayout(g);S.allClipped?_&&p.group.remove(_):(_?updateProps$1(_,{shape:{points:S.points}},o,g):_=new Polygon({shape:{points:S.points}}),v.setItemGraphicEl(g,_),p.group.add(_))}).remove(function(g){var y=inner$2(p).data.getItemGraphicEl(g);p.group.remove(y)}).execute(),v.eachItemGraphicEl(function(g,y){var _=v.getItemModel(y),S=v.getItemVisual(y,"style");g.useStyle(v.getItemVisual(y,"style")),setLabelStyle(g,getLabelStatesModels(_),{labelFetcher:o,labelDataIndex:y,defaultText:v.getName(y)||"",inheritColor:isString(S.fill)?modifyAlpha(S.fill,1):"#000"}),setStatesStylesFromModel(g,_),toggleHoverEmphasis(g,null,null,_.get(["emphasis","disabled"])),getECData(g).dataModel=o}),inner$2(p).data=v,p.group.silent=o.get("silent")||a.get("silent")},r.type="markArea",r}(MarkerView);function createList(n,r,a){var o,s,l=["x0","y0","x1","y1"];if(n){var u=map$1(n&&n.dimensions,function(f){var p=r.getData(),v=p.getDimensionInfo(p.mapDimension(f))||{};return extend$2(extend$2({},v),{name:f,ordinalMeta:null})});s=map$1(l,function(f,p){return{name:f,type:u[p%2].type}}),o=new SeriesData(s,a)}else s=[{name:"value",type:"float"}],o=new SeriesData(s,a);var c=map$1(a.get("data"),curry$1(markAreaTransform,r,n,a));n&&(c=filter(c,curry$1(markAreaFilter,n)));var d=n?function(f,p,v,g){var y=f.coord[Math.floor(g/2)][g%2];return parseDataValue(y,s[g])}:function(f,p,v,g){return parseDataValue(f.value,s[g])};return o.initData(c,null,d),o.hasItemOption=!0,o}function install$e(n){n.registerComponentModel(MarkAreaModel),n.registerComponentView(MarkAreaView),n.registerPreprocessor(function(r){checkMarkerInSeries(r.series,"markArea")&&(r.markArea=r.markArea||{})})}var getDefaultSelectorOptions=function(n,r){if(r==="all")return{type:"all",title:n.getLocaleModel().get(["legend","selector","all"])};if(r==="inverse")return{type:"inverse",title:n.getLocaleModel().get(["legend","selector","inverse"])}},LegendModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.layoutMode={type:"box",ignoreSize:!0},a}return r.prototype.init=function(a,o,s){this.mergeDefaultAndTheme(a,s),a.selected=a.selected||{},this._updateSelector(a)},r.prototype.mergeOption=function(a,o){n.prototype.mergeOption.call(this,a,o),this._updateSelector(a)},r.prototype._updateSelector=function(a){var o=a.selector,s=this.ecModel;o===!0&&(o=a.selector=["all","inverse"]),isArray$1(o)&&each$f(o,function(l,u){isString(l)&&(l={type:l}),o[u]=merge(l,getDefaultSelectorOptions(s,l.type))})},r.prototype.optionUpdated=function(){this._updateData(this.ecModel);var a=this._data;if(a[0]&&this.get("selectedMode")==="single"){for(var o=!1,s=0;s<a.length;s++){var l=a[s].get("name");if(this.isSelected(l)){this.select(l),o=!0;break}}!o&&this.select(a[0].get("name"))}},r.prototype._updateData=function(a){var o=[],s=[];a.eachRawSeries(function(d){var f=d.name;s.push(f);var p;if(d.legendVisualProvider){var v=d.legendVisualProvider,g=v.getAllNames();a.isSeriesFiltered(d)||(s=s.concat(g)),g.length?o=o.concat(g):p=!0}else p=!0;p&&isNameSpecified(d)&&o.push(d.name)}),this._availableNames=s;var l=this.get("data")||o,u=createHashMap(),c=map$1(l,function(d){return(isString(d)||isNumber(d))&&(d={name:d}),u.get(d.name)?null:(u.set(d.name,!0),new Model(d,this,this.ecModel))},this);this._data=filter(c,function(d){return!!d})},r.prototype.getData=function(){return this._data},r.prototype.select=function(a){var o=this.option.selected,s=this.get("selectedMode");if(s==="single"){var l=this._data;each$f(l,function(u){o[u.get("name")]=!1})}o[a]=!0},r.prototype.unSelect=function(a){this.get("selectedMode")!=="single"&&(this.option.selected[a]=!1)},r.prototype.toggleSelected=function(a){var o=this.option.selected;o.hasOwnProperty(a)||(o[a]=!0),this[o[a]?"unSelect":"select"](a)},r.prototype.allSelect=function(){var a=this._data,o=this.option.selected;each$f(a,function(s){o[s.get("name",!0)]=!0})},r.prototype.inverseSelect=function(){var a=this._data,o=this.option.selected;each$f(a,function(s){var l=s.get("name",!0);o.hasOwnProperty(l)||(o[l]=!0),o[l]=!o[l]})},r.prototype.isSelected=function(a){var o=this.option.selected;return!(o.hasOwnProperty(a)&&!o[a])&&indexOf(this._availableNames,a)>=0},r.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},r.type="legend.plain",r.dependencies=["series"],r.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",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:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},r}(ComponentModel),curry=curry$1,each$3=each$f,Group$1=Group$3,LegendView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.newlineDisabled=!1,a}return r.prototype.init=function(){this.group.add(this._contentGroup=new Group$1),this.group.add(this._selectorGroup=new Group$1),this._isFirstRender=!0},r.prototype.getContentGroup=function(){return this._contentGroup},r.prototype.getSelectorGroup=function(){return this._selectorGroup},r.prototype.render=function(a,o,s){var l=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!a.get("show",!0)){var u=a.get("align"),c=a.get("orient");(!u||u==="auto")&&(u=a.get("left")==="right"&&c==="vertical"?"right":"left");var d=a.get("selector",!0),f=a.get("selectorPosition",!0);d&&(!f||f==="auto")&&(f=c==="horizontal"?"end":"start"),this.renderInner(u,a,o,s,d,c,f);var p=a.getBoxLayoutParams(),v={width:s.getWidth(),height:s.getHeight()},g=a.get("padding"),y=getLayoutRect(p,v,g),_=this.layoutInner(a,u,y,l,d,f),S=getLayoutRect(defaults$2({width:_.width,height:_.height},p),v,g);this.group.x=S.x-_.x,this.group.y=S.y-_.y,this.group.markRedraw(),this.group.add(this._backgroundEl=makeBackground(_,a))}},r.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},r.prototype.renderInner=function(a,o,s,l,u,c,d){var f=this.getContentGroup(),p=createHashMap(),v=o.get("selectedMode"),g=[];s.eachRawSeries(function(y){!y.get("legendHoverLink")&&g.push(y.id)}),each$3(o.getData(),function(y,_){var S=y.get("name");if(!this.newlineDisabled&&(S===""||S==="\n")){var b=new Group$1;b.newline=!0,f.add(b);return}var x=s.getSeriesByName(S)[0];if(!p.get(S))if(x){var A=x.getData(),w=A.getVisual("legendLineStyle")||{},E=A.getVisual("legendIcon"),D=A.getVisual("style"),C=this._createItem(x,S,_,y,o,a,w,D,E,v,l);C.on("click",curry(dispatchSelectAction,S,null,l,g)).on("mouseover",curry(dispatchHighlightAction,x.name,null,l,g)).on("mouseout",curry(dispatchDownplayAction,x.name,null,l,g)),s.ssr&&C.eachChild(function($){var P=getECData($);P.seriesIndex=x.seriesIndex,P.dataIndex=_,P.ssrType="legend"}),p.set(S,!0)}else s.eachRawSeries(function($){if(!p.get(S)&&$.legendVisualProvider){var P=$.legendVisualProvider;if(!P.containName(S))return;var M=P.indexOfName(S),I=P.getItemVisual(M,"style"),L=P.getItemVisual(M,"legendIcon"),O=parse(I.fill);O&&O[3]===0&&(O[3]=.2,I=extend$2(extend$2({},I),{fill:stringify(O,"rgba")}));var R=this._createItem($,S,_,y,o,a,{},I,L,v,l);R.on("click",curry(dispatchSelectAction,null,S,l,g)).on("mouseover",curry(dispatchHighlightAction,null,S,l,g)).on("mouseout",curry(dispatchDownplayAction,null,S,l,g)),s.ssr&&R.eachChild(function(N){var V=getECData(N);V.seriesIndex=$.seriesIndex,V.dataIndex=_,V.ssrType="legend"}),p.set(S,!0)}},this)},this),u&&this._createSelector(u,o,l,c,d)},r.prototype._createSelector=function(a,o,s,l,u){var c=this.getSelectorGroup();each$3(a,function(f){var p=f.type,v=new ZRText({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){s.dispatchAction({type:p==="all"?"legendAllSelect":"legendInverseSelect",legendId:o.id})}});c.add(v);var g=o.getModel("selectorLabel"),y=o.getModel(["emphasis","selectorLabel"]);setLabelStyle(v,{normal:g,emphasis:y},{defaultText:f.title}),enableHoverEmphasis(v)})},r.prototype._createItem=function(a,o,s,l,u,c,d,f,p,v,g){var y=a.visualDrawType,_=u.get("itemWidth"),S=u.get("itemHeight"),b=u.isSelected(o),x=l.get("symbolRotate"),A=l.get("symbolKeepAspect"),w=l.get("icon");p=w||p||"roundRect";var E=getLegendStyle(p,l,d,f,y,b,g),D=new Group$1,C=l.getModel("textStyle");if(isFunction(a.getLegendIcon)&&(!w||w==="inherit"))D.add(a.getLegendIcon({itemWidth:_,itemHeight:S,icon:p,iconRotate:x,itemStyle:E.itemStyle,lineStyle:E.lineStyle,symbolKeepAspect:A}));else{var $=w==="inherit"&&a.getData().getVisual("symbol")?x==="inherit"?a.getData().getVisual("symbolRotate"):x:0;D.add(getDefaultLegendIcon({itemWidth:_,itemHeight:S,icon:p,iconRotate:$,itemStyle:E.itemStyle,lineStyle:E.lineStyle,symbolKeepAspect:A}))}var P=c==="left"?_+5:-5,M=c,I=u.get("formatter"),L=o;isString(I)&&I?L=I.replace("{name}",o!=null?o:""):isFunction(I)&&(L=I(o));var O=b?C.getTextColor():l.get("inactiveColor");D.add(new ZRText({style:createTextStyle$1(C,{text:L,x:P,y:S/2,fill:O,align:M,verticalAlign:"middle"},{inheritColor:O})}));var R=new Rect$2({shape:D.getBoundingRect(),style:{fill:"transparent"}}),N=l.getModel("tooltip");return N.get("show")&&setTooltipConfig({el:R,componentModel:u,itemName:o,itemTooltipOption:N.option}),D.add(R),D.eachChild(function(V){V.silent=!0}),R.silent=!v,this.getContentGroup().add(D),enableHoverEmphasis(D),D.__legendDataIndex=s,D},r.prototype.layoutInner=function(a,o,s,l,u,c){var d=this.getContentGroup(),f=this.getSelectorGroup();box(a.get("orient"),d,a.get("itemGap"),s.width,s.height);var p=d.getBoundingRect(),v=[-p.x,-p.y];if(f.markRedraw(),d.markRedraw(),u){box("horizontal",f,a.get("selectorItemGap",!0));var g=f.getBoundingRect(),y=[-g.x,-g.y],_=a.get("selectorButtonGap",!0),S=a.getOrient().index,b=S===0?"width":"height",x=S===0?"height":"width",A=S===0?"y":"x";c==="end"?y[S]+=p[b]+_:v[S]+=g[b]+_,y[1-S]+=p[x]/2-g[x]/2,f.x=y[0],f.y=y[1],d.x=v[0],d.y=v[1];var w={x:0,y:0};return w[b]=p[b]+_+g[b],w[x]=Math.max(p[x],g[x]),w[A]=Math.min(0,g[A]+y[1-S]),w}else return d.x=v[0],d.y=v[1],this.group.getBoundingRect()},r.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},r.type="legend.plain",r}(ComponentView);function getLegendStyle(n,r,a,o,s,l,u){function c(b,x){b.lineWidth==="auto"&&(b.lineWidth=x.lineWidth>0?2:0),each$3(b,function(A,w){b[w]==="inherit"&&(b[w]=x[w])})}var d=r.getModel("itemStyle"),f=d.getItemStyle(),p=n.lastIndexOf("empty",0)===0?"fill":"stroke",v=d.getShallow("decal");f.decal=!v||v==="inherit"?o.decal:createOrUpdatePatternFromDecal(v,u),f.fill==="inherit"&&(f.fill=o[s]),f.stroke==="inherit"&&(f.stroke=o[p]),f.opacity==="inherit"&&(f.opacity=(s==="fill"?o:a).opacity),c(f,o);var g=r.getModel("lineStyle"),y=g.getLineStyle();if(c(y,a),f.fill==="auto"&&(f.fill=o.fill),f.stroke==="auto"&&(f.stroke=o.fill),y.stroke==="auto"&&(y.stroke=o.fill),!l){var _=r.get("inactiveBorderWidth"),S=f[p];f.lineWidth=_==="auto"?o.lineWidth>0&&S?2:0:f.lineWidth,f.fill=r.get("inactiveColor"),f.stroke=r.get("inactiveBorderColor"),y.stroke=g.get("inactiveColor"),y.lineWidth=g.get("inactiveWidth")}return{itemStyle:f,lineStyle:y}}function getDefaultLegendIcon(n){var r=n.icon||"roundRect",a=createSymbol$1(r,0,0,n.itemWidth,n.itemHeight,n.itemStyle.fill,n.symbolKeepAspect);return a.setStyle(n.itemStyle),a.rotation=(n.iconRotate||0)*Math.PI/180,a.setOrigin([n.itemWidth/2,n.itemHeight/2]),r.indexOf("empty")>-1&&(a.style.stroke=a.style.fill,a.style.fill="#fff",a.style.lineWidth=2),a}function dispatchSelectAction(n,r,a,o){dispatchDownplayAction(n,r,a,o),a.dispatchAction({type:"legendToggleSelect",name:n!=null?n:r}),dispatchHighlightAction(n,r,a,o)}function isUseHoverLayer(n){for(var r=n.getZr().storage.getDisplayList(),a,o=0,s=r.length;o<s&&!(a=r[o].states.emphasis);)o++;return a&&a.hoverLayer}function dispatchHighlightAction(n,r,a,o){isUseHoverLayer(a)||a.dispatchAction({type:"highlight",seriesName:n,name:r,excludeSeriesId:o})}function dispatchDownplayAction(n,r,a,o){isUseHoverLayer(a)||a.dispatchAction({type:"downplay",seriesName:n,name:r,excludeSeriesId:o})}function legendFilter(n){var r=n.findComponents({mainType:"legend"});r&&r.length&&n.filterSeries(function(a){for(var o=0;o<r.length;o++)if(!r[o].isSelected(a.name))return!1;return!0})}function legendSelectActionHandler(n,r,a){var o=n==="allSelect"||n==="inverseSelect",s={},l=[];a.eachComponent({mainType:"legend",query:r},function(c){o?c[n]():c[n](r.name),makeSelectedMap(c,s),l.push(c.componentIndex)});var u={};return a.eachComponent("legend",function(c){each$f(s,function(d,f){c[d?"select":"unSelect"](f)}),makeSelectedMap(c,u)}),o?{selected:u,legendIndex:l}:{name:r.name,selected:u}}function makeSelectedMap(n,r){var a=r||{};return each$f(n.getData(),function(o){var s=o.get("name");if(!(s==="\n"||s==="")){var l=n.isSelected(s);hasOwn(a,s)?a[s]=a[s]&&l:a[s]=l}}),a}function installLegendAction(n){n.registerAction("legendToggleSelect","legendselectchanged",curry$1(legendSelectActionHandler,"toggleSelected")),n.registerAction("legendAllSelect","legendselectall",curry$1(legendSelectActionHandler,"allSelect")),n.registerAction("legendInverseSelect","legendinverseselect",curry$1(legendSelectActionHandler,"inverseSelect")),n.registerAction("legendSelect","legendselected",curry$1(legendSelectActionHandler,"select")),n.registerAction("legendUnSelect","legendunselected",curry$1(legendSelectActionHandler,"unSelect"))}function install$d(n){n.registerComponentModel(LegendModel),n.registerComponentView(LegendView),n.registerProcessor(n.PRIORITY.PROCESSOR.SERIES_FILTER,legendFilter),n.registerSubTypeDefaulter("legend",function(){return"plain"}),installLegendAction(n)}var ScrollableLegendModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.setScrollDataIndex=function(a){this.option.scrollDataIndex=a},r.prototype.init=function(a,o,s){var l=getLayoutParams(a);n.prototype.init.call(this,a,o,s),mergeAndNormalizeLayoutParams(this,a,l)},r.prototype.mergeOption=function(a,o){n.prototype.mergeOption.call(this,a,o),mergeAndNormalizeLayoutParams(this,this.option,a)},r.type="legend.scroll",r.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:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),r}(LegendModel);function mergeAndNormalizeLayoutParams(n,r,a){var o=n.getOrient(),s=[1,1];s[o.index]=0,mergeLayoutParam(r,a,{type:"box",ignoreSize:!!s})}var Group=Group$3,WH=["width","height"],XY=["x","y"],ScrollableLegendView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.newlineDisabled=!0,a._currentIndex=0,a}return r.prototype.init=function(){n.prototype.init.call(this),this.group.add(this._containerGroup=new Group),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Group)},r.prototype.resetInner=function(){n.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},r.prototype.renderInner=function(a,o,s,l,u,c,d){var f=this;n.prototype.renderInner.call(this,a,o,s,l,u,c,d);var p=this._controllerGroup,v=o.get("pageIconSize",!0),g=isArray$1(v)?v:[v,v];_("pagePrev",0);var y=o.getModel("pageTextStyle");p.add(new ZRText({name:"pageText",style:{text:"xx/xx",fill:y.getTextColor(),font:y.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),_("pageNext",1);function _(S,b){var x=S+"DataIndex",A=createIcon(o.get("pageIcons",!0)[o.getOrient().name][b],{onclick:bind$1(f._pageGo,f,x,o,l)},{x:-g[0]/2,y:-g[1]/2,width:g[0],height:g[1]});A.name=S,p.add(A)}},r.prototype.layoutInner=function(a,o,s,l,u,c){var d=this.getSelectorGroup(),f=a.getOrient().index,p=WH[f],v=XY[f],g=WH[1-f],y=XY[1-f];u&&box("horizontal",d,a.get("selectorItemGap",!0));var _=a.get("selectorButtonGap",!0),S=d.getBoundingRect(),b=[-S.x,-S.y],x=clone$6(s);u&&(x[p]=s[p]-S[p]-_);var A=this._layoutContentAndController(a,l,x,f,p,g,y,v);if(u){if(c==="end")b[f]+=A[p]+_;else{var w=S[p]+_;b[f]-=w,A[v]-=w}A[p]+=S[p]+_,b[1-f]+=A[y]+A[g]/2-S[g]/2,A[g]=Math.max(A[g],S[g]),A[y]=Math.min(A[y],S[y]+b[1-f]),d.x=b[0],d.y=b[1],d.markRedraw()}return A},r.prototype._layoutContentAndController=function(a,o,s,l,u,c,d,f){var p=this.getContentGroup(),v=this._containerGroup,g=this._controllerGroup;box(a.get("orient"),p,a.get("itemGap"),l?s.width:null,l?null:s.height),box("horizontal",g,a.get("pageButtonItemGap",!0));var y=p.getBoundingRect(),_=g.getBoundingRect(),S=this._showController=y[u]>s[u],b=[-y.x,-y.y];o||(b[l]=p[f]);var x=[0,0],A=[-_.x,-_.y],w=retrieve2(a.get("pageButtonGap",!0),a.get("itemGap",!0));if(S){var E=a.get("pageButtonPosition",!0);E==="end"?A[l]+=s[u]-_[u]:x[l]+=_[u]+w}A[1-l]+=y[c]/2-_[c]/2,p.setPosition(b),v.setPosition(x),g.setPosition(A);var D={x:0,y:0};if(D[u]=S?s[u]:y[u],D[c]=Math.max(y[c],_[c]),D[d]=Math.min(0,_[d]+A[1-l]),v.__rectSize=s[u],S){var C={x:0,y:0};C[u]=Math.max(s[u]-_[u]-w,0),C[c]=D[c],v.setClipPath(new Rect$2({shape:C})),v.__rectSize=C[u]}else g.eachChild(function(P){P.attr({invisible:!0,silent:!0})});var $=this._getPageInfo(a);return $.pageIndex!=null&&updateProps$1(p,{x:$.contentPosition[0],y:$.contentPosition[1]},S?a:null),this._updatePageInfoView(a,$),D},r.prototype._pageGo=function(a,o,s){var l=this._getPageInfo(o)[a];l!=null&&s.dispatchAction({type:"legendScroll",scrollDataIndex:l,legendId:o.id})},r.prototype._updatePageInfoView=function(a,o){var s=this._controllerGroup;each$f(["pagePrev","pageNext"],function(p){var v=p+"DataIndex",g=o[v]!=null,y=s.childOfName(p);y&&(y.setStyle("fill",g?a.get("pageIconColor",!0):a.get("pageIconInactiveColor",!0)),y.cursor=g?"pointer":"default")});var l=s.childOfName("pageText"),u=a.get("pageFormatter"),c=o.pageIndex,d=c!=null?c+1:0,f=o.pageCount;l&&u&&l.setStyle("text",isString(u)?u.replace("{current}",d==null?"":d+"").replace("{total}",f==null?"":f+""):u({current:d,total:f}))},r.prototype._getPageInfo=function(a){var o=a.get("scrollDataIndex",!0),s=this.getContentGroup(),l=this._containerGroup.__rectSize,u=a.getOrient().index,c=WH[u],d=XY[u],f=this._findTargetItemIndex(o),p=s.children(),v=p[f],g=p.length,y=g?1:0,_={contentPosition:[s.x,s.y],pageCount:y,pageIndex:y-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!v)return _;var S=E(v);_.contentPosition[u]=-S.s;for(var b=f+1,x=S,A=S,w=null;b<=g;++b)w=E(p[b]),(!w&&A.e>x.s+l||w&&!D(w,x.s))&&(A.i>x.i?x=A:x=w,x&&(_.pageNextDataIndex==null&&(_.pageNextDataIndex=x.i),++_.pageCount)),A=w;for(var b=f-1,x=S,A=S,w=null;b>=-1;--b)w=E(p[b]),(!w||!D(A,w.s))&&x.i<A.i&&(A=x,_.pagePrevDataIndex==null&&(_.pagePrevDataIndex=x.i),++_.pageCount,++_.pageIndex),x=w;return _;function E(C){if(C){var $=C.getBoundingRect(),P=$[d]+C[d];return{s:P,e:P+$[c],i:C.__legendDataIndex}}}function D(C,$){return C.e>=$&&C.s<=$+l}},r.prototype._findTargetItemIndex=function(a){if(!this._showController)return 0;var o,s=this.getContentGroup(),l;return s.eachChild(function(u,c){var d=u.__legendDataIndex;l==null&&d!=null&&(l=c),d===a&&(o=c)}),o!=null?o:l},r.type="legend.scroll",r}(LegendView);function installScrollableLegendAction(n){n.registerAction("legendScroll","legendscroll",function(r,a){var o=r.scrollDataIndex;o!=null&&a.eachComponent({mainType:"legend",subType:"scroll",query:r},function(s){s.setScrollDataIndex(o)})})}function install$c(n){use(install$d),n.registerComponentModel(ScrollableLegendModel),n.registerComponentView(ScrollableLegendView),installScrollableLegendAction(n)}function install$b(n){use(install$d),use(install$c)}var InsideZoomModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="dataZoom.inside",r.defaultOption=inheritDefaultOption(DataZoomModel.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),r}(DataZoomModel),inner$1=makeInner();function setViewInfoToCoordSysRecord(n,r,a){inner$1(n).coordSysRecordMap.each(function(o){var s=o.dataZoomInfoMap.get(r.uid);s&&(s.getRange=a)})}function disposeCoordSysRecordIfNeeded(n,r){for(var a=inner$1(n).coordSysRecordMap,o=a.keys(),s=0;s<o.length;s++){var l=o[s],u=a.get(l),c=u.dataZoomInfoMap;if(c){var d=r.uid,f=c.get(d);f&&(c.removeKey(d),c.keys().length||disposeCoordSysRecord(a,u))}}}function disposeCoordSysRecord(n,r){if(r){n.removeKey(r.model.uid);var a=r.controller;a&&a.dispose()}}function createCoordSysRecord(n,r){var a={model:r,containsPoint:curry$1(containsPoint,r),dispatchAction:curry$1(dispatchAction,n),dataZoomInfoMap:null,controller:null},o=a.controller=new RoamController(n.getZr());return each$f(["pan","zoom","scrollMove"],function(s){o.on(s,function(l){var u=[];a.dataZoomInfoMap.each(function(c){if(l.isAvailableBehavior(c.model.option)){var d=(c.getRange||{})[s],f=d&&d(c.dzReferCoordSysInfo,a.model.mainType,a.controller,l);!c.model.get("disabled",!0)&&f&&u.push({dataZoomId:c.model.id,start:f[0],end:f[1]})}}),u.length&&a.dispatchAction(u)})}),a}function dispatchAction(n,r){n.isDisposed()||n.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:r})}function containsPoint(n,r,a,o){return n.coordinateSystem.containPoint([a,o])}function mergeControllerParams(n){var r,a="type_",o={type_true:2,type_move:1,type_false:0,type_undefined:-1},s=!0;return n.each(function(l){var u=l.model,c=u.get("disabled",!0)?!1:u.get("zoomLock",!0)?"move":!0;o[a+c]>o[a+r]&&(r=c),s=s&&u.get("preventDefaultMouseMove",!0)}),{controlType:r,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!s}}}function installDataZoomRoamProcessor(n){n.registerProcessor(n.PRIORITY.PROCESSOR.FILTER,function(r,a){var o=inner$1(a),s=o.coordSysRecordMap||(o.coordSysRecordMap=createHashMap());s.each(function(l){l.dataZoomInfoMap=null}),r.eachComponent({mainType:"dataZoom",subType:"inside"},function(l){var u=collectReferCoordSysModelInfo(l);each$f(u.infoList,function(c){var d=c.model.uid,f=s.get(d)||s.set(d,createCoordSysRecord(a,c.model)),p=f.dataZoomInfoMap||(f.dataZoomInfoMap=createHashMap());p.set(l.uid,{dzReferCoordSysInfo:c,model:l,getRange:null})})}),s.each(function(l){var u=l.controller,c,d=l.dataZoomInfoMap;if(d){var f=d.keys()[0];f!=null&&(c=d.get(f))}if(!c){disposeCoordSysRecord(s,l);return}var p=mergeControllerParams(d);u.enable(p.controlType,p.opt),u.setPointerChecker(l.containsPoint),createOrUpdate(l,"dispatchAction",c.model.get("throttle",!0),"fixRate")})})}var InsideZoomView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type="dataZoom.inside",a}return r.prototype.render=function(a,o,s){if(n.prototype.render.apply(this,arguments),a.noTarget()){this._clear();return}this.range=a.getPercentRange(),setViewInfoToCoordSysRecord(s,a,{pan:bind$1(getRangeHandlers.pan,this),zoom:bind$1(getRangeHandlers.zoom,this),scrollMove:bind$1(getRangeHandlers.scrollMove,this)})},r.prototype.dispose=function(){this._clear(),n.prototype.dispose.apply(this,arguments)},r.prototype._clear=function(){disposeCoordSysRecordIfNeeded(this.api,this.dataZoomModel),this.range=null},r.type="dataZoom.inside",r}(DataZoomView),getRangeHandlers={zoom:function(n,r,a,o){var s=this.range,l=s.slice(),u=n.axisModels[0];if(u){var c=getDirectionInfo[r](null,[o.originX,o.originY],u,a,n),d=(c.signal>0?c.pixelStart+c.pixelLength-c.pixel:c.pixel-c.pixelStart)/c.pixelLength*(l[1]-l[0])+l[0],f=Math.max(1/o.scale,0);l[0]=(l[0]-d)*f+d,l[1]=(l[1]-d)*f+d;var p=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(sliderMove(0,l,[0,100],0,p.minSpan,p.maxSpan),this.range=l,s[0]!==l[0]||s[1]!==l[1])return l}},pan:makeMover(function(n,r,a,o,s,l){var u=getDirectionInfo[o]([l.oldX,l.oldY],[l.newX,l.newY],r,s,a);return u.signal*(n[1]-n[0])*u.pixel/u.pixelLength}),scrollMove:makeMover(function(n,r,a,o,s,l){var u=getDirectionInfo[o]([0,0],[l.scrollDelta,l.scrollDelta],r,s,a);return u.signal*(n[1]-n[0])*l.scrollDelta})};function makeMover(n){return function(r,a,o,s){var l=this.range,u=l.slice(),c=r.axisModels[0];if(c){var d=n(u,c,r,a,o,s);if(sliderMove(d,u,[0,100],"all"),this.range=u,l[0]!==u[0]||l[1]!==u[1])return u}}}var getDirectionInfo={grid:function(n,r,a,o,s){var l=a.axis,u={},c=s.model.coordinateSystem.getRect();return n=n||[0,0],l.dim==="x"?(u.pixel=r[0]-n[0],u.pixelLength=c.width,u.pixelStart=c.x,u.signal=l.inverse?1:-1):(u.pixel=r[1]-n[1],u.pixelLength=c.height,u.pixelStart=c.y,u.signal=l.inverse?-1:1),u},polar:function(n,r,a,o,s){var l=a.axis,u={},c=s.model.coordinateSystem,d=c.getRadiusAxis().getExtent(),f=c.getAngleAxis().getExtent();return n=n?c.pointToCoord(n):[0,0],r=c.pointToCoord(r),a.mainType==="radiusAxis"?(u.pixel=r[0]-n[0],u.pixelLength=d[1]-d[0],u.pixelStart=d[0],u.signal=l.inverse?1:-1):(u.pixel=r[1]-n[1],u.pixelLength=f[1]-f[0],u.pixelStart=f[0],u.signal=l.inverse?-1:1),u},singleAxis:function(n,r,a,o,s){var l=a.axis,u=s.model.coordinateSystem.getRect(),c={};return n=n||[0,0],l.orient==="horizontal"?(c.pixel=r[0]-n[0],c.pixelLength=u.width,c.pixelStart=u.x,c.signal=l.inverse?1:-1):(c.pixel=r[1]-n[1],c.pixelLength=u.height,c.pixelStart=u.y,c.signal=l.inverse?-1:1),c}};function install$a(n){installCommon$1(n),n.registerComponentModel(InsideZoomModel),n.registerComponentView(InsideZoomView),installDataZoomRoamProcessor(n)}var SliderZoomModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.type="dataZoom.slider",r.layoutMode="box",r.defaultOption=inheritDefaultOption(DataZoomModel.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},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:"#fff",borderColor:"#ACB8D1"},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:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),r}(DataZoomModel),Rect=Rect$2,DEFAULT_LOCATION_EDGE_GAP=7,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(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a._displayables={},a}return r.prototype.init=function(a,o){this.api=o,this._onBrush=bind$1(this._onBrush,this),this._onBrushEnd=bind$1(this._onBrushEnd,this)},r.prototype.render=function(a,o,s,l){if(n.prototype.render.apply(this,arguments),createOrUpdate(this,"_dispatchZoomAction",a.get("throttle"),"fixRate"),this._orient=a.getOrient(),a.get("show")===!1){this.group.removeAll();return}if(a.noTarget()){this._clear(),this.group.removeAll();return}(!l||l.type!=="dataZoom"||l.from!==this.uid)&&this._buildView(),this._updateView()},r.prototype.dispose=function(){this._clear(),n.prototype.dispose.apply(this,arguments)},r.prototype._clear=function(){clear$1(this,"_dispatchZoomAction");var a=this.api.getZr();a.off("mousemove",this._onBrush),a.off("mouseup",this._onBrushEnd)},r.prototype._buildView=function(){var a=this.group;a.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var o=this._displayables.sliderGroup=new Group$3;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),a.add(o),this._positionGroup()},r.prototype._resetLocation=function(){var a=this.dataZoomModel,o=this.api,s=a.get("brushSelect"),l=s?DEFAULT_MOVE_HANDLE_SIZE:0,u=this._findCoordRect(),c={width:o.getWidth(),height:o.getHeight()},d=this._orient===HORIZONTAL?{right:c.width-u.x-u.width,top:c.height-DEFAULT_FILLER_SIZE-DEFAULT_LOCATION_EDGE_GAP-l,width:u.width,height:DEFAULT_FILLER_SIZE}:{right:DEFAULT_LOCATION_EDGE_GAP,top:u.y,width:DEFAULT_FILLER_SIZE,height:u.height},f=getLayoutParams(a.option);each$f(["right","top","width","height"],function(v){f[v]==="ph"&&(f[v]=d[v])});var p=getLayoutRect(f,c);this._location={x:p.x,y:p.y},this._size=[p.width,p.height],this._orient===VERTICAL&&this._size.reverse()},r.prototype._positionGroup=function(){var a=this.group,o=this._location,s=this._orient,l=this.dataZoomModel.getFirstTargetAxisModel(),u=l&&l.get("inverse"),c=this._displayables.sliderGroup,d=(this._dataShadowInfo||{}).otherAxisInverse;c.attr(s===HORIZONTAL&&!u?{scaleY:d?1:-1,scaleX:1}:s===HORIZONTAL&&u?{scaleY:d?1:-1,scaleX:-1}:s===VERTICAL&&!u?{scaleY:d?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:d?-1:1,scaleX:-1,rotation:Math.PI/2});var f=a.getBoundingRect([c]);a.x=o.x-f.x,a.y=o.y-f.y,a.markRedraw()},r.prototype._getViewExtent=function(){return[0,this._size[0]]},r.prototype._renderBackground=function(){var a=this.dataZoomModel,o=this._size,s=this._displayables.sliderGroup,l=a.get("brushSelect");s.add(new Rect({silent:!0,shape:{x:0,y:0,width:o[0],height:o[1]},style:{fill:a.get("backgroundColor")},z2:-40}));var u=new Rect({shape:{x:0,y:0,width:o[0],height:o[1]},style:{fill:"transparent"},z2:0,onclick:bind$1(this._onClickPanel,this)}),c=this.api.getZr();l?(u.on("mousedown",this._onBrushStart,this),u.cursor="crosshair",c.on("mousemove",this._onBrush),c.on("mouseup",this._onBrushEnd)):(c.off("mousemove",this._onBrush),c.off("mouseup",this._onBrushEnd)),s.add(u)},r.prototype._renderDataShadow=function(){var a=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!a)return;var o=this._size,s=this._shadowSize||[],l=a.series,u=l.getRawData(),c=l.getShadowDim&&l.getShadowDim(),d=c&&u.getDimensionInfo(c)?l.getShadowDim():a.otherDim;if(d==null)return;var f=this._shadowPolygonPts,p=this._shadowPolylinePts;if(u!==this._shadowData||d!==this._shadowDim||o[0]!==s[0]||o[1]!==s[1]){var v=u.getDataExtent(d),g=(v[1]-v[0])*.3;v=[v[0]-g,v[1]+g];var y=[0,o[1]],_=[0,o[0]],S=[[o[0],0],[0,0]],b=[],x=_[1]/(u.count()-1),A=0,w=Math.round(u.count()/o[0]),E;u.each([d],function(M,I){if(w>0&&I%w){A+=x;return}var L=M==null||isNaN(M)||M==="",O=L?0:linearMap$2(M,v,y,!0);L&&!E&&I?(S.push([S[S.length-1][0],0]),b.push([b[b.length-1][0],0])):!L&&E&&(S.push([A,0]),b.push([A,0])),S.push([A,O]),b.push([A,O]),A+=x,E=L}),f=this._shadowPolygonPts=S,p=this._shadowPolylinePts=b}this._shadowData=u,this._shadowDim=d,this._shadowSize=[o[0],o[1]];var D=this.dataZoomModel;function C(M){var I=D.getModel(M?"selectedDataBackground":"dataBackground"),L=new Group$3,O=new Polygon({shape:{points:f},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),R=new Polyline$1({shape:{points:p},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return L.add(O),L.add(R),L}for(var $=0;$<3;$++){var P=C($===1);this._displayables.sliderGroup.add(P),this._displayables.dataShadowSegs.push(P)}},r.prototype._prepareDataShadowInfo=function(){var a=this.dataZoomModel,o=a.get("showDataShadow");if(o!==!1){var s,l=this.ecModel;return a.eachTargetAxis(function(u,c){var d=a.getAxisProxy(u,c).getTargetSeriesModels();each$f(d,function(f){if(!s&&!(o!==!0&&indexOf(SHOW_DATA_SHADOW_SERIES_TYPE,f.get("type"))<0)){var p=l.getComponent(getAxisMainType(u),c).axis,v=getOtherDim(u),g,y=f.coordinateSystem;v!=null&&y.getOtherAxis&&(g=y.getOtherAxis(p).inverse),v=f.getData().mapDimension(v),s={thisAxis:p,series:f,thisDim:u,otherDim:v,otherAxisInverse:g}}},this)},this),s}},r.prototype._renderHandle=function(){var a=this.group,o=this._displayables,s=o.handles=[null,null],l=o.handleLabels=[null,null],u=this._displayables.sliderGroup,c=this._size,d=this.dataZoomModel,f=this.api,p=d.get("borderRadius")||0,v=d.get("brushSelect"),g=o.filler=new Rect({silent:v,style:{fill:d.get("fillerColor")},textConfig:{position:"inside"}});u.add(g),u.add(new Rect({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:c[0],height:c[1],r:p},style:{stroke:d.get("dataBackgroundColor")||d.get("borderColor"),lineWidth:DEFAULT_FRAME_BORDER_WIDTH,fill:"rgba(0,0,0,0)"}})),each$f([0,1],function(w){var E=d.get("handleIcon");!symbolBuildProxies[E]&&E.indexOf("path://")<0&&E.indexOf("image://")<0&&(E="path://"+E);var D=createSymbol$1(E,-1,0,2,2,null,!0);D.attr({cursor:getCursor$1(this._orient),draggable:!0,drift:bind$1(this._onDragMove,this,w),ondragend:bind$1(this._onDragEnd,this),onmouseover:bind$1(this._showDataInfo,this,!0),onmouseout:bind$1(this._showDataInfo,this,!1),z2:5});var C=D.getBoundingRect(),$=d.get("handleSize");this._handleHeight=parsePercent($,this._size[1]),this._handleWidth=C.width/C.height*this._handleHeight,D.setStyle(d.getModel("handleStyle").getItemStyle()),D.style.strokeNoScale=!0,D.rectHover=!0,D.ensureState("emphasis").style=d.getModel(["emphasis","handleStyle"]).getItemStyle(),enableHoverEmphasis(D);var P=d.get("handleColor");P!=null&&(D.style.fill=P),u.add(s[w]=D);var M=d.getModel("textStyle"),I=d.get("handleLabel")||{},L=I.show||!1;a.add(l[w]=new ZRText({silent:!0,invisible:!L,style:createTextStyle$1(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var y=g;if(v){var _=parsePercent(d.get("moveHandleSize"),c[1]),S=o.moveHandle=new Rect$2({style:d.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:c[1]-.5,height:_}}),b=_*.8,x=o.moveHandleIcon=createSymbol$1(d.get("moveHandleIcon"),-b/2,-b/2,b,b,"#fff",!0);x.silent=!0,x.y=c[1]+_/2-.5,S.ensureState("emphasis").style=d.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var A=Math.min(c[1]/2,Math.max(_,10));y=o.moveZone=new Rect$2({invisible:!0,shape:{y:c[1]-A,height:_+A}}),y.on("mouseover",function(){f.enterEmphasis(S)}).on("mouseout",function(){f.leaveEmphasis(S)}),u.add(S),u.add(x),u.add(y)}y.attr({draggable:!0,cursor:getCursor$1(this._orient),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)})},r.prototype._resetInterval=function(){var a=this._range=this.dataZoomModel.getPercentRange(),o=this._getViewExtent();this._handleEnds=[linearMap$2(a[0],[0,100],o,!0),linearMap$2(a[1],[0,100],o,!0)]},r.prototype._updateInterval=function(a,o){var s=this.dataZoomModel,l=this._handleEnds,u=this._getViewExtent(),c=s.findRepresentativeAxisProxy().getMinMaxSpan(),d=[0,100];sliderMove(o,l,u,s.get("zoomLock")?"all":a,c.minSpan!=null?linearMap$2(c.minSpan,d,u,!0):null,c.maxSpan!=null?linearMap$2(c.maxSpan,d,u,!0):null);var f=this._range,p=this._range=asc$2([linearMap$2(l[0],u,d,!0),linearMap$2(l[1],u,d,!0)]);return!f||f[0]!==p[0]||f[1]!==p[1]},r.prototype._updateView=function(a){var o=this._displayables,s=this._handleEnds,l=asc$2(s.slice()),u=this._size;each$f([0,1],function(y){var _=o.handles[y],S=this._handleHeight;_.attr({scaleX:S/2,scaleY:S/2,x:s[y]+(y?-1:1),y:u[1]/2-S/2})},this),o.filler.setShape({x:l[0],y:0,width:l[1]-l[0],height:u[1]});var c={x:l[0],width:l[1]-l[0]};o.moveHandle&&(o.moveHandle.setShape(c),o.moveZone.setShape(c),o.moveZone.getBoundingRect(),o.moveHandleIcon&&o.moveHandleIcon.attr("x",c.x+c.width/2));for(var d=o.dataShadowSegs,f=[0,l[0],l[1],u[0]],p=0;p<d.length;p++){var v=d[p],g=v.getClipPath();g||(g=new Rect$2,v.setClipPath(g)),g.setShape({x:f[p],y:0,width:f[p+1]-f[p],height:u[1]})}this._updateDataInfo(a)},r.prototype._updateDataInfo=function(a){var o=this.dataZoomModel,s=this._displayables,l=s.handleLabels,u=this._orient,c=["",""];if(o.get("showDetail")){var d=o.findRepresentativeAxisProxy();if(d){var f=d.getAxisModel().axis,p=this._range,v=a?d.calculateDataWindow({start:p[0],end:p[1]}).valueWindow:d.getDataValueWindow();c=[this._formatLabel(v[0],f),this._formatLabel(v[1],f)]}}var g=asc$2(this._handleEnds.slice());y.call(this,0),y.call(this,1);function y(_){var S=getTransform$1(s.handles[_].parent,this.group),b=transformDirection(_===0?"right":"left",S),x=this._handleWidth/2+LABEL_GAP,A=applyTransform([g[_]+(_===0?-x:x),this._size[1]/2],S);l[_].setStyle({x:A[0],y:A[1],verticalAlign:u===HORIZONTAL?"middle":b,align:u===HORIZONTAL?b:"center",text:c[_]})}},r.prototype._formatLabel=function(a,o){var s=this.dataZoomModel,l=s.get("labelFormatter"),u=s.get("labelPrecision");(u==null||u==="auto")&&(u=o.getPixelPrecision());var c=a==null||isNaN(a)?"":o.type==="category"||o.type==="time"?o.scale.getLabel({value:Math.round(a)}):a.toFixed(Math.min(u,20));return isFunction(l)?l(a,c):isString(l)?l.replace("{value}",c):c},r.prototype._showDataInfo=function(a){var o=this.dataZoomModel.get("handleLabel")||{},s=o.show||!1,l=this.dataZoomModel.getModel(["emphasis","handleLabel"]),u=l.get("show")||!1,c=a||this._dragging?u:s,d=this._displayables,f=d.handleLabels;f[0].attr("invisible",!c),f[1].attr("invisible",!c),d.moveHandle&&this.api[c?"enterEmphasis":"leaveEmphasis"](d.moveHandle,1)},r.prototype._onDragMove=function(a,o,s,l){this._dragging=!0,stop(l.event);var u=this._displayables.sliderGroup.getLocalTransform(),c=applyTransform([o,s],u,!0),d=this._updateInterval(a,c[0]),f=this.dataZoomModel.get("realtime");this._updateView(!f),d&&f&&this._dispatchZoomAction(!0)},r.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var a=this.dataZoomModel.get("realtime");!a&&this._dispatchZoomAction(!1)},r.prototype._onClickPanel=function(a){var o=this._size,s=this._displayables.sliderGroup.transformCoordToLocal(a.offsetX,a.offsetY);if(!(s[0]<0||s[0]>o[0]||s[1]<0||s[1]>o[1])){var l=this._handleEnds,u=(l[0]+l[1])/2,c=this._updateInterval("all",s[0]-u);this._updateView(),c&&this._dispatchZoomAction(!1)}},r.prototype._onBrushStart=function(a){var o=a.offsetX,s=a.offsetY;this._brushStart=new Point(o,s),this._brushing=!0,this._brushStartTime=+new Date},r.prototype._onBrushEnd=function(a){if(this._brushing){var o=this._displayables.brushRect;if(this._brushing=!1,!!o){o.attr("ignore",!0);var s=o.shape,l=+new Date;if(!(l-this._brushStartTime<200&&Math.abs(s.width)<5)){var u=this._getViewExtent(),c=[0,100];this._range=asc$2([linearMap$2(s.x,u,c,!0),linearMap$2(s.x+s.width,u,c,!0)]),this._handleEnds=[s.x,s.x+s.width],this._updateView(),this._dispatchZoomAction(!1)}}}},r.prototype._onBrush=function(a){this._brushing&&(stop(a.event),this._updateBrushRect(a.offsetX,a.offsetY))},r.prototype._updateBrushRect=function(a,o){var s=this._displayables,l=this.dataZoomModel,u=s.brushRect;u||(u=s.brushRect=new Rect({silent:!0,style:l.getModel("brushStyle").getItemStyle()}),s.sliderGroup.add(u)),u.attr("ignore",!1);var c=this._brushStart,d=this._displayables.sliderGroup,f=d.transformCoordToLocal(a,o),p=d.transformCoordToLocal(c.x,c.y),v=this._size;f[0]=Math.max(Math.min(v[0],f[0]),0),u.setShape({x:p[0],y:0,width:f[0]-p[0],height:v[1]})},r.prototype._dispatchZoomAction=function(a){var o=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:a?REALTIME_ANIMATION_CONFIG:null,start:o[0],end:o[1]})},r.prototype._findCoordRect=function(){var a,o=collectReferCoordSysModelInfo(this.dataZoomModel).infoList;if(!a&&o.length){var s=o[0].model.coordinateSystem;a=s.getRect&&s.getRect()}if(!a){var l=this.api.getWidth(),u=this.api.getHeight();a={x:l*.2,y:u*.2,width:l*.6,height:u*.6}}return a},r.type="dataZoom.slider",r}(DataZoomView);function getOtherDim(n){var r={x:"y",y:"x",radius:"angle",angle:"radius"};return r[n]}function getCursor$1(n){return n==="vertical"?"ns-resize":"ew-resize"}function install$9(n){n.registerComponentModel(SliderZoomModel),n.registerComponentView(SliderZoomView),installCommon$1(n)}function install$8(n){use(install$a),use(install$9)}var visualDefault={get:function(n,r,a){var o=clone$6((defaultOption[n]||{})[r]);return a&&isArray$1(o)?o[o.length-1]:o}},defaultOption={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},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(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.stateList=["inRange","outOfRange"],a.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],a.layoutMode={type:"box",ignoreSize:!0},a.dataBound=[-1/0,1/0],a.targetVisuals={},a.controllerVisuals={},a}return r.prototype.init=function(a,o,s){this.mergeDefaultAndTheme(a,s)},r.prototype.optionUpdated=function(a,o){var s=this.option;!o&&replaceVisualOption(s,a,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},r.prototype.resetVisual=function(a){var o=this.stateList;a=bind$1(a,this),this.controllerVisuals=createVisualMappings(this.option.controller,o,a),this.targetVisuals=createVisualMappings(this.option.target,o,a)},r.prototype.getItemSymbol=function(){return null},r.prototype.getTargetSeriesIndices=function(){var a=this.option.seriesIndex,o=[];return a==null||a==="all"?this.ecModel.eachSeries(function(s,l){o.push(l)}):o=normalizeToArray(a),o},r.prototype.eachTargetSeries=function(a,o){each$f(this.getTargetSeriesIndices(),function(s){var l=this.ecModel.getSeriesByIndex(s);l&&a.call(o,l)},this)},r.prototype.isTargetSeries=function(a){var o=!1;return this.eachTargetSeries(function(s){s===a&&(o=!0)}),o},r.prototype.formatValueText=function(a,o,s){var l=this.option,u=l.precision,c=this.dataBound,d=l.formatter,f;s=s||["<",">"],isArray$1(a)&&(a=a.slice(),f=!0);var p=o?a:f?[v(a[0]),v(a[1])]:v(a);if(isString(d))return d.replace("{value}",f?p[0]:p).replace("{value2}",f?p[1]:p);if(isFunction(d))return f?d(a[0],a[1]):d(a);if(f)return a[0]===c[0]?s[0]+" "+p[1]:a[1]===c[1]?s[1]+" "+p[0]:p[0]+" - "+p[1];return p;function v(g){return g===c[0]?"min":g===c[1]?"max":(+g).toFixed(Math.min(u,20))}},r.prototype.resetExtent=function(){var a=this.option,o=asc([a.min,a.max]);this._dataExtent=o},r.prototype.getDataDimensionIndex=function(a){var o=this.option.dimension;if(o!=null)return a.getDimensionIndex(o);for(var s=a.dimensions,l=s.length-1;l>=0;l--){var u=s[l],c=a.getDimensionInfo(u);if(!c.isCalculationCoord)return c.storeDimIndex}},r.prototype.getExtent=function(){return this._dataExtent.slice()},r.prototype.completeVisualOption=function(){var a=this.ecModel,o=this.option,s={inRange:o.inRange,outOfRange:o.outOfRange},l=o.target||(o.target={}),u=o.controller||(o.controller={});merge(l,s),merge(u,s);var c=this.isCategory();d.call(this,l),d.call(this,u),f.call(this,l,"inRange","outOfRange"),p.call(this,u);function d(v){isArray(o.color)&&!v.inRange&&(v.inRange={color:o.color.slice().reverse()}),v.inRange=v.inRange||{color:a.get("gradientColor")}}function f(v,g,y){var _=v[g],S=v[y];_&&!S&&(S=v[y]={},each$2(_,function(b,x){if(VisualMapping.isValidType(x)){var A=visualDefault.get(x,"inactive",c);A!=null&&(S[x]=A,x==="color"&&!S.hasOwnProperty("opacity")&&!S.hasOwnProperty("colorAlpha")&&(S.opacity=[0,0]))}}))}function p(v){var g=(v.inRange||{}).symbol||(v.outOfRange||{}).symbol,y=(v.inRange||{}).symbolSize||(v.outOfRange||{}).symbolSize,_=this.get("inactiveColor"),S=this.getItemSymbol(),b=S||"roundRect";each$2(this.stateList,function(x){var A=this.itemSize,w=v[x];w||(w=v[x]={color:c?_:[_]}),w.symbol==null&&(w.symbol=g&&clone$6(g)||(c?b:[b])),w.symbolSize==null&&(w.symbolSize=y&&clone$6(y)||(c?A[0]:[A[0],A[0]])),w.symbol=mapVisual(w.symbol,function(C){return C==="none"?b:C});var E=w.symbolSize;if(E!=null){var D=-1/0;eachVisual(E,function(C){C>D&&(D=C)}),w.symbolSize=mapVisual(E,function(C){return linearMap$1(C,[0,D],[0,A[0]],!0)})}},this)}},r.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},r.prototype.isCategory=function(){return!!this.option.categories},r.prototype.setSelected=function(a){},r.prototype.getSelected=function(){return null},r.prototype.getValueState=function(a){return null},r.prototype.getVisualMeta=function(a){return null},r.type="visualMap",r.dependencies=["series"],r.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},r}(ComponentModel),DEFAULT_BAR_BOUND=[20,140],ContinuousModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.optionUpdated=function(a,o){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(s){s.mappingMethod="linear",s.dataExtent=this.getExtent()}),this._resetRange()},r.prototype.resetItemSize=function(){n.prototype.resetItemSize.apply(this,arguments);var a=this.itemSize;(a[0]==null||isNaN(a[0]))&&(a[0]=DEFAULT_BAR_BOUND[0]),(a[1]==null||isNaN(a[1]))&&(a[1]=DEFAULT_BAR_BOUND[1])},r.prototype._resetRange=function(){var a=this.getExtent(),o=this.option.range;!o||o.auto?(a.auto=1,this.option.range=a):isArray$1(o)&&(o[0]>o[1]&&o.reverse(),o[0]=Math.max(o[0],a[0]),o[1]=Math.min(o[1],a[1]))},r.prototype.completeVisualOption=function(){n.prototype.completeVisualOption.apply(this,arguments),each$f(this.stateList,function(a){var o=this.option.controller[a].symbolSize;o&&o[0]!==o[1]&&(o[0]=o[1]/3)},this)},r.prototype.setSelected=function(a){this.option.range=a.slice(),this._resetRange()},r.prototype.getSelected=function(){var a=this.getExtent(),o=asc$2((this.get("range")||[]).slice());return o[0]>a[1]&&(o[0]=a[1]),o[1]>a[1]&&(o[1]=a[1]),o[0]<a[0]&&(o[0]=a[0]),o[1]<a[0]&&(o[1]=a[0]),o},r.prototype.getValueState=function(a){var o=this.option.range,s=this.getExtent();return(o[0]<=s[0]||o[0]<=a)&&(o[1]>=s[1]||a<=o[1])?"inRange":"outOfRange"},r.prototype.findTargetDataIndices=function(a){var o=[];return this.eachTargetSeries(function(s){var l=[],u=s.getData();u.each(this.getDataDimensionIndex(u),function(c,d){a[0]<=c&&c<=a[1]&&l.push(d)},this),o.push({seriesId:s.id,dataIndex:l})},this),o},r.prototype.getVisualMeta=function(a){var o=getColorStopValues(this,"outOfRange",this.getExtent()),s=getColorStopValues(this,"inRange",this.option.range.slice()),l=[];function u(y,_){l.push({value:y,color:a(y,_)})}for(var c=0,d=0,f=s.length,p=o.length;d<p&&(!s.length||o[d]<=s[0]);d++)o[d]<s[c]&&u(o[d],"outOfRange");for(var v=1;c<f;c++,v=0)v&&l.length&&u(s[c],"outOfRange"),u(s[c],"inRange");for(var v=1;d<p;d++)(!s.length||s[s.length-1]<o[d])&&(v&&(l.length&&u(l[l.length-1].value,"outOfRange"),v=0),u(o[d],"outOfRange"));var g=l.length;return{stops:l,outerColors:[g?l[0].color:"transparent",g?l[g-1].color:"transparent"]}},r.type="visualMap.continuous",r.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:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),r}(VisualMapModel);function getColorStopValues(n,r,a){if(a[0]===a[1])return a.slice();for(var o=200,s=(a[1]-a[0])/o,l=a[0],u=[],c=0;c<=o&&l<a[1];c++)u.push(l),l+=s;return u.push(a[1]),u}var VisualMapView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a.autoPositionValues={left:1,right:1,top:1,bottom:1},a}return r.prototype.init=function(a,o){this.ecModel=a,this.api=o},r.prototype.render=function(a,o,s,l){if(this.visualMapModel=a,a.get("show")===!1){this.group.removeAll();return}this.doRender(a,o,s,l)},r.prototype.renderBackground=function(a){var o=this.visualMapModel,s=normalizeCssArray(o.get("padding")||0),l=a.getBoundingRect();a.add(new Rect$2({z2:-1,silent:!0,shape:{x:l.x-s[3],y:l.y-s[0],width:l.width+s[3]+s[1],height:l.height+s[0]+s[2]},style:{fill:o.get("backgroundColor"),stroke:o.get("borderColor"),lineWidth:o.get("borderWidth")}}))},r.prototype.getControllerVisual=function(a,o,s){s=s||{};var l=s.forceState,u=this.visualMapModel,c={};if(o==="color"){var d=u.get("contentColor");c.color=d}function f(y){return c[y]}function p(y,_){c[y]=_}var v=u.controllerVisuals[l||u.getValueState(a)],g=VisualMapping.prepareVisualTypes(v);return each$f(g,function(y){var _=v[y];s.convertOpacityToAlpha&&y==="opacity"&&(y="colorAlpha",_=v.__alphaForOpacity),VisualMapping.dependsOn(y,o)&&_&&_.applyVisual(a,f,p)}),c[o]},r.prototype.positionGroup=function(a){var o=this.visualMapModel,s=this.api;positionElement(a,o.getBoxLayoutParams(),{width:s.getWidth(),height:s.getHeight()})},r.prototype.doRender=function(a,o,s,l){},r.type="visualMap",r}(ComponentView),paramsSet=[["left","right","width"],["top","bottom","height"]];function getItemAlign(n,r,a){var o=n.option,s=o.align;if(s!=null&&s!=="auto")return s;for(var l={width:r.getWidth(),height:r.getHeight()},u=o.orient==="horizontal"?1:0,c=paramsSet[u],d=[0,null,10],f={},p=0;p<3;p++)f[paramsSet[1-u][p]]=d[p],f[c[p]]=p===2?a[0]:o[c[p]];var v=[["x","width",3],["y","height",0]][u],g=getLayoutRect(f,l,o.padding);return c[(g.margin[v[2]]||0)+g[v[0]]+g[v[1]]*.5<l[v[1]]*.5?0:1]}function makeHighDownBatch(n,r){return each$f(n||[],function(a){a.dataIndex!=null&&(a.dataIndexInside=a.dataIndex,a.dataIndex=null),a.highlightKey="visualMap"+(r?r.componentIndex:"")}),n}var linearMap=linearMap$2,each$1=each$f,mathMin=Math.min,mathMax=Math.max,HOVER_LINK_SIZE=12,HOVER_LINK_OUT=6,ContinuousView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a._shapes={},a._dataInterval=[],a._handleEnds=[],a._hoverLinkDataIndices=[],a}return r.prototype.init=function(a,o){n.prototype.init.call(this,a,o),this._hoverLinkFromSeriesMouseOver=bind$1(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=bind$1(this._hideIndicator,this)},r.prototype.doRender=function(a,o,s,l){(!l||l.type!=="selectDataRange"||l.from!==this.uid)&&this._buildView()},r.prototype._buildView=function(){this.group.removeAll();var a=this.visualMapModel,o=this.group;this._orient=a.get("orient"),this._useHandle=a.get("calculable"),this._resetInterval(),this._renderBar(o);var s=a.get("text");this._renderEndsText(o,s,0),this._renderEndsText(o,s,1),this._updateView(!0),this.renderBackground(o),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(o)},r.prototype._renderEndsText=function(a,o,s){if(o){var l=o[1-s];l=l!=null?l+"":"";var u=this.visualMapModel,c=u.get("textGap"),d=u.itemSize,f=this._shapes.mainGroup,p=this._applyTransform([d[0]/2,s===0?-c:d[1]+c],f),v=this._applyTransform(s===0?"bottom":"top",f),g=this._orient,y=this.visualMapModel.textStyleModel;this.group.add(new ZRText({style:createTextStyle$1(y,{x:p[0],y:p[1],verticalAlign:g==="horizontal"?"middle":v,align:g==="horizontal"?v:"center",text:l})}))}},r.prototype._renderBar=function(a){var o=this.visualMapModel,s=this._shapes,l=o.itemSize,u=this._orient,c=this._useHandle,d=getItemAlign(o,this.api,l),f=s.mainGroup=this._createBarGroup(d),p=new Group$3;f.add(p),p.add(s.outOfRange=createPolygon()),p.add(s.inRange=createPolygon(null,c?getCursor(this._orient):null,bind$1(this._dragHandle,this,"all",!1),bind$1(this._dragHandle,this,"all",!0))),p.setClipPath(new Rect$2({shape:{x:0,y:0,width:l[0],height:l[1],r:3}}));var v=o.textStyleModel.getTextRect("国"),g=mathMax(v.width,v.height);c&&(s.handleThumbs=[],s.handleLabels=[],s.handleLabelPoints=[],this._createHandle(o,f,0,l,g,u),this._createHandle(o,f,1,l,g,u)),this._createIndicator(o,f,l,g,u),a.add(f)},r.prototype._createHandle=function(a,o,s,l,u,c){var d=bind$1(this._dragHandle,this,s,!1),f=bind$1(this._dragHandle,this,s,!0),p=parsePercent$1(a.get("handleSize"),l[0]),v=createSymbol$1(a.get("handleIcon"),-p/2,-p/2,p,p,null,!0),g=getCursor(this._orient);v.attr({cursor:g,draggable:!0,drift:d,ondragend:f,onmousemove:function(x){stop(x.event)}}),v.x=l[0]/2,v.useStyle(a.getModel("handleStyle").getItemStyle()),v.setStyle({strokeNoScale:!0,strokeFirst:!0}),v.style.lineWidth*=2,v.ensureState("emphasis").style=a.getModel(["emphasis","handleStyle"]).getItemStyle(),setAsHighDownDispatcher(v,!0),o.add(v);var y=this.visualMapModel.textStyleModel,_=new ZRText({cursor:g,draggable:!0,drift:d,onmousemove:function(x){stop(x.event)},ondragend:f,style:createTextStyle$1(y,{x:0,y:0,text:""})});_.ensureState("blur").style={opacity:.1},_.stateTransition={duration:200},this.group.add(_);var S=[p,0],b=this._shapes;b.handleThumbs[s]=v,b.handleLabelPoints[s]=S,b.handleLabels[s]=_},r.prototype._createIndicator=function(a,o,s,l,u){var c=parsePercent$1(a.get("indicatorSize"),s[0]),d=createSymbol$1(a.get("indicatorIcon"),-c/2,-c/2,c,c,null,!0);d.attr({cursor:"move",invisible:!0,silent:!0,x:s[0]/2});var f=a.getModel("indicatorStyle").getItemStyle();if(d instanceof ZRImage){var p=d.style;d.useStyle(extend$2({image:p.image,x:p.x,y:p.y,width:p.width,height:p.height},f))}else d.useStyle(f);o.add(d);var v=this.visualMapModel.textStyleModel,g=new ZRText({silent:!0,invisible:!0,style:createTextStyle$1(v,{x:0,y:0,text:""})});this.group.add(g);var y=[(u==="horizontal"?l/2:HOVER_LINK_OUT)+s[0]/2,0],_=this._shapes;_.indicator=d,_.indicatorLabel=g,_.indicatorLabelPoint=y,this._firstShowIndicator=!0},r.prototype._dragHandle=function(a,o,s,l){if(this._useHandle){if(this._dragging=!o,!o){var u=this._applyTransform([s,l],this._shapes.mainGroup,!0);this._updateInterval(a,u[1]),this._hideIndicator(),this._updateView()}o===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),o?!this._hovering&&this._clearHoverLinkToSeries():useHoverLinkOnHandle(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[a],!1)}},r.prototype._resetInterval=function(){var a=this.visualMapModel,o=this._dataInterval=a.getSelected(),s=a.getExtent(),l=[0,a.itemSize[1]];this._handleEnds=[linearMap(o[0],s,l,!0),linearMap(o[1],s,l,!0)]},r.prototype._updateInterval=function(a,o){o=o||0;var s=this.visualMapModel,l=this._handleEnds,u=[0,s.itemSize[1]];sliderMove(o,l,u,a,0);var c=s.getExtent();this._dataInterval=[linearMap(l[0],u,c,!0),linearMap(l[1],u,c,!0)]},r.prototype._updateView=function(a){var o=this.visualMapModel,s=o.getExtent(),l=this._shapes,u=[0,o.itemSize[1]],c=a?u:this._handleEnds,d=this._createBarVisual(this._dataInterval,s,c,"inRange"),f=this._createBarVisual(s,s,u,"outOfRange");l.inRange.setStyle({fill:d.barColor}).setShape("points",d.barPoints),l.outOfRange.setStyle({fill:f.barColor}).setShape("points",f.barPoints),this._updateHandle(c,d)},r.prototype._createBarVisual=function(a,o,s,l){var u={forceState:l,convertOpacityToAlpha:!0},c=this._makeColorGradient(a,u),d=[this.getControllerVisual(a[0],"symbolSize",u),this.getControllerVisual(a[1],"symbolSize",u)],f=this._createBarPoints(s,d);return{barColor:new LinearGradient(0,0,0,1,c),barPoints:f,handlesColor:[c[0].color,c[c.length-1].color]}},r.prototype._makeColorGradient=function(a,o){var s=100,l=[],u=(a[1]-a[0])/s;l.push({color:this.getControllerVisual(a[0],"color",o),offset:0});for(var c=1;c<s;c++){var d=a[0]+u*c;if(d>a[1])break;l.push({color:this.getControllerVisual(d,"color",o),offset:c/s})}return l.push({color:this.getControllerVisual(a[1],"color",o),offset:1}),l},r.prototype._createBarPoints=function(a,o){var s=this.visualMapModel.itemSize;return[[s[0]-o[0],a[0]],[s[0],a[0]],[s[0],a[1]],[s[0]-o[1],a[1]]]},r.prototype._createBarGroup=function(a){var o=this._orient,s=this.visualMapModel.get("inverse");return new Group$3(o==="horizontal"&&!s?{scaleX:a==="bottom"?1:-1,rotation:Math.PI/2}:o==="horizontal"&&s?{scaleX:a==="bottom"?-1:1,rotation:-Math.PI/2}:o==="vertical"&&!s?{scaleX:a==="left"?1:-1,scaleY:-1}:{scaleX:a==="left"?1:-1})},r.prototype._updateHandle=function(a,o){if(this._useHandle){var s=this._shapes,l=this.visualMapModel,u=s.handleThumbs,c=s.handleLabels,d=l.itemSize,f=l.getExtent(),p=this._applyTransform("left",s.mainGroup);each$1([0,1],function(v){var g=u[v];g.setStyle("fill",o.handlesColor[v]),g.y=a[v];var y=linearMap(a[v],[0,d[1]],f,!0),_=this.getControllerVisual(y,"symbolSize");g.scaleX=g.scaleY=_/d[0],g.x=d[0]-_/2;var S=applyTransform(s.handleLabelPoints[v],getTransform$1(g,this.group));if(this._orient==="horizontal"){var b=p==="left"||p==="top"?(d[0]-_)/2:(d[0]-_)/-2;S[1]+=b}c[v].setStyle({x:S[0],y:S[1],text:l.formatValueText(this._dataInterval[v]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",s.mainGroup):"center"})},this)}},r.prototype._showIndicator=function(a,o,s,l){var u=this.visualMapModel,c=u.getExtent(),d=u.itemSize,f=[0,d[1]],p=this._shapes,v=p.indicator;if(v){v.attr("invisible",!1);var g={convertOpacityToAlpha:!0},y=this.getControllerVisual(a,"color",g),_=this.getControllerVisual(a,"symbolSize"),S=linearMap(a,c,f,!0),b=d[0]-_/2,x={x:v.x,y:v.y};v.y=S,v.x=b;var A=applyTransform(p.indicatorLabelPoint,getTransform$1(v,this.group)),w=p.indicatorLabel;w.attr("invisible",!1);var E=this._applyTransform("left",p.mainGroup),D=this._orient,C=D==="horizontal";w.setStyle({text:(s||"")+u.formatValueText(o),verticalAlign:C?E:"middle",align:C?"center":E});var $={x:b,y:S,style:{fill:y}},P={style:{x:A[0],y:A[1]}};if(u.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var M={duration:100,easing:"cubicInOut",additive:!0};v.x=x.x,v.y=x.y,v.animateTo($,M),w.animateTo(P,M)}else v.attr($),w.attr(P);this._firstShowIndicator=!1;var I=this._shapes.handleLabels;if(I)for(var L=0;L<I.length;L++)this.api.enterBlur(I[L])}},r.prototype._enableHoverLinkToSeries=function(){var a=this;this._shapes.mainGroup.on("mousemove",function(o){if(a._hovering=!0,!a._dragging){var s=a.visualMapModel.itemSize,l=a._applyTransform([o.offsetX,o.offsetY],a._shapes.mainGroup,!0,!0);l[1]=mathMin(mathMax(0,l[1]),s[1]),a._doHoverLinkToSeries(l[1],0<=l[0]&&l[0]<=s[0])}}).on("mouseout",function(){a._hovering=!1,!a._dragging&&a._clearHoverLinkToSeries()})},r.prototype._enableHoverLinkFromSeries=function(){var a=this.api.getZr();this.visualMapModel.option.hoverLink?(a.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),a.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},r.prototype._doHoverLinkToSeries=function(a,o){var s=this.visualMapModel,l=s.itemSize;if(s.option.hoverLink){var u=[0,l[1]],c=s.getExtent();a=mathMin(mathMax(u[0],a),u[1]);var d=getHalfHoverLinkSize(s,c,u),f=[a-d,a+d],p=linearMap(a,u,c,!0),v=[linearMap(f[0],u,c,!0),linearMap(f[1],u,c,!0)];f[0]<u[0]&&(v[0]=-1/0),f[1]>u[1]&&(v[1]=1/0),o&&(v[0]===-1/0?this._showIndicator(p,v[1],"< ",d):v[1]===1/0?this._showIndicator(p,v[0],"> ",d):this._showIndicator(p,p,"≈ ",d));var g=this._hoverLinkDataIndices,y=[];(o||useHoverLinkOnHandle(s))&&(y=this._hoverLinkDataIndices=s.findTargetDataIndices(v));var _=compressBatches(g,y);this._dispatchHighDown("downplay",makeHighDownBatch(_[0],s)),this._dispatchHighDown("highlight",makeHighDownBatch(_[1],s))}},r.prototype._hoverLinkFromSeriesMouseOver=function(a){var o;if(findEventDispatcher(a.target,function(d){var f=getECData(d);if(f.dataIndex!=null)return o=f,!0},!0),!!o){var s=this.ecModel.getSeriesByIndex(o.seriesIndex),l=this.visualMapModel;if(l.isTargetSeries(s)){var u=s.getData(o.dataType),c=u.getStore().get(l.getDataDimensionIndex(u),o.dataIndex);isNaN(c)||this._showIndicator(c,c)}}},r.prototype._hideIndicator=function(){var a=this._shapes;a.indicator&&a.indicator.attr("invisible",!0),a.indicatorLabel&&a.indicatorLabel.attr("invisible",!0);var o=this._shapes.handleLabels;if(o)for(var s=0;s<o.length;s++)this.api.leaveBlur(o[s])},r.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var a=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",makeHighDownBatch(a,this.visualMapModel)),a.length=0},r.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var a=this.api.getZr();a.off("mouseover",this._hoverLinkFromSeriesMouseOver),a.off("mouseout",this._hideIndicator)},r.prototype._applyTransform=function(a,o,s,l){var u=getTransform$1(o,l?null:this.group);return isArray$1(a)?applyTransform(a,u,s):transformDirection(a,u,s)},r.prototype._dispatchHighDown=function(a,o){o&&o.length&&this.api.dispatchAction({type:a,batch:o})},r.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},r.type="visualMap.continuous",r}(VisualMapView);function createPolygon(n,r,a,o){return new Polygon({shape:{points:n},draggable:!!a,cursor:r,drift:a,onmousemove:function(s){stop(s.event)},ondragend:o})}function getHalfHoverLinkSize(n,r,a){var o=HOVER_LINK_SIZE/2,s=n.get("hoverLinkDataSize");return s&&(o=linearMap(s,r,a,!0)/2),o}function useHoverLinkOnHandle(n){var r=n.get("hoverLinkOnHandle");return!!(r==null?n.get("realtime"):r)}function getCursor(n){return n==="vertical"?"ns-resize":"ew-resize"}var visualMapActionInfo={type:"selectDataRange",event:"dataRangeSelected",update:"update"},visualMapActionHander=function(n,r){r.eachComponent({mainType:"visualMap",query:n},function(a){a.setSelected(n.selected)})},visualMapEncodingHandlers=[{createOnAllSeries:!0,reset:function(n,r){var a=[];return r.eachComponent("visualMap",function(o){var s=n.pipelineContext;!o.isTargetSeries(n)||s&&s.large||a.push(incrementalApplyVisual(o.stateList,o.targetVisuals,bind$1(o.getValueState,o),o.getDataDimensionIndex(n.getData())))}),a}},{createOnAllSeries:!0,reset:function(n,r){var a=n.getData(),o=[];r.eachComponent("visualMap",function(s){if(s.isTargetSeries(n)){var l=s.getVisualMeta(bind$1(getColorVisual,null,n,s))||{stops:[],outerColors:[]},u=s.getDataDimensionIndex(a);u>=0&&(l.dimension=u,o.push(l))}}),n.getData().setVisual("visualMeta",o)}}];function getColorVisual(n,r,a,o){for(var s=r.targetVisuals[o],l=VisualMapping.prepareVisualTypes(s),u={color:getVisualFromData(n.getData(),"color")},c=0,d=l.length;c<d;c++){var f=l[c],p=s[f==="opacity"?"__alphaForOpacity":f];p&&p.applyVisual(a,v,g)}return u.color;function v(y){return u[y]}function g(y,_){u[y]=_}}var each=each$f;function visualMapPreprocessor(n){var r=n&&n.visualMap;isArray$1(r)||(r=r?[r]:[]),each(r,function(a){if(a){has(a,"splitList")&&!has(a,"pieces")&&(a.pieces=a.splitList,delete a.splitList);var o=a.pieces;o&&isArray$1(o)&&each(o,function(s){isObject$3(s)&&(has(s,"start")&&!has(s,"min")&&(s.min=s.start),has(s,"end")&&!has(s,"max")&&(s.max=s.end))})}})}function has(n,r){return n&&n.hasOwnProperty&&n.hasOwnProperty(r)}var installed=!1;function installCommon(n){installed||(installed=!0,n.registerSubTypeDefaulter("visualMap",function(r){return!r.categories&&(!(r.pieces?r.pieces.length>0:r.splitNumber>0)||r.calculable)?"continuous":"piecewise"}),n.registerAction(visualMapActionInfo,visualMapActionHander),each$f(visualMapEncodingHandlers,function(r){n.registerVisual(n.PRIORITY.VISUAL.COMPONENT,r)}),n.registerPreprocessor(visualMapPreprocessor))}function install$7(n){n.registerComponentModel(ContinuousModel),n.registerComponentView(ContinuousView),installCommon(n)}var PiecewiseModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a._pieceList=[],a}return r.prototype.optionUpdated=function(a,o){n.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var s=this._mode=this._determineMode();this._pieceList=[],resetMethods[this._mode].call(this,this._pieceList),this._resetSelected(a,o);var l=this.option.categories;this.resetVisual(function(u,c){s==="categories"?(u.mappingMethod="category",u.categories=clone$6(l)):(u.dataExtent=this.getExtent(),u.mappingMethod="piecewise",u.pieceList=map$1(this._pieceList,function(d){return d=clone$6(d),c!=="inRange"&&(d.visual=null),d}))})},r.prototype.completeVisualOption=function(){var a=this.option,o={},s=VisualMapping.listVisualTypes(),l=this.isCategory();each$f(a.pieces,function(c){each$f(s,function(d){c.hasOwnProperty(d)&&(o[d]=1)})}),each$f(o,function(c,d){var f=!1;each$f(this.stateList,function(p){f=f||u(a,p,d)||u(a.target,p,d)},this),!f&&each$f(this.stateList,function(p){(a[p]||(a[p]={}))[d]=visualDefault.get(d,p==="inRange"?"active":"inactive",l)})},this);function u(c,d,f){return c&&c[d]&&c[d].hasOwnProperty(f)}n.prototype.completeVisualOption.apply(this,arguments)},r.prototype._resetSelected=function(a,o){var s=this.option,l=this._pieceList,u=(o?s:a).selected||{};if(s.selected=u,each$f(l,function(d,f){var p=this.getSelectedMapKey(d);u.hasOwnProperty(p)||(u[p]=!0)},this),s.selectedMode==="single"){var c=!1;each$f(l,function(d,f){var p=this.getSelectedMapKey(d);u[p]&&(c?u[p]=!1:c=!0)},this)}},r.prototype.getItemSymbol=function(){return this.get("itemSymbol")},r.prototype.getSelectedMapKey=function(a){return this._mode==="categories"?a.value+"":a.index+""},r.prototype.getPieceList=function(){return this._pieceList},r.prototype._determineMode=function(){var a=this.option;return a.pieces&&a.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},r.prototype.setSelected=function(a){this.option.selected=clone$6(a)},r.prototype.getValueState=function(a){var o=VisualMapping.findPieceIndex(a,this._pieceList);return o!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[o])]?"inRange":"outOfRange"},r.prototype.findTargetDataIndices=function(a){var o=[],s=this._pieceList;return this.eachTargetSeries(function(l){var u=[],c=l.getData();c.each(this.getDataDimensionIndex(c),function(d,f){var p=VisualMapping.findPieceIndex(d,s);p===a&&u.push(f)},this),o.push({seriesId:l.id,dataIndex:u})},this),o},r.prototype.getRepresentValue=function(a){var o;if(this.isCategory())o=a.value;else if(a.value!=null)o=a.value;else{var s=a.interval||[];o=s[0]===-1/0&&s[1]===1/0?0:(s[0]+s[1])/2}return o},r.prototype.getVisualMeta=function(a){if(this.isCategory())return;var o=[],s=["",""],l=this;function u(p,v){var g=l.getRepresentValue({interval:p});v||(v=l.getValueState(g));var y=a(g,v);p[0]===-1/0?s[0]=y:p[1]===1/0?s[1]=y:o.push({value:p[0],color:y},{value:p[1],color:y})}var c=this._pieceList.slice();if(!c.length)c.push({interval:[-1/0,1/0]});else{var d=c[0].interval[0];d!==-1/0&&c.unshift({interval:[-1/0,d]}),d=c[c.length-1].interval[1],d!==1/0&&c.push({interval:[d,1/0]})}var f=-1/0;return each$f(c,function(p){var v=p.interval;v&&(v[0]>f&&u([f,v[0]],"outOfRange"),u(v.slice()),f=v[1])},this),{stops:o,outerColors:s}},r.type="visualMap.piecewise",r.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}),r}(VisualMapModel),resetMethods={splitNumber:function(n){var r=this.option,a=Math.min(r.precision,20),o=this.getExtent(),s=r.splitNumber;s=Math.max(parseInt(s,10),1),r.splitNumber=s;for(var l=(o[1]-o[0])/s;+l.toFixed(a)!==l&&a<5;)a++;r.precision=a,l=+l.toFixed(a),r.minOpen&&n.push({interval:[-1/0,o[0]],close:[0,0]});for(var u=0,c=o[0];u<s;c+=l,u++){var d=u===s-1?o[1]:c+l;n.push({interval:[c,d],close:[1,1]})}r.maxOpen&&n.push({interval:[o[1],1/0],close:[0,0]}),reformIntervals(n),each$f(n,function(f,p){f.index=p,f.text=this.formatValueText(f.interval)},this)},categories:function(n){var r=this.option;each$f(r.categories,function(a){n.push({text:this.formatValueText(a,!0),value:a})},this),normalizeReverse(r,n)},pieces:function(n){var r=this.option;each$f(r.pieces,function(a,o){isObject$3(a)||(a={value:a});var s={text:"",index:o};if(a.label!=null&&(s.text=a.label),a.hasOwnProperty("value")){var l=s.value=a.value;s.interval=[l,l],s.close=[1,1]}else{for(var u=s.interval=[],c=s.close=[0,0],d=[1,0,1],f=[-1/0,1/0],p=[],v=0;v<2;v++){for(var g=[["gte","gt","min"],["lte","lt","max"]][v],y=0;y<3&&u[v]==null;y++)u[v]=a[g[y]],c[v]=d[y],p[v]=y===2;u[v]==null&&(u[v]=f[v])}p[0]&&u[1]===1/0&&(c[0]=0),p[1]&&u[0]===-1/0&&(c[1]=0),u[0]===u[1]&&c[0]&&c[1]&&(s.value=u[0])}s.visual=VisualMapping.retrieveVisuals(a),n.push(s)},this),normalizeReverse(r,n),reformIntervals(n),each$f(n,function(a){var o=a.close,s=[["<","≤"][o[1]],[">","≥"][o[0]]];a.text=a.text||this.formatValueText(a.value!=null?a.value:a.interval,!1,s)},this)}};function normalizeReverse(n,r){var a=n.inverse;(n.orient==="vertical"?!a:a)&&r.reverse()}var PiecewiseVisualMapView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type=r.type,a}return r.prototype.doRender=function(){var a=this.group;a.removeAll();var o=this.visualMapModel,s=o.get("textGap"),l=o.textStyleModel,u=l.getFont(),c=l.getTextColor(),d=this._getItemAlign(),f=o.itemSize,p=this._getViewData(),v=p.endsText,g=retrieve(o.get("showLabel",!0),!v),y=!o.get("selectedMode");v&&this._renderEndsText(a,v[0],f,g,d),each$f(p.viewPieceList,function(_){var S=_.piece,b=new Group$3;b.onclick=bind$1(this._onItemClick,this,S),this._enableHoverLink(b,_.indexInModelPieceList);var x=o.getRepresentValue(S);if(this._createItemSymbol(b,x,[0,0,f[0],f[1]],y),g){var A=this.visualMapModel.getValueState(x);b.add(new ZRText({style:{x:d==="right"?-s:f[0]+s,y:f[1]/2,text:S.text,verticalAlign:"middle",align:d,font:u,fill:c,opacity:A==="outOfRange"?.5:1},silent:y}))}a.add(b)},this),v&&this._renderEndsText(a,v[1],f,g,d),box(o.get("orient"),a,o.get("itemGap")),this.renderBackground(a),this.positionGroup(a)},r.prototype._enableHoverLink=function(a,o){var s=this;a.on("mouseover",function(){return l("highlight")}).on("mouseout",function(){return l("downplay")});var l=function(u){var c=s.visualMapModel;c.option.hoverLink&&s.api.dispatchAction({type:u,batch:makeHighDownBatch(c.findTargetDataIndices(o),c)})}},r.prototype._getItemAlign=function(){var a=this.visualMapModel,o=a.option;if(o.orient==="vertical")return getItemAlign(a,this.api,a.itemSize);var s=o.align;return(!s||s==="auto")&&(s="left"),s},r.prototype._renderEndsText=function(a,o,s,l,u){if(o){var c=new Group$3,d=this.visualMapModel.textStyleModel;c.add(new ZRText({style:createTextStyle$1(d,{x:l?u==="right"?s[0]:0:s[0]/2,y:s[1]/2,verticalAlign:"middle",align:l?u:"center",text:o})})),a.add(c)}},r.prototype._getViewData=function(){var a=this.visualMapModel,o=map$1(a.getPieceList(),function(c,d){return{piece:c,indexInModelPieceList:d}}),s=a.get("text"),l=a.get("orient"),u=a.get("inverse");return(l==="horizontal"?u:!u)?o.reverse():s&&(s=s.slice().reverse()),{viewPieceList:o,endsText:s}},r.prototype._createItemSymbol=function(a,o,s,l){var u=createSymbol$1(this.getControllerVisual(o,"symbol"),s[0],s[1],s[2],s[3],this.getControllerVisual(o,"color"));u.silent=l,a.add(u)},r.prototype._onItemClick=function(a){var o=this.visualMapModel,s=o.option,l=s.selectedMode;if(l){var u=clone$6(s.selected),c=o.getSelectedMapKey(a);l==="single"||l===!0?(u[c]=!0,each$f(u,function(d,f){u[f]=f===c})):u[c]=!u[c],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:u})}},r.type="visualMap.piecewise",r}(VisualMapView);function install$6(n){n.registerComponentModel(PiecewiseModel),n.registerComponentView(PiecewiseVisualMapView),installCommon(n)}function install$5(n){use(install$7),use(install$6)}var DEFAULT_OPTION={label:{enabled:!0},decal:{show:!1}},inner=makeInner(),decalPaletteScope={};function ariaVisual(n,r){var a=n.getModel("aria");if(!a.get("enabled"))return;var o=clone$6(DEFAULT_OPTION);merge(o.label,n.getLocaleModel().get("aria"),!1),merge(a.option,o,!1),s(),l();function s(){var f=a.getModel("decal"),p=f.get("show");if(p){var v=createHashMap();n.eachSeries(function(g){if(!g.isColorBySeries()){var y=v.get(g.type);y||(y={},v.set(g.type,y)),inner(g).scope=y}}),n.eachRawSeries(function(g){if(n.isSeriesFiltered(g))return;if(isFunction(g.enableAriaDecal)){g.enableAriaDecal();return}var y=g.getData();if(g.isColorBySeries()){var A=getDecalFromPalette(g.ecModel,g.name,decalPaletteScope,n.getSeriesCount()),w=y.getVisual("decal");y.setVisual("decal",E(w,A))}else{var _=g.getRawData(),S={},b=inner(g).scope;y.each(function(D){var C=y.getRawIndex(D);S[C]=D});var x=_.count();_.each(function(D){var C=S[D],$=_.getName(D)||D+"",P=getDecalFromPalette(g.ecModel,$,b,x),M=y.getItemVisual(C,"decal");y.setItemVisual(C,"decal",E(M,P))})}function E(D,C){var $=D?extend$2(extend$2({},C),D):C;return $.dirty=!0,$}})}}function l(){var f=r.getZr().dom;if(f){var p=n.getLocaleModel().get("aria"),v=a.getModel("label");if(v.option=defaults$2(v.option,p),!!v.get("enabled")){if(f.setAttribute("role","img"),v.get("description")){f.setAttribute("aria-label",v.get("description"));return}var g=n.getSeriesCount(),y=v.get(["data","maxCount"])||10,_=v.get(["series","maxCount"])||10,S=Math.min(g,_),b;if(!(g<1)){var x=c();if(x){var A=v.get(["general","withTitle"]);b=u(A,{title:x})}else b=v.get(["general","withoutTitle"]);var w=[],E=g>1?v.get(["series","multiple","prefix"]):v.get(["series","single","prefix"]);b+=u(E,{seriesCount:g}),n.eachSeries(function(P,M){if(M<S){var I=void 0,L=P.get("name"),O=L?"withName":"withoutName";I=g>1?v.get(["series","multiple",O]):v.get(["series","single",O]),I=u(I,{seriesId:P.seriesIndex,seriesName:P.get("name"),seriesType:d(P.subType)});var R=P.getData();if(R.count()>y){var N=v.get(["data","partialData"]);I+=u(N,{displayCnt:y})}else I+=v.get(["data","allData"]);for(var V=v.get(["data","separator","middle"]),F=v.get(["data","separator","end"]),U=v.get(["data","excludeDimensionId"]),H=[],W=0;W<R.count();W++)if(W<y){var G=R.getName(W),B=U?filter(R.getValues(W),function(Z,K){return indexOf(U,K)===-1}):R.getValues(W),Y=v.get(["data",G?"withName":"withoutName"]);H.push(u(Y,{name:G,value:B.join(V)}))}I+=H.join(V)+F,w.push(I)}});var D=v.getModel(["series","multiple","separator"]),C=D.get("middle"),$=D.get("end");b+=w.join(C)+$,f.setAttribute("aria-label",b)}}}}function u(f,p){if(!isString(f))return f;var v=f;return each$f(p,function(g,y){v=v.replace(new RegExp("\\{\\s*"+y+"\\s*\\}","g"),g)}),v}function c(){var f=n.get("title");return f&&f.length&&(f=f[0]),f&&f.text}function d(f){var p=n.getLocaleModel().get(["series","typeNames"]);return p[f]||p.chart}}function ariaPreprocessor(n){if(!(!n||!n.aria)){var r=n.aria;r.show!=null&&(r.enabled=r.show),r.label=r.label||{},each$f(["description","general","series","data"],function(a){r[a]!=null&&(r.label[a]=r[a])})}}function install$4(n){n.registerPreprocessor(ariaPreprocessor),n.registerVisual(n.PRIORITY.VISUAL.ARIA,ariaVisual)}var RELATIONAL_EXPRESSION_OP_ALIAS_MAP={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},RegExpEvaluator=function(){function n(r){var a=this._condVal=isString(r)?new RegExp(r):isRegExp(r)?r:null;if(a==null){var o="";throwError(o)}}return n.prototype.evaluate=function(r){var a=typeof r;return isString(a)?this._condVal.test(r):isNumber(a)?this._condVal.test(r+""):!1},n}(),ConstConditionInternal=function(){function n(){}return n.prototype.evaluate=function(){return this.value},n}(),AndConditionInternal=function(){function n(){}return n.prototype.evaluate=function(){for(var r=this.children,a=0;a<r.length;a++)if(!r[a].evaluate())return!1;return!0},n}(),OrConditionInternal=function(){function n(){}return n.prototype.evaluate=function(){for(var r=this.children,a=0;a<r.length;a++)if(r[a].evaluate())return!0;return!1},n}(),NotConditionInternal=function(){function n(){}return n.prototype.evaluate=function(){return!this.child.evaluate()},n}(),RelationalConditionInternal=function(){function n(){}return n.prototype.evaluate=function(){for(var r=!!this.valueParser,a=this.getValue,o=a(this.valueGetterParam),s=r?this.valueParser(o):null,l=0;l<this.subCondList.length;l++)if(!this.subCondList[l].evaluate(r?s:o))return!1;return!0},n}();function parseOption(n,r){if(n===!0||n===!1){var a=new ConstConditionInternal;return a.value=n,a}var o="";return isObjectNotArray(n)||throwError(o),n.and?parseAndOrOption("and",n,r):n.or?parseAndOrOption("or",n,r):n.not?parseNotOption(n,r):parseRelationalOption(n,r)}function parseAndOrOption(n,r,a){var o=r[n],s="";isArray$1(o)||throwError(s),o.length||throwError(s);var l=n==="and"?new AndConditionInternal:new OrConditionInternal;return l.children=map$1(o,function(u){return parseOption(u,a)}),l.children.length||throwError(s),l}function parseNotOption(n,r){var a=n.not,o="";isObjectNotArray(a)||throwError(o);var s=new NotConditionInternal;return s.child=parseOption(a,r),s.child||throwError(o),s}function parseRelationalOption(n,r){for(var a="",o=r.prepareGetValue(n),s=[],l=keys(n),u=n.parser,c=u?getRawValueParser(u):null,d=0;d<l.length;d++){var f=l[d];if(!(f==="parser"||r.valueGetterAttrMap.get(f))){var p=hasOwn(RELATIONAL_EXPRESSION_OP_ALIAS_MAP,f)?RELATIONAL_EXPRESSION_OP_ALIAS_MAP[f]:f,v=n[f],g=c?c(v):v,y=createFilterComparator(p,g)||p==="reg"&&new RegExpEvaluator(g);y||throwError(a),s.push(y)}}s.length||throwError(a);var _=new RelationalConditionInternal;return _.valueGetterParam=o,_.valueParser=c,_.getValue=r.getValue,_.subCondList=s,_}function isObjectNotArray(n){return isObject$3(n)&&!isArrayLike(n)}var ConditionalExpressionParsed=function(){function n(r,a){this._cond=parseOption(r,a)}return n.prototype.evaluate=function(){return this._cond.evaluate()},n}();function parseConditionalExpression(n,r){return new ConditionalExpressionParsed(n,r)}var filterTransform={type:"echarts:filter",transform:function(n){for(var r=n.upstream,a,o=parseConditionalExpression(n.config,{valueGetterAttrMap:createHashMap({dimension:!0}),prepareGetValue:function(c){var d="",f=c.dimension;hasOwn(c,"dimension")||throwError(d);var p=r.getDimensionInfo(f);return p||throwError(d),{dimIdx:p.index}},getValue:function(c){return r.retrieveValueFromItem(a,c.dimIdx)}}),s=[],l=0,u=r.count();l<u;l++)a=r.getRawDataItem(l),o.evaluate()&&s.push(a);return{data:s}}},sortTransform={type:"echarts:sort",transform:function(n){var r=n.upstream,a=n.config,o="",s=normalizeToArray(a);s.length||throwError(o);var l=[];each$f(s,function(p){var v=p.dimension,g=p.order,y=p.parser,_=p.incomparable;if(v==null&&throwError(o),g!=="asc"&&g!=="desc"&&throwError(o),_&&_!=="min"&&_!=="max"){var S="";throwError(S)}if(g!=="asc"&&g!=="desc"){var b="";throwError(b)}var x=r.getDimensionInfo(v);x||throwError(o);var A=y?getRawValueParser(y):null;y&&!A&&throwError(o),l.push({dimIdx:x.index,parser:A,comparator:new SortOrderComparator(g,_)})});var u=r.sourceFormat;u!==SOURCE_FORMAT_ARRAY_ROWS&&u!==SOURCE_FORMAT_OBJECT_ROWS&&throwError(o);for(var c=[],d=0,f=r.count();d<f;d++)c.push(r.getRawDataItem(d));return c.sort(function(p,v){for(var g=0;g<l.length;g++){var y=l[g],_=r.retrieveValueFromItem(p,y.dimIdx),S=r.retrieveValueFromItem(v,y.dimIdx);y.parser&&(_=y.parser(_),S=y.parser(S));var b=y.comparator.evaluate(_,S);if(b!==0)return b}return 0}),{data:c}}};function install$3(n){n.registerTransform(filterTransform),n.registerTransform(sortTransform)}var DatasetModel=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type="dataset",a}return r.prototype.init=function(a,o,s){n.prototype.init.call(this,a,o,s),this._sourceManager=new SourceManager(this),disableTransformOptionMerge(this)},r.prototype.mergeOption=function(a,o){n.prototype.mergeOption.call(this,a,o),disableTransformOptionMerge(this)},r.prototype.optionUpdated=function(){this._sourceManager.dirty()},r.prototype.getSourceManager=function(){return this._sourceManager},r.type="dataset",r.defaultOption={seriesLayoutBy:SERIES_LAYOUT_BY_COLUMN},r}(ComponentModel),DatasetView=function(n){__extends(r,n);function r(){var a=n!==null&&n.apply(this,arguments)||this;return a.type="dataset",a}return r.type="dataset",r}(ComponentView);function install$2(n){n.registerComponentModel(DatasetModel),n.registerComponentView(DatasetView)}var CMD=PathProxy.CMD;function aroundEqual(n,r){return Math.abs(n-r)<1e-5}function pathToBezierCurves(n){var r=n.data,a=n.len(),o=[],s,l=0,u=0,c=0,d=0;function f(R,N){s&&s.length>2&&o.push(s),s=[R,N]}function p(R,N,V,F){aroundEqual(R,V)&&aroundEqual(N,F)||s.push(R,N,V,F,V,F)}function v(R,N,V,F,U,H){var W=Math.abs(N-R),G=Math.tan(W/4)*4/3,B=N<R?-1:1,Y=Math.cos(R),Z=Math.sin(R),K=Math.cos(N),ee=Math.sin(N),j=Y*U+V,q=Z*H+F,J=K*U+V,X=ee*H+F,re=U*G*B,Q=H*G*B;s.push(j-re*Z,q+Q*Y,J+re*ee,X-Q*K,J,X)}for(var g,y,_,S,b=0;b<a;){var x=r[b++],A=b===1;switch(A&&(l=r[b],u=r[b+1],c=l,d=u,(x===CMD.L||x===CMD.C||x===CMD.Q)&&(s=[c,d])),x){case CMD.M:l=c=r[b++],u=d=r[b++],f(c,d);break;case CMD.L:g=r[b++],y=r[b++],p(l,u,g,y),l=g,u=y;break;case CMD.C:s.push(r[b++],r[b++],r[b++],r[b++],l=r[b++],u=r[b++]);break;case CMD.Q:g=r[b++],y=r[b++],_=r[b++],S=r[b++],s.push(l+2/3*(g-l),u+2/3*(y-u),_+2/3*(g-_),S+2/3*(y-S),_,S),l=_,u=S;break;case CMD.A:var w=r[b++],E=r[b++],D=r[b++],C=r[b++],$=r[b++],P=r[b++]+$;b+=1;var M=!r[b++];g=Math.cos($)*D+w,y=Math.sin($)*C+E,A?(c=g,d=y,f(c,d)):p(l,u,g,y),l=Math.cos(P)*D+w,u=Math.sin(P)*C+E;for(var I=(M?-1:1)*Math.PI/2,L=$;M?L>P:L<P;L+=I){var O=M?Math.max(L+I,P):Math.min(L+I,P);v(L,O,w,E,D,C)}break;case CMD.R:c=l=r[b++],d=u=r[b++],g=c+r[b++],y=d+r[b++],f(g,d),p(g,d,g,y),p(g,y,c,y),p(c,y,c,d),p(c,d,g,d);break;case CMD.Z:s&&p(l,u,c,d),l=c,u=d;break}}return s&&s.length>2&&o.push(s),o}function adpativeBezier(n,r,a,o,s,l,u,c,d,f){if(aroundEqual(n,a)&&aroundEqual(r,o)&&aroundEqual(s,u)&&aroundEqual(l,c)){d.push(u,c);return}var p=2/f,v=p*p,g=u-n,y=c-r,_=Math.sqrt(g*g+y*y);g/=_,y/=_;var S=a-n,b=o-r,x=s-u,A=l-c,w=S*S+b*b,E=x*x+A*A;if(w<v&&E<v){d.push(u,c);return}var D=g*S+y*b,C=-g*x-y*A,$=w-D*D,P=E-C*C;if($<v&&D>=0&&P<v&&C>=0){d.push(u,c);return}var M=[],I=[];cubicSubdivide(n,a,s,u,.5,M),cubicSubdivide(r,o,l,c,.5,I),adpativeBezier(M[0],I[0],M[1],I[1],M[2],I[2],M[3],I[3],d,f),adpativeBezier(M[4],I[4],M[5],I[5],M[6],I[6],M[7],I[7],d,f)}function pathToPolygons(n,r){var a=pathToBezierCurves(n),o=[];r=r||1;for(var s=0;s<a.length;s++){var l=a[s],u=[],c=l[0],d=l[1];u.push(c,d);for(var f=2;f<l.length;){var p=l[f++],v=l[f++],g=l[f++],y=l[f++],_=l[f++],S=l[f++];adpativeBezier(c,d,p,v,g,y,_,S,u,r),c=_,d=S}o.push(u)}return o}function getDividingGrids(n,r,a){var o=n[r],s=n[1-r],l=Math.abs(o/s),u=Math.ceil(Math.sqrt(l*a)),c=Math.floor(a/u);c===0&&(c=1,u=a);for(var d=[],f=0;f<u;f++)d.push(c);var p=u*c,v=a-p;if(v>0)for(var f=0;f<v;f++)d[f%u]+=1;return d}function divideSector(n,r,a){for(var o=n.r0,s=n.r,l=n.startAngle,u=n.endAngle,c=Math.abs(u-l),d=c*s,f=s-o,p=d>Math.abs(f),v=getDividingGrids([d,f],p?0:1,r),g=(p?c:f)/v.length,y=0;y<v.length;y++)for(var _=(p?f:c)/v[y],S=0;S<v[y];S++){var b={};p?(b.startAngle=l+g*y,b.endAngle=l+g*(y+1),b.r0=o+_*S,b.r=o+_*(S+1)):(b.startAngle=l+_*S,b.endAngle=l+_*(S+1),b.r0=o+g*y,b.r=o+g*(y+1)),b.clockwise=n.clockwise,b.cx=n.cx,b.cy=n.cy,a.push(b)}}function divideRect(n,r,a){for(var o=n.width,s=n.height,l=o>s,u=getDividingGrids([o,s],l?0:1,r),c=l?"width":"height",d=l?"height":"width",f=l?"x":"y",p=l?"y":"x",v=n[c]/u.length,g=0;g<u.length;g++)for(var y=n[d]/u[g],_=0;_<u[g];_++){var S={};S[f]=g*v,S[p]=_*y,S[c]=v,S[d]=y,S.x+=n.x,S.y+=n.y,a.push(S)}}function crossProduct2d(n,r,a,o){return n*o-a*r}function lineLineIntersect(n,r,a,o,s,l,u,c){var d=a-n,f=o-r,p=u-s,v=c-l,g=crossProduct2d(p,v,d,f);if(Math.abs(g)<1e-6)return null;var y=n-s,_=r-l,S=crossProduct2d(y,_,p,v)/g;return S<0||S>1?null:new Point(S*d+n,S*f+r)}function projPtOnLine(n,r,a){var o=new Point;Point.sub(o,a,r),o.normalize();var s=new Point;Point.sub(s,n,r);var l=s.dot(o);return l}function addToPoly(n,r){var a=n[n.length-1];a&&a[0]===r[0]&&a[1]===r[1]||n.push(r)}function splitPolygonByLine(n,r,a){for(var o=n.length,s=[],l=0;l<o;l++){var u=n[l],c=n[(l+1)%o],d=lineLineIntersect(u[0],u[1],c[0],c[1],r.x,r.y,a.x,a.y);d&&s.push({projPt:projPtOnLine(d,r,a),pt:d,idx:l})}if(s.length<2)return[{points:n},{points:n}];s.sort(function(b,x){return b.projPt-x.projPt});var f=s[0],p=s[s.length-1];if(p.idx<f.idx){var v=f;f=p,p=v}for(var g=[f.pt.x,f.pt.y],y=[p.pt.x,p.pt.y],_=[g],S=[y],l=f.idx+1;l<=p.idx;l++)addToPoly(_,n[l].slice());addToPoly(_,y),addToPoly(_,g);for(var l=p.idx+1;l<=f.idx+o;l++)addToPoly(S,n[l%o].slice());return addToPoly(S,g),addToPoly(S,y),[{points:_},{points:S}]}function binaryDividePolygon(n){var r=n.points,a=[],o=[];fromPoints(r,a,o);var s=new BoundingRect(a[0],a[1],o[0]-a[0],o[1]-a[1]),l=s.width,u=s.height,c=s.x,d=s.y,f=new Point,p=new Point;return l>u?(f.x=p.x=c+l/2,f.y=d,p.y=d+u):(f.y=p.y=d+u/2,f.x=c,p.x=c+l),splitPolygonByLine(r,f,p)}function binaryDivideRecursive(n,r,a,o){if(a===1)o.push(r);else{var s=Math.floor(a/2),l=n(r);binaryDivideRecursive(n,l[0],s,o),binaryDivideRecursive(n,l[1],a-s,o)}return o}function clone$2(n,r){for(var a=[],o=0;o<r;o++)a.push(clonePath(n));return a}function copyPathProps(n,r){r.setStyle(n.style),r.z=n.z,r.z2=n.z2,r.zlevel=n.zlevel}function polygonConvert(n){for(var r=[],a=0;a<n.length;)r.push([n[a++],n[a++]]);return r}function split(n,r){var a=[],o=n.shape,s;switch(n.type){case"rect":divideRect(o,r,a),s=Rect$2;break;case"sector":divideSector(o,r,a),s=Sector;break;case"circle":divideSector({r0:0,r:o.r,startAngle:0,endAngle:Math.PI*2,cx:o.cx,cy:o.cy},r,a),s=Sector;break;default:var l=n.getComputedTransform(),u=l?Math.sqrt(Math.max(l[0]*l[0]+l[1]*l[1],l[2]*l[2]+l[3]*l[3])):1,c=map$1(pathToPolygons(n.getUpdatedPathProxy(),u),function(x){return polygonConvert(x)}),d=c.length;if(d===0)binaryDivideRecursive(binaryDividePolygon,{points:c[0]},r,a);else if(d===r)for(var f=0;f<d;f++)a.push({points:c[f]});else{var p=0,v=map$1(c,function(x){var A=[],w=[];fromPoints(x,A,w);var E=(w[1]-A[1])*(w[0]-A[0]);return p+=E,{poly:x,area:E}});v.sort(function(x,A){return A.area-x.area});for(var g=r,f=0;f<d;f++){var y=v[f];if(g<=0)break;var _=f===d-1?g:Math.ceil(y.area/p*r);_<0||(binaryDivideRecursive(binaryDividePolygon,{points:y.poly},_,a),g-=_)}}s=Polygon;break}if(!s)return clone$2(n,r);for(var S=[],f=0;f<a.length;f++){var b=new s;b.setShape(a[f]),copyPathProps(n,b),S.push(b)}return S}function alignSubpath(n,r){var a=n.length,o=r.length;if(a===o)return[n,r];for(var s=[],l=[],u=a<o?n:r,c=Math.min(a,o),d=Math.abs(o-a)/6,f=(c-2)/6,p=Math.ceil(d/f)+1,v=[u[0],u[1]],g=d,y=2;y<c;){var _=u[y-2],S=u[y-1],b=u[y++],x=u[y++],A=u[y++],w=u[y++],E=u[y++],D=u[y++];if(g<=0){v.push(b,x,A,w,E,D);continue}for(var C=Math.min(g,p-1)+1,$=1;$<=C;$++){var P=$/C;cubicSubdivide(_,b,A,E,P,s),cubicSubdivide(S,x,w,D,P,l),_=s[3],S=l[3],v.push(s[1],l[1],s[2],l[2],_,S),b=s[5],x=l[5],A=s[6],w=l[6]}g-=C-1}return u===n?[v,r]:[n,v]}function createSubpath(n,r){for(var a=n.length,o=n[a-2],s=n[a-1],l=[],u=0;u<r.length;)l[u++]=o,l[u++]=s;return l}function alignBezierCurves(n,r){for(var a,o,s,l=[],u=[],c=0;c<Math.max(n.length,r.length);c++){var d=n[c],f=r[c],p=void 0,v=void 0;d?f?(a=alignSubpath(d,f),p=a[0],v=a[1],o=p,s=v):(v=createSubpath(s||d,d),p=d):(p=createSubpath(o||f,f),v=f),l.push(p),u.push(v)}return[l,u]}function centroid(n){for(var r=0,a=0,o=0,s=n.length,l=0,u=s-2;l<s;u=l,l+=2){var c=n[u],d=n[u+1],f=n[l],p=n[l+1],v=c*p-f*d;r+=v,a+=(c+f)*v,o+=(d+p)*v}return r===0?[n[0]||0,n[1]||0]:[a/r/3,o/r/3,r]}function findBestRingOffset(n,r,a,o){for(var s=(n.length-2)/6,l=1/0,u=0,c=n.length,d=c-2,f=0;f<s;f++){for(var p=f*6,v=0,g=0;g<c;g+=2){var y=g===0?p:(p+g-2)%d+2,_=n[y]-a[0],S=n[y+1]-a[1],b=r[g]-o[0],x=r[g+1]-o[1],A=b-_,w=x-S;v+=A*A+w*w}v<l&&(l=v,u=f)}return u}function reverse(n){for(var r=[],a=n.length,o=0;o<a;o+=2)r[o]=n[a-o-2],r[o+1]=n[a-o-1];return r}function findBestMorphingRotation(n,r,a,o){for(var s=[],l,u=0;u<n.length;u++){var c=n[u],d=r[u],f=centroid(c),p=centroid(d);l==null&&(l=f[2]<0!=p[2]<0);var v=[],g=[],y=0,_=1/0,S=[],b=c.length;l&&(c=reverse(c));for(var x=findBestRingOffset(c,d,f,p)*6,A=b-2,w=0;w<A;w+=2){var E=(x+w)%A+2;v[w+2]=c[E]-f[0],v[w+3]=c[E+1]-f[1]}v[0]=c[x]-f[0],v[1]=c[x+1]-f[1];for(var D=o/a,C=-o/2;C<=o/2;C+=D){for(var $=Math.sin(C),P=Math.cos(C),M=0,w=0;w<c.length;w+=2){var I=v[w],L=v[w+1],O=d[w]-p[0],R=d[w+1]-p[1],N=O*P-R*$,V=O*$+R*P;S[w]=N,S[w+1]=V;var F=N-I,U=V-L;M+=F*F+U*U}if(M<_){_=M,y=C;for(var H=0;H<S.length;H++)g[H]=S[H]}}s.push({from:v,to:g,fromCp:f,toCp:p,rotation:-y})}return s}function isCombineMorphing(n){return n.__isCombineMorphing}var SAVED_METHOD_PREFIX="__mOriginal_";function saveAndModifyMethod(n,r,a){var o=SAVED_METHOD_PREFIX+r,s=n[o]||n[r];n[o]||(n[o]=n[r]);var l=a.replace,u=a.after,c=a.before;n[r]=function(){var d=arguments,f;return c&&c.apply(this,d),l?f=l.apply(this,d):f=s.apply(this,d),u&&u.apply(this,d),f}}function restoreMethod(n,r){var a=SAVED_METHOD_PREFIX+r;n[a]&&(n[r]=n[a],n[a]=null)}function applyTransformOnBeziers(n,r){for(var a=0;a<n.length;a++)for(var o=n[a],s=0;s<o.length;){var l=o[s],u=o[s+1];o[s++]=r[0]*l+r[2]*u+r[4],o[s++]=r[1]*l+r[3]*u+r[5]}}function prepareMorphPath(n,r){var a=n.getUpdatedPathProxy(),o=r.getUpdatedPathProxy(),s=alignBezierCurves(pathToBezierCurves(a),pathToBezierCurves(o)),l=s[0],u=s[1],c=n.getComputedTransform(),d=r.getComputedTransform();function f(){this.transform=null}c&&applyTransformOnBeziers(l,c),d&&applyTransformOnBeziers(u,d),saveAndModifyMethod(r,"updateTransform",{replace:f}),r.transform=null;var p=findBestMorphingRotation(l,u,10,Math.PI),v=[];saveAndModifyMethod(r,"buildPath",{replace:function(g){for(var y=r.__morphT,_=1-y,S=[],b=0;b<p.length;b++){var x=p[b],A=x.from,w=x.to,E=x.rotation*y,D=x.fromCp,C=x.toCp,$=Math.sin(E),P=Math.cos(E);lerp$1(S,D,C,y);for(var M=0;M<A.length;M+=2){var I=A[M],L=A[M+1],O=w[M],R=w[M+1],N=I*_+O*y,V=L*_+R*y;v[M]=N*P-V*$+S[0],v[M+1]=N*$+V*P+S[1]}var F=v[0],U=v[1];g.moveTo(F,U);for(var M=2;M<A.length;){var O=v[M++],R=v[M++],H=v[M++],W=v[M++],G=v[M++],B=v[M++];F===O&&U===R&&H===G&&W===B?g.lineTo(G,B):g.bezierCurveTo(O,R,H,W,G,B),F=G,U=B}}}})}function morphPath(n,r,a){if(!n||!r)return r;var o=a.done,s=a.during;prepareMorphPath(n,r),r.__morphT=0;function l(){restoreMethod(r,"buildPath"),restoreMethod(r,"updateTransform"),r.__morphT=-1,r.createPathProxy(),r.dirtyShape()}return r.animateTo({__morphT:1},defaults$2({during:function(u){r.dirtyShape(),s&&s(u)},done:function(){l(),o&&o()}},a)),r}function hilbert(n,r,a,o,s,l){var u=16;n=s===a?0:Math.round(32767*(n-a)/(s-a)),r=l===o?0:Math.round(32767*(r-o)/(l-o));for(var c=0,d,f=(1<<u)/2;f>0;f/=2){var p=0,v=0;(n&f)>0&&(p=1),(r&f)>0&&(v=1),c+=f*f*(3*p^v),v===0&&(p===1&&(n=f-1-n,r=f-1-r),d=n,n=r,r=d)}return c}function sortPaths(n){var r=1/0,a=1/0,o=-1/0,s=-1/0,l=map$1(n,function(c){var d=c.getBoundingRect(),f=c.getComputedTransform(),p=d.x+d.width/2+(f?f[4]:0),v=d.y+d.height/2+(f?f[5]:0);return r=Math.min(p,r),a=Math.min(v,a),o=Math.max(p,o),s=Math.max(v,s),[p,v]}),u=map$1(l,function(c,d){return{cp:c,z:hilbert(c[0],c[1],r,a,o,s),path:n[d]}});return u.sort(function(c,d){return c.z-d.z}).map(function(c){return c.path})}function defaultDividePath(n){return split(n.path,n.count)}function createEmptyReturn(){return{fromIndividuals:[],toIndividuals:[],count:0}}function combineMorph(n,r,a){var o=[];function s(D){for(var C=0;C<D.length;C++){var $=D[C];isCombineMorphing($)?s($.childrenRef()):$ instanceof Path&&o.push($)}}s(n);var l=o.length;if(!l)return createEmptyReturn();var u=a.dividePath||defaultDividePath,c=u({path:r,count:l});if(c.length!==l)return createEmptyReturn();o=sortPaths(o),c=sortPaths(c);for(var d=a.done,f=a.during,p=a.individualDelay,v=new Transformable,g=0;g<l;g++){var y=o[g],_=c[g];_.parent=r,_.copyTransform(v),p||prepareMorphPath(y,_)}r.__isCombineMorphing=!0,r.childrenRef=function(){return c};function S(D){for(var C=0;C<c.length;C++)c[C].addSelfToZr(D)}saveAndModifyMethod(r,"addSelfToZr",{after:function(D){S(D)}}),saveAndModifyMethod(r,"removeSelfFromZr",{after:function(D){for(var C=0;C<c.length;C++)c[C].removeSelfFromZr(D)}});function b(){r.__isCombineMorphing=!1,r.__morphT=-1,r.childrenRef=null,restoreMethod(r,"addSelfToZr"),restoreMethod(r,"removeSelfFromZr")}var x=c.length;if(p)for(var A=x,w=function(){A--,A===0&&(b(),d&&d())},g=0;g<x;g++){var E=p?defaults$2({delay:(a.delay||0)+p(g,x,o[g],c[g]),done:w},a):a;morphPath(o[g],c[g],E)}else r.__morphT=0,r.animateTo({__morphT:1},defaults$2({during:function(D){for(var C=0;C<x;C++){var $=c[C];$.__morphT=r.__morphT,$.dirtyShape()}f&&f(D)},done:function(){b();for(var D=0;D<n.length;D++)restoreMethod(n[D],"updateTransform");d&&d()}},a));return r.__zr&&S(r.__zr),{fromIndividuals:o,toIndividuals:c,count:x}}function separateMorph(n,r,a){var o=r.length,s=[],l=a.dividePath||defaultDividePath;function u(y){for(var _=0;_<y.length;_++){var S=y[_];isCombineMorphing(S)?u(S.childrenRef()):S instanceof Path&&s.push(S)}}if(isCombineMorphing(n)){u(n.childrenRef());var c=s.length;if(c<o)for(var d=0,f=c;f<o;f++)s.push(clonePath(s[d++%c]));s.length=o}else{s=l({path:n,count:o});for(var p=n.getComputedTransform(),f=0;f<s.length;f++)s[f].setLocalTransform(p);if(s.length!==o)return createEmptyReturn()}s=sortPaths(s),r=sortPaths(r);for(var v=a.individualDelay,f=0;f<o;f++){var g=v?defaults$2({delay:(a.delay||0)+v(f,o,s[f],r[f])},a):a;morphPath(s[f],r[f],g)}return{fromIndividuals:s,toIndividuals:r,count:r.length}}function isMultiple(n){return isArray$1(n[0])}function prepareMorphBatches(n,r){for(var a=[],o=n.length,s=0;s<o;s++)a.push({one:n[s],many:[]});for(var s=0;s<r.length;s++){var l=r[s].length,u=void 0;for(u=0;u<l;u++)a[u%o].many.push(r[s][u])}for(var c=0,s=o-1;s>=0;s--)if(!a[s].many.length){var d=a[c].many;if(d.length<=1)if(c)c=0;else return a;var l=d.length,f=Math.ceil(l/2);a[s].many=d.slice(f,l),a[c].many=d.slice(0,f),c++}return a}var pathDividers={clone:function(n){for(var r=[],a=1-Math.pow(1-n.path.style.opacity,1/n.count),o=0;o<n.count;o++){var s=clonePath(n.path);s.setStyle("opacity",a),r.push(s)}return r},split:null};function applyMorphAnimation(n,r,a,o,s,l){if(!n.length||!r.length)return;var u=getAnimationConfig("update",o,s);if(!(u&&u.duration>0))return;var c=o.getModel("universalTransition").get("delay"),d=Object.assign({setToFinal:!0},u),f,p;isMultiple(n)&&(f=n,p=r),isMultiple(r)&&(f=r,p=n);function v(x,A,w,E,D){var C=x.many,$=x.one;if(C.length===1&&!D){var P=A?C[0]:$,M=A?$:C[0];if(isCombineMorphing(P))v({many:[P],one:M},!0,w,E,!0);else{var I=c?defaults$2({delay:c(w,E)},d):d;morphPath(P,M,I),l(P,M,P,M,I)}}else for(var L=defaults$2({dividePath:pathDividers[a],individualDelay:c&&function(U,H,W,G){return c(U+w,E)}},d),O=A?combineMorph(C,$,L):separateMorph($,C,L),R=O.fromIndividuals,N=O.toIndividuals,V=R.length,F=0;F<V;F++){var I=c?defaults$2({delay:c(F,V)},d):d;l(R[F],N[F],A?C[F]:x.one,A?x.one:C[F],I)}}for(var g=f?f===n:n.length>r.length,y=f?prepareMorphBatches(p,f):prepareMorphBatches(g?r:n,[g?n:r]),_=0,S=0;S<y.length;S++)_+=y[S].many.length;for(var b=0,S=0;S<y.length;S++)v(y[S],g,b,_),b+=y[S].many.length}function getPathList(n){if(!n)return[];if(isArray$1(n)){for(var r=[],a=0;a<n.length;a++)r.push(getPathList(n[a]));return r}var o=[];return n.traverse(function(s){s instanceof Path&&!s.disableMorphing&&!s.invisible&&!s.ignore&&o.push(s)}),o}var DATA_COUNT_THRESHOLD=1e4,TRANSITION_NONE=0,TRANSITION_P2C=1,TRANSITION_C2P=2,getUniversalTransitionGlobalStore=makeInner();function getDimension(n,r){for(var a=n.dimensions,o=0;o<a.length;o++){var s=n.getDimensionInfo(a[o]);if(s&&s.otherDims[r]===0)return a[o]}}function getValueByDimension(n,r,a){var o=n.getDimensionInfo(a),s=o&&o.ordinalMeta;if(o){var l=n.get(o.name,r);return s&&s.categories[l]||l+""}}function getGroupId(n,r,a,o){var s=o?"itemChildGroupId":"itemGroupId",l=getDimension(n,s);if(l){var u=getValueByDimension(n,r,l);return u}var c=n.getRawDataItem(r),d=o?"childGroupId":"groupId";if(c&&c[d])return c[d]+"";if(!o)return a||n.getId(r)}function flattenDataDiffItems(n){var r=[];return each$f(n,function(a){var o=a.data,s=a.dataGroupId;if(!(o.count()>DATA_COUNT_THRESHOLD))for(var l=o.getIndices(),u=0;u<l.length;u++)r.push({data:o,groupId:getGroupId(o,u,s,!1),childGroupId:getGroupId(o,u,s,!0),divide:a.divide,dataIndex:u})}),r}function fadeInElement(n,r,a){n.traverse(function(o){o instanceof Path&&initProps(o,{style:{opacity:0}},r,{dataIndex:a,isFrom:!0})})}function removeEl(n){if(n.parent){var r=n.getComputedTransform();n.setLocalTransform(r),n.parent.remove(n)}}function stopAnimation(n){n.stopAnimation(),n.isGroup&&n.traverse(function(r){r.stopAnimation()})}function animateElementStyles(n,r,a){var o=getAnimationConfig("update",a,r);o&&n.traverse(function(s){if(s instanceof Displayable){var l=getOldStyle(s);l&&s.animateFrom({style:l},o)}})}function isAllIdSame(n,r){var a=n.length;if(a!==r.length)return!1;for(var o=0;o<a;o++){var s=n[o],l=r[o];if(s.data.getId(s.dataIndex)!==l.data.getId(l.dataIndex))return!1}return!0}function transitionBetween(n,r,a){var o=flattenDataDiffItems(n),s=flattenDataDiffItems(r);function l(w,E,D,C,$){(D||w)&&E.animateFrom({style:D&&D!==w?extend$2(extend$2({},D.style),w.style):w.style},$)}var u=!1,c=TRANSITION_NONE,d=createHashMap(),f=createHashMap();o.forEach(function(w){w.groupId&&d.set(w.groupId,!0),w.childGroupId&&f.set(w.childGroupId,!0)});for(var p=0;p<s.length;p++){var v=s[p].groupId;if(f.get(v)){c=TRANSITION_P2C;break}var g=s[p].childGroupId;if(g&&d.get(g)){c=TRANSITION_C2P;break}}function y(w,E){return function(D){var C=D.data,$=D.dataIndex;return E?C.getId($):w?c===TRANSITION_P2C?D.childGroupId:D.groupId:c===TRANSITION_C2P?D.childGroupId:D.groupId}}var _=isAllIdSame(o,s),S={};if(!_)for(var p=0;p<s.length;p++){var b=s[p],x=b.data.getItemGraphicEl(b.dataIndex);x&&(S[x.id]=!0)}function A(w,E){var D=o[E],C=s[w],$=C.data.hostModel,P=D.data.getItemGraphicEl(D.dataIndex),M=C.data.getItemGraphicEl(C.dataIndex);if(P===M){M&&animateElementStyles(M,C.dataIndex,$);return}P&&S[P.id]||M&&(stopAnimation(M),P?(stopAnimation(P),removeEl(P),u=!0,applyMorphAnimation(getPathList(P),getPathList(M),C.divide,$,w,l)):fadeInElement(M,$,w))}new DataDiffer(o,s,y(!0,_),y(!1,_),null,"multiple").update(A).updateManyToOne(function(w,E){var D=s[w],C=D.data,$=C.hostModel,P=C.getItemGraphicEl(D.dataIndex),M=filter(map$1(E,function(I){return o[I].data.getItemGraphicEl(o[I].dataIndex)}),function(I){return I&&I!==P&&!S[I.id]});P&&(stopAnimation(P),M.length?(each$f(M,function(I){stopAnimation(I),removeEl(I)}),u=!0,applyMorphAnimation(getPathList(M),getPathList(P),D.divide,$,w,l)):fadeInElement(P,$,D.dataIndex))}).updateOneToMany(function(w,E){var D=o[E],C=D.data.getItemGraphicEl(D.dataIndex);if(!(C&&S[C.id])){var $=filter(map$1(w,function(M){return s[M].data.getItemGraphicEl(s[M].dataIndex)}),function(M){return M&&M!==C}),P=s[w[0]].data.hostModel;$.length&&(each$f($,function(M){return stopAnimation(M)}),C?(stopAnimation(C),removeEl(C),u=!0,applyMorphAnimation(getPathList(C),getPathList($),D.divide,P,w[0],l)):each$f($,function(M){return fadeInElement(M,P,w[0])}))}}).updateManyToMany(function(w,E){new DataDiffer(E,w,function(D){return o[D].data.getId(o[D].dataIndex)},function(D){return s[D].data.getId(s[D].dataIndex)}).update(function(D,C){A(w[D],E[C])}).execute()}).execute(),u&&each$f(r,function(w){var E=w.data,D=E.hostModel,C=D&&a.getViewOfSeriesModel(D),$=getAnimationConfig("update",D,0);C&&D.isAnimationEnabled()&&$&&$.duration>0&&C.group.traverse(function(P){P instanceof Path&&!P.animators.length&&P.animateFrom({style:{opacity:0}},$)})})}function getSeriesTransitionKey(n){var r=n.getModel("universalTransition").get("seriesKey");return r||n.id}function convertArraySeriesKeyToString(n){return isArray$1(n)?n.sort().join(","):n}function getDivideShapeFromData(n){if(n.hostModel)return n.hostModel.getModel("universalTransition").get("divideShape")}function findTransitionSeriesBatches(n,r){var a=createHashMap(),o=createHashMap(),s=createHashMap();return each$f(n.oldSeries,function(l,u){var c=n.oldDataGroupIds[u],d=n.oldData[u],f=getSeriesTransitionKey(l),p=convertArraySeriesKeyToString(f);o.set(p,{dataGroupId:c,data:d}),isArray$1(f)&&each$f(f,function(v){s.set(v,{key:p,dataGroupId:c,data:d})})}),each$f(r.updatedSeries,function(l){if(l.isUniversalTransitionEnabled()&&l.isAnimationEnabled()){var u=l.get("dataGroupId"),c=l.getData(),d=getSeriesTransitionKey(l),f=convertArraySeriesKeyToString(d),p=o.get(f);if(p)a.set(f,{oldSeries:[{dataGroupId:p.dataGroupId,divide:getDivideShapeFromData(p.data),data:p.data}],newSeries:[{dataGroupId:u,divide:getDivideShapeFromData(c),data:c}]});else if(isArray$1(d)){var v=[];each$f(d,function(_){var S=o.get(_);S.data&&v.push({dataGroupId:S.dataGroupId,divide:getDivideShapeFromData(S.data),data:S.data})}),v.length&&a.set(f,{oldSeries:v,newSeries:[{dataGroupId:u,data:c,divide:getDivideShapeFromData(c)}]})}else{var g=s.get(d);if(g){var y=a.get(g.key);y||(y={oldSeries:[{dataGroupId:g.dataGroupId,data:g.data,divide:getDivideShapeFromData(g.data)}],newSeries:[]},a.set(g.key,y)),y.newSeries.push({dataGroupId:u,data:c,divide:getDivideShapeFromData(c)})}}}}),a}function querySeries(n,r){for(var a=0;a<n.length;a++){var o=r.seriesIndex!=null&&r.seriesIndex===n[a].seriesIndex||r.seriesId!=null&&r.seriesId===n[a].id;if(o)return a}}function transitionSeriesFromOpt(n,r,a,o){var s=[],l=[];each$f(normalizeToArray(n.from),function(u){var c=querySeries(r.oldSeries,u);c>=0&&s.push({dataGroupId:r.oldDataGroupIds[c],data:r.oldData[c],divide:getDivideShapeFromData(r.oldData[c]),groupIdDim:u.dimension})}),each$f(normalizeToArray(n.to),function(u){var c=querySeries(a.updatedSeries,u);if(c>=0){var d=a.updatedSeries[c].getData();l.push({dataGroupId:r.oldDataGroupIds[c],data:d,divide:getDivideShapeFromData(d),groupIdDim:u.dimension})}}),s.length>0&&l.length>0&&transitionBetween(s,l,o)}function installUniversalTransition(n){n.registerUpdateLifecycle("series:beforeupdate",function(r,a,o){each$f(normalizeToArray(o.seriesTransition),function(s){each$f(normalizeToArray(s.to),function(l){for(var u=o.updatedSeries,c=0;c<u.length;c++)(l.seriesIndex!=null&&l.seriesIndex===u[c].seriesIndex||l.seriesId!=null&&l.seriesId===u[c].id)&&(u[c][SERIES_UNIVERSAL_TRANSITION_PROP]=!0)})})}),n.registerUpdateLifecycle("series:transition",function(r,a,o){var s=getUniversalTransitionGlobalStore(a);if(s.oldSeries&&o.updatedSeries&&o.optionChanged){var l=o.seriesTransition;if(l)each$f(normalizeToArray(l),function(y){transitionSeriesFromOpt(y,s,o,a)});else{var u=findTransitionSeriesBatches(s,o);each$f(u.keys(),function(y){var _=u.get(y);transitionBetween(_.oldSeries,_.newSeries,a)})}each$f(o.updatedSeries,function(y){y[SERIES_UNIVERSAL_TRANSITION_PROP]&&(y[SERIES_UNIVERSAL_TRANSITION_PROP]=!1)})}for(var c=r.getSeries(),d=s.oldSeries=[],f=s.oldDataGroupIds=[],p=s.oldData=[],v=0;v<c.length;v++){var g=c[v].getData();g.count()<DATA_COUNT_THRESHOLD&&(d.push(c[v]),f.push(c[v].get("dataGroupId")),p.push(g))}})}var mathSin=Math.sin,mathCos=Math.cos,PI=Math.PI,PI2=Math.PI*2,degree=180/PI,SVGPathRebuilder=function(){function n(){}return n.prototype.reset=function(r){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,r||4)},n.prototype.moveTo=function(r,a){this._add("M",r,a)},n.prototype.lineTo=function(r,a){this._add("L",r,a)},n.prototype.bezierCurveTo=function(r,a,o,s,l,u){this._add("C",r,a,o,s,l,u)},n.prototype.quadraticCurveTo=function(r,a,o,s){this._add("Q",r,a,o,s)},n.prototype.arc=function(r,a,o,s,l,u){this.ellipse(r,a,o,o,0,s,l,u)},n.prototype.ellipse=function(r,a,o,s,l,u,c,d){var f=c-u,p=!d,v=Math.abs(f),g=isAroundZero(v-PI2)||(p?f>=PI2:-f>=PI2),y=f>0?f%PI2:f%PI2+PI2,_=!1;g?_=!0:isAroundZero(v)?_=!1:_=y>=PI==!!p;var S=r+o*mathCos(u),b=a+s*mathSin(u);this._start&&this._add("M",S,b);var x=Math.round(l*degree);if(g){var A=1/this._p,w=(p?1:-1)*(PI2-A);this._add("A",o,s,x,1,+p,r+o*mathCos(u+w),a+s*mathSin(u+w)),A>.01&&this._add("A",o,s,x,0,+p,S,b)}else{var E=r+o*mathCos(c),D=a+s*mathSin(c);this._add("A",o,s,x,+_,+p,E,D)}},n.prototype.rect=function(r,a,o,s){this._add("M",r,a),this._add("l",o,0),this._add("l",0,s),this._add("l",-o,0),this._add("Z")},n.prototype.closePath=function(){this._d.length>0&&this._add("Z")},n.prototype._add=function(r,a,o,s,l,u,c,d,f){for(var p=[],v=this._p,g=1;g<arguments.length;g++){var y=arguments[g];if(isNaN(y)){this._invalid=!0;return}p.push(Math.round(y*v)/v)}this._d.push(r+p.join(" ")),this._start=r==="Z"},n.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},n.prototype.getStr=function(){return this._str},n}(),NONE="none",mathRound=Math.round;function pathHasFill(n){var r=n.fill;return r!=null&&r!==NONE}function pathHasStroke(n){var r=n.stroke;return r!=null&&r!==NONE}var strokeProps=["lineCap","miterLimit","lineJoin"],svgStrokeProps=map$1(strokeProps,function(n){return"stroke-"+n.toLowerCase()});function mapStyleToAttrs(n,r,a,o){var s=r.opacity==null?1:r.opacity;if(a instanceof ZRImage){n("opacity",s);return}if(pathHasFill(r)){var l=normalizeColor(r.fill);n("fill",l.color);var u=r.fillOpacity!=null?r.fillOpacity*l.opacity*s:l.opacity*s;u<1&&n("fill-opacity",u)}else n("fill",NONE);if(pathHasStroke(r)){var c=normalizeColor(r.stroke);n("stroke",c.color);var d=r.strokeNoScale?a.getLineScale():1,f=d?(r.lineWidth||0)/d:0,p=r.strokeOpacity!=null?r.strokeOpacity*c.opacity*s:c.opacity*s,v=r.strokeFirst;if(f!==1&&n("stroke-width",f),v&&n("paint-order",v?"stroke":"fill"),p<1&&n("stroke-opacity",p),r.lineDash){var g=getLineDash(a),y=g[0],_=g[1];y&&(_=mathRound(_||0),n("stroke-dasharray",y.join(",")),(_||o)&&n("stroke-dashoffset",_))}for(var S=0;S<strokeProps.length;S++){var b=strokeProps[S];if(r[b]!==DEFAULT_PATH_STYLE[b]){var x=r[b]||DEFAULT_PATH_STYLE[b];x&&n(svgStrokeProps[S],x)}}}}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(n){return document.createElementNS(SVGNS,n)}function createVNode(n,r,a,o,s){return{tag:n,attrs:a||{},children:o,text:s,key:r}}function createElementOpen(n,r){var a=[];if(r)for(var o in r){var s=r[o],l=o;s!==!1&&(s!==!0&&s!=null&&(l+='="'+s+'"'),a.push(l))}return"<"+n+" "+a.join(" ")+">"}function createElementClose(n){return"</"+n+">"}function vNodeToString(n,r){r=r||{};var a=r.newline?"\n":"";function o(s){var l=s.children,u=s.tag,c=s.attrs,d=s.text;return createElementOpen(u,c)+(u!=="style"?encodeHTML(d):d||"")+(l?""+a+map$1(l,function(f){return o(f)}).join(a)+a:"")+createElementClose(u)}return o(n)}function getCssString(n,r,a){a=a||{};var o=a.newline?"\n":"",s=" {"+o,l=o+"}",u=map$1(keys(n),function(d){return d+s+map$1(keys(n[d]),function(f){return f+":"+n[d][f]+";"}).join(o)+l}).join(o),c=map$1(keys(r),function(d){return"@keyframes "+d+s+map$1(keys(r[d]),function(f){return f+s+map$1(keys(r[d][f]),function(p){var v=r[d][f][p];return p==="d"&&(v='path("'+v+'")'),p+":"+v+";"}).join(o)+l}).join(o)+l}).join(o);return!u&&!c?"":["<![CDATA[",u,c,"]]>"].join(o)}function createBrushScope(n){return{zrId:n,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function createSVGVNode(n,r,a,o){return createVNode("svg","root",{width:n,height:r,xmlns:SVGNS,"xmlns:xlink":XLINKNS,version:"1.1",baseProfile:"full",viewBox:o?"0 0 "+n+" "+r:!1},a)}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(n,r,a){var o=extend$2({},n.shape);extend$2(o,r),n.buildPath(a,o);var s=new SVGPathRebuilder;return s.reset(getPathPrecision(n)),a.rebuildPath(s,1),s.generateStr(),s.getStr()}function setTransformOrigin(n,r){var a=r.originX,o=r.originY;(a||o)&&(n[transformOriginKey]=a+"px "+o+"px")}var ANIMATE_STYLE_MAP={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function addAnimation(n,r){var a=r.zrId+"-ani-"+r.cssAnimIdx++;return r.cssAnims[a]=n,a}function createCompoundPathCSSAnimation(n,r,a){var o=n.shape.paths,s={},l,u;if(each$f(o,function(d){var f=createBrushScope(a.zrId);f.animation=!0,createCSSAnimation(d,{},f,!0);var p=f.cssAnims,v=f.cssNodes,g=keys(p),y=g.length;if(y){u=g[y-1];var _=p[u];for(var S in _){var b=_[S];s[S]=s[S]||{d:""},s[S].d+=b.d||""}for(var x in v){var A=v[x].animation;A.indexOf(u)>=0&&(l=A)}}}),!!l){r.d=!1;var c=addAnimation(s,a);return l.replace(u,c)}}function getEasingFunc(n){return isString(n)?EASING_MAP[n]?"cubic-bezier("+EASING_MAP[n]+")":createCubicEasingFunc(n)?n:"":""}function createCSSAnimation(n,r,a,o){var s=n.animators,l=s.length,u=[];if(n instanceof CompoundPath){var c=createCompoundPathCSSAnimation(n,r,a);if(c)u.push(c);else if(!l)return}else if(!l)return;for(var d={},f=0;f<l;f++){var p=s[f],v=[p.getMaxTime()/1e3+"s"],g=getEasingFunc(p.getClip().easing),y=p.getDelay();g?v.push(g):v.push("linear"),y&&v.push(y/1e3+"s"),p.getLoop()&&v.push("infinite");var _=v.join(" ");d[_]=d[_]||[_,[]],d[_][1].push(p)}function S(A){var w=A[1],E=w.length,D={},C={},$={},P="animation-timing-function";function M(J,X,re){for(var Q=J.getTracks(),te=J.getMaxTime(),ie=0;ie<Q.length;ie++){var ne=Q[ie];if(ne.needsAnimate()){var oe=ne.keyframes,le=ne.propName;if(re&&(le=re(le)),le)for(var ce=0;ce<oe.length;ce++){var de=oe[ce],fe=Math.round(de.time/te*100)+"%",pe=getEasingFunc(de.easing),me=de.rawValue;(isString(me)||isNumber(me))&&(X[fe]=X[fe]||{},X[fe][le]=de.rawValue,pe&&(X[fe][P]=pe))}}}}for(var I=0;I<E;I++){var L=w[I],O=L.targetName;O?O==="shape"&&M(L,C):!o&&M(L,D)}for(var R in D){var N={};copyTransform(N,n),extend$2(N,D[R]);var V=getSRTTransformString(N),F=D[R][P];$[R]=V?{transform:V}:{},setTransformOrigin($[R],N),F&&($[R][P]=F)}var U,H=!0;for(var R in C){$[R]=$[R]||{};var W=!U,F=C[R][P];W&&(U=new PathProxy);var G=U.len();U.reset(),$[R].d=buildPathString(n,C[R],U);var B=U.len();if(!W&&G!==B){H=!1;break}F&&($[R][P]=F)}if(!H)for(var R in $)delete $[R].d;if(!o)for(var I=0;I<E;I++){var L=w[I],O=L.targetName;O==="style"&&M(L,$,function(Q){return ANIMATE_STYLE_MAP[Q]})}for(var Y=keys($),Z=!0,K,I=1;I<Y.length;I++){var ee=Y[I-1],j=Y[I];if($[ee][transformOriginKey]!==$[j][transformOriginKey]){Z=!1;break}K=$[ee][transformOriginKey]}if(Z&&K){for(var R in $)$[R][transformOriginKey]&&delete $[R][transformOriginKey];r[transformOriginKey]=K}if(filter(Y,function(J){return keys($[J]).length>0}).length){var q=addAnimation($,a);return q+" "+A[0]+" both"}}for(var b in d){var c=S(d[b]);c&&u.push(c)}if(u.length){var x=a.zrId+"-cls-"+getClassId();a.cssNodes["."+x]={animation:u.join(",")},r.class=x}}function createCSSEmphasis(n,r,a){if(!n.ignore)if(n.isSilent()){var o={"pointer-events":"none"};setClassAttribute(o,r,a)}else{var s=n.states.emphasis&&n.states.emphasis.style?n.states.emphasis.style:{},l=s.fill;if(!l){var u=n.style&&n.style.fill,c=n.states.select&&n.states.select.style&&n.states.select.style.fill,d=n.currentStates.indexOf("select")>=0&&c||u;d&&(l=liftColor(d))}var f=s.lineWidth;if(f){var p=!s.strokeNoScale&&n.transform?n.transform[0]:1;f=f/p}var o={cursor:"pointer"};l&&(o.fill=l),s.stroke&&(o.stroke=s.stroke),f&&(o["stroke-width"]=f),setClassAttribute(o,r,a)}}function setClassAttribute(n,r,a,o){var s=JSON.stringify(n),l=a.cssStyleCache[s];l||(l=a.zrId+"-cls-"+getClassId(),a.cssStyleCache[s]=l,a.cssNodes["."+l+":hover"]=n),r.class=r.class?r.class+" "+l:l}var round=Math.round;function isImageLike(n){return n&&isString(n.src)}function isCanvasLike(n){return n&&isFunction(n.toDataURL)}function setStyleAttrs(n,r,a,o){mapStyleToAttrs(function(s,l){var u=s==="fill"||s==="stroke";u&&isGradient(l)?setGradient(r,n,s,o):u&&isPattern(l)?setPattern(a,n,s,o):n[s]=l,u&&o.ssr&&l==="none"&&(n["pointer-events"]="visible")},r,a,!1),setShadow(a,n,o)}function setMetaData(n,r){var a=getElementSSRData(r);a&&(a.each(function(o,s){o!=null&&(n[(META_DATA_PREFIX+s).toLowerCase()]=o+"")}),r.isSilent()&&(n[META_DATA_PREFIX+"silent"]="true"))}function noRotateScale(n){return isAroundZero(n[0]-1)&&isAroundZero(n[1])&&isAroundZero(n[2])&&isAroundZero(n[3]-1)}function noTranslate(n){return isAroundZero(n[4])&&isAroundZero(n[5])}function setTransform(n,r,a){if(r&&!(noTranslate(r)&&noRotateScale(r))){var o=1e4;n.transform=noRotateScale(r)?"translate("+round(r[4]*o)/o+" "+round(r[5]*o)/o+")":getMatrixStr(r)}}function convertPolyShape(n,r,a){for(var o=n.points,s=[],l=0;l<o.length;l++)s.push(round(o[l][0]*a)/a),s.push(round(o[l][1]*a)/a);r.points=s.join(" ")}function validatePolyShape(n){return!n.smooth}function createAttrsConvert(n){var r=map$1(n,function(a){return typeof a=="string"?[a,a]:a});return function(a,o,s){for(var l=0;l<r.length;l++){var u=r[l],c=a[u[0]];c!=null&&(o[u[1]]=round(c*s)/s)}}}var builtinShapesDef={circle:[createAttrsConvert(["cx","cy","r"])],polyline:[convertPolyShape,validatePolyShape],polygon:[convertPolyShape,validatePolyShape]};function hasShapeAnimation(n){for(var r=n.animators,a=0;a<r.length;a++)if(r[a].targetName==="shape")return!0;return!1}function brushSVGPath(n,r){var a=n.style,o=n.shape,s=builtinShapesDef[n.type],l={},u=r.animation,c="path",d=n.style.strokePercent,f=r.compress&&getPathPrecision(n)||4;if(s&&!r.willUpdate&&!(s[1]&&!s[1](o))&&!(u&&hasShapeAnimation(n))&&!(d<1)){c=n.type;var p=Math.pow(10,f);s[0](o,l,p)}else{var v=!n.path||n.shapeChanged();n.path||n.createPathProxy();var g=n.path;v&&(g.beginPath(),n.buildPath(g,n.shape),n.pathUpdated());var y=g.getVersion(),_=n,S=_.__svgPathBuilder;(_.__svgPathVersion!==y||!S||d!==_.__svgPathStrokePercent)&&(S||(S=_.__svgPathBuilder=new SVGPathRebuilder),S.reset(f),g.rebuildPath(S,d),S.generateStr(),_.__svgPathVersion=y,_.__svgPathStrokePercent=d),l.d=S.getStr()}return setTransform(l,n.transform),setStyleAttrs(l,a,n,r),setMetaData(l,n),r.animation&&createCSSAnimation(n,l,r),r.emphasis&&createCSSEmphasis(n,l,r),createVNode(c,n.id+"",l)}function brushSVGImage(n,r){var a=n.style,o=a.image;if(o&&!isString(o)&&(isImageLike(o)?o=o.src:isCanvasLike(o)&&(o=o.toDataURL())),!!o){var s=a.x||0,l=a.y||0,u=a.width,c=a.height,d={href:o,width:u,height:c};return s&&(d.x=s),l&&(d.y=l),setTransform(d,n.transform),setStyleAttrs(d,a,n,r),setMetaData(d,n),r.animation&&createCSSAnimation(n,d,r),createVNode("image",n.id+"",d)}}function brushSVGTSpan(n,r){var a=n.style,o=a.text;if(o!=null&&(o+=""),!(!o||isNaN(a.x)||isNaN(a.y))){var s=a.font||DEFAULT_FONT,l=a.x||0,u=adjustTextY$1(a.y||0,getLineHeight(s),a.textBaseline),c=TEXT_ALIGN_TO_ANCHOR[a.textAlign]||a.textAlign,d={"dominant-baseline":"central","text-anchor":c};if(hasSeparateFont(a)){var f="",p=a.fontStyle,v=parseFontSize(a.fontSize);if(!parseFloat(v))return;var g=a.fontFamily||DEFAULT_FONT_FAMILY,y=a.fontWeight;f+="font-size:"+v+";font-family:"+g+";",p&&p!=="normal"&&(f+="font-style:"+p+";"),y&&y!=="normal"&&(f+="font-weight:"+y+";"),d.style=f}else d.style="font: "+s;return o.match(/\s/)&&(d["xml:space"]="preserve"),l&&(d.x=l),u&&(d.y=u),setTransform(d,n.transform),setStyleAttrs(d,a,n,r),setMetaData(d,n),r.animation&&createCSSAnimation(n,d,r),createVNode("text",n.id+"",d,void 0,o)}}function brush(n,r){if(n instanceof Path)return brushSVGPath(n,r);if(n instanceof ZRImage)return brushSVGImage(n,r);if(n instanceof TSpan)return brushSVGTSpan(n,r)}function setShadow(n,r,a){var o=n.style;if(hasShadow(o)){var s=getShadowKey(n),l=a.shadowCache,u=l[s];if(!u){var c=n.getGlobalScale(),d=c[0],f=c[1];if(!d||!f)return;var p=o.shadowOffsetX||0,v=o.shadowOffsetY||0,g=o.shadowBlur,y=normalizeColor(o.shadowColor),_=y.opacity,S=y.color,b=g/2/d,x=g/2/f,A=b+" "+x;u=a.zrId+"-s"+a.shadowIdx++,a.defs[u]=createVNode("filter",u,{id:u,x:"-100%",y:"-100%",width:"300%",height:"300%"},[createVNode("feDropShadow","",{dx:p/d,dy:v/f,stdDeviation:A,"flood-color":S,"flood-opacity":_})]),l[s]=u}r.filter=getIdURL(u)}}function setGradient(n,r,a,o){var s=n[a],l,u={gradientUnits:s.global?"userSpaceOnUse":"objectBoundingBox"};if(isLinearGradient(s))l="linearGradient",u.x1=s.x,u.y1=s.y,u.x2=s.x2,u.y2=s.y2;else if(isRadialGradient(s))l="radialGradient",u.cx=retrieve2(s.x,.5),u.cy=retrieve2(s.y,.5),u.r=retrieve2(s.r,.5);else return;for(var c=s.colorStops,d=[],f=0,p=c.length;f<p;++f){var v=round4(c[f].offset)*100+"%",g=c[f].color,y=normalizeColor(g),_=y.color,S=y.opacity,b={offset:v};b["stop-color"]=_,S<1&&(b["stop-opacity"]=S),d.push(createVNode("stop",f+"",b))}var x=createVNode(l,"",u,d),A=vNodeToString(x),w=o.gradientCache,E=w[A];E||(E=o.zrId+"-g"+o.gradientIdx++,w[A]=E,u.id=E,o.defs[E]=createVNode(l,E,u,d)),r[a]=getIdURL(E)}function setPattern(n,r,a,o){var s=n.style[a],l=n.getBoundingRect(),u={},c=s.repeat,d=c==="no-repeat",f=c==="repeat-x",p=c==="repeat-y",v;if(isImagePattern(s)){var g=s.imageWidth,y=s.imageHeight,_=void 0,S=s.image;if(isString(S)?_=S:isImageLike(S)?_=S.src:isCanvasLike(S)&&(_=S.toDataURL()),typeof Image>"u"){var b="Image width/height must been given explictly in svg-ssr renderer.";assert(g,b),assert(y,b)}else if(g==null||y==null){var x=function(I,L){if(I){var O=I.elm,R=g||L.width,N=y||L.height;I.tag==="pattern"&&(f?(N=1,R/=l.width):p&&(R=1,N/=l.height)),I.attrs.width=R,I.attrs.height=N,O&&(O.setAttribute("width",R),O.setAttribute("height",N))}},A=createOrUpdateImage(_,null,n,function(I){d||x(C,I),x(v,I)});A&&A.width&&A.height&&(g=g||A.width,y=y||A.height)}v=createVNode("image","img",{href:_,width:g,height:y}),u.width=g,u.height=y}else s.svgElement&&(v=clone$6(s.svgElement),u.width=s.svgWidth,u.height=s.svgHeight);if(v){var w,E;d?w=E=1:f?(E=1,w=u.width/l.width):p?(w=1,E=u.height/l.height):u.patternUnits="userSpaceOnUse",w!=null&&!isNaN(w)&&(u.width=w),E!=null&&!isNaN(E)&&(u.height=E);var D=getSRTTransformString(s);D&&(u.patternTransform=D);var C=createVNode("pattern","",u,[v]),$=vNodeToString(C),P=o.patternCache,M=P[$];M||(M=o.zrId+"-p"+o.patternIdx++,P[$]=M,u.id=M,C=o.defs[M]=createVNode("pattern",M,u,[v])),r[a]=getIdURL(M)}}function setClipPath(n,r,a){var o=a.clipPathCache,s=a.defs,l=o[n.id];if(!l){l=a.zrId+"-c"+a.clipPathIdx++;var u={id:l};o[n.id]=l,s[l]=createVNode("clipPath",l,u,[brushSVGPath(n,a)])}r["clip-path"]=getIdURL(l)}function createTextNode(n){return document.createTextNode(n)}function insertBefore(n,r,a){n.insertBefore(r,a)}function removeChild(n,r){n.removeChild(r)}function appendChild(n,r){n.appendChild(r)}function parentNode(n){return n.parentNode}function nextSibling(n){return n.nextSibling}function setTextContent(n,r){n.textContent=r}var colonChar=58,xChar=120,emptyNode=createVNode("","");function isUndef(n){return n===void 0}function isDef(n){return n!==void 0}function createKeyToOldIdx(n,r,a){for(var o={},s=r;s<=a;++s){var l=n[s].key;l!==void 0&&(o[l]=s)}return o}function sameVnode(n,r){var a=n.key===r.key,o=n.tag===r.tag;return o&&a}function createElm(n){var r,a=n.children,o=n.tag;if(isDef(o)){var s=n.elm=createElement(o);if(updateAttrs(emptyNode,n),isArray$1(a))for(r=0;r<a.length;++r){var l=a[r];l!=null&&appendChild(s,createElm(l))}else isDef(n.text)&&!isObject$3(n.text)&&appendChild(s,createTextNode(n.text))}else n.elm=createTextNode(n.text);return n.elm}function addVnodes(n,r,a,o,s){for(;o<=s;++o){var l=a[o];l!=null&&insertBefore(n,createElm(l),r)}}function removeVnodes(n,r,a,o){for(;a<=o;++a){var s=r[a];if(s!=null)if(isDef(s.tag)){var l=parentNode(s.elm);removeChild(l,s.elm)}else removeChild(n,s.elm)}}function updateAttrs(n,r){var a,o=r.elm,s=n&&n.attrs||{},l=r.attrs||{};if(s!==l){for(a in l){var u=l[a],c=s[a];c!==u&&(u===!0?o.setAttribute(a,""):u===!1?o.removeAttribute(a):a==="style"?o.style.cssText=u:a.charCodeAt(0)!==xChar?o.setAttribute(a,u):a==="xmlns:xlink"||a==="xmlns"?o.setAttributeNS(XMLNS,a,u):a.charCodeAt(3)===colonChar?o.setAttributeNS(XML_NAMESPACE,a,u):a.charCodeAt(5)===colonChar?o.setAttributeNS(XLINKNS,a,u):o.setAttribute(a,u))}for(a in s)a in l||o.removeAttribute(a)}}function updateChildren(n,r,a){for(var o=0,s=0,l=r.length-1,u=r[0],c=r[l],d=a.length-1,f=a[0],p=a[d],v,g,y,_;o<=l&&s<=d;)u==null?u=r[++o]:c==null?c=r[--l]:f==null?f=a[++s]:p==null?p=a[--d]:sameVnode(u,f)?(patchVnode(u,f),u=r[++o],f=a[++s]):sameVnode(c,p)?(patchVnode(c,p),c=r[--l],p=a[--d]):sameVnode(u,p)?(patchVnode(u,p),insertBefore(n,u.elm,nextSibling(c.elm)),u=r[++o],p=a[--d]):sameVnode(c,f)?(patchVnode(c,f),insertBefore(n,c.elm,u.elm),c=r[--l],f=a[++s]):(isUndef(v)&&(v=createKeyToOldIdx(r,o,l)),g=v[f.key],isUndef(g)?insertBefore(n,createElm(f),u.elm):(y=r[g],y.tag!==f.tag?insertBefore(n,createElm(f),u.elm):(patchVnode(y,f),r[g]=void 0,insertBefore(n,y.elm,u.elm))),f=a[++s]);(o<=l||s<=d)&&(o>l?(_=a[d+1]==null?null:a[d+1].elm,addVnodes(n,_,a,s,d)):removeVnodes(n,r,o,l))}function patchVnode(n,r){var a=r.elm=n.elm,o=n.children,s=r.children;n!==r&&(updateAttrs(n,r),isUndef(r.text)?isDef(o)&&isDef(s)?o!==s&&updateChildren(a,o,s):isDef(s)?(isDef(n.text)&&setTextContent(a,""),addVnodes(a,null,s,0,s.length-1)):isDef(o)?removeVnodes(a,o,0,o.length-1):isDef(n.text)&&setTextContent(a,""):n.text!==r.text&&(isDef(o)&&removeVnodes(a,o,0,o.length-1),setTextContent(a,r.text)))}function patch(n,r){if(sameVnode(n,r))patchVnode(n,r);else{var a=n.elm,o=parentNode(a);createElm(r),o!==null&&(insertBefore(o,r.elm,nextSibling(a)),removeVnodes(o,[n],0,0))}return r}var svgId=0,SVGPainter=function(){function n(r,a,o){if(this.type="svg",this.refreshHover=createMethodNotSupport(),this.configLayer=createMethodNotSupport(),this.storage=a,this._opts=o=extend$2({},o),this.root=r,this._id="zr"+svgId++,this._oldVNode=createSVGVNode(o.width,o.height),r&&!o.ssr){var s=this._viewport=document.createElement("div");s.style.cssText="position:relative;overflow:hidden";var l=this._svgDom=this._oldVNode.elm=createElement("svg");updateAttrs(null,this._oldVNode),s.appendChild(l),r.appendChild(s)}this.resize(o.width,o.height)}return n.prototype.getType=function(){return this.type},n.prototype.getViewportRoot=function(){return this._viewport},n.prototype.getViewportRootOffset=function(){var r=this.getViewportRoot();if(r)return{offsetLeft:r.offsetLeft||0,offsetTop:r.offsetTop||0}},n.prototype.getSvgDom=function(){return this._svgDom},n.prototype.refresh=function(){if(this.root){var r=this.renderToVNode({willUpdate:!0});r.attrs.style="position:absolute;left:0;top:0;user-select:none",patch(this._oldVNode,r),this._oldVNode=r}},n.prototype.renderOneToVNode=function(r){return brush(r,createBrushScope(this._id))},n.prototype.renderToVNode=function(r){r=r||{};var a=this.storage.getDisplayList(!0),o=this._width,s=this._height,l=createBrushScope(this._id);l.animation=r.animation,l.willUpdate=r.willUpdate,l.compress=r.compress,l.emphasis=r.emphasis,l.ssr=this._opts.ssr;var u=[],c=this._bgVNode=createBackgroundVNode(o,s,this._backgroundColor,l);c&&u.push(c);var d=r.compress?null:this._mainVNode=createVNode("g","main",{},[]);this._paintList(a,l,d?d.children:u),d&&u.push(d);var f=map$1(keys(l.defs),function(g){return l.defs[g]});if(f.length&&u.push(createVNode("defs","defs",{},f)),r.animation){var p=getCssString(l.cssNodes,l.cssAnims,{newline:!0});if(p){var v=createVNode("style","stl",{},[],p);u.push(v)}}return createSVGVNode(o,s,u,r.useViewBox)},n.prototype.renderToString=function(r){return r=r||{},vNodeToString(this.renderToVNode({animation:retrieve2(r.cssAnimation,!0),emphasis:retrieve2(r.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:retrieve2(r.useViewBox,!0)}),{newline:!0})},n.prototype.setBackgroundColor=function(r){this._backgroundColor=r},n.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},n.prototype._paintList=function(r,a,o){for(var s=r.length,l=[],u=0,c,d,f=0,p=0;p<s;p++){var v=r[p];if(!v.invisible){var g=v.__clipPaths,y=g&&g.length||0,_=d&&d.length||0,S=void 0;for(S=Math.max(y-1,_-1);S>=0&&!(g&&d&&g[S]===d[S]);S--);for(var b=_-1;b>S;b--)u--,c=l[u-1];for(var x=S+1;x<y;x++){var A={};setClipPath(g[x],A,a);var w=createVNode("g","clip-g-"+f++,A,[]);(c?c.children:o).push(w),l[u++]=w,c=w}d=g;var E=brush(v,a);E&&(c?c.children:o).push(E)}}},n.prototype.resize=function(r,a){var o=this._opts,s=this.root,l=this._viewport;if(r!=null&&(o.width=r),a!=null&&(o.height=a),s&&l&&(l.style.display="none",r=getSize$1(s,0,o),a=getSize$1(s,1,o),l.style.display=""),this._width!==r||this._height!==a){if(this._width=r,this._height=a,l){var u=l.style;u.width=r+"px",u.height=a+"px"}if(isPattern(this._backgroundColor))this.refresh();else{var c=this._svgDom;c&&(c.setAttribute("width",r),c.setAttribute("height",a));var d=this._bgVNode&&this._bgVNode.elm;d&&(d.setAttribute("width",r),d.setAttribute("height",a))}}},n.prototype.getWidth=function(){return this._width},n.prototype.getHeight=function(){return this._height},n.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},n.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},n.prototype.toDataURL=function(r){var a=this.renderToString(),o="data:image/svg+xml;";return r?(a=encodeBase64(a),a&&o+"base64,"+a):o+"charset=UTF-8,"+encodeURIComponent(a)},n}();function createMethodNotSupport(n){return function(){}}function createBackgroundVNode(n,r,a,o){var s;if(a&&a!=="none")if(s=createVNode("rect","bg",{width:n,height:r,x:"0",y:"0"}),isGradient(a))setGradient({fill:a},s.attrs,"fill",o);else if(isPattern(a))setPattern({style:{fill:a},dirty:noop,getBoundingRect:function(){return{width:n,height:r}}},s.attrs,"fill",o);else{var l=normalizeColor(a),u=l.color,c=l.opacity;s.attrs.fill=u,c<1&&(s.attrs["fill-opacity"]=c)}return s}function install$1(n){n.registerPainter("svg",SVGPainter)}function createDom(n,r,a){var o=platformApi.createCanvas(),s=r.getWidth(),l=r.getHeight(),u=o.style;return u&&(u.position="absolute",u.left="0",u.top="0",u.width=s+"px",u.height=l+"px",o.setAttribute("data-zr-dom-id",n)),o.width=s*a,o.height=l*a,o}var Layer=function(n){__extends(r,n);function r(a,o,s){var l=n.call(this)||this;l.motionBlur=!1,l.lastFrameAlpha=.7,l.dpr=1,l.virtual=!1,l.config={},l.incremental=!1,l.zlevel=0,l.maxRepaintRectCount=5,l.__dirty=!0,l.__firstTimePaint=!0,l.__used=!1,l.__drawIndex=0,l.__startIndex=0,l.__endIndex=0,l.__prevStartIndex=null,l.__prevEndIndex=null;var u;s=s||devicePixelRatio,typeof a=="string"?u=createDom(a,o,s):isObject$3(a)&&(u=a,a=u.id),l.id=a,l.dom=u;var c=u.style;return c&&(disableUserSelect(u),u.onselectstart=function(){return!1},c.padding="0",c.margin="0",c.borderWidth="0"),l.painter=o,l.dpr=s,l}return r.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},r.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},r.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},r.prototype.setUnpainted=function(){this.__firstTimePaint=!0},r.prototype.createBackBuffer=function(){var a=this.dpr;this.domBack=createDom("back-"+this.id,this.painter,a),this.ctxBack=this.domBack.getContext("2d"),a!==1&&this.ctxBack.scale(a,a)},r.prototype.createRepaintRects=function(a,o,s,l){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var u=[],c=this.maxRepaintRectCount,d=!1,f=new BoundingRect(0,0,0,0);function p(A){if(!(!A.isFinite()||A.isZero()))if(u.length===0){var w=new BoundingRect(0,0,0,0);w.copy(A),u.push(w)}else{for(var E=!1,D=1/0,C=0,$=0;$<u.length;++$){var P=u[$];if(P.intersect(A)){var M=new BoundingRect(0,0,0,0);M.copy(P),M.union(A),u[$]=M,E=!0;break}else if(d){f.copy(A),f.union(P);var I=A.width*A.height,L=P.width*P.height,O=f.width*f.height,R=O-I-L;R<D&&(D=R,C=$)}}if(d&&(u[C].union(A),E=!0),!E){var w=new BoundingRect(0,0,0,0);w.copy(A),u.push(w)}d||(d=u.length>=c)}}for(var v=this.__startIndex;v<this.__endIndex;++v){var g=a[v];if(g){var y=g.shouldBePainted(s,l,!0,!0),_=g.__isRendered&&(g.__dirty&REDRAW_BIT||!y)?g.getPrevPaintRect():null;_&&p(_);var S=y&&(g.__dirty&REDRAW_BIT||!g.__isRendered)?g.getPaintRect():null;S&&p(S)}}for(var v=this.__prevStartIndex;v<this.__prevEndIndex;++v){var g=o[v],y=g&&g.shouldBePainted(s,l,!0,!0);if(g&&(!y||!g.__zr)&&g.__isRendered){var _=g.getPrevPaintRect();_&&p(_)}}var b;do{b=!1;for(var v=0;v<u.length;){if(u[v].isZero()){u.splice(v,1);continue}for(var x=v+1;x<u.length;)u[v].intersect(u[x])?(b=!0,u[v].union(u[x]),u.splice(x,1)):x++;v++}}while(b);return this._paintRects=u,u},r.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},r.prototype.resize=function(a,o){var s=this.dpr,l=this.dom,u=l.style,c=this.domBack;u&&(u.width=a+"px",u.height=o+"px"),l.width=a*s,l.height=o*s,c&&(c.width=a*s,c.height=o*s,s!==1&&this.ctxBack.scale(s,s))},r.prototype.clear=function(a,o,s){var l=this.dom,u=this.ctx,c=l.width,d=l.height;o=o||this.clearColor;var f=this.motionBlur&&!a,p=this.lastFrameAlpha,v=this.dpr,g=this;f&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(l,0,0,c/v,d/v));var y=this.domBack;function _(S,b,x,A){if(u.clearRect(S,b,x,A),o&&o!=="transparent"){var w=void 0;if(isGradientObject(o)){var E=o.global||o.__width===x&&o.__height===A;w=E&&o.__canvasGradient||getCanvasGradient(u,o,{x:0,y:0,width:x,height:A}),o.__canvasGradient=w,o.__width=x,o.__height=A}else isImagePatternObject(o)&&(o.scaleX=o.scaleX||v,o.scaleY=o.scaleY||v,w=createCanvasPattern(u,o,{dirty:function(){g.setUnpainted(),g.painter.refresh()}}));u.save(),u.fillStyle=w||o,u.fillRect(S,b,x,A),u.restore()}f&&(u.save(),u.globalAlpha=p,u.drawImage(y,S,b,x,A),u.restore())}!s||f?_(0,0,c,d):s.length&&each$f(s,function(S){_(S.x*v,S.y*v,S.width*v,S.height*v)})},r}(Eventful),HOVER_LAYER_ZLEVEL=1e5,CANVAS_ZLEVEL=314159,EL_AFTER_INCREMENTAL_INC=.01,INCREMENTAL_INC=.001;function isLayerValid(n){return n?n.__builtin__?!0:!(typeof n.resize!="function"||typeof n.refresh!="function"):!1}function createRoot(n,r){var a=document.createElement("div");return a.style.cssText=["position:relative","width:"+n+"px","height:"+r+"px","padding:0","margin:0","border-width:0"].join(";")+";",a}var CanvasPainter=function(){function n(r,a,o,s){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var l=!r.nodeName||r.nodeName.toUpperCase()==="CANVAS";this._opts=o=extend$2({},o||{}),this.dpr=o.devicePixelRatio||devicePixelRatio,this._singleCanvas=l,this.root=r;var u=r.style;u&&(disableUserSelect(r),r.innerHTML=""),this.storage=a;var c=this._zlevelList;this._prevDisplayList=[];var d=this._layers;if(l){var p=r,v=p.width,g=p.height;o.width!=null&&(v=o.width),o.height!=null&&(g=o.height),this.dpr=o.devicePixelRatio||1,p.width=v*this.dpr,p.height=g*this.dpr,this._width=v,this._height=g;var y=new Layer(p,this,this.dpr);y.__builtin__=!0,y.initContext(),d[CANVAS_ZLEVEL]=y,y.zlevel=CANVAS_ZLEVEL,c.push(CANVAS_ZLEVEL),this._domRoot=r}else{this._width=getSize$1(r,0,o),this._height=getSize$1(r,1,o);var f=this._domRoot=createRoot(this._width,this._height);r.appendChild(f)}}return n.prototype.getType=function(){return"canvas"},n.prototype.isSingleCanvas=function(){return this._singleCanvas},n.prototype.getViewportRoot=function(){return this._domRoot},n.prototype.getViewportRootOffset=function(){var r=this.getViewportRoot();if(r)return{offsetLeft:r.offsetLeft||0,offsetTop:r.offsetTop||0}},n.prototype.refresh=function(r){var a=this.storage.getDisplayList(!0),o=this._prevDisplayList,s=this._zlevelList;this._redrawId=Math.random(),this._paintList(a,o,r,this._redrawId);for(var l=0;l<s.length;l++){var u=s[l],c=this._layers[u];if(!c.__builtin__&&c.refresh){var d=l===0?this._backgroundColor:null;c.refresh(d)}}return this._opts.useDirtyRect&&(this._prevDisplayList=a.slice()),this},n.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},n.prototype._paintHoverList=function(r){var a=r.length,o=this._hoverlayer;if(o&&o.clear(),!!a){for(var s={inHover:!0,viewWidth:this._width,viewHeight:this._height},l,u=0;u<a;u++){var c=r[u];c.__inHover&&(o||(o=this._hoverlayer=this.getLayer(HOVER_LAYER_ZLEVEL)),l||(l=o.ctx,l.save()),brush$1(l,c,s,u===a-1))}l&&l.restore()}},n.prototype.getHoverLayer=function(){return this.getLayer(HOVER_LAYER_ZLEVEL)},n.prototype.paintOne=function(r,a){brushSingle(r,a)},n.prototype._paintList=function(r,a,o,s){if(this._redrawId===s){o=o||!1,this._updateLayerStatus(r);var l=this._doPaintList(r,a,o),u=l.finished,c=l.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),c&&this._paintHoverList(r),u)this.eachLayer(function(f){f.afterBrush&&f.afterBrush()});else{var d=this;requestAnimationFrame$1(function(){d._paintList(r,a,o,s)})}}},n.prototype._compositeManually=function(){var r=this.getLayer(CANVAS_ZLEVEL).ctx,a=this._domRoot.width,o=this._domRoot.height;r.clearRect(0,0,a,o),this.eachBuiltinLayer(function(s){s.virtual&&r.drawImage(s.dom,0,0,a,o)})},n.prototype._doPaintList=function(r,a,o){for(var s=this,l=[],u=this._opts.useDirtyRect,c=0;c<this._zlevelList.length;c++){var d=this._zlevelList[c],f=this._layers[d];f.__builtin__&&f!==this._hoverlayer&&(f.__dirty||o)&&l.push(f)}for(var p=!0,v=!1,g=function(S){var b=l[S],x=b.ctx,A=u&&b.createRepaintRects(r,a,y._width,y._height),w=o?b.__startIndex:b.__drawIndex,E=!o&&b.incremental&&Date.now,D=E&&Date.now(),C=b.zlevel===y._zlevelList[0]?y._backgroundColor:null;if(b.__startIndex===b.__endIndex)b.clear(!1,C,A);else if(w===b.__startIndex){var $=r[w];(!$.incremental||!$.notClear||o)&&b.clear(!1,C,A)}w===-1&&(w=b.__startIndex);var P,M=function(R){var N={inHover:!1,allClipped:!1,prevEl:null,viewWidth:s._width,viewHeight:s._height};for(P=w;P<b.__endIndex;P++){var V=r[P];if(V.__inHover&&(v=!0),s._doPaintEl(V,b,u,R,N,P===b.__endIndex-1),E){var F=Date.now()-D;if(F>15)break}}N.prevElClipPaths&&x.restore()};if(A)if(A.length===0)P=b.__endIndex;else for(var I=y.dpr,L=0;L<A.length;++L){var O=A[L];x.save(),x.beginPath(),x.rect(O.x*I,O.y*I,O.width*I,O.height*I),x.clip(),M(O),x.restore()}else x.save(),M(),x.restore();b.__drawIndex=P,b.__drawIndex<b.__endIndex&&(p=!1)},y=this,_=0;_<l.length;_++)g(_);return env.wxa&&each$f(this._layers,function(S){S&&S.ctx&&S.ctx.draw&&S.ctx.draw()}),{finished:p,needsRefreshHover:v}},n.prototype._doPaintEl=function(r,a,o,s,l,u){var c=a.ctx;if(o){var d=r.getPaintRect();(!s||d&&d.intersect(s))&&(brush$1(c,r,l,u),r.setPrevPaintRect(d))}else brush$1(c,r,l,u)},n.prototype.getLayer=function(r,a){this._singleCanvas&&!this._needsManuallyCompositing&&(r=CANVAS_ZLEVEL);var o=this._layers[r];return o||(o=new Layer("zr_"+r,this,this.dpr),o.zlevel=r,o.__builtin__=!0,this._layerConfig[r]?merge(o,this._layerConfig[r],!0):this._layerConfig[r-EL_AFTER_INCREMENTAL_INC]&&merge(o,this._layerConfig[r-EL_AFTER_INCREMENTAL_INC],!0),a&&(o.virtual=a),this.insertLayer(r,o),o.initContext()),o},n.prototype.insertLayer=function(r,a){var o=this._layers,s=this._zlevelList,l=s.length,u=this._domRoot,c=null,d=-1;if(!o[r]&&isLayerValid(a)){if(l>0&&r>s[0]){for(d=0;d<l-1&&!(s[d]<r&&s[d+1]>r);d++);c=o[s[d]]}if(s.splice(d+1,0,r),o[r]=a,!a.virtual)if(c){var f=c.dom;f.nextSibling?u.insertBefore(a.dom,f.nextSibling):u.appendChild(a.dom)}else u.firstChild?u.insertBefore(a.dom,u.firstChild):u.appendChild(a.dom);a.painter||(a.painter=this)}},n.prototype.eachLayer=function(r,a){for(var o=this._zlevelList,s=0;s<o.length;s++){var l=o[s];r.call(a,this._layers[l],l)}},n.prototype.eachBuiltinLayer=function(r,a){for(var o=this._zlevelList,s=0;s<o.length;s++){var l=o[s],u=this._layers[l];u.__builtin__&&r.call(a,u,l)}},n.prototype.eachOtherLayer=function(r,a){for(var o=this._zlevelList,s=0;s<o.length;s++){var l=o[s],u=this._layers[l];u.__builtin__||r.call(a,u,l)}},n.prototype.getLayers=function(){return this._layers},n.prototype._updateLayerStatus=function(r){this.eachBuiltinLayer(function(v,g){v.__dirty=v.__used=!1});function a(v){l&&(l.__endIndex!==v&&(l.__dirty=!0),l.__endIndex=v)}if(this._singleCanvas)for(var o=1;o<r.length;o++){var s=r[o];if(s.zlevel!==r[o-1].zlevel||s.incremental){this._needsManuallyCompositing=!0;break}}var l=null,u=0,c,d;for(d=0;d<r.length;d++){var s=r[d],f=s.zlevel,p=void 0;c!==f&&(c=f,u=0),s.incremental?(p=this.getLayer(f+INCREMENTAL_INC,this._needsManuallyCompositing),p.incremental=!0,u=1):p=this.getLayer(f+(u>0?EL_AFTER_INCREMENTAL_INC:0),this._needsManuallyCompositing),p.__builtin__||logError("ZLevel "+f+" has been used by unkown layer "+p.id),p!==l&&(p.__used=!0,p.__startIndex!==d&&(p.__dirty=!0),p.__startIndex=d,p.incremental?p.__drawIndex=-1:p.__drawIndex=d,a(d),l=p),s.__dirty&REDRAW_BIT&&!s.__inHover&&(p.__dirty=!0,p.incremental&&p.__drawIndex<0&&(p.__drawIndex=d))}a(d),this.eachBuiltinLayer(function(v,g){!v.__used&&v.getElementCount()>0&&(v.__dirty=!0,v.__startIndex=v.__endIndex=v.__drawIndex=0),v.__dirty&&v.__drawIndex<0&&(v.__drawIndex=v.__startIndex)})},n.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},n.prototype._clearLayer=function(r){r.clear()},n.prototype.setBackgroundColor=function(r){this._backgroundColor=r,each$f(this._layers,function(a){a.setUnpainted()})},n.prototype.configLayer=function(r,a){if(a){var o=this._layerConfig;o[r]?merge(o[r],a,!0):o[r]=a;for(var s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s];if(l===r||l===r+EL_AFTER_INCREMENTAL_INC){var u=this._layers[l];merge(u,o[r],!0)}}}},n.prototype.delLayer=function(r){var a=this._layers,o=this._zlevelList,s=a[r];s&&(s.dom.parentNode.removeChild(s.dom),delete a[r],o.splice(indexOf(o,r),1))},n.prototype.resize=function(r,a){if(this._domRoot.style){var o=this._domRoot;o.style.display="none";var s=this._opts,l=this.root;if(r!=null&&(s.width=r),a!=null&&(s.height=a),r=getSize$1(l,0,s),a=getSize$1(l,1,s),o.style.display="",this._width!==r||a!==this._height){o.style.width=r+"px",o.style.height=a+"px";for(var u in this._layers)this._layers.hasOwnProperty(u)&&this._layers[u].resize(r,a);this.refresh(!0)}this._width=r,this._height=a}else{if(r==null||a==null)return;this._width=r,this._height=a,this.getLayer(CANVAS_ZLEVEL).resize(r,a)}return this},n.prototype.clearLayer=function(r){var a=this._layers[r];a&&a.clear()},n.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},n.prototype.getRenderedCanvas=function(r){if(r=r||{},this._singleCanvas&&!this._compositeManually)return this._layers[CANVAS_ZLEVEL].dom;var a=new Layer("image",this,r.pixelRatio||this.dpr);a.initContext(),a.clear(!1,r.backgroundColor||this._backgroundColor);var o=a.ctx;if(r.pixelRatio<=this.dpr){this.refresh();var s=a.dom.width,l=a.dom.height;this.eachLayer(function(v){v.__builtin__?o.drawImage(v.dom,0,0,s,l):v.renderToCanvas&&(o.save(),v.renderToCanvas(o),o.restore())})}else for(var u={inHover:!1,viewWidth:this._width,viewHeight:this._height},c=this.storage.getDisplayList(!0),d=0,f=c.length;d<f;d++){var p=c[d];brush$1(o,p,u,d===f-1)}return a.dom},n.prototype.getWidth=function(){return this._width},n.prototype.getHeight=function(){return this._height},n}();function install(n){n.registerPainter("canvas",CanvasPainter)}const isDark=useDark();use([install$S,install$k,install$r,installLabelLayout,install$8,install,installUniversalTransition,install$a,install$1,install$n,install$b,install$R,install$Q,install$K,install$i,install$2,install$5,install$j,install$l]);const __unplugin_components_0$3=defineComponent({name:"BtEchart",props:{width:{type:String,default:"100%"},height:{type:String,default:"100%"},options:{type:Object}},setup(n,{expose:r}){const a=ref(),o=shallowRef();watch(()=>n.options,l=>{var u;o.value&&((u=o.value)==null||u.setOption({...l,backgroundColor:(isDark.value,"transparent")}))});const s=()=>{var l;return(l=o.value)==null?void 0:l.resize()};return onMounted(()=>{var l;n.options&&(o.value=init$1(a.value,isDark.value?"dark":"light"),(l=o.value)==null||l.setOption({...n.options,backgroundColor:(isDark.value,"transparent")}),window.addEventListener("resize",s),s())}),onUnmounted(()=>{var l;(l=o.value)==null||l.dispose(),window.removeEventListener("resize",s)}),r({chart:o}),()=>createVNode$1("div",{ref:a,style:{width:n.width,height:n.height}},null)}}),useECharts=n=>{const r=ref(),{options:a,defalut:o}=toRaw(n),s=shallowRef(),l=c=>r.value.chart.setOption(c),u=(c,d)=>{r==null||r.value.chart.setOption({xAxis:{data:c},series:d.map(f=>({data:f}))})};return isFunction$1(a)?s.value=a([],[[]]):s.value=a,{BtECharts:c=>createVNode$1(__unplugin_components_0$3,mergeProps(c,{ref:r,options:s.value}),null),getEChart:async()=>(await nextTick(),r.value.chart),setOption:l,setQuickOption:u}};function _isSlot$6(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!isVNode$1(n)}const __unplugin_components_2$5=defineComponent({name:"BtForm",props:{...formProps},setup(n,{attrs:r,slots:a,expose:o}){const s=ref(),l=reactive({});return o(l),onMounted(()=>{Object.assign(l,{...s.value})}),()=>createVNode$1(ElForm,mergeProps({ref:s},r,{onSubmit:u=>u.preventDefault()},n),_isSlot$6(a)?a:{default:()=>[a]})}});function _isSlot$5(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!isVNode$1(n)}const BtFormItem=defineComponent({name:"BtFormItem",props:{...formItemProps},setup(n,{attrs:r,slots:a}){return()=>createVNode$1(ElFormItem,mergeProps(r,n),_isSlot$5(a)?a:{default:()=>[a]})}}),__unplugin_components_0$2=defineComponent({name:"BtCheckbox",props:{...checkboxProps,options:{type:Array,required:!0},type:{type:String,default:"checkbox"}},setup(n,{attrs:r,slots:a}){return()=>createVNode$1(ElCheckboxGroup,mergeProps(r,n),{default:()=>[n.type==="checkbox"?n.options.map((o,s)=>o.isHide?null:createVNode$1(ElCheckbox,{key:s,value:o.value,disabled:o.disabled},{default:()=>[o.label]})):n.options.map((o,s)=>o.isHide?null:createVNode$1(ElCheckboxButton,{key:s,modelValue:o.value,"onUpdate:modelValue":l=>o.value=l,disabled:o.disabled},{default:()=>[o.label]}))]})}}),__unplugin_components_10=defineComponent({name:"BtHelp",props:{options:{type:Array,default:()=>[]},listStyle:{type:String,default:"disc"}},setup(n,{attrs:r,slots:a}){const o=l=>{if(isObject$4(l)&&has$2("__name",l))return l;if(isFunction$1(l)){const u=l();return isPromise(u)?defineAsyncComponent(()=>u):u}return l};let s=n.options instanceof Function?n.options():n.options;return watch(()=>n.options,l=>{l instanceof Function||(s=l)}),()=>{var l;return createVNode$1("ul",mergeProps({class:"text-secondary mt-[2px] leading-[2rem] text-small ml-[20px] list-".concat(n.listStyle)},r),[s.map((u,c)=>u.isHtml?createVNode$1("li",{key:c,innerHTML:u.content},null):createVNode$1("li",{key:c},[o(u.content)])),(l=a==null?void 0:a.default)==null?void 0:l.call(a)])}}}),__unplugin_components_2$4=defineComponent({name:"BtInput",props:{width:{type:[String,Number],default:"100%"},textType:{type:String,default:""},prependText:{type:String,default:""},...inputProps,modelValue:{type:[String,Number],default:""}},emits:["iconClick","focus","blur","input","keyup","change"],setup(n,{slots:r,emit:a,attrs:o}){ref(n.modelValue);const s=ref(!1),l=p=>{a("focus",p),s.value=!0},u=p=>{a("blur",p),s.value=!1},c=p=>{a("input",p)},d=p=>{a("change",p)},f=p=>a("keyup",p);return()=>createVNode$1("div",{class:"".concat(r.unit?"flex items-center":"")},[createVNode$1(ElInput,mergeProps(n,{onInput:c,onChange:d,onFocus:l,onBlur:u,onKeyup:f},o,{style:{width:n.width}}),{...r,...r.append||n.textType?{append:()=>r.append?r.append():createVNode$1("span",null,[n.textType])}:{},...r.prepend||n.prependText?{prepend:()=>r.prepend?r.prepend():createVNode$1("span",null,[n.prependText])}:{}}),r.unit&&createVNode$1("div",{class:"text-small text-secondary ml-[0.4rem]"},[r.unit()])])}}),__unplugin_components_5$1=defineComponent({props:{...radioGroupProps,options:{type:Array,required:!0},type:{type:String,default:"radio"}},setup(n,{attrs:r}){return()=>createVNode$1(ElRadioGroup,mergeProps({class:"flex items-center"},r,n),{default:()=>[n.type==="radio"?n.options.map((a,o)=>a.isHide?null:createVNode$1(ElRadio,{key:o,value:a.value,disabled:a.disabled},{default:()=>[a.label]})):n.options.map((a,o)=>a.isHide?null:createVNode$1(ElRadioButton,{key:o,value:a.value,disabled:a.disabled},{default:()=>[a.label]}))]})}}),__unplugin_components_2$3=defineComponent({props:{disabled:{type:Boolean,default:!1},options:{type:Array}},setup(n,{attrs:r,slots:a}){return()=>createVNode$1(ElSelect,mergeProps(r,{class:r.multiple===!0||has$2("multiple",r)?"bt-multiple-select":"",disabled:n.disabled}),{default:()=>{var o,s,l,u,c,d,f,p;return[n.options?n.options.map((v,g)=>createVNode$1(ElOption,{key:g,label:v.label,value:v.value,disabled:v==null?void 0:v.disabled},{default:()=>[has$2("render",v)?v==null?void 0:v.render(v,g):has$2("isStatus",v)?createVNode$1("div",{class:"flex flex-row items-center content-between"},[createVNode$1("span",{class:"block mr-1 w-[5px] h-[5px]",style:"background-color:".concat(v.isStatus==="success"?"var(--el-color-primary)":v.isStatus==="warning"?"#2034a5":"red")},null),createVNode$1("span",null,[v.label])]):createVNode$1("span",null,[v.label])]})):(o=a==null?void 0:a.default)==null?void 0:o.call(a),(s=a==null?void 0:a.header)==null?void 0:s.call(a),(l=a==null?void 0:a.footer)==null?void 0:l.call(a),(u=a==null?void 0:a.prefix)==null?void 0:u.call(a),(c=a==null?void 0:a.empty)==null?void 0:c.call(a),(d=a==null?void 0:a.tag)==null?void 0:d.call(a),(f=a==null?void 0:a.loading)==null?void 0:f.call(a),(p=a==null?void 0:a.label)==null?void 0:p.call(a)]}})}});function _isSlot$4(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!isVNode$1(n)}const __unplugin_components_0$1=defineComponent({name:"BtSwitch",props:{...switchProps},setup(n,{attrs:r,slots:a}){return()=>createVNode$1(ElSwitch,mergeProps(r,n),_isSlot$4(a)?a:{default:()=>[a]})}});function _isSlot$3(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!isVNode$1(n)}const __unplugin_components_5=defineComponent({name:"BtButton",props:{...buttonProps},setup(n,{slots:r,attrs:a}){return()=>createVNode$1(ElButton,mergeProps(n,a),_isSlot$3(r)?r:{default:()=>[r]})}});function _isSlot$2(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!isVNode$1(n)}const renderFormType=(n,r)=>{let a=createVNode$1("div",null,[createTextVNode("未知类型,请检查类型,或使用"),/type:'custom'/,createTextVNode("自定义渲染")]);switch(n.type){case"input":case"textarea":a=renderInput(n,r);break;case"select":a=renderSelect(n,r);break;case"checkbox":case"checkbox:button":a=renderCheckbox(n,r);break;case"radio":case"radio:button":a=renderRadio(n,r);break;case"switch":a=renderSwitch(n,r);break;case"help":a=renderHelp(n);break;case"button":a=renderButton(n);break;default:return}return a},getFormKey=(n,r)=>{let a="";if(isObject$4(n.key)){if(a=Object.keys(n.key)[0],!a)return"";const o=n.key;has$2(a,r.value)||(r.value[a]=isFunction$1(o[a])?o[a]():o[a])}else a=n.key,!has$2(a,r.value)&&a&&(r.value[a]=isFunction$1(n.key)?n.key():"");return a},renderInput=(n,r)=>{var u;const a=((u=n.attrs)==null?void 0:u.type)||n.type,o=getFormKey(n,r),{attrs:s,slots:l}=n;return createVNode$1(__unplugin_components_2$4,mergeProps(s||{},{modelValue:r.value[o],"onUpdate:modelValue":c=>r.value[o]=c,type:a}),_isSlot$2(l)?l:{default:()=>[l]})},renderSelect=(n,r)=>{const{attrs:a,slots:o}=n,s=getFormKey(n,r);return createVNode$1(__unplugin_components_2$3,mergeProps({options:n.options},a||{},{modelValue:r.value[s],"onUpdate:modelValue":l=>r.value[s]=l}),_isSlot$2(o)?o:{default:()=>[o]})},renderCheckbox=(n,r)=>{const{attrs:a,slots:o,type:s}=n,l=s.split(":")[1],u=getFormKey(n,r);return createVNode$1(__unplugin_components_0$2,mergeProps({options:n.options,type:l},a||{},{modelValue:r.value[u],"onUpdate:modelValue":c=>r.value[u]=c}),_isSlot$2(o)?o:{default:()=>[o]})},renderButton=n=>{const{attrs:r,slots:a}=n;return createVNode$1(__unplugin_components_5,r||{},_isSlot$2(a)?a:{default:()=>[a]})},renderRadio=(n,r)=>{const{attrs:a,slots:o,type:s}=n,l=s.split(":")[1],u=getFormKey(n,r);return createVNode$1(__unplugin_components_5$1,mergeProps({options:n.options,type:l},a||{},{modelValue:r.value[u],"onUpdate:modelValue":c=>r.value[u]=c}),_isSlot$2(o)?o:{default:()=>[o]})},renderSwitch=(n,r)=>{const{attrs:a,slots:o}=n,s=getFormKey(n,r);return createVNode$1(__unplugin_components_0$1,mergeProps(a||{},{modelValue:r.value[s],"onUpdate:modelValue":l=>r.value[s]=l}),_isSlot$2(o)?o:{default:()=>[o]})},renderHelp=n=>{var r;return createVNode$1(__unplugin_components_10,{options:n.options,listStyle:"disc",class:((r=n.attrs)==null?void 0:r.class)||""},null)},renderGroup=(n,r)=>n.group.map(a=>{let o;return a.type==="custom"?a.render(r):createVNode$1(BtFormItem,mergeProps({label:(a==null?void 0:a.label)||"",prop:getFormKey(a,r)},(a==null?void 0:a.labelAttrs)||{}),_isSlot$2(o=renderFormType(a,r))?o:{default:()=>[o]})});function _isSlot$1(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!isVNode$1(n)}const renderFormItem=(n,r)=>{let a,o=getFormKey(n,r);if(n.type!=="slots")switch(n.type){case"custom":return n.render(r);case"group":return createVNode$1("div",{class:"flex flex-wrap w-full"},[renderGroup(n,r)]);default:return createVNode$1(BtFormItem,mergeProps({label:n.label||"",prop:o},(n==null?void 0:n.labelAttrs)||{}),_isSlot$1(a=renderFormType(n,r))?a:{default:()=>[a]})}},useForm=n=>{var c;const r=ref(),a=ref({});ref([]);const o=shallowRef({}),s=isFunction$1(n.options)&&n.options(a,(c=r.value)==null?void 0:c.validate())||(isRef(n.options)?n.options:ref(n.options||{}));if(!s)return;const l=(d,f)=>{if(d.type!=="help")if(d.type==="slots"||d.type==="custom")for(const p in d==null?void 0:d.rules)f.value[p]||(f.value[p]=d.rules[p]);else if(d.type==="group")for(const p of d==null?void 0:d.group)p&&"key"in p&&(f.value[p.key]||(f.value[p.key]=p.rules||[]));else d!=null&&d.key&&(f.value[d.key]=d.rules||[])};return(async()=>{isPromise(n.data)?n.data.then(d=>{d.has("data")?a.value=d.data||{}:a.value=d||{}}):isFunction$1(n.data)?a.value=await n.data()||{}:a.value=n.data||{}})(),{BtForm:(d,{attrs:f,slots:p})=>{let v;return createVNode$1(__unplugin_components_2$5,mergeProps({model:a.value,ref:r,rules:o.value},f),_isSlot$1(v=s.value.map(g=>g?(l(g,o),g.type==="slots"?p[g.key]?p[g.key](a):null:renderFormItem(g,a)):null))?v:{default:()=>[v]})},clearValidate:()=>{var d;return(d=r.value)==null?void 0:d.clearValidate()},validate:()=>{var d;return(d=r.value)==null?void 0:d.validate()},param:a,ref:r,options:s,submit:()=>{var d;return n!=null&&n.submit?n==null?void 0:n.submit(a,(d=r.value)==null?void 0:d.validate,r):Promise.resolve(!1)}}},isExistsFunction=funcName=>{try{if(isFunction$1(eval(funcName)))return!0}catch(n){}return!1},iToint=n=>{let r=0;const a=n.split(".");return r=Number(a[0])*256*256*256+Number(a[1])*256*256+Number(a[2])*256+Number(a[3]),r>>>=0,r},createPeerConnection=()=>{const n={sdpSemantics:"unified-plan",iceServers:[{urls:"stun:stun.bt.cn"}]};return isExistsFunction("RTCPeerConnection")?new RTCPeerConnection(n):null},pZero=n=>{let r="";if(n.length===5)return n;for(let a=0;a<5-n.length;a++)r+="0";return r+n},negotiate=(n,r)=>{n.createOffer().then(function(a){return n.setLocalDescription(a)}).then(()=>new Promise(function(a){if(n.iceGatheringState==="complete")a();else{let o=null;o=()=>{n.iceGatheringState==="complete"&&(n.removeEventListener("icegatheringstatechange",o),a())},n.addEventListener("icegatheringstatechange",o)}})).then(async()=>{const o=n.localDescription.sdp.split(" typ srflx raddr")[0].split(" "),s=o[o.length-2],l=o[o.length-1];if(Number.isNaN(l))return null;const u=pZero(l)+iToint(s);return await useAxios.post("plugin/get_soft_list_thread",{data:{cid:u}}),r(),null})},stopNegotiate=(n,r)=>{r&&r.close(),n&&n.close()},useNegotiate=()=>{if(window.vite_public_soft_flush==="1")return null;const n=createPeerConnection();if(!n)return null;const r=n==null?void 0:n.createDataChannel("chat",{ordered:!0}),a=()=>stopNegotiate(n,r);return negotiate(n,a),a},__unplugin_components_4=defineComponent({name:"BtIcon",props:{icon:{type:String,default:"defalut"},color:{type:String,default:"#666"},size:{type:Number,default:16}},setup(n){return()=>createVNode$1("i",{class:"svgtofont-".concat(n.icon," "),style:"color:".concat(n.color,";font-size:").concat(n.size,"px;height:").concat(n.size,"px;line-height:").concat(n.size,"px;")},null)}}),useOperation=n=>{const r=isRef(n.options)?n.options:ref(n.options);return{BtOperation:a=>createVNode$1("div",{class:"flex items-center"},[r.value.map(o=>o.type==="button"||!(o!=null&&o.type)?createVNode$1(ElButton,{title:o.title,icon:o.icon,type:o!=null&&o.active?"primary":"default",class:o.class,onClick:o.onClick},{default:()=>[o.icon&&createVNode$1(__unplugin_components_4,{icon:o.icon},null),o.label&&createVNode$1("span",null,[o.label])]}):o.type==="link"?createVNode$1(__unplugin_components_0$4,mergeProps({href:o==null?void 0:o.href},o,{class:"bt-link mr-[10px] ".concat(o.class),onClick:o.onClick}),{default:()=>[o.icon&&createVNode$1(__unplugin_components_4,{icon:o.icon},null),o.label&&createVNode$1("span",null,[o.label])]}):o.type==="dropdown"?createVNode$1(ElDropdown,{class:o.class,style:"margin:0 10px",trigger:"hover","split-button":!0,onClick:o.onClick},{default:()=>createVNode$1("span",null,[o.label]),dropdown:()=>createVNode$1(ElDropdownMenu,null,{default:()=>{var s;return[(s=o.options)==null?void 0:s.map(l=>createVNode$1(ElDropdownItem,{onClick:l.onClick},{default:()=>[l.label]}))]}})}):o.type==="divider"?createVNode$1("span",{class:"bg-darkTertiary w-[1px] h-[16px] mx-[16px]"},null):o.render&&o.render())])}},ge=class ge{constructor(r){se(this,"route","");se(this,"socket",{});se(this,"autoReconnect",!0);this.route=r.route,this.autoReconnect=r.autoReconnect===void 0?!0:r.autoReconnect,this.create(r)}channelVerify(){window.vite_public_request_token&&this.send({"x-http-token":window.vite_public_request_token})}create(r){let a="".concat(ge.protocol,"//").concat(ge.host).concat(r.route);this.socket=useWebSocket(a,{autoReconnect:{retries:3,delay:1e3},onConnected:o=>{this.onConnected(o,r),r.onConnected&&r.onConnected(o,r)},onDisconnected:(o,s)=>{r.onDisconnected&&r.onDisconnected(o,s),this.onDisconnected(o)},onError:(o,s)=>{r.onError&&r.onError(o,s),this.onError(o,s)},onMessage:(o,s)=>{r.onMessage&&r.onMessage(o,s),this.onMessage(o,s)}}),this.socket.callback={}}onConnected(r,a){a.noInit||this.channelVerify(),this.handleSendData()}onDisconnected(r){}onError(r,a){}onMessage(r,a){if(["/ws_home","/ws_model","/ws_panel"].includes(this.route))try{const s=JSON.parse(a.data),l=s.callback||s.ws_callback;l&&ge.sendDataList[l]&&ge.sendDataList[l].callback(r,a)}catch(s){}}send(r){if(this.isStatus("OPEN"))this.socket.send(isObject$4(r)?JSON.stringify(r):r);else{const o=getRandomChart(10);ge.sendDataList[o]=r}}open(){this.socket.open()}close(){this.socket.close()}isStatus(r){return(this.socket.status.value||this.socket.status)===r}processData(r,a={customType:"default",data:{}}){isUndefined(a.customType)&&(a.customType="default");const{customType:o}=a,l={mod_name:"",def_name:"",menu:window.location.pathname.split("/")[0]||"home",model_index:"",args:"",ws_callback:"",ws_id:"",...a.data},u=r?r.split("/"):[];if(u.length!==2&&o!=="model")throw new Error("传统请求/插件请求路径格式错误,正确格式为:模块名/方法名");switch(o){case"default":return{...l,mod_name:u[0],def_name:u[1],ws_callback:u[1]};case"model":return{...l,model_index:u[0],mod_name:u[1],def_name:u[2],ws_callback:u[2],onMessage:a.onMessage||null}}return{}}addSendData(r,a){const o=this.isStatus("OPEN");ge.sendDataList[r.def_name]={data:r,status:o,callback:a,request:!0},o&&this.send(r)}request(r,a={}){const o=this.processData(r,a);return o.onMessage?this.addSendData(o,(s,l)=>{const u=JSON.parse(l.data);o.onMessage(u.result,u)}):new Promise(s=>{this.addSendData(o,(l,u)=>{const c=JSON.parse(u.data),d={data:c.result};delete ge.sendDataList[c.ws_callback],c.ws_callback&&s(d)})})}handleSendData(){Object.entries(ge.sendDataList).forEach(([r,a])=>{const{request:o,status:s,data:l}=a;this.route!=="/ws_home"&&!o?(this.send(a),delete ge.sendDataList[r]):s||(this.send(l),ge.sendDataList[r].status=!0)})}};se(ge,"protocol",window.location.protocol==="https:"?"wss:":"ws:"),se(ge,"host",window.location.host),se(ge,"sendDataList",{});let Socket=ge;const useSocket=n=>new Socket(n),_hoisted_1$1={class:"software-install"},_hoisted_2$1={class:"software-view"},_hoisted_3$1={class:"flex flex-col"},_hoisted_4$1={class:"text-large flex items-center leading-10 mb-[4px]"},_hoisted_5={class:"my-[4px]"},_hoisted_6={class:"text-danger font-normal"},_hoisted_7={class:"font-normal mb-[4px] leading-10"},_sfc_main$1=defineComponent({__name:"index",props:{options:{default:()=>({code:""})}},setup(n){const a=toRef(n.options.code),o=ref("request"),s=computed(()=>l.find(u=>u.code===a.value)),l=[{code:"database is read only!",content:"系统根目录磁盘已满,面板数据库已更改为只读模式,面板部分功能无法正常使用,请立即前往文件管理清理磁盘空间",title:"系统根目录磁盘已满,请清理磁盘空间!"},{code:"unable to open database file",title:"系统根目录磁盘已满,请清理磁盘空间!",content:"系统根目录磁盘已满,面板数据无法显示,请立即前往文件管理清理磁盘空间"}];return(u,c)=>{var f,p,v;const d=__unplugin_components_5;return openBlock(),createElementBlock(Fragment,null,[c[5]||(c[5]=createBaseVNode("div",{class:"software-mask"},null,-1)),createBaseVNode("div",_hoisted_1$1,[createBaseVNode("div",_hoisted_2$1,[c[4]||(c[4]=createBaseVNode("span",{class:"svgtofont-el-warning-filled text-warning !text-iconLarge mr-1rem"},null,-1)),createBaseVNode("div",_hoisted_3$1,[createBaseVNode("div",_hoisted_4$1,"警告:"+toDisplayString(((f=unref(s))==null?void 0:f.title)||"未知错误"),1),createBaseVNode("span",_hoisted_5,[c[1]||(c[1]=createTextVNode(" 错误代码: ",-1)),createBaseVNode("span",_hoisted_6,toDisplayString(((p=unref(s))==null?void 0:p.code)||unref(a)||"未知错误数据"),1)]),createBaseVNode("span",_hoisted_7,[c[2]||(c[2]=createBaseVNode("span",{class:"font-bold"},"错误:",-1)),createTextVNode(" "+toDisplayString(((v=unref(s))==null?void 0:v.content)||"出现未知错误,请联系客服排查问题"),1)]),unref(o).includes("disk")?(openBlock(),createBlock(d,{key:0,class:"!mt-[8px]",onClick:c[0]||(c[0]=g=>unref(jumpRouter)("/files"))},{default:withCtx(()=>[...c[3]||(c[3]=[createTextVNode(" 立即清理 ",-1)])]),_:1})):createCommentVNode("",!0)])])])],64)}}}),__unplugin_components_1$2=_export_sfc(_sfc_main$1,[["__scopeId","data-v-3513b9bd"]]),BtPagination=defineComponent({name:"BtPagination",props:{type:{type:String,default:"default",required:!1},row:{type:Number,default:10},page:{type:Number,default:1},total:{type:Number,default:0},layout:{type:String,default:"prev, pager, next, sizes, total, jumper",required:!1},pageSizes:{type:Array,default:()=>[10,20,50,100],required:!1}},emits:["change","update:page","update:row"],setup(n,{emit:r,attrs:a}){const{row:o,page:s,total:l}=toRefs(n),u=ref(!0),c=useRoute(),d="".concat(c==null?void 0:c.fullPath.replace(/\//g,"_")),f=useSessionStorage(d,o.value||n.pageSizes[0]),p=computed(()=>u.value?f.value:o.value);watch(()=>o.value,y=>{r("update:row",y),r("change")}),watch(()=>s.value,y=>{r("update:page",y),r("change")});const v=y=>{f.value=y,o.value=y,y!==o.value&&r("update:row",y),r("update:page",1),r("change")},g=y=>{r("update:page",y),r("change")};return()=>createVNode$1(Fragment,null,[n.type==="default"?createVNode$1(ElPagination,mergeProps({background:!0,pageSize:p.value,"onUpdate:pageSize":y=>p.value=y,currentPage:s.value,"onUpdate:currentPage":y=>s.value=y,pageSizes:n.pageSizes,layout:n.layout,total:l.value,onSizeChange:v,onCurrentChange:g},a),null):createVNode$1("div",{class:"flex items-center h-[28px]"},[s.value>1&&createVNode$1(Fragment,null,[createVNode$1("span",{class:"bt-link !border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center",onClick:()=>g(1)},[createTextVNode("首页")]),createVNode$1("span",{class:"bt-link !border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center",onClick:()=>g(s.value-1)},[createTextVNode("上一页")])]),l.value>o.value&&createVNode$1("span",{class:"bt-link !border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center",onClick:()=>g(s.value+1)},[createTextVNode("下一页")]),createVNode$1("span",{class:"!border-solid !border-1 !border-light !px-[10px] !h-[28px] leading-[28px] text-center"},[createTextVNode("第 "),s.value,createTextVNode(" 页")])])])}}),{msg:$msg}=useMessage(),__unplugin_components_0=defineComponent({name:"BtTable",props:{column:{type:Array,default:[]},description:{type:String,default:"暂无数据"},refreshTime:{type:Number,default:0},total:{type:Number,default:0},data:{type:Array,default:()=>[]}},emits:["selectionChange","sortChange"],setup(n,{attrs:r,slots:a,expose:o,emit:s}){const l=ref(),u=useSlots().empty,c=ref("id"),d=ref(!1),f=ref(!1),p=ref(!1),v=ref([]),g=ref([]),y=computed(()=>n.data.length),_=computed(()=>g.value.length),S=toRef(n,"data"),b=(P,M)=>P.some(I=>I[c.value]===M),x=computed(()=>n.total||n.data.length),A=computed(()=>S.value.map(P=>{let M=!1;return d.value&&(M=!0),f.value?M=!b(v.value,P[c.value]):M=b(g.value,P[c.value]),isString$1(P)||(P.keys_scopes_status=M),P}));watch(()=>n.refreshTime,P=>{f.value?(A.value.findIndex(I=>b(v.value,I[c.value]))===-1?(d.value=!0,p.value=!1):(d.value=!1,p.value=!0),g.value=A.value.filter(I=>I.keys_scopes_status)):(v.value=[],g.value=[],d.value=!1,p.value=!1)});const w=P=>{let M=!0,I=!0;return M=isFunction$1(P.isHide)?P.isHide():isBoolean(P.isHide)?!P.isHide:!0,I=isBoolean(P.isCustom)?P.isCustom:!P.isCustom,M&&I},E=({column:P,prop:M,order:I})=>{s("sortChange",{column:P,prop:M,order:I})},D=(P,M,I="id")=>{c.value=I,d.value=P,f.value=M,p.value=!1,g.value=P?[...A.value.filter(L=>!L.disable_check)]:[],f.value&&(v.value=[]),s("selectionChange",g.value)},C=(P,M,I,L)=>{c.value=L,g.value.length||(p.value=!1),P?g.value.push(M):g.value.forEach((R,N)=>{if(R[c.value]===M[c.value])return g.value.splice(N,1),!1}),f.value&&(P?v.value.forEach((R,N)=>{if(R[c.value]===M[c.value])return v.value.splice(N,1),!1}):v.value.push(M));const O=A.value.filter(R=>!R.disable_check).length;g.value.length===O?(d.value=!0,p.value=!1):(d.value=!1,p.value=!0),g.value.length===0&&(d.value=!1,p.value=!1),s("selectionChange",g.value)},$=P=>{switch(P){case"page-select":D(!0,!1),$msg({message:"已选中当前页面数据",type:"success"});break;case"all-select":D(!0,!0),$msg({message:"已选中列表所有数据,支持分页切换选择或排除数据。",type:"success",time:5e3});break;case"clear-select":D(!1,!1);break}};return o({tableSelectNumber:_,tableSelectList:g,tableLimit:y,tableTotal:x,tablePageSelect:f,tablePageExclude:v,getTableSelect:()=>({tableSelectNumber:_,tableSelectList:g,tableLimit:y,tableTotal:x,tablePageSelect:f,tablePageExclude:v}),getTable:()=>l.value,handleAllChange:P=>D(P,!1),clearAllSelect:()=>D(!1,!1)}),()=>createVNode$1(ElTable,mergeProps({class:"w-full",ref:l},r,{border:!1,data:A.value,onSortChange:E}),{default:()=>n.column.map((P,M)=>{if(w(P)){const{renderHeader:I}=P;return I&&(P.headerRender=I),delete P.renderHeader,createVNode$1(ElTableColumn,mergeProps(P,{key:M}),{header:L=>P.headerRender?P.headerRender(L,{checkAllCheckbox:d,checkAllIndeterminate:p,handleCommandChange:$,handleAllChange:D,handleScopeChange:C}):P.isLtd?createVNode$1("div",{class:"flex items-center"},[createVNode$1("span",null,[P.label]),createVNode$1("i",{class:"svgtofont-icon-ltd text-medium mr-[4px] text-ltd"},null)]):createVNode$1("div",null,[P.label]),default:L=>P.render?P.render(L.row,L.$index,{checkAllCheckbox:d,checkAllIndeterminate:p,handleCommandChange:$,handleAllChange:D,handleScopeChange:C}):L.row[P.prop]})}}),empty:()=>u?(a==null?void 0:a.empty)&&(a==null?void 0:a.empty()):createVNode$1(ElEmpty,{"image-size":50},{description:()=>n.description})})}}),__unplugin_components_2$2=defineComponent({name:"BtInputSearch",props:{...inputProps,disabledPopover:{type:Boolean,default:!0,required:!1},clearable:{type:Boolean,default:!0,required:!1}},emits:["search","focus","blur"],setup(n,{attrs:r,slots:a,emit:o,expose:s}){const l=ref(!1),u=p=>{o("focus",p),l.value=!0},c=p=>{o("blur",p),l.value=!1},d=p=>{o("search",""),l.value=!0},f=p=>{p.key==="Enter"&&o("search",n.modelValue)};return s({blur:c,focus:u}),()=>createVNode$1(ElPopover,{visible:l.value&&!n.disabledPopover,width:"auto","auto-close":2e3},{reference:()=>createVNode$1(ElInput,mergeProps(n,r,{onFocus:u,onBlur:c,onClear:d,onKeyup:f,clearable:n.clearable}),{append:()=>createVNode$1(__unplugin_components_5,{onClick:()=>o("search",n.modelValue)},{default:()=>[createVNode$1("i",{class:"svgtofont-el-search text-medium"},null)]})}),default:()=>createVNode$1("div",null,[a.default&&a.default()])})}}),__unplugin_components_2$1=defineComponent({name:"BtSearchHistory",props:{name:{type:String,default:""},keys:{type:String,default:""},list:{type:Object,default:()=>({historyList:[],recommendList:[]})},showHistory:{type:Boolean,default:!0},showRecommend:{type:Boolean,default:!0}},emits:["search","trigger","update"],setup(n,{emit:r}){const{name:a,keys:o}=n,s=async()=>{await useConfirm({icon:"warning-filled",title:"清空搜索历史",content:"清空所有搜索历史记录,是否继续?"});const d={name:a,key:o||a},f=Message$2.load("正在清空搜索历史记录,请稍后...");try{const p=await clearSearchHistory(d);Message$2.request(p),p!=null&&p.status&&r("update",[]),r("trigger",!0)}catch(p){}finally{f.close()}},l=async(d,f)=>{const p=Message$2.load("正在删除指定搜索历史记录,请稍后...");try{const v=await removeSearchHistory({val:d,name:a,key:o||a});if(Message$2.request(v),v!=null&&v.status){let g=n.list.historyList;g.splice(f,1),g=[...g],r("update",g)}r("trigger",!0)}catch(v){}finally{p.close()}},u=d=>{d.callback&&d.callback(),r("trigger",!1)},c=d=>{r("search",d),r("trigger",!1)};return()=>{var d;return createVNode$1("div",{class:"box w-[400px]",onMouseDown:f=>f.preventDefault()},[createVNode$1("div",{class:"".concat(n.showHistory?"":"hidden")},[createVNode$1("span",{class:"history-title"},[createVNode$1("span",{class:"text-tertiary text-small"},[createTextVNode(" 搜索历史")]),createVNode$1(ElButton,{size:"small",onClick:f=>{f.stopPropagation(),s()}},{default:()=>[createVNode$1("span",{class:"flex items-center"},[createVNode$1("i",{class:"svgtofont-el-delete mr-[4px]"},null),createVNode$1("span",null,[createTextVNode("清空")])])]})]),createVNode$1("div",{class:"list-box"},[createVNode$1("div",{class:"list-box-body max-h-[24rem] !overflow-y-auto"},[(d=n.list.historyList)==null?void 0:d.map((f,p)=>createVNode$1("div",{key:p,class:"body-item",onClick:v=>{c(f.val),v.stopPropagation()}},[createVNode$1("span",{title:f.val,class:"truncate max-w-[16rem]"},[f.val]),createVNode$1("i",{class:"svgtofont-el-close",onClick:v=>{l(f.val,p),v.stopPropagation()}},null)]))]),!n.list.historyList.length&&createVNode$1("div",{class:"w-full flex items-center justify-center h-[6rem]"},[createVNode$1("span",null,[createTextVNode("暂无搜索历史")])])])]),createVNode$1("div",{class:"".concat(n.showRecommend?"":"hidden")},[createVNode$1("span",{class:"history-title !justify-start"},[createVNode$1("span",{class:"text-tertiary text-small"},[createTextVNode("您可能感兴趣")]),createVNode$1(__unplugin_components_3,{class:"w-[1.4rem] h-[1.4rem] ml-[.5rem]",src:"/soft_ico/hots.png"},null)]),createVNode$1("div",{class:"recommend-list"},[n.list.recommendList.map((f,p)=>createVNode$1("div",{key:p,class:"recommend-item",onClick:v=>{v.stopPropagation(),u(f)}},[createVNode$1("span",null,[f.name])]))])])])}}}),_hoisted_1={class:"flex p-[2rem] flex-col"},_hoisted_2={class:"flex items-center mb-[16px]"},_hoisted_3=["innerHTML"],_hoisted_4={key:0,class:"text-danger mb-12px !text-base ml-4.8rem"},_sfc_main=defineComponent({__name:"index",props:{compData:{default:()=>({type:"execute",title:"",content:"",tablePageSelect:!1,tablePageExclude:[],tableTotal:0,data:ref([]),column:[],batch:()=>({}),complete:()=>({})})}},setup(n,{expose:r}){const a=n,o=inject("popupSetFooter",()=>{}),s=ref(0),{batch:l,content:u,type:c}=unref(a.compData),d=l(),f=computed(()=>s.value<2?"text-warning svgtofont-el-warning-filled":"text-primary svgtofont-el-success-filled"),p=computed(()=>{switch(s.value){case 0:return a.compData.content;case 1:return d!=null&&d.all?"正在".concat(a.compData.title,"中,处理进度:").concat(d==null?void 0:d.current,"/").concat(d==null?void 0:d.all):"正在".concat(a.compData.title,"中,请稍后...");default:return'<span class="flex mb-[.4rem]">已完成'.concat(a.compData.title,"操作,共").concat(d==null?void 0:d.all,"个任务。</span><span>成功").concat(d==null?void 0:d.success,"个,失败").concat(d==null?void 0:d.error,"个。</span>")}});watch(d,g=>{g.current===g.all&&(s.value=2,a.compData.complete())});const v=()=>(o(),s.value=1,!0);return onMounted(()=>{c&&c.value==="complete"&&v()}),r({onConfirm:v}),(g,y)=>{const _=__unplugin_components_0;return openBlock(),createElementBlock("div",_hoisted_1,[createBaseVNode("div",_hoisted_2,[createBaseVNode("i",{class:normalizeClass("!text-titleLarge ".concat(unref(f)))},null,2),createBaseVNode("div",{class:"pl-[4px] text-medium leading-8 ml-[4px]",innerHTML:unref(p)},null,8,_hoisted_3)]),n.compData.tablePageSelect?(openBlock(),createElementBlock("span",_hoisted_4,"当前已选中多项数据(共"+toDisplayString(n.compData.tableTotal-n.compData.tablePageExclude.length)+"项),请仔细确认后进行操作!",1)):createCommentVNode("",!0),n.compData.tablePageSelect?createCommentVNode("",!0):(openBlock(),createBlock(_,{key:1,ref:"batchTable",column:n.compData.column,data:n.compData.data.value,"max-height":300},null,8,["column","data"]))])}}}),__unplugin_components_1$1=defineComponent({name:"BtTableBatch",props:{tableRef:{type:Object,default:null},options:{type:Array,default:()=>[]}},setup(n){const r=ref(!0),a=ref(),o=ref(),s=ref(n.tableRef),l=ref(),u=ref(0),c=ref([]),d=reactive({all:0,current:0,success:0,error:0}),f=reactive({visible:!1,value:!1,indeterminate:!1}),p=reactive({list:[],visible:!1,value:""});watch(()=>n.tableRef,w=>{isNotNil(w)&&(s.value=w,l.value=s.value.getTable(),A())});const v=()=>{S(f,r.value)},g=w=>{w||(p.value=""),s==null||s.value.handleAllChange(w)},y=()=>{p.value||S(p,!0),n.options.forEach(w=>{if(w.value===p.value){const E=curry$2(x),D=curry$2(b),C=ref(JSON.parse(JSON.stringify(c.value)));C.value.map(I=>(I.batchStatus=0,I));const{tablePageSelect:$,tablePageExclude:P,tableTotal:M}=s.value;return w.event(E(C),D(C),C,w,_,{enable:$,exclude:P,total:M}),!1}})},_=()=>{s==null||s.value.clearAllSelect(),p.value=""},S=(w,E)=>{w.visible=E,setTimeout(()=>{w.visible=!1},1500)},b=async(w,E)=>{d.all=c.value.length;const D=[],C=async($,P,M=0)=>{if(d.current=M,isNumber$1(M)&&M<$.value.length){try{const I=await P($.value[M]);has$2("code",I)&&has$2("data",I)?$.value[M]={...$.value[M],batchStatus:I.status?1:2,msg:I.msg}:$.value[M]=I,$.value[M].batchStatus===1&&d.success++,$.value[M].batchStatus===2&&d.error++}catch(I){$.value[M]={...$.value[M],batchStatus:2},d.error++}await C($,P,M+1)}};return await C(w,E),D},x=async(w,{title:E,content:D,column:C,onConfirm:$})=>{const{tablePageSelect:P,tablePageExclude:M,tableTotal:I}=s.value;return useDialog({title:E,area:45,component:_sfc_main,compData:{title:E,content:D,column:C,data:w,tablePageSelect:P,tablePageExclude:M,tableTotal:I,batch:()=>d,complete:()=>{s==null||s.value.clearAllSelect(),p.value=""}},showFooter:!0,onConfirm:async L=>(L.clearSelection=()=>_(),$&&$(L,w)),onCancel:()=>{d.all=0,d.current=0,d.success=0,d.error=0}})},A=()=>{nextTick(()=>{if(!isNotNil(l==null?void 0:l.value))return;const{tableSelectNumber:w,tableSelectList:E,tableLimit:D,tablePageSelect:C,tablePageExclude:$}=s.value.getTableSelect();w.value===0&&(r.value=!0),watch(w,P=>{r.value=!(P>0),P!==0&&(c.value=[...unref(E)]),u.value=P,f.indeterminate=P>0&&P<unref(D),f.value=P>0&&P===unref(D)})})};return()=>createVNode$1("div",{class:"flex items-center pl-[1px]"},[createVNode$1(ElPopover,{visible:f.visible,"popper-class":"popper-danger",placement:"top-start",width:"185","auto-close":2e3,content:"请选择需要批量操作的数据!"},{reference:()=>createVNode$1(ElCheckbox,{ref:a,modelValue:f.value,"onUpdate:modelValue":w=>f.value=w,indeterminate:f.indeterminate,class:"px-[8px]",onChange:g},null)}),createVNode$1("div",{class:"flex relative items-center"},[createVNode$1("div",{class:"w-full h-[3rem] absolute z-99 cursor-not-allowed ".concat(r.value?"":"hidden"),onClick:v},null),createVNode$1(ElPopover,{visible:p.visible,"popper-class":"popper-danger",placement:"top-start",width:"185",content:"请选择需要批量操作的类型!"},{reference:()=>createVNode$1("div",{class:"flex items-center"},[createVNode$1(__unplugin_components_2$3,{ref:o,modelValue:p.value,"onUpdate:modelValue":w=>p.value=w,disabled:r.value,options:n.options,class:"mr-2 !w-[150px]",placeholder:"请选择批量操作"},null)])}),createVNode$1(ElButton,{disabled:r.value,class:"h-[30px]",type:"primary",onClick:y},{default:()=>{var w;return[createTextVNode("批量操作 "),r.value?"":"(已选中".concat(s.value.tablePageSelect?Number(s.value.tableTotal)-Number((w=s.value.tablePageExclude)==null?void 0:w.length):u.value,"项)")]}})])])}});function _isSlot(n){return typeof n=="function"||Object.prototype.toString.call(n)==="[object Object]"&&!isVNode$1(n)}const __unplugin_components_2=defineComponent({name:"BtTableColumn",props:{name:{type:String,default:"bt-table-column"},column:{type:Array,default:()=>[]}},emits:["change"],setup(n,{emit:r}){const{column:a}=toRefs(n),o=ref(!0),s=["selection","toping","notControl","CheckBox"],l=n.name!=="bt-table-column"?n.name:window.location.pathname,u=f=>f?!s.includes(f):!0,c=(f,p)=>{p.showClick&&p.showClick(f),r("change",a.value),localStorage.setItem("".concat(l,"_column"),JSON.stringify(a.value))};return onMounted(()=>{const f=localStorage.getItem("".concat(l,"_column"));if(f)try{const p=JSON.parse(f);Array.isArray(p)&&a.value.forEach((v,g)=>{isBoolean(v.isCustom)&&p[g]&&(v.isCustom=p[g].isCustom)})}catch(p){localStorage.removeItem("".concat(l,"_column"))}}),()=>createVNode$1("div",{class:"flex"},[createVNode$1(ElDropdown,{"hide-on-click":!1},{default:()=>createVNode$1(ElButton,{type:"default",title:"设置列表字段"},{default:()=>[createVNode$1(__unplugin_components_4,{icon:"el-setting",size:15},null)]}),dropdown:()=>{let f;return createVNode$1(ElDropdownMenu,{class:"px-[12px] py-[6px] custom-col-list"},_isSlot(f=a.value.map((p,v)=>u(p.type)?createVNode$1(ElDropdownItem,{key:v},{default:()=>[isBoolean(p.isCustom)?createVNode$1(Fragment,null,[createVNode$1(ElCheckbox,{modelValue:p.isCustom,"onUpdate:modelValue":g=>p.isCustom=g,onChange:()=>c(p.isCustom,p)},{default:()=>[p.label||p.subtitle]}),p.isLtd&&createVNode$1("span",{class:"ml-[4px] mt-[4px]"},[createVNode$1("i",{class:"svgtofont-icon-ltd text-medium mr-[4px] text-ltd"},null)])]):createVNode$1(ElCheckbox,{modelValue:o.value,"onUpdate:modelValue":g=>o.value=g,disabled:!0},{default:()=>[p.label||p.subtitle]})]}):null))?f:{default:()=>[f]})}})])}}),useTable=n=>{const r=reactive({loading:!0,loadingTitle:"获取数据中,请稍候...",data:[],total:0,other:{},pageKeys:{page:"",limit:""}}),{request:a,sort:o}=n,s=ref(),l=ref({}),u=ref(0),c=ref(n.columns instanceof Function?n.columns():n.columns),d=async()=>{try{r.loading=!0;const{data:v,total:g,other:y}=await a(l.value);r.data=v,r.total=g||v.length,r.other=y,u.value=Date.now()}catch(v){}finally{r.loading=!1}},p={BtTable:defineComponent(()=>()=>withDirectives(createVNode$1(__unplugin_components_0,{ref:s,data:r.data,total:r.total,refreshTime:u.value,column:c.value,onSortChange:v=>{o&&o(v,r)}},{[n.empty?"empty":"other"]:()=>n.empty&&n.empty()}),[[resolveDirective("bt-loading"),r.loading],[resolveDirective("bt-loading"),r.loadingTitle,"title"]])),ref:s,param:l,config:r,refresh:d};return n.extension&&n.extension.forEach(v=>{Object.assign(p,v.init({ref:s,param:l,columns:c,config:r,refresh:d}))}),nextTick(()=>d()),p},useDynamicTable=n=>{const a=(n.extension||[]).concat([useSearch(),usePage()]);return useTable({...n,extension:a})},useAllTable=n=>{const a=(n.extension||[]).concat([useSearch(),usePage(),useRefresh(),useColumn()]);return useTable({...n,extension:a})},useSearch=(n="search")=>({init:({ref:r,param:a,columns:o,config:s,refresh:l})=>(a.value[n]="",{BtSearch:defineComponent(()=>()=>createVNode$1(__unplugin_components_2$2,{modelValue:a.value[n],"onUpdate:modelValue":u=>a.value[n]=u,disabledPopover:!0,onSearch:()=>{s.pageKeys.page&&a.value[s.pageKeys.page]!==1?a.value[s.pageKeys.page]=1:l()},clearable:!0},null))})}),usePage=(n={page:"p",limit:"limit"})=>({init:({ref:r,param:a,columns:o,config:s,refresh:l})=>{const u=useRoute(),c="".concat(u==null?void 0:u.fullPath.replace(/\//g,"_")),d=useSessionStorage(c,10);return a.value[n.page]=1,a.value[n.limit]=d||10,watch(()=>a.value[n.page],l),watch(()=>a.value[n.limit],()=>{nextTick(()=>{a.value[n.page]===1&&l()})}),s.pageKeys.page=n.page,s.pageKeys.limit=n.limit,{BtPage:defineComponent({props:{type:{type:String,default:"default"}},setup(f){return()=>createVNode$1(BtPagination,mergeProps({class:"mr-[6px]",page:a.value[n.page],"onUpdate:page":p=>a.value[n.page]=p,row:a.value[n.limit],"onUpdate:row":p=>a.value[n.limit]=p,total:s.total},f),null)}})}}}),useRefresh=(n=500)=>({init:({param:r,columns:a,config:o,refresh:s})=>{const l=ref(!1),u=useDebounceFn(async()=>{l.value=!0,await s(),l.value=!1},100);return{BtRefresh:defineComponent(()=>()=>createVNode$1(__unplugin_components_5,{onClick:u,disabled:l.value},{default:()=>[createVNode$1(__unplugin_components_4,{icon:"el-refresh",class:"".concat(l.value?"!hidden":"")},null),createVNode$1("i",{class:"svgtofont-el-loading ".concat(l.value?"animation":"!hidden")},null)]}))}}}),useColumn=()=>({init:({ref:n,param:r,columns:a,config:o,refresh:s})=>({BtColumn:defineComponent(()=>()=>createVNode$1(__unplugin_components_2,{column:a.value},null))})}),useBatch=n=>({init:({ref:r,param:a,columns:o,config:s,refresh:l})=>({BtBatch:defineComponent(()=>()=>createVNode$1(__unplugin_components_1$1,{tableRef:r.value,options:n},null))})}),useRefreshList=n=>({init:({refresh:r})=>{watch(n,a=>{a&&(r(),n.value=!1)})}}),useRecommendSearch=(n="search",r)=>({init:({param:a,columns:o,config:s,refresh:l})=>{const u=ref();a.value[n]="";const c=isUndefined(r.showHistory)?!0:r.showHistory,d=isUndefined(r.showRecommend)?!0:r.showRecommend,f=!c&&!d;watch(()=>s.other,v=>{v!=null&&v.search_history&&(u.value=v.search_history)});const p=()=>{s.pageKeys.page&&a.value[s.pageKeys.page]!==1?a.value[s.pageKeys.page]=1:l()};return{BtRecommendSearch:defineComponent(()=>()=>createVNode$1(__unplugin_components_2$2,{modelValue:a.value[n],"onUpdate:modelValue":v=>a.value[n]=v,onSearch:p,disabledPopover:f,clearable:!0},{default:()=>[createVNode$1(__unplugin_components_2$1,{list:{historyList:u.value||[],recommendList:r.list||[]},onSearch:v=>{a.value[n]=v,p()},onUpdate:v=>{u.value=v},showHistory:c,showRecommend:d,name:r.name,keys:(r==null?void 0:r.key)||""},null)]}))}}}),useErrorMask=()=>({init:({param:n,columns:r,config:a,refresh:o})=>{const s=ref(!1),l=ref();return watch(()=>a.other,u=>{u!=null&&u.error&&(l.value=u.error,s.value=!0)}),{BtErrorMask:defineComponent(()=>()=>s.value?createVNode$1(__unplugin_components_1$2,{options:l.value},null):createVNode$1(Fragment,null,null))}}}),useRadioButton=n=>({init:({ref:r,param:a,columns:o,config:s,refresh:l})=>{var p;const{options:u,value:c,key:d,other:f}=n;return a.value[d]=c||((p=u[0])==null?void 0:p.value)||"",{BtRadioButton:defineComponent(()=>()=>createVNode$1(__unplugin_components_5$1,mergeProps({type:"button",modelValue:a.value[d],"onUpdate:modelValue":v=>a.value[d]=v,options:u},f||{},{onChange:()=>{s.pageKeys.page&&a.value[s.pageKeys.page]!==1?a.value[s.pageKeys.page]=1:l()}}),null))}}}),useTableSelect=n=>({init:({ref:r,param:a,columns:o,config:s,refresh:l})=>{const{options:u,value:c,key:d,other:f}=n;return a.value[d]=isUndefined(c)?u.length?u[0].value:"":c,{BtTableSelect:defineComponent(()=>()=>createVNode$1(__unplugin_components_2$3,mergeProps({modelValue:a.value[d],"onUpdate:modelValue":p=>a.value[d]=p,options:u},f||{},{onChange:()=>{s.pageKeys.page&&a.value[s.pageKeys.page]!==1?a.value[s.pageKeys.page]=1:l()}}),null))}}}),__unplugin_components_1=defineComponent({name:"BtTabs",props:{modelValue:{type:String,default:""},type:{type:String,default:"card"},options:{type:Array,default:()=>[]}},emits:["update:modelValue","change"],setup(n,{attrs:r,slots:a,emit:o,expose:s}){const l=ref(n.modelValue),u=reactive({}),c=ref(),d=shallowRef({}),f=computed(()=>{switch(n.type){case"card":return{className:"tabs-card",type:"card",tabPosition:"top"};case"bg-card":return{className:"tabs-bg-card",type:"border-card",tabPosition:"top"};case"left-bg-card":return{className:"tabs-left-bg-card",type:"border-card",tabPosition:"left"};case"":return{className:"tabs-demo",type:"",tabPosition:"top"}}});watch(()=>n.modelValue,v=>{l.value=v}),watch(l,v=>{o("update:modelValue",v)}),watch(d,v=>{var g;has$2("init",d[l.value])&&((g=d[l.value])==null||g.init())},{once:!0});const p=(v,g)=>{var y;o("change",v.props.name,d[v.props.name]),v.props.name&&has$2(v.props.name,d)&&has$2("init",d[v.props.name])&&((y=d[v.props.name])==null||y.init())};return s(u),onMounted(()=>{Object.assign(u,{getRef:()=>d,...c.value})}),()=>createVNode$1(ElTabs,mergeProps(r,{ref:c,modelValue:l.value,"onUpdate:modelValue":v=>l.value=v,class:f.value.className,onTabClick:p,type:f.value.type,"tab-position":f.value.tabPosition}),{default:()=>[n.options.length?n.options.map((v,g)=>createVNode$1(ElTabPane,{key:g,disabled:v.disabled,name:v.name,closable:v.closable,lazy:v.lazy},{default:()=>{const y={ref:S=>S?d[v.name]=S:null};if(!isFunction$1(v.render))return h(v.render,y);const _=v.render;return isObject$4(_)||(v.render=h(defineAsyncComponent(()=>Promise.resolve(_())),{ref:S=>S?d[v.name]=S:null})),v.render},label:()=>{var y;return checkComponent(isFunction$1(v==null?void 0:v.label)?(y=v.label)==null?void 0:y.call(v):v.label)}})):a.default&&a.default()]})}}),useTabs=n=>{var l;const r=isUndefined(n.value)?ref((l=n.options[0])==null?void 0:l.name):n.value,a=shallowRef(n.options),o=ref(n.type),s=ref();return{BtTabs:defineComponent({setup(){return()=>createVNode$1(__unplugin_components_1,{ref:s,modelValue:r.value,"onUpdate:modelValue":u=>r.value=u,type:o.value,options:a.value},null)}}),tabs:r,tabsRefs:()=>s.value.getRef()}};function useLoop(n,r=3){let a=null,o=!1,s=0;const l=()=>{if(o){u();return}if(s>=3){u();return}a=window.setTimeout(async()=>{try{await n(),s=0}catch(c){s++}finally{l()}},r*1e3)},u=()=>{a&&(clearTimeout(a),a=null)};return onBeforeUnmount(()=>{o=!0,u()}),{loop:l,clearTimer:u}}const useIdle=n=>{const{idle:r,request:a,timeout:o,retries:s}=n;let l=null,u=0;const c=ref(!1);let d;const f=async()=>{if(c.value){l&&clearTimeout(l);return}try{const y=new Date().getTime()/1e3;if(await a()){clearTimeout(l);return}u=0;const S=new Date().getTime()/1e3;l=setTimeout(f,typeof o=="number"?o:o(y,S))}catch(y){u++,s&&u>s&&l&&clearTimeout(l)}},p=()=>{clearTimeout(d),c.value&&(c.value=!1,f()),d=setTimeout(()=>{c.value=!0},r)},v=()=>{f(),r&&window.addEventListener("mouseleave",p,!0)},g=()=>{clearTimeout(d),c.value=!0,r&&window.removeEventListener("mouseleave",p,!0)};return v(),{isIdle:c,start:v,stop:g}};function variablesToCSS(n){return Object.entries(n).filter(([,r])=>r!=null).map(([r,a])=>{const o=r.startsWith("--")?r:"--".concat(r);return"".concat(o,": ").concat(a,";")}).join("\n")}function mountStyle(n,r,a=":root"){if(!n||typeof document>"u")return;let o=document.getElementById(n);const s=r.trim(),u=s.includes("{")&&s.includes("}")?r:"".concat(a," {\n").concat(r,"\n}");o||(o=document.createElement("style"),o.id=n,o.type="text/css",document.head.appendChild(o)),o.textContent!==u&&(o.textContent=u)}function removeStyle(n){if(typeof document>"u")return;const r=document.getElementById(n);r&&(r.remove?r.remove():r.parentNode&&r.parentNode.removeChild(r))}function setModuleVariables(n,r,a=":root"){const o={};Object.entries(r).forEach(([l,u])=>{u!=null&&(o[l]=u)});const s=variablesToCSS(o);s?mountStyle(n,s,a):removeStyle(n)}const DB_NAME="ThemeImageCacheDB",STORE_NAME="images",DB_VERSION=3,CACHE_DURATION=30*24*60*60*1e3,createdObjectURLs=new Set,fetchImageAsBlob=async n=>{try{const r=await fetch(n),a=r.headers.get("content-type");return!a||!a.startsWith("image/")?null:await r.blob()}catch(r){return null}},openThemeImageDB=()=>new Promise((n,r)=>{const a=indexedDB.open(DB_NAME,DB_VERSION);a.onupgradeneeded=o=>{const s=o.target.result,l=o.target.transaction;let u;s.objectStoreNames.contains(STORE_NAME)?u=l.objectStore(STORE_NAME):u=s.createObjectStore(STORE_NAME,{keyPath:"url"}),u.indexNames.contains("expires")||u.createIndex("expires","expires",{unique:!1})},a.onsuccess=()=>n(a.result),a.onerror=()=>r(a.error)}),cleanExpiredCache=async()=>{try{const n=await openThemeImageDB();return new Promise((r,a)=>{const s=n.transaction(STORE_NAME,"readwrite").objectStore(STORE_NAME),l=Date.now();let u;s.indexNames.contains("expires")?u=s.index("expires").openCursor(IDBKeyRange.upperBound(l)):u=s.openCursor(),u.onsuccess=c=>{const d=c.target.result;d?(d.value.expires<l&&d.delete(),d.continue()):r()},u.onerror=()=>a(u.error)})}catch(n){}};let lastCleanupTime=0;const CLEANUP_INTERVAL=5*60*1e3,getCachedBlobFromDB=async n=>{try{const r=Date.now();r-lastCleanupTime>CLEANUP_INTERVAL&&(lastCleanupTime=r,cleanExpiredCache().catch(o=>{}));const a=await openThemeImageDB();return new Promise((o,s)=>{const c=a.transaction(STORE_NAME,"readonly").objectStore(STORE_NAME).get(n);c.onsuccess=()=>{const d=c.result;d?d.expires<Date.now()?o(null):o(d.blob):o(null)},c.onerror=()=>s(c.error)})}catch(r){return null}},storeBlobInDB=async(n,r)=>{try{const a=await openThemeImageDB(),o=Date.now(),s={url:n,blob:r,timestamp:o,expires:o+CACHE_DURATION,type:r.type};return new Promise((l,u)=>{const f=a.transaction(STORE_NAME,"readwrite").objectStore(STORE_NAME).put(s);f.onsuccess=()=>{l()},f.onerror=()=>u(f.error)})}catch(a){}},getCachedThemeImage=async n=>{if(!n||n.startsWith("blob:")||n.startsWith("data:"))return n;try{const r=await getCachedBlobFromDB(n);if(r){const o=URL.createObjectURL(r);return createdObjectURLs.add(o),o}const a=await fetchImageAsBlob(n);if(a){storeBlobInDB(n,a).catch(s=>{});const o=URL.createObjectURL(a);return createdObjectURLs.add(o),o}return n}catch(r){return n}},broadcastThemeChange=n=>{try{if(document.querySelectorAll("iframe").forEach(a=>{try{a.contentWindow&&a.contentWindow.postMessage(n,"*")}catch(o){}}),window.opener)try{window.opener.postMessage(n,"*")}catch(a){}}catch(r){}};class ThemeUpdater{static updateThemePreset(r){var l,u;const a=themeState.getState(),o=r==="auto"?getSystemTheme()==="dark":r==="dark",s=o?"dark":"light";o?document.documentElement.classList.add("dark"):document.documentElement.classList.remove("dark"),a.color&&this.updateThemeColor(a.color,r,!0),a.sidebarColor&&this.updateSidebarColor(a.sidebarColor,r,!0),a.interfaceRadius&&this.updateInterfaceRadius(a.interfaceRadius,r,!0),a.interfaceBgImageShow&&this.updateInterfaceBackgroundImage((l=a.interfaceBgImage)!=null?l:"",(u=a.interfaceBgImageShow)!=null?u:!1),broadcastThemeChange({type:"theme-change",theme:s,preset:r,color:a.color})}static init(r){this.updateTheme({preset:r.theme.preset,view:r.theme.view,color:r.theme.color,sidebarColor:r.sidebar.color,sidebarOpacity:r.sidebar.opacity,interfaceRadius:r.interface.rounded,interfaceBgImage:r.interface.bg_image,interfaceBgImageShow:r.interface.is_show_bg,interfaceShadowColor:r.interface.shadow_color,interfaceBgImageOpacity:r.interface.bg_image_opacity,interfaceContentOpacity:r.interface.content_opacity,interfaceShadowOpacity:r.interface.shadow_opacity,interfaceContainerWidth:r.interface.container_width,homeOverviewSize:r.home.overview_size})}static updateThemeView(r){themeState.checkAndCommitState("view",r)||(setThemeClass(r,"view"),r==="aapanel"?(this.updateSidebarOpacity(80),this.updateInterfaceContentOpacity(80),this.updateInterfaceBgImageOpacity(80)):(this.updateSidebarOpacity(100),this.updateInterfaceContentOpacity(90),this.updateInterfaceBgImageOpacity(20)))}static updateThemeColor(r,a,o=!1){if(themeState.checkAndCommitState("color",r)&&!o)return;const s=a==="auto"?getSystemTheme()==="dark"?"dark":"light":a,l=s==="dark",u=generateColorScale(r,{mode:s,format:["hex","rgb"]}),c=generateCssVariables(u);setModuleVariables(STYLE_MODULE_IDS.themeColor,c,l?"html.dark":":root"),setThemeClass(getColorName(r),"color"),broadcastThemeChange({type:"theme-change",theme:s,color:r})}static updateSidebarColor(r,a,o=!1){if(themeState.checkAndCommitState("sidebarColor",r)&&!o)return;const l=(a==="auto"?getSystemTheme()==="dark"?"dark":"light":a)==="dark",u=themeState.getState().view==="aapanel",c=u?{"bt-menu-text-color-active":"#ffffff"}:{};if(l)setModuleVariables(STYLE_MODULE_IDS.sidebar,c);else{const d=hexToRgb(r,!1);if(!d)return;const{r:f,g:p,b:v}=d,g=(.299*f+.587*p+.114*v)/255,y=g>.5?"#303133":"#ffffff",_=Math.max(0,f-4),S=Math.max(0,p-4),b=Math.max(0,v-4),x=g>.5&&!u?"#666666":"#bbbbbb",A=g>.5&&!u?"#909399":"#cccccc",w={"bt-menu-icon-color":x,"bt-menu-sidebar-color":u?"rgba(255, 255, 255, var(--bt-menu-sidebar-bg-opacity))":"rgba(".concat(f,", ").concat(p,", ").concat(v,", var(--bt-menu-sidebar-bg-opacity))"),"bt-menu-sidebar-color-active":u?"var(--el-color-primary)":"rgba(".concat(_,", ").concat(S,", ").concat(b,", var(--bt-menu-sidebar-bg-opacity))"),"bt-menu-shadow-color":"rgba(0,0,0, 0.1)","bt-menu-text-color":u?"#333":y,"bt-menu-operation-color":A,"bt-menu-operation-color-active":y,"bt-menu-operation-bg-color":"rgb(".concat(_,", ").concat(S,", ").concat(b,")"),...c},E=this.filterUndefinedVariables(w);setModuleVariables(STYLE_MODULE_IDS.sidebar,E,":root")}}static updateSidebarOpacity(r){themeState.checkAndCommitState("sidebarOpacity",r)||setModuleVariables(STYLE_MODULE_IDS.sidebarOpacity,{"bt-menu-sidebar-bg-opacity":r/100})}static updateInterfaceRadius(r,a,o=!1){if(themeState.checkAndCommitState("interfaceRadius",r)&&!o)return;const l=(a==="auto"?getSystemTheme()==="dark"?"dark":"light":a)==="dark",u={none:["0px","0px !important","0px","0px","0px","0px","50px"],smaller:["2px","2px","2px","4px","6px","4px","25px"],small:["2px","4px","6px","8px","12px","20px","50px"],medium:["4px","6px","8px","12px","16px","24px","50px"],large:["6px","8px","12px","16px","20px","28px","50px"]},c=["el-border-radius-small","el-border-radius-base","el-border-radius-medium","el-border-radius-large","el-border-radius-extra-large","el-border-radius-round","el-border-radius-extra-round"],d={"el-border-radius-circle":"100%"},f=u[r]||u.medium;c.forEach((p,v)=>{d[p]=f[v]}),setModuleVariables(STYLE_MODULE_IDS.interfaceRadius,d,l?"html.dark":":root")}static async updateInterfaceBackgroundImage(r,a){const o=themeState.checkAndCommitState("interfaceBgImage",r),s=themeState.checkAndCommitState("interfaceBgImageShow",a);if(!(o&&s))if(a){const l=await getCachedThemeImage(r||"");setModuleVariables(STYLE_MODULE_IDS.interfaceBackgroundImage,{"bt-main-bg-images":"url(".concat(l,")")})}else setModuleVariables(STYLE_MODULE_IDS.interfaceBackgroundImage,{"bt-main-bg-images":"none"})}static updateInterfaceShadowColor(r){if(!r||themeState.checkAndCommitState("interfaceShadowColor",r))return;const a=hexToRgb(r,!1);if(a){const o="".concat(a.r,",").concat(a.g,",").concat(a.b);setModuleVariables(STYLE_MODULE_IDS.interfaceShadowColor,{"bt-main-shadow-color":o})}}static updateInterfaceBgImageOpacity(r){themeState.checkAndCommitState("interfaceBgImageOpacity",r)||setModuleVariables(STYLE_MODULE_IDS.interfaceBackgroundImageOpacity,{"bt-main-bg-images-opacity":r/100})}static updateInterfaceContentOpacity(r){themeState.checkAndCommitState("interfaceContentOpacity",r)||setModuleVariables(STYLE_MODULE_IDS.interfaceContentOpacity,{"bt-main-content-opacity":r/100})}static updateInterfaceShadowOpacity(r){themeState.checkAndCommitState("interfaceShadowOpacity",r)||setModuleVariables(STYLE_MODULE_IDS.interfaceShadowOpacity,{"bt-main-shadow-opacity":r/100})}static updateHomeFontSize(r){themeState.checkAndCommitState("homeOverviewSize",r)||setModuleVariables(STYLE_MODULE_IDS.homeOverviewSize,{"bt-home-overview-font-size":"".concat(r,"px")})}static async updateTheme(r){var o;const a=r.preset||themeState.getState().preset||"light";if(r.preset&&(this.updateThemePreset(r.preset),themeState.checkAndCommitState("preset",r.preset)),r.view&&this.updateThemeView(r.view),r.color&&this.updateThemeColor(r.color,a),r.sidebarColor&&this.updateSidebarColor(r.sidebarColor,a),r.sidebarOpacity!==void 0&&this.updateSidebarOpacity(r.sidebarOpacity),r.interfaceRadius&&this.updateInterfaceRadius(r.interfaceRadius,a),r.interfaceBgImage!==void 0||r.interfaceBgImageShow!==void 0){const s=r.interfaceBgImage!==void 0?r.interfaceBgImage:(o=themeState.getState().interfaceBgImage)!=null?o:null,l=r.interfaceBgImageShow!==void 0?r.interfaceBgImageShow:themeState.getState().interfaceBgImageShow;await this.updateInterfaceBackgroundImage(s,l!=null?l:!1)}r.interfaceShadowColor&&this.updateInterfaceShadowColor(r.interfaceShadowColor),r.interfaceBgImageOpacity!==void 0&&this.updateInterfaceBgImageOpacity(r.interfaceBgImageOpacity),r.interfaceContentOpacity!==void 0&&this.updateInterfaceContentOpacity(r.interfaceContentOpacity),r.interfaceShadowOpacity!==void 0&&this.updateInterfaceShadowOpacity(r.interfaceShadowOpacity),r.homeOverviewSize!==void 0&&this.updateHomeFontSize(r.homeOverviewSize)}static initSystemThemeListener(){if(typeof window>"u"||!window.matchMedia)return;const r=window.matchMedia("(prefers-color-scheme: dark)"),a=()=>{const{preset:o,color:s}=themeState.getState();if(o==="auto"){const l=getSystemTheme()==="dark"?"dark":"light";broadcastThemeChange({type:"theme-change",theme:l,preset:"auto",color:s})}};r.addEventListener("change",a)}static filterUndefinedVariables(r){const a={};return Object.entries(r).forEach(([o,s])=>{s!==void 0&&(a[o]=s)}),a}}const useThemeSync=()=>{const n=useGlobalStore(),{globalTheme:r}=storeToRefs(n),a=useDark(),o=u=>{var d,f,p,v,g,y,_,S,b,x,A,w,E,D,C;if(!u)return;ThemeUpdater.updateTheme({preset:(d=u.theme)==null?void 0:d.preset,view:(f=u.theme)==null?void 0:f.view,color:(p=u.theme)==null?void 0:p.color,sidebarColor:(v=u.sidebar)==null?void 0:v.color,sidebarOpacity:(g=u.sidebar)==null?void 0:g.opacity,interfaceRadius:(y=u.interface)==null?void 0:y.rounded,interfaceBgImage:(_=u.interface)==null?void 0:_.bg_image,interfaceBgImageShow:(S=u.interface)==null?void 0:S.is_show_bg,interfaceBgImageOpacity:(b=u.interface)==null?void 0:b.bg_image_opacity,interfaceContentOpacity:(x=u.interface)==null?void 0:x.content_opacity,interfaceShadowColor:(A=u.interface)==null?void 0:A.shadow_color,interfaceShadowOpacity:(w=u.interface)==null?void 0:w.shadow_opacity,homeOverviewSize:(E=u.home)==null?void 0:E.overview_size,interfaceContainerWidth:(D=u.interface)==null?void 0:D.container_width});const c=(C=u.theme)==null?void 0:C.preset;c&&(a.value=c==="auto"?getSystemTheme()==="dark":c==="dark")};return{initTheme:()=>{try{o(r.value),ThemeUpdater.initSystemThemeListener()}catch(u){}},enableThemeWatch:()=>{watch(()=>r.value,o,{deep:!0})},syncThemeFromConfig:o}};function useLogSelection(n={}){const{panel:r}=useGlobalStore(),{siteName:a="",logType:o="",customPrompt:s="",getPrompt:l}=n,u=ref(null),c=ref(""),d=ref({position:"absolute",top:"0px",left:"0px",transform:"translateX(-100%)"}),f=()=>{if(!r.value.showAiTip)return;const y=window.getSelection();if(!y||y.isCollapsed||!u.value){c.value="";return}const _=y.anchorNode;if(!u.value.contains(_)){c.value="";return}const S=y.toString().trim();if(!S){c.value="";return}c.value=S;const x=y.getRangeAt(0).getBoundingClientRect(),A=u.value.getBoundingClientRect();d.value={position:"absolute",top:"".concat(x.top-A.top+u.value.scrollTop-36,"px"),left:"".concat(x.right-A.left,"px"),transform:"translateX(-100%)"}},p=async()=>{var S;if(!c.value)return;const{openAiChat:y}=await __vitePreload(()=>import("./index3.js?v=1777008528").then(b=>b.dQ),__vite__mapDeps([]),import.meta.url);let _;l?_=l(c.value):s?_=s:a?_="帮我分析".concat(a,"网站").concat(o,"日志内容:\n"):o?_="帮我分析当前网站".concat(o,"日志内容:\n"):_="帮我分析当前网站日志内容:\n",y({message:"".concat(_).concat(c.value),autoSend:!1,windowMode:"popup"}),(S=window.getSelection())==null||S.removeAllRanges(),c.value=""},v=f,g=f;return onMounted(()=>{document.addEventListener("selectionchange",v),u.value&&u.value.addEventListener("scroll",g)}),onUnmounted(()=>{document.removeEventListener("selectionchange",v),u.value&&u.value.removeEventListener("scroll",g)}),{containerRef:u,tipStyle:d,selectedText:c,handleAiAnalyze:p}}function useTerminalSelection(n){const{panel:r}=useGlobalStore(),{terminalRefs:a,hostActive:o,terminalList:s,terminalName:l="",enabled:u=ref(!1)}=n,c=ref(null),d=ref(""),f=ref({position:"fixed",top:"0px",left:"0px",transform:"translateX(-100%)",display:"none"});let p=null,v=null,g=0;const y=(A,w)=>{if(!r.value.showAiTip||!u.value){d.value="",f.value.display="none";return}if(!A||!c.value){d.value="",f.value.display="none";return}if(!A.hasSelection()){d.value="",f.value.display="none";return}const E=A.getSelection().trim();if(!E){d.value="",f.value.display="none";return}d.value=E,c.value.getBoundingClientRect();const D=A.element;if(!D){f.value.display="none";return}const C=D.getBoundingClientRect(),$=w!=null?w:g,P=C.right;f.value={position:"fixed",top:"".concat($-46,"px"),left:"".concat(P,"px"),transform:"translateX(-100%)",display:"flex"}},_=()=>{var $;v&&(v.dispose(),v=null);const A=o.value,w=s.value[A];if(!w)return;const E="terminal-".concat(w.id),D=a.value[E];if(!D)return;const C=($=D.useTerminal)==null?void 0:$.call(D);C&&(p=C,v=C.onSelectionChange(()=>{y(C)}))},S=async()=>{if(!d.value)return;const{openAiChat:A}=await __vitePreload(()=>import("./index3.js?v=1777008528").then(E=>E.dQ),__vite__mapDeps([]),import.meta.url),w=l?"帮我分析".concat(l,"终端输出内容:\n"):"帮我分析终端输出内容:\n";A({message:"".concat(w).concat(d.value),autoSend:!1,windowMode:"popup"}),p&&p.clearSelection(),d.value="",f.value.display="none"},b=A=>{const w=A;g=w.clientY,p&&y(p,w.clientY)},x=A=>{const w=A instanceof Element?A:null;c.value=w,w&&w.addEventListener("mouseup",b)};return watch(o,()=>{_(),d.value="",f.value.display="none"}),watch(a,()=>{_()},{deep:!0}),onMounted(()=>{setTimeout(()=>{_()},100)}),onUnmounted(()=>{v&&(v.dispose(),v=null),c.value&&c.value.removeEventListener("mouseup",b)}),{setContainerRef:x,tipStyle:f,selectedText:d,handleAiAnalyze:S}}function useVisibility(n,r={}){const{checkCss:a=!0,checkViewport:o=!0,threshold:s=0,root:l=null,rootMargin:u="0px",initialVisible:c=!1}=r,d=ref(c),f=ref(c),p=ref(c);let v=null,g=null,y=null;const _=()=>{if(!n.value)return!1;const $=n.value,P=window.getComputedStyle($);if(P.visibility==="hidden"||P.visibility==="collapse"||P.display==="none"||parseFloat(P.opacity)===0)return!1;let I=$.parentElement;for(;I;){const L=window.getComputedStyle(I);if(L.visibility==="hidden"||L.visibility==="collapse"||L.display==="none")return!1;I=I.parentElement}return!0},S=()=>{if(!a){p.value=!0;return}p.value=_(),b()},b=()=>{a&&o?d.value=p.value&&f.value:a?d.value=p.value:o?d.value=f.value:d.value=!0},x=()=>{if(a){if(n.value&&!g){g=new MutationObserver(()=>{S()});let $=n.value;for(;$;)g.observe($,{attributes:!0,attributeFilter:["style","class","hidden"]}),$=$.parentElement}y=setInterval(()=>{S()},200)}},A=()=>{y&&(clearInterval(y),y=null),g&&(g.disconnect(),g=null)},w=()=>{!o||!n.value||(v=new IntersectionObserver($=>{for(const P of $)f.value=P.isIntersecting,b()},{threshold:s,root:l,rootMargin:u}),v.observe(n.value))},E=()=>{v&&(v.disconnect(),v=null)},D=()=>{n.value&&(S(),x(),w())},C=()=>{A(),E(),d.value=!1,f.value=!1,p.value=!1};return watch(n,($,P)=>{P&&(E(),A()),$&&D()}),onMounted(()=>{n.value&&D()}),onUnmounted(()=>{C()}),{isVisible:d,inViewport:f,cssVisible:p,start:D,stop:C}}const index$4=Object.freeze(Object.defineProperty({__proto__:null,DataHandle,Message:Message$2,Socket,closeAllDialog,useAllTable,useAxios,useBatch,useColumn,useConfirm,useDataHandle,useDataPage,useDialog,useDynamicTable,useECharts,useErrorMask,useForm,useHandleError,useIdle,useLoading,useLogSelection,useLoop,useMessage,useNegotiate,useOperation,usePage,useRadioButton,useRecommendSearch,useRefresh,useRefreshList,useSearch,useSocket,useTable,useTableSelect,useTabs,useTerminalSelection,useThemeSync,useVisibility},Symbol.toStringTag,{value:"Module"})),getPublicConfig=()=>useAxios.post("panel/public/get_public_config",{customType:"model",check:"object"}),getConfigInfo=()=>useAxios.post("config/get_config",{data:{status:!0}}),getEnterpriseConfig=()=>useAxios.post("panel/public/get_exp_ltd",{customType:"model",check:"object"}),getSystemInfo$1=()=>useAxios.post("system/GetNetWork"),getDataInfo=n=>useAxios.post("data/getData",{data:n}),getDataList=n=>useAxios.post("datalist/data/get_data_list",{data:n,customType:"model",check:"object"}),installedMsgList=n=>useAxios.post("panel/msgbox/installed_msg_list",{data:n,customType:"model"}),getExecLog=()=>useAxios.post("files/GetExecLog",{check:"string"}),getTaskLists=n=>useAxios.post("task/get_task_lists",{data:n,check:"array"}),removeTask=n=>useAxios.post("task/remove_task",{data:n,check:"msg"}),removeTaskFile=n=>useAxios.post("files/RemoveTask",{data:n,check:"msg"}),setPs=n=>useAxios.post("data/setPs",{data:n,check:"msg"}),checkLogin=()=>useAxios.post("ajax/checkLogin"),restartPanel=()=>useAxios.post("system/ReWeb",{check:"msg"}),repairPanel=()=>useAxios.post("system/RepPanel"),repairPanelNew=n=>useAxios.post("system/repair_panel",{data:n,check:"object"}),getUpgradeLog=()=>useAxios.post("system/get_upgrade_log",{check:"ignore"}),serviceManage=n=>useAxios.post("system/ServiceAdmin",{data:n,check:"msg"}),restartServer=()=>useAxios.post("system/RestartServer"),getTotal=()=>useAxios.post("system/GetSystemTotal",{}),getBetaLogs=()=>useAxios.post("ajax/get_beta_logs"),bindBtUserName=n=>useAxios.post("ssl/GetAuthToken",{data:n,check:"msg"}),getBindCode=n=>useAxios.post("ssl/GetBindCode",{data:n}),histVersionInfo=()=>useAxios.post("/panel/public/get_update_logs",{check:"array",customType:"model"}),getSoftList=()=>useAxios.post("ajax/GetSoftList"),installRecommendedSoft=n=>useAxios.post("plugin/install_plugin",{data:n}),appleBeta=()=>useAxios.post("ajax/apple_beta",{check:"msg"}),toOfficial=()=>useAxios.post("ajax/to_not_beta",{check:"msg"}),getTaskCount=()=>useAxios.post("ajax/GetTaskCount"),getLines=n=>useAxios.post("ajax/get_lines",{data:n,check:"msg"}),updatePanel=(n={})=>useAxios.post("ajax/UpdatePanel",{data:n,check:"msg"}),getUpdateInfo=(n={})=>useAxios.post("ajax/UpdatePanel",{data:n,check:"ignore"}),upgradePanelNew=n=>useAxios.post("system/upgrade_panel",{data:n,check:"object"}),setDebug=()=>useAxios.post("config/set_debug"),getDebug=()=>useAxios.post("config/Get_debug"),getAuthState=()=>useAxios.post("ajax/get_pd"),getTaskList$1=(n={status:-3})=>useAxios.post("ajax/get_task_lists",{data:n}),getPluginRemarks=()=>useAxios.post("auth/get_plugin_remarks"),getVoucherPlugin=n=>useAxios.post("auth/get_voucher_plugin",{data:n}),getAllVoucherPlugin=n=>useAxios.post("auth/get_all_voucher_plugin",{data:n}),createVoucherOrder=n=>useAxios.post("auth/create_order_voucher_plugin",{data:n,check:"object"}),getCoupons=()=>useAxios.post("auth/get_coupons",{check:"object"}),getApplyCopon=n=>useAxios.post("auth/get_apply_copon",{data:n,check:"object"}),getProductPrice=n=>useAxios.post("auth/get_plugin_price",{data:n}),getProductBuyCode=n=>useAxios.post("auth/get_buy_code",{data:n,check:"object"}),getCredits=n=>useAxios.post("auth/get_credits",{data:n,check:"object"}),getLastPaidTime=n=>useAxios.post("auth/get_last_paid_time",{data:n,check:"object"}),createWithCreditByPanel=n=>useAxios.post("auth/create_with_credit_by_panel",{data:n}),unbindAuthorization=()=>useAxios.post("auth/unbind_authorization",{check:"object"}),getPaymentStatus=n=>useAxios.post("auth/get_wx_order_status",{data:n,check:"object"}),getRecommendContent=()=>useAxios.post("ajax/get_pay_type"),getSelectDir=n=>useAxios.post("files/GetDir",{data:n}),createSelectionfile=({type:n,path:r})=>useAxios.post("files/Create".concat(n),{data:{path:r},check:"msg"}),getPluginHtml=n=>useAxios.post("plugin/getConfigHtml",{data:n,check:"string"}),getPluginAuth=n=>useAxios.post("/plugin?action=a&name=".concat(n),{check:"msg",customType:"model"}),getMenuList=()=>useAxios.post("config/get_menu_list",{check:"array"}),getAdHideConfig=()=>useAxios.post("config/get_ad_hide_config"),setAdHideConfig=n=>useAxios.post("config/set_ad_hide_config",{data:n,check:"msg"}),setHideMenuList=n=>useAxios.post("config/set_hide_menu_list",{data:n,check:"msg"}),getPluginInfo=n=>useAxios.post("plugin/get_soft_find",{data:n,check:"object"}),inputPackageInfo=n=>useAxios.post("plugin/input_package",{data:n,check:"msg"}),inputZips=n=>useAxios.post("plugin/input_zip",{data:n,check:"msg"}),getPluginUpgrades=n=>useAxios.post("plugin/get_plugin_upgrades",{data:n,check:"array"}),getInstallPluginInfo=n=>useAxios.post("plugin/install_plugin",{data:n,check:"object"}),getDownloadSpeed=n=>useAxios.post("plugin/get_download_speed",{data:n,check:"object"}),getPanelPush=({id:n,name:r})=>useAxios.post("push/get_push_config",{data:{id:n,name:r},check:"object"}),setPanelPush=n=>useAxios.post("push/set_push_config",{data:n,check:"msg"}),setMsgConfig=(n,r)=>useAxios.post("config/set_msg_config&name=".concat(n),{data:r,check:"msg"}),ignoreVersion=({version:n})=>useAxios.post("ajax/ignore_version",{data:{version:n},check:"msg"}),getMsgFun=(n,r,a)=>useAxios.post("config/get_msg_fun",{data:{module_name:n,fun_name:r,msg:a||""},check:"msg"}),clearRecycleBin=()=>useAxios.post("files/Close_Recycle_bin",{check:"msg"}),getRecycleData=()=>useAxios.post("files/Get_Recycle_bin",{check:"object"}),setRecycleStatus=n=>useAxios.post("files/Recycle_bin",{data:n,check:"msg"}),getPrivilegeSoftList=n=>useAxios.post("plugin/get_soft_list",{data:n}),getNpsQuestion=n=>useAxios.post("config/get_nps_new",{data:n,check:"object"}),ignoreNps=n=>useAxios.post("config/stop_nps",{data:n,check:"object"}),getNps=n=>useAxios.post("config/get_nps",{data:{version:"-1",product_type:n.productType,software_name:n.softwareName}}),writeNpsQuestion=n=>useAxios.post("config/write_nps_new",{data:n,check:"object"}),getNewNpsTag=n=>useAxios.post("config/get_nps_info",{check:"msg",data:n}),getCustomModule=n=>useAxios.post("plugin/get_make_args",{data:n}),addCustomModule=n=>useAxios.post("plugin/add_make_args",{data:n,check:"msg"}),delCustomModule=n=>useAxios.post("plugin/del_make_args",{data:n,check:"msg"}),setCustomModule=n=>useAxios.post("plugin/set_make_args",{data:n,check:"msg"}),getPaymentCouponList=(n={})=>useAxios.post("auth/get_coupon_list",{check:"array",data:n}),ignoreCouponTime=n=>useAxios.post("auth/ignore_coupon_time",{data:n,check:"msg"}),removeSearchHistory=n=>useAxios.post("panel/history/remove_search_history",{data:n,customType:"model",check:"msg"}),clearSearchHistory=n=>useAxios.post("panel/history/clear_search_history",{data:n,customType:"model",check:"msg"}),setTableHeader=n=>useAxios.post("config/set_table_header",{data:n,check:"msg"}),getTableHeader=n=>useAxios.post("config/get_table_header",{data:n,check:"object"}),getLoginStatus=()=>useAxios.get("favicon.ico",{customType:"model",check:"msg"}),saveFileBody=n=>useAxios.post("/files?action=SaveFileBody",{data:n,customType:"model",check:"msg"}),getMemoBody=()=>useAxios.post("/config?action=get_memo_body",{customType:"model",check:"string"}),getFileContent=n=>useAxios.post("/files?action=GetFileBody",{data:n,customType:"model"}),getFileBody=n=>useAxios.post("files/GetFileBody",{data:n}),getMsgInfo=n=>useAxios.post("panel/msgbox/get_msg_info",{data:n,customType:"model"}),reHistory=n=>useAxios.post("files/re_history",{data:n,check:"object"}),getRewriteTel=n=>useAxios.post("files/read_history",{data:n}),deleteFile$1=n=>useAxios.post("files/".concat(n.type==="dir"?"DeleteDir":"DeleteFile"),{data:{path:n.path},check:"object"}),sendBaota=n=>useAxios.post("files/send_baota",{data:n,check:"msg"}),installJDK=n=>useAxios.post("/project/java/install_jdk_new",{data:n,check:"msg",customType:"model"}),installNewJdk=n=>useAxios.post("/mod/java/project/install_jdk_new",{data:n,check:"msg",customType:"model"}),createDir=n=>useAxios.post("files/CreateDir",{data:n,check:"msg"}),repairRisk=n=>useAxios.post("safe/security/set_security",{data:n,customType:"model",check:"object"}),setIgnore=n=>useAxios.post("warning/set_ignore",{data:n,check:"msg"}),setIgnoreVul=n=>useAxios.post("warning/set_vuln_ignore",{data:n,check:"msg"}),checkVul=n=>useAxios.post("warning/check_cve",{data:n,check:"msg"}),checkFind=n=>useAxios.post("warning/check_find",{data:n,check:"msg"}),setPushConfig=n=>useAxios.post("push/set_push_config",{data:n,check:"msg"}),setTaskStatus$1=n=>useAxios.post("/mod/push/task/change_task_conf",{data:n,check:"msg",customType:"model"}),getSystemConfigProjectList=()=>useAxios.post("panel/push/system_push_next",{customType:"model",check:"array"}),getOverview=()=>useAxios.post("panel/overview/GetOverview",{check:"msg",customType:"model"}),getTemplateOverview=()=>useAxios.post("panel/overview/GetTemplateOverview",{check:"object",customType:"model"}),getHomeResData=()=>useAxios.post("monitor/process_management/specific_resource_load_type",{customType:"model",check:"object"}),getAlarmModule=()=>useAxios.post("config/get_msg_configs"),getPushList=()=>useAxios.post("push/get_push_list",{check:"object"}),getMsgConfigs=()=>useAxios.post("config/get_msg_configs",{}),delPushConfig=n=>useAxios.post("push/del_push_config",{data:n,check:"msg"}),delTaskStatus$1=n=>useAxios.post("/mod/push/task/remove_task_conf",{data:n,check:"msg",customType:"model"}),setPushStatus=n=>useAxios.post("push/set_push_status",{data:n,check:"msg"}),getCloudServer=n=>useAxios.post("database/GetCloudServer",{data:n,check:"array"}),getScanList=()=>useAxios.post("project/scanning/list",{customType:"model"}),getSiteTypes=n=>useAxios.post("site/get_site_types",{data:n,check:"array"}),getTaskTemplate=()=>useAxios.post("/mod/push/task/get_task_template_list",{check:"msg",customType:"model"}),delToken=()=>useAxios.post("ssl/DelToken",{check:"msg"}),getTaskSpeed=()=>useAxios.post("files/GetTaskSpeed"),installAlarmModule=({name:n})=>useAxios.post("config/install_msg_module&name=".concat(n),{check:"msg"}),setUsername=n=>useAxios.post("config/setUsername",{data:n,check:"msg"}),getSoftStatus=n=>useAxios.post("/panel/public/get_soft_status",{data:n,check:"object",customType:"model"}),setAtuoStartSyssafe=n=>useAxios.post("crontab/set_atuo_start_syssafe",{data:n,check:"msg"}),setPassword=n=>useAxios.post("config/setPassword",{data:n,check:"msg"}),setlastPassword=()=>useAxios.post("config/setlastPassword",{check:"msg"}),getCertList=(n={})=>useAxios.post("ssl/get_cert_list",{data:n,check:"array"}),getSenderAlarmList=n=>useAxios.post("/mod/push/msgconf/get_sender_list",{data:n,check:"msg",customType:"model"}),getAlarmTaskList=n=>useAxios.post("/mod/push/task/get_task_list",{data:n,check:"object",customType:"model"}),setNewAlarmTask$1=n=>useAxios.post("/mod/push/task/set_task_conf",{data:n,check:"msg",customType:"model"}),upDateNewAlarmTask=n=>useAxios.post("/mod/push/task/update_task_status",{data:n,check:"msg",customType:"model"}),setSmsStatus=n=>useAxios.post("/mod/push/msgconf/change_sendr_used",{data:n,check:"msg",customType:"model"}),setBindStatus=n=>useAxios.post("/mod/push/msgconf/change_sendr_used",{data:n,check:"msg",customType:"model"}),testBindAlarm=n=>useAxios.post("/mod/push/msgconf/test_send_msg",{data:n,check:"msg",customType:"model"}),unBindCommonAccount=n=>useAxios.post("/mod/push/msgconf/remove_sender",{data:n,check:"msg",customType:"model"}),unBindWxAccount=n=>useAxios.post("/mod/push/msgconf/unbind_wx_account",{data:n,check:"object",customType:"model"}),setDefaultSender=n=>useAxios.post("/mod/push/msgconf/set_default_sender",{data:n,check:"msg",customType:"model"}),getBindWxCode=()=>useAxios.post("/mod/push/msgconf/wx_account_auth",{check:"msg",customType:"model"}),setCommonAccount=n=>useAxios.post("/mod/push/msgconf/set_sender_conf",{data:n,check:"msg",customType:"model"}),editFtpPort=n=>useAxios.post("ftp/setPort",{data:n,check:"msg"}),getStartErrType=()=>useAxios.post("database/GetStartErrType",{check:"msg"}),setInnodbRecovery=n=>useAxios.post("database/SetInnodbRecovery",{data:n,check:"msg"}),getPhpVersion=()=>useAxios.post("site/GetPHPVersion"),getPhpmyadminSsl=()=>useAxios.post("ajax/get_phpmyadmin_ssl",{check:"object"}),setPhpmyadminSsl=n=>useAxios.post("ajax/set_phpmyadmin_ssl",{data:n,check:"msg"}),changePhpmyadminSslPort=n=>useAxios.post("ajax/change_phpmyadmin_ssl_port",{data:n,check:"msg"}),setPHPMyAdminPass=n=>useAxios.post("ajax/setPHPMyAdmin",{data:n,check:"msg"}),getKey=n=>useAxios.post("data/getKey",{data:n,check:"string"}),dokcerInstall$1=n=>useAxios.post("/btdocker/setup/install_docker_program",{data:n,customType:"model",check:"msg"}),checkLoginAuth=()=>useAxios.post("/ssl?action=GetCloudType",{loading:"正在获取面板消息",check:"object",customType:"model"}),tencentLogin=n=>useAxios.post("/ssl?action=AuthLogin",{data:n,check:"object",customType:"model"}),getOtheAccreditURL=n=>useAxios.post("/ssl?action=GetAuthUrl",{data:n,check:"object",customType:"model"}),setBackupPopup=()=>useAxios.post("/mod/backup_restore/com/del_migrate_tips",{check:"msg",customType:"model"}),getWechatAuthUrl=()=>useAxios.post("ssl/GetWechatAuthUrl",{data:{},check:"msg"}),setWechatBindUser=n=>useAxios.post("ssl/SetWechatBindUser",{data:n,check:"msg"}),getUserInfo=()=>useAxios.post("ssl/GetUserInfo",{data:{},check:"msg"}),setNoticeIgnore=n=>useAxios.post("config/SetNoticeIgnore",{data:n,check:"msg"}),getUnbindCount=n=>useAxios.post("auth/get_auth_bind_num",{data:n,check:"msg"}),updatePanelEnv=()=>useAxios.post("system/upgrade_env",{check:"msg"}),getUpdatePanelEnvLog=()=>useAxios.post("system/upgrade_env_log",{check:"object"}),claimActivityDiscount=n=>useAxios.post("auth/receive_products",{data:n,check:"default"}),getActivityInfo=n=>useAxios.post("auth/get_free_activity_info",{data:n,check:"default"}),phpmyadminClientCheck=()=>useAxios.post("ajax/phpmyadmin_client_check"),checkPluginVersion=n=>useAxios.post("/panel/public/check_plugin",{data:n,check:"ignore",customType:"model"}),setWorkorder=()=>useAxios.post("config/show_workorder",{check:"msg"}),setEvaluate=()=>useAxios.post("config/show_evaluate",{check:"msg"}),setAiTip=()=>useAxios.post("config/show_panelai",{check:"msg"}),global$2=Object.freeze(Object.defineProperty({__proto__:null,addCustomModule,appleBeta,bindBtUserName,changePhpmyadminSslPort,checkFind,checkLogin,checkLoginAuth,checkPluginVersion,checkVul,claimActivityDiscount,clearRecycleBin,clearSearchHistory,createDir,createSelectionfile,createVoucherOrder,createWithCreditByPanel,delCustomModule,delPushConfig,delTaskStatus:delTaskStatus$1,delToken,deleteFile:deleteFile$1,dokcerInstall:dokcerInstall$1,editFtpPort,getActivityInfo,getAdHideConfig,getAlarmModule,getAlarmTaskList,getAllVoucherPlugin,getApplyCopon,getAuthState,getBetaLogs,getBindCode,getBindWxCode,getCertList,getCloudServer,getConfigInfo,getCoupons,getCredits,getCustomModule,getDataInfo,getDataList,getDebug,getDownloadSpeed,getEnterpriseConfig,getExecLog,getFileBody,getFileContent,getHomeResData,getInstallPluginInfo,getKey,getLastPaidTime,getLines,getLoginStatus,getMemoBody,getMenuList,getMsgConfigs,getMsgFun,getMsgInfo,getNewNpsTag,getNps,getNpsQuestion,getOtheAccreditURL,getOverview,getPanelPush,getPaymentCouponList,getPaymentStatus,getPhpVersion,getPhpmyadminSsl,getPluginAuth,getPluginHtml,getPluginInfo,getPluginRemarks,getPluginUpgrades,getPrivilegeSoftList,getProductBuyCode,getProductPrice,getPublicConfig,getPushList,getRecommendContent,getRecycleData,getRewriteTel,getScanList,getSelectDir,getSenderAlarmList,getSiteTypes,getSoftList,getSoftStatus,getStartErrType,getSystemConfigProjectList,getSystemInfo:getSystemInfo$1,getTableHeader,getTaskCount,getTaskList:getTaskList$1,getTaskLists,getTaskSpeed,getTaskTemplate,getTemplateOverview,getTotal,getUnbindCount,getUpdateInfo,getUpdatePanelEnvLog,getUpgradeLog,getUserInfo,getVoucherPlugin,getWechatAuthUrl,histVersionInfo,ignoreCouponTime,ignoreNps,ignoreVersion,inputPackageInfo,inputZips,installAlarmModule,installJDK,installNewJdk,installRecommendedSoft,installedMsgList,phpmyadminClientCheck,reHistory,removeSearchHistory,removeTask,removeTaskFile,repairPanel,repairPanelNew,repairRisk,restartPanel,restartServer,saveFileBody,sendBaota,serviceManage,setAdHideConfig,setAiTip,setAtuoStartSyssafe,setBackupPopup,setBindStatus,setCommonAccount,setCustomModule,setDebug,setDefaultSender,setEvaluate,setHideMenuList,setIgnore,setIgnoreVul,setInnodbRecovery,setMsgConfig,setNewAlarmTask:setNewAlarmTask$1,setNoticeIgnore,setPHPMyAdminPass,setPanelPush,setPassword,setPhpmyadminSsl,setPs,setPushConfig,setPushStatus,setRecycleStatus,setSmsStatus,setTableHeader,setTaskStatus:setTaskStatus$1,setUsername,setWechatBindUser,setWorkorder,setlastPassword,tencentLogin,testBindAlarm,toOfficial,unBindCommonAccount,unBindWxAccount,unbindAuthorization,upDateNewAlarmTask,updatePanel,updatePanelEnv,upgradePanelNew,writeNpsQuestion},Symbol.toStringTag,{value:"Module"})),GLOBAL_STORE=defineStore("GLOBAL_STORE",()=>{const n=ref("/"),r=ref(""),a=ref([]),o=ref(0),s=ref(0),l=ref(997),u=ref(""),c=ref(!1),d=ref(),f=ref(),p=ref(!1),v=ref(!1),g=ref(!1),y=ref(),_=ref(!0),S=ref(!1),b=ref(!1),x=ref(!1),A=ref(!0),w=ref(window.vite_public_panel_theme),E=ref(window.vite_public_ad_hide_config||{homeHeaderPay:!1,homeHeaderTooltip:!1,homeOverview:!1,homeSoft:!1,homeDisk:!1,homeProcess:!1,tab:!1,siteScan:!1,siteSafe:!1,siteTableWafIcon:!1,siteTableQuota:!1,siteTableTotal:!1,siteTableWaf:!1,siteTableDayStatistic:!1,siteConfigSync:!1,siteConfigAuth:!1,siteConfigPhp:!1,siteConfigTamper:!1,siteConfigSafe:!1,siteConfigLog:!1,siteConfigNode:!1,siteMonitor:!1,ftpLog:!1,ftpTableLog:!1,ftpTableQuota:!1,databaseTableBackup:!1,controlDaily:!1,firewallMalicious:!1,firewallSshLog:!1,firewallSshAccount:!1,firewallSshReinforce:!1,firewallServerSsh:!1,firewallSafeDetect:!1,firewallKeyword:!1,firewallPhp:!1,firewallIntrusion:!1,firewallFixed:!1,firewallScan:!1,fileTamper:!1,fileSync:!1,fileCloud:!1,fileDiskAnalysis:!1,logIp:!1,logSsh:!1,crontabBackup:!1}),D=useLocalStorage("color-scheme",window.vite_public_panel_theme.theme.preset||"light"),C=reactive({collapse:sessionStorage.getItem("MENU-COLLAPSE")==="true",collapseAuto:!1,collapseLock:!1,mouserover:!1,menuName:"",menuMousemove:!1,menuMouseleave:!1}),$=reactive({bindUser:"",authType:"free",recommendAuth:"ltd",voucherOpenTime:0,newUserVoucherOpenTime:0,isGetCoupon:!1,authExpirationTime:-1,isShowCoupon:!0,noExceedLimit:!1,userGive:!1}),P=ref(0),M=reactive({noticeIgnore:{https:!0,port:!0},oem:"tencent",port:0,initInstall:!0,isDebug:!1,isFileRecycle:!1,isDbRecycle:!1,isShowCustomer:!1,showAiTip:!1,isShowEvaluate:!1,sidebarTitle:"",msgBoxTaskCount:0,panelNps:!1,sitePath:"",backupPath:"",logsPath:"",migration:!1,ipv6:!1,node_host:{}}),I=reactive({modulePush:[],updatePush:!1,updateTaskId:""}),L=reactive({type:"",info:{}}),O=reactive({list:[],total:0}),R=reactive({webserver:"",web:{setup:!1,status:!1,version:"",type:""},mysql:{setup:!1,status:!1,version:""},ftp:{setup:!1,status:!1,version:"",port:0},php:[],phpmyadmin:{setup:!1,status:!1,version:""},memcached:{setup:!1,status:!1,version:""},redis:{setup:!1,status:!1,version:""},tomcat:{setup:!1,status:!1,version:""},total:!1}),N=reactive({template:[],alarmPopupData:[],config:[],old:[],info:[],checkedLoad:!1}),V=reactive({visible:!1,id:"",name:"",built:!1,init:!1,callback:null}),F=useSessionStorage("remarksInfo",{auth_tips:{},ltd_key:[],pro_key:[]}),U=ref(window.vite_public_version.indexOf("10.")>-1?"".concat(window.vite_public_version):window.vite_public_version),H=ref(window.vite_public_title),W=ref(window.vite_public_ip),G=ref({status:!1,callback:null}),B=computed(()=>{var ue,he,ve,ye;if(["/static/icons/logo-white.svg","/static/icons/logo-green.svg"].includes((ue=w.value.logo)==null?void 0:ue.image)){if(((he=w.value.theme)==null?void 0:he.view)==="white")return"/static/icons/logo-green.svg";if(((ve=w.value.theme)==null?void 0:ve.view)==="default")return"/static/icons/logo-white.svg"}return((ye=w.value.logo)==null?void 0:ye.image)||""}),Y=computed(()=>w.value.theme.view==="aapanel"),Z=computed(()=>{var ae,ue;return((ue=(ae=F.value)==null?void 0:ae.ltd_key)==null?void 0:ue.map(he=>[he,F.value.auth_tips[he]]))||[]}),K=computed(()=>{var ae,ue;return((ue=(ae=F.value)==null?void 0:ae.pro_key)==null?void 0:ue.map(he=>[he,F.value.auth_tips[he]]))||[]}),ee=computed(()=>["ssl251104","ssl251210"].includes(M.oem)),j=computed(()=>C.collapse),q=computed(()=>$.authExpirationTime!==-1),J=computed(()=>({pro:"专业版",ltd:"企业版",free:"正式版"})[$.authType]||"正式版"),X=computed(()=>$.authExpirationTime===0?"永久授权":formatTime$1($.authExpirationTime,"yyyy-MM-dd")),re=computed(()=>{const ae=new Date().getTime()/1e3;return(parseInt("".concat($.authExpirationTime-ae),10)/86400).toFixed(0)}),Q=computed(()=>C.collapse||C.mouserover?"pl-[6rem]":"pl-[18rem]"),te=computed(()=>"".concat(C.mouserover?"box-shadow ":"").concat(C.collapse?"!w-[6rem]":"!w-[18rem]")),ie=computed(()=>C.collapse?"message-shrink-number":"message-number"),ne=computed(()=>M.sidebarTitle?M.sidebarTitle.length:W.value.replace(/\./g,"").length),oe=computed(()=>["/modify_password"].includes(router.currentRoute.value.path)),le=()=>{C.mouserover?(C.collapse=!1,C.mouserover=!1):C.collapse=!C.collapse,sessionStorage.setItem("MENU-COLLAPSE",C.collapse.toString())},ce=()=>{!C.mouserover&&C.collapse&&(C.mouserover=!0,C.collapse=!1)},de=()=>{C.collapseLock||C.mouserover&&(C.mouserover=!1,C.collapse=!0)},fe=async ae=>{if(oe.value)return;const ue=ae.replace(/^\/*/,""),he=localStorage.getItem("".concat(ue.toUpperCase(),"_ROUTER"))||"",ve=routes.find(ye=>ye.path===ae);if(ve.children&&ve.children.find(be=>be.name===he)&&he){router.push({name:he});return}localStorage.removeItem("".concat(ue.toUpperCase(),"_ROUTER")),router.push({path:ve.children?"".concat(ae,"/").concat(ve.children[0].path):ae})},pe=async()=>{try{const{data:ae}=await getTaskCount();M.msgBoxTaskCount=ae||0}catch(ae){}},me=async()=>{const{data:ae}=await getAuthState();Se(ae)},Se=ae=>{if(!isArray$2(ae))return;const[,ue,he]=ae,ve=ue>-1?["pro",ue]:he>-1?["ltd",he]:["free",he];$.authType=ve[0],$.authExpirationTime=ve[1]},xe=()=>{$.authType="free",$.authExpirationTime=-1},Ee=ae=>{isArray$2(ae.task_list)&&(O.total=ae.length,O.list=ae||[])},Re=async()=>{try{const{data:ae}=await getTaskList$1();Ee(ae)}catch(ae){}},Ce=ae=>{const{web:ue,mysql:he,memcached:ve,php:ye,phpmyadmin:be,redis:Ae,tomcat:_e,total:we}=ae;R.web=ue,R.mysql=he,R.ftp={...R.ftp,...ae["pure-ftpd"]},R.memcached=ve,R.php=ye,R.phpmyadmin=be,R.redis=Ae,R.tomcat=_e,R.total=we},Pe=ae=>{const{o:ue,debug:he,recycle_bin:ve,recycle_db_bin:ye,show_workorder:be,show_panelai:Ae,show_evaluate:_e,left_title:we,user_info:{data:{username:Ve},status:Fe},isSetup:Ge,panel:{port:He},sites_path:ze,backup_path:Ue,webserver:We,notice_risk_ignore:Ye,ftpPort:je,migration:qe,ipv6:Ze,node_host:Ke}=ae;$.bindUser=Fe?Ve:"",R.webserver=We,R.total=ae.total,R.ftp.port=je,Object.assign(M,{ipv6:Ze==="checked",oem:ue,noticeIgnore:Ye,initInstall:Ge,isShowCustomer:be,showAiTip:Ae,isShowEvaluate:_e,isFileRecycle:ve,isDbRecycle:ye,sidebarTitle:we,port:Number(He),isDebug:he,sitePath:ze,backupPath:Ue,migration:qe,node_host:Ke})},De=ae=>{const{exp_ltd:ue,install_ltd:he}=ae;S.value=he,$.noExceedLimit=ue.no_exceed_limit,$.userGive=ue.user_give},Me=async()=>{try{const{data:{data:ae},status:ue}=await getAlarmTaskList();if(ue){const he=ae.find(ve=>ve.keyword==="panel_update");I.modulePush=he?he.sender:[],I.updatePush=he?he.status:!1,I.updateTaskId=he?he.id:""}}catch(ae){}},Ie=async()=>{try{const{data:{data:ae}}=await getAlarmTaskList();return N.alarmPopupData=ae,ae}catch(ae){return[]}},$e=async ae=>{try{N.checkedLoad=!0;const ue={refresh:Number(ae)},{data:he}=await getSenderAlarmList(ue);N.config=he.data||[],N.checkedLoad=!1}catch(ue){}finally{N.checkedLoad=!1}},ke=async()=>{try{const{data:ae}=await getAlarmModule();N.old=ae||{}}catch(ae){}},Oe=()=>{window.addEventListener("message",ae=>{ae.data==="showMainView"&&(localStorage.setItem("showMainView",JSON.stringify(ae.data)),l.value=996),isString$1(ae.data)&&ae.data.indexOf("refreshMain")!==-1&&(localStorage.setItem("refreshMain",JSON.stringify(ae.data)),ae.data==="refreshMain"?window.location.reload():window.location.href=ae.data.split("::")[1].replace("_ifame",""))})},Be=useThrottleFn(async()=>{try{const{data:ae}=await getPublicConfig();if(!isObject$4(ae)&&isNull(ae))return!1;const{get_pd:ue,task_count:he,aliyun_ecs_ltd:ve,hide_ad:ye}=ae;A.value=!!ye,b.value=ve,M.msgBoxTaskCount=he||0,sessionStorage.setItem("GlobalInfoTime","".concat(new Date().getTime())),Pe(ae),Se(ue),Ee(ae),Ce(ae);const be=localStorage.getItem("EnterpriseInfoTime")||"",Ae=()=>getEnterpriseConfig().then(async({data:_e})=>{if(De(_e),localStorage.setItem("EnterpriseInfoTime",JSON.stringify({time:new Date().getTime(),..._e})),_e.aliyun_ecs_ltd){const we=await useDataHandle({loading:"正在获取阿里云授权,请稍后...",request:tencentLogin({client:2})});we.status||(x.value=!0),we.status&&window.location.reload()}});if(!be)Ae();else{const _e=JSON.parse(be);Number(_e.time)+864e5<new Date().getTime()?Ae():De(_e)}return Promise.resolve(ae)}catch(ae){return}},1e3),Ne=async()=>{await pe(),M.msgBoxTaskCount>0&&setTimeout(Ne,3e3)};return{scheme:D,globalTheme:w,ltdRemarks:Z,proRemarks:K,remarksInfo:F,isRecomCert:ee,menuLogo:B,enterpriseRec:_,aliyunEcsLtd:b,aliyunEcsFailed:x,isHideAd:A,routerActive:n,routerName:r,routesMenu:a,isAapanel:Y,isRefreshMenu:p,isRefreshSoftList:v,isUpdatePayment:g,mainWidth:o,mainHeight:s,iframezIndex:l,iframeActive:u,isCompatible:c,menuControl:C,menuControlIcon:j,payment:$,paymentVoucherType:P,panel:M,specialVersion:L,plugin:R,push:N,task:O,updatePush:I,pluginInfo:V,panelVersion:U,title:H,serverIp:W,updatePluginCheck:G,authStatus:q,resetAuthState:xe,authTypeTitle:J,authExpirationTime:X,authRemainingDays:re,robserver:d,layoutBody:f,layoutBodyStyle:Q,layoutSidebarStyle:te,messageNumberStyle:ie,messageIpNumberLength:ne,disableSidebar:oe,installInfo:y,forceLtd:S,cutCollapseView:le,menuCollapseMouseenter:ce,menuCollapseMouseleave:de,getMsgBoxTaskCount:pe,getAuthState:me,setAuthState:Se,setSoftSetup:Ce,setBasicInfo:Pe,getSoftRemarks:async()=>{try{const{data:{remarks:ae}}=await getPrivilegeSoftList();F.value={auth_tips:ae.auth_tips||{},ltd_key:ae.ltd_key||[],pro_key:ae.pro_key||[]}}catch(ae){}},getUpdatePushInfo:Me,getAlarmData:Ie,getSenderAlarmListInfo:$e,getOldSenderAlarmListInfo:ke,getGlobalInfo:Be,getRealTimeTaskList:Re,getUserInfo:async()=>{try{const{data:{username:ae},status:ue}=await getUserInfo();$.bindUser=ue?ae:""}catch(ae){}},updateTaskCount:Ne,cutMenuRouter:fe,mountMessage:Oe,setLtdConfig:De,getUnbindNumber:async()=>{const ae={pro:"100000011",ltd:"100000032",dev:"100000068"};if(ae[$.authType])try{const{data:ue}=await getUnbindCount({pid:ae[$.authType]});return(ue==null?void 0:ue.unbind_count)||0}catch(ue){return 0}return 0},adHideInfo:E}},{persist:{storage:sessionStorage,pick:["payment"]}}),useGlobalStore=()=>{const n=GLOBAL_STORE(),r=storeToRefs(n);return{...n,...r}},global$1=Object.freeze(Object.defineProperty({__proto__:null,GLOBAL_STORE,useGlobalStore},Symbol.toStringTag,{value:"Module"})),beforeEnter$4=async(n,r,a)=>{try{const{payment:o}=useGlobalStore();if(!n.path.includes("/ai/setting"))return o.value.bindUser?a():a("/ai/setting");a()}catch(o){}a()},aiRoutes={name:"ai",path:"/ai",meta:{sort:6,title:"AI",icon:"ai"},component:()=>__vitePreload(()=>import("./index4.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"chat",name:"ai-chat",meta:{title:"AI对话"},beforeEnter:beforeEnter$4,component:()=>__vitePreload(()=>import("./index5.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"tools",name:"ai-tools",meta:{title:"助手列表"},beforeEnter:beforeEnter$4,component:()=>__vitePreload(()=>import("./index6.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"skills",name:"ai-skills",meta:{title:"技能管理"},beforeEnter:beforeEnter$4,component:()=>__vitePreload(()=>import("./index7.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"quota",name:"ai-quota",meta:{title:"额度管理"},beforeEnter:beforeEnter$4,component:()=>__vitePreload(()=>import("./index8.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"setting",name:"ai-setting",meta:{title:"设置"},beforeEnter:beforeEnter$4,component:()=>__vitePreload(()=>import("./index9.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},configRoutes={name:"config",path:"/config",meta:{sort:19,title:"设置",icon:"config"},component:()=>__vitePreload(()=>import("./index10.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"common",name:"common",meta:{title:"常用设置"},component:()=>__vitePreload(()=>import("./index11.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"panel",name:"panel",meta:{title:"面板设置"},component:()=>__vitePreload(()=>import("./index12.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"safe",name:"safe",meta:{title:"安全设置"},component:()=>__vitePreload(()=>import("./index13.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"ui",name:"ui",meta:{title:"界面设置"},component:()=>__vitePreload(()=>import("./index14.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"alarm",name:"alarm",meta:{title:"告警通知"},component:()=>__vitePreload(()=>import("./index15.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"back",name:"back",meta:{title:"备份还原"},component:()=>__vitePreload(()=>import("./index16.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"migrate",name:"migrate",meta:{title:"整机迁移"},component:()=>__vitePreload(()=>import("./index17.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)}]},controlRoutes={name:"control",path:"/control",meta:{sort:6,title:"监控",icon:"control"},component:()=>__vitePreload(()=>import("./index18.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"monitor",name:"monitor",meta:{title:"系统监控"},component:()=>__vitePreload(()=>import("./index19.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"daily",name:"daily",ishide:"controlDaily",meta:{title:"面板日报"},component:()=>__vitePreload(()=>import("./index20.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},crontabRoutes={name:"crontab",path:"/crontab",meta:{sort:17,title:"计划任务",icon:"crontab"},component:()=>__vitePreload(()=>import("./index21.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"task",name:"task",meta:{title:"计划任务"},component:()=>__vitePreload(()=>import("./index22.js?v=1777008528").then(n=>n.a),__vite__mapDeps([]),import.meta.url)},{path:"library",name:"library",meta:{title:"脚本库"},component:()=>__vitePreload(()=>import("./index23.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)}]},databaseRoutes={name:"database",path:"/database",meta:{sort:4,title:"数据库",icon:"database"},component:()=>__vitePreload(()=>import("./index24.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"mysql",name:"mysql",meta:{title:"MySQL"},component:()=>__vitePreload(()=>import("./index25.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"sqlserver",name:"sqlserver",meta:{title:"SQLServer"},component:()=>__vitePreload(()=>import("./index26.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"mongodb",name:"mongodb",meta:{title:"MongoDB"},component:()=>__vitePreload(()=>import("./index27.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"redis",name:"redis",meta:{title:"Redis"},component:()=>__vitePreload(()=>import("./index28.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"pgsql",name:"pgsql",meta:{title:"PgSQL"},component:()=>__vitePreload(()=>import("./index29.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"sqlite",name:"sqlite",meta:{title:"SQLite"},component:()=>__vitePreload(()=>import("./index30.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},delContainer=n=>useAxios.post("/btdocker/container/del_container",{data:n,customType:"model",check:"msg"}),getContainerLog=n=>useAxios.post("/btdocker/container/get_logs",{data:n,loading:"获取日志,请稍候...",customType:"model",check:"object"}),getContainerControl=n=>useAxios.post("/btdocker/status/stats",{data:n,customType:"model",check:"object"}),getDockerSystemInfo=()=>useAxios.post("/btdocker/status/get_docker_system_info",{customType:"model",check:"object"}),getAllContainerLog=()=>useAxios.post("/btdocker/container/get_logs_all",{loading:"获取日志,请稍候...",customType:"model",check:"object"}),clearContainerLog=n=>useAxios.post("/btdocker/container/clear_log",{data:n,customType:"model",check:"msg"}),setContainerStatus=n=>useAxios.post("/btdocker/container/set_container_status",{data:n,customType:"model",check:"msg"}),AddContainerStatus=n=>useAxios.post("/btdocker/container/run",{data:n,customType:"model",check:"msg"}),CmdAddContainer=(n,r)=>useAxios.post("/btdocker/".concat(r||"container","/run_cmd"),{data:n,customType:"model",check:"msg"}),getDockerDetail=n=>useAxios.post("/btdocker/container/get_container_info",{data:n,customType:"model",check:"object"}),getConCmd=n=>useAxios.post("/btdocker/container/docker_shell",{data:n,customType:"model",check:"msg"}),clearCon=n=>useAxios.post("/btdocker/container/prune",{data:n,customType:"model",check:"msg"}),setConReset=n=>useAxios.post("/btdocker/container/update_restart_policy",{data:n,customType:"model",check:"msg"}),setConAddNet=n=>useAxios.post("/btdocker/network/connect",{data:n,loading:"加入网络,请稍候...",customType:"model",check:"object"}),setConOutNet=n=>useAxios.post("/btdocker/network/disconnect",{data:n,loading:"退出网络,请稍候...",customType:"model",check:"object"}),setConMirror=n=>useAxios.post("/btdocker/container/commit",{data:n,loading:"创建镜像,请稍候...",customType:"model",check:"msg"}),editCon=n=>useAxios.post("/btdocker/container/upgrade_container",{data:n,loading:"加载中,请稍候...",customType:"model",check:"msg"}),addProduct=n=>useAxios.post("/btdocker/compose/create",{data:n,customType:"model",loading:"添加项目,请稍候...",check:"msg"}),editProduct=n=>useAxios.post("/btdocker/compose/edit",{data:n,customType:"model",loading:"编辑项目,请稍候...",check:"msg"}),getMirrorList=()=>useAxios.post("btdocker/image/image_list",{customType:"model",check:"array"}),getStashList=()=>useAxios.post("/btdocker/registry/registry_list",{customType:"model",check:"array"}),addStash=n=>useAxios.post("/btdocker/registry/add",{data:n,loading:"添加仓库",customType:"model",check:"msg"}),editStash=n=>useAxios.post("/btdocker/registry/edit",{data:n,loading:"编辑仓库",customType:"model",check:"msg"}),delStash=n=>useAxios.post("/btdocker/registry/remove",{data:n,loading:"删除仓库",customType:"model",check:"msg"}),getpullMirror=n=>useAxios.post("/btdocker/image/load",{data:n,customType:"model",loading:"导入镜像",check:"msg"}),getBuildMirror=n=>useAxios.post("/btdocker/image/build",{data:n,customType:"model",loading:"构建镜像",check:"msg"}),getPushMirror=n=>useAxios.post("/btdocker/image/push",{data:n,customType:"model",loading:"推送镜像",check:"msg"}),getExportMirror=n=>useAxios.post("/btdocker/image/save",{data:n,customType:"model",loading:"导出镜像",check:"msg"}),deleteMirror=n=>useAxios.post("/btdocker/image/remove",{data:n,customType:"model",check:"object"}),clearMirror=n=>useAxios.post("/btdocker/image/prune",{data:n,loading:"正在清理无用镜像,请稍候...",customType:"model",check:"msg"}),getNetList=()=>useAxios.post("/btdocker/network/get_host_network",{customType:"model",check:"array"}),addN=n=>useAxios.post("/btdocker/network/create_network",{data:n,customType:"model",loading:"正在添加网络,请稍候...",check:"msg"}),delNet=n=>useAxios.post("/btdocker/network/del_network",{data:n,customType:"model",check:"msg"}),clearNet=()=>useAxios.post("/btdocker/network/prune",{customType:"model",check:"msg"}),getStorageList=()=>useAxios.post("/btdocker/volume/get_volume_list",{customType:"model",check:"array"}),addStorage=n=>useAxios.post("/btdocker/volume/add",{data:n,customType:"model",check:"msg"}),delStorage=n=>useAxios.post("/btdocker/volume/remove",{data:n,customType:"model",check:"msg"}),clearStorage=()=>useAxios.post("/btdocker/volume/prune",{customType:"model",check:"msg"}),getSetting=()=>useAxios.post("/btdocker/setup/get_config",{customType:"model",check:"object"}),getURL=n=>useAxios.post("/btdocker/setup/get_registry_mirrors",{data:n||{},customType:"model",check:"object"}),getSystemInfo=()=>useAxios.post("/btdocker/setup/get_system_info",{customType:"model",check:"default"}),setDocker=n=>useAxios.post("/btdocker/setup/docker_service",{data:n,loading:"设置docker状态,请稍候...",customType:"model",check:"msg"}),repairDocker=()=>useAxios.post("/btdocker/setup/repair_docker",{loading:"修复docker程序,请稍候...",customType:"model",check:"msg"}),setMonitor=n=>useAxios.post("/btdocker/setup/set_docker_monitor",{data:n,loading:"设置监控状态,请稍候...",customType:"model",check:"msg"}),setMonitorDate=n=>useAxios.post("/btdocker/setup/set_monitor_save_date",{data:n,loading:"设置监控保存天数,请稍候...",customType:"model",check:"msg"}),setComposePath=n=>useAxios.post("/btdocker/setup/set_docker_compose_path",{data:n,loading:"设置docker compose路径,请稍候...",customType:"model",check:"msg"}),setConfigFile=n=>useAxios.post("/btdocker/setup/save_daemon_json",{data:n,loading:"修改配置文件,请稍候...",customType:"model",check:"msg"}),getTemplateList=()=>useAxios.post("/btdocker/compose/template_list",{customType:"model",check:"array"}),addTemplate=n=>useAxios.post("/btdocker/compose/add_template",{data:n,loading:"添加项目模板,请稍候...",customType:"model",check:"msg"}),searchTemplate=n=>useAxios.post("/btdocker/compose/get_compose_project",{data:n,customType:"model",check:"array"}),searchOfficialTemplate=n=>useAxios.post("/btdocker/image/search",{data:n,customType:"model",check:"array"}),getImageDetail=n=>useAxios.post("/btdocker/image/get_image_detail",{data:n,customType:"model",check:"array"}),getImageTag=n=>useAxios.post("/btdocker/image/get_image_tags",{data:n,customType:"model",check:"array"}),addDirTemplate=n=>useAxios.post("/btdocker/compose/add_template_in_path",{data:n,loading:"添加项目模板,请稍候...",customType:"model",check:"msg"}),getTemplateDetail=n=>useAxios.post("/btdocker/compose/get_template",{data:n,loading:"获取模板信息,请稍候...",customType:"model",check:"msg"}),editTemplate=n=>useAxios.post("/btdocker/compose/edit_template",{data:n,loading:"添加项目模板,请稍候...",customType:"model",check:"msg"}),delTemplate=n=>useAxios.post("/btdocker/compose/remove_template",{data:n,loading:"删除项目模板,请稍候...",customType:"model",check:"msg"}),pullMirror=n=>useAxios.post("/btdocker/compose/pull",{data:n,customType:"model",check:"msg"}),getContainerList=()=>useAxios.post("/btdocker/container/get_list",{customType:"model",check:"object"}),getContainerBackupList=n=>useAxios.post("/btdocker/backup/get_backup_list",{data:n,customType:"model",check:"array"}),addContainerBackup=n=>useAxios.post("/btdocker/backup/backup_volume",{data:n,customType:"model",check:"msg"}),delContainerBackup=n=>useAxios.post("/btdocker/backup/remove_backup",{data:n,customType:"model",check:"msg"}),ContainerReName=n=>useAxios.post("/btdocker/container/rename_container",{data:n,customType:"model",loading:"正在重命名,请稍候...",check:"msg"}),dokcerInstall=n=>useAxios.post("/btdocker/setup/install_docker_program",{data:n,customType:"model",loading:"正在安装,请稍候...",check:"msg"}),getCertInfo=n=>useAxios.post("/btdocker/proxy/get_cert_info",{data:n,customType:"model",check:"object"}),createPortProxy=n=>useAxios.post("/btdocker/proxy/create_proxy",{data:n,customType:"model",loading:"正在设置,请稍候...",check:"msg"}),getNoPortConfig=n=>useAxios.post("/btdocker/proxy/get_proxy_info",{data:n,customType:"model",check:"object"}),closePortLogin=n=>useAxios.post("/btdocker/proxy/close_proxy",{data:n,customType:"model",loading:"正在关闭,请稍候...",check:"msg"}),setContainerTop=n=>useAxios.post("/btdocker/container/set_container_to_top",{data:n,customType:"model",loading:"正在设置,请稍候...",check:"msg"}),setContainerRemark=n=>useAxios.post("/btdocker/container/set_container_remark",{data:n,customType:"model",loading:"正在设置,请稍候...",check:"msg"}),getContainerPath=n=>useAxios.post("/btdocker/container/get_container_merged",{data:n,customType:"model",check:"object"}),getContainerInfo=()=>useAxios.post("/btdocker/container/get_other_container_data",{customType:"model",check:"array"}),dokcerUnInstall=n=>useAxios.post("/btdocker/setup/uninstall_docker_program",{data:n,customType:"model",loading:"正在卸载,请稍候...",check:"msg"}),checkUnstaillStatus=()=>useAxios.post("/btdocker/setup/uninstall_status",{customType:"model",loading:"正在检查状态,请稍候...",check:"msg"}),checkTemplateUsed=n=>useAxios.post("/btdocker/compose/check_use_template",{data:n,customType:"model",loading:"正在检查状态,请稍候...",check:"msg"}),getComposeConLog=n=>useAxios.post("/mod/docker/com/get_project_container_logs",{data:n,loading:"获取日志,请稍候...",customType:"model",check:"ignore"}),getDockerAppList=n=>useAxios.post("/mod/docker/com/get_apps",{data:n,customType:"model",check:"msg"}),getDockerType=()=>useAxios.post("/mod/docker/com/get_tags",{customType:"model",check:"object"}),getBackupList$1=n=>useAxios.post("/mod/docker/com/get_backup_list",{data:n,customType:"model",check:"msg"}),backupDockerApp=n=>useAxios.post("/mod/docker/com/backup_app",{data:n,customType:"model",check:"msg"}),deleteBackup=n=>useAxios.post("/mod/docker/com/delete_backup",{data:n,customType:"model",check:"msg"}),restoreBackup$1=n=>useAxios.post("/mod/docker/com/restore_backup",{data:n,customType:"model",check:"msg"}),getInstalledApps=n=>useAxios.post("/mod/docker/com/get_installed_apps",{data:n,customType:"model",check:"object"}),getAppRunLog=n=>useAxios.post("/mod/docker/com/get_app_log",{data:n,customType:"model",check:"msg"}),getAppInstallLog=n=>useAxios.post("/mod/docker/com/get_app_installed_log",{data:n,customType:"model",check:"msg"}),installApp=n=>useAxios.post("/mod/docker/com/create_app",{data:n,customType:"model",check:"msg"}),getDependenceApps=n=>useAxios.post("/mod/docker/com/get_dependence_apps",{data:n,customType:"model",check:"msg"}),setAppStatus=n=>useAxios.post("/mod/docker/com/set_app_status",{data:n,customType:"model",check:"msg"}),removeApp=n=>useAxios.post("/mod/docker/com/remove_app",{data:n,customType:"model",check:"msg"}),updateApp=n=>useAxios.post("/mod/docker/com/update_app",{data:n,customType:"model",check:"msg"}),getUpdateVersions=n=>useAxios.post("/mod/docker/com/update_versions",{data:n,customType:"model",check:"object"}),setComposeRemark=n=>useAxios.post("/mod/docker/com/edit_remark",{data:n,customType:"model",check:"msg"}),getSiteList=n=>useAxios.post("/mod/docker/com/get_site_list",{data:n,customType:"model",check:"msg"}),setSiteStatus=n=>useAxios.post("/mod/docker/com/set_site_status",{data:n,customType:"model",check:"msg"}),setSiteRemark=n=>useAxios.post("/mod/docker/com/set_remak",{data:n,customType:"model",check:"msg"}),delDockerSite=n=>useAxios.post("/mod/docker/com/delete_site",{data:n,customType:"model",check:"msg"}),delBatchDockerSite=n=>useAxios.post("/mod/docker/com/batch_delete_site",{data:n,customType:"model",check:"msg"}),createDockerSite=n=>useAxios.post("/mod/docker/com/create_site",{data:n,customType:"model",check:"msg"}),getDockerSiteEnvList=n=>useAxios.post("/mod/docker/com/get_runtime_list",{data:n,customType:"model",check:"msg"}),getDockerSiteConAndAppList=n=>useAxios.post("/mod/docker/com/get_some_info",{data:n,customType:"model",check:"msg"}),setDockerSiteEdate=n=>useAxios.post("/mod/docker/com/set_site_edate",{data:n,customType:"model",check:"msg"}),delEnv=n=>useAxios.post("/mod/docker/com/delete_runtime",{data:n,customType:"model",check:"msg"}),delBatchEnv=n=>useAxios.post("/mod/docker/com/batch_delete_runtime",{data:n,customType:"model",check:"msg"}),cleanBuildCache=()=>useAxios.post("/mod/docker/com/build_prune",{customType:"model",check:"msg"}),refreshEnvTemplate=()=>useAxios.post("/mod/docker/com/check_templates",{data:{force_update:1},customType:"model",check:"msg"}),getEnvLog=n=>useAxios.post("/mod/docker/com/get_runtime_logs",{data:n,customType:"model",check:"msg"}),getEnvVersion=n=>useAxios.post("/mod/docker/com/get_runtime_versions",{data:n,customType:"model",check:"msg"}),getEnvExtend=n=>useAxios.post("/mod/docker/com/get_all_exts",{data:n,customType:"model",check:"msg"}),getEnvExtendTemplate=n=>useAxios.post("/mod/docker/com/get_php_ext_list",{data:n,customType:"model",check:"msg"}),createEnv=n=>useAxios.post("/mod/docker/com/".concat(n.id?"modify_runtime":"create_runtime"),{data:n,customType:"model",check:"msg"}),setEnvStatus=n=>useAxios.post("/mod/docker/com/set_runtime_status",{data:n,customType:"model",check:"msg"}),setPhpTemplate=n=>useAxios.post("/mod/docker/com/".concat(n.id?"modify_php_ext_template":"create_php_ext_template"),{data:n,customType:"model",check:"msg"}),delPhpTemplate=n=>useAxios.post("/mod/docker/com/delete_php_ext_template",{data:n,customType:"model",check:"msg"}),delBatchPhpTemplate=n=>useAxios.post("/mod/docker/com/batch_delete_php_ext_template",{data:n,customType:"model",check:"msg"}),getDefaultViewConfig=n=>useAxios.post("/mod/docker/com/get_default_body",{data:n,customType:"model",check:"object"}),setDefaultViewConfig=n=>useAxios.post("/mod/docker/com/set_default_body",{data:n,customType:"model",check:"msg"}),set404ViewStatus=n=>useAxios.post("/mod/docker/com/set_auto_create_404",{data:n,customType:"model",check:"msg"}),getDefaultSite=()=>useAxios.post("/mod/docker/com/get_default_site",{customType:"model",check:"object"}),setDefaultSite=n=>useAxios.post("/mod/docker/com/set_default_site",{data:n,customType:"model",check:"msg"}),getHttpsInfo=()=>useAxios.post("site/get_https_settings",{check:"object"}),setGlobalHttp2https=n=>useAxios.post("site/set_global_http2https",{data:n,check:"msg"}),setHttpsMode=()=>useAxios.post("site/set_https_mode",{check:"msg"}),getCateList=()=>useAxios.post("/mod/docker/com/get_site_types",{customType:"model",check:"msg"}),setCate=n=>useAxios.post("/mod/docker/com/".concat(n.id?"edit_site_type":"add_site_type"),{data:n,customType:"model",check:"msg"}),delCate=n=>useAxios.post("/mod/docker/com/del_site_type",{data:n,customType:"model",check:"msg"}),setDockerSiteCate=n=>useAxios.post("/mod/docker/com/set_site_type",{data:n,customType:"model",check:"msg"}),getDockerSiteDomains=n=>useAxios.post("/mod/docker/com/get_domain_list",{data:n,customType:"model",check:"msg"}),addDockerSiteDomain=n=>useAxios.post("/mod/docker/com/add_domain",{data:n,customType:"model",check:"msg"}),delDockerSiteDomain=n=>useAxios.post("/mod/docker/com/".concat(n.del_domain_list?"batch_del_domain":"del_domain"),{data:n,customType:"model",check:"msg"}),setDockerSiteHttpsPort=n=>useAxios.post("/mod/docker/com/set_https_port",{data:n,customType:"model",check:"msg"}),addProxyUrlData=n=>useAxios.post("/mod/docker/com/add_proxy",{data:n,check:"msg",customType:"model"}),addProxyUrlReplace=n=>useAxios.post("/mod/docker/com/add_sub_filter",{data:n,check:"msg",customType:"model"}),delProxyUrlData=n=>useAxios.post("/mod/docker/com/del_url_proxy",{data:n,check:"msg",customType:"model"}),delProxyUrlReplace=n=>useAxios.post("/mod/docker/com/del_sub_filter",{data:n,check:"msg",customType:"model"}),editProxyUrlDataRemark=n=>useAxios.post("/mod/docker/com/set_url_remark",{data:n,check:"msg",customType:"model"}),editProxyUrlInfo=n=>useAxios.post("/mod/docker/com/set_url_proxy",{data:n,check:"msg",customType:"model"}),getProxyUrlData=n=>useAxios.post("/mod/docker/com/get_proxy_list",{data:n,check:"object",customType:"model"}),proxyUrlAddLimit=n=>useAxios.post("/mod/docker/com/add_url_ip_limit",{data:n,check:"msg",customType:"model"}),proxyUrlBatchDelLimit=n=>useAxios.post("/mod/docker/com/batch_del_url_ip_limit",{data:n,check:"msg",customType:"model"}),proxyUrlCache=n=>useAxios.post("/mod/docker/com/set_url_cache",{data:n,check:"msg",customType:"model"}),proxyUrlCompress=n=>useAxios.post("/mod/docker/com/set_url_gzip",{data:n,check:"msg",customType:"model"}),proxyUrlDelLimit=n=>useAxios.post("/mod/docker/com/del_url_ip_limit",{data:n,check:"msg",customType:"model"}),setProxyUrlCustom=n=>useAxios.post("/mod/docker/com/set_url_custom_conf",{data:n,check:"msg",customType:"model"}),clearProxyCache=n=>useAxios.post("/mod/docker/com/clear_cache",{data:n,check:"msg",customType:"model"}),proxyGetGlobal=n=>useAxios.post("/mod/docker/com/get_global_conf",{data:n,check:"msg",customType:"model"}),proxyGlobalAddBasic=n=>useAxios.post("/mod/docker/com/add_dir_auth",{data:n,check:"msg",customType:"model"}),proxyGlobalAddLimit=n=>useAxios.post("/mod/docker/com/add_ip_limit",{data:n,check:"msg",customType:"model"}),proxyGlobalBatchDelLimit=n=>useAxios.post("/mod/docker/com/batch_del_ip_limit",{data:n,check:"msg",customType:"model"}),proxyGlobalCache=n=>useAxios.post("/mod/docker/com/set_global_cache",{data:n,check:"msg",customType:"model"}),proxyGlobalCompress=n=>useAxios.post("/mod/docker/com/set_global_gzip",{data:n,check:"msg",customType:"model"}),proxyGlobalDelBasic=n=>useAxios.post("/mod/docker/com/del_dir_auth",{data:n,check:"msg",customType:"model"}),proxyGlobalDelLimit=n=>useAxios.post("/mod/docker/com/del_ip_limit",{data:n,check:"msg",customType:"model"}),proxyGlobalEditBasic=n=>useAxios.post("/mod/docker/com/set_dir_auth",{data:n,check:"msg",customType:"model"}),proxyGlobalSetLogs=n=>useAxios.post("/mod/docker/com/set_global_log",{data:n,check:"msg",customType:"model"}),proxyGlobalSetWebsocket=n=>useAxios.post("/mod/docker/com/set_global_websocket",{data:n,check:"msg",customType:"model"}),getProxyConfigFile=n=>useAxios.post("/mod/docker/com/get_nginx_config",{data:n,check:"object",customType:"model"}),saveProxyConfigFile=n=>useAxios.post("/mod/docker/com/save_block_config",{data:n,check:"msg",customType:"model"}),createRedirect=n=>useAxios.post("/mod/docker/com/CreateRedirect",{data:n,check:"msg",customType:"model"}),modifyRedirect=n=>useAxios.post("/mod/docker/com/ModifyRedirect",{data:n,check:"msg",customType:"model"}),removeRedirect=n=>useAxios.post("/mod/docker/com/DeleteRedirect",{data:n,check:"msg",customType:"model"}),getRedirectFile=n=>useAxios.post("/mod/docker/com/GetRedirectFile",{data:n,check:"object",customType:"model"}),getSecurity=n=>useAxios.post("/mod/docker/com/GetSecurity",{data:n,customType:"model",check:"object"}),setSecurity=n=>useAxios.post("/mod/docker/com/SetSecurity",{data:n,customType:"model",check:"msg"}),getSiteLog=n=>useAxios.post("/mod/docker/com/GetSiteLogs",{data:n,customType:"model",check:"msg"}),delRewriteTel=n=>useAxios.post("site/DelRewriteTel",{data:n,check:"msg"}),getRewriteLists=n=>useAxios.post("site/GetRewriteList",{data:n,check:"object"}),getRewrite=n=>useAxios.post("/mod/docker/com/get_site_rewrite",{data:n,customType:"model",check:"msg"}),setRewriteTel=n=>useAxios.post("site/SetRewriteTel",{data:n,check:"msg"}),setRewrite=n=>useAxios.post("/mod/docker/com/set_site_rewrite",{data:n,customType:"model",check:"msg"}),get404Content=n=>useAxios.post("/mod/docker/com/get_404_body",{data:n,customType:"model"}),set404Status=n=>useAxios.post("/mod/docker/com/set_404_status",{data:n,customType:"model",check:"msg"}),set404Content=n=>useAxios.post("/mod/docker/com/set_404_body",{data:n,customType:"model",check:"msg"}),seIpv6Status=n=>useAxios.post("/mod/docker/com/set_site_ipv6",{data:n,customType:"model",check:"msg"}),getDockerSiteDir=n=>useAxios.post("/mod/docker/com/get_site_path",{data:n,customType:"model",check:"msg"}),setDockerSiteDir=n=>useAxios.post("/mod/docker/com/set_site_path",{data:n,customType:"model",check:"msg"}),setDockerSiteRunDir=n=>useAxios.post("/mod/docker/com/set_site_run_path",{data:n,customType:"model",check:"msg"}),getDockerSiteDirUserINI=n=>useAxios.post("/mod/docker/com/GetDirUserINI",{data:n,customType:"model",check:"msg"}),setDockerSiteini=n=>useAxios.post("/mod/docker/com/SetDirUserINI",{data:n,customType:"model",check:"msg"}),getDockerSitePhp=n=>useAxios.post("/mod/docker/com/get_php_project_info",{data:n,customType:"model",check:"msg"}),setDockerSitePhp=n=>useAxios.post("/mod/docker/com/switch_php_version",{data:n,customType:"model",check:"msg"}),setDockerSiteBuffer=n=>useAxios.post("/mod/docker/com/set_proxy_buffering",{data:n,customType:"model",check:"msg"}),updateDockerMysqlPassword=n=>useAxios.post("/mod/docker/com/update_mysql_pwd",{data:n,customType:"model",check:"msg"}),getOllamaModelList=n=>useAxios.post("/mod/docker/com/get_models_list",{data:n,customType:"model",check:"msg"}),getOllamaModelDetail=n=>useAxios.post("/mod/docker/com/show_model_info",{data:n,customType:"model",check:"msg"}),downloadOllamaModel=n=>useAxios.post("/mod/docker/com/down_models",{data:n,customType:"model",check:"msg"}),delOllamaModel=n=>useAxios.post("/mod/docker/com/del_models",{data:n,customType:"model",check:"msg"}),getAllGpuDeviceInformation=()=>useAxios.post("/mod/docker/gpu/get_all_device_info",{customType:"model",check:"msg"}),getGpuInfoByIndex=n=>useAxios.post("/mod/docker/gpu/get_info_by_index",{data:n,customType:"model",check:"msg"}),getDatabaseTerminalCmd=n=>useAxios.post("/mod/docker/com/client_db_shell",{data:n,customType:"model",check:"msg"}),setDockerGlobal=n=>useAxios.post("/btdocker/setup/set_docker_global",{data:n,customType:"model",check:"msg"}),updateDockerComposeVersion=()=>useAxios.post("/btdocker/setup/update_compose",{customType:"model",check:"msg"}),getDockerApphubConfig=()=>useAxios.post("/mod/docker/com/get_apphub_config",{customType:"model",check:"msg"}),setDockerApphubGit=n=>useAxios.post("/mod/docker/com/set_apphub_git",{data:n,customType:"model",check:"msg"}),importGitApphub=()=>useAxios.post("/mod/docker/com/import_git_apphub",{customType:"model",check:"msg"}),importZipApphub=n=>useAxios.post("/mod/docker/com/import_zip_apphub",{data:n,customType:"model",check:"msg"}),installApphub=()=>useAxios.post("/mod/docker/com/install_apphub",{customType:"model",check:"msg"}),setDockerProjectPath=n=>useAxios.post("/btdocker/setup/set_dk_project_path",{data:n,customType:"model",check:"msg"}),parserZipApphub=n=>useAxios.post("/mod/docker/com/parser_zip_apphub",{data:n,customType:"model",check:"msg"}),getAppComposeFile=n=>useAxios.post("/mod/docker/com/get_app_compose",{data:n,customType:"model",check:"object"}),clearApp=()=>useAxios.post("/mod/docker/com/clean_apphub",{customType:"model",check:"msg"}),getComposeBackupList=n=>useAxios.post("/mod/docker/com/compose_backup_list",{data:n,customType:"model",check:"object"}),importBackup=n=>useAxios.post("/mod/docker/com/import_backup",{data:n,customType:"model",check:"msg"}),deleteComposeBackup=n=>useAxios.post("/mod/docker/com/compose_backup_delete",{data:n,customType:"model",check:"msg"}),getComposeRestoreConfig=n=>useAxios.post("/mod/docker/com/compose_restore_config",{data:n,customType:"model",check:"object"}),createComposeBackup=n=>useAxios.post("/mod/docker/com/compose_backup",{data:n,customType:"model",check:"msg"}),createComposeRestore=n=>useAxios.post("/mod/docker/com/compose_restore",{data:n,customType:"model",check:"msg"}),checkComposeUrl=n=>useAxios.post("/btdocker/setup/detector_mirrors",{data:n,customType:"model",check:"object"}),useDockerStore=defineStore("DOCKER-STORE",{state:()=>({currentConDetail:{},maxCPU:0,maxMem:0,maxGpus:0,loading:!1,refreshWs:!1,customLimit:{container:!1,images:!1,network:!1,storage:!1,warehouse:!1},deployMenuData:{app_type:"all",maximum_cpu:"--",maximum_memory:"--"},orchestrationData:{refreshList:!1,refreshItem:!1,loading:!1,noRefresh:!1,isEdit:!1,currentCompose:{name:"",path:""}},cpuAndMemData:{},isRefreshTableList:!1,isRefreshAppList:!1,isRefreshInstallList:!1,isRefreshSiteList:!1,isRefreshTemplateList:!1,isRefreshNetworkList:!1,isRefreshStorageList:!1,isRefreshWarehouseList:!1,settingData:{dk_project_path:"",allow_update_install_path:!1,service_status:!1,docker_installed:!1,docker_compose_installed:!1,docker_compose_path:"/usr/bin/docker-compose",monitor_status:!1,monitor_save_date:0,url:"11",options:[],daemon_path:"/etc/docker/daemon.json",installing:0,ipv6:!1,ipv6Address:"",bad_registry:!1,bad_registry_path:"",warehouse:"",log_cutting:{status:!1,file:0,size:0},iptables:!1,live_restore:!1,driver:"",docker_compose_version:"",socket:"",proxy:{status:!1,http_proxy:"",https_proxy:"",no_proxy:""}}}),actions:{refreshActiveTable(){this.isRefreshTableList=!0},refreshSiteTable(){this.isRefreshSiteList=!0},resetRefresh(){this.isRefreshTableList=!1},chunkArray(n){const r=[];for(let a=0;a<n.list.length;a+=n.limit)r.push(n.list.slice(a,a+n.limit));return r},async getCurrentCon(n){await useDataHandle({request:getDockerDetail({data:JSON.stringify({id:n})}),success:r=>{r.status&&(this.currentConDetail=r.data)}})},async getSet(n){try{this.loading=!0,n!==!1&&await useDataHandle({request:getSetting(),data:{dk_project_path:[String,r=>this.settingData.dk_project_path=r],allow_update_install_path:[Boolean,r=>this.settingData.allow_update_install_path=r],service_status:[Boolean,r=>this.settingData.service_status=r],docker_installed:[Boolean,r=>this.settingData.docker_installed=r],docker_compose_path:[String,r=>this.settingData.docker_compose_path=r],docker_compose_installed:[Boolean,r=>this.settingData.docker_compose_installed=r],monitor_status:[Boolean,r=>this.settingData.monitor_status=r],monitor_save_date:[Number,r=>this.settingData.monitor_save_date=r],daemon_path:[String,r=>this.settingData.daemon_path=r],installing:[Number,r=>this.settingData.installing=r],ipv6_status:[Boolean,r=>this.settingData.ipv6=r],ipv6_addr:[String,r=>this.settingData.ipv6Address=r],bad_registry:[Boolean,r=>this.settingData.bad_registry=r],bad_registry_path:[String,r=>this.settingData.bad_registry_path=r],warehouse:[Array,r=>this.settingData.warehouse=r.join(",")],log_cutting:[Object,r=>this.settingData.log_cutting=isEmpty(r)?{status:!1,file:0,size:0}:{size:r["max-size"].replace("m",""),file:r["max-file"],status:!0}],iptables:[Boolean,r=>this.settingData.iptables=r],live_restore:[Boolean,r=>this.settingData.live_restore=r],driver:[String,r=>this.settingData.driver=r.split("=")[1]],docker_compose_version:[String,r=>this.settingData.docker_compose_version=r],socket:[String,r=>this.settingData.socket=r],proxy:[Object,r=>this.settingData.proxy=isEmpty(r)?{http_proxy:"",https_proxy:"",no_proxy:"",status:!1}:{...r,status:!0}]}}),await useDataHandle({request:getURL(),success:r=>{const a=r.data;a.registry_mirrors.length===0?this.settingData.url="未设置加速URL":this.settingData.url=a.registry_mirrors[0].url;const o=[];Object.entries(a.com_reg_mirrors).forEach(s=>{o.push({label:"".concat(s[0],"(").concat(s[1],")"),value:s[0]})}),this.settingData.options=o}}),this.loading=!1}catch(r){this.loading=!1}},async getUrlList(n){try{const{data:r}=await useDataHandle({request:getURL(n&&n.force?n:!1),success:a=>{const o=a.data;o.registry_mirrors.length===0?this.settingData.url="未设置加速URL":this.settingData.url=o.registry_mirrors[0].url;const s=[];Object.entries(o.com_reg_mirrors).forEach(l=>{s.push({label:"".concat(l[0],"(").concat(l[1],")"),value:l[0]})}),this.settingData.options=s}});return r}catch(r){}},async getDockerState(){try{const n=await useDataHandle({request:getSetting(),data:{dk_project_path:[String,r=>this.settingData.dk_project_path=r],allow_update_install_path:[Boolean,r=>this.settingData.allow_update_install_path=r],service_status:[Boolean,r=>this.settingData.service_status=r],docker_installed:[Boolean,r=>this.settingData.docker_installed=r],docker_compose_path:[String,r=>this.settingData.docker_compose_path=r],docker_compose_installed:[Boolean,r=>this.settingData.docker_compose_installed=r],monitor_status:[Boolean,r=>this.settingData.monitor_status=r],monitor_save_date:[Number,r=>this.settingData.monitor_save_date=r],daemon_path:[String,r=>this.settingData.daemon_path=r],installing:[Number,r=>this.settingData.installing=r],ipv6_status:[Boolean,r=>this.settingData.ipv6=r],ipv6_addr:[String,r=>this.settingData.ipv6Address=r],bad_registry:[Boolean,r=>this.settingData.bad_registry=r],bad_registry_path:[String,r=>this.settingData.bad_registry_path=r],warehouse:[Array,r=>this.settingData.warehouse=r.join("\n")],log_cutting:[Object,r=>this.settingData.log_cutting=isEmpty(r)?{status:!1,file:0,size:0}:{size:r["max-size"].replace("m",""),file:r["max-file"],status:!0}],iptables:[Boolean,r=>this.settingData.iptables=r],live_restore:[Boolean,r=>this.settingData.live_restore=r],driver:[String,r=>this.settingData.driver=r.split("=")[1]],docker_compose_version:[String,r=>this.settingData.docker_compose_version=r],socket:[String,r=>this.settingData.socket=r],proxy:[Object,r=>this.settingData.proxy=isEmpty(r)?{http_proxy:"",https_proxy:"",no_proxy:"",status:!1}:{...r,status:!0}]}})}catch(n){}}},persist:{storage:sessionStorage,paths:["settingData.service_status","settingData.docker_installed","settingData.docker_compose_installed"]}}),getDockerStore=()=>{const n=useDockerStore();return{refs:storeToRefs(n),...n}},beforeEnter$3=async(n,r,a)=>{try{const{refs:{settingData:o},getDockerState:s}=getDockerStore();if(await s(),!n.path.includes("/docker"))return a("/docker/install");const l=o.value.docker_installed&&o.value.docker_compose_installed,u=!!o.value.installing,c=o.value.service_status;if((!l||u)&&!n.path.includes("/docker/install"))return a("/docker/install");if(!c&&l&&!u&&n.path!=="/docker/setting")return Message$2.warn("当前服务未运行,请先启动服务"),a("/docker/setting");if(n.path.includes("/docker/install"))return l&&!u?a("/docker/appstore"):a();a()}catch(o){}a()},dockerRoutes={name:"docker",path:"/docker",meta:{sort:5,title:"Docker",icon:"docker"},component:()=>__vitePreload(()=>import("./index31.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"appstore",name:"docker-appstore",meta:{title:"应用商店"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index32.js?v=1777008528").then(n=>n.w),__vite__mapDeps([]),import.meta.url)},{path:"conmanger",name:"docker-conmanger",meta:{title:"总览"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index33.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"dockersite",name:"docker-site",meta:{title:"网站"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index34.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"containers",name:"docker-containers",meta:{title:"容器"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index35.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"cloudimages",name:"docker-cloudimages",meta:{title:"线上镜像"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index36.js?v=1777008528").then(n=>n.a),__vite__mapDeps([]),import.meta.url)},{path:"images",name:"docker-images",meta:{title:"本地镜像"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index37.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"orchestration",name:"docker-orchestration",meta:{title:"容器编排"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index38.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"network",name:"docker-network",meta:{title:"网络"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index39.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"storage",name:"docker-storage",meta:{title:"存储卷"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index40.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"warehouse",name:"docker-warehouse",meta:{title:"仓库"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index41.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"setting",name:"docker-setting",meta:{title:"设置"},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index42.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"install",name:"docker-install",meta:{title:"Docker安装",ignore:!0},beforeEnter:beforeEnter$3,component:()=>__vitePreload(()=>import("./index43.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},domainRoutes={name:"domain",path:"/domain",meta:{sort:15,title:"域名",icon:"domain"},component:()=>__vitePreload(()=>import("./index44.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"register",name:"register",meta:{title:"域名注册"},component:()=>__vitePreload(()=>import("./index45.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"hosting",name:"hosting",meta:{title:"域名托管"},component:()=>__vitePreload(()=>import("./index46.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},fileRoutes={name:"files",path:"/files",meta:{sort:9,title:"文件",icon:"files"},component:()=>__vitePreload(()=>import("./index47.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},firewallRoutes={name:"firewall",path:"/firewall",meta:{sort:7,title:"安全",icon:"firewall"},component:()=>__vitePreload(()=>import("./index48.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"system",name:"system",meta:{title:"系统防火墙"},component:()=>__vitePreload(()=>import("./index49.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"ssh-manger",name:"ssh-manger",meta:{title:"SSH管理"},component:()=>__vitePreload(()=>import("./index50.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"server-safe",name:"server-safe",meta:{title:"服务器安全"},component:()=>__vitePreload(()=>import("./index51.js?v=1777008528").then(n=>n.D),__vite__mapDeps([]),import.meta.url)},{path:"site-safe",name:"site-safe",meta:{title:"网站安全"},component:()=>__vitePreload(()=>import("./index52.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"safe-detect",name:"safe-detect",ishide:"firewallSafeDetect",meta:{title:"安全检测"},component:()=>__vitePreload(()=>import("./index53.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"keyword",name:"keyword",ishide:"firewallKeyword",meta:{title:"违规词检测"},component:()=>__vitePreload(()=>import("./index54.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"php-safe",name:"php-safe",ishide:"firewallPhp",meta:{title:"PHP网站安全"},component:()=>__vitePreload(()=>import("./index55.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"intrusion",name:"intrusion",ishide:"firewallIntrusion",meta:{title:"入侵防御"},component:()=>__vitePreload(()=>import("./index56.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"fixed",name:"fixed",ishide:"firewallFixed",meta:{title:"系统加固"},component:()=>__vitePreload(()=>import("./index57.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"network-scan",name:"network-scan",ishide:"firewallScan",meta:{title:"扫描感知"},component:()=>__vitePreload(()=>import("./index58.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},ftpRoutes={name:"ftp",path:"/ftp",meta:{sort:3,title:"FTP管理",icon:"ftp"},component:()=>__vitePreload(()=>import("./index59.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},homeRoutes={name:"home",path:"/home",meta:{sort:1,title:"首页",icon:"home"},component:()=>__vitePreload(()=>import("./index60.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},logsRoutes={name:"logs",path:"/logs",meta:{sort:10,title:"日志",icon:"logs"},component:()=>__vitePreload(()=>import("./index61.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"panel-log",name:"panel-log",meta:{title:"面板日志"},component:()=>__vitePreload(()=>import("./index62.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"web",name:"web",meta:{title:"网站日志"},component:()=>__vitePreload(()=>import("./index63.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"ssh",name:"ssh",ishide:"logSsh",meta:{title:"SSH登录日志"},component:()=>__vitePreload(()=>import("./index64.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"software",name:"software",meta:{title:"软件日志"},component:()=>__vitePreload(()=>import("./index65.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},getDomains=n=>useAxios.post("/mail/main/get_domains",{data:n,customType:"model"}),flushDomainRecord=n=>useAxios.post("/mail/main/flush_domain_record",{data:n,customType:"model"}),setDomainCatchall=n=>useAxios.post("/mail/main/enable_catchall",{data:n,customType:"model",loading:"正在设置 catchall,请稍候..."}),setDomainCert=n=>useAxios.post("/mail/main/set_mail_certificate_multiple",{data:{...n,act:"add"},customType:"model",loading:"正在设置证书状态,请稍候..."}),delDomainCert=n=>useAxios.post("/mail/main/set_mail_certificate_multiple",{data:{...n,act:"delete"},customType:"model",loading:"正在设置证书状态,请稍候..."}),addDomain=n=>useAxios.post("/mail/main/add_domain_new",{data:n,customType:"model",loading:"正在添加域名,请稍候..."}),editDomain=n=>useAxios.post("/mail/main/update_domain",{data:n,customType:"model",loading:"正在编辑域名,请稍候..."}),delDomain=n=>useAxios.post("/mail/main/delete_domain",{data:n,loading:"正在删除域名,请稍候...",customType:"model",check:"msg"}),delMxTxtCache=n=>useAxios.post("/mail/main/delete_mx_txt_cache",{data:n,loading:"正在清除 MX 记录和 TXT 记录缓存,请稍候...",customType:"model",check:"msg"}),getDomainName=()=>useAxios.post("/mail/main/get_domain_name",{customType:"model",check:"object"}),getMailboxList=n=>useAxios.post("/mail/main/get_mailboxs",{data:n,customType:"model",check:"array"}),addMailbox=n=>useAxios.post("/mail/main/add_mailbox",{data:n,loading:"正在添加邮箱,请稍候...",customType:"model"}),editMailbox=n=>useAxios.post("/mail/main/update_mailbox",{data:n,loading:"正在编辑邮箱,请稍候...",customType:"model",check:"msg"}),delMailbox=n=>useAxios.post("/mail/main/delete_mailbox",{data:n,loading:"正在删除邮箱,请稍候...",customType:"model"}),getBccList=()=>useAxios.post("/mail/main/get_bcc",{customType:"model",check:"object"}),addMailBcc=n=>useAxios.post("/mail/main/set_mail_bcc",{data:n,loading:"正在添加密送服务,请稍候...",customType:"model"}),editMailBcc=n=>useAxios.post("/mail/main/update_bcc",{data:n,loading:"正在编辑密送服务,请稍候...",customType:"model"}),delMailBcc=n=>useAxios.post("/mail/main/del_bcc",{data:n,loading:"正在删除密送设置,请稍候...",customType:"model",check:"msg"}),getUserList=()=>useAxios.post("/mail/main/get_all_user",{customType:"model",check:"array"}),getInboxMails=n=>useAxios.post("/mail/main/get_mails",{data:n,customType:"model",check:"msg"}),moveSpamMail=n=>useAxios.post("/mail/main/move_to_junk",{data:n,loading:"正在标记为垃圾邮件,请稍候...",customType:"model",check:"msg"}),deleteMail=n=>useAxios.post("/mail/main/delete_mail",{data:n,loading:"正在删除邮件,请稍候...",customType:"model"}),getSpamMails=n=>useAxios.post("/mail/main/get_junk_mails",{data:n,customType:"model",check:"msg"}),restoreSpam=n=>useAxios.post("/mail/main/move_out_junk",{data:n,loading:"正在恢复垃圾邮件,请稍候...",customType:"model"}),getOutboxMails=n=>useAxios.post("/mail/main/get_sent_mails",{data:n,customType:"model",check:"msg"}),sendMailContent=n=>useAxios.post("/mail/main/send_mail",{data:n,loading:"正在发送邮件,请稍候...",customType:"model"}),getTaskList=n=>useAxios.post("/mail/main/get_task_list",{data:n,customType:"model",check:"msg"}),getTaskError=n=>useAxios.post("/mail/main/get_log_rank",{data:n,customType:"model",check:"msg"}),getTaskErrorDetails=n=>useAxios.post("/mail/main/get_log_list",{data:n,customType:"model"}),deleteTask=n=>useAxios.post("/mail/main/delete_task",{data:n,loading:"正在删除任务,请稍候...",customType:"model",check:"msg"}),addSendTask=n=>useAxios.post("/mail/bulk/add_task",{data:n,loading:"正在添加,请稍候...",customType:"model",check:"msg"}),setPauseTask=n=>useAxios.post("/mail/main/pause_task",{data:n,loading:"正在处理,请稍候...",customType:"model",check:"msg"}),getBackupParams=()=>useAxios.post("/mail/main/get_backup_task_status",{customType:"model",check:"msg"}),closeBackupTask=()=>useAxios.post("/mail/main/close_backup_task",{loading:"正在关闭备份设置,请稍候...",customType:"model",check:"msg"}),getCloudList=()=>useAxios.post("/mail/main/get_cloud_storage_list",{customType:"model",check:"object"}),saveBackupTask=n=>useAxios.post("/mail/main/open_backup_task",{data:n,loading:"正在保存备份设置,请稍候...",customType:"model"}),getBackupPath=()=>useAxios.post("/mail/main/get_backup_path",{customType:"model",check:"object"}),getBackupList=n=>useAxios.post("/mail/main/get_backup_file_list",{data:n,customType:"model",check:"msg"}),restoreBackup=n=>useAxios.post("/mail/main/restore",{data:n,loading:"正在恢复备份邮件,请稍候...",customType:"model",check:"msg"}),getServiceStatus=()=>useAxios.post("/mail/main/get_service_status",{customType:"model",check:"msg"}),setServiceStatus$1=n=>useAxios.post("/mail/main/service_admin",{data:n,loading:"正在设置服务,请稍候...",customType:"model",check:"msg"}),repairService=n=>useAxios.post("/mail/main/repair_service_conf",{data:n,loading:"正在修复服务,请稍候...",customType:"model",check:"msg"}),getServiceConfig=n=>useAxios.post("/mail/main/get_config",{data:n,check:"object",customType:"model"}),saveServiceConfig=n=>useAxios.post("/mail/main/save_config",{data:n,loading:"正在保存服务配置文件,请稍候...",customType:"model"}),getServiceMonitor=()=>useAxios.post("/mail/main/get_service_monitor_status",{customType:"model"}),openServiceMonitor=()=>useAxios.post("/mail/main/open_service_monitor_task",{loading:"正在保存监控任务状态,请稍候...",customType:"model",check:"msg"}),closeServiceMonitor=()=>useAxios.post("/mail/main/close_service_monitor_task",{loading:"正在关闭监控任务状态,请稍候...",customType:"model"}),getSaveDays=()=>useAxios.post("/mail/main/get_save_day",{customType:"model",check:"object"}),setSaveDay=n=>useAxios.post("/mail/main/set_save_day",{data:n,loading:"正在设置邮件保留时间,请稍候...",customType:"model"}),getRoundcubeStatus=()=>useAxios.post("/mail/main/get_roundcube_status",{customType:"model",check:"msg"}),getDomain=()=>useAxios.post("/mail/main/get_domain",{check:"object",customType:"model"}),uninstallRoundcube=n=>useAxios.post("/mail/main/uninstall_roundcube",{data:n,loading:"正在卸载,请稍候...",customType:"model",check:"object"}),installRoundcube=n=>useAxios.post("/mail/main/add_roundcube",{data:n,loading:"正在安装,请稍候...",customType:"model"}),addRoundcubeConfig=n=>useAxios.post("/mail/main/add_roundcube_info",{data:n,loading:"正在安装,请稍候...",customType:"model",check:"msg"}),loginRoundcube=n=>useAxios.post("/mail/main/login_roundcube",{data:n,loading:"正在登录,请稍候...",customType:"model",check:"msg"}),deleteFile=n=>useAxios.post("/files?action=DeleteFile",{data:n,loading:"正在删除文件,请稍候...",customType:"model",check:"msg"}),installService$1=()=>useAxios.post("/mail/manage/install_service",{customType:"model",check:"msg"}),getOverviewInfo=n=>useAxios.post("/mail/main/overview_api?action=overview",{data:n,customType:"model",check:"msg"}),editSendTask=n=>useAxios.post("/mail/bulk/update_task",{data:n,loading:"正在编辑任务,请稍候...",customType:"model",check:"msg"}),sendTestMail=n=>useAxios.post("/mail/main/send_mail_test",{data:n,loading:"正在发送测试邮件,请稍候...",customType:"model",check:"msg"}),getContactsEcharts=n=>useAxios.post("/mail/main/get_contacts_list",{data:n,customType:"model",check:"msg"}),getMailTypeList=n=>useAxios.post("/mail/main/get_mail_type_list",{data:n,customType:"model",check:"object"}),delMassMailList=n=>useAxios.post("/mail/main/del_mail_type_list",{data:n,customType:"model",check:"msg"}),getMassMailList=n=>useAxios.post("/mail/main/get_mail_type_info_list",{data:n,customType:"model",check:"msg"}),addMailType=n=>useAxios.post("/mail/main/add_mail_type",{data:n,customType:"model",check:"msg"}),editMailType=n=>useAxios.post("/mail/main/edit_mail_type",{data:n,customType:"model",check:"msg"}),delAbnormalMailAll=n=>useAxios.post("/mail/main/clear_abnormal_recipient",{data:n,customType:"model",check:"msg"}),delAbnormalMailList=n=>useAxios.post("/mail/main/del_abnormal_recipient",{data:n,customType:"model",check:"msg"}),getMassAbnormal=n=>useAxios.post("/mail/main/get_abnormal_recipient",{data:n,customType:"model",check:"msg"}),getMassAbnormalType=()=>useAxios.post("/mail/main/get_abnormal_status",{customType:"model",check:"msg"}),getUnsubscribeList=n=>useAxios.post("/mail/main/get_unsubscribe_list",{data:n,customType:"model",check:"msg"}),delUnsubscribe=n=>useAxios.post("/mail/main/del_unsubscribe_list",{data:n,customType:"model",check:"msg"}),editSubscribeState=n=>useAxios.post("/mail/main/update_subscription_state",{data:n,customType:"model",check:"msg"}),importContacts=n=>useAxios.post("/mail/bulk/import_contacts",{data:n,customType:"model",check:"msg"}),importContactsEtypes=n=>useAxios.post("/mail/bulk/import_contacts_etypes",{data:n,customType:"model",check:"msg"}),delMailType=n=>useAxios.post("/mail/main/del_mail_type_list",{data:n,customType:"model",check:"msg"}),setContactChange=n=>useAxios.post("/mail/main/edit_type_unsubscribe_list",{data:n,customType:"model",check:"msg"}),setUnsubscribeType=n=>useAxios.post("/mail/main/edit_type_unsubscribe_list",{data:n,customType:"model",check:"msg"}),addMailTemplate=n=>useAxios.post("/mail/bulk/add_email_temp",{data:n,customType:"model",check:"msg"}),delMailTemplate=n=>useAxios.post("/mail/bulk/del_email_temp",{data:n,customType:"model",check:"msg"}),getMailTemplateList=n=>useAxios.post("/mail/bulk/get_email_temp_list",{data:n,customType:"model",check:"object"}),editMailTemplate=(n,r=!0)=>useAxios.post("/mail/bulk/edit_email_temp",{data:n,customType:"model",check:"msg"}),getMailTemplateContent=n=>useAxios.post("/mail/main/get_task_email_content",{data:n,customType:"model",check:"msg"}),getContactNumber=n=>useAxios.post("/mail/main/get_contact_number",{data:n,customType:"model",check:"msg"}),getMailTemplateSelect=()=>useAxios.post("/mail/bulk/get_email_temp",{customType:"model",check:"object"}),delUnsubscribeInfo=(n={})=>useAxios.post("/mail/main/del_unsubscribe_info",{data:n,customType:"model",check:"msg"}),getUnsubscribeInfo=()=>useAxios.post("/mail/main/get_unsubscribe_info",{customType:"model",check:"msg"}),setUnsubscribeInfo=n=>useAxios.post("/mail/main/set_unsubscribe_info",{data:n,customType:"model",check:"msg"}),getTaskUnsubscribe=n=>useAxios.post("/mail/main/get_task_unsubscribe_list",{data:n,customType:"model",check:"object"}),getBlacklistTips=()=>useAxios.post("/mail/main/get_blacklist_tips",{customType:"model",check:"msg"}),setBlacklistTips=n=>useAxios.post("/mail/main/Blacklist_tips",{data:n,customType:"model",check:"msg"}),checkBlacklists=n=>useAxios.post("/mail/bulk/check_blacklists",{data:n,customType:"model",check:"msg"}),getMailScanLog=n=>useAxios.post("/mail/main/read_blacklist_scan_log",{data:n,customType:"model",check:"msg"}),autoCreateDNSRecord=n=>useAxios.post("/mail/main/auto_create_dns_record",{data:n,customType:"model"}),isInstallMail=()=>useAxios.post("/mail/manage/install_status",{customType:"model",check:"msg"}),folderDeployCert=n=>useAxios.post("/mail/main/set_cert_from_local",{data:n,customType:"model",check:"msg"}),getAutoSSLTaskStatus=()=>useAxios.post("/mail/main/get_auto_ssl_task_status",{customType:"model",check:"msg"}),openAutoSSLTask=()=>useAxios.post("/mail/main/open_auto_ssl_task",{customType:"model",check:"msg"}),closeAutoSSLTask=()=>useAxios.post("/mail/main/close_auto_ssl_task",{customType:"model",check:"msg"}),initEnvironment=()=>useAxios.post("/mail/main/setup_mail_sys",{customType:"model",check:"msg"}),getIpList=()=>useAxios.post("/mail/multipleip/get_ip_tags_api",{customType:"model",check:"msg"}),getIpAddressList=n=>useAxios.post("/mail/multipleip/get_net_interface",{customType:"model",check:"msg",data:n}),addIpTagApi=n=>useAxios.post("/mail/multipleip/add_ip_tag_api",{customType:"model",check:"msg",data:n}),delIpTagApi=n=>useAxios.post("/mail/multipleip/del_ip_tag_api",{customType:"model",check:"msg",data:n}),editIpTagApi=n=>useAxios.post("/mail/multipleip/edit_ip_tag_api",{customType:"model",check:"msg",data:n}),setIpRotateApi=n=>useAxios.post("/mail/multipleip/set_ip_rotate",{customType:"model",check:"msg",data:n}),getForwardList=n=>useAxios.post("/mail/foward/get_mail_forward",{customType:"model",check:"msg",data:n}),getMailboxListByName=n=>useAxios.post("/mail/main/get_mailbox",{data:n,customType:"model",check:"msg"}),addForward=n=>useAxios.post("/mail/foward/add_forward",{data:n,customType:"model",check:"msg"}),editForward=n=>useAxios.post("/mail/foward/edit_forward",{data:n,customType:"model",check:"msg"}),deleteForward=n=>useAxios.post("/mail/foward/del_forward",{data:n,customType:"model",check:"msg"}),useMailStore=defineStore("MAIL-STORE",{state:()=>({install:!1,update:!1,checkEnv:!1,version:"",lastVersion:"6.4",pluginInfo:{},router:useRouter(),route:useRoute(),tabActive:useRoute().name}),getters:{},actions:{async getMailInfo(){const{data:n}=await isInstallMail();this.install=n.status},async cutTabsEvent(n){this.tabActive=n,this.router.push({name:n})}}}),getMailStore=()=>{const n=useMailStore();return{refs:storeToRefs(n),...n}},beforeEnter$2=async(n,r,a)=>{try{const{refs:{install:o,tabActive:s},getMailInfo:l}=getMailStore();if(await l(),!o.value&&n.path!=="/mail/setting"){a("/mail/setting"),s.value="mail-setting";return}}catch(o){}a()},mailRoutes={name:"mail",path:"/mail",meta:{sort:14,icon:"mail",title:"邮局管理"},component:()=>__vitePreload(()=>import("./index66.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),redirect:"/mail/market",children:[{path:"market",name:"market",meta:{title:"邮件营销"},beforeEnter:beforeEnter$2,component:()=>__vitePreload(()=>import("./index67.js?v=1777008528").then(n=>n.N),__vite__mapDeps([]),import.meta.url)},{path:"maildomain",name:"maildomain",meta:{title:"域名"},component:()=>__vitePreload(()=>import("./index68.js?v=1777008528").then(n=>n.d),__vite__mapDeps([]),import.meta.url),beforeEnter:beforeEnter$2},{path:"mailbox",name:"mailbox",meta:{title:"邮箱"},beforeEnter:beforeEnter$2,component:()=>__vitePreload(()=>import("./index69.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"email",name:"email",meta:{title:"邮件"},beforeEnter:beforeEnter$2,component:()=>__vitePreload(()=>import("./index70.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"setting",name:"mail-setting",meta:{title:"设置"},beforeEnter:beforeEnter$2,component:()=>__vitePreload(()=>import("./index71.js?v=1777008528").then(n=>n.y),__vite__mapDeps([]),import.meta.url)}]},getNodeUsedStatus=()=>useAxios.post("/mod/node/node/node_used_status",{check:"object",customType:"model"}),setNodeUsedStatus=()=>useAxios.post("/mod/node/node/set_used_status",{check:"object",customType:"model"}),editNode=n=>useAxios.post("/mod/node/node/update_node",{data:n,check:"msg",customType:"model"}),addNode=n=>useAxios.post("mod/node/node/add_node",{data:n,check:"msg",customType:"model"}),nodeList=n=>useAxios.post("mod/node/node/get_node_list",{data:n,check:"object",customType:"model"}),getNodeClassList=()=>useAxios.post("/mod/node/node/get_category_list",{check:"object",customType:"model"}),deleteNode=n=>useAxios.post("mod/node/node/del_node",{data:n,check:"msg",customType:"model"}),addNodeClass=n=>useAxios.post("/mod/node/node/add_category",{check:"object",data:n,customType:"model"}),deleteNodeClass=n=>useAxios.post("/mod/node/node/del_category",{check:"object",data:n,customType:"model"}),setNodeBatchClass=n=>useAxios.post("/mod/node/node/bind_node_to_category",{check:"object",data:n,customType:"model"}),batchDelNode=n=>useAxios.post("/mod/node/node/del_node",{check:"object",data:n,customType:"model"}),getPanelUrl=n=>useAxios.post("/mod/node/node/get_panel_url",{check:"object",data:n,customType:"model"}),nodeSSHDelApi=n=>useAxios.post("/mod/node/node/remove_ssh_conf",{check:"object",data:n,customType:"model"}),nodeSSHSet=n=>useAxios.post("/mod/node/node/set_ssh_conf",{check:"object",data:n,customType:"model"}),nodeSSHPort=n=>useAxios.post("/mod/node/node/get_sshd_port",{check:"object",data:n,customType:"model"}),getClbList=n=>useAxios.post("/mod/node/load/http_load_list",{check:"object",data:n,customType:"model"}),batchDelHttpClb=n=>useAxios.post("/mod/node/load/multi_remove_http_load",{check:"object",data:n,customType:"model"}),batchDelTcpUdpClb=n=>useAxios.post("/mod/node/load/multi_remove_tcp_load",{check:"object",data:n,customType:"model"}),deleteClbHttpApi=n=>useAxios.post("/mod/node/load/remove_http_load",{check:"object",data:n,customType:"model"}),getHttpClbLog=n=>useAxios.post("/mod/node/load/log",{check:"object",data:n,customType:"model"}),exportHttpClbLog=n=>useAxios.post("/mod/node/load/export_log",{check:"object",data:n,customType:"model"}),editHttpSeeting=n=>useAxios.post("/mod/node/load/set_http_load",{check:"object",data:n,customType:"model"}),getClbAllNode=n=>useAxios.post("/mod/node/node/get_all_node",{check:"object",data:{node_type:n!=null&&n.node_type?n.node_type:"api"},customType:"model"}),getNodeSites=n=>useAxios.post("/mod/node/node/get_node_sites",{check:"object",data:n,customType:"model"}),getTcpUdpClbList=n=>useAxios.post("/mod/node/load/tcp_load_list",{check:"object",data:n,customType:"model"}),deleteTcpUdpClb=n=>useAxios.post("/mod/node/load/remove_tcp_load",{check:"object",data:n,customType:"model"}),getTcpUdpClbLog=n=>useAxios.post("/mod/node/load/tcp_log",{check:"object",data:n,customType:"model"}),exportTcpUdpClbLog=n=>useAxios.post("/mod/node/load/export_tcp_log",{check:"object",data:n,customType:"model"}),getPhpSiteList=()=>useAxios.post("/mod/node/node/php_site_list",{check:"object",customType:"model"}),getSlaveList=n=>useAxios.post("/mod/node/mysql_slave/slave_list",{check:"object",data:n,customType:"model"}),getDatabaseList=n=>useAxios.post("/mod/node/mysql_slave/database_list",{check:"object",data:n,customType:"model"}),getSyncStatus=n=>useAxios.post("/mod/node/mysql_slave/get_sync_status",{check:"object",data:n,customType:"model"}),addMysqlSlave=n=>useAxios.post("/mod/node/mysql_slave/add_slave_server",{check:"object",data:n,customType:"model"}),getMysqlSlaveInfo=n=>useAxios.post("/mod/node/mysql_slave/get_slave_info",{check:"object",data:n,customType:"model"}),setMysqlSlave=n=>useAxios.post("/mod/node/mysql_slave/set_slave_status",{check:"msg",data:n,customType:"model"}),deleteMysqlSlave=n=>useAxios.post("/mod/node/mysql_slave/del_slave_server",{check:"msg",data:n,customType:"model"}),getMysqlSlaveHistory=()=>useAxios.post("/mod/node/mysql_slave/get_master_sql_list",{check:"array",customType:"model"}),deleteMysqlSlaveHistory=n=>useAxios.post("/mod/node/mysql_slave/del_master_sql",{check:"msg",data:n,customType:"model"}),syncMysqlSlaveConfig=n=>useAxios.post("/mod/node/mysql_slave/sync_slave_config",{check:"msg",data:n,customType:"model"}),getRedisList=n=>useAxios.post("/mod/node/redis_slave/replication_group_list",{check:"msg",data:n,customType:"model"}),createRedisGroup=n=>useAxios.post("/mod/node/redis_slave/create_replication_group",{check:"object",data:n,customType:"model"}),getAvailableNodes=()=>useAxios.post("/mod/node/redis_slave/get_available_nodes",{check:"msg",customType:"model"}),delectRedisGroup=n=>useAxios.post("/mod/node/redis_slave/delete_replication_group",{check:"msg",data:n,customType:"model"}),getCreationStatus=n=>useAxios.post("/mod/node/redis_slave/get_creation_status",{check:"object",data:n,customType:"model"}),getGroupDetail=n=>useAxios.post("/mod/node/redis_slave/get_group_detail",{check:"object",data:n,customType:"model"}),removeRedisGroupSlave=n=>useAxios.post("/mod/node/redis_slave/remove_slave",{check:"object",data:n,customType:"model"}),addSlaveToRedisGroup=n=>useAxios.post("/mod/node/redis_slave/add_slave_to_group",{check:"object",data:n,customType:"model"}),reconnectRedisSlave=n=>useAxios.post("/mod/node/redis_slave/reconnect_slave",{check:"object",data:n,customType:"model"}),getAlarmList=n=>useAxios.post("/mod/push/task/get_task_list",{check:"object",data:n,customType:"model"}),setNewAlarmTask=n=>useAxios.post("/mod/push/task/set_task_conf",{data:n,check:"msg",customType:"model"}),delTaskStatus=n=>useAxios.post("/mod/push/task/remove_task_conf",{data:n,check:"msg",customType:"model"}),setTaskStatus=n=>useAxios.post("/mod/push/task/change_task_conf",{data:n,check:"msg",customType:"model"}),getNodeFileList=n=>useAxios.post("/mod/node/file_transfer/file_list",{data:n,check:"object",customType:"model",skipPending:!0}),getNodeFileSize=n=>useAxios.post("/mod/node/file_transfer/dir_size",{data:n,check:"msg",customType:"model"}),createFileTransferTask=n=>useAxios.post("/mod/node/file_transfer/create_filetransfer_task",{data:n,check:"object",customType:"model"}),deleteNodeFile=n=>useAxios.post("/mod/node/file_transfer/delete_file",{data:n,check:"msg",customType:"model"}),checkNodeFile=n=>useAxios.post("/mod/node/file_transfer/upload_check",{data:n,check:"object",customType:"model"}),createNodeFile=n=>useAxios.post("/mod/node/file_transfer/create_dir",{data:n,check:"msg",customType:"model"}),restartNode=(n,r)=>useAxios.post("/mod/node/node/".concat(r==="panel"?"restart_bt_panel":"server_reboot"),{data:{node_id:n},check:"msg",customType:"model"}),bindApp=n=>useAxios.post("/mod/node/node/bind_app",{data:n,check:"ignore",customType:"model"}),verifyApp=n=>useAxios.post("/mod/node/node/bind_app_status",{data:n,check:"ignore",customType:"model"}),createScript=n=>useAxios.post("/mod/node/executor/create_script",{data:n,check:"object",customType:"model"}),modifyScript=n=>useAxios.post("/mod/node/executor/modify_script",{data:n,check:"object",customType:"model"}),deleteScript=n=>useAxios.post("/mod/node/executor/delete_script",{data:n,check:"msg",customType:"model"}),getScriptList=n=>useAxios.post("/mod/node/executor/get_script_list",{data:n,check:"object",customType:"model"}),getFlowTaskList=n=>useAxios.post("/mod/node/executor/flow_task_list",{data:n,check:"object",customType:"model"}),getTransferFileTaskInfo=n=>useAxios.post("/mod/node/executor/get_transferfile_task_info",{data:n,check:"object",customType:"model",skipPending:!0}),getCommandTaskInfo=n=>useAxios.post("/mod/node/executor/get_command_task_info",{data:n,check:"object",customType:"model",skipPending:!0}),nodeGetDir=n=>useAxios.post("/mod/node/file_transfer/node_get_dir",{data:n,check:"object",customType:"model"}),stopFlowTask=n=>useAxios.post("/mod/node/executor/stop_flow",{data:n,check:"msg",customType:"model"}),setClbCache=n=>useAxios.post("/mod/node/load/set_http_cache",{data:n,check:"object",customType:"model"}),createFlowTemplate=n=>useAxios.post("/mod/node/executor/create_flow_template",{data:n,check:"object",customType:"model"}),deleteFlowTemplate=n=>useAxios.post("/mod/node/executor/delete_flow_template",{data:n,check:"msg",customType:"model"}),getFlowTemplateList=n=>useAxios.post("/mod/node/executor/get_flow_template_list",{data:n,check:"object",customType:"model"}),retryExecutorTask=n=>useAxios.post("/mod/node/executor/retry_flow_task",{data:n,check:"msg",customType:"model"}),beforeEnter$1=async(n,r,a)=>{try{const{data:o}=await getNodeUsedStatus();o.msg!=="未使用"&&o.status===!1&&Message$2.error(o.msg);const s=n.path.includes("/node/install");if(!o.status&&!s)return a("/node/install");if(s)return o.status?a("/node/node-mgt"):a();a()}catch(o){}a()},nodeRoutes={name:"node",path:"/node",meta:{sort:16,title:"节点管理",icon:"node"},component:()=>__vitePreload(()=>import("./index72.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),redirect:"/node/node-mgt",children:[{path:"node-mgt",name:"node-mgt",meta:{title:"节点"},beforeEnter:beforeEnter$1,component:()=>__vitePreload(()=>import("./index73.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"node-clb",name:"node-clb",meta:{title:"负载均衡"},beforeEnter:beforeEnter$1,component:()=>__vitePreload(()=>import("./index74.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"master",name:"master",meta:{title:"主从复制"},beforeEnter:beforeEnter$1,component:()=>__vitePreload(()=>import("./index75.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"file-transfer",name:"file-transfer",meta:{title:"文件互传"},beforeEnter:beforeEnter$1,component:()=>__vitePreload(()=>import("./index76.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"script-mass",name:"script-mass",meta:{title:"分发管理"},beforeEnter:beforeEnter$1,component:()=>__vitePreload(()=>import("./index77.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"node-alarm",name:"node-alarm",meta:{title:"告警管理"},beforeEnter:beforeEnter$1,component:()=>__vitePreload(()=>import("./index78.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"install",name:"node-install",meta:{title:"安装",ignore:!0},beforeEnter:beforeEnter$1,component:()=>__vitePreload(()=>import("./index79.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},siteRoutes={name:"site",path:"/site",meta:{sort:2,title:"网站",icon:"site"},component:()=>__vitePreload(()=>import("./index80.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"php",name:"php",meta:{title:"PHP项目"},component:()=>__vitePreload(()=>import("./index81.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"java",name:"java",meta:{title:"Java项目"},component:()=>__vitePreload(()=>import("./index82.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"node",name:"nodejs",meta:{title:"Node项目"},component:()=>__vitePreload(()=>import("./index83.js?v=1777008528").then(n=>n.a),__vite__mapDeps([]),import.meta.url)},{path:"go",name:"go",meta:{title:"Go项目"},component:()=>__vitePreload(()=>import("./index84.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"python",name:"python",meta:{title:"Python项目"},component:()=>__vitePreload(()=>import("./index85.js?v=1777008528").then(n=>n.l),__vite__mapDeps([]),import.meta.url)},{path:"net",name:"net",meta:{title:"Net项目",icon:"site"},component:()=>__vitePreload(()=>import("./index86.js?v=1777008528").then(n=>n.e),__vite__mapDeps([]),import.meta.url)},{path:"nginx",name:"proxy",meta:{title:"反向代理"},component:()=>__vitePreload(()=>import("./index87.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"html",name:"html",meta:{title:"HTML项目"},component:()=>__vitePreload(()=>import("./index88.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"other",name:"otherModel",meta:{title:"其他项目"},component:()=>__vitePreload(()=>import("./index89.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)}]},softRoutes$1={name:"soft",path:"/soft",meta:{sort:18,icon:"soft",title:"软件商店"},component:()=>__vitePreload(()=>import("./index90.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"plugin",name:"plugin",meta:{title:"官方应用"},component:()=>__vitePreload(()=>import("./index91.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"other",name:"other",meta:{title:"第三方应用"},component:()=>__vitePreload(()=>import("./index92.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"deployment",name:"deployment",meta:{title:"一键部署"},component:()=>__vitePreload(()=>import("./index93.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},softRoutes={name:"ssl",path:"/ssl",meta:{sort:12,icon:"ssl",title:"SSL"},component:()=>__vitePreload(()=>import("./index94.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"certificate",name:"certificate",meta:{title:"证书管理"},component:()=>__vitePreload(()=>import("./index95.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"auto-deploy",name:"auto-deploy",meta:{title:"自动部署"},component:()=>__vitePreload(()=>import("./index96.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"auth",name:"auth",meta:{title:"部署授权"},component:()=>__vitePreload(()=>import("./index97.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},xtermRoutes={name:"xterm",path:"/xterm",meta:{sort:15,title:"终端",icon:"xterm"},component:()=>__vitePreload(()=>import("./index98.js?v=1777008528").then(n=>n.a),__vite__mapDeps([]),import.meta.url)},getAccountListApi=n=>useAxios.post("/mod/virtual/virtual/get_account_list",{data:n,customType:"model"}),createAccountApi=n=>useAxios.post("/mod/virtual/virtual/create_account",{data:n,customType:"model"}),modifyAccountApi=n=>useAxios.post("/mod/virtual/virtual/modify_account",{data:n,customType:"model"}),removeAccountApi=n=>useAxios.post("/mod/virtual/virtual/remove_account",{data:n,customType:"model"}),getTypeListApi=()=>useAxios.post("/mod/virtual/virtual/get_type_list",{customType:"model"}),createTypeApi=({ps:n})=>useAxios.post("/mod/virtual/virtual/create_type",{data:{name:n},customType:"model"}),modifyTypeApi=({ps:n,id:r})=>useAxios.post("/mod/virtual/virtual/modify_type",{data:{name:n,type_id:r},customType:"model"}),removeTypeApi=({id:n})=>useAxios.post("/mod/virtual/virtual/remove_type",{data:{type_id:n},customType:"model"}),getPackageListApi=n=>useAxios.post("/mod/virtual/virtual/get_package_list",{data:n,customType:"model"}),createPackageApi=n=>useAxios.post("/mod/virtual/virtual/create_package",{data:n,customType:"model"}),modifyPackageApi=n=>useAxios.post("/mod/virtual/virtual/modify_package",{data:n,customType:"model"}),removePackageApi=n=>useAxios.post("/mod/virtual/virtual/remove_package",{data:n,customType:"model"}),getLogsApi=n=>useAxios.post("/mod/virtual/virtual/get_logs",{data:n,customType:"model"}),cleanLogsApi=()=>useAxios.post("/mod/virtual/virtual/clean_logs",{customType:"model"}),getDiskListApi=()=>useAxios.post("/mod/virtual/virtual/get_disk_list",{customType:"model"}),setDefaultDiskApi=n=>useAxios.post("/mod/virtual/virtual/set_default_disk",{data:n,customType:"model"}),enableDiskQuotaApi=n=>useAxios.post("/mod/virtual/virtual/enable_disk_quota",{data:{mountpoint:n},customType:"model"}),getAccountTempLoginTokenApi=n=>useAxios.post("/mod/virtual/virtual/get_account_temp_login_token",{data:n,customType:"model"}),getServiceInfo=()=>useAxios.post("/mod/virtual/virtual/get_service_info",{customType:"model"}),setServiceStatus=(n,r={})=>useAxios.post("/mod/virtual/virtual/".concat(n,"_service"),{data:r,customType:"model"}),installService=(n={})=>useAxios.post("/mod/virtual/virtual/install_service",{data:n,customType:"model"}),getServerSslApi=()=>useAxios.post("/mod/virtual/virtual/get_server_ssl",{customType:"model"}),saveServerSslApi=(n,r)=>useAxios.post("/mod/virtual/virtual/save_server_ssl",{data:{certificate:n,private_key:r},customType:"model"}),getServerAddressApi=()=>useAxios.post("/mod/virtual/virtual/get_server_address",{customType:"model"}),setServerAddressApi=n=>useAxios.post("/mod/virtual/virtual/set_server_address",{data:{address:n},customType:"model"}),getCloudVersionApi=()=>useAxios.post("/mod/virtual/virtual/get_cloud_version",{customType:"model"}),updateServiceApi=()=>useAxios.post("/mod/virtual/virtual/update_service",{customType:"model"}),{request:$request}=useMessage(),SETTINGS_STORE=defineStore("VHOST-SETTINGS-STORE",()=>{const n=ref(0),r=ref(!1),a=ref(0),o=ref(""),s=ref(null),l=computed(()=>c.value?{type:"stop",text:"停止",icon:"start",color:"!text-primary",tips:"运行中"}:{type:"start",text:"启动",icon:"stop",color:"!text-danger",tips:"已停止"}),u=computed(()=>r.value&&n.value===2),c=computed(()=>a.value===1),d=async()=>{const{data:D}=await getPluginInfo({sName:"nginx"});isObject$4(D)&&(r.value=D.setup)},f=async()=>{await d();const{data:D}=await getServiceInfo();return isObject$4(D)&&(n.value=D.install_status,a.value=D.run_status,o.value=D.version),D},p=async()=>{const{payment:D}=useGlobalStore();if(!(D.value.authType==="free"||!u.value))try{const{data:C}=await getCloudVersionApi();isObject$4(C)&&(s.value=C)}catch(C){s.value=null}},v=ref(!1),g=ref({certificate:"",private_key:""}),y=async()=>{const{data:D}=await getServerSslApi();isObject$4(D)&&(v.value=D.certificate!=="",g.value.certificate=D.certificate,g.value.private_key=D.private_key)},_=ref(""),S=ref("https"),b=ref("80"),x=ref(""),A=ref(),w=async()=>{const{data:D}=await getServerAddressApi();isObject$4(D)&&(_.value=D.domain?D.domain:D.ip,S.value=D.protocol,b.value=D.port,x.value=D.domain,A.value=D)};return{install:n,runStatus:a,version:o,cloudVersionInfo:s,isInstall:u,isRunning:c,isServerRunning:l,getInfo:f,getCloudVersionInfo:p,hasCert:v,certInfo:g,getCertInfo:y,getServerIP:w,serverIP:_,serverProtocol:S,serverPort:b,resetServerEvent:async()=>{var C;const D=await setServerAddressApi((C=A.value)==null?void 0:C.ip);await $request(D),await w()}}}),useSettingsStore=()=>{const n=SETTINGS_STORE(),r=storeToRefs(n);return{...n,...r}},beforeEnter=async(n,r,a)=>{try{const{getInfo:o,isInstall:s,isRunning:l}=useSettingsStore();if(await o(),!s.value&&n.path!=="/vhost/settings"){a("/vhost/settings");return}if(!l.value&&s.value&&n.path!=="/vhost/settings"){Message$2.warn("当前服务未运行,请先启动服务"),a("/vhost/settings");return}}catch(o){}a()},vhostRoutes={name:"vhost",path:"/vhost",meta:{sort:13,icon:"vhost",title:"多机管理"},component:()=>__vitePreload(()=>import("./index99.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"account",name:"vhost-account",meta:{title:"用户"},beforeEnter,component:()=>__vitePreload(()=>import("./index100.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"package",name:"vhost-package",meta:{title:"资源"},beforeEnter,component:()=>__vitePreload(()=>import("./index101.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"storage",name:"vhost-storage",meta:{title:"存储"},beforeEnter,component:()=>__vitePreload(()=>import("./index102.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"logs",name:"vhost-logs",meta:{title:"日志"},beforeEnter,component:()=>__vitePreload(()=>import("./index103.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"settings",name:"vhost-settings",meta:{title:"设置"},beforeEnter,component:()=>__vitePreload(()=>import("./index104.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"install",name:"vhost-install",meta:{title:"多用户安装",ignore:!0},beforeEnter,component:()=>__vitePreload(()=>import("./index105.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)}]},wafRoutes={name:"waf",path:"/waf",meta:{sort:8,title:"WAF",icon:"waf"},component:()=>__vitePreload(()=>import("./index106.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},wpRoutes={name:"wp",path:"/wp",meta:{sort:11,title:"WP Tools",icon:"wordpress"},component:()=>__vitePreload(()=>import("./index107.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"local",name:"local",meta:{title:"本地管理"},component:()=>__vitePreload(()=>import("./index108.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)},{path:"remote",name:"remote",meta:{title:"远程管理"},component:()=>__vitePreload(()=>import("./index109.js?v=1777008528").then(n=>n.i),__vite__mapDeps([]),import.meta.url)}]},modules=Object.assign({"../modules/ai.ts":aiRoutes,"../modules/config.ts":configRoutes,"../modules/control.ts":controlRoutes,"../modules/crontab.ts":crontabRoutes,"../modules/database.ts":databaseRoutes,"../modules/docker.ts":dockerRoutes,"../modules/domain.ts":domainRoutes,"../modules/files.ts":fileRoutes,"../modules/firewall.ts":firewallRoutes,"../modules/ftp.ts":ftpRoutes,"../modules/home.ts":homeRoutes,"../modules/logs.ts":logsRoutes,"../modules/mail.ts":mailRoutes,"../modules/node.ts":nodeRoutes,"../modules/site.ts":siteRoutes,"../modules/soft.ts":softRoutes$1,"../modules/ssl.ts":softRoutes,"../modules/term.ts":xtermRoutes,"../modules/vhost.ts":vhostRoutes,"../modules/waf.ts":wafRoutes,"../modules/wp.ts":wpRoutes}),rolesRoutes=[...Object.keys(modules).map(n=>modules[n]).sort((n,r)=>{var s,l,u,c;const a=isNumber$1((s=n.meta)==null?void 0:s.sort)?(l=n.meta)==null?void 0:l.sort:Number.MAX_VALUE,o=isNumber$1((u=r.meta)==null?void 0:u.sort)?(c=r.meta)==null?void 0:c.sort:Number.MAX_VALUE;return a-o}).filter(n=>n)],routes=[...rolesRoutes],cloudVersionChanges=()=>{};function useNProgress(n=null,r){const a=ref(n),o=computed({set:l=>l?nprogress.start():nprogress.done(),get:()=>typeof a.value=="number"&&a.value<1});r&&nprogress.configure(r);const s=nprogress.set;return nprogress.set=l=>(a.value=l,s.call(nprogress,l)),watchEffect(()=>{typeof a.value=="number"&&isClient&&s.call(nprogress,a.value)}),tryOnScopeDispose(nprogress.remove),{isLoading:o,progress:a,start:nprogress.start,done:nprogress.done,remove:()=>{a.value=null,nprogress.remove()}}}let unFnTimes=null;const setRouterActive=n=>{const{routerActive:r}=useGlobalStore();r.value=n},fileCacheRefresh=()=>{unFnTimes&&clearTimeout(unFnTimes),unFnTimes=setTimeout(()=>cloudVersionChanges(),1e3)},useCreateRouterEach=n=>{const{isLoading:r,progress:a}=useNProgress(null,{color:"var(--el-color-primary)",minimum:.1,speed:200,showSpinner:!0,spinnerPosition:"left",easing:"ease",trickleSpeed:400});let o="";r.value=!0,n.beforeEach((s,l,u)=>{r.value=!0,a.value=.2,o=s.path,u()}),n.afterEach((s,l,u)=>{if(isNavigationFailure(u)){if(s.path===l.path)return window.location.reload();window.location.href=o}if(a.value=1,setRouterActive(s.path),fileCacheRefresh(),s.meta.icon!==l.meta.icon){const{getGlobalInfo:d}=useGlobalStore();d()}})},router=createRouter({routes:[{name:"layout",path:"/",redirect:"/home",component:()=>__vitePreload(()=>import("./index110.js?v=1777008528"),__vite__mapDeps([]),import.meta.url),children:[{path:"test",name:"/test",meta:{title:"测试模块"},component:()=>__vitePreload(()=>import("./index111.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{path:"test/automator",name:"/test/automator",meta:{title:"UIAutomator 测试"},component:()=>__vitePreload(()=>import("./UIAutomatorDemo.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{name:"bind-user",path:"/bind",meta:{title:"绑定堡塔账号"},component:()=>__vitePreload(()=>import("./index112.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},{name:"modify-password",path:"/modify_password",meta:{title:"修改密码"},component:()=>__vitePreload(()=>import("./index113.js?v=1777008528"),__vite__mapDeps([]),import.meta.url)},...routes]}],history:createWebHistory(),scrollBehavior:()=>({left:0,top:0})});useCreateRouterEach(router);const originalReplaceState=window.history.replaceState;window.history.replaceState=function(){if(document.visibilityState!=="hidden")return originalReplaceState.apply(this,arguments)};const index$3=Object.freeze(Object.defineProperty({__proto__:null,router},Symbol.toStringTag,{value:"Module"})),uploadProgress=ref(!1),uploadNum=ref(0),buildFormData=(n,r,a=0,o=!1)=>{const s=new FormData,l=getToken();let u=n;if(o){const d=Math.min(a+10485760,n.size);u=n.slice(a,d)}return s.append("blob",u),s.append("f_size",String(n.size)),s.append("f_path",r.path||""),s.append("f_name",r.name||n.name),s.append("f_start",String(a)),s.append("request_time",String(l.request_time)),s.append("request_token",String(l.request_token)),s},unifiedUpload=async(n,r={},a=0)=>{const s=r.useChunked||n.size>10485760,l=s?3:2;let u=0;const c=async()=>{var d,f,p,v,g,y;try{const _=buildFormData(n,r,a,s),S={headers:{"Content-Type":s?"multipart/form-data":void 0,"x-http-token":window.vite_public_request_token||""},timeout:6e4,...(!s||a===0)&&{onUploadProgress:w=>{var E;if(w.total){const D=Math.round(w.loaded*100/w.total);(E=r.onProgress)==null||E.call(r,D)}}}},b=await axios.post("".concat(isDev?"/api":"","/files?action=upload"),_,S);if(isNumber$1(b.data)&&s){uploadProgress.value||(uploadProgress.value=!0);const w=Math.floor(b.data/n.size*100);return uploadNum.value=Math.min(w,100),(d=r.onProgress)==null||d.call(r,uploadNum.value),await unifiedUpload(n,r,b.data)}if(s&&(uploadProgress.value=!1,uploadNum.value=100),(f=b.data)!=null&&f.status)return(p=r.onSuccess)==null||p.call(r,b.data),b.data;const x=((v=b.data)==null?void 0:v.msg)||"上传失败",A=new Error(x);throw(g=r.onError)==null||g.call(r,A),A}catch(_){if(u<l&&(_.code==="NETWORK_ERROR"||_.code==="ECONNABORTED"))return u++,await new Promise(S=>{setTimeout(S,1e3*u)}),c();throw s&&(uploadProgress.value=!1,uploadNum.value=0),(y=r.onError)==null||y.call(r,_),_}};return c()},smartUpload=async(n,r={})=>{var a,o;if(!n||n.size===0){const s=new Error("无效的文件");throw(a=r.onError)==null||a.call(r,s),s}try{const l=n.size>10485760;return await unifiedUpload(n,{...r,useChunked:l})}catch(s){throw(o=r.onError)==null||o.call(r,s),s}},validateFileType=(n,r)=>r.some(a=>a.startsWith(".")?n.name.toLowerCase().endsWith(a.toLowerCase()):n.type.includes(a)),unicodeToChar=pipe(replace(/'/g,'"'),replace(/"/g,'"')),menuJson=pipe(unicodeToChar,JSON.parse),menuConvert=n=>map$2(ifElse(compose(equals(n),head),nth(1),always(n)),[["dologin","exit"],["btwaf","waf"]])[1]||"",menuName=n=>menuConvert(pipe(replace(/memu([A|_]?)/,""),toLower)(n)||"home"),createMenuRoute=n=>{const r=isArray$2(n)?n:menuJson(n),a=shallowRef([]);return r.forEach(({show:o,id:s,title:l,children:u})=>{menuName(s)!=="lowcode"&&a.value.push({name:menuName(s),title:l,show:o,path:"/".concat(menuName(s)||"home"),children:(u==null?void 0:u.map(({id:c,title:d,show:f})=>({name:menuName(c),title:d,path:"/".concat(menuName(c)),show:f})))||[]})}),a},menuRoute=createMenuRoute(window.vite_public_menu||[]);function isPlainObject(n){return n!==null&&typeof n=="object"&&!Array.isArray(n)&&Object.getPrototypeOf(n)===Object.prototype}function deepMerge(n,r,a={},o=new WeakMap){if(r===null||typeof r!="object")return r;if(o.has(r))return o.get(r);o.set(r,n);const{mergeArrays:s=!1}=a,l=Object.keys(r);for(const u of l){const c=r[u],d=n[u];if(c!==d&&c!==void 0){if(Array.isArray(c)){s&&Array.isArray(d)?n[u]=[...d,...c]:n[u]=cloneDeep(c);continue}if(isPlainObject(c)){isPlainObject(d)||(n[u]={}),deepMerge(n[u],c,a,o);continue}n[u]=c}}return n}function cloneDeep(n){if(n===null||typeof n!="object")return n;if(Array.isArray(n))return n.map(r=>cloneDeep(r));if(isPlainObject(n)){const r={};for(const a in n)r[a]=cloneDeep(n[a]);return r}return n}const setSchemeThemeWithViewTransition=(n,r,a=!0)=>new Promise(async o=>{var f,p;if(!a||!document.startViewTransition){r&&await r(),o(null);return}const s=(f=n==null?void 0:n.clientX)!=null?f:window.innerWidth/2,l=(p=n==null?void 0:n.clientY)!=null?p:window.innerHeight/2,u=Math.hypot(Math.max(s,window.innerWidth-s),Math.max(l,window.innerHeight-l)),c=["circle(0px at ".concat(s,"px ").concat(l,"px)"),"circle(".concat(u,"px at ").concat(s,"px ").concat(l,"px)")],d=document.startViewTransition(async()=>{r&&await r(),o(null)});d.ready.then(()=>{document.documentElement.animate({clipPath:c},{duration:400,easing:"ease-out",pseudoElement:"::view-transition-new(root)"})}),await d.finished});var module={};(function n(r,a,o,s){var l=!!(r.Worker&&r.Blob&&r.Promise&&r.OffscreenCanvas&&r.OffscreenCanvasRenderingContext2D&&r.HTMLCanvasElement&&r.HTMLCanvasElement.prototype.transferControlToOffscreen&&r.URL&&r.URL.createObjectURL),u=typeof Path2D=="function"&&typeof DOMMatrix=="function",c=function(){if(!r.OffscreenCanvas)return!1;try{var G=new OffscreenCanvas(1,1),B=G.getContext("2d");B.fillRect(0,0,1,1);var Y=G.transferToImageBitmap();B.createPattern(Y,"no-repeat")}catch(Z){return!1}return!0}();function d(){}function f(G){var B=a.exports.Promise,Y=B!==void 0?B:r.Promise;return typeof Y=="function"?new Y(G):(G(d,d),null)}var p=function(G,B){return{transform:function(Y){if(G)return Y;if(B.has(Y))return B.get(Y);var Z=new OffscreenCanvas(Y.width,Y.height),K=Z.getContext("2d");return K.drawImage(Y,0,0),B.set(Y,Z),Z},clear:function(){B.clear()}}}(c,new Map),v=function(){var G=Math.floor(16.666666666666668),B,Y,Z={},K=0;return typeof requestAnimationFrame=="function"&&typeof cancelAnimationFrame=="function"?(B=function(ee){var j=Math.random();return Z[j]=requestAnimationFrame(function q(J){K===J||K+G-1<J?(K=J,delete Z[j],ee()):Z[j]=requestAnimationFrame(q)}),j},Y=function(ee){Z[ee]&&cancelAnimationFrame(Z[ee])}):(B=function(ee){return setTimeout(ee,G)},Y=function(ee){return clearTimeout(ee)}),{frame:B,cancel:Y}}(),g=function(){var G,B,Y={};function Z(K){function ee(j,q){K.postMessage({options:j||{},callback:q})}K.init=function(q){var J=q.transferControlToOffscreen();K.postMessage({canvas:J},[J])},K.fire=function(q,J,X){if(B)return ee(q,null),B;var re=Math.random().toString(36).slice(2);return B=f(function(Q){function te(ie){ie.data.callback===re&&(delete Y[re],K.removeEventListener("message",te),B=null,p.clear(),X(),Q())}K.addEventListener("message",te),ee(q,re),Y[re]=te.bind(null,{data:{callback:re}})}),B},K.reset=function(){K.postMessage({reset:!0});for(var q in Y)Y[q](),delete Y[q]}}return function(){if(G)return G;if(!o&&l){var K=["var CONFETTI, SIZE = {}, module = {};","("+n.toString()+")(this, module, true, SIZE);","onmessage = function(msg) {"," if (msg.data.options) {"," CONFETTI(msg.data.options).then(function () {"," if (msg.data.callback) {"," postMessage({ callback: msg.data.callback });"," }"," });"," } else if (msg.data.reset) {"," CONFETTI && CONFETTI.reset();"," } else if (msg.data.resize) {"," SIZE.width = msg.data.resize.width;"," SIZE.height = msg.data.resize.height;"," } else if (msg.data.canvas) {"," SIZE.width = msg.data.canvas.width;"," SIZE.height = msg.data.canvas.height;"," CONFETTI = module.exports.create(msg.data.canvas);"," }","}"].join("\n");try{G=new Worker(URL.createObjectURL(new Blob([K])))}catch(ee){return typeof console<"u",null}Z(G)}return G}}(),y={particleCount:50,angle:90,spread:45,startVelocity:45,decay:.9,gravity:1,drift:0,ticks:200,x:.5,y:.5,shapes:["square","circle"],zIndex:100,colors:["#26ccff","#a25afd","#ff5e7e","#88ff5a","#fcff42","#ffa62d","#ff36ff"],disableForReducedMotion:!1,scalar:1};function _(G,B){return B?B(G):G}function S(G){return G!=null}function b(G,B,Y){return _(G&&S(G[B])?G[B]:y[B],Y)}function x(G){return G<0?0:Math.floor(G)}function A(G,B){return Math.floor(Math.random()*(B-G))+G}function w(G){return parseInt(G,16)}function E(G){return G.map(D)}function D(G){var B=String(G).replace(/[^0-9a-f]/gi,"");return B.length<6&&(B=B[0]+B[0]+B[1]+B[1]+B[2]+B[2]),{r:w(B.substring(0,2)),g:w(B.substring(2,4)),b:w(B.substring(4,6))}}function C(G){var B=b(G,"origin",Object);return B.x=b(B,"x",Number),B.y=b(B,"y",Number),B}function $(G){G.width=document.documentElement.clientWidth,G.height=document.documentElement.clientHeight}function P(G){var B=G.getBoundingClientRect();G.width=B.width,G.height=B.height}function M(G){var B=document.createElement("canvas");return B.style.position="fixed",B.style.top="0px",B.style.left="0px",B.style.pointerEvents="none",B.style.zIndex=G,B}function I(G,B,Y,Z,K,ee,j,q,J){G.save(),G.translate(B,Y),G.rotate(ee),G.scale(Z,K),G.arc(0,0,1,j,q,J),G.restore()}function L(G){var B=G.angle*(Math.PI/180),Y=G.spread*(Math.PI/180);return{x:G.x,y:G.y,wobble:Math.random()*10,wobbleSpeed:Math.min(.11,Math.random()*.1+.05),velocity:G.startVelocity*.5+Math.random()*G.startVelocity,angle2D:-B+(.5*Y-Math.random()*Y),tiltAngle:(Math.random()*(.75-.25)+.25)*Math.PI,color:G.color,shape:G.shape,tick:0,totalTicks:G.ticks,decay:G.decay,drift:G.drift,random:Math.random()+2,tiltSin:0,tiltCos:0,wobbleX:0,wobbleY:0,gravity:G.gravity*3,ovalScalar:.6,scalar:G.scalar,flat:G.flat}}function O(G,B){B.x+=Math.cos(B.angle2D)*B.velocity+B.drift,B.y+=Math.sin(B.angle2D)*B.velocity+B.gravity,B.velocity*=B.decay,B.flat?(B.wobble=0,B.wobbleX=B.x+10*B.scalar,B.wobbleY=B.y+10*B.scalar,B.tiltSin=0,B.tiltCos=0,B.random=1):(B.wobble+=B.wobbleSpeed,B.wobbleX=B.x+10*B.scalar*Math.cos(B.wobble),B.wobbleY=B.y+10*B.scalar*Math.sin(B.wobble),B.tiltAngle+=.1,B.tiltSin=Math.sin(B.tiltAngle),B.tiltCos=Math.cos(B.tiltAngle),B.random=Math.random()+2);var Y=B.tick++/B.totalTicks,Z=B.x+B.random*B.tiltCos,K=B.y+B.random*B.tiltSin,ee=B.wobbleX+B.random*B.tiltCos,j=B.wobbleY+B.random*B.tiltSin;if(G.fillStyle="rgba("+B.color.r+", "+B.color.g+", "+B.color.b+", "+(1-Y)+")",G.beginPath(),u&&B.shape.type==="path"&&typeof B.shape.path=="string"&&Array.isArray(B.shape.matrix))G.fill(U(B.shape.path,B.shape.matrix,B.x,B.y,Math.abs(ee-Z)*.1,Math.abs(j-K)*.1,Math.PI/10*B.wobble));else if(B.shape.type==="bitmap"){var q=Math.PI/10*B.wobble,J=Math.abs(ee-Z)*.1,X=Math.abs(j-K)*.1,re=B.shape.bitmap.width*B.scalar,Q=B.shape.bitmap.height*B.scalar,te=new DOMMatrix([Math.cos(q)*J,Math.sin(q)*J,-Math.sin(q)*X,Math.cos(q)*X,B.x,B.y]);te.multiplySelf(new DOMMatrix(B.shape.matrix));var ie=G.createPattern(p.transform(B.shape.bitmap),"no-repeat");ie.setTransform(te),G.globalAlpha=1-Y,G.fillStyle=ie,G.fillRect(B.x-re/2,B.y-Q/2,re,Q),G.globalAlpha=1}else if(B.shape==="circle")G.ellipse?G.ellipse(B.x,B.y,Math.abs(ee-Z)*B.ovalScalar,Math.abs(j-K)*B.ovalScalar,Math.PI/10*B.wobble,0,2*Math.PI):I(G,B.x,B.y,Math.abs(ee-Z)*B.ovalScalar,Math.abs(j-K)*B.ovalScalar,Math.PI/10*B.wobble,0,2*Math.PI);else if(B.shape==="star")for(var ne=Math.PI/2*3,oe=4*B.scalar,le=8*B.scalar,ce=B.x,de=B.y,fe=5,pe=Math.PI/fe;fe--;)ce=B.x+Math.cos(ne)*le,de=B.y+Math.sin(ne)*le,G.lineTo(ce,de),ne+=pe,ce=B.x+Math.cos(ne)*oe,de=B.y+Math.sin(ne)*oe,G.lineTo(ce,de),ne+=pe;else G.moveTo(Math.floor(B.x),Math.floor(B.y)),G.lineTo(Math.floor(B.wobbleX),Math.floor(K)),G.lineTo(Math.floor(ee),Math.floor(j)),G.lineTo(Math.floor(Z),Math.floor(B.wobbleY));return G.closePath(),G.fill(),B.tick<B.totalTicks}function R(G,B,Y,Z,K){var ee=B.slice(),j=G.getContext("2d"),q,J,X=f(function(re){function Q(){q=J=null,j.clearRect(0,0,Z.width,Z.height),p.clear(),K(),re()}function te(){o&&!(Z.width===s.width&&Z.height===s.height)&&(Z.width=G.width=s.width,Z.height=G.height=s.height),!Z.width&&!Z.height&&(Y(G),Z.width=G.width,Z.height=G.height),j.clearRect(0,0,Z.width,Z.height),ee=ee.filter(function(ie){return O(j,ie)}),ee.length?q=v.frame(te):Q()}q=v.frame(te),J=Q});return{addFettis:function(re){return ee=ee.concat(re),X},canvas:G,promise:X,reset:function(){q&&v.cancel(q),J&&J()}}}function N(G,B){var Y=!G,Z=!!b(B||{},"resize"),K=!1,ee=b(B,"disableForReducedMotion",Boolean),j=l&&!!b(B||{},"useWorker"),q=j?g():null,J=Y?$:P,X=G&&q?!!G.__confetti_initialized:!1,re=typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion)").matches,Q;function te(ne,oe,le){for(var ce=b(ne,"particleCount",x),de=b(ne,"angle",Number),fe=b(ne,"spread",Number),pe=b(ne,"startVelocity",Number),me=b(ne,"decay",Number),Se=b(ne,"gravity",Number),xe=b(ne,"drift",Number),Ee=b(ne,"colors",E),Re=b(ne,"ticks",Number),Ce=b(ne,"shapes"),Pe=b(ne,"scalar"),De=!!b(ne,"flat"),Me=C(ne),Ie=ce,$e=[],ke=G.width*Me.x,Oe=G.height*Me.y;Ie--;)$e.push(L({x:ke,y:Oe,angle:de,spread:fe,startVelocity:pe,color:Ee[Ie%Ee.length],shape:Ce[A(0,Ce.length)],ticks:Re,decay:me,gravity:Se,drift:xe,scalar:Pe,flat:De}));return Q?Q.addFettis($e):(Q=R(G,$e,J,oe,le),Q.promise)}function ie(ne){var oe=ee||b(ne,"disableForReducedMotion",Boolean),le=b(ne,"zIndex",Number);if(oe&&re)return f(function(pe){pe()});Y&&Q?G=Q.canvas:Y&&!G&&(G=M(le),document.body.appendChild(G)),Z&&!X&&J(G);var ce={width:G.width,height:G.height};q&&!X&&q.init(G),X=!0,q&&(G.__confetti_initialized=!0);function de(){if(q){var pe={getBoundingClientRect:function(){if(!Y)return G.getBoundingClientRect()}};J(pe),q.postMessage({resize:{width:pe.width,height:pe.height}});return}ce.width=ce.height=null}function fe(){Q=null,Z&&(K=!1,r.removeEventListener("resize",de)),Y&&G&&(document.body.contains(G)&&document.body.removeChild(G),G=null,X=!1)}return Z&&!K&&(K=!0,r.addEventListener("resize",de,!1)),q?q.fire(ne,ce,fe):te(ne,ce,fe)}return ie.reset=function(){q&&q.reset(),Q&&Q.reset()},ie}var V;function F(){return V||(V=N(null,{useWorker:!0,resize:!0})),V}function U(G,B,Y,Z,K,ee,j){var q=new Path2D(G),J=new Path2D;J.addPath(q,new DOMMatrix(B));var X=new Path2D;return X.addPath(J,new DOMMatrix([Math.cos(j)*K,Math.sin(j)*K,-Math.sin(j)*ee,Math.cos(j)*ee,Y,Z])),X}function H(G){if(!u)throw new Error("path confetti are not supported in this browser");var B,Y;typeof G=="string"?B=G:(B=G.path,Y=G.matrix);var Z=new Path2D(B),K=document.createElement("canvas"),ee=K.getContext("2d");if(!Y){for(var j=1e3,q=j,J=j,X=0,re=0,Q,te,ie=0;ie<j;ie+=2)for(var ne=0;ne<j;ne+=2)ee.isPointInPath(Z,ie,ne,"nonzero")&&(q=Math.min(q,ie),J=Math.min(J,ne),X=Math.max(X,ie),re=Math.max(re,ne));Q=X-q,te=re-J;var oe=10,le=Math.min(oe/Q,oe/te);Y=[le,0,0,le,-Math.round(Q/2+q)*le,-Math.round(te/2+J)*le]}return{type:"path",path:B,matrix:Y}}function W(G){var B,Y=1,Z="#000000",K='"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "EmojiOne Color", "Android Emoji", "Twemoji Mozilla", "system emoji", sans-serif';typeof G=="string"?B=G:(B=G.text,Y="scalar"in G?G.scalar:Y,K="fontFamily"in G?G.fontFamily:K,Z="color"in G?G.color:Z);var ee=10*Y,j=""+ee+"px "+K,q=new OffscreenCanvas(ee,ee),J=q.getContext("2d");J.font=j;var X=J.measureText(B),re=Math.ceil(X.actualBoundingBoxRight+X.actualBoundingBoxLeft),Q=Math.ceil(X.actualBoundingBoxAscent+X.actualBoundingBoxDescent),te=2,ie=X.actualBoundingBoxLeft+te,ne=X.actualBoundingBoxAscent+te;re+=te+te,Q+=te+te,q=new OffscreenCanvas(re,Q),J=q.getContext("2d"),J.font=j,J.fillStyle=Z,J.fillText(B,ie,ne);var oe=1/Y;return{type:"bitmap",bitmap:q.transferToImageBitmap(),matrix:[oe,0,0,oe,-re*oe/2,-Q*oe/2]}}a.exports=function(){return F().apply(this,arguments)},a.exports.reset=function(){F().reset()},a.exports.create=N,a.exports.shapeFromPath=H,a.exports.shapeFromText=W})(function(){return typeof window<"u"?window:typeof self<"u"?self:this||{}}(),module,!1);const confetti=module.exports;module.exports.create;function useBottomConfetti(n,r){let a=confetti;return onMounted(()=>{typeof window>"u"||(a=confetti)}),onBeforeUnmount(()=>{}),{trigger:l=>{const u={particleCount:500,spread:80,startVelocity:120,gravity:1,ticks:300,angle:90,origin:{x:.5,y:1},...l||{}};return a(u)},stream:(l=2e3,u)=>new Promise(c=>{const d=Date.now()+l,f=()=>{a({particleCount:8,angle:90,spread:70,origin:{x:.5,y:1},...u?u():{}}),Date.now()<d?requestAnimationFrame(f):c()};f()})}}var ActionType=(n=>(n.CLICK="click",n.DBL_CLICK="dblClick",n.RIGHT_CLICK="rightClick",n.HOVER="hover",n.TOOLTIP="tooltip",n.FOCUS="focus",n.INPUT="input",n.SCROLL="scroll",n.DRAG="drag",n.WAIT="wait",n.WAIT_FOR="waitFor",n.RUN_FN="runFn",n))(ActionType||{});const DEFAULT_OPTIONS$1={points:60,curvature:.3,noise:.08};function generateControlPoints(n,r,a){const o=r.x-n.x,s=r.y-n.y,l=Math.sqrt(o*o+s*s),u=-s/l,c=o/l,d=(Math.random()-.5)*2*a*l,f={x:n.x+o*.3+u*d,y:n.y+s*.3+c*d},p={x:n.x+o*.7+u*d*.8,y:n.y+s*.7+c*d*.8};return[f,p]}function cubicBezier(n,r,a,o,s){const l=1-n,u=l*l,c=u*l,d=n*n,f=d*n;return{x:c*r.x+3*u*n*a.x+3*l*d*o.x+f*s.x,y:c*r.y+3*u*n*a.y+3*l*d*o.y+f*s.y}}function addPointNoise(n,r,a){if(r===0)return n;const o=a*r*.05;return{x:n.x+(Math.random()-.5)*o,y:n.y+(Math.random()-.5)*o}}function generateMousePath(n,r,a){const o={...DEFAULT_OPTIONS$1,...a},{points:s,curvature:l,noise:u}=o,c=r.x-n.x,d=r.y-n.y,f=Math.sqrt(c*c+d*d);if(f<2)return[n,r];const[p,v]=generateControlPoints(n,r,l),g=Math.max(20,Math.min(s,Math.floor(f/5))),y=[];for(let _=0;_<=g;_++){const S=_/g,b=easeInOutCubic(S),x=cubicBezier(b,n,p,v,r),A=addPointNoise(x,u,f);y.push(A)}return y[y.length-1]={...r},y}function easeInOutCubic(n){return n<.5?4*n*n*n:1-Math.pow(-2*n+2,3)/2}function calculateStepDuration(n,r,a=1){const o=r.x-n.x,s=r.y-n.y,u=Math.sqrt(o*o+s*s)*.4;return Math.max(5,u/Math.max(.1,a))}function queryElementByString(n){if(n.startsWith("/")||n.startsWith("("))try{return document.evaluate(n,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue}catch(r){return null}return document.querySelector(n)}function findElement(n){let r=null;if(typeof n=="string"){if(r=queryElementByString(n),!r)throw new Error('UIAutomator: 找不到元素 "'.concat(n,'"'))}else if(n instanceof Element)r=n;else throw new Error("UIAutomator: 无效的 selector 类型");return r}function tryFindElement(n){try{return findElement(n)}catch(r){return null}}function isVisible(n){const r=window.getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden"||parseFloat(r.opacity)===0)return!1;const a=n.getBoundingClientRect();return a.width>0||a.height>0}function isInViewport(n){const r=n.getBoundingClientRect();return r.top>=0&&r.left>=0&&r.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&r.right<=(window.innerWidth||document.documentElement.clientWidth)}function getElementRect(n){const r=n.getBoundingClientRect();return{x:r.left+window.scrollX,y:r.top+window.scrollY,width:r.width,height:r.height,centerX:r.left+r.width/2,centerY:r.top+r.height/2}}function getElementCenter(n){const r=n.getBoundingClientRect();return{x:r.left+r.width/2,y:r.top+r.height/2}}function scrollIntoViewIfNeeded(n){isInViewport(n)||n.scrollIntoView({behavior:"smooth",block:"center"})}function dispatchMouseEvent(n,r,a={}){const o=new MouseEvent(r,{bubbles:!0,cancelable:!0,view:window,button:0,buttons:1,...a});n.dispatchEvent(o)}function dispatchKeyEvent(n,r,a){var s,l,u,c,d,f,p;const o=new KeyboardEvent(r,{bubbles:!0,cancelable:!0,view:window,key:a.key,code:(s=a.code)!=null?s:"Key".concat(a.key.toUpperCase()),keyCode:(l=a.keyCode)!=null?l:a.key.charCodeAt(0),charCode:r==="keypress"?(u=a.charCode)!=null?u:a.key.charCodeAt(0):0,ctrlKey:(c=a.ctrlKey)!=null?c:!1,altKey:(d=a.altKey)!=null?d:!1,shiftKey:(f=a.shiftKey)!=null?f:!1,metaKey:(p=a.metaKey)!=null?p:!1});n.dispatchEvent(o)}function getNativeInputSetter(n){const r=n instanceof HTMLTextAreaElement?HTMLTextAreaElement.prototype:HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(r,"value");return a!=null&&a.set?a.set.bind(n):null}function dispatchInputEvent(n){n.dispatchEvent(new Event("input",{bubbles:!0}))}function dispatchChangeEvent(n){n.dispatchEvent(new Event("change",{bubbles:!0}))}function focusElement(n){n.focus({preventScroll:!0})}function blurElement(n){n.blur()}function sleep(n){return new Promise(r=>setTimeout(r,n))}function randomDelay(n){const[r,a]=n,o=Math.floor(Math.random()*(a-r+1))+r;return sleep(o)}function addNoise(n,r=.2){const a=n*r;return Math.max(0,n+(Math.random()*2-1)*a)}const DEFAULT_WAIT_OPTIONS={timeout:1e4,interval:100,visible:!0};function waitForElement(n,r){const a={...DEFAULT_WAIT_OPTIONS,...r},{timeout:o,interval:s,visible:l}=a;return new Promise((u,c)=>{let d=null,f=null,p=null;const v=()=>{d&&(d.disconnect(),d=null),f!==null&&(clearTimeout(f),f=null),p!==null&&(clearInterval(p),p=null)},g=()=>{const y=queryElement(n);if(l){if(y&&isElementVisible(y))return v(),u(y),!0}else if(!y||!isElementVisible(y))return v(),u(null),!0;return!1};if(!g()){f=setTimeout(()=>{v(),c(new Error('waitForElement: 等待 "'.concat(n,'" ').concat(l?"出现":"消失"," 超时(").concat(o,"ms)")))},o);try{d=new MutationObserver(()=>{g()}),d.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style","class","hidden"]})}catch(y){d=null,p=setInterval(()=>{g()},s)}}})}function waitForCondition(n,r){const a={...DEFAULT_WAIT_OPTIONS,...r},{timeout:o,interval:s}=a;return new Promise((l,u)=>{let c=null,d=null;const f=()=>{c!==null&&clearTimeout(c),d!==null&&clearInterval(d)},p=async()=>{try{await n()&&(f(),l())}catch(v){f(),u(v)}};c=setTimeout(()=>{f(),u(new Error("waitForCondition: 条件等待超时(".concat(o,"ms)")))},o),d=setInterval(p,s),p()})}function queryElement(n){return n.startsWith("/")||n.startsWith("(")?document.evaluate(n,document,null,XPathResult.FIRST_ORDERED_NODE_TYPE,null).singleNodeValue:document.querySelector(n)}function isElementVisible(n){const r=window.getComputedStyle(n);if(r.display==="none"||r.visibility==="hidden"||r.opacity==="0")return!1;const a=n.getBoundingClientRect();return a.width>0||a.height>0}let currentPosition={x:0,y:0};function getCurrentMousePosition(){return{...currentPosition}}function setCurrentMousePosition(n){currentPosition={...n}}class MouseSimulator{constructor(r={}){se(this,"speed");se(this,"debug");se(this,"visualCursor",null);var a,o;this.speed=(a=r.speed)!=null?a:1,this.debug=(o=r.debug)!=null?o:!1}setVisualCursor(r){this.visualCursor=r}log(...r){this.debug}async moveTo(r,a,o){var c,d;const s={...currentPosition},l={x:r,y:a};this.log("移动鼠标 (".concat(s.x.toFixed(0),", ").concat(s.y.toFixed(0),") → (").concat(l.x.toFixed(0),", ").concat(l.y.toFixed(0),")"));const u=generateMousePath(s,l,o);for(let f=1;f<u.length;f++){const p=u[f],v=u[f-1];dispatchMouseEvent(document,"mousemove",{clientX:Math.round(p.x),clientY:Math.round(p.y),screenX:Math.round(p.x),screenY:Math.round(p.y)}),currentPosition={x:Math.round(p.x),y:Math.round(p.y)},(c=this.visualCursor)==null||c.setPosition(Math.round(p.x),Math.round(p.y));const g=calculateStepDuration(v,p,this.speed);g>2&&await sleep(g)}currentPosition={x:Math.round(l.x),y:Math.round(l.y)},(d=this.visualCursor)==null||d.setPosition(Math.round(l.x),Math.round(l.y))}async moveToElement(r,a){var l;const o=findElement(r);scrollIntoViewIfNeeded(o),await sleep(50),(l=this.visualCursor)==null||l.highlightElement(o);const s=getElementCenter(o);return await this.moveTo(s.x,s.y,a),o}async click(r){var l,u,c;this.log("单击 ".concat(String(r)));const a=await this.moveToElement(r),o=getElementCenter(a),s={clientX:Math.round(o.x),clientY:Math.round(o.y),screenX:Math.round(o.x),screenY:Math.round(o.y)};dispatchMouseEvent(a,"mouseenter",{...s,bubbles:!1}),dispatchMouseEvent(a,"mouseover",s),dispatchMouseEvent(a,"mousedown",{...s,buttons:1}),(l=this.visualCursor)==null||l.animatePress(),await sleep(50+Math.random()*70),dispatchMouseEvent(a,"mouseup",{...s,buttons:0}),dispatchMouseEvent(a,"click",{...s,buttons:0}),(u=this.visualCursor)==null||u.animateRelease(),await sleep(200),(c=this.visualCursor)==null||c.hideHighlight(),this.log("单击完成")}async dblClick(r){var l,u,c,d,f;this.log("双击 ".concat(String(r)));const a=await this.moveToElement(r),o=getElementCenter(a),s={clientX:Math.round(o.x),clientY:Math.round(o.y),screenX:Math.round(o.x),screenY:Math.round(o.y)};dispatchMouseEvent(a,"mousedown",{...s,buttons:1}),(l=this.visualCursor)==null||l.animatePress(),await sleep(50+Math.random()*50),dispatchMouseEvent(a,"mouseup",{...s,buttons:0}),dispatchMouseEvent(a,"click",s),(u=this.visualCursor)==null||u.animateRelease(),await sleep(80+Math.random()*60),dispatchMouseEvent(a,"mousedown",{...s,buttons:1}),(c=this.visualCursor)==null||c.animatePress(),await sleep(50+Math.random()*50),dispatchMouseEvent(a,"mouseup",{...s,buttons:0}),dispatchMouseEvent(a,"click",s),dispatchMouseEvent(a,"dblclick",s),(d=this.visualCursor)==null||d.animateRelease(),await sleep(200),(f=this.visualCursor)==null||f.hideHighlight(),this.log("双击完成")}async rightClick(r){var l,u,c;this.log("右键点击 ".concat(String(r)));const a=await this.moveToElement(r),o=getElementCenter(a),s={clientX:Math.round(o.x),clientY:Math.round(o.y),screenX:Math.round(o.x),screenY:Math.round(o.y),button:2,buttons:2};dispatchMouseEvent(a,"mousedown",s),(l=this.visualCursor)==null||l.animatePress(),await sleep(50+Math.random()*50),dispatchMouseEvent(a,"mouseup",s),dispatchMouseEvent(a,"contextmenu",s),(u=this.visualCursor)==null||u.animateRelease(),await sleep(200),(c=this.visualCursor)==null||c.hideHighlight(),this.log("右键点击完成")}async hover(r,a=1e3){var u;this.log("悬停 ".concat(String(r)," ").concat(a,"ms"));const o=await this.moveToElement(r),s=getElementCenter(o),l={clientX:Math.round(s.x),clientY:Math.round(s.y),screenX:Math.round(s.x),screenY:Math.round(s.y)};dispatchMouseEvent(o,"mouseenter",{...l,bubbles:!1}),dispatchMouseEvent(o,"mouseover",l),await sleep(a),dispatchMouseEvent(o,"mouseout",l),dispatchMouseEvent(o,"mouseleave",{...l,bubbles:!1}),(u=this.visualCursor)==null||u.hideHighlight(),this.log("悬停结束")}async drag(r,a,o=600){var _,S,b,x;this.log("拖拽 ".concat(String(r)," → ").concat(String(a)));const s=await this.moveToElement(r),l=getElementCenter(s),u={clientX:Math.round(l.x),clientY:Math.round(l.y),screenX:Math.round(l.x),screenY:Math.round(l.y),buttons:1};dispatchMouseEvent(s,"mousedown",{...u,button:0}),dispatchMouseEvent(s,"dragstart",{...u,button:0}),(_=this.visualCursor)==null||_.animatePress(),await sleep(50);const c=findElement(a);scrollIntoViewIfNeeded(c);const d=getElementCenter(c),f={x:l.x,y:l.y},p={x:d.x,y:d.y},v=generateMousePath(f,p,{points:40,curvature:.2}),g=o/v.length;for(const A of v)dispatchMouseEvent(document,"mousemove",{clientX:Math.round(A.x),clientY:Math.round(A.y),screenX:Math.round(A.x),screenY:Math.round(A.y),buttons:1}),dispatchMouseEvent(s,"drag",{clientX:Math.round(A.x),clientY:Math.round(A.y)}),currentPosition=A,(S=this.visualCursor)==null||S.setPosition(Math.round(A.x),Math.round(A.y)),await sleep(g);const y={clientX:Math.round(d.x),clientY:Math.round(d.y),screenX:Math.round(d.x),screenY:Math.round(d.y)};dispatchMouseEvent(c,"dragover",y),dispatchMouseEvent(c,"drop",y),dispatchMouseEvent(document,"mouseup",{...y,buttons:0}),dispatchMouseEvent(s,"dragend",y),(b=this.visualCursor)==null||b.animateRelease(),currentPosition={x:Math.round(d.x),y:Math.round(d.y)},(x=this.visualCursor)==null||x.hideHighlight(),this.log("拖拽完成")}}const SPECIAL_KEYS={Backspace:{key:"Backspace",code:"Backspace",keyCode:8},Tab:{key:"Tab",code:"Tab",keyCode:9},Enter:{key:"Enter",code:"Enter",keyCode:13},Escape:{key:"Escape",code:"Escape",keyCode:27},Delete:{key:"Delete",code:"Delete",keyCode:46},ArrowLeft:{key:"ArrowLeft",code:"ArrowLeft",keyCode:37},ArrowRight:{key:"ArrowRight",code:"ArrowRight",keyCode:39},ArrowUp:{key:"ArrowUp",code:"ArrowUp",keyCode:38},ArrowDown:{key:"ArrowDown",code:"ArrowDown",keyCode:40},Home:{key:"Home",code:"Home",keyCode:36},End:{key:"End",code:"End",keyCode:35}};class InputSimulator{constructor(r={}){se(this,"defaultSpeed");se(this,"debug");var a,o;this.defaultSpeed=(a=r.speed)!=null?a:80,this.debug=(o=r.debug)!=null?o:!1}log(...r){this.debug}getInputElement(r){const a=findElement(r);if(!(a instanceof HTMLInputElement)&&!(a instanceof HTMLTextAreaElement))throw new Error('UIAutomator: 元素 "'.concat(String(r),'" 不是可输入元素'));return a}setNativeValue(r,a){const o=getNativeInputSetter(r);o?o(a):r.value=a}clear(r){this.setNativeValue(r,""),dispatchInputEvent(r),this.log("清空输入框")}async type(r,a,o={}){const{speed:s,clear:l=!1,typeMode:u=!0}=o,c=s!=null?s:this.defaultSpeed;this.log('输入文本 "'.concat(a,'" 到 ').concat(String(r)));const d=this.getInputElement(r);if(focusElement(d),await sleep(30),l&&(this.clear(d),await sleep(50)),!u){await this.setValue(r,a,l?"":void 0);return}let f=d.value;for(const p of a){const v=p in SPECIAL_KEYS,g=v?SPECIAL_KEYS[p]:{key:p,code:"Key".concat(p.toUpperCase()),keyCode:p.charCodeAt(0)};dispatchKeyEvent(d,"keydown",{key:g.key,code:g.code,keyCode:g.keyCode}),v||dispatchKeyEvent(d,"keypress",{key:g.key,code:g.code,keyCode:g.keyCode,charCode:p.charCodeAt(0)}),p==="Backspace"?f=f.slice(0,-1):v||(f+=p),this.setNativeValue(d,f),dispatchInputEvent(d),dispatchKeyEvent(d,"keyup",{key:g.key,code:g.code,keyCode:g.keyCode});const y=addNoise(c,.25);await sleep(y)}dispatchChangeEvent(d),this.log('输入完成,最终值: "'.concat(d.value,'"'))}async setValue(r,a,o){this.log('直接设置值 "'.concat(a,'" 到 ').concat(String(r)));const s=this.getInputElement(r);focusElement(s),o!==void 0&&(this.setNativeValue(s,o),dispatchInputEvent(s),await sleep(20)),this.setNativeValue(s,a),dispatchInputEvent(s),dispatchChangeEvent(s),this.log("设置值完成")}async paste(r,a){var c,d;this.log('粘贴文本 "'.concat(a,'" 到 ').concat(String(r)));const o=this.getInputElement(r);focusElement(o),await sleep(30);const s=new DataTransfer;s.setData("text/plain",a);const l=new ClipboardEvent("paste",{bubbles:!0,cancelable:!0,clipboardData:s});if(!!o.dispatchEvent(l)){const f=o.value,p=(c=o.selectionStart)!=null?c:f.length,v=(d=o.selectionEnd)!=null?d:f.length,g=f.slice(0,p)+a+f.slice(v);this.setNativeValue(o,g),dispatchInputEvent(o),dispatchChangeEvent(o)}this.log("粘贴完成")}async pressKey(r,a){var l;this.log("按键 ".concat(a," 到 ").concat(String(r)));const o=findElement(r);focusElement(o);const s=(l=SPECIAL_KEYS[a])!=null?l:{key:a,code:"Key".concat(a.toUpperCase()),keyCode:a.charCodeAt(0)};dispatchKeyEvent(o,"keydown",s),a==="Enter"&&o.dispatchEvent(new Event("submit",{bubbles:!0})),await sleep(50),dispatchKeyEvent(o,"keyup",s)}}const DEFAULT_OPTIONS={enabled:!0,color:"auto",size:20,showRipple:!0,showHighlight:!0,zIndex:999999};function resolveThemeColor(n){return n!=="auto"?n:getComputedStyle(document.documentElement).getPropertyValue("--el-color-primary").trim()||"#409eff"}class VisualCursor{constructor(r={}){se(this,"options");se(this,"cursorEl",null);se(this,"rippleContainer",null);se(this,"highlightEl",null);se(this,"mounted",!1);se(this,"resolvedColor","#409eff");this.options={...DEFAULT_OPTIONS,...r}}mount(){this.mounted||!this.options.enabled||(this.resolvedColor=resolveThemeColor(this.options.color),this.cursorEl=this.createCursorElement(),document.body.appendChild(this.cursorEl),this.rippleContainer=document.createElement("div"),this.rippleContainer.id="ui-automator-ripple-container",this.rippleContainer.style.cssText="position:fixed;top:0;left:0;width:100%;height:100%;pointer-events:none;z-index:".concat(this.options.zIndex+1,";"),document.body.appendChild(this.rippleContainer),this.options.showHighlight&&(this.highlightEl=this.createHighlightElement(),document.body.appendChild(this.highlightEl)),this.mounted=!0)}unmount(){var r,a,o;this.mounted&&((r=this.cursorEl)==null||r.remove(),(a=this.rippleContainer)==null||a.remove(),(o=this.highlightEl)==null||o.remove(),this.cursorEl=null,this.rippleContainer=null,this.highlightEl=null,this.mounted=!1)}show(){this.cursorEl&&(this.cursorEl.style.opacity="1",this.cursorEl.style.transform="scale(1)")}getColor(){return this.resolvedColor}hide(){this.cursorEl&&(this.cursorEl.style.opacity="0",this.cursorEl.style.transform="scale(0.5)")}setPosition(r,a){this.cursorEl&&(this.cursorEl.style.left="".concat(r,"px"),this.cursorEl.style.top="".concat(a,"px"))}async smoothMoveTo(r,a,o=300){this.cursorEl&&(this.cursorEl.style.transition="left ".concat(o,"ms cubic-bezier(0.33, 1, 0.68, 1), top ").concat(o,"ms cubic-bezier(0.33, 1, 0.68, 1)"),this.cursorEl.style.left="".concat(r,"px"),this.cursorEl.style.top="".concat(a,"px"),await new Promise(s=>setTimeout(s,o)),this.cursorEl.style.transition="none")}animatePress(){this.cursorEl&&(this.cursorEl.style.transition="transform 0.1s ease",this.cursorEl.style.transform="scale(0.75)")}animateRelease(){if(this.cursorEl&&(this.cursorEl.style.transition="transform 0.15s ease",this.cursorEl.style.transform="scale(1)",this.options.showRipple)){const r=parseFloat(this.cursorEl.style.left)||0,a=parseFloat(this.cursorEl.style.top)||0;this.createRipple(r,a)}}createRipple(r,a){if(!this.rippleContainer)return;const o=document.createElement("div"),s=40;o.style.cssText="\n position: fixed;\n left: ".concat(r-s/2,"px;\n top: ").concat(a-s/2,"px;\n width: ").concat(s,"px;\n height: ").concat(s,"px;\n border-radius: 50%;\n background: ").concat(this.resolvedColor,";\n opacity: 0.4;\n pointer-events: none;\n animation: ui-automator-ripple 0.6s ease-out forwards;\n "),this.rippleContainer.appendChild(o),setTimeout(()=>o.remove(),650)}highlightElement(r){if(!this.highlightEl||!this.options.showHighlight)return;const a=r.getBoundingClientRect(),o=4;this.highlightEl.style.left="".concat(a.left-o,"px"),this.highlightEl.style.top="".concat(a.top-o,"px"),this.highlightEl.style.width="".concat(a.width+o*2,"px"),this.highlightEl.style.height="".concat(a.height+o*2,"px"),this.highlightEl.style.opacity="1"}hideHighlight(){this.highlightEl&&(this.highlightEl.style.opacity="0")}createCursorElement(){const r=document.createElement("div");r.id="ui-automator-cursor";const a=this.options.size;return r.style.cssText="\n position: fixed;\n left: -100px;\n top: -100px;\n width: ".concat(a,"px;\n height: ").concat(a,"px;\n z-index: ").concat(this.options.zIndex,";\n pointer-events: none;\n transform: scale(1);\n transition: none;\n filter: drop-shadow(1px 2px 3px rgba(0,0,0,0.3));\n "),r.innerHTML='\n <svg width="'.concat(a,'" height="').concat(a,'" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">\n <path d="M5 3L19 12L12 13L9 20L5 3Z" fill="').concat(this.resolvedColor,'" stroke="#fff" stroke-width="1.5" stroke-linejoin="round"/>\n </svg>\n '),r}createHighlightElement(){const r=document.createElement("div");return r.id="ui-automator-highlight",r.style.cssText="\n position: fixed;\n left: 0;\n top: 0;\n width: 0;\n height: 0;\n border: 2px solid ".concat(this.resolvedColor,";\n border-radius: 4px;\n background: ").concat(this.resolvedColor,"15;\n pointer-events: none;\n z-index: ").concat(this.options.zIndex-1,";\n opacity: 0;\n transition: all 0.25s ease, opacity 0.2s ease;\n box-shadow: 0 0 0 1px ").concat(this.resolvedColor,"30;\n "),r}static injectStyles(){const r="ui-automator-visual-styles";if(document.getElementById(r))return;const a=document.createElement("style");a.id=r,a.textContent="\n @keyframes ui-automator-ripple {\n 0% {\n transform: scale(0.5);\n opacity: 0.4;\n }\n 100% {\n transform: scale(2.5);\n opacity: 0;\n }\n }\n @keyframes ui-automator-pulse {\n 0%, 100% { box-shadow: 0 0 0 0 currentColor; }\n 50% { box-shadow: 0 0 0 6px transparent; }\n }\n ",document.head.appendChild(a)}}class UIAutomator{constructor(r={}){se(this,"options");se(this,"mouse");se(this,"keyboard");se(this,"visualCursor");se(this,"queue",[]);se(this,"state","idle");se(this,"resumeResolver",null);se(this,"listeners",new Map);var a,o,s,l,u,c,d,f,p;this.options={humanize:(a=r.humanize)!=null?a:!0,humanizeRange:(o=r.humanizeRange)!=null?o:[60,180],mouseSpeed:(s=r.mouseSpeed)!=null?s:1,inputSpeed:(l=r.inputSpeed)!=null?l:80,debug:(u=r.debug)!=null?u:!1,maxRetries:(c=r.maxRetries)!=null?c:10,retryInterval:(d=r.retryInterval)!=null?d:2e3,onError:(f=r.onError)!=null?f:null},this.visualCursor=new VisualCursor((p=r.cursor)!=null?p:{enabled:!0}),VisualCursor.injectStyles(),this.mouse=new MouseSimulator({speed:this.options.mouseSpeed,debug:this.options.debug}),this.mouse.setVisualCursor(this.visualCursor),this.keyboard=new InputSimulator({speed:this.options.inputSpeed,debug:this.options.debug})}log(...r){this.options.debug}on(r,a){return this.listeners.has(r)||this.listeners.set(r,[]),this.listeners.get(r).push(a),this}off(r,a){const o=this.listeners.get(r);if(o){const s=o.indexOf(a);s!==-1&&o.splice(s,1)}return this}emit(r,a){var o;(o=this.listeners.get(r))==null||o.forEach(s=>s(a))}click(r,a){return this.queue.push({type:ActionType.CLICK,selector:r,delay:a}),this}dblClick(r){return this.queue.push({type:ActionType.DBL_CLICK,selector:r}),this}rightClick(r){return this.queue.push({type:ActionType.RIGHT_CLICK,selector:r}),this}hover(r,a){return this.queue.push({type:ActionType.HOVER,selector:r,duration:a}),this}tooltip(r,a,o,s){return this.queue.push({type:ActionType.TOOLTIP,selector:r,text:a,duration:o,placement:s}),this}focus(r){return this.queue.push({type:ActionType.FOCUS,selector:r}),this}input(r,a,o){return this.queue.push({type:ActionType.INPUT,selector:r,text:a,options:o}),this}scroll(r,a,o){return this.queue.push({type:ActionType.SCROLL,selector:r,target:a,container:o}),this}drag(r,a,o){return this.queue.push({type:ActionType.DRAG,fromSelector:r,toSelector:a,duration:o}),this}wait(r){return this.queue.push({type:ActionType.WAIT,duration:r}),this}waitFor(r,a){return this.queue.push({type:ActionType.WAIT_FOR,selector:r,options:a}),this}exec(r,a){return this.queue.push({type:ActionType.RUN_FN,fn:r,label:a}),this}run(r,a){return typeof r=="function"?(this.queue.push({type:ActionType.RUN_FN,fn:r,label:a}),this):this._execute()}pause(){this.state==="running"&&(this.state="paused",this.emit("pause"),this.log("已暂停"))}resume(){var r;this.state==="paused"&&(this.state="running",this.emit("resume"),(r=this.resumeResolver)==null||r.call(this),this.resumeResolver=null,this.log("已恢复"))}stop(){var r;this.state="stopped",this.queue=[],(r=this.resumeResolver)==null||r.call(this),this.resumeResolver=null,this.emit("stop"),this.log("已停止")}reset(){return this.state="idle",this.queue=[],this.resumeResolver=null,this.log("已重置"),this}getState(){return this.state}getQueueLength(){return this.queue.length}waitForResume(){return new Promise(r=>{this.resumeResolver=r})}async cleanupCursor(){this.visualCursor.hide(),await sleep(300),this.visualCursor.unmount()}async executeAction(r){var a,o,s,l;switch(r.type){case ActionType.CLICK:r.delay&&await sleep(r.delay),await this.mouse.click(r.selector);break;case ActionType.DBL_CLICK:await this.mouse.dblClick(r.selector);break;case ActionType.RIGHT_CLICK:await this.mouse.rightClick(r.selector);break;case ActionType.HOVER:await this.mouse.hover(r.selector,(a=r.duration)!=null?a:1e3);break;case ActionType.TOOLTIP:await this.executeTooltip(r.selector,r.text,(o=r.duration)!=null?o:2e3,(s=r.placement)!=null?s:"top");break;case ActionType.FOCUS:focusElement(findElement(r.selector)),await sleep(50);break;case ActionType.INPUT:await this.keyboard.type(r.selector,r.text,r.options);break;case ActionType.SCROLL:await this.executeScroll(r.selector,r.target,r.container);break;case ActionType.DRAG:await this.mouse.drag(r.fromSelector,r.toSelector,(l=r.duration)!=null?l:600);break;case ActionType.WAIT:await sleep(r.duration);break;case ActionType.WAIT_FOR:{const{selector:u,options:c}=r;if(typeof u=="function")await waitForCondition(u,c);else if(typeof u=="string")await waitForElement(u,c);else{const d=u;await waitForCondition(()=>{var v;const f=(v=c==null?void 0:c.visible)!=null?v:!0,p=d.getBoundingClientRect().width>0||d.getBoundingClientRect().height>0;return f?p:!p},c)}break}case ActionType.RUN_FN:this.log("执行自定义函数".concat(r.label?" [".concat(r.label,"]"):"")),await r.fn();break;default:this.log("未知动作类型,跳过")}}async executeTooltip(r,a,o,s){const l=await this.mouse.moveToElement(r),u=getElementCenter(l),c={clientX:Math.round(u.x),clientY:Math.round(u.y),screenX:Math.round(u.x),screenY:Math.round(u.y)};dispatchMouseEvent(l,"mouseenter",{...c,bubbles:!1}),dispatchMouseEvent(l,"mouseover",c);const d=l.getBoundingClientRect(),f=this.visualCursor.getColor(),p=document.createElement("div");p.setAttribute("data-ui-automator-tooltip",""),Object.assign(p.style,{position:"fixed",zIndex:"2147483647",padding:"6px 12px",background:f,color:"#fff",fontSize:"var(--el-font-size-small, 12px)",lineHeight:"1.6",borderRadius:"var(--el-border-radius-base, 6px)",border:"1px solid ".concat(f),boxShadow:"0 4px 16px ".concat(f,"4d"),pointerEvents:"none",whiteSpace:"nowrap",opacity:"0",transition:"opacity 0.18s ease"}),p.textContent=a;const v=document.createElement("div"),g=f;Object.assign(v.style,{position:"absolute",width:"0",height:"0",pointerEvents:"none"}),p.appendChild(v),document.body.appendChild(p);const y=10,_=p.offsetWidth,S=p.offsetHeight,b=6;let x=0,A=0;s==="top"?(x=d.top-S-y,A=d.left+d.width/2-_/2,Object.assign(v.style,{bottom:"-".concat(b,"px"),left:"50%",transform:"translateX(-50%)",borderLeft:"".concat(b,"px solid transparent"),borderRight:"".concat(b,"px solid transparent"),borderTop:"".concat(b,"px solid ").concat(g)})):s==="bottom"?(x=d.bottom+y,A=d.left+d.width/2-_/2,Object.assign(v.style,{top:"-".concat(b,"px"),left:"50%",transform:"translateX(-50%)",borderLeft:"".concat(b,"px solid transparent"),borderRight:"".concat(b,"px solid transparent"),borderBottom:"".concat(b,"px solid ").concat(g)})):s==="left"?(x=d.top+d.height/2-S/2,A=d.left-_-y,Object.assign(v.style,{right:"-".concat(b,"px"),top:"50%",transform:"translateY(-50%)",borderTop:"".concat(b,"px solid transparent"),borderBottom:"".concat(b,"px solid transparent"),borderLeft:"".concat(b,"px solid ").concat(g)})):(x=d.top+d.height/2-S/2,A=d.right+y,Object.assign(v.style,{left:"-".concat(b,"px"),top:"50%",transform:"translateY(-50%)",borderTop:"".concat(b,"px solid transparent"),borderBottom:"".concat(b,"px solid transparent"),borderRight:"".concat(b,"px solid ").concat(g)}));const w=window.innerWidth,E=window.innerHeight;A=Math.max(y,Math.min(A,w-_-y)),x=Math.max(y,Math.min(x,E-S-y)),p.style.left="".concat(A,"px"),p.style.top="".concat(x,"px"),requestAnimationFrame(()=>{p.style.opacity="1"}),await sleep(o),p.style.opacity="0",dispatchMouseEvent(l,"mouseout",c),dispatchMouseEvent(l,"mouseleave",{...c,bubbles:!1}),this.visualCursor.hideHighlight(),await sleep(200),p.remove()}async executeScroll(r,a,o){const s=findElement(r);scrollIntoViewIfNeeded(s),await sleep(50);const l=o?findElement(o):s;let u;if(a==="top")u=0;else if(a==="bottom")u=l.scrollHeight-l.clientHeight;else if(a==="center")u=(l.scrollHeight-l.clientHeight)/2;else if(a==="nearest"){s.scrollIntoView({behavior:"smooth",block:"nearest"});return}else u=l.scrollTop+a;l.scrollTo({top:u,behavior:"smooth"}),await sleep(400)}async _execute(){if(this.state==="running"){this.log("引擎已在运行中");return}this.state="running";const r=[...this.queue];this.queue=[];const a=r.length;this.visualCursor.mount(),this.visualCursor.show(),this.log("开始执行,共 ".concat(a," 个动作"));for(let o=0;o<r.length;o++){if(this.getState()==="stopped"){this.log("执行已停止"),await this.cleanupCursor();return}if(this.getState()==="paused"&&(this.log("第 ".concat(o+1," 个动作执行前暂停,等待 resume...")),await this.waitForResume(),this.getState()==="stopped"))return;const s=r[o],l={action:s,index:o,total:a};this.log("执行动作 ".concat(o+1,"/").concat(a,": ").concat(s.type)),this.emit("action:start",l);let u=!1,c=0,d=null;for(;!u&&c<=this.options.maxRetries;){if(this.getState()==="stopped"){this.log("执行已停止 (重试中断)"),await this.cleanupCursor();return}try{await this.executeAction(s),this.emit("action:end",l),u=!0}catch(f){if(d=f instanceof Error?f:new Error(String(f)),c<this.options.maxRetries)this.log("动作 ".concat(s.type," 执行失败 (尝试 ").concat(c+1,"/").concat(this.options.maxRetries,"):"),d.message),this.log("等待 ".concat(this.options.retryInterval,"ms 后进行下一次重试...")),c++,await sleep(this.options.retryInterval);else break}}if(!u&&d)if(this.log("动作 ".concat(s.type," 最终执行失败 (已重试 ").concat(this.options.maxRetries," 次):"),d.message),this.emit("action:error",{...l,error:d}),await this.cleanupCursor(),this.options.onError)this.options.onError(d,s);else throw this.state="idle",this.emit("error",d),d;this.options.humanize&&o<r.length-1&&await randomDelay(this.options.humanizeRange)}this.state="idle",await this.cleanupCursor(),this.log("所有动作执行完成"),this.emit("complete")}}const index$2=Object.freeze(Object.defineProperty({__proto__:null,ActionType,InputSimulator,MouseSimulator,UIAutomator,VisualCursor,addNoise,blurElement,calculateStepDuration,dispatchChangeEvent,dispatchInputEvent,dispatchKeyEvent,dispatchMouseEvent,findElement,focusElement,generateMousePath,getCurrentMousePosition,getElementCenter,getElementRect,getNativeInputSetter,isInViewport,isVisible,randomDelay,scrollIntoViewIfNeeded,setCurrentMousePosition,sleep,tryFindElement,waitForCondition,waitForElement},Symbol.toStringTag,{value:"Module"}));function ownKeys$1(n,r){var a=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);r&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),a.push.apply(a,o)}return a}function _objectSpread2$1(n){for(var r=1;r<arguments.length;r++){var a=arguments[r]!=null?arguments[r]:{};r%2?ownKeys$1(Object(a),!0).forEach(function(o){_defineProperty$1(n,o,a[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):ownKeys$1(Object(a)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(a,o))})}return n}function _typeof$1(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof$1=function(r){return typeof r}:_typeof$1=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof$1(n)}function _defineProperty$1(n,r,a){return r in n?Object.defineProperty(n,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[r]=a,n}function _extends$1(){return _extends$1=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},_extends$1.apply(this,arguments)}function _objectWithoutPropertiesLoose$1(n,r){if(n==null)return{};var a={},o=Object.keys(n),s,l;for(l=0;l<o.length;l++)s=o[l],!(r.indexOf(s)>=0)&&(a[s]=n[s]);return a}function _objectWithoutProperties$1(n,r){if(n==null)return{};var a=_objectWithoutPropertiesLoose$1(n,r),o,s;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(s=0;s<l.length;s++)o=l[s],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(a[o]=n[o])}return a}var version$1="1.15.6";function userAgent$1(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var IE11OrLess$1=userAgent$1(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge$1=userAgent$1(/Edge/i),FireFox$1=userAgent$1(/firefox/i),Safari$1=userAgent$1(/safari/i)&&!userAgent$1(/chrome/i)&&!userAgent$1(/android/i),IOS$1=userAgent$1(/iP(ad|od|hone)/i),ChromeForAndroid$1=userAgent$1(/chrome/i)&&userAgent$1(/android/i),captureMode$1={capture:!1,passive:!1};function on$1(n,r,a){n.addEventListener(r,a,!IE11OrLess$1&&captureMode$1)}function off$1(n,r,a){n.removeEventListener(r,a,!IE11OrLess$1&&captureMode$1)}function matches$1(n,r){if(r){if(r[0]===">"&&(r=r.substring(1)),n)try{if(n.matches)return n.matches(r);if(n.msMatchesSelector)return n.msMatchesSelector(r);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(r)}catch(a){return!1}return!1}}function getParentOrHost$1(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function closest$1(n,r,a,o){if(n){a=a||document;do{if(r!=null&&(r[0]===">"?n.parentNode===a&&matches$1(n,r):matches$1(n,r))||o&&n===a)return n;if(n===a)break}while(n=getParentOrHost$1(n))}return null}var R_SPACE$1=/\s+/g;function toggleClass$1(n,r,a){if(n&&r)if(n.classList)n.classList[a?"add":"remove"](r);else{var o=(" "+n.className+" ").replace(R_SPACE$1," ").replace(" "+r+" "," ");n.className=(o+(a?" "+r:"")).replace(R_SPACE$1," ")}}function css$1(n,r,a){var o=n&&n.style;if(o){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(a=n.currentStyle),r===void 0?a:a[r];!(r in o)&&r.indexOf("webkit")===-1&&(r="-webkit-"+r),o[r]=a+(typeof a=="string"?"":"px")}}function matrix$1(n,r){var a="";if(typeof n=="string")a=n;else do{var o=css$1(n,"transform");o&&o!=="none"&&(a=o+" "+a)}while(!r&&(n=n.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(a)}function find$1(n,r,a){if(n){var o=n.getElementsByTagName(r),s=0,l=o.length;if(a)for(;s<l;s++)a(o[s],s);return o}return[]}function getWindowScrollingElement$1(){var n=document.scrollingElement;return n||document.documentElement}function getRect$1(n,r,a,o,s){if(!(!n.getBoundingClientRect&&n!==window)){var l,u,c,d,f,p,v;if(n!==window&&n.parentNode&&n!==getWindowScrollingElement$1()?(l=n.getBoundingClientRect(),u=l.top,c=l.left,d=l.bottom,f=l.right,p=l.height,v=l.width):(u=0,c=0,d=window.innerHeight,f=window.innerWidth,p=window.innerHeight,v=window.innerWidth),(r||a)&&n!==window&&(s=s||n.parentNode,!IE11OrLess$1))do if(s&&s.getBoundingClientRect&&(css$1(s,"transform")!=="none"||a&&css$1(s,"position")!=="static")){var g=s.getBoundingClientRect();u-=g.top+parseInt(css$1(s,"border-top-width")),c-=g.left+parseInt(css$1(s,"border-left-width")),d=u+l.height,f=c+l.width;break}while(s=s.parentNode);if(o&&n!==window){var y=matrix$1(s||n),_=y&&y.a,S=y&&y.d;y&&(u/=S,c/=_,v/=_,p/=S,d=u+p,f=c+v)}return{top:u,left:c,bottom:d,right:f,width:v,height:p}}}function isScrolledPast$1(n,r,a){for(var o=getParentAutoScrollElement$1(n,!0),s=getRect$1(n)[r];o;){var l=getRect$1(o)[a],u=void 0;if(u=s>=l,!u)return o;if(o===getWindowScrollingElement$1())break;o=getParentAutoScrollElement$1(o,!1)}return!1}function getChild$1(n,r,a,o){for(var s=0,l=0,u=n.children;l<u.length;){if(u[l].style.display!=="none"&&u[l]!==Sortable$1.ghost&&(o||u[l]!==Sortable$1.dragged)&&closest$1(u[l],a.draggable,n,!1)){if(s===r)return u[l];s++}l++}return null}function lastChild$1(n,r){for(var a=n.lastElementChild;a&&(a===Sortable$1.ghost||css$1(a,"display")==="none"||r&&!matches$1(a,r));)a=a.previousElementSibling;return a||null}function index$1(n,r){var a=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==Sortable$1.clone&&(!r||matches$1(n,r))&&a++;return a}function getRelativeScrollOffset$1(n){var r=0,a=0,o=getWindowScrollingElement$1();if(n)do{var s=matrix$1(n),l=s.a,u=s.d;r+=n.scrollLeft*l,a+=n.scrollTop*u}while(n!==o&&(n=n.parentNode));return[r,a]}function indexOfObject$1(n,r){for(var a in n)if(n.hasOwnProperty(a)){for(var o in r)if(r.hasOwnProperty(o)&&r[o]===n[a][o])return Number(a)}return-1}function getParentAutoScrollElement$1(n,r){if(!n||!n.getBoundingClientRect)return getWindowScrollingElement$1();var a=n,o=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var s=css$1(a);if(a.clientWidth<a.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||a.clientHeight<a.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!a.getBoundingClientRect||a===document.body)return getWindowScrollingElement$1();if(o||r)return a;o=!0}}while(a=a.parentNode);return getWindowScrollingElement$1()}function extend$1(n,r){if(n&&r)for(var a in r)r.hasOwnProperty(a)&&(n[a]=r[a]);return n}function isRectEqual$1(n,r){return Math.round(n.top)===Math.round(r.top)&&Math.round(n.left)===Math.round(r.left)&&Math.round(n.height)===Math.round(r.height)&&Math.round(n.width)===Math.round(r.width)}var _throttleTimeout$1;function throttle$1(n,r){return function(){if(!_throttleTimeout$1){var a=arguments,o=this;a.length===1?n.call(o,a[0]):n.apply(o,a),_throttleTimeout$1=setTimeout(function(){_throttleTimeout$1=void 0},r)}}}function cancelThrottle$1(){clearTimeout(_throttleTimeout$1),_throttleTimeout$1=void 0}function scrollBy$1(n,r,a){n.scrollLeft+=r,n.scrollTop+=a}function clone$1(n){var r=window.Polymer,a=window.jQuery||window.Zepto;return r&&r.dom?r.dom(n).cloneNode(!0):a?a(n).clone(!0)[0]:n.cloneNode(!0)}function getChildContainingRectFromElement$1(n,r,a){var o={};return Array.from(n.children).forEach(function(s){var l,u,c,d;if(!(!closest$1(s,r.draggable,n,!1)||s.animated||s===a)){var f=getRect$1(s);o.left=Math.min((l=o.left)!==null&&l!==void 0?l:1/0,f.left),o.top=Math.min((u=o.top)!==null&&u!==void 0?u:1/0,f.top),o.right=Math.max((c=o.right)!==null&&c!==void 0?c:-1/0,f.right),o.bottom=Math.max((d=o.bottom)!==null&&d!==void 0?d:-1/0,f.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var expando$1="Sortable"+new Date().getTime();function AnimationStateManager$1(){var n=[],r;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(s){if(!(css$1(s,"display")==="none"||s===Sortable$1.ghost)){n.push({target:s,rect:getRect$1(s)});var l=_objectSpread2$1({},n[n.length-1].rect);if(s.thisAnimationDuration){var u=matrix$1(s,!0);u&&(l.top-=u.f,l.left-=u.e)}s.fromRect=l}})}},addAnimationState:function(o){n.push(o)},removeAnimationState:function(o){n.splice(indexOfObject$1(n,{target:o}),1)},animateAll:function(o){var s=this;if(!this.options.animation){clearTimeout(r),typeof o=="function"&&o();return}var l=!1,u=0;n.forEach(function(c){var d=0,f=c.target,p=f.fromRect,v=getRect$1(f),g=f.prevFromRect,y=f.prevToRect,_=c.rect,S=matrix$1(f,!0);S&&(v.top-=S.f,v.left-=S.e),f.toRect=v,f.thisAnimationDuration&&isRectEqual$1(g,v)&&!isRectEqual$1(p,v)&&(_.top-v.top)/(_.left-v.left)===(p.top-v.top)/(p.left-v.left)&&(d=calculateRealTime$1(_,g,y,s.options)),isRectEqual$1(v,p)||(f.prevFromRect=p,f.prevToRect=v,d||(d=s.options.animation),s.animate(f,_,v,d)),d&&(l=!0,u=Math.max(u,d),clearTimeout(f.animationResetTimer),f.animationResetTimer=setTimeout(function(){f.animationTime=0,f.prevFromRect=null,f.fromRect=null,f.prevToRect=null,f.thisAnimationDuration=null},d),f.thisAnimationDuration=d)}),clearTimeout(r),l?r=setTimeout(function(){typeof o=="function"&&o()},u):typeof o=="function"&&o(),n=[]},animate:function(o,s,l,u){if(u){css$1(o,"transition",""),css$1(o,"transform","");var c=matrix$1(this.el),d=c&&c.a,f=c&&c.d,p=(s.left-l.left)/(d||1),v=(s.top-l.top)/(f||1);o.animatingX=!!p,o.animatingY=!!v,css$1(o,"transform","translate3d("+p+"px,"+v+"px,0)"),this.forRepaintDummy=repaint$1(o),css$1(o,"transition","transform "+u+"ms"+(this.options.easing?" "+this.options.easing:"")),css$1(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){css$1(o,"transition",""),css$1(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},u)}}}}function repaint$1(n){return n.offsetWidth}function calculateRealTime$1(n,r,a,o){return Math.sqrt(Math.pow(r.top-n.top,2)+Math.pow(r.left-n.left,2))/Math.sqrt(Math.pow(r.top-a.top,2)+Math.pow(r.left-a.left,2))*o.animation}var plugins$1=[],defaults$1={initializeByDefault:!0},PluginManager$1={mount:function n(r){for(var a in defaults$1)defaults$1.hasOwnProperty(a)&&!(a in r)&&(r[a]=defaults$1[a]);plugins$1.forEach(function(o){if(o.pluginName===r.pluginName)throw"Sortable: Cannot mount plugin ".concat(r.pluginName," more than once")}),plugins$1.push(r)},pluginEvent:function n(r,a,o){var s=this;this.eventCanceled=!1,o.cancel=function(){s.eventCanceled=!0};var l=r+"Global";plugins$1.forEach(function(u){a[u.pluginName]&&(a[u.pluginName][l]&&a[u.pluginName][l](_objectSpread2$1({sortable:a},o)),a.options[u.pluginName]&&a[u.pluginName][r]&&a[u.pluginName][r](_objectSpread2$1({sortable:a},o)))})},initializePlugins:function n(r,a,o,s){plugins$1.forEach(function(c){var d=c.pluginName;if(!(!r.options[d]&&!c.initializeByDefault)){var f=new c(r,a,r.options);f.sortable=r,f.options=r.options,r[d]=f,_extends$1(o,f.defaults)}});for(var l in r.options)if(r.options.hasOwnProperty(l)){var u=this.modifyOption(r,l,r.options[l]);typeof u<"u"&&(r.options[l]=u)}},getEventProperties:function n(r,a){var o={};return plugins$1.forEach(function(s){typeof s.eventProperties=="function"&&_extends$1(o,s.eventProperties.call(a[s.pluginName],r))}),o},modifyOption:function n(r,a,o){var s;return plugins$1.forEach(function(l){r[l.pluginName]&&l.optionListeners&&typeof l.optionListeners[a]=="function"&&(s=l.optionListeners[a].call(r[l.pluginName],o))}),s}};function dispatchEvent$1(n){var r=n.sortable,a=n.rootEl,o=n.name,s=n.targetEl,l=n.cloneEl,u=n.toEl,c=n.fromEl,d=n.oldIndex,f=n.newIndex,p=n.oldDraggableIndex,v=n.newDraggableIndex,g=n.originalEvent,y=n.putSortable,_=n.extraEventProperties;if(r=r||a&&a[expando$1],!!r){var S,b=r.options,x="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!IE11OrLess$1&&!Edge$1?S=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(S=document.createEvent("Event"),S.initEvent(o,!0,!0)),S.to=u||a,S.from=c||a,S.item=s||a,S.clone=l,S.oldIndex=d,S.newIndex=f,S.oldDraggableIndex=p,S.newDraggableIndex=v,S.originalEvent=g,S.pullMode=y?y.lastPutMode:void 0;var A=_objectSpread2$1(_objectSpread2$1({},_),PluginManager$1.getEventProperties(o,r));for(var w in A)S[w]=A[w];a&&a.dispatchEvent(S),b[x]&&b[x].call(r,S)}}var _excluded$1=["evt"],pluginEvent$1=function n(r,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.evt,l=_objectWithoutProperties$1(o,_excluded$1);PluginManager$1.pluginEvent.bind(Sortable$1)(r,a,_objectSpread2$1({dragEl:dragEl$1,parentEl:parentEl$1,ghostEl:ghostEl$1,rootEl:rootEl$1,nextEl:nextEl$1,lastDownEl:lastDownEl$1,cloneEl:cloneEl$1,cloneHidden:cloneHidden$1,dragStarted:moved$1,putSortable:putSortable$1,activeSortable:Sortable$1.active,originalEvent:s,oldIndex:oldIndex$1,oldDraggableIndex:oldDraggableIndex$1,newIndex:newIndex$1,newDraggableIndex:newDraggableIndex$1,hideGhostForTarget:_hideGhostForTarget$1,unhideGhostForTarget:_unhideGhostForTarget$1,cloneNowHidden:function(){cloneHidden$1=!0},cloneNowShown:function(){cloneHidden$1=!1},dispatchSortableEvent:function(c){_dispatchEvent$1({sortable:a,name:c,originalEvent:s})}},l))};function _dispatchEvent$1(n){dispatchEvent$1(_objectSpread2$1({putSortable:putSortable$1,cloneEl:cloneEl$1,targetEl:dragEl$1,rootEl:rootEl$1,oldIndex:oldIndex$1,oldDraggableIndex:oldDraggableIndex$1,newIndex:newIndex$1,newDraggableIndex:newDraggableIndex$1},n))}var dragEl$1,parentEl$1,ghostEl$1,rootEl$1,nextEl$1,lastDownEl$1,cloneEl$1,cloneHidden$1,oldIndex$1,newIndex$1,oldDraggableIndex$1,newDraggableIndex$1,activeGroup$1,putSortable$1,awaitingDragStarted$1=!1,ignoreNextClick$1=!1,sortables$1=[],tapEvt$1,touchEvt$2,lastDx$1,lastDy$1,tapDistanceLeft$1,tapDistanceTop$1,moved$1,lastTarget$1,lastDirection$1,pastFirstInvertThresh$1=!1,isCircumstantialInvert$1=!1,targetMoveDistance$1,ghostRelativeParent$1,ghostRelativeParentInitialScroll$1=[],_silent$1=!1,savedInputChecked$1=[],documentExists$1=typeof document<"u",PositionGhostAbsolutely$1=IOS$1,CSSFloatProperty$1=Edge$1||IE11OrLess$1?"cssFloat":"float",supportDraggable$1=documentExists$1&&!ChromeForAndroid$1&&!IOS$1&&"draggable"in document.createElement("div"),supportCssPointerEvents$1=function(){if(documentExists$1){if(IE11OrLess$1)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),_detectDirection$1=function n(r,a){var o=css$1(r),s=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),l=getChild$1(r,0,a),u=getChild$1(r,1,a),c=l&&css$1(l),d=u&&css$1(u),f=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+getRect$1(l).width,p=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+getRect$1(u).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&c.float&&c.float!=="none"){var v=c.float==="left"?"left":"right";return u&&(d.clear==="both"||d.clear===v)?"vertical":"horizontal"}return l&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||f>=s&&o[CSSFloatProperty$1]==="none"||u&&o[CSSFloatProperty$1]==="none"&&f+p>s)?"vertical":"horizontal"},_dragElInRowColumn$1=function n(r,a,o){var s=o?r.left:r.top,l=o?r.right:r.bottom,u=o?r.width:r.height,c=o?a.left:a.top,d=o?a.right:a.bottom,f=o?a.width:a.height;return s===c||l===d||s+u/2===c+f/2},_detectNearestEmptySortable$1=function n(r,a){var o;return sortables$1.some(function(s){var l=s[expando$1].options.emptyInsertThreshold;if(!(!l||lastChild$1(s))){var u=getRect$1(s),c=r>=u.left-l&&r<=u.right+l,d=a>=u.top-l&&a<=u.bottom+l;if(c&&d)return o=s}}),o},_prepareGroup$1=function n(r){function a(l,u){return function(c,d,f,p){var v=c.options.group.name&&d.options.group.name&&c.options.group.name===d.options.group.name;if(l==null&&(u||v))return!0;if(l==null||l===!1)return!1;if(u&&l==="clone")return l;if(typeof l=="function")return a(l(c,d,f,p),u)(c,d,f,p);var g=(u?c:d).options.group.name;return l===!0||typeof l=="string"&&l===g||l.join&&l.indexOf(g)>-1}}var o={},s=r.group;(!s||_typeof$1(s)!="object")&&(s={name:s}),o.name=s.name,o.checkPull=a(s.pull,!0),o.checkPut=a(s.put),o.revertClone=s.revertClone,r.group=o},_hideGhostForTarget$1=function n(){!supportCssPointerEvents$1&&ghostEl$1&&css$1(ghostEl$1,"display","none")},_unhideGhostForTarget$1=function n(){!supportCssPointerEvents$1&&ghostEl$1&&css$1(ghostEl$1,"display","")};documentExists$1&&!ChromeForAndroid$1&&document.addEventListener("click",function(n){if(ignoreNextClick$1)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),ignoreNextClick$1=!1,!1},!0);var nearestEmptyInsertDetectEvent$1=function n(r){if(dragEl$1){r=r.touches?r.touches[0]:r;var a=_detectNearestEmptySortable$1(r.clientX,r.clientY);if(a){var o={};for(var s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);o.target=o.rootEl=a,o.preventDefault=void 0,o.stopPropagation=void 0,a[expando$1]._onDragOver(o)}}},_checkOutsideTargetEl$1=function n(r){dragEl$1&&dragEl$1.parentNode[expando$1]._isOutsideThisEl(r.target)};function Sortable$1(n,r){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=r=_extends$1({},r),n[expando$1]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection$1(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(u,c){u.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable$1.supportPointer!==!1&&"PointerEvent"in window&&(!Safari$1||IOS$1),emptyInsertThreshold:5};PluginManager$1.initializePlugins(this,n,a);for(var o in a)!(o in r)&&(r[o]=a[o]);_prepareGroup$1(r);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=r.forceFallback?!1:supportDraggable$1,this.nativeDraggable&&(this.options.touchStartThreshold=1),r.supportPointer?on$1(n,"pointerdown",this._onTapStart):(on$1(n,"mousedown",this._onTapStart),on$1(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(on$1(n,"dragover",this),on$1(n,"dragenter",this)),sortables$1.push(this.el),r.store&&r.store.get&&this.sort(r.store.get(this)||[]),_extends$1(this,AnimationStateManager$1())}Sortable$1.prototype={constructor:Sortable$1,_isOutsideThisEl:function n(r){!this.el.contains(r)&&r!==this.el&&(lastTarget$1=null)},_getDirection:function n(r,a){return typeof this.options.direction=="function"?this.options.direction.call(this,r,a,dragEl$1):this.options.direction},_onTapStart:function n(r){if(r.cancelable){var a=this,o=this.el,s=this.options,l=s.preventOnFilter,u=r.type,c=r.touches&&r.touches[0]||r.pointerType&&r.pointerType==="touch"&&r,d=(c||r).target,f=r.target.shadowRoot&&(r.path&&r.path[0]||r.composedPath&&r.composedPath()[0])||d,p=s.filter;if(_saveInputCheckedState$1(o),!dragEl$1&&!(/mousedown|pointerdown/.test(u)&&r.button!==0||s.disabled)&&!f.isContentEditable&&!(!this.nativeDraggable&&Safari$1&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=closest$1(d,s.draggable,o,!1),!(d&&d.animated)&&lastDownEl$1!==d)){if(oldIndex$1=index$1(d),oldDraggableIndex$1=index$1(d,s.draggable),typeof p=="function"){if(p.call(this,r,d,this)){_dispatchEvent$1({sortable:a,rootEl:f,name:"filter",targetEl:d,toEl:o,fromEl:o}),pluginEvent$1("filter",a,{evt:r}),l&&r.preventDefault();return}}else if(p&&(p=p.split(",").some(function(v){if(v=closest$1(f,v.trim(),o,!1),v)return _dispatchEvent$1({sortable:a,rootEl:v,name:"filter",targetEl:d,fromEl:o,toEl:o}),pluginEvent$1("filter",a,{evt:r}),!0}),p)){l&&r.preventDefault();return}s.handle&&!closest$1(f,s.handle,o,!1)||this._prepareDragStart(r,c,d)}}},_prepareDragStart:function n(r,a,o){var s=this,l=s.el,u=s.options,c=l.ownerDocument,d;if(o&&!dragEl$1&&o.parentNode===l){var f=getRect$1(o);if(rootEl$1=l,dragEl$1=o,parentEl$1=dragEl$1.parentNode,nextEl$1=dragEl$1.nextSibling,lastDownEl$1=o,activeGroup$1=u.group,Sortable$1.dragged=dragEl$1,tapEvt$1={target:dragEl$1,clientX:(a||r).clientX,clientY:(a||r).clientY},tapDistanceLeft$1=tapEvt$1.clientX-f.left,tapDistanceTop$1=tapEvt$1.clientY-f.top,this._lastX=(a||r).clientX,this._lastY=(a||r).clientY,dragEl$1.style["will-change"]="all",d=function(){if(pluginEvent$1("delayEnded",s,{evt:r}),Sortable$1.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents(),!FireFox$1&&s.nativeDraggable&&(dragEl$1.draggable=!0),s._triggerDragStart(r,a),_dispatchEvent$1({sortable:s,name:"choose",originalEvent:r}),toggleClass$1(dragEl$1,u.chosenClass,!0)},u.ignore.split(",").forEach(function(p){find$1(dragEl$1,p.trim(),_disableDraggable$1)}),on$1(c,"dragover",nearestEmptyInsertDetectEvent$1),on$1(c,"mousemove",nearestEmptyInsertDetectEvent$1),on$1(c,"touchmove",nearestEmptyInsertDetectEvent$1),u.supportPointer?(on$1(c,"pointerup",s._onDrop),!this.nativeDraggable&&on$1(c,"pointercancel",s._onDrop)):(on$1(c,"mouseup",s._onDrop),on$1(c,"touchend",s._onDrop),on$1(c,"touchcancel",s._onDrop)),FireFox$1&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl$1.draggable=!0),pluginEvent$1("delayStart",this,{evt:r}),u.delay&&(!u.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Edge$1||IE11OrLess$1))){if(Sortable$1.eventCanceled){this._onDrop();return}u.supportPointer?(on$1(c,"pointerup",s._disableDelayedDrag),on$1(c,"pointercancel",s._disableDelayedDrag)):(on$1(c,"mouseup",s._disableDelayedDrag),on$1(c,"touchend",s._disableDelayedDrag),on$1(c,"touchcancel",s._disableDelayedDrag)),on$1(c,"mousemove",s._delayedDragTouchMoveHandler),on$1(c,"touchmove",s._delayedDragTouchMoveHandler),u.supportPointer&&on$1(c,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(d,u.delay)}else d()}},_delayedDragTouchMoveHandler:function n(r){var a=r.touches?r.touches[0]:r;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function n(){dragEl$1&&_disableDraggable$1(dragEl$1),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function n(){var r=this.el.ownerDocument;off$1(r,"mouseup",this._disableDelayedDrag),off$1(r,"touchend",this._disableDelayedDrag),off$1(r,"touchcancel",this._disableDelayedDrag),off$1(r,"pointerup",this._disableDelayedDrag),off$1(r,"pointercancel",this._disableDelayedDrag),off$1(r,"mousemove",this._delayedDragTouchMoveHandler),off$1(r,"touchmove",this._delayedDragTouchMoveHandler),off$1(r,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function n(r,a){a=a||r.pointerType=="touch"&&r,!this.nativeDraggable||a?this.options.supportPointer?on$1(document,"pointermove",this._onTouchMove):a?on$1(document,"touchmove",this._onTouchMove):on$1(document,"mousemove",this._onTouchMove):(on$1(dragEl$1,"dragend",this),on$1(rootEl$1,"dragstart",this._onDragStart));try{document.selection?_nextTick$1(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function n(r,a){if(awaitingDragStarted$1=!1,rootEl$1&&dragEl$1){pluginEvent$1("dragStarted",this,{evt:a}),this.nativeDraggable&&on$1(document,"dragover",_checkOutsideTargetEl$1);var o=this.options;!r&&toggleClass$1(dragEl$1,o.dragClass,!1),toggleClass$1(dragEl$1,o.ghostClass,!0),Sortable$1.active=this,r&&this._appendGhost(),_dispatchEvent$1({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function n(){if(touchEvt$2){this._lastX=touchEvt$2.clientX,this._lastY=touchEvt$2.clientY,_hideGhostForTarget$1();for(var r=document.elementFromPoint(touchEvt$2.clientX,touchEvt$2.clientY),a=r;r&&r.shadowRoot&&(r=r.shadowRoot.elementFromPoint(touchEvt$2.clientX,touchEvt$2.clientY),r!==a);)a=r;if(dragEl$1.parentNode[expando$1]._isOutsideThisEl(r),a)do{if(a[expando$1]){var o=void 0;if(o=a[expando$1]._onDragOver({clientX:touchEvt$2.clientX,clientY:touchEvt$2.clientY,target:r,rootEl:a}),o&&!this.options.dragoverBubble)break}r=a}while(a=getParentOrHost$1(a));_unhideGhostForTarget$1()}},_onTouchMove:function n(r){if(tapEvt$1){var a=this.options,o=a.fallbackTolerance,s=a.fallbackOffset,l=r.touches?r.touches[0]:r,u=ghostEl$1&&matrix$1(ghostEl$1,!0),c=ghostEl$1&&u&&u.a,d=ghostEl$1&&u&&u.d,f=PositionGhostAbsolutely$1&&ghostRelativeParent$1&&getRelativeScrollOffset$1(ghostRelativeParent$1),p=(l.clientX-tapEvt$1.clientX+s.x)/(c||1)+(f?f[0]-ghostRelativeParentInitialScroll$1[0]:0)/(c||1),v=(l.clientY-tapEvt$1.clientY+s.y)/(d||1)+(f?f[1]-ghostRelativeParentInitialScroll$1[1]:0)/(d||1);if(!Sortable$1.active&&!awaitingDragStarted$1){if(o&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))<o)return;this._onDragStart(r,!0)}if(ghostEl$1){u?(u.e+=p-(lastDx$1||0),u.f+=v-(lastDy$1||0)):u={a:1,b:0,c:0,d:1,e:p,f:v};var g="matrix(".concat(u.a,",").concat(u.b,",").concat(u.c,",").concat(u.d,",").concat(u.e,",").concat(u.f,")");css$1(ghostEl$1,"webkitTransform",g),css$1(ghostEl$1,"mozTransform",g),css$1(ghostEl$1,"msTransform",g),css$1(ghostEl$1,"transform",g),lastDx$1=p,lastDy$1=v,touchEvt$2=l}r.cancelable&&r.preventDefault()}},_appendGhost:function n(){if(!ghostEl$1){var r=this.options.fallbackOnBody?document.body:rootEl$1,a=getRect$1(dragEl$1,!0,PositionGhostAbsolutely$1,!0,r),o=this.options;if(PositionGhostAbsolutely$1){for(ghostRelativeParent$1=r;css$1(ghostRelativeParent$1,"position")==="static"&&css$1(ghostRelativeParent$1,"transform")==="none"&&ghostRelativeParent$1!==document;)ghostRelativeParent$1=ghostRelativeParent$1.parentNode;ghostRelativeParent$1!==document.body&&ghostRelativeParent$1!==document.documentElement?(ghostRelativeParent$1===document&&(ghostRelativeParent$1=getWindowScrollingElement$1()),a.top+=ghostRelativeParent$1.scrollTop,a.left+=ghostRelativeParent$1.scrollLeft):ghostRelativeParent$1=getWindowScrollingElement$1(),ghostRelativeParentInitialScroll$1=getRelativeScrollOffset$1(ghostRelativeParent$1)}ghostEl$1=dragEl$1.cloneNode(!0),toggleClass$1(ghostEl$1,o.ghostClass,!1),toggleClass$1(ghostEl$1,o.fallbackClass,!0),toggleClass$1(ghostEl$1,o.dragClass,!0),css$1(ghostEl$1,"transition",""),css$1(ghostEl$1,"transform",""),css$1(ghostEl$1,"box-sizing","border-box"),css$1(ghostEl$1,"margin",0),css$1(ghostEl$1,"top",a.top),css$1(ghostEl$1,"left",a.left),css$1(ghostEl$1,"width",a.width),css$1(ghostEl$1,"height",a.height),css$1(ghostEl$1,"opacity","0.8"),css$1(ghostEl$1,"position",PositionGhostAbsolutely$1?"absolute":"fixed"),css$1(ghostEl$1,"zIndex","100000"),css$1(ghostEl$1,"pointerEvents","none"),Sortable$1.ghost=ghostEl$1,r.appendChild(ghostEl$1),css$1(ghostEl$1,"transform-origin",tapDistanceLeft$1/parseInt(ghostEl$1.style.width)*100+"% "+tapDistanceTop$1/parseInt(ghostEl$1.style.height)*100+"%")}},_onDragStart:function n(r,a){var o=this,s=r.dataTransfer,l=o.options;if(pluginEvent$1("dragStart",this,{evt:r}),Sortable$1.eventCanceled){this._onDrop();return}pluginEvent$1("setupClone",this),Sortable$1.eventCanceled||(cloneEl$1=clone$1(dragEl$1),cloneEl$1.removeAttribute("id"),cloneEl$1.draggable=!1,cloneEl$1.style["will-change"]="",this._hideClone(),toggleClass$1(cloneEl$1,this.options.chosenClass,!1),Sortable$1.clone=cloneEl$1),o.cloneId=_nextTick$1(function(){pluginEvent$1("clone",o),!Sortable$1.eventCanceled&&(o.options.removeCloneOnHide||rootEl$1.insertBefore(cloneEl$1,dragEl$1),o._hideClone(),_dispatchEvent$1({sortable:o,name:"clone"}))}),!a&&toggleClass$1(dragEl$1,l.dragClass,!0),a?(ignoreNextClick$1=!0,o._loopId=setInterval(o._emulateDragOver,50)):(off$1(document,"mouseup",o._onDrop),off$1(document,"touchend",o._onDrop),off$1(document,"touchcancel",o._onDrop),s&&(s.effectAllowed="move",l.setData&&l.setData.call(o,s,dragEl$1)),on$1(document,"drop",o),css$1(dragEl$1,"transform","translateZ(0)")),awaitingDragStarted$1=!0,o._dragStartId=_nextTick$1(o._dragStarted.bind(o,a,r)),on$1(document,"selectstart",o),moved$1=!0,window.getSelection().removeAllRanges(),Safari$1&&css$1(document.body,"user-select","none")},_onDragOver:function n(r){var a=this.el,o=r.target,s,l,u,c=this.options,d=c.group,f=Sortable$1.active,p=activeGroup$1===d,v=c.sort,g=putSortable$1||f,y,_=this,S=!1;if(_silent$1)return;function b(H,W){pluginEvent$1(H,_,_objectSpread2$1({evt:r,isOwner:p,axis:y?"vertical":"horizontal",revert:u,dragRect:s,targetRect:l,canSort:v,fromSortable:g,target:o,completed:A,onMove:function(B,Y){return _onMove$1(rootEl$1,a,dragEl$1,s,B,getRect$1(B),r,Y)},changed:w},W))}function x(){b("dragOverAnimationCapture"),_.captureAnimationState(),_!==g&&g.captureAnimationState()}function A(H){return b("dragOverCompleted",{insertion:H}),H&&(p?f._hideClone():f._showClone(_),_!==g&&(toggleClass$1(dragEl$1,putSortable$1?putSortable$1.options.ghostClass:f.options.ghostClass,!1),toggleClass$1(dragEl$1,c.ghostClass,!0)),putSortable$1!==_&&_!==Sortable$1.active?putSortable$1=_:_===Sortable$1.active&&putSortable$1&&(putSortable$1=null),g===_&&(_._ignoreWhileAnimating=o),_.animateAll(function(){b("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(o===dragEl$1&&!dragEl$1.animated||o===a&&!o.animated)&&(lastTarget$1=null),!c.dragoverBubble&&!r.rootEl&&o!==document&&(dragEl$1.parentNode[expando$1]._isOutsideThisEl(r.target),!H&&nearestEmptyInsertDetectEvent$1(r)),!c.dragoverBubble&&r.stopPropagation&&r.stopPropagation(),S=!0}function w(){newIndex$1=index$1(dragEl$1),newDraggableIndex$1=index$1(dragEl$1,c.draggable),_dispatchEvent$1({sortable:_,name:"change",toEl:a,newIndex:newIndex$1,newDraggableIndex:newDraggableIndex$1,originalEvent:r})}if(r.preventDefault!==void 0&&r.cancelable&&r.preventDefault(),o=closest$1(o,c.draggable,a,!0),b("dragOver"),Sortable$1.eventCanceled)return S;if(dragEl$1.contains(r.target)||o.animated&&o.animatingX&&o.animatingY||_._ignoreWhileAnimating===o)return A(!1);if(ignoreNextClick$1=!1,f&&!c.disabled&&(p?v||(u=parentEl$1!==rootEl$1):putSortable$1===this||(this.lastPutMode=activeGroup$1.checkPull(this,f,dragEl$1,r))&&d.checkPut(this,f,dragEl$1,r))){if(y=this._getDirection(r,o)==="vertical",s=getRect$1(dragEl$1),b("dragOverValid"),Sortable$1.eventCanceled)return S;if(u)return parentEl$1=rootEl$1,x(),this._hideClone(),b("revert"),Sortable$1.eventCanceled||(nextEl$1?rootEl$1.insertBefore(dragEl$1,nextEl$1):rootEl$1.appendChild(dragEl$1)),A(!0);var E=lastChild$1(a,c.draggable);if(!E||_ghostIsLast$1(r,y,this)&&!E.animated){if(E===dragEl$1)return A(!1);if(E&&a===r.target&&(o=E),o&&(l=getRect$1(o)),_onMove$1(rootEl$1,a,dragEl$1,s,o,l,r,!!o)!==!1)return x(),E&&E.nextSibling?a.insertBefore(dragEl$1,E.nextSibling):a.appendChild(dragEl$1),parentEl$1=a,w(),A(!0)}else if(E&&_ghostIsFirst$1(r,y,this)){var D=getChild$1(a,0,c,!0);if(D===dragEl$1)return A(!1);if(o=D,l=getRect$1(o),_onMove$1(rootEl$1,a,dragEl$1,s,o,l,r,!1)!==!1)return x(),a.insertBefore(dragEl$1,D),parentEl$1=a,w(),A(!0)}else if(o.parentNode===a){l=getRect$1(o);var C=0,$,P=dragEl$1.parentNode!==a,M=!_dragElInRowColumn$1(dragEl$1.animated&&dragEl$1.toRect||s,o.animated&&o.toRect||l,y),I=y?"top":"left",L=isScrolledPast$1(o,"top","top")||isScrolledPast$1(dragEl$1,"top","top"),O=L?L.scrollTop:void 0;lastTarget$1!==o&&($=l[I],pastFirstInvertThresh$1=!1,isCircumstantialInvert$1=!M&&c.invertSwap||P),C=_getSwapDirection$1(r,o,l,y,M?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,isCircumstantialInvert$1,lastTarget$1===o);var R;if(C!==0){var N=index$1(dragEl$1);do N-=C,R=parentEl$1.children[N];while(R&&(css$1(R,"display")==="none"||R===ghostEl$1))}if(C===0||R===o)return A(!1);lastTarget$1=o,lastDirection$1=C;var V=o.nextElementSibling,F=!1;F=C===1;var U=_onMove$1(rootEl$1,a,dragEl$1,s,o,l,r,F);if(U!==!1)return(U===1||U===-1)&&(F=U===1),_silent$1=!0,setTimeout(_unsilent$1,30),x(),F&&!V?a.appendChild(dragEl$1):o.parentNode.insertBefore(dragEl$1,F?V:o),L&&scrollBy$1(L,0,O-L.scrollTop),parentEl$1=dragEl$1.parentNode,$!==void 0&&!isCircumstantialInvert$1&&(targetMoveDistance$1=Math.abs($-getRect$1(o)[I])),w(),A(!0)}if(a.contains(dragEl$1))return A(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function n(){off$1(document,"mousemove",this._onTouchMove),off$1(document,"touchmove",this._onTouchMove),off$1(document,"pointermove",this._onTouchMove),off$1(document,"dragover",nearestEmptyInsertDetectEvent$1),off$1(document,"mousemove",nearestEmptyInsertDetectEvent$1),off$1(document,"touchmove",nearestEmptyInsertDetectEvent$1)},_offUpEvents:function n(){var r=this.el.ownerDocument;off$1(r,"mouseup",this._onDrop),off$1(r,"touchend",this._onDrop),off$1(r,"pointerup",this._onDrop),off$1(r,"pointercancel",this._onDrop),off$1(r,"touchcancel",this._onDrop),off$1(document,"selectstart",this)},_onDrop:function n(r){var a=this.el,o=this.options;if(newIndex$1=index$1(dragEl$1),newDraggableIndex$1=index$1(dragEl$1,o.draggable),pluginEvent$1("drop",this,{evt:r}),parentEl$1=dragEl$1&&dragEl$1.parentNode,newIndex$1=index$1(dragEl$1),newDraggableIndex$1=index$1(dragEl$1,o.draggable),Sortable$1.eventCanceled){this._nulling();return}awaitingDragStarted$1=!1,isCircumstantialInvert$1=!1,pastFirstInvertThresh$1=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick$1(this.cloneId),_cancelNextTick$1(this._dragStartId),this.nativeDraggable&&(off$1(document,"drop",this),off$1(a,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari$1&&css$1(document.body,"user-select",""),css$1(dragEl$1,"transform",""),r&&(moved$1&&(r.cancelable&&r.preventDefault(),!o.dropBubble&&r.stopPropagation()),ghostEl$1&&ghostEl$1.parentNode&&ghostEl$1.parentNode.removeChild(ghostEl$1),(rootEl$1===parentEl$1||putSortable$1&&putSortable$1.lastPutMode!=="clone")&&cloneEl$1&&cloneEl$1.parentNode&&cloneEl$1.parentNode.removeChild(cloneEl$1),dragEl$1&&(this.nativeDraggable&&off$1(dragEl$1,"dragend",this),_disableDraggable$1(dragEl$1),dragEl$1.style["will-change"]="",moved$1&&!awaitingDragStarted$1&&toggleClass$1(dragEl$1,putSortable$1?putSortable$1.options.ghostClass:this.options.ghostClass,!1),toggleClass$1(dragEl$1,this.options.chosenClass,!1),_dispatchEvent$1({sortable:this,name:"unchoose",toEl:parentEl$1,newIndex:null,newDraggableIndex:null,originalEvent:r}),rootEl$1!==parentEl$1?(newIndex$1>=0&&(_dispatchEvent$1({rootEl:parentEl$1,name:"add",toEl:parentEl$1,fromEl:rootEl$1,originalEvent:r}),_dispatchEvent$1({sortable:this,name:"remove",toEl:parentEl$1,originalEvent:r}),_dispatchEvent$1({rootEl:parentEl$1,name:"sort",toEl:parentEl$1,fromEl:rootEl$1,originalEvent:r}),_dispatchEvent$1({sortable:this,name:"sort",toEl:parentEl$1,originalEvent:r})),putSortable$1&&putSortable$1.save()):newIndex$1!==oldIndex$1&&newIndex$1>=0&&(_dispatchEvent$1({sortable:this,name:"update",toEl:parentEl$1,originalEvent:r}),_dispatchEvent$1({sortable:this,name:"sort",toEl:parentEl$1,originalEvent:r})),Sortable$1.active&&((newIndex$1==null||newIndex$1===-1)&&(newIndex$1=oldIndex$1,newDraggableIndex$1=oldDraggableIndex$1),_dispatchEvent$1({sortable:this,name:"end",toEl:parentEl$1,originalEvent:r}),this.save()))),this._nulling()},_nulling:function n(){pluginEvent$1("nulling",this),rootEl$1=dragEl$1=parentEl$1=ghostEl$1=nextEl$1=cloneEl$1=lastDownEl$1=cloneHidden$1=tapEvt$1=touchEvt$2=moved$1=newIndex$1=newDraggableIndex$1=oldIndex$1=oldDraggableIndex$1=lastTarget$1=lastDirection$1=putSortable$1=activeGroup$1=Sortable$1.dragged=Sortable$1.ghost=Sortable$1.clone=Sortable$1.active=null,savedInputChecked$1.forEach(function(r){r.checked=!0}),savedInputChecked$1.length=lastDx$1=lastDy$1=0},handleEvent:function n(r){switch(r.type){case"drop":case"dragend":this._onDrop(r);break;case"dragenter":case"dragover":dragEl$1&&(this._onDragOver(r),_globalDragOver$1(r));break;case"selectstart":r.preventDefault();break}},toArray:function n(){for(var r=[],a,o=this.el.children,s=0,l=o.length,u=this.options;s<l;s++)a=o[s],closest$1(a,u.draggable,this.el,!1)&&r.push(a.getAttribute(u.dataIdAttr)||_generateId$1(a));return r},sort:function n(r,a){var o={},s=this.el;this.toArray().forEach(function(l,u){var c=s.children[u];closest$1(c,this.options.draggable,s,!1)&&(o[l]=c)},this),a&&this.captureAnimationState(),r.forEach(function(l){o[l]&&(s.removeChild(o[l]),s.appendChild(o[l]))}),a&&this.animateAll()},save:function n(){var r=this.options.store;r&&r.set&&r.set(this)},closest:function n(r,a){return closest$1(r,a||this.options.draggable,this.el,!1)},option:function n(r,a){var o=this.options;if(a===void 0)return o[r];var s=PluginManager$1.modifyOption(this,r,a);typeof s<"u"?o[r]=s:o[r]=a,r==="group"&&_prepareGroup$1(o)},destroy:function n(){pluginEvent$1("destroy",this);var r=this.el;r[expando$1]=null,off$1(r,"mousedown",this._onTapStart),off$1(r,"touchstart",this._onTapStart),off$1(r,"pointerdown",this._onTapStart),this.nativeDraggable&&(off$1(r,"dragover",this),off$1(r,"dragenter",this)),Array.prototype.forEach.call(r.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sortables$1.splice(sortables$1.indexOf(this.el),1),this.el=r=null},_hideClone:function n(){if(!cloneHidden$1){if(pluginEvent$1("hideClone",this),Sortable$1.eventCanceled)return;css$1(cloneEl$1,"display","none"),this.options.removeCloneOnHide&&cloneEl$1.parentNode&&cloneEl$1.parentNode.removeChild(cloneEl$1),cloneHidden$1=!0}},_showClone:function n(r){if(r.lastPutMode!=="clone"){this._hideClone();return}if(cloneHidden$1){if(pluginEvent$1("showClone",this),Sortable$1.eventCanceled)return;dragEl$1.parentNode==rootEl$1&&!this.options.group.revertClone?rootEl$1.insertBefore(cloneEl$1,dragEl$1):nextEl$1?rootEl$1.insertBefore(cloneEl$1,nextEl$1):rootEl$1.appendChild(cloneEl$1),this.options.group.revertClone&&this.animate(dragEl$1,cloneEl$1),css$1(cloneEl$1,"display",""),cloneHidden$1=!1}}};function _globalDragOver$1(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function _onMove$1(n,r,a,o,s,l,u,c){var d,f=n[expando$1],p=f.options.onMove,v;return window.CustomEvent&&!IE11OrLess$1&&!Edge$1?d=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(d=document.createEvent("Event"),d.initEvent("move",!0,!0)),d.to=r,d.from=n,d.dragged=a,d.draggedRect=o,d.related=s||r,d.relatedRect=l||getRect$1(r),d.willInsertAfter=c,d.originalEvent=u,n.dispatchEvent(d),p&&(v=p.call(f,d,u)),v}function _disableDraggable$1(n){n.draggable=!1}function _unsilent$1(){_silent$1=!1}function _ghostIsFirst$1(n,r,a){var o=getRect$1(getChild$1(a.el,0,a.options,!0)),s=getChildContainingRectFromElement$1(a.el,a.options,ghostEl$1),l=10;return r?n.clientX<s.left-l||n.clientY<o.top&&n.clientX<o.right:n.clientY<s.top-l||n.clientY<o.bottom&&n.clientX<o.left}function _ghostIsLast$1(n,r,a){var o=getRect$1(lastChild$1(a.el,a.options.draggable)),s=getChildContainingRectFromElement$1(a.el,a.options,ghostEl$1),l=10;return r?n.clientX>s.right+l||n.clientY>o.bottom&&n.clientX>o.left:n.clientY>s.bottom+l||n.clientX>o.right&&n.clientY>o.top}function _getSwapDirection$1(n,r,a,o,s,l,u,c){var d=o?n.clientY:n.clientX,f=o?a.height:a.width,p=o?a.top:a.left,v=o?a.bottom:a.right,g=!1;if(!u){if(c&&targetMoveDistance$1<f*s){if(!pastFirstInvertThresh$1&&(lastDirection$1===1?d>p+f*l/2:d<v-f*l/2)&&(pastFirstInvertThresh$1=!0),pastFirstInvertThresh$1)g=!0;else if(lastDirection$1===1?d<p+targetMoveDistance$1:d>v-targetMoveDistance$1)return-lastDirection$1}else if(d>p+f*(1-s)/2&&d<v-f*(1-s)/2)return _getInsertDirection$1(r)}return g=g||u,g&&(d<p+f*l/2||d>v-f*l/2)?d>p+f/2?1:-1:0}function _getInsertDirection$1(n){return index$1(dragEl$1)<index$1(n)?1:-1}function _generateId$1(n){for(var r=n.tagName+n.className+n.src+n.href+n.textContent,a=r.length,o=0;a--;)o+=r.charCodeAt(a);return o.toString(36)}function _saveInputCheckedState$1(n){savedInputChecked$1.length=0;for(var r=n.getElementsByTagName("input"),a=r.length;a--;){var o=r[a];o.checked&&savedInputChecked$1.push(o)}}function _nextTick$1(n){return setTimeout(n,0)}function _cancelNextTick$1(n){return clearTimeout(n)}documentExists$1&&on$1(document,"touchmove",function(n){(Sortable$1.active||awaitingDragStarted$1)&&n.cancelable&&n.preventDefault()});Sortable$1.utils={on:on$1,off:off$1,css:css$1,find:find$1,is:function n(r,a){return!!closest$1(r,a,r,!1)},extend:extend$1,throttle:throttle$1,closest:closest$1,toggleClass:toggleClass$1,clone:clone$1,index:index$1,nextTick:_nextTick$1,cancelNextTick:_cancelNextTick$1,detectDirection:_detectDirection$1,getChild:getChild$1,expando:expando$1};Sortable$1.get=function(n){return n[expando$1]};Sortable$1.mount=function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];r[0].constructor===Array&&(r=r[0]),r.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(Sortable$1.utils=_objectSpread2$1(_objectSpread2$1({},Sortable$1.utils),o.utils)),PluginManager$1.mount(o)})};Sortable$1.create=function(n,r){return new Sortable$1(n,r)};Sortable$1.version=version$1;var autoScrolls$1=[],scrollEl$1,scrollRootEl$1,scrolling$1=!1,lastAutoScrollX$1,lastAutoScrollY$1,touchEvt$1$1,pointerElemChangedInterval$1;function AutoScrollPlugin$1(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this))}return n.prototype={dragStarted:function(a){var o=a.originalEvent;this.sortable.nativeDraggable?on$1(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on$1(document,"pointermove",this._handleFallbackAutoScroll):o.touches?on$1(document,"touchmove",this._handleFallbackAutoScroll):on$1(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(a){var o=a.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?off$1(document,"dragover",this._handleAutoScroll):(off$1(document,"pointermove",this._handleFallbackAutoScroll),off$1(document,"touchmove",this._handleFallbackAutoScroll),off$1(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval$1(),clearAutoScrolls$1(),cancelThrottle$1()},nulling:function(){touchEvt$1$1=scrollRootEl$1=scrollEl$1=scrolling$1=pointerElemChangedInterval$1=lastAutoScrollX$1=lastAutoScrollY$1=null,autoScrolls$1.length=0},_handleFallbackAutoScroll:function(a){this._handleAutoScroll(a,!0)},_handleAutoScroll:function(a,o){var s=this,l=(a.touches?a.touches[0]:a).clientX,u=(a.touches?a.touches[0]:a).clientY,c=document.elementFromPoint(l,u);if(touchEvt$1$1=a,o||this.options.forceAutoScrollFallback||Edge$1||IE11OrLess$1||Safari$1){autoScroll$1(a,this.options,c,o);var d=getParentAutoScrollElement$1(c,!0);scrolling$1&&(!pointerElemChangedInterval$1||l!==lastAutoScrollX$1||u!==lastAutoScrollY$1)&&(pointerElemChangedInterval$1&&clearPointerElemChangedInterval$1(),pointerElemChangedInterval$1=setInterval(function(){var f=getParentAutoScrollElement$1(document.elementFromPoint(l,u),!0);f!==d&&(d=f,clearAutoScrolls$1()),autoScroll$1(a,s.options,f,o)},10),lastAutoScrollX$1=l,lastAutoScrollY$1=u)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement$1(c,!0)===getWindowScrollingElement$1()){clearAutoScrolls$1();return}autoScroll$1(a,this.options,getParentAutoScrollElement$1(c,!1),!1)}}},_extends$1(n,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls$1(){autoScrolls$1.forEach(function(n){clearInterval(n.pid)}),autoScrolls$1=[]}function clearPointerElemChangedInterval$1(){clearInterval(pointerElemChangedInterval$1)}var autoScroll$1=throttle$1(function(n,r,a,o){if(r.scroll){var s=(n.touches?n.touches[0]:n).clientX,l=(n.touches?n.touches[0]:n).clientY,u=r.scrollSensitivity,c=r.scrollSpeed,d=getWindowScrollingElement$1(),f=!1,p;scrollRootEl$1!==a&&(scrollRootEl$1=a,clearAutoScrolls$1(),scrollEl$1=r.scroll,p=r.scrollFn,scrollEl$1===!0&&(scrollEl$1=getParentAutoScrollElement$1(a,!0)));var v=0,g=scrollEl$1;do{var y=g,_=getRect$1(y),S=_.top,b=_.bottom,x=_.left,A=_.right,w=_.width,E=_.height,D=void 0,C=void 0,$=y.scrollWidth,P=y.scrollHeight,M=css$1(y),I=y.scrollLeft,L=y.scrollTop;y===d?(D=w<$&&(M.overflowX==="auto"||M.overflowX==="scroll"||M.overflowX==="visible"),C=E<P&&(M.overflowY==="auto"||M.overflowY==="scroll"||M.overflowY==="visible")):(D=w<$&&(M.overflowX==="auto"||M.overflowX==="scroll"),C=E<P&&(M.overflowY==="auto"||M.overflowY==="scroll"));var O=D&&(Math.abs(A-s)<=u&&I+w<$)-(Math.abs(x-s)<=u&&!!I),R=C&&(Math.abs(b-l)<=u&&L+E<P)-(Math.abs(S-l)<=u&&!!L);if(!autoScrolls$1[v])for(var N=0;N<=v;N++)autoScrolls$1[N]||(autoScrolls$1[N]={});(autoScrolls$1[v].vx!=O||autoScrolls$1[v].vy!=R||autoScrolls$1[v].el!==y)&&(autoScrolls$1[v].el=y,autoScrolls$1[v].vx=O,autoScrolls$1[v].vy=R,clearInterval(autoScrolls$1[v].pid),(O!=0||R!=0)&&(f=!0,autoScrolls$1[v].pid=setInterval((function(){o&&this.layer===0&&Sortable$1.active._onTouchMove(touchEvt$1$1);var V=autoScrolls$1[this.layer].vy?autoScrolls$1[this.layer].vy*c:0,F=autoScrolls$1[this.layer].vx?autoScrolls$1[this.layer].vx*c:0;typeof p=="function"&&p.call(Sortable$1.dragged.parentNode[expando$1],F,V,n,touchEvt$1$1,autoScrolls$1[this.layer].el)!=="continue"||scrollBy$1(autoScrolls$1[this.layer].el,F,V)}).bind({layer:v}),24))),v++}while(r.bubbleScroll&&g!==d&&(g=getParentAutoScrollElement$1(g,!1)));scrolling$1=f}},30),drop$1=function n(r){var a=r.originalEvent,o=r.putSortable,s=r.dragEl,l=r.activeSortable,u=r.dispatchSortableEvent,c=r.hideGhostForTarget,d=r.unhideGhostForTarget;if(a){var f=o||l;c();var p=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,v=document.elementFromPoint(p.clientX,p.clientY);d(),f&&!f.el.contains(v)&&(u("spill"),this.onSpill({dragEl:s,putSortable:o}))}};function Revert$1(){}Revert$1.prototype={startIndex:null,dragStart:function n(r){var a=r.oldDraggableIndex;this.startIndex=a},onSpill:function n(r){var a=r.dragEl,o=r.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var s=getChild$1(this.sortable.el,this.startIndex,this.options);s?this.sortable.el.insertBefore(a,s):this.sortable.el.appendChild(a),this.sortable.animateAll(),o&&o.animateAll()},drop:drop$1};_extends$1(Revert$1,{pluginName:"revertOnSpill"});function Remove$1(){}Remove$1.prototype={onSpill:function n(r){var a=r.dragEl,o=r.putSortable,s=o||this.sortable;s.captureAnimationState(),a.parentNode&&a.parentNode.removeChild(a),s.animateAll()},drop:drop$1};_extends$1(Remove$1,{pluginName:"removeOnSpill"});Sortable$1.mount(new AutoScrollPlugin$1);Sortable$1.mount(Remove$1,Revert$1);function ownKeys(n,r){var a=Object.keys(n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(n);r&&(o=o.filter(function(s){return Object.getOwnPropertyDescriptor(n,s).enumerable})),a.push.apply(a,o)}return a}function _objectSpread2(n){for(var r=1;r<arguments.length;r++){var a=arguments[r]!=null?arguments[r]:{};r%2?ownKeys(Object(a),!0).forEach(function(o){_defineProperty(n,o,a[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(a)):ownKeys(Object(a)).forEach(function(o){Object.defineProperty(n,o,Object.getOwnPropertyDescriptor(a,o))})}return n}function _typeof(n){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_typeof=function(r){return typeof r}:_typeof=function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_typeof(n)}function _defineProperty(n,r,a){return r in n?Object.defineProperty(n,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[r]=a,n}function _extends(){return _extends=Object.assign||function(n){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},_extends.apply(this,arguments)}function _objectWithoutPropertiesLoose(n,r){if(n==null)return{};var a={},o=Object.keys(n),s,l;for(l=0;l<o.length;l++)s=o[l],!(r.indexOf(s)>=0)&&(a[s]=n[s]);return a}function _objectWithoutProperties(n,r){if(n==null)return{};var a=_objectWithoutPropertiesLoose(n,r),o,s;if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(n);for(s=0;s<l.length;s++)o=l[s],!(r.indexOf(o)>=0)&&Object.prototype.propertyIsEnumerable.call(n,o)&&(a[o]=n[o])}return a}var version="1.15.6";function userAgent(n){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(n)}var IE11OrLess=userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Edge=userAgent(/Edge/i),FireFox=userAgent(/firefox/i),Safari=userAgent(/safari/i)&&!userAgent(/chrome/i)&&!userAgent(/android/i),IOS=userAgent(/iP(ad|od|hone)/i),ChromeForAndroid=userAgent(/chrome/i)&&userAgent(/android/i),captureMode={capture:!1,passive:!1};function on(n,r,a){n.addEventListener(r,a,!IE11OrLess&&captureMode)}function off(n,r,a){n.removeEventListener(r,a,!IE11OrLess&&captureMode)}function matches(n,r){if(r){if(r[0]===">"&&(r=r.substring(1)),n)try{if(n.matches)return n.matches(r);if(n.msMatchesSelector)return n.msMatchesSelector(r);if(n.webkitMatchesSelector)return n.webkitMatchesSelector(r)}catch(a){return!1}return!1}}function getParentOrHost(n){return n.host&&n!==document&&n.host.nodeType?n.host:n.parentNode}function closest(n,r,a,o){if(n){a=a||document;do{if(r!=null&&(r[0]===">"?n.parentNode===a&&matches(n,r):matches(n,r))||o&&n===a)return n;if(n===a)break}while(n=getParentOrHost(n))}return null}var R_SPACE=/\s+/g;function toggleClass(n,r,a){if(n&&r)if(n.classList)n.classList[a?"add":"remove"](r);else{var o=(" "+n.className+" ").replace(R_SPACE," ").replace(" "+r+" "," ");n.className=(o+(a?" "+r:"")).replace(R_SPACE," ")}}function css(n,r,a){var o=n&&n.style;if(o){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(n,""):n.currentStyle&&(a=n.currentStyle),r===void 0?a:a[r];!(r in o)&&r.indexOf("webkit")===-1&&(r="-webkit-"+r),o[r]=a+(typeof a=="string"?"":"px")}}function matrix(n,r){var a="";if(typeof n=="string")a=n;else do{var o=css(n,"transform");o&&o!=="none"&&(a=o+" "+a)}while(!r&&(n=n.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(a)}function find(n,r,a){if(n){var o=n.getElementsByTagName(r),s=0,l=o.length;if(a)for(;s<l;s++)a(o[s],s);return o}return[]}function getWindowScrollingElement(){var n=document.scrollingElement;return n||document.documentElement}function getRect(n,r,a,o,s){if(!(!n.getBoundingClientRect&&n!==window)){var l,u,c,d,f,p,v;if(n!==window&&n.parentNode&&n!==getWindowScrollingElement()?(l=n.getBoundingClientRect(),u=l.top,c=l.left,d=l.bottom,f=l.right,p=l.height,v=l.width):(u=0,c=0,d=window.innerHeight,f=window.innerWidth,p=window.innerHeight,v=window.innerWidth),(r||a)&&n!==window&&(s=s||n.parentNode,!IE11OrLess))do if(s&&s.getBoundingClientRect&&(css(s,"transform")!=="none"||a&&css(s,"position")!=="static")){var g=s.getBoundingClientRect();u-=g.top+parseInt(css(s,"border-top-width")),c-=g.left+parseInt(css(s,"border-left-width")),d=u+l.height,f=c+l.width;break}while(s=s.parentNode);if(o&&n!==window){var y=matrix(s||n),_=y&&y.a,S=y&&y.d;y&&(u/=S,c/=_,v/=_,p/=S,d=u+p,f=c+v)}return{top:u,left:c,bottom:d,right:f,width:v,height:p}}}function isScrolledPast(n,r,a){for(var o=getParentAutoScrollElement(n,!0),s=getRect(n)[r];o;){var l=getRect(o)[a],u=void 0;if(u=s>=l,!u)return o;if(o===getWindowScrollingElement())break;o=getParentAutoScrollElement(o,!1)}return!1}function getChild(n,r,a,o){for(var s=0,l=0,u=n.children;l<u.length;){if(u[l].style.display!=="none"&&u[l]!==Sortable.ghost&&(o||u[l]!==Sortable.dragged)&&closest(u[l],a.draggable,n,!1)){if(s===r)return u[l];s++}l++}return null}function lastChild(n,r){for(var a=n.lastElementChild;a&&(a===Sortable.ghost||css(a,"display")==="none"||r&&!matches(a,r));)a=a.previousElementSibling;return a||null}function index(n,r){var a=0;if(!n||!n.parentNode)return-1;for(;n=n.previousElementSibling;)n.nodeName.toUpperCase()!=="TEMPLATE"&&n!==Sortable.clone&&(!r||matches(n,r))&&a++;return a}function getRelativeScrollOffset(n){var r=0,a=0,o=getWindowScrollingElement();if(n)do{var s=matrix(n),l=s.a,u=s.d;r+=n.scrollLeft*l,a+=n.scrollTop*u}while(n!==o&&(n=n.parentNode));return[r,a]}function indexOfObject(n,r){for(var a in n)if(n.hasOwnProperty(a)){for(var o in r)if(r.hasOwnProperty(o)&&r[o]===n[a][o])return Number(a)}return-1}function getParentAutoScrollElement(n,r){if(!n||!n.getBoundingClientRect)return getWindowScrollingElement();var a=n,o=!1;do if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var s=css(a);if(a.clientWidth<a.scrollWidth&&(s.overflowX=="auto"||s.overflowX=="scroll")||a.clientHeight<a.scrollHeight&&(s.overflowY=="auto"||s.overflowY=="scroll")){if(!a.getBoundingClientRect||a===document.body)return getWindowScrollingElement();if(o||r)return a;o=!0}}while(a=a.parentNode);return getWindowScrollingElement()}function extend(n,r){if(n&&r)for(var a in r)r.hasOwnProperty(a)&&(n[a]=r[a]);return n}function isRectEqual(n,r){return Math.round(n.top)===Math.round(r.top)&&Math.round(n.left)===Math.round(r.left)&&Math.round(n.height)===Math.round(r.height)&&Math.round(n.width)===Math.round(r.width)}var _throttleTimeout;function throttle(n,r){return function(){if(!_throttleTimeout){var a=arguments,o=this;a.length===1?n.call(o,a[0]):n.apply(o,a),_throttleTimeout=setTimeout(function(){_throttleTimeout=void 0},r)}}}function cancelThrottle(){clearTimeout(_throttleTimeout),_throttleTimeout=void 0}function scrollBy(n,r,a){n.scrollLeft+=r,n.scrollTop+=a}function clone(n){var r=window.Polymer,a=window.jQuery||window.Zepto;return r&&r.dom?r.dom(n).cloneNode(!0):a?a(n).clone(!0)[0]:n.cloneNode(!0)}function getChildContainingRectFromElement(n,r,a){var o={};return Array.from(n.children).forEach(function(s){var l,u,c,d;if(!(!closest(s,r.draggable,n,!1)||s.animated||s===a)){var f=getRect(s);o.left=Math.min((l=o.left)!==null&&l!==void 0?l:1/0,f.left),o.top=Math.min((u=o.top)!==null&&u!==void 0?u:1/0,f.top),o.right=Math.max((c=o.right)!==null&&c!==void 0?c:-1/0,f.right),o.bottom=Math.max((d=o.bottom)!==null&&d!==void 0?d:-1/0,f.bottom)}}),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var expando="Sortable"+new Date().getTime();function AnimationStateManager(){var n=[],r;return{captureAnimationState:function(){if(n=[],!!this.options.animation){var o=[].slice.call(this.el.children);o.forEach(function(s){if(!(css(s,"display")==="none"||s===Sortable.ghost)){n.push({target:s,rect:getRect(s)});var l=_objectSpread2({},n[n.length-1].rect);if(s.thisAnimationDuration){var u=matrix(s,!0);u&&(l.top-=u.f,l.left-=u.e)}s.fromRect=l}})}},addAnimationState:function(o){n.push(o)},removeAnimationState:function(o){n.splice(indexOfObject(n,{target:o}),1)},animateAll:function(o){var s=this;if(!this.options.animation){clearTimeout(r),typeof o=="function"&&o();return}var l=!1,u=0;n.forEach(function(c){var d=0,f=c.target,p=f.fromRect,v=getRect(f),g=f.prevFromRect,y=f.prevToRect,_=c.rect,S=matrix(f,!0);S&&(v.top-=S.f,v.left-=S.e),f.toRect=v,f.thisAnimationDuration&&isRectEqual(g,v)&&!isRectEqual(p,v)&&(_.top-v.top)/(_.left-v.left)===(p.top-v.top)/(p.left-v.left)&&(d=calculateRealTime(_,g,y,s.options)),isRectEqual(v,p)||(f.prevFromRect=p,f.prevToRect=v,d||(d=s.options.animation),s.animate(f,_,v,d)),d&&(l=!0,u=Math.max(u,d),clearTimeout(f.animationResetTimer),f.animationResetTimer=setTimeout(function(){f.animationTime=0,f.prevFromRect=null,f.fromRect=null,f.prevToRect=null,f.thisAnimationDuration=null},d),f.thisAnimationDuration=d)}),clearTimeout(r),l?r=setTimeout(function(){typeof o=="function"&&o()},u):typeof o=="function"&&o(),n=[]},animate:function(o,s,l,u){if(u){css(o,"transition",""),css(o,"transform","");var c=matrix(this.el),d=c&&c.a,f=c&&c.d,p=(s.left-l.left)/(d||1),v=(s.top-l.top)/(f||1);o.animatingX=!!p,o.animatingY=!!v,css(o,"transform","translate3d("+p+"px,"+v+"px,0)"),this.forRepaintDummy=repaint(o),css(o,"transition","transform "+u+"ms"+(this.options.easing?" "+this.options.easing:"")),css(o,"transform","translate3d(0,0,0)"),typeof o.animated=="number"&&clearTimeout(o.animated),o.animated=setTimeout(function(){css(o,"transition",""),css(o,"transform",""),o.animated=!1,o.animatingX=!1,o.animatingY=!1},u)}}}}function repaint(n){return n.offsetWidth}function calculateRealTime(n,r,a,o){return Math.sqrt(Math.pow(r.top-n.top,2)+Math.pow(r.left-n.left,2))/Math.sqrt(Math.pow(r.top-a.top,2)+Math.pow(r.left-a.left,2))*o.animation}var plugins=[],defaults={initializeByDefault:!0},PluginManager={mount:function n(r){for(var a in defaults)defaults.hasOwnProperty(a)&&!(a in r)&&(r[a]=defaults[a]);plugins.forEach(function(o){if(o.pluginName===r.pluginName)throw"Sortable: Cannot mount plugin ".concat(r.pluginName," more than once")}),plugins.push(r)},pluginEvent:function n(r,a,o){var s=this;this.eventCanceled=!1,o.cancel=function(){s.eventCanceled=!0};var l=r+"Global";plugins.forEach(function(u){a[u.pluginName]&&(a[u.pluginName][l]&&a[u.pluginName][l](_objectSpread2({sortable:a},o)),a.options[u.pluginName]&&a[u.pluginName][r]&&a[u.pluginName][r](_objectSpread2({sortable:a},o)))})},initializePlugins:function n(r,a,o,s){plugins.forEach(function(c){var d=c.pluginName;if(!(!r.options[d]&&!c.initializeByDefault)){var f=new c(r,a,r.options);f.sortable=r,f.options=r.options,r[d]=f,_extends(o,f.defaults)}});for(var l in r.options)if(r.options.hasOwnProperty(l)){var u=this.modifyOption(r,l,r.options[l]);typeof u<"u"&&(r.options[l]=u)}},getEventProperties:function n(r,a){var o={};return plugins.forEach(function(s){typeof s.eventProperties=="function"&&_extends(o,s.eventProperties.call(a[s.pluginName],r))}),o},modifyOption:function n(r,a,o){var s;return plugins.forEach(function(l){r[l.pluginName]&&l.optionListeners&&typeof l.optionListeners[a]=="function"&&(s=l.optionListeners[a].call(r[l.pluginName],o))}),s}};function dispatchEvent(n){var r=n.sortable,a=n.rootEl,o=n.name,s=n.targetEl,l=n.cloneEl,u=n.toEl,c=n.fromEl,d=n.oldIndex,f=n.newIndex,p=n.oldDraggableIndex,v=n.newDraggableIndex,g=n.originalEvent,y=n.putSortable,_=n.extraEventProperties;if(r=r||a&&a[expando],!!r){var S,b=r.options,x="on"+o.charAt(0).toUpperCase()+o.substr(1);window.CustomEvent&&!IE11OrLess&&!Edge?S=new CustomEvent(o,{bubbles:!0,cancelable:!0}):(S=document.createEvent("Event"),S.initEvent(o,!0,!0)),S.to=u||a,S.from=c||a,S.item=s||a,S.clone=l,S.oldIndex=d,S.newIndex=f,S.oldDraggableIndex=p,S.newDraggableIndex=v,S.originalEvent=g,S.pullMode=y?y.lastPutMode:void 0;var A=_objectSpread2(_objectSpread2({},_),PluginManager.getEventProperties(o,r));for(var w in A)S[w]=A[w];a&&a.dispatchEvent(S),b[x]&&b[x].call(r,S)}}var _excluded=["evt"],pluginEvent=function n(r,a){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},s=o.evt,l=_objectWithoutProperties(o,_excluded);PluginManager.pluginEvent.bind(Sortable)(r,a,_objectSpread2({dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,dragStarted:moved,putSortable,activeSortable:Sortable.active,originalEvent:s,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex,hideGhostForTarget:_hideGhostForTarget,unhideGhostForTarget:_unhideGhostForTarget,cloneNowHidden:function(){cloneHidden=!0},cloneNowShown:function(){cloneHidden=!1},dispatchSortableEvent:function(c){_dispatchEvent({sortable:a,name:c,originalEvent:s})}},l))};function _dispatchEvent(n){dispatchEvent(_objectSpread2({putSortable,cloneEl,targetEl:dragEl,rootEl,oldIndex,oldDraggableIndex,newIndex,newDraggableIndex},n))}var dragEl,parentEl,ghostEl,rootEl,nextEl,lastDownEl,cloneEl,cloneHidden,oldIndex,newIndex,oldDraggableIndex,newDraggableIndex,activeGroup,putSortable,awaitingDragStarted=!1,ignoreNextClick=!1,sortables=[],tapEvt,touchEvt,lastDx,lastDy,tapDistanceLeft,tapDistanceTop,moved,lastTarget,lastDirection,pastFirstInvertThresh=!1,isCircumstantialInvert=!1,targetMoveDistance,ghostRelativeParent,ghostRelativeParentInitialScroll=[],_silent=!1,savedInputChecked=[],documentExists=typeof document<"u",PositionGhostAbsolutely=IOS,CSSFloatProperty=Edge||IE11OrLess?"cssFloat":"float",supportDraggable=documentExists&&!ChromeForAndroid&&!IOS&&"draggable"in document.createElement("div"),supportCssPointerEvents=function(){if(documentExists){if(IE11OrLess)return!1;var n=document.createElement("x");return n.style.cssText="pointer-events:auto",n.style.pointerEvents==="auto"}}(),_detectDirection=function n(r,a){var o=css(r),s=parseInt(o.width)-parseInt(o.paddingLeft)-parseInt(o.paddingRight)-parseInt(o.borderLeftWidth)-parseInt(o.borderRightWidth),l=getChild(r,0,a),u=getChild(r,1,a),c=l&&css(l),d=u&&css(u),f=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+getRect(l).width,p=d&&parseInt(d.marginLeft)+parseInt(d.marginRight)+getRect(u).width;if(o.display==="flex")return o.flexDirection==="column"||o.flexDirection==="column-reverse"?"vertical":"horizontal";if(o.display==="grid")return o.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&c.float&&c.float!=="none"){var v=c.float==="left"?"left":"right";return u&&(d.clear==="both"||d.clear===v)?"vertical":"horizontal"}return l&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||f>=s&&o[CSSFloatProperty]==="none"||u&&o[CSSFloatProperty]==="none"&&f+p>s)?"vertical":"horizontal"},_dragElInRowColumn=function n(r,a,o){var s=o?r.left:r.top,l=o?r.right:r.bottom,u=o?r.width:r.height,c=o?a.left:a.top,d=o?a.right:a.bottom,f=o?a.width:a.height;return s===c||l===d||s+u/2===c+f/2},_detectNearestEmptySortable=function n(r,a){var o;return sortables.some(function(s){var l=s[expando].options.emptyInsertThreshold;if(!(!l||lastChild(s))){var u=getRect(s),c=r>=u.left-l&&r<=u.right+l,d=a>=u.top-l&&a<=u.bottom+l;if(c&&d)return o=s}}),o},_prepareGroup=function n(r){function a(l,u){return function(c,d,f,p){var v=c.options.group.name&&d.options.group.name&&c.options.group.name===d.options.group.name;if(l==null&&(u||v))return!0;if(l==null||l===!1)return!1;if(u&&l==="clone")return l;if(typeof l=="function")return a(l(c,d,f,p),u)(c,d,f,p);var g=(u?c:d).options.group.name;return l===!0||typeof l=="string"&&l===g||l.join&&l.indexOf(g)>-1}}var o={},s=r.group;(!s||_typeof(s)!="object")&&(s={name:s}),o.name=s.name,o.checkPull=a(s.pull,!0),o.checkPut=a(s.put),o.revertClone=s.revertClone,r.group=o},_hideGhostForTarget=function n(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","none")},_unhideGhostForTarget=function n(){!supportCssPointerEvents&&ghostEl&&css(ghostEl,"display","")};documentExists&&!ChromeForAndroid&&document.addEventListener("click",function(n){if(ignoreNextClick)return n.preventDefault(),n.stopPropagation&&n.stopPropagation(),n.stopImmediatePropagation&&n.stopImmediatePropagation(),ignoreNextClick=!1,!1},!0);var nearestEmptyInsertDetectEvent=function n(r){if(dragEl){r=r.touches?r.touches[0]:r;var a=_detectNearestEmptySortable(r.clientX,r.clientY);if(a){var o={};for(var s in r)r.hasOwnProperty(s)&&(o[s]=r[s]);o.target=o.rootEl=a,o.preventDefault=void 0,o.stopPropagation=void 0,a[expando]._onDragOver(o)}}},_checkOutsideTargetEl=function n(r){dragEl&&dragEl.parentNode[expando]._isOutsideThisEl(r.target)};function Sortable(n,r){if(!(n&&n.nodeType&&n.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(n));this.el=n,this.options=r=_extends({},r),n[expando]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(n.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return _detectDirection(n,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(u,c){u.setData("Text",c.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:Sortable.supportPointer!==!1&&"PointerEvent"in window&&(!Safari||IOS),emptyInsertThreshold:5};PluginManager.initializePlugins(this,n,a);for(var o in a)!(o in r)&&(r[o]=a[o]);_prepareGroup(r);for(var s in this)s.charAt(0)==="_"&&typeof this[s]=="function"&&(this[s]=this[s].bind(this));this.nativeDraggable=r.forceFallback?!1:supportDraggable,this.nativeDraggable&&(this.options.touchStartThreshold=1),r.supportPointer?on(n,"pointerdown",this._onTapStart):(on(n,"mousedown",this._onTapStart),on(n,"touchstart",this._onTapStart)),this.nativeDraggable&&(on(n,"dragover",this),on(n,"dragenter",this)),sortables.push(this.el),r.store&&r.store.get&&this.sort(r.store.get(this)||[]),_extends(this,AnimationStateManager())}Sortable.prototype={constructor:Sortable,_isOutsideThisEl:function n(r){!this.el.contains(r)&&r!==this.el&&(lastTarget=null)},_getDirection:function n(r,a){return typeof this.options.direction=="function"?this.options.direction.call(this,r,a,dragEl):this.options.direction},_onTapStart:function n(r){if(r.cancelable){var a=this,o=this.el,s=this.options,l=s.preventOnFilter,u=r.type,c=r.touches&&r.touches[0]||r.pointerType&&r.pointerType==="touch"&&r,d=(c||r).target,f=r.target.shadowRoot&&(r.path&&r.path[0]||r.composedPath&&r.composedPath()[0])||d,p=s.filter;if(_saveInputCheckedState(o),!dragEl&&!(/mousedown|pointerdown/.test(u)&&r.button!==0||s.disabled)&&!f.isContentEditable&&!(!this.nativeDraggable&&Safari&&d&&d.tagName.toUpperCase()==="SELECT")&&(d=closest(d,s.draggable,o,!1),!(d&&d.animated)&&lastDownEl!==d)){if(oldIndex=index(d),oldDraggableIndex=index(d,s.draggable),typeof p=="function"){if(p.call(this,r,d,this)){_dispatchEvent({sortable:a,rootEl:f,name:"filter",targetEl:d,toEl:o,fromEl:o}),pluginEvent("filter",a,{evt:r}),l&&r.preventDefault();return}}else if(p&&(p=p.split(",").some(function(v){if(v=closest(f,v.trim(),o,!1),v)return _dispatchEvent({sortable:a,rootEl:v,name:"filter",targetEl:d,fromEl:o,toEl:o}),pluginEvent("filter",a,{evt:r}),!0}),p)){l&&r.preventDefault();return}s.handle&&!closest(f,s.handle,o,!1)||this._prepareDragStart(r,c,d)}}},_prepareDragStart:function n(r,a,o){var s=this,l=s.el,u=s.options,c=l.ownerDocument,d;if(o&&!dragEl&&o.parentNode===l){var f=getRect(o);if(rootEl=l,dragEl=o,parentEl=dragEl.parentNode,nextEl=dragEl.nextSibling,lastDownEl=o,activeGroup=u.group,Sortable.dragged=dragEl,tapEvt={target:dragEl,clientX:(a||r).clientX,clientY:(a||r).clientY},tapDistanceLeft=tapEvt.clientX-f.left,tapDistanceTop=tapEvt.clientY-f.top,this._lastX=(a||r).clientX,this._lastY=(a||r).clientY,dragEl.style["will-change"]="all",d=function(){if(pluginEvent("delayEnded",s,{evt:r}),Sortable.eventCanceled){s._onDrop();return}s._disableDelayedDragEvents(),!FireFox&&s.nativeDraggable&&(dragEl.draggable=!0),s._triggerDragStart(r,a),_dispatchEvent({sortable:s,name:"choose",originalEvent:r}),toggleClass(dragEl,u.chosenClass,!0)},u.ignore.split(",").forEach(function(p){find(dragEl,p.trim(),_disableDraggable)}),on(c,"dragover",nearestEmptyInsertDetectEvent),on(c,"mousemove",nearestEmptyInsertDetectEvent),on(c,"touchmove",nearestEmptyInsertDetectEvent),u.supportPointer?(on(c,"pointerup",s._onDrop),!this.nativeDraggable&&on(c,"pointercancel",s._onDrop)):(on(c,"mouseup",s._onDrop),on(c,"touchend",s._onDrop),on(c,"touchcancel",s._onDrop)),FireFox&&this.nativeDraggable&&(this.options.touchStartThreshold=4,dragEl.draggable=!0),pluginEvent("delayStart",this,{evt:r}),u.delay&&(!u.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(Edge||IE11OrLess))){if(Sortable.eventCanceled){this._onDrop();return}u.supportPointer?(on(c,"pointerup",s._disableDelayedDrag),on(c,"pointercancel",s._disableDelayedDrag)):(on(c,"mouseup",s._disableDelayedDrag),on(c,"touchend",s._disableDelayedDrag),on(c,"touchcancel",s._disableDelayedDrag)),on(c,"mousemove",s._delayedDragTouchMoveHandler),on(c,"touchmove",s._delayedDragTouchMoveHandler),u.supportPointer&&on(c,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(d,u.delay)}else d()}},_delayedDragTouchMoveHandler:function n(r){var a=r.touches?r.touches[0]:r;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function n(){dragEl&&_disableDraggable(dragEl),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function n(){var r=this.el.ownerDocument;off(r,"mouseup",this._disableDelayedDrag),off(r,"touchend",this._disableDelayedDrag),off(r,"touchcancel",this._disableDelayedDrag),off(r,"pointerup",this._disableDelayedDrag),off(r,"pointercancel",this._disableDelayedDrag),off(r,"mousemove",this._delayedDragTouchMoveHandler),off(r,"touchmove",this._delayedDragTouchMoveHandler),off(r,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function n(r,a){a=a||r.pointerType=="touch"&&r,!this.nativeDraggable||a?this.options.supportPointer?on(document,"pointermove",this._onTouchMove):a?on(document,"touchmove",this._onTouchMove):on(document,"mousemove",this._onTouchMove):(on(dragEl,"dragend",this),on(rootEl,"dragstart",this._onDragStart));try{document.selection?_nextTick(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(o){}},_dragStarted:function n(r,a){if(awaitingDragStarted=!1,rootEl&&dragEl){pluginEvent("dragStarted",this,{evt:a}),this.nativeDraggable&&on(document,"dragover",_checkOutsideTargetEl);var o=this.options;!r&&toggleClass(dragEl,o.dragClass,!1),toggleClass(dragEl,o.ghostClass,!0),Sortable.active=this,r&&this._appendGhost(),_dispatchEvent({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function n(){if(touchEvt){this._lastX=touchEvt.clientX,this._lastY=touchEvt.clientY,_hideGhostForTarget();for(var r=document.elementFromPoint(touchEvt.clientX,touchEvt.clientY),a=r;r&&r.shadowRoot&&(r=r.shadowRoot.elementFromPoint(touchEvt.clientX,touchEvt.clientY),r!==a);)a=r;if(dragEl.parentNode[expando]._isOutsideThisEl(r),a)do{if(a[expando]){var o=void 0;if(o=a[expando]._onDragOver({clientX:touchEvt.clientX,clientY:touchEvt.clientY,target:r,rootEl:a}),o&&!this.options.dragoverBubble)break}r=a}while(a=getParentOrHost(a));_unhideGhostForTarget()}},_onTouchMove:function n(r){if(tapEvt){var a=this.options,o=a.fallbackTolerance,s=a.fallbackOffset,l=r.touches?r.touches[0]:r,u=ghostEl&&matrix(ghostEl,!0),c=ghostEl&&u&&u.a,d=ghostEl&&u&&u.d,f=PositionGhostAbsolutely&&ghostRelativeParent&&getRelativeScrollOffset(ghostRelativeParent),p=(l.clientX-tapEvt.clientX+s.x)/(c||1)+(f?f[0]-ghostRelativeParentInitialScroll[0]:0)/(c||1),v=(l.clientY-tapEvt.clientY+s.y)/(d||1)+(f?f[1]-ghostRelativeParentInitialScroll[1]:0)/(d||1);if(!Sortable.active&&!awaitingDragStarted){if(o&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))<o)return;this._onDragStart(r,!0)}if(ghostEl){u?(u.e+=p-(lastDx||0),u.f+=v-(lastDy||0)):u={a:1,b:0,c:0,d:1,e:p,f:v};var g="matrix(".concat(u.a,",").concat(u.b,",").concat(u.c,",").concat(u.d,",").concat(u.e,",").concat(u.f,")");css(ghostEl,"webkitTransform",g),css(ghostEl,"mozTransform",g),css(ghostEl,"msTransform",g),css(ghostEl,"transform",g),lastDx=p,lastDy=v,touchEvt=l}r.cancelable&&r.preventDefault()}},_appendGhost:function n(){if(!ghostEl){var r=this.options.fallbackOnBody?document.body:rootEl,a=getRect(dragEl,!0,PositionGhostAbsolutely,!0,r),o=this.options;if(PositionGhostAbsolutely){for(ghostRelativeParent=r;css(ghostRelativeParent,"position")==="static"&&css(ghostRelativeParent,"transform")==="none"&&ghostRelativeParent!==document;)ghostRelativeParent=ghostRelativeParent.parentNode;ghostRelativeParent!==document.body&&ghostRelativeParent!==document.documentElement?(ghostRelativeParent===document&&(ghostRelativeParent=getWindowScrollingElement()),a.top+=ghostRelativeParent.scrollTop,a.left+=ghostRelativeParent.scrollLeft):ghostRelativeParent=getWindowScrollingElement(),ghostRelativeParentInitialScroll=getRelativeScrollOffset(ghostRelativeParent)}ghostEl=dragEl.cloneNode(!0),toggleClass(ghostEl,o.ghostClass,!1),toggleClass(ghostEl,o.fallbackClass,!0),toggleClass(ghostEl,o.dragClass,!0),css(ghostEl,"transition",""),css(ghostEl,"transform",""),css(ghostEl,"box-sizing","border-box"),css(ghostEl,"margin",0),css(ghostEl,"top",a.top),css(ghostEl,"left",a.left),css(ghostEl,"width",a.width),css(ghostEl,"height",a.height),css(ghostEl,"opacity","0.8"),css(ghostEl,"position",PositionGhostAbsolutely?"absolute":"fixed"),css(ghostEl,"zIndex","100000"),css(ghostEl,"pointerEvents","none"),Sortable.ghost=ghostEl,r.appendChild(ghostEl),css(ghostEl,"transform-origin",tapDistanceLeft/parseInt(ghostEl.style.width)*100+"% "+tapDistanceTop/parseInt(ghostEl.style.height)*100+"%")}},_onDragStart:function n(r,a){var o=this,s=r.dataTransfer,l=o.options;if(pluginEvent("dragStart",this,{evt:r}),Sortable.eventCanceled){this._onDrop();return}pluginEvent("setupClone",this),Sortable.eventCanceled||(cloneEl=clone(dragEl),cloneEl.removeAttribute("id"),cloneEl.draggable=!1,cloneEl.style["will-change"]="",this._hideClone(),toggleClass(cloneEl,this.options.chosenClass,!1),Sortable.clone=cloneEl),o.cloneId=_nextTick(function(){pluginEvent("clone",o),!Sortable.eventCanceled&&(o.options.removeCloneOnHide||rootEl.insertBefore(cloneEl,dragEl),o._hideClone(),_dispatchEvent({sortable:o,name:"clone"}))}),!a&&toggleClass(dragEl,l.dragClass,!0),a?(ignoreNextClick=!0,o._loopId=setInterval(o._emulateDragOver,50)):(off(document,"mouseup",o._onDrop),off(document,"touchend",o._onDrop),off(document,"touchcancel",o._onDrop),s&&(s.effectAllowed="move",l.setData&&l.setData.call(o,s,dragEl)),on(document,"drop",o),css(dragEl,"transform","translateZ(0)")),awaitingDragStarted=!0,o._dragStartId=_nextTick(o._dragStarted.bind(o,a,r)),on(document,"selectstart",o),moved=!0,window.getSelection().removeAllRanges(),Safari&&css(document.body,"user-select","none")},_onDragOver:function n(r){var a=this.el,o=r.target,s,l,u,c=this.options,d=c.group,f=Sortable.active,p=activeGroup===d,v=c.sort,g=putSortable||f,y,_=this,S=!1;if(_silent)return;function b(H,W){pluginEvent(H,_,_objectSpread2({evt:r,isOwner:p,axis:y?"vertical":"horizontal",revert:u,dragRect:s,targetRect:l,canSort:v,fromSortable:g,target:o,completed:A,onMove:function(B,Y){return _onMove(rootEl,a,dragEl,s,B,getRect(B),r,Y)},changed:w},W))}function x(){b("dragOverAnimationCapture"),_.captureAnimationState(),_!==g&&g.captureAnimationState()}function A(H){return b("dragOverCompleted",{insertion:H}),H&&(p?f._hideClone():f._showClone(_),_!==g&&(toggleClass(dragEl,putSortable?putSortable.options.ghostClass:f.options.ghostClass,!1),toggleClass(dragEl,c.ghostClass,!0)),putSortable!==_&&_!==Sortable.active?putSortable=_:_===Sortable.active&&putSortable&&(putSortable=null),g===_&&(_._ignoreWhileAnimating=o),_.animateAll(function(){b("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==g&&(g.animateAll(),g._ignoreWhileAnimating=null)),(o===dragEl&&!dragEl.animated||o===a&&!o.animated)&&(lastTarget=null),!c.dragoverBubble&&!r.rootEl&&o!==document&&(dragEl.parentNode[expando]._isOutsideThisEl(r.target),!H&&nearestEmptyInsertDetectEvent(r)),!c.dragoverBubble&&r.stopPropagation&&r.stopPropagation(),S=!0}function w(){newIndex=index(dragEl),newDraggableIndex=index(dragEl,c.draggable),_dispatchEvent({sortable:_,name:"change",toEl:a,newIndex,newDraggableIndex,originalEvent:r})}if(r.preventDefault!==void 0&&r.cancelable&&r.preventDefault(),o=closest(o,c.draggable,a,!0),b("dragOver"),Sortable.eventCanceled)return S;if(dragEl.contains(r.target)||o.animated&&o.animatingX&&o.animatingY||_._ignoreWhileAnimating===o)return A(!1);if(ignoreNextClick=!1,f&&!c.disabled&&(p?v||(u=parentEl!==rootEl):putSortable===this||(this.lastPutMode=activeGroup.checkPull(this,f,dragEl,r))&&d.checkPut(this,f,dragEl,r))){if(y=this._getDirection(r,o)==="vertical",s=getRect(dragEl),b("dragOverValid"),Sortable.eventCanceled)return S;if(u)return parentEl=rootEl,x(),this._hideClone(),b("revert"),Sortable.eventCanceled||(nextEl?rootEl.insertBefore(dragEl,nextEl):rootEl.appendChild(dragEl)),A(!0);var E=lastChild(a,c.draggable);if(!E||_ghostIsLast(r,y,this)&&!E.animated){if(E===dragEl)return A(!1);if(E&&a===r.target&&(o=E),o&&(l=getRect(o)),_onMove(rootEl,a,dragEl,s,o,l,r,!!o)!==!1)return x(),E&&E.nextSibling?a.insertBefore(dragEl,E.nextSibling):a.appendChild(dragEl),parentEl=a,w(),A(!0)}else if(E&&_ghostIsFirst(r,y,this)){var D=getChild(a,0,c,!0);if(D===dragEl)return A(!1);if(o=D,l=getRect(o),_onMove(rootEl,a,dragEl,s,o,l,r,!1)!==!1)return x(),a.insertBefore(dragEl,D),parentEl=a,w(),A(!0)}else if(o.parentNode===a){l=getRect(o);var C=0,$,P=dragEl.parentNode!==a,M=!_dragElInRowColumn(dragEl.animated&&dragEl.toRect||s,o.animated&&o.toRect||l,y),I=y?"top":"left",L=isScrolledPast(o,"top","top")||isScrolledPast(dragEl,"top","top"),O=L?L.scrollTop:void 0;lastTarget!==o&&($=l[I],pastFirstInvertThresh=!1,isCircumstantialInvert=!M&&c.invertSwap||P),C=_getSwapDirection(r,o,l,y,M?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,isCircumstantialInvert,lastTarget===o);var R;if(C!==0){var N=index(dragEl);do N-=C,R=parentEl.children[N];while(R&&(css(R,"display")==="none"||R===ghostEl))}if(C===0||R===o)return A(!1);lastTarget=o,lastDirection=C;var V=o.nextElementSibling,F=!1;F=C===1;var U=_onMove(rootEl,a,dragEl,s,o,l,r,F);if(U!==!1)return(U===1||U===-1)&&(F=U===1),_silent=!0,setTimeout(_unsilent,30),x(),F&&!V?a.appendChild(dragEl):o.parentNode.insertBefore(dragEl,F?V:o),L&&scrollBy(L,0,O-L.scrollTop),parentEl=dragEl.parentNode,$!==void 0&&!isCircumstantialInvert&&(targetMoveDistance=Math.abs($-getRect(o)[I])),w(),A(!0)}if(a.contains(dragEl))return A(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function n(){off(document,"mousemove",this._onTouchMove),off(document,"touchmove",this._onTouchMove),off(document,"pointermove",this._onTouchMove),off(document,"dragover",nearestEmptyInsertDetectEvent),off(document,"mousemove",nearestEmptyInsertDetectEvent),off(document,"touchmove",nearestEmptyInsertDetectEvent)},_offUpEvents:function n(){var r=this.el.ownerDocument;off(r,"mouseup",this._onDrop),off(r,"touchend",this._onDrop),off(r,"pointerup",this._onDrop),off(r,"pointercancel",this._onDrop),off(r,"touchcancel",this._onDrop),off(document,"selectstart",this)},_onDrop:function n(r){var a=this.el,o=this.options;if(newIndex=index(dragEl),newDraggableIndex=index(dragEl,o.draggable),pluginEvent("drop",this,{evt:r}),parentEl=dragEl&&dragEl.parentNode,newIndex=index(dragEl),newDraggableIndex=index(dragEl,o.draggable),Sortable.eventCanceled){this._nulling();return}awaitingDragStarted=!1,isCircumstantialInvert=!1,pastFirstInvertThresh=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_cancelNextTick(this.cloneId),_cancelNextTick(this._dragStartId),this.nativeDraggable&&(off(document,"drop",this),off(a,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Safari&&css(document.body,"user-select",""),css(dragEl,"transform",""),r&&(moved&&(r.cancelable&&r.preventDefault(),!o.dropBubble&&r.stopPropagation()),ghostEl&&ghostEl.parentNode&&ghostEl.parentNode.removeChild(ghostEl),(rootEl===parentEl||putSortable&&putSortable.lastPutMode!=="clone")&&cloneEl&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),dragEl&&(this.nativeDraggable&&off(dragEl,"dragend",this),_disableDraggable(dragEl),dragEl.style["will-change"]="",moved&&!awaitingDragStarted&&toggleClass(dragEl,putSortable?putSortable.options.ghostClass:this.options.ghostClass,!1),toggleClass(dragEl,this.options.chosenClass,!1),_dispatchEvent({sortable:this,name:"unchoose",toEl:parentEl,newIndex:null,newDraggableIndex:null,originalEvent:r}),rootEl!==parentEl?(newIndex>=0&&(_dispatchEvent({rootEl:parentEl,name:"add",toEl:parentEl,fromEl:rootEl,originalEvent:r}),_dispatchEvent({sortable:this,name:"remove",toEl:parentEl,originalEvent:r}),_dispatchEvent({rootEl:parentEl,name:"sort",toEl:parentEl,fromEl:rootEl,originalEvent:r}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:r})),putSortable&&putSortable.save()):newIndex!==oldIndex&&newIndex>=0&&(_dispatchEvent({sortable:this,name:"update",toEl:parentEl,originalEvent:r}),_dispatchEvent({sortable:this,name:"sort",toEl:parentEl,originalEvent:r})),Sortable.active&&((newIndex==null||newIndex===-1)&&(newIndex=oldIndex,newDraggableIndex=oldDraggableIndex),_dispatchEvent({sortable:this,name:"end",toEl:parentEl,originalEvent:r}),this.save()))),this._nulling()},_nulling:function n(){pluginEvent("nulling",this),rootEl=dragEl=parentEl=ghostEl=nextEl=cloneEl=lastDownEl=cloneHidden=tapEvt=touchEvt=moved=newIndex=newDraggableIndex=oldIndex=oldDraggableIndex=lastTarget=lastDirection=putSortable=activeGroup=Sortable.dragged=Sortable.ghost=Sortable.clone=Sortable.active=null,savedInputChecked.forEach(function(r){r.checked=!0}),savedInputChecked.length=lastDx=lastDy=0},handleEvent:function n(r){switch(r.type){case"drop":case"dragend":this._onDrop(r);break;case"dragenter":case"dragover":dragEl&&(this._onDragOver(r),_globalDragOver(r));break;case"selectstart":r.preventDefault();break}},toArray:function n(){for(var r=[],a,o=this.el.children,s=0,l=o.length,u=this.options;s<l;s++)a=o[s],closest(a,u.draggable,this.el,!1)&&r.push(a.getAttribute(u.dataIdAttr)||_generateId(a));return r},sort:function n(r,a){var o={},s=this.el;this.toArray().forEach(function(l,u){var c=s.children[u];closest(c,this.options.draggable,s,!1)&&(o[l]=c)},this),a&&this.captureAnimationState(),r.forEach(function(l){o[l]&&(s.removeChild(o[l]),s.appendChild(o[l]))}),a&&this.animateAll()},save:function n(){var r=this.options.store;r&&r.set&&r.set(this)},closest:function n(r,a){return closest(r,a||this.options.draggable,this.el,!1)},option:function n(r,a){var o=this.options;if(a===void 0)return o[r];var s=PluginManager.modifyOption(this,r,a);typeof s<"u"?o[r]=s:o[r]=a,r==="group"&&_prepareGroup(o)},destroy:function n(){pluginEvent("destroy",this);var r=this.el;r[expando]=null,off(r,"mousedown",this._onTapStart),off(r,"touchstart",this._onTapStart),off(r,"pointerdown",this._onTapStart),this.nativeDraggable&&(off(r,"dragover",this),off(r,"dragenter",this)),Array.prototype.forEach.call(r.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),sortables.splice(sortables.indexOf(this.el),1),this.el=r=null},_hideClone:function n(){if(!cloneHidden){if(pluginEvent("hideClone",this),Sortable.eventCanceled)return;css(cloneEl,"display","none"),this.options.removeCloneOnHide&&cloneEl.parentNode&&cloneEl.parentNode.removeChild(cloneEl),cloneHidden=!0}},_showClone:function n(r){if(r.lastPutMode!=="clone"){this._hideClone();return}if(cloneHidden){if(pluginEvent("showClone",this),Sortable.eventCanceled)return;dragEl.parentNode==rootEl&&!this.options.group.revertClone?rootEl.insertBefore(cloneEl,dragEl):nextEl?rootEl.insertBefore(cloneEl,nextEl):rootEl.appendChild(cloneEl),this.options.group.revertClone&&this.animate(dragEl,cloneEl),css(cloneEl,"display",""),cloneHidden=!1}}};function _globalDragOver(n){n.dataTransfer&&(n.dataTransfer.dropEffect="move"),n.cancelable&&n.preventDefault()}function _onMove(n,r,a,o,s,l,u,c){var d,f=n[expando],p=f.options.onMove,v;return window.CustomEvent&&!IE11OrLess&&!Edge?d=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(d=document.createEvent("Event"),d.initEvent("move",!0,!0)),d.to=r,d.from=n,d.dragged=a,d.draggedRect=o,d.related=s||r,d.relatedRect=l||getRect(r),d.willInsertAfter=c,d.originalEvent=u,n.dispatchEvent(d),p&&(v=p.call(f,d,u)),v}function _disableDraggable(n){n.draggable=!1}function _unsilent(){_silent=!1}function _ghostIsFirst(n,r,a){var o=getRect(getChild(a.el,0,a.options,!0)),s=getChildContainingRectFromElement(a.el,a.options,ghostEl),l=10;return r?n.clientX<s.left-l||n.clientY<o.top&&n.clientX<o.right:n.clientY<s.top-l||n.clientY<o.bottom&&n.clientX<o.left}function _ghostIsLast(n,r,a){var o=getRect(lastChild(a.el,a.options.draggable)),s=getChildContainingRectFromElement(a.el,a.options,ghostEl),l=10;return r?n.clientX>s.right+l||n.clientY>o.bottom&&n.clientX>o.left:n.clientY>s.bottom+l||n.clientX>o.right&&n.clientY>o.top}function _getSwapDirection(n,r,a,o,s,l,u,c){var d=o?n.clientY:n.clientX,f=o?a.height:a.width,p=o?a.top:a.left,v=o?a.bottom:a.right,g=!1;if(!u){if(c&&targetMoveDistance<f*s){if(!pastFirstInvertThresh&&(lastDirection===1?d>p+f*l/2:d<v-f*l/2)&&(pastFirstInvertThresh=!0),pastFirstInvertThresh)g=!0;else if(lastDirection===1?d<p+targetMoveDistance:d>v-targetMoveDistance)return-lastDirection}else if(d>p+f*(1-s)/2&&d<v-f*(1-s)/2)return _getInsertDirection(r)}return g=g||u,g&&(d<p+f*l/2||d>v-f*l/2)?d>p+f/2?1:-1:0}function _getInsertDirection(n){return index(dragEl)<index(n)?1:-1}function _generateId(n){for(var r=n.tagName+n.className+n.src+n.href+n.textContent,a=r.length,o=0;a--;)o+=r.charCodeAt(a);return o.toString(36)}function _saveInputCheckedState(n){savedInputChecked.length=0;for(var r=n.getElementsByTagName("input"),a=r.length;a--;){var o=r[a];o.checked&&savedInputChecked.push(o)}}function _nextTick(n){return setTimeout(n,0)}function _cancelNextTick(n){return clearTimeout(n)}documentExists&&on(document,"touchmove",function(n){(Sortable.active||awaitingDragStarted)&&n.cancelable&&n.preventDefault()});Sortable.utils={on,off,css,find,is:function n(r,a){return!!closest(r,a,r,!1)},extend,throttle,closest,toggleClass,clone,index,nextTick:_nextTick,cancelNextTick:_cancelNextTick,detectDirection:_detectDirection,getChild,expando};Sortable.get=function(n){return n[expando]};Sortable.mount=function(){for(var n=arguments.length,r=new Array(n),a=0;a<n;a++)r[a]=arguments[a];r[0].constructor===Array&&(r=r[0]),r.forEach(function(o){if(!o.prototype||!o.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(o));o.utils&&(Sortable.utils=_objectSpread2(_objectSpread2({},Sortable.utils),o.utils)),PluginManager.mount(o)})};Sortable.create=function(n,r){return new Sortable(n,r)};Sortable.version=version;var autoScrolls=[],scrollEl,scrollRootEl,scrolling=!1,lastAutoScrollX,lastAutoScrollY,touchEvt$1,pointerElemChangedInterval;function AutoScrollPlugin(){function n(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this))}return n.prototype={dragStarted:function(a){var o=a.originalEvent;this.sortable.nativeDraggable?on(document,"dragover",this._handleAutoScroll):this.options.supportPointer?on(document,"pointermove",this._handleFallbackAutoScroll):o.touches?on(document,"touchmove",this._handleFallbackAutoScroll):on(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(a){var o=a.originalEvent;!this.options.dragOverBubble&&!o.rootEl&&this._handleAutoScroll(o)},drop:function(){this.sortable.nativeDraggable?off(document,"dragover",this._handleAutoScroll):(off(document,"pointermove",this._handleFallbackAutoScroll),off(document,"touchmove",this._handleFallbackAutoScroll),off(document,"mousemove",this._handleFallbackAutoScroll)),clearPointerElemChangedInterval(),clearAutoScrolls(),cancelThrottle()},nulling:function(){touchEvt$1=scrollRootEl=scrollEl=scrolling=pointerElemChangedInterval=lastAutoScrollX=lastAutoScrollY=null,autoScrolls.length=0},_handleFallbackAutoScroll:function(a){this._handleAutoScroll(a,!0)},_handleAutoScroll:function(a,o){var s=this,l=(a.touches?a.touches[0]:a).clientX,u=(a.touches?a.touches[0]:a).clientY,c=document.elementFromPoint(l,u);if(touchEvt$1=a,o||this.options.forceAutoScrollFallback||Edge||IE11OrLess||Safari){autoScroll(a,this.options,c,o);var d=getParentAutoScrollElement(c,!0);scrolling&&(!pointerElemChangedInterval||l!==lastAutoScrollX||u!==lastAutoScrollY)&&(pointerElemChangedInterval&&clearPointerElemChangedInterval(),pointerElemChangedInterval=setInterval(function(){var f=getParentAutoScrollElement(document.elementFromPoint(l,u),!0);f!==d&&(d=f,clearAutoScrolls()),autoScroll(a,s.options,f,o)},10),lastAutoScrollX=l,lastAutoScrollY=u)}else{if(!this.options.bubbleScroll||getParentAutoScrollElement(c,!0)===getWindowScrollingElement()){clearAutoScrolls();return}autoScroll(a,this.options,getParentAutoScrollElement(c,!1),!1)}}},_extends(n,{pluginName:"scroll",initializeByDefault:!0})}function clearAutoScrolls(){autoScrolls.forEach(function(n){clearInterval(n.pid)}),autoScrolls=[]}function clearPointerElemChangedInterval(){clearInterval(pointerElemChangedInterval)}var autoScroll=throttle(function(n,r,a,o){if(r.scroll){var s=(n.touches?n.touches[0]:n).clientX,l=(n.touches?n.touches[0]:n).clientY,u=r.scrollSensitivity,c=r.scrollSpeed,d=getWindowScrollingElement(),f=!1,p;scrollRootEl!==a&&(scrollRootEl=a,clearAutoScrolls(),scrollEl=r.scroll,p=r.scrollFn,scrollEl===!0&&(scrollEl=getParentAutoScrollElement(a,!0)));var v=0,g=scrollEl;do{var y=g,_=getRect(y),S=_.top,b=_.bottom,x=_.left,A=_.right,w=_.width,E=_.height,D=void 0,C=void 0,$=y.scrollWidth,P=y.scrollHeight,M=css(y),I=y.scrollLeft,L=y.scrollTop;y===d?(D=w<$&&(M.overflowX==="auto"||M.overflowX==="scroll"||M.overflowX==="visible"),C=E<P&&(M.overflowY==="auto"||M.overflowY==="scroll"||M.overflowY==="visible")):(D=w<$&&(M.overflowX==="auto"||M.overflowX==="scroll"),C=E<P&&(M.overflowY==="auto"||M.overflowY==="scroll"));var O=D&&(Math.abs(A-s)<=u&&I+w<$)-(Math.abs(x-s)<=u&&!!I),R=C&&(Math.abs(b-l)<=u&&L+E<P)-(Math.abs(S-l)<=u&&!!L);if(!autoScrolls[v])for(var N=0;N<=v;N++)autoScrolls[N]||(autoScrolls[N]={});(autoScrolls[v].vx!=O||autoScrolls[v].vy!=R||autoScrolls[v].el!==y)&&(autoScrolls[v].el=y,autoScrolls[v].vx=O,autoScrolls[v].vy=R,clearInterval(autoScrolls[v].pid),(O!=0||R!=0)&&(f=!0,autoScrolls[v].pid=setInterval((function(){o&&this.layer===0&&Sortable.active._onTouchMove(touchEvt$1);var V=autoScrolls[this.layer].vy?autoScrolls[this.layer].vy*c:0,F=autoScrolls[this.layer].vx?autoScrolls[this.layer].vx*c:0;typeof p=="function"&&p.call(Sortable.dragged.parentNode[expando],F,V,n,touchEvt$1,autoScrolls[this.layer].el)!=="continue"||scrollBy(autoScrolls[this.layer].el,F,V)}).bind({layer:v}),24))),v++}while(r.bubbleScroll&&g!==d&&(g=getParentAutoScrollElement(g,!1)));scrolling=f}},30),drop=function n(r){var a=r.originalEvent,o=r.putSortable,s=r.dragEl,l=r.activeSortable,u=r.dispatchSortableEvent,c=r.hideGhostForTarget,d=r.unhideGhostForTarget;if(a){var f=o||l;c();var p=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:a,v=document.elementFromPoint(p.clientX,p.clientY);d(),f&&!f.el.contains(v)&&(u("spill"),this.onSpill({dragEl:s,putSortable:o}))}};function Revert(){}Revert.prototype={startIndex:null,dragStart:function n(r){var a=r.oldDraggableIndex;this.startIndex=a},onSpill:function n(r){var a=r.dragEl,o=r.putSortable;this.sortable.captureAnimationState(),o&&o.captureAnimationState();var s=getChild(this.sortable.el,this.startIndex,this.options);s?this.sortable.el.insertBefore(a,s):this.sortable.el.appendChild(a),this.sortable.animateAll(),o&&o.animateAll()},drop};_extends(Revert,{pluginName:"revertOnSpill"});function Remove(){}Remove.prototype={onSpill:function n(r){var a=r.dragEl,o=r.putSortable,s=o||this.sortable;s.captureAnimationState(),a.parentNode&&a.parentNode.removeChild(a),s.animateAll()},drop};_extends(Remove,{pluginName:"removeOnSpill"});export{checkIp as $,smartUpload as A,BtFormItem as B,deepMerge as C,DEFAULT_CONFIG as D,getFileContent as E,saveFileBody as F,getByteUnit as G,isEmpty as H,getPluginInfo as I,isObject$4 as J,__unplugin_components_5$2 as K,getDockerStore as L,Message$2 as M,setPs as N,getNpsQuestion as O,slice$1 as P,copyText as Q,formatTime$1 as R,setContainerRemark as S,ThemeUpdater as T,setContainerStatus as U,delContainer as V,__unplugin_components_2$3 as W,useForm as X,portVerify as Y,checkDomain as Z,__vitePreload as _,__unplugin_components_5 as a,disConnect as a$,useSocket as a0,getLines as a1,checkVariable as a2,isNumber$1 as a3,use as a4,install as a5,install$1 as a6,install$S as a7,install$R as a8,install$Q as a9,install$l as aA,install$k as aB,install$s as aC,install$j as aD,install$i as aE,install$h as aF,install$g as aG,install$f as aH,install$e as aI,install$b as aJ,install$8 as aK,install$a as aL,install$9 as aM,install$5 as aN,install$7 as aO,install$6 as aP,install$4 as aQ,install$3 as aR,install$2 as aS,installUniversalTransition as aT,installLabelLayout as aU,version$2 as aV,dependencies as aW,PRIORITY as aX,init$1 as aY,connect as aZ,disconnect as a_,install$O as aa,install$M as ab,install$K as ac,install$J as ad,install$I as ae,install$H as af,install$G as ag,install$F as ah,install$D as ai,install$C as aj,install$B as ak,install$A as al,install$z as am,install$y as an,install$x as ao,install$w as ap,install$v as aq,install$u as ar,install$t as as,install$r as at,install$q as au,install$L as av,install$p as aw,install$E as ax,install$o as ay,install$n as az,__unplugin_components_4 as b,getTotal as b$,dispose as b0,getInstanceByDom as b1,getInstanceById as b2,registerTheme as b3,registerPreprocessor as b4,registerProcessor as b5,registerPostInit as b6,registerPostUpdate as b7,registerUpdateLifecycle as b8,registerAction as b9,ChartView as bA,extendComponentModel as bB,extendComponentView as bC,extendSeriesModel as bD,extendChartView as bE,throttle$2 as bF,setPlatformAPI as bG,parseGeoJSON as bH,env as bI,Model as bJ,Axis as bK,brushSingle as bL,repairPanelNew as bM,clearCache as bN,setTaskStatus$1 as bO,upgradePanelNew as bP,updatePanel as bQ,setDebug as bR,ignoreVersion as bS,writeNpsQuestion as bT,getUpdateInfo as bU,compareVersion as bV,isBoolean as bW,setNewAlarmTask$1 as bX,restartPanel as bY,serviceManage as bZ,restartServer as b_,registerCoordinateSystem as ba,getCoordinateSystemDimensions as bb,registerLayout as bc,registerVisual as bd,registerLoading as be,setCanvasCreator as bf,registerMap$1 as bg,getMap as bh,registerTransform as bi,dataTool as bj,registerLocale as bk,zrender as bl,matrix$2 as bm,vector as bn,util$1 as bo,color as bp,helper as bq,number as br,time as bs,graphic as bt,format as bu,util as bv,SeriesData as bw,ComponentModel as bx,ComponentView as by,SeriesModel as bz,useGlobalStore as c,setColumnCustom as c$,getUpgradeLog as c0,histVersionInfo as c1,appleBeta as c2,toOfficial as c3,useDataPage as c4,Sortable$1 as c5,getRecommendContent as c6,__unplugin_components_0$4 as c7,initEnvironment as c8,nodeList as c9,ignoreCouponTime as cA,getCoupons as cB,getPaymentStatus as cC,getVoucherPlugin as cD,createWithCreditByPanel as cE,createVoucherOrder as cF,unbindAuthorization as cG,getPrivilegeSoftList as cH,DataHandle as cI,getPaymentCouponList as cJ,getPluginRemarks as cK,os as cL,useLoading as cM,defaultVerify as cN,__unplugin_components_2$4 as cO,__unplugin_components_10 as cP,useTable as cQ,__unplugin_components_1 as cR,useRefresh as cS,useRefreshList as cT,useBatch as cU,reHistory as cV,swapString as cW,getDataInfo as cX,useHandleError as cY,_export_sfc as cZ,__unplugin_components_2$2 as c_,useRequestCanceler as ca,editNode as cb,addNode as cc,getPanelUrl as cd,deleteNode as ce,getNodeClassList as cf,restartNode as cg,bindApp as ch,setNodeBatchClass as ci,verifyApp as cj,batchDelNode as ck,getClbAllNode as cl,getSoftStatus as cm,useSettingsStore as cn,updateServiceApi as co,getVersionsInfo as cp,setHideMenuList as cq,getMenuList as cr,menuRoute as cs,menuName as ct,pid as cu,getProductBuyCode as cv,getLastPaidTime as cw,getCredits as cx,getProductPrice as cy,getApplyCopon as cz,bindBtUserName as d,checkDomainIp as d$,__unplugin_components_1$2 as d0,__unplugin_components_2$1 as d1,__unplugin_components_2 as d2,__unplugin_components_0 as d3,__unplugin_components_1$1 as d4,phpmyadminClientCheck as d5,imitatePhpAdminPanelForm as d6,imitatePhpAdminForm as d7,__unplugin_components_3 as d8,getAdHideConfig as d9,restoreBackup$1 as dA,updateDockerMysqlPassword as dB,checkObjKey as dC,getSimplifyTime as dD,getDuration as dE,toHalfWidth as dF,setBackupPopup as dG,getToken as dH,getMailScanLog as dI,getServiceConfig as dJ,saveServiceConfig as dK,deepClone as dL,nodeSSHSet as dM,setNewAlarmTask as dN,domainOrIpPortVerify as dO,getComplexRandomString as dP,getMsgInfo as dQ,getFileBody as dR,getDefaultViewConfig as dS,set404ViewStatus as dT,setDefaultViewConfig as dU,getDefaultSite as dV,setDefaultSite as dW,getHttpsInfo as dX,setHttpsMode as dY,setGlobalHttp2https as dZ,__unplugin_components_0$1 as d_,useAllTable as da,__unplugin_components_5$1 as db,useOperation as dc,useRecommendSearch as dd,useErrorMask as de,setCookie as df,setUsername as dg,refreshBrowser as dh,getAlarmTaskList as di,upDateNewAlarmTask as dj,setAtuoStartSyssafe as dk,decodeHtml as dl,getRandomPwd as dm,getCertList as dn,useTabs as dp,useECharts as dq,isRelease as dr,inputFocus as ds,deleteFile$1 as dt,getRandomChart as du,ContainerReName as dv,getConCmd as dw,getBackupList$1 as dx,backupDockerApp as dy,deleteBackup as dz,useDialog as e,getTemplateDetail as e$,setConAddNet as e0,setConOutNet as e1,getNetList as e2,setConReset as e3,editCon as e4,closePortLogin as e5,getNoPortConfig as e6,createPortProxy as e7,checkPort as e8,sendBaota as e9,searchOfficialTemplate as eA,deleteMirror as eB,getStorageList as eC,delStorage as eD,clearStorage as eE,jumpRouter as eF,setNodeUsedStatus as eG,checkDevImgPath as eH,installService as eI,ignoreNps as eJ,getNewNpsTag as eK,tencentLogin as eL,removeTask as eM,editFtpPort as eN,__unplugin_components_0$2 as eO,closeAllDialog as eP,setDockerSiteEdate as eQ,setAdHideConfig as eR,AddContainerStatus as eS,getMirrorList as eT,editProduct as eU,addProduct as eV,getTemplateList as eW,getContainerControl as eX,__unplugin_components_0$3 as eY,editTemplate as eZ,addTemplate as e_,addSlaveToRedisGroup as ea,getGroupDetail as eb,getCertInfo as ec,useDynamicTable as ed,UIAutomator as ee,getBindCode as ef,__unplugin_components_2$5 as eg,getSiteList as eh,getCateList as ei,delCate as ej,setCate as ek,getDockerSiteEnvList as el,setSiteStatus as em,setSiteRemark as en,delDockerSite as eo,delEnv as ep,delBatchEnv as eq,cleanBuildCache as er,setEnvStatus as es,refreshEnvTemplate as et,getEnvVersion as eu,setDockerSiteCate as ev,delBatchDockerSite as ew,hasOwnProperty as ex,removeEmptyValues as ey,isFunction$1 as ez,useMessage as f,updateDockerComposeVersion as f$,dokcerInstall as f0,addContainerBackup as f1,getContainerBackupList as f2,delContainerBackup as f3,getImageDetail as f4,getImageTag as f5,getpullMirror as f6,clearMirror as f7,checkTemplateUsed as f8,delTemplate as f9,proxyUrlCache as fA,setDockerSiteBuffer as fB,proxyUrlCompress as fC,proxyUrlAddLimit as fD,delProxyUrlReplace as fE,proxyUrlBatchDelLimit as fF,proxyUrlDelLimit as fG,useDockerStore as fH,getStashList as fI,setConMirror as fJ,pullMirror as fK,validatePort as fL,checkLoginAuth as fM,setPassword as fN,setlastPassword as fO,axios as fP,getDockerSystemInfo as fQ,getContainerList as fR,getContainerInfo as fS,clearCon as fT,getContainerPath as fU,setContainerTop as fV,contrastTableConfig as fW,delNet as fX,clearNet as fY,delStash as fZ,setConfigFile as f_,ipVerify as fa,pawVerify as fb,pathVerify as fc,delUnsubscribeInfo as fd,getUnsubscribeInfo as fe,setUnsubscribeInfo as ff,setIpRotateApi as fg,checkPanelUrl as fh,panelUrlVerify as fi,isNil as fj,getNodeSites as fk,setClbCache as fl,checkDomainOrIpPort as fm,createRedisGroup as fn,getCreationStatus as fo,addMysqlSlave as fp,getDatabaseList as fq,getSyncStatus as fr,syncMysqlSlaveConfig as fs,getProxyUrlData as ft,editProxyUrlDataRemark as fu,delProxyUrlData as fv,addProxyUrlData as fw,editProxyUrlInfo as fx,setProxyUrlCustom as fy,addProxyUrlReplace as fz,getWechatAuthUrl as g,editMailbox as g$,setDocker as g0,repairDocker as g1,checkUnstaillStatus as g2,setMonitor as g3,setMonitorDate as g4,setDockerGlobal as g5,getSystemInfo as g6,setDockerProjectPath as g7,getDataList as g8,delTaskStatus as g9,getComposeRestoreConfig as gA,createComposeRestore as gB,createComposeBackup as gC,checkIps as gD,addN as gE,addStorage as gF,addStash as gG,editStash as gH,dokcerUnInstall as gI,checkComposeUrl as gJ,setComposePath as gK,repairRisk as gL,setIgnore as gM,getTaskUnsubscribe as gN,delMxTxtCache as gO,editMailBcc as gP,addMailBcc as gQ,nodeSSHDelApi as gR,nodeSSHPort as gS,getAvailableNodes as gT,removeRedisGroupSlave as gU,reconnectRedisSlave as gV,useSearch as gW,updatePanelEnv as gX,getUpdatePanelEnvLog as gY,getSystemInfo$1 as gZ,getHomeResData as g_,getClbList as ga,getTcpUdpClbList as gb,setTaskStatus as gc,getAlarmList as gd,getLogsApi as ge,cleanLogsApi as gf,saveServerSslApi as gg,setServerAddressApi as gh,setServiceStatus as gi,checkPhone as gj,getOtheAccreditURL as gk,getStartErrType as gl,setInnodbRecovery as gm,getCookie as gn,checkDomainPort as go,useLogSelection as gp,getAllContainerLog as gq,getContainerLog as gr,clearContainerLog as gs,CmdAddContainer as gt,getBuildMirror as gu,getPushMirror as gv,getExportMirror as gw,getComposeBackupList as gx,importBackup as gy,deleteComposeBackup as gz,getFormKey as h,getBlacklistTips as h$,addMailbox as h0,getDomainName as h1,getMailStore as h2,getMailboxList as h3,getRoundcubeStatus as h4,loginRoundcube as h5,delMailbox as h6,getNodeFileSize as h7,deleteNodeFile as h8,createNodeFile as h9,modifyAccountApi as hA,createAccountApi as hB,getAccountListApi as hC,getAccountTempLoginTokenApi as hD,createTypeApi as hE,modifyTypeApi as hF,removeTypeApi as hG,removeAccountApi as hH,useColumn as hI,createSelectionfile as hJ,getSelectDir as hK,getPckageVm as hL,searchTemplate as hM,addDirTemplate as hN,has$2 as hO,useRadioButton as hP,useTableSelect as hQ,editDomain as hR,addDomain as hS,setDomainCatchall as hT,getDomains as hU,flushDomainRecord as hV,delDomain as hW,checkBlacklists as hX,autoCreateDNSRecord as hY,getIpList as hZ,setBlacklistTips as h_,getNodeFileList as ha,createFileTransferTask as hb,modifyPackageApi as hc,createPackageApi as hd,getPackageListApi as he,removePackageApi as hf,enableDiskQuotaApi as hg,setDefaultDiskApi as hh,getDiskListApi as hi,getRandom as hj,generatePasswordByConfig as hk,emptyCookie as hl,installJDK as hm,dokcerInstall$1 as hn,installRecommendedSoft as ho,createDir as hp,getSoftList as hq,getTaskErrorDetails as hr,getTaskError as hs,exportHttpClbLog as ht,exportTcpUdpClbLog as hu,addDay as hv,getTcpUdpClbLog as hw,getHttpClbLog as hx,installService$1 as hy,getTypeListApi as hz,isUndefined as i,retryExecutorTask as i$,addNodeClass as i0,deleteNodeClass as i1,setPHPMyAdminPass as i2,changePhpmyadminSslPort as i3,setPhpmyadminSsl as i4,getKey as i5,getPhpVersion as i6,getPhpmyadminSsl as i7,checkNodeFile as i8,DEFAULT_COLOR_PRESETS as i9,setWorkorder as iA,setAiTip as iB,setCommonAccount as iC,getBindWxCode as iD,setDefaultSender as iE,setBindStatus as iF,testBindAlarm as iG,unBindWxAccount as iH,unBindCommonAccount as iI,createDockerSite as iJ,getDockerSiteConAndAppList as iK,setSmsStatus as iL,deleteMysqlSlave as iM,getMysqlSlaveHistory as iN,deleteMysqlSlaveHistory as iO,setMysqlSlave as iP,getMysqlSlaveInfo as iQ,getSlaveList as iR,delectRedisGroup as iS,getRedisList as iT,getScriptList as iU,deleteScript as iV,modifyScript as iW,createScript as iX,getCommandTaskInfo as iY,getTransferFileTaskInfo as iZ,getFlowTaskList as i_,contrastColors as ia,checkPresetColor as ib,setMsgConfig as ic,getMsgFun as id,getGpuInfoByIndex as ie,getAllGpuDeviceInformation as ig,getOllamaModelList as ih,getOllamaModelDetail as ii,downloadOllamaModel as ij,delOllamaModel as ik,getPhpSiteList as il,deleteClbHttpApi as im,editHttpSeeting as io,batchDelHttpClb as ip,deleteTcpUdpClb as iq,batchDelTcpUdpClb as ir,getTaskSpeed as is,scrollBottom as it,removeTaskFile as iu,installedMsgList as iv,getExecLog as iw,setDomainCert as ix,folderDeployCert as iy,delDomainCert as iz,router as j,getDockerSiteDomains as j$,Sortable as j0,AutoScrollPlugin as j1,stopFlowTask as j2,nodeGetDir as j3,createFlowTemplate as j4,getFlowTemplateList as j5,deleteFlowTemplate as j6,confetti as j7,GLOBAL_STORE as j8,cond as j9,md5 as jA,setDockerApphubGit as jB,importGitApphub as jC,installApphub as jD,parserZipApphub as jE,importZipApphub as jF,useBottomConfetti as jG,getUserList as jH,getInboxMails as jI,moveSpamMail as jJ,deleteMail as jK,getOutboxMails as jL,getSpamMails as jM,restoreSpam as jN,sendMailContent as jO,checkUrl as jP,setFullScreen as jQ,exitFullscreen as jR,createProxyUrl as jS,useTerminalSelection as jT,getEnvExtend as jU,getEnvExtendTemplate as jV,delPhpTemplate as jW,delBatchPhpTemplate as jX,createEnv as jY,setPhpTemplate as jZ,getEnvLog as j_,equals as ja,AxiosCanceler as jb,sort$3 as jc,ascend as jd,prop as je,descend as jf,useThemeSync as jg,mountDirective as jh,mountErrorHandler as ji,getComposeConLog as jj,setComposeRemark as jk,getDockerAppList as jl,getDockerType as jm,getInstalledApps as jn,getDockerApphubConfig as jo,clearApp as jp,getDatabaseTerminalCmd as jq,setAppStatus as jr,removeApp as js,installApp as jt,getDependenceApps as ju,getUpdateVersions as jv,updateApp as jw,getAppComposeFile as jx,getAppRunLog as jy,getAppInstallLog as jz,useDataHandle as k,saveBackupTask as k$,setDockerSiteHttpsPort as k0,addDockerSiteDomain as k1,delDockerSiteDomain as k2,getDockerSiteDir as k3,getDockerSiteDirUserINI as k4,setDockerSiteDir as k5,setDockerSiteRunDir as k6,setDockerSiteini as k7,delRewriteTel as k8,getRewriteLists as k9,proxyGlobalBatchDelLimit as kA,proxyGlobalDelLimit as kB,getDockerSitePhp as kC,setDockerSitePhp as kD,clearCookie as kE,setSaveDay as kF,getSaveDays as kG,uninstallRoundcube as kH,installRoundcube as kI,addRoundcubeConfig as kJ,getDomain as kK,openServiceMonitor as kL,closeServiceMonitor as kM,getServiceMonitor as kN,getServiceStatus as kO,setServiceStatus$1 as kP,repairService as kQ,openAutoSSLTask as kR,closeAutoSSLTask as kS,getAutoSSLTaskStatus as kT,getBccList as kU,delMailBcc as kV,getForwardList as kW,addForward as kX,editForward as kY,deleteForward as kZ,getMailboxListByName as k_,setRewriteTel as ka,getRewrite as kb,setRewrite as kc,getProxyConfigFile as kd,saveProxyConfigFile as ke,modifyRedirect as kf,removeRedirect as kg,getRedirectFile as kh,createRedirect as ki,getSecurity as kj,setSecurity as kk,getSiteLog as kl,proxyGetGlobal as km,clearProxyCache as kn,proxyGlobalCache as ko,proxyGlobalCompress as kp,proxyGlobalAddLimit as kq,proxyGlobalEditBasic as kr,proxyGlobalAddBasic as ks,proxyGlobalSetWebsocket as kt,set404Status as ku,get404Content as kv,seIpv6Status as kw,proxyGlobalDelBasic as kx,proxyGlobalSetLogs as ky,set404Content as kz,getTaskTemplate as l,removeSearchHistory as l$,closeBackupTask as l0,getCloudList as l1,getBackupParams as l2,restoreBackup as l3,getBackupList as l4,deleteFile as l5,getBackupPath as l6,getIpAddressList as l7,addIpTagApi as l8,editIpTagApi as l9,addMailType as lA,setUnsubscribeType as lB,getContactsEcharts as lC,getUnsubscribeList as lD,editSubscribeState as lE,delUnsubscribe as lF,getMassMailList as lG,delMassMailList as lH,getMassAbnormal as lI,delAbnormalMailList as lJ,delAbnormalMailAll as lK,getMassAbnormalType as lL,getMailTemplateList as lM,addMailTemplate as lN,delMailTemplate as lO,getNps as lP,setEvaluate as lQ,useNegotiate as lR,getLoginStatus as lS,getRandomPrefix as lT,getTaskLists as lU,checkEmail as lV,isMobile as lW,isPromise as lX,inputZips as lY,getPluginUpgrades as lZ,splitEvery as l_,delIpTagApi as la,useMailStore as lb,setNoticeIgnore as lc,delTaskStatus$1 as ld,getSystemConfigProjectList as le,getMemoBody as lf,getTemplateOverview as lg,isDev as lh,useIdle as li,getOverviewInfo as lj,getMailTemplateSelect as lk,importContacts as ll,getMailTypeList as lm,getContactNumber as ln,getMailTemplateContent as lo,editMailTemplate as lp,sendTestMail as lq,editSendTask as lr,addSendTask as ls,getTaskList as lt,deleteTask as lu,setPauseTask as lv,setContactChange as lw,importContactsEtypes as lx,editMailType as ly,delMailType as lz,isArray$2 as m,clearSearchHistory as m0,inputPackageInfo as m1,delCustomModule as m2,setCustomModule as m3,addCustomModule as m4,getCustomModule as m5,getDownloadSpeed as m6,getActivityInfo as m7,claimActivityDiscount as m8,installAlarmModule as m9,getPluginAuth as ma,isCurrentRouter as mb,delToken as mc,type as md,checkVersion as me,useVisibility as mf,index$4 as mg,global$2 as mh,index$3 as mi,index$2 as mj,isString$1 as n,getPageTotal as o,getSystemTheme as p,setSchemeThemeWithViewTransition as q,rsaEncrypt as r,setWechatBindUser as s,getPresetColor as t,useAxios as u,getColorName as v,useConfirm as w,getDefaultConfigPart as x,createConfigPart as y,validateFileType as z};
function __vite__mapDeps(indexes) {
if (!__vite__mapDeps.viteFileDeps) {
__vite__mapDeps.viteFileDeps = []
}
return indexes.map((i) => __vite__mapDeps.viteFileDeps[i])
}