40 lines
536 KiB
JavaScript
40 lines
536 KiB
JavaScript
/*! *****************************************************************************
|
|||
|
|
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 Wl=function(r,t){return Wl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,i){e.__proto__=i}||function(e,i){for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])},Wl(r,t)};function B(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Wl(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var Wm=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),Ym=function(){function r(){this.browser=new Wm,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}(),X=new Ym;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(X.wxa=!0,X.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?X.worker=!0:!X.hasGlobalWindow||"Deno"in window?(X.node=!0,X.svgSupported=!0):Um(navigator.userAgent,X);function Um(r,t){var e=t.browser,i=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);i&&(e.firefox=!0,e.version=i[1]),n&&(e.ie=!0,e.version=n[1]),a&&(e.edge=!0,e.version=a[1],e.newEdge=+a[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in s||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}var $u=12,Xm="sans-serif",Qr=$u+"px "+Xm,Zm=20,$m=100,qm="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Km(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e<r.length;e++){var i=String.fromCharCode(e+32),n=(r.charCodeAt(e)-Zm)/$m;t[i]=n}return t}var Qm=Km(qm),Hi={createCanvas:function(){return typeof document<"u"&&document.createElement("canvas")},measureText:function(){var r,t;return function(e,i){if(!r){var n=Hi.createCanvas();r=n&&n.getContext("2d")}if(r)return t!==i&&(t=r.font=i||Qr),r.measureText(e);e=e||"",i=i||Qr;var a=/((?:\d+)?\.?\d*)px/.exec(i),o=a&&+a[1]||$u,s=0;if(i.indexOf("mono")>=0)s=o*e.length;else for(var l=0;l<e.length;l++){var u=Qm[e[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,t,e){var i=new Image;return i.onload=t,i.onerror=e,i.src=r,i}},Jd=fr(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,t){return r["[object "+t+"]"]=!0,r},{}),jd=fr(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,t){return r["[object "+t+"Array]"]=!0,r},{}),Vi=Object.prototype.toString,zo=Array.prototype,Jm=zo.forEach,jm=zo.filter,qu=zo.slice,t0=zo.map,ah=function(){}.constructor,oa=ah?ah.prototype:null,Ku="__proto__",e0=2311;function tp(){return e0++}function Qu(){for(var r=[],t=0;t<arguments.length;t++)r[t]=arguments[t];typeof console<"u"&&console.error.apply(console,r)}function Q(r){if(r==null||typeof r!="object")return r;var t=r,e=Vi.call(r);if(e==="[object Array]"){if(!Cn(r)){t=[];for(var i=0,n=r.length;i<n;i++)t[i]=Q(r[i])}}else if(jd[e]){if(!Cn(r)){var a=r.constructor;if(a.from)t=a.from(r);else{t=new a(r.length);for(var i=0,n=r.length;i<n;i++)t[i]=r[i]}}}else if(!Jd[e]&&!Cn(r)&&!Nn(r)){t={};for(var o in r)r.hasOwnProperty(o)&&o!==Ku&&(t[o]=Q(r[o]))}return t}function tt(r,t,e){if(!V(t)||!V(r))return e?Q(t):r;for(var i in t)if(t.hasOwnProperty(i)&&i!==Ku){var n=r[i],a=t[i];V(a)&&V(n)&&!F(a)&&!F(n)&&!Nn(a)&&!Nn(n)&&!oh(a)&&!oh(n)&&!Cn(a)&&!Cn(n)?tt(n,a,e):(e||!(i in r))&&(r[i]=Q(t[i]))}r
|
||
|
|
`),a=n.length;if(a===1)return Bh(n[0],t,e,i);for(var o=new it(0,0,0,0),s=0;s<n.length;s++){var l=Bh(n[s],t,e,i);s===0?o.copy(l):o.union(l)}return o}function _n(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function xi(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function sf(r){return Qt("国",r)}function vr(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function mo(r,t,e){var i=t.position||"inside",n=t.distance!=null?t.distance:5,a=e.height,o=e.width,s=a/2,l=e.x,u=e.y,f="left",h="top";if(i instanceof Array)l+=vr(i[0],e.width),u+=vr(i[1],e.height),f=null,h=null;else switch(i){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=a+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=a-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=a-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=a-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var Bs="__zr_normal__",Ns=Hn.concat(["ignore"]),g_=fr(Hn,function(r,t){return r[t]=!0,r},{ignore:!1}),ui={},y_=new it(0,0,0,0),Go=function(){function r(t){this.id=tp(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,i){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var i=this.textConfig,n=i.local,a=e.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=n?this:null;var u=!1;if(a.copyTransform(e),i.position!=null){var f=y_;i.layoutRect?f.copy(i.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(ui,i,f):mo(ui,i,f),a.x=ui.x,a.y=ui.y,o=ui.align,s=ui.verticalAlign;var h=i.origin;if(h&&i.rotation!=null){var c=void 0,v=void 0;h==="center"?(c=f.width*.5,v=f.height*.5):(c=vr(h[0],f.width),v=vr(h[1],f.height)),u=!0,a.originX=-a.x+c+(n?0:f.x),a.originY=-a.y+v+(n?0:f.y)}}i.rotation!=null&&(a.rotation=i.rotation);var d=i.offset;d&&(a.x+=d[0],a.y+=d[1],u||(a.originX=-d[0],a.originY=-d[1]));var p=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;p&&this.canBeInsideText()?(y=i.insideFill,m=i.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=i.outsideFill,m=i.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,e.setDefaultTextStyle(g)),e.__dirty|=Kt,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?au:nu},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&se(e);i||(i=[255,255,255,1]);for(var n=i[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)i[o]=i[o]*n+(a?0:255)*(1-n);return i[3]=1,Wi(i,"rgba")},r.prototype.traverse=func
|
||
|
|
* ZRender, a high performance 2d drawing library.
|
||
|
|
*
|
||
|
|
* Copyright (c) 2013, Baidu Inc.
|
||
|
|
* All rights reserved.
|
||
|
|
*
|
||
|
|
* LICENSE
|
||
|
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt
|
||
|
|
*/var Ja={},bp={};function b_(r){delete bp[r]}function x_(r){if(!r)return!1;if(typeof r=="string")return po(r,1)<iu;if(r.colorStops){for(var t=r.colorStops,e=0,i=t.length,n=0;n<i;n++)e+=po(t[n].color,1);return e/=i,e<iu}return!1}var T_=function(){function r(t,e,i){var n=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,i=i||{},this.dom=e,this.id=t;var a=new z0,o=i.renderer||"canvas";Ja[o]||(o=vt(Ja)[0]),i.useDirtyRect=i.useDirtyRect==null?!1:i.useDirtyRect;var s=new Ja[o](e,a,i,t),l=i.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!X.node&&!X.worker&&!l?new c_(s.getViewportRoot(),s.root):null,f=i.useCoarsePointer,h=f==null||f==="auto"?X.touchEventsSupported:!!f,c=44,v;h&&(v=K(i.pointerSize,c)),this.handler=new lp(a,s,u,s.root,v),this.animation=new o_({stage:{update:l?null:function(){return n._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(t){this._disposed||!t||(this.storage.addRoot(t),t.addSelfToZr(this),this.refresh())},r.prototype.remove=function(t){this._disposed||!t||(this.storage.delRoot(t),t.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(t,e){this._disposed||(this.painter.configLayer&&this.painter.configLayer(t,e),this.refresh())},r.prototype.setBackgroundColor=function(t){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(t),this.refresh(),this._backgroundColor=t,this._darkMode=x_(t))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(t){this._darkMode=t},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(t){this._disposed||(t||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(t){var e,i=Di();this._needsRefresh&&(e=!0,this.refreshImmediately(t)),this._needsRefreshHover&&(e=!0,this.refreshHoverImmediately());var n=Di();e?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:n-i})):this._sleepAfterStill>0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,i){return this._disposed||this.handler.on(t,e,i),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e<t.length;e++)t[e]instanceof bt&&t[e].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,b_(this.id))},r}();function Nh(r,t){var e=new T_(tp(),r,t);return bp[e.id]=e,e}function C_(r,t){Ja[r]=t}var ou;function XA(r){if(typeof ou=="function")re
|
||
|
|
`);a=Np(e,i,n,a);for(var s=!1,l={},u=0,f=o.length;u<f;u++)Fp(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(`
|
||
|
|
`),r.isTruncated=s}function Np(r,t,e,i){i=i||{};var n=k({},i);n.font=t,e=K(e,"..."),n.maxIterations=K(i.maxIterations,2);var a=n.minChar=K(i.minChar,0);n.cnCharWidth=Qt("国",t);var o=n.ascCharWidth=Qt("a",t);n.placeholder=K(i.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=Qt(e,t);return u>s&&(e="",u=0),s=r-u,n.ellipsis=e,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function Fp(r,t,e){var i=e.containerWidth,n=e.font,a=e.contentWidth;if(!i){r.textLine="",r.isTruncated=!1;return}var o=Qt(t,n);if(o<=i){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?o1(t,a,e.ascCharWidth,e.cnCharWidth):o>0?Math.floor(t.length*a/o):0;t=t.substr(0,l),o=Qt(t,n)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function o1(r,t,e,i){for(var n=0,a=0,o=r.length;a<o&&n<t;a++){var s=r.charCodeAt(a);n+=0<=s&&s<=127?e:i}return a}function s1(r,t){r!=null&&(r+="");var e=t.overflow,i=t.padding,n=t.font,a=e==="truncate",o=sf(n),s=K(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",f=!1,h=t.width,c;h!=null&&(e==="break"||e==="breakAll")?c=r?zp(r,t.font,h,e==="breakAll",0).lines:[]:c=r?r.split(`
|
||
|
|
`):[];var v=c.length*s,d=K(t.height,v);if(v>d&&u){var p=Math.floor(d/s);f=f||c.length>p,c=c.slice(0,p)}if(r&&a&&h!=null)for(var g=Np(h,n,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),y={},m=0;m<c.length;m++)Fp(y,c[m],g),c[m]=y.textLine,f=f||y.isTruncated;for(var _=d,S=0,m=0;m<c.length;m++)S=Math.max(Qt(c[m],n),S);h==null&&(h=S);var b=S;return i&&(_+=i[0]+i[2],b+=i[1]+i[3],h+=i[1]+i[3]),l&&(b=h),{lines:c,height:d,outerWidth:b,outerHeight:_,lineHeight:s,calculatedLineHeight:o,contentWidth:S,contentHeight:v,width:h,isTruncated:f}}var l1=function(){function r(){}return r}(),Yh=function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r}(),u1=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r}();function f1(r,t){var e=new u1;if(r!=null&&(r+=""),!r)return e;for(var i=t.width,n=t.height,a=t.overflow,o=(a==="break"||a==="breakAll")&&i!=null?{width:i,accumWidth:0,breakAll:a==="breakAll"}:null,s=Vs.lastIndex=0,l;(l=Vs.exec(r))!=null;){var u=l.index;u>s&&Gs(e,r.substring(s,u),t,o),Gs(e,l[2],t,o,l[1]),s=Vs.lastIndex}s<r.length&&Gs(e,r.substring(s,r.length),t,o);var f=[],h=0,c=0,v=t.padding,d=a==="truncate",p=t.lineOverflow==="truncate",g={};function y(W,q,J){W.width=q,W.lineHeight=J,h+=J,c=Math.max(c,q)}t:for(var m=0;m<e.lines.length;m++){for(var _=e.lines[m],S=0,b=0,w=0;w<_.tokens.length;w++){var x=_.tokens[w],C=x.styleName&&t.rich[x.styleName]||{},D=x.textPadding=C.padding,A=D?D[1]+D[3]:0,T=x.font=C.font||t.font;x.contentHeight=sf(T);var L=K(C.height,x.contentHeight);if(x.innerHeight=L,D&&(L+=D[0]+D[2]),x.height=L,x.lineHeight=Ua(C.lineHeight,t.lineHeight,L),x.align=C&&C.align||t.align,x.verticalAlign=C&&C.verticalAlign||"middle",p&&n!=null&&h+x.lineHeight>n){var I=e.lines.length;w>0?(_.tokens=_.tokens.slice(0,w),y(_,b,S),e.lines=e.lines.slice(0,m+1)):e.lines=e.lines.slice(0,m),e.isTruncated=e.isTruncated||e.lines.length<I;break t}var P=C.width,R=P==null||P==="auto";if(typeof P=="string"&&P.charAt(P.length-1)==="%")x.percentWidth=P,f.push(x),x.contentWidth=Qt(x.text,T);else{if(R){var E=C.backgroundColor,G=E&&E.image;G&&(G=n1(G),Yo(G)&&(x.width=Math.max(x.width,G.width*L/G.height)))}var O=d&&i!=null?i-b:null;O!=null&&O<x.width?!R||O<A?(x.text="",x.width=x.contentWidth=0):(a1(g,x.text,O-A,T,t.ellipsis,{minChar:t.truncateMinChar}),x.text=g.text,e.isTruncated=e.isTruncated||g.isTruncated,x.width=x.contentWidth=Qt(x.text,T)):x.contentWidth=Qt(x.text,T)}x.width+=A,b+=x.width,C&&(S=Math.max(S,x.lineHeight))}y(_,b,S)}e.outerWidth=e.width=K(i,c),e.outerHeight=e.height=K(n,h),e.contentHeight=h,e.contentWidth=c,v&&(e.outerWidth+=v[1]+v[3],e.outerHeight+=v[0]+v[2]);for(var m=0;m<f.length;m++){var x=f[m],N=x.percentWidth;x.width=parseInt(N,10)/100*e.width}return e}function Gs(r,t,e,i,n){var a=t==="",o=n&&e.rich[n]||{},s=r.lines,l=o.font||e.font,u=!1,f,h;if(i){var c=o.padding,v=c?c[1]+c[3]:0;if(o.width!=null&&o.width!=="auto"){var d=vr(o.width,i.width)+v;s.length>0&&d+i.accumWidth>i.width&&(f=t.split(`
|
||
|
|
`),u=!0),i.accumWidth=d}else{var p=zp(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=p.accumWidth+v,h=p.linesWidths,f=p.lines}}else f=t.split(`
|
||
|
|
`);for(var g=0;g<f.length;g++){var y=f[g],m=new l1;if(m.styleName=n,m.text=y,m.isLineHolder=!y&&!a,typeof o.width=="number"?m.width=o.width:m.width=h?h[g]:Qt(y,l),!g&&!u){var _=(s[s.length-1]||(s[0]=new Yh)).tokens,S=_.length;S===1&&_[0].isLineHolder?_[0]=m:(y||!S||a)&&_.push(m)}else s.push(new Yh([m]))}}function h1(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var v1=fr(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function c1(r){return h1(r)?!!v1[r]:!0}function zp(r,t,e,i,n){for(var a=[],o=[],s="",l="",u=0,f=0,h=0;h<r.length;h++){var c=r.charAt(h);if(c===`
|
||
|
|
`){l&&(s+=l,f+=u),a.push(s),o.push(f),s="",l="",u=0,f=0;continue}var v=Qt(c,t),d=i?!1:!c1(c);if(a.length?f+v>e:n+f+v>e){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),a.push(s),o.push(f-u),l+=c,u+=v,s="",f=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(f),s=c,f=v)):d?(a.push(l),o.push(u),l=c,u=v):(a.push(c),o.push(v));continue}f+=v,d?(l+=c,u+=v):(l&&(s+=l,l="",u=0),s+=c)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(f)),a.length===1&&(f+=n),{accumWidth:f,lines:a,linesWidths:o}}var lu="__zr_style_"+Math.round(Math.random()*10),$r={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Uo={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};$r[lu]=!0;var Uh=["z","z2","invisible"],d1=["invisible"],ra=function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=vt(e),n=0;n<i.length;n++){var a=i[n];a==="style"?this.useStyle(e[a]):r.prototype.attrKV.call(this,a,e[a])}this.style||this.useStyle({})},t.prototype.beforeBrush=function(){},t.prototype.afterBrush=function(){},t.prototype.innerBeforeBrush=function(){},t.prototype.innerAfterBrush=function(){},t.prototype.shouldBePainted=function(e,i,n,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&p1(this,e,i)||o&&!o[0]&&!o[3])return!1;if(n&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},t.prototype.contain=function(e,i){return this.rectContain(e,i)},t.prototype.traverse=function(e,i){e.call(i,this)},t.prototype.rectContain=function(e,i){var n=this.transformCoordToLocal(e,i),a=this.getBoundingRect();return a.contain(n[0],n[1])},t.prototype.getPaintRect=function(){var e=this._paintRect;if(!this._paintRect||this.__dirty){var i=this.transform,n=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;e=this._paintRect||(this._paintRect=new it(0,0,0,0)),i?it.applyTransform(e,n,i):e.copy(n),(o||s||l)&&(e.width+=o*2+Math.abs(s),e.height+=o*2+Math.abs(l),e.x=Math.min(e.x,e.x+s-o),e.y=Math.min(e.y,e.y+l-o));var u=this.dirtyRectTolerance;e.isZero()||(e.x=Math.floor(e.x-u),e.y=Math.floor(e.y-u),e.width=Math.ceil(e.width+1+u*2),e.height=Math.ceil(e.height+1+u*2))}return e},t.prototype.setPrevPaintRect=function(e){e?(this._prevPaintRect=this._prevPaintRect||new it(0,0,0,0),this._prevPaintRect.copy(e)):this._prevPaintRect=null},t.prototype.getPrevPaintRect=function(){return this._prevPaintRect},t.prototype.animateStyle=function(e){return this.animate("style",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():this.markRedraw()},t.prototype.attrKV=function(e,i){e!=="style"?r.prototype.attrKV.call(this,e,i):this.style?this.setStyle(i):this.useStyle(i)},t.prototype.setStyle=function(e,i){return typeof e=="string"?this.style[e]=i:k(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=yn,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&yn)},t.prototype.styleUpdated=function(){this.__dirty&=~yn},t.prototype.createStyle=function(e){return Vo($r,e)},t.prototype.useStyle=function(e){e[lu]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[lu]},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var i=this._normalState;e.style&&!i.style&&(i.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(e,i,Uh)},t.prototype._applyStateObj=function(e,i,n,a,o,s){r.prototype._applyStateObj.call(this,e,i,n,a,o,s);var l=!(i&&a),u;if(i&&i.style?o?a?u=i.style:(u=this._mergeStyle(this.createStyle(),n.style),this._mergeStyle(u,i.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:n.style),this._mergeStyle(u,i.style)):l&&(u=n.style),u)if(o){var f=this.style;if
|
||
|
|
`,`
|
||
|
|
|
||
|
|
`,`
|
||
|
|
|
||
|
|
|
||
|
|
`];function $n(r,t){return t.type=r,t}function xu(r){return r.type==="section"}function ey(r){return xu(r)?Lb:Ib}function ry(r){if(xu(r)){var t=0,e=r.blocks.length,i=e>1||e>0&&!r.noHeader;return M(r.blocks,function(n){var a=ry(n);a>=t&&(t=a+ +(i&&(!a||xu(n)&&!n.noHeader)))}),t}return 0}function Lb(r,t,e,i){var n=t.noHeader,a=Pb(ry(t)),o=[],s=t.blocks||[];Le(!s||F(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(hr(u,l)){var f=new hb(u[l],null);s.sort(function(p,g){return f.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}M(s,function(p,g){var y=t.valueFormatter,m=ey(p)(y?k(k({},r),{valueFormatter:y}):r,p,g>0?a.html:0,i);m!=null&&o.push(m)});var h=r.renderMode==="richText"?o.join(a.richText):Tu(i,o.join(""),n?e:a.html);if(n)return h;var c=_u(t.header,"ordinal",r.useUTC),v=ty(i,r.renderMode).nameStyle,d=jg(i);return r.renderMode==="richText"?iy(r,c,v)+a.richText+h:Tu(i,'<div style="'+v+";"+d+';">'+Ht(c)+"</div>"+h,e)}function Ib(r,t,e,i){var n=r.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,f=t.valueFormatter||r.valueFormatter||function(S){return S=F(S)?S:[S],H(S,function(b,w){return _u(b,F(v)?v[w]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",n),c=a?"":_u(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value,t.dataIndex),p=!s||!a,g=!s&&a,y=ty(i,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":h)+(a?"":iy(r,c,m))+(o?"":kb(r,d,p,g,_)):Tu(i,(s?"":h)+(a?"":Rb(c,!s,m))+(o?"":Eb(d,p,g,_)),e)}}function ec(r,t,e,i,n,a){if(r){var o=ey(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function Pb(r){return{html:Db[r],richText:Ab[r]}}function Tu(r,t,e){var i='<div style="clear:both"></div>',n="margin: "+e+"px 0 0",a=jg(r);return'<div style="'+n+";"+a+';">'+t+i+"</div>"}function Rb(r,t,e){var i=t?"margin-left:2px":"";return'<span style="'+e+";"+i+'">'+Ht(r)+"</span>"}function Eb(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=F(r)?r:[r],'<span style="'+a+";"+i+'">'+H(r,function(o){return Ht(o)}).join(" ")+"</span>"}function iy(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function kb(r,t,e,i,n){var a=[n],o=i?10:20;return e&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(F(t)?t.join(" "):t,a)}function Ob(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return ei(i)}function ny(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var vl=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Dp()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,i){var n=i==="richText"?this._generateStyleName():null,a=ww({color:e,type:t,renderMode:i,markerId:n});return z(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};F(e)?M(e,function(a){return k(i,a)}):k(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r}();function Bb(r){var t=r.series,e=r.dataIndex,i=r.multipleSeries,n=t.getData(),a=n.mapDimensionsAll("defaultedTooltip"),o=a.length,s=t.getRawValue(e),l=F(s),u=Ob(t,e),f,h,c,v;if(o>1||l&&!o){var d=Nb(s,t,e,a,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(a[0]);v=f=Fi(n,e,a[0]),h=p.type}else v=f=l?s[0]:s;var g=uf(t),y=g&&t.name||"",m=n.getName(e),_=i?y:m;return $n("section",{header:y,noHeader:i||!g,sortParam:v,blocks:[$n("nameValue",{markerType:"item",markerColor:u,name:_,noName:!De(_),value:f,valueType:h,dataIndex:e})].concat(c||[])})}function Nb(r,t,e,i,n){var a=t.getData(),o=fr(r,function(h,c,v){var d=a.getDimensionInfo(v);return h=h||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];i.length?M(i,function(h){f(Fi(a,e,h),h)}):M(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push($n("nameValue",{markerType:"subItem",ma
|
||
|
|
|
||
|
|
`:"<br/>",y=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,v,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],v,null,c)})},t.prototype._showSeriesItemTooltip=function(e,i,n){var a=this._ecModel,o=et(i),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,c=u.getData(h),v=this._renderMode,d=e.positionDefault,p=cn([c.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,h),m=new vl;y.marker=m.makeTooltipMarker("item",ei(y.color),v);var _=Kv(u.formatTooltip(f,!1,h)),S=p.get("order"),b=p.get("valueFormatter"),w=_.frag,x=w?ec(b?k({valueFormatter:b},w):w,m,v,S,a.get("useUTC"),p.get("textStyle")):_.text,C="item_"+u.name+"_"+f;this._showOrMove(p,function(){this._showTooltipContent(p,x,y,C,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:c.getRawIndex(f),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,i,n){var a=this._renderMode==="html",o=et(i),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(z(l)){var f=l;l={content:f,formatter:f},u=!0}u&&a&&l.content&&(l=Q(l),l.content=Ht(l.content));var h=[l],c=this._ecModel.getComponent(o.componentMainType,o.componentIndex);c&&h.push(c),h.push({formatter:l.content});var v=e.positionDefault,d=cn(h,this._tooltipModel,v?{position:v}:null),p=d.get("content"),g=Math.random()+"",y=new vl;this._showOrMove(d,function(){var m=Q(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,e.offsetX,e.offsetY,e.position,i,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,i,n,a,o,s,l,u,f){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var h=this._tooltipContent;h.setEnterable(e.get("enterable"));var c=e.get("formatter");l=l||e.get("position");var v=i,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor")),p=d.color;if(c)if(z(c)){var g=e.ecModel.get("useUTC"),y=F(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=os(y.axisValue,v,g)),v=Rg(v,n,!0)}else if(Z(c)){var _=U(function(S,b){S===this._ticket&&(h.setContent(b,f,e,p,l),this._updatePosition(e,l,o,s,h,n,u))},this);this._ticket=a,v=c(n,a,_)}else v=c;h.setContent(v,f,e,p,l),h.show(e,p),this._updatePosition(e,l,o,s,h,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a){if(n==="axis"||F(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!F(i))return{color:a||i.color||i.borderColor}},t.prototype._updatePosition=function(e,i,n,a,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();i=i||e.get("position");var h=o.getSize(),c=e.get("align"),v=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),Z(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),F(i))n=yt(i[0],u),a=yt(i[1],f);else if(V(i)){var p=i;p.width=h[0],p.height=h[1];var g=ri(p,{width:u,height:f});n=g.x,a=g.y,c=null,v=null}else if(z(i)&&l){var y=XD(i,d,h,e.get("borderWidth"));n=y[0],a=y[1]}else{var y=YD(n,a,o,u,f,c?null:20,v?null:20);n=y[0],a=y[1]}if(c&&(n-=Wd(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=Wd(v)?h[1]/2:v==="bottom"?h[1]:0),Om(e)){var y=UD(n,a,o,u,f);n=y[0],a=y[1]}o.moveTo(n,a)},t.prototype._updateContentNotChangedOnAxis=function(e,i){var n=this._lastDataByCoordSys,a=this._cbParamsList,o=!!n&&n.length===e.length;return o&&M(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&M(u,function(c,v){var d=h[v]||{},p=c.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&p.length===g.length,o&&M(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&M(c.seriesDataIndices,function(y){var m=y.seriesIndex,_=i[m],S=a[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=i,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this
|
||
|
|
`)){var g=new Ya;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(p)[0];if(!f.get(p))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),b=m.getVisual("style"),w=this._createItem(y,p,d,v,i,e,_,b,S,h,a);w.on("click",wi(Yd,p,null,a,c)).on("mouseover",wi(Xu,y.name,null,a,c)).on("mouseout",wi(Zu,y.name,null,a,c)),n.ssr&&w.eachChild(function(x){var C=et(x);C.seriesIndex=y.seriesIndex,C.dataIndex=d,C.ssrType="legend"}),f.set(p,!0)}else n.eachRawSeries(function(x){if(!f.get(p)&&x.legendVisualProvider){var C=x.legendVisualProvider;if(!C.containName(p))return;var D=C.indexOfName(p),A=C.getItemVisual(D,"style"),T=C.getItemVisual(D,"legendIcon"),L=se(A.fill);L&&L[3]===0&&(L[3]=.2,A=k(k({},A),{fill:Wi(L,"rgba")}));var I=this._createItem(x,p,d,v,i,e,{},A,T,h,a);I.on("click",wi(Yd,null,p,a,c)).on("mouseover",wi(Xu,null,p,a,c)).on("mouseout",wi(Zu,null,p,a,c)),n.ssr&&I.eachChild(function(P){var R=et(P);R.seriesIndex=x.seriesIndex,R.dataIndex=d,R.ssrType="legend"}),f.set(p,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},t.prototype._createSelector=function(e,i,n,a,o){var s=this.getSelectorGroup();Uu(e,function(u){var f=u.type,h=new Nt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:i.id})}});s.add(h);var c=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);rs(h,{normal:c,emphasis:v},{defaultText:u.title}),xo(h)})},t.prototype._createItem=function(e,i,n,a,o,s,l,u,f,h,c){var v=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(i),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=qD(f,a,l,u,v,g,c),b=new Ya,w=a.getModel("textStyle");if(Z(e.getLegendIcon)&&(!_||_==="inherit"))b.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var x=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;b.add(KD({itemWidth:d,itemHeight:p,icon:f,iconRotate:x,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var C=s==="left"?d+5:-5,D=s,A=o.get("formatter"),T=i;z(A)&&A?T=A.replace("{name}",i??""):Z(A)&&(T=A(i));var L=g?w.getTextColor():a.get("inactiveColor");b.add(new Nt({style:ti(w,{text:T,x:C,y:p/2,fill:L,align:D,verticalAlign:"middle"},{inheritColor:L})}));var I=new ct({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=a.getModel("tooltip");return P.get("show")&&jo({el:I,componentModel:o,itemName:i,itemTooltipOption:P.option}),b.add(I),b.eachChild(function(R){R.silent=!0}),I.silent=!h,this.getContentGroup().add(b),xo(b),b.__legendDataIndex=n,b},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Oi(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){Oi("horizontal",u,e.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?v[p]+=f[g]+d:h[p]+=c[g]+d,v[1-p]+=f[y]/2-c[y]/2,u.x=v[0],u.y=v[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+d+c[g],_[y]=Math.max(f[y],c[y]),_[m]=Math.min(0,c[m]+v[1-p]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(me);function qD(r,t,e,i,n,a,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),Uu(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?i.decal:Lu(h,o),u.fill==="inherit"&&(u.fill=i[n]),u.stroke==="inherit"&&(u.stroke=i[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?i:e).opacity),s(u,i);var c=t.getModel("lineStyle"),v=c.getLineStyle();if(s(v,e),u.fill==="auto"&&(u.fill=i.fill),u.stroke==="auto"
|
||
|
|
`||n==="")){var a=r.isSelected(n);hr(e,n)?e[n]=e[n]&&a:e[n]=a}}),e}function JD(r){r.registerAction("legendToggleSelect","legendselectchanged",mt(dn,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",mt(dn,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",mt(dn,"inverseSelect")),r.registerAction("legendSelect","legendselected",mt(dn,"select")),r.registerAction("legendUnSelect","legendunselected",mt(dn,"unSelect"))}function Vm(r){r.registerComponentModel(Yu),r.registerComponentView(zm),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,QD),r.registerSubTypeDefaulter("legend",function(){return"plain"}),JD(r)}var jD=function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.setScrollDataIndex=function(e){this.option.scrollDataIndex=e},t.prototype.init=function(e,i,n){var a=aa(e);r.prototype.init.call(this,e,i,n),Xd(this,e,a)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),Xd(this,this.option,e)},t.type="legend.scroll",t.defaultOption=as(Yu.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),t}(Yu);function Xd(r,t,e){var i=r.getOrient(),n=[1,1];n[i.index]=0,Ni(t,e,{type:"box",ignoreSize:!!n})}var Zd=bt,Fl=["width","height"],zl=["x","y"],tA=function(r){B(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!0,e._currentIndex=0,e}return t.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new Zd),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Zd)},t.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},t.prototype.renderInner=function(e,i,n,a,o,s,l){var u=this;r.prototype.renderInner.call(this,e,i,n,a,o,s,l);var f=this._controllerGroup,h=i.get("pageIconSize",!0),c=F(h)?h:[h,h];d("pagePrev",0);var v=i.getModel("pageTextStyle");f.add(new Nt({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(p,g){var y=p+"DataIndex",m=wf(i.get("pageIcons",!0)[i.getOrient().name][g],{onclick:U(u._pageGo,u,y,i,a)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]});m.name=p,f.add(m)}},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=Fl[u],h=zl[u],c=Fl[1-u],v=zl[1-u];o&&Oi("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),p=l.getBoundingRect(),g=[-p.x,-p.y],y=Q(n);o&&(y[f]=n[f]-p[f]-d);var m=this._layoutContentAndController(e,a,y,u,f,c,v,h);if(o){if(s==="end")g[u]+=m[f]+d;else{var _=p[f]+d;g[u]-=_,m[h]-=_}m[f]+=p[f]+d,g[1-u]+=m[v]+m[c]/2-p[c]/2,m[c]=Math.max(m[c],p[c]),m[v]=Math.min(m[v],p[v]+g[1-u]),l.x=g[0],l.y=g[1],l.markRedraw()}return m},t.prototype._layoutContentAndController=function(e,i,n,a,o,s,l,u){var f=this.getContentGroup(),h=this._containerGroup,c=this._controllerGroup;Oi(e.get("orient"),f,e.get("itemGap"),a?n.width:null,a?null:n.height),Oi("horizontal",c,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=c.getBoundingRect(),p=this._showController=v[o]>n[o],g=[-v.x,-v.y];i||(g[a]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=K(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[a]+=n[o]-d[o]:y[a]+=d[o]+_}m[1-a]+=v[s]/2-d[s]/2,f.setPosition(g),h.setPosition(y),c.setPosition(m);var b={x:0,y:0};if(b[o]=p?n[o]:v[o],b[s]=Math.max(v[s],d[s]),b[l]=Math.min(0,d[l]+m[1-a]),h.__rectSize=n[o],p){var w={x:0,y:0};w[o]=Math.max(n[o]-d[o]-_,0),w[s]=b[s],h.setClipPath(new ct({shape:w})),h.__rectSize=w[o]}else c.eachChild(fun
|