import{o as He,c as mr,J as lk,d as xA,h as gi,a as et,F as Ho,p as Wo,j as De,i as $p,w as pl,t as Qt,K as uk,I as $t,g as be,x as fk,L as po,M as ck,b as Ja,y as vh,e as E_,N as lm,_ as Qa}from"./index-10f45eca.js";import{_ as vk}from"./button.vue_vue_type_style_index_0_lang-80cf0b72.js";import{_ as hk}from"./BasicSelect.vue_vue_type_style_index_0_lang-2a0574c0.js";import{_ as dk}from"./_plugin-vue_export-helper-2f157ef4.js";import{I as O_}from"./Icon-e9a9d64e.js";import{u as pk}from"./usePrice-7afab779.js";import{a as hh}from"./useDataTime-60875705.js";import"./index-9601d570.js";import"./toArray-45e57117.js";import"./index-ceff8631.js";import"./vnode-b14d5532.js";import"./FormItemContext-a11ae724.js";import"./pickAttrs-2c86ae65.js";import"./useState-4f4a8c99.js";const gk={},yk={class:"bg-gradient"};function mk(r,e){return He(),mr("div",yk,[lk(r.$slots,"default")])}const Up=dk(gk,[["render",mk]]),Yp="/assets/totalsales-b298228f.svg",Zp="/assets/orders-4e5dd0bd.svg",Xp="/assets/customers-aa15910e.svg",qp="/assets/salesnumber-bffd0c96.svg",_k={class:"grid grid-cols-1 md:grid-cols-4 gap-3"},Sk={class:"flex"},xk=["src","alt"],bk={class:"flex flex-col justify-between w-full mr-2"},wk={class:"text-base font-bold"},Tk={class:"flex items-center justify-end"},Ck={class:"text-base font-bold"},Ak={class:"mr-1"},Mk=xA({__name:"Header",props:{statistics:{}},setup(r){const e=r,t=gi(()=>{var a;return[{title:"تعداد کاربران",alt:"sales-number",image:qp,value:e.statistics.count_sale_order,unit:"نفر"},{title:"کاربران جدید امروز",alt:"customers",image:Xp,value:e.statistics.new_customer,unit:"نفر"},{title:"کاربران فعال هفته",alt:"orders",image:Zp,value:e.statistics.count_order,unit:"نفر"},{title:"کاربران فعال ماه",alt:"total-sales",image:Yp,value:((a=e.statistics.total_sale)==null?void 0:a.toLocaleString("fa-IR"))||"0",unit:"نفر"}]});return(a,n)=>(He(),mr("div",null,[et("div",_k,[(He(!0),mr(Ho,null,Wo(De(t),(i,o)=>(He(),$p(Up,{class:"h-[120px] p-5",key:o},{default:pl(()=>[et("div",Sk,[et("div",null,[et("img",{class:"w-20 h-20",src:i.image,alt:i.alt},null,8,xk)]),et("div",bk,[et("div",null,[et("span",wk,Qt(i.title),1)]),et("div",Tk,[et("span",Ck,Qt(i.value),1),et("span",Ak,Qt(i.unit),1)])])])]),_:2},1024))),128))])]))}}),Dk=async()=>await uk.get("/admin/report"),Lk=async r=>{const{type:e,item_id:t,date:a}=r,n=a?new Date(a):new Date;if(e==="hourly"){const i=n.toISOString().split("T")[0];let o=$t.from("user_views_hourly").select("*").eq("day",i).eq("type","story").order("hour");t&&(o=o.eq("item_id",t));const{data:s,error:l}=await o;if(l)throw l;return s||[]}else{const i=new Date(n);i.setDate(n.getDate()-29);const o=i.toISOString().split("T")[0],s=n.toISOString().split("T")[0];let l=$t.from("user_views_hourly").select("*").eq("type","story").gte("day",o).lte("day",s).order("day").order("hour");t&&(l=l.eq("item_id",t));const{data:u,error:f}=await l;if(f)throw f;return u||[]}},Ik=async()=>{const r=new Date,e=new Date(r.getFullYear(),r.getMonth(),r.getDate()),t=new Date(e);t.setDate(t.getDate()+1);const a=e.toISOString(),n=t.toISOString(),[i,o]=await Promise.all([$t.from("users").select("*",{count:"exact",head:!0}),$t.from("users").select("*",{count:"exact",head:!0}).gte("created_at",a).lt("created_at",n)]);if(i.error)throw i.error;if(o.error)throw o.error;return{total:i.count||0,today:o.count||0}},Pk=async()=>{const{data:r,error:e}=await $t.from("user_views_hourly").select("views").eq("type","story");if(e)throw e;if(!r||r.length===0)return 0;let t=0;return r.forEach(a=>{t+=Number((a==null?void 0:a.views)||0)}),t},Rk=async()=>{const e=new Date().toISOString().split("T")[0],{data:t,error:a}=await $t.from("user_views_hourly").select("views").eq("type","story").eq("day",e);if(a)throw a;if(!t||t.length===0)return 0;let n=0;return t.forEach(i=>{n+=Number((i==null?void 0:i.views)||0)}),n},kk=async()=>{const{data:r,error:e}=await $t.from("user_views").select("user_id").eq("type","story").not("user_id","is",null);if(e)throw e;if(!r||r.length===0)return 0;const t=new Set;return r.forEach(a=>{a.user_id&&t.add(a.user_id)}),t.size},Ek=async()=>{const{data:r,error:e}=await $t.from("storys").select("id").order("created_at",{ascending:!1}).limit(1);if(e)throw e;if(!r||r.length===0)return 0;const t=r[0].id,{data:a,error:n}=await $t.from("user_views_hourly").select("views").eq("type","story").eq("item_id",t);if(n)throw n;if(!a||a.length===0)return 0;let i=0;return a.forEach(o=>{i+=Number((o==null?void 0:o.views)||0)}),i},Ok=async(r=10)=>{const{data:e,error:t}=await $t.from("storys").select("id, title").order("created_at",{ascending:!1}).limit(r);if(t)throw t;return!e||e.length===0?[]:(await Promise.all(e.map(async n=>{const{data:i,error:o}=await $t.from("user_views").select("user_id").eq("type","story").eq("item_id",n.id).not("user_id","is",null);if(o)throw o;const s=new Set;i==null||i.forEach(v=>{v.user_id&&s.add(v.user_id)});const l=s.size,{data:u,error:f}=await $t.from("user_views_hourly").select("views").eq("type","story").eq("item_id",n.id);if(f)throw f;let c=0;return u==null||u.forEach(v=>{c+=Number((v==null?void 0:v.views)||0)}),{id:n.id,title:n.title||"بدون عنوان",unique_viewers:l,total_views:c}}))).sort((n,i)=>i.total_views-n.total_views)},Bk=async()=>{const r=new Date,e=new Date(r);e.setDate(r.getDate()-30);const t=e.toISOString(),a=r.toISOString(),{data:n,error:i}=await $t.from("user_views").select("user_id").gte("viewed_at",t).lte("viewed_at",a).not("user_id","is",null);if(i)throw console.error("Error fetching active users this month:",i),i;if(!n||n.length===0)return 0;const o=new Set;return n.forEach(s=>{s.user_id&&o.add(s.user_id)}),o.size},Nk=async()=>{const r=new Date,e=new Date(r);e.setDate(r.getDate()-7);const t=e.toISOString(),a=r.toISOString(),{data:n,error:i}=await $t.from("user_views").select("user_id").gte("viewed_at",t).lte("viewed_at",a).not("user_id","is",null);if(i)throw console.error("Error fetching active users this week:",i),i;if(!n||n.length===0)return 0;const o=new Set;return n.forEach(s=>{s.user_id&&o.add(s.user_id)}),o.size},Vk=async r=>{const{type:e,date:t}=r,a=t?new Date(t):new Date;if(e==="hourly"){const n=new Date(a);n.setHours(0,0,0,0);const i=new Date(a);i.setHours(23,59,59,999);const{data:o,error:s}=await $t.from("user_views").select("user_id, viewed_at").gte("viewed_at",n.toISOString()).lte("viewed_at",i.toISOString()).not("user_id","is",null);if(s)throw s;if(!o||o.length===0)return[];const l=new Set;o.forEach(c=>{c.user_id&&l.add(c.user_id)});const u=l.size,f={};return o.forEach(c=>{const h=new Date(c.viewed_at).getHours(),d=c.user_id;f[h]||(f[h]=new Set),f[h].add(d)}),Object.keys(f).map(c=>({hour:Number(c),users:f[Number(c)].size,totalUniqueUsers:u}))}else{const n=new Date(a);n.setDate(a.getDate()-29),n.setHours(0,0,0,0);const i=new Date(a);i.setHours(23,59,59,999);const{data:o,error:s}=await $t.from("user_views").select("user_id, viewed_at").gte("viewed_at",n.toISOString()).lte("viewed_at",i.toISOString()).not("user_id","is",null);if(s)throw s;if(!o||o.length===0)return[];const l=new Set;o.forEach(c=>{c.user_id&&l.add(c.user_id)});const u=l.size,f={};return o.forEach(c=>{const h=new Date(c.viewed_at).toISOString().split("T")[0],d=c.user_id;f[h]||(f[h]=new Set),f[h].add(d)}),Object.keys(f).sort().map(c=>({day:c,users:f[c].size,totalUniqueUsers:u}))}},zk=async()=>{const{data:r,error:e}=await $t.from("users").select("id, first_name, last_name, phone, created_at").order("created_at",{ascending:!1}).limit(50);if(e)throw e;return!r||r.length===0?[]:r.map((t,a)=>{let n="نامشخص";return t.first_name||t.last_name?n=`${t.first_name||""} ${t.last_name||""}`.trim():t.phone&&(n=t.phone),{rank:a+1,name:n,mobile:t.phone||t.mobile||"-",created_at:t.created_at||""}})},Gk=async()=>{const{data:r,error:e}=await $t.from("answers").select("user_id").not("user_id","is",null);if(e)throw e;if(!r||r.length===0)return 0;const t=new Set;return r.forEach(a=>{a.user_id&&t.add(a.user_id)}),t.size},Fk=async()=>{const{data:r,error:e}=await $t.from("answers").select("user_id, match_id, score, matchs!match_id(minimum_score)").not("user_id","is",null);if(e)throw e;if(!r||r.length===0)return 0;const t=new Set;return r.forEach(a=>{const i=(Array.isArray(a.matchs)?a.matchs[0]:a.matchs)||{},o=i.minimum_score?Number(i.minimum_score):0;(a.score?Number(a.score):0)>=o&&a.user_id&&t.add(a.user_id)}),t.size},Hk=async()=>{const{data:r,error:e}=await $t.from("matchs").select("id").order("created_at",{ascending:!1}).limit(1);if(e)throw e;if(!r||r.length===0)return 0;const t=r[0].id,{data:a,error:n}=await $t.from("answers").select("user_id").eq("match_id",t).not("user_id","is",null);if(n)throw n;if(!a||a.length===0)return 0;const i=new Set;return a.forEach(o=>{o.user_id&&i.add(o.user_id)}),i.size},Wk=async()=>{const{data:r,error:e}=await $t.from("matchs").select("id, minimum_score").order("created_at",{ascending:!1}).limit(1);if(e)throw e;if(!r||r.length===0)return 0;const t=r[0],a=t.id,n=t.minimum_score?Number(t.minimum_score):0,{data:i,error:o}=await $t.from("answers").select("user_id, score").eq("match_id",a).not("user_id","is",null);if(o)throw o;if(!i||i.length===0)return 0;const s=new Set;return i.forEach(l=>{(l.score?Number(l.score):0)>=n&&l.user_id&&s.add(l.user_id)}),s.size},$k=async r=>{const{type:e,date:t}=r,a=t?new Date(t):new Date;if(e==="hourly"){const n=new Date(a);n.setHours(0,0,0,0);const i=new Date(a);i.setHours(23,59,59,999);const{data:o,error:s}=await $t.from("answers").select("user_id, match_id, score, created_at, matchs!match_id(minimum_score)").gte("created_at",n.toISOString()).lte("created_at",i.toISOString()).not("user_id","is",null);if(s)throw s;if(!o||o.length===0)return[];const l={};return o.forEach(u=>{const c=new Date(u.created_at).getHours(),v=u.user_id;l[c]||(l[c]={total:new Set,eligible:new Set}),l[c].total.add(v);const d=(Array.isArray(u.matchs)?u.matchs[0]:u.matchs)||{},p=d.minimum_score?Number(d.minimum_score):0;(u.score?Number(u.score):0)>=p&&l[c].eligible.add(v)}),Object.keys(l).map(u=>({hour:Number(u),totalParticipants:l[Number(u)].total.size,eligibleParticipants:l[Number(u)].eligible.size}))}else{const n=new Date(a);n.setDate(a.getDate()-29),n.setHours(0,0,0,0);const i=new Date(a);i.setHours(23,59,59,999);const{data:o,error:s}=await $t.from("answers").select("user_id, match_id, score, created_at, matchs!match_id(minimum_score)").gte("created_at",n.toISOString()).lte("created_at",i.toISOString()).not("user_id","is",null);if(s)throw s;if(!o||o.length===0)return[];const l={};return o.forEach(u=>{const c=new Date(u.created_at).toISOString().split("T")[0],v=u.user_id;l[c]||(l[c]={total:new Set,eligible:new Set}),l[c].total.add(v);const d=(Array.isArray(u.matchs)?u.matchs[0]:u.matchs)||{},p=d.minimum_score?Number(d.minimum_score):0;(u.score?Number(u.score):0)>=p&&l[c].eligible.add(v)}),Object.keys(l).sort().map(u=>({day:u,totalParticipants:l[u].total.size,eligibleParticipants:l[u].eligible.size}))}},Uk=async()=>{const{data:r,error:e}=await $t.from("matchs").select("id, title, created_at").order("created_at",{ascending:!1});if(e)throw e;if(!r||r.length===0)return[];for(const t of r){const{data:a,error:n}=await $t.from("winners_match").select("*").eq("match_id",t.id).order("rank",{ascending:!0});if(!n&&a&&a.length>0){const i=[...new Set(a.map(v=>v.user_id||v.winner_id).filter(Boolean))];if(i.length===0)return[];const[o,s]=await Promise.all([$t.from("users").select("*").in("id",i),$t.from("answers").select("user_id, score").eq("match_id",t.id).in("user_id",i)]),l=o.data||[],u=s.data||[],f=new Map;l.forEach(v=>{const h=v.id;f.set(h,v),f.set(String(h),v)});const c=new Map;return u.forEach(v=>{const h=v.user_id;c.set(h,v.score||0),c.set(String(h),v.score||0)}),a.map(v=>{const h=v.user_id||v.winner_id,d=f.get(h)||f.get(String(h))||{},p=c.get(h)||c.get(String(h))||0;let g="نامشخص";return d.first_name||d.last_name?g=`${d.first_name||""} ${d.last_name||""}`.trim():d.name?g=d.name:d.phone&&(g=d.phone),{rank:v.rank||0,name:g,mobile:(d==null?void 0:d.phone)||(d==null?void 0:d.mobile)||"",score:Number(p)||0}})}}return[]};/*! ***************************************************************************** Copyright (c) Microsoft Corporation. Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ***************************************************************************** */var Kp=function(r,e){return Kp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])},Kp(r,e)};function F(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Kp(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Yk=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),Zk=function(){function r(){this.browser=new Yk,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}(),fn=new Zk;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(fn.wxa=!0,fn.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?fn.worker=!0:!fn.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(fn.node=!0,fn.svgSupported=!0):Xk(navigator.userAgent,fn);function Xk(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),n&&(t.ie=!0,t.version=n[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}const Rt=fn;var um=12,bA="sans-serif",Ga=um+"px "+bA,qk=20,Kk=100,jk="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Jk(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",a[l]+":0",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){A(t,function(f){f.parentNode&&f.parentNode.removeChild(f)})},t}function SE(r,e,t){for(var a=t?"invTrans":"trans",n=e[a],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),c=2*u,v=f.left,h=f.top;o.push(v,h),l=l&&i&&v===i[c]&&h===i[c+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[a]=t?z_(s,o):z_(o,s))}function LA(r){return r.nodeName.toUpperCase()==="CANVAS"}var xE=/([&<>"'])/g,bE={"&":"&","<":"<",">":">",'"':""","'":"'"};function Be(r){return r==null?"":(r+"").replace(xE,function(e,t){return bE[t]})}var wE=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ph=[],TE=Rt.browser.firefox&&+Rt.browser.version.split(".")[0]<39;function ng(r,e,t,a){return t=t||{},a?G_(r,e,t):TE&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):G_(r,e,t),t}function G_(r,e,t){if(Rt.domSupported&&r.getBoundingClientRect){var a=e.clientX,n=e.clientY;if(LA(r)){var i=r.getBoundingClientRect();t.zrX=a-i.left,t.zrY=n-i.top;return}else if(ag(ph,r,a,n)){t.zrX=ph[0],t.zrY=ph[1];return}}t.zrX=t.zrY=0}function gm(r){return r||window.event}function _r(r,e,t){if(e=gm(e),e.zrX!=null)return e;var a=e.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&ng(r,o,e,t)}else{ng(r,e,e,t);var i=CE(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&wE.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function CE(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var n=Math.abs(a!==0?a:t),i=a>0?-1:a<0?1:t>0?-1:1;return 3*n*i}function ig(r,e,t,a){r.addEventListener(e,t,a)}function AE(r,e,t,a){r.removeEventListener(e,t,a)}var Fa=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function F_(r){return r.which===2||r.which===3}var ME=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var n=e.touches;if(n){for(var i={points:[],touches:[],target:t,event:e},o=0,s=n.length;o1&&a&&a.length>1){var i=H_(a)/H_(n);!isFinite(i)&&(i=1),e.pinchScale=i;var o=DE(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function Ae(){return[1,0,0,1,0,0]}function Dv(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function Lv(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function da(r,e,t){var a=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function _a(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function zn(r,e,t,a){a===void 0&&(a=[0,0]);var n=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(t),c=Math.cos(t);return r[0]=n*c+s*f,r[1]=-n*f+s*c,r[2]=i*c+l*f,r[3]=-i*f+c*l,r[4]=c*(o-a[0])+f*(u-a[1])+a[0],r[5]=c*(u-a[1])-f*(o-a[0])+a[1],r}function ym(r,e,t){var a=t[0],n=t[1];return r[0]=e[0]*a,r[1]=e[1]*n,r[2]=e[2]*a,r[3]=e[3]*n,r[4]=e[4]*a,r[5]=e[5]*n,r}function Wr(r,e){var t=e[0],a=e[2],n=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=t*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-t*s)*l,r):null}function LE(r){var e=Ae();return Lv(e,r),e}var IE=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.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 e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,a=this.y-e.y;return Math.sqrt(t*t+a*a)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,a=this.y-e.y;return t*t+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,a=this.y;return this.x=e[0]*t+e[2]*a+e[4],this.y=e[1]*t+e[3]*a+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,a){e.x=t,e.y=a},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,a){e.x=t.x+a.x,e.y=t.y+a.y},r.sub=function(e,t,a){e.x=t.x-a.x,e.y=t.y-a.y},r.scale=function(e,t,a){e.x=t.x*a,e.y=t.y*a},r.scaleAndAdd=function(e,t,a,n){e.x=t.x+a.x*n,e.y=t.y+a.y*n},r.lerp=function(e,t,a,n){var i=1-n;e.x=i*t.x+n*a.x,e.y=i*t.y+n*a.y},r}();const ft=IE;var Di=Math.min,Xo=Math.max,og=Math.abs,W_=["x","y"],PE=["width","height"],$n=new ft,Un=new ft,Yn=new ft,Zn=new ft,or=IA(),gl=or.minTv,sg=or.maxTv,Il=[0,0],mm=function(){function r(e,t,a,n){r.set(this,e,t,a,n)}return r.set=function(e,t,a,n,i){return n<0&&(t=t+n,n=-n),i<0&&(a=a+i,i=-i),e.x=t,e.y=a,e.width=n,e.height=i,e},r.prototype.union=function(e){var t=Di(e.x,this.x),a=Di(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Xo(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Xo(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=t,this.y=a},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,a=e.width/t.width,n=e.height/t.height,i=Ae();return _a(i,i,[-t.x,-t.y]),ym(i,i,[a,n]),_a(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t,a){return r.intersect(this,e,t,a)},r.intersect=function(e,t,a,n){a&&ft.set(a,0,0);var i=n&&n.outIntersectRect||null,o=n&&n.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(RE,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(kE,t.x,t.y,t.width,t.height));var s=!!a;or.reset(n,s);var l=or.touchThreshold,u=e.x+l,f=e.x+e.width-l,c=e.y+l,v=e.y+e.height-l,h=t.x+l,d=t.x+t.width-l,p=t.y+l,g=t.y+t.height-l;if(u>f||c>v||h>d||p>g)return!1;var y=!(f=e.x&&t<=e.x+e.width&&a>=e.y&&a<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},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(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];e.x=t.x*n+o,e.y=t.y*i+s,e.width=t.width*n,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}$n.x=Yn.x=t.x,$n.y=Zn.y=t.y,Un.x=Zn.x=t.x+t.width,Un.y=Yn.y=t.y+t.height,$n.transform(a),Zn.transform(a),Un.transform(a),Yn.transform(a),e.x=Di($n.x,Un.x,Yn.x,Zn.x),e.y=Di($n.y,Un.y,Yn.y,Zn.y);var l=Xo($n.x,Un.x,Yn.x,Zn.x),u=Xo($n.y,Un.y,Yn.y,Zn.y);e.width=l-e.x,e.height=u-e.y},r}(),RE=new mm(0,0,0,0),kE=new mm(0,0,0,0);function $_(r,e,t,a,n,i,o,s){var l=og(e-t),u=og(a-r),f=Di(l,u),c=W_[n],v=W_[1-n],h=PE[n];e=u||!or.bidirectional)&&(gl[c]=-u,gl[v]=0,or.useDir&&or.calcDirMTV())))}function IA(){var r=0,e=new ft,t=new ft,a={minTv:new ft,maxTv:new ft,useDir:!1,dirMinTv:new ft,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){a.touchThreshold=0,i&&i.touchThreshold!=null&&(a.touchThreshold=Xo(0,i.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,i&&i.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),t.copy(a.minTv),r=i.direction,a.bidirectional=i.bidirectional==null||!!i.bidirectional,a.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=a.minTv,o=a.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),f=l*i.y+u*i.x;if(n(f)){n(i.x)&&n(i.y)&&o.set(0,0);return}if(t.x=s*u/f,t.y=s*l/f,n(t.x)&&n(t.y)){o.set(0,0);return}(a.bidirectional||e.dot(t)>0)&&t.len()=0;c--){var v=i[c];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(yh.copy(v.getBoundingRect()),v.transform&&yh.applyTransform(v.transform),yh.intersect(f)&&s.push(v))}if(s.length)for(var h=4,d=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function VE(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return n?PA:!0}return!1}function U_(r,e,t,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=VE(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==PA)){e.target=o;break}}}function kA(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}const zE=RA;var EA=32,Vs=7;function GE(r){for(var e=0;r>=EA;)e|=r&1,r>>=1;return r+e}function Y_(r,e,t,a){var n=e+1;if(n===t)return 1;if(a(r[n++],r[e])<0){for(;n=0;)n++;return n-e}function FE(r,e,t){for(t--;e>>1,n(i,r[l])<0?s=l:o=l+1;var u=a-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]=i}}function mh(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])>0){for(s=a-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);i(r,e[t+f])>0?o=f+1:l=f}return l}function _h(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);i(r,e[t+f])<0?l=f:o=f+1}return l}function HE(r,e){var t=Vs,a,n,i=0,o=[];a=[],n=[];function s(h,d){a[i]=h,n[i]=d,i+=1}function l(){for(;i>1;){var h=i-2;if(h>=1&&n[h-1]<=n[h]+n[h+1]||h>=2&&n[h-2]<=n[h]+n[h-1])n[h-1]n[h+1])break;f(h)}}function u(){for(;i>1;){var h=i-2;h>0&&n[h-1]=Vs||w>=Vs);if(T)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),d===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=t;;){var T=0,C=0,M=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--d===0){M=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){M=!0;break}while((T|C)=0;y--)r[x+y]=r[b+y];if(d===0){M=!0;break}}if(r[S--]=o[_--],--g===1){M=!0;break}if(C=g-mh(r[m],o,0,g,g-1,e),C!==0){for(S-=C,_-=C,g-=C,x=S+1,b=_+1,y=0;y=Vs||C>=Vs);if(M)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=d,m-=d,x=S+1,b=m+1,y=d-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),Z_(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),n-=i,t+=i}while(n!==0);o.forceMergeRuns()}}var sr=1,yl=2,$o=4,X_=!1;function Sh(){X_||(X_=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function q_(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var WE=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=q_}return r.prototype.traverse=function(e,t){for(var a=0;a=0&&this._roots.splice(n,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}();const $E=WE;var OA;OA=Rt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const lg=OA;var tc={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 e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-tc.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?tc.bounceIn(r*2)*.5:tc.bounceOut(r*2-1)*.5+.5}};const BA=tc;var Bu=Math.pow,Tn=Math.sqrt,Sc=1e-8,NA=1e-4,K_=Tn(3),Nu=1/3,ia=eo(),wr=eo(),es=eo();function mn(r){return r>-Sc&&rSc||r<-Sc}function _e(r,e,t,a,n){var i=1-n;return i*i*(i*r+3*n*e)+n*n*(n*a+3*i*t)}function j_(r,e,t,a,n){var i=1-n;return 3*(((e-r)*i+2*(t-e)*n)*i+(a-t)*n*n)}function xc(r,e,t,a,n,i){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-n,f=s*s-3*o*l,c=s*l-9*o*u,v=l*l-3*s*u,h=0;if(mn(f)&&mn(c))if(mn(s))i[0]=0;else{var d=-l/s;d>=0&&d<=1&&(i[h++]=d)}else{var p=c*c-4*f*v;if(mn(p)){var g=c/f,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(i[h++]=d),y>=0&&y<=1&&(i[h++]=y)}else if(p>0){var m=Tn(p),_=f*s+1.5*o*(-c+m),S=f*s+1.5*o*(-c-m);_<0?_=-Bu(-_,Nu):_=Bu(_,Nu),S<0?S=-Bu(-S,Nu):S=Bu(S,Nu);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(i[h++]=d)}else{var b=(2*f*s-3*o*c)/(2*Tn(f*f*f)),x=Math.acos(b)/3,w=Tn(f),T=Math.cos(x),d=(-s-2*w*T)/(3*o),y=(-s+w*(T+K_*Math.sin(x)))/(3*o),C=(-s+w*(T-K_*Math.sin(x)))/(3*o);d>=0&&d<=1&&(i[h++]=d),y>=0&&y<=1&&(i[h++]=y),C>=0&&C<=1&&(i[h++]=C)}}return h}function zA(r,e,t,a,n){var i=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(mn(o)){if(VA(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(mn(f))n[0]=-i/(2*o);else if(f>0){var c=Tn(f),u=(-i+c)/(2*o),v=(-i-c)/(2*o);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function Pn(r,e,t,a,n,i){var o=(e-r)*n+r,s=(t-e)*n+e,l=(a-t)*n+t,u=(s-o)*n+o,f=(l-s)*n+s,c=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=c,i[4]=c,i[5]=f,i[6]=l,i[7]=a}function GA(r,e,t,a,n,i,o,s,l,u,f){var c,v=.005,h=1/0,d,p,g,y;ia[0]=l,ia[1]=u;for(var m=0;m<1;m+=.05)wr[0]=_e(r,t,n,o,m),wr[1]=_e(e,a,i,s,m),g=Oi(ia,wr),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(mn(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var c=Tn(f),u=(-o+c)/(2*i),v=(-o-c)/(2*i);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function FA(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function Wl(r,e,t,a,n){var i=(e-r)*a+r,o=(t-e)*a+e,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=t}function HA(r,e,t,a,n,i,o,s,l){var u,f=.005,c=1/0;ia[0]=o,ia[1]=s;for(var v=0;v<1;v+=.05){wr[0]=Ce(r,t,n,v),wr[1]=Ce(e,a,i,v);var h=Oi(ia,wr);h=0&&h=1?1:xc(0,a,i,1,l,s)&&_e(0,n,o,1,s[0])}}}var qE=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||ae,this.ondestroy=e.ondestroy||ae,this.onrestart=e.onrestart||ae,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var a=this._life,n=e-this._startTime-this._pausedTime,i=n/a;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=n%a;this._startTime=e-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(e){this.easing=e,this.easingFunc=ot(e)?e:BA[e]||_m(e)},r}();const KE=qE;var WA=function(){function r(e){this.value=e}return r}(),jE=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new WA(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,a=e.next;t?t.next=a:this.head=a,a?a.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),JE=function(){function r(e){this._list=new jE,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,n=this._map,i=null;if(n[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new WA(t),s.key=e,a.insertEntry(s),n[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}();const ss=JE;var J_={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 QE(r){return r=Math.round(r),r<0?0:r>360?360:r}function $l(r){return r<0?0:r>1?1:r}function xh(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?zr(parseFloat(e)/100*255):zr(parseInt(e,10))}function Cn(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?$l(parseFloat(e)/100):$l(parseFloat(e))}function bh(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function _n(r,e,t){return r+(e-r)*t}function yr(r,e,t,a,n){return r[0]=e,r[1]=t,r[2]=a,r[3]=n,r}function fg(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var $A=new ss(20),Vu=null;function yo(r,e){Vu&&fg(Vu,e),Vu=$A.put(r,Vu||e.slice())}function er(r,e){if(r){e=e||[];var t=$A.get(r);if(t)return fg(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in J_)return fg(e,J_[a]),yo(r,e),e;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){yr(e,0,0,0,1);return}return yr(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),yo(r,e),e}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){yr(e,0,0,0,1);return}return yr(e,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),yo(r,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?yr(e,+u[0],+u[1],+u[2],1):yr(e,0,0,0,1);f=Cn(u.pop());case"rgb":if(u.length>=3)return yr(e,xh(u[0]),xh(u[1]),xh(u[2]),u.length===3?f:Cn(u[3])),yo(r,e),e;yr(e,0,0,0,1);return;case"hsla":if(u.length!==4){yr(e,0,0,0,1);return}return u[3]=Cn(u[3]),cg(u,e),yo(r,e),e;case"hsl":if(u.length!==3){yr(e,0,0,0,1);return}return cg(u,e),yo(r,e),e;default:return}}yr(e,0,0,0,1)}}function cg(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=Cn(r[1]),n=Cn(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return e=e||[],yr(e,zr(bh(o,i,t+1/3)*255),zr(bh(o,i,t)*255),zr(bh(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function tO(r){if(r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.min(e,t,a),i=Math.max(e,t,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var f=((i-e)/6+o/2)/o,c=((i-t)/6+o/2)/o,v=((i-a)/6+o/2)/o;e===i?l=v-c:t===i?l=1/3+f-v:a===i&&(l=2/3+c-f),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return r[3]!=null&&h.push(r[3]),h}}function vg(r,e){var t=er(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return pa(t,t.length===4?"rgba":"rgb")}}function wh(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=e[n],s=e[i],l=a-n;return t[0]=zr(_n(o[0],s[0],l)),t[1]=zr(_n(o[1],s[1],l)),t[2]=zr(_n(o[2],s[2],l)),t[3]=$l(_n(o[3],s[3],l)),t}}function eO(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=er(e[n]),s=er(e[i]),l=a-n,u=pa([zr(_n(o[0],s[0],l)),zr(_n(o[1],s[1],l)),zr(_n(o[2],s[2],l)),$l(_n(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function An(r,e,t,a){var n=er(r);if(r)return n=tO(n),e!=null&&(n[0]=QE(ot(e)?e(n[0]):e)),t!=null&&(n[1]=Cn(ot(t)?t(n[1]):t)),a!=null&&(n[2]=Cn(ot(a)?a(n[2]):a)),pa(cg(n),"rgba")}function bc(r,e){var t=er(r);if(t&&e!=null)return t[3]=$l(e),pa(t,"rgba")}function pa(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function wc(r,e){var t=er(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var Q_=new ss(100);function hg(r){if(K(r)){var e=Q_.get(r);return e||(e=vg(r,-.1),Q_.put(r,e)),e}else if(Cv(r)){var t=W({},r);return t.colorStops=Y(r.colorStops,function(a){return{offset:a.offset,color:vg(a.color,-.1)}}),t}return r}var Tc=Math.round;function Ul(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=er(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var t1=1e-4;function Sn(r){return r-t1}function zu(r){return Tc(r*1e3)/1e3}function dg(r){return Tc(r*1e4)/1e4}function rO(r){return"matrix("+zu(r[0])+","+zu(r[1])+","+zu(r[2])+","+zu(r[3])+","+dg(r[4])+","+dg(r[5])+")"}var aO={left:"start",right:"end",center:"middle",middle:"middle"};function nO(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function iO(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function oO(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function UA(r){return r&&!!r.image}function sO(r){return r&&!!r.svgElement}function Sm(r){return UA(r)||sO(r)}function YA(r){return r.type==="linear"}function ZA(r){return r.type==="radial"}function XA(r){return r&&(r.type==="linear"||r.type==="radial")}function Iv(r){return"url(#"+r+")"}function qA(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function KA(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*Kf,n=it(r.scaleX,1),i=it(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+Tc(o*Kf)+"deg, "+Tc(s*Kf)+"deg)"),l.join(" ")}var lO=function(){return Rt.hasGlobalWindow&&ot(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),pg=Array.prototype.slice;function Ia(r,e,t){return(e-r)*t+r}function Th(r,e,t,a){for(var n=e.length,i=0;ia?e:r,i=Math.min(t,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)a.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=r1,l=t;if(Ve(t)){var u=vO(t);s=u,(u===1&&!At(t[0])||u===2&&!At(t[0][0]))&&(o=!0)}else if(At(t)&&!Ne(t))s=Fu;else if(K(t))if(!isNaN(+t))s=Fu;else{var f=er(t);f&&(l=f,s=ml)}else if(Cv(t)){var c=W({},l);c.colorStops=Y(t.colorStops,function(h){return{offset:h.offset,color:er(h.color)}}),YA(t)?s=gg:ZA(t)&&(s=yg),l=c}i===0?this.valType=s:(s!==this.valType||s===r1)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:t,percent:0};return a&&(v.easing=a,v.easingFunc=ot(a)?a:BA[a]||_m(a)),n.push(v),v},r.prototype.prepare=function(e,t){var a=this.keyframes;this._needsSort&&a.sort(function(p,g){return p.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=Hu(n),u=a1(n),f=0;f=0&&!(o[f].percent<=t);f--);f=v(f,s-2)}else{for(f=c;ft);f++);f=v(f-1,s-2)}d=o[f+1],h=o[f]}if(h&&d){this._lastFr=f,this._lastFrP=t;var g=d.percent-h.percent,y=g===0?1:v((t-h.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=a?this._additiveValue:u?zs:e[l];if((Hu(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?h.rawValue:d.rawValue;else if(Hu(i))i===rc?Th(m,h[n],d[n],y):uO(m,h[n],d[n],y);else if(a1(i)){var _=h[n],S=d[n],b=i===gg;e[l]={type:b?"linear":"radial",x:Ia(_.x,S.x,y),y:Ia(_.y,S.y,y),colorStops:Y(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:Ia(w.offset,C.offset,y),color:ec(Th([],w.color,C.color,y))}}),global:S.global},b?(e[l].x2=Ia(_.x2,S.x2,y),e[l].y2=Ia(_.y2,S.y2,y)):e[l].r=Ia(_.r,S.r,y)}else if(u)Th(m,h[n],d[n],y),a||(e[l]=ec(m));else{var x=Ia(h[n],d[n],y);a?this._additiveValue=x:e[l]=x}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,n=this._additiveValue;t===Fu?e[a]=e[a]+n:t===ml?(er(e[a],zs),Gu(zs,zs,n,1),e[a]=ec(zs)):t===rc?Gu(e[a],e[a],n,1):t===jA&&e1(e[a],e[a],n,1)},r}(),xm=function(){function r(e,t,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){vm("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}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(e){this._target=e},r.prototype.when=function(e,t,a){return this.whenWithKeys(e,t,Ct(t),a)},r.prototype.whenWithKeys=function(e,t,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,Pl(u),n),this._trackKeys.push(s)}l.addKeyframe(e,Pl(t[s]),n)}return this._maxTime=Math.max(this._maxTime,e),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(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,a=0;a0)){this._started=1;for(var t=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,e[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function qo(){return new Date().getTime()}var dO=function(r){Yt(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(t.animation){var a=t.prev,n=t.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=qo()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(lg(a),!t._paused&&t.update())}lg(a)},e.prototype.start=function(){this._running||(this._time=qo(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=qo(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=qo()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var n=new xm(t,a.loop);return this.addAnimator(n),n},e}(Rr);const pO=dO;var gO=300,Ch=Rt.domSupported,Ah=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=Y(r,function(n){var i=n.replace("mouse","pointer");return t.hasOwnProperty(i)?i:n});return{mouse:r,touch:e,pointer:a}}(),n1={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},i1=!1;function mg(r){var e=r.pointerType;return e==="pen"||e==="touch"}function yO(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 Mh(r){r&&(r.zrByTouch=!0)}function mO(r,e){return _r(r.dom,new _O(r,e),!0)}function JA(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var _O=function(){function r(e,t){this.stopPropagation=ae,this.stopImmediatePropagation=ae,this.preventDefault=ae,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Or={mousedown:function(r){r=_r(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=_r(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=_r(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=_r(this.dom,r);var e=r.toElement||r.relatedTarget;JA(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){i1=!0,r=_r(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){i1||(r=_r(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=_r(this.dom,r),Mh(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Or.mousemove.call(this,r),Or.mousedown.call(this,r)},touchmove:function(r){r=_r(this.dom,r),Mh(r),this.handler.processGesture(r,"change"),Or.mousemove.call(this,r)},touchend:function(r){r=_r(this.dom,r),Mh(r),this.handler.processGesture(r,"end"),Or.mouseup.call(this,r),+new Date-+this.__lastTouchMomentl1||r<-l1}var qn=[],mo=[],Lh=Ae(),Ih=Math.abs,CO=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return Xn(this.rotation)||Xn(this.x)||Xn(this.y)||Xn(this.scaleX-1)||Xn(this.scaleY-1)||Xn(this.skewX)||Xn(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&(s1(a),this.invTransform=null);return}a=a||Ae(),t?this.getLocalTransform(a):s1(a),e&&(t?da(a,e,a):Lv(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(qn);var a=qn[0]<0?-1:1,n=qn[1]<0?-1:1,i=((qn[0]-a)*t+a)/qn[0]||0,o=((qn[1]-n)*t+n)/qn[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||Ae(),Wr(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),i=Math.PI/2+n-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||Ae(),da(mo,e.invTransform,t),t=mo);var a=this.originX,n=this.originY;(a||n)&&(Lh[4]=a,Lh[5]=n,da(mo,t,Lh),mo[4]-=a,mo[5]-=n,t=mo),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var a=[e,t],n=this.invTransform;return n&&ne(a,a,n),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],n=this.transform;return n&&ne(a,a,n),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&Ih(e[0]-1)>1e-10&&Ih(e[3]-1)>1e-10?Math.sqrt(Ih(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){Ac(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,n=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,c=e.y,v=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(a||n||s||l){var d=a+s,p=n+l;t[4]=-d*i-v*p*o,t[5]=-p*o-h*d*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=h*i,t[2]=v*o,u&&zn(t,t,u),t[4]+=a+f,t[5]+=n+c,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Sa=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Ac(r,e){for(var t=0;t=u1)){r=r||Ga;for(var e=[],t=+new Date,a=0;a<=127;a++)e[a]=Hr.measureText(String.fromCharCode(a),r).width;var n=+new Date-t;return n>16?Ph=u1:n>2&&Ph++,e}}var Ph=0,u1=5;function tM(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=AO(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function ya(r,e){var t=r.strWidthCache,a=t.get(e);return a==null&&(a=Hr.measureText(e,r.font).width,t.put(e,a)),a}function f1(r,e,t,a){var n=ya(ga(e),r),i=_u(e),o=ls(0,n,t),s=Bi(0,i,a),l=new dt(o,s,n,i);return l}function Pv(r,e,t,a){var n=((r||"")+"").split(` `),i=n.length;if(i===1)return f1(n[0],e,t,a);for(var o=new dt(0,0,0,0),s=0;s=0?parseFloat(r)/100*e:parseFloat(r):r}function Mc(r,e,t){var a=e.position||"inside",n=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,f="left",c="top";if(a instanceof Array)l+=$r(a[0],t.width),u+=$r(a[1],t.height),f=null,c=null;else switch(a){case"left":l-=n,u+=s,f="right",c="middle";break;case"right":l+=n+o,u+=s,c="middle";break;case"top":l+=o/2,u-=n,f="center",c="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=n,u+=s,c="middle";break;case"insideRight":l+=o-n,u+=s,f="right",c="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",c="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=i-n,c="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",c="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=c,r}var Rh="__zr_normal__",kh=Sa.concat(["ignore"]),MO=ma(Sa,function(r,e){return r[e]=!0,r},{ignore:!1}),_o={},DO=new dt(0,0,0,0),$u=[],bm=function(){function r(e){this.id=CA(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,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(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;i.copyTransform(t);var f=a.position!=null,c=a.autoOverflowArea,v=void 0;if((c||f)&&(v=DO,a.layoutRect?v.copy(a.layoutRect):v.copy(this.getBoundingRect()),n||v.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(_o,a,v):Mc(_o,a,v),i.x=_o.x,i.y=_o.y,o=_o.align,s=_o.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var d=void 0,p=void 0;h==="center"?(d=v.width*.5,p=v.height*.5):(d=$r(h[0],v.width),p=$r(h[1],v.height)),u=!0,i.originX=-i.x+d+(n?0:v.x),i.originY=-i.y+p+(n?0:v.y)}}a.rotation!=null&&(i.rotation=a.rotation);var g=a.offset;g&&(i.x+=g[0],i.y+=g[1],u||(i.originX=-g[0],i.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(c){var m=y.overflowRect=y.overflowRect||new dt(0,0,0,0);i.getLocalTransform($u),Wr($u,$u),dt.copy(m,v),m.applyTransform($u)}else y.overflowRect=null;var _=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,S=void 0,b=void 0,x=void 0;_&&this.canBeInsideText()?(S=a.insideFill,b=a.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(S),x=!0)):(S=a.outsideFill,b=a.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(S),x=!0)),S=S||"#000",(S!==y.fill||b!==y.stroke||x!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=b,y.autoStroke=x,y.align=o,y.verticalAlign=s,t.setDefaultTextStyle(y)),t.__dirty|=sr,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?bg:xg},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&er(t);a||(a=[255,255,255,1]);for(var n=a[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*n+(i?0:255)*(1-n);return a[3]=1,pa(a,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},W(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(vt(e))for(var a=e,n=Ct(a),i=0;i0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(Rh,!1,e)},r.prototype.useState=function(e,t,a,n){var i=e===Rh,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(_t(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){vm("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!a&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,v=this._textGuide;return c&&c.useState(e,t,a,f),v&&v.useState(e,t,a,f),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~sr),u}}},r.prototype.useStates=function(e,t,a){if(!e.length)this.clearStates();else{var n=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(e,t,v),g&&g.useStates(e,t,v),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~sr)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var a=this.currentStates.slice();a.splice(t,1),this.useStates(a)}},r.prototype.replaceState=function(e,t,a){var n=this.currentStates.slice(),i=_t(n,e),o=_t(n,t)>=0;i>=0?o?n.splice(i,1):n[i]=t:a&&!o&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},a,n=0;n=0&&i.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var a=this.animators,n=a.length,i=[],o=0;o0&&t.during&&i[0].during(function(d,p){t.during(p)});for(var v=0;v0||n.force&&!o.length){var T=void 0,C=void 0,M=void 0;if(s){C={},v&&(T={});for(var S=0;S<_;S++){var y=p[S];C[y]=t[y],v?T[y]=a[y]:t[y]=a[y]}}else if(v){M={};for(var S=0;S<_;S++){var y=p[S];M[y]=Pl(t[y]),IO(t,a,y)}}var b=new xm(t,!1,!1,c?Ot(d,function(I){return I.targetName===e}):null);b.targetName=e,n.scope&&(b.scope=n.scope),v&&T&&b.whenWithKeys(0,T,p),M&&b.whenWithKeys(0,M,p),b.whenWithKeys(u??500,s?C:a,p).delay(f||0),r.addAnimator(b,e),o.push(b)}}const rM=bm;var aM=function(r){Yt(e,r);function e(t){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var a=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,a){var n=_t(this._children,t);return n>=0&&this.replaceAt(a,n),this},e.prototype.replaceAt=function(t,a){var n=this._children,i=n[a];if(t&&t!==this&&t.parent!==this&&t!==i){n[a]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var a=this.__zr;a&&a!==t.__zr&&t.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(t){var a=this.__zr,n=this._children,i=_t(n,t);return i<0?this:(n.splice(i,1),t.parent=null,a&&t.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,a=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},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(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.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(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,a){return this._disposed||this.handler.on(e,t,a),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}var q=GO;function GO(r,e,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 Dc(r,e,t)}function Dc(r,e,t){return K(r)?zO(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function oe(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),iM),r=(+r).toFixed(e),t?r:+r}function Dr(r){return r.sort(function(e,t){return e-t}),r}function ua(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return FO(r)}function FO(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,n=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function oM(r,e){var t=Math.log,a=Math.LN10,n=Math.floor(t(r[1]-r[0])/a),i=Math.round(t(la(e[1]-e[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function HO(r,e){var t=ma(r,function(h,d){return h+(isNaN(d)?0:d)},0);if(t===0)return[];for(var a=Math.pow(10,e),n=Y(r,function(h){return(isNaN(h)?0:h)/t*a*100}),i=a*100,o=Y(n,function(h){return Math.floor(h)}),s=ma(o,function(h,d){return h+d},0),l=Y(n,function(h,d){return h-o[d]});su&&(u=l[c],f=c);++o[f],l[f]=0,++s}return Y(o,function(h){return h/a})}function WO(r,e){var t=Math.max(ua(r),ua(e)),a=r+e;return t>iM?a:oe(a,t)}var h1=9007199254740991;function sM(r){var e=Math.PI*2;return(r%e+e)%e}function Yl(r){return r>-v1&&r=10&&e++,e}function lM(r,e){var t=wm(r),a=Math.pow(10,t),n=r/a,i;return e?n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10:n<1?i=1:n<2?i=2:n<3?i=3:n<5?i=5:i=10,r=i*a,t>=-20?+r.toFixed(t<0?-t:0):r}function Bh(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),n=+r[a-1],i=t-a;return i?n+i*(r[a]-n):n}function d1(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a0?e.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r}();function Nh(r){r.option=r.parentModel=r.ecModel=null}var fB=".",Kn="___EC__COMPONENT__CONTAINER___",_M="___EC__EXTENDED_CLASS___";function fa(r){var e={main:"",sub:""};if(r){var t=r.split(fB);e.main=t[0]||"",e.sub=t[1]||""}return e}function cB(r){ze(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function vB(r){return!!(r&&r[_M])}function Am(r,e){r.$constructor=r,r.extend=function(t){var a=this,n;return hB(a)?n=function(i){F(o,i);function o(){return i.apply(this,arguments)||this}return o}(a):(n=function(){(t.$constructor||a).apply(this,arguments)},nE(n,this)),W(n.prototype,t),n[_M]=!0,n.extend=this.extend,n.superCall=gB,n.superApply=yB,n.superClass=a,n}}function hB(r){return ot(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function SM(r,e){r.extend=e.extend}var dB=Math.round(Math.random()*10);function pB(r){var e=["__\0is_clz",dB++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function gB(r,e){for(var t=[],a=2;a=0||i&&_t(i,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var mB=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],_B=Zi(mB),SB=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return _B(this,e,t)},r}(),Cg=new ss(50);function xB(r){if(typeof r=="string"){var e=Cg.get(r);return e&&e.image}else return r}function Mm(r,e,t,a,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=Cg.get(r),o={hostEl:t,cb:a,cbPayload:n};return i?(e=i.image,!kv(e)&&i.pending.push(o)):(e=Hr.loadImage(r,_1,_1),e.__zrImageSrc=r,Cg.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function _1(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var f=ya(o,t);return f>l&&(t="",f=0),l=r-f,n.ellipsis=t,n.ellipsisWidth=f,n.contentWidth=l,n.containerWidth=r,n}function bM(r,e,t){var a=t.containerWidth,n=t.contentWidth,i=t.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=ya(i,e);if(o<=a){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?wB(e,n,i):o>0?Math.floor(e.length*n/o):0;e=e.substr(0,l),o=ya(i,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function wB(r,e,t){for(var a=0,n=0,i=r.length;ng&&h){var _=Math.floor(g/v);d=d||y.length>_,y=y.slice(0,_),m=y.length*v}if(n&&f&&p!=null)for(var S=xM(p,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b={},x=0;xd&&zh(i,o.substring(d,g),e,h),zh(i,p[2],e,h,p[1]),d=Vh.lastIndex}dc){var V=i.lines.length;I>0?(C.tokens=C.tokens.slice(0,I),w(C,D,M),i.lines=i.lines.slice(0,T+1)):i.lines=i.lines.slice(0,T),i.isTruncated=i.isTruncated||i.lines.length0&&d+a.accumWidth>a.width&&(f=e.split(` `),u=!0),a.accumWidth=d}else{var p=wM(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=p.accumWidth+h,c=p.linesWidths,f=p.lines}}f||(f=e.split(` `));for(var g=ga(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var LB=ma(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function IB(r){return DB(r)?!!LB[r]:!0}function wM(r,e,t,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,c=ga(e),v=0;vt:n+f+d>t){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=h,u+=d,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=h,f=d)):p?(i.push(l),o.push(u),l=h,u=d):(i.push(h),o.push(d));continue}f+=d,p?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=n),{accumWidth:f,lines:i,linesWidths:o}}function x1(r,e,t,a,n,i){if(r.baseX=t,r.baseY=a,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;dt.set(b1,ls(t,o,n),Bi(a,s,i),o,s),dt.intersect(e,b1,null,w1);var l=w1.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=ls(l.x,l.width,n,!0),r.baseY=Bi(l.y,l.height,i,!0)}}var b1=new dt(0,0,0,0),w1={outIntersectRect:{},clamp:!0};function Dm(r){return r!=null?r+="":r=""}function PB(r){var e=Dm(r.text),t=r.font,a=ya(ga(t),e),n=_u(t);return Ag(r,a,n,null)}function Ag(r,e,t,a){var n=new dt(ls(r.x||0,e,r.textAlign),Bi(r.y||0,t,r.textBaseline),e,t),i=a??(TM(r)?r.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function TM(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var Mg="__zr_style_"+Math.round(Math.random()*10),Ni={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ev={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Ni[Mg]=!0;var T1=["z","z2","invisible"],RB=["invisible"],kB=function(r){Yt(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=Ct(t),n=0;n1e-4){s[0]=r-t,s[1]=e-a,l[0]=r+t,l[1]=e+a;return}if(Uu[0]=Wh(n)*t+r,Uu[1]=Hh(n)*a+e,Yu[0]=Wh(i)*t+r,Yu[1]=Hh(i)*a+e,u(s,Uu,Yu),f(l,Uu,Yu),n=n%jn,n<0&&(n=n+jn),i=i%jn,i<0&&(i=i+jn),n>i&&!o?i+=jn:nn&&(Zu[0]=Wh(h)*t+r,Zu[1]=Hh(h)*a+e,u(s,Zu,s),f(l,Zu,l))}var Gt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Jn=[],Qn=[],qr=[],tn=[],Kr=[],jr=[],$h=Math.min,Uh=Math.max,ti=Math.cos,ei=Math.sin,Ca=Math.abs,Dg=Math.PI,cn=Dg*2,Yh=typeof Float32Array<"u",Gs=[];function Zh(r){var e=Math.round(r/Dg*1e8)/1e8;return e%2*Dg}function Bv(r,e){var t=Zh(r[0]);t<0&&(t+=cn);var a=t-r[0],n=r[1];n+=a,!e&&n-t>=cn?n=t+cn:e&&t-n>=cn?n=t-cn:!e&&t>n?n=t+(cn-Zh(t-n)):e&&t0&&(this._ux=Ca(a/Cc/e)||0,this._uy=Ca(a/Cc/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},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(e,t){return this._drawPendingPt(),this.addData(Gt.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var a=Ca(e-this._xi),n=Ca(t-this._yi),i=a>this._ux||n>this._uy;if(this.addData(Gt.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){return this._drawPendingPt(),this.addData(Gt.C,e,t,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,a,n,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,a,n){return this._drawPendingPt(),this.addData(Gt.Q,e,t,a,n),this._ctx&&this._ctx.quadraticCurveTo(e,t,a,n),this._xi=a,this._yi=n,this},r.prototype.arc=function(e,t,a,n,i,o){this._drawPendingPt(),Gs[0]=n,Gs[1]=i,Bv(Gs,o),n=Gs[0],i=Gs[1];var s=i-n;return this.addData(Gt.A,e,t,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,a,n,i,o),this._xi=ti(i)*a+e,this._yi=ei(i)*a+t,this},r.prototype.arcTo=function(e,t,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,a,n,i),this},r.prototype.rect=function(e,t,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,a,n),this.addData(Gt.R,e,t,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Gt.Z);var e=this._ctx,t=this._x0,a=this._y0;return e&&e.closePath(),this._xi=t,this._yi=a,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Yh&&(this.data=new Float32Array(t));for(var a=0;a0&&o))for(var s=0;sf.length&&(this._expandData(),f=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){qr[0]=qr[1]=Kr[0]=Kr[1]=Number.MAX_VALUE,tn[0]=tn[1]=jr[0]=jr[1]=-Number.MAX_VALUE;var e=this.data,t=0,a=0,n=0,i=0,o;for(o=0;oa||Ca(_)>n||v===t-1)&&(p=Math.sqrt(m*m+_*_),i=g,o=y);break}case Gt.C:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++],x=e[v++],w=e[v++];p=UE(i,o,S,b,g,y,x,w,10),i=x,o=w;break}case Gt.Q:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++];p=ZE(i,o,S,b,g,y,10),i=g,o=y;break}case Gt.A:var T=e[v++],C=e[v++],M=e[v++],D=e[v++],I=e[v++],L=e[v++],P=L+I;v+=1,d&&(s=ti(I)*M+T,l=ei(I)*D+C),p=Uh(M,D)*$h(cn,Math.abs(L)),i=ti(P)*M+T,o=ei(P)*D+C;break;case Gt.R:{s=i=e[v++],l=o=e[v++];var k=e[v++],R=e[v++];p=k*2+R*2;break}case Gt.Z:{var m=s-i,_=l-o;p=Math.sqrt(m*m+_*_),i=s,o=l;break}}p>=0&&(u[c++]=p,f+=p)}return this._pathLen=f,f},r.prototype.rebuildPath=function(e,t){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,f,c,v,h=t<1,d,p,g=0,y=0,m,_=0,S,b;if(!(h&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=t*p,!m)))t:for(var x=0;x0&&(e.lineTo(S,b),_=0),w){case Gt.M:s=u=a[x++],l=f=a[x++],e.moveTo(u,f);break;case Gt.L:{c=a[x++],v=a[x++];var C=Ca(c-u),M=Ca(v-f);if(C>n||M>i){if(h){var D=d[y++];if(g+D>m){var I=(m-g)/D;e.lineTo(u*(1-I)+c*I,f*(1-I)+v*I);break t}g+=D}e.lineTo(c,v),u=c,f=v,_=0}else{var L=C*C+M*M;L>_&&(S=c,b=v,_=L)}break}case Gt.C:{var P=a[x++],k=a[x++],R=a[x++],B=a[x++],E=a[x++],V=a[x++];if(h){var D=d[y++];if(g+D>m){var I=(m-g)/D;Pn(u,P,R,E,I,Jn),Pn(f,k,B,V,I,Qn),e.bezierCurveTo(Jn[1],Qn[1],Jn[2],Qn[2],Jn[3],Qn[3]);break t}g+=D}e.bezierCurveTo(P,k,R,B,E,V),u=E,f=V;break}case Gt.Q:{var P=a[x++],k=a[x++],R=a[x++],B=a[x++];if(h){var D=d[y++];if(g+D>m){var I=(m-g)/D;Wl(u,P,R,I,Jn),Wl(f,k,B,I,Qn),e.quadraticCurveTo(Jn[1],Qn[1],Jn[2],Qn[2]);break t}g+=D}e.quadraticCurveTo(P,k,R,B),u=R,f=B;break}case Gt.A:var O=a[x++],N=a[x++],z=a[x++],$=a[x++],H=a[x++],Z=a[x++],Q=a[x++],nt=!a[x++],J=z>$?z:$,X=Ca(z-$)>.001,ht=H+Z,rt=!1;if(h){var D=d[y++];g+D>m&&(ht=H+Z*(m-g)/D,rt=!0),g+=D}if(X&&e.ellipse?e.ellipse(O,N,z,$,Q,H,ht,nt):e.arc(O,N,J,H,ht,nt),rt)break t;T&&(s=ti(H)*z+O,l=ei(H)*$+N),u=ti(ht)*z+O,f=ei(ht)*$+N;break;case Gt.R:s=u=a[x],l=f=a[x+1],c=a[x++],v=a[x++];var pt=a[x++],Bt=a[x++];if(h){var D=d[y++];if(g+D>m){var Mt=m-g;e.moveTo(c,v),e.lineTo(c+$h(Mt,pt),v),Mt-=pt,Mt>0&&e.lineTo(c+pt,v+$h(Mt,Bt)),Mt-=Bt,Mt>0&&e.lineTo(c+Uh(pt-Mt,0),v+Bt),Mt-=pt,Mt>0&&e.lineTo(c,v+Uh(Bt-Mt,0));break t}g+=D}e.rect(c,v,pt,Bt);break;case Gt.Z:if(h){var D=d[y++];if(g+D>m){var I=(m-g)/D;e.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=D}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.prototype.canSave=function(){return!!this._saveData},r.CMD=Gt,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function hn(r,e,t,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>e+s&&o>a+s||or+s&&i>t+s||ie+c&&f>a+c&&f>i+c&&f>s+c||fr+c&&u>t+c&&u>n+c&&u>o+c||ue+u&&l>a+u&&l>i+u||lr+u&&s>t+u&&s>n+u||st||f+un&&(n+=Fs);var v=Math.atan2(l,s);return v<0&&(v+=Fs),v>=a&&v<=n||v+Fs>=a&&v+Fs<=n}function Pa(r,e,t,a,n,i){if(i>e&&i>a||in?s:0}var en=xa.CMD,ri=Math.PI*2,GB=1e-4;function FB(r,e){return Math.abs(r-e)e&&u>a&&u>i&&u>s||u1&&HB(),h=_e(e,a,i,s,xr[0]),v>1&&(d=_e(e,a,i,s,xr[1]))),v===2?ge&&s>a&&s>i||s=0&&u<=1){for(var f=0,c=Ce(e,a,i,u),v=0;vt||s<-t)return 0;var l=Math.sqrt(t*t-s*s);$e[0]=-l,$e[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=ri-1e-4){a=0,n=ri;var f=i?1:-1;return o>=$e[0]+r&&o<=$e[1]+r?f:0}if(a>n){var c=a;a=n,n=c}a<0&&(a+=ri,n+=ri);for(var v=0,h=0;h<2;h++){var d=$e[h];if(d+r>o){var p=Math.atan2(s,d),f=i?1:-1;p<0&&(p=ri+p),(p>=a&&p<=n||p+ri>=a&&p+ri<=n)&&(p>Math.PI/2&&p1&&(t||(s+=Pa(l,u,f,c,a,n))),g&&(l=i[d],u=i[d+1],f=l,c=u),p){case en.M:f=i[d++],c=i[d++],l=f,u=c;break;case en.L:if(t){if(hn(l,u,i[d],i[d+1],e,a,n))return!0}else s+=Pa(l,u,i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case en.C:if(t){if(VB(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],e,a,n))return!0}else s+=WB(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case en.Q:if(t){if(CM(l,u,i[d++],i[d++],i[d],i[d+1],e,a,n))return!0}else s+=$B(l,u,i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case en.A:var y=i[d++],m=i[d++],_=i[d++],S=i[d++],b=i[d++],x=i[d++];d+=1;var w=!!(1-i[d++]);v=Math.cos(b)*_+y,h=Math.sin(b)*S+m,g?(f=v,c=h):s+=Pa(l,u,v,h,a,n);var T=(a-y)*S/_+y;if(t){if(zB(y,m,S,b,b+x,w,e,T,n))return!0}else s+=UB(y,m,S,b,b+x,w,T,n);l=Math.cos(b+x)*_+y,u=Math.sin(b+x)*S+m;break;case en.R:f=l=i[d++],c=u=i[d++];var C=i[d++],M=i[d++];if(v=f+C,h=c+M,t){if(hn(f,c,v,c,e,a,n)||hn(v,c,v,h,e,a,n)||hn(v,h,f,h,e,a,n)||hn(f,h,f,c,e,a,n))return!0}else s+=Pa(v,c,v,h,a,n),s+=Pa(f,h,f,c,a,n);break;case en.Z:if(t){if(hn(l,u,f,c,e,a,n))return!0}else s+=Pa(l,u,f,c,a,n);l=f,u=c;break}}return!t&&!FB(u,c)&&(s+=Pa(l,u,f,c,a,n)||0),s!==0}function YB(r,e,t){return AM(r,0,!1,e,t)}function ZB(r,e,t,a){return AM(r,e,!0,t,a)}var Lc=ct({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Ni),XB={style:ct({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},Ev.style)},Xh=Sa.concat(["invisible","culling","z","z2","zlevel","parent"]),qB=function(r){Yt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){t.buildPath(l,t.shape)}),n.silent=!0;var i=n.style;for(var o in a)i[o]!==a[o]&&(i[o]=a[o]);i.fill=a.fill?a.decal:null,i.decal=null,i.shadowColor=null,a.strokeFirst&&(i.stroke=null);for(var s=0;s.5?xg:a>.2?TO:bg}else if(t)return bg}return xg},e.prototype.getInsideTextStroke=function(t){var a=this.style.fill;if(K(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=wc(t,0)0))},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,a=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&$o)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){s.copy(t);var l=a.strokeNoScale?this.getLineScale():1,u=a.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 t},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect(),o=this.style;if(t=n[0],a=n[1],i.contain(t,a)){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)),ZB(s,l/u,t,a)))return!0}if(this.hasFill())return YB(s,t,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=$o,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,a){t==="shape"?this.setShape(a):r.prototype.attrKV.call(this,t,a)},e.prototype.setShape=function(t,a){var n=this.shape;return n||(n=this.shape={}),typeof t=="string"?n[t]=a:W(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&$o)},e.prototype.createStyle=function(t){return Mv(Lc,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.shape&&!a.shape&&(a.shape=W({},this.shape))},e.prototype._applyStateObj=function(t,a,n,i,o,s){r.prototype._applyStateObj.call(this,t,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.shape?o?i?u=a.shape:(u=W({},n.shape),W(u,a.shape)):(u=W({},i?this.shape:n.shape),W(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=W({},this.shape);for(var f={},c=Ct(u),v=0;vn&&(c=s+l,s*=n/c,l*=n/c),u+f>n&&(c=u+f,u*=n/c,f*=n/c),l+u>i&&(c=l+u,l*=i/c,u*=i/c),s+f>i&&(c=s+f,s*=i/c,f*=i/c),r.moveTo(t+s,a),r.lineTo(t+n-l,a),l!==0&&r.arc(t+n-l,a+l,l,-Math.PI/2,0),r.lineTo(t+n,a+i-u),u!==0&&r.arc(t+n-u,a+i-u,u,0,Math.PI/2),r.lineTo(t+f,a+i),f!==0&&r.arc(t+f,a+i-f,f,Math.PI/2,Math.PI),r.lineTo(t,a+s),s!==0&&r.arc(t+s,a+s,s,Math.PI,Math.PI*1.5)}var Ko=Math.round;function Nv(r,e,t){if(e){var a=e.x1,n=e.x2,i=e.y1,o=e.y2;r.x1=a,r.x2=n,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(Ko(a*2)===Ko(n*2)&&(r.x1=r.x2=ur(a,s,!0)),Ko(i*2)===Ko(o*2)&&(r.y1=r.y2=ur(i,s,!0))),r}}function LM(r,e,t){if(e){var a=e.x,n=e.y,i=e.width,o=e.height;r.x=a,r.y=n,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=ur(a,s,!0),r.y=ur(n,s,!0),r.width=Math.max(ur(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(ur(n+o,s,!1)-r.y,o===0?0:1)),r}}function ur(r,e,t){if(!e)return r;var a=Ko(r*2);return(a+Ko(e))%2===0?a/2:(a+(t?1:-1))/2}var eN=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),rN={},IM=function(r){Yt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new eN},e.prototype.buildPath=function(t,a){var n,i,o,s;if(this.subPixelOptimize){var l=LM(rN,a,this.style);n=l.x,i=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else n=a.x,i=a.y,o=a.width,s=a.height;a.r?tN(t,a):t.rect(n,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(Tt);IM.prototype.type="rect";const bt=IM;var L1={fill:"#000"},I1=2,Jr={},aN={style:ct({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},Ev.style)},PM=function(r){Yt(e,r);function e(t){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=L1,a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,I=0;I=0&&(P=x[L],P.align==="right");)this._placeToken(P,t,T,y,I,"right",_),C-=P.width,I-=P.width,L--;for(D+=(f-(D-g)-(m-I)-C)/2;M<=L;)P=x[M],this._placeToken(P,t,T,y,D+P.width/2,"center",_),D+=P.width,M++;y+=T}},e.prototype._placeToken=function(t,a,n,i,o,s,l){var u=a.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,c=i+n/2;f==="top"?c=i+t.height/2:f==="bottom"&&(c=i+n-t.height/2);var v=!t.isLineHolder&&qh(u);v&&this._renderBackground(u,a,s==="right"?o-t.width:s==="center"?o-t.width/2:o,c-t.height/2,t.width,t.height);var h=!!u.backgroundColor,d=t.textPadding;d&&(o=B1(o,s,d),c-=t.height/2-d[0]-t.innerHeight/2);var p=this._getOrCreateChild(Xl),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=!1,b=O1("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),x=E1("stroke"in u?u.stroke:"stroke"in a?a.stroke:!h&&!l&&(!y.autoStroke||m)?(_=I1,S=!0,y.stroke):null),w=u.textShadowBlur>0||a.textShadowBlur>0;g.text=t.text,g.x=o,g.y=c,w&&(g.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,g.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||Ga,g.opacity=fr(u.opacity,a.opacity,1),R1(g,u),x&&(g.lineWidth=fr(u.lineWidth,a.lineWidth,_),g.lineDash=it(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=x),b&&(g.fill=b),p.setBoundingRect(Ag(g,t.contentWidth,t.contentHeight,S?0:null))},e.prototype._renderBackground=function(t,a,n,i,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,c=l&&l.image,v=l&&!c,h=t.borderRadius,d=this,p,g;if(v||t.lineHeight||u&&f){p=this._getOrCreateChild(bt),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=n,y.y=i,y.width=o,y.height=s,y.r=h,p.dirtyShape()}if(v){var m=p.style;m.fill=l||null,m.fillOpacity=it(t.fillOpacity,1)}else if(c){g=this._getOrCreateChild(ke),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=i,_.width=o,_.height=s}if(u&&f){var m=p.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=it(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(p||g).style;S.shadowBlur=t.shadowBlur||0,S.shadowColor=t.shadowColor||"transparent",S.shadowOffsetX=t.shadowOffsetX||0,S.shadowOffsetY=t.shadowOffsetY||0,S.opacity=fr(t.opacity,a.opacity,1)},e.makeFont=function(t){var a="";return kM(t)&&(a=[t.fontStyle,t.fontWeight,RM(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),a&&Mr(a)||t.textFont||t.font},e}(Ir),nN={left:!0,right:1,center:1},iN={top:1,bottom:1,middle:1},P1=["fontStyle","fontWeight","fontSize","fontFamily"];function RM(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?um+"px":r+"px"}function R1(r,e){for(var t=0;t=0,i=!1;if(r instanceof Tt){var o=EM(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(So(s)||So(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=W({},a),u=W({},u),u.fill=s):!So(u.fill)&&So(s)?(i=!0,a=W({},a),u=W({},u),u.fill=hg(s)):!So(u.stroke)&&So(l)&&(i||(a=W({},a),u=W({},u)),u.stroke=hg(l)),a.style=u}}if(a&&a.z2==null){i||(a=W({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f??Ts)}return a}function vN(r,e,t){if(t&&t.z2==null){t=W({},t);var a=r.z2SelectLift;t.z2=r.z2+(a??sN)}return t}function hN(r,e,t){var a=_t(r.currentStates,e)>=0,n=r.style.opacity,i=a?null:fN(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=W({},t),o=W({opacity:a?n:i.opacity*.1},o),t.style=o),t}function Kh(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return cN(this,r,e,t);if(r==="blur")return hN(this,r,t);if(r==="select")return vN(this,r,t)}return t}function Xi(r){r.stateProxy=Kh;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Kh),t&&(t.stateProxy=Kh)}function F1(r,e){!FM(r,e)&&!r.__highByOuter&&qa(r,OM)}function H1(r,e){!FM(r,e)&&!r.__highByOuter&&qa(r,BM)}function Wa(r,e){r.__highByOuter|=1<<(e||0),qa(r,OM)}function $a(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&qa(r,BM)}function VM(r){qa(r,Rm)}function km(r){qa(r,NM)}function zM(r){qa(r,lN)}function GM(r){qa(r,uN)}function FM(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function HM(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(n,i){var o=Lm(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){NM(u)}),s&&t.push(i)),o.isBlured=!1}),A(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function Pg(r,e,t,a){var n=a.getModel();t=t||"coordinateSystem";function i(u,f){for(var c=0;c0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function zi(r,e,t){Li(r,!0),qa(r,Xi),kg(r,e,t)}function _N(r){Li(r,!1)}function Zt(r,e,t,a){a?_N(r):zi(r,e,t)}function kg(r,e,t){var a=gt(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var $1=["emphasis","blur","select"],SN={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function pe(r,e,t,a){t=t||"itemStyle";for(var n=0;n<$1.length;n++){var i=$1[n],o=e.getModel([i,t]),s=r.ensureState(i);s.style=a?a(o):o[SN[t]]()}}function Li(r,e){var t=e===!1,a=r;r.highDownSilentOnTouch&&(a.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||a.__highDownDispatcher)&&(a.__highByOuter=a.__highByOuter||0,a.__highDownDispatcher=!t)}function Kl(r){return!!(r&&r.__highDownDispatcher)}function xN(r,e,t){var a=gt(r);a.componentMainType=e.mainType,a.componentIndex=e.componentIndex,a.componentHighDownName=t}function bN(r){var e=z1[r];return e==null&&V1<=32&&(e=z1[r]=V1++),e}function Eg(r){var e=r.type;return e===Ic||e===Ig||e===Pc}function U1(r){var e=r.type;return e===Vi||e===ic}function wN(r){var e=EM(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var xo=xa.CMD,TN=[[],[],[]],Y1=Math.sqrt,CN=Math.atan2;function WM(r,e){if(e){var t=r.data,a=r.len(),n,i,o,s,l,u,f=xo.M,c=xo.C,v=xo.L,h=xo.R,d=xo.A,p=xo.Q;for(o=0,s=0;o1&&(o*=jh(d),s*=jh(d));var p=(n===i?-1:1)*jh((o*o*(s*s)-o*o*(h*h)-s*s*(v*v))/(o*o*(h*h)+s*s*(v*v)))||0,g=p*o*h/s,y=p*-s*v/o,m=(r+t)/2+qu(c)*g-Xu(c)*y,_=(e+a)/2+Xu(c)*g+qu(c)*y,S=X1([1,0],[(v-g)/o,(h-y)/s]),b=[(v-g)/o,(h-y)/s],x=[(-1*v-g)/o,(-1*h-y)/s],w=X1(b,x);if(Og(b,x)<=-1&&(w=Hs),Og(b,x)>=1&&(w=0),w<0){var T=Math.round(w/Hs*1e6)/1e6;w=Hs*2+T%2*Hs}f.addData(u,m,_,o,s,S,w,c,i)}var AN=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,MN=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function DN(r){var e=new xa;if(!r)return e;var t=0,a=0,n=t,i=a,o,s=xa.CMD,l=r.match(AN);if(!l)return e;for(var u=0;uP*P+k*k&&(T=M,C=D),{cx:T,cy:C,x0:-f,y0:-c,x1:T*(n/b-1),y1:C*(n/b-1)}}function ON(r){var e;if(U(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function BN(r,e){var t,a=_l(e.r,0),n=_l(e.r0||0,0),i=a>0,o=n>0;if(!(!i&&!o)){if(i||(a=n,n=0),n>a){var s=a;a=n,n=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,c=e.cy,v=!!e.clockwise,h=K1(u-l),d=h>Jh&&h%Jh;if(d>Er&&(h=d),!(a>Er))r.moveTo(f,c);else if(h>Jh-Er)r.moveTo(f+a*bo(l),c+a*ai(l)),r.arc(f,c,a,l,u,!v),n>Er&&(r.moveTo(f+n*bo(u),c+n*ai(u)),r.arc(f,c,n,u,l,v));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0,w=void 0,T=void 0,C=void 0,M=void 0,D=void 0,I=void 0,L=void 0,P=void 0,k=a*bo(l),R=a*ai(l),B=n*bo(u),E=n*ai(u),V=h>Er;if(V){var O=e.cornerRadius;O&&(t=ON(O),p=t[0],g=t[1],y=t[2],m=t[3]);var N=K1(a-n)/2;if(_=Qr(N,y),S=Qr(N,m),b=Qr(N,p),x=Qr(N,g),C=w=_l(_,S),M=T=_l(b,x),(w>Er||T>Er)&&(D=a*bo(u),I=a*ai(u),L=n*bo(l),P=n*ai(l),hEr){var X=Qr(y,C),ht=Qr(m,C),rt=Ku(L,P,k,R,a,X,v),pt=Ku(D,I,B,E,a,ht,v);r.moveTo(f+rt.cx+rt.x0,c+rt.cy+rt.y0),C0&&r.arc(f+rt.cx,c+rt.cy,X,Ee(rt.y0,rt.x0),Ee(rt.y1,rt.x1),!v),r.arc(f,c,a,Ee(rt.cy+rt.y1,rt.cx+rt.x1),Ee(pt.cy+pt.y1,pt.cx+pt.x1),!v),ht>0&&r.arc(f+pt.cx,c+pt.cy,ht,Ee(pt.y1,pt.x1),Ee(pt.y0,pt.x0),!v))}else r.moveTo(f+k,c+R),r.arc(f,c,a,l,u,!v);if(!(n>Er)||!V)r.lineTo(f+B,c+E);else if(M>Er){var X=Qr(p,M),ht=Qr(g,M),rt=Ku(B,E,D,I,n,-ht,v),pt=Ku(k,R,L,P,n,-X,v);r.lineTo(f+rt.cx+rt.x0,c+rt.cy+rt.y0),M0&&r.arc(f+rt.cx,c+rt.cy,ht,Ee(rt.y0,rt.x0),Ee(rt.y1,rt.x1),!v),r.arc(f,c,n,Ee(rt.cy+rt.y1,rt.cx+rt.x1),Ee(pt.cy+pt.y1,pt.cx+pt.x1),v),X>0&&r.arc(f+pt.cx,c+pt.cy,X,Ee(pt.y1,pt.x1),Ee(pt.y0,pt.x0),!v))}else r.lineTo(f+B,c+E),r.arc(f,c,n,u,l,v)}r.closePath()}}}var NN=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}(),jM=function(r){Yt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new NN},e.prototype.buildPath=function(t,a){BN(t,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(Tt);jM.prototype.type="sector";const Xe=jM;var VN=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),JM=function(r){Yt(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new VN},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.PI*2;t.moveTo(n+a.r,i),t.arc(n,i,a.r,0,o,!1),t.moveTo(n+a.r0,i),t.arc(n,i,a.r0,0,o,!0)},e}(Tt);JM.prototype.type="ring";const Gv=JM;function zN(r,e,t,a){var n=[],i=[],o=[],s=[],l,u,f,c;if(a){f=[1/0,1/0],c=[-1/0,-1/0];for(var v=0,h=r.length;v=2){if(a){var i=zN(n,a,t,e.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,c=n.length;sii[1]){if(i=!1,Te.negativeSize||a)return i;var l=ju(ii[0]-ni[1]),u=ju(ni[0]-ii[1]);Qh(l,u)>Qu.len()&&(l=u||!Te.bidirectional)&&(ft.scale(Ju,s,-u*n),Te.useDir&&Te.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(e,t,a){for(var n=this._axes[e],i=this._origin,o=t[0].dot(n)+i[e],s=o,l=o,u=1;u0){var c=f.duration,v=f.delay,h=f.easing,d={duration:c,delay:v||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,d):e.animateTo(t,d)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function It(r,e,t,a,n,i){Vm("update",r,e,t,a,n,i)}function Ut(r,e,t,a,n,i){Vm("enter",r,e,t,a,n,i)}function as(r){if(!r.__zr)return!0;for(var e=0;ela(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function Q1(r){return!r.isGroup}function oV(r){return r.shape!=null}function xu(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){Q1(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return oV(o)&&(s.shape=st(o.shape)),s}var i=a(r);e.traverse(function(o){if(Q1(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),It(o,l,t,gt(o).dataIndex)}}})}function vD(r,e){return Y(r,function(t){var a=t[0];a=re(a,e.x),a=cr(a,e.x+e.width);var n=t[1];return n=re(n,e.y),n=cr(n,e.y+e.height),[a,n]})}function sV(r,e){var t=re(r.x,e.x),a=cr(r.x+r.width,e.x+e.width),n=re(r.y,e.y),i=cr(r.y+r.height,e.y+e.height);if(a>=t&&i>=n)return{x:t,y:n,width:a-t,height:i-n}}function bu(r,e,t){var a=W({rectHover:!0},e),n=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),ct(n,t),new ke(a)):jl(r.replace("path://",""),a,t,"center")}function Sl(r,e,t,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=td(h,d,f,c)/v;return!(g<0||g>1)}function td(r,e,t,a){return r*a-t*e}function lV(r){return r<=1e-6&&r>=-1e-6}function qi(r,e,t,a,n){return e==null||(At(e)?Kt[0]=Kt[1]=Kt[2]=Kt[3]=e:(Kt[0]=e[0],Kt[1]=e[1],Kt[2]=e[2],Kt[3]=e[3]),a&&(Kt[0]=re(0,Kt[0]),Kt[1]=re(0,Kt[1]),Kt[2]=re(0,Kt[2]),Kt[3]=re(0,Kt[3])),t&&(Kt[0]=-Kt[0],Kt[1]=-Kt[1],Kt[2]=-Kt[2],Kt[3]=-Kt[3]),tS(r,Kt,"x","width",3,1,n&&n[0]||0),tS(r,Kt,"y","height",0,2,n&&n[1]||0)),r}var Kt=[0,0,0,0];function tS(r,e,t,a,n,i,o){var s=e[i]+e[n],l=r[a];r[a]+=s,o=re(0,cr(o,l)),r[a]=0?-e[n]:e[i]>=0?l+e[i]:la(s)>1e-8?(l-o)*e[n]/s:0):r[t]-=e[n]}function Ka(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,n=K(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&A(Ct(l),function(f){tt(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=gt(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:ct({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function Ng(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function Fn(r,e){if(r)if(U(r))for(var t=0;te&&(e=o),oe&&(t=e=0),{min:t,max:e}}function $v(r,e,t){pD(r,e,t,-1/0)}function pD(r,e,t,a){if(r.ignoreModelZ)return a;var n=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function Hn(r,e){return St(St({},r,!0),e,!0)}const xV={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:". "}}}},bV={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 Oc="ZH",Hm="EN",ns=Hm,sc={},Wm={},xD=Rt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ns).toUpperCase();return r.indexOf(Oc)>-1?Oc:ns}():ns;function bD(r,e){r=r.toUpperCase(),Wm[r]=new Pt(e),sc[r]=e}function wV(r){if(K(r)){var e=sc[r.toUpperCase()]||{};return r===Oc||r===Hm?st(e):St(st(e),st(sc[ns]),!1)}else return St(st(r),st(sc[ns]),!1)}function zg(r){return Wm[r]}function TV(){return Wm[ns]}bD(Hm,xV);bD(Oc,bV);var Gg=null;function CV(r){Gg||(Gg=r)}function se(){return Gg}var $m=1e3,Um=$m*60,El=Um*60,Ar=El*24,iS=Ar*365,AV={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},lc={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},MV="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",ef="{yyyy}-{MM}-{dd}",oS={year:"{yyyy}",month:"{yyyy}-{MM}",day:ef,hour:ef+" "+lc.hour,minute:ef+" "+lc.minute,second:ef+" "+lc.second,millisecond:MV},ir=["year","month","day","hour","minute","second","millisecond"],DV=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function LV(r){return!K(r)&&!ot(r)?IV(r):r}function IV(r){r=r||{};var e={},t=!0;return A(ir,function(a){t&&(t=r[a]==null)}),A(ir,function(a,n){var i=r[a];e[a]={};for(var o=null,s=n;s>=0;s--){var l=ir[s],u=vt(i)&&!U(i)?i[l]:i,f=void 0;U(u)?(f=u.slice(),o=f[0]||""):K(u)?(o=u,f=[o]):(o==null?o=lc[a]:AV[l].test(o)||(o=e[l][l][0]+" "+o),f=[o],t&&(f[1]="{primary|"+o+"}")),e[a][l]=f}}),e}function rn(r,e){return r+="","0000".substr(0,e-r.length)+r}function Ol(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 PV(r){return r===Ol(r)}function RV(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Yv(r,e,t,a){var n=ro(r),i=n[wD(t)](),o=n[Ym(t)]()+1,s=Math.floor((o-1)/3)+1,l=n[Zm(t)](),u=n["get"+(t?"UTC":"")+"Day"](),f=n[Xm(t)](),c=(f-1)%12+1,v=n[qm(t)](),h=n[Km(t)](),d=n[jm(t)](),p=f>=12?"pm":"am",g=p.toUpperCase(),y=a instanceof Pt?a:zg(a||xD)||TV(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),b=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,rn(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,rn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,rn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,rn(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,rn(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,rn(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,rn(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,rn(d,3)).replace(/{S}/g,d+"")}function kV(r,e,t,a,n){var i=null;if(K(t))i=t;else if(ot(t)){var o={time:r.time,level:r.time.level},s=se();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var f=Jo(r.value,n);i=t[f][f][0]}}return Yv(new Date(r.value),i,n,a)}function Jo(r,e){var t=ro(r),a=t[Ym(e)]()+1,n=t[Zm(e)](),i=t[Xm(e)](),o=t[qm(e)](),s=t[Km(e)](),l=t[jm(e)](),u=l===0,f=u&&s===0,c=f&&o===0,v=c&&i===0,h=v&&n===1,d=h&&a===1;return d?"year":h?"month":v?"day":c?"hour":f?"minute":u?"second":"millisecond"}function Fg(r,e,t){switch(e){case"year":r[TD(t)](0);case"month":r[CD(t)](1);case"day":r[AD(t)](0);case"hour":r[MD(t)](0);case"minute":r[DD(t)](0);case"second":r[LD(t)](0)}return r}function wD(r){return r?"getUTCFullYear":"getFullYear"}function Ym(r){return r?"getUTCMonth":"getMonth"}function Zm(r){return r?"getUTCDate":"getDate"}function Xm(r){return r?"getUTCHours":"getHours"}function qm(r){return r?"getUTCMinutes":"getMinutes"}function Km(r){return r?"getUTCSeconds":"getSeconds"}function jm(r){return r?"getUTCMilliseconds":"getMilliseconds"}function EV(r){return r?"setUTCFullYear":"setFullYear"}function TD(r){return r?"setUTCMonth":"setMonth"}function CD(r){return r?"setUTCDate":"setDate"}function AD(r){return r?"setUTCHours":"setHours"}function MD(r){return r?"setUTCMinutes":"setMinutes"}function DD(r){return r?"setUTCSeconds":"setSeconds"}function LD(r){return r?"setUTCMilliseconds":"setMilliseconds"}function ID(r){if(!uM(r))return K(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function PD(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var wu=Av;function Hg(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&Mr(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?ro(r):r;if(isNaN(+l)){if(s)return"-"}else return Yv(l,a,t)}if(e==="ordinal")return jp(r)?n(r):At(r)&&i(r)?r+"":"-";var u=Ha(r);return i(u)?ID(u):jp(r)?n(r):typeof r=="boolean"?r+"":"-"}var sS=["a","b","c","d","e","f","g"],ad=function(r,e){return"{"+r+(e??"")+"}"};function RD(r,e,t){U(e)||(e=[e]);var a=e.length;if(!a)return"";for(var n=e[0].$vars||[],i=0;i':'';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function ji(r,e){return e=e||"transparent",K(r)?r:vt(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function Bc(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var uc={},nd={},Tu=function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=a(uc),this._normalMasterList=a(nd);function a(n,i){var o=[];return A(n,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){A(this._normalMasterList,function(a){a.update&&a.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){uc[e]=t;return}nd[e]=t},r.get=function(e){return nd[e]||uc[e]},r}();function NV(r){return!!uc[r]}var Wg={coord:1,coord2:2};function VV(r){kD.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var kD=at();function zV(r){var e=r.getShallow("coord",!0),t=Wg.coord;if(e==null){var a=kD.get(r.type);a&&a.getCoord2&&(t=Wg.coord2,e=a.getCoord2(r))}return{coord:e,from:t}}var oa={none:0,dataCoordSys:1,boxCoordSys:2};function ED(r,e){var t=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),n=oa.none;if(t){var i=r.mainType==="series";a==null&&(a=i?"data":"box"),a==="data"?(n=oa.dataCoordSys,i||(n=oa.none)):a==="box"&&(n=oa.boxCoordSys,!i&&!NV(t)&&(n=oa.none))}return{coordSysType:t,kind:n}}function Cu(r){var e=r.targetModel,t=r.coordSysType,a=r.coordSysProvider,n=r.isDefaultDataCoordSys;r.allowNotFound;var i=ED(e),o=i.kind,s=i.coordSysType;if(n&&o!==oa.dataCoordSys&&(o=oa.dataCoordSys,s=t),o===oa.none||s!==t)return!1;var l=a(t,e);return l?(o===oa.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var OD=function(r,e){var t=e.getReferringComponents(r,Jt).models[0];return t&&t.coordinateSystem},fc=A,BD=["left","right","top","bottom","width","height"],Ii=[["width","left","right"],["height","top","bottom"]];function Jm(r,e,t,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),c=e.childAt(u+1),v=c&&c.getBoundingRect(),h,d;if(r==="horizontal"){var p=f.width+(v?-v.x+f.x:0);h=i+p,h>a||l.newline?(i=0,h=p,o+=s+t,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(v?-v.y+f.y:0);d=o+g,d>n||l.newline?(i+=s+t,o=0,d=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=h+t:o=d+t)})}var Fi=Jm;mt(Jm,"vertical");mt(Jm,"horizontal");function ND(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function GV(r,e){var t=ye(r,e,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),n,i;if(t.type===xl.point)i=t.refPoint,n=Xt(a,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=U(o)?o:[o,o];n=Xt(a,t.refContainer),i=t.boxCoordFrom===Wg.coord2?t.refPoint:[q(s[0],n.width)+n.x,q(s[1],n.height)+n.y]}return{viewRect:n,center:i}}function VD(r,e){var t=GV(r,e),a=t.viewRect,n=t.center,i=r.get("radius");U(i)||(i=[0,i]);var o=q(a.width,e.getWidth()),s=q(a.height,e.getHeight()),l=Math.min(o,s),u=q(i[0],l/2),f=q(i[1],l/2);return{cx:n[0],cy:n[1],r0:u,r:f,viewRect:a}}function Xt(r,e,t){t=wu(t||0);var a=e.width,n=e.height,i=q(r.left,a),o=q(r.top,n),s=q(r.right,a),l=q(r.bottom,n),u=q(r.width,a),f=q(r.height,n),c=t[2]+t[0],v=t[1]+t[3],h=r.aspect;switch(isNaN(u)&&(u=a-s-v-i),isNaN(f)&&(f=n-l-c-o),h!=null&&(isNaN(u)&&isNaN(f)&&(h>a/n?u=a*.8:f=n*.8),isNaN(u)&&(u=h*f),isNaN(f)&&(f=u/h)),isNaN(i)&&(i=a-s-u-v),isNaN(o)&&(o=n-l-f-c),r.left||r.right){case"center":i=a/2-u/2-t[3];break;case"right":i=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-t[0];break;case"bottom":o=n-f-c;break}i=i||0,o=o||0,isNaN(u)&&(u=a-v-i-(s||0)),isNaN(f)&&(f=n-c-o-(l||0));var d=new dt((e.x||0)+i+t[3],(e.y||0)+o+t[0],u,f);return d.margin=t,d}function zD(r,e,t){var a=r.getShallow("preserveAspect",!0);if(!a)return e;var n=e.width/e.height;if(Math.abs(Math.atan(t)-Math.atan(n))<1e-9)return e;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=a==="cover";return n>t&&!l||n=p)return c;for(var g=0;g=0;l--)s=St(s,n[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var n=t+"Index",i=t+"Id";return ws(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},a)},e.prototype.getBoxLayoutParams=function(){return ND(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Pt);SM(Ls,Pt);Rv(Ls);_V(Ls);SV(Ls,WV);function WV(r){var e=[];return A(Ls.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=Y(e,function(t){return fa(t).main}),r!=="dataset"&&_t(e,"dataset")<=0&&e.unshift("dataset"),e}const Dt=Ls;var Pi={color:{},darkColor:{},size:{}},te=Pi.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};W(te,{primary:te.neutral80,secondary:te.neutral70,tertiary:te.neutral60,quaternary:te.neutral50,disabled:te.neutral20,border:te.neutral30,borderTint:te.neutral20,borderShade:te.neutral40,background:te.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:te.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:te.neutral70,axisLineTint:te.neutral40,axisTick:te.neutral70,axisTickMinor:te.neutral60,axisLabel:te.neutral70,axisSplitLine:te.neutral15,axisMinorSplitLine:te.neutral05});for(var oi in te)if(te.hasOwnProperty(oi)){var lS=te[oi];oi==="theme"?Pi.darkColor.theme=te.theme.slice():oi==="highlight"?Pi.darkColor.highlight="rgba(255,231,130,0.4)":oi.indexOf("accent")===0?Pi.darkColor[oi]=An(lS,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):Pi.darkColor[oi]=An(lS,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}Pi.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};const G=Pi;var FD="";typeof navigator<"u"&&(FD=navigator.platform||"");var wo="rgba(0, 0, 0, 0.2)",HD=G.color.theme[0],$V=An(HD,null,null,.9);const UV={darkMode:"auto",colorBy:"series",color:G.color.theme,gradientColor:[$V,HD],aria:{decal:{decals:[{color:wo,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:wo,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:wo,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:wo,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:wo,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:wo,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:FD.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 WD=at(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),vr="original",Me="arrayRows",hr="objectRows",Zr="keyedColumns",Dn="typedArray",$D="unknown",Fr="column",oo="row",Le={Must:1,Might:2,Not:3},UD=wt();function YV(r){UD(r).datasetMap=at()}function YD(r,e,t){var a={},n=t0(e);if(!n||!r)return a;var i=[],o=[],s=e.ecModel,l=UD(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,f,c;r=r.slice(),A(r,function(p,g){var y=vt(p)?p:r[g]={name:p};y.type==="ordinal"&&f==null&&(f=g,c=d(y)),a[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});A(r,function(p,g){var y=p.name,m=d(p);if(f==null){var _=v.valueWayDim;h(a[y],_,m),h(o,_,m),v.valueWayDim+=m}else if(f===g)h(a[y],0,m),h(i,0,m);else{var _=v.categoryWayDim;h(a[y],_,m),h(o,_,m),v.categoryWayDim+=m}});function h(p,g,y){for(var m=0;me)return r[a];return r[t-1]}function qD(r,e,t,a,n,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!a?t:jV(a,o);if(f=f||t,!(!f||!f.length)){var c=f[l];return n&&(u[n]=c),s.paletteIdx=(l+1)%f.length,c}}function JV(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var rf,Ws,fS,cS="\0_ec_inner",QV=1,KD=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,n,i,o,s){i=i||{},this.option=null,this._theme=new Pt(i),this._locale=new Pt(o),this._optionManager=s},e.prototype.setOption=function(t,a,n){var i=dS(a);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,a){return this._resetOption(t,dS(a))},e.prototype._resetOption=function(t,a){var n=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?fS(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=at(),u=a&&a.replaceMergeMainTypeMap;YV(this),A(t,function(c,v){c!=null&&(Dt.hasClass(v)?v&&(s.push(v),l.set(v,!0)):n[v]=n[v]==null?st(c):St(n[v],c,!0))}),u&&u.each(function(c,v){Dt.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),Dt.topologicalTravel(s,Dt.getAllClassMainTypes(),f,this);function f(c){var v=qV(this,c,zt(t[c])),h=i.get(c),d=h?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",p=pM(h,v,d);aB(p,c,Dt),n[c]=null,i.set(c,null),o.set(c,0);var g=[],y=[],m=0,_;A(p,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=c==="series",C=Dt.getClass(c,S.keyInfo.subType,!T);if(!C)return;if(c==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===C)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var M=W({componentIndex:b},S.keyInfo);x=new C(w,this,this,M),W(x,M),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),n[c]=g,i.set(c,y),o.set(c,m),c==="series"&&rf(this)}this._seriesIndices||rf(this)},e.prototype.getOption=function(){var t=st(this.option);return A(t,function(a,n){if(Dt.hasClass(n)){for(var i=zt(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!Zl(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[n]=i}}),delete t[cS],t},e.prototype.setTheme=function(t){this._theme=new Pt(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,a){var n=this._componentsMap.get(t);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function uz(r,e){return r.join(",")===e.join(",")}const fz=iz;var kr=A,tu=vt,pS=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function id(r){var e=r&&r.itemStyle;if(e)for(var t=0,a=pS.length;t0?t[o-1].seriesModel:null)}),_z(t)}})}function _z(r){A(r,function(e,t){var a=[],n=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,f,c){var v=o.get(e.stackedDimension,c);if(isNaN(v))return n;var h,d;s?d=o.getRawIndex(c):h=o.get(e.stackedByDimension,c);for(var p=NaN,g=t-1;g>=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,h)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=WO(v,m),p=m;break}}}return a[0]=v,a[1]=p,a})})}var Xv=function(){function r(e){this.data=e.data||(e.sourceFormat===Zr?{}:[]),this.sourceFormat=e.sourceFormat||$D,this.seriesLayoutBy=e.seriesLayoutBy||Fr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;ap&&(p=_)}h[0]=d,h[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};bS=(e={},e[Me+"_"+Fr]={pure:!0,appendData:i},e[Me+"_"+oo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[hr]={pure:!0,appendData:i},e[Zr]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},e[vr]={appendData:i},e[Dn]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(e,t){return fs(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r}();function AS(r){var e,t;return vt(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Bl(r){return new Mz(r)}var Mz=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,a=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var c;(this._dirty||i==="reset")&&(this._dirty=!1,c=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,d=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!a&&(c||h1&&a>0?s:o}};return i;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},Lz=function(){function r(e,t){if(!At(t)){var a="";kt(a)}this._opFn=lL[e],this._rvalFloat=Ha(t)}return r.prototype.evaluate=function(e){return At(e)?this._opFn(e,this._rvalFloat):this._opFn(Ha(e),this._rvalFloat)},r}(),uL=function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=At(e)?e:Ha(e),n=At(t)?t:Ha(t),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=K(e),l=K(t);s&&(a=l?e:0),l&&(n=s?t:0)}return an?-this._resultLT:0},r}(),Iz=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ha(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=Ha(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function Pz(r,e){return r==="eq"||r==="ne"?new Iz(r==="eq",e):tt(lL,r)?new Lz(r,e):null}var Rz=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Ln(e,t)},r}();function kz(r,e){var t=new Rz,a=r.data,n=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==Fr&&kt(o);var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(p,g){var y=p.name,m={index:g,name:y,displayName:p.displayName};if(s.push(m),y!=null){var _="";tt(l,y)&&kt(_),l[y]=m}});else for(var f=0;f65535?Fz:Hz}function Co(){return[1/0,-1/0]}function Wz(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function LS(r,e,t,a,n){var i=vL[t||"float"];if(n){var o=r[e],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=Y(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,a=t[e];if(a!=null&&ae)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,n=this._count;if(a===Array){e=new a(n);for(var i=0;i=c&&m<=v||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var g=h[n[0]],_=h[n[1]],S=e[n[1]][0],b=e[n[1]][1],y=0;y=c&&m<=v||isNaN(m))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var y=0;y=c&&m<=v||isNaN(m))&&(l[u++]=w)}else for(var y=0;ye[M][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),n=a._chunks,i=n[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,c,v,h=new(To(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var d=1;df&&(f=c,v=S)}D>0&&Ds&&(p=s-f);for(var g=0;gd&&(d=m,h=f+g)}var _=this.getRawIndex(c),S=this.getRawIndex(h);cf-d&&(l=f-d,s.length=l);for(var p=0;pc[1]&&(c[1]=y),v[h++]=m}return i._count=h,i._indices=v,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var a=e.length,n=this._chunks,i=0,o=this.count();il&&(l=c)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var a=[],n=this._chunks,i=0;i=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,a,n,i){return Ln(t[i],this._dimensions[i])}ld={arrayRows:e,objectRows:function(t,a,n,i){return Ln(t[a],this._dimensions[i])},keyedColumns:e,original:function(t,a,n,i){var o=t&&(t.value==null?t:t.value);return Ln(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,a,n,i){return t[i]}}}(),r}(),hL=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,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 e=this._sourceHost,t=this._getUpstreamSourceManagers(),a=!!t.length,n,i;if(nf(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=rr(s)?Dn:vr,i=[];var c=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},h=it(c.seriesLayoutBy,v.seriesLayoutBy)||null,d=it(c.sourceHeader,v.sourceHeader),p=it(c.dimensions,v.dimensions),g=h!==v.seriesLayoutBy||!!d!=!!v.sourceHeader||p;n=g?[Yg(s,{seriesLayoutBy:h,sourceHeader:d,dimensions:p},l)]:[]}else{var y=e;if(a){var m=this._applyTransform(t);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[Yg(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var i="";e.length!==1&&PS(i)}var o,s=[],l=[];return A(e,function(u){u.prepareSource();var f=u.getSource(n||0),c="";n!=null&&!f&&PS(c),s.push(f),l.push(u._getVersionSign())}),a?o=zz(a,s,{datasetIndex:t.componentIndex}):n!=null&&(o=[Sz(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return A(r.blocks,function(n){var i=yL(n);i>=e&&(e=i+ +(a&&(!i||Xg(n)&&!n.noHeader)))}),e}return 0}function Zz(r,e,t,a){var n=e.noHeader,i=qz(yL(e)),o=[],s=e.blocks||[];ze(!s||U(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(tt(u,l)){var f=new uL(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(p,g){var y=e.valueFormatter,m=gL(p)(y?W(W({},r),{valueFormatter:y}):r,p,g>0?i.html:0,a);m!=null&&o.push(m)});var c=r.renderMode==="richText"?o.join(i.richText):qg(a,o.join(""),n?t:i.html);if(n)return c;var v=Hg(e.header,"ordinal",r.useUTC),h=pL(a,r.renderMode).nameStyle,d=dL(a);return r.renderMode==="richText"?mL(r,v,h)+i.richText+c:qg(a,'
'+Be(v)+"
"+c,t)}function Xz(r,e,t,a){var n=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(S){return S=U(S)?S:[S],Y(S,function(b,x){return Hg(b,U(h)?h[x]:h,u)})};if(!(i&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||G.color.secondary,n),v=i?"":Hg(l,"ordinal",u),h=e.valueType,d=o?[]:f(e.value,e.dataIndex),p=!s||!i,g=!s&&i,y=pL(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":c)+(i?"":mL(r,v,m))+(o?"":Jz(r,d,p,g,_)):qg(a,(s?"":c)+(i?"":Kz(v,!s,m))+(o?"":jz(d,p,g,_)),t)}}function RS(r,e,t,a,n,i){if(r){var o=gL(r),s={useUTC:n,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function qz(r){return{html:Uz[r],richText:Yz[r]}}function qg(r,e,t){var a='
',n="margin: "+t+"px 0 0",i=dL(r);return'
'+e+a+"
"}function Kz(r,e,t){var a=e?"margin-left:2px":"";return''+Be(r)+""}function jz(r,e,t,a){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return r=U(r)?r:[r],''+Y(r,function(o){return Be(o)}).join("  ")+""}function mL(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function Jz(r,e,t,a,n){var i=[n],o=a?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(U(e)?e.join(" "):e,i)}function _L(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return ji(a)}function SL(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var ud=function(){function r(){this.richTextStyles={},this._nextStyleNameId=fM()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var n=a==="richText"?this._generateStyleName():null,i=BV({color:t,type:e,renderMode:a,markerId:n});return K(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};U(t)?A(t,function(i){return W(a,i)}):W(a,t);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},r}();function xL(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=U(s),u=_L(e,t),f,c,v,h;if(o>1||l&&!o){var d=Qz(s,e,t,i,u);f=d.inlineValues,c=d.inlineValueTypes,v=d.blocks,h=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(i[0]);h=f=fs(n,t,i[0]),c=p.type}else h=f=l?s[0]:s;var g=Tm(e),y=g&&e.name||"",m=n.getName(t),_=a?y:m;return ue("section",{header:y,noHeader:a||!g,sortParam:h,blocks:[ue("nameValue",{markerType:"item",markerColor:u,name:_,noName:!Mr(_),value:f,valueType:c,dataIndex:t})].concat(v||[])})}function Qz(r,e,t,a,n){var i=e.getData(),o=ma(r,function(c,v,h){var d=i.getDimensionInfo(h);return c=c||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];a.length?A(a,function(c){f(fs(i,t,c),c)}):A(r,f);function f(c,v){var h=i.getDimensionInfo(v);!h||h.otherDims.tooltip===!1||(o?u.push(ue("nameValue",{markerType:"subItem",markerColor:n,name:h.displayName,value:c,valueType:h.type})):(s.push(c),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var an=wt();function of(r,e){return r.getName(e)||r.getId(e)}var cc="__universalTransitionEnabled",jv=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,n){this.seriesIndex=this.componentIndex,this.dataTask=Bl({count:e5,reset:r5}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var i=an(this).sourceManager=new hL(this);i.prepareSource();var o=this.getInitialData(t,n);ES(o,this),this.dataTask.context.data=o,an(this).dataBeforeProcessed=o,kS(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var n=Ql(this),i=n?io(t):{},o=this.subType;Dt.hasClass(o)&&(o+="Series"),St(t,a.getTheme().get(this.subType)),St(t,this.getDefaultOption()),Ui(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&ba(t,i,n)},e.prototype.mergeOption=function(t,a){t=St(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Ql(this);n&&ba(this.option,t,n);var i=an(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,a);ES(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,an(this).dataBeforeProcessed=o,kS(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!rr(t))for(var a=["show"],n=0;n=0&&v<0)&&(c=m,v=y,h=0),y===v&&(f[h++]=p))}),f.length=h,f},e.prototype.formatTooltip=function(t,a,n){return xL({series:this,dataIndex:t,multipleSeries:a})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Rt.node&&!(t&&t.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,n){var i=this.ecModel,o=e0.prototype.getColorFromPalette.call(this,t,a,n);return o||(o=i.getColorFromPalette(t,a,n)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,a){var n=this.option.selectedMap;if(n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},e.prototype.isSelected=function(t,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[of(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[cc])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){vt(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,a)}},e.registerClass=function(t){return Dt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Dt);ce(jv,qv);ce(jv,e0);SM(jv,Dt);function kS(r){var e=r.name;Tm(r)||(r.name=t5(r)||e)}function t5(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return A(t,function(n){var i=e.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function e5(r){return r.model.getRawData().count()}function r5(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),a5}function a5(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function ES(r,e){A(Hl(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,mt(n5,e))})}function n5(r,e){var t=Kg(r);return t&&t.setOutputEnd((e||this).count()),e}function Kg(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}const qt=jv;var o0=function(){function r(){this.group=new lt,this.uid=Ds("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){},r.prototype.updateLayout=function(e,t,a,n){},r.prototype.updateVisual=function(e,t,a,n){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();Am(o0);Rv(o0);const jt=o0;function Is(){var r=wt();return function(e){var t=r(e),a=e.pipelineContext,n=!!t.large,i=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var bL=wt(),i5=Is(),s0=function(){function r(){this.group=new lt,this.uid=Ds("viewChart"),this.renderTask=Bl({plan:o5,reset:s5}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.highlight=function(e,t,a,n){var i=e.getData(n&&n.dataType);i&&BS(i,n,"emphasis")},r.prototype.downplay=function(e,t,a,n){var i=e.getData(n&&n.dataType);i&&BS(i,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateLayout=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateVisual=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.eachRendered=function(e){Fn(this.group,e)},r.markUpdateMethod=function(e,t){bL(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function OS(r,e,t){r&&Kl(r)&&(e==="emphasis"?Wa:$a)(r,t)}function BS(r,e,t){var a=Yi(r,e),n=e&&e.highlightKey!=null?bN(e.highlightKey):null;a!=null?A(zt(a),function(i){OS(r.getItemGraphicEl(i),t,n)}):r.eachItemGraphicEl(function(i){OS(i,t,n)})}Am(s0);Rv(s0);function o5(r){return i5(r.model)}function s5(r){var e=r.model,t=r.ecModel,a=r.api,n=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=n&&bL(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,n),l5[l]}var l5={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const Ht=s0;var Nc="\0__throttleOriginMethod",NS="\0__throttleRate",VS="\0__throttleType";function l0(r,e,t){var a,n=0,i=0,o=null,s,l,u,f;e=e||0;function c(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var h=[],d=0;d=0?c():o=setTimeout(c,-s),n=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(h){f=h},v}function Ps(r,e,t,a){var n=r[e];if(n){var i=n[Nc]||n,o=n[VS],s=n[NS];if(s!==t||o!==a){if(t==null||!a)return r[e]=i;n=r[e]=l0(i,t,a==="debounce"),n[Nc]=i,n[VS]=a,n[NS]=t}return n}}function eu(r,e){var t=r[e];t&&t[Nc]&&(t.clear&&t.clear(),r[e]=t[Nc])}var zS=wt(),GS={itemStyle:Zi(SD,!0),lineStyle:Zi(_D,!0)},u5={lineStyle:"stroke",itemStyle:"fill"};function wL(r,e){var t=r.visualStyleMapper||GS[e];return t||(console.warn("Unknown style type '"+e+"'."),GS.itemStyle)}function TL(r,e){var t=r.visualDrawType||u5[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var f5={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=wL(r,a),o=i(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=TL(r,a),u=o[l],f=ot(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var v=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=v,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ot(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||ot(o.stroke)?v:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,d){var p=r.getDataParams(d),g=W({},o);g[l]=f(p),h.setItemVisual(d,"style",g)}}}},Us=new Pt,c5={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=wL(r,a),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Us.option=l[a];var u=n(Us),f=o.ensureUniqueItemVisual(s,"style");W(f,u),Us.option.decal&&(o.setItemVisual(s,"decal",Us.option.decal),Us.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},v5={performRawSeries:!0,overallReset:function(r){var e=at();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+a,i=e.get(n);i||(i={},e.set(n,i)),zS(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),n={},i=t.getData(),o=zS(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=TL(t,s);i.each(function(u){var f=i.getRawIndex(u);n[f]=u}),a.each(function(u){var f=n[u],c=i.getItemVisual(f,"colorFromPalette");if(c){var v=i.ensureUniqueItemVisual(f,"style"),h=a.getName(u)||u+"",d=a.count();v[l]=t.getColorFromPalette(h,o,d)}})}})}},sf=Math.PI;function h5(r,e){e=e||{},ct(e,{text:"loading",textColor:G.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:G.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new lt,a=new bt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var n=new Lt({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new bt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new Nm({shape:{startAngle:-sf/2,endAngle:-sf/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:sf*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:sf*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var d5=function(){function r(e,t,a,n){this._stageTaskMap=at(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),n=a.context,i=!t&&a.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var a=this._pipelineMap.get(e.uid),n=e.getData(),i=n.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&i>=a.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=at();e.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;A(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),o="";ze(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,t,a),n.overallReset&&this._createOverallStageTask(n,i,t,a)},this)},r.prototype.prepareView=function(e,t,a,n){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=a,o.api=n,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,n){n=n||{};var i=!1,o=this;A(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,v=f.overallTask;if(v){var h,d=v.agentStubMap;d.each(function(g){s(n,g)&&(g.dirty(),h=!0)}),h&&v.dirty(),o.updatePayload(v,a);var p=o.getPerformArgs(v,n.block);d.each(function(g){g.perform(p)}),v.perform(p)&&(i=!0)}else c&&c.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(a){t=a.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,a,n){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=at(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(f):l?a.eachRawSeriesByType(l,f):u&&u(a,n).each(f);function f(c){var v=c.uid,h=s.set(v,o&&o.get(v)||Bl({plan:_5,reset:S5,count:b5}));h.context={model:c,ecModel:a,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(c,h)}},r.prototype._createOverallStageTask=function(e,t,a,n){var i=this,o=t.overallTask=t.overallTask||Bl({reset:p5});o.context={ecModel:a,api:n,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=at(),u=e.seriesType,f=e.getTargetSeries,c=!0,v=!1,h="";ze(!e.createOnAllSeries,h),u?a.eachRawSeriesByType(u,d):f?f(a,n).each(d):(c=!1,A(a.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(v=!0,Bl({reset:g5,onDirty:m5})));y.context={model:p,overallProgress:c},y.agent=o,y.__block=c,i._pipe(p,y)}v&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return ot(e)&&(e={overallReset:e,seriesType:w5(e)}),e.uid=Ds("stageHandler"),t&&(e.visualType=t),e},r}();function p5(r){r.overallReset(r.ecModel,r.api,r.payload)}function g5(r){return r.overallProgress&&y5}function y5(){this.agent.dirty(),this.getDownstream().dirty()}function m5(){this.agent&&this.agent.dirty()}function _5(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function S5(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=zt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?Y(e,function(t,a){return CL(a)}):x5}var x5=CL(0);function CL(r){return function(e,t){var a=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var i=e.start;i0&&h===u.length-v.length){var d=u.slice(0,h);d!=="data"&&(t.mainType=d,t[v.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(a[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:n}},r.prototype.filter=function(e,t){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.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,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,i));function f(c,v,h,d){return c[h]==null||v[d||h]===c[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),jg=["symbol","symbolSize","symbolRotate","symbolOffset"],HS=jg.concat(["symbolKeepAspect"]),M5={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o=0&&ki(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function Jg(r,e,t){for(var a=e.type==="radial"?W5(r,e,t):H5(r,e,t),n=e.colorStops,i=0;i0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:At(r)?[r]:U(r)?r:null}function f0(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&U5(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=Y(t,function(i){return i/n}),a/=n)}return[t,a]}var Y5=new xa(!0);function Gc(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function WS(r){return typeof r=="string"&&r!=="none"}function Fc(r){var e=r.fill;return e!=null&&e!=="none"}function $S(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function US(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function Qg(r,e,t){var a=Mm(e.image,e.__image,t);if(kv(a)){var n=r.createPattern(a,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*Kf),i.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(i)}return n}}function Z5(r,e,t,a){var n,i=Gc(t),o=Fc(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||Y5,c=e.__dirty;if(!a){var v=t.fill,h=t.stroke,d=o&&!!v.colorStops,p=i&&!!h.colorStops,g=o&&!!v.image,y=i&&!!h.image,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0;(d||p)&&(x=e.getBoundingRect()),d&&(m=c?Jg(r,v,x):e.__canvasFillGradient,e.__canvasFillGradient=m),p&&(_=c?Jg(r,h,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=c||!e.__canvasFillPattern?Qg(r,v,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(b=c||!e.__canvasStrokePattern?Qg(r,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),d?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:y&&(b?r.strokeStyle=b:i=!1)}var w=e.getGlobalScale();f.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(n=f0(e),T=n[0],C=n[1]);var M=!0;(u||c&$o)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),M=!1),f.reset(),e.buildPath(f,e.shape,a),f.toStatic(),e.pathUpdated()),M&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),a||(t.strokeFirst?(i&&US(r,t),o&&$S(r,t)):(o&&$S(r,t),i&&US(r,t))),T&&r.setLineDash([])}function X5(r,e,t){var a=e.__image=Mm(t.image,e.__image,e,e.onload);if(!(!a||!kv(a))){var n=t.x||0,i=t.y||0,o=e.getWidth(),s=e.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(a,u,f,t.sWidth,t.sHeight,n,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.sy,c=o-u,v=s-f;r.drawImage(a,u,f,c,v,n,i,o,s)}else r.drawImage(a,n,i,o,s)}}function q5(r,e,t){var a,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||Ga,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(a=f0(e),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(Gc(t)&&r.strokeText(n,t.x,t.y),Fc(t)&&r.fillText(n,t.x,t.y)):(Fc(t)&&r.fillText(n,t.x,t.y),Gc(t)&&r.strokeText(n,t.x,t.y)),i&&r.setLineDash([])}}var YS=["shadowBlur","shadowOffsetX","shadowOffsetY"],ZS=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function RL(r,e,t,a,n){var i=!1;if(!a&&(t=t||{},e===t))return!1;if(a||e.opacity!==t.opacity){tr(r,n),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Ni.opacity:o}(a||e.blend!==t.blend)&&(i||(tr(r,n),i=!0),r.globalCompositeOperation=e.blend||Ni.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,a,n){if(!this[ve]){if(this._disposed){this.id;return}var i,o,s;if(vt(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[ve]=!0,Lo(this),!this._model||a){var l=new fz(this._api),u=this._theme,f=this._model=new jD;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},ay);var c={seriesTransition:s,optionChanged:!0};if(n)this[we]={silent:i,updateParams:c},this[ve]=!1,this.getZr().wakeUp();else{try{ci(this),Ma.update.call(this,null,c)}catch(v){throw this[we]=null,this[ve]=!1,v}this._ssr||this._zr.flush(),this[we]=null,this[ve]=!1,Mo.call(this,i),Do.call(this,i)}}},e.prototype.setTheme=function(t,a){if(!this[ve]){if(this._disposed){this.id;return}var n=this._model;if(n){var i=a&&a.silent,o=null;this[we]&&(i==null&&(i=this[we].silent),o=this[we].updateParams,this[we]=null),this[ve]=!0,Lo(this);try{this._updateTheme(t),n.setTheme(this._theme),ci(this),Ma.update.call(this,{type:"setTheme"},o)}catch(s){throw this[ve]=!1,s}this[ve]=!1,Mo.call(this,i),Do.call(this,i)}}},e.prototype._updateTheme=function(t){K(t)&&(t=KL[t]),t&&(t=st(t),t&&tL(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Rt.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,a=t.storage.getDisplayList();return A(a,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.excludeComponents,n=this._model,i=[],o=this;A(a,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return A(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(lx[n]){var l=s,u=s,f=-s,c=-s,v=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();A(Nl,function(_,S){if(_.group===n){var b=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(st(t)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),f=o(x.right,f),c=o(x.bottom,c),v.push({dom:b,left:x.left,top:x.top})}}),l*=h,u*=h,f*=h,c*=h;var d=f-l,p=c-u,g=Hr.createCanvas(),y=c1(g,{renderer:a?"svg":"canvas"});if(y.resize({width:d,height:p}),a){var m="";return A(v,function(_){var S=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new bt({shape:{x:0,y:0,width:d,height:p},style:{fill:t.connectedBackgroundColor}})),A(v,function(_){var S=new ke({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a,n){return cf(this,"convertToPixel",t,a,n)},e.prototype.convertToLayout=function(t,a,n){return cf(this,"convertToLayout",t,a,n)},e.prototype.convertFromPixel=function(t,a,n){return cf(this,"convertFromPixel",t,a,n)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var n=this._model,i,o=rs(n,t);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(a);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(i=i||c.containPoint(a,u))}},this)},this),!!i},e.prototype.getVisual=function(t,a){var n=this._model,i=rs(n,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?u0(s,l,a):Au(s,a)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;A(wG,function(n){var i=function(o){var s=t.getModel(),l=o.target,u,f=n==="globalout";if(f?u={}:l&&Ri(l,function(p){var g=gt(p);if(g&&g.dataIndex!=null){var y=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=y&&y.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=W({},g.eventData),!0},!0),u){var c=u.componentType,v=u.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",v=u.seriesIndex);var h=c&&v!=null&&s.getComponent(c,v),d=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];u.event=o,u.type=n,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:d},t.trigger(n,u)}};i.zrEventfulCallAtLast=!0,t._zr.on(n,i,t)});var a=this._messageCenter;A(ey,function(n,i){a.on(i,function(o){t.trigger(i,o)})}),L5(a,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&yM(this.getDom(),h0,"");var a=this,n=a._api,i=a._model;A(a._componentsViews,function(o){o.dispose(i,n)}),A(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete Nl[a.id]},e.prototype.resize=function(t){if(!this[ve]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=t&&t.silent;this[we]&&(i==null&&(i=this[we].silent),n=!0,this[we]=null),this[ve]=!0,Lo(this);try{n&&ci(this),Ma.update.call(this,{type:"resize",animation:W({duration:0},t&&t.animation)})}catch(o){throw this[ve]=!1,o}this[ve]=!1,Mo.call(this,i),Do.call(this,i)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(vt(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!ny[t]){var n=ny[t](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var a=W({},t);return a.type=ty[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(vt(a)||(a={silent:!!a}),!!Hc[t.type]&&this._model){if(this[ve]){this._pendingActions.push(t);return}var n=a.silent;pd.call(this,t,n);var i=a.flush;i?this._zr.flush():i!==!1&&Rt.browser.weChat&&this._throttledZrFlush(),Mo.call(this,n),Do.call(this,n)}},e.prototype.updateLabelLayout=function(){Br.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ci=function(c){var v=c._scheduler;v.restorePipelines(c._model),v.prepareStageTasks(),hd(c,!0),hd(c,!1),v.plan()},hd=function(c,v){for(var h=c._model,d=c._scheduler,p=v?c._componentsViews:c._chartsViews,g=v?c._componentsMap:c._chartsMap,y=c._zr,m=c._api,_=0;_v.get("hoverLayerThreshold")&&!Rt.node&&!Rt.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=c._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(c,v){var h=c.get("blendMode")||null;v.eachRendered(function(d){d.isGroup||(d.style.blend=h)})}function l(c,v){if(!c.preventAutoZ){var h=Ki(c);v.eachRendered(function(d){return $v(d,h.z,h.zlevel),!0})}}function u(c,v){v.eachRendered(function(h){if(!as(h)){var d=h.getTextContent(),p=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function f(c,v){var h=c.getModel("stateAnimation"),d=c.isAnimationEnabled(),p=h.get("duration"),g=p>0?{duration:p,delay:h.get("delay"),easing:h.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(as(y))return;if(y instanceof Tt&&wN(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}ox=function(c){return new(function(v){F(h,v);function h(){return v!==null&&v.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return c._model.getComponent(p.mainType,p.index);d=d.parent}},h.prototype.enterEmphasis=function(d,p){Wa(d,p),dr(c)},h.prototype.leaveEmphasis=function(d,p){$a(d,p),dr(c)},h.prototype.enterBlur=function(d){VM(d),dr(c)},h.prototype.leaveBlur=function(d){km(d),dr(c)},h.prototype.enterSelect=function(d){zM(d),dr(c)},h.prototype.leaveSelect=function(d){GM(d),dr(c)},h.prototype.getModel=function(){return c.getModel()},h.prototype.getViewOfComponentModel=function(d){return c.getViewOfComponentModel(d)},h.prototype.getViewOfSeriesModel=function(d){return c.getViewOfSeriesModel(d)},h.prototype.getMainProcessVersion=function(){return c[uf]},h}(JD))(c)},XL=function(c){function v(h,d){for(var p=0;p=0)){ux.push(t);var i=DL.wrapStageHandler(t,n);i.__prio=e,i.__raw=t,r.push(i)}}function t2(r,e){ny[r]=e}function IG(r,e,t){var a=oG("registerMap");a&&a(r,e,t)}var PG=Vz;lo(c0,f5);lo(Jv,c5);lo(Jv,v5);lo(c0,M5);lo(Jv,D5);lo(HL,aG);JL(tL);QL(cG,mz);t2("default",h5);Ta({type:Vi,event:Vi,update:Vi},ae);Ta({type:ic,event:ic,update:ic},ae);Ta({type:Ic,event:Pm,update:Ic,action:ae,refineEvent:g0,publishNonRefinedEvent:!0});Ta({type:Ig,event:Pm,update:Ig,action:ae,refineEvent:g0,publishNonRefinedEvent:!0});Ta({type:Pc,event:Pm,update:Pc,action:ae,refineEvent:g0,publishNonRefinedEvent:!0});function g0(r,e,t,a){return{eventContent:{selected:mN(t),isFromClick:e.isFromClick||!1}}}jL("default",{});jL("dark",C5);var fx=[],RG={registerPreprocessor:JL,registerProcessor:QL,registerPostInit:AG,registerPostUpdate:MG,registerUpdateLifecycle:d0,registerAction:Ta,registerCoordinateSystem:DG,registerLayout:LG,registerVisual:lo,registerTransform:PG,registerLoading:t2,registerMap:IG,registerImpl:iG,PRIORITY:SG,ComponentModel:Dt,ComponentView:jt,SeriesModel:qt,ChartView:Ht,registerComponentModel:function(r){Dt.registerClass(r)},registerComponentView:function(r){jt.registerClass(r)},registerSeriesModel:function(r){qt.registerClass(r)},registerChartView:function(r){Ht.registerClass(r)},registerCustomSeries:function(r,e){sG(r,e)},registerSubTypeDefaulter:function(r,e){Dt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){BO(r,e)}};function xt(r){if(U(r)){A(r,function(e){xt(e)});return}_t(fx,r)>=0||(fx.push(r),ot(r)&&(r={install:r}),r.install(RG))}function Zs(r){return r==null?0:r.length||1}function cx(r){return r}var kG=function(){function r(e,t,a,n,i,o){this._old=e,this._new=t,this._oldKeyGetter=a||cx,this._newKeyGetter=n||cx,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,a={},n=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,a,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(f,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,a={},n={},i=[],o=[];this._initIndexMap(e,a,i,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var s=0;s1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(c===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(c===1&&v===1)this._update&&this._update(f,u),n[l]=null;else if(c>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(c>1)for(var h=0;h1)for(var s=0;s30}var Xs=vt,nn=Y,GG=typeof Int32Array>"u"?Array:Int32Array,FG="e\0\0",vx=-1,HG=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],WG=["_approximateExtent"],hx,hf,qs,Ks,_d,js,Sd,$G=function(){function r(e,t){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 a,n=!1;r2(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,a=e),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=t)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===vr;if(l&&!n.pure)for(var u=[],f=e;f0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,n=a[e];n||(n=a[e]={});var i=n[t];return i==null&&(i=this.getVisual(t),U(i)?i=i.slice():Xs(i)&&(i=W({},i)),n[t]=i),i},r.prototype.setItemVisual=function(e,t,a){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,Xs(t)?W(n,t):n[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Xs(e)?W(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,a){this._itemLayouts[e]=a?W(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;Lg(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){A(this._graphicEls,function(a,n){a&&e&&e.call(t,a,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:nn(this.dimensions,this._getDimInfo,this),this.hostModel)),_d(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];ot(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=a.apply(this,arguments);return t.apply(this,[n].concat(dm(arguments)))})},r.internalField=function(){hx=function(e){var t=e._invertedIndicesMap;A(t,function(a,n){var i=e._dimInfos[n],o=i.ordinalMeta,s=e._store;if(o){a=t[n]=new GG(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[t]=l}}}(),r}();const Ye=$G;function Mu(r,e){r0(r)||(r=a0(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],n=at(),i=[],o=YG(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&i2(o),l=a===r.dimensionsDefine,u=l?n2(r):a2(a),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var c=at(f),v=new cL(o),h=0;h0&&(a.name=n+(i-1)),i++,e.set(n,i)}}function YG(r,e,t,a){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return A(e,function(i){var o;vt(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function ZG(r,e,t){if(t||e.hasKey(r)){for(var a=0;e.hasKey(r+a);)a++;r+=a}return e.set(r,!0),r}var XG=function(){function r(e){this.coordSysDims=[],this.axisMap=at(),this.categoryAxisMap=at(),this.coordSysName=e}return r}();function qG(r){var e=r.get("coordinateSystem"),t=new XG(e),a=KG[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var KG={cartesian2d:function(r,e,t,a){var n=r.getReferringComponents("xAxis",Jt).models[0],i=r.getReferringComponents("yAxis",Jt).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",i),Io(n)&&(a.set("x",n),e.firstCategoryDimIndex=0),Io(i)&&(a.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var n=r.getReferringComponents("singleAxis",Jt).models[0];e.coordSysDims=["single"],t.set("single",n),Io(n)&&(a.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var n=r.getReferringComponents("polar",Jt).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),Io(i)&&(a.set("radius",i),e.firstCategoryDimIndex=0),Io(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();A(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];t.set(f,u),Io(u)&&(a.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,a){var n=r.getReferringComponents("matrix",Jt).models[0];e.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),o=n.getDimensionModel("y");t.set("x",i),t.set("y",o),a.set("x",i),a.set("y",o)}};function Io(r){return r.get("type")==="category"}function jG(r,e,t){t=t||{};var a=t.byIndex,n=t.stackedCoordDimension,i,o,s;JG(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,c,v;if(A(i,function(m,_){K(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!a&&!u&&(a=!0),f){c="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=f.coordDim,d=f.type,p=0;A(i,function(m){m.coordDim===h&&p++});var g={name:c,coordDim:h,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,d),y.storeDimIndex=s.ensureCalculationDimension(c,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:v,stackResultDimension:c}}function JG(r){return!r2(r.schema)}function kn(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function o2(r,e){return kn(r,e)?r.getCalculationInfo("stackResultDimension"):e}function QG(r,e){var t=r.get("coordinateSystem"),a=Tu.get(t),n;return e&&e.coordSysDims&&(n=Y(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=$c(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function t3(r,e,t){var a,n;return t&&A(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function ja(r,e,t){t=t||{};var a=e.getSourceManager(),n,i=!1;r?(i=!0,n=a0(r)):(n=a.getSource(),i=n.sourceFormat===vr);var o=qG(e),s=QG(e,o),l=t.useEncodeDefaulter,u=ot(l)?l:l?mt(YD,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},c=Mu(n,f),v=t3(c.dimensions,t.createInvertedIndices,o),h=i?null:a.getSharedDataStore(c),d=jG(e,{schema:c,store:h}),p=new Ye(c,e);p.setCalculationInfo(d);var g=v!=null&&e3(n)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return p.hasItemOption=!1,p.initData(i?n:h,null,g),p}function e3(r){if(r.sourceFormat===vr){var e=r3(r.data||[]);return!U(bs(e))}}function r3(r){for(var e=0;en&&(o=i.interval=n);var s=i.intervalPrecision=nu(o),l=i.niceTickExtent=[oe(Math.ceil(r[0]/o)*o,s),oe(Math.floor(r[1]/o)*o,s)];return n3(l,r),i}function xd(r){var e=Math.pow(10,wm(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,oe(t*e)}function nu(r){return ua(r)+2}function dx(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function n3(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),dx(r,0,e),dx(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function y0(r,e){return r>=e[0]&&r<=e[1]}var i3=function(){function r(){this.normalize=px,this.scale=gx}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=j(e.normalize,e),this.scale=j(e.scale,e)):(this.normalize=px,this.scale=gx)},r}();function px(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function gx(r,e){return r*(e[1]-e[0])+e[0]}function oy(r,e,t){var a=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/a,Math.log(t?e[1]:Math.max(0,e[1]))/a]}var s2=function(){function r(e){this._calculator=new i3,this._setting=e||{},this._extent=[1/0,-1/0];var t=se();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t),this._brkCtx&&this._brkCtx.update(a)},r.prototype.setBreaksFromOption=function(e){var t=se();t&&this._innerSetBreak(t.parseAxisBreakOption(e,j(this.parse,this)))},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();Rv(s2);const uo=s2;var o3=0,s3=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++o3,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,a=t.data,n=a&&Y(a,l3);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!K(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,n.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=at(this.categories))},r}();function l3(r){return vt(r)&&r.value!=null?r.value:r+""}const iu=s3;var l2=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new iu({})),U(n)&&(n=new iu({categories:Y(n,function(i){return vt(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:K(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return y0(t,this._extent)&&t>=0&&t=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(uo);uo.registerClass(l2);const ou=l2;var on=oe,u2=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return y0(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=nu(t)},e.prototype.getTicks=function(t){t=t||{};var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=se(),l=[];if(!a)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;n[0]=0&&(c=on(c+v*a,o))}if(l.length>0&&c===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:i[1];return n[1]>h&&(t.expandToNicedExtent?l.push({value:on(h+a,o)}):l.push({value:n[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(d){return d.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),o=1;oi[0]&&d0&&(i=i===null?s:Math.min(i,s))}t[a]=i}}return t}function v2(r){var e=c3(r),t=[];return A(r,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],f=Math.abs(o[1]-o[0]),c=i.scale.getExtent(),v=Math.abs(c[1]-c[0]);s=u?f/v*u:f}else{var h=a.getData();s=Math.abs(o[1]-o[0])/h.count()}var d=q(a.get("barWidth"),s),p=q(a.get("barMaxWidth"),s),g=q(a.get("barMinWidth")||(y2(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap"),_=a.get("defaultBarGap");t.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:_0(i),stackId:m0(a)})}),h2(t)}function h2(r){var e={};A(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,stacks:{}},l=s.stacks;e[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=a.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=a.barMaxWidth;c&&(l[u].maxWidth=c);var v=a.barMinWidth;v&&(l[u].minWidth=v);var h=a.barGap;h!=null&&(s.gap=h);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var t={};return A(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=Ct(i).length;s=Math.max(35-l*4,15)+"%"}var u=q(s,o),f=q(a.gap,1),c=a.remainedWidth,v=a.autoWidthCount,h=(c-u)/(v+(v-1)*f);h=Math.max(h,0),A(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,c-=S+f*S,v--}else{var S=h;m&&mS&&(S=_),S!==h&&(y.width=S,c-=S+f*S,v--)}}),h=(c-u)/(v+(v-1)*f),h=Math.max(h,0);var d=0,p;A(i,function(y,m){y.width||(y.width=h),p=y,d+=y.width*(1+f)}),p&&(d-=p.width*f);var g=-d/2;A(i,function(y,m){t[n][m]=t[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),t}function v3(r,e,t){if(r&&e){var a=r[_0(e)];return a!=null&&t!=null?a[m0(t)]:a}}function d2(r,e){var t=c2(r,e),a=v2(t);A(t,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=m0(n),u=a[_0(s)][l],f=u.offset,c=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function p2(r){return{seriesType:r,plan:Is(),reset:function(e){if(g2(e)){var t=e.getData(),a=e.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),f=t.getCalculationInfo("stackResultDimension"),c=kn(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),h=h3(n,i),d=y2(e),p=e.get("barMinHeight")||0,g=f&&t.getDimensionIndex(f),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=d&&ca(b*3),w=d&&l&&ca(b*3),T=d&&ca(b),C=a.master.getRect(),M=v?C.width:C.height,D,I=S.getStore(),L=0;(D=_.next())!=null;){var P=I.get(c?g:o,D),k=I.get(s,D),R=h,B=void 0;c&&(B=+P-I.get(o,D));var E=void 0,V=void 0,O=void 0,N=void 0;if(v){var z=a.dataToPoint([P,k]);if(c){var $=a.dataToPoint([B,k]);R=$[0]}E=R,V=z[1]+m,O=z[0]-R,N=y,Math.abs(O)0?t:1:t))}var d3=function(r,e,t,a){for(;t>>1;r[n][1]n&&(this._approxInterval=n);var o=df.length,s=Math.min(d3(df,this._approxInterval,0,o),o-1);this._interval=df[s][1],this._intervalPrecision=nu(this._interval),this._minLevelUnit=df[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return At(t)?t:+ro(t)},e.prototype.contain=function(t){return y0(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e}(En),df=[["second",$m],["minute",Um],["hour",El],["quarter-day",El*6],["half-day",El*12],["day",Ar*1.2],["half-week",Ar*3.5],["week",Ar*7],["month",Ar*31],["quarter",Ar*95],["half-year",iS/2],["year",iS]];function _2(r,e,t,a){return Fg(new Date(e),r,a).getTime()===Fg(new Date(t),r,a).getTime()}function p3(r,e){return r/=Ar,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function g3(r){var e=30*Ar;return r/=e,r>6?6:r>3?3:r>2?2:1}function y3(r){return r/=El,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function yx(r,e){return r/=e?Um:$m,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function m3(r){return lM(r,!0)}function _3(r,e,t){var a=Math.max(0,_t(ir,e)-1);return Fg(new Date(r),ir[a],t).getTime()}function S3(r,e){var t=new Date(0);t[r](1);var a=t.getTime();t[r](1+e);var n=t.getTime()-a;return function(i,o){return Math.max(0,Math.round((o-i)/n))}}function x3(r,e,t,a,n,i){var o=1e4,s=DV,l=0;function u(L,P,k,R,B,E,V){for(var O=S3(B,L),N=P,z=new Date(N);No));)if(z[B](z[R]()+L),N=z.getTime(),i){var $=i.calcNiceTickMultiple(N,O);$>0&&(z[B](z[R]()+$*L),N=z.getTime())}V.push({value:N,notAdd:!0})}function f(L,P,k){var R=[],B=!P.length;if(!_2(Ol(L),a[0],a[1],t)){B&&(P=[{value:_3(a[0],L,t)},{value:a[1]}]);for(var E=0;E=a[0]&&V<=a[1]&&u(N,V,O,z,$,H,R),L==="year"&&k.length>1&&E===0&&k.unshift({value:k[0].value-N})}}for(var E=0;E=a[0]&&S<=a[1]&&h++)}var b=n/e;if(h>b*1.5&&d>b/1.5||(c.push(m),h>b||r===s[p]))break}v=[]}}}for(var x=Ot(Y(c,function(L){return Ot(L,function(P){return P.value>=a[0]&&P.value<=a[1]&&!P.notAdd})}),function(L){return L.length>0}),w=[],T=x.length-1,p=0;p0;)i*=10;var s=[ly(w3(a[0]/i)*i),ly(b3(a[1]/i)*i)];this._interval=i,this._intervalPrecision=nu(i),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=gf(t)/gf(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=gf(t)/gf(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),pf(this.base,t)},e.prototype.setBreaksFromOption=function(t){var a=se();if(a){var n=a.logarithmicParseBreaksFromOption(t,this.base,j(this.parse,this)),i=n.parsedOriginal,o=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},e.type="log",e}(En);function yf(r,e){return ly(r,ua(e))}uo.registerClass(x2);const T3=x2;var C3=function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var v=this._determinedMin,h=this._determinedMax;return v!=null&&(s=v,u=!0),h!=null&&(l=h,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},r.prototype.modifyDataMinMax=function(e,t){this[M3[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=A3[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),A3={min:"_determinedMin",max:"_determinedMax"},M3={min:"_dataMin",max:"_dataMax"};function b2(r,e,t){var a=r.rawExtentInfo;return a||(a=new C3(r,e,t),r.rawExtentInfo=a,a)}function mf(r,e){return e==null?null:Ne(e)?NaN:r.parse(e)}function w2(r,e){var t=r.type,a=b2(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=e.ecModel;if(o&&t==="time"){var s=c2("bar",o),l=!1;if(A(s,function(c){l=l||c.getBaseAxis()===e.axis}),l){var u=v2(s),f=D3(n,i,e,u);n=f.min,i=f.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function D3(r,e,t,a){var n=t.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=v3(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;A(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;A(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,c=1-(s+l)/i,v=f/c-f;return e+=v*(l/u),r-=v*(s/u),{min:r,max:e}}function vs(r,e){var t=e,a=w2(r,t),n=a.extent,i=t.get("splitNumber");r instanceof T3&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(C2(t)),r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Qv(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new ou({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new S2({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(uo.getClass(e)||En)}}function L3(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function ks(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=LV(e);return function(n,i){return r.scale.getFormattedLabel(n,i,t)}}else{if(K(e))return function(n){var i=r.scale.getLabel(n),o=e.replace("{value}",i??"");return o};if(ot(e)){if(r.type==="category")return function(n,i){return e(Uc(r,n),n.value-r.scale.getExtent()[0],null)};var a=se();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),e(Uc(r,n),i,o)}}else return function(n){return r.scale.getLabel(n)}}}function Uc(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function S0(r){var e=r.get("interval");return e??"auto"}function T2(r){return r.type==="category"&&S0(r.getLabelModel())===0}function Yc(r,e){var t={};return A(r.mapDimensionsAll(e),function(a){t[o2(r,a)]=!0}),Ct(t)}function I3(r,e,t){e&&A(Yc(e,t),function(a){var n=e.getApproximateExtent(a);n[0]r[1]&&(r[1]=n[1])})}function hs(r){return r==="middle"||r==="center"}function su(r){return r.getShallow("show")}function C2(r){var e=r.get("breaks",!0);if(e!=null)return!se()||!P3(r.axis)?void 0:e}function P3(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var Du=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),R3=1e-8;function mx(r,e){return Math.abs(r-e)n&&(a=o,n=l)}if(a)return E3(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?_x(s.exterior,n,i,t):A(s.points,function(l){_x(l,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new dt(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/t,l/t])}return a}function N3(r,e){return r=B3(r),Y(Ot(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new Sx(o[0],o.slice(1)));break;case"MultiPolygon":A(n.coordinates,function(l){l[0]&&i.push(new Sx(l[0],l.slice(1)))});break;case"LineString":i.push(new xx([n.coordinates]));break;case"MultiLineString":i.push(new xx(n.coordinates))}var s=new M2(a[e||"name"],i,a.cp);return s.properties=a,s})}var V3=wt(),Vl=wt(),Ur={estimate:1,determine:2};function Zc(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function L2(r,e){var t=Y(e,function(a){return r.scale.parse(a)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function z3(r,e){var t=r.getLabelModel().get("customValues");if(t){var a=ks(r),n=r.scale.getExtent(),i=L2(r,t),o=Ot(i,function(s){return s>=n[0]&&s<=n[1]});return{labels:Y(o,function(s){var l={value:s};return{formattedLabel:a(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?F3(r,e):W3(r)}function G3(r,e,t){var a=r.getTickModel().get("customValues");if(a){var n=r.scale.getExtent(),i=L2(r,a);return{ticks:Ot(i,function(o){return o>=n[0]&&o<=n[1]})}}return r.type==="category"?H3(r,e):{ticks:Y(r.scale.getTicks(t),function(o){return o.value})}}function F3(r,e){var t=r.getLabelModel(),a=I2(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:a}function I2(r,e,t){var a=U3(r),n=S0(e),i=t.kind===Ur.estimate;if(!i){var o=R2(a,n);if(o)return o}var s,l;ot(n)?s=O2(r,n):(l=n==="auto"?Y3(r,t):n,s=E2(r,l));var u={labels:s,labelCategoryInterval:l};return i?t.out.noPxChangeTryDetermine.push(function(){return uy(a,n,u),!0}):uy(a,n,u),u}function H3(r,e){var t=$3(r),a=S0(e),n=R2(t,a);if(n)return n;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),ot(a))i=O2(r,a,!0);else if(a==="auto"){var s=I2(r,r.getLabelModel(),Zc(Ur.determine));o=s.labelCategoryInterval,i=Y(s.labels,function(l){return l.tickValue})}else o=a,i=E2(r,o,!0);return uy(t,a,{ticks:i,tickCategoryInterval:o})}function W3(r){var e=r.scale.getTicks(),t=ks(r);return{labels:Y(e,function(a,n){return{formattedLabel:t(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var $3=P2("axisTick"),U3=P2("axisLabel");function P2(r){return function(t){return Vl(t)[r]||(Vl(t)[r]={list:[]})}}function R2(r,e){for(var t=0;tf&&(u=Math.max(1,Math.floor(l/f)));for(var c=s[0],v=r.dataToCoord(c+1)-r.dataToCoord(c),h=Math.abs(v*Math.cos(i)),d=Math.abs(v*Math.sin(i)),p=0,g=0;c<=s[1];c+=u){var y=0,m=0,_=Pv(n({value:c}),a.font,"center","top");y=_.width*1.3,m=_.height*1.3,p=Math.max(p,y,7),g=Math.max(g,m,7)}var S=p/h,b=g/d;isNaN(S)&&(S=1/0),isNaN(b)&&(b=1/0);var x=Math.max(0,Math.floor(Math.min(S,b)));if(t===Ur.estimate)return e.out.noPxChangeTryDetermine.push(j(X3,null,r,x,l)),x;var w=k2(r,x,l);return w??x}function X3(r,e,t){return k2(r,e,t)==null}function k2(r,e,t){var a=V3(r.model),n=r.getExtent(),i=a.lastAutoInterval,o=a.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-e)<=1&&Math.abs(o-t)<=1&&i>e&&a.axisExtent0===n[0]&&a.axisExtent1===n[1])return i;a.lastTickCount=t,a.lastAutoInterval=e,a.axisExtent0=n[0],a.axisExtent1=n[1]}function q3(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function E2(r,e,t){var a=ks(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=T2(r),v=o.get("showMinLabel")||c,h=o.get("showMaxLabel")||c;v&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);h&&d-l!==i[1]&&p(i[1]);function p(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function O2(r,e,t){var a=r.scale,n=ks(r),i=[];return A(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:n(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var bx=[0,1],K3=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=a&&e<=n},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return oM(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,n=this.scale;return e=n.normalize(n.parse(e)),this.onBand&&n.type==="ordinal"&&(a=a.slice(),Tx(a,n.count())),Et(e,bx,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),Tx(a,n.count()));var i=Et(e,a,bx,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=G3(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),n=a.ticks,i=Y(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return j3(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),n=Y(a,function(i){return Y(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(e){return e=e||Zc(Ur.determine),z3(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(e){return e=e||Zc(Ur.determine),Z3(this,e)},r}();function Tx(r,e){var t=r[1]-r[0],a=e,n=t/a/2;r[0]+=n,r[1]-=n}function j3(r,e,t,a){var n=e.length;if(!r.onBand||t||!n)return;var i=r.getExtent(),o,s;if(n===1)e[0].coord=i[0],e[0].onBand=!0,o=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;A(e,function(h){h.coord-=u/2,h.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s,tickValue:f[1]+1,onBand:!0},e.push(o)}var c=i[0]>i[1];v(e[0].coord,i[0])&&(a?e[0].coord=i[0]:e.shift()),a&&v(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),v(i[1],o.coord)&&(a?o.coord=i[1]:e.pop()),a&&v(o.coord,i[1])&&e.push({coord:i[1],onBand:!0});function v(h,d){return h=oe(h),d=oe(d),c?h>d:hn&&(n+=Js);var h=Math.atan2(s,o);if(h<0&&(h+=Js),h>=a&&h<=n||h+Js>=a&&h+Js<=n)return l[0]=f,l[1]=c,u-t;var d=t*Math.cos(a)+r,p=t*Math.sin(a)+e,g=t*Math.cos(n)+r,y=t*Math.sin(n)+e,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Xc(r,e,t,a,n,i,o,s){var l=n-r,u=i-e,f=t-r,c=a-e,v=Math.sqrt(f*f+c*c);f/=v,c/=v;var h=l*f+u*c,d=h/v;s&&(d=Math.min(Math.max(d,0),1)),d*=v;var p=o[0]=r+d*f,g=o[1]=e+d*c;return Math.sqrt((p-n)*(p-n)+(g-i)*(g-i))}function B2(r,e,t,a,n,i,o){t<0&&(r=r+t,t=-t),a<0&&(e=e+a,a=-a);var s=r+t,l=e+a,u=o[0]=Math.min(Math.max(n,r),s),f=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-n)*(u-n)+(f-i)*(f-i))}var Nr=[];function eF(r,e,t){var a=B2(e.x,e.y,e.width,e.height,r.x,r.y,Nr);return t.set(Nr[0],Nr[1]),a}function rF(r,e,t){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,f=e.data,c=r.x,v=r.y,h=0;h0){e=e/180*Math.PI,Vr.fromArray(r[0]),Wt.fromArray(r[1]),ee.fromArray(r[2]),ft.sub(va,Vr,Wt),ft.sub(sa,ee,Wt);var t=va.len(),a=sa.len();if(!(t<.001||a<.001)){va.scale(1/t),sa.scale(1/a);var n=va.dot(sa),i=Math.cos(e);if(i1&&ft.copy(Ue,ee),Ue.toArray(r[1])}}}}function aF(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Vr.fromArray(r[0]),Wt.fromArray(r[1]),ee.fromArray(r[2]),ft.sub(va,Wt,Vr),ft.sub(sa,ee,Wt);var a=va.len(),n=sa.len();if(!(a<.001||n<.001)){va.scale(1/a),sa.scale(1/n);var i=va.dot(e),o=Math.cos(t);if(i=l)ft.copy(Ue,ee);else{Ue.scaleAndAdd(sa,s/Math.tan(Math.PI/2-f));var c=ee.x!==Wt.x?(Ue.x-Wt.x)/(ee.x-Wt.x):(Ue.y-Wt.y)/(ee.y-Wt.y);if(isNaN(c))return;c<0?ft.copy(Ue,Wt):c>1&&ft.copy(Ue,ee)}Ue.toArray(r[1])}}}}function Td(r,e,t,a){var n=t==="normal",i=n?r:r.ensureState(t);i.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function nF(r,e){var t=e.smooth,a=e.points;if(a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var n=pn(a[0],a[1]),i=pn(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*t,s=Jf([],a[1],a[0],o/n),l=Jf([],a[1],a[2],o/i),u=Jf([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var f=1;f0&&n&&x(-c/i,0,i);var g=r[0],y=r[i-1],m,_;S(),m<0&&w(-m,.8),_<0&&w(_,.8),S(),b(m,_,1),b(_,m,-1),S(),m<0&&T(-m),_<0&&T(_);function S(){m=g.rect[o]-t,_=a-y.rect[o]-y.rect[s]}function b(C,M,D){if(C<0){var I=Math.min(M,-C);if(I>0){x(I*D,0,i);var L=I+C;L<0&&w(-L*D,1)}else w(-C*D,1)}}function x(C,M,D){C!==0&&(f=!0);for(var I=M;I0)for(var L=0;L0;L--){var B=D[L-1]*R;x(-B,L,i)}}}function T(C){var M=C<0?-1:1;C=Math.abs(C);for(var D=Math.ceil(C/(i-1)),I=0;I0?x(D,0,I+1):x(-D,i-I-1,i),C-=D,C<=0)return}return f}function sF(r){for(var e=0;e=0&&a.attr(i.oldLayoutSelect),_t(v,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),It(a,u,t,l)}else if(a.attr(u),!Ms(a).valueAnimation){var c=it(a.style.opacity,1);a.style.opacity=0,Ut(a,{style:{opacity:c}},t,l)}if(i.oldLayout=u,a.states.select){var h=i.oldLayoutSelect={};_f(h,u,Sf),_f(h,a.states.select,Sf)}if(a.states.emphasis){var d=i.oldLayoutEmphasis={};_f(d,u,Sf),_f(d,a.states.emphasis,Sf)}mD(a,l,f,t,t)}if(n&&!n.ignore&&!n.invisible){var i=fF(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),It(n,{shape:p},t)):(n.setShape(p),n.style.strokePercent=0,Ut(n,{style:{strokePercent:1}},t)),i.oldLayout=p}},r}();const vF=cF;var Md=wt();function hF(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=Md(t).labelManager;n||(n=Md(t).labelManager=new vF),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=Md(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var Dd=Math.sin,Ld=Math.cos,H2=Math.PI,hi=Math.PI*2,dF=180/H2,pF=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){this._add("C",e,t,a,n,i,o)},r.prototype.quadraticCurveTo=function(e,t,a,n){this._add("Q",e,t,a,n)},r.prototype.arc=function(e,t,a,n,i,o){this.ellipse(e,t,a,a,0,n,i,o)},r.prototype.ellipse=function(e,t,a,n,i,o,s,l){var u=s-o,f=!l,c=Math.abs(u),v=Sn(c-hi)||(f?u>=hi:-u>=hi),h=u>0?u%hi:u%hi+hi,d=!1;v?d=!0:Sn(c)?d=!1:d=h>=H2==!!f;var p=e+a*Ld(o),g=t+n*Dd(o);this._start&&this._add("M",p,g);var y=Math.round(i*dF);if(v){var m=1/this._p,_=(f?1:-1)*(hi-m);this._add("A",a,n,y,1,+f,e+a*Ld(o+_),t+n*Dd(o+_)),m>.01&&this._add("A",a,n,y,0,+f,p,g)}else{var S=e+a*Ld(s),b=t+n*Dd(s);this._add("A",a,n,y,+d,+f,S,b)}},r.prototype.rect=function(e,t,a,n){this._add("M",e,t),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,n,i,o,s,l,u){for(var f=[],c=this._p,v=1;v"}function TF(r){return""}function w0(r,e){e=e||{};var t=e.newline?` `:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return wF(o,s)+(o!=="style"?Be(l):l||"")+(i?""+t+Y(i,function(u){return a(u)}).join(t)+t:"")+TF(o)}return a(r)}function CF(r,e,t){t=t||{};var a=t.newline?` `:"",n=" {"+a,i=a+"}",o=Y(Ct(r),function(l){return l+n+Y(Ct(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=Y(Ct(e),function(l){return"@keyframes "+l+n+Y(Ct(e[l]),function(u){return u+n+Y(Ct(e[l][u]),function(f){var c=e[l][u][f];return f==="d"&&(c='path("'+c+'")'),f+":"+c+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":[""].join(a)}function dy(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Ix(r,e,t,a){return Se("svg","root",{width:r,height:e,xmlns:$2,"xmlns:xlink":U2,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var AF=0;function Z2(){return AF++}var Px={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},yi="transform-origin";function MF(r,e,t){var a=W({},r.shape);W(a,e),r.buildPath(t,a);var n=new W2;return n.reset(qA(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function DF(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[yi]=t+"px "+a+"px")}var LF={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function X2(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function IF(r,e,t){var a=r.shape.paths,n={},i,o;if(A(a,function(l){var u=dy(t.zrId);u.animation=!0,eh(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,v=Ct(f),h=v.length;if(h){o=v[h-1];var d=f[o];for(var p in d){var g=d[p];n[p]=n[p]||{d:""},n[p].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=X2(n,t);return i.replace(o,s)}}function Rx(r){return K(r)?Px[r]?"cubic-bezier("+Px[r]+")":_m(r)?r:"":""}function eh(r,e,t,a){var n=r.animators,i=n.length,o=[];if(r instanceof Hv){var s=IF(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var nt=X2(w,t);return nt+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+Z2();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function PF(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};kx(a,e,t,!0)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=n.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=hg(l))}var u=n.lineWidth;if(u){var f=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),kx(a,e,t,!0)}}function kx(r,e,t,a){var n=JSON.stringify(r),i=t.cssStyleCache[n];i||(i=t.zrId+"-cls-"+Z2(),t.cssStyleCache[n]=i,t.cssNodes["."+i+(a?":hover":"")]=r),e.class=e.class?e.class+" "+i:i}var lu=Math.round;function q2(r){return r&&K(r.src)}function K2(r){return r&&ot(r.toDataURL)}function T0(r,e,t,a){SF(function(n,i){var o=n==="fill"||n==="stroke";o&&XA(i)?J2(e,r,n,a):o&&Sm(i)?Q2(t,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),VF(t,r,a)}function C0(r,e){var t=NO(e);t&&(t.each(function(a,n){a!=null&&(r[(Lx+n).toLowerCase()]=a+"")}),e.isSilent()&&(r[Lx+"silent"]="true"))}function Ex(r){return Sn(r[0]-1)&&Sn(r[1])&&Sn(r[2])&&Sn(r[3]-1)}function RF(r){return Sn(r[4])&&Sn(r[5])}function A0(r,e,t){if(e&&!(RF(e)&&Ex(e))){var a=t?10:1e4;r.transform=Ex(e)?"translate("+lu(e[4]*a)/a+" "+lu(e[5]*a)/a+")":rO(e)}}function Ox(r,e,t){for(var a=r.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";ze(v,g),ze(h,g)}else if(v==null||h==null){var y=function(M,D){if(M){var I=M.elm,L=v||D.width,P=h||D.height;M.tag==="pattern"&&(u?(P=1,L/=i.width):f&&(L=1,P/=i.height)),M.attrs.width=L,M.attrs.height=P,I&&(I.setAttribute("width",L),I.setAttribute("height",P))}},m=Mm(d,null,r,function(M){l||y(x,M),y(c,M)});m&&m.width&&m.height&&(v=v||m.width,h=h||m.height)}c=Se("image","img",{href:d,width:v,height:h}),o.width=v,o.height=h}else n.svgElement&&(c=st(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(c){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var b=KA(n);b&&(o.patternTransform=b);var x=Se("pattern","",o,[c]),w=w0(x),T=a.patternCache,C=T[w];C||(C=a.zrId+"-p"+a.patternIdx++,T[w]=C,o.id=C,x=a.defs[C]=Se("pattern",C,o,[c])),e[t]=Iv(C)}}function zF(r,e,t){var a=t.clipPathCache,n=t.defs,i=a[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=Se("clipPath",i,o,[j2(r,t)])}e["clip-path"]=Iv(i)}function Vx(r){return document.createTextNode(r)}function Ti(r,e,t){r.insertBefore(e,t)}function zx(r,e){r.removeChild(e)}function Gx(r,e){r.appendChild(e)}function tI(r){return r.parentNode}function eI(r){return r.nextSibling}function Id(r,e){r.textContent=e}var Fx=58,GF=120,FF=Se("","");function py(r){return r===void 0}function na(r){return r!==void 0}function HF(r,e,t){for(var a={},n=e;n<=t;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function wl(r,e){var t=r.key===e.key,a=r.tag===e.tag;return a&&t}function uu(r){var e,t=r.children,a=r.tag;if(na(a)){var n=r.elm=Y2(a);if(M0(FF,r),U(t))for(e=0;ei?(d=t[l+1]==null?null:t[l+1].elm,rI(r,d,t,n,l)):Jc(r,e,a,i))}function Uo(r,e){var t=e.elm=r.elm,a=r.children,n=e.children;r!==e&&(M0(r,e),py(e.text)?na(a)&&na(n)?a!==n&&WF(t,a,n):na(n)?(na(r.text)&&Id(t,""),rI(t,null,n,0,n.length-1)):na(a)?Jc(t,a,0,a.length-1):na(r.text)&&Id(t,""):r.text!==e.text&&(na(a)&&Jc(t,a,0,a.length-1),Id(t,e.text)))}function $F(r,e){if(wl(r,e))Uo(r,e);else{var t=r.elm,a=tI(t);uu(e),a!==null&&(Ti(a,e.elm,eI(t)),Jc(a,[r],0,0))}return e}var UF=0,YF=function(){function r(e,t,a){if(this.type="svg",this.refreshHover=Hx(),this.configLayer=Hx(),this.storage=t,this._opts=a=W({},a),this.root=e,this._id="zr"+UF++,this._oldVNode=Ix(a.width,a.height),e&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=Y2("svg");M0(null,this._oldVNode),n.appendChild(i),e.appendChild(n)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",$F(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return Nx(e,dy(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=dy(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=ZF(a,n,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=Se("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=Y(Ct(i.defs),function(v){return i.defs[v]});if(u.length&&o.push(Se("defs","defs",{},u)),e.animation){var f=CF(i.cssNodes,i.cssAnims,{newline:!0});if(f){var c=Se("style","stl",{},[],f);o.push(c)}}return Ix(a,n,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},w0(this.renderToVNode({animation:it(e.cssAnimation,!0),emphasis:it(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:it(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var n=e.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(v&&l&&v[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=i[o-1];for(var y=p+1;y=s)}}for(var c=this.__startIndex;c15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var M=h.dpr,D=0;D0&&e>n[0]){for(l=0;le);l++);s=a[n[l]]}if(n.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,n=0;n0?xf:0),this._needsManuallyCompositing),f.__builtin__||vm("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),i=f),n.__dirty&sr&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(c,v){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,A(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?St(a[e],t,!0):a[e]=t;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill=G.color.neutral00,u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(qt);const n4=a4;function ds(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var n=fs(r,e,t[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(e[i])}return a.join(" ")}var i4=function(r){F(e,r);function e(t,a,n,i){var o=r.call(this)||this;return o.updateData(t,a,n,i),o}return e.prototype._createSymbol=function(t,a,n,i,o,s){this.removeAll();var l=fe(t,-1,-1,2,2,null,s);l.attr({z2:it(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=o4,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Wa(this.childAt(0))},e.prototype.downplay=function(){$a(this.childAt(0))},e.prototype.setZ=function(t,a){var n=this.childAt(0);n.zlevel=t,n.z=a},e.prototype.setDraggable=function(t,a){var n=this.childAt(0);n.draggable=t,n.cursor=!a&&t?"move":n.cursor},e.prototype.updateData=function(t,a,n,i){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=e.getSymbolZ2(t,a),f=o!==this._symbolType,c=i&&i.disableAnimation;if(f){var v=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,u,v)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(d):It(h,d,s,a),Pr(h)}if(this._updateCommon(t,a,l,n,i),f){var h=this.childAt(0);if(!c){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,Ut(h,d,s,a)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,n,i,o){var s=this.childAt(0),l=t.hostModel,u,f,c,v,h,d,p,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,c=i.selectItemStyle,v=i.focus,h=i.blurScope,p=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,d=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),c=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),h=_.get("blurScope"),d=_.get("disabled"),p=ge(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=so(t.getItemVisual(a,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(a,"style"),w=x.fill;if(s instanceof ke){var T=s.style;s.useStyle(W({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(W({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(a,"liftZ"),M=this._z2;C!=null?M==null&&(this._z2=s.z2,s.z2+=C):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;xe(s,p,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:w,defaultOpacity:x.opacity});function I(k){return D?t.getName(k):ds(t,k)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),Zt(this,v,h,d)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,n){var i=this.childAt(0),o=gt(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Rn(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Rn(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return Rs(t.getItemVisual(a,"symbolSize"))},e.getSymbolZ2=function(t,a){return t.getItemVisual(a,"z2")},e}(lt);function o4(r,e){this.parent.drift(r,e)}const Lu=i4;function Rd(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function Ux(r){return r!=null&&!vt(r)&&(r={isIgnore:r}),r||{}}function Yx(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:ge(e),cursorStyle:e.get("cursor")}}var s4=function(){function r(e){this.group=new lt,this._SymbolCtor=e||Lu}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=Ux(t);var a=this.group,n=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Yx(e),u={disableAnimation:s},f=t.getSymbolPoint||function(c){return e.getItemLayout(c)};i||a.removeAll(),e.diff(i).add(function(c){var v=f(c);if(Rd(e,v,c,t)){var h=new o(e,c,l,u);h.setPosition(v),e.setItemGraphicEl(c,h),a.add(h)}}).update(function(c,v){var h=i.getItemGraphicEl(v),d=f(c);if(!Rd(e,d,c,t)){a.remove(h);return}var p=e.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==p)a.remove(h),h=new o(e,c,l,u),h.setPosition(d);else{h.updateData(e,c,l,u);var y={x:d[0],y:d[1]};s?h.attr(y):It(h,y,n)}a.add(h),e.setItemGraphicEl(c,h)}).remove(function(c){var v=i.getItemGraphicEl(c);v&&v.fadeOut(function(){a.remove(v)},n)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,n){var i=e._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Yx(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=Ux(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0?t=a[0]:a[1]<0&&(t=a[1]),t}function iI(r,e,t,a){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,a),o[1-i]=n,e.dataToPoint(o)}function u4(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,n){t.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function f4(r,e,t,a,n,i,o,s){for(var l=u4(r,e),u=[],f=[],c=[],v=[],h=[],d=[],p=[],g=nI(n,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=n||p<0)break;if(Hi(y,m)){if(l){p+=i;continue}break}if(p===t)r[i>0?"moveTo":"lineTo"](y,m),c=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){p+=i;continue}if(o>0){for(var b=p+i,x=e[b*2],w=e[b*2+1];x===y&&w===m&&g=a||Hi(x,w))h=y,d=m;else{M=x-u,D=w-f;var P=y-u,k=x-y,R=m-f,B=w-m,E=void 0,V=void 0;if(s==="x"){E=Math.abs(P),V=Math.abs(k);var O=M>0?1:-1;h=y-O*E*o,d=m,I=y+O*V*o,L=m}else if(s==="y"){E=Math.abs(R),V=Math.abs(B);var N=D>0?1:-1;h=y,d=m-N*E*o,I=y,L=m+N*V*o}else E=Math.sqrt(P*P+R*R),V=Math.sqrt(k*k+B*B),C=V/(V+E),h=y-M*o*(1-C),d=m-D*o*(1-C),I=y+M*o*C,L=m+D*o*C,I=sn(I,ln(x,y)),L=sn(L,ln(w,m)),I=ln(I,sn(x,y)),L=ln(L,sn(w,m)),M=I-y,D=L-m,h=y-M*E/V,d=m-D*E/V,h=sn(h,ln(u,y)),d=sn(d,ln(f,m)),h=ln(h,sn(u,y)),d=ln(d,sn(f,m)),M=y-h,D=m-d,I=y+M*V/E,L=m+D*V/E}r.bezierCurveTo(c,v,h,d,y,m),c=I,v=L}else r.lineTo(y,m)}u=y,f=m,p+=i}return g}var oI=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),c4=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:G.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new oI},e.prototype.buildPath=function(t,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&Hi(n[o*2-2],n[o*2-1]);o--);for(;i=0){var S=u?(d-l)*_+l:(h-s)*_+s;return u?[t,S]:[S,t]}s=h,l=d;break;case o.C:h=i[c++],d=i[c++],p=i[c++],g=i[c++],y=i[c++],m=i[c++];var b=u?xc(s,h,p,y,t,f):xc(l,d,g,m,t,f);if(b>0)for(var x=0;x=0){var S=u?_e(l,d,g,m,w):_e(s,h,p,y,w);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(Tt),v4=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(oI),sI=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new v4},e.prototype.buildPath=function(t,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&Hi(n[s*2-2],n[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):n&&t.push(o(n,l,0),o(n,l,e));break}else n&&(t.push(o(n,l,0)),n=null),t.push(l),i=l}return t}function p4(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(i){var l=e.getAxis(n),u=Y(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,c=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var v=d4(u,n==="x"?t.getWidth():t.getHeight()),h=v.length;if(!h&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var d=10,p=v[0].coord-d,g=v[h-1].coord+d,y=g-p;if(y<.001)return"transparent";A(v,function(_){_.offset=(_.coord-p)/y}),v.push({offset:h?v[h-1].offset:.5,color:c[1]||"transparent"}),v.unshift({offset:h?v[0].offset:.5,color:c[0]||"transparent"});var m=new Cs(0,0,0,0,v,!0);return m[n]=p,m[n+"2"]=g,m}}}function g4(r,e,t){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(n&&y4(i,e))){var o=e.mapDimension(i.dim),s={};return A(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function y4(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function m4(r,e){return isNaN(r)||isNaN(e)}function _4(r){for(var e=r.length/2;e>0&&m4(r[e*2-2],r[e*2-1]);e--);return e-1}function jx(r,e){return[r[e*2],r[e*2+1]]}function S4(r,e,t){for(var a=r.length/2,n=t==="x"?0:1,i,o,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function fI(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var V=d.getState("emphasis").style;V.lineWidth=+d.style.lineWidth+1}gt(d).seriesIndex=t.seriesIndex,Zt(d,R,B,E);var O=Kx(t.get("smooth")),N=t.get("smoothMonotone");if(d.setShape({smooth:O,smoothMonotone:N,connectNulls:w}),p){var z=s.getCalculationInfo("stackedOnSeries"),$=0;p.useStyle(ct(u.getAreaStyle(),{fill:I,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),z&&($=Kx(z.get("smooth"))),p.setShape({smooth:O,stackedOnSmooth:$,smoothMonotone:N,connectNulls:w}),pe(p,t,"areaStyle"),gt(p).seriesIndex=t.seriesIndex,Zt(p,R,B,E)}var H=this._changePolyState;s.eachItemGraphicEl(function(Z){Z&&(Z.onHoverStateChange=H)}),this._polyline.onHoverStateChange=H,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=f,this._step=M,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,d),p&&this.packEventData(t,p))},e.prototype.packEventData=function(t,a){gt(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,n,i){var o=t.getData(),s=Yi(o,i);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],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var v=t.get("zlevel")||0,h=t.get("z")||0;u=new Lu(o,s),u.x=f,u.y=c,u.setZ(v,h);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=v,d.z=h,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Ht.prototype.highlight.call(this,t,a,n,i)},e.prototype.downplay=function(t,a,n,i){var o=t.getData(),s=Yi(o,i);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 Ht.prototype.downplay.call(this,t,a,n,i)},e.prototype._changePolyState=function(t){var a=this._polygon;Rc(this._polyline,t),a&&Rc(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new c4({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new sI({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");ot(f)&&(f=f(null));var c=u.get("animationDelay")||0,v=ot(c)?c(null):c;t.eachItemGraphicEl(function(h,d){var p=h;if(p){var g=[h.x,h.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,b=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=n;i?(y=x.x,m=x.x+x.width,_=h.x):(y=x.y+x.height,m=x.y,_=h.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=ot(c)?c(d):f*w+v,C=p.getSymbolPath(),M=C.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,n){var i=t.getModel("endLabel");if(fI(t)){var o=t.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 Lt({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=_4(l);f>=0&&(xe(s,ge(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:f,defaultText:function(c,v,h){return h!=null?aI(o,h):ds(o,c)},enableTextSetter:!0},x4(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,n,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var c=n.getLayout("points"),v=n.hostModel,h=v.get("connectNulls"),d=s.get("precision"),p=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?p:0)*(m?-1:1),x=(y?0:-p)*(m?-1:1),w=y?"x":"y",T=S4(c,S,w),C=T.range,M=C[1]-C[0],D=void 0;if(M>=1){if(M>1&&!h){var I=jx(c,C[0]);u.attr({x:I[0]+b,y:I[1]+x}),o&&(D=v.getRawValue(C[0]))}else{var I=f.getPointOn(S,w);I&&u.attr({x:I[0]+b,y:I[1]+x});var L=v.getRawValue(C[0]),P=v.getRawValue(C[1]);o&&(D=mM(n,d,L,P,T.t))}i.lastFrameIndex=C[0]}else{var k=t===1||i.lastFrameIndex>0?C[0]:0,I=jx(c,k);o&&(D=v.getRawValue(k)),u.attr({x:I[0]+b,y:I[1]+x})}if(o){var R=Ms(u);typeof R.setLabelText=="function"&&R.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,c=t.hostModel,v=f4(this._data,t,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),h=v.current,d=v.stackedOnCurrent,p=v.next,g=v.stackedOnNext;if(o&&(d=un(v.stackedOnCurrent,v.current,n,o,l),h=un(v.current,null,n,o,l),g=un(v.stackedOnNext,v.next,n,o,l),p=un(v.next,null,n,o,l)),qx(h,p)>3e3||f&&qx(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),f&&(f.stopAnimation(),f.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=h;var y={shape:{points:p}};v.current!==h&&(y.shape.__points=v.next),u.stopAnimation(),It(u,y,c),f&&(f.setShape({points:h,stackedOnPoints:d}),f.stopAnimation(),It(f,{shape:{stackedOnPoints:g}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),c=a.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(c||1),h=Math.round(s/v);if(isFinite(h)&&h>1){i==="lttb"?e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/h)):i==="minmax"&&e.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/h));var d=void 0;K(i)?d=T4[i]:ot(i)&&(d=i),d&&e.setData(n.downSample(n.mapDimension(u.dim),1/h,d,C4))}}}}}function A4(r){r.registerChartView(w4),r.registerSeriesModel(n4),r.registerLayout(Ru("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,cI("line"))}var vI=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return ja(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(n)A(i.getAxes(),function(v,h){if(v.type==="category"&&a!=null){var d=v.getTicksCoords(),p=v.getTickModel().get("alignWithLabel"),g=o[h],y=a[h]==="x1"||a[h]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[h]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,b=0;bg){_=(x+m)/2;break}b===1&&(S=w-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[h]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;s[c]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e}(qt);qt.registerClass(vI);const Qc=vI;var M4=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return ja(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,n){return n.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=Hn(Qc.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:G.color.primary,borderWidth:2}},realtimeSort:!1}),e}(Qc);const D4=M4;var L4=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}(),I4=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new L4},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,c=a.endAngle,v=a.clockwise,h=Math.PI*2,d=v?c-fMath.PI/2&&fs)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,n,i){if(this._isOrderChangedWithinSameData(t,a,n)){var o=this._dataSort(t,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,n){var i=a.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){Ba(i,t,gt(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Ht),Jx={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,i=r.y+r.height,o=Ed(e.x,r.x),s=Od(e.x+e.width,n),l=Ed(e.y,r.y),u=Od(e.y+e.height,i),f=sn?s:o,e.y=c&&l>i?u:l,e.width=f?0:s-o,e.height=c?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),f||c},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var n=Od(e.r,r.r),i=Ed(e.r0,r.r0);e.r=n,e.r0=i;var o=n-i<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},Qx={cartesian2d:function(r,e,t,a,n,i,o,s,l){var u=new bt({shape:W({},a),z2:1});if(u.__dataIndex=t,u.name="item",i){var f=u.shape,c=n?"height":"width";f[c]=0}return u},polar:function(r,e,t,a,n,i,o,s,l){var u=!n&&l?tv:Xe,f=new u({shape:a,z2:1});f.name="item";var c=hI(n);if(f.calculateTextPosition=P4(c,{isRoundCap:u===tv}),i){var v=f.shape,h=n?"r":"endAngle",d={};v[h]=n?a.r0:a.startAngle,d[h]=a[h],(s?It:Ut)(f,{shape:d},i)}return f}};function O4(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function tb(r,e,t,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?It:Ut)(t,{shape:l},e,n,null);var f=e?r.baseAxis.model:null;(o?It:Ut)(t,{shape:u},f,n)}function eb(r,e){for(var t=0;t0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function V4(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function hI(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function ab(r,e,t,a,n,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var f=r.shape,c=ha(a.getModel("itemStyle"),f,!0);W(f,c),r.setShape(f)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=a.getShallow("cursor");v&&r.attr("cursor",v);var h=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",d=ge(a);xe(r,d,{labelFetcher:i,labelDataIndex:t,defaultText:ds(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var p=r.getTextContent();if(s&&p){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,R4(r,g==="outside"?h:g,hI(o),a.get(["label","rotate"]))}yD(p,d,i.getRawValue(t),function(m){return aI(e,m)});var y=a.getModel(["emphasis"]);Zt(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),pe(r,a),V4(n)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function z4(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,n,i)}var G4=function(){function r(){}return r}(),nb=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new G4},e.prototype.buildPath=function(t,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function F4(r,e,t){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,c=i.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function dI(r,e,t){if(On(t,"cartesian2d")){var a=e,n=t.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=t.getArea(),i=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function H4(r,e,t){var a=r.type==="polar"?Xe:bt;return new a({shape:dI(e,t,r),silent:!0,z2:0})}const W4=E4;function $4(r){r.registerChartView(W4),r.registerSeriesModel(D4),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,mt(d2,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,p2("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,cI("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var sb=Math.PI*2,Cf=Math.PI/180;function U4(r,e,t){e.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=VD(a,t),s=o.cx,l=o.cy,u=o.r,f=o.r0,c=o.viewRect,v=-a.get("startAngle")*Cf,h=a.get("endAngle"),d=a.get("padAngle")*Cf;h=h==="auto"?v-sb:-h*Cf;var p=a.get("minAngle")*Cf,g=p+d,y=0;n.each(i,function(B){!isNaN(B)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),b=a.get("roseType"),x=a.get("stillShowZeroSum"),w=n.getDataExtent(i);w[0]=0;var T=S?1:-1,C=[v,h],M=T*d/2;Bv(C,!S),v=C[0],h=C[1];var D=pI(a);D.startAngle=v,D.endAngle=h,D.clockwise=S,D.cx=s,D.cy=l,D.r=u,D.r0=f;var I=Math.abs(h-v),L=I,P=0,k=v;if(n.setLayout({viewRect:c,r:u}),n.each(i,function(B,E){var V;if(isNaN(B)){n.setItemLayout(E,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:f,r:b?NaN:u});return}b!=="area"?V=m===0&&x?_:B*_:V=I/y,VV?(N=k+T*V/2,z=N):(N=k+M,z=O-M),n.setItemLayout(E,{angle:V,startAngle:N,endAngle:z,clockwise:S,cx:s,cy:l,r0:f,r:b?Et(B,w,[f,u]):u}),k=O}),Lt?y:g,b=Math.abs(_.label.y-t);if(b>=S.maxY){var x=_.label.x-e-_.len2*n,w=a+_.len,T=Math.abs(x)r.unconstrainedWidth?null:v:null;a.setStyle("width",h)}yI(i,a)}}}function yI(r,e){ub.rect=r,G2(ub,e,X4)}var X4={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},ub={};function Bd(r){return r.position==="center"}function q4(r){var e=r.getData(),t=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*Y4,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,c=s.y,v=s.height;function h(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}e.each(function(x){var w=e.getItemGraphicEl(x),T=w.shape,C=w.getTextContent(),M=w.getTextGuideLine(),D=e.getItemModel(x),I=D.getModel("label"),L=I.get("position")||D.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),k=I.get("alignTo"),R=q(I.get("edgeDistance"),u),B=I.get("bleedMargin");B==null&&(B=Math.min(u,v)>200?10:2);var E=D.getModel("labelLine"),V=E.get("length");V=q(V,u);var O=E.get("length2");if(O=q(O,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":z>0?"left":"right"}var Nt=Math.PI,Vt=0,me=I.get("rotate");if(At(me))Vt=me*(Nt/180);else if(L==="center")Vt=0;else if(me==="radial"||me===!0){var ar=z<0?-N+Nt:-N;Vt=ar}else if(me==="tangential"&&L!=="outside"&&L!=="outer"){var Ke=Math.atan2(z,$);Ke<0&&(Ke=Nt*2+Ke);var Wn=$>0;Wn&&(Ke=Nt+Ke),Vt=Ke-Nt}if(i=!!Vt,C.x=H,C.y=Z,C.rotation=Vt,C.setStyle({verticalAlign:"middle"}),J){C.setStyle({align:nt});var ch=C.states.select;ch&&(ch.x+=C.x,ch.y+=C.y)}else{var ho=new dt(0,0,0,0);yI(ho,C),t.push({label:C,labelLine:M,position:L,len:V,len2:O,minTurnAngle:E.get("minTurnAngle"),maxSurfaceAngle:E.get("maxSurfaceAngle"),surfaceNormal:new ft(z,$),linePoints:Q,textAlign:nt,labelDistance:P,labelAlignTo:k,edgeDistance:R,bleedMargin:B,rect:ho,unconstrainedWidth:ho.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:J})}}),!i&&r.get("avoidLabelOverlap")&&Z4(t,a,n,l,u,v,f,c);for(var p=0;p0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c=i.r0}},e.type="pie",e}(Ht);const J4=j4;function Os(r,e,t){e=U(e)&&{coordDimensions:e}||W({encodeDefine:r.getEncode()},e);var a=r.getSource(),n=Mu(a,e).dimensions,i=new Ye(n,r);return i.initData(a,t),i}var Q4=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}();const Bs=Q4;var tH=wt(),mI=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bs(j(this.getData,this),j(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Os(this,{coordDimensions:["value"],encodeDefaulter:mt(Qm,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),n=tH(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=HO(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){Ui(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(qt);VV({fullType:mI.type,getCoord2:function(r){return r.getShallow("center")}});const eH=mI;function rH(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(At(o)&&!isNaN(o)&&o<0)})}}}function aH(r){r.registerChartView(J4),r.registerSeriesModel(eH),PL("pie",r.registerAction),r.registerLayout(mt(U4,"pie")),r.registerProcessor(Es("pie")),r.registerProcessor(rH("pie"))}var nH=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return ja(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,a,n){return n.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:G.color.primary}},universalTransition:{divideShape:"clone"}},e}(qt);const iH=nH;var _I=4,oH=function(){function r(){}return r}(),sH=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new oH},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]<_I,f=this.softClipShape,c;if(u){this._ctx=l;return}for(this._ctx=null,c=this._off;c=0;u--){var f=u*2,c=i[f]-s/2,v=i[f+1]-l/2;if(t>=c&&a>=v&&t<=c+s&&a<=v+l)return u}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,c=-1/0,v=0;v=0&&(u.dataIndex=c+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const uH=lH;var fH=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Ru("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new uH:new Iu,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Ht);const cH=fH;var SI={left:0,right:0,top:0,bottom:0},ev=["25%","25%"],vH=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,a){var n=io(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&t.outerBounds&&ba(t.outerBounds,n)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&ba(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:SI,outerBoundsContain:"all",outerBoundsClampWidth:ev[0],outerBoundsClampHeight:ev[1],backgroundColor:G.color.transparent,borderWidth:1,borderColor:G.color.neutral30},e}(Dt);const hH=vH;var yy=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",Jt).models[0]},e.type="cartesian2dAxis",e}(Dt);ce(yy,Du);var xI={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:G.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:G.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:G.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[G.color.backgroundTint,G.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:G.color.neutral00,borderColor:G.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},dH=St({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},xI),D0=St({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:G.color.axisMinorSplitLine,width:1}}},xI),pH=St({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},D0),gH=ct({logBase:10},D0);const bI={category:dH,value:D0,time:pH,log:gH};var yH={value:1,category:1,time:1,log:1},my=null;function mH(r){my||(my=r)}function ku(){return my}function ps(r,e,t,a){A(yH,function(n,i){var o=St(St({},bI[i],!0),a,!0),s=function(l){F(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var v=Ql(this),h=v?io(f):{},d=c.getTheme();St(f,d.get(i+"Axis")),St(f,this.getDefaultOption()),f.type=fb(f),v&&ba(f,h,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=iu.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){var c=ku();return c?c.updateModelAxisBreak(this,f):{breaks:[]}},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",fb)}function fb(r){return r.type||(r.data?"category":"value")}var _H=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return Y(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Ot(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}();const SH=_H;var _y=["x","y"];function cb(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var xH=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=_y,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!cb(t)||!cb(a))){var n=t.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,v=o[0]-n[0]*f,h=o[1]-i[0]*c,d=this._transform=[f,0,0,c,v,h];this._invTransform=Wr([],d)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var n=this.dataToPoint(t),i=this.dataToPoint(a),o=this.getArea(),s=new dt(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return ne(n,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},e.prototype.clampData=function(t,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(t[0]),u=i.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a,n){if(n=n||[],this._invTransform)return ne(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),a),n[1]=o.coordToData(o.toLocalCoord(t[1]),a),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-t,o=Math.min(n[0],n[1])-t,s=Math.max(a[0],a[1])-i+t,l=Math.max(n[0],n[1])-o+t;return new dt(i,o,s,l)},e}(SH),bH=function(r){F(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Xr);const wI=bH;var rh="expandAxisBreak",TI="collapseAxisBreak",CI="toggleAxisBreak",L0="axisbreakchanged",wH={type:rh,event:L0,update:"update",refineEvent:I0},TH={type:TI,event:L0,update:"update",refineEvent:I0},CH={type:CI,event:L0,update:"update",refineEvent:I0};function I0(r,e,t,a){var n=[];return A(r,function(i){n=n.concat(i.eventBreaks)}),{eventContent:{breaks:n}}}function AH(r){r.registerAction(wH,e),r.registerAction(TH,e),r.registerAction(CH,e);function e(t,a){var n=[],i=rs(a,t);function o(s,l){A(i[s],function(u){var f=u.updateAxisBreaks(t);A(f.breaks,function(c){var v;n.push(ct((v={},v[l]=u.componentIndex,v),c))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:n}}}var xn=Math.PI,MH=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],DH=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],gs=wt(),AI=wt(),MI=function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,a=e.componentIndex,n=this.recordMap,i=n[t]||(n[t]=[]);return i[a]||(i[a]={ready:{}})},r}();function LH(r,e,t,a){var n=t.axis,i=e.ensureRecord(t),o=[],s,l=P0(r.axisName)&&hs(r.nameLocation);A(a,function(d){var p=wa(d);if(!(!p||p.label.ignore)){o.push(p);var g=i.transGroup;l&&(g.transform?Wr(Qs,g.transform):Dv(Qs),p.transform&&da(Qs,Qs,p.transform),dt.copy(Af,p.localRect),Af.applyTransform(Qs),s?s.union(Af):dt.copy(s=new dt(0,0,0,0),Af))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",f=i.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-f)-Math.abs(p.label[u]-f)}),l&&s){var c=n.getExtent(),v=Math.min(c[0],c[1]),h=Math.max(c[0],c[1])-v;s.union(new dt(v,0,h,1))}i.stOccupiedRect=s,i.labelInfoList=o}var Qs=Ae(),Af=new dt(0,0,0,0),DI=function(r,e,t,a,n,i){if(hs(r.nameLocation)){var o=i.stOccupiedRect;o&&LI(oF({},o,i.transGroup.transform),a,n)}else II(i.labelInfoList,i.dirVec,a,n)};function LI(r,e,t){var a=new ft;th(r,e,a,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&fy(e,a)}function II(r,e,t,a){for(var n=ft.dot(a,e)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):Yl(n-xn)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),IH=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],PH={axisLine:function(r,e,t,a,n,i,o){var s=a.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=a.axis.getExtent(),u=i.transform,f=[l[0],0],c=[l[1],0],v=f[0]>c[0];u&&(ne(f,f,u),ne(c,c,u));var h=W({lineCap:"round"},a.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:h};if(a.get(["axisLine","breakLine"])&&a.axis.scale.hasBreaks())ku().buildAxisBreakLine(a,n,i,d);else{var p=new de(W({shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]}},d));us(p.shape,p.style.lineWidth),p.anid="line",n.add(p)}var g=a.get(["axisLine","symbol"]);if(g!=null){var y=a.get(["axisLine","symbolSize"]);K(g)&&(g=[g,g]),(K(y)||At(y))&&(y=[y,y]);var m=so(a.get(["axisLine","symbolOffset"])||0,y),_=y[0],S=y[1];A([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-c[0])*(f[0]-c[0])+(f[1]-c[1])*(f[1]-c[1]))}],function(b,x){if(g[x]!=="none"&&g[x]!=null){var w=fe(g[x],-_/2,-S/2,_,S,h.stroke,!0),T=b.r+b.offset,C=v?c:f;w.attr({rotation:b.rotate,x:C[0]+T*Math.cos(r.rotation),y:C[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),n.add(w)}})}}},axisTickLabelEstimate:function(r,e,t,a,n,i,o,s){var l=hb(e,n,s);l&&vb(r,e,t,a,n,i,o,Ur.estimate)},axisTickLabelDetermine:function(r,e,t,a,n,i,o,s){var l=hb(e,n,s);l&&vb(r,e,t,a,n,i,o,Ur.determine);var u=OH(r,n,i,a);EH(r,e.labelLayoutList,u),BH(r,n,i,a,r.tickDirection)},axisName:function(r,e,t,a,n,i,o,s){var l=t.ensureRecord(a);e.nameEl&&(n.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(P0(u)){var f=r.nameLocation,c=r.nameDirection,v=a.getModel("nameTextStyle"),h=a.get("nameGap")||0,d=a.axis.getExtent(),p=a.axis.inverse?-1:1,g=new ft(0,0),y=new ft(0,0);f==="start"?(g.x=d[0]-p*h,y.x=-p):f==="end"?(g.x=d[1]+p*h,y.x=p):(g.x=(d[0]+d[1])/2,g.y=r.labelOffset+c*h,y.y=c);var m=Ae();y.transform(zn(m,m,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*xn/180);var S,b;hs(f)?S=Wi.innerTextLayout(r.rotation,_??r.rotation,c):(S=RH(r.rotation,f,_||0,d),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(S.rotation)),!isFinite(b)&&(b=null)));var x=v.getFont(),w=a.get("nameTruncate",!0)||{},T=w.ellipsis,C=Pe(r.raw.nameTruncateMaxWidth,w.maxWidth,b),M=s.nameMarginLevel||0,D=new Lt({x:g.x,y:g.y,rotation:S.rotation,silent:Wi.isLabelSilent(a),style:Ft(v,{text:u,font:x,overflow:"truncate",width:C,ellipsis:T,fill:v.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:v.get("align")||S.textAlign,verticalAlign:v.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(Ka({el:D,componentModel:a,itemName:u}),D.__fullText=u,D.anid="name",a.get("triggerEvent")){var I=Wi.makeAxisEventDataBase(a);I.targetType="axisName",I.name=u,gt(D).eventData=I}i.add(D),D.updateTransform(),e.nameEl=D;var L=l.nameLayout=wa({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:hs(f)?MH[M]:DH[M]});if(l.nameLocation=f,n.add(D),D.decomposeTransform(),r.shouldNameMoveOverlap&&L){var P=t.ensureRecord(a);t.resolveAxisNameOverlap(r,t,a,L,y,P)}}}};function vb(r,e,t,a,n,i,o,s){RI(e)||NH(r,e,n,s,a,o);var l=e.labelLayoutList;VH(r,a,l,i),FH(a,r.rotation,l);var u=r.optionHideOverlap;kH(a,l,u),u&&F2(Ot(l,function(f){return f&&!f.label.ignore})),LH(r,t,a,l)}function RH(r,e,t,a){var n=sM(t-r),i,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Yl(n-xn/2)?(o=l?"bottom":"top",i="center"):Yl(n-xn*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nxn/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function kH(r,e,t){if(T2(r.axis))return;function a(s,l,u){var f=wa(e[l]),c=wa(e[u]);if(!(!f||!c)){if(s===!1||f.suggestIgnore){Tl(f.label);return}if(c.suggestIgnore){Tl(c.label);return}var v=.1;if(!t){var h=[0,0,0,0];f=cy({marginForce:h},f),c=cy({marginForce:h},c)}th(f,c,null,{touchThreshold:v})&&Tl(s?c.label:f.label)}}var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=e.length;a(n,0,1),a(i,o-1,o-2)}function EH(r,e,t){r.showMinorTicks||A(e,function(a){if(a&&a.label.ignore)for(var n=0;nu[0]&&isFinite(d)&&isFinite(u[0]);)h=xd(h),d=u[1]-h*o;else{var g=r.getTicks().length-1;g>o&&(h=xd(h));var y=h*o;p=Math.ceil(u[1]/h)*h,d=oe(p-y),d<0&&u[0]>=0?(d=0,p=oe(y)):p>0&&u[1]<=0&&(p=0,d=-oe(y))}var m=(n[0].value-i[0].value)/s,_=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+h*m,p+h*_),a.setInterval.call(r,h),(m||_)&&a.setNiceExtent.call(r,d+h,p-h)}var pb=[[3,1],[0,2]],UH=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_y,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=Ct(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var v=+l[c],h=o[v],d=h.model,p=h.scale;iy(p)&&d.get("alignTicks")&&d.get("interval")==null?f.push(h):(vs(p,d),iy(p)&&(s=h))}f.length&&(s||(s=f.pop(),vs(s.scale,s.model)),A(f,function(g){kI(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};A(a.x,function(o){gb(a,"y",o,i)}),A(a.y,function(o){gb(a,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var n=ye(e,t),i=this._rect=Xt(e.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(xy(o,i),!a){var u=XH(i,s,o,l,t),f=void 0;if(l)by?(by(this._axesList,i),xy(o,i)):f=_b(i.clone(),"axisLabel",null,i,o,u,n);else{var c=qH(e,i,n),v=c.outerBoundsRect,h=c.parsedOuterBoundsContain,d=c.outerBoundsClamp;v&&(f=_b(v,h,d,i,o,u,n))}EI(i,o,Ur.determine,null,f,n)}A(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}vt(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n0})==null;return qi(a,s,!0,!0,t),xy(n,a),l;function u(v){A(n[yt[v]],function(h){if(su(h.model)){var d=i.ensureRecord(h.model),p=d.labelInfoList;if(p)for(var g=0;g0&&!Ne(h)&&h>1e-4&&(v/=h),v}}function XH(r,e,t,a,n){var i=new MI(KH);return A(t,function(o){return A(o,function(s){if(su(s.model)){var l=!a;s.axisBuilder=WH(r,e,s.model,n,i,l)}})}),i}function EI(r,e,t,a,n,i){var o=t===Ur.determine;A(e,function(u){return A(u,function(f){su(f.model)&&($H(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[yt[1-u]]=r[le[u]]<=i.refContainer[le[u]]*.5?0:1-u===1?2:1}A(e,function(u,f){return A(u,function(c){su(c.model)&&((a==="all"||o)&&c.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&c.axisBuilder.build({axisLine:!0}))})})}function qH(r,e,t){var a,n=r.get("outerBoundsMode",!0);n==="same"?a=e.clone():(n==null||n==="auto")&&(a=Xt(r.get("outerBounds",!0)||SI,t.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||_t(["all","axisLabel"],i)<0?o="all":o=i;var s=[Dc(it(r.get("outerBoundsClampWidth",!0),ev[0]),e.width),Dc(it(r.get("outerBoundsClampHeight",!0),ev[1]),e.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var KH=function(r,e,t,a,n,i){var o=t.axis.dim==="x"?"y":"x";DI(r,e,t,a,n,i),hs(r.nameLocation)||A(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&II(s.labelInfoList,s.dirVec,a,n)})};const jH=UH;function JH(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return QH(t,r,e),t.seriesInvolved&&eW(t,r),t}function QH(r,e,t){var a=e.getComponent("tooltip"),n=e.getComponent("axisPointer"),i=n.get("link",!0)||[],o=[];A(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=fu(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,c=f.getModel("tooltip",a);if(A(s.getAxes(),mt(p,!1,null)),s.getTooltipAxes&&a&&c.get("show")){var v=c.get("trigger")==="axis",h=c.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(c.get(["axisPointer","axis"]));(v||h)&&A(d.baseAxes,mt(p,h?"cross":!0,v)),h&&A(d.otherAxes,mt(p,"cross",!1))}function p(g,y,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!g&&!wy(_))){y==null&&(y=_.get("triggerTooltip")),_=g?tW(m,c,n,e,g,y):_;var b=_.get("snap"),x=_.get("triggerEmphasis"),w=fu(m.model),T=y||b||m.type==="category",C=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:x,involveSeries:T,snap:b,useHandle:wy(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||T;var M=rW(i,m);if(M!=null){var D=o[M]||(o[M]={axesInfo:{}});D.axesInfo[w]=C,D.mapper=i[M].mapper,C.linkGroup=D}}}})}function tW(r,e,t,a,n,i){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(v){l[v]=st(o.get(v))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!i){var c=l.lineStyle=o.get("crossStyle");c&&ct(u,c.textStyle)}}return r.model.getModel("axisPointer",new Pt(l,t,a))}function eW(r,e){e.eachSeries(function(t){var a=t.coordinateSystem,n=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!a||!a.model||n==="none"||n===!1||n==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[fu(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function rW(r,e){for(var t=e.model,a=e.dim,n=0;n=0||r===e}function aW(r){var e=R0(r);if(e){var t=e.axisPointerModel,a=e.axis.scale,n=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=wy(t);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var cW=wt();function bb(r,e,t,a){if(r instanceof wI){var n=r.scale.type;if(n!=="category"&&n!=="ordinal")return t}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?GI(t,o,u,a):vW(r,e,t,a,o,l):t}function GI(r,e,t,a){if(t===null)return r+(Math.random()-.5)*e;var n=t-a*2,i=Math.min(Math.max(0,e),n);return r+(Math.random()-.5)*i}function vW(r,e,t,a,n,i){var o=cW(r);o.items||(o.items=[]);var s=o.items,l=wb(s,e,t,a,n,i,1),u=wb(s,e,t,a,n,i,-1),f=Math.abs(l-t)n/2||c&&v>c/2-a?GI(t,n,c,a):(s.push({fixedCoord:e,floatCoord:f,r:a}),f)}function wb(r,e,t,a,n,i,o){for(var s=t,l=0;ln/2)return Number.MAX_VALUE;if(o===1&&d>s||o===-1&&d0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=ct({color:d.color},l));var g=St(st(d),{boundaryGap:t,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:p,triggerEvent:v},!1);if(K(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else ot(f)&&(g.name=f(g.name,g));var m=new Pt(g,null,this.ecModel);return ce(m,Du.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:G.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:St({lineStyle:{color:G.color.neutral20}},tl.axisLine),axisLabel:Mf(tl.axisLabel,!1),axisTick:Mf(tl.axisTick,!1),splitLine:Mf(tl.splitLine,!0),splitArea:Mf(tl.splitArea,!0),indicator:[]},e}(Dt);const wW=bW;var TW=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll(),this._buildAxes(t,n),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,a){var n=t.coordinateSystem,i=n.getIndicatorAxes(),o=Y(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Ya(s.model,a,{axisName:l,position:[n.cx,n.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});A(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),c=s.get("show"),v=l.get("color"),h=u.get("color"),d=U(v)?v:[v],p=U(h)?h:[h],g=[],y=[];function m(k,R,B){var E=B%R.length;return k[E]=k[E]||[],E}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,b=a.cy,x=0;x<_.length;x++){if(f){var w=m(g,d,x);g[w].push(new Gn({shape:{cx:S,cy:b,r:_[x].coord}}))}if(c&&x<_.length-1){var w=m(y,p,x);y[w].push(new Gv({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,C=Y(n,function(k,R){var B=k.getTicksCoords();return T=T==null?B.length-1:Math.min(B.length-1,T),Y(B,function(E){return a.coordToPoint(E.coord,R)})}),M=[],x=0;x<=T;x++){for(var D=[],I=0;I3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var c=Math.abs(i),v=(i>0?1:-1)*(c>3?.4:c>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(Ab(this._zr,"globalPan")||el(t))){var a=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,a,n,i,o){t._checkPointer(i,o.originX,o.originY)&&(Fa(i.event),i.__ecRoamConsumed=!0,Mb(t,a,n,i,o))},e}(Rr);function el(r){return r.__ecRoamConsumed}var BW=wt();function ah(r){var e=BW(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function rl(r,e,t,a){for(var n=ah(r),i=n.roam,o=i[e]=i[e]||[],s=0;s=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&s!=null&&l!=null&&(c=YI(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var h=n;n=new lt,n.add(h),h.scaleX=h.scaleY=c.scale,h.x=c.x,h.y=c.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new bt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:c,named:i}},r.prototype._parseNode=function(e,t,a,n,i,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var f=zd[s];if(f&&tt(zd,s)){l=f.call(this,e,t);var c=e.getAttribute("name");if(c){var v={name:c,namedFrom:null,svgNodeTagLower:s,el:l};a.push(v),s==="g"&&(u=v)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var h=Pb[s];if(h&&tt(Pb,s)){var d=h.call(this,e),p=e.getAttribute("id");p&&(this._defs[p]=d)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var a=new Xl({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});pr(t,a),nr(e,a,this._defsUsePending,!1,!1),GW(a,t);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=function(){zd={g:function(e,t){var a=new lt;return pr(t,a),nr(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new bt;return pr(t,a),nr(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new Gn;return pr(t,a),nr(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new de;return pr(t,a),nr(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new Bm;return pr(t,a),nr(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),n;a&&(n=Eb(a));var i=new qe({shape:{points:n||[]},silent:!0});return pr(t,i),nr(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var a=e.getAttribute("points"),n;a&&(n=Eb(a));var i=new Ge({shape:{points:n||[]},silent:!0});return pr(t,i),nr(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var a=new ke;return pr(t,a),nr(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new lt;return pr(t,s),nr(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),n=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new lt;return pr(t,s),nr(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",n=ZM(a);return pr(t,n),nr(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),Pb={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new Cs(e,t,a,n);return Rb(r,i),kb(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new oD(e,t,a);return Rb(r,n),kb(r,n),n}};function Rb(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function kb(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};UI(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000",s=i.stopOpacity||t.getAttribute("stop-opacity");if(s){var l=er(o),u=l&&l[3];u&&(l[3]*=Cn(s),o=pa(l,"rgba"))}e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function pr(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),ct(e.__inheritedStyle,r.__inheritedStyle))}function Eb(r){for(var e=ih(r),t=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=ih(o);switch(n=n||Ae(),s){case"translate":_a(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":ym(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":zn(n,n,-parseFloat(l[0])*Gd,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Gd);da(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*Gd);da(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var Bb=/([^\s:;]+)\s*:\s*([^:;]+)/g;function UI(r,e,t){var a=r.getAttribute("style");if(a){Bb.lastIndex=0;for(var n;(n=Bb.exec(a))!=null;){var i=n[1],o=tt(av,i)?av[i]:null;o&&(e[o]=n[2]);var s=tt(nv,i)?nv[i]:null;s&&(t[s]=n[2])}}}function YW(r,e,t){for(var a=0;a0,m={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,g,t,a),this._updateMapSelectHandler(e,u,a,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=at(),a=at(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(h,d){return d&&(h=d(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function c(h){for(var d=[],p=!u&&l&&l.project,g=0;g=0)&&(v=n);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;xe(e,ge(a),{labelFetcher:v,labelDataIndex:c,defaultText:t},h);var d=e.getTextContent();if(d&&(ZI(d).ignore=d.ignore,e.textConfig&&o)){var p=e.getBoundingRect().clone();e.textConfig.layoutRect=p,e.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function Fb(r,e,t,a,n,i){r.data?r.data.setItemGraphicEl(i,e):gt(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:a&&a.option||{}}}function Hb(r,e,t,a,n){r.data||Ka({el:e,componentModel:n,itemName:t,itemTooltipOption:a.get("tooltip")})}function Wb(r,e,t,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return Zt(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&xN(e,n,t),o}function $b(r,e,t){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),A(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill=G.color.neutral00,n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:G.color.tertiary},itemStyle:{borderWidth:.5,borderColor:G.color.border,areaColor:G.color.background},emphasis:{label:{show:!0,color:G.color.primary},itemStyle:{areaColor:G.color.highlight}},select:{label:{show:!0,color:G.color.primary},itemStyle:{color:G.color.highlight}},nameProperty:"name"},e}(qt);const d$=h$;function p$(r,e){var t={};return A(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=t[i].length,f=0;f1?(_.width=m,_.height=m/p):(_.height=m,_.width=m*p),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var S=r.getBoxLayoutParams();S.aspect=p,_=Xt(S,d),_=zD(r,_,p)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function S$(r,e){A(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var x$=function(){function r(){this.dimensions=qI}return r.prototype.create=function(e,t){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new Xb(l+s,l,W({nameMap:o.get("nameMap"),api:t,ecModel:e},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=qb,u.resize(o,t)}),e.eachSeries(function(o){Cu({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",Jt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),A(i,function(o,s){var l=Y(o,function(f){return f.get("nameMap")}),u=new Xb(s,s,W({nameMap:hm(l),api:t,ecModel:e},n(o[0])));u.zoomLimit=Pe.apply(null,Y(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=qb,u.resize(o[0],t),A(o,function(f){f.coordinateSystem=u,S$(u,f)})}),a},r.prototype.getFilledRegions=function(e,t,a,n){for(var i=(e||[]).slice(),o=at(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function I$(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){R$(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=k$(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function P$(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function Kb(r){return arguments.length?r:B$}function Cl(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function R$(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function k$(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,c=s.hierNode.modifier;s=Fd(s),i=Hd(i),s&&i;){n=Fd(n),o=Hd(o),n.hierNode.ancestor=r;var v=s.hierNode.prelim+c-i.hierNode.prelim-u+a(s,i);v>0&&(O$(E$(s,r,t),r,v),u+=v,l+=v),c+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!Fd(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=c-l),i&&!Hd(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,t=r)}return t}function Fd(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Hd(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function E$(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function O$(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function B$(r,e){return r.parentNode===e.parentNode?1:2}var N$=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),V$=function(r){F(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:G.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new N$},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,c=1-f,v=q(a.forkPosition,1),h=[];h[f]=o[f],h[c]=o[c]+(l[c]-o[c])*v,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[f]=s[f],t.lineTo(h[0],h[1]),h[f]=l[f],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var d=1;dm.x,b||(S=S-Math.PI));var w=b?"left":"right",T=s.getModel("label"),C=T.get("rotate"),M=C*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:C==null?-S:M,origin:"center"}),D.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?Hl(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(gt(t).focus=L),G$(n,o,f,t,d,h,p,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var k=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);k&&k.hoverState===Su||Rc(t.__edge,P)}})}function G$(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),c=r.getOrient(),v=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(p||(p=a.__edge=new Fv({shape:Ay(f,c,v,n,n)})),It(p,{shape:Ay(f,c,v,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,n=r.targetNode;if(K(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function rP(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function G0(r,e){var t=rP(r);return _t(t,e)>=0}function oh(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var j$=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new Pt(n,this,this.ecModel),o=z0.createTree(a,this,s);function s(c){c.wrapMethod("getItemModel",function(v,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(v.parentModel=i),v})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var v=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=v&&v.collapsed!=null?!v.collapsed:c.depth<=f}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ue("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=oh(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:G.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(qt);const J$=j$;function Q$(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(n[i])}}function tU(r,e){r.eachSeriesByType("tree",function(t){eU(t,e)})}function eU(r,e){var t=ye(r,e).refContainer,a=Xt(r.getBoxLayoutParams(),t);r.layoutInfo=a;var n=r.get("layout"),i=0,o=0,s=null;n==="radial"?(i=2*Math.PI,o=Math.min(a.height,a.width)/2,s=Kb(function(S,b){return(S.parentNode===b.parentNode?1:2)/S.depth})):(i=a.width,o=a.height,s=Kb());var l=r.getData().tree.root,u=l.children[0];if(u){L$(l),Q$(u,I$,s),l.hierNode.modifier=-u.hierNode.prelim,il(u,P$);var f=u,c=u,v=u;il(u,function(S){var b=S.getLayout().x;bc.getLayout().x&&(c=S),S.depth>v.depth&&(v=S)});var h=f===c?1:s(f,c)/2,d=h-f.getLayout().x,p=0,g=0,y=0,m=0;if(n==="radial")p=i/(c.getLayout().x+h+d),g=o/(v.depth-1||1),il(u,function(S){y=(S.getLayout().x+d)*p,m=(S.depth-1)*g;var b=Cl(y,m);S.setLayout({x:b.x,y:b.y,rawX:y,rawY:m},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=o/(c.getLayout().x+h+d),p=i/(v.depth-1||1),il(u,function(S){m=(S.getLayout().x+d)*g,y=_==="LR"?(S.depth-1)*p:i-(S.depth-1)*p,S.setLayout({x:y,y:m},!0)})):(_==="TB"||_==="BT")&&(p=i/(c.getLayout().x+h+d),g=o/(v.depth-1||1),il(u,function(S){y=(S.getLayout().x+d)*p,m=_==="TB"?(S.depth-1)*g:o-(S.depth-1)*g,S.setLayout({x:y,y:m},!0)}))}}}function rU(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");W(s,o)})})}function aU(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=nh(i,e,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}function nU(r){r.registerChartView(F$),r.registerSeriesModel(J$),r.registerLayout(tU),r.registerVisual(rU),aU(r)}var ew=["treemapZoomToNode","treemapRender","treemapMove"];function iU(r){for(var e=0;e1;)i=i.parentNode;var o=Ug(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var oU=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};nP(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Pt({itemStyle:o},this,a);i=t.levels=sU(i,a);var l=Y(i||[],function(c){return new Pt(c,s,a)},this),u=z0.createTree(n,this,f);function f(c){c.wrapMethod("getItemModel",function(v,h){var d=u.getNodeByDataIndex(h),p=d?l[d.depth]:null;return v.parentModel=p||s,v})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return ue("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=oh(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},W(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=at(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){aP(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:G.size.l,top:G.size.xxxl,right:G.size.l,bottom:G.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:G.size.m,emptyItemWidth:25,itemStyle:{color:G.color.backgroundShade,textStyle:{color:G.color.secondary}},emphasis:{itemStyle:{color:G.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:G.color.neutral00,overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:G.color.neutral00,borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(qt);function nP(r){var e=0;A(r.children,function(a){nP(a);var n=a.value;U(n)&&(n=n[0]),e+=n});var t=r.value;U(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),U(r.value)?r.value[0]=t:r.value=t}function sU(r,e){var t=zt(e.get("color")),a=zt(e.get(["aria","decal","decals"]));if(t){r=r||[];var n,i;A(r,function(s){var l=new Pt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}const lU=oU;var uU=8,rw=8,Wd=5,fU=function(){function r(e){this.group=new lt,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),c=ye(e,t).refContainer,v={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},h={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},d=Xt(v,c);this._prepare(a,h,u),this._renderContent(e,h,d,s,l,u,f,n),Zv(o,v,c)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=he(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+uU*2,t.emptyItemWidth);t.totalWidth+=s+rw,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s,l){for(var u=0,f=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),v=t.totalWidth,h=t.renderList,d=i.getModel("itemStyle").getItemStyle(),p=h.length-1;p>=0;p--){var g=h[p],y=g.node,m=g.width,_=g.text;v>a.width&&(v-=m-f,m=f,_=null);var S=new qe({shape:{points:cU(u,0,m,c,p===h.length-1,p===0)},style:ct(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Lt({style:Ft(o,{text:_})}),textConfig:{position:"inside"},z2:Ts*1e4,onclick:mt(l,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Ft(s,{text:_}),S.ensureState("emphasis").style=d,Zt(S,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(S),vU(S,e,y),u+=m+rw}},r.prototype.remove=function(){this.group.removeAll()},r}();function cU(r,e,t,a,n,i){var o=[[n?r:r-Wd,e],[r+t,e],[r+t,e+a],[n?r:r-Wd,e+a]];return!i&&o.splice(2,0,[r+t+Wd,e+a/2]),!n&&o.push([r,e+a/2]),o}function vU(r,e,t){gt(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&oh(t,e)}}const hU=fU;var dU=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;nnw||Math.abs(t.dy)>nw)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new dt(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var c=f.zoom=f.zoom||1;if(c*=i,u){var v=u.min||0,h=u.max||1/0;c=Math.max(Math.min(h,c),v)}var d=c/f.zoom;f.zoom=c;var p=this.seriesModel.layoutInfo;a-=p.x,n-=p.y;var g=Ae();_a(g,g,[-a,-n]),ym(g,g,[d,d]),_a(g,g,[a,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(i){var o=a.findTarget(n.offsetX,n.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&Bc(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new hU(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(G0(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=ol(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(Ht);function ol(){return{nodeGroup:[],background:[],content:[]}}function SU(r,e,t,a,n,i,o,s,l,u){if(!o)return;var f=o.getLayout(),c=r.getData(),v=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var h=f.width,d=f.height,p=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,b=_&&_.length,x=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),C=v.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,D=Z("nodeGroup",My);if(!D)return;if(l.add(D),D.x=f.x||0,D.y=f.y||0,D.markRedraw(),iv(D).nodeWidth=h,iv(D).nodeHeight=d,f.isAboveViewRoot)return D;var I=Z("background",aw,u,yU);I&&O(D,I,b&&f.upperLabelHeight);var L=v.getModel("emphasis"),P=L.get("focus"),k=L.get("blurScope"),R=L.get("disabled"),B=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Kl(D)&&Li(D,!1),I&&(Li(I,!R),c.setItemGraphicEl(o.dataIndex,I),kg(I,B,k));else{var E=Z("content",aw,u,mU);E&&N(D,E),I.disableMorphing=!0,I&&Kl(I)&&Li(I,!1),Li(D,!R),c.setItemGraphicEl(o.dataIndex,D);var V=v.getShallow("cursor");V&&E.attr("cursor",V),kg(D,B,k)}return D;function O(J,X,ht){var rt=gt(X);if(rt.dataIndex=o.dataIndex,rt.seriesIndex=r.seriesIndex,X.setShape({x:0,y:0,width:h,height:d,r:M}),g)z(X);else{X.invisible=!1;var pt=o.getVisual("style"),Bt=pt.stroke,Mt=sw(x);Mt.fill=Bt;var Nt=_i(w);Nt.fill=w.get("borderColor");var Vt=_i(T);Vt.fill=T.get("borderColor");var me=_i(C);if(me.fill=C.get("borderColor"),ht){var ar=h-2*p;$(X,Bt,pt.opacity,{x:p,y:0,width:ar,height:S})}else X.removeTextContent();X.setStyle(Mt),X.ensureState("emphasis").style=Nt,X.ensureState("blur").style=Vt,X.ensureState("select").style=me,Xi(X)}J.add(X)}function N(J,X){var ht=gt(X);ht.dataIndex=o.dataIndex,ht.seriesIndex=r.seriesIndex;var rt=Math.max(h-2*p,0),pt=Math.max(d-2*p,0);if(X.culling=!0,X.setShape({x:p,y:p,width:rt,height:pt,r:M}),g)z(X);else{X.invisible=!1;var Bt=o.getVisual("style"),Mt=Bt.fill,Nt=sw(x);Nt.fill=Mt,Nt.decal=Bt.decal;var Vt=_i(w),me=_i(T),ar=_i(C);$(X,Mt,Bt.opacity,null),X.setStyle(Nt),X.ensureState("emphasis").style=Vt,X.ensureState("blur").style=me,X.ensureState("select").style=ar,Xi(X)}J.add(X)}function z(J){!J.invisible&&i.push(J)}function $(J,X,ht,rt){var pt=v.getModel(rt?ow:iw),Bt=he(v.get("name"),null),Mt=pt.getShallow("show");xe(J,ge(v,rt?ow:iw),{defaultText:Mt?Bt:null,inheritColor:X,defaultOpacity:ht,labelFetcher:r,labelDataIndex:o.dataIndex});var Nt=J.getTextContent();if(Nt){var Vt=Nt.style,me=Av(Vt.padding||0);rt&&(J.setTextConfig({layoutRect:rt}),Nt.disableLabelLayout=!0),Nt.beforeUpdate=function(){var Ke=Math.max((rt?rt.width:J.shape.width)-me[1]-me[3],0),Wn=Math.max((rt?rt.height:J.shape.height)-me[0]-me[2],0);(Vt.width!==Ke||Vt.height!==Wn)&&Nt.setStyle({width:Ke,height:Wn})},Vt.truncateMinChar=2,Vt.lineOverflow="truncate",H(Vt,rt,f);var ar=Nt.getState("emphasis");H(ar?ar.style:null,rt,f)}}function H(J,X,ht){var rt=J?J.text:null;if(!X&&ht.isLeafRoot&&rt!=null){var pt=r.get("drillDownIcon",!0);J.text=pt?pt+" "+rt:rt}}function Z(J,X,ht,rt){var pt=m!=null&&t[J][m],Bt=n[J];return pt?(t[J][m]=null,Q(Bt,pt)):g||(pt=new X,pt instanceof Ir&&(pt.z2=xU(ht,rt)),nt(Bt,pt)),e[J][y]=pt}function Q(J,X){var ht=J[y]={};X instanceof My?(ht.oldX=X.x,ht.oldY=X.y):ht.oldShape=W({},X.shape)}function nt(J,X){var ht=J[y]={},rt=o.parentNode,pt=X instanceof lt;if(rt&&(!a||a.direction==="drillDown")){var Bt=0,Mt=0,Nt=n.background[rt.getRawIndex()];!a&&Nt&&Nt.oldShape&&(Bt=Nt.oldShape.width,Mt=Nt.oldShape.height),pt?(ht.oldX=0,ht.oldY=Mt):ht.oldShape={x:Bt,y:Mt,width:0,height:0}}ht.fadein=!pt}}function xU(r,e){return r*gU+e}const bU=_U;var vu=A,wU=vt,ov=-1,F0=function(){function r(e){var t=e.mappingMethod,a=e.type,n=this.option=st(e);this.type=a,this.mappingMethod=t,this._normalizeData=AU[t];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?($d(n),TU(n)):t==="category"?n.categories?CU(n):$d(n,!0):(ze(t!=="linear"||n.dataExtent),$d(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return j(this._normalizeData,this)},r.listVisualTypes=function(){return Ct(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){vt(e)?A(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var n,i=U(e)?[]:vt(e)?{}:(n=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},a;return e&&vu(r.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(U(e))e=e.slice();else if(wU(e)){var t=[];vu(e,function(a,n){t.push(n)}),e=t}else return[];return e.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var n,i=1/0,o=0,s=t.length;o=0;i--)a[i]==null&&(delete t[e[i]],e.pop())}function $d(r,e){var t=r.visual,a=[];vt(t)?vu(t,function(i){a.push(i)}):t!=null&&a.push(t);var n={color:1,symbol:1};!e&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),iP(r,a)}function Lf(r){return{applyVisual:function(e,t,a){var n=this.mapValueToVisual(e);a("color",r(t("color"),n))},_normalizedToVisual:Dy([0,1])}}function lw(r){var e=this.option.visual;return e[Math.round(Et(r,[0,1],[0,e.length-1],!0))]||{}}function sl(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function Al(r){var e=this.option.visual;return e[this.option.loop&&r!==ov?r%e.length:r]}function Si(){return this.option.visual[0]}function Dy(r){return{linear:function(e){return Et(e,r,this.option.visual,!0)},category:Al,piecewise:function(e,t){var a=Ly.call(this,t);return a==null&&(a=Et(e,r,this.option.visual,!0)),a},fixed:Si}}function Ly(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=F0.findPieceIndex(r,t),n=t[a];if(n&&n.visual)return n.visual[this.type]}}function iP(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=Y(e,function(t){var a=er(t);return a||[0,0,0,1]})),e}var AU={linear:function(r){return Et(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=F0.findPieceIndex(r,e,!0);if(t!=null)return Et(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??ov},fixed:ae};function If(r,e,t){return r?e<=t:e=t.length||p===t[p.depth]){var y=RU(n,l,p,g,d,a);sP(p,y,t,a)}})}}}function LU(r,e,t){var a=W({},e),n=t.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function uw(r){var e=Ud(r,"color");if(e){var t=Ud(r,"colorAlpha"),a=Ud(r,"colorSaturation");return a&&(e=An(e,null,null,a)),t&&(e=bc(e,t)),e}}function IU(r,e){return e!=null?An(e,null,null,r):null}function Ud(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function PU(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Yd(e,"color")||n.color!=null&&n.color!=="none"&&(Yd(e,"colorAlpha")||Yd(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(f==="index"||f==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var v=new Re(c);return oP(v).drColorMappingBy=f,v}}}function Yd(r,e){var t=r.get(e);return U(t)&&t.length?{name:e,range:t}:null}function RU(r,e,t,a,n,i){var o=W({},e);if(n){var s=n.type,l=s==="color"&&oP(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var hu=Math.max,sv=Math.min,fw=Pe,H0=A,lP=["itemStyle","borderWidth"],kU=["itemStyle","gapWidth"],EU=["upperLabel","show"],OU=["upperLabel","height"];const BU={seriesType:"treemap",reset:function(r,e,t,a){var n=r.option,i=ye(r,t).refContainer,o=Xt(r.getBoxLayoutParams(),i),s=n.size||[],l=q(fw(o.width,s[0]),i.width),u=q(fw(o.height,s[1]),i.height),f=a&&a.type,c=["treemapZoomToNode","treemapRootToNode"],v=cu(a,c,r),h=f==="treemapRender"||f==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),p=rP(d);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?HU(r,v,d,l,u):h?[h.width,h.height]:[l,u],y=n.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:n.squareRatio,sort:y,leafDepth:n.leafDepth};d.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};d.setLayout(_),uP(d,m,!1,0),_=d.getLayout(),H0(p,function(b,x){var w=(p[x+1]||d).getValue();b.setLayout(W({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var S=r.getData().tree.root;S.setLayout(WU(o,h,v),!0),r.setLayoutInfo(o),fP(S,new dt(-o.x,-o.y,t.getWidth(),t.getHeight()),p,d,0)}};function uP(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(lP),u=s.get(kU)/2,f=cP(s),c=Math.max(l,f),v=l-u,h=c-u;r.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:f},!0),n=hu(n-2*v,0),i=hu(i-v-h,0);var d=n*i,p=NU(r,s,d,e,t,a);if(p.length){var g={x:v,y:h,width:n,height:i},y=sv(n,i),m=1/0,_=[];_.area=0;for(var S=0,b=p.length;S=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function FU(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=e*e*t;return l?hu(u*a/l,l/(u*n)):1/0}function cw(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],f=e?r.area/e:0;(n||f>t[l[o]])&&(f=t[l[o]]);for(var c=0,v=r.length;ch1&&(u=h1),i=s}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);c[0].8?"left":v[0]<-.8?"right":"center",p=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*y+f[0],i.y=-v[1]*m+f[1],d=v[0]>.8?"right":v[0]<-.8?"left":"center",p=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+f[0],i.y=f[1]+C,d=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+C,d="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+c[0],i.y=c[1]+C,d=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},e}(lt);const Y0=s8;var l8=function(){function r(e){this.group=new lt,this._LineCtor=e||Y0}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=yw(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=yw(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!u8(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function yw(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:ge(e)}}function mw(r){return isNaN(r[0])||isNaN(r[1])}function jd(r){return r&&!mw(r[0])&&!mw(r[1])}const Z0=l8;var Jd=[],Qd=[],tp=[],ko=Ce,ep=Oi,_w=Math.abs;function Sw(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){Jd[0]=ko(a[0],n[0],i[0],f),Jd[1]=ko(a[1],n[1],i[1],f);var c=_w(ep(Jd,e)-l);c=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function rp(r,e){var t=[],a=Wl,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[Oa(u[0]),Oa(u[1])],u[2]&&u.__original.push(Oa(u[2])));var v=u.__original;if(u[2]!=null){if(We(n[0],v[0]),We(n[1],v[2]),We(n[2],v[1]),f&&f!=="none"){var h=Dl(s.node1),d=Sw(n,v[0],h*e);a(n[0][0],n[1][0],n[2][0],d,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],d,t),n[0][1]=t[3],n[1][1]=t[4]}if(c&&c!=="none"){var h=Dl(s.node2),d=Sw(n,v[1],h*e);a(n[0][0],n[1][0],n[2][0],d,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],d,t),n[1][1]=t[1],n[2][1]=t[2]}We(u[0],n[0]),We(u[1],n[2]),We(u[2],n[1])}else{if(We(i[0],v[0]),We(i[1],v[1]),Mi(o,i[1],i[0]),xs(o,o),f&&f!=="none"){var h=Dl(s.node1);Qp(i[0],i[0],o,h*e)}if(c&&c!=="none"){var h=Dl(s.node2);Qp(i[1],i[1],o,-h*e)}We(u[0],i[0]),We(u[1],i[1])}})}var mP=wt();function f8(r){if(r)return mP(r).bridge}function xw(r,e){r&&(mP(r).bridge=e)}function bw(r){return r.type==="view"}var c8=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new Iu,i=new Z0,o=this.group,s=new lt;this._controller=new co(a.getZr()),this._controllerHost={target:s},s.add(n.group),s.add(i.group),o.add(s),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem,s=!1;this._model=t,this._api=n,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(n);var u=this._symbolDraw,f=this._lineDraw;if(bw(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(c):It(this._mainGroup,c,t)}rp(t.getGraph(),Ml(t));var v=t.getData();u.updateData(v);var h=t.getEdgeData();f.updateData(h),this._updateNodeAndLinkScale(),this._updateController(null,t,n),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&(s=!0,this._startForceLayoutIteration(d,n,p));var g=t.get("layout");v.graph.eachNode(function(S){var b=S.dataIndex,x=S.getGraphicEl(),w=S.getModel();if(x){x.off("drag").off("dragend");var T=w.get("draggable");T&&x.on("drag",function(M){switch(g){case"force":d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,n,p),d.setFixed(b),v.setItemLayout(b,[x.x,x.y]);break;case"circular":v.setItemLayout(b,[x.x,x.y]),S.setLayout({fixed:!0},!0),U0(t,"symbolSize",S,[M.offsetX,M.offsetY]),i.updateLayout(t);break;case"none":default:v.setItemLayout(b,[x.x,x.y]),$0(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){d&&d.setUnfixed(b)}),x.setDraggable(T,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(gt(x).focus=S.getAdjacentDataIndices())}}),v.graph.eachEdge(function(S){var b=S.getGraphicEl(),x=S.getModel().get(["emphasis","focus"]);b&&x==="adjacency"&&(gt(b).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var y=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=v.getLayout("cx"),_=v.getLayout("cy");v.graph.eachNode(function(S){pP(S,y,m,_)}),this._firstRender=!1,s||this._renderThumbnail(t,n,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a,n){var i=this,o=!1;(function s(){t.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,a,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(n?i._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(t,a,n){var i=this._controller,o=this._controllerHost,s=a.coordinateSystem;if(!bw(s)){i.disable();return}i.enable(a.get("roam"),{api:n,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(l,u,f){return s.containPoint([u,f])},isInClip:function(l,u,f){return!t||t.contain(u,f)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(t,a,n){this._active&&(E0(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,a,n){this._active&&(O0(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),rp(t.getGraph(),Ml(t)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=Ml(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){this._active&&(rp(t.getGraph(),Ml(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},e.prototype._getThumbnailInfo=function(){var t=this._model,a=t.coordinateSystem;if(a.type==="view"){var n=f8(t);if(n)return{bridge:n,coordSys:a}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,a,n,i){var o=this._getThumbnailInfo();if(o){var s=new lt,l=n.group.children(),u=i.group.children(),f=new lt,c=new lt;s.add(c),s.add(f);for(var v=0;v=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof xi||(t=this._nodesMap[Eo(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&!e.hasKey(d)&&(e.set(d,!0),o.push(h.node1))}for(l=0;l=0&&!e.hasKey(_)&&(e.set(_,!0),s.push(m.node2))}}}return{edge:e.keys(),node:t.keys()}},r}(),_P=function(){function r(e,t,a){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=a??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,a=t.edgeData.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=at(),t=at();e.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i=0&&!e.hasKey(c)&&(e.set(c,!0),a.push(f.node1))}for(i=0;i=0&&!e.hasKey(p)&&(e.set(p,!0),n.push(d.node2))}return{edge:e.keys(),node:t.keys()}},r}();function SP(r,e){return{getValue:function(t){var a=this[r][e];return a.getStore().get(a.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,a){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}ce(xi,SP("hostGraph","data"));ce(_P,SP("hostGraph","edgeData"));const d8=h8;function X0(r,e,t,a,n){for(var i=new d8(a),o=0;o "+v)),u++)}var h=t.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar"||h==="matrix")d=ja(r,t);else{var p=Tu.get(h),g=p?p.dimensions||[]:[];_t(g,"value")<0&&g.concat(["value"]);var y=Mu(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;d=new Ye(y,t),d.initData(r)}var m=new Ye(["value"],t);return m.initData(l,s),n&&n(d,m),tP({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var p8=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new Bs(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Ui(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){KU(this);var s=X0(i,n,this,!0,l);return A(s.edges,function(u){jU(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),y=p[g];return y&&(y.parentModel=d.parentModel,d.parentModel=y),d});var c=Pt.prototype.getModel;function v(d,p){var g=c.call(this,d,p);return g.resolveParentPath=h,g}f.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=v,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ue("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var c=xL({series:this,dataIndex:t,multipleSeries:a});return c},e.prototype._updateCategoriesData=function(){var t=Y(this.option.categories||[],function(n){return n.value!=null?n:W({value:0},n)}),a=new Ye(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:G.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:G.color.primary}}},e}(qt);const g8=p8;function y8(r){r.registerChartView(v8),r.registerSeriesModel(g8),r.registerProcessor(UU),r.registerVisual(YU),r.registerVisual(ZU),r.registerLayout(JU),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,t8),r.registerLayout(r8),r.registerCoordinateSystem("graphView",{dimensions:vo.dimensions,create:n8}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},ae),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},ae),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=a.getViewOfSeriesModel(n);i&&(e.dx!=null&&e.dy!=null&&i.updateViewOnPan(n,a,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&i.updateViewOnZoom(n,a,e));var o=n.coordinateSystem,s=nh(o,e,n.get("scaleLimit"));n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}var m8=function(r){F(e,r);function e(t,a,n){var i=r.call(this)||this;gt(i).dataType="node",i.z2=2;var o=new Lt;return i.setTextContent(o),i.updateData(t,a,n,!0),i}return e.prototype.updateData=function(t,a,n,i){var o=this,s=t.graph.getNodeByIndex(a),l=t.hostModel,u=s.getModel(),f=u.getModel("emphasis"),c=t.getItemLayout(a),v=W(ha(u.getModel("itemStyle"),c,!0),c),h=this;if(isNaN(v.startAngle)){h.setShape(v);return}i?h.setShape(v):It(h,{shape:v},l,a);var d=W(ha(u.getModel("itemStyle"),c,!0),c);o.setShape(d),o.useStyle(t.getItemVisual(a,"style")),pe(o,u),this._updateLabel(l,u,s),t.setItemGraphicEl(a,h),pe(h,u,"itemStyle");var p=f.get("focus");Zt(this,p==="adjacency"?s.getAdjacentDataIndices():p,f.get("blurScope"),f.get("disabled"))},e.prototype._updateLabel=function(t,a,n){var i=this.getTextContent(),o=n.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),f=a.getModel("label");i.ignore=!f.get("show");var c=ge(a),v=n.getVisual("style");xe(i,c,{labelFetcher:{getFormattedLabel:function(m,_,S,b,x,w){return t.getFormattedLabel(m,_,"node",b,fr(x,c.normal&&c.normal.get("formatter"),a.get("name")),w)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:v.fill,defaultOpacity:v.opacity,defaultOutsidePosition:"startArc"});var h=f.get("position")||"outside",d=f.get("distance")||0,p;h==="outside"?p=o.r+d:p=(o.r+o.r0)/2,this.textConfig={inside:h!=="outside"};var g=h!=="outside"?f.get("align")||"center":l>0?"left":"right",y=h!=="outside"?f.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*p+o.cx,y:u*p+o.cy,rotation:0,style:{align:g,verticalAlign:y}})},e}(Xe);const ww=m8;var _8=function(r){F(e,r);function e(t,a,n,i){var o=r.call(this)||this;return gt(o).dataType="edge",o.updateData(t,a,n,i,!0),o}return e.prototype.buildPath=function(t,a){t.moveTo(a.s1[0],a.s1[1]);var n=.7,i=a.clockwise;t.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!i),t.bezierCurveTo((a.cx-a.s2[0])*n+a.s2[0],(a.cy-a.s2[1])*n+a.s2[1],(a.cx-a.t1[0])*n+a.t1[0],(a.cy-a.t1[1])*n+a.t1[1],a.t1[0],a.t1[1]),t.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!i),t.bezierCurveTo((a.cx-a.t2[0])*n+a.t2[0],(a.cy-a.t2[1])*n+a.t2[1],(a.cx-a.s1[0])*n+a.s1[0],(a.cy-a.s1[1])*n+a.s1[1],a.s1[0],a.s1[1]),t.closePath()},e.prototype.updateData=function(t,a,n,i,o){var s=t.hostModel,l=a.graph.getEdgeByIndex(n),u=l.getLayout(),f=l.node1.getModel(),c=a.getItemModel(l.dataIndex),v=c.getModel("lineStyle"),h=c.getModel("emphasis"),d=h.get("focus"),p=W(ha(f.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){g.setShape(p);return}o?(g.setShape(p),Tw(g,l,t,v)):(Pr(g),Tw(g,l,t,v),It(g,{shape:p},s,n)),Zt(this,d==="adjacency"?l.getAdjacentDataIndices():d,h.get("blurScope"),h.get("disabled")),pe(g,c,"lineStyle"),a.setItemGraphicEl(l.dataIndex,g)},e}(Tt);function Tw(r,e,t,a){var n=e.node1,i=e.node2,o=r.style;r.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=t.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"target":o.fill=t.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=t.getItemVisual(n.dataIndex,"style").fill,u=t.getItemVisual(i.dataIndex,"style").fill;if(K(l)&&K(u)){var f=r.shape,c=(f.s1[0]+f.s2[0])/2,v=(f.s1[1]+f.s2[1])/2,h=(f.t1[0]+f.t2[0])/2,d=(f.t1[1]+f.t2[1])/2;o.fill=new Cs(c,v,h,d,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var S8=Math.PI/180,x8=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){},e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group,l=-t.get("startAngle")*S8;if(i.diff(o).add(function(f){var c=i.getItemLayout(f);if(c){var v=new ww(i,f,l);gt(v).dataIndex=f,s.add(v)}}).update(function(f,c){var v=o.getItemGraphicEl(c),h=i.getItemLayout(f);if(!h){v&&Ba(v,t,c);return}v?v.updateData(i,f,l):v=new ww(i,f,l),s.add(v)}).remove(function(f){var c=o.getItemGraphicEl(f);c&&Ba(c,t,f)}).execute(),!o){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=q(u[0],n.getWidth()),this.group.originY=q(u[1],n.getHeight()),Ut(this.group,{scaleX:1,scaleY:1},t)}this._data=i,this.renderEdges(t,l)},e.prototype.renderEdges=function(t,a){var n=t.getData(),i=t.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new _8(n,i,l,a);gt(u).dataIndex=l,s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(n,i,l,a),s.add(f)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&Ba(u,t,l)}).execute(),this._edgeData=i},e.prototype.dispose=function(){},e.type="chord",e}(Ht);const b8=x8;var w8=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new Bs(j(this.getData,this),j(this.getRawData,this))},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[];if(i&&n){var o=X0(i,n,this,!0,s);return o.data}function s(l,u){var f=Pt.prototype.getModel;function c(h,d){var p=f.call(this,h,d);return p.resolveParentPath=v,p}u.wrapMethod("getItemModel",function(h){return h.resolveParentPath=v,h.getModel=c,h});function v(h){if(h&&(h[0]==="label"||h[1]==="label")){var d=h.slice();return h[0]==="label"?d[0]="edgeLabel":h[1]==="label"&&(d[1]="edgeLabel"),d}return h}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){var i=this.getDataParams(t,n);if(n==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(t),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ue("nameValue",{name:f.join(" > "),value:i.value,noValue:i.value==null})}return ue("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(a==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(t);if(n.name==null&&(n.name=i.getName(t)),n.value==null){var s=o.getLayout().value;n.value=s}}return n},e.type="series.chord",e.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},e}(qt);const T8=w8;var ap=Math.PI/180;function C8(r,e){r.eachSeriesByType("chord",function(t){A8(t,e)})}function A8(r,e){var t=r.getData(),a=t.graph,n=r.getEdgeData(),i=n.count();if(i){var o=VD(r,e),s=o.cx,l=o.cy,u=o.r,f=o.r0,c=Math.max((r.get("padAngle")||0)*ap,0),v=Math.max((r.get("minAngle")||0)*ap,0),h=-r.get("startAngle")*ap,d=h+Math.PI*2,p=r.get("clockwise"),g=p?1:-1,y=[h,d];Bv(y,!p);var m=y[0],_=y[1],S=_-m,b=t.getSum("value")===0&&n.getSum("value")===0,x=[],w=0;a.eachEdge(function(E){var V=b?1:E.getValue("value");b&&(V>0||v)&&(w+=2);var O=E.node1.dataIndex,N=E.node2.dataIndex;x[O]=(x[O]||0)+V,x[N]=(x[N]||0)+V});var T=0;if(a.eachNode(function(E){var V=E.getValue("value");isNaN(V)||(x[E.dataIndex]=Math.max(V,x[E.dataIndex]||0)),!b&&(x[E.dataIndex]>0||v)&&w++,T+=x[E.dataIndex]||0}),!(w===0||T===0)){c*w>=Math.abs(S)&&(c=Math.max(0,(Math.abs(S)-v*w)/w)),(c+v)*w>=Math.abs(S)&&(v=(Math.abs(S)-c*w)/w);var C=(S-c*w*g)/T,M=0,D=0,I=0;a.eachNode(function(E){var V=x[E.dataIndex]||0,O=C*(T?V:1)*g;Math.abs(O)D){var P=M/D;a.eachNode(function(E){var V=E.getLayout().angle;Math.abs(V)>=v?E.setLayout({angle:V*P,ratio:P},!0):E.setLayout({angle:v,ratio:v===0?1:V/v},!0)})}else a.eachNode(function(E){if(!L){var V=E.getLayout().angle,O=Math.min(V/I,1),N=O*M;V-Nv&&v>0){var O=L?1:Math.min(V/I,1),N=V-v,z=Math.min(N,Math.min(k,M*O));k-=z,E.setLayout({angle:V-z,ratio:(V-z)/V},!0)}else v>0&&E.setLayout({angle:v,ratio:V===0?1:v/V},!0)}});var R=m,B=[];a.eachNode(function(E){var V=Math.max(E.getLayout().angle,v);E.setLayout({cx:s,cy:l,r0:f,r:u,startAngle:R,endAngle:R+V*g,clockwise:p},!0),B[E.dataIndex]=R,R+=(V+c)*g}),a.eachEdge(function(E){var V=b?1:E.getValue("value"),O=C*(T?V:1)*g,N=E.node1.dataIndex,z=B[N]||0,$=Math.abs((E.node1.getLayout().ratio||1)*O),H=z+$*g,Z=[s+f*Math.cos(z),l+f*Math.sin(z)],Q=[s+f*Math.cos(H),l+f*Math.sin(H)],nt=E.node2.dataIndex,J=B[nt]||0,X=Math.abs((E.node2.getLayout().ratio||1)*O),ht=J+X*g,rt=[s+f*Math.cos(J),l+f*Math.sin(J)],pt=[s+f*Math.cos(ht),l+f*Math.sin(ht)];E.setLayout({s1:Z,s2:Q,sStartAngle:z,sEndAngle:H,t1:rt,t2:pt,tStartAngle:J,tEndAngle:ht,cx:s,cy:l,r:f,value:V,clockwise:p}),B[N]=H,B[nt]=ht})}}}function M8(r){r.registerChartView(b8),r.registerSeriesModel(T8),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,C8),r.registerProcessor(Es("chord"))}var D8=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),L8=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new D8},e.prototype.buildPath=function(t,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),f=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,f),t.lineTo(a.x+n(l)*s,a.y+i(l)*s),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(l)*s,a.y-i(l)*s),t.lineTo(u,f)},e}(Tt);const I8=L8;function P8(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=q(t[0],e.getWidth()),s=q(t[1],e.getHeight()),l=q(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Rf(r,e){var t=r==null?"":r+"";return e&&(K(e)?t=e.replace("{value}",t):ot(e)&&(t=e(r))),t}var R8=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=P8(t,n);this._renderMain(t,a,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,n,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),v=c.get("roundCap"),h=v?tv:Xe,d=c.get("show"),p=c.getModel("lineStyle"),g=p.get("width"),y=[u,f];Bv(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],b=0;d&&b=C&&(M===0?0:i[M-1][0])Math.PI/2&&(H+=Math.PI)):$==="tangential"?H=-T-Math.PI/2:At($)&&(H=$*Math.PI/180),H===0?c.add(new Lt({style:Ft(_,{text:V,x:N,y:z,verticalAlign:k<-.8?"top":k>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:O}),silent:!0})):c.add(new Lt({style:Ft(_,{text:V,x:N,y:z,verticalAlign:"middle",align:"center"},{inheritColor:O}),silent:!0,originX:N,originY:z,rotation:H}))}if(m.get("show")&&R!==S){var B=m.get("distance");B=B?B+f:f;for(var Z=0;Z<=b;Z++){P=Math.cos(T),k=Math.sin(T);var Q=new de({shape:{x1:P*(d-B)+v,y1:k*(d-B)+h,x2:P*(d-w-B)+v,y2:k*(d-w-B)+h},silent:!0,style:I});I.stroke==="auto"&&Q.setStyle({stroke:i((R+Z/b)/S)}),c.add(Q),T+=M}T-=M}else T+=C}},e.prototype._renderPointer=function(t,a,n,i,o,s,l,u,f){var c=this.group,v=this._data,h=this._progressEls,d=[],p=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),b=+t.get("max"),x=[S,b],w=[s,l];function T(M,D){var I=m.getItemModel(M),L=I.getModel("pointer"),P=q(L.get("width"),o.r),k=q(L.get("length"),o.r),R=t.get(["pointer","icon"]),B=L.get("offsetCenter"),E=q(B[0],o.r),V=q(B[1],o.r),O=L.get("keepAspect"),N;return R?N=fe(R,E-P/2,V-k,P,k,null,O):N=new I8({shape:{angle:-Math.PI/2,width:P,r:k,x:E,y:V}}),N.rotation=-(D+Math.PI/2),N.x=o.cx,N.y=o.cy,N}function C(M,D){var I=g.get("roundCap"),L=I?tv:Xe,P=g.get("overlap"),k=P?g.get("width"):f/m.count(),R=P?o.r-k:o.r-(M+1)*k,B=P?o.r:o.r-M*k,E=new L({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:R,r:B}});return P&&(E.z2=Et(m.get(_,M),[S,b],[100,0],!0)),E}(y||p)&&(m.diff(v).add(function(M){var D=m.get(_,M);if(p){var I=T(M,s);Ut(I,{rotation:-((isNaN(+D)?w[0]:Et(D,x,w,!0))+Math.PI/2)},t),c.add(I),m.setItemGraphicEl(M,I)}if(y){var L=C(M,s),P=g.get("clip");Ut(L,{shape:{endAngle:Et(D,x,w,P)}},t),c.add(L),Lg(t.seriesIndex,m.dataType,M,L),d[M]=L}}).update(function(M,D){var I=m.get(_,M);if(p){var L=v.getItemGraphicEl(D),P=L?L.rotation:s,k=T(M,P);k.rotation=P,It(k,{rotation:-((isNaN(+I)?w[0]:Et(I,x,w,!0))+Math.PI/2)},t),c.add(k),m.setItemGraphicEl(M,k)}if(y){var R=h[D],B=R?R.shape.endAngle:s,E=C(M,B),V=g.get("clip");It(E,{shape:{endAngle:Et(I,x,w,V)}},t),c.add(E),Lg(t.seriesIndex,m.dataType,M,E),d[M]=E}}).execute(),m.each(function(M){var D=m.getItemModel(M),I=D.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),k=I.get("disabled");if(p){var R=m.getItemGraphicEl(M),B=m.getItemVisual(M,"style"),E=B.fill;if(R instanceof ke){var V=R.style;R.useStyle(W({image:V.image,x:V.x,y:V.y,width:V.width,height:V.height},B))}else R.useStyle(B),R.type!=="pointer"&&R.setColor(E);R.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),R.style.fill==="auto"&&R.setStyle("fill",i(Et(m.get(_,M),x,[0,1],!0))),R.z2EmphasisLift=0,pe(R,D),Zt(R,L,P,k)}if(y){var O=d[M];O.useStyle(m.getItemVisual(M,"style")),O.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),O.z2EmphasisLift=0,pe(O,D),Zt(O,L,P,k)}}),this._progressEls=d)},e.prototype._renderAnchor=function(t,a){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=fe(s,a.cx-o/2+q(l[0],a.r),a.cy-o/2+q(l[1],a.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),c=+t.get("max"),v=new lt,h=[],d=[],p=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){h[y]=new Lt({silent:!0}),d[y]=new Lt({silent:!0})}).update(function(y,m){h[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new lt,b=i(Et(_,[f,c],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),T=o.cx+q(w[0],o.r),C=o.cy+q(w[1],o.r),M=h[y];M.attr({z2:g?0:2,style:Ft(x,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),S.add(M)}var D=m.getModel("detail");if(D.get("show")){var I=D.get("offsetCenter"),L=o.cx+q(I[0],o.r),P=o.cy+q(I[1],o.r),k=q(D.get("width"),o.r),R=q(D.get("height"),o.r),B=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,M=d[y],E=D.get("formatter");M.attr({z2:g?0:2,style:Ft(D,{x:L,y:P,text:Rf(_,E),width:isNaN(k)?null:k,height:isNaN(R)?null:R,align:"center",verticalAlign:"middle"},{inheritColor:B})}),yD(M,{normal:D},_,function(O){return Rf(O,E)}),p&&mD(M,y,l,t,{getFormattedLabel:function(O,N,z,$,H,Z){return Rf(Z?Z.interpolatedValue:_,E)}}),S.add(M)}v.add(S)}),this.group.add(v),this._titleEls=h,this._detailEls=d},e.type="gauge",e}(Ht);const k8=R8;var E8=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return Os(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,G.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:G.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:G.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:G.color.axisLabel,fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:G.color.neutral00,borderWidth:0,borderColor:G.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:G.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:G.color.transparent,borderWidth:0,borderColor:G.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:G.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(qt);const O8=E8;function B8(r){r.registerChartView(k8),r.registerSeriesModel(O8)}var N8=["itemStyle","opacity"],V8=function(r){F(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new Ge,s=new Lt;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(N8);f=f??1,n||Pr(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Ut(i,{style:{opacity:f}},o,a)):It(i,{style:{opacity:f},shape:{points:l.points}},o,a),pe(i,s),this._updateLabel(t,a),Zt(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),f=u.label,c=t.getItemVisual(a,"style"),v=c.fill;xe(o,ge(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:c.opacity,defaultText:t.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}});var h=l.getModel("label"),d=h.get("color"),p=d==="inherit"?v:null;n.setTextConfig({local:!0,inside:!!f.inside,insideStroke:p,outsideFill:p});var g=f.linePoints;i.setShape({points:g}),n.textGuideLineConfig={anchor:g?new ft(g[0][0],g[0][1]):null},It(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),x0(n,b0(l),{stroke:v})},e}(qe),z8=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new V8(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);Ba(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Ht);const G8=z8;var F8=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Bs(j(this.getData,this),j(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return Os(this,{coordDimensions:["value"],encodeDefaulter:mt(Qm,this)})},e.prototype._defaultLabelLine=function(t){Ui(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:G.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:G.color.primary}}},e}(qt);const H8=F8;function W8(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=r.count();ol6)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!ip(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function ip(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const c6=u6;var v6=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&St(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var n=t.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],n=Ot(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);A(n,function(i){t.push("dim"+i.get("dim")),a.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Dt);const h6=v6;var d6=function(r){F(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Xr);const p6=d6;function Bn(r,e,t,a,n,i){r=r||0;var o=t[1]-t[0];if(n!=null&&(n=Oo(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=Oo(s,[0,o]),n=i=Oo(s,[n,i]),a=0}e[0]=Oo(e[0],t),e[1]=Oo(e[1],t);var l=op(e,a);e[a]+=r;var u=n||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[a]=Oo(e[a],f);var c;return c=op(e,a),n!=null&&(c.sign!==l.sign||c.spani&&(e[1-a]=e[a]+c.sign*i),e}function op(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Oo(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var sp=A,bP=Math.min,wP=Math.max,Mw=Math.floor,g6=Math.ceil,Dw=oe,y6=Math.PI,m6=function(){function r(e,t,a){this.type="parallel",this._axesMap=at(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=e.dimensions,i=e.parallelAxisIndex;sp(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new p6(o,Qv(u),[0,0],u.get("type"),l)),c=f.type==="category";f.onBand=c&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,n=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=a&&o<=a+t.axisLength&&s>=n&&s<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(e.contains(a,t)){var n=a.getData();sp(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),vs(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){var a=ye(e,t).refContainer;this._rect=Xt(e.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,f=kf(e.get("axisExpandWidth"),l),c=kf(e.get("axisExpandCount")||0,[0,u]),v=e.get("axisExpandable")&&u>3&&u>c&&c>1&&f>0&&s>0,h=e.get("axisExpandWindow"),d;if(h)d=kf(h[1]-h[0],l),h[1]=h[0]+d;else{d=kf(f*(c-1),l);var p=e.get("axisExpandCenter")||Mw(u/2);h=[f*p-d/2],h[1]=h[0]+d}var g=(s-d)/(u-c);g<3&&(g=0);var y=[Mw(Dw(h[0]/f,1))+1,g6(Dw(h[1]/f,1))-1],m=g/f*h[0];return{layout:i,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[n[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),sp(a,function(o,s){var l=(n.axisExpandable?S6:_6)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:y6/2,vertical:0},c=[u[i].x+e.x,u[i].y+e.y],v=f[i],h=Ae();zn(h,h,v),_a(h,h,c),this._axesLayout[o]={position:c,rotation:v,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,n){a==null&&(a=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;fi*(1-c[0])?(u="jump",l=s-i*(1-c[2])):(l=s-i*c[1])>=0&&(l=s-i*(1-c[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?Bn(l,n,o,"all"):u="none";else{var h=n[1]-n[0],d=o[1]*s/h;n=[wP(0,d-h/2)],n[1]=bP(o[1],n[0]+h),n[0]=n[1]-h}return{axisExpandWindow:n,behavior:u}},r}();function kf(r,e){return bP(wP(r,e[0]),e[1])}function _6(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function S6(r,e){var t=e.layoutLength,a=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,f;return r=0;n--)Dr(a[n])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=a.length;iM6}function IP(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function PP(r,e,t,a){var n=new lt;return n.add(new bt({name:"main",style:J0(t),silent:!0,draggable:!0,cursor:"move",drift:mt(Rw,r,e,n,["n","s","w","e"]),ondragend:mt(Qi,e,{isEnd:!0})})),A(a,function(i){n.add(new bt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:mt(Rw,r,e,n,i),ondragend:mt(Qi,e,{isEnd:!0})}))}),n}function RP(r,e,t,a){var n=a.brushStyle.lineWidth||0,i=ys(n,D6),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,f=t[0][1],c=t[1][1],v=f-i+n/2,h=c-i+n/2,d=f-o,p=c-s,g=d+n,y=p+n;La(r,e,"main",o,s,d,p),a.transformable&&(La(r,e,"w",l,u,i,y),La(r,e,"e",v,u,i,y),La(r,e,"n",l,u,g,i),La(r,e,"s",l,h,g,i),La(r,e,"nw",l,u,i,i),La(r,e,"ne",v,u,i,i),La(r,e,"sw",l,h,i,i),La(r,e,"se",v,h,i,i))}function Ey(r,e){var t=e.__brushOption,a=t.transformable,n=e.childAt(0);n.useStyle(J0(t)),n.attr({silent:!a,cursor:a?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?Oy(r,i[0]):O6(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?I6[s]+"-resize":null})})}function La(r,e,t,a,n,i,o){var s=e.childOfName(t);s&&s.setShape(N6(Q0(r,e,[[a,n],[a+i,n+o]])))}function J0(r){return ct({strokeNoScale:!0},r.brushStyle)}function kP(r,e,t,a){var n=[pu(r,t),pu(e,a)],i=[ys(r,t),ys(e,a)];return[[n[0],i[0]],[n[1],i[1]]]}function E6(r){return Gi(r.group)}function Oy(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=Wv(t[e],E6(r));return a[n]}function O6(r,e){var t=[Oy(r,e[0]),Oy(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function Rw(r,e,t,a,n,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=EP(e,n,i);A(a,function(u){var f=L6[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(kP(s[0][0],s[1][0],s[0][1],s[1][1])),q0(e,t),Qi(e,{isEnd:!1})}function B6(r,e,t,a){var n=e.__brushOption.range,i=EP(r,t,a);A(n,function(o){o[0]+=i[0],o[1]+=i[1]}),q0(r,e),Qi(r,{isEnd:!1})}function EP(r,e,t){var a=r.group,n=a.transformCoordToLocal(e,t),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function Q0(r,e,t){var a=LP(r,e);return a&&a!==Ji?a.clipPath(t,r._transform):st(t)}function N6(r){var e=pu(r[0][0],r[1][0]),t=pu(r[0][1],r[1][1]),a=ys(r[0][0],r[1][0]),n=ys(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:n-t}}function V6(r,e,t){if(!(!r._brushType||G6(r,e.offsetX,e.offsetY))){var a=r._zr,n=r._covers,i=j0(r,e,t);if(!r._dragging)for(var o=0;oa.getWidth()||t<0||t>a.getHeight()}var lh={lineX:Ow(0),lineY:Ow(1),rect:{createCover:function(r,e){function t(a){return a}return PP({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=IP(r);return kP(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){RP(r,e,t,a)},updateCommon:Ey,contain:Ny},polygon:{createCover:function(r,e){var t=new lt;return t.add(new Ge({name:"main",style:J0(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new qe({name:"main",draggable:!0,drift:mt(B6,r,e),ondragend:mt(Qi,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:Q0(r,e,t)})},updateCommon:Ey,contain:Ny}};function Ow(r){return{createCover:function(e,t){return PP({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=IP(e),a=pu(t[0][r],t[1][r]),n=ys(t[0][r],t[1][r]);return[a,n]},updateCoverShape:function(e,t,a,n){var i,o=LP(e,t);if(o!==Ji&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),RP(e,t,l,n)},updateCommon:Ey,contain:Ny}}const t_=R6;function BP(r){return r=e_(r),function(e){return vD(e,r)}}function NP(r,e){return r=e_(r),function(t){var a=e??t,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function VP(r,e,t){var a=e_(r);return function(n,i){return a.contain(i[0],i[1])&&!FI(n,e,t)}}function e_(r){return dt.create(r)}var F6=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new t_(a.getZr())).on("brush",j(this._onBrush,this))},e.prototype.render=function(t,a,n,i){if(!H6(t,a,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new lt,this.group.add(this._axisGroup),!!t.get("show")){var s=$6(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,c=t.axis.dim,v=l.getAxisLayout(c),h=W({strokeContainThreshold:f},v),d=new Ya(t,n,h);d.build(),this._axisGroup.add(d.group),this._refreshBrushController(h,u,t,s,f,n),xu(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),c=dt.create({x:l[0],y:-o/2,width:u,height:o});c.x-=f,c.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:BP(c),isTargetByCursor:VP(c,s,i),getLinearBrushOtherExtent:NP(c,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(W6(n))},e.prototype._onBrush=function(t){var a=t.areas,n=this.axisModel,i=n.axis,o=Y(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(jt);function H6(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function W6(r){var e=r.axis;return Y(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function $6(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}const U6=F6;var Y6={type:"axisAreaSelect",event:"axisAreaSelected"};function Z6(r){r.registerAction(Y6,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var X6={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function zP(r){r.registerComponentView(c6),r.registerComponentModel(h6),r.registerCoordinateSystem("parallel",T6),r.registerPreprocessor(i6),r.registerComponentModel(Lw),r.registerComponentView(U6),ps(r,"parallel",Lw,X6),Z6(r)}function q6(r){xt(zP),r.registerChartView(j8),r.registerSeriesModel(e6),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,n6)}var K6=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),j6=function(r){F(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new K6},e.prototype.buildPath=function(t,a){var n=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+n,a.y2),t.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(t.lineTo(a.x2,a.y2+n),t.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),t.closePath()},e.prototype.highlight=function(){Wa(this)},e.prototype.downplay=function(){$a(this)},e}(Tt),J6=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new lt,t._focusAdjacencyDisabled=!1,t}return e.prototype.init=function(t,a){this._controller=new co(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),s=this._mainGroup,l=t.layoutInfo,u=l.width,f=l.height,c=t.getData(),v=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(t,n),HI(t,n,s,this._controller,this._controllerHost,null),o.eachEdge(function(d){var p=new j6,g=gt(p);g.dataIndex=d.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=d.node1.getLayout(),b=d.node1.getModel(),x=b.get("localX"),w=b.get("localY"),T=d.node2.getLayout(),C=d.node2.getModel(),M=C.get("localX"),D=C.get("localY"),I=d.getLayout(),L,P,k,R,B,E,V,O;p.shape.extent=Math.max(1,I.dy),p.shape.orient=h,h==="vertical"?(L=(x!=null?x*u:S.x)+I.sy,P=(w!=null?w*f:S.y)+S.dy,k=(M!=null?M*u:T.x)+I.ty,R=D!=null?D*f:T.y,B=L,E=P*(1-_)+R*_,V=k,O=P*_+R*(1-_)):(L=(x!=null?x*u:S.x)+S.dx,P=(w!=null?w*f:S.y)+I.sy,k=M!=null?M*u:T.x,R=(D!=null?D*f:T.y)+I.ty,B=L*(1-_)+k*_,E=P,V=L*_+k*(1-_),O=R),p.setShape({x1:L,y1:P,x2:k,y2:R,cpx1:B,cpy1:E,cpx2:V,cpy2:O}),p.useStyle(m.getItemStyle()),Bw(p.style,h,d);var N=""+y.get("value"),z=ge(y,"edgeLabel");xe(p,z,{labelFetcher:{getFormattedLabel:function(Z,Q,nt,J,X,ht){return t.getFormattedLabel(Z,Q,"edge",J,fr(X,z.normal&&z.normal.get("formatter"),N),ht)}},labelDataIndex:d.dataIndex,defaultText:N}),p.setTextConfig({position:"inside"});var $=y.getModel("emphasis");pe(p,y,"lineStyle",function(Z){var Q=Z.getItemStyle();return Bw(Q,h,d),Q}),s.add(p),v.setItemGraphicEl(d.dataIndex,p);var H=$.get("focus");Zt(p,H==="adjacency"?d.getAdjacentDataIndices():H==="trajectory"?d.getTrajectoryDataIndices():H,$.get("blurScope"),$.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,b=new bt({shape:{x:y!=null?y*u:p.x,y:m!=null?m*f:p.y,width:p.dx,height:p.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});xe(b,ge(g),{labelFetcher:{getFormattedLabel:function(w,T){return t.getFormattedLabel(w,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),b.disableLabelAnimation=!0,b.setStyle("fill",d.getVisual("color")),b.setStyle("decal",d.getVisual("style").decal),pe(b,g),s.add(b),c.setItemGraphicEl(d.dataIndex,b),gt(b).dataType="node";var x=_.get("focus");Zt(b,x==="adjacency"?d.getAdjacentDataIndices():x==="trajectory"?d.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),c.eachItemGraphicEl(function(d,p){var g=c.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:c.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/f})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(Q6(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,a){var n=t.layoutInfo,i=n.width,o=n.height,s=t.coordinateSystem=new vo(null,{api:a,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e}(Ht);function Bw(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),n=t.node2.getVisual("color");K(a)&&K(n)&&(r.fill=new Cs(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function Q6(r,e,t){var a=new bt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Ut(a,{shape:{width:r.width+20}},e,t),a}const t7=J6;var e7=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Pt(o[l],this,a));var u=X0(i,n,this,!0,f);return u.data;function f(c,v){c.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(h.parentModel=m)}return h}),v.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(h.parentModel=_)}return h})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(h){return isNaN(h)||h==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ue("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(t),c=f.getLayout().value,v=this.getDataParams(t,n).data.name;return ue("nameValue",{name:v!=null?v+"":null,value:c,noValue:i(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.layoutMode="box",e.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:G.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:G.color.primary}},animationEasing:"linear",animationDuration:1e3},e}(qt);const r7=e7;function a7(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=ye(t,e).refContainer,o=Xt(t.getBoxLayoutParams(),i);t.layoutInfo=o;var s=o.width,l=o.height,u=t.getGraph(),f=u.nodes,c=u.edges;i7(f);var v=Ot(f,function(g){return g.getLayout().value===0}),h=v.length!==0?0:t.get("layoutIterations"),d=t.get("orient"),p=t.get("nodeAlign");n7(f,c,a,n,s,l,h,d,p)})}function n7(r,e,t,a,n,i,o,s,l){o7(r,e,t,n,i,s,l),f7(r,e,i,n,a,o,s),_7(r,s)}function i7(r){A(r,function(e){var t=In(e.outEdges,lv),a=In(e.inEdges,lv),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function o7(r,e,t,a,n,i,o){for(var s=[],l=[],u=[],f=[],c=0,v=0;v=0;y&&g.depth>h&&(h=g.depth),p.setLayout({depth:y?g.depth:c},!0),i==="vertical"?p.setLayout({dy:t},!0):p.setLayout({dx:t},!0);for(var m=0;mc-1?h:c-1;o&&o!=="left"&&s7(r,o,i,w);var T=i==="vertical"?(n-t)/w:(a-t)/w;u7(r,T,i)}function GP(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function s7(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,h7(s,l,o),lp(s,n,t,a,o),m7(s,l,o),lp(s,n,t,a,o)}function c7(r,e){var t=[],a=e==="vertical"?"y":"x",n=Tg(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),A(n.keys,function(i){t.push(n.buckets.get(i))}),t}function v7(r,e,t,a,n,i){var o=1/0;A(r,function(s){var l=s.length,u=0;A(s,function(c){u+=c.getLayout().value});var f=i==="vertical"?(a-(l-1)*n)/u:(t-(l-1)*n)/u;f0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[v]+e;var d=n==="vertical"?a:t;if(u=f-e-d,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var h=c-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[v]+e-f,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function h7(r,e,t){A(r.slice().reverse(),function(a){A(a,function(n){if(n.outEdges.length){var i=In(n.outEdges,d7,t)/In(n.outEdges,lv);if(isNaN(i)){var o=n.outEdges.length;i=o?In(n.outEdges,p7,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-Nn(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Nn(n,t))*e;n.setLayout({y:l},!0)}}})})}function d7(r,e){return Nn(r.node2,e)*r.getValue()}function p7(r,e){return Nn(r.node2,e)}function g7(r,e){return Nn(r.node1,e)*r.getValue()}function y7(r,e){return Nn(r.node1,e)}function Nn(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function lv(r){return r.getValue()}function In(r,e,t){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),A(a,function(s){var l=new Re({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&A(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function x7(r){r.registerChartView(t7),r.registerSeriesModel(r7),r.registerLayout(a7),r.registerVisual(S7),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){var i=n.coordinateSystem,o=nh(i,e,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}var FP=function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],f=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[f],v=u[1-f],h=[n,i],d=h[f].get("type"),p=h[1-f].get("type"),g=e.data;if(g&&l){var y=[];A(g,function(S,b){var x;U(S)?(x=S.slice(),S.unshift(b)):U(S.value)?(x=W({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,y.push(x)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:c,type:$c(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:$c(p),dimsDef:m.slice()}];return Os(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:mt(YD,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),HP=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:G.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:G.color.shadow}},animationDuration:800},e}(qt);ce(HP,FP,!0);const b7=HP;var w7=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),c=Nw(f,i,u,l,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,f){var c=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(c);return}var v=i.getItemLayout(u);c?(Pr(c),WP(v,c,i,u)):c=Nw(v,i,u,l),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e}(Ht),T7=function(){function r(){}return r}(),C7=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new T7},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();ip){var S=[y,_];a.push(S)}}}return{boxData:t,outliers:a}}var k7={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Me){var a="";kt(a)}var n=R7(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function E7(r){r.registerSeriesModel(b7),r.registerChartView(M7),r.registerLayout(D7),r.registerTransform(k7)}var O7=["itemStyle","borderColor"],B7=["itemStyle","borderColor0"],N7=["itemStyle","borderColorDoji"],V7=["itemStyle","color"],z7=["itemStyle","color0"];function r_(r,e){return e.get(r>0?V7:z7)}function a_(r,e){return e.get(r===0?N7:r>0?O7:B7)}var G7={seriesType:"candlestick",plan:Is(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=r_(s,o),l.stroke=a_(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");W(u,l)}}}}}};const F7=G7;var H7=["color","borderColor"],W7=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){Fn(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(f){if(a.hasValue(f)){var c=a.getItemLayout(f);if(s&&Vw(u,c))return;var v=up(c,f,!0);Ut(v,{shape:{points:c.ends}},t,f),fp(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}}).update(function(f,c){var v=n.getItemGraphicEl(c);if(!a.hasValue(f)){i.remove(v);return}var h=a.getItemLayout(f);if(s&&Vw(u,h)){i.remove(v);return}v?(It(v,{shape:{points:h.ends}},t,f),Pr(v)):v=up(h),fp(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}).remove(function(f){var c=n.getItemGraphicEl(f);c&&i.remove(c)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),zw(t,this.group);var a=t.get("clip",!0)?Pu(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=up(s);fp(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){zw(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Ht),$7=function(){function r(){}return r}(),U7=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new $7},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(Tt);function up(r,e,t){var a=r.ends;return new U7({shape:{points:t?Y7(a,r):a},z2:100})}function Vw(r,e){for(var t=!0,a=0;ab?D[i]:M[i],ends:P,brushRect:V(x,w,_)})}function B(N,z){var $=[];return $[n]=z,$[i]=N,isNaN(z)||isNaN(N)?[NaN,NaN]:e.dataToPoint($)}function E(N,z,$){var H=z.slice(),Z=z.slice();H[n]=oc(H[n]+a/2,1,!1),Z[n]=oc(Z[n]-a/2,1,!0),$?N.push(H,Z):N.push(Z,H)}function V(N,z,$){var H=B(N,$),Z=B(z,$);return H[n]-=a/2,Z[n]-=a/2,{x:H[0],y:H[1],width:a,height:Z[1]-H[1]}}function O(N){return N[n]=oc(N[n],1),N}}function d(p,g){for(var y=ca(p.count*4),m=0,_,S=[],b=[],x,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var C=w.get(s,x),M=w.get(u,x),D=w.get(f,x),I=w.get(c,x),L=w.get(v,x);if(isNaN(C)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=Gw(w,x,M,D,f,T),S[n]=C,S[i]=I,_=e.dataToPoint(S,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=L,_=e.dataToPoint(S,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function Gw(r,e,t,a,n,i){var o;return t>a?o=-1:t0?r.get(n,e-1)<=a?1:-1:1,o}function J7(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=q(it(r.get("barMaxWidth"),n),n),o=q(it(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?q(s,n):Math.max(Math.min(n/2,i),o)}const Q7=j7;function t9(r){r.registerChartView(X7),r.registerSeriesModel(q7),r.registerPreprocessor(K7),r.registerVisual(F7),r.registerLayout(Q7)}function Fw(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var e9=function(r){F(e,r);function e(t,a){var n=r.call(this)||this,i=new Lu(t,a),o=new lt;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var v=void 0;ot(c)?v=c(n):v=c,i.__t>0&&(v=-s*i.__t),this._animateSymbol(i,s,v,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var s=this,l=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return pn(t.__p1,t.__cp1)+pn(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Ce,f=ug;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var c=t.__t<1?f(a[0],i[0],n[0],o):f(n[0],i[0],a[0],1-o),v=t.__t<1?f(a[1],i[1],n[1],o):f(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(v,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var f=(a-i[l])/(i[l+1]-i[l]),c=n[l],v=n[l+1];t.x=c[0]*(1-f)+f*v[0],t.y=c[1]*(1-f)+f*v[1];var h=t.__t<1?v[0]-c[0]:c[0]-v[0],d=t.__t<1?v[1]-c[1]:c[1]-v[1];t.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(UP);const c9=f9;var v9=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),h9=function(r){F(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:G.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new v9},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){t.moveTo(n[o++],n[o++]);for(var l=1;l0){var h=(u+c)/2-(f-v)*i,d=(f+v)/2-(c-u)*i;t.quadraticCurveTo(h,d,c,v)}else t.lineTo(c,v)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var c=i[u++],v=i[u++],h=1;h0){var g=(c+d)/2-(v-p)*o,y=(v+p)/2-(d-c)*o;if(CM(c,v,g,y,d,p,s,t,a))return l}else if(hn(c,v,d,p,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const p9=d9;var g9={seriesType:"lines",plan:Is(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(t){for(var u=0,f=n.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var c=t.get("clip",!0)&&Pu(t.coordinateSystem,!1,t);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=ZP.reset(t,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new p9:new Z0(o?i?c9:YP:i?UP:Y0),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(Ht);const m9=y9;var _9=typeof Uint32Array>"u"?Array:Uint32Array,S9=typeof Float64Array>"u"?Array:Float64Array;function Hw(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=Y(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),hm([n,t[0],t[1]])}))}var x9=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],Hw(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(Hw(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=Hl(this._flatCoords,a.flatCoords),this._flatCoordsOffset=Hl(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(qt);const b9=x9;function Ef(r){return r instanceof Array||(r=[r,r]),r}var w9={seriesType:"lines",reset:function(r){var e=Ef(r.get("symbol")),t=Ef(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=Ef(s.getShallow("symbol",!0)),u=Ef(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};const T9=w9;function C9(r){r.registerChartView(m9),r.registerSeriesModel(b9),r.registerLayout(ZP),r.registerVisual(T9)}var A9=256,M9=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Hr.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,c=this.canvas,v=c.getContext("2d"),h=e.length;c.width=t,c.height=a;for(var d=0;d0){var I=o(_)?l:u;_>0&&(_=_*M+T),b[x++]=I[D],b[x++]=I[D+1],b[x++]=I[D+2],b[x++]=I[D+3]*_*256}else x+=4}return v.putImageData(S,0,0),c},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Hr.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=G.color.neutral99,n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}();const D9=M9;function L9(r,e,t){var a=r[1]-r[0];e=Y(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function Ww(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var P9=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(t,n,0,t.getData().count()):Ww(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(Ww(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){Fn(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,a,n,i,o){var s=t.coordinateSystem,l=On(s,"cartesian2d"),u=On(s,"matrix"),f,c,v,h;if(l){var d=s.getAxis("x"),p=s.getAxis("y");f=d.getBandWidth()+.5,c=p.getBandWidth()+.5,v=d.scale.getExtent(),h=p.scale.getExtent()}for(var g=this.group,y=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),_=t.getModel(["blur","itemStyle"]).getItemStyle(),S=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),x=ge(t),w=t.getModel("emphasis"),T=w.get("focus"),C=w.get("blurScope"),M=w.get("disabled"),D=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],I=n;Iv[1]||Rh[1])continue;var B=s.dataToPoint([k,R]);L=new bt({shape:{x:B[0]-f/2,y:B[1]-c/2,width:f,height:c},style:P})}else if(u){var E=s.dataToLayout([y.get(D[0],I),y.get(D[1],I)]).rect;if(Ne(E.x))continue;L=new bt({z2:1,shape:E,style:P})}else{if(isNaN(y.get(D[1],I)))continue;var V=s.dataToLayout([y.get(D[0],I)]),E=V.contentRect||V.rect;if(Ne(E.x)||Ne(E.y))continue;L=new bt({z2:1,shape:E,style:P})}if(y.hasItemOption){var O=y.getItemModel(I),N=O.getModel("emphasis");m=N.getModel("itemStyle").getItemStyle(),_=O.getModel(["blur","itemStyle"]).getItemStyle(),S=O.getModel(["select","itemStyle"]).getItemStyle(),b=O.get(["itemStyle","borderRadius"]),T=N.get("focus"),C=N.get("blurScope"),M=N.get("disabled"),x=ge(O)}L.shape.r=b;var z=t.getRawValue(I),$="-";z&&z[2]!=null&&($=z[2]+""),xe(L,x,{labelFetcher:t,labelDataIndex:I,defaultOpacity:P.opacity,defaultText:$}),L.ensureState("emphasis").style=m,L.ensureState("blur").style=_,L.ensureState("select").style=S,Zt(L,T,C,M),L.incremental=o,o&&(L.states.emphasis.hoverLayer=!0),g.add(L),y.setItemGraphicEl(I,L),this._progressiveEls&&this._progressiveEls.push(L)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new D9;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var f=t.getViewRect().clone(),c=t.getRoamTransform();f.applyTransform(c);var v=Math.max(f.x,0),h=Math.max(f.y,0),d=Math.min(f.width+f.x,i.getWidth()),p=Math.min(f.height+f.y,i.getHeight()),g=d-v,y=p-h,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,C){var M=t.dataToPoint([w,T]);return M[0]-=v,M[1]-=h,M.push(C),M}),S=n.getExtent(),b=n.type==="visualMap.continuous"?I9(S,n.option.range):L9(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var x=new ke({style:{width:g,height:y,x:v,y:h,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(Ht);const R9=P9;var k9=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return ja(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Tu.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:G.color.primary}}},e}(qt);const E9=k9;function O9(r){r.registerChartView(R9),r.registerSeriesModel(E9)}var B9=["itemStyle","borderWidth"],$w=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],hp=new Gn,N9=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),c=l.master.getRect(),v={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:f,valueDim:$w[+f],categoryDim:$w[1-+f]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=Yw(o,d),g=Uw(o,d,p,v),y=Zw(o,v,g);o.setItemGraphicEl(d,y),i.add(y),qw(y,v,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){i.remove(g);return}var y=Yw(o,d),m=Uw(o,d,y,v),_=QP(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(d,null),g=null),g?$9(g,v,m):g=Zw(o,v,m,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=m,i.add(g),qw(g,v,m)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&Xw(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var h=t.get("clip",!0)?Pu(t.coordinateSystem,!1,t):null;return h?i.setClipPath(h):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,a){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){Xw(i,gt(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(Ht);function Uw(r,e,t,a){var n=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=t.get("symbolPatternSize")||2,c=t.isAnimationEnabled(),v={dataIndex:e,layout:n,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:c?t:null,hoverScale:c&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};V9(t,i,n,a,v),z9(r,e,n,i,o,v.boundingLength,v.pxSign,f,a,v),G9(t,v.symbolScale,u,a,v);var h=v.symbolSize,d=so(t.get("symbolOffset"),h);return F9(t,h,n,i,o,d,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,a,v),v}function V9(r,e,t,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),f;if(U(o)){var c=[dp(s,o[0])-l,dp(s,o[1])-l];c[1]=0?1:-1:f>0?1:-1}function dp(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function z9(r,e,t,a,n,i,o,s,l,u){var f=l.valueDim,c=l.categoryDim,v=Math.abs(t[c.wh]),h=r.getItemVisual(e,"symbolSize"),d;U(h)?d=h.slice():h==null?d=["100%","100%"]:d=[h,h],d[c.index]=q(d[c.index],v),d[f.index]=q(d[f.index],a?v:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[f.index]*=(l.isHorizontal?-1:1)*o}function G9(r,e,t,a,n){var i=r.get(B9)||0;i&&(hp.attr({scaleX:e[0],scaleY:e[1],rotation:t}),hp.updateTransform(),i/=hp.getLineScale(),i*=e[a.valueDim.index]),n.valueLineWidth=i||0}function F9(r,e,t,a,n,i,o,s,l,u,f,c){var v=f.categoryDim,h=f.valueDim,d=c.pxSign,p=Math.max(e[h.index]+s,0),g=p;if(a){var y=Math.abs(l),m=Pe(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=q(m,e[h.index]),b=Math.max(p+S*2,0),x=_?0:S*2,w=uM(a),T=w?a:Kw((y+x)/b),C=y-T*p;S=C/2/(_?T:Math.max(T-1,1)),b=p+S*2,x=_?0:S*2,!w&&a!=="fixed"&&(T=u?Kw((Math.abs(u)+x)/b):0),g=T*b-x,c.repeatTimes=T,c.symbolMargin=S}var M=d*(g/2),D=c.pathPosition=[];D[v.index]=t[v.wh]/2,D[h.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(D[0]+=i[0],D[1]+=i[1]);var I=c.bundlePosition=[];I[v.index]=t[v.xy],I[h.index]=t[h.xy];var L=c.barRectShape=W({},t);L[h.wh]=d*Math.max(Math.abs(t[h.wh]),Math.abs(D[h.index]+M)),L[v.wh]=t[v.wh];var P=c.clipShape={};P[v.xy]=-t[v.xy],P[v.wh]=f.ecSize[v.wh],P[h.xy]=0,P[h.wh]=t[h.wh]}function XP(r){var e=r.symbolPatternSize,t=fe(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function qP(r,e,t,a){var n=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,f=0,c=i[e.valueDim.index]+o+t.symbolMargin*2;for(n_(r,function(p){p.__pictorialAnimationIndex=f,p.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-p),g[l.index]=c*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function KP(r,e,t,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?is(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(i=r.__pictorialMainPath=XP(t),n.add(i),is(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,a))}function jP(r,e,t){var a=W({},e.barRectShape),n=r.__pictorialBarRect;n?is(n,null,{shape:a},e,t):(n=r.__pictorialBarRect=new bt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function JP(r,e,t,a){if(t.symbolClip){var n=r.__pictorialClipPath,i=W({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)It(n,{shape:i},s,l);else{i[o.wh]=0,n=new bt({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],ao[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function Yw(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=H9,t.isAnimationEnabled=W9,t}function H9(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function W9(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function Zw(r,e,t,a){var n=new lt,i=new lt;return n.add(i),n.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?qP(n,e,t):KP(n,e,t),jP(n,t,a),JP(n,e,t,a),n.__pictorialShapeStr=QP(r,t),n.__pictorialSymbolMeta=t,n}function $9(r,e,t){var a=t.animationModel,n=t.dataIndex,i=r.__pictorialBundle;It(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,n),t.symbolRepeat?qP(r,e,t,!0):KP(r,e,t,!0),jP(r,t,!0),JP(r,e,t,!0)}function Xw(r,e,t,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];n_(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),A(i,function(o){Rn(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function QP(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function n_(r,e,t){A(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function is(r,e,t,a,n,i){e&&r.attr(e),a.symbolClip&&!n?t&&r.attr(t):t&&ao[n?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,i)}function qw(r,e,t){var a=t.dataIndex,n=t.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),f=i.get("focus"),c=i.get("blurScope"),v=i.get("scale");n_(r,function(p){if(p instanceof ke){var g=p.style;p.useStyle(W({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else p.useStyle(t.style);var y=p.ensureState("emphasis");y.style=o,v&&(y.scaleX=p.scaleX*1.1,y.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=t.z2});var h=e.valueDim.posDesc[+(t.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,xe(d,ge(n),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:ds(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:h}),Zt(r,f,c,i.get("disabled"))}function Kw(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}const U9=N9;var Y9=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=Hn(Qc.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:G.color.primary}}}),e}(Qc);const Z9=Y9;function X9(r){r.registerChartView(U9),r.registerSeriesModel(Z9),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,mt(d2,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,p2("pictorialBar"))}var q9=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),f=u.rect,c=u.boundaryGap;s.x=0,s.y=f.y+c[0];function v(g){return g.name}var h=new Ua(this._layersSeries||[],l,v,v),d=[];h.add(j(p,this,"add")).update(j(p,this,"update")).remove(j(p,this,"remove")).execute();function p(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],b=[],x,w=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=c)}return{y0:n,max:i}}function rY(r){r.registerChartView(j9),r.registerSeriesModel(Q9),r.registerLayout(tY),r.registerProcessor(Es("themeRiver"))}var aY=2,nY=4,iY=function(r){F(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=aY,o.textConfig={inside:!0},gt(o).seriesIndex=a.seriesIndex;var s=new Lt({z2:nY,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;gt(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),f=a.getLayout(),c=W({},f);c.label=null;var v=a.getVisual("style");v.lineJoin="bevel";var h=a.getVisual("decal");h&&(v.decal=cs(h,o));var d=ha(l.getModel("itemStyle"),c,!0);W(c,d),A(Ze,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var b=ha(S,c);b&&(_.shape=b)}),t?(s.setShape(c),s.shape.r=f.r0,Ut(s,{shape:{r:f.r}},n,a.dataIndex)):(It(s,{shape:c},n),Pr(s)),s.useStyle(v),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?Hl(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;Zt(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),c=this,v=c.getTextContent(),h=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)P&&!Yl(R-P)&&R0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,n):(o.virtualPiece=new Jw(m,t,a,n),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";Bc(u,f)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Vy,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(Ht);const uY=lY;var fY=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};tR(n);var i=this._levelModels=Y(t.levels||[],function(l){return new Pt(l,this,a)},this),o=z0.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var c=o.getNodeByDataIndex(f),v=i[c.depth];return v&&(u.parentModel=v),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=oh(n,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){aP(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(qt);function tR(r){var e=0;A(r.children,function(a){tR(a);var n=a.value;U(n)&&(n=n[0]),e+=n});var t=r.value;U(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),U(r.value)?r.value[0]=t:r.value=t}const cY=fY;var tT=Math.PI/180;function vY(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");U(i)||(i=[0,i]),U(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=q(n[0],o),f=q(n[1],s),c=q(i[0],l/2),v=q(i[1],l/2),h=-a.get("startAngle")*tT,d=a.get("minAngle")*tT,p=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&eR(g,m);var _=0;A(g.children,function(R){!isNaN(R.getValue())&&_++});var S=g.getValue(),b=Math.PI/(S||_)*2,x=g.depth>0,w=g.height-(x?-1:1),T=(v-c)/(w||1),C=a.get("clockwise"),M=a.get("stillShowZeroSum"),D=C?1:-1,I=function(R,B){if(R){var E=B;if(R!==p){var V=R.getValue(),O=S===0&&M?b:V*b;O1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&K(s)&&(s=vg(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");W(u,l)})})}function pY(r){r.registerChartView(uY),r.registerSeriesModel(cY),r.registerLayout(mt(vY,"sunburst")),r.registerProcessor(mt(Es,"sunburst")),r.registerVisual(dY),sY(r)}var eT={color:"fill",borderColor:"stroke"},gY={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},Na=wt(),yY=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return ja(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=Na(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(qt);const mY=yY;function _Y(r,e){return e=e||[0,0],Y(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function SY(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:j(_Y,r)}}}function xY(r,e){return e=e||[0,0],Y([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function bY(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:j(xY,r)}}}function wY(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function TY(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:j(wY,r)}}}function CY(r,e){return e=e||[0,0],Y(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function AY(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:j(CY,r)}}}function MY(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)},layout:function(a,n){return r.dataToLayout(a,n)}}}}function DY(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,a){return r.dataToPoint(t,a)},layout:function(t,a){return r.dataToLayout(t,a)}}}}function rR(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||tt(r,"text")))}function aR(r,e,t){var a=r,n,i,o;if(e==="text")o=a;else{o={},tt(a,"text")&&(o.text=a.text),tt(a,"rich")&&(o.rich=a.rich),tt(a,"textFill")&&(o.fill=a.textFill),tt(a,"textStroke")&&(o.stroke=a.textStroke),tt(a,"fontFamily")&&(o.fontFamily=a.fontFamily),tt(a,"fontSize")&&(o.fontSize=a.fontSize),tt(a,"fontStyle")&&(o.fontStyle=a.fontStyle),tt(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=tt(a,"textPosition");t?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),tt(a,"textPosition")&&(n.position=a.textPosition),tt(a,"textOffset")&&(n.offset=a.textOffset),tt(a,"textRotation")&&(n.rotation=a.textRotation),tt(a,"textDistance")&&(n.distance=a.textDistance)}return rT(o,r),A(o.rich,function(l){rT(l,l)}),{textConfig:n,textContent:i}}function rT(r,e){e&&(e.font=e.textFont||e.font,tt(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),tt(e,"textAlign")&&(r.align=e.textAlign),tt(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),tt(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),tt(e,"textWidth")&&(r.width=e.textWidth),tt(e,"textHeight")&&(r.height=e.textHeight),tt(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),tt(e,"textPadding")&&(r.padding=e.textPadding),tt(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),tt(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),tt(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),tt(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),tt(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),tt(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),tt(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function aT(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||G.color.neutral99;nT(a,e);var o=a.textFill==null;return n?o&&(a.textFill=t.insideFill||G.color.neutral00,!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||G.color.neutral00),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,A(e.rich,function(s){nT(s,s)}),a}function nT(r,e){e&&(tt(e,"fill")&&(r.textFill=e.fill),tt(e,"stroke")&&(r.textStroke=e.fill),tt(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),tt(e,"font")&&(r.font=e.font),tt(e,"fontStyle")&&(r.fontStyle=e.fontStyle),tt(e,"fontWeight")&&(r.fontWeight=e.fontWeight),tt(e,"fontSize")&&(r.fontSize=e.fontSize),tt(e,"fontFamily")&&(r.fontFamily=e.fontFamily),tt(e,"align")&&(r.textAlign=e.align),tt(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),tt(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),tt(e,"width")&&(r.textWidth=e.width),tt(e,"height")&&(r.textHeight=e.height),tt(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),tt(e,"padding")&&(r.textPadding=e.padding),tt(e,"borderColor")&&(r.textBorderColor=e.borderColor),tt(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),tt(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),tt(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),tt(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),tt(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),tt(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),tt(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),tt(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),tt(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),tt(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var nR={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},iT=Ct(nR);ma(Sa,function(r,e){return r[e]=1,r},{});Sa.join(", ");var uv=["","style","shape","extra"],ms=wt();function i_(r,e,t,a,n){var i=r+"Animation",o=As(r,a,n)||{},s=ms(e).userDuring;return o.duration>0&&(o.during=s?j(kY,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),W(o,t[i]),o}function dc(r,e,t,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=ms(r),u=e.style;l.userDuring=e.during;var f={},c={};if(OY(r,e,c),r.type==="compound")for(var v=r.shape.paths,h=e.shape.paths,d=0;d0&&r.animateFrom(g,y)}else IY(r,e,n||0,t,f);iR(r,e),u?r.dirty():r.markRedraw()}function iR(r,e){for(var t=ms(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function PY(r,e){tt(e,"silent")&&(r.silent=e.silent),tt(e,"ignore")&&(r.ignore=e.ignore),r instanceof Ir&&tt(e,"invisible")&&(r.invisible=e.invisible),r instanceof Tt&&tt(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var ra={},RY={setTransform:function(r,e){return ra.el[r]=e,this},getTransform:function(r){return ra.el[r]},setShape:function(r,e){var t=ra.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=ra.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=ra.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=ra.el.style;if(e)return e[r]},setExtra:function(r,e){var t=ra.el.extra||(ra.el.extra={});return t[r]=e,this},getExtra:function(r){var e=ra.el.extra;if(e)return e[r]}};function kY(){var r=this,e=r.el;if(e){var t=ms(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}ra.el=e,a(RY)}}function oT(r,e,t,a){var n=t[r];if(n){var i=e[r],o;if(i){var s=t.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),$i(l))W(o,i);else for(var u=zt(l),f=0;f=0){!o&&(o=a[r]={});for(var h=Ct(i),f=0;f=0)){var v=r.getAnimationStyleProps(),h=v?v.style:null;if(h){!i&&(i=a.style={});for(var d=Ct(t),u=0;u=0?e.getStore().get(E,R):void 0}var V=e.get(B.name,R),O=B&&B.ordinalMeta;return O?O.categories[V]:V}function w(k,R){R==null&&(R=f);var B=e.getItemVisual(R,"style"),E=B&&B.fill,V=B&&B.opacity,O=_(R,bn).getItemStyle();E!=null&&(O.fill=E),V!=null&&(O.opacity=V);var N={inheritColor:K(E)?E:G.color.neutral99},z=S(R,bn),$=Ft(z,null,N,!1,!0);$.text=z.getShallow("show")?it(r.getFormattedLabel(R,bn),ds(e,R)):null;var H=Ec(z,N,!1);return M(k,O),O=aT(O,$,H),k&&C(O,k),O.legacy=!0,O}function T(k,R){R==null&&(R=f);var B=_(R,Va).getItemStyle(),E=S(R,Va),V=Ft(E,null,null,!0,!0);V.text=E.getShallow("show")?fr(r.getFormattedLabel(R,Va),r.getFormattedLabel(R,bn),ds(e,R)):null;var O=Ec(E,null,!0);return M(k,B),B=aT(B,V,O),k&&C(B,k),B.legacy=!0,B}function C(k,R){for(var B in R)tt(R,B)&&(k[B]=R[B])}function M(k,R){k&&(k.textFill&&(R.textFill=k.textFill),k.textPosition&&(R.textPosition=k.textPosition))}function D(k,R){if(R==null&&(R=f),tt(eT,k)){var B=e.getItemVisual(R,"style");return B?B[eT[k]]:null}if(tt(gY,k))return e.getItemVisual(R,k)}function I(k){if(o.type==="cartesian2d"){var R=o.getBaseAxis();return f3(ct({axis:R},k))}}function L(){return t.getCurrentSeriesIndices()}function P(k){return Fm(k,t)}}function ZY(r){var e={};return A(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function _p(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=f_(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&&Zt(s,a.focus,a.blurScope,a.emphasisDisabled),s}function f_(r,e,t,a,n,i){var o=-1,s=e;e&&uR(e,a,n)&&(o=_t(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=l_(a),s&&HY(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),gr.normal.cfg=gr.normal.conOpt=gr.emphasis.cfg=gr.emphasis.conOpt=gr.blur.cfg=gr.blur.conOpt=gr.select.cfg=gr.select.conOpt=null,gr.isLegacy=!1,qY(u,t,a,n,l,gr),XY(u,t,a,n,l),u_(r,u,t,a,gr,n,l),tt(a,"info")&&(Na(u).info=a.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function uR(r,e,t){var a=Na(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&tZ(i)&&fR(i)!==a.customPathData||n==="image"&&tt(o,"image")&&o.image!==a.customImagePath}function XY(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&uR(o,i,a)&&(o=null),o||(o=l_(i),r.setClipPath(o)),u_(null,o,e,i,null,a,n)}}function qY(r,e,t,a,n,i){if(!(r.isGroup||r.type==="compoundPath")){lT(t,null,i),lT(t,Va,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=l_(o),r.setTextContent(f)),u_(null,f,e,o,null,a,n);for(var c=o&&o.style,v=0;v=f;h--){var d=e.childAt(h);jY(e,d,n)}}}function jY(r,e,t){e&&uh(e,Na(r).option,t)}function JY(r){new Ua(r.oldChildren,r.newChildren,uT,uT,r).add(fT).update(fT).remove(QY).execute()}function uT(r,e){var t=r&&r.name;return t??GY+e}function fT(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;f_(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function QY(r){var e=this.context,t=e.oldChildren[r];t&&uh(t,Na(t).option,e.seriesModel)}function fR(r){return r&&(r.pathData||r.d)}function tZ(r){return r&&(tt(r,"pathData")||tt(r,"d"))}function eZ(r){r.registerChartView($Y),r.registerSeriesModel(mY)}var Ci=wt(),cT=st,Sp=j,rZ=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,n){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,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,i,e,t,a);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new lt,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var v=mt(vT,t,c);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,t)}dT(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),n=e.axis,i=n.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=R0(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,n,i){},r.prototype.createPointerEl=function(e,t,a,n){var i=t.pointer;if(i){var o=Ci(e).pointerEl=new ao[i.type](cT(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,n){if(t.label){var i=Ci(e).labelEl=new Lt(cT(t.label));e.add(i),hT(i,n)}},r.prototype.updatePointerEl=function(e,t,a){var n=Ci(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),a(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,n){var i=Ci(e).labelEl;i&&(i.setStyle(t.label.style),a(i,{x:t.label.x,y:t.label.y}),hT(i,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=bu(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Fa(u.event)},onmousedown:Sp(this._onHandleDragMove,this,0,0),drift:Sp(this._onHandleDragMove,this),ondragend:Sp(this._onHandleDragEnd,this)}),a.add(n)),dT(n,t,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");U(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Ps(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){vT(this._axisPointerModel,!t&&this._moveAnimation,this._handle,xp(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(xp(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(xp(n)),Ci(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),a=this._group,n=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),eu(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r}();function vT(r,e,t,a){cR(Ci(t).lastProp,a)||(Ci(t).lastProp=a,e?It(t,a,r):(t.stopAnimation(),t.attr(a)))}function cR(r,e){if(vt(r)&&vt(e)){var t=!0;return A(e,function(a,n){t=t&&cR(r[n],a)}),!!t}else return r===e}function hT(r,e){r[e.get(["label","show"])?"show":"hide"]()}function xp(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function dT(r,e,t){var a=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=t)})}const v_=rZ;function h_(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function vR(r,e,t,a,n){var i=t.get("value"),o=hR(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=wu(s.get("padding")||0),u=s.getFont(),f=Pv(o,u),c=n.position,v=f.width+l[1]+l[3],h=f.height+l[0]+l[2],d=n.align;d==="right"&&(c[0]-=v),d==="center"&&(c[0]-=v/2);var p=n.verticalAlign;p==="bottom"&&(c[1]-=h),p==="middle"&&(c[1]-=h/2),aZ(c,v,h,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:Ft(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function aZ(r,e,t,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function hR(r,e,t,a,n){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:Uc(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};A(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),K(o)?i=o.replace("{value}",i):ot(o)&&(i=o(s))}return i}function d_(r,e,t){var a=Ae();return zn(a,a,t.rotation),_a(a,a,t.position),Gr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function dR(r,e,t,a,n,i){var o=Ya.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),vR(e,a,n,i,{position:d_(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function p_(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function pR(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function pT(r,e,t,a,n,i){return{cx:r,cy:e,r0:t,r:a,startAngle:n,endAngle:i,clockwise:!0}}var nZ=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),f=gT(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=h_(i),h=iZ[u](s,c,f);h.style=v,t.graphicKey=h.type,t.pointer=h}var d=rv(l.getRect(),n);dR(a,t,d,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=rv(a.axis.grid.getRect(),a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=d_(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=gT(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[t.x,t.y];c[f]+=a[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var v=(u[1]+u[0])/2,h=[v,v];h[f]=c[f];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:h,tooltipOption:d[f]}},e}(v_);function gT(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var iZ={line:function(r,e,t){var a=p_([e,t[0]],[e,t[1]],yT(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:pR([e-a/2,t[0]],[a,n],yT(r))}}};function yT(r){return r.dim==="x"?0:1}const oZ=nZ;var sZ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:G.color.border,width:1,type:"dashed"},shadowStyle:{color:G.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:G.color.neutral00,padding:[5,7,5,7],backgroundColor:G.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:G.color.accent40,throttle:40}},e}(Dt);const lZ=sZ;var Ea=wt(),uZ=A;function gR(r,e,t){if(!Rt.node){var a=e.getZr();Ea(a).records||(Ea(a).records={}),fZ(a,e);var n=Ea(a).records[r]||(Ea(a).records[r]={});n.handler=t}}function fZ(r,e){if(Ea(r).initialized)return;Ea(r).initialized=!0,t("click",mt(mT,"click")),t("mousemove",mt(mT,"mousemove")),t("globalout",vZ);function t(a,n){r.on(a,function(i){var o=hZ(e);uZ(Ea(r).records,function(s){s&&n(s,i,o.dispatchAction)}),cZ(o.pendings,e)})}}function cZ(r,e){var t=r.showTip.length,a=r.hideTip.length,n;t?n=r.showTip[t-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function vZ(r,e,t){r.handler("leave",null,t)}function mT(r,e,t,a){e.handler(r,t,a)}function hZ(r){var e={showTip:[],hideTip:[]},t=function(a){var n=e[a.type];n?n.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function Fy(r,e){if(!Rt.node){var t=e.getZr(),a=(Ea(t).records||{})[r];a&&(Ea(t).records[r]=null)}}var dZ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=a.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";gR("axisPointer",n,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})})},e.prototype.remove=function(t,a){Fy("axisPointer",a)},e.prototype.dispose=function(t,a){Fy("axisPointer",a)},e.type="axisPointer",e}(jt);const pZ=dZ;function yR(r,e){var t=[],a=r.seriesIndex,n;if(a==null||!(n=e.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=Yi(i,r);if(o==null||o<0||U(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,v=u.dim,h=c==="x"||c==="radius"?1:0,d=i.mapDimension(v),p=[];p[h]=i.get(d,o),p[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(p)||[]}else t=l.dataToPoint(i.getValues(Y(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var _T=wt();function gZ(r,e,t){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||j(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){pc(n)&&(n=yR({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=pc(n),u=i.axesInfo,f=s.axesInfo,c=a==="leave"||pc(n),v={},h={},d={list:[],map:{}},p={showPointer:mt(mZ,h),showTooltip:mt(_Z,d)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);A(s.coordSysAxesInfo[m],function(S,b){var x=S.axis,w=wZ(u,S);if(!c&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(n)),T!=null&&ST(S,T,p,!1,v)}})});var g={};return A(f,function(y,m){var _=y.linkGroup;_&&!h[m]&&A(_.axesInfo,function(S,b){var x=h[b];if(S!==y&&x){var w=x.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,xT(S),xT(y)))),g[y.key]=w}})}),A(g,function(y,m){ST(f[m],y,p,!0,v)}),SZ(h,f,v),xZ(d,n,r,o),bZ(f,o,t),v}}function ST(r,e,t,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=yZ(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&W(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function yZ(r,e){var t=e.axis,a=t.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return A(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),c,v;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(f,r,t);v=h.dataIndices,c=h.nestestValue}else{if(v=l.indicesOfNearest(a,f[0],r,t.type==="category"?.5:null),!v.length)return;c=l.getData().get(f[0],v[0])}if(!(c==null||!isFinite(c))){var d=r-c,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,n=c,i.length=0),A(v,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function mZ(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function _Z(r,e,t,a){var n=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=fu(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:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function SZ(r,e,t){var a=t.axesInfo=[];A(e,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function xZ(r,e,t,a){if(pc(e)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function bZ(r,e,t){var a=t.getZr(),n="axisPointerLastHighlights",i=_T(a)[n]||{},o=_T(a)[n]={};A(r,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&A(c.seriesDataIndices,function(v){var h=v.seriesIndex+" | "+v.dataIndex;o[h]=v})});var s=[],l=[];A(i,function(u,f){!o[f]&&l.push(u)}),A(o,function(u,f){!i[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function wZ(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function xT(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function pc(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Eu(r){fo.registerAxisPointerClass("CartesianAxisPointer",oZ),r.registerComponentModel(lZ),r.registerComponentView(pZ),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!U(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=JH(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},gZ)}function TZ(r){xt(zI),xt(Eu)}var CZ=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),c=s.dataToCoord(a),v=i.get("type");if(v&&v!=="none"){var h=h_(i),d=MZ[v](s,l,c,f);d.style=h,t.graphicKey=d.type,t.pointer=d}var p=i.get(["label","margin"]),g=AZ(a,n,i,l,p);vR(t,n,i,o,g)},e}(v_);function AZ(r,e,t,a,n){var i=e.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,f,c;if(i.dim==="radius"){var v=Ae();zn(v,v,s),_a(v,v,[a.cx,a.cy]),u=Gr([o,-n],v);var h=e.getModel("axisLabel").get("rotate")||0,d=Ya.innerTextLayout(s,h*Math.PI/180,-1);f=d.textAlign,c=d.textVerticalAlign}else{var p=l[1];u=a.coordToPoint([p+n,o]);var g=a.cx,y=a.cy;f=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",c=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:c}}var MZ={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:p_(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:pT(e.cx,e.cy,a[0],a[1],(-t-n/2)*i,(-t+n/2)*i)}:{type:"Sector",shape:pT(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}};const DZ=CZ;var LZ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var a,n=this.ecModel;return n.eachComponent(t,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Dt);const IZ=LZ;var g_=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",Jt).models[0]},e.type="polarAxis",e}(Dt);ce(g_,Du);var PZ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(g_),RZ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(g_),y_=function(r){F(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e}(Xr);y_.prototype.dataToRadius=Xr.prototype.dataToCoord;y_.prototype.radiusToData=Xr.prototype.coordToData;const kZ=y_;var EZ=wt(),m_=function(r){F(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),f=Pv(s==null?"":s+"",a.getFont(),"center","top"),c=Math.max(f.height,7),v=c/u;isNaN(v)&&(v=1/0);var h=Math.max(0,Math.floor(v)),d=EZ(t.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-h)<=1&&Math.abs(g-o)<=1&&p>h?h=p:(d.lastTickCount=o,d.lastAutoInterval=h),h},e}(Xr);m_.prototype.dataToAngle=Xr.prototype.dataToCoord;m_.prototype.angleToData=Xr.prototype.coordToData;const OZ=m_;var mR=["radius","angle"],BZ=function(){function r(e){this.dimensions=mR,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new kZ,this._angleAxis=new OZ,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===e&&t.push(a),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t,a){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],a)},r.prototype.pointToData=function(e,t,a){a=a||[];var n=this.pointToCoord(e);return a[0]=this._radiusAxis.radiusToData(n[0],t),a[1]=this._angleAxis.angleToData(n[1],t),a},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(e,t){t=t||[];var a=e[0],n=e[1]/180*Math.PI;return t[0]=Math.cos(n)*a+this.cx,t[1]=-Math.sin(n)*a+this.cy,t},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var n=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,f=l-this.cy,c=u*u+f*f,v=this.r,h=this.r0;return v!==h&&c-o<=v*v&&c+o>=h*h},x:this.cx-a[1],y:this.cy-a[1],width:a[1]*2,height:a[1]*2}},r.prototype.convertToPixel=function(e,t,a){var n=bT(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=bT(t);return n===this?this.pointToData(a):null},r}();function bT(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const NZ=BZ;function VZ(r,e,t){var a=e.get("center"),n=ye(e,t).refContainer;r.cx=q(a[0],n.width)+n.x,r.cy=q(a[1],n.height)+n.y;var i=r.getRadiusAxis(),o=Math.min(n.width,n.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:U(s)||(s=[0,s]);var l=[q(s[0],o),q(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function zZ(r,e){var t=this,a=t.getAngleAxis(),n=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();A(Yc(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),A(Yc(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),vs(a.scale,a.model),vs(n.scale,n.model),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function GZ(r){return r.mainType==="angleAxis"}function wT(r,e){var t;if(r.type=e.get("type"),r.scale=Qv(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),GZ(e)){r.inverse=r.inverse!==e.get("clockwise");var a=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:a+(r.inverse?-360:360);r.setExtent(a,n)}e.axis=r,r.model=e}var FZ={dimensions:mR,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,n){var i=new NZ(n+"");i.update=zZ;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");wT(o,l),wT(s,u),VZ(i,a,e),t.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",Jt).models[0];a.coordinateSystem=n.coordinateSystem}}),t}};const HZ=FZ;var WZ=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Of(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function Bf(r){var e=r.getRadiusAxis();return e.inverse?0:1}function TT(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var $Z=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords({breakTicks:"none"}),l=n.getMinorTicksCoords(),u=Y(n.getViewLabels(),function(f){f=st(f);var c=n.scale,v=c.type==="ordinal"?c.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=n.dataToCoord(v),f});TT(u),TT(s),A(WZ,function(f){t.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&UZ[f](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(fo),UZ={axisLine:function(r,e,t,a,n,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=Bf(t),c=f?0:1,v,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[c]===0?v=new ao[h]({shape:{cx:t.cx,cy:t.cy,r:i[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new Gv({shape:{cx:t.cx,cy:t.cy,r:i[f],r0:i[c]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,r.add(v)},axisTick:function(r,e,t,a,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Bf(t)],u=Y(a,function(f){return new de({shape:Of(t,[l,l+s],f.coord)})});r.add(Cr(u,{style:ct(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,n,i){if(n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Bf(t)],f=[],c=0;cy?"left":"right",S=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var b=s[d];vt(b)&&b.textStyle&&(h=new Pt(b.textStyle,l,l.ecModel))}var x=new Lt({silent:Ya.isLabelSilent(e),style:Ft(h,{x:g[0],y:g[1],fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),Ka({el:x,componentModel:e,itemName:c.formattedLabel,formatterParamsExtra:{isTruncated:function(){return x.isTruncated},value:c.rawLabel,tickIndex:v}}),f){var w=Ya.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=c.rawLabel,gt(x).eventData=w}},this)},splitLine:function(r,e,t,a,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],c=0;c=0?"p":"n",k=C;b&&(a[f][L]||(a[f][L]={p:C,n:C}),k=a[f][L][P]);var R=void 0,B=void 0,E=void 0,V=void 0;if(d.dim==="radius"){var O=d.dataToCoord(I)-C,N=l.dataToCoord(L);Math.abs(O)=V})}}})}function QZ(r){var e={};A(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=SR(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),c=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=c.stacks;e[l]=c;var h=_R(a);v[h]||c.autoWidthCount++,v[h]=v[h]||{width:0,maxWidth:0};var d=q(a.get("barWidth"),f),p=q(a.get("barMaxWidth"),f),g=a.get("barGap"),y=a.get("barCategoryGap");d&&!v[h].width&&(d=Math.min(c.remainedWidth,d),v[h].width=d,c.remainedWidth-=d),p&&(v[h].maxWidth=p),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var t={};return A(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=q(a.categoryGap,o),l=q(a.gap,1),u=a.remainedWidth,f=a.autoWidthCount,c=(u-s)/(f+(f-1)*l);c=Math.max(c,0),A(i,function(p,g){var y=p.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e,t,a){a=a||[];var n=this.getAxis();return a[0]=n.coordToData(n.toLocalCoord(e[n.orient==="horizontal"?0:1])),a},r.prototype.dataToPoint=function(e,t,a){var n=this.getAxis(),i=this.getRect();a=a||[];var o=n.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),a[o]=n.toGlobalCoord(n.dataToCoord(+e)),a[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,a},r.prototype.convertToPixel=function(e,t,a){var n=CT(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=CT(t);return n===this?this.pointToData(a):null},r}();function CT(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function cX(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new fX(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",Jt).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var vX={create:cX,dimensions:bR};const hX=vX;var AT=["x","y"],dX=["width","height"],pX=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=wp(l,1-vv(s)),f=l.dataToPoint(a)[0],c=i.get("type");if(c&&c!=="none"){var v=h_(i),h=gX[c](s,f,u);h.style=v,t.graphicKey=h.type,t.pointer=h}var d=Hy(n);dR(a,t,d,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Hy(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=d_(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.coordinateSystem,l=vv(o),u=wp(s,l),f=[t.x,t.y];f[l]+=a[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var c=wp(s,1-l),v=(c[1]+c[0])/2,h=[v,v];return h[l]=f[l],{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e}(v_),gX={line:function(r,e,t){var a=p_([e,t[0]],[e,t[1]],vv(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:pR([e-a/2,t[0]],[a,n],vv(r))}}};function vv(r){return r.isHorizontal()?0:1}function wp(r,e){var t=r.getRect();return[t[AT[e]],t[AT[e]]+t[dX[e]]]}const yX=pX;var mX=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(jt);function _X(r){xt(Eu),fo.registerAxisPointerClass("SingleAxisPointer",yX),r.registerComponentView(mX),r.registerComponentView(sX),r.registerComponentModel(bp),ps(r,"single",bp,bp.defaultOption),r.registerCoordinateSystem("single",hX)}var SX=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,n){var i=io(t);r.prototype.init.apply(this,arguments),MT(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),MT(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:G.color.axisLine,width:1,type:"solid"}},itemStyle:{color:G.color.neutral00,borderWidth:1,borderColor:G.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:G.size.s,color:G.color.secondary},monthLabel:{show:!0,position:"start",margin:G.size.s,align:"center",formatter:null,color:G.color.secondary},yearLabel:{show:!0,position:null,margin:G.size.xl,formatter:null,color:G.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Dt);function MT(r,e){var t=r.cellSize,a;U(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var n=Y([0,1],function(i){return FV(e,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});ba(r,e,{type:"box",ignoreSize:n})}const xX=SX;var bX=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,a,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var f=i.dataToCalendarLayout([u],!1).tl,c=new bt({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});n.add(c)}},e.prototype._renderLines=function(t,a,n,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=a.start,v=0;c.time<=a.end.time;v++){d(c.formatedDate),v===0&&(c=s.getDateInfo(a.start.y+"-"+a.start.m));var h=c.date;h.setMonth(h.getMonth()+1),c=s.getDateInfo(h)}d(s.getNextNDay(a.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToCalendarLayout([p],!1).tl);var g=o._getLinePointsOfOneWeek(t,p,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,n),l,i)},e.prototype._getEdgesPoints=function(t,a,n){var i=[t[0].slice(),t[t.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-a/2,i[1][o]=i[1][o]+a/2,i},e.prototype._drawSplitline=function(t,a,n){var i=new Ge({z2:20,shape:{points:t},style:a});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,a,n){for(var i=t.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),f=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,a){return K(t)&&t?OV(t,a):ot(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,a,n,i,o){var s=a[0],l=a[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,a,n,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,v=n==="horizontal"?0:1,h={top:[f,u[v][1]],bottom:[f,u[1-v][1]],left:[u[1-v][0],c],right:[u[v][0],c]},d=a.start.y;+a.end.y>+a.start.y&&(d=d+"-"+a.end.y);var p=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new Lt({z2:30,style:Ft(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,h[l],n,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,a,n,i,o){var s="left",l="top",u=t[0],f=t[1];return n==="horizontal"?(f=f+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,a,n,i){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||K(s))&&(s&&(a=zg(s)||a),s=a.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,h=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=f==="center",p=o.get("silent"),g=0;g=i.start.time&&n.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var n=Math.floor(t[1].time/Tp)-Math.floor(t[0].time/Tp)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)n-=u,i.setDate(l-u);var f=Math.floor((n+t[0].day+6)/7),c=a?-f+1:f-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:f,nthWeek:c,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var n=this._getRangeInfo(a);if(e>n.weeks||e===0&&tn.lweek)return null;var i=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(n){var i=new r(n,e,t);a.push(i),n.coordinateSystem=i}),e.eachComponent(function(n,i){Cu({targetModel:i,coordSysType:"calendar",coordSysProvider:OD})}),a},r.dimensions=["time","value"],r}();function Cp(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}const CX=TX;function AX(r){r.registerComponentModel(xX),r.registerComponentView(wX),r.registerCoordinateSystem("calendar",CX)}var Ra={level:1,leaf:2,nonLeaf:3},za={none:0,all:1,body:2,corner:3};function Wy(r,e,t){var a=e[yt[t]].getCell(r);return!a&&At(r)&&r<0&&(a=e[yt[1-t]].getUnitLayoutInfo(t,Math.round(r))),a}function wR(r){var e=r||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function TR(r,e,t,a,n){DT(r[0],e,n,t,a,0),DT(r[1],e,n,t,a,1)}function DT(r,e,t,a,n,i){r[0]=1/0,r[1]=-1/0;var o=a[i],s=U(o)?o:[o],l=s.length,u=!!t;if(l>=1?(LT(r,e,s,u,n,i,0),l>1&<(r,e,s,u,n,i,l-1)):r[0]=r[1]=NaN,u){var f=-n[yt[1-i]].getLocatorCount(i),c=n[yt[i]].getLocatorCount(i)-1;t===za.body?f=re(0,f):t===za.corner&&(c=cr(-1,c)),c=e[0]&&r[0]<=e[1]}function RT(r,e){r.id.set(e[0][0],e[1][0]),r.span.set(e[0][1]-r.id.x+1,e[1][1]-r.id.y+1)}function LX(r,e){r[0][0]=e[0][0],r[0][1]=e[0][1],r[1][0]=e[1][0],r[1][1]=e[1][1]}function kT(r,e,t,a){var n=Wy(e[a][0],t,a),i=Wy(e[a][1],t,a);r[yt[a]]=r[le[a]]=NaN,n&&i&&(r[yt[a]]=n.xy,r[le[a]]=i.xy+i.wh-n.xy)}function ll(r,e,t,a){return r[yt[e]]=t,r[yt[1-e]]=a,r}function IX(r){return r&&(r.type===Ra.leaf||r.type===Ra.nonLeaf)?r:null}function hv(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var ET=function(){function r(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=PX(e);var a=t.get("data",!0);a!=null&&!U(a)&&(a=[]),a?this._initByDimModelData(a):this._initBySeriesData()}return r.prototype._initByDimModelData=function(e){var t=this,a=t._cells,n=t._levels,i=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,f,c){var v=0;return u&&A(u,function(h,d){var p;K(h)?p={value:h}:vt(h)?(p=h,h.value!=null&&!K(h.value)&&(p={value:null})):p={value:null};var g={type:Ra.nonLeaf,ordinal:NaN,level:c,firstLeafLocator:f,id:new ft,span:ll(new ft,t.dimIdx,1,1),option:p,xy:NaN,wh:NaN,dim:t,rect:hv()};o++,(i[f]||(i[f]=[])).push(g),n[c]||(n[c]={type:Ra.level,xy:NaN,wh:NaN,option:null,id:new ft,dim:t});var y=s(p.children,f,c+1),m=Math.max(1,y);g.span[yt[t.dimIdx]]=m,v+=m,f+=m}),v}function l(){for(var u=[];a.length=1,_=t[yt[a]],S=i.getLocatorCount(a)-1,b=new Mn;for(o.resetLayoutIterator(b,a);b.next();)x(b.item);for(i.resetLayoutIterator(b,a);b.next();)x(b.item);function x(w){Ne(w.wh)&&(w.wh=y),w.xy=_,w.id[yt[a]]===S&&!m&&(w.wh=t[yt[a]]+t[le[a]]-w.xy),_+=w.wh}}function FT(r,e){for(var t=e[yt[r]].resetCellIterator();t.next();){var a=t.item;dv(a.rect,r,a.id,a.span,e),dv(a.rect,1-r,a.id,a.span,e),a.type===Ra.nonLeaf&&(a.xy=a.rect[yt[r]],a.wh=a.rect[le[r]])}}function HT(r,e){r.travelExistingCells(function(t){var a=t.span;if(a){var n=t.spanRect,i=t.id;dv(n,0,i,a,e),dv(n,1,i,a,e)}})}function dv(r,e,t,a,n){r[le[e]]=0;var i=t[yt[e]],o=i<0?n[yt[1-e]]:n[yt[e]],s=o.getUnitLayoutInfo(e,t[yt[e]]);if(r[yt[e]]=s.xy,r[le[e]]=s.wh,a[yt[e]]>1){var l=o.getUnitLayoutInfo(e,t[yt[e]]+a[yt[e]]-1);r[le[e]]=l.xy+l.wh-s.xy}}function YX(r,e,t){var a=Dc(r,t[le[e]]);return Uy(a,t[le[e]])}function Uy(r,e){return Math.max(Math.min(r,it(e,1/0)),0)}function Dp(r){var e=r.matrixModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}var Ie={inBody:1,inCorner:2,outside:3},ta={x:null,y:null,point:[]};function WT(r,e,t,a,n){var i=t[yt[e]],o=t[yt[1-e]],s=i.getUnitLayoutInfo(e,i.getLocatorCount(e)-1),l=i.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),f=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,c=r.point[e]=a[e];if(!l&&!f){r[yt[e]]=Ie.outside;return}if(n===za.body){l?(r[yt[e]]=Ie.inBody,c=cr(s.xy+s.wh,re(l.xy,c)),r.point[e]=c):r[yt[e]]=Ie.outside;return}else if(n===za.corner){f?(r[yt[e]]=Ie.inCorner,c=cr(f.xy+f.wh,re(u.xy,c)),r.point[e]=c):r[yt[e]]=Ie.outside;return}var v=l?l.xy:f?f.xy+f.wh:NaN,h=u?u.xy:v,d=s?s.xy+s.wh:v;if(cd){if(!n){r[yt[e]]=Ie.outside;return}c=d}r.point[e]=c,r[yt[e]]=v<=c&&c<=d?Ie.inBody:h<=c&&c<=v?Ie.inCorner:Ie.outside}function $T(r,e,t,a){var n=1-t;if(r[yt[t]]!==Ie.outside)for(a[yt[t]].resetCellIterator(Mp);Mp.next();){var i=Mp.item;if(YT(r.point[t],i.rect,t)&&YT(r.point[n],i.rect,n)){e[t]=i.ordinal,e[n]=i.id[yt[n]];return}}}function UT(r,e,t,a){if(r[yt[t]]!==Ie.outside){var n=r[yt[t]]===Ie.inCorner?a[yt[1-t]]:a[yt[t]];for(n.resetLayoutIterator(Ff,t);Ff.next();)if(ZX(r.point[t],Ff.item)){e[t]=Ff.item.id[yt[t]];return}}}function ZX(r,e){return e.xy<=r&&r<=e.xy+e.wh}function YT(r,e,t){return e[yt[t]]<=r&&r<=e[yt[t]]+e[le[t]]}const XX=UX;function qX(r){r.registerComponentModel(BX),r.registerComponentView($X),r.registerCoordinateSystem("matrix",XX)}function KX(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function ZT(r,e){var t;return A(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function jX(r,e,t){var a=W({},t),n=r[e],i=t.$action||"merge";i==="merge"?n?(St(n,a,!0),ba(n,a,{ignoreSize:!0}),GD(t,n),Hf(t,n),Hf(t,n,"shape"),Hf(t,n,"style"),Hf(t,n,"extra"),t.clipPath=n.clipPath):r[e]=a:i==="replace"?r[e]=a:i==="remove"&&n&&(r[e]=null)}var AR=["transition","enterFrom","leaveTo"],JX=AR.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Hf(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?AR:JX,n=0;n=0;f--){var c=n[f],v=he(c.id,null),h=v!=null?o.get(v):null;if(h){var d=h.parent,y=br(d),m=d===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=Zv(h,c,m,null,{hv:c.hv,boundingMode:c.bounding},_);if(!br(h).isNew&&S){for(var b=c.transition,x={},w=0;w=0)?x[T]=C:h[T]=C}It(h,x,t,0)}else h.attr(_)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(n){gc(n,br(n).option,a,t._lastGraphicModel)}),this._elMap=at()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(jt);function Yy(r){var e=tt(XT,r)?XT[r]:kc(r),t=new e({});return br(t).type=r,t}function qT(r,e,t,a){var n=Yy(t);return e.add(n),a.set(r,n),br(n).id=r,br(n).isNew=!0,n}function gc(r,e,t,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){gc(i,e,t,a)}),uh(r,e,a),t.removeKey(br(r).id))}function KT(r,e,t,a){r.isGroup||A([["cursor",Ir.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(n){var i=n[0];tt(e,i)?r[i]=it(e[i],n[1]):r[i]==null&&(r[i]=n[1])}),A(Ct(e),function(n){if(n.indexOf("on")===0){var i=e[n];r[n]=ot(i)?i:null}}),tt(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function rq(r){return r=W({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(BD),function(e){delete r[e]}),r}function aq(r,e,t){var a=gt(r).eventData;!r.silent&&!r.ignore&&!a&&(a=gt(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function nq(r){r.registerComponentModel(tq),r.registerComponentView(eq),r.registerPreprocessor(function(e){var t=e.graphic;U(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var jT=["x","y","radius","angle","single"],iq=["cartesian2d","polar","singleAxis"];function oq(r){var e=r.get("coordinateSystem");return _t(iq,e)>=0}function wn(r){return r+"Axis"}function sq(r,e){var t=at(),a=[],n=at();r.eachComponent({mainType:"dataZoom",query:e},function(f){n.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!n.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){n.set(f.uid,!0),a.push(f),u(f)}function l(f){var c=!1;return f.eachTargetAxis(function(v,h){var d=t.get(v);d&&d[h]&&(c=!0)}),c}function u(f){f.eachTargetAxis(function(c,v){(t.get(c)||t.set(c,[]))[v]=!0})}return a}function MR(r){var e=r.ecModel,t={infoList:[],infoMap:at()};return r.eachTargetAxis(function(a,n){var i=e.getComponent(wn(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var Lp=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),lq=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,a,n){var i=JT(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var a=JT(t);St(this.option,t,!0),St(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=at(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return A(jT,function(n){var i=this.getReferringComponents(wn(n),sB);if(i.specified){a=!0;var o=new Lp;A(i.models,function(s){o.add(s.componentIndex)}),t.set(n,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===a}});l(s,"single")}function l(u,f){var c=u[0];if(c){var v=new Lp;if(v.add(c.componentIndex),t.set(f,v),i=!1,f==="x"||f==="y"){var h=c.getReferringComponents("grid",Jt).models[0];h&&A(u,function(d){c.componentIndex!==d.componentIndex&&h===d.getReferringComponents("grid",Jt).models[0]&&v.add(d.componentIndex)})}}}i&&A(jT,function(u){if(i){var f=n.findComponents({mainType:wn(u),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var c=new Lp;c.add(f[0].componentIndex),t.set(u,c),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,n){t==null&&(t=this.ecModel.getComponent(wn(a),n))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(n,i){A(n.indexList,function(o){t.call(a,i,o)})})},e.prototype.getAxisProxy=function(t,a){var n=this.getAxisModel(t,a);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[a])return this.ecModel.getComponent(wn(t),a)},e.prototype.setRawRange=function(t){var a=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(a[i[0]]=n[i[0]]=t[i[0]],a[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;A(["start","startValue","end","endValue"],function(n){a[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(d=!0),b&&(p=!0)}return g&&d&&p})}else Yo(f,function(h){if(i==="empty")l.setData(u=u.map(h,function(p){return s(p)?p:NaN}));else{var d={};d[h]=o,u.selectRange(d)}});Yo(f,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;Yo(["min","max"],function(n){var i=t.get(n+"Span"),o=t.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Et(a[0]+o,a,[0,100],!0):i!=null&&(o=Et(i,[0,100],a,!0)-a[0]),e[n+"Span"]=i,e[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(t){var n=oM(a,[0,500]);n=Math.min(n,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),t[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r}();function pq(r,e,t){var a=[1/0,-1/0];Yo(t,function(o){I3(a,o.getData(),e)});var n=r.getAxisModel(),i=b2(n.axis.scale,n,a).calculate();return[i.min,i.max]}const gq=dq;var yq={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(wn(o),s);n(o,s,l,i)})})}e(function(n,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new gq(n,i,s,r),t.push(o.__dzAxisProxy))});var a=at();return A(t,function(n){A(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).reset(t)}),t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};const mq=yq;function _q(r){r.registerAction("dataZoom",function(e,t){var a=sq(t,e);A(a,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var tC=!1;function b_(r){tC||(tC=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,mq),_q(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Sq(r){r.registerComponentModel(fq),r.registerComponentView(hq),b_(r)}var Tr=function(){function r(){}return r}(),DR={};function Zo(r,e){DR[r]=e}function LR(r){return DR[r]}var xq=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;A(this.option.feature,function(a,n){var i=LR(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),St(a,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:G.color.border,borderRadius:0,borderWidth:0,padding:G.size.m,itemSize:15,itemGap:G.size.s,showTitle:!0,iconStyle:{borderColor:G.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:G.color.accent50}},tooltip:{show:!1,position:"bottom"}},e}(Dt);const bq=xq;function IR(r,e){var t=wu(e.get("padding")),a=e.getItemStyle(["color","opacity"]);a.fill=e.get("backgroundColor");var n=new bt({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1});return n}var wq=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},f=this._features||(this._features={}),c=[];A(u,function(m,_){c.push(_)}),new Ua(this._featureNames||[],c).add(v).update(v).remove(mt(v,null)).execute(),this._featureNames=c;function v(m,_){var S=c[m],b=c[_],x=u[S],w=new Pt(x,t,t.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===S&&(x.title=i.newTitle),S&&!b){if(Tq(S))T={onclick:w.option.onclick,featureName:S};else{var C=LR(S);if(!C)return;T=new C}f[S]=T}else if(T=f[b],!T)return;T.uid=Ds("toolbox-feature"),T.model=w,T.ecModel=a,T.api=n;var M=T instanceof Tr;if(!S&&b){M&&T.dispose&&T.dispose(a,n);return}if(!w.get("show")||M&&T.unusable){M&&T.remove&&T.remove(a,n);return}h(w,T,S),w.setIconStatus=function(D,I){var L=this.option,P=this.iconPaths;L.iconStatus=L.iconStatus||{},L.iconStatus[D]=I,P[D]&&(I==="emphasis"?Wa:$a)(P[D])},T instanceof Tr&&T.render&&T.render(w,a,n,i)}function h(m,_,S){var b=m.getModel("iconStyle"),x=m.getModel(["emphasis","iconStyle"]),w=_ instanceof Tr&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},C,M;K(w)?(C={},C[S]=w):C=w,K(T)?(M={},M[S]=T):M=T;var D=m.iconPaths={};A(C,function(I,L){var P=bu(I,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var k=P.ensureState("emphasis");k.style=x.getItemStyle();var R=new Lt({style:{text:M[L],align:x.get("textAlign"),borderRadius:x.get("textBorderRadius"),padding:x.get("textPadding"),fill:null,font:Fm({fontStyle:x.get("textFontStyle"),fontFamily:x.get("textFontFamily"),fontSize:x.get("textFontSize"),fontWeight:x.get("textFontWeight")},a)},ignore:!0});P.setTextContent(R),Ka({el:P,componentModel:t,itemName:L,formatterParamsExtra:{title:M[L]}}),P.__title=M[L],P.on("mouseover",function(){var B=x.getItemStyle(),E=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";R.setStyle({fill:x.get("textFill")||B.fill||B.stroke||G.color.neutral99,backgroundColor:x.get("textBackgroundColor")}),P.setTextConfig({position:x.get("textPosition")||E}),R.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",L])!=="emphasis"&&n.leaveEmphasis(this),R.hide()}),(m.get(["iconStatus",L])==="emphasis"?Wa:$a)(P),o.add(P),P.on("click",j(_.onclick,_,a,n,L)),D[L]=P})}var d=ye(t,n).refContainer,p=t.getBoxLayoutParams(),g=t.get("padding"),y=Xt(p,d,g);Fi(t.get("orient"),o,t.get("itemGap"),y.width,y.height),Zv(o,p,d,g),o.add(IR(o.getBoundingRect(),t)),l||o.eachChild(function(m){var _=m.__title,S=m.ensureState("emphasis"),b=S.textConfig||(S.textConfig={}),x=m.getTextContent(),w=x&&x.ensureState("emphasis");if(w&&!ot(w)&&_){var T=w.style||(w.style={}),C=Pv(_,Lt.makeFont(T)),M=m.x+o.x,D=m.y+o.y+s,I=!1;D+C.height>n.getHeight()&&(b.position="top",I=!0);var L=I?-5-C.height:s+10;M+C.width/2>n.getWidth()?(b.position=["100%",L],T.align="right"):M-C.width/2<0&&(b.position=[0,L],T.align="left")}})},e.prototype.updateView=function(t,a,n,i){A(this._features,function(o){o instanceof Tr&&o.updateView&&o.updateView(o.model,a,n,i)})},e.prototype.remove=function(t,a){A(this._features,function(n){n instanceof Tr&&n.remove&&n.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){A(this._features,function(n){n instanceof Tr&&n.dispose&&n.dispose(t,a)})},e.type="toolbox",e}(jt);function Tq(r){return r.indexOf("my")===0}const Cq=wq;var Aq=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||G.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=Rt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),h=v[0].indexOf("base64")>-1,d=o?decodeURIComponent(v[1]):v[1];h&&(d=window.atob(d));var p=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(d),b.close(),S.focus(),b.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=n.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},e.getDefaultOption=function(t){var a={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:G.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e}(Tr);const Mq=Aq;var eC="__ec_magicType_stack__",Dq=[["line","bar"],["stack"]],Lq=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),n={};return A(t.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},e.getDefaultOption=function(t){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},e.prototype.onclick=function(t,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(rC[n]){var s={series:[]},l=function(c){var v=c.subType,h=c.id,d=rC[n](v,h,c,i);d&&(ct(d,c.option),s.series.push(d));var p=c.coordinateSystem;if(p&&p.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=c.getReferringComponents(m,Jt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=S;b++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};A(Dq,function(c){_t(c,n)>=0&&A(c,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=St({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),a.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},e}(Tr),rC={line:function(r,e,t,a){if(r==="bar")return St({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return St({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var n=t.get("stack")===eC;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),St({id:e,stack:n?"":eC},a.get(["option","stack"])||{},!0)}};Ta({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});const Iq=Lq;var fh=new Array(60).join("-"),_s=" ";function Pq(r){var e={},t=[],a=[];return r.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function Rq(r){var e=[];return A(r,function(t,a){var n=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(Y(t.series,function(h){return h.name})),l=[n.model.getCategories()];A(t.series,function(h){var d=h.getRawData();l.push(h.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(_s)],f=0;f=0)return!0}var Zy=new RegExp("["+_s+"]+","g");function Bq(r){for(var e=r.split(/\n+/g),t=pv(e.shift()).split(Zy),a=[],n=Y(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function Wq(r){var e=w_(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return PR(t,function(n,i){for(var o=e.length-1;o>=0;o--)if(n=e[o][i],n){a[i]=n;break}}),a}function $q(r){RR(r).snapshots=null}function Uq(r){return w_(r).length}function w_(r){var e=RR(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var Yq=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){$q(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return a},e}(Tr);Ta({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});const Zq=Yq;var Xq=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],qq=function(){function r(e,t,a){var n=this;this._targetInfoList=[];var i=aC(t,e);A(Kq,function(o,s){(!a||!a.include||_t(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Ip[a.brushType](0,i,n);a.__rangeOffset={offset:sC[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){A(e,function(n){var i=this.findTargetInfo(n,t);i&&i!==!0&&A(i.coordSyses,function(o){var s=Ip[n.brushType](1,o,n.range,!0);a(n,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){A(e,function(a){var n=this.findTargetInfo(a,t);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Ip[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?sC[a.brushType](i.values,o.offset,jq(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return Y(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:BP(n),isTargetByCursor:VP(n,e,a.coordSysModel),getLinearBrushOtherExtent:NP(n)}})},r.prototype.controlSeries=function(e,t,a){var n=this.findTargetInfo(e,a);return n===!0||n&&_t(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,n=aC(t,e),i=0;ir[1]&&r.reverse(),r}function aC(r,e){return rs(r,e,{includeMainTypes:Xq})}var Kq={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=at(),o={},s={};!t&&!a&&!n||(A(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),A(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),A(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];A(u.getCartesians(),function(c,v){(_t(t,c.getAxis("x").model)>=0||_t(a,c.getAxis("y").model)>=0)&&f.push(c)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:iC.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){A(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:iC.geo})})}},nC=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],iC={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Gi(r)),e}},Ip={lineX:mt(oC,0),lineY:mt(oC,1),rect:function(r,e,t,a){var n=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),i=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[Xy([n[0],i[0]]),Xy([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=Y(t,function(o){var s=r?e.pointToData(o,a):e.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function oC(r,e,t,a){var n=t.getAxis(["x","y"][r]),i=Xy(Y([0,1],function(s){return e?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var sC={lineX:mt(lC,0),lineY:mt(lC,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return Y(r,function(a,n){return[a[0]-t[0]*e[n][0],a[1]-t[1]*e[n][1]]})}};function lC(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function jq(r,e){var t=uC(r),a=uC(e),n=[t[0]/a[0],t[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function uC(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const T_=qq;var qy=A,Jq=rB("toolbox-dataZoom_"),Qq=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){this._brushController||(this._brushController=new t_(n.getZr()),this._brushController.on("brush",j(this._onBrush,this)).mount()),rK(t,a,this,i,n),eK(t,a)},e.prototype.onclick=function(t,a,n){tK[n].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new T_(C_(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,f,c){if(c.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",c,f[0]),s("y",c,f[1])):s({lineX:"x",lineY:"y"}[v],c,f)}}),Hq(i,n),this._dispatchZoomAction(n);function s(u,f,c){var v=f.getAxis(u),h=v.model,d=l(u,h,i),p=d.findRepresentativeAxisProxy(h).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(c=Bn(0,c.slice(),v.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:c[0],endValue:c[1]})}function l(u,f,c){var v;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var d=h.getAxisModel(u,f.componentIndex);d&&(v=h)}),v}},e.prototype._dispatchZoomAction=function(t){var a=[];qy(t,function(n,i){a.push(st(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:G.color.backgroundTint}};return a},e}(Tr),tK={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Wq(this.ecModel))}};function C_(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function eK(r,e){r.setIconStatus("back",Uq(e)>1?"emphasis":"normal")}function rK(r,e,t,a,n){var i=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new T_(C_(r),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}XV("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),n=[],i=C_(a),o=rs(r,i);qy(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),qy(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var c=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:Jq+u+c};v[f]=c,n.push(v)}return n});const aK=Qq;function nK(r){r.registerComponentModel(bq),r.registerComponentView(Cq),Zo("saveAsImage",Mq),Zo("magicType",Iq),Zo("dataView",Fq),Zo("dataZoom",aK),Zo("restore",Zq),xt(Sq)}var iK=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:G.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:G.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:G.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:G.color.tertiary,fontSize:14}},e}(Dt);const oK=iK;function kR(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function ER(r){if(Rt.domSupported){for(var e=document.documentElement.style,t=0,a=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,c=o+n,v=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),h=Math.round(((v-Math.SQRT2*n)/2+Math.SQRT2*n-(v-c)/2)*100)/100;s+=";"+i+":-"+h+"px";var d=e+" solid "+n+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+a+";"];return'
'}function hK(r,e,t){var a="cubic-bezier(0.23,1,0.32,1)",n="",i="";return t&&(n=" "+r/2+"s "+a,i="opacity"+n+",visibility"+n),e||(n=" "+r+"s "+a,i+=(i.length?",":"")+(Rt.transformSupported?""+A_+n:",left"+n+",top"+n)),uK+":"+i}function fC(r,e,t){var a=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!Rt.transformSupported)return t?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=Rt.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return t?"top:0;left:0;"+A_+":"+o+";":[["top",0],["left",0],[OR,o]]}function dK(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont());var n=it(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+n+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),A(["decoration","align"],function(u){var f=r.get(u);f&&e.push("text-"+u+":"+f)}),e.join(";")}function pK(r,e,t,a){var n=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),c=r.getModel("textStyle"),v=SL(r,"html"),h=u+"px "+f+"px "+s+"px "+l;return n.push("box-shadow:"+h),e&&i>0&&n.push(hK(i,t,a)),o&&n.push("background-color:"+o),A(["width","color","radius"],function(d){var p="border-"+d,g=PD(p),y=r.get(g);y!=null&&n.push(p+":"+y+(d==="color"?"":"px"))}),n.push(dK(c)),v!=null&&n.push("padding:"+wu(v).join("px ")+"px"),n.join(";")+";"}function cC(r,e,t,a,n){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&yE(r,o,t,a,n)}else{r[0]=a,r[1]=n;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var gK=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Rt.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=e.getZr(),i=t.appendTo,o=i&&(K(i)?document.querySelector(i):os(i)?i:ot(i)&&i(e.getDom()));cC(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(a),this._api=e,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();_r(f,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),a=lK(t,"position"),n=t.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=fK+pK(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+fC(i[0],i[1],!0)+("border-color:"+ji(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,n,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(K(i)&&a.get("trigger")==="item"&&!kR(a)&&(s=vK(a,n,i)),K(e))o.innerHTML=e+s;else if(e){o.innerHTML="",U(e)||(e=[e]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,n=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(t,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,n,i){if(!(i.from===this.uid||Rt.node||!n.getDom())){var o=dC(i,n);this._ticket="";var s=i.dataByCoordSys,l=CK(i,a,n);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:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=SK;f.x=i.x,f.y=i.y,f.update(),gt(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,a,n,i))return;var c=yR(i,a),v=c.point[0],h=c.point[1];v!=null&&h!=null&&this._tryShow({offsetX:v,offsetY:h,target:c.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(dC(i,n))},e.prototype._manuallyAxisShowTip=function(t,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(u){var f=u.getData(),c=fl([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,a){var n=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(n){var s=gt(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ri(n,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(gt(f).dataIndex!=null?l=f:gt(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(t,l,a):u?this._showComponentItemTooltip(t,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var n=t.get("showDelay");a=j(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},e.prototype._showAxisTooltip=function(t,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=fl([a.tooltipOption],i),l=this._renderMode,u=[],f=ue("section",{blocks:[],noHeader:!0}),c=[],v=new ud;A(t,function(m){A(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=hR(b,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=ue("section",{header:x,noHeader:!Mr(x),sortBlocks:!0,blocks:[]});f.blocks.push(w),A(_.seriesDataIndices,function(T){var C=n.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,D=C.getDataParams(M);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=Uc(S.axis,{value:b}),D.axisValueLabel=x,D.marker=v.makeTooltipMarker("item",ji(D.color),l);var I=AS(C.formatTooltip(M,!0,null)),L=I.frag;if(L){var P=fl([C],i).get("valueFormatter");w.blocks.push(P?W({valueFormatter:P},L):L)}I.text&&c.push(I.text),u.push(D)}})}})}),f.blocks.reverse(),c.reverse();var h=a.position,d=s.get("order"),p=RS(f,v,l,d,n.get("useUTC"),s.get("textStyle"));p&&c.unshift(p);var g=l==="richText"?` `:"
",y=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],h,null,v)})},e.prototype._showSeriesItemTooltip=function(t,a,n){var i=this._ecModel,o=gt(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,v=u.getData(c),h=this._renderMode,d=t.positionDefault,p=fl([v.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,c),m=new ud;y.marker=m.makeTooltipMarker("item",ji(y.color),h);var _=AS(u.formatTooltip(f,!1,c)),S=p.get("order"),b=p.get("valueFormatter"),x=_.frag,w=x?RS(b?W({valueFormatter:b},x):x,m,h,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,w,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,n){var i=this._renderMode==="html",o=gt(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(K(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=st(l),l.content=Be(l.content));var c=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&c.push(v),c.push({formatter:l.content});var h=t.positionDefault,d=fl(c,this._tooltipModel,h?{position:h}:null),p=d.get("content"),g=Math.random()+"",y=new ud;this._showOrMove(d,function(){var m=st(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,t.offsetX,t.offsetY,t.position,a,y)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,n,i,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var c=this._tooltipContent;c.setEnterable(t.get("enterable"));var v=t.get("formatter");l=l||t.get("position");var h=a,d=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),p=d.color;if(v)if(K(v)){var g=t.ecModel.get("useUTC"),y=U(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;h=v,m&&(h=Yv(y.axisValue,h,g)),h=RD(h,n,!0)}else if(ot(v)){var _=j(function(S,b){S===this._ticket&&(c.setContent(b,f,t,p,l),this._updatePosition(t,l,o,s,c,n,u))},this);this._ticket=i,h=v(n,i,_)}else h=v;c.setContent(h,f,t,p,l),c.show(t,p),this._updatePosition(t,l,o,s,c,n,u)}},e.prototype._getNearestPoint=function(t,a,n,i,o){if(n==="axis"||U(a))return{color:i||o};if(!U(a))return{color:i||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||t.get("position");var c=o.getSize(),v=t.get("align"),h=t.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),ot(a)&&(a=a([n,i],s,o.el,d,{viewSize:[u,f],contentSize:c.slice()})),U(a))n=q(a[0],u),i=q(a[1],f);else if(vt(a)){var p=a;p.width=c[0],p.height=c[1];var g=Xt(p,{width:u,height:f});n=g.x,i=g.y,v=null,h=null}else if(K(a)&&l){var y=TK(a,d,c,t.get("borderWidth"));n=y[0],i=y[1]}else{var y=bK(n,i,o,u,f,v?null:20,h?null:20);n=y[0],i=y[1]}if(v&&(n-=pC(v)?c[0]/2:v==="right"?c[0]:0),h&&(i-=pC(h)?c[1]/2:h==="bottom"?c[1]:0),kR(t)){var y=wK(n,i,o,u,f);n=y[0],i=y[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&A(u,function(v,h){var d=c[h]||{},p=v.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&v.value===d.value&&v.axisType===d.axisType&&v.axisId===d.axisId&&p.length===g.length,o&&A(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&A(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){Rt.node||!a.getDom()||(eu(this,"_updatePosition"),this._tooltipContent.dispose(),Fy("itemTooltip",a))},e.type="tooltip",e}(jt);function fl(r,e,t){var a=e.ecModel,n;t?(n=new Pt(t,a,a),n=new Pt(e.option,n,a)):n=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Pt&&(o=o.get("tooltip",!0)),K(o)&&(o={formatter:o}),o&&(n=new Pt(o,n,a)))}return n}function dC(r,e){return r.dispatchAction||j(e.dispatchAction,e)}function bK(r,e,t,a,n,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(e+u+o>n?e-=u+o:e+=o),[r,e]}function wK(r,e,t,a,n){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,n)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function TK(r,e,t,a){var n=t[0],i=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-n/2,l=e.y+f/2-i/2;break;case"top":s=e.x+u/2-n/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+f+o;break;case"left":s=e.x-n-o,l=e.y+f/2-i/2;break;case"right":s=e.x+u+o,l=e.y+f/2-i/2}return[s,l]}function pC(r){return r==="center"||r==="middle"}function CK(r,e,t){var a=Cm(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=ws(e,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=gt(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}const AK=xK;function MK(r){xt(Eu),r.registerComponentModel(oK),r.registerComponentView(AK),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},ae),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},ae)}var DK=["rect","polygon","keep","clear"];function LK(r,e){var t=zt(r?r.brush:[]);if(t.length){var a=[];A(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;U(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),IK(s),e&&!s.length&&s.push.apply(s,DK)}}function IK(r){var e={};A(r,function(t){e[t]=1}),r.length=0,A(e,function(t,a){r.push(a)})}var gC=A;function yC(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Ky(r,e,t){var a={};return gC(e,function(i){var o=a[i]=n();gC(r[i],function(s,l){if(Re.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new Re(u),l==="opacity"&&(u=st(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Re(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function NR(r,e,t){var a;A(t,function(n){e.hasOwnProperty(n)&&yC(e[n])&&(a=!0)}),a&&A(t,function(n){e.hasOwnProperty(n)&&yC(e[n])?r[n]=st(e[n]):delete r[n]})}function PK(r,e,t,a,n,i){var o={};A(r,function(c){var v=Re.prepareVisualTypes(e[c]);o[c]=v});var s;function l(c){return u0(t,s,c)}function u(c,v){IL(t,s,c,v)}i==null?t.each(f):t.each([i],f);function f(c,v){s=i==null?c:v;var h=t.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var d=a.call(n,c),p=e[d],g=o[d],y=0,m=g.length;ye[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&bC(e)}};function bC(r){return new dt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var zK=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new t_(a.getZr())).on("brush",j(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){VR(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:st(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:st(n),$from:a})},e.type="brush",e}(jt);const GK=zK;var FK=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&NR(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=Y(t,function(a){return wC(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=wC(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:G.color.backgroundTint,borderColor:G.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:G.color.disabled},e}(Dt);function wC(r,e){return St({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Pt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}const HK=FK;var WK=["rect","polygon","lineX","lineY","keep","clear"],$K=function(r){F(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,A(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return A(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:WK.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(Tr);const UK=$K;function YK(r){r.registerComponentView(GK),r.registerComponentModel(HK),r.registerPreprocessor(LK),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,EK),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},ae),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},ae),Zo("brush",UK)}var ZK=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:G.size.m,backgroundColor:G.color.transparent,borderColor:G.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:G.color.primary},subtextStyle:{fontSize:12,color:G.color.quaternary}},e}(Dt),XK=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=it(t.get("textBaseline"),t.get("textVerticalAlign")),f=new Lt({style:Ft(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),v=t.get("subtext"),h=new Lt({style:Ft(s,{text:v,fill:s.getTextColor(),y:c.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=t.get("link"),p=t.get("sublink"),g=t.get("triggerEvent",!0);f.silent=!d&&!g,h.silent=!p&&!g,d&&f.on("click",function(){Bc(d,"_"+t.get("target"))}),p&&h.on("click",function(){Bc(p,"_"+t.get("subtarget"))}),gt(f).eventData=gt(h).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(f),v&&i.add(h);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=ye(t,n),S=Xt(m,_.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var b={align:l,verticalAlign:u};f.setStyle(b),h.setStyle(b),y=i.getBoundingRect();var x=S.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var T=new bt({shape:{x:y.x-x[3],y:y.y-x[0],width:y.width+x[1]+x[3],height:y.height+x[0]+x[2],r:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(T)}},e.type="title",e}(jt);function qK(r){r.registerComponentModel(ZK),r.registerComponentView(XK)}var KK=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],n=t.axisType,i=this._names=[],o;n==="category"?(o=[],A(a,function(u,f){var c=he(bs(u),""),v;vt(u)?(v=st(u),v.value=f):v=f,o.push(v),i.push(c)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Ye([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:G.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:G.color.secondary},data:[]},e}(Dt);const TC=KK;var zR=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=Hn(TC.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:G.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:G.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:G.color.tertiary},itemStyle:{color:G.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:G.color.accent50,borderColor:G.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:G.color.accent50,borderColor:G.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:G.color.accent60},itemStyle:{color:G.color.accent60,borderColor:G.color.accent60},controlStyle:{color:G.color.accent70,borderColor:G.color.accent70}},progress:{lineStyle:{color:G.color.accent30},itemStyle:{color:G.color.accent40}},data:[]}),e}(TC);ce(zR,qv.prototype);const jK=zR;var JK=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(jt);const QK=JK;var tj=function(r){F(e,r);function e(t,a,n,i){var o=r.call(this,t,a,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Xr);const ej=tj;var Rp=Math.PI,CC=wt(),rj=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,n){if(this.model=t,this.api=n,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return ue("nameValue",{noName:!0,value:f})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var n=t.get(["label","position"]),i=t.get("orient"),o=nj(t,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:Rp/2},c=i==="vertical"?o.height:o.width,v=t.getModel("controlStyle"),h=v.get("show",!0),d=h?v.get("itemSize"):0,p=h?v.get("itemGap"):0,g=d+p,y=t.get(["label","rotate"])||0;y=y*Rp/180;var m,_,S,b=v.get("position",!0),x=h&&v.get("showPlayBtn",!0),w=h&&v.get("showPrevBtn",!0),T=h&&v.get("showNextBtn",!0),C=0,M=c;b==="left"||b==="bottom"?(x&&(m=[0,0],C+=g),w&&(_=[C,0],C+=g),T&&(S=[M-d,0],M-=g)):(x&&(m=[M-d,0],M-=g),w&&(_=[0,0],C+=g),T&&(S=[M-d,0],M-=g));var D=[C,M];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:c,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:D,controlSize:d,controlGap:p}},e.prototype._position=function(t,a){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=Ae(),l=o.x,u=o.y+o.height;_a(s,s,[-l,-u]),zn(s,s,-Rp/2),_a(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),c=m(n.getBoundingRect()),v=m(i.getBoundingRect()),h=[n.x,n.y],d=[i.x,i.y];d[0]=h[0]=f[0][0];var p=t.labelPosOpt;if(p==null||K(p)){var g=p==="+"?0:1;_(h,c,f,1,g),_(d,v,f,1,1-g)}else{var g=p>=0?0:1;_(h,c,f,1,g),d[1]=h[1]+p}n.setPosition(h),i.setPosition(d),n.rotation=i.rotation=t.rotation,y(n),y(i);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,b,x,w,T){S[w]+=x[w][T]-b[w][T]}},e.prototype._createAxis=function(t,a){var n=a.getData(),i=a.get("axisType"),o=aj(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new ej("value",o,t.axisExtent,i);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new lt;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new de({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:W({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new de({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:ct({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],A(l,function(u){var f=n.dataToCoord(u.value),c=s.getItemModel(u.value),v=c.getModel("itemStyle"),h=c.getModel(["emphasis","itemStyle"]),d=c.getModel(["progress","itemStyle"]),p={x:f,y:0,onclick:j(o._changeTimeline,o,u.value)},g=AC(c,v,a,p);g.ensureState("emphasis").style=h.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),zi(g);var y=gt(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,a,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],A(u,function(f){var c=f.tickValue,v=l.getItemModel(c),h=v.getModel("label"),d=v.getModel(["emphasis","label"]),p=v.getModel(["progress","label"]),g=n.dataToCoord(f.tickValue),y=new Lt({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:j(o._changeTimeline,o,c),silent:!1,style:Ft(h,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Ft(d),y.ensureState("progress").style=Ft(p),a.add(y),zi(y),CC(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,a,n,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),c=i.get("inverse",!0);v(t.nextBtnPosition,"next",j(this._changeTimeline,this,c?"-":"+")),v(t.prevBtnPosition,"prev",j(this._changeTimeline,this,c?"+":"-")),v(t.playPosition,f?"stop":"play",j(this._handlePlayClick,this,!f),!0);function v(h,d,p,g){if(h){var y=$r(it(i.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=ij(i,d+"Icon",m,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,a.add(_),zi(_)}}},e.prototype._renderCurrentPointer=function(t,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(c){c.draggable=!0,c.drift=j(u._handlePointerDrag,u),c.ondragend=j(u._handlePointerDragend,u),MC(c,u._progressLine,s,n,i,!0)},onUpdate:function(c){MC(c,u._progressLine,s,n,i)}};this._currentPointer=AC(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var n=this._toAxisCoord(t)[0],i=this._axis,o=Dr(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(s[o]=+s[o].toFixed(d)),[s,h]}var Yf={min:mt(Uf,"min"),max:mt(Uf,"max"),average:mt(Uf,"average"),median:mt(Uf,"median")};function yu(r,e){if(e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!hj(e)&&!U(e.coord)&&U(n)){var i=FR(e,t,a,r);if(e=st(e),e.type&&Yf[e.type]&&i.baseAxis&&i.valueAxis){var o=_t(n,i.baseAxis.dim),s=_t(n,i.valueAxis.dim),l=Yf[e.type](t,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!U(n)){e.coord=[];var u=r.getBaseAxis();if(u&&e.type&&Yf[e.type]){var f=a.getOtherAxis(u);f&&(e.value=gv(t,t.mapDimension(f.dim),e.type))}}else for(var c=e.coord,v=0;v<2;v++)Yf[c[v]]&&(c[v]=gv(t,t.mapDimension(n[v]),c[v]));return e}}function FR(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(dj(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function dj(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function mu(r,e){return r&&r.containData&&e.coord&&!Jy(e)?r.containData(e.coord):!0}function pj(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Jy(e)&&!Jy(t)?r.containZone(e.coord,t.coord):!0}function HR(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Ln(o,e[i])}:function(t,a,n,i){return Ln(t.value,e[i])}}function gv(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var kp=wt(),gj=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=at()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){kp(s).keep=!1}),a.eachSeries(function(s){var l=Xa.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!kp(s).keep&&i.group.remove(s.group)}),yj(a,o,this.type)},e.prototype.markKeep=function(t){kp(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;A(t,function(i){var o=Xa.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?VM(l):km(l))})}})},e.type="marker",e}(jt);function yj(r,e,t){r.eachSeries(function(a){var n=Xa.getMarkerModelFromSeries(a,t),i=e.get(a.id);if(n&&i&&i.group){var o=Ki(n),s=o.z,l=o.zlevel;$v(i.group,s,l)}})}const D_=gj;function LC(r,e,t){var a=e.coordinateSystem,n=t.getWidth(),i=t.getHeight(),o=a&&a.getArea&&a.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",f=u?o?o.width:0:n,c=u?o?o.height:0:i,v=u&&o?o.x:0,h=u&&o?o.y:0,d,p=q(l.get("x"),f)+v,g=q(l.get("y"),c)+h;if(!isNaN(p)&&!isNaN(g))d=[p,g];else if(e.getMarkerPosition)d=e.getMarkerPosition(r.getValues(r.dimensions,s));else if(a){var y=r.get(a.dimensions[0],s),m=r.get(a.dimensions[1],s);d=a.dataToPoint([y,m])}isNaN(p)||(d[0]=p),isNaN(g)||(d[1]=g),r.setItemLayout(s,d)})}var mj=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Xa.getMarkerModelFromSeries(i,"markPoint");o&&(LC(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Iu),c=_j(o,t,a);a.setData(c),LC(a.getData(),t,i),c.each(function(v){var h=c.getItemModel(v),d=h.getShallow("symbol"),p=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),y=h.getShallow("symbolOffset"),m=h.getShallow("symbolKeepAspect");if(ot(d)||ot(p)||ot(g)||ot(y)){var _=a.getRawValue(v),S=a.getDataParams(v);ot(d)&&(d=d(_,S)),ot(p)&&(p=p(_,S)),ot(g)&&(g=g(_,S)),ot(y)&&(y=y(_,S))}var b=h.getModel("itemStyle").getItemStyle(),x=h.get("z2"),w=Au(l,"color");b.fill||(b.fill=w),c.setItemVisual(v,{z2:it(x,0),symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),f.updateData(c),this.group.add(f.group),c.eachItemGraphicEl(function(v){v.traverse(function(h){gt(h).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(D_);function _j(r,e,t){var a;r?a=Y(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return W(W({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Ye(a,t),i=Y(t.get("data"),mt(yu,e));r&&(i=Ot(i,mt(mu,r)));var o=HR(!!r,a);return n.initData(i,null,o),n}const Sj=mj;function xj(r){r.registerComponentModel(vj),r.registerComponentView(Sj),r.registerPreprocessor(function(e){M_(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var bj=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(Xa);const wj=bj;var Zf=wt(),Tj=function(r,e,t,a){var n=r.getData(),i;if(U(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=Pe(a.yAxis,a.xAxis);else{var u=FR(a,n,e,r);s=u.valueAxis;var f=o2(n,u.valueDataDim);l=gv(n,f,o)}var c=s.dim==="x"?0:1,v=1-c,h=st(a),d={coord:[]};h.type=null,h.coord=[],h.coord[v]=-1/0,d.coord[v]=1/0;var p=t.get("precision");p>=0&&At(l)&&(l=+l.toFixed(Math.min(p,20))),h.coord[c]=d.coord[c]=l,i=[h,d,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[yu(r,i[0]),yu(r,i[1]),W({},i[2])];return g[2].type=g[2].type||null,St(g[2],g[0]),St(g[2],g[1]),g};function yv(r){return!isNaN(r)&&!isFinite(r)}function IC(r,e,t,a){var n=1-r,i=a.dimensions[r];return yv(e[n])&&yv(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function Cj(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(IC(1,t,a,r)||IC(0,t,a,r)))return!0}return mu(r,e[0])&&mu(r,e[1])}function Ep(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=q(o.get("x"),n.getWidth()),u=q(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var f=i.dimensions,c=r.get(f[0],e),v=r.get(f[1],e);s=i.dataToPoint([c,v])}if(On(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),f=i.dimensions;yv(r.get(f[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):yv(r.get(f[1],e))&&(s[1]=d.toGlobalCoord(d.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var Aj=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Xa.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=Zf(o).from,u=Zf(o).to;l.each(function(f){Ep(l,f,!0,i,n),Ep(u,f,!1,i,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Z0);this.group.add(f.group);var c=Mj(o,t,a),v=c.from,h=c.to,d=c.line;Zf(a).from=v,Zf(a).to=h,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");U(p)||(p=[p,p]),U(g)||(g=[g,g]),U(y)||(y=[y,y]),U(m)||(m=[m,m]),c.from.each(function(S){_(v,S,!0),_(h,S,!1)}),d.each(function(S){var b=d.getItemModel(S),x=b.getModel("lineStyle").getLineStyle();d.setItemLayout(S,[v.getItemLayout(S),h.getItemLayout(S)]);var w=b.get("z2");x.stroke==null&&(x.stroke=v.getItemVisual(S,"style").fill),d.setItemVisual(S,{z2:it(w,0),fromSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(S,"symbolOffset"),fromSymbolRotate:v.getItemVisual(S,"symbolRotate"),fromSymbolSize:v.getItemVisual(S,"symbolSize"),fromSymbol:v.getItemVisual(S,"symbol"),toSymbolKeepAspect:h.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(S,"symbolOffset"),toSymbolRotate:h.getItemVisual(S,"symbolRotate"),toSymbolSize:h.getItemVisual(S,"symbolSize"),toSymbol:h.getItemVisual(S,"symbol"),style:x})}),f.updateData(d),c.line.eachItemGraphicEl(function(S){gt(S).dataModel=a,S.traverse(function(b){gt(b).dataModel=a})});function _(S,b,x){var w=S.getItemModel(b);Ep(S,b,x,t,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Au(l,"color")),S.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:it(w.get("symbolOffset",!0),m[x?0:1]),symbolRotate:it(w.get("symbolRotate",!0),y[x?0:1]),symbolSize:it(w.get("symbolSize"),g[x?0:1]),symbol:it(w.get("symbol",!0),p[x?0:1]),style:T})}this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(D_);function Mj(r,e,t){var a;r?a=Y(r&&r.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return W(W({},f),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Ye(a,t),i=new Ye(a,t),o=new Ye([],t),s=Y(t.get("data"),mt(Tj,e,r,t));r&&(s=Ot(s,mt(Cj,r)));var l=HR(!!r,a);return n.initData(Y(s,function(u){return u[0]}),null,l),i.initData(Y(s,function(u){return u[1]}),null,l),o.initData(Y(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}const Dj=Aj;function Lj(r){r.registerComponentModel(wj),r.registerComponentView(Dj),r.registerPreprocessor(function(e){M_(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var Ij=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(Xa);const Pj=Ij;var Xf=wt(),Rj=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=yu(r,n),s=yu(r,i),l=o.coord,u=s.coord;l[0]=Pe(l[0],-1/0),l[1]=Pe(l[1],-1/0),u[0]=Pe(u[0],1/0),u[1]=Pe(u[1],1/0);var f=hm([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function mv(r){return!isNaN(r)&&!isFinite(r)}function PC(r,e,t,a){var n=1-r;return mv(e[n])&&mv(t[n])}function kj(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return On(r,"cartesian2d")?t&&a&&(PC(1,t,a)||PC(0,t,a))?!0:pj(r,n,i):mu(r,n)||mu(r,i)}function RC(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=q(o.get(t[0]),n.getWidth()),u=q(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var f=r.getValues(["x0","y0"],e),c=r.getValues(["x1","y1"],e),v=i.clampData(f),h=i.clampData(c),d=[];t[0]==="x0"?d[0]=v[0]>h[0]?c[0]:f[0]:d[0]=v[0]>h[0]?f[0]:c[0],t[1]==="y0"?d[1]=v[1]>h[1]?c[1]:f[1]:d[1]=v[1]>h[1]?f[1]:c[1],s=a.getMarkerPosition(d,t,!0)}else{var p=r.get(t[0],e),g=r.get(t[1],e),y=[p,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(On(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),p=r.get(t[0],e),g=r.get(t[1],e);mv(p)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):mv(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var kC=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],Ej=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=Xa.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=Y(kC,function(c){return RC(s,l,c,i,n)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new lt});this.group.add(f.group),this.markKeep(f);var c=Oj(o,t,a);a.setData(c),c.each(function(v){var h=Y(kC,function(M){return RC(c,v,M,t,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),y=p.getExtent(),m=[d.parse(c.get("x0",v)),d.parse(c.get("x1",v))],_=[p.parse(c.get("y0",v)),p.parse(c.get("y1",v))];Dr(m),Dr(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),b=!S;c.setItemLayout(v,{points:h,allClipped:b});var x=c.getItemModel(v),w=x.getModel("itemStyle").getItemStyle(),T=x.get("z2"),C=Au(l,"color");w.fill||(w.fill=C,K(w.fill)&&(w.fill=bc(w.fill,.4))),w.stroke||(w.stroke=C),c.setItemVisual(v,"style",w),c.setItemVisual(v,"z2",it(T,0))}),c.diff(Xf(f).data).add(function(v){var h=c.getItemLayout(v),d=c.getItemVisual(v,"z2");if(!h.allClipped){var p=new qe({z2:it(d,0),shape:{points:h.points}});c.setItemGraphicEl(v,p),f.group.add(p)}}).update(function(v,h){var d=Xf(f).data.getItemGraphicEl(h),p=c.getItemLayout(v),g=c.getItemVisual(v,"z2");p.allClipped?d&&f.group.remove(d):(d?It(d,{z2:it(g,0),shape:{points:p.points}},a,v):d=new qe({shape:{points:p.points}}),c.setItemGraphicEl(v,d),f.group.add(d))}).remove(function(v){var h=Xf(f).data.getItemGraphicEl(v);f.group.remove(h)}).execute(),c.eachItemGraphicEl(function(v,h){var d=c.getItemModel(h),p=c.getItemVisual(h,"style");v.useStyle(c.getItemVisual(h,"style")),xe(v,ge(d),{labelFetcher:a,labelDataIndex:h,defaultText:c.getName(h)||"",inheritColor:K(p.fill)?bc(p.fill,1):G.color.neutral99}),pe(v,d),Zt(v,null,null,d.get(["emphasis","disabled"])),gt(v).dataModel=a}),Xf(f).data=c,f.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e}(D_);function Oj(r,e,t){var a,n,i=["x0","y0","x1","y1"];if(r){var o=Y(r&&r.dimensions,function(u){var f=e.getData(),c=f.getDimensionInfo(f.mapDimension(u))||{};return W(W({},c),{name:u,ordinalMeta:null})});n=Y(i,function(u,f){return{name:u,type:o[f%2].type}}),a=new Ye(n,t)}else n=[{name:"value",type:"float"}],a=new Ye(n,t);var s=Y(t.get("data"),mt(Rj,e,r,t));r&&(s=Ot(s,mt(kj,r)));var l=r?function(u,f,c,v){var h=u.coord[Math.floor(v/2)][v%2];return Ln(h,n[v])}:function(u,f,c,v){return Ln(u.value,n[v])};return a.initData(s,null,l),a.hasItemOption=!0,a}const Bj=Ej;function Nj(r){r.registerComponentModel(Pj),r.registerComponentView(Bj),r.registerPreprocessor(function(e){M_(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Vj=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},zj=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),this._updateSelector(t)},e.prototype._updateSelector=function(t){var a=t.selector,n=this.ecModel;a===!0&&(a=t.selector=["all","inverse"]),U(a)&&A(a,function(i,o){K(i)&&(i={type:i}),a[o]=St(i,Vj(n,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:G.size.m,align:"auto",backgroundColor:G.color.transparent,borderColor:G.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:G.color.disabled,inactiveBorderColor:G.color.disabled,inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:G.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:G.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:G.color.tertiary,borderWidth:1,borderColor:G.color.border},emphasis:{selectorLabel:{show:!0,color:G.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e}(Dt);const Qy=zj;var Vo=mt,tm=A,qf=lt,Gj=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new qf),this.group.add(this._selectorGroup=new qf),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,a,n,l,s,u);var f=ye(t,n).refContainer,c=t.getBoxLayoutParams(),v=t.get("padding"),h=Xt(c,f,v),d=this.layoutInner(t,o,h,i,l,u),p=Xt(ct({width:d.width,height:d.height},c),f,v);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=IR(d,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,n,i,o,s,l){var u=this.getContentGroup(),f=at(),c=a.get("selectedMode"),v=a.get("triggerEvent"),h=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),tm(a.getData(),function(d,p){var g=this,y=d.get("name");if(!this.newlineDisabled&&(y===""||y===` `)){var m=new qf;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(y)[0];if(!f.get(y))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),w=S.getVisual("style"),T=this._createItem(_,y,p,d,a,t,b,w,x,c,i);T.on("click",Vo(EC,y,null,i,h)).on("mouseover",Vo(em,_.name,null,i,h)).on("mouseout",Vo(rm,_.name,null,i,h)),n.ssr&&T.eachChild(function(C){var M=gt(C);M.seriesIndex=_.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),v&&T.eachChild(function(C){g.packEventData(C,a,_,p,y)}),f.set(y,!0)}else n.eachRawSeries(function(C){var M=this;if(!f.get(y)&&C.legendVisualProvider){var D=C.legendVisualProvider;if(!D.containName(y))return;var I=D.indexOfName(y),L=D.getItemVisual(I,"style"),P=D.getItemVisual(I,"legendIcon"),k=er(L.fill);k&&k[3]===0&&(k[3]=.2,L=W(W({},L),{fill:pa(k,"rgba")}));var R=this._createItem(C,y,p,d,a,t,{},L,P,c,i);R.on("click",Vo(EC,null,y,i,h)).on("mouseover",Vo(em,null,y,i,h)).on("mouseout",Vo(rm,null,y,i,h)),n.ssr&&R.eachChild(function(B){var E=gt(B);E.seriesIndex=C.seriesIndex,E.dataIndex=p,E.ssrType="legend"}),v&&R.eachChild(function(B){M.packEventData(B,a,C,p,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},e.prototype.packEventData=function(t,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};gt(t).eventData=s},e.prototype._createSelector=function(t,a,n,i,o){var s=this.getSelectorGroup();tm(t,function(u){var f=u.type,c=new Lt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(c);var v=a.getModel("selectorLabel"),h=a.getModel(["emphasis","selectorLabel"]);xe(c,{normal:v,emphasis:h},{defaultText:u.title}),zi(c)})},e.prototype._createItem=function(t,a,n,i,o,s,l,u,f,c,v){var h=t.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=Fj(f,i,l,u,h,g,v),b=new qf,x=i.getModel("textStyle");if(ot(t.getLegendIcon)&&(!_||_==="inherit"))b.add(t.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;b.add(Hj({itemWidth:d,itemHeight:p,icon:f,iconRotate:w,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,C=s,M=o.get("formatter"),D=a;K(M)&&M?D=M.replace("{name}",a??""):ot(M)&&(D=M(a));var I=g?x.getTextColor():i.get("inactiveColor");b.add(new Lt({style:Ft(x,{text:D,x:T,y:p/2,fill:I,align:C,verticalAlign:"middle"},{inheritColor:I})}));var L=new bt({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&Ka({el:L,componentModel:o,itemName:a,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(k){k.silent=!0}),L.silent=!c,this.getContentGroup().add(b),zi(b),b.__legendDataIndex=n,b},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Fi(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Fi("horizontal",u,t.get("selectorItemGap",!0));var v=u.getBoundingRect(),h=[-v.x,-v.y],d=t.get("selectorButtonGap",!0),p=t.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?h[p]+=f[g]+d:c[p]+=v[g]+d,h[1-p]+=f[y]/2-v[y]/2,u.x=h[0],u.y=h[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=f[g]+d+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+h[1-p]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(jt);function Fj(r,e,t,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),tm(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?a.decal:cs(c,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:t).opacity),s(u,a);var v=e.getModel("lineStyle"),h=v.getLineStyle();if(s(h,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),h.stroke==="auto"&&(h.stroke=a.fill),!i){var d=e.get("inactiveBorderWidth"),p=u[f];u.lineWidth=d==="auto"?a.lineWidth>0&&p?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),h.stroke=v.get("inactiveColor"),h.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function Hj(r){var e=r.icon||"roundRect",t=fe(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=G.color.neutral00,t.style.lineWidth=2),t}function EC(r,e,t,a){rm(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r??e}),em(r,e,t,a)}function WR(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,n=e.length;an[o],g=[-h.x,-h.y];a||(g[i]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=it(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(p){var S=t.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=h[s]/2-d[s]/2,f.setPosition(g),c.setPosition(y),v.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:h[o],b[s]=Math.max(h[s],d[s]),b[l]=Math.min(0,d[l]+m[1-i]),c.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-d[o]-_,0),x[s]=b[s],c.setClipPath(new bt({shape:x})),c.__rectSize=x[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&It(f,{x:w.contentPosition[0],y:w.contentPosition[1]},p?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,a,n){var i=this._getPageInfo(a)[t];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var n=this._controllerGroup;A(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",v=a[c]!=null,h=n.childOfName(f);h&&(h.setStyle("fill",v?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=v?"pointer":"default")});var i=n.childOfName("pageText"),o=t.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",K(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=Op[o],l=Bp[o],u=this._findTargetItemIndex(a),f=n.children(),c=f[u],v=f.length,h=v?1:0,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return d;var p=S(c);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=v;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(m,_.s))&&y.i=w&&x.s<=w+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(a=s)}),a??i},e.type="legend.scroll",e}($R);const Xj=Zj;function qj(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(a)})})}function Kj(r){xt(UR),r.registerComponentModel(Yj),r.registerComponentView(Xj),qj(r)}function jj(r){xt(UR),xt(Kj)}var Jj=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=Hn(gu.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(gu);const Qj=Jj;var L_=wt();function tJ(r,e,t){L_(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function eJ(r,e){for(var t=L_(r).coordSysRecordMap,a=t.keys(),n=0;ni[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function oJ(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=L_(t),n=a.coordSysRecordMap||(a.coordSysRecordMap=at());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=MR(i);A(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,rJ(t,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=at());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){YR(n,i);return}var f=iJ(l,i,t);o.enable(f.controlType,f.opt),Ps(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var sJ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),tJ(n,t,{pan:j(Np.pan,this),zoom:j(Np.zoom,this),scrollMove:j(Np.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){eJ(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(x_),Np={zoom:function(r,e,t,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=Vp[e](null,[a.originX,a.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(Bn(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:VC(function(r,e,t,a,n,i){var o=Vp[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:VC(function(r,e,t,a,n,i){var o=Vp[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function VC(r){return function(e,t,a,n){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,a,n);if(Bn(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Vp={grid:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,a,n){var i=t.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};const lJ=sJ;function ZR(r){b_(r),r.registerComponentModel(Qj),r.registerComponentView(lJ),oJ(r)}var uJ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=Hn(gu.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:G.color.accent10,borderRadius:0,backgroundColor:G.color.transparent,dataBackground:{lineStyle:{color:G.color.accent30,width:.5},areaStyle:{color:G.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:G.color.accent40,width:.5},areaStyle:{color:G.color.accent20,opacity:.3}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:G.color.neutral00,borderColor:G.color.accent20},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:G.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:G.color.tertiary},brushSelect:!0,brushStyle:{color:G.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:G.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e}(gu);const fJ=uJ;var hl=bt,cJ=1,zp=30,vJ=7,dl="horizontal",zC="vertical",hJ=5,dJ=["line","bar","candlestick","scatter"],pJ={easing:"cubicOut",duration:100,delay:0},gJ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=j(this._onBrush,this),this._onBrushEnd=j(this._onBrushEnd,this)},e.prototype.render=function(t,a,n,i){if(r.prototype.render.apply(this,arguments),Ps(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){eu(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new lt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,n=t.get("brushSelect"),i=n?vJ:0,o=ye(t,a).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===dl?{right:o.width-s.x-s.width,top:o.height-zp-l-i,width:s.width,height:zp}:{right:l,top:s.y,width:zp,height:s.height},f=io(t.option);A(["right","top","width","height"],function(v){f[v]==="ph"&&(f[v]=u[v])});var c=Xt(f,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===zC&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===dl&&!o?{scaleY:l?1:-1,scaleX:1}:n===dl&&o?{scaleY:l?1:-1,scaleX:-1}:n===zC&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new hl({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new hl({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:j(this._onClickPanel,this)}),s=this.api.getZr();i?(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)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var c=o.getDataExtent(t.thisDim),v=o.getDataExtent(l),h=(v[1]-v[0])*.3;v=[v[0]-h,v[1]+h];var d=[0,a[1]],p=[0,a[0]],g=[[a[0],0],[0,0]],y=[],m=p[1]/Math.max(1,o.count()-1),_=a[0]/(c[1]-c[0]),S=t.thisAxis.type==="time",b=-m,x=Math.round(o.count()/a[0]),w;o.each([t.thisDim,l],function(I,L,P){if(x>0&&P%x){S||(b+=m);return}b=S?(+I-c[0])*_:b+m;var k=L==null||isNaN(L)||L==="",R=k?0:Et(L,v,d,!0);k&&!w&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!k&&w&&(g.push([b,0]),y.push([b,0])),k||(g.push([b,R]),y.push([b,R])),w=k}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var T=this.dataZoomModel;function C(I){var L=T.getModel(I?"selectedDataBackground":"dataBackground"),P=new lt,k=new qe({shape:{points:u},segmentIgnoreThreshold:1,style:L.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),R=new Ge({shape:{points:f},segmentIgnoreThreshold:1,style:L.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(k),P.add(R),P}for(var M=0;M<3;M++){var D=C(M===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!n&&!(a!==!0&&_t(dJ,u.get("type"))<0)){var f=i.getComponent(wn(o),s).axis,c=yJ(o),v,h=u.coordinateSystem;c!=null&&h.getOtherAxis&&(v=h.getOtherAxis(f).inverse),c=u.getData().mapDimension(c);var d=u.getData().mapDimension(o);n={thisAxis:f,series:u,thisDim:d,otherDim:c,otherAxisInverse:v}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),v=a.filler=new hl({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new hl({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:cJ,fill:G.color.transparent}})),A([0,1],function(_){var S=l.get("handleIcon");!zc[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=fe(S,-1,0,2,2,null,!0);b.attr({cursor:mJ(this._orient),draggable:!0,drift:j(this._onDragMove,this,_),ondragend:j(this._onDragEnd,this),onmouseover:j(this._showDataInfo,this,!0),onmouseout:j(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=q(w,this._size[1]),this._handleWidth=x.width/x.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(),zi(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[_]=b);var C=l.getModel("textStyle"),M=l.get("handleLabel")||{},D=M.show||!1;t.add(i[_]=new Lt({silent:!0,invisible:!D,style:Ft(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var h=v;if(c){var d=q(l.get("moveHandleSize"),s[1]),p=a.moveHandle=new bt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=a.moveHandleIcon=fe(l.get("moveHandleIcon"),-g/2,-g/2,g,g,G.color.neutral00,!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));h=a.moveZone=new bt({invisible:!0,shape:{y:s[1]-m,height:d+m}}),h.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:"default",drift:j(this._onDragMove,this,"all"),ondragstart:j(this._showDataInfo,this,!0),ondragend:j(this._onDragEnd,this),onmouseover:j(this._showDataInfo,this,!0),onmouseout:j(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[Et(t[0],[0,100],a,!0),Et(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];Bn(a,i,o,n.get("zoomLock")?"all":t,s.minSpan!=null?Et(s.minSpan,l,o,!0):null,s.maxSpan!=null?Et(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=Dr([Et(i[0],o,l,!0),Et(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(t){var a=this._displayables,n=this._handleEnds,i=Dr(n.slice()),o=this._size;A([0,1],function(h){var d=a.handles[h],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[h]+(h?-1:1),y:o[1]/2-p/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;fa[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,n=t.offsetY;this._brushStart=new ft(a,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();Bn(0,l,o,0,u.minSpan!=null?Et(u.minSpan,s,o,!0):null,u.maxSpan!=null?Et(u.maxSpan,s,o,!0):null),this._range=Dr([Et(l[0],o,s,!0),Et(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Fa(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new hl({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,a),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?pJ:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=MR(this.dataZoomModel).infoList;if(!t&&a.length){var n=a[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(x_);function yJ(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function mJ(r){return r==="vertical"?"ns-resize":"ew-resize"}const _J=gJ;function XR(r){r.registerComponentModel(fJ),r.registerComponentView(_J),b_(r)}function SJ(r){xt(ZR),xt(XR)}var xJ={get:function(r,e,t){var a=st((bJ[r]||{})[e]);return t&&U(a)?a[a.length-1]:a}},bJ={color:{active:["#006edd","#e0ffff"],inactive:[G.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const qR=xJ;var GC=Re.mapVisual,wJ=Re.eachVisual,TJ=U,FC=A,CJ=Dr,AJ=Et,MJ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&NR(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=j(t,this),this.controllerVisuals=Ky(this.option.controller,a,t),this.targetVisuals=Ky(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,a=this.option.seriesIndex;a==null&&t==null&&(a="all");var n=ws(this.ecModel,"series",{index:a,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return Y(n,function(i){return i.componentIndex})},e.prototype.eachTargetSeries=function(t,a){A(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(a,i)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(n){n===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],U(t)&&(t=t.slice(),u=!0);var f=a?t:u?[c(t[0]),c(t[1])]:c(t);if(K(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(ot(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+f[1]:t[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=CJ([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});St(i,n),St(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(c){TJ(a.color)&&!c.inRange&&(c.inRange={color:a.color.slice().reverse()}),c.inRange=c.inRange||{color:t.get("gradientColor")}}function u(c,v,h){var d=c[v],p=c[h];d&&!p&&(p=c[h]={},FC(d,function(g,y){if(Re.isValidType(y)){var m=qR.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function f(c){var v=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,h=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";FC(this.stateList,function(y){var m=this.itemSize,_=c[y];_||(_=c[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=v&&st(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=h&&st(h)||(s?m[0]:[m[0],m[0]])),_.symbol=GC(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var b=-1/0;wJ(S,function(x){x>b&&(b=x)}),_.symbolSize=GC(S,function(x){return AJ(x,[0,b],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:G.color.transparent,borderColor:G.color.borderTint,contentColor:G.color.theme[0],inactiveColor:G.color.disabled,borderWidth:0,padding:G.size.m,textGap:10,precision:0,textStyle:{color:G.color.secondary}},e}(Dt);const _v=MJ;var HC=[20,140],DJ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=HC[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=HC[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):U(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=Dr((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]=n[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},e.prototype.getVisualMeta=function(t){var a=WC(this,"outOfRange",this.getExtent()),n=WC(this,"inRange",this.option.range.slice()),i=[];function o(h,d){i.push({value:h,color:t(h,d)})}for(var s=0,l=0,u=n.length,f=a.length;lt[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),i},e.prototype._createBarPoints=function(t,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,n=this.visualMapModel.get("inverse");return new lt(a==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",n.mainGroup);PJ([0,1],function(c){var v=o[c];v.setStyle("fill",a.handlesColor[c]),v.y=t[c];var h=aa(t[c],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");v.scaleX=v.scaleY=d/l[0],v.x=l[0]-d/2;var p=Gr(n.handleLabelPoints[c],Gi(v,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}s[c].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var v={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",v),d=this.getControllerVisual(t,"symbolSize"),p=aa(t,s,u,!0),g=l[0]-d/2,y={x:c.x,y:c.y};c.y=p,c.x=g;var m=Gr(f.indicatorLabelPoint,Gi(c,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:g,y:p,style:{fill:h}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};c.x=y.x,c.y=y.y,c.animateTo(w,C),_.animateTo(T,C)}else c.attr(w),_.attr(T);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var D=0;Do[1]&&(c[1]=1/0),a&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var v=this._hoverLinkDataIndices,h=[];(a||ZC(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(c));var d=iB(v,h);this._dispatchHighDown("downplay",yc(d[0],n)),this._dispatchHighDown("highlight",yc(d[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(Ri(t.target,function(l){var u=gt(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function GJ(r,e,t,a){for(var n=e.targetVisuals[a],i=Re.prepareVisualTypes(n),o={color:Au(r.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(NJ,VJ),A(zJ,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(FJ))}function QR(r){r.registerComponentModel(LJ),r.registerComponentView(BJ),JR(r)}var HJ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],WJ[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=st(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=Y(this._pieceList,function(l){return l=st(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},n=Re.listVisualTypes(),i=this.isCategory();A(t.pieces,function(s){A(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),A(a,function(s,l){var u=!1;A(this.stateList,function(f){u=u||o(t,f,l)||o(t.target,f,l)},this),!u&&A(this.stateList,function(f){(t[f]||(t[f]={}))[l]=qR.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var n=this.option,i=this._pieceList,o=(a?n:t).selected||{};if(n.selected=o,A(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;A(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=st(t)},e.prototype.getValueState=function(t){var a=Re.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=Re.findPieceIndex(l,n);f===t&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var n=t.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,c){var v=i.getRepresentValue({interval:f});c||(c=i.getValueState(v));var h=t(v,c);f[0]===-1/0?n[0]=h:f[1]===1/0?n[1]=h:a.push({value:f[0],color:h},{value:f[1],color:h})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return A(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:a,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=Hn(_v.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(_v),WJ={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","≥"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function jC(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}const $J=HJ;var UJ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,f=Pe(a.get("showLabel",!0),!u),c=!a.get("selectedMode");u&&this._renderEndsText(t,u[0],s,f,o),A(l.viewPieceList,function(v){var h=v.piece,d=new lt;d.onclick=j(this._onItemClick,this,h),this._enableHoverLink(d,v.indexInModelPieceList);var p=a.getRepresentValue(h);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],c),f){var g=this.visualMapModel.getValueState(p),y=i.get("align")||o;d.add(new Lt({style:Ft(i,{x:y==="right"?-n:s[0]+n,y:s[1]/2,text:h.text,verticalAlign:i.get("verticalAlign")||"middle",align:y,opacity:it(i.get("opacity"),g==="outOfRange"?.5:1)}),silent:c}))}t.add(d)},this),u&&this._renderEndsText(t,u[1],s,f,o),Fi(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:yc(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return jR(t,this.api,t.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,a,n,i,o){if(a){var s=new lt,l=this.visualMapModel.textStyleModel;s.add(new Lt({style:Ft(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=Y(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},e.prototype._createItemSymbol=function(t,a,n,i){var o=fe(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=st(n.selected),s=a.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,A(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(KR);const YJ=UJ;function tk(r){r.registerComponentModel($J),r.registerComponentView(YJ),JR(r)}function ZJ(r){xt(QR),xt(tk)}var XJ=function(){function r(e){this._thumbnailModel=e}return r.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},r.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:dD(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(e,t){var a=t.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},r}(),qJ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.optionUpdated=function(t,a){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new XJ(this);if(this._target=null,this.ecModel.eachSeries(function(n){xw(n,null)}),this.shouldShow()){var a=this.getTarget();xw(a.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:G.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:G.color.neutral30,borderColor:G.color.neutral40,opacity:.3},z:10},e}(Dt),KJ=function(r){F(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){if(this._api=n,this._model=t,this._coordSys||(this._coordSys=new vo),!this._isEnabled()){this._clear();return}this._renderVersion=n.getMainProcessVersion();var i=this.group;i.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||G.color.neutral00);var l=ye(t,n).refContainer,u=Xt(ND(t,!0),l),f=s.lineWidth||0,c=this._contentRect=qi(u.clone(),f/2,!0,!0),v=new lt;i.add(v),v.setClipPath(new bt({shape:c.plain()}));var h=this._targetGroup=new lt;v.add(h);var d=u.plain();d.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new bt({style:s,shape:d,silent:!1,cursor:"grab"}));var p=t.getModel("windowStyle"),g=p.getShallow("borderRadius",!0);v.add(this._windowRect=new bt({shape:{x:0,y:0,width:0,height:0,r:g},style:p.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),QC(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),QC(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=this._targetGroup,n=this._coordSys,i=this._contentRect;if(a.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=t.z2Range.min-10,n.setBoundingRect(s.x,s.y,s.width,s.height);var l=Xt({left:"center",top:"center",aspect:s.width/s.height},i);n.setViewRect(l.x,l.y,l.width,l.height),o.attr(n.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var a=this._bridgeRendered;a&&a.renderVersion===t.renderVersion&&(a.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var a=Wr([],t.targetTrans),n=da([],this._coordSys.transform,a);this._transThisToTarget=Wr([],n);var i=t.viewportRect;i?i=i.clone():i=new dt(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(n);var o=this._windowRect,s=o.shape.r;o.setShape(ct({r:s},i))}},e.prototype._resetRoamController=function(t){var a=this,n=this._api,i=this._roamController;if(i||(i=this._roamController=new co(n.getZr())),!t||!this._isEnabled()){i.disable();return}i.enable(t,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return a._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",j(this._onPan,this)).on("zoom",j(this._onZoom,this))},e.prototype._onPan=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=ne([],[t.oldX,t.oldY],a),i=ne([],[t.oldX-t.dx,t.oldY-t.dy],a);this._api.dispatchAction(JC(this._model.getTarget().baseMapProvider,{dx:i[0]-n[0],dy:i[1]-n[1]}))}},e.prototype._onZoom=function(t){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=ne([],[t.originX,t.originY],a);this._api.dispatchAction(JC(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:n[0],originY:n[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var a=t.getTarget().baseMapProvider;return!!a},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e}(jt);function JC(r,e){var t=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",a={type:t};return a[r.mainType+"Id"]=r.id,W(a,e),a}function QC(r,e){var t=Ki(r);$v(e.group,t.z,t.zlevel)}function jJ(r){r.registerComponentModel(qJ),r.registerComponentView(KJ)}var JJ={label:{enabled:!0},decal:{show:!1}},tA=wt(),QJ={};function tQ(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=st(JJ);St(a.label,r.getLocaleModel().get("aria"),!1),St(t.option,a,!1),n(),i();function n(){var u=t.getModel("decal"),f=u.get("show");if(f){var c=at();r.eachSeries(function(v){if(!v.isColorBySeries()){var h=c.get(v.type);h||(h={},c.set(v.type,h)),tA(v).scope=h}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if(ot(v.enableAriaDecal)){v.enableAriaDecal();return}var h=v.getData();if(v.isColorBySeries()){var m=Ug(v.ecModel,v.name,QJ,r.getSeriesCount()),_=h.getVisual("decal");h.setVisual("decal",S(_,m))}else{var d=v.getRawData(),p={},g=tA(v).scope;h.each(function(b){var x=h.getRawIndex(b);p[x]=b});var y=d.count();d.each(function(b){var x=p[b],w=d.getName(b)||b+"",T=Ug(v.ecModel,w,g,y),C=h.getItemVisual(x,"decal");h.setItemVisual(x,"decal",S(C,T))})}function S(b,x){var w=b?W(W({},x),b):x;return w.dirty=!0,w}})}}function i(){var u=e.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=ct(c.option,f),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var v=r.getSeriesCount(),h=c.get(["data","maxCount"])||10,d=c.get(["series","maxCount"])||10,p=Math.min(v,d),g;if(!(v<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],S=v>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(S,{seriesCount:v}),r.eachSeries(function(T,C){if(C1?c.get(["series","multiple",I]):c.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>h){var P=c.get(["data","partialData"]);M+=o(P,{displayCnt:h})}else M+=c.get(["data","allData"]);for(var k=c.get(["data","separator","middle"]),R=c.get(["data","separator","end"]),B=c.get(["data","excludeDimensionId"]),E=[],V=0;V":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},aQ=function(){function r(e){var t=this._condVal=K(e)?new RegExp(e):sE(e)?e:null;if(t==null){var a="";kt(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return K(t)?this._condVal.test(e):At(t)?this._condVal.test(e+""):!1},r}(),nQ=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),iQ=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&a.push(n),n=[L,P]}function f(L,P,k,R){ts(L,k)&&ts(P,R)||n.push(L,P,k,R,k,R)}function c(L,P,k,R,B,E){var V=Math.abs(P-L),O=Math.tan(V/4)*4/3,N=PT:D2&&a.push(n),a}function nm(r,e,t,a,n,i,o,s,l,u){if(ts(r,t)&&ts(e,a)&&ts(n,o)&&ts(i,s)){l.push(o,s);return}var f=2/u,c=f*f,v=o-r,h=s-e,d=Math.sqrt(v*v+h*h);v/=d,h/=d;var p=t-r,g=a-e,y=n-o,m=i-s,_=p*p+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var C=[],M=[];Pn(r,t,n,o,.5,C),Pn(e,a,i,s,.5,M),nm(C[0],M[0],C[1],M[1],C[2],M[2],C[3],M[3],l,u),nm(C[4],M[4],C[5],M[5],C[6],M[6],C[7],M[7],l,u)}function _Q(r,e){var t=am(r),a=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),c=rk([l,u],f?0:1,e),v=(f?s:u)/c.length,h=0;hn,o=rk([a,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",c=r[s]/o.length,v=0;v1?null:new ft(p*l+r,p*u+e)}function bQ(r,e,t){var a=new ft;ft.sub(a,t,e),a.normalize();var n=new ft;ft.sub(n,r,e);var i=n.dot(a);return i}function Go(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function wQ(r,e,t){for(var a=r.length,n=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),wQ(e,u,f)}function Sv(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);Sv(r,i[0],n,a),Sv(r,i[1],t-n,a)}return a}function TQ(r,e){for(var t=[],a=0;a0)for(var b=a/t,x=-a/2;x<=a/2;x+=b){for(var w=Math.sin(x),T=Math.cos(x),C=0,_=0;_0;u/=2){var f=0,c=0;(r&u)>0&&(f=1),(e&u)>0&&(c=1),s+=u*u*(3*f^c),c===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function wv(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=Y(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),t=Math.min(c,t),a=Math.max(f,a),n=Math.max(c,n),[f,c]}),o=Y(i,function(s,l){return{cp:s,z:kQ(s[0],s[1],e,t,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function ik(r){return MQ(r.path,r.count)}function im(){return{fromIndividuals:[],toIndividuals:[],count:0}}function EQ(r,e,t){var a=[];function n(b){for(var x=0;x=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var BQ={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;uA(r)&&(u=r,f=e),uA(e)&&(u=e,f=r);function c(y,m,_,S,b){var x=y.many,w=y.one;if(x.length===1&&!b){var T=m?x[0]:w,C=m?w:x[0];if(xv(T))c({many:[T],one:C},!0,_,S,!0);else{var M=s?ct({delay:s(_,S)},l):l;P_(T,C,M),i(T,C,T,C,M)}}else for(var D=ct({dividePath:BQ[t],individualDelay:s&&function(B,E,V,O){return s(B+_,S)}},l),I=m?EQ(x,w,D):OQ(w,x,D),L=I.fromIndividuals,P=I.toIndividuals,k=L.length,R=0;Re.length,h=u?fA(f,u):fA(v?e:r,[v?r:e]),d=0,p=0;pok))for(var i=a.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof Tt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function pA(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function gA(r){return U(r)?r.sort().join(","):r}function dn(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function WQ(r,e){var t=at(),a=at(),n=at();return A(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=pA(i),f=gA(u);a.set(f,{dataGroupId:s,data:l}),U(u)&&A(u,function(c){n.set(c,{key:f,dataGroupId:s,data:l})})}),A(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=pA(i),u=gA(l),f=a.get(u);if(f)t.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:dn(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:dn(s),data:s}]});else if(U(l)){var c=[];A(l,function(d){var p=a.get(d);p.data&&c.push({dataGroupId:p.dataGroupId,divide:dn(p.data),data:p.data})}),c.length&&t.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:dn(s)}]})}else{var v=n.get(l);if(v){var h=t.get(v.key);h||(h={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:dn(v.data)}],newSeries:[]},t.set(v.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:dn(s)})}}}}),t}function yA(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:dn(e.oldData[s]),groupIdDim:o.dimension})}),A(zt(r.to),function(o){var s=yA(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:dn(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&sk(n,i,a)}function UQ(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){A(zt(a.seriesTransition),function(n){A(zt(n.to),function(i){for(var o=a.updatedSeries,s=0;so.vmin?t+=o.vmin-a+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:t+=e-a,a=o.vmax,n=!1;break}t+=o.vmin-a+o.gapReal,a=o.vmax}return n&&(t+=e-a),t},r.prototype.unelapse=function(e){for(var t=mA,a=_A,n=!0,i=0,o=0;ol?i=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):i=a+e-t,a=s.vmax,n=!1;break}t=u,a=s.vmax}return n&&(i=a+e-t),i},r}();function ZQ(){return new YQ}var mA=0,_A=0;function XQ(r,e){var t=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},n=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:n(),tpPrct:n()},E:{tpAbs:n(),tpPrct:n()}};A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(t+=l.val);var u=R_(s,e);if(u){var f=u.vmin!==s.vmin,c=u.vmax!==s.vmax,v=u.vmax-u.vmin;if(!(f&&c))if(f||c){var h=f?"S":"E";i[h][l.type].has=!0,i[h][l.type].span=v,i[h][l.type].inExtFrac=v/(s.vmax-s.vmin),i[h][l.type].val=l.val}else a[l.type].span+=v,a[l.type].val+=l.val}});var o=t*(0+(e[1]-e[0])+(a.tpAbs.val-a.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=t!==0?Math.max(o,0)*l.val/t:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function qQ(r,e,t,a,n,i){r!=="no"&&A(t,function(o){var s=R_(o,i);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],f=a(u),c=n*3/4;f>s.vmin-c&&fe[0]&&t=0&&o<1-1e-5}A(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:st(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(K(o.gap)){var u=Mr(o.gap);if(u.match(/%$/)){var f=parseFloat(u)/100;n(f)||(f=0),s.gapParsed.type="tpPrct",s.gapParsed.val=f,l=!0}}if(!l){var c=e(o.gap);(!isFinite(c)||c<0)&&(c=0),s.gapParsed.type="tpAbs",s.gapParsed.val=c}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),t&&t.noNegative&&A(["vmin","vmax"],function(h){s[h]<0&&(s[h]=0)}),s.vmin>s.vmax){var v=s.vmax;s.vmax=s.vmin,s.vmin=v}a.push(s)}}),a.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return A(a,function(o,s){i>o.vmin&&(a[s]=null),i=o.vmax}),{breaks:a.filter(function(o){return!!o})}}function k_(r,e){return sm(e)===sm(r)}function sm(r){return r.start+"_\0_"+r.end}function jQ(r,e,t){var a=[];A(r,function(i,o){var s=e(i);s&&s.type==="vmin"&&a.push([o])}),A(r,function(i,o){var s=e(i);if(s&&s.type==="vmax"){var l=to(a,function(u){return k_(e(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var n=[];return A(a,function(i){i.length===2&&n.push(t?i:[r[i[0]],r[i[1]]])}),n}function JQ(r,e,t,a){var n,i;if(r.break){var o=r.break.parsedBreak,s=to(t,function(c){return k_(c.breakOption,r.break.parsedBreak.breakOption)}),l=a(Math.pow(e,o.vmin),s.vmin),u=a(Math.pow(e,o.vmax),s.vmax),f={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?oe(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};n={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:f,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:n}}function QQ(r,e,t){var a={noNegative:!0},n=om(r,t,a),i=om(r,t,a),o=Math.log(e);return i.breaks=Y(i.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,f={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:f,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:n,parsedLogged:i}}var ttt={vmin:"start",vmax:"end"};function ett(r,e){return e&&(r=r||{},r.break={type:ttt[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),r}function rtt(){CV({createScaleBreakContext:ZQ,pruneTicksByBreak:qQ,addBreaksToTicks:KQ,parseAxisBreakOption:om,identifyAxisBreak:k_,serializeAxisBreakIdentifier:sm,retrieveAxisBreakPairs:jQ,getTicksLogTransformBreak:JQ,logarithmicParseBreaksFromOption:QQ,makeAxisLabelFormatterParamBreak:ett})}var SA=wt();function att(r,e){var t=to(r,function(a){return se().identifyAxisBreak(a.parsedBreak.breakOption,e.breakOption)});return t||r.push(t={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),t}function ntt(r){A(r,function(e){return e.shouldRemove=!0})}function itt(r){for(var e=r.length-1;e>=0;e--)r[e].shouldRemove&&r.splice(e,1)}function ott(r,e,t,a,n){var i=t.axis;if(i.scale.isBlank()||!se())return;var o=se().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=t.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),f=s.get("zigzagMaxSpan");u=Math.max(2,u||0),f=Math.max(u,f||0);var c=s.get("expandOnClick"),v=s.get("zigzagZ"),h=s.getModel("itemStyle"),d=h.getItemStyle(),p=d.stroke,g=d.lineWidth,y=d.lineDash,m=d.fill,_=new lt({ignoreModelZ:!0}),S=i.isHorizontal(),b=SA(e).visualList||(SA(e).visualList=[]);ntt(b);for(var x=function(C){var M=o[C][0].break.parsedBreak,D=[];D[0]=i.toGlobalCoord(i.dataToCoord(M.vmin,!0)),D[1]=i.toGlobalCoord(i.dataToCoord(M.vmax,!0)),D[1]=E;Q&&($=E);var nt=[],J=[];nt[R]=D,J[R]=I,!Z&&!Q&&(nt[R]+=z?-l:l,J[R]-=z?l:-l),nt[B]=$,J[B]=$,O.push(nt),N.push(J);var X=void 0;if(Hm[1]&&m.reverse(),{coordPair:m,brkId:se().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(g,y){return g.coordPair[0]-y.coordPair[0]});for(var u=o[0],f=null,c=0;c=0?l[0].width:l[1].width),v=(c+f.x)/2-u.x,h=Math.min(v,v-f.x),d=Math.max(v,v-f.x),p=d<0?d:h>0?h:0;s=(v-p)/f.x}var g=new ft,y=new ft;ft.scale(g,a,-s),ft.scale(y,a,1-s),fy(t[0],g),fy(t[1],y)}function utt(r,e){var t={breaks:[]};return A(e.breaks,function(a){if(a){var n=to(r.get("breaks",!0),function(s){return se().identifyAxisBreak(s,a)});if(n){var i=e.type,o={isExpanded:!!n.isExpanded};n.isExpanded=i===rh?!0:i===TI?!1:i===CI?!n.isExpanded:n.isExpanded,t.breaks.push({start:n.start,end:n.end,isExpanded:!!n.isExpanded,old:o})}}}),t}function ftt(){mH({adjustBreakLabelPair:ltt,buildAxisBreakLine:stt,rectCoordBuildBreakAxis:ott,updateModelAxisBreak:utt})}function ctt(r){AH(r),rtt(),ftt()}function vtt(){ZH(htt)}function htt(r,e){A(r,function(t){if(!t.model.get(["axisLabel","inside"])){var a=dtt(t);if(a){var n=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);e[n]-=a[n]+i,t.position==="top"?e.y+=a.height+i:t.position==="left"&&(e.x+=a.width+i)}}})}function dtt(r){var e=r.model,t=r.scale;if(!e.get(["axisLabel","show"])||t.isBlank())return;var a,n,i=t.getExtent();t instanceof ou?n=t.count():(a=t.getTicks(),n=a.length);var o=r.getLabelModel(),s=ks(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;fآخرین اعضاء
ردیفنامشماره همراه
',2),btt={class:"overflow-y-auto",style:{"max-height":"250px"}},wtt={class:"flex flex-col gap-4 mt-4"},Ttt={class:"col-span-2 text-center"},Ctt={class:"col-span-4 text-right"},Att={class:"col-span-4 text-right"},Mtt={class:"col-span-3 border-solid border-1 border-gray-200 rounded-lg p-6"},Dtt={class:"flex justify-between items-center"},Ltt=et("span",{class:"text-lg font-bold"},"نمودار آماری کاربران",-1),Itt={class:"flex items-center"},Ptt={class:"text-3xl font-normal"},Rtt={class:"w-20r"},ktt={class:"mb-8"},Ett=et("h2",{class:"text-xl font-bold mb-4"},"نمای کلی قصه ها",-1),Ott={class:"grid grid-cols-1 md:grid-cols-4 gap-3"},Btt={class:"flex"},Ntt=["src","alt"],Vtt={class:"flex flex-col justify-between w-full mr-2"},ztt={class:"text-base font-bold"},Gtt={class:"flex items-center justify-end"},Ftt={class:"text-base font-bold"},Htt={class:"mr-1"},Wtt={class:"grid grid-cols-1 md:grid-cols-4 md:gap-3 mt-3"},$tt={class:"col-span-1 border-solid border-1 border-gray-200 rounded-lg"},Utt={class:"p-4"},Ytt=lm('بازدید قصه ها
ردیفقصهبازدید کنندهبازدید
',2),Ztt={class:"overflow-y-auto",style:{"max-height":"250px"}},Xtt={class:"flex flex-col gap-4 mt-4"},qtt={class:"col-span-2 text-center"},Ktt=["title"],jtt={class:"col-span-3 text-center"},Jtt={class:"col-span-3 text-center"},Qtt={class:"mt-4 flex justify-center"},tet={class:"col-span-3 border-solid border-1 border-gray-200 rounded-lg p-6"},eet={class:"flex justify-between items-center"},ret=et("span",{class:"text-lg font-bold"},"قصه های دیده شده",-1),aet={class:"flex items-center"},net={class:"text-3xl font-normal"},iet={class:"w-20r"},oet={class:"mb-8"},set=et("h2",{class:"text-xl font-bold mb-4"},"نمای کلی مسابقات",-1),uet={class:"grid grid-cols-1 md:grid-cols-4 gap-3"},fet={class:"flex"},cet=["src","alt"],vet={class:"flex flex-col justify-between w-full mr-2"},het={class:"text-base font-bold"},det={class:"flex items-center justify-end"},pet={class:"text-base font-bold"},get={class:"mr-1"},yet={class:"grid grid-cols-1 md:grid-cols-4 md:gap-3 mt-3"},met={class:"col-span-1 border-solid border-1 border-gray-200 rounded-lg"},_et={class:"p-4"},xet=lm('آخرین قرعه کشی
رتبهنامشماره همراهامتیاز
',2),bet={class:"overflow-y-auto",style:{"max-height":"250px"}},wet={class:"flex flex-col gap-4 mt-4"},Tet={class:"col-span-2 text-center"},Cet={class:"col-span-4 text-right"},Aet={class:"col-span-4 text-right"},Met={class:"col-span-3 text-center"},Det={class:"mt-4 flex justify-center"},Let={class:"col-span-3 border-solid border-1 border-gray-200 rounded-lg p-6"},Iet={class:"flex justify-between items-center"},Pet=et("span",{class:"text-lg font-bold"},"نمودار آماری مسابقات",-1),Ret={class:"flex items-center"},ket={class:"text-3xl font-normal"},Eet={class:"w-20r"},qet=xA({__name:"index",setup(r){const e=be(!0),t=be("hourly"),a=be("hourly"),n=be("hourly"),i=be([]),o=be([]),s=be({total_sale:0,count_order:0,new_customer:0,count_sale_order:0,max_buy_sale:[],total_story_views:0,today_total_story_views:0,unique_story_viewers:0,latest_story_views:0,total_competition_participants:0,eligible_competition_participants:0,latest_competition_participants:0,latest_competition_eligible_participants:0});gi(()=>{let O=0;return i.value.forEach(N=>{O+=parseInt(N==null?void 0:N.sum_price)}),pk(O,!0,"")});const l=[{label:"ساعتی",value:"hourly"},{label:"روزانه",value:"daily"}];be([]);const u=be([]),f=be([]),c=be(null),v=be(null),h=be(null);let d=null,p=null,g=null;const y=be([]),m=be([]),_=be([]),S=be(!1),b=be(!1),x=gi(()=>{var O,N,z,$;return[{title:"بازدید همه قصه ها",alt:"total-story-views-2",image:Yp,value:((O=s.value.total_story_views)==null?void 0:O.toLocaleString("fa-IR"))||"0",unit:"بازدید"},{title:"بازدید یکتای همه قصه ها",alt:"unique-story-viewers-2",image:Xp,value:((N=s.value.unique_story_viewers)==null?void 0:N.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"بازدید همه قصه ها امروز",alt:"today-story-views-2",image:Zp,value:((z=s.value.today_total_story_views)==null?void 0:z.toLocaleString("fa-IR"))||"0",unit:"بازدید"},{title:"بازدید آخرین قصه",alt:"latest-story-views-2",image:qp,value:(($=s.value.latest_story_views)==null?void 0:$.toLocaleString("fa-IR"))||"0",unit:"بازدید"}]}),w=gi(()=>{var O,N,z,$;return[{title:"شرکت کنندگان همه مسابقات",alt:"total-competition-participants-3",image:Yp,value:((O=s.value.total_competition_participants)==null?void 0:O.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"واجدین شرایط قرعه کشی همه مسابقات",alt:"eligible-competition-participants-3",image:Zp,value:((N=s.value.eligible_competition_participants)==null?void 0:N.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"شرکت کنندگان آخرین مسابقه",alt:"latest-competition-participants-3",image:Xp,value:((z=s.value.latest_competition_participants)==null?void 0:z.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"واجدین شرایط قرعه کشی آخرین مسابقه",alt:"latest-competition-eligible-participants-3",image:qp,value:(($=s.value.latest_competition_eligible_participants)==null?void 0:$.toLocaleString("fa-IR"))||"0",unit:"نفر"}]}),T=gi(()=>{let O=0;return u.value.forEach(N=>{O+=Number((N==null?void 0:N.views)||0)}),O.toLocaleString("fa-IR")}),C=gi(()=>{if(!f.value||f.value.length===0)return"0";let O=0;return f.value.forEach(N=>{O+=Number((N==null?void 0:N.totalParticipants)||0)}),O.toLocaleString("fa-IR")}),M=gi(()=>{if(!o.value||o.value.length===0)return"0";const O=o.value[0];return O&&O.totalUniqueUsers!==void 0?O.totalUniqueUsers.toLocaleString("fa-IR"):Math.max(...o.value.map(z=>Number((z==null?void 0:z.users)||0))).toLocaleString("fa-IR")}),D=(O,N,z,$)=>{if(!z)return;let H=$;H||(H=yd(z));const Z={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"#2563EB",borderWidth:1,textStyle:{color:"#fff",fontSize:12,fontFamily:"iran-sans"},axisPointer:{type:"line",lineStyle:{color:"#2563EB",width:1,type:"dashed"},shadowStyle:{color:"rgba(37, 99, 235, 0.1)"}},formatter:Q=>{const nt=Q[0];return`
${nt.name}
تعداد افراد: ${nt.value.toLocaleString("fa-IR")}
`}},grid:{left:"5%",right:"5%",bottom:"10%",top:"10%",containLabel:!0},xAxis:{type:"category",data:O,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:t.value==="daily"?45:0,margin:12},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",formatter:Q=>Math.round(Q).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:[{name:"تعداد افراد",type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:N,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(37, 99, 235, 0.4)"},{offset:1,color:"rgba(37, 99, 235, 0.05)"}]}},lineStyle:{width:3,color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#3B82F6"},{offset:1,color:"#60A5FA"}]},shadowColor:"rgba(37, 99, 235, 0.5)",shadowBlur:10,shadowOffsetY:5},itemStyle:{color:"#3B82F6",borderColor:"#fff",borderWidth:2,shadowBlur:8,shadowColor:"rgba(37, 99, 235, 0.5)"},emphasis:{focus:"series",itemStyle:{color:"#2563EB",borderColor:"#fff",borderWidth:3,shadowBlur:12,shadowColor:"rgba(37, 99, 235, 0.8)"}},animation:!0,animationDuration:1e3,animationEasing:"cubicOut"}]};return H.setOption(Z,!0),H},I=(O,N,z,$)=>{if(!z)return console.warn("Chart container is not available for user chart"),$;let H=$;H||(H=yd(z));const Z={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"#F97316",borderWidth:1,textStyle:{color:"#fff",fontSize:12,fontFamily:"iran-sans"},axisPointer:{type:"line",lineStyle:{color:"#F97316",width:1,type:"dashed"},shadowStyle:{color:"rgba(249, 115, 22, 0.1)"}},formatter:Q=>{const nt=Q[0];return`
${nt.name}
تعداد کاربران: ${nt.value.toLocaleString("fa-IR")}
`}},grid:{left:"5%",right:"5%",bottom:"10%",top:"10%",containLabel:!0},xAxis:{type:"category",data:O,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:a.value==="daily"?45:0,margin:12},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",formatter:Q=>Math.round(Q).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:[{name:"تعداد کاربران",type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:N,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(249, 115, 22, 0.4)"},{offset:1,color:"rgba(249, 115, 22, 0.05)"}]}},lineStyle:{width:3,color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:"#F97316"},{offset:1,color:"#FB923C"}]},shadowColor:"rgba(249, 115, 22, 0.5)",shadowBlur:10,shadowOffsetY:5},itemStyle:{color:"#F97316",borderColor:"#fff",borderWidth:2,shadowBlur:8,shadowColor:"rgba(249, 115, 22, 0.5)"},emphasis:{focus:"series",itemStyle:{color:"#EA580C",borderColor:"#fff",borderWidth:3,shadowBlur:12,shadowColor:"rgba(249, 115, 22, 0.8)"}},animation:!0,animationDuration:1e3,animationEasing:"cubicOut"}]};return H.setOption(Z,!0),H},L=(O,N,z,$,H)=>{if(!$)return console.warn("Chart container is null"),null;let Z=H;Z||(Z=yd($));const Q={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"#2563EB",borderWidth:1,textStyle:{color:"#fff",fontSize:12,fontFamily:"iran-sans"},axisPointer:{type:"line",lineStyle:{color:"#2563EB",width:1,type:"dashed"},shadowStyle:{color:"rgba(37, 99, 235, 0.1)"}},formatter:nt=>{let J=`
${nt[0].name}
`;return nt.forEach(X=>{J+=`
${X.seriesName}: ${X.value.toLocaleString("fa-IR")}
`}),J+="
",J}},legend:{data:["همه شرکت کنندگان","واجدین شرایط"],top:10,right:10,textStyle:{color:"#6B7280",fontSize:12,fontFamily:"iran-sans"}},grid:{left:"5%",right:"5%",bottom:"10%",top:"15%",containLabel:!0},xAxis:{type:"category",data:O,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:n.value==="daily"?45:0,margin:12},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",formatter:nt=>Math.round(nt).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:[{name:"همه شرکت کنندگان",type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:N,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(239, 68, 68, 0.4)"},{offset:1,color:"rgba(239, 68, 68, 0.05)"}]}},lineStyle:{width:3,color:"#EF4444"},itemStyle:{color:"#EF4444",borderColor:"#fff",borderWidth:2}},{name:"واجدین شرایط",type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:z,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(34, 197, 94, 0.4)"},{offset:1,color:"rgba(34, 197, 94, 0.05)"}]}},lineStyle:{width:3,color:"#22C55E"},itemStyle:{color:"#22C55E",borderColor:"#fff",borderWidth:2}}]};return Z.setOption(Q,!0),Z},P=async()=>{try{const[O,N,z,$,H,Z,Q,nt,J,X,ht,rt,pt,Bt]=await Promise.allSettled([Ik(),Nk(),Bk(),zk(),Uk(),Pk(),Rk(),kk(),Ek(),Ok(10),Gk(),Fk(),Hk(),Wk()]);O.status==="fulfilled"?(s.value.count_sale_order=O.value.total,s.value.new_customer=O.value.today):(console.error("Error fetching users stats:",O.reason),s.value.count_sale_order=0,s.value.new_customer=0),N.status==="fulfilled"?(s.value.count_order=N.value,s.value.active_users_week=N.value):(console.error("Error fetching active users this week:",N.reason),s.value.count_order=0,s.value.active_users_week=0),z.status==="fulfilled"?s.value.total_sale=String(z.value):(console.error("Error fetching active users this month:",z.reason),s.value.total_sale="0"),$.status==="fulfilled"?m.value=$.value||[]:(console.error("Error fetching latest users:",$.reason),m.value=[]),H.status==="fulfilled"?y.value=H.value||[]:(console.error("Error fetching latest lottery winners:",H.reason),y.value=[]),Z.status==="fulfilled"?s.value.total_story_views=Z.value:(console.error("Error fetching total story views:",Z.reason),s.value.total_story_views=0),Q.status==="fulfilled"?s.value.today_total_story_views=Q.value:(console.error("Error fetching today total story views:",Q.reason),s.value.today_total_story_views=0),nt.status==="fulfilled"?s.value.unique_story_viewers=nt.value:(console.error("Error fetching unique story viewers:",nt.reason),s.value.unique_story_viewers=0),J.status==="fulfilled"?s.value.latest_story_views=J.value:(console.error("Error fetching latest story views:",J.reason),s.value.latest_story_views=0),X.status==="fulfilled"?_.value=X.value||[]:(console.error("Error fetching story views stats:",X.reason),_.value=[]),ht.status==="fulfilled"?s.value.total_competition_participants=ht.value:(console.error("Error fetching total competition participants:",ht.reason),s.value.total_competition_participants=0),rt.status==="fulfilled"?s.value.eligible_competition_participants=rt.value:(console.error("Error fetching eligible competition participants:",rt.reason),s.value.eligible_competition_participants=0),pt.status==="fulfilled"?s.value.latest_competition_participants=pt.value:(console.error("Error fetching latest competition participants:",pt.reason),s.value.latest_competition_participants=0),Bt.status==="fulfilled"?s.value.latest_competition_eligible_participants=Bt.value:(console.error("Error fetching latest competition eligible participants:",Bt.reason),s.value.latest_competition_eligible_participants=0)}catch(O){console.error("Error in getDashboardReport:",O)}if(!e.value)try{const O=await Dk();s.value={...s.value,...O}}catch(O){console.error("Error fetching report:",O)}},k=async()=>{try{const O=new Date().toISOString().split("T")[0],N=await Vk({type:a.value,date:O});o.value=N||[];let z=[],$=[];if(a.value==="hourly"){const Z={};o.value.forEach(Q=>{const nt=Number(Q.hour)||0,J=Number((Q==null?void 0:Q.users)||0);Z[nt]=J});for(let Q=0;Q<=24;Q++){const nt=Z[Q]||0,J=Q===24?"24:00":`${Q.toString().padStart(2,"0")}:00`;z.push(J),$.push(Math.round(nt))}}else{const Z={};o.value.forEach(Q=>{const nt=Q.day||"",J=Number((Q==null?void 0:Q.users)||0);Z[nt]=J}),Object.keys(Z).sort().forEach(Q=>{const nt=Z[Q],J=hh(Q);z.push(J),$.push(Math.round(nt))})}if(await po(),!c.value){console.error("Chart container is null, retrying after delay..."),setTimeout(()=>{if(c.value){const Z=I(z,$,c.value,d);Z&&(d=Z)}},100);return}const H=I(z,$,c.value,d);H&&(d=H)}catch(O){if(console.error("Error fetching user stats:",O),await po(),c.value){const N=I([],[],c.value,d);N&&(d=N)}}},R=async()=>{try{const O=new Date().toISOString().split("T")[0],N=await Lk({type:t.value,date:O});u.value=N||[];let z=[],$=[];if(t.value==="hourly"){const H={};u.value.forEach(Z=>{const Q=Number(Z.hour)||0,nt=Number((Z==null?void 0:Z.views)||0);H[Q]=(H[Q]||0)+nt});for(let Z=0;Z<=24;Z++){const Q=H[Z]||0,nt=Z===24?"24:00":`${Z.toString().padStart(2,"0")}:00`;z.push(nt),$.push(Math.round(Q))}}else{const H={};u.value.forEach(Z=>{const Q=Z.day||"",nt=Number((Z==null?void 0:Z.views)||0);H[Q]=(H[Q]||0)+nt}),Object.keys(H).sort().forEach(Z=>{const Q=H[Z],nt=hh(Z);z.push(nt),$.push(Math.round(Q))})}p=D(z,$,v.value,p)||p}catch(O){console.error("Error fetching story views:",O),p=D([],[],v.value,p)||p}},B=async()=>{var O,N;try{const z=new Date().toISOString().split("T")[0];console.log("Fetching competition stats with params:",{type:n.value,date:z});const $=await $k({type:n.value,date:z});console.log("Competition stats data received:",$),f.value=$||[];let H=[],Z=[],Q=[];if(n.value==="hourly"){const J={};f.value.forEach(X=>{const ht=Number(X.hour)||0;J[ht]={total:Number((X==null?void 0:X.totalParticipants)||0),eligible:Number((X==null?void 0:X.eligibleParticipants)||0)}});for(let X=0;X<=24;X++){const ht=X===24?"24:00":`${X.toString().padStart(2,"0")}:00`;H.push(ht),Z.push(((O=J[X])==null?void 0:O.total)||0),Q.push(((N=J[X])==null?void 0:N.eligible)||0)}}else{const J={};f.value.forEach(X=>{const ht=X.day||"";J[ht]={total:Number((X==null?void 0:X.totalParticipants)||0),eligible:Number((X==null?void 0:X.eligibleParticipants)||0)}}),Object.keys(J).sort().forEach(X=>{const ht=hh(X);H.push(ht),Z.push(J[X].total),Q.push(J[X].eligible)})}if(console.log("Chart data prepared:",{xAxisData:H,totalParticipantsData:Z,eligibleParticipantsData:Q}),await po(),!h.value){console.warn("Chart container 3 is null, retrying after delay..."),setTimeout(()=>{if(h.value){console.log("Retrying chart initialization...");const J=L(H,Z,Q,h.value,g);J&&(g=J,console.log("Chart initialized successfully (retry)"))}},100);return}console.log("Initializing chart with container:",h.value);const nt=L(H,Z,Q,h.value,g);nt?(g=nt,console.log("Chart initialized successfully")):console.error("Failed to initialize chart")}catch(z){if(console.error("Error fetching competition stats:",z),await po(),h.value){const $=L([],[],[],h.value,g);$&&(g=$)}}};fk(async()=>{await P(),await po(),await k(),await R(),await po(),await new Promise(O=>setTimeout(O,100)),await B(),window.addEventListener("resize",()=>{d&&d.resize(),p&&p.resize(),g&&g.resize()})}),ck(()=>{d&&(d.dispose(),d=null),p&&(p.dispose(),p=null),g&&(g.dispose(),g=null)});async function E(){if(y.value.length===0){const{message:O}=await Qa(()=>import("./index-f9c30333.js"),["assets/index-f9c30333.js","assets/index-db46c961.js","assets/index-10f45eca.js","assets/index-0e9f449f.css","assets/vnode-b14d5532.js","assets/_plugin-vue_export-helper-2f157ef4.js","assets/index-ceff8631.js","assets/index-5bc6b40d.js","assets/Col-c6f28462.js","assets/button.vue_vue_type_style_index_0_lang-80cf0b72.js","assets/Icon-e9a9d64e.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-2c86ae65.js","assets/FormItemContext-a11ae724.js","assets/useState-4f4a8c99.js","assets/index-00f73089.js","assets/index-9601d570.js","assets/toArray-45e57117.js","assets/index-cca2d62a.js","assets/isPlainObject-75024cd7.js","assets/index-2707819c.js","assets/index-ecb339ad.js","assets/index-1b352863.js","assets/index-1d4cbf8f.js","assets/index-4b9d78ea.js","assets/dayjs-7e0fadbc.js"]);O.warning("داده‌ای برای خروجی وجود ندارد");return}try{S.value=!0;const O=y.value.map((nt,J)=>({ردیف:J+1,رتبه:nt.rank||"",نام:nt.name||"","شماره همراه":nt.mobile||"-",امتیاز:nt.score||0})),N=await Qa(()=>import("./xlsx-6ed613d4.js"),[]),z=N.utils.json_to_sheet(O),$=N.utils.book_new();N.utils.book_append_sheet($,z,"برندگان قرعه کشی");const Z=`برندگان_قرعه_کشی_${new Date().getTime()}.xlsx`;N.writeFile($,Z);const{message:Q}=await Qa(()=>import("./index-f9c30333.js"),["assets/index-f9c30333.js","assets/index-db46c961.js","assets/index-10f45eca.js","assets/index-0e9f449f.css","assets/vnode-b14d5532.js","assets/_plugin-vue_export-helper-2f157ef4.js","assets/index-ceff8631.js","assets/index-5bc6b40d.js","assets/Col-c6f28462.js","assets/button.vue_vue_type_style_index_0_lang-80cf0b72.js","assets/Icon-e9a9d64e.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-2c86ae65.js","assets/FormItemContext-a11ae724.js","assets/useState-4f4a8c99.js","assets/index-00f73089.js","assets/index-9601d570.js","assets/toArray-45e57117.js","assets/index-cca2d62a.js","assets/isPlainObject-75024cd7.js","assets/index-2707819c.js","assets/index-ecb339ad.js","assets/index-1b352863.js","assets/index-1d4cbf8f.js","assets/index-4b9d78ea.js","assets/dayjs-7e0fadbc.js"]);Q.success("فایل اکسل با موفقیت دانلود شد")}catch(O){console.error("Error exporting lottery winners:",O);const{message:N}=await Qa(()=>import("./index-f9c30333.js"),["assets/index-f9c30333.js","assets/index-db46c961.js","assets/index-10f45eca.js","assets/index-0e9f449f.css","assets/vnode-b14d5532.js","assets/_plugin-vue_export-helper-2f157ef4.js","assets/index-ceff8631.js","assets/index-5bc6b40d.js","assets/Col-c6f28462.js","assets/button.vue_vue_type_style_index_0_lang-80cf0b72.js","assets/Icon-e9a9d64e.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-2c86ae65.js","assets/FormItemContext-a11ae724.js","assets/useState-4f4a8c99.js","assets/index-00f73089.js","assets/index-9601d570.js","assets/toArray-45e57117.js","assets/index-cca2d62a.js","assets/isPlainObject-75024cd7.js","assets/index-2707819c.js","assets/index-ecb339ad.js","assets/index-1b352863.js","assets/index-1d4cbf8f.js","assets/index-4b9d78ea.js","assets/dayjs-7e0fadbc.js"]);N.error("خطا در خروجی اکسل")}finally{S.value=!1}}async function V(){if(_.value.length===0){const{message:O}=await Qa(()=>import("./index-f9c30333.js"),["assets/index-f9c30333.js","assets/index-db46c961.js","assets/index-10f45eca.js","assets/index-0e9f449f.css","assets/vnode-b14d5532.js","assets/_plugin-vue_export-helper-2f157ef4.js","assets/index-ceff8631.js","assets/index-5bc6b40d.js","assets/Col-c6f28462.js","assets/button.vue_vue_type_style_index_0_lang-80cf0b72.js","assets/Icon-e9a9d64e.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-2c86ae65.js","assets/FormItemContext-a11ae724.js","assets/useState-4f4a8c99.js","assets/index-00f73089.js","assets/index-9601d570.js","assets/toArray-45e57117.js","assets/index-cca2d62a.js","assets/isPlainObject-75024cd7.js","assets/index-2707819c.js","assets/index-ecb339ad.js","assets/index-1b352863.js","assets/index-1d4cbf8f.js","assets/index-4b9d78ea.js","assets/dayjs-7e0fadbc.js"]);O.warning("داده‌ای برای خروجی وجود ندارد");return}try{b.value=!0;const O=_.value.map((nt,J)=>({ردیف:J+1,قصه:nt.title||"-","بازدید کننده":nt.unique_viewers||0,بازدید:nt.total_views||0})),N=await Qa(()=>import("./xlsx-6ed613d4.js"),[]),z=N.utils.json_to_sheet(O),$=N.utils.book_new();N.utils.book_append_sheet($,z,"بازدید قصه ها");const Z=`بازدید_قصه_ها_${new Date().getTime()}.xlsx`;N.writeFile($,Z);const{message:Q}=await Qa(()=>import("./index-f9c30333.js"),["assets/index-f9c30333.js","assets/index-db46c961.js","assets/index-10f45eca.js","assets/index-0e9f449f.css","assets/vnode-b14d5532.js","assets/_plugin-vue_export-helper-2f157ef4.js","assets/index-ceff8631.js","assets/index-5bc6b40d.js","assets/Col-c6f28462.js","assets/button.vue_vue_type_style_index_0_lang-80cf0b72.js","assets/Icon-e9a9d64e.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-2c86ae65.js","assets/FormItemContext-a11ae724.js","assets/useState-4f4a8c99.js","assets/index-00f73089.js","assets/index-9601d570.js","assets/toArray-45e57117.js","assets/index-cca2d62a.js","assets/isPlainObject-75024cd7.js","assets/index-2707819c.js","assets/index-ecb339ad.js","assets/index-1b352863.js","assets/index-1d4cbf8f.js","assets/index-4b9d78ea.js","assets/dayjs-7e0fadbc.js"]);Q.success("فایل اکسل با موفقیت دانلود شد")}catch(O){console.error("Error exporting story views:",O);const{message:N}=await Qa(()=>import("./index-f9c30333.js"),["assets/index-f9c30333.js","assets/index-db46c961.js","assets/index-10f45eca.js","assets/index-0e9f449f.css","assets/vnode-b14d5532.js","assets/_plugin-vue_export-helper-2f157ef4.js","assets/index-ceff8631.js","assets/index-5bc6b40d.js","assets/Col-c6f28462.js","assets/button.vue_vue_type_style_index_0_lang-80cf0b72.js","assets/Icon-e9a9d64e.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-2c86ae65.js","assets/FormItemContext-a11ae724.js","assets/useState-4f4a8c99.js","assets/index-00f73089.js","assets/index-9601d570.js","assets/toArray-45e57117.js","assets/index-cca2d62a.js","assets/isPlainObject-75024cd7.js","assets/index-2707819c.js","assets/index-ecb339ad.js","assets/index-1b352863.js","assets/index-1d4cbf8f.js","assets/index-4b9d78ea.js","assets/dayjs-7e0fadbc.js"]);N.error("خطا در خروجی اکسل")}finally{b.value=!1}}return(O,N)=>{const z=hk,$=vk;return He(),mr("div",ptt,[et("div",gtt,[ytt,Ja(Mk,{statistics:De(s)},null,8,["statistics"]),et("div",mtt,[et("div",_tt,[et("div",Stt,[xtt,et("div",btt,[et("div",wtt,[(He(!0),mr(Ho,null,Wo(De(m),(H,Z)=>(He(),mr("div",{class:"grid grid-cols-10 items-center items-center text-xs text-[#1F2937] font-semibold",key:Z},[et("span",Ttt,Qt(H.rank),1),et("span",Ctt,Qt(H.name),1),et("span",Att,Qt(H.mobile||"-"),1)]))),128))])])])]),et("div",Mtt,[et("div",null,[et("div",Dtt,[Ltt,et("div",Itt,[et("span",Ptt,Qt(De(M)),1)]),et("div",Rtt,[Ja(z,{value:De(a),"onUpdate:value":N[0]||(N[0]=H=>vh(a)?a.value=H:null),items:l,"key-name":"value","value-name":"label","allow-clear":!1,onChange:k,style:{cursor:"pointer"}},null,8,["value"])])]),et("div",{ref_key:"chartContainer",ref:c,style:{width:"100%",height:"300px"}},null,512)])])])]),et("div",ktt,[Ett,et("div",Ott,[(He(!0),mr(Ho,null,Wo(De(x),(H,Z)=>(He(),$p(Up,{class:"h-[120px] p-5",key:Z+4},{default:pl(()=>[et("div",Btt,[et("div",null,[et("img",{class:"w-20 h-20",src:H.image,alt:H.alt},null,8,Ntt)]),et("div",Vtt,[et("div",null,[et("span",ztt,Qt(H.title),1)]),et("div",Gtt,[et("span",Ftt,Qt(H.value),1),et("span",Htt,Qt(H.unit),1)])])])]),_:2},1024))),128))]),et("div",Wtt,[et("div",$tt,[et("div",Utt,[Ytt,et("div",Ztt,[et("div",Xtt,[(He(!0),mr(Ho,null,Wo(De(_),(H,Z)=>{var Q,nt;return He(),mr("div",{class:"grid grid-cols-12 items-center items-center text-xs text-[#1F2937] font-semibold",key:Z},[et("span",qtt,Qt(Z+1),1),et("span",{class:"col-span-4 text-right truncate",title:H.title},Qt(H.title||"-"),9,Ktt),et("span",jtt,Qt(((Q=H.unique_viewers)==null?void 0:Q.toLocaleString("fa-IR"))||"0"),1),et("span",Jtt,Qt(((nt=H.total_views)==null?void 0:nt.toLocaleString("fa-IR"))||"0"),1)])}),128))])]),et("div",Qtt,[Ja($,{onClick:V,loading:De(b),disabled:De(_).length===0,style:{backgroundColor:"#217346",borderColor:"#217346",color:"#fff"},class:"excel-export-btn"},{default:pl(()=>[Ja(O_,{icon:"vuesax-linear:document-download",class:"mr-1"}),E_(" خروجی اکسل ")]),_:1},8,["loading","disabled"])])])]),et("div",tet,[et("div",null,[et("div",eet,[ret,et("div",aet,[et("span",net,Qt(De(T)),1)]),et("div",iet,[Ja(z,{value:De(t),"onUpdate:value":N[1]||(N[1]=H=>vh(t)?t.value=H:null),items:l,"key-name":"value","value-name":"label","allow-clear":!1,onChange:R,style:{cursor:"pointer"}},null,8,["value"])])]),et("div",{ref_key:"chartContainer2",ref:v,style:{width:"100%",height:"300px"}},null,512)])])])]),et("div",oet,[set,et("div",uet,[(He(!0),mr(Ho,null,Wo(De(w),(H,Z)=>(He(),$p(Up,{class:"h-[120px] p-5",key:Z+8},{default:pl(()=>[et("div",fet,[et("div",null,[et("img",{class:"w-20 h-20",src:H.image,alt:H.alt},null,8,cet)]),et("div",vet,[et("div",null,[et("span",het,Qt(H.title),1)]),et("div",det,[et("span",pet,Qt(H.value),1),et("span",get,Qt(H.unit),1)])])])]),_:2},1024))),128))]),et("div",yet,[et("div",met,[et("div",_et,[xet,et("div",bet,[et("div",wet,[(He(!0),mr(Ho,null,Wo(De(y),(H,Z)=>(He(),mr("div",{class:"grid grid-cols-13 items-center items-center text-xs text-[#1F2937] font-semibold",key:Z},[et("span",Tet,Qt(H.rank),1),et("span",Cet,Qt(H.name),1),et("span",Aet,Qt(H.mobile||"-"),1),et("span",Met,Qt(H.score.toLocaleString("fa-IR")),1)]))),128))])]),et("div",Det,[Ja($,{onClick:E,loading:De(S),disabled:De(y).length===0,style:{backgroundColor:"#217346",borderColor:"#217346",color:"#fff"},class:"excel-export-btn"},{default:pl(()=>[Ja(O_,{icon:"vuesax-linear:document-download",class:"mr-1"}),E_(" خروجی اکسل ")]),_:1},8,["loading","disabled"])])])]),et("div",Let,[et("div",null,[et("div",Iet,[Pet,et("div",Ret,[et("span",ket,Qt(De(C)),1)]),et("div",Eet,[Ja(z,{value:De(n),"onUpdate:value":N[2]||(N[2]=H=>vh(n)?n.value=H:null),items:l,"key-name":"value","value-name":"label","allow-clear":!1,onChange:B,style:{cursor:"pointer"}},null,8,["value"])])]),et("div",{ref_key:"chartContainer3",ref:h,style:{width:"100%",height:"300px"}},null,512)])])])])])}}});export{qet as default};