kline-charts-react 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +388 -0
- package/dist/KLineChart.d.ts +5 -0
- package/dist/components/IndicatorDisplay/IndicatorDisplay.d.ts +12 -0
- package/dist/components/IndicatorDisplay/index.d.ts +1 -0
- package/dist/components/IndicatorSelector/IndicatorSelector.d.ts +12 -0
- package/dist/components/IndicatorSelector/index.d.ts +1 -0
- package/dist/components/Loading/Loading.d.ts +8 -0
- package/dist/components/Loading/index.d.ts +1 -0
- package/dist/components/MADisplay/MADisplay.d.ts +10 -0
- package/dist/components/MADisplay/index.d.ts +1 -0
- package/dist/components/PeriodSelector/PeriodSelector.d.ts +10 -0
- package/dist/components/PeriodSelector/index.d.ts +1 -0
- package/dist/components/SubPaneTitle/SubPaneTitle.d.ts +13 -0
- package/dist/components/SubPaneTitle/index.d.ts +1 -0
- package/dist/components/Toolbar/Toolbar.d.ts +20 -0
- package/dist/components/Toolbar/index.d.ts +1 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/useEcharts.d.ts +26 -0
- package/dist/hooks/useKlineData.d.ts +24 -0
- package/dist/hooks/useZoomHistory.d.ts +18 -0
- package/dist/index.cjs +51 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +26563 -0
- package/dist/index.umd.js +51 -0
- package/dist/kline-charts-react.css +1 -0
- package/dist/types/data.d.ts +207 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/props.d.ts +279 -0
- package/dist/types/theme.d.ts +47 -0
- package/dist/utils/cache.d.ts +56 -0
- package/dist/utils/formatters.d.ts +115 -0
- package/dist/utils/index.d.ts +5 -0
- package/dist/utils/indicators.d.ts +109 -0
- package/dist/utils/optionBuilder.d.ts +32 -0
- package/dist/utils/timelineBuilder.d.ts +11 -0
- package/package.json +95 -0
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";var G1=Object.defineProperty;var $1=(r,t,e)=>t in r?G1(r,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[t]=e;var Ol=(r,t,e)=>$1(r,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react/jsx-runtime"),W=require("react"),Tf={backgroundColor:"#ffffff",textColor:"#333333",textColorSecondary:"#999999",gridLineColor:"#e0e0e0",upColor:"#f5222d",downColor:"#52c41a",maColors:["#f5a623","#1890ff","#722ed1","#13c2c2","#eb2f96","#faad14","#a0d911"],volumeUpColor:"#f5222d",volumeDownColor:"#52c41a",crosshairColor:"#999999",tooltipBgColor:"rgba(255,255,255,0.96)",tooltipBorderColor:"#e0e0e0",splitLineColor:"#f0f0f0",areaColor:"rgba(24,144,255,0.1)",activeColor:"#1890ff"},jg={backgroundColor:"#1a1a1a",textColor:"#d1d1d1",textColorSecondary:"#666666",gridLineColor:"#333333",upColor:"#f5222d",downColor:"#52c41a",maColors:["#f5a623","#1890ff","#722ed1","#13c2c2","#eb2f96","#faad14","#a0d911"],volumeUpColor:"#f5222d",volumeDownColor:"#52c41a",crosshairColor:"#666666",tooltipBgColor:"rgba(30,30,30,0.96)",tooltipBorderColor:"#333333",splitLineColor:"#2a2a2a",areaColor:"rgba(24,144,255,0.15)",activeColor:"#1890ff"};function Zg(r){return typeof r=="string"?r==="dark"?jg:Tf:{...Tf,...r}}var U1=Object.defineProperty,Xg=(r,t)=>{for(var e in t)U1(r,e,{get:t[e],enumerable:!0})};function Y1(r){return new TextDecoder("gbk").decode(r)}function j1(r){let t=r.split(";").map(n=>n.trim()).filter(Boolean),e=[];for(let n of t){let i=n.indexOf("=");if(i<0)continue;let a=n.slice(0,i).trim();a.startsWith("v_")&&(a=a.slice(2));let o=n.slice(i+1).trim();o.startsWith('"')&&o.endsWith('"')&&(o=o.slice(1,-1));let s=o.split("~");e.push({key:a,fields:s})}return e}function Y(r){if(!r||r==="")return 0;let t=parseFloat(r);return Number.isNaN(t)?0:t}function bt(r){if(!r||r==="")return null;let t=parseFloat(r);return Number.isNaN(t)?null:t}function ut(r){if(!r||r===""||r==="-")return null;let t=parseFloat(r);return Number.isNaN(t)?null:t}function Et(r){return r==null?null:ut(String(r))}var Z1="https://qt.gtimg.cn",X1="https://web.ifzq.gtimg.cn/appstock/app/minute/query",q1="https://assets.linkdiary.cn/shares/zh_a_list.json",K1="https://assets.linkdiary.cn/shares/us_list.json",Q1="https://assets.linkdiary.cn/shares/hk_list.json",J1="https://assets.linkdiary.cn/shares/trade-data-list.txt",qg="https://push2his.eastmoney.com/api/qt/stock/kline/get",tw="https://push2his.eastmoney.com/api/qt/stock/trends2/get",ew="https://33.push2his.eastmoney.com/api/qt/stock/kline/get",rw="https://63.push2his.eastmoney.com/api/qt/stock/kline/get",nw="https://17.push2.eastmoney.com/api/qt/clist/get",iw="https://91.push2.eastmoney.com/api/qt/stock/get",aw="https://29.push2.eastmoney.com/api/qt/clist/get",ow="https://7.push2his.eastmoney.com/api/qt/stock/kline/get",sw="https://push2his.eastmoney.com/api/qt/stock/trends2/get",lw="https://79.push2.eastmoney.com/api/qt/clist/get",uw="https://91.push2.eastmoney.com/api/qt/stock/get",fw="https://29.push2.eastmoney.com/api/qt/clist/get",hw="https://91.push2his.eastmoney.com/api/qt/stock/kline/get",cw="https://push2his.eastmoney.com/api/qt/stock/trends2/get",vw="https://datacenter-web.eastmoney.com/api/data/v1/get",dw=3e4,Ah=500,Ih=500,Eh=7,pw=3,gw=1e3,mw=3e4,yw=2,_w=[408,429,500,502,503,504],ww=class{constructor(r={}){let t=r.requestsPerSecond??5;this.maxTokens=r.maxBurst??t,this.tokens=this.maxTokens,this.refillRate=t/1e3,this.lastRefillTime=Date.now()}refill(){let r=Date.now(),t=(r-this.lastRefillTime)*this.refillRate;this.tokens=Math.min(this.maxTokens,this.tokens+t),this.lastRefillTime=r}tryAcquire(){return this.refill(),this.tokens>=1?(this.tokens-=1,!0):!1}getWaitTime(){if(this.refill(),this.tokens>=1)return 0;let r=1-this.tokens;return Math.ceil(r/this.refillRate)}async acquire(){let r=this.getWaitTime();r>0&&await this.sleep(r),this.refill(),this.tokens-=1}sleep(r){return new Promise(t=>setTimeout(t,r))}getAvailableTokens(){return this.refill(),this.tokens}},Uc=["Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:121.0) Gecko/20100101 Firefox/121.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:120.0) Gecko/20100101 Firefox/120.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:121.0) Gecko/20100101 Firefox/121.0","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.2 Safari/605.1.15","Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1 Safari/605.1.15","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0","Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"],Nl=0;function bw(){return typeof window<"u"&&typeof window.document<"u"}function Sw(){if(bw())return;let r=Uc[Nl];return Nl=(Nl+1)%Uc.length,r}var Kg=class extends Error{constructor(r="Circuit breaker is OPEN"){super(r),this.name="CircuitBreakerError"}},xw=class{constructor(r={}){this.state="CLOSED",this.failureCount=0,this.lastFailureTime=0,this.halfOpenSuccessCount=0,this.failureThreshold=r.failureThreshold??5,this.resetTimeout=r.resetTimeout??3e4,this.halfOpenRequests=r.halfOpenRequests??1,this.onStateChange=r.onStateChange}getState(){return this.checkStateTransition(),this.state}canRequest(){switch(this.checkStateTransition(),this.state){case"CLOSED":return!0;case"OPEN":return!1;case"HALF_OPEN":return this.halfOpenSuccessCount<this.halfOpenRequests}}recordSuccess(){this.checkStateTransition(),this.state==="HALF_OPEN"?(this.halfOpenSuccessCount++,this.halfOpenSuccessCount>=this.halfOpenRequests&&this.transitionTo("CLOSED")):this.state==="CLOSED"&&(this.failureCount=0)}recordFailure(){this.lastFailureTime=Date.now(),this.state==="HALF_OPEN"?this.transitionTo("OPEN"):this.state==="CLOSED"&&(this.failureCount++,this.failureCount>=this.failureThreshold&&this.transitionTo("OPEN"))}checkStateTransition(){this.state==="OPEN"&&Date.now()-this.lastFailureTime>=this.resetTimeout&&this.transitionTo("HALF_OPEN")}transitionTo(r){var e;if(this.state===r)return;let t=this.state;this.state=r,r==="CLOSED"?(this.failureCount=0,this.halfOpenSuccessCount=0):r==="HALF_OPEN"&&(this.halfOpenSuccessCount=0),(e=this.onStateChange)==null||e.call(this,t,r)}reset(){this.transitionTo("CLOSED"),this.failureCount=0,this.halfOpenSuccessCount=0,this.lastFailureTime=0}async execute(r){if(!this.canRequest())throw new Kg;try{let t=await r();return this.recordSuccess(),t}catch(t){throw this.recordFailure(),t}}getStats(){return{state:this.getState(),failureCount:this.failureCount,lastFailureTime:this.lastFailureTime,halfOpenSuccessCount:this.halfOpenSuccessCount}}},Yc=class extends Error{constructor(r,t,e,n){let i=t?` ${t}`:"",a=e?`, url: ${e}`:"",o=n?`, provider: ${n}`:"";super(`HTTP error! status: ${r}${i}${a}${o}`),this.status=r,this.statusText=t,this.url=e,this.provider=n,this.name="HttpError"}},Cw=class{constructor(r={}){this.baseUrl=r.baseUrl??Z1,this.timeout=r.timeout??dw,this.retryOptions=this.resolveRetryOptions(r.retry),this.headers={...r.headers??{}},this.rotateUserAgent=r.rotateUserAgent??!1,this.rateLimiter=r.rateLimit?new ww(r.rateLimit):null,this.circuitBreaker=r.circuitBreaker?new xw(r.circuitBreaker):null,r.userAgent&&(Object.keys(this.headers).some(t=>t.toLowerCase()==="user-agent")||(this.headers["User-Agent"]=r.userAgent))}resolveRetryOptions(r){return{maxRetries:(r==null?void 0:r.maxRetries)??pw,baseDelay:(r==null?void 0:r.baseDelay)??gw,maxDelay:(r==null?void 0:r.maxDelay)??mw,backoffMultiplier:(r==null?void 0:r.backoffMultiplier)??yw,retryableStatusCodes:(r==null?void 0:r.retryableStatusCodes)??_w,retryOnNetworkError:(r==null?void 0:r.retryOnNetworkError)??!0,retryOnTimeout:(r==null?void 0:r.retryOnTimeout)??!0,onRetry:r==null?void 0:r.onRetry}}inferProvider(r){try{let t=new URL(r).hostname;if(t.includes("eastmoney.com"))return"eastmoney";if(t.includes("gtimg.cn"))return"tencent";if(t.includes("linkdiary.cn"))return"linkdiary"}catch{return}}getTimeout(){return this.timeout}calculateDelay(r){return Math.min(this.retryOptions.baseDelay*Math.pow(this.retryOptions.backoffMultiplier,r),this.retryOptions.maxDelay)+Math.random()*100}sleep(r){return new Promise(t=>setTimeout(t,r))}shouldRetry(r,t){return t>=this.retryOptions.maxRetries?!1:r instanceof DOMException&&r.name==="AbortError"?this.retryOptions.retryOnTimeout:r instanceof TypeError?this.retryOptions.retryOnNetworkError:r instanceof Yc?this.retryOptions.retryableStatusCodes.includes(r.status):!1}async executeWithRetry(r,t=0){var e,n;try{let i=await r();return(e=this.circuitBreaker)==null||e.recordSuccess(),i}catch(i){if(this.shouldRetry(i,t)){let a=this.calculateDelay(t);return this.retryOptions.onRetry&&i instanceof Error&&this.retryOptions.onRetry(t+1,i,a),await this.sleep(a),this.executeWithRetry(r,t+1)}throw(n=this.circuitBreaker)==null||n.recordFailure(),i}}async get(r,t={}){if(this.circuitBreaker&&!this.circuitBreaker.canRequest())throw new Kg("Circuit breaker is OPEN, request rejected");return this.rateLimiter&&await this.rateLimiter.acquire(),this.executeWithRetry(async()=>{let e=new AbortController,n=setTimeout(()=>e.abort(),this.timeout),i=this.inferProvider(r),a={...this.headers};if(this.rotateUserAgent){let o=Sw();o&&(a["User-Agent"]=o)}try{let o=await fetch(r,{signal:e.signal,headers:a});if(!o.ok)throw new Yc(o.status,o.statusText,r,i);switch(t.responseType){case"json":return await o.json();case"arraybuffer":return await o.arrayBuffer();default:return await o.text()}}catch(o){throw o instanceof Error&&(o.url=r,o.provider=i),o}finally{clearTimeout(n)}})}async getTencentQuote(r){let t=`${this.baseUrl}/?q=${encodeURIComponent(r)}`,e=await this.get(t,{responseType:"arraybuffer"}),n=Y1(e);return j1(n)}},Tw=new Set(["daily","weekly","monthly"]),Dw=new Set(["1","5","15","30","60"]),Mw=new Set(["","qfq","hfq"]);function Hr(r,t){if(!Number.isFinite(r)||!Number.isInteger(r)||r<=0)throw new RangeError(`${t} must be a positive integer`)}function Hs(r){if(!Tw.has(r))throw new RangeError("period must be one of: daily, weekly, monthly")}function Qg(r){if(!Dw.has(r))throw new RangeError("period must be one of: 1, 5, 15, 30, 60")}function Ua(r){if(!Mw.has(r))throw new RangeError("adjust must be one of: '', 'qfq', 'hfq'")}function Lh(r,t){Hr(t,"chunkSize");let e=[];for(let n=0;n<r.length;n+=t)e.push(r.slice(n,n+t));return e}async function Ph(r,t){Hr(t,"concurrency");let e=[],n=[];for(let i of r){let a=Promise.resolve().then(()=>i()).then(o=>{e.push(o)});if(n.push(a),n.length>=t){await Promise.race(n);for(let o=n.length-1;o>=0;o--)await Promise.race([n[o].then(()=>"fulfilled"),Promise.resolve("pending")])==="fulfilled"&&n.splice(o,1)}}return await Promise.all(n),e}function Jg(r){return r.startsWith("sh")?"1":r.startsWith("sz")||r.startsWith("bj")?"0":r.startsWith("6")?"1":"0"}function Ws(r){return{daily:"101",weekly:"102",monthly:"103"}[r]}function Ya(r){return{"":"0",qfq:"1",hfq:"2"}[r]}var Vt={};Xg(Vt,{getAShareCodeList:()=>kw,getAllHKQuotesByCodes:()=>zw,getAllQuotesByCodes:()=>Fw,getAllUSQuotesByCodes:()=>Vw,getFullQuotes:()=>sm,getFundFlow:()=>Iw,getFundQuotes:()=>Lw,getHKCodeList:()=>Bw,getHKQuotes:()=>lm,getPanelLargeOrder:()=>Ew,getSimpleQuotes:()=>Aw,getTodayTimeline:()=>Pw,getTradingCalendar:()=>Hw,getUSCodeList:()=>Nw,getUSQuotes:()=>um,parseFullQuote:()=>tm,parseFundFlow:()=>rm,parseFundQuote:()=>om,parseHKQuote:()=>im,parsePanelLargeOrder:()=>nm,parseSimpleQuote:()=>em,parseUSQuote:()=>am,search:()=>jw});function tm(r){let t=[];for(let n=0;n<5;n++)t.push({price:Y(r[9+n*2]),volume:Y(r[10+n*2])});let e=[];for(let n=0;n<5;n++)e.push({price:Y(r[19+n*2]),volume:Y(r[20+n*2])});return{marketId:r[0]??"",name:r[1]??"",code:r[2]??"",price:Y(r[3]),prevClose:Y(r[4]),open:Y(r[5]),volume:Y(r[6]),outerVolume:Y(r[7]),innerVolume:Y(r[8]),bid:t,ask:e,time:r[30]??"",change:Y(r[31]),changePercent:Y(r[32]),high:Y(r[33]),low:Y(r[34]),volume2:Y(r[36]),amount:Y(r[37]),turnoverRate:bt(r[38]),pe:bt(r[39]),amplitude:bt(r[43]),circulatingMarketCap:bt(r[44]),totalMarketCap:bt(r[45]),pb:bt(r[46]),limitUp:bt(r[47]),limitDown:bt(r[48]),volumeRatio:bt(r[49]),avgPrice:bt(r[51]),peStatic:bt(r[52]),peDynamic:bt(r[53]),high52w:bt(r[67]),low52w:bt(r[68]),circulatingShares:bt(r[72]),totalShares:bt(r[73]),raw:r}}function em(r){return{marketId:r[0]??"",name:r[1]??"",code:r[2]??"",price:Y(r[3]),change:Y(r[4]),changePercent:Y(r[5]),volume:Y(r[6]),amount:Y(r[7]),marketCap:bt(r[9]),marketType:r[10]??"",raw:r}}function rm(r){return{code:r[0]??"",mainInflow:Y(r[1]),mainOutflow:Y(r[2]),mainNet:Y(r[3]),mainNetRatio:Y(r[4]),retailInflow:Y(r[5]),retailOutflow:Y(r[6]),retailNet:Y(r[7]),retailNetRatio:Y(r[8]),totalFlow:Y(r[9]),name:r[12]??"",date:r[13]??"",raw:r}}function nm(r){return{buyLargeRatio:Y(r[0]),buySmallRatio:Y(r[1]),sellLargeRatio:Y(r[2]),sellSmallRatio:Y(r[3]),raw:r}}function im(r){return{marketId:r[0]??"",name:r[1]??"",code:r[2]??"",price:Y(r[3]),prevClose:Y(r[4]),open:Y(r[5]),volume:Y(r[6]),time:r[30]??"",change:Y(r[31]),changePercent:Y(r[32]),high:Y(r[33]),low:Y(r[34]),amount:Y(r[37]),lotSize:bt(r[40]),circulatingMarketCap:bt(r[44]),totalMarketCap:bt(r[45]),currency:r[r.length-3]??"",raw:r}}function am(r){return{marketId:r[0]??"",name:r[1]??"",code:r[2]??"",price:Y(r[3]),prevClose:Y(r[4]),open:Y(r[5]),volume:Y(r[6]),time:r[30]??"",change:Y(r[31]),changePercent:Y(r[32]),high:Y(r[33]),low:Y(r[34]),amount:Y(r[37]),turnoverRate:bt(r[38]),pe:bt(r[39]),amplitude:bt(r[43]),totalMarketCap:bt(r[45]),pb:bt(r[47]),high52w:bt(r[48]),low52w:bt(r[49]),raw:r}}function om(r){return{code:r[0]??"",name:r[1]??"",nav:Y(r[5]),accNav:Y(r[6]),change:Y(r[7]),navDate:r[8]??"",raw:r}}async function sm(r,t){return!t||t.length===0?[]:(await r.getTencentQuote(t.join(","))).filter(e=>e.fields&&e.fields.length>0&&e.fields[0]!=="").map(e=>tm(e.fields))}async function Aw(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`s_${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>em(n.fields))}async function Iw(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`ff_${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>rm(n.fields))}async function Ew(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`s_pk${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>nm(n.fields))}async function lm(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`hk${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>im(n.fields))}async function um(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`us${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>am(n.fields))}async function Lw(r,t){if(!t||t.length===0)return[];let e=t.map(n=>`jj${n}`);return(await r.getTencentQuote(e.join(","))).filter(n=>n.fields&&n.fields.length>0&&n.fields[0]!=="").map(n=>om(n.fields))}async function Pw(r,t){var a,o,s;let e=r.getTimeout(),n=new AbortController,i=setTimeout(()=>n.abort(),e);try{let l=await fetch(`${X1}?code=${t}`,{signal:n.signal});if(!l.ok)throw new Error(`HTTP error! status: ${l.status}`);let u=await l.json();if(u.code!==0)throw new Error(u.msg||"API error");let f=(a=u.data)==null?void 0:a[t];if(!f)return{code:t,date:"",data:[]};let h=((o=f.data)==null?void 0:o.data)||[],c=((s=f.data)==null?void 0:s.date)||"",v=!1;if(h.length>0){let p=h[0].split(" "),g=parseFloat(p[1])||0,m=parseInt(p[2],10)||0,y=parseFloat(p[3])||0;m>0&&g>0&&y/m>g*50&&(v=!0)}let d=h.map(p=>{let g=p.split(" "),m=g[0],y=`${m.slice(0,2)}:${m.slice(2,4)}`,_=parseInt(g[2],10)||0,w=parseFloat(g[3])||0,b=v?_*100:_,S=b>0?w/b:0;return{time:y,price:parseFloat(g[1])||0,volume:b,amount:w,avgPrice:Math.round(S*100)/100}});return{code:t,date:c,data:d}}finally{clearTimeout(i)}}var Bl=null,ao=null,Fl=null;function Rw(r,t){let e=r.replace(/^(sh|sz|bj)/,"");switch(t){case"sh":return e.startsWith("6");case"sz":return e.startsWith("0")||e.startsWith("3");case"bj":return e.startsWith("92");case"kc":return e.startsWith("688");case"cy":return e.startsWith("30");default:return!0}}async function kw(r,t){var a;let e=!1,n;if(typeof t=="boolean"?e=!t:t&&(e=t.simple??!1,n=t.market),!Bl){let o=((a=await r.get(q1,{responseType:"json"}))==null?void 0:a.list)||[];Bl=o,o.map(s=>s.replace(/^(sh|sz|bj)/,""))}let i=Bl;return n&&(i=i.filter(o=>Rw(o,n))),e?i.map(o=>o.replace(/^(sh|sz|bj)/,"")):i.slice()}var Ow={NASDAQ:"105.",NYSE:"106.",AMEX:"107."};async function Nw(r,t){var a;let e=!1,n;typeof t=="boolean"?e=!t:t&&(e=t.simple??!1,n=t.market),ao||(ao=((a=await r.get(K1,{responseType:"json"}))==null?void 0:a.list)||[],ao.map(o=>o.replace(/^\d{3}\./,"")));let i=ao.slice();if(n){let o=Ow[n];i=i.filter(s=>s.startsWith(o))}return e?i.map(o=>o.replace(/^\d{3}\./,"")):i}async function Bw(r){var t;return Fl||(Fl=((t=await r.get(Q1,{responseType:"json"}))==null?void 0:t.list)||[]),Fl.slice()}async function Fw(r,t,e={}){let{batchSize:n=Ah,concurrency:i=Eh,onProgress:a}=e;Hr(n,"batchSize"),Hr(i,"concurrency");let o=Math.min(n,Ih),s=Lh(t,o),l=s.length,u=0,f=s.map(h=>async()=>{let c=await sm(r,h);return u++,a&&a(u,l),c});return(await Ph(f,i)).flat()}async function zw(r,t,e={}){let{batchSize:n=Ah,concurrency:i=Eh,onProgress:a}=e;Hr(n,"batchSize"),Hr(i,"concurrency");let o=Math.min(n,Ih),s=Lh(t,o),l=s.length,u=0,f=s.map(h=>async()=>{let c=await lm(r,h);return u++,a&&a(u,l),c});return(await Ph(f,i)).flat()}async function Vw(r,t,e={}){let{batchSize:n=Ah,concurrency:i=Eh,onProgress:a}=e;Hr(n,"batchSize"),Hr(i,"concurrency");let o=Math.min(n,Ih),s=Lh(t,o),l=s.length,u=0,f=s.map(h=>async()=>{let c=await um(r,h);return u++,a&&a(u,l),c});return(await Ph(f,i)).flat()}var Bn=null;async function Hw(r){if(Bn)return Bn.slice();let t=await r.get(J1);return!t||t.trim()===""?(Bn=[],Bn.slice()):(Bn=t.trim().split(",").map(e=>e.trim()).filter(e=>e.length>0),Bn.slice())}var fm="https://smartbox.gtimg.cn/s3/";function Ww(r){return r.replace(/\\u([0-9a-fA-F]{4})/g,(t,e)=>String.fromCharCode(parseInt(e,16)))}function Gw(r){return!r||r==="N"?[]:r.split("^").filter(Boolean).map(t=>{let e=t.split("~"),n=e[0]||"",i=e[1]||"",a=Ww(e[2]||""),o=e[4]||"";return{code:n+i,name:a,market:n,type:o}})}function $w(r){return new Promise((t,e)=>{let n=`${fm}?v=2&t=all&q=${encodeURIComponent(r)}`;window.v_hint="";let i=document.createElement("script");i.src=n,i.charset="utf-8",i.onload=()=>{let a=window.v_hint||"";document.body.removeChild(i),t(a)},i.onerror=()=>{document.body.removeChild(i),e(new Error("Network error calling Smartbox"))},document.body.appendChild(i)})}async function Uw(r,t){let e=`${fm}?v=2&t=all&q=${encodeURIComponent(t)}`,n=(await r.get(e)).match(/v_hint="([^"]*)"/);return n?n[1]:""}function Yw(){return typeof window<"u"&&typeof document<"u"}async function jw(r,t){if(!t||!t.trim())return[];let e;return Yw()?e=await $w(t):e=await Uw(r,t),Gw(e)}var jt={};Xg(jt,{getConceptConstituents:()=>ab,getConceptKline:()=>ob,getConceptList:()=>_m,getConceptMinuteKline:()=>sb,getConceptSpot:()=>ib,getDividendDetail:()=>ub,getHKHistoryKline:()=>qw,getHistoryKline:()=>Zw,getIndustryConstituents:()=>tb,getIndustryKline:()=>eb,getIndustryList:()=>ym,getIndustryMinuteKline:()=>rb,getIndustrySpot:()=>Jw,getMinuteKline:()=>Xw,getUSHistoryKline:()=>Kw});async function hm(r,t,e,n,i=100,a){var u;let o=[],s=1,l=0;do{let f=new URLSearchParams({...e,pn:String(s),pz:String(i),fields:n}),h=`${t}?${f.toString()}`,c=(u=await r.get(h,{responseType:"json"}))==null?void 0:u.data;if(!c||!Array.isArray(c.diff))break;s===1&&(l=c.total??0);let v=c.diff.map((d,p)=>a(d,o.length+p+1));o.push(...v),s++}while(o.length<l);return o}function ja(r){let[t,e,n,i,a,o,s,l,u,f,h]=r.split(",");return{date:t,open:ut(e),close:ut(n),high:ut(i),low:ut(a),volume:ut(o),amount:ut(s),amplitude:ut(l),changePercent:ut(u),change:ut(f),turnoverRate:ut(h)}}async function Za(r,t,e){var a,o,s;let n=`${t}?${e.toString()}`,i=await r.get(n,{responseType:"json"});return{klines:((a=i==null?void 0:i.data)==null?void 0:a.klines)||[],name:(o=i==null?void 0:i.data)==null?void 0:o.name,code:(s=i==null?void 0:i.data)==null?void 0:s.code}}async function Zw(r,t,e={}){let{period:n="daily",adjust:i="qfq",startDate:a="19700101",endDate:o="20500101"}=e;Hs(n),Ua(i);let s=t.replace(/^(sh|sz|bj)/,""),l=`${Jg(t)}.${s}`,u=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61,f116",ut:"7eea3edcaed734bea9cbfc24409ed989",klt:Ws(n),fqt:Ya(i),secid:l,beg:a,end:o}),f=qg,{klines:h}=await Za(r,f,u);return h.length===0?[]:h.map(c=>({...ja(c),code:s}))}async function Xw(r,t,e={}){var u,f;let{period:n="1",adjust:i="qfq",startDate:a="1979-09-01 09:32:00",endDate:o="2222-01-01 09:32:00"}=e;Qg(n),Ua(i);let s=t.replace(/^(sh|sz|bj)/,""),l=`${Jg(t)}.${s}`;if(n==="1"){let h=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13",fields2:"f51,f52,f53,f54,f55,f56,f57,f58",ut:"7eea3edcaed734bea9cbfc24409ed989",ndays:"5",iscr:"0",secid:l}),c=`${tw}?${h.toString()}`,v=(f=(u=await r.get(c,{responseType:"json"}))==null?void 0:u.data)==null?void 0:f.trends;if(!Array.isArray(v)||v.length===0)return[];let d=a.replace("T"," ").slice(0,16),p=o.replace("T"," ").slice(0,16);return v.map(g=>{let[m,y,_,w,b,S,x,T]=g.split(",");return{time:m,open:ut(y),close:ut(_),high:ut(w),low:ut(b),volume:ut(S),amount:ut(x),avgPrice:ut(T)}}).filter(g=>g.time>=d&&g.time<=p)}else{let h=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:"7eea3edcaed734bea9cbfc24409ed989",klt:n,fqt:Ya(i||""),secid:l,beg:"0",end:"20500000"}),c=qg,{klines:v}=await Za(r,c,h);if(v.length===0)return[];let d=a.replace("T"," ").slice(0,16),p=o.replace("T"," ").slice(0,16);return v.map(g=>{let m=ja(g);return{...m,time:m.date}}).filter(g=>g.time>=d&&g.time<=p)}}async function qw(r,t,e={}){let{period:n="daily",adjust:i="qfq",startDate:a="19700101",endDate:o="20500101"}=e;Hs(n),Ua(i);let s=t.replace(/^hk/i,"").padStart(5,"0"),l=`116.${s}`,u=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:"7eea3edcaed734bea9cbfc24409ed989",klt:Ws(n),fqt:Ya(i),secid:l,beg:a,end:o,lmt:"1000000"}),f=ew,{klines:h,name:c}=await Za(r,f,u);return h.length===0?[]:h.map(v=>({...ja(v),code:s,name:c||""}))}async function Kw(r,t,e={}){let{period:n="daily",adjust:i="qfq",startDate:a="19700101",endDate:o="20500101"}=e;Hs(n),Ua(i);let s=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",ut:"7eea3edcaed734bea9cbfc24409ed989",klt:Ws(n),fqt:Ya(i),secid:t,beg:a,end:o,lmt:"1000000"}),l=rw,{klines:u,name:f,code:h}=await Za(r,l,s),c=h||t.split(".")[1]||t,v=f||"";return u.length===0?[]:u.map(d=>({...ja(d),code:c,name:v}))}function cm(r){let t=null;return{async getCode(e,n,i){if(n.startsWith("BK"))return n;if(!t){let o=await i(e);t=new Map(o.map(s=>[s.name,s.code]))}let a=t.get(n);if(!a)throw new Error(`${r.errorPrefix}: ${n}`);return a}}}async function vm(r,t){let e={po:"1",np:"1",ut:"bd1d9ddb04089700cf9c27f6f7426281",fltt:"2",invt:"2",fid:t.type==="concept"?"f12":"f3",fs:t.fsFilter},n=t.type==="concept"?"f2,f3,f4,f8,f12,f14,f15,f16,f17,f18,f20,f21,f24,f25,f22,f33,f11,f62,f128,f124,f107,f104,f105,f136":"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f26,f22,f33,f11,f62,f128,f136,f115,f152,f124,f107,f104,f105,f140,f141,f207,f208,f209,f222",i=await hm(r,t.listUrl,e,n,100,(a,o)=>({rank:o,name:String(a.f14??""),code:String(a.f12??""),price:Et(a.f2),change:Et(a.f4),changePercent:Et(a.f3),totalMarketCap:Et(a.f20),turnoverRate:Et(a.f8),riseCount:Et(a.f104),fallCount:Et(a.f105),leadingStock:a.f128?String(a.f128):null,leadingStockChangePercent:Et(a.f136)}));return i.sort((a,o)=>(o.changePercent??0)-(a.changePercent??0)),i.forEach((a,o)=>{a.rank=o+1}),i}async function dm(r,t,e){var o;let n=new URLSearchParams({fields:"f43,f44,f45,f46,f47,f48,f170,f171,f168,f169",mpi:"1000",invt:"2",fltt:"1",secid:`90.${t}`}),i=`${e}?${n.toString()}`,a=(o=await r.get(i,{responseType:"json"}))==null?void 0:o.data;return a?[{key:"f43",name:"最新",divide:!0},{key:"f44",name:"最高",divide:!0},{key:"f45",name:"最低",divide:!0},{key:"f46",name:"开盘",divide:!0},{key:"f47",name:"成交量",divide:!1},{key:"f48",name:"成交额",divide:!1},{key:"f170",name:"涨跌幅",divide:!0},{key:"f171",name:"振幅",divide:!0},{key:"f168",name:"换手率",divide:!0},{key:"f169",name:"涨跌额",divide:!0}].map(({key:s,name:l,divide:u})=>{let f=a[s],h=null;return typeof f=="number"&&!isNaN(f)&&(h=u?f/100:f),{item:l,value:h}}):[]}async function pm(r,t,e){let n={po:"1",np:"1",ut:"bd1d9ddb04089700cf9c27f6f7426281",fltt:"2",invt:"2",fid:"f3",fs:`b:${t} f:!50`};return hm(r,e,n,"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f12,f13,f14,f15,f16,f17,f18,f20,f21,f23,f24,f25,f22,f11,f62,f128,f136,f115,f152,f45",100,(i,a)=>({rank:a,code:String(i.f12??""),name:String(i.f14??""),price:Et(i.f2),changePercent:Et(i.f3),change:Et(i.f4),volume:Et(i.f5),amount:Et(i.f6),amplitude:Et(i.f7),high:Et(i.f15),low:Et(i.f16),open:Et(i.f17),prevClose:Et(i.f18),turnoverRate:Et(i.f8),pe:Et(i.f9),pb:Et(i.f23)}))}async function gm(r,t,e,n={}){let{period:i="daily",adjust:a="",startDate:o="19700101",endDate:s="20500101"}=n;Hs(i),Ua(a);let l=new URLSearchParams({secid:`90.${t}`,fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",klt:Ws(i),fqt:Ya(a),beg:o,end:s,smplmt:"10000",lmt:"1000000"}),{klines:u}=await Za(r,e,l);return u.length===0?[]:u.map(f=>ja(f))}async function mm(r,t,e,n,i={}){var o,s,l,u;let{period:a="5"}=i;if(Qg(a),a==="1"){let f=new URLSearchParams({fields1:"f1,f2,f3,f4,f5,f6,f7,f8,f9,f10,f11,f12,f13",fields2:"f51,f52,f53,f54,f55,f56,f57,f58",iscr:"0",ndays:"1",secid:`90.${t}`}),h=`${n}?${f.toString()}`,c=(s=(o=await r.get(h,{responseType:"json"}))==null?void 0:o.data)==null?void 0:s.trends;return!Array.isArray(c)||c.length===0?[]:c.map(v=>{let[d,p,g,m,y,_,w,b]=v.split(",");return{time:d,open:ut(p),close:ut(g),high:ut(m),low:ut(y),volume:ut(_),amount:ut(w),price:ut(b)}})}else{let f=new URLSearchParams({secid:`90.${t}`,fields1:"f1,f2,f3,f4,f5,f6",fields2:"f51,f52,f53,f54,f55,f56,f57,f58,f59,f60,f61",klt:a,fqt:"1",beg:"0",end:"20500101",smplmt:"10000",lmt:"1000000"}),h=`${e}?${f.toString()}`,c=(u=(l=await r.get(h,{responseType:"json"}))==null?void 0:l.data)==null?void 0:u.klines;return!Array.isArray(c)||c.length===0?[]:c.map(v=>{let[d,p,g,m,y,_,w,b,S,x,T]=v.split(",");return{time:d,open:ut(p),close:ut(g),high:ut(m),low:ut(y),changePercent:ut(S),change:ut(x),volume:ut(_),amount:ut(w),amplitude:ut(b),turnoverRate:ut(T)}})}}var Tn={type:"industry",fsFilter:"m:90 t:2 f:!50",listUrl:nw,spotUrl:iw,consUrl:aw,klineUrl:ow,trendsUrl:sw,errorPrefix:"未找到行业板块"},Qw=cm(Tn);async function Gs(r,t){return Qw.getCode(r,t,ym)}async function ym(r){return vm(r,Tn)}async function Jw(r,t){let e=await Gs(r,t);return dm(r,e,Tn.spotUrl)}async function tb(r,t){let e=await Gs(r,t);return pm(r,e,Tn.consUrl)}async function eb(r,t,e={}){let n=await Gs(r,t);return gm(r,n,Tn.klineUrl,e)}async function rb(r,t,e={}){let n=await Gs(r,t);return mm(r,n,Tn.klineUrl,Tn.trendsUrl,e)}var Dn={type:"concept",fsFilter:"m:90 t:3 f:!50",listUrl:lw,spotUrl:uw,consUrl:fw,klineUrl:hw,trendsUrl:cw,errorPrefix:"未找到概念板块"},nb=cm(Dn);async function $s(r,t){return nb.getCode(r,t,_m)}async function _m(r){return vm(r,Dn)}async function ib(r,t){let e=await $s(r,t);return dm(r,e,Dn.spotUrl)}async function ab(r,t){let e=await $s(r,t);return pm(r,e,Dn.consUrl)}async function ob(r,t,e={}){let n=await $s(r,t);return gm(r,n,Dn.klineUrl,e)}async function sb(r,t,e={}){let n=await $s(r,t);return mm(r,n,Dn.klineUrl,Dn.trendsUrl,e)}function Yr(r){if(!r)return null;let t=r.match(/^(\d{4}-\d{2}-\d{2})/);return t?t[1]:null}function lb(r){return{code:r.SECURITY_CODE??"",name:r.SECURITY_NAME_ABBR??"",reportDate:Yr(r.REPORT_DATE),planNoticeDate:Yr(r.PLAN_NOTICE_DATE),disclosureDate:Yr(r.PUBLISH_DATE??r.PLAN_NOTICE_DATE),assignTransferRatio:r.BONUS_IT_RATIO??null,bonusRatio:r.BONUS_RATIO??null,transferRatio:r.IT_RATIO??null,dividendPretax:r.PRETAX_BONUS_RMB??null,dividendDesc:r.IMPL_PLAN_PROFILE??null,dividendYield:r.DIVIDENT_RATIO??null,eps:r.BASIC_EPS??null,bps:r.BVPS??null,capitalReserve:r.PER_CAPITAL_RESERVE??null,unassignedProfit:r.PER_UNASSIGN_PROFIT??null,netProfitYoy:r.PNP_YOY_RATIO??null,totalShares:r.TOTAL_SHARES??null,equityRecordDate:Yr(r.EQUITY_RECORD_DATE),exDividendDate:Yr(r.EX_DIVIDEND_DATE),payDate:Yr(r.PAY_DATE),assignProgress:r.ASSIGN_PROGRESS??null,noticeDate:Yr(r.NOTICE_DATE)}}async function ub(r,t){var o;let e=t.replace(/^(sh|sz|bj)/,""),n=[],i=1,a=1;do{let s=new URLSearchParams({sortColumns:"REPORT_DATE",sortTypes:"-1",pageSize:"500",pageNumber:String(i),reportName:"RPT_SHAREBONUS_DET",columns:"ALL",quoteColumns:"",source:"WEB",client:"WEB",filter:`(SECURITY_CODE="${e}")`}),l=`${vw}?${s.toString()}`,u=(o=await r.get(l,{responseType:"json"}))==null?void 0:o.result;if(!u||!Array.isArray(u.data))break;i===1&&(a=u.pages??1);let f=u.data.map(lb);n.push(...f),i++}while(i<=a);return n}function pa(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function Rh(r,t){let e=[];for(let n=0;n<r.length;n++){if(n<t-1){e.push(null);continue}let i=0,a=0;for(let o=n-t+1;o<=n;o++)r[o]!==null&&(i+=r[o],a++);e.push(a===t?pa(i/t):null)}return e}function jo(r,t){let e=[],n=2/(t+1),i=null,a=!1;for(let o=0;o<r.length;o++){if(o<t-1){e.push(null);continue}if(!a){let l=0,u=0;for(let f=o-t+1;f<=o;f++)r[f]!==null&&(l+=r[f],u++);u===t&&(i=l/t,a=!0),e.push(i!==null?pa(i):null);continue}let s=r[o];s===null?e.push(i!==null?pa(i):null):(i=n*s+(1-n)*i,e.push(pa(i)))}return e}function fb(r,t){let e=[],n=Array.from({length:t},(a,o)=>o+1),i=n.reduce((a,o)=>a+o,0);for(let a=0;a<r.length;a++){if(a<t-1){e.push(null);continue}let o=0,s=!0;for(let l=0;l<t;l++){let u=r[a-t+1+l];if(u===null){s=!1;break}o+=u*n[l]}e.push(s?pa(o/i):null)}return e}function hb(r,t={}){let{periods:e=[5,10,20,30,60,120,250],type:n="sma"}=t,i=n==="ema"?jo:n==="wma"?fb:Rh,a={};for(let o of e)a[`ma${o}`]=i(r,o);return r.map((o,s)=>{let l={};for(let u of e)l[`ma${u}`]=a[`ma${u}`][s];return l})}function jc(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function cb(r,t={}){let{short:e=12,long:n=26,signal:i=9}=t,a=jo(r,e),o=jo(r,n),s=r.map((u,f)=>a[f]===null||o[f]===null?null:a[f]-o[f]),l=jo(s,i);return r.map((u,f)=>({dif:s[f]!==null?jc(s[f]):null,dea:l[f],macd:s[f]!==null&&l[f]!==null?jc((s[f]-l[f])*2):null}))}function zl(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function vb(r,t,e){let n=[];for(let i=0;i<r.length;i++){if(i<t-1||e[i]===null){n.push(null);continue}let a=0,o=0;for(let s=i-t+1;s<=i;s++)r[s]!==null&&e[i]!==null&&(a+=Math.pow(r[s]-e[i],2),o++);n.push(o===t?Math.sqrt(a/t):null)}return n}function db(r,t={}){let{period:e=20,stdDev:n=2}=t,i=Rh(r,e),a=vb(r,e,i);return r.map((o,s)=>{if(i[s]===null||a[s]===null)return{mid:null,upper:null,lower:null,bandwidth:null};let l=i[s]+n*a[s],u=i[s]-n*a[s],f=i[s]!==0?zl((l-u)/i[s]*100):null;return{mid:i[s],upper:zl(l),lower:zl(u),bandwidth:f}})}function Vl(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function pb(r,t={}){let{period:e=9,kPeriod:n=3,dPeriod:i=3}=t,a=[],o=50,s=50;for(let l=0;l<r.length;l++){if(l<e-1){a.push({k:null,d:null,j:null});continue}let u=-1/0,f=1/0,h=!0;for(let p=l-e+1;p<=l;p++){if(r[p].high===null||r[p].low===null){h=!1;break}u=Math.max(u,r[p].high),f=Math.min(f,r[p].low)}let c=r[l].close;if(!h||c===null||u===f){a.push({k:null,d:null,j:null});continue}let v=(c-f)/(u-f)*100;o=(n-1)/n*o+1/n*v,s=(i-1)/i*s+1/i*o;let d=3*o-2*s;a.push({k:Vl(o),d:Vl(s),j:Vl(d)})}return a}function gb(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function mb(r,t={}){let{periods:e=[6,12,24]}=t,n=[null];for(let a=1;a<r.length;a++)r[a]===null||r[a-1]===null?n.push(null):n.push(r[a]-r[a-1]);let i={};for(let a of e){let o=[],s=0,l=0;for(let u=0;u<r.length;u++){if(u<a){o.push(null),n[u]!==null&&(n[u]>0?s+=n[u]:l+=Math.abs(n[u]));continue}if(u===a)s=s/a,l=l/a;else{let f=n[u]??0,h=f>0?f:0,c=f<0?Math.abs(f):0;s=(s*(a-1)+h)/a,l=(l*(a-1)+c)/a}if(l===0)o.push(100);else if(s===0)o.push(0);else{let f=s/l;o.push(gb(100-100/(1+f)))}}i[`rsi${a}`]=o}return r.map((a,o)=>{let s={};for(let l of e)s[`rsi${l}`]=i[`rsi${l}`][o];return s})}function yb(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function _b(r,t={}){let{periods:e=[6,10]}=t,n={};for(let i of e){let a=[];for(let o=0;o<r.length;o++){if(o<i-1){a.push(null);continue}let s=-1/0,l=1/0,u=!0;for(let c=o-i+1;c<=o;c++){if(r[c].high===null||r[c].low===null){u=!1;break}s=Math.max(s,r[c].high),l=Math.min(l,r[c].low)}let f=r[o].close;if(!u||f===null||s===l){a.push(null);continue}let h=(s-f)/(s-l)*100;a.push(yb(h))}n[`wr${i}`]=a}return r.map((i,a)=>{let o={};for(let s of e)o[`wr${s}`]=n[`wr${s}`][a];return o})}function wb(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function bb(r,t={}){let{periods:e=[6,12,24]}=t,n={};for(let i of e){let a=Rh(r,i),o=[];for(let s=0;s<r.length;s++)if(r[s]===null||a[s]===null||a[s]===0)o.push(null);else{let l=(r[s]-a[s])/a[s]*100;o.push(wb(l))}n[`bias${i}`]=o}return r.map((i,a)=>{let o={};for(let s of e)o[`bias${s}`]=n[`bias${s}`][a];return o})}function Sb(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function xb(r,t={}){let{period:e=14}=t,n=[],i=r.map(a=>a.high===null||a.low===null||a.close===null?null:(a.high+a.low+a.close)/3);for(let a=0;a<r.length;a++){if(a<e-1){n.push({cci:null});continue}let o=0,s=0;for(let h=a-e+1;h<=a;h++)i[h]!==null&&(o+=i[h],s++);if(s!==e||i[a]===null){n.push({cci:null});continue}let l=o/e,u=0;for(let h=a-e+1;h<=a;h++)u+=Math.abs(i[h]-l);let f=u/e;if(f===0)n.push({cci:0});else{let h=(i[a]-l)/(.015*f);n.push({cci:Sb(h)})}}return n}function Hl(r,t=2){let e=Math.pow(10,t);return Math.round(r*e)/e}function Cb(r,t={}){let{period:e=14}=t,n=[],i=[];for(let o=0;o<r.length;o++){let{high:s,low:l,close:u}=r[o];if(s===null||l===null||u===null){i.push(null);continue}if(o===0)i.push(s-l);else{let f=r[o-1].close;if(f===null)i.push(s-l);else{let h=s-l,c=Math.abs(s-f),v=Math.abs(l-f);i.push(Math.max(h,c,v))}}}let a=null;for(let o=0;o<r.length;o++){if(o<e-1){n.push({tr:i[o]!==null?Hl(i[o]):null,atr:null});continue}if(o===e-1){let s=0,l=0;for(let u=0;u<e;u++)i[u]!==null&&(s+=i[u],l++);l===e&&(a=s/e)}else a!==null&&i[o]!==null&&(a=(a*(e-1)+i[o])/e);n.push({tr:i[o]!==null?Hl(i[o]):null,atr:a!==null?Hl(a):null})}return n}function Tb(r,t={}){if(r.length===0)return[];let e=r.map(v=>v.close),n=r.map(v=>({open:v.open,high:v.high,low:v.low,close:v.close,volume:v.volume})),i=t.ma?hb(e,typeof t.ma=="object"?t.ma:{}):null,a=t.macd?cb(e,typeof t.macd=="object"?t.macd:{}):null,o=t.boll?db(e,typeof t.boll=="object"?t.boll:{}):null,s=t.kdj?pb(n,typeof t.kdj=="object"?t.kdj:{}):null,l=t.rsi?mb(e,typeof t.rsi=="object"?t.rsi:{}):null,u=t.wr?_b(n,typeof t.wr=="object"?t.wr:{}):null,f=t.bias?bb(e,typeof t.bias=="object"?t.bias:{}):null,h=t.cci?xb(n,typeof t.cci=="object"?t.cci:{}):null,c=t.atr?Cb(n,typeof t.atr=="object"?t.atr:{}):null;return r.map((v,d)=>({...v,...i&&{ma:i[d]},...a&&{macd:a[d]},...o&&{boll:o[d]},...s&&{kdj:s[d]},...l&&{rsi:l[d]},...u&&{wr:u[d]},...f&&{bias:f[d]},...h&&{cci:h[d]},...c&&{atr:c[d]}}))}var Db=class{constructor(r={}){this.client=new Cw(r)}getFullQuotes(r){return Vt.getFullQuotes(this.client,r)}getSimpleQuotes(r){return Vt.getSimpleQuotes(this.client,r)}getHKQuotes(r){return Vt.getHKQuotes(this.client,r)}getUSQuotes(r){return Vt.getUSQuotes(this.client,r)}getFundQuotes(r){return Vt.getFundQuotes(this.client,r)}getFundFlow(r){return Vt.getFundFlow(this.client,r)}getPanelLargeOrder(r){return Vt.getPanelLargeOrder(this.client,r)}getTodayTimeline(r){return Vt.getTodayTimeline(this.client,r)}getIndustryList(){return jt.getIndustryList(this.client)}getIndustrySpot(r){return jt.getIndustrySpot(this.client,r)}getIndustryConstituents(r){return jt.getIndustryConstituents(this.client,r)}getIndustryKline(r,t){return jt.getIndustryKline(this.client,r,t)}getIndustryMinuteKline(r,t){return jt.getIndustryMinuteKline(this.client,r,t)}getConceptList(){return jt.getConceptList(this.client)}getConceptSpot(r){return jt.getConceptSpot(this.client,r)}getConceptConstituents(r){return jt.getConceptConstituents(this.client,r)}getConceptKline(r,t){return jt.getConceptKline(this.client,r,t)}getConceptMinuteKline(r,t){return jt.getConceptMinuteKline(this.client,r,t)}getHistoryKline(r,t){return jt.getHistoryKline(this.client,r,t)}getMinuteKline(r,t){return jt.getMinuteKline(this.client,r,t)}getHKHistoryKline(r,t){return jt.getHKHistoryKline(this.client,r,t)}getUSHistoryKline(r,t){return jt.getUSHistoryKline(this.client,r,t)}search(r){return Vt.search(this.client,r)}getAShareCodeList(r){return Vt.getAShareCodeList(this.client,r)}getUSCodeList(r){return Vt.getUSCodeList(this.client,r)}getHKCodeList(){return Vt.getHKCodeList(this.client)}async getAllAShareQuotes(r={}){let{market:t,...e}=r,n=await this.getAShareCodeList({market:t});return this.getAllQuotesByCodes(n,e)}async getAllHKShareQuotes(r={}){let t=await this.getHKCodeList();return Vt.getAllHKQuotesByCodes(this.client,t,r)}async getAllUSShareQuotes(r={}){let{market:t,...e}=r,n=await this.getUSCodeList({simple:!0,market:t});return Vt.getAllUSQuotesByCodes(this.client,n,e)}getAllQuotesByCodes(r,t={}){return Vt.getAllQuotesByCodes(this.client,r,t)}async batchRaw(r){return this.client.getTencentQuote(r)}getTradingCalendar(){return Vt.getTradingCalendar(this.client)}getDividendDetail(r){return jt.getDividendDetail(this.client,r)}detectMarket(r){return/^\d{3}\.[A-Z]+$/i.test(r)?"US":/^\d{5}$/.test(r)?"HK":"A"}safeMax(r,t=0){return!r||r.length===0?t:Math.max(...r)}calcRequiredLookback(r){let t=0,e=!1;if(r.ma){let n=typeof r.ma=="object"?r.ma:{},i=n.periods??[5,10,20,30,60,120,250],a=n.type??"sma";t=Math.max(t,this.safeMax(i,20)),a==="ema"&&(e=!0)}if(r.macd){let n=typeof r.macd=="object"?r.macd:{},i=n.long??26,a=n.signal??9;t=Math.max(t,i*3+a),e=!0}if(r.boll){let n=typeof r.boll=="object"&&r.boll.period?r.boll.period:20;t=Math.max(t,n)}if(r.kdj){let n=typeof r.kdj=="object"&&r.kdj.period?r.kdj.period:9;t=Math.max(t,n)}if(r.rsi){let n=typeof r.rsi=="object"&&r.rsi.periods?r.rsi.periods:[6,12,24];t=Math.max(t,this.safeMax(n,14)+1)}if(r.wr){let n=typeof r.wr=="object"&&r.wr.periods?r.wr.periods:[6,10];t=Math.max(t,this.safeMax(n,10))}if(r.bias){let n=typeof r.bias=="object"&&r.bias.periods?r.bias.periods:[6,12,24];t=Math.max(t,this.safeMax(n,12))}if(r.cci){let n=typeof r.cci=="object"&&r.cci.period?r.cci.period:14;t=Math.max(t,n)}if(r.atr){let n=typeof r.atr=="object"&&r.atr.period?r.atr.period:14;t=Math.max(t,n)}return Math.ceil(t*(e?1.5:1.2))}calcActualStartDate(r,t,e=1.5){let n=Math.ceil(t*e),i=new Date(parseInt(r.slice(0,4)),parseInt(r.slice(4,6))-1,parseInt(r.slice(6,8)));i.setDate(i.getDate()-n);let a=i.getFullYear(),o=String(i.getMonth()+1).padStart(2,"0"),s=String(i.getDate()).padStart(2,"0");return`${a}${o}${s}`}calcActualStartDateByCalendar(r,t,e){if(!e||e.length===0)return;let n=this.normalizeDate(r),i=e.findIndex(o=>o>=n);i===-1&&(i=e.length-1);let a=Math.max(0,i-t);return this.toCompactDate(e[a])}normalizeDate(r){return r.includes("-")?r:r.length===8?`${r.slice(0,4)}-${r.slice(4,6)}-${r.slice(6,8)}`:r}toCompactDate(r){return r.replace(/-/g,"")}dateToTimestamp(r){let t=r.includes("-")?r:`${r.slice(0,4)}-${r.slice(4,6)}-${r.slice(6,8)}`;return new Date(t).getTime()}async getKlineWithIndicators(r,t={}){let{startDate:e,endDate:n,indicators:i={}}=t,a=t.market??this.detectMarket(r),o=this.calcRequiredLookback(i),s={A:1.5,HK:1.46,US:1.45},l;if(e)if(a==="A")try{let c=await Vt.getTradingCalendar(this.client);l=this.calcActualStartDateByCalendar(e,o,c)??this.calcActualStartDate(e,o,s[a])}catch{l=this.calcActualStartDate(e,o,s[a])}else l=this.calcActualStartDate(e,o,s[a]);let u={period:t.period,adjust:t.adjust,startDate:l,endDate:t.endDate},f;switch(a){case"HK":f=await this.getHKHistoryKline(r,u);break;case"US":f=await this.getUSHistoryKline(r,u);break;default:f=await this.getHistoryKline(r,u)}if(e&&f.length<o)switch(a){case"HK":f=await this.getHKHistoryKline(r,{...u,startDate:void 0});break;case"US":f=await this.getUSHistoryKline(r,{...u,startDate:void 0});break;default:f=await this.getHistoryKline(r,{...u,startDate:void 0})}let h=Tb(f,i);if(e){let c=this.dateToTimestamp(e),v=n?this.dateToTimestamp(n):1/0;return h.filter(d=>{let p=this.dateToTimestamp(d.date);return p>=c&&p<=v})}return h}};function Mi(r,t){const e=[];let n=0,i=0;for(let a=0;a<r.length;a++){const o=r[a];if(o!=null&&(n+=o,i++),a>=t){const s=r[a-t];s!=null&&(n-=s,i--)}a>=t-1&&i===t?e.push(n/t):e.push(null)}return e}function wn(r,t){const e=[],n=2/(t+1);let i=null;for(let a=0;a<r.length;a++){const o=r[a];if(o==null){e.push(i);continue}i===null?i=o:i=o*n+i*(1-n),e.push(i)}return e}function wm(r,t){const e=[],n=Array.from({length:t},(a,o)=>o+1),i=n.reduce((a,o)=>a+o,0);for(let a=0;a<r.length;a++){if(a<t-1){e.push(null);continue}let o=0,s=0;for(let l=0;l<t;l++){const u=r[a-t+1+l],f=n[l];u!=null&&f!==void 0&&(o+=u*f,s++)}s===t?e.push(o/i):e.push(null)}return e}function bm(r,t={}){const{periods:e=[5,10,20,30,60],type:n="sma"}=t,i={};for(const o of e){const s=`ma${o}`;switch(n){case"ema":i[s]=wn(r,o);break;case"wma":i[s]=wm(r,o);break;default:i[s]=Mi(r,o)}}const a=[];for(let o=0;o<r.length;o++){const s={};for(const l of Object.keys(i)){const u=i[l];s[l]=u!==void 0?u[o]??null:null}a.push(s)}return a}function Sm(r,t={}){const{short:e=12,long:n=26,signal:i=9}=t,a=wn(r,e),o=wn(r,n),s=[];for(let f=0;f<r.length;f++){const h=a[f],c=o[f];h!=null&&c!==null&&c!==void 0?s.push(h-c):s.push(null)}const l=wn(s,i),u=[];for(let f=0;f<r.length;f++){const h=s[f]??null,c=l[f]??null;u.push({dif:h,dea:c,macd:h!==null&&c!==null?(h-c)*2:null})}return u}function xm(r,t={}){const{period:e=20,stdDev:n=2}=t,i=Mi(r,e),a=[];for(let o=0;o<r.length;o++){const s=i[o];if(s==null||o<e-1){a.push({mid:null,upper:null,lower:null,bandwidth:null});continue}let l=0,u=0;for(let f=o-e+1;f<=o;f++){const h=r[f];h!=null&&(l+=Math.pow(h-s,2),u++)}if(u===e){const f=Math.sqrt(l/e),h=s+n*f,c=s-n*f;a.push({mid:s,upper:h,lower:c,bandwidth:s!==0?(h-c)/s*100:null})}else a.push({mid:s,upper:null,lower:null,bandwidth:null})}return a}function Cm(r,t={}){const{period:e=9,kPeriod:n=3,dPeriod:i=3}=t,a=[];let o=50,s=50;for(let l=0;l<r.length;l++){if(l<e-1){a.push({k:null,d:null,j:null});continue}let u=-1/0,f=1/0;for(let m=l-e+1;m<=l;m++){const y=r[m];y!==void 0&&y.high!==null&&y.high!==void 0&&(u=Math.max(u,y.high)),y!==void 0&&y.low!==null&&y.low!==void 0&&(f=Math.min(f,y.low))}const h=r[l],c=h!==void 0?h.close:null;if(c==null||u===-1/0||f===1/0){a.push({k:null,d:null,j:null});continue}const v=u===f?50:(c-f)/(u-f)*100,d=(o*(n-1)+v)/n,p=(s*(i-1)+d)/i,g=3*d-2*p;a.push({k:d,d:p,j:g}),o=d,s=p}return a}function Tm(r,t={}){const{periods:e=[6,12,24]}=t,n={};for(const a of e){const o=`rsi${a}`,s=[];let l=0,u=0;for(let f=0;f<r.length;f++){const h=r[f],c=r[f-1];if(f===0||h===null||h===void 0||c===null||c===void 0){s.push(null);continue}const v=h-c,d=v>0?v:0,p=v<0?-v:0;if(f<a)l+=d,u+=p,s.push(null);else if(f===a){l=(l+d)/a,u=(u+p)/a;const g=u===0?100:l/u;s.push(100-100/(1+g))}else{l=(l*(a-1)+d)/a,u=(u*(a-1)+p)/a;const g=u===0?100:l/u;s.push(100-100/(1+g))}}n[o]=s}const i=[];for(let a=0;a<r.length;a++){const o={};for(const s of Object.keys(n)){const l=n[s];o[s]=l!==void 0?l[a]??null:null}i.push(o)}return i}function Dm(r,t={}){const{periods:e=[6,10]}=t,n={};for(const a of e){const o=`wr${a}`,s=[];for(let l=0;l<r.length;l++){if(l<a-1){s.push(null);continue}let u=-1/0,f=1/0;for(let v=l-a+1;v<=l;v++){const d=r[v];d!==void 0&&d.high!==null&&d.high!==void 0&&(u=Math.max(u,d.high)),d!==void 0&&d.low!==null&&d.low!==void 0&&(f=Math.min(f,d.low))}const h=r[l],c=h!==void 0?h.close:null;c==null||u===f?s.push(null):s.push((u-c)/(u-f)*-100)}n[o]=s}const i=[];for(let a=0;a<r.length;a++){const o={};for(const s of Object.keys(n)){const l=n[s];o[s]=l!==void 0?l[a]??null:null}i.push(o)}return i}function Mm(r,t={}){const{periods:e=[6,12,24]}=t,n={};for(const a of e){const o=`bias${a}`,s=Mi(r,a),l=[];for(let u=0;u<r.length;u++){const f=r[u],h=s[u];f==null||h===null||h===void 0||h===0?l.push(null):l.push((f-h)/h*100)}n[o]=l}const i=[];for(let a=0;a<r.length;a++){const o={};for(const s of Object.keys(n)){const l=n[s];o[s]=l!==void 0?l[a]??null:null}i.push(o)}return i}function Am(r,t={}){const{period:e=14}=t,n=r.map(o=>o.high===null||o.low===null||o.close===null?null:(o.high+o.low+o.close)/3),i=Mi(n,e),a=[];for(let o=0;o<r.length;o++){const s=n[o],l=i[o];if(o<e-1||s===null||s===void 0||l===null||l===void 0){a.push({cci:null});continue}let u=0,f=0;for(let c=o-e+1;c<=o;c++){const v=n[c];v!=null&&(u+=Math.abs(v-l),f++)}const h=f>0?u/f:0;h===0?a.push({cci:0}):a.push({cci:(s-l)/(.015*h)})}return a}function kh(r,t={}){const{period:e=14}=t,n=[],i=[];for(let a=0;a<r.length;a++){const o=r[a];if(o===void 0||o.high===null||o.low===null||o.close===null){i.push(null),n.push({tr:null,atr:null});continue}let s;if(a===0)s=o.high-o.low;else{const l=r[a-1],u=l!==void 0?l.close:null;u==null?s=o.high-o.low:s=Math.max(o.high-o.low,Math.abs(o.high-u),Math.abs(o.low-u))}if(i.push(s),a<e-1)n.push({tr:s,atr:null});else if(a===e-1){let l=0;for(let u=0;u<e;u++)l+=i[u]??0;n.push({tr:s,atr:l/e})}else{const l=n[a-1],u=l!==void 0?l.atr:null;u==null?n.push({tr:s,atr:null}):n.push({tr:s,atr:(u*(e-1)+s)/e})}}return n}function Mb(r,t={}){const{maPeriod:e=30}=t,n=[];let i=0;for(let s=0;s<r.length;s++){const l=r[s];if(l===void 0||l.close===null||l.volume===null||l.volume===void 0){n.push({obv:null,obvMa:null});continue}if(s===0)i=l.volume;else{const u=r[s-1],f=u!==void 0?u.close:null;f==null?i=l.volume:l.close>f?i+=l.volume:l.close<f&&(i-=l.volume)}n.push({obv:i,obvMa:null})}const a=n.map(s=>s.obv),o=Mi(a,e);for(let s=0;s<n.length;s++){const l=n[s];l!==void 0&&(l.obvMa=o[s]??null)}return n}function Ab(r,t={}){const{period:e=12,signalPeriod:n=6}=t,i=[];for(let s=0;s<r.length;s++){const l=r[s],u=r[s-e];s<e||l===null||l===void 0||u===null||u===void 0||u===0?i.push(null):i.push((l-u)/u*100)}const a=wn(i,n),o=[];for(let s=0;s<r.length;s++)o.push({roc:i[s]??null,signal:a[s]??null});return o}function Ib(r,t={}){const{period:e=14,adxPeriod:n=14}=t,i=[],a=[],o=[],s=[];for(let l=0;l<r.length;l++){const u=r[l];if(u===void 0||u.high===null||u.low===null||u.close===null){i.push({pdi:null,mdi:null,adx:null,adxr:null});continue}let f;if(l===0)f=u.high-u.low;else{const w=r[l-1],b=w!==void 0?w.close:null;b==null?f=u.high-u.low:f=Math.max(u.high-u.low,Math.abs(u.high-b),Math.abs(u.low-b))}if(a.push(f),l===0)o.push(0),s.push(0);else{const w=r[l-1];if(w===void 0||w.high===null||w.low===null)o.push(0),s.push(0);else{const b=u.high-w.high,S=w.low-u.low,x=b>S&&b>0?b:0,T=S>b&&S>0?S:0;o.push(x),s.push(T)}}if(l<e-1){i.push({pdi:null,mdi:null,adx:null,adxr:null});continue}let h=0,c=0,v=0;for(let w=l-e+1;w<=l;w++)h+=a[w]??0,c+=o[w]??0,v+=s[w]??0;const d=h>0?c/h*100:0,p=h>0?v/h*100:0,g=d+p,m=g>0?Math.abs(d-p)/g*100:0;let y=null;if(l>=e-1+n-1){let w=0;for(let b=l-n+1;b<=l;b++){if(i[b]===void 0)continue;let x=0,T=0,M=0;for(let L=b-e+1;L<=b;L++)x+=a[L]??0,T+=o[L]??0,M+=s[L]??0;const A=x>0?T/x*100:0,C=x>0?M/x*100:0,I=A+C,E=I>0?Math.abs(A-C)/I*100:0;w+=E}w+=m,y=w/n}let _=null;if(y!==null&&l>=e-1+n-1+n){const w=i[l-n];w!==void 0&&w.adx!==null&&(_=(y+w.adx)/2)}i.push({pdi:d,mdi:p,adx:y,adxr:_})}return i}function Eb(r,t={}){var f,h;const{afStart:e=.02,afIncrement:n=.02,afMax:i=.2}=t,a=[];if(r.length===0)return a;let o=1,s=((f=r[0])==null?void 0:f.low)??0,l=((h=r[0])==null?void 0:h.high)??0,u=e;for(let c=0;c<r.length;c++){const v=r[c];if(v===void 0||v.high===null||v.low===null){a.push({sar:null,trend:null,ep:null,af:null});continue}if(c===0){a.push({sar:v.low,trend:1,ep:v.high,af:e}),s=v.low,l=v.high,o=1,u=e;continue}const d=s;if(s=d+u*(l-d),o===1){const p=r[c-1],g=r[c-2];p!==void 0&&p.low!==null&&(s=Math.min(s,p.low)),g!==void 0&&g.low!==null&&(s=Math.min(s,g.low)),v.low<s?(o=-1,s=l,l=v.low,u=e):v.high>l&&(l=v.high,u=Math.min(u+n,i))}else{const p=r[c-1],g=r[c-2];p!==void 0&&p.high!==null&&(s=Math.max(s,p.high)),g!==void 0&&g.high!==null&&(s=Math.max(s,g.high)),v.high>s?(o=1,s=l,l=v.high,u=e):v.low<l&&(l=v.low,u=Math.min(u+n,i))}a.push({sar:s,trend:o,ep:l,af:u})}return a}function Lb(r,t={}){var u;const{emaPeriod:e=20,atrPeriod:n=10,multiplier:i=2}=t,a=r.map(f=>f.close),o=wn(a,e),s=kh(r,{period:n}),l=[];for(let f=0;f<r.length;f++){const h=o[f],c=(u=s[f])==null?void 0:u.atr;if(h==null||c===null||c===void 0){l.push({mid:null,upper:null,lower:null,width:null});continue}const v=h+i*c,d=h-i*c,p=h!==0?(v-d)/h*100:null;l.push({mid:h,upper:v,lower:d,width:p})}return l}const Pb={enabled:!0,ttl:300*1e3,maxSize:100};function Rb(r){switch(r){case"timeline":case"timeline5":return 30*1e3;case"1":case"5":case"15":case"30":case"60":return 120*1e3;case"daily":case"weekly":case"monthly":default:return 600*1e3}}class oi{constructor(t={}){Ol(this,"cache",new Map);Ol(this,"config");this.config={...Pb,...t}}static buildKey(t){return Object.entries(t).filter(([,e])=>e!==void 0).sort(([e],[n])=>e.localeCompare(n)).map(([e,n])=>`${e}:${String(n)}`).join("|")}get(t){if(!this.config.enabled)return;const e=this.cache.get(t);if(!e)return;const n=e.ttl??this.config.ttl;if(Date.now()-e.timestamp>n){this.cache.delete(t);return}return e.data}set(t,e,n){if(this.config.enabled){if(this.cache.size>=this.config.maxSize&&(this.cleanup(),this.cache.size>=this.config.maxSize)){const i=this.cache.keys().next().value;i&&this.cache.delete(i)}this.cache.set(t,{data:e,timestamp:Date.now(),ttl:n})}}cleanup(){const t=Date.now();for(const[e,n]of this.cache.entries()){const i=n.ttl??this.config.ttl;t-n.timestamp>i&&this.cache.delete(e)}}delete(t){return this.cache.delete(t)}clear(){this.cache.clear()}size(){return this.cache.size}}new oi;const Ni=new oi,Wl=new Map,kb=150;function Ob(r){const t=new Db(r);return{getKline:async e=>{const{symbol:n,market:i,period:a,adjust:o}=e;if(a==="timeline"){const u=await t.getTodayTimeline(n);return u.data.map(f=>({date:`${u.date.slice(0,4)}-${u.date.slice(4,6)}-${u.date.slice(6,8)} ${f.time}`,open:f.price,close:f.price,high:f.price,low:f.price,volume:f.volume,amount:f.amount}))}if(a==="timeline5"){const u=new Date,f=new Date;f.setDate(f.getDate()-7);const h=v=>{const d=v.getFullYear(),p=String(v.getMonth()+1).padStart(2,"0"),g=String(v.getDate()).padStart(2,"0");return`${d}-${p}-${g}`};return(await t.getMinuteKline(n,{period:"1",startDate:h(f),endDate:h(u)})).map(v=>({date:"time"in v?v.time:"",open:v.open,close:v.close,high:v.high,low:v.low,volume:v.volume,amount:v.amount}))}if(["1","5","15","30","60"].includes(a)){let f=(await t.getMinuteKline(n,{period:a,adjust:o||"qfq"})).map(h=>({date:"time"in h?h.time:"",open:h.open,close:h.close,high:h.high,low:h.low,volume:h.volume,amount:h.amount,changePercent:"changePercent"in h?h.changePercent:void 0,change:"change"in h?h.change:void 0,amplitude:"amplitude"in h?h.amplitude:void 0,turnoverRate:"turnoverRate"in h?h.turnoverRate:void 0}));if(a==="1"&&f.length>0){const h=f[f.length-1].date.split(" ")[0];f=f.filter(c=>c.date.startsWith(h))}return f}const l={daily:"daily",weekly:"weekly",monthly:"monthly"}[a]??"daily";switch(i){case"HK":return await t.getHKHistoryKline(n,{period:l,adjust:o||"qfq"});case"US":return await t.getUSHistoryKline(n,{period:l,adjust:o||"qfq"});default:return await t.getHistoryKline(n,{period:l,adjust:o||"qfq"})}},getTimeline:async e=>(await t.getTodayTimeline(e.symbol)).data}}function Nb(r,t,e={}){if(r.length===0)return[];const n=r.map(_=>_.close),i=r.map(_=>({open:_.open,high:_.high,low:_.low,close:_.close,volume:_.volume})),a=t.includes("ma")?bm(n,typeof e.ma=="object"?e.ma:{}):null,o=t.includes("macd")?Sm(n,typeof e.macd=="object"?e.macd:{}):null,s=t.includes("boll")?xm(n,typeof e.boll=="object"?e.boll:{}):null,l=t.includes("kdj")?Cm(i,typeof e.kdj=="object"?e.kdj:{}):null,u=t.includes("rsi")?Tm(n,typeof e.rsi=="object"?e.rsi:{}):null,f=t.includes("wr")?Dm(i,typeof e.wr=="object"?e.wr:{}):null,h=t.includes("bias")?Mm(n,typeof e.bias=="object"?e.bias:{}):null,c=t.includes("cci")?Am(i,typeof e.cci=="object"?e.cci:{}):null,v=t.includes("atr")?kh(i,typeof e.atr=="object"?e.atr:{}):null,d=t.includes("obv")?Mb(i,typeof e.obv=="object"?e.obv:{}):null,p=t.includes("roc")?Ab(n,typeof e.roc=="object"?e.roc:{}):null,g=t.includes("dmi")?Ib(i,typeof e.dmi=="object"?e.dmi:{}):null,m=t.includes("sar")?Eb(i,typeof e.sar=="object"?e.sar:{}):null,y=t.includes("kc")?Lb(i,typeof e.kc=="object"?e.kc:{}):null;return r.map((_,w)=>({..._,ma:a==null?void 0:a[w],macd:o==null?void 0:o[w],boll:s==null?void 0:s[w],kdj:l==null?void 0:l[w],rsi:u==null?void 0:u[w],wr:f==null?void 0:f[w],bias:h==null?void 0:h[w],cci:c==null?void 0:c[w],atr:v==null?void 0:v[w],obv:d==null?void 0:d[w],roc:p==null?void 0:p[w],dmi:g==null?void 0:g[w],sar:m==null?void 0:m[w],kc:y==null?void 0:y[w]}))}function Im(r){const{symbol:t,market:e,period:n,adjust:i,dataProvider:a,sdkOptions:o,requestOptions:s,indicatorOptions:l,indicators:u=["ma","volume","macd"]}=r,[f,h]=W.useState([]),[c,v]=W.useState([]),[d,p]=W.useState(!1),[g,m]=W.useState(null),y=W.useRef(null),_=W.useRef(null),w=W.useRef(null),b=W.useCallback(()=>a||(w.current||(w.current=Ob(o)),w.current),[a,o]),S=W.useCallback(async()=>{(s==null?void 0:s.abortOnChange)!==!1&&y.current&&y.current.abort();const M=new AbortController;y.current=M,p(!0),m(null);try{const A=b(),C=oi.buildKey({symbol:t,market:e,period:n,adjust:i}),I=Ni.get(C);if(I&&(s==null?void 0:s.dedupe)!==!1){if(h(I),p(!1),n==="timeline"){const P=oi.buildKey({symbol:t,market:e,type:"timeline"}),R=Ni.get(P);R&&v(R)}return}const E=Wl.get(C);if(E){try{const P=await E;M.signal.aborted||h(P)}catch{}finally{M.signal.aborted||p(!1)}return}const L=A.getKline({symbol:t,market:e,period:n,adjust:i},M.signal);Wl.set(C,L);try{const P=await L;if(M.signal.aborted)return;const R=Rb(n);if(Ni.set(C,P,R),h(P),n==="timeline"&&A.getTimeline){const z=await A.getTimeline({symbol:t,market:e},M.signal);if(!M.signal.aborted){const k=oi.buildKey({symbol:t,market:e,type:"timeline"});Ni.set(k,z,R),v(z)}}}finally{Wl.delete(C)}}catch(A){if(A.name==="AbortError")return;m(A)}finally{M.signal.aborted||p(!1)}},[t,e,n,i,b,s]),x=W.useCallback(async()=>{const M=oi.buildKey({symbol:t,market:e,period:n,adjust:i});Ni.delete(M),await S()},[t,e,n,i,S]);return W.useEffect(()=>{_.current&&clearTimeout(_.current);const M=(s==null?void 0:s.debounceMs)??kb;return _.current=setTimeout(S,M),()=>{_.current&&clearTimeout(_.current),y.current&&y.current.abort()}},[t,e,n,i,S,s==null?void 0:s.debounceMs]),{data:Nb(f,u,l),timelineData:c,loading:d,error:g,refresh:x}}/*! *****************************************************************************
|
|
2
|
+
Copyright (c) Microsoft Corporation.
|
|
3
|
+
|
|
4
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
5
|
+
purpose with or without fee is hereby granted.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
8
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
9
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
10
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
11
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
12
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
13
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
14
|
+
***************************************************************************** */var Df=function(r,t){return Df=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,n){e.__proto__=n}||function(e,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])},Df(r,t)};function O(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Df(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Bb=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),Fb=(function(){function r(){this.browser=new Bb,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 r})(),K=new Fb;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(K.wxa=!0,K.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?K.worker=!0:!K.hasGlobalWindow||"Deno"in window?(K.node=!0,K.svgSupported=!0):zb(navigator.userAgent,K);function zb(r,t){var e=t.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(e.firefox=!0,e.version=n[1]),i&&(e.ie=!0,e.version=i[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var Oh=12,Vb="sans-serif",Mn=Oh+"px "+Vb,Hb=20,Wb=100,Gb="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function $b(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var n=String.fromCharCode(e+32),i=(r.charCodeAt(e)-Hb)/Wb;t[n]=i}return t}var Ub=$b(Gb),Ai={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:(function(){var r,t;return function(e,n){if(!r){var i=Ai.createCanvas();r=i&&i.getContext("2d")}if(r)return t!==n&&(t=r.font=n||Mn),r.measureText(e);e=e||"",n=n||Mn;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||Oh,s=0;if(n.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=Ub[e[l]];s+=u==null?o:u*o}return{width:s}}})(),loadImage:function(r,t,e){var n=new Image;return n.onload=t,n.onerror=e,n.src=r,n}},Em=Ei(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),Lm=Ei(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),Ii=Object.prototype.toString,Us=Array.prototype,Yb=Us.forEach,jb=Us.filter,Nh=Us.slice,Zb=Us.map,Zc=(function(){}).constructor,oo=Zc?Zc.prototype:null,Bh="__proto__",Xb=2311;function Pm(){return Xb++}function bn(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function lt(r){if(r==null||typeof r!="object")return r;var t=r,e=Ii.call(r);if(e==="[object Array]"){if(!ga(r)){t=[];for(var n=0,i=r.length;n<i;n++)t[n]=lt(r[n])}}else if(Lm[e]){if(!ga(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var n=0,i=r.length;n<i;n++)t[n]=r[n]}}}else if(!Em[e]&&!ga(r)&&!_i(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==Bh&&(t[o]=lt(r[o]))}return t}function ct(r,t,e){if(!Z(t)||!Z(r))return e?lt(t):r;for(var n in t)if(t.hasOwnProperty(n)&&n!==Bh){var i=r[n],a=t[n];Z(a)&&Z(i)&&!H(a)&&!H(i)&&!_i(a)&&!_i(i)&&!Xc(a)&&!Xc(i)&&!ga(a)&&!ga(i)?ct(i,a,e):(e||!(n in r))&&(r[n]=lt(t[n]))}return r}function B(r,t){if(Object.assign)Object.assign(r,t);else for(var e in t)t.hasOwnProperty(e)&&e!==Bh&&(r[e]=t[e]);return r}function _t(r,t,e){for(var n=Ct(t),i=0,a=n.length;i<a;i++){var o=n[i];(e?t[o]!=null:r[o]==null)&&(r[o]=t[o])}return r}function yt(r,t){if(r){if(r.indexOf)return r.indexOf(t);for(var e=0,n=r.length;e<n;e++)if(r[e]===t)return e}return-1}function qb(r,t){var e=r.prototype;function n(){}n.prototype=t.prototype,r.prototype=new n;for(var i in e)e.hasOwnProperty(i)&&(r.prototype[i]=e[i]);r.prototype.constructor=r,r.superClass=t}function $e(r,t,e){if(r="prototype"in r?r.prototype:r,t="prototype"in t?t.prototype:t,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(t),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(e?t[a]!=null:r[a]==null)&&(r[a]=t[a])}else _t(r,t,e)}function ce(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function D(r,t,e){if(r&&t)if(r.forEach&&r.forEach===Yb)r.forEach(t,e);else if(r.length===+r.length)for(var n=0,i=r.length;n<i;n++)t.call(e,r[n],n,r);else for(var a in r)r.hasOwnProperty(a)&&t.call(e,r[a],a,r)}function X(r,t,e){if(!r)return[];if(!t)return Fh(r);if(r.map&&r.map===Zb)return r.map(t,e);for(var n=[],i=0,a=r.length;i<a;i++)n.push(t.call(e,r[i],i,r));return n}function Ei(r,t,e,n){if(r&&t){for(var i=0,a=r.length;i<a;i++)e=t.call(n,e,r[i],i,r);return e}}function Wt(r,t,e){if(!r)return[];if(!t)return Fh(r);if(r.filter&&r.filter===jb)return r.filter(t,e);for(var n=[],i=0,a=r.length;i<a;i++)t.call(e,r[i],i,r)&&n.push(r[i]);return n}function Ct(r){if(!r)return[];if(Object.keys)return Object.keys(r);var t=[];for(var e in r)r.hasOwnProperty(e)&&t.push(e);return t}function Kb(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return function(){return r.apply(t,e.concat(Nh.call(arguments)))}}var tt=oo&&Q(oo.bind)?oo.call.bind(oo.bind):Kb;function Mt(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return function(){return r.apply(this,t.concat(Nh.call(arguments)))}}function H(r){return Array.isArray?Array.isArray(r):Ii.call(r)==="[object Array]"}function Q(r){return typeof r=="function"}function G(r){return typeof r=="string"}function ls(r){return Ii.call(r)==="[object String]"}function St(r){return typeof r=="number"}function Z(r){var t=typeof r;return t==="function"||!!r&&t==="object"}function Xc(r){return!!Em[Ii.call(r)]}function ie(r){return!!Lm[Ii.call(r)]}function _i(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function Ys(r){return r.colorStops!=null}function Qb(r){return r.image!=null}function Jb(r){return Ii.call(r)==="[object RegExp]"}function La(r){return r!==r}function An(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];for(var e=0,n=r.length;e<n;e++)if(r[e]!=null)return r[e]}function rt(r,t){return r??t}function hi(r,t,e){return r??t??e}function Fh(r){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return Nh.apply(r,t)}function Rm(r){if(typeof r=="number")return[r,r,r,r];var t=r.length;return t===2?[r[0],r[1],r[0],r[1]]:t===3?[r[0],r[1],r[2],r[1]]:r}function nt(r,t){if(!r)throw new Error(t)}function Qe(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var km="__ec_primitive__";function Mf(r){r[km]=!0}function ga(r){return r[km]}var tS=(function(){function r(){this.data={}}return r.prototype.delete=function(t){var e=this.has(t);return e&&delete this.data[t],e},r.prototype.has=function(t){return this.data.hasOwnProperty(t)},r.prototype.get=function(t){return this.data[t]},r.prototype.set=function(t,e){return this.data[t]=e,this},r.prototype.keys=function(){return Ct(this.data)},r.prototype.forEach=function(t){var e=this.data;for(var n in e)e.hasOwnProperty(n)&&t(e[n],n)},r})(),Om=typeof Map=="function";function eS(){return Om?new Map:new tS}var rS=(function(){function r(t){var e=H(t);this.data=eS();var n=this;t instanceof r?t.each(i):t&&D(t,i);function i(a,o){e?n.set(a,o):n.set(o,a)}}return r.prototype.hasKey=function(t){return this.data.has(t)},r.prototype.get=function(t){return this.data.get(t)},r.prototype.set=function(t,e){return this.data.set(t,e),e},r.prototype.each=function(t,e){this.data.forEach(function(n,i){t.call(e,n,i)})},r.prototype.keys=function(){var t=this.data.keys();return Om?Array.from(t):t},r.prototype.removeKey=function(t){this.data.delete(t)},r})();function et(r){return new rS(r)}function nS(r,t){for(var e=new r.constructor(r.length+t.length),n=0;n<r.length;n++)e[n]=r[n];for(var i=r.length,n=0;n<t.length;n++)e[n+i]=t[n];return e}function js(r,t){var e;if(Object.create)e=Object.create(r);else{var n=function(){};n.prototype=r,e=new n}return t&&B(e,t),e}function Nm(r){var t=r.style;t.webkitUserSelect="none",t.userSelect="none",t.webkitTapHighlightColor="rgba(0,0,0,0)",t["-webkit-touch-callout"]="none"}function In(r,t){return r.hasOwnProperty(t)}function re(){}var iS=180/Math.PI;function Li(r,t){return r==null&&(r=0),t==null&&(t=0),[r,t]}function aS(r){return[r[0],r[1]]}function qc(r,t,e){return r[0]=t[0]+e[0],r[1]=t[1]+e[1],r}function oS(r,t,e){return r[0]=t[0]-e[0],r[1]=t[1]-e[1],r}function sS(r){return Math.sqrt(lS(r))}function lS(r){return r[0]*r[0]+r[1]*r[1]}function Gl(r,t,e){return r[0]=t[0]*e,r[1]=t[1]*e,r}function uS(r,t){var e=sS(t);return e===0?(r[0]=0,r[1]=0):(r[0]=t[0]/e,r[1]=t[1]/e),r}function Af(r,t){return Math.sqrt((r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1]))}var fS=Af;function hS(r,t){return(r[0]-t[0])*(r[0]-t[0])+(r[1]-t[1])*(r[1]-t[1])}var ci=hS;function Re(r,t,e){var n=t[0],i=t[1];return r[0]=e[0]*n+e[2]*i+e[4],r[1]=e[1]*n+e[3]*i+e[5],r}function si(r,t,e){return r[0]=Math.min(t[0],e[0]),r[1]=Math.min(t[1],e[1]),r}function li(r,t,e){return r[0]=Math.max(t[0],e[0]),r[1]=Math.max(t[1],e[1]),r}var Fn=(function(){function r(t,e){this.target=t,this.topTarget=e&&e.topTarget}return r})(),cS=(function(){function r(t){this.handler=t,t.on("mousedown",this._dragStart,this),t.on("mousemove",this._drag,this),t.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(t){for(var e=t.target;e&&!e.draggable;)e=e.parent||e.__hostTarget;e&&(this._draggingTarget=e,e.dragging=!0,this._x=t.offsetX,this._y=t.offsetY,this.handler.dispatchToElement(new Fn(e,t),"dragstart",t.event))},r.prototype._drag=function(t){var e=this._draggingTarget;if(e){var n=t.offsetX,i=t.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,e.drift(a,o,t),this.handler.dispatchToElement(new Fn(e,t),"drag",t.event);var s=this.handler.findHover(n,i,e).target,l=this._dropTarget;this._dropTarget=s,e!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Fn(l,t),"dragleave",t.event),s&&s!==l&&this.handler.dispatchToElement(new Fn(s,t),"dragenter",t.event))}},r.prototype._dragEnd=function(t){var e=this._draggingTarget;e&&(e.dragging=!1),this.handler.dispatchToElement(new Fn(e,t),"dragend",t.event),this._dropTarget&&this.handler.dispatchToElement(new Fn(this._dropTarget,t),"drop",t.event),this._draggingTarget=null,this._dropTarget=null},r})(),Ue=(function(){function r(t){t&&(this._$eventProcessor=t)}return r.prototype.on=function(t,e,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof e=="function"&&(i=n,n=e,e=null),!n||!t)return this;var o=this._$eventProcessor;e!=null&&o&&o.normalizeQuery&&(e=o.normalizeQuery(e)),a[t]||(a[t]=[]);for(var s=0;s<a[t].length;s++)if(a[t][s].h===n)return this;var l={h:n,query:e,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[t].length-1,f=a[t][u];return f&&f.callAtLast?a[t].splice(u,0,l):a[t].push(l),this},r.prototype.isSilent=function(t){var e=this._$handlers;return!e||!e[t]||!e[t].length},r.prototype.off=function(t,e){var n=this._$handlers;if(!n)return this;if(!t)return this._$handlers={},this;if(e){if(n[t]){for(var i=[],a=0,o=n[t].length;a<o;a++)n[t][a].h!==e&&i.push(n[t][a]);n[t]=i}n[t]&&n[t].length===0&&delete n[t]}else delete n[t];return this},r.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=e.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(t,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,e[0]);break;case 2:u.h.call(u.ctx,e[0],e[1]);break;default:u.h.apply(u.ctx,e);break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r.prototype.triggerWithContext=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[t],a=this._$eventProcessor;if(i)for(var o=e.length,s=e[o-1],l=i.length,u=0;u<l;u++){var f=i[u];if(!(a&&a.filter&&f.query!=null&&!a.filter(t,f.query)))switch(o){case 0:f.h.call(s);break;case 1:f.h.call(s,e[0]);break;case 2:f.h.call(s,e[0],e[1]);break;default:f.h.apply(s,e.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(t),this},r})(),vS=Math.log(2);function If(r,t,e,n,i,a){var o=n+"-"+i,s=r.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var l=Math.round(Math.log((1<<s)-1&~i)/vS);return r[e][l]}for(var u=n|1<<e,f=e+1;n&1<<f;)f++;for(var h=0,c=0,v=0;c<s;c++){var d=1<<c;d&i||(h+=(v%2?-1:1)*r[e][c]*If(r,t-1,f,u,i|d,a),v++)}return a[o]=h,h}function Kc(r,t){var e=[[r[0],r[1],1,0,0,0,-t[0]*r[0],-t[0]*r[1]],[0,0,0,r[0],r[1],1,-t[1]*r[0],-t[1]*r[1]],[r[2],r[3],1,0,0,0,-t[2]*r[2],-t[2]*r[3]],[0,0,0,r[2],r[3],1,-t[3]*r[2],-t[3]*r[3]],[r[4],r[5],1,0,0,0,-t[4]*r[4],-t[4]*r[5]],[0,0,0,r[4],r[5],1,-t[5]*r[4],-t[5]*r[5]],[r[6],r[7],1,0,0,0,-t[6]*r[6],-t[6]*r[7]],[0,0,0,r[6],r[7],1,-t[7]*r[6],-t[7]*r[7]]],n={},i=If(e,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*If(e,7,o===0?1:0,1<<o,1<<s,n)/i*t[o];return function(l,u,f){var h=u*a[6]+f*a[7]+1;l[0]=(u*a[0]+f*a[1]+a[2])/h,l[1]=(u*a[3]+f*a[4]+a[5])/h}}}var Qc="___zrEVENTSAVED",$l=[];function dS(r,t,e,n,i){return Ef($l,t,n,i,!0)&&Ef(r,e,$l[0],$l[1])}function Ef(r,t,e,n,i){if(t.getBoundingClientRect&&K.domSupported&&!Bm(t)){var a=t[Qc]||(t[Qc]={}),o=pS(t,a),s=gS(o,a,i);if(s)return s(r,e,n),!0}return!1}function pS(r,t){var e=t.markers;if(e)return e;e=t.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),e.push(o)}return e}function gS(r,t,e){for(var n=e?"invTrans":"trans",i=t[n],a=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,c=f.left,v=f.top;o.push(c,v),l=l&&a&&c===a[h]&&v===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(t.srcCoords=o,t[n]=e?Kc(s,o):Kc(o,s))}function Bm(r){return r.nodeName.toUpperCase()==="CANVAS"}var mS=/([&<>"'])/g,yS={"&":"&","<":"<",">":">",'"':""","'":"'"};function se(r){return r==null?"":(r+"").replace(mS,function(t,e){return yS[e]})}var _S=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ul=[],wS=K.browser.firefox&&+K.browser.version.split(".")[0]<39;function Lf(r,t,e,n){return e=e||{},n?Jc(r,t,e):wS&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):Jc(r,t,e),e}function Jc(r,t,e){if(K.domSupported&&r.getBoundingClientRect){var n=t.clientX,i=t.clientY;if(Bm(r)){var a=r.getBoundingClientRect();e.zrX=n-a.left,e.zrY=i-a.top;return}else if(Ef(Ul,r,n,i)){e.zrX=Ul[0],e.zrY=Ul[1];return}}e.zrX=e.zrY=0}function zh(r){return r||window.event}function De(r,t,e){if(t=zh(t),t.zrX!=null)return t;var n=t.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&Lf(r,o,t,e)}else{Lf(r,t,t,e);var a=bS(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&_S.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function bS(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,n=r.deltaY;if(e==null||n==null)return t;var i=Math.abs(n!==0?n:e),a=n>0?-1:n<0?1:e>0?-1:1;return 3*i*a}function SS(r,t,e,n){r.addEventListener(t,e,n)}function xS(r,t,e,n){r.removeEventListener(t,e,n)}var wi=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function tv(r){return r.which===2||r.which===3}var CS=(function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,n){return this._doTrack(t,e,n),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,n){var i=t.touches;if(i){for(var a={points:[],touches:[],target:e,event:t},o=0,s=i.length;o<s;o++){var l=i[o],u=Lf(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(t){for(var e in Yl)if(Yl.hasOwnProperty(e)){var n=Yl[e](this._track,t);if(n)return n}},r})();function ev(r){var t=r[1][0]-r[0][0],e=r[1][1]-r[0][1];return Math.sqrt(t*t+e*e)}function TS(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var Yl={pinch:function(r,t){var e=r.length;if(e){var n=(r[e-1]||{}).points,i=(r[e-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=ev(n)/ev(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=TS(n);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function vi(){return[1,0,0,1,0,0]}function Vh(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function DS(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function di(r,t,e){var n=t[0]*e[0]+t[2]*e[1],i=t[1]*e[0]+t[3]*e[1],a=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=n,r[1]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function Pf(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Hh(r,t,e,n){n===void 0&&(n=[0,0]);var i=t[0],a=t[2],o=t[4],s=t[1],l=t[3],u=t[5],f=Math.sin(e),h=Math.cos(e);return r[0]=i*h+s*f,r[1]=-i*f+s*h,r[2]=a*h+l*f,r[3]=-a*f+h*l,r[4]=h*(o-n[0])+f*(u-n[1])+n[0],r[5]=h*(u-n[1])-f*(o-n[0])+n[1],r}function MS(r,t,e){var n=e[0],i=e[1];return r[0]=t[0]*n,r[1]=t[1]*i,r[2]=t[2]*n,r[3]=t[3]*i,r[4]=t[4]*n,r[5]=t[5]*i,r}function Wh(r,t){var e=t[0],n=t[2],i=t[4],a=t[1],o=t[3],s=t[5],l=e*o-a*n;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-n*l,r[3]=e*l,r[4]=(n*s-o*i)*l,r[5]=(a*i-e*s)*l,r):null}var wt=(function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,n=this.y-t.y;return Math.sqrt(e*e+n*n)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,n=this.y-t.y;return e*e+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,n=this.y;return this.x=t[0]*e+t[2]*n+t[4],this.y=t[1]*e+t[3]*n+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,n){t.x=e,t.y=n},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,n){t.x=e.x+n.x,t.y=e.y+n.y},r.sub=function(t,e,n){t.x=e.x-n.x,t.y=e.y-n.y},r.scale=function(t,e,n){t.x=e.x*n,t.y=e.y*n},r.scaleAndAdd=function(t,e,n,i){t.x=e.x+n.x*i,t.y=e.y+n.y*i},r.lerp=function(t,e,n,i){var a=1-i;t.x=a*e.x+i*n.x,t.y=a*e.y+i*n.y},r})(),so=Math.min,lo=Math.max,jr=new wt,Zr=new wt,Xr=new wt,qr=new wt,Bi=new wt,Fi=new wt,dt=(function(){function r(t,e,n,i){n<0&&(t=t+n,n=-n),i<0&&(e=e+i,i=-i),this.x=t,this.y=e,this.width=n,this.height=i}return r.prototype.union=function(t){var e=so(t.x,this.x),n=so(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=lo(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=lo(t.y+t.height,this.y+this.height)-n:this.height=t.height,this.x=e,this.y=n},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,n=t.width/e.width,i=t.height/e.height,a=vi();return Pf(a,a,[-e.x,-e.y]),MS(a,a,[n,i]),Pf(a,a,[t.x,t.y]),a},r.prototype.intersect=function(t,e){if(!t)return!1;t instanceof r||(t=r.create(t));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=t.x,u=t.x+t.width,f=t.y,h=t.y+t.height,c=!(a<l||u<i||s<f||h<o);if(e){var v=1/0,d=0,p=Math.abs(a-l),g=Math.abs(u-i),m=Math.abs(s-f),y=Math.abs(h-o),_=Math.min(p,g),w=Math.min(m,y);a<l||u<i?_>d&&(d=_,p<g?wt.set(Fi,-p,0):wt.set(Fi,g,0)):_<v&&(v=_,p<g?wt.set(Bi,p,0):wt.set(Bi,-g,0)),s<f||h<o?w>d&&(d=w,m<y?wt.set(Fi,0,-m):wt.set(Fi,0,y)):_<v&&(v=_,m<y?wt.set(Bi,0,m):wt.set(Bi,0,-y))}return e&&wt.copy(e,c?Bi:Fi),c},r.prototype.contain=function(t,e){var n=this;return t>=n.x&&t<=n.x+n.width&&e>=n.y&&e<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height},r.applyTransform=function(t,e,n){if(!n){t!==e&&r.copy(t,e);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var i=n[0],a=n[3],o=n[4],s=n[5];t.x=e.x*i+o,t.y=e.y*a+s,t.width=e.width*i,t.height=e.height*a,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}jr.x=Xr.x=e.x,jr.y=qr.y=e.y,Zr.x=qr.x=e.x+e.width,Zr.y=Xr.y=e.y+e.height,jr.transform(n),qr.transform(n),Zr.transform(n),Xr.transform(n),t.x=so(jr.x,Zr.x,Xr.x,qr.x),t.y=so(jr.y,Zr.y,Xr.y,qr.y);var l=lo(jr.x,Zr.x,Xr.x,qr.x),u=lo(jr.y,Zr.y,Xr.y,qr.y);t.width=l-t.x,t.height=u-t.y},r})(),Fm="silent";function AS(r,t,e){return{type:r,event:e,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:e.zrX,offsetY:e.zrY,gestureEvent:e.gestureEvent,pinchX:e.pinchX,pinchY:e.pinchY,pinchScale:e.pinchScale,wheelDelta:e.zrDelta,zrByTouch:e.zrByTouch,which:e.which,stop:IS}}function IS(){wi(this.event)}var ES=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.handler=null,e}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t})(Ue),zi=(function(){function r(t,e){this.x=t,this.y=e}return r})(),LS=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],jl=new dt(0,0,0,0),zm=(function(r){O(t,r);function t(e,n,i,a,o){var s=r.call(this)||this;return s._hovered=new zi(0,0),s.storage=e,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new ES,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new cS(s),s}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(D(LS,function(n){e.on&&e.on(n,this[n],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var n=e.zrX,i=e.zrY,a=Vm(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new zi(n,i):this.findHover(n,i),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",e),this.dispatchToElement(l,"mousemove",e),u&&u!==s&&this.dispatchToElement(l,"mouseover",e)},t.prototype.mouseout=function(e){var n=e.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",e),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:e})},t.prototype.resize=function(){this._hovered=new zi(0,0)},t.prototype.dispatch=function(e,n){var i=this[e];i&&i.call(this,n)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var n=this.proxy;n.setCursor&&n.setCursor(e)},t.prototype.dispatchToElement=function(e,n,i){e=e||{};var a=e.target;if(!(a&&a.silent)){for(var o="on"+n,s=AS(n,e,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},t.prototype.findHover=function(e,n,i){var a=this.storage.getDisplayList(),o=new zi(e,n);if(rv(a,o,e,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new dt(e-u,n-u,l,l),h=a.length-1;h>=0;h--){var c=a[h];c!==i&&!c.ignore&&!c.ignoreCoarsePointer&&(!c.parent||!c.parent.ignoreCoarsePointer)&&(jl.copy(c.getBoundingRect()),c.transform&&jl.applyTransform(c.transform),jl.intersect(f)&&s.push(c))}if(s.length)for(var v=4,d=Math.PI/12,p=Math.PI*2,g=0;g<u;g+=v)for(var m=0;m<p;m+=d){var y=e+g*Math.cos(m),_=n+g*Math.sin(m);if(rv(s,o,y,_,i),o.target)return o}}return o},t.prototype.processGesture=function(e,n){this._gestureMgr||(this._gestureMgr=new CS);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(e,this.findHover(e.zrX,e.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;e.gestureEvent=o;var s=new zi;s.target=a.target,this.dispatchToElement(s,o,a.event)}},t})(Ue);D(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){zm.prototype[r]=function(t){var e=t.zrX,n=t.zrY,i=Vm(this,e,n),a,o;if((r!=="mouseup"||!i)&&(a=this.findHover(e,n),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[t.zrX,t.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||fS(this._downPoint,[t.zrX,t.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,t)}});function PS(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(t,e))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?Fm:!0}return!1}function rv(r,t,e,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=PS(o,e,n))&&(!t.topTarget&&(t.topTarget=o),s!==Fm)){t.target=o;break}}}function Vm(r,t,e){var n=r.painter;return t<0||t>n.getWidth()||e<0||e>n.getHeight()}var Hm=32,Vi=7;function RS(r){for(var t=0;r>=Hm;)t|=r&1,r>>=1;return r+t}function nv(r,t,e,n){var i=t+1;if(i===e)return 1;if(n(r[i++],r[t])<0){for(;i<e&&n(r[i],r[i-1])<0;)i++;kS(r,t,i)}else for(;i<e&&n(r[i],r[i-1])>=0;)i++;return i-t}function kS(r,t,e){for(e--;t<e;){var n=r[t];r[t++]=r[e],r[e--]=n}}function iv(r,t,e,n,i){for(n===t&&n++;n<e;n++){for(var a=r[n],o=t,s=n,l;o<s;)l=o+s>>>1,i(a,r[l])<0?s=l:o=l+1;var u=n-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=a}}function Zl(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])>0){for(s=n-i;l<s&&a(r,t[e+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(r,t[e+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var f=o+(l-o>>>1);a(r,t[e+f])>0?o=f+1:l=f}return l}function Xl(r,t,e,n,i,a){var o=0,s=0,l=1;if(a(r,t[e+i])<0){for(s=i+1;l<s&&a(r,t[e+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(r,t[e+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var f=o+(l-o>>>1);a(r,t[e+f])<0?l=f:o=f+1}return l}function OS(r,t){var e=Vi,n,i,a=0,o=[];n=[],i=[];function s(v,d){n[a]=v,i[a]=d,a+=1}function l(){for(;a>1;){var v=a-2;if(v>=1&&i[v-1]<=i[v]+i[v+1]||v>=2&&i[v-2]<=i[v]+i[v-1])i[v-1]<i[v+1]&&v--;else if(i[v]>i[v+1])break;f(v)}}function u(){for(;a>1;){var v=a-2;v>0&&i[v-1]<i[v+1]&&v--,f(v)}}function f(v){var d=n[v],p=i[v],g=n[v+1],m=i[v+1];i[v]=p+m,v===a-3&&(n[v+1]=n[v+2],i[v+1]=i[v+2]),a--;var y=Xl(r[g],r,d,p,0,t);d+=y,p-=y,p!==0&&(m=Zl(r[d+p-1],r,g,m,m-1,t),m!==0&&(p<=m?h(d,p,g,m):c(d,p,g,m)))}function h(v,d,p,g){var m=0;for(m=0;m<d;m++)o[m]=r[v+m];var y=0,_=p,w=v;if(r[w++]=r[_++],--g===0){for(m=0;m<d;m++)r[w+m]=o[y+m];return}if(d===1){for(m=0;m<g;m++)r[w+m]=r[_+m];r[w+g]=o[y];return}for(var b=e,S,x,T;;){S=0,x=0,T=!1;do if(t(r[_],o[y])<0){if(r[w++]=r[_++],x++,S=0,--g===0){T=!0;break}}else if(r[w++]=o[y++],S++,x=0,--d===1){T=!0;break}while((S|x)<b);if(T)break;do{if(S=Xl(r[_],o,y,d,0,t),S!==0){for(m=0;m<S;m++)r[w+m]=o[y+m];if(w+=S,y+=S,d-=S,d<=1){T=!0;break}}if(r[w++]=r[_++],--g===0){T=!0;break}if(x=Zl(o[y],r,_,g,0,t),x!==0){for(m=0;m<x;m++)r[w+m]=r[_+m];if(w+=x,_+=x,g-=x,g===0){T=!0;break}}if(r[w++]=o[y++],--d===1){T=!0;break}b--}while(S>=Vi||x>=Vi);if(T)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),d===1){for(m=0;m<g;m++)r[w+m]=r[_+m];r[w+g]=o[y]}else{if(d===0)throw new Error;for(m=0;m<d;m++)r[w+m]=o[y+m]}}function c(v,d,p,g){var m=0;for(m=0;m<g;m++)o[m]=r[p+m];var y=v+d-1,_=g-1,w=p+g-1,b=0,S=0;if(r[w--]=r[y--],--d===0){for(b=w-(g-1),m=0;m<g;m++)r[b+m]=o[m];return}if(g===1){for(w-=d,y-=d,S=w+1,b=y+1,m=d-1;m>=0;m--)r[S+m]=r[b+m];r[w]=o[_];return}for(var x=e;;){var T=0,M=0,A=!1;do if(t(o[_],r[y])<0){if(r[w--]=r[y--],T++,M=0,--d===0){A=!0;break}}else if(r[w--]=o[_--],M++,T=0,--g===1){A=!0;break}while((T|M)<x);if(A)break;do{if(T=d-Xl(o[_],r,v,d,d-1,t),T!==0){for(w-=T,y-=T,d-=T,S=w+1,b=y+1,m=T-1;m>=0;m--)r[S+m]=r[b+m];if(d===0){A=!0;break}}if(r[w--]=o[_--],--g===1){A=!0;break}if(M=g-Zl(r[y],o,0,g,g-1,t),M!==0){for(w-=M,_-=M,g-=M,S=w+1,b=_+1,m=0;m<M;m++)r[S+m]=o[b+m];if(g<=1){A=!0;break}}if(r[w--]=r[y--],--d===0){A=!0;break}x--}while(T>=Vi||M>=Vi);if(A)break;x<0&&(x=0),x+=2}if(e=x,e<1&&(e=1),g===1){for(w-=d,y-=d,S=w+1,b=y+1,m=d-1;m>=0;m--)r[S+m]=r[b+m];r[w]=o[_]}else{if(g===0)throw new Error;for(b=w-(g-1),m=0;m<g;m++)r[b+m]=o[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function Zo(r,t,e,n){e||(e=0),n||(n=r.length);var i=n-e;if(!(i<2)){var a=0;if(i<Hm){a=nv(r,e,n,t),iv(r,e,n,e+a,t);return}var o=OS(r,t),s=RS(i);do{if(a=nv(r,e,n,t),a<s){var l=i;l>s&&(l=s),iv(r,e,e+l,e+a,t),a=l}o.pushRun(e,a),o.mergeRuns(),i-=a,e+=a}while(i!==0);o.forceMergeRuns()}}var ye=1,oa=2,ni=4,av=!1;function ql(){av||(av=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function ov(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var NS=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=ov}return r.prototype.traverse=function(t,e){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(t,e)},r.prototype.getDisplayList=function(t,e){e=e||!1;var n=this._displayList;return(t||!n.length)&&this.updateDisplayList(e),n},r.prototype.updateDisplayList=function(t){this._displayListLen=0;for(var e=this._roots,n=this._displayList,i=0,a=e.length;i<a;i++)this._updateAndAddDisplayable(e[i],null,t);n.length=this._displayListLen,Zo(n,ov)},r.prototype._updateAndAddDisplayable=function(t,e,n){if(!(t.ignore&&!n)){t.beforeUpdate(),t.update(),t.afterUpdate();var i=t.getClipPath();if(t.ignoreClip)e=null;else if(i){e?e=e.slice():e=[];for(var a=i,o=t;a;)a.parent=o,a.updateTransform(),e.push(a),o=a,a=a.getClipPath()}if(t.childrenRef){for(var s=t.childrenRef(),l=0;l<s.length;l++){var u=s[l];t.__dirty&&(u.__dirty|=ye),this._updateAndAddDisplayable(u,e,n)}t.__dirty=0}else{var f=t;e&&e.length?f.__clipPaths=e:f.__clipPaths&&f.__clipPaths.length>0&&(f.__clipPaths=[]),isNaN(f.z)&&(ql(),f.z=0),isNaN(f.z2)&&(ql(),f.z2=0),isNaN(f.zlevel)&&(ql(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=t.getDecalElement&&t.getDecalElement();h&&this._updateAndAddDisplayable(h,e,n);var c=t.getTextGuideLine();c&&this._updateAndAddDisplayable(c,e,n);var v=t.getTextContent();v&&this._updateAndAddDisplayable(v,e,n)}},r.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},r.prototype.delRoot=function(t){if(t instanceof Array){for(var e=0,n=t.length;e<n;e++)this.delRoot(t[e]);return}var i=yt(this._roots,t);i>=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r})(),us;us=K.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var ma={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)))},elasticOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var t,e=.1,n=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=n/4):t=n*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-ma.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?ma.bounceIn(r*2)*.5:ma.bounceOut(r*2-1)*.5+.5}},uo=Math.pow,Fr=Math.sqrt,fs=1e-8,Wm=1e-4,sv=Fr(3),fo=1/3,Ke=Li(),Ie=Li(),pi=Li();function Or(r){return r>-fs&&r<fs}function Gm(r){return r>fs||r<-fs}function Gt(r,t,e,n,i){var a=1-i;return a*a*(a*r+3*i*t)+i*i*(i*n+3*a*e)}function lv(r,t,e,n,i){var a=1-i;return 3*(((t-r)*a+2*(e-t)*i)*a+(n-e)*i*i)}function hs(r,t,e,n,i,a){var o=n+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-i,f=s*s-3*o*l,h=s*l-9*o*u,c=l*l-3*s*u,v=0;if(Or(f)&&Or(h))if(Or(s))a[0]=0;else{var d=-l/s;d>=0&&d<=1&&(a[v++]=d)}else{var p=h*h-4*f*c;if(Or(p)){var g=h/f,d=-s/o+g,m=-g/2;d>=0&&d<=1&&(a[v++]=d),m>=0&&m<=1&&(a[v++]=m)}else if(p>0){var y=Fr(p),_=f*s+1.5*o*(-h+y),w=f*s+1.5*o*(-h-y);_<0?_=-uo(-_,fo):_=uo(_,fo),w<0?w=-uo(-w,fo):w=uo(w,fo);var d=(-s-(_+w))/(3*o);d>=0&&d<=1&&(a[v++]=d)}else{var b=(2*f*s-3*o*h)/(2*Fr(f*f*f)),S=Math.acos(b)/3,x=Fr(f),T=Math.cos(S),d=(-s-2*x*T)/(3*o),m=(-s+x*(T+sv*Math.sin(S)))/(3*o),M=(-s+x*(T-sv*Math.sin(S)))/(3*o);d>=0&&d<=1&&(a[v++]=d),m>=0&&m<=1&&(a[v++]=m),M>=0&&M<=1&&(a[v++]=M)}}return v}function $m(r,t,e,n,i){var a=6*e-12*t+6*r,o=9*t+3*n-3*r-9*e,s=3*t-3*r,l=0;if(Or(o)){if(Gm(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var f=a*a-4*o*s;if(Or(f))i[0]=-a/(2*o);else if(f>0){var h=Fr(f),u=(-a+h)/(2*o),c=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function cs(r,t,e,n,i,a){var o=(t-r)*i+r,s=(e-t)*i+t,l=(n-e)*i+e,u=(s-o)*i+o,f=(l-s)*i+s,h=(f-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=f,a[6]=l,a[7]=n}function BS(r,t,e,n,i,a,o,s,l,u,f){var h,c=.005,v=1/0,d,p,g,m;Ke[0]=l,Ke[1]=u;for(var y=0;y<1;y+=.05)Ie[0]=Gt(r,e,i,o,y),Ie[1]=Gt(t,n,a,s,y),g=ci(Ke,Ie),g<v&&(h=y,v=g);v=1/0;for(var _=0;_<32&&!(c<Wm);_++)d=h-c,p=h+c,Ie[0]=Gt(r,e,i,o,d),Ie[1]=Gt(t,n,a,s,d),g=ci(Ie,Ke),d>=0&&g<v?(h=d,v=g):(pi[0]=Gt(r,e,i,o,p),pi[1]=Gt(t,n,a,s,p),m=ci(pi,Ke),p<=1&&m<v?(h=p,v=m):c*=.5);return Fr(v)}function FS(r,t,e,n,i,a,o,s,l){for(var u=r,f=t,h=0,c=1/l,v=1;v<=l;v++){var d=v*c,p=Gt(r,e,i,o,d),g=Gt(t,n,a,s,d),m=p-u,y=g-f;h+=Math.sqrt(m*m+y*y),u=p,f=g}return h}function le(r,t,e,n){var i=1-n;return i*(i*r+2*n*t)+n*n*e}function uv(r,t,e,n){return 2*((1-n)*(t-r)+n*(e-t))}function zS(r,t,e,n,i){var a=r-2*t+e,o=2*(t-r),s=r-n,l=0;if(Or(a)){if(Gm(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var f=o*o-4*a*s;if(Or(f)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(f>0){var h=Fr(f),u=(-o+h)/(2*a),c=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),c>=0&&c<=1&&(i[l++]=c)}}return l}function Um(r,t,e){var n=r+e-2*t;return n===0?.5:(r-t)/n}function vs(r,t,e,n,i){var a=(t-r)*n+r,o=(e-t)*n+t,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=e}function VS(r,t,e,n,i,a,o,s,l){var u,f=.005,h=1/0;Ke[0]=o,Ke[1]=s;for(var c=0;c<1;c+=.05){Ie[0]=le(r,e,i,c),Ie[1]=le(t,n,a,c);var v=ci(Ke,Ie);v<h&&(u=c,h=v)}h=1/0;for(var d=0;d<32&&!(f<Wm);d++){var p=u-f,g=u+f;Ie[0]=le(r,e,i,p),Ie[1]=le(t,n,a,p);var v=ci(Ie,Ke);if(p>=0&&v<h)u=p,h=v;else{pi[0]=le(r,e,i,g),pi[1]=le(t,n,a,g);var m=ci(pi,Ke);g<=1&&m<h?(u=g,h=m):f*=.5}}return Fr(h)}function HS(r,t,e,n,i,a,o){for(var s=r,l=t,u=0,f=1/o,h=1;h<=o;h++){var c=h*f,v=le(r,e,i,c),d=le(t,n,a,c),p=v-s,g=d-l;u+=Math.sqrt(p*p+g*g),s=v,l=d}return u}var WS=/cubic-bezier\(([0-9,\.e ]+)\)/;function Ym(r){var t=r&&WS.exec(r);if(t){var e=t[1].split(","),n=+Qe(e[0]),i=+Qe(e[1]),a=+Qe(e[2]),o=+Qe(e[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:hs(0,n,a,1,l,s)&&Gt(0,i,o,1,s[0])}}}var GS=(function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||re,this.ondestroy=t.ondestroy||re,this.onrestart=t.onrestart||re,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var n=this._life,i=t-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%n;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(t){this.easing=t,this.easingFunc=Q(t)?t:ma[t]||Ym(t)},r})(),jm=(function(){function r(t){this.value=t}return r})(),$S=(function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new jm(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,n=t.next;e?e.next=n:this.head=n,n?n.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),Xa=(function(){function r(t){this._list=new $S,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var n=this._list,i=this._map,a=null;if(i[t]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=e:s=new jm(e),s.key=t,n.insertEntry(s),i[t]=s}return a},r.prototype.get=function(t){var e=this._map[t],n=this._list;if(e!=null)return e!==n.tail&&(n.remove(e),n.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),fv={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 zr(r){return r=Math.round(r),r<0?0:r>255?255:r}function Rf(r){return r<0?0:r>1?1:r}function Kl(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?zr(parseFloat(t)/100*255):zr(parseInt(t,10))}function ya(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?Rf(parseFloat(t)/100):Rf(parseFloat(t))}function Ql(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function ho(r,t,e){return r+(t-r)*e}function Te(r,t,e,n,i){return r[0]=t,r[1]=e,r[2]=n,r[3]=i,r}function kf(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var Zm=new Xa(20),co=null;function zn(r,t){co&&kf(co,t),co=Zm.put(r,co||t.slice())}function vr(r,t){if(r){t=t||[];var e=Zm.get(r);if(e)return kf(t,e);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in fv)return kf(t,fv[n]),zn(r,t),t;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){Te(t,0,0,0,1);return}return Te(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),zn(r,t),t}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){Te(t,0,0,0,1);return}return Te(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),zn(r,t),t}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Te(t,+u[0],+u[1],+u[2],1):Te(t,0,0,0,1);f=ya(u.pop());case"rgb":if(u.length>=3)return Te(t,Kl(u[0]),Kl(u[1]),Kl(u[2]),u.length===3?f:ya(u[3])),zn(r,t),t;Te(t,0,0,0,1);return;case"hsla":if(u.length!==4){Te(t,0,0,0,1);return}return u[3]=ya(u[3]),hv(u,t),zn(r,t),t;case"hsl":if(u.length!==3){Te(t,0,0,0,1);return}return hv(u,t),zn(r,t),t;default:return}}Te(t,0,0,0,1)}}function hv(r,t){var e=(parseFloat(r[0])%360+360)%360/360,n=ya(r[1]),i=ya(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return t=t||[],Te(t,zr(Ql(o,a,e+1/3)*255),zr(Ql(o,a,e)*255),zr(Ql(o,a,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function cv(r,t){var e=vr(r);if(e){for(var n=0;n<3;n++)e[n]=e[n]*(1-t)|0,e[n]>255?e[n]=255:e[n]<0&&(e[n]=0);return Zs(e,e.length===4?"rgba":"rgb")}}function US(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var n=r*(t.length-1),i=Math.floor(n),a=Math.ceil(n),o=vr(t[i]),s=vr(t[a]),l=n-i,u=Zs([zr(ho(o[0],s[0],l)),zr(ho(o[1],s[1],l)),zr(ho(o[2],s[2],l)),Rf(ho(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function Zs(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function ds(r,t){var e=vr(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var vv=new Xa(100);function dv(r){if(G(r)){var t=vv.get(r);return t||(t=cv(r,-.1),vv.put(r,t)),t}else if(Ys(r)){var e=B({},r);return e.colorStops=X(r.colorStops,function(n){return{offset:n.offset,color:cv(n.color,-.1)}}),e}return r}function YS(r){return r.type==="linear"}function jS(r){return r.type==="radial"}(function(){return K.hasGlobalWindow&&Q(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return process.env.NODE_ENV!=="production"&&bn("Base64 isn't natively supported in the current environment."),null}})();var Of=Array.prototype.slice;function fr(r,t,e){return(t-r)*e+r}function Jl(r,t,e,n){for(var i=t.length,a=0;a<i;a++)r[a]=fr(t[a],e[a],n);return r}function ZS(r,t,e,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=fr(t[o][s],e[o][s],n)}return r}function vo(r,t,e,n){for(var i=t.length,a=0;a<i;a++)r[a]=t[a]+e[a]*n;return r}function pv(r,t,e,n){for(var i=t.length,a=i&&t[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=t[o][s]+e[o][s]*n}return r}function XS(r,t){for(var e=r.length,n=t.length,i=e>n?t:r,a=Math.min(e,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(e,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function qS(r,t,e){var n=r,i=t;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(e===1?i[l]:Of.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(e===1)isNaN(n[l])&&(n[l]=i[l]);else for(var f=0;f<u;f++)isNaN(n[l][f])&&(n[l][f]=i[l][f])}}function Xo(r){if(ce(r)){var t=r.length;if(ce(r[0])){for(var e=[],n=0;n<t;n++)e.push(Of.call(r[n]));return e}return Of.call(r)}return r}function qo(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function KS(r){return ce(r&&r[0])?2:1}var po=0,Ko=1,Xm=2,sa=3,Nf=4,Bf=5,gv=6;function mv(r){return r===Nf||r===Bf}function go(r){return r===Ko||r===Xm}var Hi=[0,0,0,0],QS=(function(){function r(t){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=t}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(t,e,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=gv,l=e;if(ce(e)){var u=KS(e);s=u,(u===1&&!St(e[0])||u===2&&!St(e[0][0]))&&(o=!0)}else if(St(e)&&!La(e))s=po;else if(G(e))if(!isNaN(+e))s=po;else{var f=vr(e);f&&(l=f,s=sa)}else if(Ys(e)){var h=B({},l);h.colorStops=X(e.colorStops,function(v){return{offset:v.offset,color:vr(v.color)}}),YS(e)?s=Nf:jS(e)&&(s=Bf),l=h}a===0?this.valType=s:(s!==this.valType||s===gv)&&(o=!0),this.discrete=this.discrete||o;var c={time:t,value:l,rawValue:e,percent:0};return n&&(c.easing=n,c.easingFunc=Q(n)?n:ma[n]||Ym(n)),i.push(c),c},r.prototype.prepare=function(t,e){var n=this.keyframes;this._needsSort&&n.sort(function(p,g){return p.time-g.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=go(i),u=mv(i),f=0;f<a;f++){var h=n[f],c=h.value,v=o.value;h.percent=h.time/t,s||(l&&f!==a-1?qS(c,v,i):u&&XS(c.colorStops,v.colorStops))}if(!s&&i!==Bf&&e&&this.needsAnimate()&&e.needsAnimate()&&i===e.valType&&!e._finished){this._additiveTrack=e;for(var d=n[0].value,f=0;f<a;f++)i===po?n[f].additiveValue=n[f].value-d:i===sa?n[f].additiveValue=vo([],n[f].value,d,-1):go(i)&&(n[f].additiveValue=i===Ko?vo([],n[f].value,d,-1):pv([],n[f].value,d,-1))}},r.prototype.step=function(t,e){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===sa,f,h=this._lastFr,c=Math.min,v,d;if(s===1)v=d=o[0];else{if(e<0)f=0;else if(e<this._lastFrP){var p=c(h+1,s-1);for(f=p;f>=0&&!(o[f].percent<=e);f--);f=c(f,s-2)}else{for(f=h;f<s&&!(o[f].percent>e);f++);f=c(f-1,s-2)}d=o[f+1],v=o[f]}if(v&&d){this._lastFr=f,this._lastFrP=e;var g=d.percent-v.percent,m=g===0?1:c((e-v.percent)/g,1);d.easingFunc&&(m=d.easingFunc(m));var y=n?this._additiveValue:u?Hi:t[l];if((go(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=m<1?v.rawValue:d.rawValue;else if(go(a))a===Ko?Jl(y,v[i],d[i],m):ZS(y,v[i],d[i],m);else if(mv(a)){var _=v[i],w=d[i],b=a===Nf;t[l]={type:b?"linear":"radial",x:fr(_.x,w.x,m),y:fr(_.y,w.y,m),colorStops:X(_.colorStops,function(x,T){var M=w.colorStops[T];return{offset:fr(x.offset,M.offset,m),color:qo(Jl([],x.color,M.color,m))}}),global:w.global},b?(t[l].x2=fr(_.x2,w.x2,m),t[l].y2=fr(_.y2,w.y2,m)):t[l].r=fr(_.r,w.r,m)}else if(u)Jl(y,v[i],d[i],m),n||(t[l]=qo(y));else{var S=fr(v[i],d[i],m);n?this._additiveValue=S:t[l]=S}n&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,n=this.propName,i=this._additiveValue;e===po?t[n]=t[n]+i:e===sa?(vr(t[n],Hi),vo(Hi,Hi,i,1),t[n]=qo(Hi)):e===Ko?vo(t[n],t[n],i,1):e===Xm&&pv(t[n],t[n],i,1)},r})(),Gh=(function(){function r(t,e,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&i){bn("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(t){this._target=t},r.prototype.when=function(t,e,n){return this.whenWithKeys(t,e,Ct(e),n)},r.prototype.whenWithKeys=function(t,e,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new QS(s);var u=void 0,f=this._getAdditiveTrack(s);if(f){var h=f.keyframes,c=h[h.length-1];u=c&&c.value,f.valType===sa&&u&&(u=qo(u))}else u=this._target[s];if(u==null)continue;t>0&&l.addKeyframe(0,Xo(u),i),this._trackKeys.push(s)}l.addKeyframe(t,Xo(e[s]),i)}return this._maxTime=Math.max(this._maxTime,t),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,n=0;n<e;n++)t[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var t=this.animation,e=this._abortedCbs;if(t&&t.removeClip(this._clip),this._clip=null,e)for(var n=0;n<e.length;n++)e[n].call(this)},r.prototype._setTracksFinished=function(){for(var t=this._tracks,e=this._trackKeys,n=0;n<e.length;n++)t[e[n]].setFinished()},r.prototype._getAdditiveTrack=function(t){var e,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(t);a&&(e=a)}return e},r.prototype.start=function(t){if(!(this._started>0)){this._started=1;for(var e=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,f=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[f-1];h&&(e._target[s.propName]=h.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var c=new GS({life:i,loop:this._loop,delay:this._delay||0,onframe:function(v){e._started=2;var d=e._additiveAnimators;if(d){for(var p=!1,g=0;g<d.length;g++)if(d[g]._clip){p=!0;break}p||(e._additiveAnimators=null)}for(var g=0;g<n.length;g++)n[g].step(e._target,v);var m=e._onframeCbs;if(m)for(var g=0;g<m.length;g++)m[g](e._target,v)},ondestroy:function(){e._doneCallback()}});this._clip=c,this.animation&&this.animation.addClip(c),t&&c.setEasing(t)}else this._doneCallback();return this}},r.prototype.stop=function(t){if(this._clip){var e=this._clip;t&&e.onframe(1),this._abortedCallback()}},r.prototype.delay=function(t){return this._delay=t,this},r.prototype.during=function(t){return t&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(t)),this},r.prototype.done=function(t){return t&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(t)),this},r.prototype.aborted=function(t){return t&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(t)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(t){return this._tracks[t]},r.prototype.getTracks=function(){var t=this;return X(this._trackKeys,function(e){return t._tracks[e]})},r.prototype.stopTracks=function(t,e){if(!t.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<t.length;a++){var o=n[t[a]];o&&!o.isFinished()&&(e?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(t,e,n){if(t){e=e||this._trackKeys;for(var i=0;i<e.length;i++){var a=e[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(t[a]=Xo(l.rawValue))}}}},r.prototype.__changeFinalValue=function(t,e){e=e||Ct(t);for(var n=0;n<e.length;n++){var i=e[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,t[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r})();function ui(){return new Date().getTime()}var JS=(function(r){O(t,r);function t(e){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,e=e||{},n.stage=e.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var n=e.getClip();n&&this.addClip(n)},t.prototype.removeClip=function(e){if(e.animation){var n=e.prev,i=e.next;n?n.next=i:this._head=i,i?i.prev=n:this._tail=n,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var n=e.getClip();n&&this.removeClip(n),e.animation=null},t.prototype.update=function(e){for(var n=ui()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,e||(this.trigger("frame",i),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function n(){e._running&&(us(n),!e._paused&&e.update())}us(n)},t.prototype.start=function(){this._running||(this._time=ui(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=ui(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=ui()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var n=e.next;e.prev=e.next=e.animation=null,e=n}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,n){n=n||{},this.start();var i=new Gh(e,n.loop);return this.addAnimator(i),i},t})(Ue),tx=300,tu=K.domSupported,eu=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=X(r,function(i){var a=i.replace("mouse","pointer");return e.hasOwnProperty(a)?a:i});return{mouse:r,touch:t,pointer:n}})(),yv={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},_v=!1;function Ff(r){var t=r.pointerType;return t==="pen"||t==="touch"}function ex(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function ru(r){r&&(r.zrByTouch=!0)}function rx(r,t){return De(r.dom,new nx(r,t),!0)}function qm(r,t){for(var e=t,n=!1;e&&e.nodeType!==9&&!(n=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return n}var nx=(function(){function r(t,e){this.stopPropagation=re,this.stopImmediatePropagation=re,this.preventDefault=re,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r})(),Ve={mousedown:function(r){r=De(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=De(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=De(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=De(this.dom,r);var t=r.toElement||r.relatedTarget;qm(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){_v=!0,r=De(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){_v||(r=De(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=De(this.dom,r),ru(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Ve.mousemove.call(this,r),Ve.mousedown.call(this,r)},touchmove:function(r){r=De(this.dom,r),ru(r),this.handler.processGesture(r,"change"),Ve.mousemove.call(this,r)},touchend:function(r){r=De(this.dom,r),ru(r),this.handler.processGesture(r,"end"),Ve.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<tx&&Ve.click.call(this,r)},pointerdown:function(r){Ve.mousedown.call(this,r)},pointermove:function(r){Ff(r)||Ve.mousemove.call(this,r)},pointerup:function(r){Ve.mouseup.call(this,r)},pointerout:function(r){Ff(r)||Ve.mouseout.call(this,r)}};D(["click","dblclick","contextmenu"],function(r){Ve[r]=function(t){t=De(this.dom,t),this.trigger(r,t)}});var zf={pointermove:function(r){Ff(r)||zf.mousemove.call(this,r)},pointerup:function(r){zf.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var t=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),t&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function ix(r,t){var e=t.domHandlers;K.pointerEventsSupported?D(eu.pointer,function(n){Qo(t,n,function(i){e[n].call(r,i)})}):(K.touchEventsSupported&&D(eu.touch,function(n){Qo(t,n,function(i){e[n].call(r,i),ex(t)})}),D(eu.mouse,function(n){Qo(t,n,function(i){i=zh(i),t.touching||e[n].call(r,i)})}))}function ax(r,t){K.pointerEventsSupported?D(yv.pointer,e):K.touchEventsSupported||D(yv.mouse,e);function e(n){function i(a){a=zh(a),qm(r,a.target)||(a=rx(r,a),t.domHandlers[n].call(r,a))}Qo(t,n,i,{capture:!0})}}function Qo(r,t,e,n){r.mounted[t]=e,r.listenerOpts[t]=n,SS(r.domTarget,t,e,n)}function nu(r){var t=r.mounted;for(var e in t)t.hasOwnProperty(e)&&xS(r.domTarget,e,t[e],r.listenerOpts[e]);r.mounted={}}var wv=(function(){function r(t,e){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=t,this.domHandlers=e}return r})(),ox=(function(r){O(t,r);function t(e,n){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=e,i.painterRoot=n,i._localHandlerScope=new wv(e,Ve),tu&&(i._globalHandlerScope=new wv(document,zf)),ix(i,i._localHandlerScope),i}return t.prototype.dispose=function(){nu(this._localHandlerScope),tu&&nu(this._globalHandlerScope)},t.prototype.setCursor=function(e){this.dom.style&&(this.dom.style.cursor=e||"default")},t.prototype.__togglePointerCapture=function(e){if(this.__mayPointerCapture=null,tu&&+this.__pointerCapturing^+e){this.__pointerCapturing=e;var n=this._globalHandlerScope;e?ax(this,n):nu(n)}},t})(Ue),Km=1;K.hasGlobalWindow&&(Km=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var ps=Km,Vf=.4,Hf="#333",Wf="#ccc",sx="#eee",bv=Vh,Sv=5e-5;function Kr(r){return r>Sv||r<-Sv}var Qr=[],Vn=[],iu=vi(),au=Math.abs,$h=(function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return Kr(this.rotation)||Kr(this.x)||Kr(this.y)||Kr(this.scaleX-1)||Kr(this.scaleY-1)||Kr(this.skewX)||Kr(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),n=this.transform;if(!(e||t)){n&&(bv(n),this.invTransform=null);return}n=n||vi(),e?this.getLocalTransform(n):bv(n),t&&(e?di(n,t,n):DS(n,t)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(Qr);var n=Qr[0]<0?-1:1,i=Qr[1]<0?-1:1,a=((Qr[0]-n)*e+n)/Qr[0]||0,o=((Qr[1]-i)*e+i)/Qr[1]||0;t[0]*=a,t[1]*=a,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||vi(),Wh(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],n=t[2]*t[2]+t[3]*t[3],i=Math.atan2(t[1],t[0]),a=Math.PI/2+i-Math.atan2(t[3],t[2]);n=Math.sqrt(n)*Math.cos(a),e=Math.sqrt(e),this.skewX=a,this.skewY=0,this.rotation=-i,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||vi(),di(Vn,t.invTransform,e),e=Vn);var n=this.originX,i=this.originY;(n||i)&&(iu[4]=n,iu[5]=i,di(Vn,e,iu),Vn[4]-=n,Vn[5]-=i,e=Vn),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var n=[t,e],i=this.invTransform;return i&&Re(n,n,i),n},r.prototype.transformCoordToGlobal=function(t,e){var n=[t,e],i=this.transform;return i&&Re(n,n,i),n},r.prototype.getLineScale=function(){var t=this.transform;return t&&au(t[0]-1)>1e-10&&au(t[3]-1)>1e-10?Math.sqrt(au(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){lx(this,t)},r.getLocalTransform=function(t,e){e=e||[];var n=t.originX||0,i=t.originY||0,a=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,f=t.x,h=t.y,c=t.skewX?Math.tan(t.skewX):0,v=t.skewY?Math.tan(-t.skewY):0;if(n||i||s||l){var d=n+s,p=i+l;e[4]=-d*a-c*p*o,e[5]=-p*o-v*d*a}else e[4]=e[5]=0;return e[0]=a,e[3]=o,e[1]=v*a,e[2]=c*o,u&&Hh(e,e,u),e[4]+=n+f,e[5]+=i+h,e},r.initDefaultProps=(function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),r})(),Pa=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function lx(r,t){for(var e=0;e<Pa.length;e++){var n=Pa[e];r[n]=t[n]}}var xv={};function _e(r,t){t=t||Mn;var e=xv[t];e||(e=xv[t]=new Xa(500));var n=e.get(r);return n==null&&(n=Ai.measureText(r,t).width,e.put(r,n)),n}function Cv(r,t,e,n){var i=_e(r,t),a=Yh(t),o=la(0,i,e),s=ii(0,a,n),l=new dt(o,s,i,a);return l}function Uh(r,t,e,n){var i=((r||"")+"").split(`
|
|
15
|
+
`),a=i.length;if(a===1)return Cv(i[0],t,e,n);for(var o=new dt(0,0,0,0),s=0;s<i.length;s++){var l=Cv(i[s],t,e,n);s===0?o.copy(l):o.union(l)}return o}function la(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function ii(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function Yh(r){return _e("国",r)}function Wr(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function gs(r,t,e){var n=t.position||"inside",i=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,f="left",h="top";if(n instanceof Array)l+=Wr(n[0],e.width),u+=Wr(n[1],e.height),f=null,h=null;else switch(n){case"left":l-=i,u+=s,f="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=i,f="center";break;case"insideBottom":l+=o/2,u+=a-i,f="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,f="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var ou="__zr_normal__",su=Pa.concat(["ignore"]),ux=Ei(Pa,function(r,t){return r[t]=!0,r},{ignore:!1}),Hn={},fx=new dt(0,0,0,0),Xs=(function(){function r(t){this.id=Pm(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,n){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=t,i[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var n=this.textConfig,i=n.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(e),n.position!=null){var f=fx;n.layoutRect?f.copy(n.layoutRect):f.copy(this.getBoundingRect()),i||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Hn,n,f):gs(Hn,n,f),a.x=Hn.x,a.y=Hn.y,o=Hn.align,s=Hn.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=Wr(h[0],f.width),v=Wr(h[1],f.height)),u=!0,a.originX=-a.x+c+(i?0:f.x),a.originY=-a.y+v+(i?0:f.y)}}n.rotation!=null&&(a.rotation=n.rotation);var d=n.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var p=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;p&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=_,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=ye,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Wf:Hf},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),n=typeof e=="string"&&vr(e);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,Zs(n,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},B(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(Z(t))for(var n=t,i=Ct(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,t[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(t){this._innerSaveToNormal(t);for(var e=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==ou)){var o=i.targetName,s=o?e[o]:e;i.saveTo(s)}}},r.prototype._innerSaveToNormal=function(t){var e=this._normalState;e||(e=this._normalState={}),t.textConfig&&!e.textConfig&&(e.textConfig=this.textConfig),this._savePrimaryToNormal(t,e,su)},r.prototype._savePrimaryToNormal=function(t,e,n){for(var i=0;i<n.length;i++){var a=n[i];t[a]!=null&&!(a in e)&&(e[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(ou,!1,t)},r.prototype.useState=function(t,e,n,i){var a=t===ou,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(yt(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!a){bn("State "+t+" not exists.");return}a||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||i);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,c=this._textGuide;return h&&h.useState(t,e,n,f),c&&c.useState(t,e,n,f),a?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ye),u}}},r.prototype.useStates=function(t,e,n){if(!t.length)this.clearStates();else{var i=[],a=this.currentStates,o=t.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(t[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=t[l],f=void 0;this.stateProxy&&(f=this.stateProxy(u,t)),f||(f=this.states[u]),f&&i.push(f)}var h=i[o-1],c=!!(h&&h.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0);var v=this._mergeStates(i),d=this.stateTransition;this.saveCurrentToNormalState(v),this._applyStateObj(t.join(","),v,this._normalState,!1,!e&&!this.__inHover&&d&&d.duration>0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,c),g&&g.useStates(t,e,c),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ye)}},r.prototype.isSilent=function(){for(var t=this.silent,e=this.parent;!t&&e;){if(e.silent){t=!0;break}e=e.parent}return t},r.prototype._updateAnimationTargets=function(){for(var t=0;t<this.animators.length;t++){var e=this.animators[t];e.targetName&&e.changeTarget(this[e.targetName])}},r.prototype.removeState=function(t){var e=yt(this.currentStates,t);if(e>=0){var n=this.currentStates.slice();n.splice(e,1),this.useStates(n)}},r.prototype.replaceState=function(t,e,n){var i=this.currentStates.slice(),a=yt(i,t),o=yt(i,e)>=0;a>=0?o?i.splice(a,1):i[a]=e:n&&!o&&i.push(e),this.useStates(i)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},n,i=0;i<t.length;i++){var a=t[i];B(e,a),a.textConfig&&(n=n||{},B(n,a.textConfig))}return n&&(e.textConfig=n),e},r.prototype._applyStateObj=function(t,e,n,i,a,o){var s=!(e&&i);e&&e.textConfig?(this.textConfig=B({},i?this.textConfig:n.textConfig),B(this.textConfig,e.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,f=0;f<su.length;f++){var h=su[f],c=a&&ux[h];e&&e[h]!=null?c?(u=!0,l[h]=e[h]):this[h]=e[h]:s&&n[h]!=null&&(c?(u=!0,l[h]=n[h]):this[h]=n[h])}if(!a)for(var f=0;f<this.animators.length;f++){var v=this.animators[f],d=v.targetName;v.getLoop()||v.__changeFinalValue(d?(e||n)[d]:e||n)}u&&this._transitionState(t,l,o)},r.prototype._attachComponent=function(t){if(t.__zr&&!t.__hostTarget){if(process.env.NODE_ENV!=="production")throw new Error("Text element has been added to zrender.");return}if(t===this){if(process.env.NODE_ENV!=="production")throw new Error("Recursive component attachment.");return}var e=this.__zr;e&&t.addSelfToZr(e),t.__zr=e,t.__hostTarget=this},r.prototype._detachComponent=function(t){t.__zr&&t.removeSelfFromZr(t.__zr),t.__zr=null,t.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(t){this._clipPath&&this._clipPath!==t&&this.removeClipPath(),this._attachComponent(t),this._clipPath=t,this.markRedraw()},r.prototype.removeClipPath=function(){var t=this._clipPath;t&&(this._detachComponent(t),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(t){var e=this._textContent;if(e!==t){if(e&&e!==t&&this.removeTextContent(),process.env.NODE_ENV!=="production"&&t.__zr&&!t.__hostTarget)throw new Error("Text element has been added to zrender.");t.innerTransformable=new $h,this._attachComponent(t),this._textContent=t,this.markRedraw()}},r.prototype.setTextConfig=function(t){this.textConfig||(this.textConfig={}),B(this.textConfig,t),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var t=this._textContent;t&&(t.innerTransformable=null,this._detachComponent(t),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(t){this._textGuide&&this._textGuide!==t&&this.removeTextGuideLine(),this._attachComponent(t),this._textGuide=t,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var t=this._textGuide;t&&(this._detachComponent(t),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=ye;var t=this.__zr;t&&(this.__inHover?t.refreshHover():t.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(t){this.__inHover=t;var e=this._textContent,n=this._textGuide;e&&(e.__inHover=t),n&&(n.__inHover=t)},r.prototype.addSelfToZr=function(t){if(this.__zr!==t){this.__zr=t;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.addAnimator(e[n]);this._clipPath&&this._clipPath.addSelfToZr(t),this._textContent&&this._textContent.addSelfToZr(t),this._textGuide&&this._textGuide.addSelfToZr(t)}},r.prototype.removeSelfFromZr=function(t){if(this.__zr){this.__zr=null;var e=this.animators;if(e)for(var n=0;n<e.length;n++)t.animation.removeAnimator(e[n]);this._clipPath&&this._clipPath.removeSelfFromZr(t),this._textContent&&this._textContent.removeSelfFromZr(t),this._textGuide&&this._textGuide.removeSelfFromZr(t)}},r.prototype.animate=function(t,e,n){var i=t?this[t]:this;if(process.env.NODE_ENV!=="production"&&!i){bn('Property "'+t+'" is not existed in element '+this.id);return}var a=new Gh(i,e,n);return t&&(a.targetName=t),this.addAnimator(a,t),a},r.prototype.addAnimator=function(t,e){var n=this.__zr,i=this;t.during(function(){i.updateDuringAnimation(e)}).done(function(){var a=i.animators,o=yt(a,t);o>=0&&a.splice(o,1)}),this.animators.push(t),n&&n.animation.addAnimator(t),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var n=this.animators,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!t||t===s.scope?s.stop(e):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(t,e,n){lu(this,t,e,n)},r.prototype.animateFrom=function(t,e,n){lu(this,t,e,n,!0)},r.prototype._transitionState=function(t,e,n,i){for(var a=lu(this,e,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=t},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=(function(){var t=r.prototype;t.type="element",t.name="",t.ignore=t.silent=t.isGroup=t.draggable=t.dragging=t.ignoreClip=t.__inHover=!1,t.__dirty=ye;var e={};function n(a,o,s){e[a+o+s]||(console.warn("DEPRECATED: '"+a+"' has been deprecated. use '"+o+"', '"+s+"' instead"),e[a+o+s]=!0)}function i(a,o,s,l){Object.defineProperty(t,a,{get:function(){if(process.env.NODE_ENV!=="production"&&n(a,s,l),!this[o]){var f=this[o]=[];u(this,f)}return this[o]},set:function(f){process.env.NODE_ENV!=="production"&&n(a,s,l),this[s]=f[0],this[l]=f[1],this[o]=f,u(this,f)}});function u(f,h){Object.defineProperty(h,0,{get:function(){return f[s]},set:function(c){f[s]=c}}),Object.defineProperty(h,1,{get:function(){return f[l]},set:function(c){f[l]=c}})}}Object.defineProperty&&(i("position","_legacyPos","x","y"),i("scale","_legacyScale","scaleX","scaleY"),i("origin","_legacyOrigin","originX","originY"))})(),r})();$e(Xs,Ue);$e(Xs,$h);function lu(r,t,e,n,i){e=e||{};var a=[];Qm(r,"",r,t,e,n,a,i);var o=a.length,s=!1,l=e.done,u=e.aborted,f=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},h=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&e.during&&a[0].during(function(d,p){e.during(p)});for(var c=0;c<a.length;c++){var v=a[c];f&&v.done(f),h&&v.aborted(h),e.force&&v.duration(e.duration),v.start(e.easing)}return a}function uu(r,t,e){for(var n=0;n<e;n++)r[n]=t[n]}function hx(r){return ce(r[0])}function cx(r,t,e){if(ce(t[e]))if(ce(r[e])||(r[e]=[]),ie(t[e])){var n=t[e].length;r[e].length!==n&&(r[e]=new t[e].constructor(n),uu(r[e],t[e],n))}else{var i=t[e],a=r[e],o=i.length;if(hx(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?uu(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else uu(a,i,o);a.length=i.length}else r[e]=t[e]}function vx(r,t){return r===t||ce(r)&&ce(t)&&dx(r,t)}function dx(r,t){var e=r.length;if(e!==t.length)return!1;for(var n=0;n<e;n++)if(r[n]!==t[n])return!1;return!0}function Qm(r,t,e,n,i,a,o,s){for(var l=Ct(n),u=i.duration,f=i.delay,h=i.additive,c=i.setToFinal,v=!Z(a),d=r.animators,p=[],g=0;g<l.length;g++){var m=l[g],y=n[m];if(y!=null&&e[m]!=null&&(v||a[m]))if(Z(y)&&!ce(y)&&!Ys(y)){if(t){s||(e[m]=y,r.updateDuringAnimation(t));continue}Qm(r,m,e[m],y,i,a&&a[m],o,s)}else p.push(m);else s||(e[m]=y,r.updateDuringAnimation(t),p.push(m))}var _=p.length;if(!h&&_)for(var w=0;w<d.length;w++){var b=d[w];if(b.targetName===t){var S=b.stopTracks(p);if(S){var x=yt(d,b);d.splice(x,1)}}}if(i.force||(p=Wt(p,function(C){return!vx(n[C],e[C])}),_=p.length),_>0||i.force&&!o.length){var T=void 0,M=void 0,A=void 0;if(s){M={},c&&(T={});for(var w=0;w<_;w++){var m=p[w];M[m]=e[m],c?T[m]=n[m]:e[m]=n[m]}}else if(c){A={};for(var w=0;w<_;w++){var m=p[w];A[m]=Xo(e[m]),cx(e,n,m)}}var b=new Gh(e,!1,!1,h?Wt(d,function(I){return I.targetName===t}):null);b.targetName=t,i.scope&&(b.scope=i.scope),c&&T&&b.whenWithKeys(0,T,p),A&&b.whenWithKeys(0,A,p),b.whenWithKeys(u??500,s?M:n,p).delay(f||0),r.addAnimator(b,t),o.push(b)}}var kt=(function(r){O(t,r);function t(e){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var n=this._children,i=0;i<n.length;i++)if(n[i].name===e)return n[i]},t.prototype.childCount=function(){return this._children.length},t.prototype.add=function(e){if(e&&(e!==this&&e.parent!==this&&(this._children.push(e),this._doAdd(e)),process.env.NODE_ENV!=="production"&&e.__hostTarget))throw"This elemenet has been used as an attachment";return this},t.prototype.addBefore=function(e,n){if(e&&e!==this&&e.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,n){var i=yt(this._children,e);return i>=0&&this.replaceAt(n,i),this},t.prototype.replaceAt=function(e,n){var i=this._children,a=i[n];if(e&&e!==this&&e.parent!==this&&e!==a){i[n]=e,a.parent=null;var o=this.__zr;o&&a.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var n=this.__zr;n&&n!==e.__zr&&e.addSelfToZr(n),n&&n.refresh()},t.prototype.remove=function(e){var n=this.__zr,i=this._children,a=yt(i,e);return a<0?this:(i.splice(a,1),e.parent=null,n&&e.removeSelfFromZr(n),n&&n.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,n=this.__zr,i=0;i<e.length;i++){var a=e[i];n&&a.removeSelfFromZr(n),a.parent=null}return e.length=0,this},t.prototype.eachChild=function(e,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];e.call(n,o,a)}return this},t.prototype.traverse=function(e,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=e.call(n,a);a.isGroup&&!o&&a.traverse(e,n)}return this},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(e)}},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(e)}},t.prototype.getBoundingRect=function(e){for(var n=new dt(0,0,0,0),i=e||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),f=l.getLocalTransform(a);f?(dt.applyTransform(n,u,f),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},t})(Xs);kt.prototype.type="group";/*!
|
|
16
|
+
* ZRender, a high performance 2d drawing library.
|
|
17
|
+
*
|
|
18
|
+
* Copyright (c) 2013, Baidu Inc.
|
|
19
|
+
* All rights reserved.
|
|
20
|
+
*
|
|
21
|
+
* LICENSE
|
|
22
|
+
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
|
23
|
+
*/var ua={},Jm={};function px(r){delete Jm[r]}function gx(r){if(!r)return!1;if(typeof r=="string")return ds(r,1)<Vf;if(r.colorStops){for(var t=r.colorStops,e=0,n=t.length,i=0;i<n;i++)e+=ds(t[i].color,1);return e/=n,e<Vf}return!1}var mx=(function(){function r(t,e,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=e,this.id=t;var a=new NS,o=n.renderer||"canvas";if(ua[o]||(o=Ct(ua)[0]),process.env.NODE_ENV!=="production"&&!ua[o])throw new Error("Renderer '"+o+"' is not imported. Please import it first.");n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new ua[o](e,a,n,t),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!K.node&&!K.worker&&!l?new ox(s.getViewportRoot(),s.root):null,f=n.useCoarsePointer,h=f==null||f==="auto"?K.touchEventsSupported:!!f,c=44,v;h&&(v=rt(n.pointerSize,c)),this.handler=new zm(a,s,u,s.root,v),this.animation=new JS({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=gx(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(t){var e,n=ui();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var i=ui();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,n){return this._disposed||this.handler.on(t,e,n),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof kt&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.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,px(this.id))},r})();function Tv(r,t){var e=new mx(Pm(),r,t);return Jm[e.id]=e,e}function yx(r,t){ua[r]=t}var Dv=1e-4,ty=20;function _x(r){return r.replace(/^\s+|\s+$/g,"")}function Xt(r,t,e,n){var i=t[0],a=t[1],o=e[0],s=e[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}function Pt(r,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return G(r)?_x(r).match(/%$/)?parseFloat(r)/100*t:parseFloat(r):r==null?NaN:+r}function Rt(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),ty),r=(+r).toFixed(t),e?r:+r}function fa(r){return r.sort(function(t,e){return t-e}),r}function hr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return Gf(r)}function Gf(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),n=e>0?+t.slice(e+1):0,i=e>0?e:t.length,a=t.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function ey(r,t){var e=Math.log,n=Math.LN10,i=Math.floor(e(r[1]-r[0])/n),a=Math.round(e(Math.abs(t[1]-t[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function bx(r,t){var e=Math.max(hr(r),hr(t)),n=r+t;return e>ty?n:Rt(n,e)}function ry(r){var t=Math.PI*2;return(r%t+t)%t}function ms(r){return r>-Dv&&r<Dv}var Sx=/^(?:(\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 gr(r){if(r instanceof Date)return r;if(G(r)){var t=Sx.exec(r);if(!t)return new Date(NaN);if(t[8]){var e=+t[4]||0;return t[8].toUpperCase()!=="Z"&&(e-=+t[8].slice(0,3)),new Date(Date.UTC(+t[1],+(t[2]||1)-1,+t[3]||1,e,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0))}else return new Date(+t[1],+(t[2]||1)-1,+t[3]||1,+t[4]||0,+(t[5]||0),+t[6]||0,t[7]?+t[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function xx(r){return Math.pow(10,qs(r))}function qs(r){if(r===0)return 0;var t=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,t)>=10&&t++,t}function ny(r,t){var e=qs(r),n=Math.pow(10,e),i=r/n,a;return i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10,r=a*n,e>=-20?+r.toFixed(e<0?-e:0):r}function ys(r){var t=parseFloat(r);return t==r&&(t!==0||!G(r)||r.indexOf("x")<=0)?t:NaN}function iy(r){return!isNaN(ys(r))}function ay(){return Math.round(Math.random()*9)}function oy(r,t){return t===0?r:oy(t,r%t)}function Mv(r,t){return r==null?t:t==null?r:r*t/oy(r,t)}var Cx="[ECharts] ",Av={},Tx=typeof console<"u"&&console.warn&&console.log;function Ks(r,t,e){if(Tx){if(e){if(Av[t])return;Av[t]=!0}console[r](Cx+t)}}function Dx(r,t){Ks("log",r,t)}function Kt(r,t){Ks("warn",r,t)}function Qt(r,t){Ks("error",r,t)}function We(r){process.env.NODE_ENV!=="production"&&Ks("warn","DEPRECATED: "+r,!0)}function Ht(r,t,e){process.env.NODE_ENV!=="production"&&We((e?"["+e+"]":"")+(r+" is deprecated, use "+t+" instead."))}function _s(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];var e="";if(process.env.NODE_ENV!=="production"){var n=function(i){return i===void 0?"undefined":i===1/0?"Infinity":i===-1/0?"-Infinity":La(i)?"NaN":i instanceof Date?"Date("+i.toISOString()+")":Q(i)?"function () { ... }":Jb(i)?i+"":null};e=X(r,function(i){if(G(i))return i;var a=n(i);if(a!=null)return a;if(typeof JSON<"u"&&JSON.stringify)try{return JSON.stringify(i,function(o,s){var l=n(s);return l??s})}catch{return"?"}else return"?"}).join(" ")}return e}function ue(r){throw new Error(r)}function Iv(r,t,e){return(t-r)*e+r}var sy="series\0",Mx="\0_ec_\0";function ne(r){return r instanceof Array?r:r==null?[]:[r]}function Ev(r,t,e){if(r){r[t]=r[t]||{},r.emphasis=r.emphasis||{},r.emphasis[t]=r.emphasis[t]||{};for(var n=0,i=e.length;n<i;n++){var a=e[n];!r.emphasis[t].hasOwnProperty(a)&&r[t].hasOwnProperty(a)&&(r.emphasis[t][a]=r[t][a])}}}var Lv=["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 qa(r){return Z(r)&&!H(r)&&!(r instanceof Date)?r.value:r}function Ax(r){return Z(r)&&!(r instanceof Array)}function Ix(r,t,e){var n=e==="normalMerge",i=e==="replaceMerge",a=e==="replaceAll";r=r||[],t=(t||[]).slice();var o=et();D(t,function(l,u){if(!Z(l)){t[u]=null;return}process.env.NODE_ENV!=="production"&&(l.id!=null&&!Rv(l.id)&&Pv(l.id),l.name!=null&&!Rv(l.name)&&Pv(l.name))});var s=Ex(r,o,e);return(n||i)&&Lx(s,r,o,t),n&&Px(s,t),n||i?Rx(s,t,i):a&&kx(s,t),Ox(s),s}function Ex(r,t,e){var n=[];if(e==="replaceAll")return n;for(var i=0;i<r.length;i++){var a=r[i];a&&a.id!=null&&t.set(a.id,i),n.push({existing:e==="replaceMerge"||bi(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function Lx(r,t,e,n){D(n,function(i,a){if(!(!i||i.id==null)){var o=_a(i.id),s=e.get(o);if(s!=null){var l=r[s];nt(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=t[s],n[a]=null}}})}function Px(r,t){D(t,function(e,n){if(!(!e||e.name==null))for(var i=0;i<r.length;i++){var a=r[i].existing;if(!r[i].newOption&&a&&(a.id==null||e.id==null)&&!bi(e)&&!bi(a)&&ly("name",a,e)){r[i].newOption=e,t[n]=null;return}}})}function Rx(r,t,e){D(t,function(n){if(n){for(var i,a=0;(i=r[a])&&(i.newOption||bi(i.existing)||i.existing&&n.id!=null&&!ly("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=e):r.push({newOption:n,brandNew:e,existing:null,keyInfo:null}),a++}})}function kx(r,t){D(t,function(e){r.push({newOption:e,brandNew:!0,existing:null,keyInfo:null})})}function Ox(r){var t=et();D(r,function(e){var n=e.existing;n&&t.set(n.id,e)}),D(r,function(e){var n=e.newOption;nt(!n||n.id==null||!t.get(n.id)||t.get(n.id)===e,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&t.set(n.id,e),!e.keyInfo&&(e.keyInfo={})}),D(r,function(e,n){var i=e.existing,a=e.newOption,o=e.keyInfo;if(Z(a)){if(o.name=a.name!=null?_a(a.name):i?i.name:sy+n,i)o.id=_a(i.id);else if(a.id!=null)o.id=_a(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(t.get(o.id))}t.set(o.id,e)}})}function ly(r,t,e){var n=er(t[r],null),i=er(e[r],null);return n!=null&&i!=null&&n===i}function _a(r){if(process.env.NODE_ENV!=="production"&&r==null)throw new Error;return er(r,"")}function er(r,t){return r==null?t:G(r)?r:St(r)||ls(r)?r+"":t}function Pv(r){process.env.NODE_ENV!=="production"&&Kt("`"+r+"` is invalid id or name. Must be a string or number.")}function Rv(r){return ls(r)||iy(r)}function jh(r){var t=r.name;return!!(t&&t.indexOf(sy))}function bi(r){return r&&r.id!=null&&_a(r.id).indexOf(Mx)===0}function Nx(r,t,e){D(r,function(n){var i=n.newOption;Z(i)&&(n.keyInfo.mainType=t,n.keyInfo.subType=Bx(t,i,n.existing,e))})}function Bx(r,t,e,n){var i=t.type?t.type:e?e.subType:n.determineSubType(r,t);return i}function En(r,t){if(t.dataIndexInside!=null)return t.dataIndexInside;if(t.dataIndex!=null)return H(t.dataIndex)?X(t.dataIndex,function(e){return r.indexOfRawIndex(e)}):r.indexOfRawIndex(t.dataIndex);if(t.name!=null)return H(t.name)?X(t.name,function(e){return r.indexOfName(e)}):r.indexOfName(t.name)}function Ot(){var r="__ec_inner_"+Fx++;return function(t){return t[r]||(t[r]={})}}var Fx=ay();function fu(r,t,e){var n=Zh(t,e),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=e?e.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,f){var h=Ka(r,f,u,{useDefault:l===f,enableAll:e&&e.enableAll!=null?e.enableAll:!0,enableNone:e&&e.enableNone!=null?e.enableNone:!0});s[f+"Models"]=h.models,s[f+"Model"]=h.models[0]}),s}function Zh(r,t){var e;if(G(r)){var n={};n[r+"Index"]=0,e=n}else e=r;var i=et(),a={},o=!1;return D(e,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],f=u[1],h=(u[2]||"").toLowerCase();if(!(!f||!h||t&&t.includeMainTypes&&yt(t.includeMainTypes,f)<0)){o=o||!!f;var c=i.get(f)||i.set(f,{});c[h]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var he={useDefault:!0,enableAll:!1,enableNone:!1},zx={useDefault:!1,enableAll:!0,enableNone:!0};function Ka(r,t,e,n){n=n||he;var i=e.index,a=e.id,o=e.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(t))?[l]:[],s}return i==="none"||i===!1?(nt(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i==="all"&&(nt(n.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=r.queryComponents({mainType:t,index:i,id:a,name:o}),s)}function uy(r,t,e){r.setAttribute?r.setAttribute(t,e):r[t]=e}function Vx(r,t){return r.getAttribute?r.getAttribute(t):r[t]}function Hx(r){return r==="auto"?K.domSupported?"html":"richText":r||"html"}function Wx(r,t,e,n,i){var a=t==null||t==="auto";if(n==null)return n;if(St(n)){var o=Iv(e||0,n,i);return Rt(o,a?Math.max(hr(e||0),hr(n)):t)}else{if(G(n))return i<1?e:n;for(var s=[],l=e,u=n,f=Math.max(l?l.length:0,u.length),h=0;h<f;++h){var c=r.getDimensionInfo(h);if(c&&c.type==="ordinal")s[h]=(i<1&&l?l:u)[h];else{var v=l&&l[h]?l[h]:0,d=u[h],o=Iv(v,d,i);s[h]=Rt(o,a?Math.max(hr(v),hr(d)):t)}}return s}}var Gx=".",Jr="___EC__COMPONENT__CONTAINER___",fy="___EC__EXTENDED_CLASS___";function Je(r){var t={main:"",sub:""};if(r){var e=r.split(Gx);t.main=e[0]||"",t.sub=e[1]||""}return t}function $x(r){nt(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function Ux(r){return!!(r&&r[fy])}function Xh(r,t){r.$constructor=r,r.extend=function(e){process.env.NODE_ENV!=="production"&&D(t,function(a){e[a]||console.warn("Method `"+a+"` should be implemented"+(e.type?" in "+e.type:"")+".")});var n=this,i;return Yx(n)?i=(function(a){O(o,a);function o(){return a.apply(this,arguments)||this}return o})(n):(i=function(){(e.$constructor||n).apply(this,arguments)},qb(i,this)),B(i.prototype,e),i[fy]=!0,i.extend=this.extend,i.superCall=Xx,i.superApply=qx,i.superClass=n,i}}function Yx(r){return Q(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function hy(r,t){r.extend=t.extend}var jx=Math.round(Math.random()*10);function Zx(r){var t=["__\0is_clz",jx++].join("_");r.prototype[t]=!0,process.env.NODE_ENV!=="production"&&nt(!r.isInstance,'The method "is" can not be defined.'),r.isInstance=function(e){return!!(e&&e[t])}}function Xx(r,t){for(var e=[],n=2;n<arguments.length;n++)e[n-2]=arguments[n];return this.superClass.prototype[t].apply(r,e)}function qx(r,t,e){return this.superClass.prototype[t].apply(r,e)}function Qs(r){var t={};r.registerClass=function(n){var i=n.type||n.prototype.type;if(i){$x(i),n.prototype.type=i;var a=Je(i);if(!a.sub)process.env.NODE_ENV!=="production"&&t[a.main]&&console.warn(a.main+" exists."),t[a.main]=n;else if(a.sub!==Jr){var o=e(a);o[a.sub]=n}}return n},r.getClass=function(n,i,a){var o=t[n];if(o&&o[Jr]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var i=Je(n),a=[],o=t[i.main];return o&&o[Jr]?D(o,function(s,l){l!==Jr&&a.push(s)}):a.push(o),a},r.hasClass=function(n){var i=Je(n);return!!t[i.main]},r.getAllClassMainTypes=function(){var n=[];return D(t,function(i,a){n.push(a)}),n},r.hasSubTypes=function(n){var i=Je(n),a=t[i.main];return a&&a[Jr]};function e(n){var i=t[n.main];return(!i||!i[Jr])&&(i=t[n.main]={},i[Jr]=!0),i}}function Ra(r,t){for(var e=0;e<r.length;e++)r[e][1]||(r[e][1]=r[e][0]);return t=t||!1,function(n,i,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&&yt(i,l)>=0||a&&yt(a,l)<0)){var u=n.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var Kx=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Qx=Ra(Kx),Jx=(function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return Qx(this,t,e)},r})(),$f=new Xa(50);function tC(r){if(typeof r=="string"){var t=$f.get(r);return t&&t.image}else return r}function cy(r,t,e,n,i){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var a=$f.get(r),o={hostEl:e,cb:n,cbPayload:i};return a?(t=a.image,!Js(t)&&a.pending.push(o)):(t=Ai.loadImage(r,kv,kv),t.__zrImageSrc=r,$f.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function kv(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t<r.pending.length;t++){var e=r.pending[t],n=e.cb;n&&n(this,e.cbPayload),e.hostEl.dirty()}r.pending.length=0}function Js(r){return r&&r.width&&r.height}var hu=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function eC(r,t,e,n,i,a){if(!e){r.text="",r.isTruncated=!1;return}var o=(t+"").split(`
|
|
24
|
+
`);a=vy(e,n,i,a);for(var s=!1,l={},u=0,f=o.length;u<f;u++)dy(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
|
25
|
+
`),r.isTruncated=s}function vy(r,t,e,n){n=n||{};var i=B({},n);i.font=t,e=rt(e,"..."),i.maxIterations=rt(n.maxIterations,2);var a=i.minChar=rt(n.minChar,0);i.cnCharWidth=_e("国",t);var o=i.ascCharWidth=_e("a",t);i.placeholder=rt(n.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=_e(e,t);return u>s&&(e="",u=0),s=r-u,i.ellipsis=e,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function dy(r,t,e){var n=e.containerWidth,i=e.font,a=e.contentWidth;if(!n){r.textLine="",r.isTruncated=!1;return}var o=_e(t,i);if(o<=n){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?rC(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=_e(t,i)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function rC(r,t,e,n){for(var i=0,a=0,o=r.length;a<o&&i<t;a++){var s=r.charCodeAt(a);i+=0<=s&&s<=127?e:n}return a}function nC(r,t){r!=null&&(r+="");var e=t.overflow,n=t.padding,i=t.font,a=e==="truncate",o=Yh(i),s=rt(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",f=!1,h=t.width,c;h!=null&&(e==="break"||e==="breakAll")?c=r?py(r,t.font,h,e==="breakAll",0).lines:[]:c=r?r.split(`
|
|
26
|
+
`):[];var v=c.length*s,d=rt(t.height,v);if(v>d&&u){var p=Math.floor(d/s);f=f||c.length>p,c=c.slice(0,p)}if(r&&a&&h!=null)for(var g=vy(h,i,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m={},y=0;y<c.length;y++)dy(m,c[y],g),c[y]=m.textLine,f=f||m.isTruncated;for(var _=d,w=0,y=0;y<c.length;y++)w=Math.max(_e(c[y],i),w);h==null&&(h=w);var b=w;return n&&(_+=n[0]+n[2],b+=n[1]+n[3],h+=n[1]+n[3]),l&&(b=h),{lines:c,height:d,outerWidth:b,outerHeight:_,lineHeight:s,calculatedLineHeight:o,contentWidth:w,contentHeight:v,width:h,isTruncated:f}}var iC=(function(){function r(){}return r})(),Ov=(function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r})(),aC=(function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r})();function oC(r,t){var e=new aC;if(r!=null&&(r+=""),!r)return e;for(var n=t.width,i=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=hu.lastIndex=0,l;(l=hu.exec(r))!=null;){var u=l.index;u>s&&cu(e,r.substring(s,u),t,o),cu(e,l[2],t,o,l[1]),s=hu.lastIndex}s<r.length&&cu(e,r.substring(s,r.length),t,o);var f=[],h=0,c=0,v=t.padding,d=a==="truncate",p=t.lineOverflow==="truncate",g={};function m($,j,J){$.width=j,$.lineHeight=J,h+=J,c=Math.max(c,j)}t:for(var y=0;y<e.lines.length;y++){for(var _=e.lines[y],w=0,b=0,S=0;S<_.tokens.length;S++){var x=_.tokens[S],T=x.styleName&&t.rich[x.styleName]||{},M=x.textPadding=T.padding,A=M?M[1]+M[3]:0,C=x.font=T.font||t.font;x.contentHeight=Yh(C);var I=rt(T.height,x.contentHeight);if(x.innerHeight=I,M&&(I+=M[0]+M[2]),x.height=I,x.lineHeight=hi(T.lineHeight,t.lineHeight,I),x.align=T&&T.align||t.align,x.verticalAlign=T&&T.verticalAlign||"middle",p&&i!=null&&h+x.lineHeight>i){var E=e.lines.length;S>0?(_.tokens=_.tokens.slice(0,S),m(_,b,w),e.lines=e.lines.slice(0,y+1)):e.lines=e.lines.slice(0,y),e.isTruncated=e.isTruncated||e.lines.length<E;break t}var L=T.width,P=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")x.percentWidth=L,f.push(x),x.contentWidth=_e(x.text,C);else{if(P){var R=T.backgroundColor,z=R&&R.image;z&&(z=tC(z),Js(z)&&(x.width=Math.max(x.width,z.width*I/z.height)))}var k=d&&n!=null?n-b:null;k!=null&&k<x.width?!P||k<A?(x.text="",x.width=x.contentWidth=0):(eC(g,x.text,k-A,C,t.ellipsis,{minChar:t.truncateMinChar}),x.text=g.text,e.isTruncated=e.isTruncated||g.isTruncated,x.width=x.contentWidth=_e(x.text,C)):x.contentWidth=_e(x.text,C)}x.width+=A,b+=x.width,T&&(w=Math.max(w,x.lineHeight))}m(_,b,w)}e.outerWidth=e.width=rt(n,c),e.outerHeight=e.height=rt(i,h),e.contentHeight=h,e.contentWidth=c,v&&(e.outerWidth+=v[1]+v[3],e.outerHeight+=v[0]+v[2]);for(var y=0;y<f.length;y++){var x=f[y],V=x.percentWidth;x.width=parseInt(V,10)/100*e.width}return e}function cu(r,t,e,n,i){var a=t==="",o=i&&e.rich[i]||{},s=r.lines,l=o.font||e.font,u=!1,f,h;if(n){var c=o.padding,v=c?c[1]+c[3]:0;if(o.width!=null&&o.width!=="auto"){var d=Wr(o.width,n.width)+v;s.length>0&&d+n.accumWidth>n.width&&(f=t.split(`
|
|
27
|
+
`),u=!0),n.accumWidth=d}else{var p=py(t,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=p.accumWidth+v,h=p.linesWidths,f=p.lines}}else f=t.split(`
|
|
28
|
+
`);for(var g=0;g<f.length;g++){var m=f[g],y=new iC;if(y.styleName=i,y.text=m,y.isLineHolder=!m&&!a,typeof o.width=="number"?y.width=o.width:y.width=h?h[g]:_e(m,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new Ov)).tokens,w=_.length;w===1&&_[0].isLineHolder?_[0]=y:(m||!w||a)&&_.push(y)}else s.push(new Ov([y]))}}function sC(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var lC=Ei(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function uC(r){return sC(r)?!!lC[r]:!0}function py(r,t,e,n,i){for(var a=[],o=[],s="",l="",u=0,f=0,h=0;h<r.length;h++){var c=r.charAt(h);if(c===`
|
|
29
|
+
`){l&&(s+=l,f+=u),a.push(s),o.push(f),s="",l="",u=0,f=0;continue}var v=_e(c,t),d=n?!1:!uC(c);if(a.length?f+v>e:i+f+v>e){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=c,f=v)):d?(a.push(l),o.push(u),l=c,u=v):(a.push(c),o.push(v));continue}f+=v,d?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=i),{accumWidth:f,lines:a,linesWidths:o}}var Uf="__zr_style_"+Math.round(Math.random()*10),Sn={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},tl={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Sn[Uf]=!0;var Nv=["z","z2","invisible"],fC=["invisible"],Qa=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var n=Ct(e),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&hC(this,e,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,n){return this.rectContain(e,n)},t.prototype.traverse=function(e,n){e.call(n,this)},t.prototype.rectContain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new dt(0,0,0,0)),n?dt.applyTransform(e,i,n):e.copy(i),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new dt(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,n){e!=="style"?r.prototype.attrKV.call(this,e,n):this.style?this.setStyle(n):this.useStyle(n)},t.prototype.setStyle=function(e,n){return typeof e=="string"?this.style[e]=n:B(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=oa,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&oa)},t.prototype.styleUpdated=function(){this.__dirty&=~oa},t.prototype.createStyle=function(e){return js(Sn,e)},t.prototype.useStyle=function(e){e[Uf]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Uf]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,n,Nv)},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var f=this.style;if(this.style=this.createStyle(l?{}:f),l)for(var h=Ct(f),c=0;c<h.length;c++){var v=h[c];v in u&&(u[v]=u[v],this.style[v]=f[v])}for(var d=Ct(u),c=0;c<d.length;c++){var v=d[c];this.style[v]=this.style[v]}this._transitionState(e,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var p=this.__inHover?fC:Nv,c=0;c<p.length;c++){var v=p[c];n&&n[v]!=null?this[v]=n[v]:l&&i[v]!=null&&(this[v]=i[v])}},t.prototype._mergeStates=function(e){for(var n=r.prototype._mergeStates.call(this,e),i,a=0;a<e.length;a++){var o=e[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},t.prototype._mergeStyle=function(e,n){return B(e,n),e},t.prototype.getAnimationStyleProps=function(){return tl},t.initDefaultProps=(function(){var e=t.prototype;e.type="displayable",e.invisible=!1,e.z=0,e.z2=0,e.zlevel=0,e.culling=!1,e.cursor="pointer",e.rectHover=!1,e.incremental=!1,e._rect=null,e.dirtyRectTolerance=0,e.__dirty=ye|oa})(),t})(Xs),vu=new dt(0,0,0,0),du=new dt(0,0,0,0);function hC(r,t,e){return vu.copy(r.getBoundingRect()),r.transform&&vu.applyTransform(r.transform),du.width=t,du.height=e,!vu.intersect(du)}var Ee=Math.min,Le=Math.max,pu=Math.sin,gu=Math.cos,tn=Math.PI*2,mo=Li(),yo=Li(),_o=Li();function Bv(r,t,e,n,i,a){i[0]=Ee(r,e),i[1]=Ee(t,n),a[0]=Le(r,e),a[1]=Le(t,n)}var Fv=[],zv=[];function cC(r,t,e,n,i,a,o,s,l,u){var f=$m,h=Gt,c=f(r,e,i,o,Fv);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var v=0;v<c;v++){var d=h(r,e,i,o,Fv[v]);l[0]=Ee(d,l[0]),u[0]=Le(d,u[0])}c=f(t,n,a,s,zv);for(var v=0;v<c;v++){var p=h(t,n,a,s,zv[v]);l[1]=Ee(p,l[1]),u[1]=Le(p,u[1])}l[0]=Ee(r,l[0]),u[0]=Le(r,u[0]),l[0]=Ee(o,l[0]),u[0]=Le(o,u[0]),l[1]=Ee(t,l[1]),u[1]=Le(t,u[1]),l[1]=Ee(s,l[1]),u[1]=Le(s,u[1])}function vC(r,t,e,n,i,a,o,s){var l=Um,u=le,f=Le(Ee(l(r,e,i),1),0),h=Le(Ee(l(t,n,a),1),0),c=u(r,e,i,f),v=u(t,n,a,h);o[0]=Ee(r,i,c),o[1]=Ee(t,a,v),s[0]=Le(r,i,c),s[1]=Le(t,a,v)}function dC(r,t,e,n,i,a,o,s,l){var u=si,f=li,h=Math.abs(i-a);if(h%tn<1e-4&&h>1e-4){s[0]=r-e,s[1]=t-n,l[0]=r+e,l[1]=t+n;return}if(mo[0]=gu(i)*e+r,mo[1]=pu(i)*n+t,yo[0]=gu(a)*e+r,yo[1]=pu(a)*n+t,u(s,mo,yo),f(l,mo,yo),i=i%tn,i<0&&(i=i+tn),a=a%tn,a<0&&(a=a+tn),i>a&&!o?a+=tn:i<a&&o&&(i+=tn),o){var c=a;a=i,i=c}for(var v=0;v<a;v+=Math.PI/2)v>i&&(_o[0]=gu(v)*e+r,_o[1]=pu(v)*n+t,u(s,_o,s),f(l,_o,l))}var mt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},en=[],rn=[],je=[],Sr=[],Ze=[],Xe=[],mu=Math.min,yu=Math.max,nn=Math.cos,an=Math.sin,sr=Math.abs,Yf=Math.PI,Rr=Yf*2,_u=typeof Float32Array<"u",Wi=[];function wu(r){var t=Math.round(r/Yf*1e8)/1e8;return t%2*Yf}function pC(r,t){var e=wu(r[0]);e<0&&(e+=Rr);var n=e-r[0],i=r[1];i+=n,!t&&i-e>=Rr?i=e+Rr:t&&e-i>=Rr?i=e-Rr:!t&&e>i?i=e+(Rr-wu(e-i)):t&&e<i&&(i=e-(Rr-wu(i-e))),r[0]=e,r[1]=i}var Ln=(function(){function r(t){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,t&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(t,e,n){n=n||0,n>0&&(this._ux=sr(n/ps/t)||0,this._uy=sr(n/ps/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(t,e){return this._drawPendingPt(),this.addData(mt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var n=sr(t-this._xi),i=sr(e-this._yi),a=n>this._ux||i>this._uy;if(this.addData(mt.L,t,e),this._ctx&&a&&this._ctx.lineTo(t,e),a)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,n,i,a,o){return this._drawPendingPt(),this.addData(mt.C,t,e,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(t,e,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,n,i){return this._drawPendingPt(),this.addData(mt.Q,t,e,n,i),this._ctx&&this._ctx.quadraticCurveTo(t,e,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(t,e,n,i,a,o){this._drawPendingPt(),Wi[0]=i,Wi[1]=a,pC(Wi,o),i=Wi[0],a=Wi[1];var s=a-i;return this.addData(mt.A,t,e,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,n,i,a,o),this._xi=nn(a)*n+t,this._yi=an(a)*n+e,this},r.prototype.arcTo=function(t,e,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,n,i,a),this},r.prototype.rect=function(t,e,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,n,i),this.addData(mt.R,t,e,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(mt.Z);var t=this._ctx,e=this._x0,n=this._y0;return t&&t.closePath(),this._xi=e,this._yi=n,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){var e=t.length;!(this.data&&this.data.length===e)&&_u&&(this.data=new Float32Array(e));for(var n=0;n<e;n++)this.data[n]=t[n];this._len=e},r.prototype.appendPath=function(t){t instanceof Array||(t=[t]);for(var e=t.length,n=0,i=this._len,a=0;a<e;a++)n+=t[a].len();_u&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var a=0;a<e;a++)for(var o=t[a].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},r.prototype.addData=function(t,e,n,i,a,o,s,l,u){if(this._saveData){var f=this.data;this._len+arguments.length>f.length&&(this._expandData(),f=this.data);for(var h=0;h<arguments.length;h++)f[this._len++]=arguments[h]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e<this._len;e++)t[e]=this.data[e];this.data=t}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var t=this.data;t instanceof Array&&(t.length=this._len,_u&&this._len>11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){je[0]=je[1]=Ze[0]=Ze[1]=Number.MAX_VALUE,Sr[0]=Sr[1]=Xe[0]=Xe[1]=-Number.MAX_VALUE;var t=this.data,e=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=t[o++],l=o===1;switch(l&&(e=t[o],n=t[o+1],i=e,a=n),s){case mt.M:e=i=t[o++],n=a=t[o++],Ze[0]=i,Ze[1]=a,Xe[0]=i,Xe[1]=a;break;case mt.L:Bv(e,n,t[o],t[o+1],Ze,Xe),e=t[o++],n=t[o++];break;case mt.C:cC(e,n,t[o++],t[o++],t[o++],t[o++],t[o],t[o+1],Ze,Xe),e=t[o++],n=t[o++];break;case mt.Q:vC(e,n,t[o++],t[o++],t[o],t[o+1],Ze,Xe),e=t[o++],n=t[o++];break;case mt.A:var u=t[o++],f=t[o++],h=t[o++],c=t[o++],v=t[o++],d=t[o++]+v;o+=1;var p=!t[o++];l&&(i=nn(v)*h+u,a=an(v)*c+f),dC(u,f,h,c,v,d,p,Ze,Xe),e=nn(d)*h+u,n=an(d)*c+f;break;case mt.R:i=e=t[o++],a=n=t[o++];var g=t[o++],m=t[o++];Bv(i,a,i+g,a+m,Ze,Xe);break;case mt.Z:e=i,n=a;break}si(je,je,Ze),li(Sr,Sr,Xe)}return o===0&&(je[0]=je[1]=Sr[0]=Sr[1]=0),new dt(je[0],je[1],Sr[0]-je[0],Sr[1]-je[1])},r.prototype._calculateLength=function(){var t=this.data,e=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,f=0,h=0,c=0;c<e;){var v=t[c++],d=c===1;d&&(a=t[c],o=t[c+1],s=a,l=o);var p=-1;switch(v){case mt.M:a=s=t[c++],o=l=t[c++];break;case mt.L:{var g=t[c++],m=t[c++],y=g-a,_=m-o;(sr(y)>n||sr(_)>i||c===e-1)&&(p=Math.sqrt(y*y+_*_),a=g,o=m);break}case mt.C:{var w=t[c++],b=t[c++],g=t[c++],m=t[c++],S=t[c++],x=t[c++];p=FS(a,o,w,b,g,m,S,x,10),a=S,o=x;break}case mt.Q:{var w=t[c++],b=t[c++],g=t[c++],m=t[c++];p=HS(a,o,w,b,g,m,10),a=g,o=m;break}case mt.A:var T=t[c++],M=t[c++],A=t[c++],C=t[c++],I=t[c++],E=t[c++],L=E+I;c+=1,d&&(s=nn(I)*A+T,l=an(I)*C+M),p=yu(A,C)*mu(Rr,Math.abs(E)),a=nn(L)*A+T,o=an(L)*C+M;break;case mt.R:{s=a=t[c++],l=o=t[c++];var P=t[c++],R=t[c++];p=P*2+R*2;break}case mt.Z:{var y=s-a,_=l-o;p=Math.sqrt(y*y+_*_),a=s,o=l;break}}p>=0&&(u[h++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(t,e){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,f,h,c,v=e<1,d,p,g=0,m=0,y,_=0,w,b;if(!(v&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,y=e*p,!y)))t:for(var S=0;S<o;){var x=n[S++],T=S===1;switch(T&&(u=n[S],f=n[S+1],s=u,l=f),x!==mt.L&&_>0&&(t.lineTo(w,b),_=0),x){case mt.M:s=u=n[S++],l=f=n[S++],t.moveTo(u,f);break;case mt.L:{h=n[S++],c=n[S++];var M=sr(h-u),A=sr(c-f);if(M>i||A>a){if(v){var C=d[m++];if(g+C>y){var I=(y-g)/C;t.lineTo(u*(1-I)+h*I,f*(1-I)+c*I);break t}g+=C}t.lineTo(h,c),u=h,f=c,_=0}else{var E=M*M+A*A;E>_&&(w=h,b=c,_=E)}break}case mt.C:{var L=n[S++],P=n[S++],R=n[S++],z=n[S++],k=n[S++],V=n[S++];if(v){var C=d[m++];if(g+C>y){var I=(y-g)/C;cs(u,L,R,k,I,en),cs(f,P,z,V,I,rn),t.bezierCurveTo(en[1],rn[1],en[2],rn[2],en[3],rn[3]);break t}g+=C}t.bezierCurveTo(L,P,R,z,k,V),u=k,f=V;break}case mt.Q:{var L=n[S++],P=n[S++],R=n[S++],z=n[S++];if(v){var C=d[m++];if(g+C>y){var I=(y-g)/C;vs(u,L,R,I,en),vs(f,P,z,I,rn),t.quadraticCurveTo(en[1],rn[1],en[2],rn[2]);break t}g+=C}t.quadraticCurveTo(L,P,R,z),u=R,f=z;break}case mt.A:var $=n[S++],j=n[S++],J=n[S++],it=n[S++],at=n[S++],ot=n[S++],Jt=n[S++],pt=!n[S++],Be=J>it?J:it,Bt=sr(J-it)>.001,Dt=at+ot,q=!1;if(v){var C=d[m++];g+C>y&&(Dt=at+ot*(y-g)/C,q=!0),g+=C}if(Bt&&t.ellipse?t.ellipse($,j,J,it,Jt,at,Dt,pt):t.arc($,j,Be,at,Dt,pt),q)break t;T&&(s=nn(at)*J+$,l=an(at)*it+j),u=nn(Dt)*J+$,f=an(Dt)*it+j;break;case mt.R:s=u=n[S],l=f=n[S+1],h=n[S++],c=n[S++];var st=n[S++],be=n[S++];if(v){var C=d[m++];if(g+C>y){var Ft=y-g;t.moveTo(h,c),t.lineTo(h+mu(Ft,st),c),Ft-=st,Ft>0&&t.lineTo(h+st,c+mu(Ft,be)),Ft-=be,Ft>0&&t.lineTo(h+yu(st-Ft,0),c+be),Ft-=st,Ft>0&&t.lineTo(h,c+yu(be-Ft,0));break t}g+=C}t.rect(h,c,st,be);break;case mt.Z:if(v){var C=d[m++];if(g+C>y){var I=(y-g)/C;t.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=C}t.closePath(),u=s,f=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.CMD=mt,r.initDefaultProps=(function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),r})();function Wn(r,t,e,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>t+s&&o>n+s||o<t-s&&o<n-s||a>r+s&&a>e+s||a<r-s&&a<e-s)return!1;if(r!==e)l=(t-n)/(r-e),u=(r*n-e*t)/(r-e);else return Math.abs(a-r)<=s/2;var f=l*a-o+u,h=f*f/(l*l+1);return h<=s/2*s/2}function gC(r,t,e,n,i,a,o,s,l,u,f){if(l===0)return!1;var h=l;if(f>t+h&&f>n+h&&f>a+h&&f>s+h||f<t-h&&f<n-h&&f<a-h&&f<s-h||u>r+h&&u>e+h&&u>i+h&&u>o+h||u<r-h&&u<e-h&&u<i-h&&u<o-h)return!1;var c=BS(r,t,e,n,i,a,o,s,u,f);return c<=h/2}function mC(r,t,e,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>t+u&&l>n+u&&l>a+u||l<t-u&&l<n-u&&l<a-u||s>r+u&&s>e+u&&s>i+u||s<r-u&&s<e-u&&s<i-u)return!1;var f=VS(r,t,e,n,i,a,s,l);return f<=u/2}var Vv=Math.PI*2;function wo(r){return r%=Vv,r<0&&(r+=Vv),r}var Gi=Math.PI*2;function yC(r,t,e,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=t;var f=Math.sqrt(s*s+l*l);if(f-u>e||f+u<e)return!1;if(Math.abs(n-i)%Gi<1e-4)return!0;if(a){var h=n;n=wo(i),i=wo(h)}else n=wo(n),i=wo(i);n>i&&(i+=Gi);var c=Math.atan2(l,s);return c<0&&(c+=Gi),c>=n&&c<=i||c+Gi>=n&&c+Gi<=i}function on(r,t,e,n,i,a){if(a>t&&a>n||a<t&&a<n||n===t)return 0;var o=(a-t)/(n-t),s=n<t?1:-1;(o===1||o===0)&&(s=n<t?.5:-.5);var l=o*(e-r)+r;return l===i?1/0:l>i?s:0}var xr=Ln.CMD,sn=Math.PI*2,_C=1e-4;function wC(r,t){return Math.abs(r-t)<_C}var ee=[-1,-1,-1],Ae=[-1,-1];function bC(){var r=Ae[0];Ae[0]=Ae[1],Ae[1]=r}function SC(r,t,e,n,i,a,o,s,l,u){if(u>t&&u>n&&u>a&&u>s||u<t&&u<n&&u<a&&u<s)return 0;var f=hs(t,n,a,s,u,ee);if(f===0)return 0;for(var h=0,c=-1,v=void 0,d=void 0,p=0;p<f;p++){var g=ee[p],m=g===0||g===1?.5:1,y=Gt(r,e,i,o,g);y<l||(c<0&&(c=$m(t,n,a,s,Ae),Ae[1]<Ae[0]&&c>1&&bC(),v=Gt(t,n,a,s,Ae[0]),c>1&&(d=Gt(t,n,a,s,Ae[1]))),c===2?g<Ae[0]?h+=v<t?m:-m:g<Ae[1]?h+=d<v?m:-m:h+=s<d?m:-m:g<Ae[0]?h+=v<t?m:-m:h+=s<v?m:-m)}return h}function xC(r,t,e,n,i,a,o,s){if(s>t&&s>n&&s>a||s<t&&s<n&&s<a)return 0;var l=zS(t,n,a,s,ee);if(l===0)return 0;var u=Um(t,n,a);if(u>=0&&u<=1){for(var f=0,h=le(t,n,a,u),c=0;c<l;c++){var v=ee[c]===0||ee[c]===1?.5:1,d=le(r,e,i,ee[c]);d<o||(ee[c]<u?f+=h<t?v:-v:f+=a<h?v:-v)}return f}else{var v=ee[0]===0||ee[0]===1?.5:1,d=le(r,e,i,ee[0]);return d<o?0:a<t?v:-v}}function CC(r,t,e,n,i,a,o,s){if(s-=t,s>e||s<-e)return 0;var l=Math.sqrt(e*e-s*s);ee[0]=-l,ee[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=sn-1e-4){n=0,i=sn;var f=a?1:-1;return o>=ee[0]+r&&o<=ee[1]+r?f:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=sn,i+=sn);for(var c=0,v=0;v<2;v++){var d=ee[v];if(d+r>o){var p=Math.atan2(s,d),f=a?1:-1;p<0&&(p=sn+p),(p>=n&&p<=i||p+sn>=n&&p+sn<=i)&&(p>Math.PI/2&&p<Math.PI*1.5&&(f=-f),c+=f)}}return c}function gy(r,t,e,n,i){for(var a=r.data,o=r.len(),s=0,l=0,u=0,f=0,h=0,c,v,d=0;d<o;){var p=a[d++],g=d===1;switch(p===xr.M&&d>1&&(e||(s+=on(l,u,f,h,n,i))),g&&(l=a[d],u=a[d+1],f=l,h=u),p){case xr.M:f=a[d++],h=a[d++],l=f,u=h;break;case xr.L:if(e){if(Wn(l,u,a[d],a[d+1],t,n,i))return!0}else s+=on(l,u,a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case xr.C:if(e){if(gC(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=SC(l,u,a[d++],a[d++],a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case xr.Q:if(e){if(mC(l,u,a[d++],a[d++],a[d],a[d+1],t,n,i))return!0}else s+=xC(l,u,a[d++],a[d++],a[d],a[d+1],n,i)||0;l=a[d++],u=a[d++];break;case xr.A:var m=a[d++],y=a[d++],_=a[d++],w=a[d++],b=a[d++],S=a[d++];d+=1;var x=!!(1-a[d++]);c=Math.cos(b)*_+m,v=Math.sin(b)*w+y,g?(f=c,h=v):s+=on(l,u,c,v,n,i);var T=(n-m)*w/_+m;if(e){if(yC(m,y,w,b,b+S,x,t,T,i))return!0}else s+=CC(m,y,w,b,b+S,x,T,i);l=Math.cos(b+S)*_+m,u=Math.sin(b+S)*w+y;break;case xr.R:f=l=a[d++],h=u=a[d++];var M=a[d++],A=a[d++];if(c=f+M,v=h+A,e){if(Wn(f,h,c,h,t,n,i)||Wn(c,h,c,v,t,n,i)||Wn(c,v,f,v,t,n,i)||Wn(f,v,f,h,t,n,i))return!0}else s+=on(c,h,c,v,n,i),s+=on(f,v,f,h,n,i);break;case xr.Z:if(e){if(Wn(l,u,f,h,t,n,i))return!0}else s+=on(l,u,f,h,n,i);l=f,u=h;break}}return!e&&!wC(u,h)&&(s+=on(l,u,f,h,n,i)||0),s!==0}function TC(r,t,e){return gy(r,0,!1,t,e)}function DC(r,t,e,n){return gy(r,t,!0,e,n)}var my=_t({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Sn),MC={style:_t({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},tl.style)},bu=Pa.concat(["invisible","culling","z","z2","zlevel","parent"]),vt=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(l){e.buildPath(l,e.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<bu.length;++s)i[bu[s]]=this[bu[s]];i.__dirty|=ye}else this._decalEl&&(this._decalEl=null)},t.prototype.getDecalElement=function(){return this._decalEl},t.prototype._init=function(e){var n=Ct(e);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=e[o];o==="style"?this.style?B(this.style,s):this.useStyle(s):o==="shape"?B(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},t.prototype.getDefaultStyle=function(){return null},t.prototype.getDefaultShape=function(){return{}},t.prototype.canBeInsideText=function(){return this.hasFill()},t.prototype.getInsideTextFill=function(){var e=this.style.fill;if(e!=="none"){if(G(e)){var n=ds(e,0);return n>.5?Hf:n>.2?sx:Wf}else if(e)return Wf}return Hf},t.prototype.getInsideTextStroke=function(e){var n=this.style.fill;if(G(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=ds(e,0)<Vf;if(a===o)return n}},t.prototype.buildPath=function(e,n,i){},t.prototype.pathUpdated=function(){this.__dirty&=~ni},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Ln(!1)},t.prototype.hasStroke=function(){var e=this.style,n=e.stroke;return!(n==null||n==="none"||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,n=this.style,i=!e;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&ni)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||i){s.copy(e);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect(),o=this.style;if(e=i[0],n=i[1],a.contain(e,n)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),DC(s,l/u,e,n)))return!0}if(this.hasFill())return TC(s,e,n)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=ni,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,n){e==="shape"?this.setShape(n):r.prototype.attrKV.call(this,e,n)},t.prototype.setShape=function(e,n){var i=this.shape;return i||(i=this.shape={}),typeof e=="string"?i[e]=n:B(i,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&ni)},t.prototype.createStyle=function(e){return js(my,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var n=this._normalState;e.shape&&!n.shape&&(n.shape=B({},this.shape))},t.prototype._applyStateObj=function(e,n,i,a,o,s){r.prototype._applyStateObj.call(this,e,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=B({},i.shape),B(u,n.shape)):(u=B({},a?this.shape:i.shape),B(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=B({},this.shape);for(var f={},h=Ct(u),c=0;c<h.length;c++){var v=h[c];typeof u[v]=="object"?this.shape[v]=u[v]:f[v]=u[v]}this._transitionState(e,{shape:f},s)}else this.shape=u,this.dirtyShape()},t.prototype._mergeStates=function(e){for(var n=r.prototype._mergeStates.call(this,e),i,a=0;a<e.length;a++){var o=e[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},t.prototype.getAnimationStyleProps=function(){return MC},t.prototype.isZeroArea=function(){return!1},t.extend=function(e){var n=(function(a){O(o,a);function o(s){var l=a.call(this,s)||this;return e.init&&e.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return lt(e.style)},o.prototype.getDefaultShape=function(){return lt(e.shape)},o})(t);for(var i in e)typeof e[i]=="function"&&(n.prototype[i]=e[i]);return n},t.initDefaultProps=(function(){var e=t.prototype;e.type="path",e.strokeContainThreshold=5,e.segmentIgnoreThreshold=0,e.subPixelOptimize=!1,e.autoBatch=!1,e.__dirty=ye|oa|ni})(),t})(Qa),AC=_t({strokeFirst:!0,font:Mn,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},my),ws=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.hasStroke=function(){var e=this.style,n=e.stroke;return n!=null&&n!=="none"&&e.lineWidth>0},t.prototype.hasFill=function(){var e=this.style,n=e.fill;return n!=null&&n!=="none"},t.prototype.createStyle=function(e){return js(AC,e)},t.prototype.setBoundingRect=function(e){this._rect=e},t.prototype.getBoundingRect=function(){var e=this.style;if(!this._rect){var n=e.text;n!=null?n+="":n="";var i=Uh(n,e.font,e.textAlign,e.textBaseline);if(i.x+=e.x||0,i.y+=e.y||0,this.hasStroke()){var a=e.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},t.initDefaultProps=(function(){var e=t.prototype;e.dirtyRectTolerance=10})(),t})(Qa);ws.prototype.type="tspan";var IC=_t({x:0,y:0},Sn),EC={style:_t({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},tl.style)};function LC(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var $r=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.createStyle=function(e){return js(IC,e)},t.prototype._getSize=function(e){var n=this.style,i=n[e];if(i!=null)return i;var a=LC(n.image)?n.image:this.__image;if(!a)return 0;var o=e==="width"?"height":"width",s=n[o];return s==null?a[e]:a[e]/a[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return EC},t.prototype.getBoundingRect=function(){var e=this.style;return this._rect||(this._rect=new dt(e.x||0,e.y||0,this.getWidth(),this.getHeight())),this._rect},t})(Qa);$r.prototype.type="image";function PC(r,t){var e=t.x,n=t.y,i=t.width,a=t.height,o=t.r,s,l,u,f;i<0&&(e=e+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),u+f>i&&(h=u+f,u*=i/h,f*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+f>a&&(h=s+f,s*=a/h,f*=a/h),r.moveTo(e+s,n),r.lineTo(e+i-l,n),l!==0&&r.arc(e+i-l,n+l,l,-Math.PI/2,0),r.lineTo(e+i,n+a-u),u!==0&&r.arc(e+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(e+f,n+a),f!==0&&r.arc(e+f,n+a-f,f,Math.PI/2,Math.PI),r.lineTo(e,n+s),s!==0&&r.arc(e+s,n+s,s,Math.PI,Math.PI*1.5)}var fi=Math.round;function yy(r,t,e){if(t){var n=t.x1,i=t.x2,a=t.y1,o=t.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=e&&e.lineWidth;return s&&(fi(n*2)===fi(i*2)&&(r.x1=r.x2=mn(n,s,!0)),fi(a*2)===fi(o*2)&&(r.y1=r.y2=mn(a,s,!0))),r}}function _y(r,t,e){if(t){var n=t.x,i=t.y,a=t.width,o=t.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=mn(n,s,!0),r.y=mn(i,s,!0),r.width=Math.max(mn(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(mn(i+o,s,!1)-r.y,o===0?0:1)),r}}function mn(r,t,e){if(!t)return r;var n=fi(r*2);return(n+fi(t))%2===0?n/2:(n+(e?1:-1))/2}var RC=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),kC={},Tt=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new RC},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var l=_y(kC,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?PC(e,n):e.rect(i,a,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t})(vt);Tt.prototype.type="rect";var Hv={fill:"#000"},Wv=2,OC={style:_t({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},tl.style)},$t=(function(r){O(t,r);function t(e){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Hv,n.attr(e),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e<this._children.length;e++){var n=this._children[e];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},t.prototype.updateTransform=function(){var e=this.innerTransformable;e?(e.updateTransform(),e.transform&&(this.transform=e.transform)):r.prototype.updateTransform.call(this)},t.prototype.getLocalTransform=function(e){var n=this.innerTransformable;return n?n.getLocalTransform(e):r.prototype.getLocalTransform.call(this,e)},t.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},t.prototype._updateSubTexts=function(){this._childCursor=0,VC(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},t.prototype.addSelfToZr=function(e){r.prototype.addSelfToZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=e},t.prototype.removeSelfFromZr=function(e){r.prototype.removeSelfFromZr.call(this,e);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},t.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var e=new dt(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(e.copy(l),e.applyTransform(u),a=a||e.clone(),a.union(e)):(a=a||l.clone(),a.union(l))}this._rect=a||e}return this._rect},t.prototype.setDefaultTextStyle=function(e){this._defaultStyle=e||Hv},t.prototype.setTextContent=function(e){if(process.env.NODE_ENV!=="production")throw new Error("Can't attach text on another text")},t.prototype._mergeStyle=function(e,n){if(!n)return e;var i=n.rich,a=e.rich||i&&{};return B(e,n),i&&a?(this._mergeRich(a,i),e.rich=a):a&&(e.rich=a),e},t.prototype._mergeRich=function(e,n){for(var i=Ct(n),a=0;a<i.length;a++){var o=i[a];e[o]=e[o]||{},B(e[o],n[o])}},t.prototype.getAnimationStyleProps=function(){return OC},t.prototype._getOrCreateChild=function(e){var n=this._children[this._childCursor];return(!n||!(n instanceof e))&&(n=new e),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},t.prototype._updatePlainTexts=function(){var e=this.style,n=e.font||Mn,i=e.padding,a=Xv(e),o=nC(a,e),s=Su(e),l=!!e.backgroundColor,u=o.outerHeight,f=o.outerWidth,h=o.contentWidth,c=o.lines,v=o.lineHeight,d=this._defaultStyle;this.isTruncated=!!o.isTruncated;var p=e.x||0,g=e.y||0,m=e.align||d.align||"left",y=e.verticalAlign||d.verticalAlign||"top",_=p,w=ii(g,o.contentHeight,y);if(s||i){var b=la(p,f,m),S=ii(g,u,y);s&&this._renderBackground(e,e,b,S,f,u)}w+=v/2,i&&(_=Zv(p,m,i),y==="top"?w+=i[0]:y==="bottom"&&(w-=i[2]));for(var x=0,T=!1,M=jv("fill"in e?e.fill:(T=!0,d.fill)),A=Yv("stroke"in e?e.stroke:!l&&(!d.autoStroke||T)?(x=Wv,d.stroke):null),C=e.textShadowBlur>0,I=e.width!=null&&(e.overflow==="truncate"||e.overflow==="break"||e.overflow==="breakAll"),E=o.calculatedLineHeight,L=0;L<c.length;L++){var P=this._getOrCreateChild(ws),R=P.createStyle();P.useStyle(R),R.text=c[L],R.x=_,R.y=w,R.textAlign=m,R.textBaseline="middle",R.opacity=e.opacity,R.strokeFirst=!0,C&&(R.shadowBlur=e.textShadowBlur||0,R.shadowColor=e.textShadowColor||"transparent",R.shadowOffsetX=e.textShadowOffsetX||0,R.shadowOffsetY=e.textShadowOffsetY||0),R.stroke=A,R.fill=M,A&&(R.lineWidth=e.lineWidth||x,R.lineDash=e.lineDash,R.lineDashOffset=e.lineDashOffset||0),R.font=n,$v(R,e),w+=v,I&&P.setBoundingRect(new dt(la(R.x,h,R.textAlign),ii(R.y,E,R.textBaseline),h,E))}},t.prototype._updateRichTexts=function(){var e=this.style,n=Xv(e),i=oC(n,e),a=i.width,o=i.outerWidth,s=i.outerHeight,l=e.padding,u=e.x||0,f=e.y||0,h=this._defaultStyle,c=e.align||h.align,v=e.verticalAlign||h.verticalAlign;this.isTruncated=!!i.isTruncated;var d=la(u,o,c),p=ii(f,s,v),g=d,m=p;l&&(g+=l[3],m+=l[0]);var y=g+a;Su(e)&&this._renderBackground(e,e,d,p,o,s);for(var _=!!e.backgroundColor,w=0;w<i.lines.length;w++){for(var b=i.lines[w],S=b.tokens,x=S.length,T=b.lineHeight,M=b.width,A=0,C=g,I=y,E=x-1,L=void 0;A<x&&(L=S[A],!L.align||L.align==="left");)this._placeToken(L,e,T,m,C,"left",_),M-=L.width,C+=L.width,A++;for(;E>=0&&(L=S[E],L.align==="right");)this._placeToken(L,e,T,m,I,"right",_),M-=L.width,I-=L.width,E--;for(C+=(a-(C-g)-(y-I)-M)/2;A<=E;)L=S[A],this._placeToken(L,e,T,m,C+L.width/2,"center",_),C+=L.width,A++;m+=T}},t.prototype._placeToken=function(e,n,i,a,o,s,l){var u=n.rich[e.styleName]||{};u.text=e.text;var f=e.verticalAlign,h=a+i/2;f==="top"?h=a+e.height/2:f==="bottom"&&(h=a+i-e.height/2);var c=!e.isLineHolder&&Su(u);c&&this._renderBackground(u,n,s==="right"?o-e.width:s==="center"?o-e.width/2:o,h-e.height/2,e.width,e.height);var v=!!u.backgroundColor,d=e.textPadding;d&&(o=Zv(o,s,d),h-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(ws),g=p.createStyle();p.useStyle(g);var m=this._defaultStyle,y=!1,_=0,w=jv("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),b=Yv("stroke"in u?u.stroke:"stroke"in n?n.stroke:!v&&!l&&(!m.autoStroke||y)?(_=Wv,m.stroke):null),S=u.textShadowBlur>0||n.textShadowBlur>0;g.text=e.text,g.x=o,g.y=h,S&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=e.font||Mn,g.opacity=hi(u.opacity,n.opacity,1),$v(g,u),b&&(g.lineWidth=hi(u.lineWidth,n.lineWidth,_),g.lineDash=rt(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=b),w&&(g.fill=w);var x=e.contentWidth,T=e.contentHeight;p.setBoundingRect(new dt(la(g.x,x,g.textAlign),ii(g.y,T,g.textBaseline),x,T))},t.prototype._renderBackground=function(e,n,i,a,o,s){var l=e.backgroundColor,u=e.borderWidth,f=e.borderColor,h=l&&l.image,c=l&&!h,v=e.borderRadius,d=this,p,g;if(c||e.lineHeight||u&&f){p=this._getOrCreateChild(Tt),p.useStyle(p.createStyle()),p.style.fill=null;var m=p.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=v,p.dirtyShape()}if(c){var y=p.style;y.fill=l||null,y.fillOpacity=rt(e.fillOpacity,1)}else if(h){g=this._getOrCreateChild($r),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&f){var y=p.style;y.lineWidth=u,y.stroke=f,y.strokeOpacity=rt(e.strokeOpacity,1),y.lineDash=e.borderDash,y.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var w=(p||g).style;w.shadowBlur=e.shadowBlur||0,w.shadowColor=e.shadowColor||"transparent",w.shadowOffsetX=e.shadowOffsetX||0,w.shadowOffsetY=e.shadowOffsetY||0,w.opacity=hi(e.opacity,n.opacity,1)},t.makeFont=function(e){var n="";return zC(e)&&(n=[e.fontStyle,e.fontWeight,FC(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),n&&Qe(n)||e.textFont||e.font},t})(Qa),NC={left:!0,right:1,center:1},BC={top:1,bottom:1,middle:1},Gv=["fontStyle","fontWeight","fontSize","fontFamily"];function FC(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?Oh+"px":r+"px"}function $v(r,t){for(var e=0;e<Gv.length;e++){var n=Gv[e],i=t[n];i!=null&&(r[n]=i)}}function zC(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function VC(r){return Uv(r),D(r.rich,Uv),r}function Uv(r){if(r){r.font=$t.makeFont(r);var t=r.align;t==="middle"&&(t="center"),r.align=t==null||NC[t]?t:"left";var e=r.verticalAlign;e==="center"&&(e="middle"),r.verticalAlign=e==null||BC[e]?e:"top";var n=r.padding;n&&(r.padding=Rm(r.padding))}}function Yv(r,t){return r==null||t<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function jv(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function Zv(r,t,e){return t==="right"?r-e[1]:t==="center"?r+e[3]/2-e[1]/2:r+e[3]}function Xv(r){var t=r.text;return t!=null&&(t+=""),t}function Su(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}var ft=Ot(),HC=function(r,t,e,n){if(n){var i=ft(n);i.dataIndex=e,i.dataType=t,i.seriesIndex=r,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=ft(a);o.seriesIndex=r,o.dataIndex=e,o.dataType=t,o.ssrType="chart"})}},qv=1,Kv={},wy=Ot(),qh=Ot(),Kh=0,el=1,rl=2,nr=["emphasis","blur","select"],Qv=["normal","emphasis","blur","select"],WC=10,GC=9,xn="highlight",Jo="downplay",wa="select",ts="unselect",ba="toggleSelect";function Gn(r){return r!=null&&r!=="none"}function nl(r,t,e){r.onHoverStateChange&&(r.hoverState||0)!==e&&r.onHoverStateChange(t),r.hoverState=e}function by(r){nl(r,"emphasis",rl)}function Sy(r){r.hoverState===rl&&nl(r,"normal",Kh)}function Qh(r){nl(r,"blur",el)}function xy(r){r.hoverState===el&&nl(r,"normal",Kh)}function $C(r){r.selected=!0}function UC(r){r.selected=!1}function Jv(r,t,e){t(r,e)}function _r(r,t,e){Jv(r,t,e),r.isGroup&&r.traverse(function(n){Jv(n,t,e)})}function td(r,t){switch(t){case"emphasis":r.hoverState=rl;break;case"normal":r.hoverState=Kh;break;case"blur":r.hoverState=el;break;case"select":r.selected=!0}}function YC(r,t,e,n){for(var i=r.style,a={},o=0;o<t.length;o++){var s=t[o],l=i[s];a[s]=l??(n&&n[s])}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(e)<0&&u.targetName==="style"&&u.saveTo(a,t)}return a}function jC(r,t,e,n){var i=e&&yt(e,"select")>=0,a=!1;if(r instanceof vt){var o=wy(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Gn(s)||Gn(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=B({},n),u=B({},u),u.fill=s):!Gn(u.fill)&&Gn(s)?(a=!0,n=B({},n),u=B({},u),u.fill=dv(s)):!Gn(u.stroke)&&Gn(l)&&(a||(n=B({},n),u=B({},u)),u.stroke=dv(l)),n.style=u}}if(n&&n.z2==null){a||(n=B({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f??WC)}return n}function ZC(r,t,e){if(e&&e.z2==null){e=B({},e);var n=r.z2SelectLift;e.z2=r.z2+(n??GC)}return e}function XC(r,t,e){var n=yt(r.currentStates,t)>=0,i=r.style.opacity,a=n?null:YC(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=B({},e),o=B({opacity:n?i:a.opacity*.1},o),e.style=o),e}function xu(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return jC(this,r,t,e);if(r==="blur")return XC(this,r,e);if(r==="select")return ZC(this,r,e)}return e}function qC(r){r.stateProxy=xu;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=xu),e&&(e.stateProxy=xu)}function ed(r,t){!My(r,t)&&!r.__highByOuter&&_r(r,by)}function rd(r,t){!My(r,t)&&!r.__highByOuter&&_r(r,Sy)}function bs(r,t){r.__highByOuter|=1<<(t||0),_r(r,by)}function Ss(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&_r(r,Sy)}function KC(r){_r(r,Qh)}function Cy(r){_r(r,xy)}function Ty(r){_r(r,$C)}function Dy(r){_r(r,UC)}function My(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function Ay(r){var t=r.getModel(),e=[],n=[];t.eachComponent(function(i,a){var o=qh(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){xy(u)}),s&&e.push(a)),o.isBlured=!1}),D(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(e,!1,t)})}function jf(r,t,e,n){var i=n.getModel();e=e||"coordinateSystem";function a(u,f){for(var h=0;h<f.length;h++){var c=u.getItemGraphicEl(f[h]);c&&Cy(c)}}if(r!=null&&!(!t||t==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var f=o===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var c=h&&s?h===s:f;if(!(e==="series"&&!f||e==="coordinateSystem"&&!c||t==="series"&&f)){var v=n.getViewOfSeriesModel(u);if(v.group.traverse(function(g){g.__highByOuter&&f&&t==="self"||Qh(g)}),ce(t))a(u.getData(),t);else if(Z(t))for(var d=Ct(t),p=0;p<d.length;p++)a(u.getData(d[p]),t[d[p]]);l.push(u),qh(u).isBlured=!0}}),i.eachComponent(function(u,f){if(u!=="series"){var h=n.getViewOfComponentModel(f);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,i)}})}}function Zf(r,t,e){if(!(r==null||t==null)){var n=e.getModel().getComponent(r,t);if(n){qh(n).isBlured=!0;var i=e.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){Qh(a)})}}}function QC(r,t,e){var n=r.seriesIndex,i=r.getData(t.dataType);if(!i){process.env.NODE_ENV!=="production"&&Qt("Unknown dataType "+t.dataType);return}var a=En(i,t);a=(H(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=ft(o);jf(n,u.focus,u.blurScope,e)}else{var f=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);f!=null&&jf(n,f,h,e)}}function Jh(r,t,e,n){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||t==null||e==null)return i;var a=n.getModel().getComponent(r,t);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(e),l,u=0;u<s.length;u++)if(process.env.NODE_ENV!=="production"&&!Si(s[u])&&Qt("param should be highDownDispatcher"),ft(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function JC(r,t,e){process.env.NODE_ENV!=="production"&&!Si(r)&&Qt("param should be highDownDispatcher");var n=ft(r),i=Jh(n.componentMainType,n.componentIndex,n.componentHighDownName,e),a=i.dispatchers,o=i.focusSelf;a?(o&&Zf(n.componentMainType,n.componentIndex,e),D(a,function(s){return ed(s,t)})):(jf(n.seriesIndex,n.focus,n.blurScope,e),n.focus==="self"&&Zf(n.componentMainType,n.componentIndex,e),ed(r,t))}function tT(r,t,e){process.env.NODE_ENV!=="production"&&!Si(r)&&Qt("param should be highDownDispatcher"),Ay(e);var n=ft(r),i=Jh(n.componentMainType,n.componentIndex,n.componentHighDownName,e).dispatchers;i?D(i,function(a){return rd(a,t)}):rd(r,t)}function eT(r,t,e){if(Xf(t)){var n=t.dataType,i=r.getData(n),a=En(i,t);H(a)||(a=[a]),r[t.type===ba?"toggleSelect":t.type===wa?"select":"unselect"](a,n)}}function nd(r){var t=r.getAllData();D(t,function(e){var n=e.data,i=e.type;n.eachItemGraphicEl(function(a,o){r.isSelected(o,i)?Ty(a):Dy(a)})})}function rT(r){var t=[];return r.eachSeries(function(e){var n=e.getAllData();D(n,function(i){i.data;var a=i.type,o=e.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:e.seriesIndex};a!=null&&(s.dataType=a),t.push(s)}})}),t}function xs(r,t,e){Iy(r,!0),_r(r,qC),iT(r,t,e)}function nT(r){Iy(r,!1)}function ka(r,t,e,n){n?nT(r):xs(r,t,e)}function iT(r,t,e){var n=ft(r);t!=null?(n.focus=t,n.blurScope=e):n.focus&&(n.focus=null)}var id=["emphasis","blur","select"],aT={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Cs(r,t,e,n){e=e||"itemStyle";for(var i=0;i<id.length;i++){var a=id[i],o=t.getModel([a,e]),s=r.ensureState(a);s.style=o[aT[e]]()}}function Iy(r,t){var e=t===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!e||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!e)}function Si(r){return!!(r&&r.__highDownDispatcher)}function oT(r){var t=Kv[r];return t==null&&qv<=32&&(t=Kv[r]=qv++),t}function Xf(r){var t=r.type;return t===wa||t===ts||t===ba}function ad(r){var t=r.type;return t===xn||t===Jo}function sT(r){var t=wy(r);t.normalFill=r.style.fill,t.normalStroke=r.style.stroke;var e=r.states.select||{};t.selectFill=e.style&&e.style.fill||null,t.selectStroke=e.style&&e.style.stroke||null}var $n=Ln.CMD,lT=[[],[],[]],od=Math.sqrt,uT=Math.atan2;function fT(r,t){if(t){var e=r.data,n=r.len(),i,a,o,s,l,u,f=$n.M,h=$n.C,c=$n.L,v=$n.R,d=$n.A,p=$n.Q;for(o=0,s=0;o<n;){switch(i=e[o++],s=o,a=0,i){case f:a=1;break;case c:a=1;break;case h:a=3;break;case p:a=2;break;case d:var g=t[4],m=t[5],y=od(t[0]*t[0]+t[1]*t[1]),_=od(t[2]*t[2]+t[3]*t[3]),w=uT(-t[1]/_,t[0]/y);e[o]*=y,e[o++]+=g,e[o]*=_,e[o++]+=m,e[o++]*=y,e[o++]*=_,e[o++]+=w,e[o++]+=w,o+=2,s=o;break;case v:u[0]=e[o++],u[1]=e[o++],Re(u,u,t),e[s++]=u[0],e[s++]=u[1],u[0]+=e[o++],u[1]+=e[o++],Re(u,u,t),e[s++]=u[0],e[s++]=u[1]}for(l=0;l<a;l++){var b=lT[l];b[0]=e[o++],b[1]=e[o++],Re(b,b,t),e[s++]=b[0],e[s++]=b[1]}}r.increaseVersion()}}var Cu=Math.sqrt,bo=Math.sin,So=Math.cos,$i=Math.PI;function sd(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function qf(r,t){return(r[0]*t[0]+r[1]*t[1])/(sd(r)*sd(t))}function ld(r,t){return(r[0]*t[1]<r[1]*t[0]?-1:1)*Math.acos(qf(r,t))}function ud(r,t,e,n,i,a,o,s,l,u,f){var h=l*($i/180),c=So(h)*(r-e)/2+bo(h)*(t-n)/2,v=-1*bo(h)*(r-e)/2+So(h)*(t-n)/2,d=c*c/(o*o)+v*v/(s*s);d>1&&(o*=Cu(d),s*=Cu(d));var p=(i===a?-1:1)*Cu((o*o*(s*s)-o*o*(v*v)-s*s*(c*c))/(o*o*(v*v)+s*s*(c*c)))||0,g=p*o*v/s,m=p*-s*c/o,y=(r+e)/2+So(h)*g-bo(h)*m,_=(t+n)/2+bo(h)*g+So(h)*m,w=ld([1,0],[(c-g)/o,(v-m)/s]),b=[(c-g)/o,(v-m)/s],S=[(-1*c-g)/o,(-1*v-m)/s],x=ld(b,S);if(qf(b,S)<=-1&&(x=$i),qf(b,S)>=1&&(x=0),x<0){var T=Math.round(x/$i*1e6)/1e6;x=$i*2+T%2*$i}f.addData(u,y,_,o,s,w,x,h,a)}var hT=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,cT=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function vT(r){var t=new Ln;if(!r)return t;var e=0,n=0,i=e,a=n,o,s=Ln.CMD,l=r.match(hT);if(!l)return t;for(var u=0;u<l.length;u++){for(var f=l[u],h=f.charAt(0),c=void 0,v=f.match(cT)||[],d=v.length,p=0;p<d;p++)v[p]=parseFloat(v[p]);for(var g=0;g<d;){var m=void 0,y=void 0,_=void 0,w=void 0,b=void 0,S=void 0,x=void 0,T=e,M=n,A=void 0,C=void 0;switch(h){case"l":e+=v[g++],n+=v[g++],c=s.L,t.addData(c,e,n);break;case"L":e=v[g++],n=v[g++],c=s.L,t.addData(c,e,n);break;case"m":e+=v[g++],n+=v[g++],c=s.M,t.addData(c,e,n),i=e,a=n,h="l";break;case"M":e=v[g++],n=v[g++],c=s.M,t.addData(c,e,n),i=e,a=n,h="L";break;case"h":e+=v[g++],c=s.L,t.addData(c,e,n);break;case"H":e=v[g++],c=s.L,t.addData(c,e,n);break;case"v":n+=v[g++],c=s.L,t.addData(c,e,n);break;case"V":n=v[g++],c=s.L,t.addData(c,e,n);break;case"C":c=s.C,t.addData(c,v[g++],v[g++],v[g++],v[g++],v[g++],v[g++]),e=v[g-2],n=v[g-1];break;case"c":c=s.C,t.addData(c,v[g++]+e,v[g++]+n,v[g++]+e,v[g++]+n,v[g++]+e,v[g++]+n),e+=v[g-2],n+=v[g-1];break;case"S":m=e,y=n,A=t.len(),C=t.data,o===s.C&&(m+=e-C[A-4],y+=n-C[A-3]),c=s.C,T=v[g++],M=v[g++],e=v[g++],n=v[g++],t.addData(c,m,y,T,M,e,n);break;case"s":m=e,y=n,A=t.len(),C=t.data,o===s.C&&(m+=e-C[A-4],y+=n-C[A-3]),c=s.C,T=e+v[g++],M=n+v[g++],e+=v[g++],n+=v[g++],t.addData(c,m,y,T,M,e,n);break;case"Q":T=v[g++],M=v[g++],e=v[g++],n=v[g++],c=s.Q,t.addData(c,T,M,e,n);break;case"q":T=v[g++]+e,M=v[g++]+n,e+=v[g++],n+=v[g++],c=s.Q,t.addData(c,T,M,e,n);break;case"T":m=e,y=n,A=t.len(),C=t.data,o===s.Q&&(m+=e-C[A-4],y+=n-C[A-3]),e=v[g++],n=v[g++],c=s.Q,t.addData(c,m,y,e,n);break;case"t":m=e,y=n,A=t.len(),C=t.data,o===s.Q&&(m+=e-C[A-4],y+=n-C[A-3]),e+=v[g++],n+=v[g++],c=s.Q,t.addData(c,m,y,e,n);break;case"A":_=v[g++],w=v[g++],b=v[g++],S=v[g++],x=v[g++],T=e,M=n,e=v[g++],n=v[g++],c=s.A,ud(T,M,e,n,S,x,_,w,b,c,t);break;case"a":_=v[g++],w=v[g++],b=v[g++],S=v[g++],x=v[g++],T=e,M=n,e+=v[g++],n+=v[g++],c=s.A,ud(T,M,e,n,S,x,_,w,b,c,t);break}}(h==="z"||h==="Z")&&(c=s.Z,t.addData(c),e=i,n=a),o=c}return t.toStatic(),t}var Ey=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.applyTransform=function(e){},t})(vt);function Ly(r){return r.setData!=null}function Py(r,t){var e=vT(r),n=B({},t);return n.buildPath=function(i){if(Ly(i)){i.setData(e.data);var a=i.getContext();a&&i.rebuildPath(a,1)}else{var a=i;e.rebuildPath(a,1)}},n.applyTransform=function(i){fT(e,i),this.dirtyShape()},n}function dT(r,t){return new Ey(Py(r,t))}function pT(r,t){var e=Py(r,t),n=(function(i){O(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=e.applyTransform,s.buildPath=e.buildPath,s}return a})(Ey);return n}function gT(r,t){for(var e=[],n=r.length,i=0;i<n;i++){var a=r[i];e.push(a.getUpdatedPathProxy(!0))}var o=new vt(t);return o.createPathProxy(),o.buildPath=function(s){if(Ly(s)){s.appendPath(e);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}var mT=(function(){function r(){this.cx=0,this.cy=0,this.r=0}return r})(),il=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new mT},t.prototype.buildPath=function(e,n){e.moveTo(n.cx+n.r,n.cy),e.arc(n.cx,n.cy,n.r,0,Math.PI*2)},t})(vt);il.prototype.type="circle";var yT=(function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r})(),tc=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new yT},t.prototype.buildPath=function(e,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,f=l*i;e.moveTo(a-s,o),e.bezierCurveTo(a-s,o-f,a-u,o-l,a,o-l),e.bezierCurveTo(a+u,o-l,a+s,o-f,a+s,o),e.bezierCurveTo(a+s,o+f,a+u,o+l,a,o+l),e.bezierCurveTo(a-u,o+l,a-s,o+f,a-s,o),e.closePath()},t})(vt);tc.prototype.type="ellipse";var Ry=Math.PI,Tu=Ry*2,ln=Math.sin,Un=Math.cos,_T=Math.acos,Ut=Math.atan2,fd=Math.abs,Sa=Math.sqrt,ha=Math.max,qe=Math.min,ze=1e-4;function wT(r,t,e,n,i,a,o,s){var l=e-r,u=n-t,f=o-i,h=s-a,c=h*l-f*u;if(!(c*c<ze))return c=(f*(t-a)-h*(r-i))/c,[r+c*l,t+c*u]}function xo(r,t,e,n,i,a,o){var s=r-e,l=t-n,u=(o?a:-a)/Sa(s*s+l*l),f=u*l,h=-u*s,c=r+f,v=t+h,d=e+f,p=n+h,g=(c+d)/2,m=(v+p)/2,y=d-c,_=p-v,w=y*y+_*_,b=i-a,S=c*p-d*v,x=(_<0?-1:1)*Sa(ha(0,b*b*w-S*S)),T=(S*_-y*x)/w,M=(-S*y-_*x)/w,A=(S*_+y*x)/w,C=(-S*y+_*x)/w,I=T-g,E=M-m,L=A-g,P=C-m;return I*I+E*E>L*L+P*P&&(T=A,M=C),{cx:T,cy:M,x0:-f,y0:-h,x1:T*(i/b-1),y1:M*(i/b-1)}}function bT(r){var t;if(H(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function ST(r,t){var e,n=ha(t.r,0),i=ha(t.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var f=t.cx,h=t.cy,c=!!t.clockwise,v=fd(u-l),d=v>Tu&&v%Tu;if(d>ze&&(v=d),!(n>ze))r.moveTo(f,h);else if(v>Tu-ze)r.moveTo(f+n*Un(l),h+n*ln(l)),r.arc(f,h,n,l,u,!c),i>ze&&(r.moveTo(f+i*Un(u),h+i*ln(u)),r.arc(f,h,i,u,l,c));else{var p=void 0,g=void 0,m=void 0,y=void 0,_=void 0,w=void 0,b=void 0,S=void 0,x=void 0,T=void 0,M=void 0,A=void 0,C=void 0,I=void 0,E=void 0,L=void 0,P=n*Un(l),R=n*ln(l),z=i*Un(u),k=i*ln(u),V=v>ze;if(V){var $=t.cornerRadius;$&&(e=bT($),p=e[0],g=e[1],m=e[2],y=e[3]);var j=fd(n-i)/2;if(_=qe(j,m),w=qe(j,y),b=qe(j,p),S=qe(j,g),M=x=ha(_,w),A=T=ha(b,S),(x>ze||T>ze)&&(C=n*Un(u),I=n*ln(u),E=i*Un(l),L=i*ln(l),v<Ry)){var J=wT(P,R,E,L,C,I,z,k);if(J){var it=P-J[0],at=R-J[1],ot=C-J[0],Jt=I-J[1],pt=1/ln(_T((it*ot+at*Jt)/(Sa(it*it+at*at)*Sa(ot*ot+Jt*Jt)))/2),Be=Sa(J[0]*J[0]+J[1]*J[1]);M=qe(x,(n-Be)/(pt+1)),A=qe(T,(i-Be)/(pt-1))}}}if(!V)r.moveTo(f+P,h+R);else if(M>ze){var Bt=qe(m,M),Dt=qe(y,M),q=xo(E,L,P,R,n,Bt,c),st=xo(C,I,z,k,n,Dt,c);r.moveTo(f+q.cx+q.x0,h+q.cy+q.y0),M<x&&Bt===Dt?r.arc(f+q.cx,h+q.cy,M,Ut(q.y0,q.x0),Ut(st.y0,st.x0),!c):(Bt>0&&r.arc(f+q.cx,h+q.cy,Bt,Ut(q.y0,q.x0),Ut(q.y1,q.x1),!c),r.arc(f,h,n,Ut(q.cy+q.y1,q.cx+q.x1),Ut(st.cy+st.y1,st.cx+st.x1),!c),Dt>0&&r.arc(f+st.cx,h+st.cy,Dt,Ut(st.y1,st.x1),Ut(st.y0,st.x0),!c))}else r.moveTo(f+P,h+R),r.arc(f,h,n,l,u,!c);if(!(i>ze)||!V)r.lineTo(f+z,h+k);else if(A>ze){var Bt=qe(p,A),Dt=qe(g,A),q=xo(z,k,C,I,i,-Dt,c),st=xo(P,R,E,L,i,-Bt,c);r.lineTo(f+q.cx+q.x0,h+q.cy+q.y0),A<T&&Bt===Dt?r.arc(f+q.cx,h+q.cy,A,Ut(q.y0,q.x0),Ut(st.y0,st.x0),!c):(Dt>0&&r.arc(f+q.cx,h+q.cy,Dt,Ut(q.y0,q.x0),Ut(q.y1,q.x1),!c),r.arc(f,h,i,Ut(q.cy+q.y1,q.cx+q.x1),Ut(st.cy+st.y1,st.cx+st.x1),c),Bt>0&&r.arc(f+st.cx,h+st.cy,Bt,Ut(st.y1,st.x1),Ut(st.y0,st.x0),!c))}else r.lineTo(f+z,h+k),r.arc(f,h,i,u,l,c)}r.closePath()}}}var xT=(function(){function r(){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 r})(),Pi=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new xT},t.prototype.buildPath=function(e,n){ST(e,n)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t})(vt);Pi.prototype.type="sector";var CT=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),ec=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new CT},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.PI*2;e.moveTo(i+n.r,a),e.arc(i,a,n.r,0,o,!1),e.moveTo(i+n.r0,a),e.arc(i,a,n.r0,0,o,!0)},t})(vt);ec.prototype.type="ring";function TT(r,t,e,n){var i=[],a=[],o=[],s=[],l,u,f,h;if(n){f=[1/0,1/0],h=[-1/0,-1/0];for(var c=0,v=r.length;c<v;c++)si(f,f,r[c]),li(h,h,r[c]);si(f,f,n[0]),li(h,h,n[1])}for(var c=0,v=r.length;c<v;c++){var d=r[c];if(e)l=r[c?c-1:v-1],u=r[(c+1)%v];else if(c===0||c===v-1){i.push(aS(r[c]));continue}else l=r[c-1],u=r[c+1];oS(a,u,l),Gl(a,a,t);var p=Af(d,l),g=Af(d,u),m=p+g;m!==0&&(p/=m,g/=m),Gl(o,a,-p),Gl(s,a,g);var y=qc([],d,o),_=qc([],d,s);n&&(li(y,y,f),si(y,y,h),li(_,_,f),si(_,_,h)),i.push(y),i.push(_)}return e&&i.push(i.shift()),i}function ky(r,t,e){var n=t.smooth,i=t.points;if(i&&i.length>=2){if(n){var a=TT(i,n,e,t.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(e?o:o-1);s++){var l=a[s*2],u=a[s*2+1],f=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s<h;s++)r.lineTo(i[s][0],i[s][1])}e&&r.closePath()}}var DT=(function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r})(),al=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new DT},t.prototype.buildPath=function(e,n){ky(e,n,!0)},t})(vt);al.prototype.type="polygon";var MT=(function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r})(),ol=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new MT},t.prototype.buildPath=function(e,n){ky(e,n,!1)},t})(vt);ol.prototype.type="polyline";var AT={},IT=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r})(),Gr=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new IT},t.prototype.buildPath=function(e,n){var i,a,o,s;if(this.subPixelOptimize){var l=yy(AT,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(e.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),e.lineTo(o,s))},t.prototype.pointAt=function(e){var n=this.shape;return[n.x1*(1-e)+n.x2*e,n.y1*(1-e)+n.y2*e]},t})(vt);Gr.prototype.type="line";var ae=[],ET=(function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r})();function hd(r,t,e){var n=r.cpx2,i=r.cpy2;return n!=null||i!=null?[(e?lv:Gt)(r.x1,r.cpx1,r.cpx2,r.x2,t),(e?lv:Gt)(r.y1,r.cpy1,r.cpy2,r.y2,t)]:[(e?uv:le)(r.x1,r.cpx1,r.x2,t),(e?uv:le)(r.y1,r.cpy1,r.y2,t)]}var rc=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new ET},t.prototype.buildPath=function(e,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,f=n.cpx2,h=n.cpy2,c=n.percent;c!==0&&(e.moveTo(i,a),f==null||h==null?(c<1&&(vs(i,l,o,c,ae),l=ae[1],o=ae[2],vs(a,u,s,c,ae),u=ae[1],s=ae[2]),e.quadraticCurveTo(l,u,o,s)):(c<1&&(cs(i,l,f,o,c,ae),l=ae[1],f=ae[2],o=ae[3],cs(a,u,h,s,c,ae),u=ae[1],h=ae[2],s=ae[3]),e.bezierCurveTo(l,u,f,h,o,s)))},t.prototype.pointAt=function(e){return hd(this.shape,e,!1)},t.prototype.tangentAt=function(e){var n=hd(this.shape,e,!0);return uS(n,n)},t})(vt);rc.prototype.type="bezier-curve";var LT=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),sl=(function(r){O(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new LT},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,f=Math.cos(s),h=Math.sin(s);e.moveTo(f*o+i,h*o+a),e.arc(i,a,o,s,l,!u)},t})(vt);sl.prototype.type="arc";var PT=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="compound",e}return t.prototype._updatePathDirty=function(){for(var e=this.shape.paths,n=this.shapeChanged(),i=0;i<e.length;i++)n=n||e[i].shapeChanged();n&&this.dirtyShape()},t.prototype.beforeBrush=function(){this._updatePathDirty();for(var e=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<e.length;i++)e[i].path||e[i].createPathProxy(),e[i].path.setScale(n[0],n[1],e[i].segmentIgnoreThreshold)},t.prototype.buildPath=function(e,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(e,i[a].shape,!0)},t.prototype.afterBrush=function(){for(var e=this.shape.paths||[],n=0;n<e.length;n++)e[n].pathUpdated()},t.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),vt.prototype.getBoundingRect.call(this)},t})(vt),Oy=(function(){function r(t){this.colorStops=t||[]}return r.prototype.addColorStop=function(t,e){this.colorStops.push({offset:t,color:e})},r})(),Ny=(function(r){O(t,r);function t(e,n,i,a,o,s){var l=r.call(this,o)||this;return l.x=e??0,l.y=n??0,l.x2=i??1,l.y2=a??0,l.type="linear",l.global=s||!1,l}return t})(Oy),RT=(function(r){O(t,r);function t(e,n,i,a,o){var s=r.call(this,a)||this;return s.x=e??.5,s.y=n??.5,s.r=i??.5,s.type="radial",s.global=o||!1,s}return t})(Oy),un=[0,0],fn=[0,0],Co=new wt,To=new wt,Ts=(function(){function r(t,e){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new wt;for(var n=0;n<2;n++)this._axes[n]=new wt;t&&this.fromBoundingRect(t,e)}return r.prototype.fromBoundingRect=function(t,e){var n=this._corners,i=this._axes,a=t.x,o=t.y,s=a+t.width,l=o+t.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),e)for(var u=0;u<4;u++)n[u].transform(e);wt.sub(i[0],n[1],n[0]),wt.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},r.prototype.intersect=function(t,e){var n=!0,i=!e;return Co.set(1/0,1/0),To.set(0,0),!this._intersectCheckOneSide(this,t,Co,To,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(t,this,Co,To,i,-1)&&(n=!1,i)||i||wt.copy(e,n?Co:To),n},r.prototype._intersectCheckOneSide=function(t,e,n,i,a,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,t._corners,un),this._getProjMinMaxOnAxis(l,e._corners,fn),un[1]<fn[0]||un[0]>fn[1]){if(s=!1,a)return s;var f=Math.abs(fn[0]-un[1]),h=Math.abs(un[0]-fn[1]);Math.min(f,h)>i.len()&&(f<h?wt.scale(i,u,-f*o):wt.scale(i,u,h*o))}else if(n){var f=Math.abs(fn[0]-un[1]),h=Math.abs(un[0]-fn[1]);Math.min(f,h)<n.len()&&(f<h?wt.scale(n,u,f*o):wt.scale(n,u,-h*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(t,e,n){for(var i=this._axes[t],a=this._origin,o=e[0].dot(i)+a[t],s=o,l=o,u=1;u<e.length;u++){var f=e[u].dot(i)+a[t];s=Math.min(f,s),l=Math.max(f,l)}n[0]=s,n[1]=l},r})(),kT=[],OT=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.notClear=!0,e.incremental=!0,e._displayables=[],e._temporaryDisplayables=[],e._cursor=0,e}return t.prototype.traverse=function(e,n){e.call(n,this)},t.prototype.useStyle=function(){this.style={}},t.prototype.getCursor=function(){return this._cursor},t.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},t.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},t.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},t.prototype.addDisplayable=function(e,n){n?this._temporaryDisplayables.push(e):this._displayables.push(e),this.markRedraw()},t.prototype.addDisplayables=function(e,n){n=n||!1;for(var i=0;i<e.length;i++)this.addDisplayable(e[i],n)},t.prototype.getDisplayables=function(){return this._displayables},t.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},t.prototype.eachPendingDisplayable=function(e){for(var n=this._cursor;n<this._displayables.length;n++)e&&e(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)e&&e(this._temporaryDisplayables[n])},t.prototype.update=function(){this.updateTransform();for(var e=this._cursor;e<this._displayables.length;e++){var n=this._displayables[e];n.parent=this,n.update(),n.parent=null}for(var e=0;e<this._temporaryDisplayables.length;e++){var n=this._temporaryDisplayables[e];n.parent=this,n.update(),n.parent=null}},t.prototype.getBoundingRect=function(){if(!this._rect){for(var e=new dt(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(kT)),e.union(a)}this._rect=e}return this._rect},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(e,n))return!0}return!1},t})(Qa),NT=Ot();function BT(r,t,e,n,i){var a;if(t&&t.ecModel){var o=t.ecModel.getUpdatePayload();a=o&&o.animation}var s=t&&t.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,f=void 0,h=void 0;n?(u=rt(n.duration,200),f=rt(n.easing,"cubicOut"),h=0):(u=t.getShallow(l?"animationDurationUpdate":"animationDuration"),f=t.getShallow(l?"animationEasingUpdate":"animationEasing"),h=t.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(f=a.easing),a.delay!=null&&(h=a.delay)),Q(h)&&(h=h(e,i)),Q(u)&&(u=u(e));var c={duration:u||0,delay:h,easing:f};return c}else return null}function nc(r,t,e,n,i,a,o){var s=!1,l;Q(i)?(o=a,a=i,i=null):Z(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||t.stopAnimation("leave");var f=BT(r,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(t,i):null);if(f&&f.duration>0){var h=f.duration,c=f.delay,v=f.easing,d={duration:h,delay:c||0,easing:v,done:a,force:!!a||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),a&&a()}function ve(r,t,e,n,i,a){nc("update",r,t,e,n,i,a)}function ir(r,t,e,n,i,a){nc("enter",r,t,e,n,i,a)}function xa(r){if(!r.__zr)return!0;for(var t=0;t<r.animators.length;t++){var e=r.animators[t];if(e.scope==="leave")return!0}return!1}function Ds(r,t,e,n,i,a){xa(r)||nc("leave",r,t,e,n,i,a)}function cd(r,t,e,n){r.removeTextContent(),r.removeTextGuideLine(),Ds(r,{style:{opacity:0}},t,e,n)}function Kf(r,t,e){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||cd(i,t,e,n)}):cd(r,t,e,n)}function ic(r){NT(r).oldStyle=r.style}var Ms=Math.max,As=Math.min,Qf={};function FT(r){return vt.extend(r)}var zT=pT;function VT(r,t){return zT(r,t)}function Ye(r,t){Qf[r]=t}function HT(r){if(Qf.hasOwnProperty(r))return Qf[r]}function ac(r,t,e,n){var i=dT(r,t);return e&&(n==="center"&&(e=Fy(e,i.getBoundingRect())),zy(i,e)),i}function By(r,t,e){var n=new $r({style:{image:r,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(i){if(e==="center"){var a={width:i.width,height:i.height};n.setStyle(Fy(t,a))}}});return n}function Fy(r,t){var e=t.width/t.height,n=r.height*e,i;n<=r.width?i=r.height:(n=r.width,i=n/e);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var WT=gT;function zy(r,t){if(r.applyTransform){var e=r.getBoundingRect(),n=e.calculateTransform(t);r.applyTransform(n)}}function Oa(r,t){return yy(r,r,{lineWidth:t}),r}function GT(r){return _y(r.shape,r.shape,r.style),r}var es=mn;function Vy(r,t){for(var e=Vh([]);r&&r!==t;)di(e,r.getLocalTransform(),e),r=r.parent;return e}function Na(r,t,e){return t&&!ce(t)&&(t=$h.getLocalTransform(t)),e&&(t=Wh([],t)),Re([],r,t)}function Hy(r,t,e){var n=t[4]===0||t[5]===0||t[0]===0?1:Math.abs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:Math.abs(2*t[4]/t[2]),a=[r==="left"?-n:r==="right"?n:0,r==="top"?-i:r==="bottom"?i:0];return a=Na(a,t,e),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function vd(r){return!r.isGroup}function $T(r){return r.shape!=null}function Wy(r,t,e){if(!r||!t)return;function n(o){var s={};return o.traverse(function(l){vd(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return $T(o)&&(s.shape=B({},o.shape)),s}var a=n(r);t.traverse(function(o){if(vd(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),ve(o,l,e,ft(o).dataIndex)}}})}function UT(r,t){return X(r,function(e){var n=e[0];n=Ms(n,t.x),n=As(n,t.x+t.width);var i=e[1];return i=Ms(i,t.y),i=As(i,t.y+t.height),[n,i]})}function YT(r,t){var e=Ms(r.x,t.x),n=As(r.x+r.width,t.x+t.width),i=Ms(r.y,t.y),a=As(r.y+r.height,t.y+t.height);if(n>=e&&a>=i)return{x:e,y:i,width:n-e,height:a-i}}function oc(r,t,e){var n=B({rectHover:!0},t),i=n.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),_t(i,e),new $r(n)):ac(r.replace("path://",""),n,e,"center")}function jT(r,t,e,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(Gy(r,t,e,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function Gy(r,t,e,n,i,a,o,s){var l=e-r,u=n-t,f=o-i,h=s-a,c=Du(f,h,l,u);if(ZT(c))return!1;var v=r-i,d=t-a,p=Du(v,d,l,u)/c;if(p<0||p>1)return!1;var g=Du(v,d,f,h)/c;return!(g<0||g>1)}function Du(r,t,e,n){return r*n-e*t}function ZT(r){return r<=1e-6&&r>=-1e-6}function ll(r){var t=r.itemTooltipOption,e=r.componentModel,n=r.itemName,i=G(t)?{formatter:t}:t,a=e.mainType,o=e.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&D(Ct(l),function(f){In(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ft(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:_t({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function dd(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Ja(r,t){if(r)if(H(r))for(var e=0;e<r.length;e++)dd(r[e],t);else dd(r,t)}Ye("circle",il);Ye("ellipse",tc);Ye("sector",Pi);Ye("ring",ec);Ye("polygon",al);Ye("polyline",ol);Ye("rect",Tt);Ye("line",Gr);Ye("bezierCurve",rc);Ye("arc",sl);const XT=Object.freeze(Object.defineProperty({__proto__:null,Arc:sl,BezierCurve:rc,BoundingRect:dt,Circle:il,CompoundPath:PT,Ellipse:tc,Group:kt,Image:$r,IncrementalDisplayable:OT,Line:Gr,LinearGradient:Ny,OrientedBoundingRect:Ts,Path:vt,Point:wt,Polygon:al,Polyline:ol,RadialGradient:RT,Rect:Tt,Ring:ec,Sector:Pi,Text:$t,applyTransform:Na,clipPointsByRect:UT,clipRectByRect:YT,createIcon:oc,extendPath:VT,extendShape:FT,getShapeClass:HT,getTransform:Vy,groupTransition:Wy,initProps:ir,isElementRemoved:xa,lineLineIntersect:Gy,linePolygonIntersect:jT,makeImage:By,makePath:ac,mergePath:WT,registerShape:Ye,removeElement:Ds,removeElementWithFadeOut:Kf,resizePath:zy,setTooltipConfig:ll,subPixelOptimize:es,subPixelOptimizeLine:Oa,subPixelOptimizeRect:GT,transformDirection:Hy,traverseElements:Ja,updateProps:ve},Symbol.toStringTag,{value:"Module"}));var ul={};function qT(r,t){for(var e=0;e<nr.length;e++){var n=nr[e],i=t[n],a=r.ensureState(n);a.style=a.style||{},a.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:t.normal}),r.useStates(o,!0)}function pd(r,t,e){var n=r.labelFetcher,i=r.labelDataIndex,a=r.labelDimIndex,o=t.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),e!=null?{interpolatedValue:e}:null)),s==null&&(s=Q(r.defaultText)?r.defaultText(i,r,e):r.defaultText);for(var l={normal:s},u=0;u<nr.length;u++){var f=nr[u],h=t[f];l[f]=rt(n?n.getFormattedLabel(i,f,null,a,h&&h.get("formatter")):null,s)}return l}function fl(r,t,e,n){e=e||ul;for(var i=r instanceof $t,a=!1,o=0;o<Qv.length;o++){var s=t[Qv[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?r:r.getTextContent();if(a){i||(l||(l=new $t,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=pd(e,t),f=t.normal,h=!!f.getShallow("show"),c=mr(f,n&&n.normal,e,!1,!i);c.text=u.normal,i||r.setTextConfig(gd(f,e,!1));for(var o=0;o<nr.length;o++){var v=nr[o],s=t[v];if(s){var d=l.ensureState(v),p=!!rt(s.getShallow("show"),h);if(p!==h&&(d.ignore=!p),d.style=mr(s,n&&n[v],e,!0,!i),d.style.text=u[v],!i){var g=r.ensureState(v);g.textConfig=gd(s,e,!0)}}}l.silent=!!f.getShallow("silent"),l.style.x!=null&&(c.x=l.style.x),l.style.y!=null&&(c.y=l.style.y),l.ignore=!h,l.useStyle(c),l.dirty(),e.enableTextSetter&&(cl(l).setLabelText=function(m){var y=pd(e,t,m);qT(l,y)})}else l&&(l.ignore=!0);r.dirty()}function hl(r,t){t=t||"label";for(var e={normal:r.getModel(t)},n=0;n<nr.length;n++){var i=nr[n];e[i]=r.getModel([i,t])}return e}function mr(r,t,e,n,i){var a={};return KT(a,r,e,n,i),t&&B(a,t),a}function gd(r,t,e){t=t||{};var n={},i,a=r.getShallow("rotate"),o=rt(r.getShallow("distance"),e?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(e?null:"inside"),i==="outside"&&(i=t.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?t.inheritColor||null:"auto",n}function KT(r,t,e,n,i){e=e||ul;var a=t.ecModel,o=a&&a.option.textStyle,s=QT(t),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var f=t.getModel(["rich",u]);wd(l[u]={},f,o,e,n,i,!1,!0)}}l&&(r.rich=l);var h=t.get("overflow");h&&(r.overflow=h);var c=t.get("minMargin");c!=null&&(r.margin=c),wd(r,t,o,e,n,i,!0,!1)}function QT(r){for(var t;r&&r!==r.ecModel;){var e=(r.option||ul).rich;if(e){t=t||{};for(var n=Ct(e),i=0;i<n.length;i++){var a=n[i];t[a]=1}}r=r.parentModel}return t}var md=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],yd=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],_d=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function wd(r,t,e,n,i,a,o,s){e=!i&&e||ul;var l=n&&n.inheritColor,u=t.getShallow("color"),f=t.getShallow("textBorderColor"),h=rt(t.getShallow("opacity"),e.opacity);(u==="inherit"||u==="auto")&&(process.env.NODE_ENV!=="production"&&u==="auto"&&Ht("color: 'auto'","color: 'inherit'"),l?u=l:u=null),(f==="inherit"||f==="auto")&&(process.env.NODE_ENV!=="production"&&f==="auto"&&Ht("color: 'auto'","color: 'inherit'"),l?f=l:f=null),a||(u=u||e.color,f=f||e.textBorderColor),u!=null&&(r.fill=u),f!=null&&(r.stroke=f);var c=rt(t.getShallow("textBorderWidth"),e.textBorderWidth);c!=null&&(r.lineWidth=c);var v=rt(t.getShallow("textBorderType"),e.textBorderType);v!=null&&(r.lineDash=v);var d=rt(t.getShallow("textBorderDashOffset"),e.textBorderDashOffset);d!=null&&(r.lineDashOffset=d),!i&&h==null&&!s&&(h=n&&n.defaultOpacity),h!=null&&(r.opacity=h),!i&&!a&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var p=0;p<md.length;p++){var g=md[p],m=rt(t.getShallow(g),e[g]);m!=null&&(r[g]=m)}for(var p=0;p<yd.length;p++){var g=yd[p],m=t.getShallow(g);m!=null&&(r[g]=m)}if(r.verticalAlign==null){var y=t.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!o||!n.disableBox){for(var p=0;p<_d.length;p++){var g=_d[p],m=t.getShallow(g);m!=null&&(r[g]=m)}var _=t.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(process.env.NODE_ENV!=="production"&&r.backgroundColor==="auto"&&Ht("backgroundColor: 'auto'","backgroundColor: 'inherit'"),r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(process.env.NODE_ENV!=="production"&&r.borderColor==="auto"&&Ht("borderColor: 'auto'","borderColor: 'inherit'"),r.borderColor=l)}}function JT(r,t){var e=t&&t.getModel("textStyle");return Qe([r.fontStyle||e&&e.getShallow("fontStyle")||"",r.fontWeight||e&&e.getShallow("fontWeight")||"",(r.fontSize||e&&e.getShallow("fontSize")||12)+"px",r.fontFamily||e&&e.getShallow("fontFamily")||"sans-serif"].join(" "))}var cl=Ot();function tD(r,t,e,n){if(r){var i=cl(r);i.prevValue=i.value,i.value=e;var a=t.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=t)}}var eD=["textStyle","color"],Mu=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],Au=new $t,rD=(function(){function r(){}return r.prototype.getTextColor=function(t){var e=this.ecModel;return this.getShallow("color")||(!t&&e?e.get(eD):null)},r.prototype.getFont=function(){return JT({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(t){for(var e={text:t,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<Mu.length;n++)e[Mu[n]]=this.getShallow(Mu[n]);return Au.useStyle(e),Au.update(),Au.getBoundingRect()},r})(),$y=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],nD=Ra($y),iD=(function(){function r(){}return r.prototype.getLineStyle=function(t){return nD(this,t)},r})(),Uy=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],aD=Ra(Uy),oD=(function(){function r(){}return r.prototype.getItemStyle=function(t,e){return aD(this,t,e)},r})(),At=(function(){function r(t,e,n){this.parentModel=e,this.ecModel=n,this.option=t}return r.prototype.init=function(t,e,n){},r.prototype.mergeOption=function(t,e){ct(this.option,t,!0)},r.prototype.get=function(t,e){return t==null?this.option:this._doGet(this.parsePath(t),!e&&this.parentModel)},r.prototype.getShallow=function(t,e){var n=this.option,i=n==null?n:n[t];if(i==null&&!e){var a=this.parentModel;a&&(i=a.getShallow(t))}return i},r.prototype.getModel=function(t,e){var n=t!=null,i=n?this.parsePath(t):null,a=n?this._doGet(i):this.option;return e=e||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new r(a,e,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var t=this.constructor;return new t(lt(this.option))},r.prototype.parsePath=function(t){return typeof t=="string"?t.split("."):t},r.prototype.resolveParentPath=function(t){return t},r.prototype.isAnimationEnabled=function(){if(!K.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(t,e){var n=this.option;if(!t)return n;for(var i=0;i<t.length&&!(t[i]&&(n=n&&typeof n=="object"?n[t[i]]:null,n==null));i++);return n==null&&e&&(n=e._doGet(this.resolveParentPath(t),e.parentModel)),n},r})();Xh(At);Zx(At);$e(At,iD);$e(At,oD);$e(At,Jx);$e(At,rD);var sD=Math.round(Math.random()*10);function vl(r){return[r||"",sD++].join("_")}function lD(r){var t={};r.registerSubTypeDefaulter=function(e,n){var i=Je(e);t[i.main]=n},r.determineSubType=function(e,n){var i=n.type;if(!i){var a=Je(e).main;r.hasSubTypes(e)&&t[a]&&(i=t[a](n))}return i}}function uD(r,t){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=e(o),f=u.graph,h=u.noEntryList,c={};for(D(a,function(y){c[y]=!0});h.length;){var v=h.pop(),d=f[v],p=!!c[v];p&&(s.call(l,v,d.originalDeps.slice()),delete c[v]),D(d.successor,p?m:g)}D(c,function(){var y="";throw process.env.NODE_ENV!=="production"&&(y=_s("Circular dependency may exists: ",c,a,o)),new Error(y)});function g(y){f[y].entryCount--,f[y].entryCount===0&&h.push(y)}function m(y){c[y]=!0,g(y)}};function e(a){var o={},s=[];return D(a,function(l){var u=n(o,l),f=u.originalDeps=t(l),h=i(f,a);u.entryCount=h.length,u.entryCount===0&&s.push(l),D(h,function(c){yt(u.predecessor,c)<0&&u.predecessor.push(c);var v=n(o,c);yt(v.successor,c)<0&&v.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return D(a,function(l){yt(o,l)>=0&&s.push(l)}),s}}function dl(r,t){return ct(ct({},r,!0),t,!0)}const fD={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:". "}}}},hD={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 Is="ZH",sc="EN",gi=sc,rs={},lc={},Yy=K.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||gi).toUpperCase();return r.indexOf(Is)>-1?Is:gi})():gi;function jy(r,t){r=r.toUpperCase(),lc[r]=new At(t),rs[r]=t}function cD(r){if(G(r)){var t=rs[r.toUpperCase()]||{};return r===Is||r===sc?lt(t):ct(lt(t),lt(rs[gi]),!1)}else return ct(lt(r),lt(rs[gi]),!1)}function vD(r){return lc[r]}function dD(){return lc[gi]}jy(sc,fD);jy(Is,hD);var uc=1e3,fc=uc*60,Ca=fc*60,Pe=Ca*24,bd=Pe*365,ca={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}"},Do="{yyyy}-{MM}-{dd}",Sd={year:"{yyyy}",month:"{yyyy}-{MM}",day:Do,hour:Do+" "+ca.hour,minute:Do+" "+ca.minute,second:Do+" "+ca.second,millisecond:ca.none},Iu=["year","month","day","hour","minute","second","millisecond"],Zy=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Cr(r,t){return r+="","0000".substr(0,t-r.length)+r}function mi(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function pD(r){return r===mi(r)}function gD(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function pl(r,t,e,n){var i=gr(r),a=i[hc(e)](),o=i[yi(e)]()+1,s=Math.floor((o-1)/3)+1,l=i[gl(e)](),u=i["get"+(e?"UTC":"")+"Day"](),f=i[Ba(e)](),h=(f-1)%12+1,c=i[ml(e)](),v=i[yl(e)](),d=i[_l(e)](),p=f>=12?"pm":"am",g=p.toUpperCase(),m=n instanceof At?n:vD(n||Yy)||dD(),y=m.getModel("time"),_=y.get("month"),w=y.get("monthAbbr"),b=y.get("dayOfWeek"),S=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Cr(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,w[o-1]).replace(/{MM}/g,Cr(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Cr(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,S[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Cr(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Cr(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Cr(c,2)).replace(/{m}/g,c+"").replace(/{ss}/g,Cr(v,2)).replace(/{s}/g,v+"").replace(/{SSS}/g,Cr(d,3)).replace(/{S}/g,d+"")}function mD(r,t,e,n,i){var a=null;if(G(e))a=e;else if(Q(e))a=e(r.value,t,{level:r.level});else{var o=B({},ca);if(r.level>0)for(var s=0;s<Iu.length;++s)o[Iu[s]]="{primary|"+o[Iu[s]]+"}";var l=e?e.inherit===!1?e:_t(e,o):o,u=Xy(r.value,i);if(l[u])a=l[u];else if(l.inherit){for(var f=Zy.indexOf(u),s=f-1;s>=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(H(a)){var h=r.level==null?0:r.level>=0?r.level:a.length+r.level;h=Math.min(h,a.length-1),a=a[h]}}return pl(new Date(r.value),a,i,n)}function Xy(r,t){var e=gr(r),n=e[yi(t)]()+1,i=e[gl(t)](),a=e[Ba(t)](),o=e[ml(t)](),s=e[yl(t)](),l=e[_l(t)](),u=l===0,f=u&&s===0,h=f&&o===0,c=h&&a===0,v=c&&i===1,d=v&&n===1;return d?"year":v?"month":c?"day":h?"hour":f?"minute":u?"second":"millisecond"}function xd(r,t,e){var n=St(r)?gr(r):r;switch(t=t||Xy(r,e),t){case"year":return n[hc(e)]();case"half-year":return n[yi(e)]()>=6?1:0;case"quarter":return Math.floor((n[yi(e)]()+1)/4);case"month":return n[yi(e)]();case"day":return n[gl(e)]();case"half-day":return n[Ba(e)]()/24;case"hour":return n[Ba(e)]();case"minute":return n[ml(e)]();case"second":return n[yl(e)]();case"millisecond":return n[_l(e)]()}}function hc(r){return r?"getUTCFullYear":"getFullYear"}function yi(r){return r?"getUTCMonth":"getMonth"}function gl(r){return r?"getUTCDate":"getDate"}function Ba(r){return r?"getUTCHours":"getHours"}function ml(r){return r?"getUTCMinutes":"getMinutes"}function yl(r){return r?"getUTCSeconds":"getSeconds"}function _l(r){return r?"getUTCMilliseconds":"getMilliseconds"}function yD(r){return r?"setUTCFullYear":"setFullYear"}function qy(r){return r?"setUTCMonth":"setMonth"}function Ky(r){return r?"setUTCDate":"setDate"}function Qy(r){return r?"setUTCHours":"setHours"}function Jy(r){return r?"setUTCMinutes":"setMinutes"}function t0(r){return r?"setUTCSeconds":"setSeconds"}function e0(r){return r?"setUTCMilliseconds":"setMilliseconds"}function r0(r){if(!iy(r))return G(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function n0(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,n){return n.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var wl=Rm;function Jf(r,t,e){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(f){return f&&Qe(f)?f:"-"}function a(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?gr(r):r;if(isNaN(+l)){if(s)return"-"}else return pl(l,n,e)}if(t==="ordinal")return ls(r)?i(r):St(r)&&a(r)?r+"":"-";var u=ys(r);return a(u)?r0(u):ls(r)?i(r):typeof r=="boolean"?r+"":"-"}var Cd=["a","b","c","d","e","f","g"],Eu=function(r,t){return"{"+r+(t??"")+"}"};function i0(r,t,e){H(t)||(t=[t]);var n=t.length;if(!n)return"";for(var i=t[0].$vars||[],a=0;a<i.length;a++){var o=Cd[a];r=r.replace(Eu(o),Eu(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=t[s][i[l]];r=r.replace(Eu(Cd[l],s),e?se(u):u)}return r}function _D(r,t){var e=G(r)?{color:r,extraCssText:t}:r||{},n=e.color,i=e.type;t=e.extraCssText;var a=e.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+se(n)+";"+(t||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+se(n)+";"+(t||"")+'"></span>';var o=e.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Pn(r,t){return t=t||"transparent",G(r)?r:Z(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function Td(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var ns=D,wD=["left","right","top","bottom","width","height"],Mo=[["width","left","right"],["height","top","bottom"]];function cc(r,t,e,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;t.eachChild(function(l,u){var f=l.getBoundingRect(),h=t.childAt(u+1),c=h&&h.getBoundingRect(),v,d;if(r==="horizontal"){var p=f.width+(c?-c.x+f.x:0);v=a+p,v>n||l.newline?(a=0,v=p,o+=s+e,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(c?-c.y+f.y:0);d=o+g,d>i||l.newline?(a+=s+e,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=v+e:o=d+e)})}var Ta=cc;Mt(cc,"vertical");Mt(cc,"horizontal");function xi(r,t,e){e=wl(e||0);var n=t.width,i=t.height,a=Pt(r.left,n),o=Pt(r.top,i),s=Pt(r.right,n),l=Pt(r.bottom,i),u=Pt(r.width,n),f=Pt(r.height,i),h=e[2]+e[0],c=e[1]+e[3],v=r.aspect;switch(isNaN(u)&&(u=n-s-c-a),isNaN(f)&&(f=i-l-h-o),v!=null&&(isNaN(u)&&isNaN(f)&&(v>n/i?u=n*.8:f=i*.8),isNaN(u)&&(u=v*f),isNaN(f)&&(f=u/v)),isNaN(a)&&(a=n-s-u-c),isNaN(o)&&(o=i-l-f-h),r.left||r.right){case"center":a=n/2-u/2-e[3];break;case"right":a=n-u-c;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-f/2-e[0];break;case"bottom":o=i-f-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-c-a-(s||0)),isNaN(f)&&(f=i-h-o-(l||0));var d=new dt(a+e[3],o+e[0],u,f);return d.margin=e,d}function Fa(r){var t=r.layoutMode||r.constructor.layoutMode;return Z(t)?t:t?{type:t}:null}function Ci(r,t,e){var n=e&&e.ignoreSize;!H(n)&&(n=[n,n]);var i=o(Mo[0],0),a=o(Mo[1],1);u(Mo[0],r,i),u(Mo[1],r,a);function o(f,h){var c={},v=0,d={},p=0,g=2;if(ns(f,function(_){d[_]=r[_]}),ns(f,function(_){s(t,_)&&(c[_]=d[_]=t[_]),l(c,_)&&v++,l(d,_)&&p++}),n[h])return l(t,f[1])?d[f[2]]=null:l(t,f[2])&&(d[f[1]]=null),d;if(p===g||!v)return d;if(v>=g)return c;for(var m=0;m<f.length;m++){var y=f[m];if(!s(c,y)&&s(r,y)){c[y]=r[y];break}}return c}function s(f,h){return f.hasOwnProperty(h)}function l(f,h){return f[h]!=null&&f[h]!=="auto"}function u(f,h,c){ns(f,function(v){h[v]=c[v]})}}function to(r){return bD({},r)}function bD(r,t){return t&&r&&ns(wD,function(e){t.hasOwnProperty(e)&&(r[e]=t[e])}),r}var SD=Ot(),ht=(function(r){O(t,r);function t(e,n,i){var a=r.call(this,e,n,i)||this;return a.uid=vl("ec_cpt_model"),a}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Fa(this),a=i?to(e):{},o=n.getTheme();ct(e,o.get(this.mainType)),ct(e,this.getDefaultOption()),i&&Ci(e,a,i)},t.prototype.mergeOption=function(e,n){ct(this.option,e,!0);var i=Fa(this);i&&Ci(this.option,e,i)},t.prototype.optionUpdated=function(e,n){},t.prototype.getDefaultOption=function(){var e=this.constructor;if(!Ux(e))return e.defaultOption;var n=SD(this);if(!n.defaultOption){for(var i=[],a=e;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=ct(s,i[l],!0);n.defaultOption=s}return n.defaultOption},t.prototype.getReferringComponents=function(e,n){var i=e+"Index",a=e+"Id";return Ka(this.ecModel,e,{index:this.get(i,!0),id:this.get(a,!0)},n)},t.prototype.getBoxLayoutParams=function(){var e=this;return{left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=(function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0})(),t})(At);hy(ht,At);Qs(ht);lD(ht);uD(ht,xD);function xD(r){var t=[];return D(ht.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=X(t,function(e){return Je(e).main}),r!=="dataset"&&yt(t,"dataset")<=0&&t.unshift("dataset"),t}var a0="";typeof navigator<"u"&&(a0=navigator.platform||"");var Yn="rgba(0, 0, 0, 0.2)";const CD={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Yn,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Yn,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Yn,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Yn,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Yn,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Yn,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:a0.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 th=et(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ne="original",de="arrayRows",ar="objectRows",wr="keyedColumns",dr="typedArray",o0="unknown",pr="column",Ri="row",me={Must:1,Might:2,Not:3},s0=Ot();function TD(r){s0(r).datasetMap=et()}function l0(r,t,e){var n={},i=u0(t);if(!i||!r)return n;var a=[],o=[],s=t.ecModel,l=s0(s).datasetMap,u=i.uid+"_"+e.seriesLayoutBy,f,h;r=r.slice(),D(r,function(p,g){var m=Z(p)?p:r[g]={name:p};m.type==="ordinal"&&f==null&&(f=g,h=d(m)),n[m.name]=[]});var c=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});D(r,function(p,g){var m=p.name,y=d(p);if(f==null){var _=c.valueWayDim;v(n[m],_,y),v(o,_,y),c.valueWayDim+=y}else if(f===g)v(n[m],0,y),v(a,0,y);else{var _=c.categoryWayDim;v(n[m],_,y),v(o,_,y),c.categoryWayDim+=y}});function v(p,g,m){for(var y=0;y<m;y++)p.push(g+y)}function d(p){var g=p.dimsDef;return g?g.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function u0(r){var t=r.get("data",!0);if(!t)return Ka(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},he).models[0]}function DD(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:Ka(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},he).models}function f0(r,t){return MD(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,t)}function MD(r,t,e,n,i,a){var o,s=5;if(ie(r))return me.Not;var l,u;if(n){var f=n[a];Z(f)?(l=f.name,u=f.type):G(f)&&(l=f)}if(u!=null)return u==="ordinal"?me.Must:me.Not;if(t===de){var h=r;if(e===Ri){for(var c=h[a],v=0;v<(c||[]).length&&v<s;v++)if((o=w(c[i+v]))!=null)return o}else for(var v=0;v<h.length&&v<s;v++){var d=h[i+v];if(d&&(o=w(d[a]))!=null)return o}}else if(t===ar){var p=r;if(!l)return me.Not;for(var v=0;v<p.length&&v<s;v++){var g=p[v];if(g&&(o=w(g[l]))!=null)return o}}else if(t===wr){var m=r;if(!l)return me.Not;var c=m[l];if(!c||ie(c))return me.Not;for(var v=0;v<c.length&&v<s;v++)if((o=w(c[v]))!=null)return o}else if(t===Ne)for(var y=r,v=0;v<y.length&&v<s;v++){var g=y[v],_=qa(g);if(!H(_))return me.Not;if((o=w(_[a]))!=null)return o}function w(b){var S=G(b);if(b!=null&&Number.isFinite(Number(b))&&b!=="")return S?me.Might:me.Not;if(S&&b!=="-")return me.Must}return me.Not}var AD=et();function ID(r,t,e){var n=AD.get(t);if(!n)return e;var i=n(r);if(!i)return e;if(process.env.NODE_ENV!=="production")for(var a=0;a<i.length;a++)nt(bi(i[a]));return e.concat(i)}var Dd=Ot();Ot();var vc=(function(){function r(){}return r.prototype.getColorFromPalette=function(t,e,n){var i=ne(this.get("color",!0)),a=this.get("colorLayer",!0);return LD(this,Dd,i,a,t,e,n)},r.prototype.clearColorPalette=function(){PD(this,Dd)},r})();function ED(r,t){for(var e=r.length,n=0;n<e;n++)if(r[n].length>t)return r[n];return r[e-1]}function LD(r,t,e,n,i,a,o){a=a||r;var s=t(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var f=o==null||!n?e:ED(n,o);if(f=f||e,!(!f||!f.length)){var h=f[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%f.length,h}}function PD(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var Ao,Ui,Md,Lu="\0_ec_inner",Ad=1,RD={grid:"GridComponent",polar:"PolarComponent",geo:"GeoComponent",singleAxis:"SingleAxisComponent",parallel:"ParallelComponent",calendar:"CalendarComponent",graphic:"GraphicComponent",toolbox:"ToolboxComponent",tooltip:"TooltipComponent",axisPointer:"AxisPointerComponent",brush:"BrushComponent",title:"TitleComponent",timeline:"TimelineComponent",markPoint:"MarkPointComponent",markLine:"MarkLineComponent",markArea:"MarkAreaComponent",legend:"LegendComponent",dataZoom:"DataZoomComponent",visualMap:"VisualMapComponent",xAxis:"GridComponent",yAxis:"GridComponent",angleAxis:"PolarComponent",radiusAxis:"PolarComponent"},kD={line:"LineChart",bar:"BarChart",pie:"PieChart",scatter:"ScatterChart",radar:"RadarChart",map:"MapChart",tree:"TreeChart",treemap:"TreemapChart",graph:"GraphChart",gauge:"GaugeChart",funnel:"FunnelChart",parallel:"ParallelChart",sankey:"SankeyChart",boxplot:"BoxplotChart",candlestick:"CandlestickChart",effectScatter:"EffectScatterChart",lines:"LinesChart",heatmap:"HeatmapChart",pictorialBar:"PictorialBarChart",themeRiver:"ThemeRiverChart",sunburst:"SunburstChart",custom:"CustomChart"},Es={};function OD(r){D(r,function(t,e){if(!ht.hasClass(e)){var n=RD[e];n&&!Es[n]&&(Qt("Component "+e+` is used but not imported.
|
|
30
|
+
import { `+n+` } from 'echarts/components';
|
|
31
|
+
echarts.use([`+n+"]);"),Es[n]=!0)}})}var dc=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,n,i,a,o,s){a=a||{},this.option=null,this._theme=new At(a),this._locale=new At(o),this._optionManager=s},t.prototype.setOption=function(e,n,i){process.env.NODE_ENV!=="production"&&(nt(e!=null,"option is null/undefined"),nt(e[Lu]!==Ad,"please use chart.getOption()"));var a=Ld(n);this._optionManager.setOption(e,i,a),this._resetOption(null,a)},t.prototype.resetOption=function(e,n){return this._resetOption(e,Ld(n))},t.prototype._resetOption=function(e,n){var i=!1,a=this._optionManager;if(!e||e==="recreate"){var o=a.mountOption(e==="recreate");process.env.NODE_ENV!=="production"&&OD(o),!this.option||e==="recreate"?Md(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!e||e==="recreate"||e==="media"){var l=a.getMediaOption(this);l.length&&D(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=et(),u=n&&n.replaceMergeMainTypeMap;TD(this),D(e,function(h,c){h!=null&&(ht.hasClass(c)?c&&(s.push(c),l.set(c,!0)):i[c]=i[c]==null?lt(h):ct(i[c],h,!0))}),u&&u.each(function(h,c){ht.hasClass(c)&&!l.get(c)&&(s.push(c),l.set(c,!0))}),ht.topologicalTravel(s,ht.getAllClassMainTypes(),f,this);function f(h){var c=ID(this,h,ne(e[h])),v=a.get(h),d=v?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",p=Ix(v,c,d);Nx(p,h,ht),i[h]=null,a.set(h,null),o.set(h,0);var g=[],m=[],y=0,_,w;D(p,function(b,S){var x=b.existing,T=b.newOption;if(!T)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var M=h==="series",A=ht.getClass(h,b.keyInfo.subType,!M);if(!A){if(process.env.NODE_ENV!=="production"){var C=b.keyInfo.subType,I=kD[C];Es[C]||(Es[C]=!0,Qt(I?"Series "+C+` is used but not imported.
|
|
32
|
+
import { `+I+` } from 'echarts/charts';
|
|
33
|
+
echarts.use([`+I+"]);":"Unknown series "+C))}return}if(h==="tooltip"){if(_){process.env.NODE_ENV!=="production"&&(w||(Kt("Currently only one tooltip component is allowed."),w=!0));return}_=!0}if(x&&x.constructor===A)x.name=b.keyInfo.name,x.mergeOption(T,this),x.optionUpdated(T,!1);else{var E=B({componentIndex:S},b.keyInfo);x=new A(T,this,this,E),B(x,E),b.brandNew&&(x.__requireNewView=!0),x.init(T,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),m.push(x),y++):(g.push(void 0),m.push(void 0))},this),i[h]=g,a.set(h,m),o.set(h,y),h==="series"&&Ao(this)}this._seriesIndices||Ao(this)},t.prototype.getOption=function(){var e=lt(this.option);return D(e,function(n,i){if(ht.hasClass(i)){for(var a=ne(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!bi(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,e[i]=a}}),delete e[Lu],e},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,n){var i=this._componentsMap.get(e);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},t.prototype.queryComponents=function(e){var n=e.mainType;if(!n)return[];var i=e.index,a=e.id,o=e.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],D(ne(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=Id("id",a,s):o!=null?l=Id("name",o,s):l=Wt(s,function(u){return!!u}),Ed(l,e)},t.prototype.findComponents=function(e){var n=e.query,i=e.mainType,a=s(n),o=a?this.queryComponents(a):Wt(this._componentsMap.get(i),function(u){return!!u});return l(Ed(o,e));function s(u){var f=i+"Index",h=i+"Id",c=i+"Name";return u&&(u[f]!=null||u[h]!=null||u[c]!=null)?{mainType:i,index:u[f],id:u[h],name:u[c]}:null}function l(u){return e.filter?Wt(u,e.filter):u}},t.prototype.eachComponent=function(e,n,i){var a=this._componentsMap;if(Q(e)){var o=n,s=e;a.each(function(h,c){for(var v=0;h&&v<h.length;v++){var d=h[v];d&&s.call(o,c,d,d.componentIndex)}})}else for(var l=G(e)?a.get(e):Z(e)?this.findComponents(e):null,u=0;l&&u<l.length;u++){var f=l[u];f&&n.call(i,f,f.componentIndex)}},t.prototype.getSeriesByName=function(e){var n=er(e,null);return Wt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},t.prototype.getSeriesByIndex=function(e){return this._componentsMap.get("series")[e]},t.prototype.getSeriesByType=function(e){return Wt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===e})},t.prototype.getSeries=function(){return Wt(this._componentsMap.get("series"),function(e){return!!e})},t.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},t.prototype.eachSeries=function(e,n){Ui(this),D(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];e.call(n,a,i)},this)},t.prototype.eachRawSeries=function(e,n){D(this._componentsMap.get("series"),function(i){i&&e.call(n,i,i.componentIndex)})},t.prototype.eachSeriesByType=function(e,n,i){Ui(this),D(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===e&&n.call(i,o,a)},this)},t.prototype.eachRawSeriesByType=function(e,n,i){return D(this.getSeriesByType(e),n,i)},t.prototype.isSeriesFiltered=function(e){return Ui(this),this._seriesIndicesMap.get(e.componentIndex)==null},t.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},t.prototype.filterSeries=function(e,n){Ui(this);var i=[];D(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];e.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=et(i)},t.prototype.restoreData=function(e){Ao(this);var n=this._componentsMap,i=[];n.each(function(a,o){ht.hasClass(o)&&i.push(o)}),ht.topologicalTravel(i,ht.getAllClassMainTypes(),function(a){D(n.get(a),function(o){o&&(a!=="series"||!ND(o,e))&&o.restoreData()})})},t.internalField=(function(){Ao=function(e){var n=e._seriesIndices=[];D(e._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),e._seriesIndicesMap=et(n)},Ui=function(e){if(process.env.NODE_ENV!=="production"&&!e._seriesIndices)throw new Error("Option should contains series.")},Md=function(e,n){e.option={},e.option[Lu]=Ad,e._componentsMap=et({series:[]}),e._componentsCount=et();var i=n.aria;Z(i)&&i.enabled==null&&(i.enabled=!0),BD(n,e._theme.option),ct(n,CD,!1),e._mergeOption(n,null)}})(),t})(At);function ND(r,t){if(t){var e=t.seriesIndex,n=t.seriesId,i=t.seriesName;return e!=null&&r.componentIndex!==e||n!=null&&r.id!==n||i!=null&&r.name!==i}}function BD(r,t){var e=r.color&&!r.colorLayer;D(t,function(n,i){i==="colorLayer"&&e||ht.hasClass(i)||(typeof n=="object"?r[i]=r[i]?ct(r[i],n,!1):lt(n):r[i]==null&&(r[i]=n))})}function Id(r,t,e){if(H(t)){var n=et();return D(t,function(a){if(a!=null){var o=er(a,null);o!=null&&n.set(a,!0)}}),Wt(e,function(a){return a&&n.get(a[r])})}else{var i=er(t,null);return Wt(e,function(a){return a&&i!=null&&a[r]===i})}}function Ed(r,t){return t.hasOwnProperty("subType")?Wt(r,function(e){return e&&e.subType===t.subType}):r}function Ld(r){var t=et();return r&&D(ne(r.replaceMerge),function(e){process.env.NODE_ENV!=="production"&&nt(ht.hasClass(e),'"'+e+'" is not valid component main type in "replaceMerge"'),t.set(e,!0)}),{replaceMergeMainTypeMap:t}}$e(dc,vc);var FD=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],h0=(function(){function r(t){D(FD,function(e){this[e]=tt(t[e],t)},this)}return r})(),Pu={},pc=(function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(t,e){var n=[];D(Pu,function(i,a){var o=i.create(t,e);n=n.concat(o||[])}),this._coordinateSystems=n},r.prototype.update=function(t,e){D(this._coordinateSystems,function(n){n.update&&n.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(t,e){Pu[t]=e},r.get=function(t){return Pu[t]},r})(),zD=/^(min|max)?(.+)$/,VD=(function(){function r(t){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=t}return r.prototype.setOption=function(t,e,n){t&&(D(ne(t.series),function(o){o&&o.data&&ie(o.data)&&Mf(o.data)}),D(ne(t.dataset),function(o){o&&o.source&&ie(o.source)&&Mf(o.source)})),t=lt(t);var i=this._optionBackup,a=HD(t,e,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(t){var e=this._optionBackup;return this._timelineOptions=e.timelineOptions,this._mediaList=e.mediaList,this._mediaDefault=e.mediaDefault,this._currentMediaIndices=[],lt(t?e.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(t){var e,n=this._timelineOptions;if(n.length){var i=t.getComponent("timeline");i&&(e=lt(n[i.getCurrentIndex()]))}return e},r.prototype.getMediaOption=function(t){var e=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)WD(i[l].query,e,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!$D(o,this._currentMediaIndices)&&(s=X(o,function(f){return lt(f===-1?a.option:i[f].option)})),this._currentMediaIndices=o,s},r})();function HD(r,t,e){var n=[],i,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,f=!!r.media,h=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((h||f)&&(r.options=r.media=null),a=r),f&&(H(u)?D(u,function(v){process.env.NODE_ENV!=="production"&&v&&!v.option&&Z(v.query)&&Z(v.query.option)&&Qt("Illegal media option. Must be like { media: [ { query: {}, option: {} } ] }"),v&&v.option&&(v.query?n.push(v):i||(i=v))}):process.env.NODE_ENV!=="production"&&Qt("Illegal media option. Must be an array. Like { media: [ {...}, {...} ] }")),c(a),D(l,function(v){return c(v)}),D(n,function(v){return c(v.option)});function c(v){D(t,function(d){d(v,e)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function WD(r,t,e){var n={width:t,height:e,aspectratio:t/e},i=!0;return D(r,function(a,o){var s=o.match(zD);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();GD(n[u],a,l)||(i=!1)}}),i}function GD(r,t,e){return e==="min"?r>=t:e==="max"?r<=t:r===t}function $D(r,t){return r.join(",")===t.join(",")}var Se=D,za=Z,Pd=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Ru(r){var t=r&&r.itemStyle;if(t)for(var e=0,n=Pd.length;e<n;e++){var i=Pd[e],a=t.normal,o=t.emphasis;a&&a[i]&&(process.env.NODE_ENV!=="production"&&Ht("itemStyle.normal."+i,i),r[i]=r[i]||{},r[i].normal?ct(r[i].normal,a[i]):r[i].normal=a[i],a[i]=null),o&&o[i]&&(process.env.NODE_ENV!=="production"&&Ht("itemStyle.emphasis."+i,"emphasis."+i),r[i]=r[i]||{},r[i].emphasis?ct(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function qt(r,t,e){if(r&&r[t]&&(r[t].normal||r[t].emphasis)){var n=r[t].normal,i=r[t].emphasis;n&&(process.env.NODE_ENV!=="production"&&We("'normal' hierarchy in "+t+" has been removed since 4.0. All style properties are configured in "+t+" directly now."),e?(r[t].normal=r[t].emphasis=null,_t(r[t],n)):r[t]=n),i&&(process.env.NODE_ENV!=="production"&&We(t+".emphasis has been changed to emphasis."+t+" since 4.0"),r.emphasis=r.emphasis||{},r.emphasis[t]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function va(r){qt(r,"itemStyle"),qt(r,"lineStyle"),qt(r,"areaStyle"),qt(r,"label"),qt(r,"labelLine"),qt(r,"upperLabel"),qt(r,"edgeLabel")}function Lt(r,t){var e=za(r)&&r[t],n=za(e)&&e.textStyle;if(n){process.env.NODE_ENV!=="production"&&We("textStyle hierarchy in "+t+" has been removed since 4.0. All textStyle properties are configured in "+t+" directly now.");for(var i=0,a=Lv.length;i<a;i++){var o=Lv[i];n.hasOwnProperty(o)&&(e[o]=n[o])}}}function Me(r){r&&(va(r),Lt(r,"label"),r.emphasis&&Lt(r.emphasis,"label"))}function UD(r){if(za(r)){Ru(r),va(r),Lt(r,"label"),Lt(r,"upperLabel"),Lt(r,"edgeLabel"),r.emphasis&&(Lt(r.emphasis,"label"),Lt(r.emphasis,"upperLabel"),Lt(r.emphasis,"edgeLabel"));var t=r.markPoint;t&&(Ru(t),Me(t));var e=r.markLine;e&&(Ru(e),Me(e));var n=r.markArea;n&&Me(n);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var a=r.links||r.edges;if(a&&!ie(a))for(var o=0;o<a.length;o++)Me(a[o]);D(r.categories,function(u){va(u)})}if(i&&!ie(i))for(var o=0;o<i.length;o++)Me(i[o]);if(t=r.markPoint,t&&t.data)for(var s=t.data,o=0;o<s.length;o++)Me(s[o]);if(e=r.markLine,e&&e.data)for(var l=e.data,o=0;o<l.length;o++)H(l[o])?(Me(l[o][0]),Me(l[o][1])):Me(l[o]);r.type==="gauge"?(Lt(r,"axisLabel"),Lt(r,"title"),Lt(r,"detail")):r.type==="treemap"?(qt(r.breadcrumb,"itemStyle"),D(r.levels,function(u){va(u)})):r.type==="tree"&&va(r.leaves)}}function lr(r){return H(r)?r:r?[r]:[]}function Rd(r){return(H(r)?r[0]:r)||{}}function YD(r,t){Se(lr(r.series),function(n){za(n)&&UD(n)});var e=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];t&&e.push("valueAxis","categoryAxis","logAxis","timeAxis"),Se(e,function(n){Se(lr(r[n]),function(i){i&&(Lt(i,"axisLabel"),Lt(i.axisPointer,"label"))})}),Se(lr(r.parallel),function(n){var i=n&&n.parallelAxisDefault;Lt(i,"axisLabel"),Lt(i&&i.axisPointer,"label")}),Se(lr(r.calendar),function(n){qt(n,"itemStyle"),Lt(n,"dayLabel"),Lt(n,"monthLabel"),Lt(n,"yearLabel")}),Se(lr(r.radar),function(n){Lt(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name,process.env.NODE_ENV!=="production"&&We("name property in radar component has been changed to axisName")),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap,process.env.NODE_ENV!=="production"&&We("nameGap property in radar component has been changed to axisNameGap")),process.env.NODE_ENV!=="production"&&Se(n.indicator,function(i){i.text&&Ht("text","name","radar.indicator")})}),Se(lr(r.geo),function(n){za(n)&&(Me(n),Se(lr(n.regions),function(i){Me(i)}))}),Se(lr(r.timeline),function(n){Me(n),qt(n,"label"),qt(n,"itemStyle"),qt(n,"controlStyle",!0);var i=n.data;H(i)&&D(i,function(a){Z(a)&&(qt(a,"label"),qt(a,"itemStyle"))})}),Se(lr(r.toolbox),function(n){qt(n,"iconStyle"),Se(n.feature,function(i){qt(i,"iconStyle")})}),Lt(Rd(r.axisPointer),"label"),Lt(Rd(r.tooltip).axisPointer,"label")}function jD(r,t){for(var e=t.split(","),n=r,i=0;i<e.length&&(n=n&&n[e[i]],n!=null);i++);return n}function ZD(r,t,e,n){for(var i=t.split(","),a=r,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];a[i[s]]==null&&(a[i[s]]=e)}function kd(r){r&&D(XD,function(t){t[0]in r&&!(t[1]in r)&&(r[t[1]]=r[t[0]])})}var XD=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],qD=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],ku=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function Yi(r){var t=r&&r.itemStyle;if(t)for(var e=0;e<ku.length;e++){var n=ku[e][1],i=ku[e][0];t[n]!=null&&(t[i]=t[n],process.env.NODE_ENV!=="production"&&Ht(n,i))}}function Od(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(process.env.NODE_ENV!=="production"&&Ht("label.margin","label.edgeDistance","pie"),r.edgeDistance=r.margin)}function Nd(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay,process.env.NODE_ENV!=="production"&&Ht("downplay","blur","sunburst"))}function KD(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(process.env.NODE_ENV!=="production"&&Ht("focusNodeAdjacency","emphasis: { focus: 'adjacency'}","graph/sankey"),r.emphasis.focus="adjacency"))}function c0(r,t){if(r)for(var e=0;e<r.length;e++)t(r[e]),r[e]&&c0(r[e].children,t)}function v0(r,t){YD(r,t),r.series=ne(r.series),D(r.series,function(e){if(Z(e)){var n=e.type;if(n==="line")e.clipOverflow!=null&&(e.clip=e.clipOverflow,process.env.NODE_ENV!=="production"&&Ht("clipOverflow","clip","line"));else if(n==="pie"||n==="gauge"){e.clockWise!=null&&(e.clockwise=e.clockWise,process.env.NODE_ENV!=="production"&&Ht("clockWise","clockwise")),Od(e.label);var i=e.data;if(i&&!ie(i))for(var a=0;a<i.length;a++)Od(i[a]);e.hoverOffset!=null&&(e.emphasis=e.emphasis||{},(e.emphasis.scaleSize=null)&&(process.env.NODE_ENV!=="production"&&Ht("hoverOffset","emphasis.scaleSize"),e.emphasis.scaleSize=e.hoverOffset))}else if(n==="gauge"){var o=jD(e,"pointer.color");o!=null&&ZD(e,"itemStyle.color",o)}else if(n==="bar"){Yi(e),Yi(e.backgroundStyle),Yi(e.emphasis);var i=e.data;if(i&&!ie(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(Yi(i[a]),Yi(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=e.highlightPolicy;s&&(e.emphasis=e.emphasis||{},e.emphasis.focus||(e.emphasis.focus=s,process.env.NODE_ENV!=="production"&&Ht("highlightPolicy","emphasis.focus","sunburst"))),Nd(e),c0(e.data,Nd)}else n==="graph"||n==="sankey"?KD(e):n==="map"&&(e.mapType&&!e.map&&(process.env.NODE_ENV!=="production"&&Ht("mapType","map","map"),e.map=e.mapType),e.mapLocation&&(process.env.NODE_ENV!=="production"&&We("`mapLocation` is not used anymore."),_t(e,e.mapLocation)));e.hoverAnimation!=null&&(e.emphasis=e.emphasis||{},e.emphasis&&e.emphasis.scale==null&&(process.env.NODE_ENV!=="production"&&Ht("hoverAnimation","emphasis.scale"),e.emphasis.scale=e.hoverAnimation)),kd(e)}}),r.dataRange&&(r.visualMap=r.dataRange),D(qD,function(e){var n=r[e];n&&(H(n)||(n=[n]),D(n,function(i){kd(i)}))})}function QD(r){var t=et();r.eachSeries(function(e){var n=e.get("stack");if(n){var i=t.get(n)||t.set(n,[]),a=e.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:e};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),t.each(JD)}function JD(r){D(r,function(t,e){var n=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,f,h){var c=o.get(t.stackedDimension,h);if(isNaN(c))return i;var v,d;s?d=o.getRawIndex(h):v=o.get(t.stackedByDimension,h);for(var p=NaN,g=e-1;g>=0;g--){var m=r[g];if(s||(d=m.data.rawIndexOf(m.stackedByDimension,v)),d>=0){var y=m.data.getByRawIndex(m.stackResultDimension,d);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&c>=0&&y>0||l==="samesign"&&c<=0&&y<0){c=bx(c,y),p=y;break}}}return n[0]=c,n[1]=p,n})})}var bl=(function(){function r(t){this.data=t.data||(t.sourceFormat===wr?{}:[]),this.sourceFormat=t.sourceFormat||o0,this.seriesLayoutBy=t.seriesLayoutBy||pr,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var n=0;n<e.length;n++){var i=e[n];i.type==null&&f0(this,n)===me.Must&&(i.type="ordinal")}}return r})();function gc(r){return r instanceof bl}function eh(r,t,e){e=e||p0(r);var n=t.seriesLayoutBy,i=eM(r,e,n,t.sourceHeader,t.dimensions),a=new bl({data:r,sourceFormat:e,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:lt(t)});return a}function d0(r){return new bl({data:r,sourceFormat:ie(r)?dr:Ne})}function tM(r){return new bl({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:lt(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function p0(r){var t=o0;if(ie(r))t=dr;else if(H(r)){r.length===0&&(t=de);for(var e=0,n=r.length;e<n;e++){var i=r[e];if(i!=null){if(H(i)||ie(i)){t=de;break}else if(Z(i)){t=ar;break}}}}else if(Z(r)){for(var a in r)if(In(r,a)&&ce(r[a])){t=wr;break}}return t}function eM(r,t,e,n,i){var a,o;if(!r)return{dimensionsDefine:Bd(i),startIndex:o,dimensionsDetectedCount:a};if(t===de){var s=r;n==="auto"||n==null?Fd(function(u){u!=null&&u!=="-"&&(G(u)?o==null&&(o=1):o=0)},e,s,10):o=St(n)?n:n?1:0,!i&&o===1&&(i=[],Fd(function(u,f){i[f]=u!=null?u+"":""},e,s,1/0)),a=i?i.length:e===Ri?s.length:s[0]?s[0].length:null}else if(t===ar)i||(i=rM(r));else if(t===wr)i||(i=[],D(r,function(u,f){i.push(f)}));else if(t===Ne){var l=qa(r[0]);a=H(l)&&l.length||1}else t===dr&&process.env.NODE_ENV!=="production"&&nt(!!i,"dimensions must be given if data is TypedArray.");return{startIndex:o,dimensionsDefine:Bd(i),dimensionsDetectedCount:a}}function rM(r){for(var t=0,e;t<r.length&&!(e=r[t++]););if(e)return Ct(e)}function Bd(r){if(r){var t=et();return X(r,function(e,n){e=Z(e)?e:{name:e};var i={name:e.name,displayName:e.displayName,type:e.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=t.get(i.name);return a?i.name+="-"+a.count++:t.set(i.name,{count:1}),i})}}function Fd(r,t,e,n){if(t===Ri)for(var i=0;i<e.length&&i<n;i++)r(e[i]?e[i][0]:null,i);else for(var a=e[0]||[],i=0;i<a.length&&i<n;i++)r(a[i],i)}function g0(r){var t=r.sourceFormat;return t===ar||t===wr}var hn,cn,vn,zd,Vd,m0=(function(){function r(t,e){var n=gc(t)?t:d0(t);this._source=n;var i=this._data=n.data;if(n.sourceFormat===dr){if(process.env.NODE_ENV!=="production"&&e==null)throw new Error("Typed array data must specify dimension size");this._offset=0,this._dimSize=e,this._data=i}Vd(this,i,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(t,e){},r.prototype.appendData=function(t){},r.prototype.clean=function(){},r.protoInitialize=(function(){var t=r.prototype;t.pure=!1,t.persistent=!0})(),r.internalField=(function(){var t;Vd=function(o,s,l){var u=l.sourceFormat,f=l.seriesLayoutBy,h=l.startIndex,c=l.dimensionsDefine,v=zd[mc(u,f)];if(process.env.NODE_ENV!=="production"&&nt(v,"Invalide sourceFormat: "+u),B(o,v),u===dr)o.getItem=e,o.count=i,o.fillStorage=n;else{var d=y0(u,f);o.getItem=tt(d,null,s,h,c);var p=_0(u,f);o.count=tt(p,null,s,h,c)}};var e=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,f=u*o,h=0;h<u;h++)s[h]=l[f+h];return s},n=function(o,s,l,u){for(var f=this._data,h=this._dimSize,c=0;c<h;c++){for(var v=u[c],d=v[0]==null?1/0:v[0],p=v[1]==null?-1/0:v[1],g=s-o,m=l[c],y=0;y<g;y++){var _=f[y*h+c];m[o+y]=_,_<d&&(d=_),_>p&&(p=_)}v[0]=d,v[1]=p}},i=function(){return this._data?this._data.length/this._dimSize:0};zd=(t={},t[de+"_"+pr]={pure:!0,appendData:a},t[de+"_"+Ri]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[ar]={pure:!0,appendData:a},t[wr]={pure:!0,appendData:function(o){var s=this._data;D(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},t[Ne]={appendData:a},t[dr]={persistent:!1,pure:!0,appendData:function(o){process.env.NODE_ENV!=="production"&&nt(ie(o),"Added data must be TypedArray if data in initialization is TypedArray"),this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}})(),r})(),Hd=function(r,t,e,n){return r[n]},nM=(hn={},hn[de+"_"+pr]=function(r,t,e,n){return r[n+t]},hn[de+"_"+Ri]=function(r,t,e,n,i){n+=t;for(var a=i||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},hn[ar]=Hd,hn[wr]=function(r,t,e,n,i){for(var a=i||[],o=0;o<e.length;o++){var s=e[o].name;if(process.env.NODE_ENV!=="production"&&s==null)throw new Error;var l=r[s];a[o]=l?l[n]:null}return a},hn[Ne]=Hd,hn);function y0(r,t){var e=nM[mc(r,t)];return process.env.NODE_ENV!=="production"&&nt(e,'Do not support get item on "'+r+'", "'+t+'".'),e}var Wd=function(r,t,e){return r.length},iM=(cn={},cn[de+"_"+pr]=function(r,t,e){return Math.max(0,r.length-t)},cn[de+"_"+Ri]=function(r,t,e){var n=r[0];return n?Math.max(0,n.length-t):0},cn[ar]=Wd,cn[wr]=function(r,t,e){var n=e[0].name;if(process.env.NODE_ENV!=="production"&&n==null)throw new Error;var i=r[n];return i?i.length:0},cn[Ne]=Wd,cn);function _0(r,t){var e=iM[mc(r,t)];return process.env.NODE_ENV!=="production"&&nt(e,'Do not support count on "'+r+'", "'+t+'".'),e}var Ou=function(r,t,e){return r[t]},aM=(vn={},vn[de]=Ou,vn[ar]=function(r,t,e){return r[e]},vn[wr]=Ou,vn[Ne]=function(r,t,e){var n=qa(r);return n instanceof Array?n[t]:n},vn[dr]=Ou,vn);function w0(r){var t=aM[r];return process.env.NODE_ENV!=="production"&&nt(t,'Do not support get value on "'+r+'".'),t}function mc(r,t){return r===de?r+"_"+t:r}function Ti(r,t,e){if(r){var n=r.getRawDataItem(t);if(n!=null){var i=r.getStore(),a=i.getSource().sourceFormat;if(e!=null){var o=r.getDimensionIndex(e),s=i.getDimensionProperty(o);return w0(a)(n,o,s)}else{var l=n;return a===Ne&&(l=qa(n)),l}}}}var oM=/\{@(.+?)\}/g,sM=(function(){function r(){}return r.prototype.getDataParams=function(t,e){var n=this.getData(e),i=this.getRawValue(t,e),a=n.getRawIndex(t),o=n.getName(t),s=n.getRawDataItem(t),l=n.getItemVisual(t,"style"),u=l&&l[n.getItemVisual(t,"drawType")||"fill"],f=l&&l.stroke,h=this.mainType,c=h==="series",v=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:c?this.subType:null,seriesIndex:this.seriesIndex,seriesId:c?this.id:null,seriesName:c?this.name:null,name:o,dataIndex:a,data:s,dataType:e,value:i,color:u,borderColor:f,dimensionNames:v?v.fullDimensions:null,encode:v?v.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(t,e,n,i,a,o){e=e||"normal";var s=this.getData(n),l=this.getDataParams(t,n);if(o&&(l.value=o.interpolatedValue),i!=null&&H(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(t);a=u.get(e==="normal"?["label","formatter"]:[e,"label","formatter"])}if(Q(a))return l.status=e,l.dimensionIndex=i,a(l);if(G(a)){var f=i0(a,l);return f.replace(oM,function(h,c){var v=c.length,d=c;d.charAt(0)==="["&&d.charAt(v-1)==="]"&&(d=+d.slice(1,v-1),process.env.NODE_ENV!=="production"&&isNaN(d)&&Qt("Invalide label formatter: @"+c+", only support @[0], @[1], @[2], ..."));var p=Ti(s,t,d);if(o&&H(o.interpolatedValue)){var g=s.getDimensionIndex(d);g>=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return Ti(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,n){},r})();function Gd(r){var t,e;return Z(r)?r.type?e=r:process.env.NODE_ENV!=="production"&&console.warn("The return type of `formatTooltip` is not supported: "+_s(r)):t=r,{text:t,frag:e}}function Da(r){return new lM(r)}var lM=(function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,n=t&&t.skip;if(this._dirty&&e){var i=this.context;i.data=i.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(a="reset");function f(y){return!(y>=1)&&(y=1),y}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var c=t&&t.step;if(e?(process.env.NODE_ENV!=="production"&&nt(e._outputDueEnd!=null),this._dueEnd=e._outputDueEnd):(process.env.NODE_ENV!=="production"&&nt(!this._progress||this._count),this._dueEnd=this._count?this._count(this.context):1/0),this._progress){var v=this._dueIndex,d=Math.min(c!=null?this._dueIndex+c:1/0,this._dueEnd);if(!n&&(h||v<d)){var p=this._progress;if(H(p))for(var g=0;g<p.length;g++)this._doProgress(p[g],v,d,l,u);else this._doProgress(p,v,d,l,u)}this._dueIndex=d;var m=this._settedOutputEnd!=null?this._settedOutputEnd:d;process.env.NODE_ENV!=="production"&&nt(m>=this._outputDueEnd),this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(t,e,n,i,a){$d.reset(e,n,i,a),this._callingProgress=t,this._callingProgress({start:e,end:n,count:n-e,next:$d.next},this.context)},r.prototype._doReset=function(t){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var e,n;!t&&this._reset&&(e=this._reset(this.context),e&&e.progress&&(n=e.forceFirstProgress,e=e.progress),H(e)&&!e.length&&(e=null)),this._progress=e,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(t){process.env.NODE_ENV!=="production"&&nt(t&&!t._disposed&&t!==this),(this._downstream!==t||this._dirty)&&(this._downstream=t,t._upstream=this,t.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(t){this._outputDueEnd=this._settedOutputEnd=t},r})(),$d=(function(){var r,t,e,n,i,a={reset:function(l,u,f,h){t=l,r=u,e=f,n=h,i=Math.ceil(n/e),a.next=e>1&&n>0?s:o}};return a;function o(){return t<r?t++:null}function s(){var l=t%i*e+Math.ceil(t/i),u=t>=r?null:l<n?l:t;return t++,u}})();function is(r,t){var e=t&&t.type;return e==="ordinal"?r:(e==="time"&&!St(r)&&r!=null&&r!=="-"&&(r=+gr(r)),r==null||r===""?NaN:Number(r))}et({number:function(r){return parseFloat(r)},time:function(r){return+gr(r)},trim:function(r){return G(r)?Qe(r):r}});var uM=(function(){function r(t,e){var n=t==="desc";this._resultLT=n?1:-1,e==null&&(e=n?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var n=St(t)?t:ys(t),i=St(e)?e:ys(e),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=G(t),l=G(e);s&&(n=l?t:0),l&&(i=s?e:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},r})(),fM=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return is(t,e)},r})();function hM(r,t){var e=new fM,n=r.data,i=e.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==pr&&(process.env.NODE_ENV!=="production"&&(o='`seriesLayoutBy` of upstream dataset can only be "column" in data transform.'),ue(o));var s=[],l={},u=r.dimensionsDefine;if(u)D(u,function(p,g){var m=p.name,y={index:g,name:m,displayName:p.displayName};if(s.push(y),m!=null){var _="";In(l,m)&&(process.env.NODE_ENV!=="production"&&(_='dimension name "'+m+'" duplicated.'),ue(_)),l[m]=y}});else for(var f=0;f<r.dimensionsDetectedCount;f++)s.push({index:f});var h=y0(i,pr);t.__isBuiltIn&&(e.getRawDataItem=function(p){return h(n,a,s,p)},e.getRawData=tt(cM,null,r)),e.cloneRawData=tt(vM,null,r);var c=_0(i,pr);e.count=tt(c,null,n,a,s);var v=w0(i);e.retrieveValue=function(p,g){var m=h(n,a,s,p);return d(m,g)};var d=e.retrieveValueFromItem=function(p,g){if(p!=null){var m=s[g];if(m)return v(p,g,m.name)}};return e.getDimensionInfo=tt(dM,null,s,l),e.cloneAllDimensionInfo=tt(pM,null,s),e}function cM(r){var t=r.sourceFormat;if(!yc(t)){var e="";process.env.NODE_ENV!=="production"&&(e="`getRawData` is not supported in source format "+t),ue(e)}return r.data}function vM(r){var t=r.sourceFormat,e=r.data;if(!yc(t)){var n="";process.env.NODE_ENV!=="production"&&(n="`cloneRawData` is not supported in source format "+t),ue(n)}if(t===de){for(var i=[],a=0,o=e.length;a<o;a++)i.push(e[a].slice());return i}else if(t===ar){for(var i=[],a=0,o=e.length;a<o;a++)i.push(B({},e[a]));return i}}function dM(r,t,e){if(e!=null){if(St(e)||!isNaN(e)&&!In(t,e))return r[e];if(In(t,e))return t[e]}}function pM(r){return lt(r)}var b0=et();function gM(r){r=lt(r);var t=r.type,e="";t||(process.env.NODE_ENV!=="production"&&(e="Must have a `type` when `registerTransform`."),ue(e));var n=t.split(":");n.length!==2&&(process.env.NODE_ENV!=="production"&&(e='Name must include namespace like "ns:regression".'),ue(e));var i=!1;n[0]==="echarts"&&(t=n[1],i=!0),r.__isBuiltIn=i,b0.set(t,r)}function mM(r,t,e){var n=ne(r),i=n.length,a="";i||(process.env.NODE_ENV!=="production"&&(a="If `transform` declared, it should at least contain one transform."),ue(a));for(var o=0,s=i;o<s;o++){var l=n[o];t=yM(l,t,e,i===1?null:o),o!==s-1&&(t.length=Math.max(t.length,1))}return t}function yM(r,t,e,n){var i="";t.length||(process.env.NODE_ENV!=="production"&&(i="Must have at least one upstream dataset."),ue(i)),Z(r)||(process.env.NODE_ENV!=="production"&&(i="transform declaration must be an object rather than "+typeof r+"."),ue(i));var a=r.type,o=b0.get(a);o||(process.env.NODE_ENV!=="production"&&(i='Can not find transform on type "'+a+'".'),ue(i));var s=X(t,function(f){return hM(f,o)}),l=ne(o.transform({upstream:s[0],upstreamList:s,config:lt(r.config)}));if(process.env.NODE_ENV!=="production"&&r.print){var u=X(l,function(f){var h=n!=null?" === pipe index: "+n:"";return["=== dataset index: "+e.datasetIndex+h+" ===","- transform result data:",_s(f.data),"- transform result dimensions:",_s(f.dimensions)].join(`
|
|
34
|
+
`)}).join(`
|
|
35
|
+
`);Dx(u)}return X(l,function(f,h){var c="";Z(f)||(process.env.NODE_ENV!=="production"&&(c="A transform should not return some empty results."),ue(c)),f.data||(process.env.NODE_ENV!=="production"&&(c="Transform result data should be not be null or undefined"),ue(c));var v=p0(f.data);yc(v)||(process.env.NODE_ENV!=="production"&&(c="Transform result data should be array rows or object rows."),ue(c));var d,p=t[0];if(p&&h===0&&!f.dimensions){var g=p.startIndex;g&&(f.data=p.data.slice(0,g).concat(f.data)),d={seriesLayoutBy:pr,sourceHeader:g,dimensions:p.metaRawOption.dimensions}}else d={seriesLayoutBy:pr,sourceHeader:0,dimensions:f.dimensions};return eh(f.data,d,null)})}function yc(r){return r===de||r===ar}var Sl="undefined",_M=typeof Uint32Array===Sl?Array:Uint32Array,wM=typeof Uint16Array===Sl?Array:Uint16Array,S0=typeof Int32Array===Sl?Array:Int32Array,Ud=typeof Float64Array===Sl?Array:Float64Array,x0={float:Ud,int:S0,ordinal:Array,number:Array,time:Ud},Nu;function jn(r){return r>65535?_M:wM}function Zn(){return[1/0,-1/0]}function bM(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function Yd(r,t,e,n,i){var a=x0[e||"float"];if(i){var o=r[t],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];r[t]=l}}else r[t]=new a(n)}var rh=(function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=et()}return r.prototype.initData=function(t,e,n){process.env.NODE_ENV!=="production"&&nt(Q(t.getItem)&&Q(t.count),"Invalid data provider."),this._provider=t,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=t.getSource(),a=this.defaultDimValueGetter=Nu[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[];var o=g0(i);this._dimensions=X(e,function(s){return process.env.NODE_ENV!=="production"&&o&&nt(s.property!=null),{type:s.type,property:s.property}}),this._initDataFromProvider(0,t.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(t,e){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(t);if(a!=null){if(i[a].type===e)return a}else a=i.length;return i[a]={type:e},n.set(t,a),this._chunks[a]=new x0[e||"float"](this._rawCount),this._rawExtent[a]=Zn(),a},r.prototype.collectOrdinalMeta=function(t,e){var n=this._chunks[t],i=this._dimensions[t],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[t]=Zn());for(var l=a[t],u=o;u<s;u++){var f=n[u]=e.parseAndCollect(n[u]);isNaN(f)||(l[0]=Math.min(f,l[0]),l[1]=Math.max(f,l[1]))}i.ordinalMeta=e,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(t){var e=this._dimensions[t],n=e.ordinalMeta;return n},r.prototype.getDimensionProperty=function(t){var e=this._dimensions[t];return e&&e.property},r.prototype.appendData=function(t){process.env.NODE_ENV!=="production"&&nt(!this._indices,"appendData can only be called on raw data.");var e=this._provider,n=this.count();e.appendData(t);var i=e.count();return e.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},r.prototype.appendValues=function(t,e){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(t.length,e||0),u=0;u<a;u++){var f=i[u];Yd(n,u,f.type,l,!0)}for(var h=[],c=s;c<l;c++)for(var v=c-s,d=0;d<a;d++){var f=i[d],p=Nu.arrayRows.call(this,t[v]||h,f.property,v,d);n[d][c]=p;var g=o[d];p<g[0]&&(g[0]=p),p>g[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=X(o,function(y){return y.property}),f=0;f<s;f++){var h=o[f];l[f]||(l[f]=Zn()),Yd(a,f,h.type,e,n)}if(i.fillStorage)i.fillStorage(t,e,a,l);else for(var c=[],v=t;v<e;v++){c=i.getItem(v,c);for(var d=0;d<s;d++){var p=a[d],g=this._dimValueGetter(c,u[d],v,d);p[v]=g;var m=l[d];g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}!i.persistent&&i.clean&&i.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e<this._count))return NaN;var n=this._chunks[t];return n?n[this.getRawIndex(e)]:NaN},r.prototype.getValues=function(t,e){var n=[],i=[];if(e==null){e=t,t=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=t;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],e));return n},r.prototype.getByRawIndex=function(t,e){if(!(e>=0&&e<this._rawCount))return NaN;var n=this._chunks[t];return n?n[e]:NaN},r.prototype.getSum=function(t){var e=this._chunks[t],n=0;if(e)for(var i=0,a=this.count();i<a;i++){var o=this.get(t,i);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(t){var e=[];this.each([t],function(a){isNaN(a)||e.push(a)});var n=e.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},r.prototype.indexOfRawIndex=function(t){if(t>=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,n=e[t];if(n!=null&&n<this._count&&n===t)return t;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(e[o]<t)i=o+1;else if(e[o]>t)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(t,e,n){var i=this._chunks,a=i[t],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f<h;f++){var c=this.getRawIndex(f),v=e-a[c],d=Math.abs(v);d<=n&&((d<s||d===s&&v>=0&&l<0)&&(s=d,l=v,u=0),v===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var n=e.constructor,i=this._count;if(n===Array){t=new n(i);for(var a=0;a<i;a++)t[a]=e[a]}else t=new n(e.buffer,0,i)}else{var n=jn(this._rawCount);t=new n(this.count());for(var a=0;a<t.length;a++)t[a]=a}return t},r.prototype.filter=function(t,e){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=jn(n._rawCount),o=new a(i),s=[],l=t.length,u=0,f=t[0],h=n._chunks,c=0;c<i;c++){var v=void 0,d=n.getRawIndex(c);if(l===0)v=e(c);else if(l===1){var p=h[f][d];v=e(p,c)}else{for(var g=0;g<l;g++)s[g]=h[t[g]][d];s[g]=c,v=e.apply(null,s)}v&&(o[u++]=d)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(t){var e=this.clone(),n=e._count;if(!n)return this;var i=Ct(t),a=i.length;if(!a)return this;var o=e.count(),s=jn(e._rawCount),l=new s(o),u=0,f=i[0],h=t[f][0],c=t[f][1],v=e._chunks,d=!1;if(!e._indices){var p=0;if(a===1){for(var g=v[i[0]],m=0;m<n;m++){var y=g[m];(y>=h&&y<=c||isNaN(y))&&(l[u++]=p),p++}d=!0}else if(a===2){for(var g=v[i[0]],_=v[i[1]],w=t[i[1]][0],b=t[i[1]][1],m=0;m<n;m++){var y=g[m],S=_[m];(y>=h&&y<=c||isNaN(y))&&(S>=w&&S<=b||isNaN(S))&&(l[u++]=p),p++}d=!0}}if(!d)if(a===1)for(var m=0;m<o;m++){var x=e.getRawIndex(m),y=v[i[0]][x];(y>=h&&y<=c||isNaN(y))&&(l[u++]=x)}else for(var m=0;m<o;m++){for(var T=!0,x=e.getRawIndex(m),M=0;M<a;M++){var A=i[M],y=v[A][x];(y<t[A][0]||y>t[A][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(m))}return u<o&&(e._indices=l),e._count=u,e._extent=[],e._updateGetRawIdx(),e},r.prototype.map=function(t,e){var n=this.clone(t);return this._updateDims(n,t,e),n},r.prototype.modify=function(t,e){this._updateDims(this,t,e)},r.prototype._updateDims=function(t,e,n){for(var i=t._chunks,a=[],o=e.length,s=t.count(),l=[],u=t._rawExtent,f=0;f<e.length;f++)u[e[f]]=Zn();for(var h=0;h<s;h++){for(var c=t.getRawIndex(h),v=0;v<o;v++)l[v]=i[e[v]][c];l[o]=h;var d=n&&n.apply(null,l);if(d!=null){typeof d!="object"&&(a[0]=d,d=a);for(var f=0;f<d.length;f++){var p=e[f],g=d[f],m=u[p],y=i[p];y&&(y[c]=g),g<m[0]&&(m[0]=g),g>m[1]&&(m[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var n=this.clone([t],!0),i=n._chunks,a=i[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),f,h,c,v=new(jn(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));v[s++]=u;for(var d=1;d<o-1;d+=l){for(var p=Math.min(d+l,o-1),g=Math.min(d+l*2,o),m=(g+p)/2,y=0,_=p;_<g;_++){var w=this.getRawIndex(_),b=a[w];isNaN(b)||(y+=b)}y/=g-p;var S=d,x=Math.min(d+l,o),T=d-1,M=a[u];f=-1,c=S;for(var A=-1,C=0,_=S;_<x;_++){var w=this.getRawIndex(_),b=a[w];if(isNaN(b)){C++,A<0&&(A=w);continue}h=Math.abs((T-m)*(b-M)-(T-_)*(y-M)),h>f&&(f=h,c=w)}C>0&&C<x-S&&(v[s++]=Math.min(A,c),c=Math.max(A,c)),v[s++]=c,u=c}return v[s++]=this.getRawIndex(o-1),n._count=s,n._indices=v,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(t,e){for(var n=this.clone([t],!0),i=n._chunks,a=Math.floor(1/e),o=i[t],s=this.count(),l=new(jn(this._rawCount))(Math.ceil(s/a)*2),u=0,f=0;f<s;f+=a){var h=f,c=o[this.getRawIndex(h)],v=f,d=o[this.getRawIndex(v)],p=a;f+a>s&&(p=s-f);for(var g=0;g<p;g++){var m=this.getRawIndex(f+g),y=o[m];y<c&&(c=y,h=f+g),y>d&&(d=y,v=f+g)}var _=this.getRawIndex(h),w=this.getRawIndex(v);h<v?(l[u++]=_,l[u++]=w):(l[u++]=w,l[u++]=_)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(t,e,n,i){for(var a=this.clone([t],!0),o=a._chunks,s=[],l=Math.floor(1/e),u=o[t],f=this.count(),h=a._rawExtent[t]=Zn(),c=new(jn(this._rawCount))(Math.ceil(f/l)),v=0,d=0;d<f;d+=l){l>f-d&&(l=f-d,s.length=l);for(var p=0;p<l;p++){var g=this.getRawIndex(d+p);s[p]=u[g]}var m=n(s),y=this.getRawIndex(Math.min(d+i(s,m)||0,f-1));u[y]=m,m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m),c[v++]=y}return a._count=v,a._indices=c,a._updateGetRawIdx(),a},r.prototype.each=function(t,e){if(this._count)for(var n=t.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:e(a);break;case 1:e(i[t[0]][s],a);break;case 2:e(i[t[0]][s],i[t[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[t[l]][s];u[l]=a,e.apply(null,u)}}},r.prototype.getDataExtent=function(t){var e=this._chunks[t],n=Zn();if(!e)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[t].slice();if(o=this._extent[t],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var f=this.getRawIndex(u),h=e[f];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][e]);return n},r.prototype.clone=function(t,e){var n=new r,i=this._chunks,a=t&&Ei(t,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?bM(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),e||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(t){t._count=this._count,t._rawCount=this._rawCount,t._provider=this._provider,t._dimensions=this._dimensions,t._extent=lt(this._extent),t._rawExtent=lt(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var t=this._indices.constructor,e=void 0;if(t===Array){var n=this._indices.length;e=new t(n);for(var i=0;i<n;i++)e[i]=this._indices[i]}else e=new t(this._indices);return e}return null},r.prototype._getRawIdxIdentity=function(t){return t},r.prototype._getRawIdx=function(t){return t<this._count&&t>=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function t(e,n,i,a){return is(e[a],this._dimensions[a])}Nu={arrayRows:t,objectRows:function(e,n,i,a){return is(e[n],this._dimensions[a])},keyedColumns:t,original:function(e,n,i,a){var o=e&&(e.value==null?e:e.value);return is(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(e,n,i,a){return e[a]}}})(),r})(),SM=(function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var t=this._sourceHost,e=this._getUpstreamSourceManagers(),n=!!e.length,i,a;if(ji(t)){var o=t,s=void 0,l=void 0,u=void 0;if(n){var f=e[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,a=[f._getVersionSign()]}else s=o.get("data",!0),l=ie(s)?dr:Ne,a=[];var h=this._getSourceMetaRawOption()||{},c=u&&u.metaRawOption||{},v=rt(h.seriesLayoutBy,c.seriesLayoutBy)||null,d=rt(h.sourceHeader,c.sourceHeader),p=rt(h.dimensions,c.dimensions),g=v!==c.seriesLayoutBy||!!d!=!!c.sourceHeader||p;i=g?[eh(s,{seriesLayoutBy:v,sourceHeader:d,dimensions:p},l)]:[]}else{var m=t;if(n){var y=this._applyTransform(e);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[eh(_,this._getSourceMetaRawOption(),null)],a=[]}}process.env.NODE_ENV!=="production"&&nt(i&&a),this._setLocalSource(i,a)},r.prototype._applyTransform=function(t){var e=this._sourceHost,n=e.get("transform",!0),i=e.get("fromTransformResult",!0);if(process.env.NODE_ENV!=="production"&&nt(i!=null||n!=null),i!=null){var a="";t.length!==1&&(process.env.NODE_ENV!=="production"&&(a="When using `fromTransformResult`, there should be only one upstream dataset"),jd(a))}var o,s=[],l=[];return D(t,function(u){u.prepareSource();var f=u.getSource(i||0),h="";i!=null&&!f&&(process.env.NODE_ENV!=="production"&&(h="Can not retrieve result by `fromTransformResult`: "+i),jd(h)),s.push(f),l.push(u._getVersionSign())}),n?o=mM(n,s,{datasetIndex:e.componentIndex}):i!=null&&(o=[tM(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e<t.length;e++){var n=t[e];if(n._isDirty()||this._upstreamSignList[e]!==n._getVersionSign())return!0}},r.prototype.getSource=function(t){t=t||0;var e=this._sourceList[t];if(!e){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(t)}return e},r.prototype.getSharedDataStore=function(t){process.env.NODE_ENV!=="production"&&nt(ji(this._sourceHost),"Can only call getDataStore on series source manager.");var e=t.makeStoreSchema();return this._innerGetDataStore(e.dimensions,t.source,e.hash)},r.prototype._innerGetDataStore=function(t,e,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];ji(this._sourceHost)&&l?s=l._innerGetDataStore(t,e,n):(s=new rh,s.initData(new m0(e,t.length),t)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var t=this._sourceHost;if(ji(t)){var e=u0(t);return e?[e.getSourceManager()]:[]}else return X(DD(t),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var t=this._sourceHost,e,n,i;if(ji(t))e=t.get("seriesLayoutBy",!0),n=t.get("sourceHeader",!0),i=t.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=t;e=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:e,sourceHeader:n,dimensions:i}},r})();function ji(r){return r.mainType==="series"}function jd(r){throw new Error(r)}var xM="line-height:1";function C0(r){var t=r.lineHeight;return t==null?xM:"line-height:"+se(t+"")+"px"}function T0(r,t){var e=r.color||"#6e7079",n=r.fontSize||12,i=r.fontWeight||"400",a=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return t==="html"?{nameStyle:"font-size:"+se(n+"")+"px;color:"+se(e)+";font-weight:"+se(i+""),valueStyle:"font-size:"+se(o+"")+"px;color:"+se(a)+";font-weight:"+se(s+"")}:{nameStyle:{fontSize:n,fill:e,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var CM=[0,10,20,30],TM=["",`
|
|
36
|
+
`,`
|
|
37
|
+
|
|
38
|
+
`,`
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
`];function Va(r,t){return t.type=r,t}function nh(r){return r.type==="section"}function D0(r){return nh(r)?DM:MM}function M0(r){if(nh(r)){var t=0,e=r.blocks.length,n=e>1||e>0&&!r.noHeader;return D(r.blocks,function(i){var a=M0(i);a>=t&&(t=a+ +(n&&(!a||nh(i)&&!i.noHeader)))}),t}return 0}function DM(r,t,e,n){var i=t.noHeader,a=AM(M0(t)),o=[],s=t.blocks||[];nt(!s||H(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(In(u,l)){var f=new uM(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}D(s,function(p,g){var m=t.valueFormatter,y=D0(p)(m?B(B({},r),{valueFormatter:m}):r,p,g>0?a.html:0,n);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(a.richText):ih(n,o.join(""),i?e:a.html);if(i)return h;var c=Jf(t.header,"ordinal",r.useUTC),v=T0(n,r.renderMode).nameStyle,d=C0(n);return r.renderMode==="richText"?A0(r,c,v)+a.richText+h:ih(n,'<div style="'+v+";"+d+';">'+se(c)+"</div>"+h,e)}function MM(r,t,e,n){var i=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(w){return w=H(w)?w:[w],X(w,function(b,S){return Jf(b,H(v)?v[S]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",i),c=a?"":Jf(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!a,g=!s&&a,m=T0(n,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":h)+(a?"":A0(r,c,y))+(o?"":LM(r,d,p,g,_)):ih(n,(s?"":h)+(a?"":IM(c,!s,y))+(o?"":EM(d,p,g,_)),e)}}function Zd(r,t,e,n,i,a){if(r){var o=D0(r),s={useUTC:i,renderMode:e,orderMode:n,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function AM(r){return{html:CM[r],richText:TM[r]}}function ih(r,t,e){var n='<div style="clear:both"></div>',i="margin: "+e+"px 0 0",a=C0(r);return'<div style="'+i+";"+a+';">'+t+n+"</div>"}function IM(r,t,e){var n=t?"margin-left:2px":"";return'<span style="'+e+";"+n+'">'+se(r)+"</span>"}function EM(r,t,e,n){var i=e?"10px":"20px",a=t?"float:right;margin-left:"+i:"";return r=H(r)?r:[r],'<span style="'+a+";"+n+'">'+X(r,function(o){return se(o)}).join(" ")+"</span>"}function A0(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function LM(r,t,e,n,i){var a=[i],o=n?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(H(t)?t.join(" "):t,a)}function PM(r,t){var e=r.getData().getItemVisual(t,"style"),n=e[r.visualDrawType];return Pn(n)}function I0(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var Bu=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=ay()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,n){var i=n==="richText"?this._generateStyleName():null,a=_D({color:e,type:t,renderMode:n,markerId:i});return G(a)?a:(process.env.NODE_ENV!=="production"&&nt(i),this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var n={};H(e)?D(e,function(a){return B(n,a)}):B(n,e);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+t+"}"},r})();function RM(r){var t=r.series,e=r.dataIndex,n=r.multipleSeries,i=t.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=H(s),u=PM(t,e),f,h,c,v;if(o>1||l&&!o){var d=kM(s,t,e,a,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var p=i.getDimensionInfo(a[0]);v=f=Ti(i,e,a[0]),h=p.type}else v=f=l?s[0]:s;var g=jh(t),m=g&&t.name||"",y=i.getName(e),_=n?m:y;return Va("section",{header:m,noHeader:n||!g,sortParam:v,blocks:[Va("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Qe(_),value:f,valueType:h,dataIndex:e})].concat(c||[])})}function kM(r,t,e,n,i){var a=t.getData(),o=Ei(r,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];n.length?D(n,function(h){f(Ti(a,e,h),h)}):D(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(Va("nameValue",{markerType:"subItem",markerColor:i,name:v.displayName,value:h,valueType:v.type})):(s.push(h),l.push(v.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Tr=Ot();function Io(r,t){return r.getName(t)||r.getId(t)}var OM="__universalTransitionEnabled",ke=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,n,i){this.seriesIndex=this.componentIndex,this.dataTask=Da({count:BM,reset:FM}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,i);var a=Tr(this).sourceManager=new SM(this);a.prepareSource();var o=this.getInitialData(e,i);qd(o,this),this.dataTask.context.data=o,process.env.NODE_ENV!=="production"&&nt(o,"getInitialData returned invalid data."),Tr(this).dataBeforeProcessed=o,Xd(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,n){var i=Fa(this),a=i?to(e):{},o=this.subType;ht.hasClass(o)&&(o+="Series"),ct(e,n.getTheme().get(this.subType)),ct(e,this.getDefaultOption()),Ev(e,"label",["show"]),this.fillDataTextStyle(e.data),i&&Ci(e,a,i)},t.prototype.mergeOption=function(e,n){e=ct(this.option,e,!0),this.fillDataTextStyle(e.data);var i=Fa(this);i&&Ci(this.option,e,i);var a=Tr(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(e,n);qd(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Tr(this).dataBeforeProcessed=o,Xd(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!ie(e))for(var n=["show"],i=0;i<e.length;i++)e[i]&&e[i].label&&Ev(e[i],"label",n)},t.prototype.getInitialData=function(e,n){},t.prototype.appendData=function(e){var n=this.getRawData();n.appendData(e.data)},t.prototype.getData=function(e){var n=ah(this);if(n){var i=n.context.data;return e==null||!i.getLinkedData?i:i.getLinkedData(e)}else return Tr(this).data},t.prototype.getAllData=function(){var e=this.getData();return e&&e.getLinkedDataAll?e.getLinkedDataAll():[{data:e}]},t.prototype.setData=function(e){var n=ah(this);if(n){var i=n.context;i.outputData=e,n!==this.dataTask&&(i.data=e)}Tr(this).data=e},t.prototype.getEncode=function(){var e=this.get("encode",!0);if(e)return et(e)},t.prototype.getSourceManager=function(){return Tr(this).sourceManager},t.prototype.getSource=function(){return this.getSourceManager().getSource()},t.prototype.getRawData=function(){return Tr(this).dataBeforeProcessed},t.prototype.getColorBy=function(){var e=this.get("colorBy");return e||"series"},t.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},t.prototype.getBaseAxis=function(){var e=this.coordinateSystem;return e&&e.getBaseAxis&&e.getBaseAxis()},t.prototype.formatTooltip=function(e,n,i){return RM({series:this,dataIndex:e,multipleSeries:n})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(K.node&&!(e&&e.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,n,i){var a=this.ecModel,o=vc.prototype.getColorFromPalette.call(this,e,n,i);return o||(o=a.getColorFromPalette(e,n,i)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,n){this._innerSelect(this.getData(n),e)},t.prototype.unselect=function(e,n){var i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<e.length;s++){var l=e[s],u=Io(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},t.prototype.toggleSelect=function(e,n){for(var i=[],a=0;a<e.length;a++)i[0]=e[a],this.isSelected(e[a],n)?this.unselect(i,n):this.select(i,n)},t.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var e=this._selectedDataIndicesMap,n=Ct(e),i=[],a=0;a<n.length;a++){var o=e[n[a]];o>=0&&i.push(o)}return i},t.prototype.isSelected=function(e,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[Io(a,e)])&&!a.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[OM])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Z(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f<l;f++){var h=n[f],c=Io(e,h);u[c]=!0,this._selectedDataIndicesMap[c]=e.getRawIndex(h)}}else if(s==="single"||s===!0){var v=n[l-1],c=Io(e,v);o.selectedMap=(i={},i[c]=!0,i),this._selectedDataIndicesMap=(a={},a[c]=e.getRawIndex(v),a)}}},t.prototype._initSelectedMapFromData=function(e){if(!this.option.selectedMap){var n=[];e.hasItemOption&&e.each(function(i){var a=e.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(e,n)}},t.registerClass=function(e){return ht.registerClass(e)},t.protoInitialize=(function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"})(),t})(ht);$e(ke,sM);$e(ke,vc);hy(ke,ht);function Xd(r){var t=r.name;jh(r)||(r.name=NM(r)||t)}function NM(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),n=[];return D(e,function(i){var a=t.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function BM(r){return r.model.getRawData().count()}function FM(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),zM}function zM(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function qd(r,t){D(nS(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,Mt(VM,t))})}function VM(r,t){var e=ah(r);return e&&e.setOutputEnd((t||this).count()),t}function ah(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var n=e.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}var Oe=(function(){function r(){this.group=new kt,this.uid=vl("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){},r.prototype.updateLayout=function(t,e,n,i){},r.prototype.updateVisual=function(t,e,n,i){},r.prototype.toggleBlurSeries=function(t,e,n){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r})();Xh(Oe);Qs(Oe);function eo(){var r=Ot();return function(t){var e=r(t),n=t.pipelineContext,i=!!e.large,a=!!e.progressiveRender,o=e.large=!!(n&&n.large),s=e.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var E0=Ot(),HM=eo(),we=(function(){function r(){this.group=new kt,this.uid=vl("viewChart"),this.renderTask=Da({plan:WM,reset:GM}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,n,i){if(process.env.NODE_ENV!=="production")throw new Error("render method must been implemented")},r.prototype.highlight=function(t,e,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Qt("Unknown dataType "+i.dataType);return}Qd(a,i,"emphasis")},r.prototype.downplay=function(t,e,n,i){var a=t.getData(i&&i.dataType);if(!a){process.env.NODE_ENV!=="production"&&Qt("Unknown dataType "+i.dataType);return}Qd(a,i,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateLayout=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.updateVisual=function(t,e,n,i){this.render(t,e,n,i)},r.prototype.eachRendered=function(t){Ja(this.group,t)},r.markUpdateMethod=function(t,e){E0(t).updateMethod=e},r.protoInitialize=(function(){var t=r.prototype;t.type="chart"})(),r})();function Kd(r,t,e){r&&Si(r)&&(t==="emphasis"?bs:Ss)(r,e)}function Qd(r,t,e){var n=En(r,t),i=t&&t.highlightKey!=null?oT(t.highlightKey):null;n!=null?D(ne(n),function(a){Kd(r.getItemGraphicEl(a),e,i)}):r.eachItemGraphicEl(function(a){Kd(a,e,i)})}Xh(we,["dispose"]);Qs(we);function WM(r){return HM(r.model)}function GM(r){var t=r.model,e=r.ecModel,n=r.api,i=r.payload,a=t.pipelineContext.progressiveRender,o=r.view,s=i&&E0(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,n,i),$M[l]}var $M={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}},Ls="\0__throttleOriginMethod",Jd="\0__throttleRate",tp="\0__throttleType";function _c(r,t,e){var n,i=0,a=0,o=null,s,l,u,f;t=t||0;function h(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var c=function(){for(var v=[],d=0;d<arguments.length;d++)v[d]=arguments[d];n=new Date().getTime(),l=this,u=v;var p=f||t,g=f||e;f=null,s=n-(g?i:a)-p,clearTimeout(o),g?o=setTimeout(h,p):s>=0?h():o=setTimeout(h,-s),i=n};return c.clear=function(){o&&(clearTimeout(o),o=null)},c.debounceNextCall=function(v){f=v},c}function xl(r,t,e,n){var i=r[t];if(i){var a=i[Ls]||i,o=i[tp],s=i[Jd];if(s!==e||o!==n){if(e==null||!n)return r[t]=a;i=r[t]=_c(a,e,n==="debounce"),i[Ls]=a,i[tp]=n,i[Jd]=e}return i}}function Ps(r,t){var e=r[t];e&&e[Ls]&&(e.clear&&e.clear(),r[t]=e[Ls])}var ep=Ot(),rp={itemStyle:Ra(Uy,!0),lineStyle:Ra($y,!0)},UM={lineStyle:"stroke",itemStyle:"fill"};function L0(r,t){var e=r.visualStyleMapper||rp[t];return e||(console.warn("Unknown style type '"+t+"'."),rp.itemStyle)}function P0(r,t){var e=r.visualDrawType||UM[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var YM={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=L0(r,n),o=a(i),s=i.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=P0(r,n),u=o[l],f=Q(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var c=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=c,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||Q(o.fill)?c:o.fill,o.stroke=o.stroke==="auto"||Q(o.stroke)?c:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&f)return e.setVisual("colorFromPalette",!1),{dataEach:function(v,d){var p=r.getDataParams(d),g=B({},o);g[l]=f(p),v.setItemVisual(d,"style",g)}}}},Zi=new At,jM={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=L0(r,n),a=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Zi.option=l[n];var u=i(Zi),f=o.ensureUniqueItemVisual(s,"style");B(f,u),Zi.option.decal&&(o.setItemVisual(s,"decal",Zi.option.decal),Zi.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},ZM={performRawSeries:!0,overallReset:function(r){var t=et();r.eachSeries(function(e){var n=e.getColorBy();if(!e.isColorBySeries()){var i=e.type+"-"+n,a=t.get(i);a||(a={},t.set(i,a)),ep(e).scope=a}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var n=e.getRawData(),i={},a=e.getData(),o=ep(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=P0(e,s);a.each(function(u){var f=a.getRawIndex(u);i[f]=u}),n.each(function(u){var f=i[u],h=a.getItemVisual(f,"colorFromPalette");if(h){var c=a.ensureUniqueItemVisual(f,"style"),v=n.getName(u)||u+"",d=n.count();c[l]=e.getColorFromPalette(v,o,d)}})}})}},Eo=Math.PI;function XM(r,t){t=t||{},_t(t,{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 e=new kt,n=new Tt({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(n);var i=new $t({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Tt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(a);var o;return t.showSpinner&&(o=new sl({shape:{startAngle:-Eo/2,endAngle:-Eo/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Eo*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Eo*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=i.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:f}),a.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var R0=(function(){function r(t,e,n,i){this._stageTaskMap=et(),this.ecInstance=t,this.api=e,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var n=this._pipelineMap.get(t.__pipeline.id),i=n.context,a=!e&&n.progressiveEnabled&&(!i||i.progressiveRender)&&t.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var n=this._pipelineMap.get(t.uid),i=t.getData(),a=i.count(),o=n.progressiveEnabled&&e.incrementalPrepareRender&&a>=n.threshold,s=t.get("large")&&a>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?a:null;t.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,n=e._pipelineMap=et();t.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),e._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),n=this.api;D(this._allHandlers,function(i){var a=t.get(i.uid)||t.set(i.uid,{}),o="";process.env.NODE_ENV!=="production"&&(o='"reset" and "overallReset" must not be both specified.'),nt(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,e,n),i.overallReset&&this._createOverallStageTask(i,a,e,n)},this)},r.prototype.prepareView=function(t,e,n,i){var a=t.renderTask,o=a.context;o.model=e,o.ecModel=n,o.api=i,a.__block=!t.incrementalPrepareRender,this._pipe(e,a)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,n){this._performStageTasks(this._visualHandlers,t,e,n)},r.prototype._performStageTasks=function(t,e,n,i){i=i||{};var a=!1,o=this;D(t,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,c=f.overallTask;if(c){var v,d=c.agentStubMap;d.each(function(g){s(i,g)&&(g.dirty(),v=!0)}),v&&c.dirty(),o.updatePayload(c,n);var p=o.getPerformArgs(c,i.block);d.each(function(g){g.perform(p)}),c.perform(p)&&(a=!0)}else h&&h.each(function(g,m){s(i,g)&&g.dirty();var y=o.getPerformArgs(g,i.block);y.skip=!l.performRawSeries&&e.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||this.unfinished},r.prototype.performSeriesTasks=function(t){var e;t.eachSeries(function(n){e=n.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,n,i){var a=this,o=e.seriesTaskMap,s=e.seriesTaskMap=et(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,i).each(f);function f(h){var c=h.uid,v=s.set(c,o&&o.get(c)||Da({plan:tA,reset:eA,count:nA}));v.context={model:h,ecModel:n,api:i,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:a},a._pipe(h,v)}},r.prototype._createOverallStageTask=function(t,e,n,i){var a=this,o=e.overallTask=e.overallTask||Da({reset:qM});o.context={ecModel:n,api:i,overallReset:t.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=et(),u=t.seriesType,f=t.getTargetSeries,h=!0,c=!1,v="";process.env.NODE_ENV!=="production"&&(v='"createOnAllSeries" is not supported for "overallReset", because it will block all streams.'),nt(!t.createOnAllSeries,v),u?n.eachRawSeriesByType(u,d):f?f(n,i).each(d):(h=!1,D(n.getSeries(),d));function d(p){var g=p.uid,m=l.set(g,s&&s.get(g)||(c=!0,Da({reset:KM,onDirty:JM})));m.context={model:p,overallProgress:h},m.agent=o,m.__block=h,a._pipe(p,m)}c&&o.dirty()},r.prototype._pipe=function(t,e){var n=t.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=e),i.tail&&i.tail.pipe(e),i.tail=e,e.__idxInPipeline=i.count++,e.__pipeline=i},r.wrapStageHandler=function(t,e){return Q(t)&&(t={overallReset:t,seriesType:iA(t)}),t.uid=vl("stageHandler"),e&&(t.visualType=e),t},r})();function qM(r){r.overallReset(r.ecModel,r.api,r.payload)}function KM(r){return r.overallProgress&&QM}function QM(){this.agent.dirty(),this.getDownstream().dirty()}function JM(){this.agent&&this.agent.dirty()}function tA(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function eA(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=ne(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?X(t,function(e,n){return k0(n)}):rA}var rA=k0(0);function k0(r){return function(t,e){var n=e.data,i=e.resetDefines[r];if(i&&i.dataEach)for(var a=t.start;a<t.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(t,n)}}function nA(r){return r.data.count()}function iA(r){Rs=null;try{r(Ha,O0)}catch{}return Rs}var Ha={},O0={},Rs;N0(Ha,dc);N0(O0,h0);Ha.eachSeriesByType=Ha.eachRawSeriesByType=function(r){Rs=r};Ha.eachComponent=function(r){r.mainType==="series"&&r.subType&&(Rs=r.subType)};function N0(r,t){for(var e in t.prototype)r[e]=re}var np=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const aA={color:np,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],np]};var Zt="#B9B8CE",ip="#100C2A",Lo=function(){return{axisLine:{lineStyle:{color:Zt}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},ap=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],B0={darkMode:!0,color:ap,backgroundColor:ip,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:Zt},pageTextStyle:{color:Zt}},textStyle:{color:Zt},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:Zt}},dataZoom:{borderColor:"#71708A",textStyle:{color:Zt},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:Zt}},timeline:{lineStyle:{color:Zt},label:{color:Zt},controlStyle:{color:Zt,borderColor:Zt}},calendar:{itemStyle:{color:ip},dayLabel:{color:Zt},monthLabel:{color:Zt},yearLabel:{color:Zt}},timeAxis:Lo(),logAxis:Lo(),valueAxis:Lo(),categoryAxis:Lo(),line:{symbol:"circle"},graph:{color:ap},gauge:{title:{color:Zt},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:Zt},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};B0.categoryAxis.splitLine.show=!1;var oA=(function(){function r(){}return r.prototype.normalizeQuery=function(t){var e={},n={},i={};if(G(t)){var a=Je(t);e.mainType=a.main||null,e.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};D(t,function(l,u){for(var f=!1,h=0;h<o.length;h++){var c=o[h],v=u.lastIndexOf(c);if(v>0&&v===u.length-c.length){var d=u.slice(0,v);d!=="data"&&(e.mainType=d,e[c.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(i[u]=l)})}return{cptQuery:e,dataQuery:n,otherQuery:i}},r.prototype.filter=function(t,e){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=e.cptQuery,u=e.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,a,"name")&&f(u,a,"dataIndex")&&f(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,i,a));function f(h,c,v,d){return h[v]==null||c[d||v]===h[v]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),oh=["symbol","symbolSize","symbolRotate","symbolOffset"],op=oh.concat(["symbolKeepAspect"]),sA={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},i={},a=!1,o=0;o<oh.length;o++){var s=oh[o],l=r.get(s);Q(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,e.setVisual(B({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),t.isSeriesFiltered(r))return;var u=Ct(i);function f(h,c){for(var v=r.getRawValue(c),d=r.getDataParams(c),p=0;p<u.length;p++){var g=u[p];h.setItemVisual(c,g,i[g](v,d))}}return{dataEach:a?f:null}}},lA={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!r.hasSymbolVisual||t.isSeriesFiltered(r))return;var e=r.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<op.length;s++){var l=op[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:e.hasItemOption?n:null}}};function uA(r,t,e){switch(e){case"color":var n=r.getItemVisual(t,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(t,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(t,e);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+e)}}function fA(r,t){switch(t){case"color":var e=r.getVisual("style");return e[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(t);default:process.env.NODE_ENV!=="production"&&console.warn("Unknown visual type "+t)}}function Xn(r,t,e,n,i){var a=r+t;e.isSilent(a)||(process.env.NODE_ENV!=="production"&&We("event "+a+" is deprecated."),n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,f=0;f<u.length;f++)if(u[f].seriesIndex===s){var h=o.getData(),c=En(h,i.fromActionPayload);e.trigger(a,{type:a,seriesId:o.id,name:H(c)?h.getName(c[0]):h.getName(c),selected:G(l)?l:B({},l)})}}))}function hA(r,t,e){r.on("selectchanged",function(n){var i=e.getModel();n.isFromClick?(Xn("map","selectchanged",t,i,n),Xn("pie","selectchanged",t,i,n)):n.fromAction==="select"?(Xn("map","selected",t,i,n),Xn("pie","selected",t,i,n)):n.fromAction==="unselect"&&(Xn("map","unselected",t,i,n),Xn("pie","unselected",t,i,n))})}function da(r,t,e){for(var n;r&&!(t(r)&&(n=r,e));)r=r.__hostTarget||r.parent;return n}var cA=Math.round(Math.random()*9),vA=typeof Object.defineProperty=="function",dA=(function(){function r(){this._id="__ec_inner_"+cA++}return r.prototype.get=function(t){return this._guard(t)[this._id]},r.prototype.set=function(t,e){var n=this._guard(t);return vA?Object.defineProperty(n,this._id,{value:e,enumerable:!1,configurable:!0}):n[this._id]=e,this},r.prototype.delete=function(t){return this.has(t)?(delete this._guard(t)[this._id],!0):!1},r.prototype.has=function(t){return!!this._guard(t)[this._id]},r.prototype._guard=function(t){if(t!==Object(t))throw TypeError("Value of WeakMap is not a non-null object.");return t},r})(),pA=vt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n+a),r.lineTo(e-i,n+a),r.closePath()}}),gA=vt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,t){var e=t.cx,n=t.cy,i=t.width/2,a=t.height/2;r.moveTo(e,n-a),r.lineTo(e+i,n),r.lineTo(e,n+a),r.lineTo(e-i,n),r.closePath()}}),mA=vt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.x,n=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),f=Math.cos(u)*o,h=Math.sin(u),c=Math.cos(u),v=o*.6,d=o*.7;r.moveTo(e-f,l+s),r.arc(e,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(e+f-h*v,l+s+c*v,e,n-d,e,n),r.bezierCurveTo(e,n-d,e-f+h*v,l+s+c*v,e-f,l+s),r.closePath()}}),yA=vt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,t){var e=t.height,n=t.width,i=t.x,a=t.y,o=n/3*2;r.moveTo(i,a),r.lineTo(i+o,a+e),r.lineTo(i,a+e/4*3),r.lineTo(i-o,a+e),r.lineTo(i,a),r.closePath()}}),_A={line:Gr,rect:Tt,roundRect:Tt,square:Tt,circle:il,diamond:gA,pin:mA,arrow:yA,triangle:pA},wA={line:function(r,t,e,n,i){i.x1=r,i.y1=t+n/2,i.x2=r+e,i.y2=t+n/2},rect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n},roundRect:function(r,t,e,n,i){i.x=r,i.y=t,i.width=e,i.height=n,i.r=Math.min(e,n)/4},square:function(r,t,e,n,i){var a=Math.min(e,n);i.x=r,i.y=t,i.width=a,i.height=a},circle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.r=Math.min(e,n)/2},diamond:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n},pin:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},arrow:function(r,t,e,n,i){i.x=r+e/2,i.y=t+n/2,i.width=e,i.height=n},triangle:function(r,t,e,n,i){i.cx=r+e/2,i.cy=t+n/2,i.width=e,i.height=n}},ks={};D(_A,function(r,t){ks[t]=new r});var bA=vt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,t,e){var n=gs(r,t,e),i=this.shape;return i&&i.symbolType==="pin"&&t.position==="inside"&&(n.y=e.y+e.height*.4),n},buildPath:function(r,t,e){var n=t.symbolType;if(n!=="none"){var i=ks[n];i||(n="rect",i=ks[n]),wA[n](t.x,t.y,t.width,t.height,i.shape),i.buildPath(r,i.shape,e)}}});function SA(r,t){if(this.type!=="image"){var e=this.style;this.__isEmptyBrush?(e.stroke=r,e.fill=t||"#fff",e.lineWidth=2):this.shape.symbolType==="line"?e.stroke=r:e.fill=r,this.markRedraw()}}function yr(r,t,e,n,i,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=By(r.slice(8),new dt(t,e,n,i),o?"center":"cover"):r.indexOf("path://")===0?l=ac(r.slice(7),{},new dt(t,e,n,i),o?"center":"cover"):l=new bA({shape:{symbolType:r,x:t,y:e,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=SA,a&&l.setColor(a),l}function xA(r){return H(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function F0(r,t){if(r!=null)return H(r)||(r=[r,r]),[Pt(r[0],t[0])||0,Pt(rt(r[1],r[0]),t[1])||0]}function yn(r){return isFinite(r)}function CA(r,t,e){var n=t.x==null?0:t.x,i=t.x2==null?1:t.x2,a=t.y==null?0:t.y,o=t.y2==null?0:t.y2;t.global||(n=n*e.width+e.x,i=i*e.width+e.x,a=a*e.height+e.y,o=o*e.height+e.y),n=yn(n)?n:0,i=yn(i)?i:1,a=yn(a)?a:0,o=yn(o)?o:0;var s=r.createLinearGradient(n,a,i,o);return s}function TA(r,t,e){var n=e.width,i=e.height,a=Math.min(n,i),o=t.x==null?.5:t.x,s=t.y==null?.5:t.y,l=t.r==null?.5:t.r;t.global||(o=o*n+e.x,s=s*i+e.y,l=l*a),o=yn(o)?o:.5,s=yn(s)?s:.5,l=l>=0&&yn(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function sh(r,t,e){for(var n=t.type==="radial"?TA(r,t,e):CA(r,t,e),i=t.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function DA(r,t){if(r===t||!r&&!t)return!1;if(!r||!t||r.length!==t.length)return!0;for(var e=0;e<r.length;e++)if(r[e]!==t[e])return!0;return!1}function Po(r){return parseInt(r,10)}function Ro(r,t,e){var n=["width","height"][t],i=["clientWidth","clientHeight"][t],a=["paddingLeft","paddingTop"][t],o=["paddingRight","paddingBottom"][t];if(e[n]!=null&&e[n]!=="auto")return parseFloat(e[n]);var s=document.defaultView.getComputedStyle(r);return(r[i]||Po(s[n])||Po(r.style[n]))-(Po(s[a])||0)-(Po(s[o])||0)|0}function MA(r,t){return!r||r==="solid"||!(t>0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:St(r)?[r]:H(r)?r:null}function z0(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&MA(t.lineDash,t.lineWidth),n=t.lineDashOffset;if(e){var i=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(e=X(e,function(a){return a/i}),n/=i)}return[e,n]}var AA=new Ln(!0);function Os(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function sp(r){return typeof r=="string"&&r!=="none"}function Ns(r){var t=r.fill;return t!=null&&t!=="none"}function lp(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function up(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function lh(r,t,e){var n=cy(t.image,t.__image,e);if(Js(n)){var i=r.createPattern(n,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*iS),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function IA(r,t,e,n){var i,a=Os(e),o=Ns(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var f=t.path||AA,h=t.__dirty;if(!n){var c=e.fill,v=e.stroke,d=o&&!!c.colorStops,p=a&&!!v.colorStops,g=o&&!!c.image,m=a&&!!v.image,y=void 0,_=void 0,w=void 0,b=void 0,S=void 0;(d||p)&&(S=t.getBoundingRect()),d&&(y=h?sh(r,c,S):t.__canvasFillGradient,t.__canvasFillGradient=y),p&&(_=h?sh(r,v,S):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(w=h||!t.__canvasFillPattern?lh(r,c,t):t.__canvasFillPattern,t.__canvasFillPattern=w),m&&(b=h||!t.__canvasStrokePattern?lh(r,v,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),d?r.fillStyle=y:g&&(w?r.fillStyle=w:o=!1),p?r.strokeStyle=_:m&&(b?r.strokeStyle=b:a=!1)}var x=t.getGlobalScale();f.setScale(x[0],x[1],t.segmentIgnoreThreshold);var T,M;r.setLineDash&&e.lineDash&&(i=z0(t),T=i[0],M=i[1]);var A=!0;(u||h&ni)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),t.buildPath(f,t.shape,n),f.toStatic(),t.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=M),n||(e.strokeFirst?(a&&up(r,e),o&&lp(r,e)):(o&&lp(r,e),a&&up(r,e))),T&&r.setLineDash([])}function EA(r,t,e){var n=t.__image=cy(e.image,t.__image,t,t.onload);if(!(!n||!Js(n))){var i=e.x||0,a=e.y||0,o=t.getWidth(),s=t.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),e.sWidth&&e.sHeight){var u=e.sx||0,f=e.sy||0;r.drawImage(n,u,f,e.sWidth,e.sHeight,i,a,o,s)}else if(e.sx&&e.sy){var u=e.sx,f=e.sy,h=o-u,c=s-f;r.drawImage(n,u,f,h,c,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function LA(r,t,e){var n,i=e.text;if(i!=null&&(i+=""),i){r.font=e.font||Mn,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var a=void 0,o=void 0;r.setLineDash&&e.lineDash&&(n=z0(t),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),e.strokeFirst?(Os(e)&&r.strokeText(i,e.x,e.y),Ns(e)&&r.fillText(i,e.x,e.y)):(Ns(e)&&r.fillText(i,e.x,e.y),Os(e)&&r.strokeText(i,e.x,e.y)),a&&r.setLineDash([])}}var fp=["shadowBlur","shadowOffsetX","shadowOffsetY"],hp=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function V0(r,t,e,n,i){var a=!1;if(!n&&(e=e||{},t===e))return!1;if(n||t.opacity!==e.opacity){fe(r,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Sn.opacity:o}(n||t.blend!==e.blend)&&(a||(fe(r,i),a=!0),r.globalCompositeOperation=t.blend||Sn.blend);for(var s=0;s<fp.length;s++){var l=fp[s];(n||t[l]!==e[l])&&(a||(fe(r,i),a=!0),r[l]=r.dpr*(t[l]||0))}return(n||t.shadowColor!==e.shadowColor)&&(a||(fe(r,i),a=!0),r.shadowColor=t.shadowColor||Sn.shadowColor),a}function cp(r,t,e,n,i){var a=Wa(t,i.inHover),o=n?null:e&&Wa(e,i.inHover)||{};if(a===o)return!1;var s=V0(r,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(fe(r,i),s=!0),sp(a.fill)&&(r.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(fe(r,i),s=!0),sp(a.stroke)&&(r.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(fe(r,i),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),t.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&t.getLineScale?t.getLineScale():1);r.lineWidth!==u&&(s||(fe(r,i),s=!0),r.lineWidth=u)}for(var f=0;f<hp.length;f++){var h=hp[f],c=h[0];(n||a[c]!==o[c])&&(s||(fe(r,i),s=!0),r[c]=a[c]||h[1])}return s}function PA(r,t,e,n,i){return V0(r,Wa(t,i.inHover),e&&Wa(e,i.inHover),n,i)}function H0(r,t){var e=t.transform,n=r.dpr||1;e?r.setTransform(n*e[0],n*e[1],n*e[2],n*e[3],n*e[4],n*e[5]):r.setTransform(n,0,0,n,0,0)}function RA(r,t,e){for(var n=!1,i=0;i<r.length;i++){var a=r[i];n=n||a.isZeroArea(),H0(t,a),t.beginPath(),a.buildPath(t,a.shape),t.clip()}e.allClipped=n}function kA(r,t){return r&&t?r[0]!==t[0]||r[1]!==t[1]||r[2]!==t[2]||r[3]!==t[3]||r[4]!==t[4]||r[5]!==t[5]:!(!r&&!t)}var vp=1,dp=2,pp=3,gp=4;function OA(r){var t=Ns(r),e=Os(r);return!(r.lineDash||!(+t^+e)||t&&typeof r.fill!="string"||e&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function fe(r,t){t.batchFill&&r.fill(),t.batchStroke&&r.stroke(),t.batchFill="",t.batchStroke=""}function Wa(r,t){return t&&r.__hoverStyle||r.style}function W0(r,t){_n(r,t,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function _n(r,t,e,n){var i=t.transform;if(!t.shouldBePainted(e.viewWidth,e.viewHeight,!1,!1)){t.__dirty&=~ye,t.__isRendered=!1;return}var a=t.__clipPaths,o=e.prevElClipPaths,s=!1,l=!1;if((!o||DA(a,o))&&(o&&o.length&&(fe(r,e),r.restore(),l=s=!0,e.prevElClipPaths=null,e.allClipped=!1,e.prevEl=null),a&&a.length&&(fe(r,e),r.save(),RA(a,r,e),s=!0),e.prevElClipPaths=a),e.allClipped){t.__isRendered=!1;return}t.beforeBrush&&t.beforeBrush(),t.innerBeforeBrush();var u=e.prevEl;u||(l=s=!0);var f=t instanceof vt&&t.autoBatch&&OA(t.style);s||kA(i,u.transform)?(fe(r,e),H0(r,t)):f||fe(r,e);var h=Wa(t,e.inHover);t instanceof vt?(e.lastDrawType!==vp&&(l=!0,e.lastDrawType=vp),cp(r,t,u,l,e),(!f||!e.batchFill&&!e.batchStroke)&&r.beginPath(),IA(r,t,h,f),f&&(e.batchFill=h.fill||"",e.batchStroke=h.stroke||"")):t instanceof ws?(e.lastDrawType!==pp&&(l=!0,e.lastDrawType=pp),cp(r,t,u,l,e),LA(r,t,h)):t instanceof $r?(e.lastDrawType!==dp&&(l=!0,e.lastDrawType=dp),PA(r,t,u,l,e),EA(r,t,h)):t.getTemporalDisplayables&&(e.lastDrawType!==gp&&(l=!0,e.lastDrawType=gp),NA(r,t,e)),f&&n&&fe(r,e),t.innerAfterBrush(),t.afterBrush&&t.afterBrush(),e.prevEl=t,t.__dirty=0,t.__isRendered=!0}function NA(r,t,e){var n=t.getDisplayables(),i=t.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:e.viewWidth,viewHeight:e.viewHeight,inHover:e.inHover},o,s;for(o=t.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),_n(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,f=i.length;u<f;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),_n(r,l,a,u===f-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}t.clearTemporalDisplayables(),t.notClear=!0,r.restore()}var Fu=new dA,mp=new Xa(100),yp=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function uh(r,t){if(r==="none")return null;var e=t.getDevicePixelRatio(),n=t.getZr(),i=n.painter.type==="svg";r.dirty&&Fu.delete(r);var a=Fu.get(r);if(a)return a;var o=_t(r,{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});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/e,Fu.set(r,s),r.dirty=!1,s;function l(u){for(var f=[e],h=!0,c=0;c<yp.length;++c){var v=o[yp[c]];if(v!=null&&!H(v)&&!G(v)&&!St(v)&&typeof v!="boolean"){h=!1;break}f.push(v)}var d;if(h){d=f.join(",")+(i?"-svg":"");var p=mp.get(d);p&&(i?u.svgElement=p:u.image=p)}var g=$0(o.dashArrayX),m=BA(o.dashArrayY),y=G0(o.symbol),_=FA(g),w=U0(m),b=!i&&Ai.createCanvas(),S=i&&{tag:"g",attrs:{},key:"dcl",children:[]},x=M(),T;b&&(b.width=x.width*e,b.height=x.height*e,T=b.getContext("2d")),A(),h&&mp.put(d,b||S),u.image=b,u.svgElement=S,u.svgWidth=x.width,u.svgHeight=x.height;function M(){for(var C=1,I=0,E=_.length;I<E;++I)C=Mv(C,_[I]);for(var L=1,I=0,E=y.length;I<E;++I)L=Mv(L,y[I].length);C*=L;var P=w*_.length*y.length;if(process.env.NODE_ENV!=="production"){var R=function(z){console.warn("Calculated decal size is greater than "+z+" due to decal option settings so "+z+" is used for the decal size. Please consider changing the decal option to make a smaller decal or set "+z+" to be larger to avoid incontinuity.")};C>o.maxTileWidth&&R("maxTileWidth"),P>o.maxTileHeight&&R("maxTileHeight")}return{width:Math.max(1,Math.min(C,o.maxTileWidth)),height:Math.max(1,Math.min(P,o.maxTileHeight))}}function A(){T&&(T.clearRect(0,0,b.width,b.height),o.backgroundColor&&(T.fillStyle=o.backgroundColor,T.fillRect(0,0,b.width,b.height)));for(var C=0,I=0;I<m.length;++I)C+=m[I];if(C<=0)return;for(var E=-w,L=0,P=0,R=0;E<x.height;){if(L%2===0){for(var z=P/2%y.length,k=0,V=0,$=0;k<x.width*2;){for(var j=0,I=0;I<g[R].length;++I)j+=g[R][I];if(j<=0)break;if(V%2===0){var J=(1-o.symbolSize)*.5,it=k+g[R][V]*J,at=E+m[L]*J,ot=g[R][V]*o.symbolSize,Jt=m[L]*o.symbolSize,pt=$/2%y[z].length;Be(it,at,ot,Jt,y[z][pt])}k+=g[R][V],++$,++V,V===g[R].length&&(V=0)}++R,R===g.length&&(R=0)}E+=m[L],++P,++L,L===m.length&&(L=0)}function Be(Bt,Dt,q,st,be){var Ft=i?1:e,On=yr(be,Bt*Ft,Dt*Ft,q*Ft,st*Ft,o.color,o.symbolKeepAspect);if(i){var ro=n.painter.renderOneToVNode(On);ro&&S.children.push(ro)}else W0(T,On)}}}}function G0(r){if(!r||r.length===0)return[["rect"]];if(G(r))return[[r]];for(var t=!0,e=0;e<r.length;++e)if(!G(r[e])){t=!1;break}if(t)return G0([r]);for(var n=[],e=0;e<r.length;++e)G(r[e])?n.push([r[e]]):n.push(r[e]);return n}function $0(r){if(!r||r.length===0)return[[0,0]];if(St(r)){var t=Math.ceil(r);return[[t,t]]}for(var e=!0,n=0;n<r.length;++n)if(!St(r[n])){e=!1;break}if(e)return $0([r]);for(var i=[],n=0;n<r.length;++n)if(St(r[n])){var t=Math.ceil(r[n]);i.push([t,t])}else{var t=X(r[n],function(s){return Math.ceil(s)});t.length%2===1?i.push(t.concat(t)):i.push(t)}return i}function BA(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(St(r)){var t=Math.ceil(r);return[t,t]}var e=X(r,function(n){return Math.ceil(n)});return r.length%2?e.concat(e):e}function FA(r){return X(r,function(t){return U0(t)})}function U0(r){for(var t=0,e=0;e<r.length;++e)t+=r[e];return r.length%2===1?t*2:t}function zA(r,t){r.eachRawSeries(function(e){if(!r.isSeriesFiltered(e)){var n=e.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=uh(s,t)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=uh(i,t)}}})}var He=new Ue,Bs={};function VA(r,t){process.env.NODE_ENV!=="production"&&Bs[r]&&Qt("Already has an implementation of "+r+"."),Bs[r]=t}function HA(r){return process.env.NODE_ENV!=="production"&&(Bs[r]||Qt("Implementation of "+r+" doesn't exists.")),Bs[r]}var WA=1,GA=800,$A=900,UA=1e3,YA=2e3,jA=5e3,Y0=1e3,ZA=1100,wc=2e3,j0=3e3,XA=4e3,Cl=4500,qA=4600,KA=5e3,QA=6e3,Z0=7e3,JA={PROCESSOR:{FILTER:UA,SERIES_FILTER:GA,STATISTIC:jA},VISUAL:{LAYOUT:Y0,PROGRESSIVE_LAYOUT:ZA,GLOBAL:wc,CHART:j0,POST_CHART_LAYOUT:qA,COMPONENT:XA,BRUSH:KA,CHART_ITEM:Cl,ARIA:QA,DECAL:Z0}},Yt="__flagInMainProcess",oe="__pendingUpdate",zu="__needsUpdateStatus",_p=/^[a-zA-Z0-9_]+$/,Vu="__connectUpdateStatus",wp=0,t2=1,e2=2;function X0(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(this.isDisposed()){ge(this.id);return}return K0(this,r,t)}}function q0(r){return function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return K0(this,r,t)}}function K0(r,t,e){return e[0]=e[0]&&e[0].toLowerCase(),Ue.prototype[t].apply(r,e)}var Q0=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(Ue),J0=Q0.prototype;J0.on=q0("on");J0.off=q0("off");var qn,Hu,ko,Dr,Wu,Gu,$u,Xi,qi,bp,Sp,Uu,xp,Oo,Cp,t_,xe,Tp,e_=(function(r){O(t,r);function t(e,n,i){var a=r.call(this,new oA)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},G(n)&&(n=r_[n]),a._dom=e;var o="canvas",s="auto",l=!1;if(process.env.NODE_ENV!=="production"){var u=K.hasGlobalWindow?window:global;u&&(o=rt(u.__ECHARTS__DEFAULT__RENDERER__,o),s=rt(u.__ECHARTS__DEFAULT__COARSE_POINTER,s),l=rt(u.__ECHARTS__DEFAULT__USE_DIRTY_RECT__,l))}i.ssr;var f=a._zr=Tv(e,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:rt(i.useDirtyRect,l),useCoarsePointer:rt(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=_c(tt(f.flush,f),17),n=lt(n),n&&v0(n,!0),a._theme=n,a._locale=cD(i.locale||Yy),a._coordSysMgr=new pc;var h=a._api=Cp(a);function c(v,d){return v.__prio-d.__prio}return Zo(zs,c),Zo(fh,c),a._scheduler=new R0(a,h,fh,zs),a._messageCenter=new Q0,a._initEvents(),a.resize=tt(a.resize,a),f.animation.on("frame",a._onframe,a),bp(f,a),Sp(f,a),Mf(a),a}return t.prototype._onframe=function(){if(!this._disposed){Tp(this);var e=this._scheduler;if(this[oe]){var n=this[oe].silent;this[Yt]=!0;try{qn(this),Dr.update.call(this,null,this[oe].updateParams)}catch(l){throw this[Yt]=!1,this[oe]=null,l}this._zr.flush(),this[Yt]=!1,this[oe]=null,Xi.call(this,n),qi.call(this,n)}else if(e.unfinished){var i=WA,a=this._model,o=this._api;e.unfinished=!1;do{var s=+new Date;e.performSeriesTasks(a),e.performDataProcessorTasks(a),Gu(this,a),e.performVisualTasks(a),Oo(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,n,i){if(this[Yt]){process.env.NODE_ENV!=="production"&&Qt("`setOption` should not be called during main process.");return}if(this._disposed){ge(this.id);return}var a,o,s;if(Z(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Yt]=!0,!this._model||n){var l=new VD(this._api),u=this._theme,f=this._model=new dc;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},hh);var h={seriesTransition:s,optionChanged:!0};if(i)this[oe]={silent:a,updateParams:h},this[Yt]=!1,this.getZr().wakeUp();else{try{qn(this),Dr.update.call(this,null,h)}catch(c){throw this[oe]=null,this[Yt]=!1,c}this._ssr||this._zr.flush(),this[oe]=null,this[Yt]=!1,Xi.call(this,a),qi.call(this,a)}},t.prototype.setTheme=function(){We("ECharts#setTheme() is DEPRECATED in ECharts 3.0")},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||K.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return process.env.NODE_ENV!=="production"&&Ht("getRenderedCanvas","renderToCanvas"),this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="canvas")throw new Error("renderToCanvas can only be used in the canvas renderer.");return n.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var n=this._zr.painter;if(process.env.NODE_ENV!=="production"&&n.type!=="svg")throw new Error("renderToSVGString can only be used in the svg renderer.");return n.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){if(K.svgSupported){var e=this._zr,n=e.storage.getDisplayList();return D(n,function(i){i.stopAnimation(null,!0)}),e.painter.toDataURL()}},t.prototype.getDataURL=function(e){if(this._disposed){ge(this.id);return}e=e||{};var n=e.excludeComponents,i=this._model,a=[],o=this;D(n,function(l){i.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(a.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return D(a,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){ge(this.id);return}var n=e.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(Dp[i]){var l=s,u=s,f=-s,h=-s,c=[],v=e&&e.pixelRatio||this.getDevicePixelRatio();D(Aa,function(_,w){if(_.group===i){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(lt(e)),S=_.getDom().getBoundingClientRect();l=a(S.left,l),u=a(S.top,u),f=o(S.right,f),h=o(S.bottom,h),c.push({dom:b,left:S.left,top:S.top})}}),l*=v,u*=v,f*=v,h*=v;var d=f-l,p=h-u,g=Ai.createCanvas(),m=Tv(g,{renderer:n?"svg":"canvas"});if(m.resize({width:d,height:p}),n){var y="";return D(c,function(_){var w=_.left-l,b=_.top-u;y+='<g transform="translate('+w+","+b+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,e.connectedBackgroundColor&&m.painter.setBackgroundColor(e.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return e.connectedBackgroundColor&&m.add(new Tt({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),D(c,function(_){var w=new $r({style:{x:_.left*v-l,y:_.top*v-u,image:_.dom}});m.add(w)}),m.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,n){return Wu(this,"convertToPixel",e,n)},t.prototype.convertFromPixel=function(e,n){return Wu(this,"convertFromPixel",e,n)},t.prototype.containPixel=function(e,n){if(this._disposed){ge(this.id);return}var i=this._model,a,o=fu(i,e);return D(o,function(s,l){l.indexOf("Models")>=0&&D(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)a=a||!!f.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint?a=a||h.containPoint(n,u):process.env.NODE_ENV!=="production"&&Kt(l+": "+(h?"The found component do not support containPoint.":"No view mapping to the found component."))}else process.env.NODE_ENV!=="production"&&Kt(l+": containPoint is not supported")},this)},this),!!a},t.prototype.getVisual=function(e,n){var i=this._model,a=fu(i,e,{defaultMainType:"series"}),o=a.seriesModel;process.env.NODE_ENV!=="production"&&(o||Kt("There is no specified series model"));var s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?uA(s,l,n):fA(s,n)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;D(r2,function(n){var i=function(a){var o=e.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&da(s,function(d){var p=ft(d);if(p&&p.dataIndex!=null){var g=p.dataModel||o.getSeriesByIndex(p.seriesIndex);return l=g&&g.getDataParams(p.dataIndex,p.dataType,s)||{},!0}else if(p.eventData)return l=B({},p.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var c=f&&h!=null&&o.getComponent(f,h),v=c&&e[c.mainType==="series"?"_chartsMap":"_componentsMap"][c.__viewId];process.env.NODE_ENV!=="production"&&!u&&!(c&&v)&&Kt("model or view can not be found by params"),l.event=a,l.type=n,e._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:c,view:v},e.trigger(n,l)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)}),D(Ma,function(n,i){e._messageCenter.on(i,function(a){this.trigger(i,a)},e)}),D(["selectchanged"],function(n){e._messageCenter.on(n,function(i){this.trigger(n,i)},e)}),hA(this._messageCenter,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){ge(this.id);return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){ge(this.id);return}this._disposed=!0;var e=this.getDom();e&&uy(this.getDom(),Sc,"");var n=this,i=n._api,a=n._model;D(n._componentsViews,function(o){o.dispose(a,i)}),D(n._chartsViews,function(o){o.dispose(a,i)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Aa[n.id]},t.prototype.resize=function(e){if(this[Yt]){process.env.NODE_ENV!=="production"&&Qt("`resize` should not be called during main process.");return}if(this._disposed){ge(this.id);return}this._zr.resize(e);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=e&&e.silent;this[oe]&&(a==null&&(a=this[oe].silent),i=!0,this[oe]=null),this[Yt]=!0;try{i&&qn(this),Dr.update.call(this,{type:"resize",animation:B({duration:0},e&&e.animation)})}catch(o){throw this[Yt]=!1,o}this[Yt]=!1,Xi.call(this,a),qi.call(this,a)}},t.prototype.showLoading=function(e,n){if(this._disposed){ge(this.id);return}if(Z(e)&&(n=e,e=""),e=e||"default",this.hideLoading(),!ch[e]){process.env.NODE_ENV!=="production"&&Kt("Loading effects "+e+" not exists.");return}var i=ch[e](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)},t.prototype.hideLoading=function(){if(this._disposed){ge(this.id);return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var n=B({},e);return n.type=Ma[e.type],n},t.prototype.dispatchAction=function(e,n){if(this._disposed){ge(this.id);return}if(Z(n)||(n={silent:!!n}),!!Fs[e.type]&&this._model){if(this[Yt]){this._pendingActions.push(e);return}var i=n.silent;$u.call(this,e,i);var a=n.flush;a?this._zr.flush():a!==!1&&K.browser.weChat&&this._throttledZrFlush(),Xi.call(this,i),qi.call(this,i)}},t.prototype.updateLabelLayout=function(){He.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){ge(this.id);return}var n=e.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);process.env.NODE_ENV!=="production"&&nt(e.data&&a),a.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=(function(){qn=function(h){var c=h._scheduler;c.restorePipelines(h._model),c.prepareStageTasks(),Hu(h,!0),Hu(h,!1),c.plan()},Hu=function(h,c){for(var v=h._model,d=h._scheduler,p=c?h._componentsViews:h._chartsViews,g=c?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_<p.length;_++)p[_].__alive=!1;c?v.eachComponent(function(S,x){S!=="series"&&w(x)}):v.eachSeries(w);function w(S){var x=S.__requireNewView;S.__requireNewView=!1;var T="_ec_"+S.id+"_"+S.type,M=!x&&g[T];if(!M){var A=Je(S.type),C=c?Oe.getClass(A.main,A.sub):we.getClass(A.sub);process.env.NODE_ENV!=="production"&&nt(C,A.sub+" does not exist."),M=new C,M.init(v,y),g[T]=M,p.push(M),m.add(M.group)}S.__viewId=M.__id=T,M.__alive=!0,M.__model=S,M.group.__ecComponentInfo={mainType:S.mainType,index:S.componentIndex},!c&&d.prepareView(M,S,v,y)}for(var _=0;_<p.length;){var b=p[_];b.__alive?_++:(!c&&b.renderTask.dispose(),m.remove(b.group),b.dispose(v,y),p.splice(_,1),g[b.__id]===b&&delete g[b.__id],b.__id=b.group.__ecComponentInfo=null)}},ko=function(h,c,v,d,p){var g=h._model;if(g.setUpdatePayload(v),!d){D([].concat(h._componentsViews).concat(h._chartsViews),b);return}var m={};m[d+"Id"]=v[d+"Id"],m[d+"Index"]=v[d+"Index"],m[d+"Name"]=v[d+"Name"];var y={mainType:d,query:m};p&&(y.subType=p);var _=v.excludeSeriesId,w;_!=null&&(w=et(),D(ne(_),function(S){var x=er(S,null);x!=null&&w.set(x,!0)})),g&&g.eachComponent(y,function(S){var x=w&&w.get(S.id)!=null;if(!x)if(ad(v))if(S instanceof ke)v.type===xn&&!v.notBlur&&!S.get(["emphasis","disabled"])&&QC(S,v,h._api);else{var T=Jh(S.mainType,S.componentIndex,v.name,h._api),M=T.focusSelf,A=T.dispatchers;v.type===xn&&M&&!v.notBlur&&Zf(S.mainType,S.componentIndex,h._api),A&&D(A,function(C){v.type===xn?bs(C):Ss(C)})}else Xf(v)&&S instanceof ke&&(eT(S,v,h._api),nd(S),xe(h))},h),g&&g.eachComponent(y,function(S){var x=w&&w.get(S.id)!=null;x||b(h[d==="series"?"_chartsMap":"_componentsMap"][S.__viewId])},h);function b(S){S&&S.__alive&&S[c]&&S[c](S.__model,g,h._api,v)}},Dr={prepareAndUpdate:function(h){qn(this),Dr.update.call(this,h,{optionChanged:h.newOption!=null})},update:function(h,c){var v=this._model,d=this._api,p=this._zr,g=this._coordSysMgr,m=this._scheduler;if(v){v.setUpdatePayload(h),m.restoreData(v,h),m.performSeriesTasks(v),g.create(v,d),m.performDataProcessorTasks(v,h),Gu(this,v),g.update(v,d),e(v),m.performVisualTasks(v,h),Uu(this,v,d,h,c);var y=v.get("backgroundColor")||"transparent",_=v.get("darkMode");p.setBackgroundColor(y),_!=null&&_!=="auto"&&p.setDarkMode(_),He.trigger("afterupdate",v,d)}},updateTransform:function(h){var c=this,v=this._model,d=this._api;if(v){v.setUpdatePayload(h);var p=[];v.eachComponent(function(m,y){if(m!=="series"){var _=c.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var w=_.updateTransform(y,v,d,h);w&&w.update&&p.push(_)}else p.push(_)}});var g=et();v.eachSeries(function(m){var y=c._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,v,d,h);_&&_.update&&g.set(m.uid,1)}else g.set(m.uid,1)}),e(v),this._scheduler.performVisualTasks(v,h,{setDirty:!0,dirtyMap:g}),Oo(this,v,d,h,{},g),He.trigger("afterupdate",v,d)}},updateView:function(h){var c=this._model;c&&(c.setUpdatePayload(h),we.markUpdateMethod(h,"updateView"),e(c),this._scheduler.performVisualTasks(c,h,{setDirty:!0}),Uu(this,c,this._api,h,{}),He.trigger("afterupdate",c,this._api))},updateVisual:function(h){var c=this,v=this._model;v&&(v.setUpdatePayload(h),v.eachSeries(function(d){d.getData().clearAllVisual()}),we.markUpdateMethod(h,"updateVisual"),e(v),this._scheduler.performVisualTasks(v,h,{visualType:"visual",setDirty:!0}),v.eachComponent(function(d,p){if(d!=="series"){var g=c.getViewOfComponentModel(p);g&&g.__alive&&g.updateVisual(p,v,c._api,h)}}),v.eachSeries(function(d){var p=c._chartsMap[d.__viewId];p.updateVisual(d,v,c._api,h)}),He.trigger("afterupdate",v,this._api))},updateLayout:function(h){Dr.update.call(this,h)}},Wu=function(h,c,v,d){if(h._disposed){ge(h.id);return}for(var p=h._model,g=h._coordSysMgr.getCoordinateSystems(),m,y=fu(p,v),_=0;_<g.length;_++){var w=g[_];if(w[c]&&(m=w[c](p,y,d))!=null)return m}process.env.NODE_ENV!=="production"&&Kt("No coordinate system that supports "+c+" found by the given finder.")},Gu=function(h,c){var v=h._chartsMap,d=h._scheduler;c.eachSeries(function(p){d.updateStreamModes(p,v[p.__viewId])})},$u=function(h,c){var v=this,d=this.getModel(),p=h.type,g=h.escapeConnect,m=Fs[p],y=m.actionInfo,_=(y.update||"update").split(":"),w=_.pop(),b=_[0]!=null&&Je(_[0]);this[Yt]=!0;var S=[h],x=!1;h.batch&&(x=!0,S=X(h.batch,function(L){return L=_t(B({},L),h),L.batch=null,L}));var T=[],M,A=Xf(h),C=ad(h);if(C&&Ay(this._api),D(S,function(L){if(M=m.action(L,v._model,v._api),M=M||B({},L),M.type=y.event||M.type,T.push(M),C){var P=Zh(h),R=P.queryOptionMap,z=P.mainTypeSpecified,k=z?R.keys()[0]:"series";ko(v,w,L,k),xe(v)}else A?(ko(v,w,L,"series"),xe(v)):b&&ko(v,w,L,b.main,b.sub)}),w!=="none"&&!C&&!A&&!b)try{this[oe]?(qn(this),Dr.update.call(this,h),this[oe]=null):Dr[w].call(this,h)}catch(L){throw this[Yt]=!1,L}if(x?M={type:y.event||p,escapeConnect:g,batch:T}:M=T[0],this[Yt]=!1,!c){var I=this._messageCenter;if(I.trigger(M.type,M),A){var E={type:"selectchanged",escapeConnect:g,selected:rT(d),isFromClick:h.isFromClick||!1,fromAction:h.type,fromActionPayload:h};I.trigger(E.type,E)}}},Xi=function(h){for(var c=this._pendingActions;c.length;){var v=c.shift();$u.call(this,v,h)}},qi=function(h){!h&&this.trigger("updated")},bp=function(h,c){h.on("rendered",function(v){c.trigger("rendered",v),h.animation.isFinished()&&!c[oe]&&!c._scheduler.unfinished&&!c._pendingActions.length&&c.trigger("finished")})},Sp=function(h,c){h.on("mouseover",function(v){var d=v.target,p=da(d,Si);p&&(JC(p,v,c._api),xe(c))}).on("mouseout",function(v){var d=v.target,p=da(d,Si);p&&(tT(p,v,c._api),xe(c))}).on("click",function(v){var d=v.target,p=da(d,function(y){return ft(y).dataIndex!=null},!0);if(p){var g=p.selected?"unselect":"select",m=ft(p);c._api.dispatchAction({type:g,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function e(h){h.clearColorPalette(),h.eachSeries(function(c){c.clearColorPalette()})}function n(h){var c=[],v=[],d=!1;if(h.eachComponent(function(y,_){var w=_.get("zlevel")||0,b=_.get("z")||0,S=_.getZLevelKey();d=d||!!S,(y==="series"?v:c).push({zlevel:w,z:b,idx:_.componentIndex,type:y,key:S})}),d){var p=c.concat(v),g,m;Zo(p,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),D(p,function(y){var _=h.getComponent(y.type,y.idx),w=y.zlevel,b=y.key;g!=null&&(w=Math.max(g,w)),b?(w===g&&b!==m&&w++,m=b):m&&(w===g&&w++,m=""),g=w,_.setZLevel(w)})}}Uu=function(h,c,v,d,p){n(c),xp(h,c,v,d,p),D(h._chartsViews,function(g){g.__alive=!1}),Oo(h,c,v,d,p),D(h._chartsViews,function(g){g.__alive||g.remove(c,v)})},xp=function(h,c,v,d,p,g){D(g||h._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,c,v,d),s(y,m),f(y,m)})},Oo=function(h,c,v,d,p,g){var m=h._scheduler;p=B(p||{},{updatedSeries:c.getSeries()}),He.trigger("series:beforeupdate",c,v,p);var y=!1;c.eachSeries(function(_){var w=h._chartsMap[_.__viewId];w.__alive=!0;var b=w.renderTask;m.updatePayload(b,d),u(_,w),g&&g.get(_.uid)&&b.dirty(),b.perform(m.getPerformArgs(b))&&(y=!0),w.group.silent=!!_.get("silent"),o(_,w),nd(_)}),m.unfinished=y||m.unfinished,He.trigger("series:layoutlabels",c,v,p),He.trigger("series:transition",c,v,p),c.eachSeries(function(_){var w=h._chartsMap[_.__viewId];s(_,w),f(_,w)}),a(h,c),He.trigger("series:afterupdate",c,v,p)},xe=function(h){h[zu]=!0,h.getZr().wakeUp()},Tp=function(h){h[zu]&&(h.getZr().storage.traverse(function(c){xa(c)||i(c)}),h[zu]=!1)};function i(h){for(var c=[],v=h.currentStates,d=0;d<v.length;d++){var p=v[d];p==="emphasis"||p==="blur"||p==="select"||c.push(p)}h.selected&&h.states.select&&c.push("select"),h.hoverState===rl&&h.states.emphasis?c.push("emphasis"):h.hoverState===el&&h.states.blur&&c.push("blur"),h.useStates(c)}function a(h,c){var v=h._zr,d=v.storage,p=0;d.traverse(function(g){g.isGroup||p++}),p>c.get("hoverLayerThreshold")&&!K.node&&!K.worker&&c.eachSeries(function(g){if(!g.preventUsingHoverLayer){var m=h._chartsMap[g.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(h,c){var v=h.get("blendMode")||null;c.eachRendered(function(d){d.isGroup||(d.style.blend=v)})}function s(h,c){if(!h.preventAutoZ){var v=h.get("z")||0,d=h.get("zlevel")||0;c.eachRendered(function(p){return l(p,v,d,-1/0),!0})}}function l(h,c,v,d){var p=h.getTextContent(),g=h.getTextGuideLine(),m=h.isGroup;if(m)for(var y=h.childrenRef(),_=0;_<y.length;_++)d=Math.max(l(y[_],c,v,d),d);else h.z=c,h.zlevel=v,d=Math.max(h.z2,d);if(p&&(p.z=c,p.zlevel=v,isFinite(d)&&(p.z2=d+2)),g){var w=h.textGuideLineConfig;g.z=c,g.zlevel=v,isFinite(d)&&(g.z2=d+(w&&w.showAbove?1:-1))}return d}function u(h,c){c.eachRendered(function(v){if(!xa(v)){var d=v.getTextContent(),p=v.getTextGuideLine();v.stateTransition&&(v.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),v.hasState()?(v.prevStates=v.currentStates,v.clearStates()):v.prevStates&&(v.prevStates=null)}})}function f(h,c){var v=h.getModel("stateAnimation"),d=h.isAnimationEnabled(),p=v.get("duration"),g=p>0?{duration:p,delay:v.get("delay"),easing:v.get("easing")}:null;c.eachRendered(function(m){if(m.states&&m.states.emphasis){if(xa(m))return;if(m instanceof vt&&sT(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(d){m.stateTransition=g;var _=m.getTextContent(),w=m.getTextGuideLine();_&&(_.stateTransition=g),w&&(w.stateTransition=g)}m.__dirty&&i(m)}})}Cp=function(h){return new((function(c){O(v,c);function v(){return c!==null&&c.apply(this,arguments)||this}return v.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},v.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return h._model.getComponent(p.mainType,p.index);d=d.parent}},v.prototype.enterEmphasis=function(d,p){bs(d,p),xe(h)},v.prototype.leaveEmphasis=function(d,p){Ss(d,p),xe(h)},v.prototype.enterBlur=function(d){KC(d),xe(h)},v.prototype.leaveBlur=function(d){Cy(d),xe(h)},v.prototype.enterSelect=function(d){Ty(d),xe(h)},v.prototype.leaveSelect=function(d){Dy(d),xe(h)},v.prototype.getModel=function(){return h.getModel()},v.prototype.getViewOfComponentModel=function(d){return h.getViewOfComponentModel(d)},v.prototype.getViewOfSeriesModel=function(d){return h.getViewOfSeriesModel(d)},v})(h0))(h)},t_=function(h){function c(v,d){for(var p=0;p<v.length;p++){var g=v[p];g[Vu]=d}}D(Ma,function(v,d){h._messageCenter.on(d,function(p){if(Dp[h.group]&&h[Vu]!==wp){if(p&&p.escapeConnect)return;var g=h.makeActionFromEvent(p),m=[];D(Aa,function(y){y!==h&&y.group===h.group&&m.push(y)}),c(m,wp),D(m,function(y){y[Vu]!==t2&&y.dispatchAction(g)}),c(m,e2)}})})}})(),t})(Ue),bc=e_.prototype;bc.on=X0("on");bc.off=X0("off");bc.one=function(r,t,e){var n=this;We("ECharts#one is deprecated.");function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];t&&t.apply&&t.apply(this,a),n.off(r,i)}this.on.call(this,r,i,e)};var r2=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];function ge(r){process.env.NODE_ENV!=="production"&&Kt("Instance "+r+" has been disposed")}var Fs={},Ma={},fh=[],hh=[],zs=[],r_={},ch={},Aa={},Dp={},n2=+new Date-0,Sc="_echarts_instance_";function i2(r,t,e){{if(process.env.NODE_ENV!=="production"&&!r)throw new Error("Initialize failed: invalid dom.");var n=a2(r);if(n)return process.env.NODE_ENV!=="production"&&Kt("There is a chart instance already initialized on the dom."),n;process.env.NODE_ENV!=="production"&&_i(r)&&r.nodeName.toUpperCase()!=="CANVAS"&&(!r.clientWidth&&!e||!r.clientHeight&&!e)&&Kt("Can't get DOM width or height. Please check dom.clientWidth and dom.clientHeight. They should not be 0.For example, you may need to call this in the callback of window.onload.")}var i=new e_(r,t,e);return i.id="ec_"+n2++,Aa[i.id]=i,uy(r,Sc,i.id),t_(i),He.trigger("afterinit",i),i}function a2(r){return Aa[Vx(r,Sc)]}function n_(r,t){r_[r]=t}function i_(r){yt(hh,r)<0&&hh.push(r)}function a_(r,t){Cc(fh,r,t,YA)}function o2(r){xc("afterinit",r)}function s2(r){xc("afterupdate",r)}function xc(r,t){He.on(r,t)}function Rn(r,t,e){Q(t)&&(e=t,t="");var n=Z(r)?r.type:[r,r={event:t}][0];r.event=(r.event||n).toLowerCase(),t=r.event,!Ma[t]&&(nt(_p.test(n)&&_p.test(t)),Fs[n]||(Fs[n]={action:e,actionInfo:r}),Ma[t]=n)}function l2(r,t){pc.register(r,t)}function u2(r,t){Cc(zs,r,t,Y0,"layout")}function kn(r,t){Cc(zs,r,t,j0,"visual")}var Mp=[];function Cc(r,t,e,n,i){if((Q(t)||Z(t))&&(e=t,t=n),process.env.NODE_ENV!=="production"){if(isNaN(t)||t==null)throw new Error("Illegal priority");D(r,function(o){nt(o.__raw!==e)})}if(!(yt(Mp,e)>=0)){Mp.push(e);var a=R0.wrapStageHandler(e,i);a.__prio=t,a.__raw=e,r.push(a)}}function o_(r,t){ch[r]=t}function f2(r,t,e){var n=HA("registerMap");n&&n(r,t,e)}var h2=gM;kn(wc,YM);kn(Cl,jM);kn(Cl,ZM);kn(wc,sA);kn(Cl,lA);kn(Z0,zA);i_(v0);a_($A,QD);o_("default",XM);Rn({type:xn,event:xn,update:xn},re);Rn({type:Jo,event:Jo,update:Jo},re);Rn({type:wa,event:wa,update:wa},re);Rn({type:ts,event:ts,update:ts},re);Rn({type:ba,event:ba,update:ba},re);n_("light",aA);n_("dark",B0);function Ki(r){return r==null?0:r.length||1}function Ap(r){return r}var c2=(function(){function r(t,e,n,i,a,o){this._old=t,this._new=e,this._oldKeyGetter=n||Ap,this._newKeyGetter=i||Ap,this.context=a,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,n={},i=new Array(t.length),a=new Array(e.length);this._initIndexMap(t,null,i,"_oldKeyGetter"),this._initIndexMap(e,n,a,"_newKeyGetter");for(var o=0;o<t.length;o++){var s=i[o],l=n[s],u=Ki(l);if(u>1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var t=this._old,e=this._new,n={},i={},a=[],o=[];this._initIndexMap(t,n,a,"_oldKeyGetter"),this._initIndexMap(e,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],f=i[l],h=Ki(u),c=Ki(f);if(h>1&&c===1)this._updateManyToOne&&this._updateManyToOne(f,u),i[l]=null;else if(h===1&&c>1)this._updateOneToMany&&this._updateOneToMany(f,u),i[l]=null;else if(h===1&&c===1)this._update&&this._update(f,u),i[l]=null;else if(h>1&&c>1)this._updateManyToMany&&this._updateManyToMany(f,u),i[l]=null;else if(h>1)for(var v=0;v<h;v++)this._remove&&this._remove(u[v]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(t,e){for(var n=0;n<t.length;n++){var i=t[n],a=e[i],o=Ki(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);e[i]=null}},r.prototype._initIndexMap=function(t,e,n,i){for(var a=this._diffModeMultiple,o=0;o<t.length;o++){var s="_ec_"+this[i](t[o],o);if(a||(n[o]=s),!!e){var l=e[s],u=Ki(l);u===0?(e[s]=o,a&&n.push(s)):u===1?e[s]=[l,o]:l.push(o)}}},r})(),v2=(function(){function r(t,e){this._encode=t,this._schema=e}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r})();function d2(r,t){var e={},n=e.encode={},i=et(),a=[],o=[],s={};D(r.dimensions,function(c){var v=r.getDimensionInfo(c),d=v.coordDim;if(d){process.env.NODE_ENV!=="production"&&nt(th.get(d)==null);var p=v.coordDimIndex;Yu(n,d)[p]=c,v.isExtraCoord||(i.set(d,1),p2(v.type)&&(a[0]=c),Yu(s,d)[p]=r.getDimensionIndex(v.name)),v.defaultTooltip&&o.push(c)}th.each(function(g,m){var y=Yu(n,m),_=v.otherDims[m];_!=null&&_!==!1&&(y[_]=v.name)})});var l=[],u={};i.each(function(c,v){var d=n[v];u[v]=d[0],l=l.concat(d)}),e.dataDimsOnCoord=l,e.dataDimIndicesOnCoord=X(l,function(c){return r.getDimensionInfo(c).storeDimIndex}),e.encodeFirstDimNotExtra=u;var f=n.label;f&&f.length&&(a=f.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,e.userOutput=new v2(s,t),e}function Yu(r,t){return r.hasOwnProperty(t)||(r[t]=[]),r[t]}function vh(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function p2(r){return!(r==="ordinal"||r==="time")}var as=(function(){function r(t){this.otherDims={},t!=null&&B(this,t)}return r})(),g2=Ot(),m2={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},s_=(function(){function r(t){this.dimensions=t.dimensions,this._dimOmitted=t.dimensionOmitted,this.source=t.source,this._fullDimCount=t.fullDimensionCount,this._updateDimOmitted(t.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(t){this._dimOmitted=t,t&&(this._dimNameMap||(this._dimNameMap=f_(this.source)))},r.prototype.getSourceDimensionIndex=function(t){return rt(this._dimNameMap.get(t),-1)},r.prototype.getSourceDimension=function(t){var e=this.source.dimensionsDefine;if(e)return e[t]},r.prototype.makeStoreSchema=function(){for(var t=this._fullDimCount,e=g0(this.source),n=!h_(t),i="",a=[],o=0,s=0;o<t;o++){var l=void 0,u=void 0,f=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=e?h.name:null,u=h.type,f=h.ordinalMeta,s++;else{var c=this.getSourceDimension(o);c&&(l=e?c.name:null,u=c.type)}a.push({property:l,type:u,ordinalMeta:f}),e&&l!=null&&(!h||!h.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=m2[u]||"f",f&&(i+=f.uid),i+="$"}var v=this.source,d=[v.seriesLayoutBy,v.startIndex,i].join("$$");return{dimensions:a,hash:d}},r.prototype.makeOutputDimensionNames=function(){for(var t=[],e=0,n=0;e<this._fullDimCount;e++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===e)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(e);o&&(i=o.name)}t.push(i)}return t},r.prototype.appendCalculationDimension=function(t){this.dimensions.push(t),t.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r})();function l_(r){return r instanceof s_}function u_(r){for(var t=et(),e=0;e<(r||[]).length;e++){var n=r[e],i=Z(n)?n.name:n;i!=null&&t.get(i)==null&&t.set(i,e)}return t}function f_(r){var t=g2(r);return t.dimNameMap||(t.dimNameMap=u_(r.dimensionsDefine))}function h_(r){return r>30}var Qi=Z,Mr=X,y2=typeof Int32Array>"u"?Array:Int32Array,_2="e\0\0",Ip=-1,w2=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],b2=["_approximateExtent"],Ep,No,Ji,Kn,ju,ta,Zu,c_=(function(){function r(t,e){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 n,i=!1;l_(t)?(n=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(i=!0,n=t),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},f=0;f<n.length;f++){var h=n[f],c=G(h)?new as({name:h}):h instanceof as?h:new as(h),v=c.name;c.type=c.type||"float",c.coordDim||(c.coordDim=v,c.coordDimIndex=0);var d=c.otherDims=c.otherDims||{};o.push(v),a[v]=c,u[v]!=null&&(l=!0),c.createInvertedIndices&&(s[v]=[]),d.itemName===0&&(this._nameDimIdx=f),d.itemId===0&&(this._idDimIdx=f),process.env.NODE_ENV!=="production"&&nt(i||c.storeDimIndex>=0),i&&(c.storeDimIndex=f)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=e,this._invertedIndicesMap=s,this._dimOmitted){var p=this._dimIdxToName=et();D(o,function(g){p.set(a[g].storeDimIndex,g)})}}return r.prototype.getDimension=function(t){var e=this._recognizeDimIndex(t);if(e==null)return t;if(e=t,!this._dimOmitted)return this.dimensions[e];var n=this._dimIdxToName.get(e);if(n!=null)return n;var i=this._schema.getSourceDimension(e);if(i)return i.name},r.prototype.getDimensionIndex=function(t){var e=this._recognizeDimIndex(t);if(e!=null)return e;if(t==null)return-1;var n=this._getDimInfo(t);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(t):-1},r.prototype._recognizeDimIndex=function(t){if(St(t)||t!=null&&!isNaN(t)&&!this._getDimInfo(t)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(t)<0))return+t},r.prototype._getStoreDimIndex=function(t){var e=this.getDimensionIndex(t);if(process.env.NODE_ENV!=="production"&&e==null)throw new Error("Unknown dimension "+t);return e},r.prototype.getDimensionInfo=function(t){return this._getDimInfo(this.getDimension(t))},r.prototype._initGetDimensionInfo=function(t){var e=this._dimInfos;this._getDimInfo=t?function(n){return e.hasOwnProperty(n)?e[n]:void 0}:function(n){return e[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(t,e){var n=this._dimSummary;if(e==null)return n.encodeFirstDimNotExtra[t];var i=n.encode[t];return i?i[e]:null},r.prototype.mapDimensionsAll=function(t){var e=this._dimSummary,n=e.encode[t];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(t,e,n){var i=this,a;if(t instanceof rh&&(a=t),!a){var o=this.dimensions,s=gc(t)||ce(t)?new m0(t,o.length):t;a=new rh;var l=Mr(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(e||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=d2(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(t){var e=this._store.appendData(t);this._doInit(e[0],e[1])},r.prototype.appendValues=function(t,e){var n=this._store.appendValues(t,e&&e.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),e)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=e[l],o&&Zu(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var t=this._store,e=this.dimensions,n=0;n<e.length;n++){var i=this._dimInfos[e[n]];i.ordinalMeta&&t.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var t=this._store.getProvider();return this._idDimIdx==null&&t.getSource().sourceFormat!==dr&&!t.fillStorage},r.prototype._doInit=function(t,e){if(!(t>=e)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===Ne;if(l&&!i.pure)for(var u=[],f=t;f<e;f++){var h=i.getItem(f,u);if(!this.hasItemOption&&Ax(h)&&(this.hasItemOption=!0),h){var c=h.name;a[f]==null&&c!=null&&(a[f]=er(c,null));var v=h.id;o[f]==null&&v!=null&&(o[f]=er(v,null))}}if(this._shouldMakeIdFromName())for(var f=t;f<e;f++)Zu(this,f);Ep(this)}},r.prototype.getApproximateExtent=function(t){return this._approximateExtent[t]||this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.setApproximateExtent=function(t,e){e=this.getDimension(e),this._approximateExtent[e]=t.slice()},r.prototype.getCalculationInfo=function(t){return this._calculationInfo[t]},r.prototype.setCalculationInfo=function(t,e){Qi(t)?B(this._calculationInfo,t):this._calculationInfo[t]=e},r.prototype.getName=function(t){var e=this.getRawIndex(t),n=this._nameList[e];return n==null&&this._nameDimIdx!=null&&(n=Ji(this,this._nameDimIdx,e)),n==null&&(n=""),n},r.prototype._getCategory=function(t,e){var n=this._store.get(t,e),i=this._store.getOrdinalMeta(t);return i?i.categories[n]:n},r.prototype.getId=function(t){return No(this,this.getRawIndex(t))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.get(i.storeDimIndex,e)},r.prototype.getByRawIndex=function(t,e){var n=this._store,i=this._dimInfos[t];if(i)return n.getByRawIndex(i.storeDimIndex,e)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(t){return this._store.getDataExtent(this._getStoreDimIndex(t))},r.prototype.getSum=function(t){return this._store.getSum(this._getStoreDimIndex(t))},r.prototype.getMedian=function(t){return this._store.getMedian(this._getStoreDimIndex(t))},r.prototype.getValues=function(t,e){var n=this,i=this._store;return H(t)?i.getValues(Mr(t,function(a){return n._getStoreDimIndex(a)}),e):i.getValues(t)},r.prototype.hasValue=function(t){for(var e=this._dimSummary.dataDimIndicesOnCoord,n=0,i=e.length;n<i;n++)if(isNaN(this._store.get(e[n],t)))return!1;return!0},r.prototype.indexOfName=function(t){for(var e=0,n=this._store.count();e<n;e++)if(this.getName(e)===t)return e;return-1},r.prototype.getRawIndex=function(t){return this._store.getRawIndex(t)},r.prototype.indexOfRawIndex=function(t){return this._store.indexOfRawIndex(t)},r.prototype.rawIndexOf=function(t,e){var n=t&&this._invertedIndicesMap[t];if(process.env.NODE_ENV!=="production"&&!n)throw new Error("Do not supported yet");var i=n&&n[e];return i==null||isNaN(i)?Ip:i},r.prototype.indicesOfNearest=function(t,e,n){return this._store.indicesOfNearest(this._getStoreDimIndex(t),e,n)},r.prototype.each=function(t,e,n){Q(t)&&(n=e,e=t,t=[]);var i=n||this,a=Mr(Kn(t),this._getStoreDimIndex,this);this._store.each(a,i?tt(e,i):e)},r.prototype.filterSelf=function(t,e,n){Q(t)&&(n=e,e=t,t=[]);var i=n||this,a=Mr(Kn(t),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?tt(e,i):e),this},r.prototype.selectRange=function(t){var e=this,n={},i=Ct(t);return D(i,function(a){var o=e._getStoreDimIndex(a);n[o]=t[a]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(t,e,n){Q(t)&&(n=e,e=t,t=[]),n=n||this;var i=[];return this.each(t,function(){i.push(e&&e.apply(this,arguments))},n),i},r.prototype.map=function(t,e,n,i){var a=n||i||this,o=Mr(Kn(t),this._getStoreDimIndex,this),s=ta(this);return s._store=this._store.map(o,a?tt(e,a):e),s},r.prototype.modify=function(t,e,n,i){var a=this,o=n||i||this;process.env.NODE_ENV!=="production"&&D(Kn(t),function(l){var u=a.getDimensionInfo(l);u.isCalculationCoord||console.error("Danger: only stack dimension can be modified")});var s=Mr(Kn(t),this._getStoreDimIndex,this);this._store.modify(s,o?tt(e,o):e)},r.prototype.downSample=function(t,e,n,i){var a=ta(this);return a._store=this._store.downSample(this._getStoreDimIndex(t),e,n,i),a},r.prototype.minmaxDownSample=function(t,e){var n=ta(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(t),e),n},r.prototype.lttbDownSample=function(t,e){var n=ta(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(t),e),n},r.prototype.getRawDataItem=function(t){return this._store.getRawDataItem(t)},r.prototype.getItemModel=function(t){var e=this.hostModel,n=this.getRawDataItem(t);return new At(n,e,e&&e.ecModel)},r.prototype.diff=function(t){var e=this;return new c2(t?t.getStore().getIndices():[],this.getStore().getIndices(),function(n){return No(t,n)},function(n){return No(e,n)})},r.prototype.getVisual=function(t){var e=this._visual;return e&&e[t]},r.prototype.setVisual=function(t,e){this._visual=this._visual||{},Qi(t)?B(this._visual,t):this._visual[t]=e},r.prototype.getItemVisual=function(t,e){var n=this._itemVisuals[t],i=n&&n[e];return i??this.getVisual(e)},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(t,e){var n=this._itemVisuals,i=n[t];i||(i=n[t]={});var a=i[e];return a==null&&(a=this.getVisual(e),H(a)?a=a.slice():Qi(a)&&(a=B({},a)),i[e]=a),a},r.prototype.setItemVisual=function(t,e,n){var i=this._itemVisuals[t]||{};this._itemVisuals[t]=i,Qi(e)?B(i,e):i[e]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){Qi(t)?B(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,n){this._itemLayouts[t]=n?B(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var n=this.hostModel&&this.hostModel.seriesIndex;HC(n,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){D(this._graphicEls,function(n,i){n&&t&&t.call(e,n,i)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Mr(this.dimensions,this._getDimInfo,this),this.hostModel)),ju(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var n=this[t];Q(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var i=n.apply(this,arguments);return e.apply(this,[i].concat(Fh(arguments)))})},r.internalField=(function(){Ep=function(t){var e=t._invertedIndicesMap;D(e,function(n,i){var a=t._dimInfos[i],o=a.ordinalMeta,s=t._store;if(o){n=e[i]=new y2(o.categories.length);for(var l=0;l<n.length;l++)n[l]=Ip;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},Ji=function(t,e,n){return er(t._getCategory(e,n),null)},No=function(t,e){var n=t._idList[e];return n==null&&t._idDimIdx!=null&&(n=Ji(t,t._idDimIdx,e)),n==null&&(n=_2+e),n},Kn=function(t){return H(t)||(t=t!=null?[t]:[]),t},ta=function(t){var e=new r(t._schema?t._schema:Mr(t.dimensions,t._getDimInfo,t),t.hostModel);return ju(e,t),e},ju=function(t,e){D(w2.concat(e.__wrappedMethods||[]),function(n){e.hasOwnProperty(n)&&(t[n]=e[n])}),t.__wrappedMethods=e.__wrappedMethods,D(b2,function(n){t[n]=lt(e[n])}),t._calculationInfo=B({},e._calculationInfo)},Zu=function(t,e){var n=t._nameList,i=t._idList,a=t._nameDimIdx,o=t._idDimIdx,s=n[e],l=i[e];if(s==null&&a!=null&&(n[e]=s=Ji(t,a,e)),l==null&&o!=null&&(i[e]=l=Ji(t,o,e)),l==null&&s!=null){var u=t._nameRepeatCount,f=u[s]=(u[s]||0)+1;l=s,f>1&&(l+="__ec__"+f),i[e]=l}}})(),r})();function v_(r,t){gc(r)||(r=d0(r)),t=t||{};var e=t.coordDimensions||[],n=t.dimensionsDefine||r.dimensionsDefine||[],i=et(),a=[],o=x2(r,e,n,t.dimensionsCount),s=t.canOmitUnusedDimensions&&h_(o),l=n===r.dimensionsDefine,u=l?f_(r):u_(n),f=t.encodeDefine;!f&&t.encodeDefaulter&&(f=t.encodeDefaulter(r,o));for(var h=et(f),c=new S0(o),v=0;v<c.length;v++)c[v]=-1;function d(M){var A=c[M];if(A<0){var C=n[M],I=Z(C)?C:{name:C},E=new as,L=I.name;L!=null&&u.get(L)!=null&&(E.name=E.displayName=L),I.type!=null&&(E.type=I.type),I.displayName!=null&&(E.displayName=I.displayName);var P=a.length;return c[M]=P,E.storeDimIndex=M,a.push(E),E}return a[A]}if(!s)for(var v=0;v<o;v++)d(v);h.each(function(M,A){var C=ne(M).slice();if(C.length===1&&!G(C[0])&&C[0]<0){h.set(A,!1);return}var I=h.set(A,[]);D(C,function(E,L){var P=G(E)?u.get(E):E;P!=null&&P<o&&(I[L]=P,g(d(P),A,L))})});var p=0;D(e,function(M){var A,C,I,E;if(G(M))A=M,E={};else{E=M,A=E.name;var L=E.ordinalMeta;E.ordinalMeta=null,E=B({},E),E.ordinalMeta=L,C=E.dimsDef,I=E.otherDims,E.name=E.coordDim=E.coordDimIndex=E.dimsDef=E.otherDims=null}var P=h.get(A);if(P!==!1){if(P=ne(P),!P.length)for(var R=0;R<(C&&C.length||1);R++){for(;p<o&&d(p).coordDim!=null;)p++;p<o&&P.push(p++)}D(P,function(z,k){var V=d(z);if(l&&E.type!=null&&(V.type=E.type),g(_t(V,E),A,k),V.name==null&&C){var $=C[k];!Z($)&&($={name:$}),V.name=V.displayName=$.name,V.defaultTooltip=$.defaultTooltip}I&&_t(V.otherDims,I)})}});function g(M,A,C){th.get(A)!=null?M.otherDims[A]=C:(M.coordDim=A,M.coordDimIndex=C,i.set(A,!0))}var m=t.generateCoord,y=t.generateCoordCount,_=y!=null;y=m?y||1:0;var w=m||"value";function b(M){M.name==null&&(M.name=M.coordDim)}if(s)D(a,function(M){b(M)}),a.sort(function(M,A){return M.storeDimIndex-A.storeDimIndex});else for(var S=0;S<o;S++){var x=d(S),T=x.coordDim;T==null&&(x.coordDim=C2(w,i,_),x.coordDimIndex=0,(!m||y<=0)&&(x.isExtraCoord=!0),y--),b(x),x.type==null&&(f0(r,S)===me.Must||x.isExtraCoord&&(x.otherDims.itemName!=null||x.otherDims.seriesName!=null))&&(x.type="ordinal")}return S2(a),new s_({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function S2(r){for(var t=et(),e=0;e<r.length;e++){var n=r[e],i=n.name,a=t.get(i)||0;a>0&&(n.name=i+(a-1)),a++,t.set(i,a)}}function x2(r,t,e,n){var i=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,n||0);return D(t,function(a){var o;Z(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function C2(r,t,e){if(e||t.hasKey(r)){for(var n=0;t.hasKey(r+n);)n++;r+=n}return t.set(r,!0),r}var T2=(function(){function r(t){this.coordSysDims=[],this.axisMap=et(),this.categoryAxisMap=et(),this.coordSysName=t}return r})();function D2(r){var t=r.get("coordinateSystem"),e=new T2(t),n=M2[t];if(n)return n(r,e,e.axisMap,e.categoryAxisMap),e}var M2={cartesian2d:function(r,t,e,n){var i=r.getReferringComponents("xAxis",he).models[0],a=r.getReferringComponents("yAxis",he).models[0];if(process.env.NODE_ENV!=="production"){if(!i)throw new Error('xAxis "'+An(r.get("xAxisIndex"),r.get("xAxisId"),0)+'" not found');if(!a)throw new Error('yAxis "'+An(r.get("xAxisIndex"),r.get("yAxisId"),0)+'" not found')}t.coordSysDims=["x","y"],e.set("x",i),e.set("y",a),Qn(i)&&(n.set("x",i),t.firstCategoryDimIndex=0),Qn(a)&&(n.set("y",a),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,n){var i=r.getReferringComponents("singleAxis",he).models[0];if(process.env.NODE_ENV!=="production"&&!i)throw new Error("singleAxis should be specified.");t.coordSysDims=["single"],e.set("single",i),Qn(i)&&(n.set("single",i),t.firstCategoryDimIndex=0)},polar:function(r,t,e,n){var i=r.getReferringComponents("polar",he).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");if(process.env.NODE_ENV!=="production"){if(!o)throw new Error("angleAxis option not found");if(!a)throw new Error("radiusAxis option not found")}t.coordSysDims=["radius","angle"],e.set("radius",a),e.set("angle",o),Qn(a)&&(n.set("radius",a),t.firstCategoryDimIndex=0),Qn(o)&&(n.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,n){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,n){var i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=a.dimensions.slice();D(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),f=o[l];e.set(f,u),Qn(u)&&(n.set(f,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})}};function Qn(r){return r.get("type")==="category"}function A2(r,t,e){e=e||{};var n=e.byIndex,i=e.stackedCoordDimension,a,o,s;I2(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,f,h,c;if(D(a,function(y,_){G(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!f&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(f=y))}),f&&!n&&!u&&(n=!0),f){h="__\0ecstackresult_"+r.id,c="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var v=f.coordDim,d=f.type,p=0;D(a,function(y){y.coordDim===v&&p++});var g={name:h,coordDim:v,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:c,coordDim:c,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(c,d),m.storeDimIndex=s.ensureCalculationDimension(h,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(m)):(a.push(g),a.push(m))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:c,stackResultDimension:h}}function I2(r){return!l_(r.schema)}function Di(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function E2(r,t){return Di(r,t)?r.getCalculationInfo("stackResultDimension"):t}function L2(r,t){var e=r.get("coordinateSystem"),n=pc.get(e),i;return t&&t.coordSysDims&&(i=X(t.coordSysDims,function(a){var o={name:a},s=t.axisMap.get(a);if(s){var l=s.get("type");o.type=vh(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function P2(r,t,e){var n,i;return e&&D(r,function(a,o){var s=a.coordDim,l=e.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),t&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function Tl(r,t,e){e=e||{};var n=t.getSourceManager(),i,a=!1;i=n.getSource(),a=i.sourceFormat===Ne;var o=D2(t),s=L2(t,o),l=e.useEncodeDefaulter,u=Q(l)?l:l?Mt(l0,s,t):null,f={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=v_(i,f),c=P2(h.dimensions,e.createInvertedIndices,o),v=a?null:n.getSharedDataStore(h),d=A2(t,{schema:h,store:v}),p=new c_(h,t);p.setCalculationInfo(d);var g=c!=null&&R2(i)?function(m,y,_,w){return w===c?_:this.defaultDimValueGetter(m,y,_,w)}:null;return p.hasItemOption=!1,p.initData(a?i:v,null,g),p}function R2(r){if(r.sourceFormat===Ne){var t=k2(r.data||[]);return!H(qa(t))}}function k2(r){for(var t=0;t<r.length&&r[t]==null;)t++;return r[t]}var or=(function(){function r(t){this._setting=t||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype.unionExtent=function(t){var e=this._extent;t[0]<e[0]&&(e[0]=t[0]),t[1]>e[1]&&(e[1]=t[1])},r.prototype.unionExtentFromData=function(t,e){this.unionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){var n=this._extent;isNaN(t)||(n[0]=t),isNaN(e)||(n[1]=e)},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r})();Qs(or);var O2=0,dh=(function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++O2}return r.createByAxisModel=function(t){var e=t.option,n=e.data,i=n&&X(n,N2);return new r({categories:i,needCollect:!i,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,n=this._needCollect;if(!G(t)&&!n)return t;if(n&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,e;var i=this._getOrCreateMap();return e=i.get(t),e==null&&(n?(e=this.categories.length,this.categories[e]=t,i.set(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=et(this.categories))},r})();function N2(r){return Z(r)&&r.value!=null?r.value:r+""}function B2(r){var t=Math.pow(10,qs(Math.abs(r))),e=Math.abs(r/t);return e===0||e===1||e===2||e===3||e===5}function ph(r){return r.type==="interval"||r.type==="log"}function F2(r,t,e,n){var i={},a=r[1]-r[0],o=i.interval=ny(a/t);e!=null&&o<e&&(o=i.interval=e),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=d_(o),l=i.niceTickExtent=[Rt(Math.ceil(r[0]/o)*o,s),Rt(Math.floor(r[1]/o)*o,s)];return z2(l,r),i}function Xu(r){var t=Math.pow(10,qs(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,Rt(e*t)}function d_(r){return hr(r)+2}function Lp(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function z2(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Lp(r,0,t),Lp(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function Dl(r,t){return r>=t[0]&&r<=t[1]}function Ml(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function Al(r,t){return r*(t[1]-t[0])+t[0]}var Tc=(function(r){O(t,r);function t(e){var n=r.call(this,e)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new dh({})),H(i)&&(i=new dh({categories:X(i,function(a){return Z(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return t.prototype.parse=function(e){return e==null?NaN:G(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return e=this.parse(e),Dl(e,this._extent)&&this._ordinalMeta.categories[e]!=null},t.prototype.normalize=function(e){return e=this._getTickNumber(this.parse(e)),Ml(e,this._extent)},t.prototype.scale=function(e){return e=Math.round(Al(e,this._extent)),this.getRawOrdinalNumber(e)},t.prototype.getTicks=function(){for(var e=[],n=this._extent,i=n[0];i<=n[1];)e.push({value:i}),i++;return e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=e.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var f=0;o<s;++o){for(;a[f]!=null;)f++;i.push(f),a[f]=o}},t.prototype._getTickNumber=function(e){var n=this._ticksByOrdinalNumber;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getRawOrdinalNumber=function(e){var n=this._ordinalNumbersByTick;return n&&e>=0&&e<n.length?n[e]:e},t.prototype.getLabel=function(e){if(!this.isBlank()){var n=this.getRawOrdinalNumber(e.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},t.prototype.count=function(){return this._extent[1]-this._extent[0]+1},t.prototype.unionExtentFromData=function(e,n){this.unionExtent(e.getApproximateExtent(n))},t.prototype.isInExtentRange=function(e){return e=this._getTickNumber(e),this._extent[0]<=e&&this._extent[1]>=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t})(or);or.registerClass(Tc);var dn=Rt,ki=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return Dl(e,this._extent)},t.prototype.normalize=function(e){return Ml(e,this._extent)},t.prototype.scale=function(e){return Al(e,this._extent)},t.prototype.setExtent=function(e,n){var i=this._extent;isNaN(e)||(i[0]=parseFloat(e)),isNaN(n)||(i[1]=parseFloat(n))},t.prototype.unionExtent=function(e){var n=this._extent;e[0]<n[0]&&(n[0]=e[0]),e[1]>n[1]&&(n[1]=e[1]),this.setExtent(n[0],n[1])},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=d_(e)},t.prototype.getTicks=function(e){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]<a[0]&&(e?s.push({value:dn(a[0]-n,o)}):s.push({value:i[0]}));for(var u=a[0];u<=a[1]&&(s.push({value:u}),u=dn(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var f=s.length?s[s.length-1].value:a[1];return i[1]>f&&(e?s.push({value:dn(f+n,o)}):s.push({value:i[1]})),s},t.prototype.getMinorTicks=function(e){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],l=n[o-1],u=0,f=[],h=s.value-l.value,c=h/e;u<e-1;){var v=dn(l.value+(u+1)*c);v>a[0]&&v<a[1]&&f.push(v),u++}i.push(f)}return i},t.prototype.getLabel=function(e,n){if(e==null)return"";var i=n&&n.precision;i==null?i=hr(e.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=dn(e.value,i,!0);return r0(a)},t.prototype.calcNiceTicks=function(e,n,i){e=e||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=F2(a,e,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},t.prototype.calcNiceExtent=function(e){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);e.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval);var o=this._interval;e.fixMin||(n[0]=dn(Math.floor(n[0]/o)*o)),e.fixMax||(n[1]=dn(Math.ceil(n[1]/o)*o))},t.prototype.setNiceExtent=function(e,n){this._niceExtent=[e,n]},t.type="interval",t})(or);or.registerClass(ki);var p_=typeof Float32Array<"u",V2=p_?Float32Array:Array;function tr(r){return H(r)?p_?new Float32Array(r):r:new V2(r)}var H2="__ec_stack_";function g_(r){return r.get("stack")||H2+r.seriesIndex}function Dc(r){return r.dim+r.index}function m_(r,t){var e=[];return t.eachSeriesByType(r,function(n){__(n)&&e.push(n)}),e}function W2(r){var t={};D(r,function(l){var u=l.coordinateSystem,f=u.getBaseAxis();if(!(f.type!=="time"&&f.type!=="value"))for(var h=l.getData(),c=f.dim+"_"+f.index,v=h.getDimensionIndex(h.mapDimension(f.dim)),d=h.getStore(),p=0,g=d.count();p<g;++p){var m=d.get(v,p);t[c]?t[c].push(m):t[c]=[m]}});var e={};for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}e[n]=a}}return e}function y_(r){var t=W2(r),e=[];return D(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=t[l],f=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),c=Math.abs(h[1]-h[0]);s=u?f/c*u:f}else{var v=n.getData();s=Math.abs(o[1]-o[0])/v.count()}var d=Pt(n.get("barWidth"),s),p=Pt(n.get("barMaxWidth"),s),g=Pt(n.get("barMinWidth")||(w_(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:m,barCategoryGap:y,axisKey:Dc(a),stackId:g_(n)})}),G2(e)}function G2(r){var t={};D(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=t[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;t[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var c=n.barMinWidth;c&&(l[u].minWidth=c);var v=n.barGap;v!=null&&(s.gap=v);var d=n.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return D(t,function(n,i){e[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Ct(a).length;s=Math.max(35-l*4,15)+"%"}var u=Pt(s,o),f=Pt(n.gap,1),h=n.remainedWidth,c=n.autoWidthCount,v=(h-u)/(c+(c-1)*f);v=Math.max(v,0),D(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var w=m.width;y&&(w=Math.min(w,y)),_&&(w=Math.max(w,_)),m.width=w,h-=w+f*w,c--}else{var w=v;y&&y<w&&(w=Math.min(y,h)),_&&_>w&&(w=_),w!==v&&(m.width=w,h-=w+f*w,c--)}}),v=(h-u)/(c+(c-1)*f),v=Math.max(v,0);var d=0,p;D(a,function(m,y){m.width||(m.width=v),p=m,d+=m.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;D(a,function(m,y){e[i][y]=e[i][y]||{bandWidth:o,offset:g,width:m.width},g+=m.width*(1+f)})}),e}function $2(r,t,e){if(r&&t){var n=r[Dc(t)];return n}}function U2(r,t){var e=m_(r,t),n=y_(e);D(e,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=g_(i),u=n[Dc(s)][l],f=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function Y2(r){return{seriesType:r,plan:eo(),reset:function(t){if(__(t)){var e=t.getData(),n=t.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=e.getDimensionIndex(e.mapDimension(a.dim)),s=e.getDimensionIndex(e.mapDimension(i.dim)),l=t.get("showBackground",!0),u=e.mapDimension(a.dim),f=e.getCalculationInfo("stackResultDimension"),h=Di(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),c=a.isHorizontal(),v=j2(i,a),d=w_(t),p=t.get("barMinHeight")||0,g=f&&e.getDimensionIndex(f),m=e.getLayout("size"),y=e.getLayout("offset");return{progress:function(_,w){for(var b=_.count,S=d&&tr(b*3),x=d&&l&&tr(b*3),T=d&&tr(b),M=n.master.getRect(),A=c?M.width:M.height,C,I=w.getStore(),E=0;(C=_.next())!=null;){var L=I.get(h?g:o,C),P=I.get(s,C),R=v,z=void 0;h&&(z=+L-I.get(o,C));var k=void 0,V=void 0,$=void 0,j=void 0;if(c){var J=n.dataToPoint([L,P]);if(h){var it=n.dataToPoint([z,P]);R=it[0]}k=R,V=J[1]+y,$=J[0]-R,j=m,Math.abs($)<p&&($=($<0?-1:1)*p)}else{var J=n.dataToPoint([P,L]);if(h){var it=n.dataToPoint([P,z]);R=it[1]}k=J[0]+y,V=R,$=m,j=J[1]-R,Math.abs(j)<p&&(j=(j<=0?-1:1)*p)}d?(S[E]=k,S[E+1]=V,S[E+2]=c?$:j,x&&(x[E]=c?M.x:k,x[E+1]=c?V:M.y,x[E+2]=A),T[C]=C):w.setItemLayout(C,{x:k,y:V,width:$,height:j}),E+=3}d&&w.setLayout({largePoints:S,largeDataIndices:T,largeBackgroundPoints:x,valueAxisHorizontal:c})}}}}}}function __(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function w_(r){return r.pipelineContext&&r.pipelineContext.large}function j2(r,t){var e=t.model.get("startValue");return e||(e=0),t.toGlobalCoord(t.dataToCoord(t.type==="log"?e>0?e:1:e))}var Z2=function(r,t,e,n){for(;e<n;){var i=e+n>>>1;r[i][1]<t?e=i+1:n=i}return e},b_=(function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n.type="time",n}return t.prototype.getLabel=function(e){var n=this.getSetting("useUTC");return pl(e.value,Sd[gD(mi(this._minLevelUnit))]||Sd.second,n,this.getSetting("locale"))},t.prototype.getFormattedLabel=function(e,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return mD(e,n,i,o,a)},t.prototype.getTicks=function(){var e=this._interval,n=this._extent,i=[];if(!e)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=eI(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},t.prototype.calcNiceExtent=function(e){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Pe,n[1]+=Pe),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Pe}this.calcNiceTicks(e.splitNumber,e.minInterval,e.maxInterval)},t.prototype.calcNiceTicks=function(e,n,i){e=e||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/e,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=Bo.length,l=Math.min(Z2(Bo,this._approxInterval,0,s),s-1);this._interval=Bo[l][1],this._minLevelUnit=Bo[Math.max(l-1,0)][0]},t.prototype.parse=function(e){return St(e)?e:+gr(e)},t.prototype.contain=function(e){return Dl(this.parse(e),this._extent)},t.prototype.normalize=function(e){return Ml(this.parse(e),this._extent)},t.prototype.scale=function(e){return Al(e,this._extent)},t.type="time",t})(ki),Bo=[["second",uc],["minute",fc],["hour",Ca],["quarter-day",Ca*6],["half-day",Ca*12],["day",Pe*1.2],["half-week",Pe*3.5],["week",Pe*7],["month",Pe*31],["quarter",Pe*95],["half-year",bd/2],["year",bd]];function X2(r,t,e,n){var i=gr(t),a=gr(e),o=function(d){return xd(i,d,n)===xd(a,d,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},c=function(){return h()&&o("second")},v=function(){return c()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return c();case"millisecond":return v()}}function q2(r,t){return r/=Pe,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function K2(r){var t=30*Pe;return r/=t,r>6?6:r>3?3:r>2?2:1}function Q2(r){return r/=Ca,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function Pp(r,t){return r/=t?fc:uc,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function J2(r){return ny(r)}function tI(r,t,e){var n=new Date(r);switch(mi(t)){case"year":case"month":n[qy(e)](0);case"day":n[Ky(e)](1);case"hour":n[Qy(e)](0);case"minute":n[Jy(e)](0);case"second":n[t0(e)](0),n[e0(e)](0)}return n.getTime()}function eI(r,t,e,n){var i=1e4,a=Zy,o=0;function s(A,C,I,E,L,P,R){for(var z=new Date(C),k=C,V=z[E]();k<I&&k<=n[1];)R.push({value:k}),V+=A,z[L](V),k=z.getTime();R.push({value:k,notAdd:!0})}function l(A,C,I){var E=[],L=!C.length;if(!X2(mi(A),n[0],n[1],e)){L&&(C=[{value:tI(new Date(n[0]),A,e)},{value:n[1]}]);for(var P=0;P<C.length-1;P++){var R=C[P].value,z=C[P+1].value;if(R!==z){var k=void 0,V=void 0,$=void 0,j=!1;switch(A){case"year":k=Math.max(1,Math.round(t/Pe/365)),V=hc(e),$=yD(e);break;case"half-year":case"quarter":case"month":k=K2(t),V=yi(e),$=qy(e);break;case"week":case"half-week":case"day":k=q2(t),V=gl(e),$=Ky(e),j=!0;break;case"half-day":case"quarter-day":case"hour":k=Q2(t),V=Ba(e),$=Qy(e);break;case"minute":k=Pp(t,!0),V=ml(e),$=Jy(e);break;case"second":k=Pp(t,!1),V=yl(e),$=t0(e);break;case"millisecond":k=J2(t),V=_l(e),$=e0(e);break}s(k,R,z,V,$,j,E),A==="year"&&I.length>1&&P===0&&I.unshift({value:I[0].value-k})}}for(var P=0;P<E.length;P++)I.push(E[P]);return E}}for(var u=[],f=[],h=0,c=0,v=0;v<a.length&&o++<i;++v){var d=mi(a[v]);if(pD(a[v])){l(a[v],u[u.length-1]||[],f);var p=a[v+1]?mi(a[v+1]):null;if(d!==p){if(f.length){c=h,f.sort(function(A,C){return A.value-C.value});for(var g=[],m=0;m<f.length;++m){var y=f[m].value;(m===0||f[m-1].value!==y)&&(g.push(f[m]),y>=n[0]&&y<=n[1]&&h++)}var _=(n[1]-n[0])/t;if(h>_*1.5&&c>_/1.5||(u.push(g),h>_||r===a[v]))break}f=[]}}}process.env.NODE_ENV!=="production"&&o>=i&&Kt("Exceed safe limit.");for(var w=Wt(X(u,function(A){return Wt(A,function(C){return C.value>=n[0]&&C.value<=n[1]&&!C.notAdd})}),function(A){return A.length>0}),b=[],S=w.length-1,v=0;v<w.length;++v)for(var x=w[v],T=0;T<x.length;++T)b.push({value:x[T].value,level:S-v});b.sort(function(A,C){return A.value-C.value});for(var M=[],v=0;v<b.length;++v)(v===0||b[v].value!==b[v-1].value)&&M.push(b[v]);return M}or.registerClass(b_);var Rp=or.prototype,Ia=ki.prototype,rI=Rt,nI=Math.floor,iI=Math.ceil,Fo=Math.pow,Fe=Math.log,Mc=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="log",e.base=10,e._originalScale=new ki,e._interval=0,e}return t.prototype.getTicks=function(e){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=Ia.getTicks.call(this,e);return X(o,function(s){var l=s.value,u=Rt(Fo(this.base,l));return u=l===i[0]&&this._fixMin?zo(u,a[0]):u,u=l===i[1]&&this._fixMax?zo(u,a[1]):u,{value:u}},this)},t.prototype.setExtent=function(e,n){var i=Fe(this.base);e=Fe(Math.max(0,e))/i,n=Fe(Math.max(0,n))/i,Ia.setExtent.call(this,e,n)},t.prototype.getExtent=function(){var e=this.base,n=Rp.getExtent.call(this);n[0]=Fo(e,n[0]),n[1]=Fo(e,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=zo(n[0],a[0])),this._fixMax&&(n[1]=zo(n[1],a[1])),n},t.prototype.unionExtent=function(e){this._originalScale.unionExtent(e);var n=this.base;e[0]=Fe(e[0])/Fe(n),e[1]=Fe(e[1])/Fe(n),Rp.unionExtent.call(this,e)},t.prototype.unionExtentFromData=function(e,n){this.unionExtent(e.getApproximateExtent(n))},t.prototype.calcNiceTicks=function(e){e=e||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=xx(i),o=e/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Rt(iI(n[0]/a)*a),Rt(nI(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){Ia.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.parse=function(e){return e},t.prototype.contain=function(e){return e=Fe(e)/Fe(this.base),Dl(e,this._extent)},t.prototype.normalize=function(e){return e=Fe(e)/Fe(this.base),Ml(e,this._extent)},t.prototype.scale=function(e){return e=Al(e,this._extent),Fo(this.base,e)},t.type="log",t})(or),S_=Mc.prototype;S_.getMinorTicks=Ia.getMinorTicks;S_.getLabel=Ia.getLabel;function zo(r,t){return rI(r,hr(t))}or.registerClass(Mc);var aI=(function(){function r(t,e,n){this._prepareParams(t,e,n)}return r.prototype._prepareParams=function(t,e,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=t.type==="ordinal";this._needCrossZero=t.type==="interval"&&e.getNeedCrossZero&&e.getNeedCrossZero();var a=e.get("min",!0);a==null&&(a=e.get("startValue",!0));var o=this._modelMinRaw=a;Q(o)?this._modelMinNum=Vo(t,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=Vo(t,o));var s=this._modelMaxRaw=e.get("max",!0);if(Q(s)?this._modelMaxNum=Vo(t,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=Vo(t,s)),i)this._axisDataLen=e.getCategories().length;else{var l=e.get("boundaryGap"),u=H(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?(process.env.NODE_ENV!=="production"&&console.warn('Boolean type for boundaryGap is only allowed for ordinal axis. Please use string in percentage instead, e.g., "20%". Currently, boundaryGap is set to be 0.'),this._boundaryGapInner=[0,0]):this._boundaryGapInner=[Wr(u[0],1),Wr(u[1],1)]}},r.prototype.calculate=function(){var t=this._isOrdinal,e=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=t?null:n-e||Math.abs(e),s=this._modelMinRaw==="dataMin"?e:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,f=l!=null;s==null&&(s=t?i?0:NaN:e-a[0]*o),l==null&&(l=t?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=La(s)||La(l)||t&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var c=this._determinedMin,v=this._determinedMax;return c!=null&&(s=c,u=!0),v!=null&&(l=v,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(t,e){process.env.NODE_ENV!=="production"&&nt(!this.frozen),this[sI[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var n=oI[t];process.env.NODE_ENV!=="production"&&nt(!this.frozen&&this[n]==null),this[n]=e},r.prototype.freeze=function(){this.frozen=!0},r})(),oI={min:"_determinedMin",max:"_determinedMax"},sI={min:"_dataMin",max:"_dataMax"};function x_(r,t,e){var n=r.rawExtentInfo;return n||(n=new aI(r,t,e),r.rawExtentInfo=n,n)}function Vo(r,t){return t==null?null:La(t)?NaN:r.parse(t)}function C_(r,t){var e=r.type,n=x_(r,t,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=t.ecModel;if(o&&e==="time"){var s=m_("bar",o),l=!1;if(D(s,function(h){l=l||h.getBaseAxis()===t.axis}),l){var u=y_(s),f=lI(i,a,t,u);i=f.min,a=f.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function lI(r,t,e,n){var i=e.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=$2(n,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;D(o,function(v){s=Math.min(v.offset,s)});var l=-1/0;D(o,function(v){l=Math.max(v.offset+v.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=t-r,h=1-(s+l)/a,c=f/h-f;return t+=c*(l/u),r-=c*(s/u),{min:r,max:t}}function kp(r,t){var e=t,n=C_(r,e),i=n.extent,a=e.get("splitNumber");r instanceof Mc&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function uI(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new Tc({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new b_({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(or.getClass(t)||ki)}}function fI(r){var t=r.scale.getExtent(),e=t[0],n=t[1];return!(e>0&&n>0||e<0&&n<0)}function Oi(r){var t=r.getLabelModel().get("formatter"),e=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?(function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}})(t):G(t)?(function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a??"");return o}})(t):Q(t)?(function(n){return function(i,a){return e!=null&&(a=i.value-e),n(Ac(r,i),a,i.level!=null?{level:i.level}:null)}})(t):function(n){return r.scale.getLabel(n)}}function Ac(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function hI(r){var t=r.model,e=r.scale;if(!(!t.get(["axisLabel","show"])||e.isBlank())){var n,i,a=e.getExtent();e instanceof Tc?i=e.count():(n=e.getTicks(),i=n.length);var o=r.getLabelModel(),s=Oi(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var f=0;f<i;f+=u){var h=n?n[f]:{value:a[0]+f},c=s(h,f),v=o.getTextRect(c),d=cI(v,o.get("rotate")||0);l?l.union(d):l=d}return l}}function cI(r,t){var e=t*Math.PI/180,n=r.width,i=r.height,a=n*Math.abs(Math.cos(e))+Math.abs(i*Math.sin(e)),o=n*Math.abs(Math.sin(e))+Math.abs(i*Math.cos(e)),s=new dt(r.x,r.y,a,o);return s}function Ic(r){var t=r.get("interval");return t??"auto"}function T_(r){return r.type==="category"&&Ic(r.getLabelModel())===0}function D_(r,t){var e={};return D(r.mapDimensionsAll(t),function(n){e[E2(r,n)]=!0}),Ct(e)}function vI(r,t,e){t&&D(D_(t,e),function(n){var i=t.getApproximateExtent(n);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}var dI=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r})(),Op=[],pI={registerPreprocessor:i_,registerProcessor:a_,registerPostInit:o2,registerPostUpdate:s2,registerUpdateLifecycle:xc,registerAction:Rn,registerCoordinateSystem:l2,registerLayout:u2,registerVisual:kn,registerTransform:h2,registerLoading:o_,registerMap:f2,registerImpl:VA,PRIORITY:JA,ComponentModel:ht,ComponentView:Oe,SeriesModel:ke,ChartView:we,registerComponentModel:function(r){ht.registerClass(r)},registerComponentView:function(r){Oe.registerClass(r)},registerSeriesModel:function(r){ke.registerClass(r)},registerChartView:function(r){we.registerClass(r)},registerSubTypeDefaulter:function(r,t){ht.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){yx(r,t)}};function Ge(r){if(H(r)){D(r,function(t){Ge(t)});return}yt(Op,r)>=0||(Op.push(r),Q(r)&&(r={install:r}),r.install(pI))}var Ga=Ot();function M_(r,t){var e=X(t,function(n){return r.scale.parse(n)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function gI(r){var t=r.getLabelModel().get("customValues");if(t){var e=Oi(r),n=r.scale.getExtent(),i=M_(r,t),a=Wt(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:X(a,function(o){var s={value:o};return{formattedLabel:e(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?yI(r):wI(r)}function mI(r,t){var e=r.getTickModel().get("customValues");if(e){var n=r.scale.getExtent(),i=M_(r,e);return{ticks:Wt(i,function(a){return a>=n[0]&&a<=n[1]})}}return r.type==="category"?_I(r,t):{ticks:X(r.scale.getTicks(),function(a){return a.value})}}function yI(r){var t=r.getLabelModel(),e=A_(r,t);return!t.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:e.labelCategoryInterval}:e}function A_(r,t){var e=I_(r,"labels"),n=Ic(t),i=E_(e,n);if(i)return i;var a,o;return Q(n)?a=R_(r,n):(o=n==="auto"?bI(r):n,a=P_(r,o)),L_(e,n,{labels:a,labelCategoryInterval:o})}function _I(r,t){var e=I_(r,"ticks"),n=Ic(t),i=E_(e,n);if(i)return i;var a,o;if((!t.get("show")||r.scale.isBlank())&&(a=[]),Q(n))a=R_(r,n,!0);else if(n==="auto"){var s=A_(r,r.getLabelModel());o=s.labelCategoryInterval,a=X(s.labels,function(l){return l.tickValue})}else o=n,a=P_(r,o,!0);return L_(e,n,{ticks:a,tickCategoryInterval:o})}function wI(r){var t=r.scale.getTicks(),e=Oi(r);return{labels:X(t,function(n,i){return{level:n.level,formattedLabel:e(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function I_(r,t){return Ga(r)[t]||(Ga(r)[t]=[])}function E_(r,t){for(var e=0;e<r.length;e++)if(r[e].key===t)return r[e].value}function L_(r,t,e){return r.push({key:t,value:e}),e}function bI(r){var t=Ga(r).autoInterval;return t??(Ga(r).autoInterval=r.calculateCategoryInterval())}function SI(r){var t=xI(r),e=Oi(r),n=(t.axisRotate-t.labelRotate)/180*Math.PI,i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(n)),h=Math.abs(u*Math.sin(n)),c=0,v=0;l<=a[1];l+=s){var d=0,p=0,g=Uh(e({value:l}),t.font,"center","top");d=g.width*1.3,p=g.height*1.3,c=Math.max(c,d,7),v=Math.max(v,p,7)}var m=c/f,y=v/h;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),w=Ga(r.model),b=r.getExtent(),S=w.lastAutoInterval,x=w.lastTickCount;return S!=null&&x!=null&&Math.abs(S-_)<=1&&Math.abs(x-o)<=1&&S>_&&w.axisExtent0===b[0]&&w.axisExtent1===b[1]?_=S:(w.lastTickCount=o,w.lastAutoInterval=_,w.axisExtent0=b[0],w.axisExtent1=b[1]),_}function xI(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function P_(r,t,e){var n=Oi(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=a[0],f=i.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=T_(r),c=o.get("showMinLabel")||h,v=o.get("showMaxLabel")||h;c&&u!==a[0]&&p(a[0]);for(var d=u;d<=a[1];d+=l)p(d);v&&d-l!==a[1]&&p(a[1]);function p(g){var m={value:g};s.push(e?g:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:g})}return s}function R_(r,t,e){var n=r.scale,i=Oi(r),a=[];return D(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;t(o.value,s)&&a.push(e?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var Np=[0,1],CI=(function(){function r(t,e,n){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=n||[0,0]}return r.prototype.contain=function(t){var e=this._extent,n=Math.min(e[0],e[1]),i=Math.max(e[0],e[1]);return t>=n&&t<=i},r.prototype.containData=function(t){return this.scale.contain(t)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return ey(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var n=this._extent;n[0]=t,n[1]=e},r.prototype.dataToCoord=function(t,e){var n=this._extent,i=this.scale;return t=i.normalize(t),this.onBand&&i.type==="ordinal"&&(n=n.slice(),Bp(n,i.count())),Xt(t,Np,n,e)},r.prototype.coordToData=function(t,e){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),Bp(n,i.count()));var a=Xt(t,n,Np,e);return this.scale.scale(a)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),n=mI(this,e),i=n.ticks,a=X(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return TI(this,a,o,t.clamp),a},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var n=this.scale.getMinorTicks(e),i=X(n,function(a){return X(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return gI(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),n=e[1]-e[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(t[1]-t[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return SI(this)},r})();function Bp(r,t){var e=r[1]-r[0],n=t,i=e/n/2;r[0]+=i,r[1]-=i}function TI(r,t,e,n){var i=t.length;if(!r.onBand||e||!i)return;var a=r.getExtent(),o,s;if(i===1)t[0].coord=a[0],o=t[1]={coord:a[1],tickValue:t[0].tickValue};else{var l=t[i-1].tickValue-t[0].tickValue,u=(t[i-1].coord-t[0].coord)/l;D(t,function(v){v.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-t[i-1].tickValue,o={coord:t[i-1].coord+u*s,tickValue:f[1]+1},t.push(o)}var h=a[0]>a[1];c(t[0].coord,a[0])&&(n?t[0].coord=a[0]:t.shift()),n&&c(a[0],t[0].coord)&&t.unshift({coord:a[0]}),c(a[1],o.coord)&&(n?o.coord=a[1]:t.pop()),n&&c(o.coord,a[1])&&t.push({coord:a[1]});function c(v,d){return v=Rt(v),d=Rt(d),h?v>d:v<d}}function DI(r){for(var t=[],e=0;e<r.length;e++){var n=r[e];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,l=i.style.margin||0,u=o.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var f=s?new Ts(o,a):null;t.push({label:i,labelLine:n.labelLine,rect:u,localRect:o,obb:f,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return t}function MI(r){var t=[];r.sort(function(p,g){return g.priority-p.priority});var e=new dt(0,0,0,0);function n(p){if(!p.ignore){var g=p.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}p.ignore=!0}for(var i=0;i<r.length;i++){var a=r[i],o=a.axisAligned,s=a.localRect,l=a.transform,u=a.label,f=a.labelLine;e.copy(a.rect),e.width-=.1,e.height-=.1,e.x+=.05,e.y+=.05;for(var h=a.obb,c=!1,v=0;v<t.length;v++){var d=t[v];if(e.intersect(d.rect)){if(o&&d.axisAligned){c=!0;break}if(d.obb||(d.obb=new Ts(d.localRect,d.transform)),h||(h=new Ts(s,l)),h.intersect(d.obb)){c=!0;break}}}c?(n(u),f&&n(f)):(u.attr("ignore",a.defaultAttr.ignore),f&&f.attr("ignore",a.defaultAttr.labelGuideIgnore),t.push(a))}}var AI=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e){if(process.env.NODE_ENV!=="production"){var n=e.coordinateSystem;if(n!=="polar"&&n!=="cartesian2d")throw new Error("Line not support coordinateSystem besides cartesian and polar")}return Tl(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var n=new kt,i=yr("line",0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);n.add(i),i.setStyle(e.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=e.itemHeight*.8,u=yr(s,(e.itemWidth-l)/2,(e.itemHeight-l)/2,l,l,e.itemStyle.fill);n.add(u),u.setStyle(e.itemStyle);var f=e.iconRotate==="inherit"?o:e.iconRotate||0;return u.rotation=f*Math.PI/180,u.setOrigin([e.itemWidth/2,e.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),n},t.type="series.line",t.dependencies=["grid","polar"],t.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},t})(ke);function Ec(r,t){var e=r.mapDimensionsAll("defaultedLabel"),n=e.length;if(n===1){var i=Ti(r,t,e[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<e.length;o++)a.push(Ti(r,t,e[o]));return a.join(" ")}}function k_(r,t){var e=r.mapDimensionsAll("defaultedLabel");if(!H(t))return t+"";for(var n=[],i=0;i<e.length;i++){var a=r.getDimensionIndex(e[i]);a>=0&&n.push(t[a])}return n.join(" ")}var Lc=(function(r){O(t,r);function t(e,n,i,a){var o=r.call(this)||this;return o.updateData(e,n,i,a),o}return t.prototype._createSymbol=function(e,n,i,a,o){this.removeAll();var s=yr(e,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=II,this._symbolType=e,this.add(s)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){bs(this.childAt(0))},t.prototype.downplay=function(){Ss(this.childAt(0))},t.prototype.setZ=function(e,n){var i=this.childAt(0);i.zlevel=e,i.z=n},t.prototype.setDraggable=function(e,n){var i=this.childAt(0);i.draggable=e,i.cursor=!n&&e?"move":i.cursor},t.prototype.updateData=function(e,n,i,a){this.silent=!1;var o=e.getItemVisual(n,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,n),u=o!==this._symbolType,f=a&&a.disableAnimation;if(u){var h=e.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,e,n,l,h)}else{var c=this.childAt(0);c.silent=!1;var v={scaleX:l[0]/2,scaleY:l[1]/2};f?c.attr(v):ve(c,v,s,n),ic(c)}if(this._updateCommon(e,n,l,i,a),u){var c=this.childAt(0);if(!f){var v={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:c.style.opacity}};c.scaleX=c.scaleY=0,c.style.opacity=0,ir(c,v,s,n)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,n,i,a,o){var s=this.childAt(0),l=e.hostModel,u,f,h,c,v,d,p,g,m;if(a&&(u=a.emphasisItemStyle,f=a.blurItemStyle,h=a.selectItemStyle,c=a.focus,v=a.blurScope,p=a.labelStatesModels,g=a.hoverScale,m=a.cursorStyle,d=a.emphasisDisabled),!a||e.hasItemOption){var y=a&&a.itemModel?a.itemModel:e.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),f=y.getModel(["blur","itemStyle"]).getItemStyle(),c=_.get("focus"),v=_.get("blurScope"),d=_.get("disabled"),p=hl(y),g=_.getShallow("scale"),m=y.getShallow("cursor")}var w=e.getItemVisual(n,"symbolRotate");s.attr("rotation",(w||0)*Math.PI/180||0);var b=F0(e.getItemVisual(n,"symbolOffset"),i);b&&(s.x=b[0],s.y=b[1]),m&&s.attr("cursor",m);var S=e.getItemVisual(n,"style"),x=S.fill;if(s instanceof $r){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},S))}else s.__isEmptyBrush?s.useStyle(B({},S)):s.useStyle(S),s.style.decal=null,s.setColor(x,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var M=e.getItemVisual(n,"liftZ"),A=this._z2;M!=null?A==null&&(this._z2=s.z2,s.z2+=M):A!=null&&(s.z2=A,this._z2=null);var C=o&&o.useNameLabel;fl(s,p,{labelFetcher:l,labelDataIndex:n,defaultText:I,inheritColor:x,defaultOpacity:S.opacity});function I(P){return C?e.getName(P):Ec(e,P)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var E=s.ensureState("emphasis");E.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var L=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;E.scaleX=this._sizeX*L,E.scaleY=this._sizeY*L,this.setSymbolScale(1),ka(this,c,v,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,n,i){var a=this.childAt(0),o=ft(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Ds(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Ds(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,n){return xA(e.getItemVisual(n,"symbolSize"))},t})(kt);function II(r,t){this.parent.drift(r,t)}function qu(r,t,e,n){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(n.isIgnore&&n.isIgnore(e))&&!(n.clipShape&&!n.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function Fp(r){return r!=null&&!Z(r)&&(r={isIgnore:r}),r||{}}function zp(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:hl(t),cursorStyle:t.get("cursor")}}var O_=(function(){function r(t){this.group=new kt,this._SymbolCtor=t||Lc}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=Fp(e);var n=this.group,i=t.hostModel,a=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=zp(t),u={disableAnimation:s},f=e.getSymbolPoint||function(h){return t.getItemLayout(h)};a||n.removeAll(),t.diff(a).add(function(h){var c=f(h);if(qu(t,c,h,e)){var v=new o(t,h,l,u);v.setPosition(c),t.setItemGraphicEl(h,v),n.add(v)}}).update(function(h,c){var v=a.getItemGraphicEl(c),d=f(h);if(!qu(t,d,h,e)){n.remove(v);return}var p=t.getItemVisual(h,"symbol")||"circle",g=v&&v.getSymbolType&&v.getSymbolType();if(!v||g&&g!==p)n.remove(v),v=new o(t,h,l,u),v.setPosition(d);else{v.updateData(t,h,l,u);var m={x:d[0],y:d[1]};s?v.attr(m):ve(v,m,i)}n.add(v),t.setItemGraphicEl(h,v)}).remove(function(h){var c=a.getItemGraphicEl(h);c&&c.fadeOut(function(){n.remove(c)},i)}).execute(),this._getSymbolPoint=f,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(n,i){var a=t._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=zp(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,n){this._progressiveEls=[],n=Fp(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=t.start;a<t.end;a++){var o=e.getItemLayout(a);if(qu(e,o,a,n)){var s=new this._SymbolCtor(e,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),e.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(t){Ja(this._progressiveEls||this.group,t)},r.prototype.remove=function(t){var e=this.group,n=this._data;n&&t?n.eachItemGraphicEl(function(i){i.fadeOut(function(){e.remove(i)},n.hostModel)}):e.removeAll()},r})();function N_(r,t,e){var n=r.getBaseAxis(),i=r.getOtherAxis(n),a=EI(i,e),o=n.dim,s=i.dim,l=t.mapDimension(s),u=t.mapDimension(o),f=s==="x"||s==="radius"?1:0,h=X(r.dimensions,function(d){return t.mapDimension(d)}),c=!1,v=t.getCalculationInfo("stackResultDimension");return Di(t,h[0])&&(c=!0,h[0]=v),Di(t,h[1])&&(c=!0,h[1]=v),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!c,valueDim:l,baseDim:u,baseDataOffset:f,stackedOverDimension:t.getCalculationInfo("stackedOverDimension")}}function EI(r,t){var e=0,n=r.scale.getExtent();return t==="start"?e=n[0]:t==="end"?e=n[1]:St(t)&&!isNaN(t)?e=t:n[0]>0?e=n[0]:n[1]<0&&(e=n[1]),e}function B_(r,t,e,n){var i=NaN;r.stacked&&(i=e.get(e.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=e.get(r.baseDim,n),o[1-a]=i,t.dataToPoint(o)}function LI(r,t){var e=[];return t.diff(r).add(function(n){e.push({cmd:"+",idx:n})}).update(function(n,i){e.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){e.push({cmd:"-",idx:n})}).execute(),e}function PI(r,t,e,n,i,a,o,s){for(var l=LI(r,t),u=[],f=[],h=[],c=[],v=[],d=[],p=[],g=N_(i,t,o),m=r.getLayout("points")||[],y=t.getLayout("points")||[],_=0;_<l.length;_++){var w=l[_],b=!0,S=void 0,x=void 0;switch(w.cmd){case"=":S=w.idx*2,x=w.idx1*2;var T=m[S],M=m[S+1],A=y[x],C=y[x+1];(isNaN(T)||isNaN(M))&&(T=A,M=C),u.push(T,M),f.push(A,C),h.push(e[S],e[S+1]),c.push(n[x],n[x+1]),p.push(t.getRawIndex(w.idx1));break;case"+":var I=w.idx,E=g.dataDimsForPoint,L=i.dataToPoint([t.get(E[0],I),t.get(E[1],I)]);x=I*2,u.push(L[0],L[1]),f.push(y[x],y[x+1]);var P=B_(g,i,t,I);h.push(P[0],P[1]),c.push(n[x],n[x+1]),p.push(t.getRawIndex(I));break;case"-":b=!1}b&&(v.push(w),d.push(d.length))}d.sort(function(ot,Jt){return p[ot]-p[Jt]});for(var R=u.length,z=tr(R),k=tr(R),V=tr(R),$=tr(R),j=[],_=0;_<d.length;_++){var J=d[_],it=_*2,at=J*2;z[it]=u[at],z[it+1]=u[at+1],k[it]=f[at],k[it+1]=f[at+1],V[it]=h[at],V[it+1]=h[at+1],$[it]=c[at],$[it+1]=c[at+1],j[_]=v[J]}return{current:z,next:k,stackedOnCurrent:V,stackedOnNext:$,status:j}}var Ar=Math.min,Ir=Math.max;function Cn(r,t){return isNaN(r)||isNaN(t)}function gh(r,t,e,n,i,a,o,s,l){for(var u,f,h,c,v,d,p=e,g=0;g<n;g++){var m=t[p*2],y=t[p*2+1];if(p>=i||p<0)break;if(Cn(m,y)){if(l){p+=a;continue}break}if(p===e)r[a>0?"moveTo":"lineTo"](m,y),h=m,c=y;else{var _=m-u,w=y-f;if(_*_+w*w<.5){p+=a;continue}if(o>0){for(var b=p+a,S=t[b*2],x=t[b*2+1];S===m&&x===y&&g<n;)g++,b+=a,p+=a,S=t[b*2],x=t[b*2+1],m=t[p*2],y=t[p*2+1],_=m-u,w=y-f;var T=g+1;if(l)for(;Cn(S,x)&&T<n;)T++,b+=a,S=t[b*2],x=t[b*2+1];var M=.5,A=0,C=0,I=void 0,E=void 0;if(T>=n||Cn(S,x))v=m,d=y;else{A=S-u,C=x-f;var L=m-u,P=S-m,R=y-f,z=x-y,k=void 0,V=void 0;if(s==="x"){k=Math.abs(L),V=Math.abs(P);var $=A>0?1:-1;v=m-$*k*o,d=y,I=m+$*V*o,E=y}else if(s==="y"){k=Math.abs(R),V=Math.abs(z);var j=C>0?1:-1;v=m,d=y-j*k*o,I=m,E=y+j*V*o}else k=Math.sqrt(L*L+R*R),V=Math.sqrt(P*P+z*z),M=V/(V+k),v=m-A*o*(1-M),d=y-C*o*(1-M),I=m+A*o*M,E=y+C*o*M,I=Ar(I,Ir(S,m)),E=Ar(E,Ir(x,y)),I=Ir(I,Ar(S,m)),E=Ir(E,Ar(x,y)),A=I-m,C=E-y,v=m-A*k/V,d=y-C*k/V,v=Ar(v,Ir(u,m)),d=Ar(d,Ir(f,y)),v=Ir(v,Ar(u,m)),d=Ir(d,Ar(f,y)),A=m-v,C=y-d,I=m+A*V/k,E=y+C*V/k}r.bezierCurveTo(h,c,v,d,m,y),h=I,c=E}else r.lineTo(m,y)}u=m,f=y,p+=a}return g}var F_=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),RI=(function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polyline",n}return t.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},t.prototype.getDefaultShape=function(){return new F_},t.prototype.buildPath=function(e,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Cn(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Cn(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=gh(e,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},t.prototype.getPointOn=function(e,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=Ln.CMD,s,l,u=n==="x",f=[],h=0;h<a.length;){var c=a[h++],v=void 0,d=void 0,p=void 0,g=void 0,m=void 0,y=void 0,_=void 0;switch(c){case o.M:s=a[h++],l=a[h++];break;case o.L:if(v=a[h++],d=a[h++],_=u?(e-s)/(v-s):(e-l)/(d-l),_<=1&&_>=0){var w=u?(d-l)*_+l:(v-s)*_+s;return u?[e,w]:[w,e]}s=v,l=d;break;case o.C:v=a[h++],d=a[h++],p=a[h++],g=a[h++],m=a[h++],y=a[h++];var b=u?hs(s,v,p,m,e,f):hs(l,d,g,y,e,f);if(b>0)for(var S=0;S<b;S++){var x=f[S];if(x<=1&&x>=0){var w=u?Gt(l,d,g,y,x):Gt(s,v,p,m,x);return u?[e,w]:[w,e]}}s=m,l=y;break}}},t})(vt),kI=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t})(F_),OI=(function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n.type="ec-polygon",n}return t.prototype.getDefaultShape=function(){return new kI},t.prototype.buildPath=function(e,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Cn(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Cn(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=gh(e,i,o,s,s,1,n.smooth,l,n.connectNulls);gh(e,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,e.closePath()}},t})(vt);function z_(r,t,e,n,i){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,f=e.get(["lineStyle","width"])||0;o-=f/2,s-=f/2,l+=f,u+=f,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new Tt({shape:{x:o,y:s,width:l,height:u}});if(t){var c=r.getBaseAxis(),v=c.isHorizontal(),d=c.inverse;v?(d&&(h.shape.x+=l),h.shape.width=0):(d||(h.shape.y+=u),h.shape.height=0);var p=Q(i)?function(g){i(g,h)}:null;ir(h,{shape:{width:l,height:u,x:o,y:s}},e,null,n,p)}return h}function V_(r,t,e){var n=r.getArea(),i=Rt(n.r0,1),a=Rt(n.r,1),o=new Pi({shape:{cx:Rt(r.cx,1),cy:Rt(r.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(t){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,ir(o,{shape:{endAngle:n.endAngle,r:a}},e)}return o}function H_(r,t,e,n,i){if(r){if(r.type==="polar")return V_(r,t,e);if(r.type==="cartesian2d")return z_(r,t,e,n,i)}else return null;return null}function Pc(r,t){return r.type===t}function Vp(r,t){if(r.length===t.length){for(var e=0;e<r.length;e++)if(r[e]!==t[e])return;return!0}}function Hp(r){for(var t=1/0,e=1/0,n=-1/0,i=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(t=Math.min(o,t),n=Math.max(o,n)),isNaN(s)||(e=Math.min(s,e),i=Math.max(s,i))}return[[t,e],[n,i]]}function Wp(r,t){var e=Hp(r),n=e[0],i=e[1],a=Hp(t),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function Gp(r){return St(r)?r:r?.5:0}function NI(r,t,e){if(!e.valueDim)return[];for(var n=t.count(),i=tr(n*2),a=0;a<n;a++){var o=B_(e,r,t,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function Er(r,t,e,n,i){var a=e.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],f=[],h=[],c=[];if(i){for(l=0;l<r.length;l+=2){var v=t||r;!isNaN(v[l])&&!isNaN(v[l+1])&&c.push(r[l],r[l+1])}r=c}for(l=0;l<r.length-2;l+=2)switch(h[0]=r[l+2],h[1]=r[l+3],f[0]=r[l],f[1]=r[l+1],s.push(f[0],f[1]),n){case"end":u[o]=h[o],u[1-o]=f[1-o],s.push(u[0],u[1]);break;case"middle":var d=(f[o]+h[o])/2,p=[];u[o]=p[o]=d,u[1-o]=f[1-o],p[1-o]=h[1-o],s.push(u[0],u[1]),s.push(p[0],p[1]);break;default:u[o]=f[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function BI(r,t){var e=[],n=r.length,i,a;function o(f,h,c){var v=f.coord,d=(c-v)/(h.coord-v),p=US(d,[f.color,h.color]);return{coord:c,color:p}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>t){a?e.push(o(a,l,t)):i&&e.push(o(i,l,0),o(i,l,t));break}else i&&(e.push(o(i,l,0)),i=null),e.push(l),a=l}return e}function FI(r,t,e){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())){if(t.type!=="cartesian2d"){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style is only supported on cartesian2d.");return}for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(!a){process.env.NODE_ENV!=="production"&&console.warn("Visual map on line style only support x or y dimension.");return}var l=t.getAxis(i),u=X(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=a.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var c=BI(u,i==="x"?e.getWidth():e.getHeight()),v=c.length;if(!v&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var d=10,p=c[0].coord-d,g=c[v-1].coord+d,m=g-p;if(m<.001)return"transparent";D(c,function(_){_.offset=(_.coord-p)/m}),c.push({offset:v?c[v-1].offset:.5,color:h[1]||"transparent"}),c.unshift({offset:v?c[0].offset:.5,color:h[0]||"transparent"});var y=new Ny(0,0,0,0,c,!0);return y[i]=p,y[i+"2"]=g,y}}function zI(r,t,e){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=e.getAxesByScale("ordinal")[0];if(a&&!(i&&VI(a,t))){var o=t.mapDimension(a.dim),s={};return D(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function VI(r,t){var e=r.getExtent(),n=Math.abs(e[1]-e[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Lc.getSymbolSize(t,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function HI(r,t){return isNaN(r)||isNaN(t)}function WI(r){for(var t=r.length/2;t>0&&HI(r[t*2-2],r[t*2-1]);t--);return t-1}function $p(r,t){return[r[t*2],r[t*2+1]]}function GI(r,t,e){for(var n=r.length/2,i=e==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[u*2+1-i]))){if(u===0){a=o;continue}if(a<=t&&o>=t||a>=t&&o<=t){l=u;break}s=u,a=o}return{range:[s,l],t:(t-a)/(o-a)}}function W_(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<nr.length;t++)if(r.get([nr[t],"endLabel","show"]))return!0;return!1}function Ku(r,t,e,n){if(Pc(t,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=W_(n)?function(v,d){r._endLabelOnDuring(v,d,o,s,a,i,t)}:null,u=t.getBaseAxis().isHorizontal(),f=z_(t,e,n,function(){var v=r._endLabel;v&&e&&s.originalX!=null&&v.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var h=f.shape,c=Math.max(h.width,h.height);u?(h.y-=c,h.height+=c*2):(h.x-=c,h.width+=c*2)}return l&&l(1,f),f}else return process.env.NODE_ENV!=="production"&&n.get(["endLabel","show"])&&console.warn("endLabel is not supported for lines in polar systems."),V_(t,e,n)}function $I(r,t){var e=t.getBaseAxis(),n=e.isHorizontal(),i=e.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var UI=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new kt,n=new O_;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=e,this._changePolyState=tt(this._changePolyState,this)},t.prototype.render=function(e,n,i){var a=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),f=s.getLayout("points")||[],h=a.type==="polar",c=this._coordSys,v=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,m=!n.ssr&&e.get("animation"),y=!u.isEmpty(),_=u.get("origin"),w=N_(a,s,_),b=y&&NI(a,s,w),S=e.get("showSymbol"),x=e.get("connectNulls"),T=S&&!h&&zI(e,s,a),M=this._data;M&&M.eachItemGraphicEl(function(ot,Jt){ot.__temp&&(o.remove(ot),M.setItemGraphicEl(Jt,null))}),S||v.remove(),o.add(g);var A=h?!1:e.get("step"),C;a&&a.getArea&&e.get("clip",!0)&&(C=a.getArea(),C.width!=null?(C.x-=.1,C.y-=.1,C.width+=.2,C.height+=.2):C.r0&&(C.r0-=.5,C.r+=.5)),this._clipShapeForSymbol=C;var I=FI(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&c.type===a.type&&A===this._step))S&&v.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(ot){return[f[ot*2],f[ot*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,C),A&&(b&&(b=Er(b,f,a,A,x)),f=Er(f,null,a,A,x)),d=this._newPolyline(f),y?p=this._newPolygon(f,b):p&&(g.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(e,a,Pn(I)),g.setClipPath(Ku(this,a,!0,e));else{y&&!p?p=this._newPolygon(f,b):p&&!y&&(g.remove(p),p=this._polygon=null),h||this._initOrUpdateEndLabel(e,a,Pn(I));var E=g.getClipPath();if(E){var L=Ku(this,a,!1,e);ir(E,{shape:L.shape},e)}else g.setClipPath(Ku(this,a,!0,e));S&&v.updateData(s,{isIgnore:T,clipShape:C,disableAnimation:!0,getSymbolPoint:function(ot){return[f[ot*2],f[ot*2+1]]}}),(!Vp(this._stackedOnPoints,b)||!Vp(this._points,f))&&(m?this._doUpdateAnimation(s,b,a,i,A,_,x):(A&&(b&&(b=Er(b,f,a,A,x)),f=Er(f,null,a,A,x)),d.setShape({points:f}),p&&p.setShape({points:f,stackedOnPoints:b})))}var P=e.getModel("emphasis"),R=P.get("focus"),z=P.get("blurScope"),k=P.get("disabled");if(d.useStyle(_t(l.getLineStyle(),{fill:"none",stroke:I,lineJoin:"bevel"})),Cs(d,e,"lineStyle"),d.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var V=d.getState("emphasis").style;V.lineWidth=+d.style.lineWidth+1}ft(d).seriesIndex=e.seriesIndex,ka(d,R,z,k);var $=Gp(e.get("smooth")),j=e.get("smoothMonotone");if(d.setShape({smooth:$,smoothMonotone:j,connectNulls:x}),p){var J=s.getCalculationInfo("stackedOnSeries"),it=0;p.useStyle(_t(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),J&&(it=Gp(J.get("smooth"))),p.setShape({smooth:$,stackedOnSmooth:it,smoothMonotone:j,connectNulls:x}),Cs(p,e,"areaStyle"),ft(p).seriesIndex=e.seriesIndex,ka(p,R,z,k)}var at=this._changePolyState;s.eachItemGraphicEl(function(ot){ot&&(ot.onHoverStateChange=at)}),this._polyline.onHoverStateChange=at,this._data=s,this._coordSys=a,this._stackedOnPoints=b,this._points=f,this._step=A,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,n){ft(n).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,n,i,a){var o=e.getData(),s=En(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var c=e.get("zlevel")||0,v=e.get("z")||0;u=new Lc(o,s),u.x=f,u.y=h,u.setZ(c,v);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=c,d.z=v,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else we.prototype.highlight.call(this,e,n,i,a)},t.prototype.downplay=function(e,n,i,a){var o=e.getData(),s=En(o,a);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else we.prototype.downplay.call(this,e,n,i,a)},t.prototype._changePolyState=function(e){var n=this._polygon;td(this._polyline,e),n&&td(n,e)},t.prototype._newPolyline=function(e){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new RI({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},t.prototype._newPolygon=function(e,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new OI({shape:{points:e,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},t.prototype._initSymbolLabelAnimation=function(e,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=e.hostModel,f=u.get("animationDuration");Q(f)&&(f=f(null));var h=u.get("animationDelay")||0,c=Q(h)?h(null):h;e.eachItemGraphicEl(function(v,d){var p=v;if(p){var g=[v.x,v.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var w=i,b=n.pointToCoord(g);a?(m=w.startAngle,y=w.endAngle,_=-b[1]/180*Math.PI):(m=w.r0,y=w.r,_=b[0])}else{var S=i;a?(m=S.x,y=S.x+S.width,_=v.x):(m=S.y+S.height,y=S.y,_=v.y)}var x=y===m?0:(_-m)/(y-m);l&&(x=1-x);var T=Q(h)?h(d):f*x+c,M=p.getSymbolPath(),A=M.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),M.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,n,i){var a=e.getModel("endLabel");if(W_(e)){var o=e.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new $t({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=WI(l);f>=0&&(fl(s,hl(e,"endLabel"),{inheritColor:i,labelFetcher:e,labelDataIndex:f,defaultText:function(h,c,v){return v!=null?k_(o,v):Ec(o,h)},enableTextSetter:!0},$I(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,n,i,a,o,s,l){var u=this._endLabel,f=this._polyline;if(u){e<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),c=i.hostModel,v=c.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),m=g.isHorizontal(),y=g.inverse,_=n.shape,w=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,b=(m?p:0)*(y?-1:1),S=(m?0:-p)*(y?-1:1),x=m?"x":"y",T=GI(h,w,x),M=T.range,A=M[1]-M[0],C=void 0;if(A>=1){if(A>1&&!v){var I=$p(h,M[0]);u.attr({x:I[0]+b,y:I[1]+S}),o&&(C=c.getRawValue(M[0]))}else{var I=f.getPointOn(w,x);I&&u.attr({x:I[0]+b,y:I[1]+S});var E=c.getRawValue(M[0]),L=c.getRawValue(M[1]);o&&(C=Wx(i,d,E,L,T.t))}a.lastFrameIndex=M[0]}else{var P=e===1||a.lastFrameIndex>0?M[0]:0,I=$p(h,P);o&&(C=c.getRawValue(P)),u.attr({x:I[0]+b,y:I[1]+S})}if(o){var R=cl(u);typeof R.setLabelText=="function"&&R.setLabelText(C)}}},t.prototype._doUpdateAnimation=function(e,n,i,a,o,s,l){var u=this._polyline,f=this._polygon,h=e.hostModel,c=PI(this._data,e,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),v=c.current,d=c.stackedOnCurrent,p=c.next,g=c.stackedOnNext;if(o&&(d=Er(c.stackedOnCurrent,c.current,i,o,l),v=Er(c.current,null,i,o,l),g=Er(c.stackedOnNext,c.next,i,o,l),p=Er(c.next,null,i,o,l)),Wp(v,p)>3e3||f&&Wp(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=c.current,u.shape.points=v;var m={shape:{points:p}};c.current!==v&&(m.shape.__points=c.next),u.stopAnimation(),ve(u,m,h),f&&(f.setShape({points:v,stackedOnPoints:d}),f.stopAnimation(),ve(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var y=[],_=c.status,w=0;w<_.length;w++){var b=_[w].cmd;if(b==="="){var S=e.getItemGraphicEl(_[w].idx1);S&&y.push({el:S,ptIdx:w})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var x=u.shape.__points,T=0;T<y.length;T++){var M=y[T].el,A=y[T].ptIdx*2;M.x=x[A],M.y=x[A+1],M.markRedraw()}})},t.prototype.remove=function(e){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},t.type="line",t})(we);function Rc(r,t){return{seriesType:r,plan:eo(),reset:function(e){var n=e.getData(),i=e.coordinateSystem,a=e.pipelineContext,o=t||a.large;if(i){var s=X(i.dimensions,function(v){return n.mapDimension(v)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Di(n,s[0])&&(s[0]=u),Di(n,s[1])&&(s[1]=u);var f=n.getStore(),h=n.getDimensionIndex(s[0]),c=n.getDimensionIndex(s[1]);return l&&{progress:function(v,d){for(var p=v.end-v.start,g=o&&tr(p*l),m=[],y=[],_=v.start,w=0;_<v.end;_++){var b=void 0;if(l===1){var S=f.get(h,_);b=i.dataToPoint(S,null,y)}else m[0]=f.get(h,_),m[1]=f.get(c,_),b=i.dataToPoint(m,null,y);o?(g[w++]=b[0],g[w++]=b[1]):d.setItemLayout(_,b.slice())}o&&d.setLayout("points",g)}}}}}}var YI={average:function(r){for(var t=0,e=0,n=0;n<r.length;n++)isNaN(r[n])||(t+=r[n],e++);return e===0?NaN:t/e},sum:function(r){for(var t=0,e=0;e<r.length;e++)t+=r[e]||0;return t},max:function(r){for(var t=-1/0,e=0;e<r.length;e++)r[e]>t&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e<r.length;e++)r[e]<t&&(t=r[e]);return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},jI=function(r){return Math.round(r.length/2)};function G_(r){return{seriesType:r,reset:function(t,e,n){var i=t.getData(),a=t.get("sampling"),o=t.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=n.getDevicePixelRatio(),c=Math.abs(f[1]-f[0])*(h||1),v=Math.round(s/c);if(isFinite(v)&&v>1){a==="lttb"?t.setData(i.lttbDownSample(i.mapDimension(u.dim),1/v)):a==="minmax"&&t.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/v));var d=void 0;G(a)?d=YI[a]:Q(a)&&(d=a),d&&t.setData(i.downSample(i.mapDimension(u.dim),1/v,d,jI))}}}}}function ZI(r){r.registerChartView(UI),r.registerSeriesModel(AI),r.registerLayout(Rc("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),n=t.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,G_("line"))}var mh=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,n){return Tl(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(e),s=a.dataToPoint(o);if(i)D(a.getAxes(),function(c,v){if(c.type==="category"&&n!=null){var d=c.getTicksCoords(),p=c.getTickModel().get("alignWithLabel"),g=o[v],m=n[v]==="x1"||n[v]==="y1";if(m&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[v]=c.toGlobalCoord(c.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,w=1,b=0;b<d.length;b++){var S=d[b].coord,x=b===d.length-1?d[b-1].tickValue+w:d[b].tickValue;if(x===g){_=S;break}else if(x<g)y=S;else if(y!=null&&x>g){_=(S+y)/2;break}b===1&&(w=x-d[0].tickValue)}_==null&&(y?y&&(_=d[d.length-1].coord):_=d[0].coord),s[v]=c.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},t})(ke);ke.registerClass(mh);var XI=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return Tl(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>e&&(e=n),e},t.prototype.brushSelector=function(e,n,i){return i.rect(n.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=dl(mh.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}),t})(mh),qI=(function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r})(),Up=(function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n.type="sausage",n}return t.prototype.getDefaultShape=function(){return new qI},t.prototype.buildPath=function(e,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,h=n.endAngle,c=n.clockwise,v=Math.PI*2,d=c?h-f<v:f-h<v;d||(f=h-(c?v:-v));var p=Math.cos(f),g=Math.sin(f),m=Math.cos(h),y=Math.sin(h);d?(e.moveTo(p*o+i,g*o+a),e.arc(p*u+i,g*u+a,l,-Math.PI+f,f,!c)):e.moveTo(p*s+i,g*s+a),e.arc(i,a,s,f,h,!c),e.arc(m*u+i,y*u+a,l,h-Math.PI*2,h-Math.PI,!c),o!==0&&e.arc(i,a,o,h,f,c)},t})(vt);function KI(r,t){t=t||{};var e=t.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return gs(n,i,a);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,f=u.cx,h=u.cy,c=u.r,v=u.r0,d=(c+v)/2,p=u.startAngle,g=u.endAngle,m=(p+g)/2,y=e?Math.abs(c-v)/2:0,_=Math.cos,w=Math.sin,b=f+c*_(p),S=h+c*w(p),x="left",T="top";switch(s){case"startArc":b=f+(v-l)*_(m),S=h+(v-l)*w(m),x="center",T="top";break;case"insideStartArc":b=f+(v+l)*_(m),S=h+(v+l)*w(m),x="center",T="bottom";break;case"startAngle":b=f+d*_(p)+Ho(p,l+y,!1),S=h+d*w(p)+Wo(p,l+y,!1),x="right",T="middle";break;case"insideStartAngle":b=f+d*_(p)+Ho(p,-l+y,!1),S=h+d*w(p)+Wo(p,-l+y,!1),x="left",T="middle";break;case"middle":b=f+d*_(m),S=h+d*w(m),x="center",T="middle";break;case"endArc":b=f+(c+l)*_(m),S=h+(c+l)*w(m),x="center",T="bottom";break;case"insideEndArc":b=f+(c-l)*_(m),S=h+(c-l)*w(m),x="center",T="top";break;case"endAngle":b=f+d*_(g)+Ho(g,l+y,!0),S=h+d*w(g)+Wo(g,l+y,!0),x="left",T="middle";break;case"insideEndAngle":b=f+d*_(g)+Ho(g,-l+y,!0),S=h+d*w(g)+Wo(g,-l+y,!0),x="right",T="middle";break;default:return gs(n,i,a)}return n=n||{},n.x=b,n.y=S,n.align=x,n.verticalAlign=T,n}}function QI(r,t,e,n){if(St(n)){r.setTextConfig({rotation:n});return}else if(H(t)){r.setTextConfig({rotation:0});return}var i=r.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=e(t);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var f=Math.PI*1.5-l;u==="middle"&&f>Math.PI/2&&f<Math.PI*1.5&&(f-=Math.PI),r.setTextConfig({rotation:f})}function Ho(r,t,e){return t*Math.sin(r)*(e?-1:1)}function Wo(r,t,e){return t*Math.cos(r)*(e?1:-1)}function JI(r,t,e){var n=r.get("borderRadius");if(n==null)return{cornerRadius:0};H(n)||(n=[n,n,n,n]);var i=Math.abs(t.r||0-t.r0||0);return{cornerRadius:X(n,function(a){return Wr(a,i)})}}var Qu=Math.max,Ju=Math.min;function tE(r,t){var e=r.getArea&&r.getArea();if(Pc(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=t.getLayout("bandWidth");n.isHorizontal()?(e.x-=i,e.width+=i*2):(e.y-=i,e.height+=i*2)}}return e}var eE=(function(r){O(t,r);function t(){var e=r.call(this)||this;return e.type=t.type,e._isFirstFrame=!0,e}return t.prototype.render=function(e,n,i,a){this._model=e,this._removeOnRenderedListener(i),this._updateDrawMode(e);var o=e.get("coordinateSystem");o==="cartesian2d"||o==="polar"?(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(e,n,i):this._renderNormal(e,n,i,a)):process.env.NODE_ENV!=="production"&&Kt("Only cartesian2d and polar supported for bar.")},t.prototype.incrementalPrepareRender=function(e){this._clear(),this._updateDrawMode(e),this._updateLargeClip(e)},t.prototype.incrementalRender=function(e,n){this._progressiveEls=[],this._incrementalRenderLarge(e,n)},t.prototype.eachRendered=function(e){Ja(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e,n,i,a){var o=this.group,s=e.getData(),l=this._data,u=e.coordinateSystem,f=u.getBaseAxis(),h;u.type==="cartesian2d"?h=f.isHorizontal():u.type==="polar"&&(h=f.dim==="angle");var c=e.isAnimationEnabled()?e:null,v=rE(e,u);v&&this._enableRealtimeSort(v,s,i);var d=e.get("clip",!0)||v,p=tE(u,s);o.removeClipPath();var g=e.get("roundCap",!0),m=e.get("showBackground",!0),y=e.getModel("backgroundStyle"),_=y.get("borderRadius")||0,w=[],b=this._backgroundEls,S=a&&a.isInitSort,x=a&&a.type==="changeAxisOrder";function T(C){var I=Go[u.type](s,C),E=uE(u,h,I);return E.useStyle(y.getItemStyle()),u.type==="cartesian2d"?E.setShape("r",_):E.setShape("cornerRadius",_),w[C]=E,E}s.diff(l).add(function(C){var I=s.getItemModel(C),E=Go[u.type](s,C,I);if(m&&T(C),!(!s.hasValue(C)||!qp[u.type](E))){var L=!1;d&&(L=Yp[u.type](p,E));var P=jp[u.type](e,s,C,E,h,c,f.model,!1,g);v&&(P.forceLabelAnimation=!0),Kp(P,s,C,I,E,e,h,u.type==="polar"),S?P.attr({shape:E}):v?Zp(v,c,P,E,C,h,!1,!1):ir(P,{shape:E},e,C),s.setItemGraphicEl(C,P),o.add(P),P.ignore=L}}).update(function(C,I){var E=s.getItemModel(C),L=Go[u.type](s,C,E);if(m){var P=void 0;b.length===0?P=T(I):(P=b[I],P.useStyle(y.getItemStyle()),u.type==="cartesian2d"?P.setShape("r",_):P.setShape("cornerRadius",_),w[C]=P);var R=Go[u.type](s,C),z=U_(h,R,u);ve(P,{shape:z},c,C)}var k=l.getItemGraphicEl(I);if(!s.hasValue(C)||!qp[u.type](L)){o.remove(k);return}var V=!1;if(d&&(V=Yp[u.type](p,L),V&&o.remove(k)),k?ic(k):k=jp[u.type](e,s,C,L,h,c,f.model,!!k,g),v&&(k.forceLabelAnimation=!0),x){var $=k.getTextContent();if($){var j=cl($);j.prevValue!=null&&(j.prevValue=j.value)}}else Kp(k,s,C,E,L,e,h,u.type==="polar");S?k.attr({shape:L}):v?Zp(v,c,k,L,C,h,!0,x):ve(k,{shape:L},e,C,null),s.setItemGraphicEl(C,k),k.ignore=V,o.add(k)}).remove(function(C){var I=l.getItemGraphicEl(C);I&&Kf(I,e,C)}).execute();var M=this._backgroundGroup||(this._backgroundGroup=new kt);M.removeAll();for(var A=0;A<w.length;++A)M.add(w[A]);o.add(M),this._backgroundEls=w,this._data=s},t.prototype._renderLarge=function(e,n,i){this._clear(),Jp(e,this.group),this._updateLargeClip(e)},t.prototype._incrementalRenderLarge=function(e,n){this._removeBackground(),Jp(n,this.group,this._progressiveEls,!0)},t.prototype._updateLargeClip=function(e){var n=e.get("clip",!0)&&H_(e.coordinateSystem,!1,e),i=this.group;n?i.setClipPath(n):i.removeClipPath()},t.prototype._enableRealtimeSort=function(e,n,i){var a=this;if(n.count()){var o=e.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,e,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),f=u&&u.shape;return f&&Math.abs(o.isHorizontal()?f.height:f.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},t.prototype._dataSort=function(e,n,i){var a=[];return e.each(e.mapDimension(n.dim),function(o,s){var l=i(s);l=l??NaN,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:X(a,function(o){return o.ordinalNumber})}},t.prototype._isOrderChangedWithinSameData=function(e,n,i){for(var a=i.scale,o=e.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var f=e.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=f<0?Number.MIN_VALUE:n(e.indexOfRawIndex(f));if(h>s)return!0;s=h}return!1},t.prototype._isOrderDifferentInView=function(e,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(e.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,n,i,a){if(this._isOrderChangedWithinSameData(e,n,i)){var o=this._dataSort(e,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,n,i){var a=n.baseAxis,o=this._dataSort(e,a,function(s){return e.get(e.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.index,sortInfo:o})},t.prototype.remove=function(e,n){this._clear(this._model),this._removeOnRenderedListener(n)},t.prototype.dispose=function(e,n){this._removeOnRenderedListener(n)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var n=this.group,i=this._data;e&&e.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Kf(a,e,ft(a).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t})(we),Yp={cartesian2d:function(r,t){var e=t.width<0?-1:1,n=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height);var i=r.x+r.width,a=r.y+r.height,o=Qu(t.x,r.x),s=Ju(t.x+t.width,i),l=Qu(t.y,r.y),u=Ju(t.y+t.height,a),f=s<o,h=u<l;return t.x=f&&o>i?s:o,t.y=h&&l>a?u:l,t.width=f?0:s-o,t.height=h?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),n<0&&(t.y+=t.height,t.height=-t.height),f||h},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}var i=Ju(t.r,r.r),a=Qu(t.r0,r.r0);t.r=i,t.r0=a;var o=i-a<0;if(e<0){var n=t.r;t.r=t.r0,t.r0=n}return o}},jp={cartesian2d:function(r,t,e,n,i,a,o,s,l){var u=new Tt({shape:B({},n),z2:1});if(u.__dataIndex=e,u.name="item",a){var f=u.shape,h=i?"height":"width";f[h]=0}return u},polar:function(r,t,e,n,i,a,o,s,l){var u=!i&&l?Up:Pi,f=new u({shape:n,z2:1});f.name="item";var h=$_(i);if(f.calculateTextPosition=KI(h,{isRoundCap:u===Up}),a){var c=f.shape,v=i?"r":"endAngle",d={};c[v]=i?n.r0:n.startAngle,d[v]=n[v],(s?ve:ir)(f,{shape:d},a)}return f}};function rE(r,t){var e=r.get("realtimeSort",!0),n=t.getBaseAxis();if(process.env.NODE_ENV!=="production"&&e&&(n.type!=="category"&&Kt("`realtimeSort` will not work because this bar series is not based on a category axis."),t.type!=="cartesian2d"&&Kt("`realtimeSort` will not work because this bar series is not on cartesian2d.")),e&&n.type==="category"&&t.type==="cartesian2d")return{baseAxis:n,otherAxis:t.getOtherAxis(n)}}function Zp(r,t,e,n,i,a,o,s){var l,u;a?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?ve:ir)(e,{shape:l},t,i,null);var f=t?r.baseAxis.model:null;(o?ve:ir)(e,{shape:u},f,i)}function Xp(r,t){for(var e=0;e<t.length;e++)if(!isFinite(r[t[e]]))return!0;return!1}var nE=["x","y","width","height"],iE=["cx","cy","r","startAngle","endAngle"],qp={cartesian2d:function(r){return!Xp(r,nE)},polar:function(r){return!Xp(r,iE)}},Go={cartesian2d:function(r,t,e){var n=r.getItemLayout(t),i=e?oE(e,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},polar:function(r,t,e){var n=r.getItemLayout(t);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function aE(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function $_(r){return(function(t){var e=t?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+e;default:return n}}})(r)}function Kp(r,t,e,n,i,a,o,s){var l=t.getItemVisual(e,"style");if(s){if(!a.get("roundCap")){var f=r.shape,h=JI(n.getModel("itemStyle"),f);B(f,h),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var c=n.getShallow("cursor");c&&r.attr("cursor",c);var v=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",d=hl(n);fl(r,d,{labelFetcher:a,labelDataIndex:e,defaultText:Ec(a.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:v});var p=r.getTextContent();if(s&&p){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,QI(r,g==="outside"?v:g,$_(o),n.get(["label","rotate"]))}tD(p,d,a.getRawValue(e),function(y){return k_(t,y)});var m=n.getModel(["emphasis"]);ka(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),Cs(r,n),aE(i)&&(r.style.fill="none",r.style.stroke="none",D(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function oE(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(n,i,a)}var sE=(function(){function r(){}return r})(),Qp=(function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeBar",n}return t.prototype.getDefaultShape=function(){return new sE},t.prototype.buildPath=function(e,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f<i.length;f+=3)l[a]=u,l[o]=i[f+2],s[a]=i[f+a],s[o]=i[f+o],e.rect(s[0],s[1],l[0],l[1])},t})(vt);function Jp(r,t,e,n){var i=r.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var f=new Qp({shape:{points:u},incremental:!!n,silent:!0,z2:0});f.baseDimIdx=a,f.largeDataIndices=o,f.barWidth=s,f.useStyle(l.getItemStyle()),t.add(f),e&&e.push(f)}var h=new Qp({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,t.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,ft(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",tg),h.on("mousemove",tg)),e&&e.push(h)}var tg=_c(function(r){var t=this,e=lE(t,r.offsetX,r.offsetY);ft(t).dataIndex=e>=0?e:null},30,!1);function lE(r,t,e){for(var n=r.baseDimIdx,i=1-n,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=a.length/3;f<h;f++){var c=f*3;if(l[n]=u,l[i]=a[c+2],s[n]=a[c+n],s[i]=a[c+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),t>=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[f]}return-1}function U_(r,t,e){if(Pc(e,"cartesian2d")){var n=t,i=e.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=e.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function uE(r,t,e){var n=r.type==="polar"?Pi:Tt;return new n({shape:U_(t,e,r),silent:!0,z2:0})}function fE(r){r.registerChartView(eE),r.registerSeriesModel(XI),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Mt(U2,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Y2("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,G_("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var n=t.componentType||"series";e.eachComponent({mainType:n,query:t},function(i){t.sortInfo&&i.axis.setCategorySortInfo(t.sortInfo)})})}function hE(r,t,e){t=H(t)&&{coordDimensions:t}||B({encodeDefine:r.getEncode()},t);var n=r.getSource(),i=v_(n,t).dimensions,a=new c_(i,r);return a.initData(n,e),a}var cE=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,n){return Tl(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,n,i){return i.point(n.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.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"}},t})(ke),Y_=4,vE=(function(){function r(){}return r})(),dE=(function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n._off=0,n.hoverDataIdx=-1,n}return t.prototype.getDefaultShape=function(){return new vE},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&a[0]<Y_,f=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<i.length;){var c=i[h++],v=i[h++];isNaN(c)||isNaN(v)||f&&!f.contain(c,v)||(s.x=c-a[0]/2,s.y=v-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(e,s,!0))}this.incremental&&(this._off=h,this.notClear=!0)},t.prototype.afterBrush=function(){var e=this.shape,n=e.points,i=e.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},t.prototype.findDataIndex=function(e,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var f=u*2,h=a[f]-s/2,c=a[f+1]-l/2;if(e>=h&&n>=c&&e<=h+s&&n<=c+l)return u}return-1},t.prototype.contain=function(e,n){var i=this.transformCoordToLocal(e,n),a=this.getBoundingRect();if(e=i[0],n=i[1],a.contain(e,n)){var o=this.hoverDataIdx=this.findDataIndex(e,n);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var n=this.shape,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,f=-1/0,h=-1/0,c=0;c<i.length;){var v=i[c++],d=i[c++];l=Math.min(v,l),f=Math.max(v,f),u=Math.min(d,u),h=Math.max(d,h)}e=this._rect=new dt(l-o/2,u-s/2,f-l+o,h-u+s)}return e},t})(vt),pE=(function(){function r(){this.group=new kt}return r.prototype.updateData=function(t,e){this._clear();var n=this._create();n.setShape({points:t.getLayout("points")}),this._setCommon(n,t,e)},r.prototype.updateLayout=function(t){var e=t.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;e=new Float32Array(e.buffer,a,i)}n.setShape("points",e),n.reset()})},r.prototype.incrementalPrepareUpdate=function(t){this._clear()},r.prototype.incrementalUpdate=function(t,e,n){var i=this._newAdded[0],a=e.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=t.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=t.start,u.endIndex=t.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,e,n)}},r.prototype.eachRendered=function(t){this._newAdded[0]&&t(this._newAdded[0])},r.prototype._create=function(){var t=new dE({cursor:"default"});return t.ignoreCoarsePointer=!0,this.group.add(t),this._newAdded.push(t),t},r.prototype._setCommon=function(t,e,n){var i=e.hostModel;n=n||{};var a=e.getVisual("symbolSize");t.setShape("size",a instanceof Array?a:[a,a]),t.softClipShape=n.clipShape||null,t.symbolProxy=yr(e.getVisual("symbol"),0,0,0,0),t.setColor=t.symbolProxy.setColor;var o=t.shape.size[0]<Y_;t.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=e.getVisual("style"),l=s&&s.fill;l&&t.setColor(l);var u=ft(t);u.seriesIndex=i.seriesIndex,t.on("mousemove",function(f){u.dataIndex=null;var h=t.hoverDataIdx;h>=0&&(u.dataIndex=h+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),gE=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.updateData(a,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,n,i){var a=e.getData(),o=this._updateSymbolDraw(a,e);o.incrementalPrepareUpdate(a),this._finished=!1},t.prototype.incrementalRender=function(e,n,i){this._symbolDraw.incrementalUpdate(e,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=e.end===n.getData().count()},t.prototype.updateTransform=function(e,n,i){var a=e.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=Rc("").reset(e,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var n=e.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,n){var i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new pE:new O_,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},t.prototype.remove=function(e,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t})(we),mE=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.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"},t})(ht),yh=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",he).models[0]},t.type="cartesian2dAxis",t})(ht);$e(yh,dI);var j_={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)"]}}},yE=ct({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},j_),kc=ct({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}}},j_),_E=ct({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},kc),wE=_t({logBase:10},kc);const bE={category:yE,value:kc,time:_E,log:wE};var SE={value:1,category:1,time:1,log:1};function eg(r,t,e,n){D(SE,function(i,a){var o=ct(ct({},bE[a],!0),n,!0),s=(function(l){O(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=t+"Axis."+a,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var c=Fa(this),v=c?to(f):{},d=h.getTheme();ct(f,d.get(a+"Axis")),ct(f,this.getDefaultOption()),f.type=rg(f),c&&Ci(f,v,c)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=dh.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=t+"Axis."+a,u.defaultOption=o,u})(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",rg)}function rg(r){return r.type||(r.data?"category":"value")}var xE=(function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return X(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Wt(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r})(),_h=["x","y"];function ng(r){return r.type==="interval"||r.type==="time"}var CE=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=_h,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!ng(e)||!ng(n))){var i=e.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,c=o[0]-i[0]*f,v=o[1]-a[0]*h,d=this._transform=[f,0,0,h,c,v];this._invTransform=Wh([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var n=this.getAxis("x"),i=this.getAxis("y");return n.contain(n.toLocalCoord(e[0]))&&i.contain(i.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,n){var i=this.dataToPoint(e),a=this.dataToPoint(n),o=this.getArea(),s=new dt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,n,i){i=i||[];var a=e[0],o=e[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Re(i,e,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},t.prototype.clampData=function(e,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(e[0]),u=a.parse(e[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},t.prototype.pointToData=function(e,n){var i=[];if(this._invTransform)return Re(i,e,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(e[0]),n),i[1]=o.coordToData(o.toLocalCoord(e[1]),n),i},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var n=this.getAxis("x").getGlobalExtent(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-e,o=Math.min(i[0],i[1])-e,s=Math.max(n[0],n[1])-a+e,l=Math.max(i[0],i[1])-o+e;return new dt(a,o,s,l)},t})(xE),TE=(function(r){O(t,r);function t(e,n,i,a,o){var s=r.call(this,e,n,i)||this;return s.index=0,s.type=a||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),e&&n[0]>n[1]&&n.reverse(),n},t.prototype.pointToData=function(e,n){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),n)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t})(CI);function wh(r,t,e){e=e||{};var n=r.coordinateSystem,i=t.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,f=n.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],c={left:0,right:1,top:0,bottom:1,onZero:2},v=t.get("offset")||0,d=u==="x"?[h[2]-v,h[3]+v]:[h[0]-v,h[1]+v];if(o){var p=o.toGlobalCoord(o.dataToCoord(0));d[c.onZero]=Math.max(Math.min(p,d[1]),d[0])}a.position=[u==="y"?d[c[l]]:h[0],u==="x"?d[c[l]]:h[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=g[s],a.labelOffset=o?d[c[s]]-d[c.onZero]:0,t.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),An(e.labelInside,t.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=t.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function ig(r){return r.get("coordinateSystem")==="cartesian2d"}function ag(r){var t={xAxisModel:null,yAxisModel:null};return D(t,function(e,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,he).models[0];if(process.env.NODE_ENV!=="production"&&!a)throw new Error(i+' "'+hi(r.get(i+"Index"),r.get(i+"Id"),0)+'" not found');t[n]=a}),t}var tf=Math.log;function DE(r,t,e){var n=ki.prototype,i=n.getTicks.call(e),a=n.getTicks.call(e,!0),o=i.length-1,s=n.getInterval.call(e),l=C_(r,t),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var c=tf(r.base);u=[tf(u[0])/c,tf(u[1])/c]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var v=n.getExtent.call(r);f&&(u[0]=v[0]),h&&(u[1]=v[1]);var d=n.getInterval.call(r),p=u[0],g=u[1];if(f&&h)d=(g-p)/o;else if(f)for(g=u[0]+d*o;g<u[1]&&isFinite(g)&&isFinite(u[1]);)d=Xu(d),g=u[0]+d*o;else if(h)for(p=u[1]-d*o;p>u[0]&&isFinite(p)&&isFinite(u[0]);)d=Xu(d),p=u[1]-d*o;else{var m=r.getTicks().length-1;m>o&&(d=Xu(d));var y=d*o;g=Math.ceil(u[1]/d)*d,p=Rt(g-y),p<0&&u[0]>=0?(p=0,g=Rt(y)):g>0&&u[1]<=0&&(g=0,p=-Rt(y))}var _=(i[0].value-a[0].value)/s,w=(i[o].value-a[o].value)/s;if(n.setExtent.call(r,p+d*_,g+d*w),n.setInterval.call(r,d),(_||w)&&n.setNiceExtent.call(r,p+d,g-d),process.env.NODE_ENV!=="production"){var b=n.getTicks.call(r);b[1]&&(!B2(d)||Gf(b[1].value)>Gf(d))&&Kt("The ticks may be not readable when set min: "+t.get("min")+", max: "+t.get("max")+" and alignTicks: true")}}var ME=(function(){function r(t,e,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_h,this._initCartesian(t,e,n),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var n=this._axesMap;this._updateScale(t,this.model);function i(o){var s,l=Ct(o),u=l.length;if(u){for(var f=[],h=u-1;h>=0;h--){var c=+l[h],v=o[c],d=v.model,p=v.scale;ph(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(v):(kp(p,d),ph(p)&&(s=v))}f.length&&(s||(s=f.pop(),kp(s.scale,s.model)),D(f,function(g){DE(g.scale,g.model,s.scale)}))}}i(n.x),i(n.y);var a={};D(n.x,function(o){og(n,"y",o,a)}),D(n.y,function(o){og(n,"x",o,a)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,n){var i=t.getBoxLayoutParams(),a=!n&&t.get("containLabel"),o=xi(i,{width:e.getWidth(),height:e.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(D(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=hI(u);if(f){var h=u.isHorizontal()?"height":"width",c=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+c,u.position==="top"?o.y+=f.height+c:u.position==="left"&&(o.x+=f.width+c)}}}),l()),D(this._coordsList,function(u){u.calcAffineTransform()});function l(){D(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],c=u.inverse?1:0;u.setExtent(h[c],h[1-c]),AE(u,f?o.x:o.y)})}},r.prototype.getAxis=function(t,e){var n=this._axesMap[t];if(n!=null)return n[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var n="x"+t+"y"+e;return this._coordsMap[n]}Z(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===t||a[i].getAxis("y").index===e)return a[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(t,e,n){var i=this._findConvertTarget(e);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(t){var e=t.seriesModel,n=t.xAxisModel||e&&e.getReferringComponents("xAxis",he).models[0],i=t.yAxisModel||e&&e.getReferringComponents("yAxis",he).models[0],a=t.gridModel,o=this._coordsList,s,l;if(e)s=e.coordinateSystem,yt(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(t){var e=this._coordsList[0];if(e)return e.containPoint(t)},r.prototype._initCartesian=function(t,e,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(e.eachComponent("xAxis",u("x"),this),e.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,D(s.x,function(f,h){D(s.y,function(c,v){var d="x"+h+"y"+v,p=new CE(d);p.master=i,p.model=t,i._coordsMap[d]=p,i._coordsList.push(p),p.addAxis(f),p.addAxis(c)})});function u(f){return function(h,c){if(ef(h,t)){var v=h.get("position");f==="x"?v!=="top"&&v!=="bottom"&&(v=o.bottom?"top":"bottom"):v!=="left"&&v!=="right"&&(v=o.left?"right":"left"),o[v]=!0;var d=new TE(f,uI(h),[0,0],h.get("type"),v),p=d.type==="category";d.onBand=p&&h.get("boundaryGap"),d.inverse=h.get("inverse"),h.axis=d,d.model=h,d.grid=a,d.index=c,a._axesList.push(d),s[f][c]=d,l[f]++}}}},r.prototype._updateScale=function(t,e){D(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),t.eachSeries(function(i){if(ig(i)){var a=ag(i),o=a.xAxisModel,s=a.yAxisModel;if(!ef(o,e)||!ef(s,e))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),f=l.getAxis("x"),h=l.getAxis("y");n(u,f),n(u,h)}},this);function n(i,a){D(D_(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(t){var e=[],n=[];return D(this.getCartesians(),function(i){var a=t!=null&&t!=="auto"?i.getAxis(t):i.getBaseAxis(),o=i.getOtherAxis(a);yt(e,a)<0&&e.push(a),yt(n,o)<0&&n.push(o)}),{baseAxes:e,otherAxes:n}},r.create=function(t,e){var n=[];return t.eachComponent("grid",function(i,a){var o=new r(i,t,e);o.name="grid_"+a,o.resize(i,e,!0),i.coordinateSystem=o,n.push(o)}),t.eachSeries(function(i){if(ig(i)){var a=ag(i),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel();if(process.env.NODE_ENV!=="production"){if(!l)throw new Error('Grid "'+hi(o.get("gridIndex"),o.get("gridId"),0)+'" not found');if(o.getCoordSysModel()!==s.getCoordSysModel())throw new Error("xAxis and yAxis must use the same grid")}var u=l.coordinateSystem;i.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),n},r.dimensions=_h,r})();function ef(r,t){return r.getCoordSysModel()===t}function og(r,t,e,n){e.getAxesOnZeroOf=function(){return a?[a]:[]};var i=r[t],a,o=e.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)sg(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&sg(i[u])&&!n[f(i[u])]){a=i[u];break}a&&(n[f(a)]=!0);function f(h){return h.dim+"_"+h.index}}function sg(r){return r&&r.type!=="category"&&r.type!=="time"&&fI(r)}function AE(r,t){var e=r.getExtent(),n=e[0]+e[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+t}:function(i){return n-i+t},r.toLocalCoord=r.dim==="x"?function(i){return i-t}:function(i){return n-i+t}}var Nr=Math.PI,Vr=(function(){function r(t,e){this.group=new kt,this.opt=e,this.axisModel=t,_t(e,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new kt({x:e.position[0],y:e.position[1],rotation:e.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(t){return!!lg[t]},r.prototype.add=function(t){lg[t](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(t,e,n){var i=ry(e-t),a,o;return ms(i)?(o=n>0?"top":"bottom",a="center"):ms(i-Nr)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<Nr?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,textVerticalAlign:o}},r.makeAxisEventDataBase=function(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r})(),lg={axisLine:function(r,t,e,n){var i=t.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var a=t.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Re(s,s,o),Re(l,l,o));var f=B({lineCap:"round"},t.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new Gr({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Oa(h.shape,h.style.lineWidth),h.anid="line",e.add(h);var c=t.get(["axisLine","symbol"]);if(c!=null){var v=t.get(["axisLine","symbolSize"]);G(c)&&(c=[c,c]),(G(v)||St(v))&&(v=[v,v]);var d=F0(t.get(["axisLine","symbolOffset"])||0,v),p=v[0],g=v[1];D([{rotate:r.rotation+Math.PI/2,offset:d[0],r:0},{rotate:r.rotation-Math.PI/2,offset:d[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(c[y]!=="none"&&c[y]!=null){var _=yr(c[y],-p/2,-g/2,p,g,f.stroke,!0),w=m.r+m.offset,b=u?l:s;_.attr({rotation:m.rotate,x:b[0]+w*Math.cos(r.rotation),y:b[1]-w*Math.sin(r.rotation),silent:!0,z2:11}),e.add(_)}})}}},axisTickLabel:function(r,t,e,n){var i=LE(e,n,t,r),a=RE(e,n,t,r);if(EE(t,a,i),PE(e,n,t,r.tickDirection),t.get(["axisLabel","hideOverlap"])){var o=DI(X(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));MI(o)}},axisName:function(r,t,e,n){var i=An(r.axisName,t.get("name"));if(i){var a=t.get("nameLocation"),o=r.nameDirection,s=t.getModel("nameTextStyle"),l=t.get("nameGap")||0,u=t.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[a==="start"?u[0]-f*l:a==="end"?u[1]+f*l:(u[0]+u[1])/2,fg(a)?r.labelOffset+o*l:0],c,v=t.get("nameRotate");v!=null&&(v=v*Nr/180);var d;fg(a)?c=Vr.innerTextLayout(r.rotation,v??r.rotation,o):(c=IE(r.rotation,a,v||0,u),d=r.axisNameAvailableWidth,d!=null&&(d=Math.abs(d/Math.sin(c.rotation)),!isFinite(d)&&(d=null)));var p=s.getFont(),g=t.get("nameTruncate",!0)||{},m=g.ellipsis,y=An(r.nameTruncateMaxWidth,g.maxWidth,d),_=new $t({x:h[0],y:h[1],rotation:c.rotation,silent:Vr.isLabelSilent(t),style:mr(s,{text:i,font:p,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||t.get(["axisLine","lineStyle","color"]),align:s.get("align")||c.textAlign,verticalAlign:s.get("verticalAlign")||c.textVerticalAlign}),z2:1});if(ll({el:_,componentModel:t,itemName:i}),_.__fullText=i,_.anid="name",t.get("triggerEvent")){var w=Vr.makeAxisEventDataBase(t);w.targetType="axisName",w.name=i,ft(_).eventData=w}n.add(_),_.updateTransform(),e.add(_),_.decomposeTransform()}}};function IE(r,t,e,n){var i=ry(e-r),a,o,s=n[0]>n[1],l=t==="start"&&!s||t!=="start"&&s;return ms(i-Nr/2)?(o=l?"bottom":"top",a="center"):ms(i-Nr*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<Nr*1.5&&i>Nr/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function EE(r,t,e){if(!T_(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);t=t||[],e=e||[];var a=t[0],o=t[1],s=t[t.length-1],l=t[t.length-2],u=e[0],f=e[1],h=e[e.length-1],c=e[e.length-2];n===!1?(Ce(a),Ce(u)):ug(a,o)&&(n?(Ce(o),Ce(f)):(Ce(a),Ce(u))),i===!1?(Ce(s),Ce(h)):ug(l,s)&&(i?(Ce(l),Ce(c)):(Ce(s),Ce(h)))}}function Ce(r){r&&(r.ignore=!0)}function ug(r,t){var e=r&&r.getBoundingRect().clone(),n=t&&t.getBoundingRect().clone();if(!(!e||!n)){var i=Vh([]);return Hh(i,i,-r.rotation),e.applyTransform(di([],i,r.getLocalTransform())),n.applyTransform(di([],i,t.getLocalTransform())),e.intersect(n)}}function fg(r){return r==="middle"||r==="center"}function Z_(r,t,e,n,i){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=e,t&&(Re(o,o,t),Re(s,s,t));var f=new Gr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Oa(f.shape,f.style.lineWidth),f.anid=i+"_"+r[l].tickValue,a.push(f)}return a}function LE(r,t,e,n){var i=e.axis,a=e.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),l=n.tickDirection*a.get("length"),u=i.getTicksCoords(),f=Z_(u,t.transform,l,_t(s.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<f.length;h++)r.add(f[h]);return f}}function PE(r,t,e,n){var i=e.axis,a=e.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=n*a.get("length"),u=_t(s.getLineStyle(),_t(e.getModel("axisTick").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})),f=0;f<o.length;f++)for(var h=Z_(o[f],t.transform,l,u,"minorticks_"+f),c=0;c<h.length;c++)r.add(h[c])}}function RE(r,t,e,n){var i=e.axis,a=An(n.axisLabelShow,e.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=e.getModel("axisLabel"),s=o.get("margin"),l=i.getViewLabels(),u=(An(n.labelRotate,o.get("rotate"))||0)*Nr/180,f=Vr.innerTextLayout(n.rotation,u,n.labelDirection),h=e.getCategories&&e.getCategories(!0),c=[],v=Vr.isLabelSilent(e),d=e.get("triggerEvent");return D(l,function(p,g){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(p.tickValue):p.tickValue,y=p.formattedLabel,_=p.rawLabel,w=o;if(h&&h[m]){var b=h[m];Z(b)&&b.textStyle&&(w=new At(b.textStyle,o,e.ecModel))}var S=w.getTextColor()||e.get(["axisLine","lineStyle","color"]),x=i.dataToCoord(m),T=w.getShallow("align",!0)||f.textAlign,M=rt(w.getShallow("alignMinLabel",!0),T),A=rt(w.getShallow("alignMaxLabel",!0),T),C=w.getShallow("verticalAlign",!0)||w.getShallow("baseline",!0)||f.textVerticalAlign,I=rt(w.getShallow("verticalAlignMinLabel",!0),C),E=rt(w.getShallow("verticalAlignMaxLabel",!0),C),L=new $t({x,y:n.labelOffset+n.labelDirection*s,rotation:f.rotation,silent:v,z2:10+(p.level||0),style:mr(w,{text:y,align:g===0?M:g===l.length-1?A:T,verticalAlign:g===0?I:g===l.length-1?E:C,fill:Q(S)?S(i.type==="category"?_:i.type==="value"?m+"":m,g):S})});if(L.anid="label_"+m,ll({el:L,componentModel:e,itemName:y,formatterParamsExtra:{isTruncated:function(){return L.isTruncated},value:_,tickIndex:g}}),d){var P=Vr.makeAxisEventDataBase(e);P.targetType="axisLabel",P.value=_,P.tickIndex=g,i.type==="category"&&(P.dataIndex=m),ft(L).eventData=P}t.add(L),L.updateTransform(),c.push(L),r.add(L),L.decomposeTransform()}),c}}function kE(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return OE(e,r,t),e.seriesInvolved&&BE(e,r),e}function OE(r,t,e){var n=t.getComponent("tooltip"),i=t.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];D(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=$a(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,h=f.getModel("tooltip",n);if(D(s.getAxes(),Mt(p,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var c=h.get("trigger")==="axis",v=h.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(h.get(["axisPointer","axis"]));(c||v)&&D(d.baseAxes,Mt(p,v?"cross":!0,c)),v&&D(d.otherAxes,Mt(p,"cross",!1))}function p(g,m,y){var _=y.model.getModel("axisPointer",i),w=_.get("show");if(!(!w||w==="auto"&&!g&&!bh(_))){m==null&&(m=_.get("triggerTooltip")),_=g?NE(y,h,i,t,g,m):_;var b=_.get("snap"),S=_.get("triggerEmphasis"),x=$a(y.model),T=m||b||y.type==="category",M=r.axesInfo[x]={key:x,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:S,involveSeries:T,snap:b,useHandle:bh(_),seriesModels:[],linkGroup:null};u[x]=M,r.seriesInvolved=r.seriesInvolved||T;var A=FE(a,y);if(A!=null){var C=o[A]||(o[A]={axesInfo:{}});C.axesInfo[x]=M,C.mapper=a[A].mapper,M.linkGroup=C}}}})}function NE(r,t,e,n,i,a){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};D(s,function(c){l[c]=lt(o.get(c))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&_t(u,h.textStyle)}}return r.model.getModel("axisPointer",new At(l,e,n))}function BE(r,t){t.eachSeries(function(e){var n=e.coordinateSystem,i=e.get(["tooltip","trigger"],!0),a=e.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||e.get(["axisPointer","show"],!0)===!1||D(r.coordSysAxesInfo[$a(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function FE(r,t){for(var e=t.model,n=t.dim,i=0;i<r.length;i++){var a=r[i]||{};if(rf(a[n+"AxisId"],e.id)||rf(a[n+"AxisIndex"],e.componentIndex)||rf(a[n+"AxisName"],e.name))return i}}function rf(r,t){return r==="all"||H(r)&&yt(r,t)>=0||r===t}function zE(r){var t=Oc(r);if(t){var e=t.axisPointerModel,n=t.axis.scale,i=e.option,a=e.get("status"),o=e.get("value");o!=null&&(o=n.parse(o));var s=bh(e);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=t.axis.scale.isBlank()?"hide":"show")}}function Oc(r){var t=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return t&&t.axesInfo[$a(r)]}function VE(r){var t=Oc(r);return t&&t.axisPointerModel}function bh(r){return!!r.get(["handle","show"])}function $a(r){return r.type+"||"+r.id}var nf={},X_=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i,a){this.axisPointerClass&&zE(e),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(e,i,!0)},t.prototype.updateAxisPointer=function(e,n,i,a){this._doUpdateAxisPointerClass(e,i,!1)},t.prototype.remove=function(e,n){var i=this._axisPointer;i&&i.remove(n)},t.prototype.dispose=function(e,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},t.prototype._doUpdateAxisPointerClass=function(e,n,i){var a=t.getAxisPointerClass(this.axisPointerClass);if(a){var o=VE(e);o?(this._axisPointer||(this._axisPointer=new a)).render(e,o,n,i):this._disposeAxisPointer(n)}},t.prototype._disposeAxisPointer=function(e){this._axisPointer&&this._axisPointer.dispose(e),this._axisPointer=null},t.registerAxisPointerClass=function(e,n){if(process.env.NODE_ENV!=="production"&&nf[e])throw new Error("axisPointer "+e+" exists");nf[e]=n},t.getAxisPointerClass=function(e){return e&&nf[e]},t.type="axis",t})(Oe),Sh=Ot();function HE(r,t,e,n){var i=e.axis;if(!i.scale.isBlank()){var a=e.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var f=s.length,h=Sh(r).splitAreaColors,c=et(),v=0;if(h)for(var d=0;d<u.length;d++){var p=h.get(u[d].tickValue);if(p!=null){v=(p+(f-1)*d)%f;break}}var g=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=H(s)?s:[s];for(var d=1;d<u.length;d++){var y=i.toGlobalCoord(u[d].coord),_=void 0,w=void 0,b=void 0,S=void 0;i.isHorizontal()?(_=g,w=l.y,b=y-_,S=l.height,g=_+b):(_=l.x,w=g,b=l.width,S=y-w,g=w+S);var x=u[d-1].tickValue;x!=null&&c.set(x,v),t.add(new Tt({anid:x!=null?"area_"+x:null,shape:{x:_,y:w,width:b,height:S},style:_t({fill:s[v]},m),autoBatch:!0,silent:!0})),v=(v+1)%f}Sh(r).splitAreaColors=c}}}function WE(r){Sh(r).splitAreaColors=null}var GE=["axisLine","axisTickLabel","axisName"],$E=["splitArea","splitLine","minorSplitLine"],q_=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="CartesianAxisPointer",e}return t.prototype.render=function(e,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new kt,this.group.add(this._axisGroup),!!e.get("show")){var s=e.getCoordSysModel(),l=wh(s,e),u=new Vr(e,B({handleAutoShown:function(h){for(var c=s.coordinateSystem.getCartesians(),v=0;v<c.length;v++)if(ph(c[v].getOtherAxis(e.axis).scale))return!0;return!1}},l));D(GE,u.add,u),this._axisGroup.add(u.getGroup()),D($E,function(h){e.get([h,"show"])&&UE[h](this,this._axisGroup,e,s)},this);var f=a&&a.type==="changeAxisOrder"&&a.isInitSort;f||Wy(o,this._axisGroup,e),r.prototype.render.call(this,e,n,i,a)}},t.prototype.remove=function(){WE(this)},t.type="cartesianAxis",t})(X_),UE={splitLine:function(r,t,e,n){var i=e.axis;if(!i.scale.isBlank()){var a=e.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color"),l=a.get("showMinLine")!==!1,u=a.get("showMaxLine")!==!1;s=H(s)?s:[s];for(var f=n.coordinateSystem.getRect(),h=i.isHorizontal(),c=0,v=i.getTicksCoords({tickModel:a}),d=[],p=[],g=o.getLineStyle(),m=0;m<v.length;m++){var y=i.toGlobalCoord(v[m].coord);if(!(m===0&&!l||m===v.length-1&&!u)){var _=v[m].tickValue;h?(d[0]=y,d[1]=f.y,p[0]=y,p[1]=f.y+f.height):(d[0]=f.x,d[1]=y,p[0]=f.x+f.width,p[1]=y);var w=c++%s.length,b=new Gr({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:d[0],y1:d[1],x2:p[0],y2:p[1]},style:_t({stroke:s[w]},g),silent:!0});Oa(b.shape,g.lineWidth),t.add(b)}}}},minorSplitLine:function(r,t,e,n){var i=e.axis,a=e.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),l=i.isHorizontal(),u=i.getMinorTicksCoords();if(u.length)for(var f=[],h=[],c=o.getLineStyle(),v=0;v<u.length;v++)for(var d=0;d<u[v].length;d++){var p=i.toGlobalCoord(u[v][d].coord);l?(f[0]=p,f[1]=s.y,h[0]=p,h[1]=s.y+s.height):(f[0]=s.x,f[1]=p,h[0]=s.x+s.width,h[1]=p);var g=new Gr({anid:"minor_line_"+u[v][d].tickValue,autoBatch:!0,shape:{x1:f[0],y1:f[1],x2:h[0],y2:h[1]},style:c,silent:!0});Oa(g.shape,c.lineWidth),t.add(g)}},splitArea:function(r,t,e,n){HE(r,t,e,n)}},K_=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="xAxis",t})(q_),YE=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=K_.type,e}return t.type="yAxis",t})(q_),jE=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="grid",e}return t.prototype.render=function(e,n){this.group.removeAll(),e.get("show")&&this.group.add(new Tt({shape:e.coordinateSystem.getRect(),style:_t({fill:e.get("backgroundColor")},e.getItemStyle()),silent:!0,z2:-1}))},t.type="grid",t})(Oe),hg={offset:0};function Q_(r){r.registerComponentView(jE),r.registerComponentModel(mE),r.registerCoordinateSystem("cartesian2d",ME),eg(r,"x",yh,hg),eg(r,"y",yh,hg),r.registerComponentView(K_),r.registerComponentView(YE),r.registerPreprocessor(function(t){t.xAxis&&t.yAxis&&!t.grid&&(t.grid={})})}function ZE(r){Ge(Q_),r.registerSeriesModel(cE),r.registerChartView(gE),r.registerLayout(Rc("scatter"))}var cg="\0_ec_interaction_mutex";function vg(r,t){return!!XE(r)[t]}function XE(r){return r[cg]||(r[cg]={})}Rn({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},re);var qE=(function(r){O(t,r);function t(e){var n=r.call(this)||this;n._zr=e;var i=tt(n._mousedownHandler,n),a=tt(n._mousemoveHandler,n),o=tt(n._mouseupHandler,n),s=tt(n._mousewheelHandler,n),l=tt(n._pinchHandler,n);return n.enable=function(u,f){this.disable(),this._opt=_t(lt(f)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(e.on("mousedown",i),e.on("mousemove",a),e.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(e.on("mousewheel",s),e.on("pinch",l))},n.disable=function(){e.off("mousedown",i),e.off("mousemove",a),e.off("mouseup",o),e.off("mousewheel",s),e.off("pinch",l)},n}return t.prototype.isDragging=function(){return this._dragging},t.prototype.isPinching=function(){return this._pinching},t.prototype.setPointerChecker=function(e){this.pointerChecker=e},t.prototype.dispose=function(){this.disable()},t.prototype._mousedownHandler=function(e){if(!tv(e)){for(var n=e.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=e.offsetX,a=e.offsetY;this.pointerChecker&&this.pointerChecker(e,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},t.prototype._mousemoveHandler=function(e){if(!(!this._dragging||!os("moveOnMouseMove",e,this._opt)||e.gestureEvent==="pinch"||vg(this._zr,"globalPan"))){var n=e.offsetX,i=e.offsetY,a=this._x,o=this._y,s=n-a,l=i-o;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&wi(e.event),J_(this,"pan","moveOnMouseMove",e,{dx:s,dy:l,oldX:a,oldY:o,newX:n,newY:i,isAvailableBehavior:null})}},t.prototype._mouseupHandler=function(e){tv(e)||(this._dragging=!1)},t.prototype._mousewheelHandler=function(e){var n=os("zoomOnMouseWheel",e,this._opt),i=os("moveOnMouseWheel",e,this._opt),a=e.wheelDelta,o=Math.abs(a),s=e.offsetX,l=e.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,f=a>0?u:1/u;af(this,"zoom","zoomOnMouseWheel",e,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),c=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);af(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:c,originX:s,originY:l,isAvailableBehavior:null})}}},t.prototype._pinchHandler=function(e){if(!vg(this._zr,"globalPan")){var n=e.pinchScale>1?1.1:1/1.1;af(this,"zoom",null,e,{scale:n,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t})(Ue);function af(r,t,e,n,i){r.pointerChecker&&r.pointerChecker(n,i.originX,i.originY)&&(wi(n.event),J_(r,t,e,n,i))}function J_(r,t,e,n,i){i.isAvailableBehavior=tt(os,null,e,n),r.trigger(t,i)}function os(r,t,e){var n=e[r];return!r||n&&(!G(n)||t.event[n+"Key"])}function Il(r,t,e,n,i,a){r=r||0;var o=e[1]-e[0];if(i!=null&&(i=Jn(i,[0,o])),a!=null&&(a=Math.max(a,i??0)),n==="all"){var s=Math.abs(t[1]-t[0]);s=Jn(s,[0,o]),i=a=Jn(s,[i,a]),n=0}t[0]=Jn(t[0],e),t[1]=Jn(t[1],e);var l=of(t,n);t[n]+=r;var u=i||0,f=e.slice();l.sign<0?f[0]+=u:f[1]-=u,t[n]=Jn(t[n],f);var h;return h=of(t,n),i!=null&&(h.sign!==l.sign||h.span<i)&&(t[1-n]=t[n]+l.sign*i),h=of(t,n),a!=null&&h.span>a&&(t[1-n]=t[n]+h.sign*a),t}function of(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function Jn(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var KE=(function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var n,i=e.getComponent("xAxis",this.get("xAxisIndex")),a=e.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(t.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],f=t.layout==="horizontal"?0:1,h=this._baseAxisDim=u[f],c=u[1-f],v=[i,a],d=v[f].get("type"),p=v[1-f].get("type"),g=t.data;if(g&&l){var m=[];D(g,function(w,b){var S;H(w)?(S=w.slice(),w.unshift(b)):H(w.value)?(S=B({},w),S.value=S.value.slice(),w.value.unshift(b)):S=w,m.push(S)}),t.data=m}var y=this.defaultValueDimensions,_=[{name:h,type:vh(d),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:c,type:vh(p),dimsDef:y.slice()}];return hE(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:Mt(l0,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r})(),QE=["itemStyle","borderColor"],JE=["itemStyle","borderColor0"],tL=["itemStyle","borderColorDoji"],eL=["itemStyle","color"],rL=["itemStyle","color0"];function Nc(r,t){return t.get(r>0?eL:rL)}function Bc(r,t){return t.get(r===0?tL:r>0?QE:JE)}var nL={seriesType:"candlestick",plan:eo(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=Nc(s,o),l.stroke=Bc(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");B(u,l)}}}}}},iL=["color","borderColor"],aL=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,n,i){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,n):this._incrementalRenderNormal(e,n)},t.prototype.eachRendered=function(e){Ja(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var n=e.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},t.prototype._renderNormal=function(e){var n=e.getData(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(f){if(n.hasValue(f)){var h=n.getItemLayout(f);if(s&&dg(u,h))return;var c=sf(h,f,!0);ir(c,{shape:{points:h.ends}},e,f),lf(c,n,f,o),a.add(c),n.setItemGraphicEl(f,c)}}).update(function(f,h){var c=i.getItemGraphicEl(h);if(!n.hasValue(f)){a.remove(c);return}var v=n.getItemLayout(f);if(s&&dg(u,v)){a.remove(c);return}c?(ve(c,{shape:{points:v.ends}},e,f),ic(c)):c=sf(v),lf(c,n,f,o),a.add(c),n.setItemGraphicEl(f,c)}).remove(function(f){var h=i.getItemGraphicEl(f);h&&a.remove(h)}).execute(),this._data=n},t.prototype._renderLarge=function(e){this._clear(),pg(e,this.group);var n=e.get("clip",!0)?H_(e.coordinateSystem,!1,e):null;n?this.group.setClipPath(n):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=i.getItemLayout(o),l=sf(s);lf(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,n){pg(n,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t})(we),oL=(function(){function r(){}return r})(),sL=(function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n.type="normalCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new oL},t.prototype.buildPath=function(e,n){var i=n.points;this.__simpleBox?(e.moveTo(i[4][0],i[4][1]),e.lineTo(i[6][0],i[6][1])):(e.moveTo(i[0][0],i[0][1]),e.lineTo(i[1][0],i[1][1]),e.lineTo(i[2][0],i[2][1]),e.lineTo(i[3][0],i[3][1]),e.closePath(),e.moveTo(i[4][0],i[4][1]),e.lineTo(i[5][0],i[5][1]),e.moveTo(i[6][0],i[6][1]),e.lineTo(i[7][0],i[7][1]))},t})(vt);function sf(r,t,e){var n=r.ends;return new sL({shape:{points:e?lL(n,r):n},z2:100})}function dg(r,t){for(var e=!0,n=0;n<t.ends.length;n++)if(r.contain(t.ends[n][0],t.ends[n][1])){e=!1;break}return e}function lf(r,t,e,n){var i=t.getItemModel(e);r.useStyle(t.getItemVisual(e,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,Cs(r,i);var a=t.getItemLayout(e).sign;D(r.states,function(s,l){var u=i.getModel(l),f=Nc(a,u),h=Bc(a,u)||f,c=s.style||(s.style={});f&&(c.fill=f),h&&(c.stroke=h)});var o=i.getModel("emphasis");ka(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function lL(r,t){return X(r,function(e){return e=e.slice(),e[1]=t.initBaseline,e})}var uL=(function(){function r(){}return r})(),uf=(function(r){O(t,r);function t(e){var n=r.call(this,e)||this;return n.type="largeCandlestickBox",n}return t.prototype.getDefaultShape=function(){return new uL},t.prototype.buildPath=function(e,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];e.moveTo(o,i[a++]),e.lineTo(o,i[a++])}else a+=3},t})(vt);function pg(r,t,e,n){var i=r.getData(),a=i.getLayout("largePoints"),o=new uf({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});t.add(o);var s=new uf({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});t.add(s);var l=new uf({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});t.add(l),ff(1,o,r),ff(-1,s,r),ff(0,l,r),n&&(o.incremental=!0,s.incremental=!0),e&&e.push(o,s)}function ff(r,t,e,n){var i=Bc(r,e)||Nc(r,e),a=e.getModel("itemStyle").getItemStyle(iL);t.useStyle(a),t.style.fill=null,t.style.stroke=i}var t1=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],e}return t.prototype.getShadowDim=function(){return"open"},t.prototype.brushSelector=function(e,n,i){var a=n.getItemLayout(e);return a&&i.rect(a.brushRect)},t.type="series.candlestick",t.dependencies=["xAxis","yAxis","grid"],t.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},t})(ke);$e(t1,KE,!0);function fL(r){!r||!H(r.series)||D(r.series,function(t){Z(t)&&t.type==="k"&&(t.type="candlestick")})}var hL={seriesType:"candlestick",plan:eo(),reset:function(r){var t=r.coordinateSystem,e=r.getData(),n=cL(r,e),i=0,a=1,o=["x","y"],s=e.getDimensionIndex(e.mapDimension(o[i])),l=X(e.mapDimensionsAll(o[a]),e.getDimensionIndex,e),u=l[0],f=l[1],h=l[2],c=l[3];if(e.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?d:v};function v(p,g){for(var m,y=g.getStore();(m=p.next())!=null;){var _=y.get(s,m),w=y.get(u,m),b=y.get(f,m),S=y.get(h,m),x=y.get(c,m),T=Math.min(w,b),M=Math.max(w,b),A=z(T,_),C=z(M,_),I=z(S,_),E=z(x,_),L=[];k(L,C,0),k(L,A,1),L.push($(E),$(C),$(I),$(A));var P=g.getItemModel(m),R=!!P.get(["itemStyle","borderColorDoji"]);g.setItemLayout(m,{sign:gg(y,m,w,b,f,R),initBaseline:w>b?C[a]:A[a],ends:L,brushRect:V(S,x,_)})}function z(j,J){var it=[];return it[i]=J,it[a]=j,isNaN(J)||isNaN(j)?[NaN,NaN]:t.dataToPoint(it)}function k(j,J,it){var at=J.slice(),ot=J.slice();at[i]=es(at[i]+n/2,1,!1),ot[i]=es(ot[i]-n/2,1,!0),it?j.push(at,ot):j.push(ot,at)}function V(j,J,it){var at=z(j,it),ot=z(J,it);return at[i]-=n/2,ot[i]-=n/2,{x:at[0],y:at[1],width:n,height:ot[1]-at[1]}}function $(j){return j[i]=es(j[i],1),j}}function d(p,g){for(var m=tr(p.count*4),y=0,_,w=[],b=[],S,x=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(S=p.next())!=null;){var M=x.get(s,S),A=x.get(u,S),C=x.get(f,S),I=x.get(h,S),E=x.get(c,S);if(isNaN(M)||isNaN(I)||isNaN(E)){m[y++]=NaN,y+=3;continue}m[y++]=gg(x,S,A,C,f,T),w[i]=M,w[a]=I,_=t.dataToPoint(w,null,b),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,w[a]=E,_=t.dataToPoint(w,null,b),m[y++]=_?_[1]:NaN}g.setLayout("largePoints",m)}}};function gg(r,t,e,n,i,a){var o;return e>n?o=-1:e<n?o=1:o=a?0:t>0?r.get(i,t-1)<=n?1:-1:1,o}function cL(r,t){var e=r.getBaseAxis(),n,i=e.type==="category"?e.getBandWidth():(n=e.getExtent(),Math.abs(n[1]-n[0])/t.count()),a=Pt(rt(r.get("barMaxWidth"),i),i),o=Pt(rt(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?Pt(s,i):Math.max(Math.min(i/2,a),o)}function vL(r){r.registerChartView(aL),r.registerSeriesModel(t1),r.registerPreprocessor(fL),r.registerVisual(nL),r.registerLayout(hL)}var gn=Ot(),mg=lt,hf=tt,dL=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,n,i){var a=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,a,t,e,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new kt,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),n.getZr().add(s);else{var c=Mt(yg,e,h);this.updatePointerEl(s,u,c),this.updateLabelEl(s,u,c,e)}wg(s,e,!0),this._renderHandle(a)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var n=e.get("animation"),i=t.axis,a=i.type==="category",o=e.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=Oc(t).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(t,e,n,i,a){},r.prototype.createPointerEl=function(t,e,n,i){var a=e.pointer;if(a){var o=gn(t).pointerEl=new XT[a.type](mg(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,n,i){if(e.label){var a=gn(t).labelEl=new $t(mg(e.label));t.add(a),_g(a,i)}},r.prototype.updatePointerEl=function(t,e,n){var i=gn(t).pointerEl;i&&e.pointer&&(i.setStyle(e.pointer.style),n(i,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,n,i){var a=gn(t).labelEl;a&&(a.setStyle(e.label.style),n(a,{x:e.label.x,y:e.label.y}),_g(a,i))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=e.getModel("handle"),o=e.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=oc(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){wi(u.event)},onmousedown:hf(this._onHandleDragMove,this,0,0),drift:hf(this._onHandleDragMove,this),ondragend:hf(this._onHandleDragEnd,this)}),n.add(i)),wg(i,e,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");H(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,xl(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){yg(this._axisPointerModel,!e&&this._moveAnimation,this._handle,cf(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(cf(n),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(cf(i)),gn(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),n=this._group,i=this._handle;e&&n&&(this._lastGraphicKey=null,n&&e.remove(n),i&&e.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Ps(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,n){return n=n||0,{x:t[n],y:t[1-n],width:e[n],height:e[1-n]}},r})();function yg(r,t,e,n){e1(gn(e).lastProp,n)||(gn(e).lastProp=n,t?ve(e,n,r):(e.stopAnimation(),e.attr(n)))}function e1(r,t){if(Z(r)&&Z(t)){var e=!0;return D(t,function(n,i){e=e&&e1(r[i],n)}),!!e}else return r===t}function _g(r,t){r[t.get(["label","show"])?"show":"hide"]()}function cf(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function wg(r,t,e){var n=t.get("z"),i=t.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=e)})}function pL(r){var t=r.get("type"),e=r.getModel(t+"Style"),n;return t==="line"?(n=e.getLineStyle(),n.fill=null):t==="shadow"&&(n=e.getAreaStyle(),n.stroke=null),n}function gL(r,t,e,n,i){var a=e.get("value"),o=r1(a,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=wl(s.get("padding")||0),u=s.getFont(),f=Uh(o,u),h=i.position,c=f.width+l[1]+l[3],v=f.height+l[0]+l[2],d=i.align;d==="right"&&(h[0]-=c),d==="center"&&(h[0]-=c/2);var p=i.verticalAlign;p==="bottom"&&(h[1]-=v),p==="middle"&&(h[1]-=v/2),mL(h,c,v,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:mr(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function mL(r,t,e,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+t,i)-t,r[1]=Math.min(r[1]+e,a)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function r1(r,t,e,n,i){r=t.scale.parse(r);var a=t.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:Ac(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};D(n,function(l){var u=e.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),G(o)?a=o.replace("{value}",a):Q(o)&&(a=o(s))}return a}function n1(r,t,e){var n=vi();return Hh(n,n,e.rotation),Pf(n,n,e.position),Na([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],n)}function yL(r,t,e,n,i,a){var o=Vr.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=i.get(["label","margin"]),gL(t,n,i,a,{position:n1(n.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function _L(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function wL(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}var bL=(function(r){O(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),f=bg(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var c=pL(a),v=SL[u](s,h,f);v.style=c,e.graphicKey=v.type,e.pointer=v}var d=wh(l.model,i);yL(n,e,d,i,a,o)},t.prototype.getHandleTransform=function(e,n,i){var a=wh(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=n1(n.axis,e,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=bg(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[e.x,e.y];h[f]+=n[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var c=(u[1]+u[0])/2,v=[c,c];v[f]=h[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:e.rotation,cursorPoint:v,tooltipOption:d[f]}},t})(dL);function bg(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var SL={line:function(r,t,e){var n=_L([t,e[0]],[t,e[1]],Sg(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,t,e){var n=Math.max(1,r.getBandWidth()),i=e[1]-e[0];return{type:"Rect",shape:wL([t-n/2,e[0]],[n,i],Sg(r))}}};function Sg(r){return r.dim==="x"?0:1}var xL=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.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}},t})(ht),cr=Ot(),CL=D;function i1(r,t,e){if(!K.node){var n=t.getZr();cr(n).records||(cr(n).records={}),TL(n,t);var i=cr(n).records[r]||(cr(n).records[r]={});i.handler=e}}function TL(r,t){if(cr(r).initialized)return;cr(r).initialized=!0,e("click",Mt(xg,"click")),e("mousemove",Mt(xg,"mousemove")),e("globalout",ML);function e(n,i){r.on(n,function(a){var o=AL(t);CL(cr(r).records,function(s){s&&i(s,a,o.dispatchAction)}),DL(o.pendings,t)})}}function DL(r,t){var e=r.showTip.length,n=r.hideTip.length,i;e?i=r.showTip[e-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function ML(r,t,e){r.handler("leave",null,e)}function xg(r,t,e,n){t.handler(r,e,n)}function AL(r){var t={showTip:[],hideTip:[]},e=function(n){var i=t[n.type];i?i.push(n):(n.dispatchAction=e,r.dispatchAction(n))};return{dispatchAction:e,pendings:t}}function xh(r,t){if(!K.node){var e=t.getZr(),n=(cr(e).records||{})[r];n&&(cr(e).records[r]=null)}}var IL=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){var a=n.getComponent("tooltip"),o=e.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";i1("axisPointer",i,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},t.prototype.remove=function(e,n){xh("axisPointer",n)},t.prototype.dispose=function(e,n){xh("axisPointer",n)},t.type="axisPointer",t})(Oe);function a1(r,t){var e=[],n=r.seriesIndex,i;if(n==null||!(i=t.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=En(a,r);if(o==null||o<0||H(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)e=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,c=u.dim,v=h==="x"||h==="radius"?1:0,d=a.mapDimension(c),p=[];p[v]=a.get(d,o),p[1-v]=a.get(a.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(a.getValues(X(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var Cg=Ot();function EL(r,t,e){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||tt(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){ss(i)&&(i=a1({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var l=ss(i),u=a.axesInfo,f=s.axesInfo,h=n==="leave"||ss(i),c={},v={},d={list:[],map:{}},p={showPointer:Mt(PL,v),showTooltip:Mt(RL,d)};D(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);D(s.coordSysAxesInfo[y],function(w,b){var S=w.axis,x=BL(u,w);if(!h&&_&&(!u||x)){var T=x&&x.value;T==null&&!l&&(T=S.pointToData(i)),T!=null&&Tg(w,T,p,!1,c)}})});var g={};return D(f,function(m,y){var _=m.linkGroup;_&&!v[y]&&D(_.axesInfo,function(w,b){var S=v[b];if(w!==m&&S){var x=S.value;_.mapper&&(x=m.axis.scale.parse(_.mapper(x,Dg(w),Dg(m)))),g[m.key]=x}})}),D(g,function(m,y){Tg(f[y],m,p,!0,c)}),kL(v,f,c),OL(d,i,r,o),NL(f,o,e),c}}function Tg(r,t,e,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=LL(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&B(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function LL(r,t){var e=t.axis,n=e.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return D(t.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),h,c;if(l.getAxisTooltipData){var v=l.getAxisTooltipData(f,r,e);c=v.dataIndices,h=v.nestestValue}else{if(c=l.getData().indicesOfNearest(f[0],r,e.type==="category"?.5:null),!c.length)return;h=l.getData().get(f[0],c[0])}if(!(h==null||!isFinite(h))){var d=r-h,p=Math.abs(d);p<=o&&((p<o||d>=0&&s<0)&&(o=p,s=d,i=h,a.length=0),D(c,function(g){a.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:a,snapToValue:i}}function PL(r,t,e,n){r[t.key]={value:e,payloadBatch:n}}function RL(r,t,e,n){var i=e.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!i.length)){var l=t.coordSys.model,u=$a(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function kL(r,t,e){var n=e.axesInfo=[];D(t,function(i,a){var o=i.axisPointerModel.option,s=r[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function OL(r,t,e,n){if(ss(t)||!r.list.length){n({type:"hideTip"});return}var i=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function NL(r,t,e){var n=e.getZr(),i="axisPointerLastHighlights",a=Cg(n)[i]||{},o=Cg(n)[i]={};D(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&D(h.seriesDataIndices,function(c){var v=c.seriesIndex+" | "+c.dataIndex;o[v]=c})});var s=[],l=[];D(a,function(u,f){!o[f]&&l.push(u)}),D(o,function(u,f){!a[f]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function BL(r,t){for(var e=0;e<(r||[]).length;e++){var n=r[e];if(t.axis.dim===n.axisDim&&t.axis.model.componentIndex===n.axisIndex)return n}}function Dg(r){var t=r.axis.model,e={},n=e.axisDim=r.axis.dim;return e.axisIndex=e[n+"AxisIndex"]=t.componentIndex,e.axisName=e[n+"AxisName"]=t.name,e.axisId=e[n+"AxisId"]=t.id,e}function ss(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Fc(r){X_.registerAxisPointerClass("CartesianAxisPointer",bL),r.registerComponentModel(xL),r.registerComponentView(IL),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!H(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=kE(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},EL)}function FL(r){Ge(Q_),Ge(Fc)}var Mg=["x","y","radius","angle","single"],zL=["cartesian2d","polar","singleAxis"];function VL(r){var t=r.get("coordinateSystem");return yt(zL,t)>=0}function Br(r){return process.env.NODE_ENV!=="production"&&nt(r),r+"Axis"}function HL(r,t){var e=et(),n=[],i=et();r.eachComponent({mainType:"dataZoom",query:t},function(f){i.get(f.uid)||s(f)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(f){!i.get(f.uid)&&l(f)&&(s(f),a=!0)}function s(f){i.set(f.uid,!0),n.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(c,v){var d=e.get(c);d&&d[v]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,c){(e.get(h)||e.set(h,[]))[c]=!0})}return n}function o1(r){var t=r.ecModel,e={infoList:[],infoMap:et()};return r.eachTargetAxis(function(n,i){var a=t.getComponent(Br(n),i);if(a){var o=a.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(a)}}}),e}var vf=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r})(),Vs=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,n,i){var a=Ag(e);this.settledOption=a,this.mergeDefaultAndTheme(e,i),this._doInit(a)},t.prototype.mergeOption=function(e){var n=Ag(e);ct(this.option,e,!0),ct(this.settledOption,n,!0),this._doInit(n)},t.prototype._doInit=function(e){var n=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var i=this.settledOption;D([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),n=this._targetAxisInfoMap=et(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var n=!1;return D(Mg,function(i){var a=this.getReferringComponents(Br(i),zx);if(a.specified){n=!0;var o=new vf;D(a.models,function(s){o.add(s.componentIndex)}),e.set(i,o)}},this),n},t.prototype._fillAutoTargetAxisByOrient=function(e,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var h=u[0];if(h){var c=new vf;if(c.add(h.componentIndex),e.set(f,c),a=!1,f==="x"||f==="y"){var v=h.getReferringComponents("grid",he).models[0];v&&D(u,function(d){h.componentIndex!==d.componentIndex&&v===d.getReferringComponents("grid",he).models[0]&&c.add(d.componentIndex)})}}}a&&D(Mg,function(u){if(a){var f=i.findComponents({mainType:Br(u),filter:function(c){return c.get("type",!0)==="category"}});if(f[0]){var h=new vf;h.add(f[0].componentIndex),e.set(u,h),a=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(n){!e&&(e=n)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var n=this._rangePropMode,i=this.get("rangeMode");D([["start","startValue"],["end","endValue"]],function(a,o){var s=e[a[0]]!=null,l=e[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(n,i){e==null&&(e=this.ecModel.getComponent(Br(n),i))},this),e},t.prototype.eachTargetAxis=function(e,n){this._targetAxisInfoMap.each(function(i,a){D(i.indexList,function(o){e.call(n,a,o)})})},t.prototype.getAxisProxy=function(e,n){var i=this.getAxisModel(e,n);if(i)return i.__dzAxisProxy},t.prototype.getAxisModel=function(e,n){process.env.NODE_ENV!=="production"&&nt(e&&n!=null);var i=this._targetAxisInfoMap.get(e);if(i&&i.indexMap[n])return this.ecModel.getComponent(Br(e),n)},t.prototype.setRawRange=function(e){var n=this.option,i=this.settledOption;D([["start","startValue"],["end","endValue"]],function(a){(e[a[0]]!=null||e[a[1]]!=null)&&(n[a[0]]=i[a[0]]=e[a[0]],n[a[1]]=i[a[1]]=e[a[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var n=this.option;D(["start","startValue","end","endValue"],function(i){n[i]=e[i]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,n){if(e==null&&n==null){var i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(e,n).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},t.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},t.prototype.getOrient=function(){return process.env.NODE_ENV!=="production"&&nt(this._orient),this._orient},t.type="dataZoom",t.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],t.defaultOption={z:4,filterMode:"filter",start:0,end:100},t})(ht);function Ag(r){var t={};return D(["start","end","startValue","endValue","throttle"],function(e){r.hasOwnProperty(e)&&(t[e]=r[e])}),t}var s1=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i,a){this.dataZoomModel=e,this.ecModel=n,this.api=i},t.type="dataZoom",t})(Oe),ai=D,Ig=fa,WL=(function(){function r(t,e,n,i){this._dimName=t,this._axisIndex=e,this.ecModel=i,this._dataZoomModel=n}return r.prototype.hostedBy=function(t){return this._dataZoomModel===t},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var t=[];return this.ecModel.eachSeries(function(e){if(VL(e)){var n=Br(this._dimName),i=e.getReferringComponents(n,he).models[0];i&&this._axisIndex===i.componentIndex&&t.push(e)}},this),t},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return lt(this._minMaxSpan)},r.prototype.calculateDataWindow=function(t){var e=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;ai(["start","end"],function(c,v){var d=t[c],p=t[c+"Value"];a[v]==="percent"?(d==null&&(d=o[v]),p=i.parse(Xt(d,o,e))):(u=!0,p=p==null?e[v]:i.parse(p),d=Xt(p,e,o)),l[v]=p==null||isNaN(p)?e[v]:p,s[v]=d==null||isNaN(d)?o[v]:d}),Ig(l),Ig(s);var f=this._minMaxSpan;u?h(l,s,e,o,!1):h(s,l,o,e,!0);function h(c,v,d,p,g){var m=g?"Span":"ValueSpan";Il(0,c,d,"all",f["min"+m],f["max"+m]);for(var y=0;y<2;y++)v[y]=Xt(c[y],d,p,!0),g&&(v[y]=i.parse(v[y]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(t){if(t===this._dataZoomModel){var e=this.getTargetSeriesModels();this._dataExtent=GL(this,this._dimName,e),this._updateMinMaxSpan();var n=this.calculateDataWindow(t.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(t,e){if(t!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=t.get("filterMode"),o=this._valueWindow;if(a==="none")return;ai(i,function(l){var u=l.getData(),f=u.mapDimensionsAll(n);if(f.length){if(a==="weakFilter"){var h=u.getStore(),c=X(f,function(v){return u.getDimensionIndex(v)},u);u.filterSelf(function(v){for(var d,p,g,m=0;m<f.length;m++){var y=h.get(c[m],v),_=!isNaN(y),w=y<o[0],b=y>o[1];if(_&&!w&&!b)return!0;_&&(g=!0),w&&(d=!0),b&&(p=!0)}return g&&d&&p})}else ai(f,function(v){if(a==="empty")l.setData(u=u.map(v,function(p){return s(p)?p:NaN}));else{var d={};d[v]=o,u.selectRange(d)}});ai(f,function(v){u.setApproximateExtent(o,v)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,n=this._dataExtent;ai(["min","max"],function(i){var a=e.get(i+"Span"),o=e.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Xt(n[0]+o,n,[0,100],!0):a!=null&&(o=Xt(a,[0,100],n,!0)-n[0]),t[i+"Span"]=a,t[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,n=this._valueWindow;if(e){var i=ey(n,[0,500]);i=Math.min(i,20);var a=t.axis.scale.rawExtentInfo;e[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),e[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r})();function GL(r,t,e){var n=[1/0,-1/0];ai(e,function(o){vI(n,o.getData(),t)});var i=r.getAxisModel(),a=x_(i.axis.scale,i,n).calculate();return[a.min,a.max]}var $L={getTargetSeries:function(r){function t(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Br(o),s);i(o,s,l,a)})})}t(function(i,a,o,s){o.__dzAxisProxy=null});var e=[];t(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new WL(i,a,s,r),e.push(o.__dzAxisProxy))});var n=et();return D(e,function(i){D(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).reset(e)}),e.eachTargetAxis(function(n,i){e.getAxisProxy(n,i).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var n=e.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();e.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};function UL(r){r.registerAction("dataZoom",function(t,e){var n=HL(e,t);D(n,function(i){i.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var Eg=!1;function l1(r){Eg||(Eg=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,$L),UL(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function YL(r,t){var e=wl(t.get("padding")),n=t.getItemStyle(["color","opacity"]);return n.fill=t.get("backgroundColor"),r=new Tt({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:n,silent:!0,z2:-1}),r}var jL=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.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}},t})(ht);function u1(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function f1(r){if(K.domSupported){for(var t=document.documentElement.style,e=0,n=r.length;e<n;e++)if(r[e]in t)return r[e]}}var h1=f1(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),ZL=f1(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function c1(r,t){if(!r)return t;t=n0(t,!0);var e=r.indexOf(t);return r=e===-1?t:"-"+r.slice(0,e)+"-"+t,r.toLowerCase()}function XL(r,t){var e=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return e?e[t]:null}var qL=c1(ZL,"transition"),zc=c1(h1,"transform"),KL="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(K.transform3dSupported?"will-change:transform;":"");function QL(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function JL(r,t,e){if(!G(e)||e==="inside")return"";var n=r.get("backgroundColor"),i=r.get("borderWidth");t=Pn(t);var a=QL(e),o=Math.max(Math.round(i)*1.5,6),s="",l=zc+":",u;yt(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+i,c=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),v=Math.round(((c-Math.SQRT2*i)/2+Math.SQRT2*i-(c-h)/2)*100)/100;s+=";"+a+":-"+v+"px";var d=t+" solid "+i+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+n+";"];return'<div style="'+p.join("")+'"></div>'}function tP(r,t){var e="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+e,i="opacity"+n+",visibility"+n;return t||(n=" "+r+"s "+e,i+=K.transformSupported?","+zc+n:",left"+n+",top"+n),qL+":"+i}function Lg(r,t,e){var n=r.toFixed(0)+"px",i=t.toFixed(0)+"px";if(!K.transformSupported)return e?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=K.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return e?"top:0;left:0;"+zc+":"+o+";":[["top",0],["left",0],[h1,o]]}function eP(r){var t=[],e=r.get("fontSize"),n=r.getTextColor();n&&t.push("color:"+n),t.push("font:"+r.getFont());var i=rt(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+i+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),D(["decoration","align"],function(u){var f=r.get(u);f&&t.push("text-"+u+":"+f)}),t.join(";")}function rP(r,t,e){var n=[],i=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=I0(r,"html"),c=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+c),t&&i&&n.push(tP(i,e)),a&&n.push("background-color:"+a),D(["width","color","radius"],function(v){var d="border-"+v,p=n0(d),g=r.get(p);g!=null&&n.push(d+":"+g+(v==="color"?"":"px"))}),n.push(eP(f)),h!=null&&n.push("padding:"+wl(h).join("px ")+"px"),n.join(";")+";"}function Pg(r,t,e,n,i){var a=t&&t.painter;if(e){var o=a&&a.getViewportRoot();o&&dS(r,o,e,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var nP=(function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,K.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=t.getZr(),a=e.appendTo,o=a&&(G(a)?document.querySelector(a):_i(a)?a:Q(a)&&a(t.getDom()));Pg(this._styleCoord,i,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(n),this._api=t,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=i.handler,f=i.painter.getViewportRoot();De(f,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(t){if(!this._container){var e=this._api.getDom(),n=XL(e,"position"),i=e.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=t.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=KL+rP(t,!this._firstShow,this._longHide)+Lg(a[0],a[1],!0)+("border-color:"+Pn(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,n,i,a){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(G(a)&&n.get("trigger")==="item"&&!u1(n)&&(s=JL(n,i,a)),G(t))o.innerHTML=t+s;else if(t){o.innerHTML="",H(t)||(t=[t]);for(var l=0;l<t.length;l++)_i(t[l])&&t[l].parentNode!==o&&o.appendChild(t[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el;return t?[t.offsetWidth,t.offsetHeight]:[0,0]},r.prototype.moveTo=function(t,e){if(this.el){var n=this._styleCoord;if(Pg(n,this._zr,this._container,t,e),n[0]!=null&&n[1]!=null){var i=this.el.style,a=Lg(n[0],n[1]);D(a,function(o){i[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){var t=this,e=this.el.style;e.visibility="hidden",e.opacity="0",K.transform3dSupported&&(e.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return t._longHide=!0},500)},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(tt(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var t=this.el.parentNode;t&&t.removeChild(this.el),this.el=this._container=null},r})(),iP=(function(){function r(t){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=t.getZr(),kg(this._styleCoord,this._zr,t.getWidth()/2,t.getHeight()/2)}return r.prototype.update=function(t){var e=t.get("alwaysShowContent");e&&this._moveIfResized(),this._alwaysShowContent=e},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(t,e,n,i,a){var o=this;Z(t)&&ue(process.env.NODE_ENV!=="production"?"Passing DOM nodes as content is not supported in richText tooltip!":""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new $t({style:{rich:e.richTextStyles,text:t,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:I0(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),D(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),D(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(t){this._enterable=t},r.prototype.getSize=function(){var t=this.el,e=this.el.getBoundingRect(),n=Rg(t.style);return[e.width+n.left+n.right,e.height+n.top+n.bottom]},r.prototype.moveTo=function(t,e){var n=this.el;if(n){var i=this._styleCoord;kg(i,this._zr,t,e),t=i[0],e=i[1];var a=n.style,o=kr(a.borderWidth||0),s=Rg(a);n.x=t+o+s.left,n.y=e+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var t=this._styleCoord[2],e=this._styleCoord[3];this.moveTo(t*this._zr.getWidth(),e*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(t){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(t?(this._hideDelay=t,this._show=!1,this._hideTimeout=setTimeout(tt(this.hide,this),t)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r})();function kr(r){return Math.max(0,r)}function Rg(r){var t=kr(r.shadowBlur||0),e=kr(r.shadowOffsetX||0),n=kr(r.shadowOffsetY||0);return{left:kr(t-e),right:kr(t+e),top:kr(t-n),bottom:kr(t+n)}}function kg(r,t,e,n){r[0]=e,r[1]=n,r[2]=r[0]/t.getWidth(),r[3]=r[1]/t.getHeight()}var aP=new Tt({shape:{x:-1,y:-1,width:2,height:2}}),oP=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,n){if(!(K.node||!n.getDom())){var i=e.getComponent("tooltip"),a=this._renderMode=Hx(i.get("renderMode"));this._tooltipContent=a==="richText"?new iP(n):new nP(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},t.prototype.render=function(e,n,i){if(!(K.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=e,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(e),a.setEnterable(e.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&e.get("transitionDuration")?xl(this,"_updatePosition",50,"fixRate"):Ps(this,"_updatePosition")}},t.prototype._initGlobalListener=function(){var e=this._tooltipModel,n=e.get("triggerOn");i1("itemTooltip",this._api,tt(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,n=this._ecModel,i=this._api,a=e.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(e,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,n,i,a){if(!(a.from===this.uid||K.node||!i.getDom())){var o=Og(a,i);this._ticket="";var s=a.dataByCoordSys,l=fP(a,n,i);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var f=aP;f.x=a.x,f.y=a.y,f.update(),ft(f).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:f},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(e,n,i,a))return;var h=a1(a,n),c=h.point[0],v=h.point[1];c!=null&&v!=null&&this._tryShow({offsetX:c,offsetY:v,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},t.prototype.manuallyHideTip=function(e,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(Og(a,i))},t.prototype._manuallyAxisShowTip=function(e,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),h=ea([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},t.prototype._tryShow=function(e,n){var i=e.target,a=this._tooltipModel;if(a){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(i){var s=ft(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;da(i,function(f){if(ft(f).dataIndex!=null)return l=f,!0;if(ft(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(e,l,n):u?this._showComponentItemTooltip(e,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},t.prototype._showOrMove=function(e,n){var i=e.get("showDelay");n=tt(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},t.prototype._showAxisTooltip=function(e,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=ea([n.tooltipOption],a),l=this._renderMode,u=[],f=Va("section",{blocks:[],noHeader:!0}),h=[],c=new Bu;D(e,function(y){D(y.dataByAxis,function(_){var w=i.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!w||b==null)){var S=r1(b,w.axis,i,_.seriesDataIndices,_.valueLabelOpt),x=Va("section",{header:S,noHeader:!Qe(S),sortBlocks:!0,blocks:[]});f.blocks.push(x),D(_.seriesDataIndices,function(T){var M=i.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,C=M.getDataParams(A);if(!(C.dataIndex<0)){C.axisDim=_.axisDim,C.axisIndex=_.axisIndex,C.axisType=_.axisType,C.axisId=_.axisId,C.axisValue=Ac(w.axis,{value:b}),C.axisValueLabel=S,C.marker=c.makeTooltipMarker("item",Pn(C.color),l);var I=Gd(M.formatTooltip(A,!0,null)),E=I.frag;if(E){var L=ea([M],a).get("valueFormatter");x.blocks.push(L?B({valueFormatter:L},E):E)}I.text&&h.push(I.text),u.push(C)}})}})}),f.blocks.reverse(),h.reverse();var v=n.position,d=s.get("order"),p=Zd(f,c,l,d,i.get("useUTC"),s.get("textStyle"));p&&h.unshift(p);var g=l==="richText"?`
|
|
42
|
+
|
|
43
|
+
`:"<br/>",m=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(e,n,i){var a=this._ecModel,o=ft(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,d=e.positionDefault,p=ea([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var m=u.getDataParams(f,h),y=new Bu;m.marker=y.makeTooltipMarker("item",Pn(m.color),v);var _=Gd(u.formatTooltip(f,!1,h)),w=p.get("order"),b=p.get("valueFormatter"),S=_.frag,x=S?Zd(b?B({valueFormatter:b},S):S,y,v,w,a.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,x,m,T,e.offsetX,e.offsetY,e.position,e.target,y)}),i({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,n,i){var a=this._renderMode==="html",o=ft(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(G(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=lt(l),l.content=se(l.content));var h=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:l.content});var v=e.positionDefault,d=ea(h,this._tooltipModel,v?{position:v}:null),p=d.get("content"),g=Math.random()+"",m=new Bu;this._showOrMove(d,function(){var y=lt(d.get("formatterParams")||{});this._showTooltipContent(d,p,y,g,e.offsetX,e.offsetY,e.position,n,m)}),i({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,n,i,a,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var c=e.get("formatter");l=l||e.get("position");var v=n,d=this._getNearestPoint([o,s],i,e.get("trigger"),e.get("borderColor")),p=d.color;if(c)if(G(c)){var g=e.ecModel.get("useUTC"),m=H(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;v=c,y&&(v=pl(m.axisValue,v,g)),v=i0(v,i,!0)}else if(Q(c)){var _=tt(function(w,b){w===this._ticket&&(h.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,h,i,u))},this);this._ticket=a,v=c(i,a,_)}else v=c;h.setContent(v,f,e,p,l),h.show(e,p),this._updatePosition(e,l,o,s,h,i,u)}},t.prototype._getNearestPoint=function(e,n,i,a){if(i==="axis"||H(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!H(n))return{color:a||n.color||n.borderColor}},t.prototype._updatePosition=function(e,n,i,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||e.get("position");var h=o.getSize(),c=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Q(n)&&(n=n([i,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),H(n))i=Pt(n[0],u),a=Pt(n[1],f);else if(Z(n)){var p=n;p.width=h[0],p.height=h[1];var g=xi(p,{width:u,height:f});i=g.x,a=g.y,c=null,v=null}else if(G(n)&&l){var m=uP(n,d,h,e.get("borderWidth"));i=m[0],a=m[1]}else{var m=sP(i,a,o,u,f,c?null:20,v?null:20);i=m[0],a=m[1]}if(c&&(i-=Ng(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=Ng(v)?h[1]/2:v==="bottom"?h[1]:0),u1(e)){var m=lP(i,a,o,u,f);i=m[0],a=m[1]}o.moveTo(i,a)},t.prototype._updateContentNotChangedOnAxis=function(e,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===e.length;return o&&D(i,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&D(u,function(c,v){var d=h[v]||{},p=c.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&p.length===g.length,o&&D(p,function(m,y){var _=g[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&D(c.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],w=a[y];_&&w&&w.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=n,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,n){K.node||!n.getDom()||(Ps(this,"_updatePosition"),this._tooltipContent.dispose(),xh("itemTooltip",n))},t.type="tooltip",t})(Oe);function ea(r,t,e){var n=t.ecModel,i;e?(i=new At(e,n,n),i=new At(t.option,i,n)):i=t;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof At&&(o=o.get("tooltip",!0)),G(o)&&(o={formatter:o}),o&&(i=new At(o,i,n)))}return i}function Og(r,t){return r.dispatchAction||tt(t.dispatchAction,t)}function sP(r,t,e,n,i,a,o){var s=e.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(t+u+o>i?t-=u+o:t+=o),[r,t]}function lP(r,t,e,n,i){var a=e.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,t=Math.min(t+s,i)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function uP(r,t,e,n){var i=e[0],a=e[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=t.width,f=t.height;switch(r){case"inside":s=t.x+u/2-i/2,l=t.y+f/2-a/2;break;case"top":s=t.x+u/2-i/2,l=t.y-a-o;break;case"bottom":s=t.x+u/2-i/2,l=t.y+f+o;break;case"left":s=t.x-i-o,l=t.y+f/2-a/2;break;case"right":s=t.x+u+o,l=t.y+f/2-a/2}return[s,l]}function Ng(r){return r==="center"||r==="middle"}function fP(r,t,e){var n=Zh(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=Ka(t,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ft(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}function hP(r){Ge(Fc),r.registerComponentModel(jL),r.registerComponentView(oP),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},re),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},re)}var cP=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.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"}},t})(ht),vP=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,n,i){if(this.group.removeAll(),!!e.get("show")){var a=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=rt(e.get("textBaseline"),e.get("textVerticalAlign")),f=new $t({style:mr(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),c=e.get("subtext"),v=new $t({style:mr(s,{text:c,fill:s.getTextColor(),y:h.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);f.silent=!d&&!g,v.silent=!p&&!g,d&&f.on("click",function(){Td(d,"_"+e.get("target"))}),p&&v.on("click",function(){Td(p,"_"+e.get("subtarget"))}),ft(f).eventData=ft(v).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,a.add(f),c&&a.add(v);var m=a.getBoundingRect(),y=e.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=xi(y,{width:i.getWidth(),height:i.getHeight()},e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var w={align:l,verticalAlign:u};f.setStyle(w),v.setStyle(w),m=a.getBoundingRect();var b=_.margin,S=e.getItemStyle(["color","opacity"]);S.fill=e.get("backgroundColor");var x=new Tt({shape:{x:m.x-b[3],y:m.y-b[0],width:m.width+b[1]+b[3],height:m.height+b[0]+b[2],r:e.get("borderRadius")},style:S,subPixelOptimize:!0,silent:!0});a.add(x)}},t.type="title",t})(Oe);function dP(r){r.registerComponentModel(cP),r.registerComponentView(vP)}var pP=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},Ch=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,n,i){this.mergeDefaultAndTheme(e,i),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),this._updateSelector(e)},t.prototype._updateSelector=function(e){var n=e.selector,i=this.ecModel;n===!0&&(n=e.selector=["all","inverse"]),H(n)&&D(n,function(a,o){G(a)&&(a={type:a}),n[o]=ct(a,pP(i,a.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<e.length;i++){var a=e[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(e[0].get("name"))}},t.prototype._updateData=function(e){var n=[],i=[];e.eachRawSeries(function(l){var u=l.name;i.push(u);var f;if(l.legendVisualProvider){var h=l.legendVisualProvider,c=h.getAllNames();e.isSeriesFiltered(l)||(i=i.concat(c)),c.length?n=n.concat(c):f=!0}else f=!0;f&&jh(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=et(),s=X(a,function(l){return(G(l)||St(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new At(l,this,this.ecModel))},this);this._data=Wt(s,function(l){return!!l})},t.prototype.getData=function(){return this._data},t.prototype.select=function(e){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;D(a,function(o){n[o.get("name")]=!1})}n[e]=!0},t.prototype.unSelect=function(e){this.get("selectedMode")!=="single"&&(this.option.selected[e]=!1)},t.prototype.toggleSelected=function(e){var n=this.option.selected;n.hasOwnProperty(e)||(n[e]=!0),this[n[e]?"unSelect":"select"](e)},t.prototype.allSelect=function(){var e=this._data,n=this.option.selected;D(e,function(i){n[i.get("name",!0)]=!0})},t.prototype.inverseSelect=function(){var e=this._data,n=this.option.selected;D(e,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},t.prototype.isSelected=function(e){var n=this.option.selected;return!(n.hasOwnProperty(e)&&!n[e])&&yt(this._availableNames,e)>=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.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}},t})(ht),ti=Mt,Th=D,$o=kt,v1=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new $o),this.group.add(this._selectorGroup=new $o),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,n,i){var a=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,n,i,l,s,u);var f=e.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},c=e.get("padding"),v=xi(f,h,c),d=this.layoutInner(e,o,v,a,l,u),p=xi(_t({width:d.width,height:d.height},f),h,c);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=YL(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,n,i,a,o,s,l){var u=this.getContentGroup(),f=et(),h=n.get("selectedMode"),c=[];i.eachRawSeries(function(v){!v.get("legendHoverLink")&&c.push(v.id)}),Th(n.getData(),function(v,d){var p=v.get("name");if(!this.newlineDisabled&&(p===""||p===`
|
|
44
|
+
`)){var g=new $o;g.newline=!0,u.add(g);return}var m=i.getSeriesByName(p)[0];if(!f.get(p)){if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},w=y.getVisual("legendIcon"),b=y.getVisual("style"),S=this._createItem(m,p,d,v,n,e,_,b,w,h,a);S.on("click",ti(Bg,p,null,a,c)).on("mouseover",ti(Dh,m.name,null,a,c)).on("mouseout",ti(Mh,m.name,null,a,c)),i.ssr&&S.eachChild(function(x){var T=ft(x);T.seriesIndex=m.seriesIndex,T.dataIndex=d,T.ssrType="legend"}),f.set(p,!0)}else i.eachRawSeries(function(x){if(!f.get(p)&&x.legendVisualProvider){var T=x.legendVisualProvider;if(!T.containName(p))return;var M=T.indexOfName(p),A=T.getItemVisual(M,"style"),C=T.getItemVisual(M,"legendIcon"),I=vr(A.fill);I&&I[3]===0&&(I[3]=.2,A=B(B({},A),{fill:Zs(I,"rgba")}));var E=this._createItem(x,p,d,v,n,e,{},A,C,h,a);E.on("click",ti(Bg,null,p,a,c)).on("mouseover",ti(Dh,null,p,a,c)).on("mouseout",ti(Mh,null,p,a,c)),i.ssr&&E.eachChild(function(L){var P=ft(L);P.seriesIndex=x.seriesIndex,P.dataIndex=d,P.ssrType="legend"}),f.set(p,!0)}},this);process.env.NODE_ENV!=="production"&&(f.get(p)||console.warn(p+" series not exists. Legend data should be same with series name or data name."))}},this),o&&this._createSelector(o,n,a,s,l)},t.prototype._createSelector=function(e,n,i,a,o){var s=this.getSelectorGroup();Th(e,function(u){var f=u.type,h=new $t({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var c=n.getModel("selectorLabel"),v=n.getModel(["emphasis","selectorLabel"]);fl(h,{normal:c,emphasis:v},{defaultText:u.title}),xs(h)})},t.prototype._createItem=function(e,n,i,a,o,s,l,u,f,h,c){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var w=gP(f,a,l,u,v,g,c),b=new $o,S=a.getModel("textStyle");if(Q(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:m,itemStyle:w.itemStyle,lineStyle:w.lineStyle,symbolKeepAspect:y}));else{var x=_==="inherit"&&e.getData().getVisual("symbol")?m==="inherit"?e.getData().getVisual("symbolRotate"):m:0;b.add(mP({itemWidth:d,itemHeight:p,icon:f,iconRotate:x,itemStyle:w.itemStyle,symbolKeepAspect:y}))}var T=s==="left"?d+5:-5,M=s,A=o.get("formatter"),C=n;G(A)&&A?C=A.replace("{name}",n??""):Q(A)&&(C=A(n));var I=g?S.getTextColor():a.get("inactiveColor");b.add(new $t({style:mr(S,{text:C,x:T,y:p/2,fill:I,align:M,verticalAlign:"middle"},{inheritColor:I})}));var E=new Tt({shape:b.getBoundingRect(),style:{fill:"transparent"}}),L=a.getModel("tooltip");return L.get("show")&&ll({el:E,componentModel:o,itemName:n,itemTooltipOption:L.option}),b.add(E),b.eachChild(function(P){P.silent=!0}),E.silent=!h,this.getContentGroup().add(b),xs(b),b.__legendDataIndex=i,b},t.prototype.layoutInner=function(e,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ta(e.get("orient"),l,e.get("itemGap"),i.width,i.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Ta("horizontal",u,e.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",m=p===0?"height":"width",y=p===0?"y":"x";s==="end"?v[p]+=f[g]+d:h[p]+=c[g]+d,v[1-p]+=f[m]/2-c[m]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+d+c[g],_[m]=Math.max(f[m],c[m]),_[y]=Math.min(0,c[y]+v[1-p]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t})(Oe);function gP(r,t,e,n,i,a,o){function s(g,m){g.lineWidth==="auto"&&(g.lineWidth=m.lineWidth>0?2:0),Th(g,function(y,_){g[_]==="inherit"&&(g[_]=m[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:uh(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:e).opacity),s(u,n);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),v.stroke==="auto"&&(v.stroke=n.fill),!a){var d=t.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?n.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),v.stroke=c.get("inactiveColor"),v.lineWidth=c.get("inactiveWidth")}return{itemStyle:u,lineStyle:v}}function mP(r){var t=r.icon||"roundRect",e=yr(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill="#fff",e.style.lineWidth=2),e}function Bg(r,t,e,n){Mh(r,t,e,n),e.dispatchAction({type:"legendToggleSelect",name:r??t}),Dh(r,t,e,n)}function d1(r){for(var t=r.getZr().storage.getDisplayList(),e,n=0,i=t.length;n<i&&!(e=t[n].states.emphasis);)n++;return e&&e.hoverLayer}function Dh(r,t,e,n){d1(e)||e.dispatchAction({type:"highlight",seriesName:r,name:t,excludeSeriesId:n})}function Mh(r,t,e,n){d1(e)||e.dispatchAction({type:"downplay",seriesName:r,name:t,excludeSeriesId:n})}function yP(r){var t=r.findComponents({mainType:"legend"});t&&t.length&&r.filterSeries(function(e){for(var n=0;n<t.length;n++)if(!t[n].isSelected(e.name))return!1;return!0})}function ra(r,t,e){var n=r==="allSelect"||r==="inverseSelect",i={},a=[];e.eachComponent({mainType:"legend",query:t},function(s){n?s[r]():s[r](t.name),Fg(s,i),a.push(s.componentIndex)});var o={};return e.eachComponent("legend",function(s){D(i,function(l,u){s[l?"select":"unSelect"](u)}),Fg(s,o)}),n?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function Fg(r,t){var e=t||{};return D(r.getData(),function(n){var i=n.get("name");if(!(i===`
|
|
45
|
+
`||i==="")){var a=r.isSelected(i);In(e,i)?e[i]=e[i]&&a:e[i]=a}}),e}function _P(r){r.registerAction("legendToggleSelect","legendselectchanged",Mt(ra,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",Mt(ra,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",Mt(ra,"inverseSelect")),r.registerAction("legendSelect","legendselected",Mt(ra,"select")),r.registerAction("legendUnSelect","legendunselected",Mt(ra,"unSelect"))}function p1(r){r.registerComponentModel(Ch),r.registerComponentView(v1),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,yP),r.registerSubTypeDefaulter("legend",function(){return"plain"}),_P(r)}var wP=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,n,i){var a=to(e);r.prototype.init.call(this,e,n,i),zg(this,e,a)},t.prototype.mergeOption=function(e,n){r.prototype.mergeOption.call(this,e,n),zg(this,this.option,e)},t.type="legend.scroll",t.defaultOption=dl(Ch.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}),t})(Ch);function zg(r,t,e){var n=r.getOrient(),i=[1,1];i[n.index]=0,Ci(t,e,{type:"box",ignoreSize:!!i})}var Vg=kt,df=["width","height"],pf=["x","y"],bP=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new Vg),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Vg)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,n,i,a,o,s,l){var u=this;r.prototype.renderInner.call(this,e,n,i,a,o,s,l);var f=this._controllerGroup,h=n.get("pageIconSize",!0),c=H(h)?h:[h,h];d("pagePrev",0);var v=n.getModel("pageTextStyle");f.add(new $t({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var m=p+"DataIndex",y=oc(n.get("pageIcons",!0)[n.getOrient().name][g],{onclick:tt(u._pageGo,u,m,n,a)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]});y.name=p,f.add(y)}},t.prototype.layoutInner=function(e,n,i,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=df[u],h=pf[u],c=df[1-u],v=pf[1-u];o&&Ta("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],m=lt(i);o&&(m[f]=i[f]-p[f]-d);var y=this._layoutContentAndController(e,a,m,u,f,c,v,h);if(o){if(s==="end")g[u]+=y[f]+d;else{var _=p[f]+d;g[u]-=_,y[h]-=_}y[f]+=p[f]+d,g[1-u]+=y[v]+y[c]/2-p[c]/2,y[c]=Math.max(y[c],p[c]),y[v]=Math.min(y[v],p[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return y},t.prototype._layoutContentAndController=function(e,n,i,a,o,s,l,u){var f=this.getContentGroup(),h=this._containerGroup,c=this._controllerGroup;Ta(e.get("orient"),f,e.get("itemGap"),a?i.width:null,a?null:i.height),Ta("horizontal",c,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=c.getBoundingRect(),p=this._showController=v[o]>i[o],g=[-v.x,-v.y];n||(g[a]=f[u]);var m=[0,0],y=[-d.x,-d.y],_=rt(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var w=e.get("pageButtonPosition",!0);w==="end"?y[a]+=i[o]-d[o]:m[a]+=d[o]+_}y[1-a]+=v[s]/2-d[s]/2,f.setPosition(g),h.setPosition(m),c.setPosition(y);var b={x:0,y:0};if(b[o]=p?i[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+y[1-a]),h.__rectSize=i[o],p){var S={x:0,y:0};S[o]=Math.max(i[o]-d[o]-_,0),S[s]=b[s],h.setClipPath(new Tt({shape:S})),h.__rectSize=S[o]}else c.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var x=this._getPageInfo(e);return x.pageIndex!=null&&ve(f,{x:x.contentPosition[0],y:x.contentPosition[1]},p?e:null),this._updatePageInfoView(e,x),b},t.prototype._pageGo=function(e,n,i){var a=this._getPageInfo(n)[e];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},t.prototype._updatePageInfoView=function(e,n){var i=this._controllerGroup;D(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",c=n[h]!=null,v=i.childOfName(f);v&&(v.setStyle("fill",c?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),v.cursor=c?"pointer":"default")});var a=i.childOfName("pageText"),o=e.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",G(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var n=e.get("scrollDataIndex",!0),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=e.getOrient().index,s=df[o],l=pf[o],u=this._findTargetItemIndex(n),f=i.children(),h=f[u],c=f.length,v=c?1:0,d={contentPosition:[i.x,i.y],pageCount:v,pageIndex:v-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return d;var p=w(h);d.contentPosition[o]=-p.s;for(var g=u+1,m=p,y=p,_=null;g<=c;++g)_=w(f[g]),(!_&&y.e>m.s+a||_&&!b(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=m.i),++d.pageCount)),y=_;for(var g=u-1,m=p,y=p,_=null;g>=-1;--g)_=w(f[g]),(!_||!b(y,_.s))&&m.i<y.i&&(y=m,d.pagePrevDataIndex==null&&(d.pagePrevDataIndex=m.i),++d.pageCount,++d.pageIndex),m=_;return d;function w(S){if(S){var x=S.getBoundingRect(),T=x[l]+S[l];return{s:T,e:T+x[s],i:S.__legendDataIndex}}}function b(S,x){return S.e>=x&&S.s<=x+a}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===e&&(n=s)}),n??a},t.type="legend.scroll",t})(v1);function SP(r){r.registerAction("legendScroll","legendscroll",function(t,e){var n=t.scrollDataIndex;n!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(i){i.setScrollDataIndex(n)})})}function xP(r){Ge(p1),r.registerComponentModel(wP),r.registerComponentView(bP),SP(r)}function CP(r){Ge(p1),Ge(xP)}var TP=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=dl(Vs.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t})(Vs),Vc=Ot();function DP(r,t,e){Vc(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(t.uid);i&&(i.getRange=e)})}function MP(r,t){for(var e=Vc(r).coordSysRecordMap,n=e.keys(),i=0;i<n.length;i++){var a=n[i],o=e.get(a),s=o.dataZoomInfoMap;if(s){var l=t.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||g1(e,o))}}}function g1(r,t){if(t){r.removeKey(t.model.uid);var e=t.controller;e&&e.dispose()}}function AP(r,t){var e={model:t,containsPoint:Mt(EP,t),dispatchAction:Mt(IP,r),dataZoomInfoMap:null,controller:null},n=e.controller=new qE(r.getZr());return D(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];e.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,e.model.mainType,e.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&e.dispatchAction(o)})}),e}function IP(r,t){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:t})}function EP(r,t,e,n){return r.coordinateSystem.containPoint([e,n])}function LP(r){var t,e="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return r.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[e+s]>n[e+t]&&(t=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:t,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function PP(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var n=Vc(e),i=n.coordSysRecordMap||(n.coordSysRecordMap=et());i.each(function(a){a.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=o1(a);D(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,AP(e,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=et());f.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){g1(i,a);return}var f=LP(l);o.enable(f.controlType,f.opt),o.setPointerChecker(a.containsPoint),xl(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var RP=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,n,i){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),DP(i,e,{pan:tt(gf.pan,this),zoom:tt(gf.zoom,this),scrollMove:tt(gf.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){MP(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t})(s1),gf={zoom:function(r,t,e,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(o){var s=mf[t](null,[n.originX,n.originY],o,e,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Il(0,a,[0,100],0,f.minSpan,f.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:Hg(function(r,t,e,n,i,a){var o=mf[n]([a.oldX,a.oldY],[a.newX,a.newY],t,i,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:Hg(function(r,t,e,n,i,a){var o=mf[n]([0,0],[a.scrollDelta,a.scrollDelta],t,i,e);return o.signal*(r[1]-r[0])*a.scrollDelta})};function Hg(r){return function(t,e,n,i){var a=this.range,o=a.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,n,i);if(Il(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var mf={grid:function(r,t,e,n,i){var a=e.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,t,e,n,i){var a=e.axis,o={},s=i.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=a.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,t,e,n,i){var a=e.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};function kP(r){l1(r),r.registerComponentModel(TP),r.registerComponentView(RP),PP(r)}var OP=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=dl(Vs.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"}}}),t})(Vs),na=Tt,Wg=7,NP=1,yf=30,BP=7,ia="horizontal",Gg="vertical",FP=5,zP=["line","bar","candlestick","scatter"],VP={easing:"cubicOut",duration:100,delay:0},HP=(function(r){O(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,n){this.api=n,this._onBrush=tt(this._onBrush,this),this._onBrushEnd=tt(this._onBrushEnd,this)},t.prototype.render=function(e,n,i,a){if(r.prototype.render.apply(this,arguments),xl(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Ps(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new kt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(n),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,n=this.api,i=e.get("brushSelect"),a=i?BP:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===ia?{right:s.width-o.x-o.width,top:s.height-yf-Wg-a,width:o.width,height:yf}:{right:Wg,top:o.y,width:yf,height:o.height},u=to(e.option);D(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=xi(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===Gg&&this._size.reverse()},t.prototype._positionGroup=function(){var e=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===ia&&!o?{scaleY:l?1:-1,scaleX:1}:i===ia&&o?{scaleY:l?1:-1,scaleX:-1}:i===Gg&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=n.x-u.x,e.y=n.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,n=this._size,i=this._displayables.sliderGroup,a=e.get("brushSelect");i.add(new na({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new na({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:tt(this._onClickPanel,this)}),s=this.api.getZr();a?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),i.add(o)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var n=this._size,i=this._shadowSize||[],a=e.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(l),c=(h[1]-h[0])*.3;h=[h[0]-c,h[1]+c];var v=[0,n[1]],d=[0,n[0]],p=[[n[0],0],[0,0]],g=[],m=d[1]/(o.count()-1),y=0,_=Math.round(o.count()/n[0]),w;o.each([l],function(M,A){if(_>0&&A%_){y+=m;return}var C=M==null||isNaN(M)||M==="",I=C?0:Xt(M,h,v,!0);C&&!w&&A?(p.push([p[p.length-1][0],0]),g.push([g[g.length-1][0],0])):!C&&w&&(p.push([y,0]),g.push([y,0])),p.push([y,I]),g.push([y,I]),y+=m,w=C}),u=this._shadowPolygonPts=p,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var b=this.dataZoomModel;function S(M){var A=b.getModel(M?"selectedDataBackground":"dataBackground"),C=new kt,I=new al({shape:{points:u},segmentIgnoreThreshold:1,style:A.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),E=new ol({shape:{points:f},segmentIgnoreThreshold:1,style:A.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return C.add(I),C.add(E),C}for(var x=0;x<3;x++){var T=S(x===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,n=e.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();D(l,function(u){if(!i&&!(n!==!0&&yt(zP,u.get("type"))<0)){var f=a.getComponent(Br(o),s).axis,h=WP(o),c,v=u.coordinateSystem;h!=null&&v.getOtherAxis&&(c=v.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),i={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:c}}},this)},this),i}},t.prototype._renderHandle=function(){var e=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),c=n.filler=new na({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(c),o.add(new na({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:NP,fill:"rgba(0,0,0,0)"}})),D([0,1],function(_){var w=l.get("handleIcon");!ks[w]&&w.indexOf("path://")<0&&w.indexOf("image://")<0&&(w="path://"+w,process.env.NODE_ENV!=="production"&&We("handleIcon now needs 'path://' prefix when using a path string"));var b=yr(w,-1,0,2,2,null,!0);b.attr({cursor:$g(this._orient),draggable:!0,drift:tt(this._onDragMove,this,_),ondragend:tt(this._onDragEnd,this),onmouseover:tt(this._showDataInfo,this,!0),onmouseout:tt(this._showDataInfo,this,!1),z2:5});var S=b.getBoundingRect(),x=l.get("handleSize");this._handleHeight=Pt(x,this._size[1]),this._handleWidth=S.width/S.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),xs(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(i[_]=b);var M=l.getModel("textStyle"),A=l.get("handleLabel")||{},C=A.show||!1;e.add(a[_]=new $t({silent:!0,invisible:!C,style:mr(M,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:M.getTextColor(),font:M.getFont()}),z2:10}))},this);var v=c;if(h){var d=Pt(l.get("moveHandleSize"),s[1]),p=n.moveHandle=new Tt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,m=n.moveHandleIcon=yr(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);m.silent=!0,m.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(d,10));v=n.moveZone=new Tt({invisible:!0,shape:{y:s[1]-y,height:d+y}}),v.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(m),o.add(v)}v.attr({draggable:!0,cursor:$g(this._orient),drift:tt(this._onDragMove,this,"all"),ondragstart:tt(this._showDataInfo,this,!0),ondragend:tt(this._onDragEnd,this),onmouseover:tt(this._showDataInfo,this,!0),onmouseout:tt(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Xt(e[0],[0,100],n,!0),Xt(e[1],[0,100],n,!0)]},t.prototype._updateInterval=function(e,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Il(n,a,o,i.get("zoomLock")?"all":e,s.minSpan!=null?Xt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Xt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=fa([Xt(a[0],o,l,!0),Xt(a[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},t.prototype._updateView=function(e){var n=this._displayables,i=this._handleEnds,a=fa(i.slice()),o=this._size;D([0,1],function(v){var d=n.handles[v],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:i[v]+(v?-1:1),y:o[1]/2-p/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[0]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,a[0],a[1],o[0]],f=0;f<l.length;f++){var h=l[f],c=h.getClipPath();c||(c=new Tt,h.setClipPath(c)),c.setShape({x:u[f],y:0,width:u[f+1]-u[f],height:o[1]})}this._updateDataInfo(e)},t.prototype._updateDataInfo=function(e){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,f=this._range,h=e?l.calculateDataWindow({start:f[0],end:f[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var c=fa(this._handleEnds.slice());v.call(this,0),v.call(this,1);function v(d){var p=Vy(i.handles[d].parent,this.group),g=Hy(d===0?"right":"left",p),m=this._handleWidth/2+FP,y=Na([c[d]+(d===0?-m:m),this._size[1]/2],p);a[d].setStyle({x:y[0],y:y[1],verticalAlign:o===ia?"middle":g,align:o===ia?g:"center",text:s[d]})}},t.prototype._formatLabel=function(e,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=e==null||isNaN(e)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(e)}):e.toFixed(Math.min(o,20));return Q(a)?a(e,s):G(a)?a.replace("{value}",s):s},t.prototype._showDataInfo=function(e){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=e||this._dragging?o:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},t.prototype._onDragMove=function(e,n,i,a){this._dragging=!0,wi(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=Na([n,i],o,!0),l=this._updateInterval(e,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},t.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var e=this.dataZoomModel.get("realtime");!e&&this._dispatchZoomAction(!1)},t.prototype._onClickPanel=function(e){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(e.offsetX,e.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},t.prototype._onBrushStart=function(e){var n=e.offsetX,i=e.offsetY;this._brushStart=new wt(n,i),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=fa([Xt(i.x,o,s,!0),Xt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(wi(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new na({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(e,n),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},t.prototype._dispatchZoomAction=function(e){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?VP:null,start:n[0],end:n[1]})},t.prototype._findCoordRect=function(){var e,n=o1(this.dataZoomModel).infoList;if(!e&&n.length){var i=n[0].model.coordinateSystem;e=i.getRect&&i.getRect()}if(!e){var a=this.api.getWidth(),o=this.api.getHeight();e={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return e},t.type="dataZoom.slider",t})(s1);function WP(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function $g(r){return r==="vertical"?"ns-resize":"ew-resize"}function GP(r){r.registerComponentModel(OP),r.registerComponentView(HP),l1(r)}function $P(r){Ge(kP),Ge(GP)}function Ug(r,t,e){var n=Ai.createCanvas(),i=t.getWidth(),a=t.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",r)),n.width=i*e,n.height=a*e,n}var _f=(function(r){O(t,r);function t(e,n,i){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||ps,typeof e=="string"?o=Ug(e,n,i):Z(e)&&(o=e,e=o.id),a.id=e,a.dom=o;var s=o.style;return s&&(Nm(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return t.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},t.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},t.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},t.prototype.setUnpainted=function(){this.__firstTimePaint=!0},t.prototype.createBackBuffer=function(){var e=this.dpr;this.domBack=Ug("back-"+this.id,this.painter,e),this.ctxBack=this.domBack.getContext("2d"),e!==1&&this.ctxBack.scale(e,e)},t.prototype.createRepaintRects=function(e,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new dt(0,0,0,0);function f(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var _=new dt(0,0,0,0);_.copy(y),o.push(_)}else{for(var w=!1,b=1/0,S=0,x=0;x<o.length;++x){var T=o[x];if(T.intersect(y)){var M=new dt(0,0,0,0);M.copy(T),M.union(y),o[x]=M,w=!0;break}else if(l){u.copy(y),u.union(T);var A=y.width*y.height,C=T.width*T.height,I=u.width*u.height,E=I-A-C;E<b&&(b=E,S=x)}}if(l&&(o[S].union(y),w=!0),!w){var _=new dt(0,0,0,0);_.copy(y),o.push(_)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var c=e[h];if(c){var v=c.shouldBePainted(i,a,!0,!0),d=c.__isRendered&&(c.__dirty&ye||!v)?c.getPrevPaintRect():null;d&&f(d);var p=v&&(c.__dirty&ye||!c.__isRendered)?c.getPaintRect():null;p&&f(p)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var c=n[h],v=c&&c.shouldBePainted(i,a,!0,!0);if(c&&(!v||!c.__zr)&&c.__isRendered){var d=c.getPrevPaintRect();d&&f(d)}}var g;do{g=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var m=h+1;m<o.length;)o[h].intersect(o[m])?(g=!0,o[h].union(o[m]),o.splice(m,1)):m++;h++}}while(g);return this._paintRects=o,o},t.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},t.prototype.resize=function(e,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=e+"px",o.height=n+"px"),a.width=e*i,a.height=n*i,s&&(s.width=e*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},t.prototype.clear=function(e,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!e,f=this.lastFrameAlpha,h=this.dpr,c=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var v=this.domBack;function d(p,g,m,y){if(o.clearRect(p,g,m,y),n&&n!=="transparent"){var _=void 0;if(Ys(n)){var w=n.global||n.__width===m&&n.__height===y;_=w&&n.__canvasGradient||sh(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=_,n.__width=m,n.__height=y}else Qb(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,_=lh(o,n,{dirty:function(){c.setUnpainted(),c.painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(p,g,m,y),o.restore()}u&&(o.save(),o.globalAlpha=f,o.drawImage(v,p,g,m,y),o.restore())}!i||u?d(0,0,s,l):i.length&&D(i,function(p){d(p.x*h,p.y*h,p.width*h,p.height*h)})},t})(Ue),Yg=1e5,pn=314159,Uo=.01,UP=.001;function YP(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function jP(r,t){var e=document.createElement("div");return e.style.cssText=["position:relative","width:"+r+"px","height:"+t+"px","padding:0","margin:0","border-width:0"].join(";")+";",e}var ZP=(function(){function r(t,e,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!t.nodeName||t.nodeName.toUpperCase()==="CANVAS";this._opts=n=B({},n||{}),this.dpr=n.devicePixelRatio||ps,this._singleCanvas=a,this.root=t;var o=t.style;o&&(Nm(t),t.innerHTML=""),this.storage=e;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var f=t,h=f.width,c=f.height;n.width!=null&&(h=n.width),n.height!=null&&(c=n.height),this.dpr=n.devicePixelRatio||1,f.width=h*this.dpr,f.height=c*this.dpr,this._width=h,this._height=c;var v=new _f(f,this,this.dpr);v.__builtin__=!0,v.initContext(),l[pn]=v,v.zlevel=pn,s.push(pn),this._domRoot=t}else{this._width=Ro(t,0,n),this._height=Ro(t,1,n);var u=this._domRoot=jP(this._width,this._height);t.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.refresh=function(t){var e=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(e,n,t,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=e.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(t){var e=t.length,n=this._hoverlayer;if(n&&n.clear(),!!e){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<e;o++){var s=t[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(Yg)),a||(a=n.ctx,a.save()),_n(a,s,i,o===e-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(Yg)},r.prototype.paintOne=function(t,e){W0(t,e)},r.prototype._paintList=function(t,e,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(t);var a=this._doPaintList(t,e,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(t),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;us(function(){l._paintList(t,e,n,i)})}}},r.prototype._compositeManually=function(){var t=this.getLayer(pn).ctx,e=this._domRoot.width,n=this._domRoot.height;t.clearRect(0,0,e,n),this.eachBuiltinLayer(function(i){i.virtual&&t.drawImage(i.dom,0,0,e,n)})},r.prototype._doPaintList=function(t,e,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var f=!0,h=!1,c=function(p){var g=a[p],m=g.ctx,y=o&&g.createRepaintRects(t,e,v._width,v._height),_=n?g.__startIndex:g.__drawIndex,w=!n&&g.incremental&&Date.now,b=w&&Date.now(),S=g.zlevel===v._zlevelList[0]?v._backgroundColor:null;if(g.__startIndex===g.__endIndex)g.clear(!1,S,y);else if(_===g.__startIndex){var x=t[_];(!x.incremental||!x.notClear||n)&&g.clear(!1,S,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=g.__startIndex);var T,M=function(E){var L={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(T=_;T<g.__endIndex;T++){var P=t[T];if(P.__inHover&&(h=!0),i._doPaintEl(P,g,o,E,L,T===g.__endIndex-1),w){var R=Date.now()-b;if(R>15)break}}L.prevElClipPaths&&m.restore()};if(y)if(y.length===0)T=g.__endIndex;else for(var A=v.dpr,C=0;C<y.length;++C){var I=y[C];m.save(),m.beginPath(),m.rect(I.x*A,I.y*A,I.width*A,I.height*A),m.clip(),M(I),m.restore()}else m.save(),M(),m.restore();g.__drawIndex=T,g.__drawIndex<g.__endIndex&&(f=!1)},v=this,d=0;d<a.length;d++)c(d);return K.wxa&&D(this._layers,function(p){p&&p.ctx&&p.ctx.draw&&p.ctx.draw()}),{finished:f,needsRefreshHover:h}},r.prototype._doPaintEl=function(t,e,n,i,a,o){var s=e.ctx;if(n){var l=t.getPaintRect();(!i||l&&l.intersect(i))&&(_n(s,t,a,o),t.setPrevPaintRect(l))}else _n(s,t,a,o)},r.prototype.getLayer=function(t,e){this._singleCanvas&&!this._needsManuallyCompositing&&(t=pn);var n=this._layers[t];return n||(n=new _f("zr_"+t,this,this.dpr),n.zlevel=t,n.__builtin__=!0,this._layerConfig[t]?ct(n,this._layerConfig[t],!0):this._layerConfig[t-Uo]&&ct(n,this._layerConfig[t-Uo],!0),e&&(n.virtual=e),this.insertLayer(t,n),n.initContext()),n},r.prototype.insertLayer=function(t,e){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(n[t]){process.env.NODE_ENV!=="production"&&bn("ZLevel "+t+" has been used already");return}if(!YP(e)){process.env.NODE_ENV!=="production"&&bn("Layer of zlevel "+t+" is not valid");return}if(a>0&&t>i[0]){for(l=0;l<a-1&&!(i[l]<t&&i[l+1]>t);l++);s=n[i[l]]}if(i.splice(l+1,0,t),n[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)},r.prototype.eachLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i];t.call(e,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&t.call(e,o,a)}},r.prototype.eachOtherLayer=function(t,e){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||t.call(e,o,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(t){this.eachBuiltinLayer(function(h,c){h.__dirty=h.__used=!1});function e(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var n=1;n<t.length;n++){var i=t[n];if(i.zlevel!==t[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<t.length;l++){var i=t[l],u=i.zlevel,f=void 0;s!==u&&(s=u,o=0),i.incremental?(f=this.getLayer(u+UP,this._needsManuallyCompositing),f.incremental=!0,o=1):f=this.getLayer(u+(o>0?Uo:0),this._needsManuallyCompositing),f.__builtin__||bn("ZLevel "+u+" has been used by unkown layer "+f.id),f!==a&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,e(l),a=f),i.__dirty&ye&&!i.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(h,c){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,D(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var n=this._layerConfig;n[t]?ct(n[t],e,!0):n[t]=e;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===t||a===t+Uo){var o=this._layers[a];ct(o,n[t],!0)}}}},r.prototype.delLayer=function(t){var e=this._layers,n=this._zlevelList,i=e[t];i&&(i.dom.parentNode.removeChild(i.dom),delete e[t],n.splice(yt(n,t),1))},r.prototype.resize=function(t,e){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(t!=null&&(i.width=t),e!=null&&(i.height=e),t=Ro(a,0,i),e=Ro(a,1,i),n.style.display="",this._width!==t||e!==this._height){n.style.width=t+"px",n.style.height=e+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(t,e);this.refresh(!0)}this._width=t,this._height=e}else{if(t==null||e==null)return;this._width=t,this._height=e,this.getLayer(pn).resize(t,e)}return this},r.prototype.clearLayer=function(t){var e=this._layers[t];e&&e.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(t){if(t=t||{},this._singleCanvas&&!this._compositeManually)return this._layers[pn].dom;var e=new _f("image",this,t.pixelRatio||this.dpr);e.initContext(),e.clear(!1,t.backgroundColor||this._backgroundColor);var n=e.ctx;if(t.pixelRatio<=this.dpr){this.refresh();var i=e.dom.width,a=e.dom.height;this.eachLayer(function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var f=s[l];_n(n,f,o,l===u-1)}return e.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r})();function XP(r){r.registerPainter("canvas",ZP)}Ge([vL,ZI,fE,ZE,dP,hP,FL,$P,CP,Fc,XP]);function m1(){const r=W.useRef(null),t=W.useRef(null);W.useEffect(()=>{if(!r.current)return;t.current=i2(r.current);const s=new ResizeObserver(()=>{var l;(l=t.current)==null||l.resize()});return s.observe(r.current),()=>{var l;s.disconnect(),(l=t.current)==null||l.dispose(),t.current=null}},[]);const e=W.useCallback((s,l,u=!1)=>{var h;let f;typeof l=="boolean"?f={notMerge:l,lazyUpdate:u}:f=l??{},(h=t.current)==null||h.setOption(s,f)},[]),n=W.useCallback(()=>{var s;(s=t.current)==null||s.resize()},[]),i=W.useCallback(()=>{var s;(s=t.current)==null||s.dispose(),t.current=null},[]),a=W.useCallback(s=>t.current?t.current.getDataURL({type:(s==null?void 0:s.type)??"png",pixelRatio:(s==null?void 0:s.pixelRatio)??2,backgroundColor:(s==null?void 0:s.backgroundColor)??"#fff"}):"",[]),o=W.useCallback((s,l)=>{const u=t.current;return u?(u.on(s,l),()=>{u.off(s,l)}):()=>{}},[]);return{chartRef:r,chartInstance:t.current,setOption:e,resize:n,dispose:i,getDataURL:a,bindEvent:o}}const qP={start:70,end:100},KP=50;function y1(r=qP){const t=W.useRef([r]),e=W.useRef(0),[,n]=W.useState({}),i=t.current[e.current]??r,a=W.useCallback(u=>{e.current<t.current.length-1&&(t.current=t.current.slice(0,e.current+1)),t.current.length>=KP&&(t.current=t.current.slice(1)),t.current.push(u),e.current=t.current.length-1,n({})},[]),o=W.useCallback(()=>e.current>0?(e.current--,n({}),t.current[e.current]??null):null,[]),s=W.useCallback(()=>e.current<t.current.length-1?(e.current++,n({}),t.current[e.current]??null):null,[]),l=W.useCallback((u=r)=>{t.current=[u],e.current=0,n({})},[r]);return{canUndo:e.current>0,canRedo:e.current<t.current.length-1,currentState:i,pushState:a,undo:o,redo:s,reset:l}}function _1(r,t=2){return r==null||isNaN(r)?"--":r.toLocaleString("zh-CN",{minimumFractionDigits:t,maximumFractionDigits:t})}function F(r){return _1(r,2)}function w1(r){return r==null||isNaN(r)?"--":`${r>0?"+":""}${r.toFixed(2)}%`}function b1(r){return r==null||isNaN(r)?"--":`${r>0?"+":""}${r.toFixed(2)}`}function Ea(r,t){return Number.isInteger(r)?r.toString():r.toFixed(t).replace(/\.?0+$/,"")}function rr(r){return r==null||isNaN(r)?"--":r>=1e8?`${Ea(r/1e8,2)}亿`:r>=1e4?`${Ea(r/1e4,2)}万`:r.toFixed(0)}function S1(r){return r==null||isNaN(r)?"--":r>=1e8?`${Ea(r/1e8,2)}亿`:r>=1e4?`${Ea(r/1e4,2)}万`:Ea(r,2)}function QP(r,t="YYYY-MM-DD"){const e=typeof r=="string"?new Date(r):r;if(isNaN(e.getTime()))return r;const n=e.getFullYear(),i=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),o=String(e.getHours()).padStart(2,"0"),s=String(e.getMinutes()).padStart(2,"0");return t.replace("YYYY",String(n)).replace("MM",i).replace("DD",a).replace("HH",o).replace("mm",s)}function x1(r){const t=[`<div style="font-weight:bold;margin-bottom:4px">${r.date}</div>`,`<div>开盘: <span style="font-weight:500">${F(r.open)}</span></div>`,`<div>最高: <span style="font-weight:500">${F(r.high)}</span></div>`,`<div>最低: <span style="font-weight:500">${F(r.low)}</span></div>`,`<div>收盘: <span style="font-weight:500">${F(r.close)}</span></div>`];if(r.change!==void 0&&r.changePercent!==void 0){const i=r.change!==null&&r.change>0?"#f5222d":r.change!==null&&r.change<0?"#52c41a":"inherit";t.push(`<div>涨跌: <span style="color:${i};font-weight:500">${b1(r.change)} (${w1(r.changePercent)})</span></div>`)}r.volume!==void 0&&t.push(`<div>成交量: ${rr(r.volume)}</div>`),r.amount!==void 0&&t.push(`<div>成交额: ${S1(r.amount)}</div>`),r.turnoverRate!==void 0&&r.turnoverRate!==null&&t.push(`<div>换手率: ${r.turnoverRate.toFixed(2)}%</div>`),r.amplitude!==void 0&&r.amplitude!==null&&t.push(`<div>振幅: ${r.amplitude.toFixed(2)}%</div>`);const e=r.indicators??[];let n=!1;if(e.includes("ma")&&r.ma&&(n?t.push(`<div>MA: ${F(r.ma.ma5)} / ${F(r.ma.ma10)} / ${F(r.ma.ma20)}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">MA: ${F(r.ma.ma5)} / ${F(r.ma.ma10)} / ${F(r.ma.ma20)}</div>`),n=!0)),e.includes("boll")&&r.boll&&(n?t.push(`<div>BOLL: 上 ${F(r.boll.upper)} 中 ${F(r.boll.mid)} 下 ${F(r.boll.lower)}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">BOLL: 上 ${F(r.boll.upper)} 中 ${F(r.boll.mid)} 下 ${F(r.boll.lower)}</div>`),n=!0)),e.includes("sar")&&r.sar){const i=r.sar.trend===1?"↑":"↓";n?t.push(`<div>SAR: ${F(r.sar.sar)} ${i}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">SAR: ${F(r.sar.sar)} ${i}</div>`),n=!0)}return e.includes("kc")&&r.kc&&(n?t.push(`<div>KC: 上 ${F(r.kc.upper)} 中 ${F(r.kc.mid)} 下 ${F(r.kc.lower)}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">KC: 上 ${F(r.kc.upper)} 中 ${F(r.kc.mid)} 下 ${F(r.kc.lower)}</div>`),n=!0)),e.includes("macd")&&r.macd&&(n?t.push(`<div>MACD: DIF ${F(r.macd.dif)} DEA ${F(r.macd.dea)} MACD ${F(r.macd.macd)}</div>`):(t.push(`<div style="margin-top:4px;border-top:1px solid #eee;padding-top:4px">MACD: DIF ${F(r.macd.dif)} DEA ${F(r.macd.dea)} MACD ${F(r.macd.macd)}</div>`),n=!0)),e.includes("kdj")&&r.kdj&&t.push(`<div>KDJ: K ${F(r.kdj.k)} D ${F(r.kdj.d)} J ${F(r.kdj.j)}</div>`),e.includes("rsi")&&r.rsi&&t.push(`<div>RSI: ${F(r.rsi.rsi6)} / ${F(r.rsi.rsi12)} / ${F(r.rsi.rsi24)}</div>`),e.includes("wr")&&r.wr&&t.push(`<div>WR: ${F(r.wr.wr6)} / ${F(r.wr.wr10)}</div>`),e.includes("bias")&&r.bias&&t.push(`<div>BIAS: ${F(r.bias.bias6)} / ${F(r.bias.bias12)} / ${F(r.bias.bias24)}</div>`),e.includes("cci")&&r.cci&&t.push(`<div>CCI: ${F(r.cci.cci)}</div>`),e.includes("atr")&&r.atr&&t.push(`<div>ATR: ${F(r.atr.atr)}</div>`),e.includes("obv")&&r.obv&&t.push(`<div>OBV: ${rr(r.obv.obv)} MA ${rr(r.obv.obvMa)}</div>`),e.includes("roc")&&r.roc&&t.push(`<div>ROC: ${F(r.roc.roc)} SIGNAL ${F(r.roc.signal)}</div>`),e.includes("dmi")&&r.dmi&&t.push(`<div>DMI: +DI ${F(r.dmi.pdi)} -DI ${F(r.dmi.mdi)} ADX ${F(r.dmi.adx)}</div>`),t.join("")}const wf=["ma","boll","sar","kc"],C1="kline-zoom-inside",T1="kline-zoom-slider";function aa(r,t){return Number.isInteger(r)?r.toString():r.toFixed(t).replace(/\.?0+$/,"")}function JP(r,t){return t.includes("volume")?rr(r):Math.abs(r)>=100||Math.abs(r)>=10||Math.abs(r)>=1||Math.abs(r)>=.01?aa(r,2):aa(r,4)}function D1(r,t={}){const e=Math.min(Math.max(t.maxSubPanes??3,0),3),n=r.filter(u=>!wf.includes(u));if(e===0)return[{id:"main",height:"95%",indicators:wf.filter(u=>r.includes(u))}];const i=n.length,a=Math.min(i,e),s=a===0?{main:"95%",sub:"0%"}:a===1?{main:"78%",sub:"18%"}:a===2?{main:"65%",sub:"15%"}:{main:"55%",sub:"13%"},l=[{id:"main",height:s.main,indicators:wf.filter(u=>r.includes(u))}];return n.slice(0,e).forEach((u,f)=>{l.push({id:`sub_${u}_${f}`,height:s.sub,indicators:[u]})}),l}function tR(r,t){const e=[],o=t-50-55-(r.length-1)*25;let s=0;const l=[];for(const c of r)if(typeof c.height=="string"&&c.height.endsWith("%")){const v=parseFloat(c.height)/100;l.push(v),s+=v}else typeof c.height=="number"?(l.push(c.height/o),s+=c.height/o):l.push(0);const u=l.filter(c=>c===0).length;if(u>0&&s<1){const c=(1-s)/u;for(let v=0;v<l.length;v++)l[v]===0&&(l[v]=c)}const f=l.reduce((c,v)=>c+v,0);for(let c=0;c<l.length;c++)l[c]=l[c]/f*o;let h=50;for(let c=0;c<r.length;c++)e.push({id:r[c].id,left:60,right:60,top:h,height:l[c]}),h+=l[c]+25;return e}function eR(r){const{data:t,theme:e,indicators:n,panes:i=D1(n),containerHeight:a=500}=r;if(t.length===0)return{title:{text:"暂无数据",left:"center",top:"center",textStyle:{color:e.textColorSecondary}}};const o=tR(i,a),s=t.map(h=>h.date),l=t.map(h=>h.close),u={animation:!1,backgroundColor:e.backgroundColor,title:{text:"",show:!1},tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:e.crosshairColor},lineStyle:{color:e.crosshairColor,type:"dashed"}},backgroundColor:e.tooltipBgColor,borderColor:e.tooltipBorderColor,textStyle:{color:e.textColor,fontSize:12},formatter:h=>{if(!Array.isArray(h)||h.length===0)return"";const c=h[0].dataIndex,v=t[c];return v?x1({date:v.date,open:v.open,high:v.high,low:v.low,close:v.close,volume:v.volume,amount:v.amount,change:v.change,changePercent:v.changePercent,turnoverRate:v.turnoverRate,amplitude:v.amplitude,indicators:n,ma:v.ma,boll:v.boll,sar:v.sar,kc:v.kc,macd:v.macd,kdj:v.kdj,rsi:v.rsi,wr:v.wr,bias:v.bias,cci:v.cci,atr:v.atr,obv:v.obv,roc:v.roc,dmi:v.dmi}):""}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:o.map(h=>({left:h.left,right:h.right,top:h.top,height:h.height})),xAxis:o.map((h,c)=>({type:"category",data:s,gridIndex:c,axisLine:{lineStyle:{color:e.gridLineColor}},axisTick:{show:!1},axisLabel:{show:c===o.length-1,color:e.textColorSecondary,fontSize:11},splitLine:{show:!1},boundaryGap:!0,min:"dataMin",max:"dataMax"})),yAxis:o.map((h,c)=>({type:"value",gridIndex:c,position:"right",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:e.textColorSecondary,fontSize:11,formatter:v=>JP(v,h.id)},splitLine:{lineStyle:{color:e.splitLineColor,type:"dashed"}},splitNumber:h.id==="main"?3:2,scale:h.id!=="volume"&&!h.id.includes("volume")})),dataZoom:[{id:C1,type:"inside",xAxisIndex:o.map((h,c)=>c),minValueSpan:10},{id:T1,type:"slider",xAxisIndex:o.map((h,c)=>c),bottom:8,height:20,borderColor:e.gridLineColor,fillerColor:"rgba(24,144,255,0.1)",handleStyle:{color:e.activeColor},textStyle:{color:e.textColorSecondary}}],series:[]},f=[];for(let h=0;h<i.length;h++){const c=i[h];o[h].id==="main"&&f.push({type:"candlestick",name:"K线",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>[d.open,d.close,d.low,d.high]),itemStyle:{color:e.upColor,color0:e.downColor,borderColor:e.upColor,borderColor0:e.downColor}}),c.indicators.includes("ma")&&[5,10,20,30,60].forEach((p,g)=>{const m=`ma${p}`,y=t.map(_=>{var w;return((w=_.ma)==null?void 0:w[m])??null});f.push({type:"line",name:`MA${p}`,xAxisIndex:h,yAxisIndex:h,data:y,smooth:!0,symbol:"none",lineStyle:{width:1,color:e.maColors[g]??e.maColors[0]}})}),c.indicators.includes("boll")&&f.push({type:"line",name:"BOLL上轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.boll)==null?void 0:p.upper)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#faad14"}},{type:"line",name:"BOLL中轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.boll)==null?void 0:p.mid)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"BOLL下轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.boll)==null?void 0:p.lower)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#722ed1"}}),c.indicators.includes("volume")&&f.push({type:"bar",name:"成交量",xAxisIndex:h,yAxisIndex:h,data:t.map((d,p)=>{const g=p>0?l[p-1]:d.open,m=(d.close??0)>=(g??0);return{value:d.volume,itemStyle:{color:m?e.volumeUpColor:e.volumeDownColor}}})}),c.indicators.includes("macd")&&f.push({type:"bar",name:"MACD",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p,g;return{value:((p=d.macd)==null?void 0:p.macd)??null,itemStyle:{color:(((g=d.macd)==null?void 0:g.macd)??0)>=0?e.upColor:e.downColor}}})},{type:"line",name:"DIF",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.macd)==null?void 0:p.dif)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"DEA",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.macd)==null?void 0:p.dea)??null}),symbol:"none",lineStyle:{width:1,color:"#faad14"}}),c.indicators.includes("kdj")&&f.push({type:"line",name:"K",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kdj)==null?void 0:p.k)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"D",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kdj)==null?void 0:p.d)??null}),symbol:"none",lineStyle:{width:1,color:"#faad14"}},{type:"line",name:"J",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kdj)==null?void 0:p.j)??null}),symbol:"none",lineStyle:{width:1,color:"#722ed1"}}),c.indicators.includes("rsi")&&[6,12,24].forEach((p,g)=>{f.push({type:"line",name:`RSI${p}`,xAxisIndex:h,yAxisIndex:h,data:t.map(m=>{var y;return((y=m.rsi)==null?void 0:y[`rsi${p}`])??null}),symbol:"none",lineStyle:{width:1,color:e.maColors[g]??"#1890ff"}})}),c.indicators.includes("wr")&&[6,10].forEach((p,g)=>{f.push({type:"line",name:`WR${p}`,xAxisIndex:h,yAxisIndex:h,data:t.map(m=>{var y;return((y=m.wr)==null?void 0:y[`wr${p}`])??null}),symbol:"none",lineStyle:{width:1,color:e.maColors[g]??"#1890ff"}})}),c.indicators.includes("bias")&&[6,12,24].forEach((p,g)=>{f.push({type:"line",name:`BIAS${p}`,xAxisIndex:h,yAxisIndex:h,data:t.map(m=>{var y;return((y=m.bias)==null?void 0:y[`bias${p}`])??null}),symbol:"none",lineStyle:{width:1,color:e.maColors[g]??"#1890ff"}})}),c.indicators.includes("cci")&&f.push({type:"line",name:"CCI",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.cci)==null?void 0:p.cci)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}}),c.indicators.includes("atr")&&f.push({type:"line",name:"ATR",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.atr)==null?void 0:p.atr)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}}),c.indicators.includes("obv")&&f.push({type:"line",name:"OBV",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.obv)==null?void 0:p.obv)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"OBV_MA",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.obv)==null?void 0:p.obvMa)??null}),symbol:"none",lineStyle:{width:1,color:"#faad14"}}),c.indicators.includes("roc")&&f.push({type:"line",name:"ROC",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.roc)==null?void 0:p.roc)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"ROC_MA",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.roc)==null?void 0:p.signal)??null}),symbol:"none",lineStyle:{width:1,color:"#faad14"}}),c.indicators.includes("dmi")&&f.push({type:"line",name:"+DI",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.dmi)==null?void 0:p.pdi)??null}),symbol:"none",lineStyle:{width:1,color:e.upColor}},{type:"line",name:"-DI",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.dmi)==null?void 0:p.mdi)??null}),symbol:"none",lineStyle:{width:1,color:e.downColor}},{type:"line",name:"ADX",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.dmi)==null?void 0:p.adx)??null}),symbol:"none",lineStyle:{width:1,color:"#1890ff"}},{type:"line",name:"ADXR",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.dmi)==null?void 0:p.adxr)??null}),symbol:"none",lineStyle:{width:1,color:"#722ed1",type:"dashed"}}),c.indicators.includes("sar")&&f.push({type:"scatter",name:"SAR",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p,g;return{value:((p=d.sar)==null?void 0:p.sar)??null,itemStyle:{color:((g=d.sar)==null?void 0:g.trend)===1?e.upColor:e.downColor}}}),symbol:"circle",symbolSize:4}),c.indicators.includes("kc")&&f.push({type:"line",name:"KC上轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kc)==null?void 0:p.upper)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#52c41a"}},{type:"line",name:"KC中轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kc)==null?void 0:p.mid)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#13c2c2"}},{type:"line",name:"KC下轨",xAxisIndex:h,yAxisIndex:h,data:t.map(d=>{var p;return((p=d.kc)==null?void 0:p.lower)??null}),smooth:!0,symbol:"none",lineStyle:{width:1,color:"#eb2f96"}})}return u.series=f,u}function rR(r,t,e="safeMerge"){if(!t)return r;if(e==="replace")return t;const n={...r};for(const i of Object.keys(t)){const a=t[i];a!==void 0&&(Array.isArray(a)?n[i]=a:typeof a=="object"&&a!==null?n[i]={...n[i],...a}:n[i]=a)}return n}function nR(r){const{data:t,theme:e,prevClose:n,containerHeight:i=500}=r;if(t.length===0)return{title:{text:"暂无分时数据",left:"center",top:"center",textStyle:{color:e.textColorSecondary}}};const a=t.map(y=>y.time),o=t.map(y=>y.price),s=t.map(y=>y.avgPrice),l=t.map((y,_)=>{var b;const w=_>0?((b=t[_-1])==null?void 0:b.volume)??0:0;return y.volume-w}),u=Math.min(...o.filter(y=>y>0)),f=Math.max(...o),c=(f-u)*.1||1,v=o[o.length-1]??0,d=n?v>=n?e.upColor:e.downColor:e.activeColor,p=Math.max(60,i*.15),g=i-p-100;return{animation:!1,backgroundColor:e.backgroundColor,tooltip:{trigger:"axis",axisPointer:{type:"cross",crossStyle:{color:e.crosshairColor},lineStyle:{color:e.crosshairColor,type:"dashed"}},backgroundColor:e.tooltipBgColor,borderColor:e.tooltipBorderColor,textStyle:{color:e.textColor,fontSize:12},formatter:y=>{if(!Array.isArray(y)||y.length===0)return"";const _=y[0].dataIndex,w=t[_];if(!w)return"";const b=n?((w.price-n)/n*100).toFixed(2):"--",S=n&&w.price>=n?e.upColor:e.downColor;return`
|
|
46
|
+
<div style="font-weight:bold;margin-bottom:4px">${w.time}</div>
|
|
47
|
+
<div>价格: <span style="color:${S};font-weight:500">${F(w.price)}</span></div>
|
|
48
|
+
<div>均价: ${F(w.avgPrice)}</div>
|
|
49
|
+
<div>涨跌: <span style="color:${S}">${b}%</span></div>
|
|
50
|
+
<div>成交量: ${rr(w.volume)}</div>
|
|
51
|
+
`}},axisPointer:{link:[{xAxisIndex:"all"}]},grid:[{left:60,right:60,top:40,height:g},{left:60,right:60,top:g+70,height:p}],xAxis:[{type:"category",data:a,gridIndex:0,axisLine:{lineStyle:{color:e.gridLineColor}},axisTick:{show:!1},axisLabel:{show:!1},splitLine:{show:!1},boundaryGap:!1},{type:"category",data:a,gridIndex:1,axisLine:{lineStyle:{color:e.gridLineColor}},axisTick:{show:!1},axisLabel:{color:e.textColorSecondary,fontSize:11,formatter:y=>y},splitLine:{show:!1},boundaryGap:!1}],yAxis:[{type:"value",gridIndex:0,position:"right",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:e.textColorSecondary,fontSize:11,formatter:y=>F(y)},splitLine:{lineStyle:{color:e.splitLineColor,type:"dashed"}},min:u-c,max:f+c},{type:"value",gridIndex:1,position:"right",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:e.textColorSecondary,fontSize:11,formatter:y=>rr(y)},splitLine:{lineStyle:{color:e.splitLineColor,type:"dashed"}}}],series:[{type:"line",name:"价格",xAxisIndex:0,yAxisIndex:0,data:o,symbol:"none",lineStyle:{width:1.5,color:d},areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:d.replace(")",", 0.3)").replace("rgb","rgba")},{offset:1,color:d.replace(")",", 0.05)").replace("rgb","rgba")}]}}},{type:"line",name:"均价",xAxisIndex:0,yAxisIndex:0,data:s,symbol:"none",lineStyle:{width:1,color:"#faad14",type:"dashed"}},...n?[{type:"line",name:"昨收",xAxisIndex:0,yAxisIndex:0,data:a.map(()=>n),symbol:"none",lineStyle:{width:1,color:e.textColorSecondary,type:"dotted"}}]:[],{type:"bar",name:"成交量",xAxisIndex:1,yAxisIndex:1,data:l.map((y,_)=>{const w=o[_]??0,b=_>0?o[_-1]??w:n??w;return{value:y,itemStyle:{color:w>=b?e.volumeUpColor:e.volumeDownColor}}})}]}}const iR="_container_119o2_1",aR="_spinner_119o2_11",oR="_dot_119o2_16",sR="_text_119o2_43",ei={container:iR,spinner:aR,dot:oR,text:sR};function M1({text:r="加载中..."}){return N.jsxs("div",{className:ei.container,children:[N.jsxs("div",{className:ei.spinner,children:[N.jsx("div",{className:ei.dot}),N.jsx("div",{className:ei.dot}),N.jsx("div",{className:ei.dot})]}),N.jsx("span",{className:ei.text,children:r})]})}const lR="_container_1xu4v_1",uR="_group_1xu4v_10",fR="_button_1xu4v_15",hR="_active_1xu4v_30",Yo={container:lR,group:uR,button:fR,active:hR},cR=[{label:"分时",periods:[{value:"timeline",label:"分时"},{value:"timeline5",label:"五日"}]},{label:"周期",periods:[{value:"daily",label:"日K"},{value:"weekly",label:"周K"},{value:"monthly",label:"月K"}]},{label:"分钟",periods:[{value:"1",label:"1分"},{value:"5",label:"5分"},{value:"15",label:"15分"},{value:"30",label:"30分"},{value:"60",label:"60分"}]}];function A1({value:r,onChange:t}){return N.jsx("div",{className:Yo.container,children:cR.map(e=>N.jsx("div",{className:Yo.group,children:e.periods.map(n=>N.jsx("button",{type:"button",className:`${Yo.button} ${r===n.value?Yo.active:""}`,onClick:()=>t(n.value),children:n.label},n.value))},e.label))})}const vR="_container_1fbmi_1",dR="_button_1fbmi_11",pR="_active_1fbmi_27",gR="_divider_1fbmi_33",ri={container:vR,button:dR,active:pR,divider:gR},I1=[{value:"ma",label:"MA",group:"main"},{value:"boll",label:"BOLL",group:"main"},{value:"sar",label:"SAR",group:"main"},{value:"kc",label:"KC",group:"main"}],mR=[{value:"volume",label:"成交量",group:"sub"},{value:"macd",label:"MACD",group:"sub"},{value:"kdj",label:"KDJ",group:"sub"},{value:"rsi",label:"RSI",group:"sub"},{value:"wr",label:"WR",group:"sub"},{value:"bias",label:"BIAS",group:"sub"},{value:"cci",label:"CCI",group:"sub"},{value:"atr",label:"ATR",group:"sub"},{value:"obv",label:"OBV",group:"sub"},{value:"roc",label:"ROC",group:"sub"},{value:"dmi",label:"DMI",group:"sub"}];function bf(r){return I1.find(e=>e.value===r)?"main":"sub"}function E1({value:r,onChange:t,maxSubPanes:e=3,maxMainIndicators:n=2}){const i=a=>{const o=bf(a);if(r.includes(a))t(r.filter(s=>s!==a));else if(o==="main"){const s=r.filter(l=>bf(l)==="main");if(s.length>=n){const l=s[s.length-1],u=r.filter(f=>f!==l);t([...u,a])}else t([...r,a])}else{const s=r.filter(l=>bf(l)==="sub");if(s.length>=e){const l=s[s.length-1],u=r.filter(f=>f!==l);t([...u,a])}else t([...r,a])}};return N.jsxs("div",{className:ri.container,children:[I1.map(a=>N.jsx("button",{type:"button",className:`${ri.button} ${r.includes(a.value)?ri.active:""}`,onClick:()=>i(a.value),children:a.label},a.value)),N.jsx("div",{className:ri.divider}),mR.map(a=>N.jsx("button",{type:"button",className:`${ri.button} ${r.includes(a.value)?ri.active:""}`,onClick:()=>i(a.value),children:a.label},a.value))]})}const yR="_container_2tswg_1",_R="_group_2tswg_10",wR="_divider_2tswg_16",bR="_spacer_2tswg_23",SR="_iconButton_2tswg_27",xR="_textButton_2tswg_51",CR="_active_2tswg_67",It={container:yR,group:_R,divider:wR,spacer:bR,iconButton:SR,textButton:xR,active:CR},TR=[{value:"",label:"不复权"},{value:"qfq",label:"前复权"},{value:"hfq",label:"后复权"}];function L1({adjust:r,onAdjustChange:t,canUndo:e,canRedo:n,onUndo:i,onRedo:a,onZoomIn:o,onZoomOut:s,onPanLeft:l,onPanRight:u,onReset:f,onFullscreen:h}){return N.jsxs("div",{className:It.container,children:[N.jsxs("div",{className:It.group,children:[N.jsx("button",{type:"button",className:It.iconButton,onClick:i,disabled:!e,title:"撤销",children:N.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:N.jsx("path",{d:"M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"})})}),N.jsx("button",{type:"button",className:It.iconButton,onClick:a,disabled:!n,title:"重做",children:N.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:N.jsx("path",{d:"M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"})})})]}),N.jsx("div",{className:It.divider}),N.jsxs("div",{className:It.group,children:[N.jsx("button",{type:"button",className:It.iconButton,onClick:o,title:"放大",children:N.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:N.jsx("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"})})}),N.jsx("button",{type:"button",className:It.iconButton,onClick:s,title:"缩小",children:N.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:N.jsx("path",{d:"M19 13H5v-2h14v2z"})})})]}),N.jsx("div",{className:It.divider}),N.jsxs("div",{className:It.group,children:[N.jsx("button",{type:"button",className:It.iconButton,onClick:l,title:"向左",children:N.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:N.jsx("path",{d:"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"})})}),N.jsx("button",{type:"button",className:It.iconButton,onClick:u,title:"向右",children:N.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:N.jsx("path",{d:"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"})})})]}),N.jsx("div",{className:It.divider}),N.jsx("div",{className:It.group,children:N.jsx("button",{type:"button",className:It.textButton,onClick:f,title:"重置",children:"重置"})}),N.jsx("div",{className:It.spacer}),N.jsx("div",{className:It.group,children:TR.map(c=>N.jsx("button",{type:"button",className:`${It.textButton} ${r===c.value?It.active:""}`,onClick:()=>t(c.value),children:c.label},c.value))}),h&&N.jsxs(N.Fragment,{children:[N.jsx("div",{className:It.divider}),N.jsx("button",{type:"button",className:It.iconButton,onClick:h,title:"全屏",children:N.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"currentColor",children:N.jsx("path",{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"})})})]})]})}const DR="_container_1vdme_1",MR="_group_1vdme_11",AR="_item_1vdme_18",pe={container:DR,group:MR,item:AR},IR={ma5:"#f5a623",ma10:"#2196f3",ma20:"#e91e63",ma30:"#4caf50",ma60:"#9c27b0",ma120:"#00bcd4",ma250:"#ff5722"},Sf={upper:"#faad14",mid:"#1890ff",lower:"#722ed1"},xf={upper:"#52c41a",mid:"#13c2c2",lower:"#eb2f96"};function Lr(r){return r==null?"--":r.toFixed(2)}function ER({data:r,indicators:t,hoverIndex:e}){const n=W.useMemo(()=>{const l=e??r.length-1,u=r[l];return u||null},[r,e]);if(!n)return null;const i=t.includes("ma"),a=t.includes("boll"),o=t.includes("sar"),s=t.includes("kc");return!i&&!a&&!o&&!s?null:N.jsxs("div",{className:pe.container,children:[i&&n.ma&&N.jsx("div",{className:pe.group,children:Object.keys(n.ma).filter(l=>{var u,f;return l.startsWith("ma")&&((u=n.ma)==null?void 0:u[l])!==null&&((f=n.ma)==null?void 0:f[l])!==void 0}).map(l=>{var h;const u=(h=n.ma)==null?void 0:h[l],f=IR[l]??"#999";return N.jsxs("span",{className:pe.item,style:{color:f},children:[l.toUpperCase(),": ",Lr(u)]},l)})}),a&&n.boll&&N.jsxs("div",{className:pe.group,children:[N.jsxs("span",{className:pe.item,style:{color:Sf.upper},children:["UPPER: ",Lr(n.boll.upper)]}),N.jsxs("span",{className:pe.item,style:{color:Sf.mid},children:["MID: ",Lr(n.boll.mid)]}),N.jsxs("span",{className:pe.item,style:{color:Sf.lower},children:["LOWER: ",Lr(n.boll.lower)]})]}),o&&n.sar&&N.jsx("div",{className:pe.group,children:N.jsxs("span",{className:pe.item,style:{color:n.sar.trend===1?"#cf1322":"#389e0d"},children:["SAR: ",Lr(n.sar.sar)," ",n.sar.trend===1?"↑":"↓"]})}),s&&n.kc&&N.jsxs("div",{className:pe.group,children:[N.jsxs("span",{className:pe.item,style:{color:xf.upper},children:["KC上: ",Lr(n.kc.upper)]}),N.jsxs("span",{className:pe.item,style:{color:xf.mid},children:["KC中: ",Lr(n.kc.mid)]}),N.jsxs("span",{className:pe.item,style:{color:xf.lower},children:["KC下: ",Lr(n.kc.lower)]})]})]})}const LR="_title_p093j_1",PR="_label_p093j_16",RR="_value_p093j_21",Cf={title:LR,label:PR,value:RR},kR={ma:"MA",boll:"BOLL",sar:"SAR",kc:"KC",volume:"成交量",macd:"MACD",kdj:"KDJ",rsi:"RSI",wr:"WR",bias:"BIAS",cci:"CCI",atr:"ATR",obv:"OBV",roc:"ROC",dmi:"DMI"};function OR(r,t){if(!t)return"";switch(r){case"volume":return`VOL: ${rr(t.volume)}`;case"macd":return t.macd?`DIF: ${F(t.macd.dif)} DEA: ${F(t.macd.dea)} MACD: ${F(t.macd.macd)}`:"";case"kdj":return t.kdj?`K: ${F(t.kdj.k)} D: ${F(t.kdj.d)} J: ${F(t.kdj.j)}`:"";case"rsi":return t.rsi?`RSI6: ${F(t.rsi.rsi6)} RSI12: ${F(t.rsi.rsi12)} RSI24: ${F(t.rsi.rsi24)}`:"";case"wr":return t.wr?`WR6: ${F(t.wr.wr6)} WR10: ${F(t.wr.wr10)}`:"";case"bias":return t.bias?`BIAS6: ${F(t.bias.bias6)} BIAS12: ${F(t.bias.bias12)} BIAS24: ${F(t.bias.bias24)}`:"";case"cci":return t.cci?`CCI: ${F(t.cci.cci)}`:"";case"atr":return t.atr?`ATR: ${F(t.atr.atr)}`:"";case"obv":return t.obv?`OBV: ${rr(t.obv.obv)} MA: ${rr(t.obv.obvMa)}`:"";case"roc":return t.roc?`ROC: ${F(t.roc.roc)} SIGNAL: ${F(t.roc.signal)}`:"";case"dmi":return t.dmi?`+DI: ${F(t.dmi.pdi)} -DI: ${F(t.dmi.mdi)} ADX: ${F(t.dmi.adx)}`:"";case"sar":return t.sar?`SAR: ${F(t.sar.sar)} ${t.sar.trend===1?"↑":"↓"}`:"";case"kc":return t.kc?`上: ${F(t.kc.upper)} 中: ${F(t.kc.mid)} 下: ${F(t.kc.lower)}`:"";default:return""}}function NR(r,t){const a=t-50-55-(r.length-1)*25,o=[];let s=0;for(const c of r)if(typeof c.height=="string"&&c.height.endsWith("%")){const v=parseFloat(c.height)/100;o.push(v),s+=v}else typeof c.height=="number"?(o.push(c.height/a),s+=c.height/a):o.push(0);const l=o.filter(c=>c===0).length;if(l>0&&s<1){const c=(1-s)/l;for(let v=0;v<o.length;v++)o[v]===0&&(o[v]=c)}const u=o.reduce((c,v)=>c+v,0);for(let c=0;c<o.length;c++)o[c]=o[c]/u*a;const f=[];let h=50;for(let c=0;c<r.length;c++)f.push({top:h,height:o[c]}),h+=o[c]+25;return f}function BR({panes:r,data:t,hoverIndex:e,containerHeight:n}){const i=e??t.length-1,a=t[i],o=W.useMemo(()=>NR(r,n),[r,n]),s=r.slice(1),l=o.slice(1);return s.length===0?null:N.jsx(N.Fragment,{children:s.map((u,f)=>{const h=u.indicators[0];if(!h)return null;const c=kR[h]||h.toUpperCase(),v=OR(h,a),d=l[f];return N.jsxs("div",{className:Cf.title,style:{top:(d==null?void 0:d.top)??0},children:[N.jsx("span",{className:Cf.label,children:c}),v&&N.jsx("span",{className:Cf.value,children:v})]},u.id)})})}const FR="_container_o8wlo_1",zR="_fullscreen_o8wlo_12",VR="_chartWrapper_o8wlo_23",HR="_chart_o8wlo_23",WR="_error_o8wlo_34",GR="_timelineToolbar_o8wlo_63",$R="_timelineLabel_o8wlo_71",UR="_refreshButton_o8wlo_77",YR="_fullscreenButton_o8wlo_78",ur={container:FR,fullscreen:zR,chartWrapper:VR,chart:HR,error:WR,timelineToolbar:GR,timelineLabel:$R,refreshButton:UR,fullscreenButton:YR};function Pr(r){return r==="timeline"||r==="timeline5"}function jR(){const r=new Date,t=r.getDay();if(t===0||t===6)return!1;const e=r.getHours(),n=r.getMinutes(),i=e*60+n;return i>=570&&i<=690||i>=780&&i<=900}const ZR=W.forwardRef(function(t,e){const{symbol:n,market:i="A",period:a="daily",adjust:o="qfq",height:s=500,width:l="100%",theme:u="light",indicators:f=["ma","volume","macd"],indicatorOptions:h,showToolbar:c=!0,showPeriodSelector:v=!0,showIndicatorSelector:d=!0,maxSubPanes:p=3,visibleCount:g=60,onDataLoad:m,onPeriodChange:y,onError:_,dataProvider:w,sdkOptions:b,requestOptions:S,autoRefresh:x,panes:T,echartsOption:M,echartsOptionMerge:A,className:C,style:I}=t,[E,L]=W.useState(a),[P,R]=W.useState(o),[z,k]=W.useState(f),[V,$]=W.useState(!1),[j,J]=W.useState(null),it=W.useRef(null),at=W.useRef(null),ot=W.useMemo(()=>Zg(u),[u]),Jt=W.useMemo(()=>T??D1(z,{maxSubPanes:p}),[T,z,p]),{data:pt,timelineData:Be,loading:Bt,error:Dt,refresh:q}=Im({symbol:n,market:i,period:E,adjust:P,dataProvider:w,sdkOptions:b,requestOptions:S,indicatorOptions:h,indicators:z}),{chartRef:st,setOption:be,getDataURL:Ft,bindEvent:On}=m1(),{canUndo:ro,canRedo:P1,currentState:br,pushState:Hc,undo:Wc,redo:Gc,reset:Nn}=y1(),[no,R1]=W.useState(500);W.useEffect(()=>{const U=st.current;if(!U)return;const gt=()=>{const xt=U.offsetHeight;xt>0&&R1(xt)};gt();const Nt=new ResizeObserver(gt);return Nt.observe(U),()=>Nt.disconnect()},[]);const El=W.useMemo(()=>x?x===!0?{intervalMs:5e3,onlyTradingTime:!0}:x:null,[x]);W.useEffect(()=>{if(at.current&&(clearInterval(at.current),at.current=null),!El||!Pr(E))return;const{intervalMs:U=5e3,onlyTradingTime:gt=!0}=El;return at.current=setInterval(()=>{gt&&!jR()||q()},U),()=>{at.current&&clearInterval(at.current)}},[El,E,q]),W.useEffect(()=>{const U=On("mousemove",Nt=>{const xt=Nt;(xt==null?void 0:xt.dataIndex)!==void 0&&J(xt.dataIndex)}),gt=On("mouseout",()=>{J(null)});return()=>{U(),gt()}},[On]),W.useEffect(()=>{var Nt;if(pt.length===0&&!Bt)return;let U;if(Pr(E)&&Be.length>0){const xt=pt.length>0?((Nt=pt[0])==null?void 0:Nt.close)??void 0:void 0;U=nR({data:Be,theme:ot,prevClose:xt??void 0,containerHeight:no})}else U=eR({data:pt,theme:ot,indicators:z,panes:Jt,containerHeight:no});const gt=rR(U,M,A==null?void 0:A.mode);be(gt,{replaceMerge:["series","xAxis","yAxis","grid","title"]})},[pt,Be,ot,z,Jt,g,no,M,A,be,Bt,E]),W.useEffect(()=>{pt.length>0&&m&&m(pt)},[pt,m]),W.useEffect(()=>{Dt&&_&&_(Dt)},[Dt,_]);const Ll=W.useCallback(U=>{L(U),Nn(),y==null||y(U)},[y,Nn]),k1=W.useCallback(U=>{R(U)},[]),Pl=W.useCallback(U=>{k(U)},[]),zt=W.useCallback((U,gt,Nt=!0)=>{const xt=Math.max(0,Math.min(100,U)),te=Math.max(xt,Math.min(100,gt));be({dataZoom:[{id:C1,start:xt,end:te},{id:T1,start:xt,end:te}]}),Nt&&Hc({start:xt,end:te})},[be,Hc]),io=W.useCallback(U=>U<=0?{start:0,end:100}:{start:Math.max(0,(U-g)/U*100),end:100},[g]),O1=W.useCallback(()=>{const{start:U,end:gt}=br,Nt=gt-U,xt=Math.max(Nt*.6,5),te=(U+gt)/2,Ur=Math.max(0,te-xt/2),kl=Math.min(100,te+xt/2);zt(Ur,kl)},[zt,br]),N1=W.useCallback(()=>{const{start:U,end:gt}=br,Nt=gt-U,xt=Math.min(Nt*1.5,100),te=(U+gt)/2,Ur=Math.max(0,te-xt/2),kl=Math.min(100,te+xt/2);zt(Ur,kl)},[zt,br]),B1=W.useCallback(()=>{const{start:U,end:gt}=br,Nt=gt-U,xt=Nt*.2,te=Math.max(0,U-xt),Ur=te+Nt;zt(te,Ur)},[zt,br]),F1=W.useCallback(()=>{const{start:U,end:gt}=br,Nt=gt-U,xt=Nt*.2,te=Math.min(100,gt+xt),Ur=te-Nt;zt(Ur,te)},[zt,br]),z1=W.useCallback(()=>{const U=Wc();U&&zt(U.start,U.end,!1)},[Wc,zt]),V1=W.useCallback(()=>{const U=Gc();U&&zt(U.start,U.end,!1)},[Gc,zt]),Rl=W.useCallback(()=>{const{start:U,end:gt}=io(pt.length);zt(U,gt,!1),Nn({start:U,end:gt})},[pt.length,io,zt,Nn]),$c=W.useCallback(()=>{it.current&&(document.fullscreenElement?document.exitFullscreen().then(()=>{$(!1)}).catch(()=>{}):it.current.requestFullscreen().then(()=>{$(!0)}).catch(()=>{}))},[]);W.useEffect(()=>{const U=()=>{$(!!document.fullscreenElement)};return document.addEventListener("fullscreenchange",U),()=>{document.removeEventListener("fullscreenchange",U)}},[]),W.useImperativeHandle(e,()=>({refresh:q,setPeriod:Ll,setIndicators:Pl,zoomTo:(U,gt)=>{zt(U,gt)},resetZoom:Rl,getEchartsInstance:()=>st.current,exportImage:U=>Ft({type:U}),getData:()=>pt}),[q,Ll,Pl,Rl,zt,st,Ft,pt]),W.useEffect(()=>{if(Pr(E)||pt.length===0)return;const{start:U,end:gt}=io(pt.length);zt(U,gt,!1),Nn({start:U,end:gt})},[pt.length,E,io,zt,Nn]);const H1=W.useMemo(()=>({"--kline-bg-color":ot.backgroundColor,"--kline-text-color":ot.textColor,"--kline-text-secondary":ot.textColorSecondary,"--kline-border-color":ot.gridLineColor,"--kline-active-color":ot.activeColor,"--kline-hover-bg":u==="dark"?"#2a2a2a":"#f5f5f5","--kline-tag-bg":u==="dark"?"#2a2a2a":"#f0f0f0","--kline-text-disabled":u==="dark"?"#444":"#ccc"}),[ot,u]),W1=(z.includes("ma")||z.includes("boll"))&&!Pr(E)&&pt.length>0;return N.jsxs("div",{ref:it,className:`${ur.container} ${V?ur.fullscreen:""} ${C??""}`,style:{...H1,width:l,height:V?"100vh":s,...I},children:[v&&N.jsx(A1,{value:E,onChange:Ll}),c&&!Pr(E)&&N.jsx(L1,{adjust:P,onAdjustChange:k1,canUndo:ro,canRedo:P1,onUndo:z1,onRedo:V1,onZoomIn:O1,onZoomOut:N1,onPanLeft:B1,onPanRight:F1,onReset:Rl,onFullscreen:$c}),c&&Pr(E)&&N.jsxs("div",{className:ur.timelineToolbar,children:[N.jsx("span",{className:ur.timelineLabel,children:"分时走势"}),N.jsx("button",{type:"button",className:ur.refreshButton,onClick:q,disabled:Bt,children:"刷新"}),N.jsx("button",{type:"button",className:ur.fullscreenButton,onClick:$c,children:V?"退出全屏":"全屏"})]}),W1&&N.jsx(ER,{data:pt,indicators:z,hoverIndex:j}),N.jsxs("div",{className:ur.chartWrapper,children:[Bt&&pt.length===0&&N.jsx(M1,{}),Dt&&pt.length===0&&N.jsxs("div",{className:ur.error,children:[N.jsxs("span",{children:["加载失败:",Dt.message]}),N.jsx("button",{type:"button",onClick:q,children:"重试"})]}),N.jsx("div",{ref:st,className:ur.chart,style:{visibility:pt.length>0||Be.length>0?"visible":"hidden"}}),!Pr(E)&&pt.length>0&&N.jsx(BR,{panes:Jt,data:pt,hoverIndex:j,containerHeight:no})]}),d&&!Pr(E)&&N.jsx(E1,{value:z,onChange:Pl})]})});exports.IndicatorSelector=E1;exports.KLineChart=ZR;exports.Loading=M1;exports.PeriodSelector=A1;exports.Toolbar=L1;exports.calcATR=kh;exports.calcBIAS=Mm;exports.calcBOLL=xm;exports.calcCCI=Am;exports.calcEMA=wn;exports.calcKDJ=Cm;exports.calcMA=bm;exports.calcMACD=Sm;exports.calcRSI=Tm;exports.calcSMA=Mi;exports.calcWMA=wm;exports.calcWR=Dm;exports.darkTheme=jg;exports.formatAmount=S1;exports.formatChange=b1;exports.formatDate=QP;exports.formatKlineTooltip=x1;exports.formatNumber=_1;exports.formatPercent=w1;exports.formatPrice=F;exports.formatVolume=rr;exports.getTheme=Zg;exports.lightTheme=Tf;exports.useEcharts=m1;exports.useKlineData=Im;exports.useZoomHistory=y1;
|