2024-02-04 09:11:50 +00:00
import { d as B _ , s as La , i as Ia , t as N _ , c as Ti , g as z _ , w as Pa , a as Qh , o as F _ , b as V _ , h as Jh , n as G _ , u as H _ } from "./arco.f883ed21.js" ; / * ! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
2024-02-03 01:36:30 +00:00
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 .
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * / v a r L u = f u n c t i o n ( r , t ) { r e t u r n L u = O b j e c t . s e t P r o t o t y p e O f | | { _ _ p r o t o _ _ : [ ] } i n s t a n c e o f A r r a y & & f u n c t i o n ( e , i ) { e . _ _ p r o t o _ _ = i } | | f u n c t i o n ( e , i ) { f o r ( v a r n i n i ) O b j e c t . p r o t o t y p e . h a s O w n P r o p e r t y . c a l l ( i , n ) & & ( e [ n ] = i [ n ] ) } , L u ( r , t ) } ; f u n c t i o n B ( r , t ) { i f ( t y p e o f t ! = " f u n c t i o n " & & t ! = = n u l l ) t h r o w n e w T y p e E r r o r ( " C l a s s e x t e n d s v a l u e " + S t r i n g ( t ) + " i s n o t a c o n s t r u c t o r o r n u l l " ) ; L u ( r , t ) ; f u n c t i o n e ( ) { t h i s . c o n s t r u c t o r = r } r . p r o t o t y p e = t = = = n u l l ? O b j e c t . c r e a t e ( t ) : ( e . p r o t o t y p e = t . p r o t o t y p e , n e w e ) } v a r W _ = f u n c t i o n ( ) { f u n c t i o n r ( ) { t h i s . f i r e f o x = ! 1 , t h i s . i e = ! 1 , t h i s . e d g e = ! 1 , t h i s . n e w E d g e = ! 1 , t h i s . w e C h a t = ! 1 } r e t u r n r } ( ) , U _ = f u n c t i o n ( ) { f u n c t i o n r ( ) { t h i s . b r o w s e r = n e w W _ , t h i s . n o d e = ! 1 , t h i s . w x a = ! 1 , t h i s . w o r k e r = ! 1 , t h i s . s v g S u p p o r t e d = ! 1 , t h i s . t o u c h E v e n t s S u p p o r t e d = ! 1 , t h i s . p o i n t e r E v e n t s S u p p o r t e d = ! 1 , t h i s . d o m S u p p o r t e d = ! 1 , t h i s . t r a n s f o r m S u p p o r t e d = ! 1 , t h i s . t r a n s f o r m 3 d S u p p o r t e d = ! 1 , t h i s . h a s G l o b a l W i n d o w = t y p e o f w i n d o w < " u " } r e t u r n r } ( ) , Q r = n e w U _ ; t y p e o f w x = = " o b j e c t " & & t y p e o f w x . g e t S y s t e m I n f o S y n c = = " f u n c t i o n " ? ( Q r . w x a = ! 0 , Q r . t o u c h E v e n t s S u p p o r t e d = ! 0 ) : t y p e o f d o c u m e n t > " u " & & t y p e o f s e l f < " u " ? Q r . w o r k e r = ! 0 : t y p e o f n a v i g a t o r > " u " ? ( Q r . n o d e = ! 0 , Q r . s v g S u p p o r t e d = ! 0 ) : Y _ ( n a v i g a t o r . u s e r A g e n t , Q r ) ; f u n c t i o n Y _ ( r , t ) { v a r e = t . b r o w s e r , i = r . m a t c h ( / F i r e f o x \ / ( [ \ d . ] + ) / ) , n = r . m a t c h ( / M S I E \ s ( [ \ d . ] + ) / ) | | r . m a t c h ( / T r i d e n t \ / . + ? r v : ( ( [ \ d . ] + ) ) / ) , a = r . m a t c h ( / E d g e ? \ / ( [ \ d . ] + ) / ) , o = / m i c r o m e s s e n g e r / i . t e s t ( r ) ; i & & ( e . f i r e f o x = ! 0 , e . v e r s i o n = i [ 1 ] ) , n & & ( e . i e = ! 0 , e . v e r s i o n = n [ 1 ] ) , a & & ( e . e d g e = ! 0 , e . v e r s i o n = a [ 1 ] , e . n e w E d g e = + a [ 1 ] . s p l i t ( " . " ) [ 0 ] > 1 8 ) , o & & ( e . w e C h a t = ! 0 ) , t . s v g S u p p o r t e d = t y p e o f S V G R e c t < " u " , t . t o u c h E v e n t s S u p p o r t e d = " o n t o u c h s t a r t " i n w i n d o w & & ! e . i e & & ! e . e d g e , t . p o i n t e r E v e n t s S u p p o r t e d = " o n p o i n t e r d o w n " i n w i n d o w & & ( e . e d g e | | e . i e & & + e . v e r s i o n > = 1 1 ) , t . d o m S u p p o r t e d = t y p e o f d o c u m e n t < " u " ; v a r s = d o c u m e n t . d o c u m e n t E l e m e n t . s t y l e ; t . t r a n s f o r m 3 d S u p p o r t e d = ( e . i e & & " t r a n s i t i o n " i n s | | e . e d g e | | " W e b K i t C S S M a t r i x " i n w i n d o w & & " m 1 1 " i n n e w W e b K i t C S S M a t r i x | | " M o z P e r s p e c t i v e " i n s ) & & ! ( " O T r a n s i t i o n " i n s ) , t . t r a n s f o r m S u p p o r t e d = t . t r a n s f o r m 3 d S u p p o r t e d | | e . i e & & + e . v e r s i o n > = 9 } c o n s t j = Q r ; v a r z f = 1 2 , $ _ = " s a n s - s e r i f " , s i = z f + " p x " + $ _ , Z _ = 2 0 , X _ = 1 0 0 , q _ = " 0 0 7 L L m W ' 5 5 ; N 0 5 0 0 L L L L L L L L L L 0 0 N N N L z W W \ \ \ \ W Q b \ \ 0 F W L g \ \ b W b \ \ W Q \ \ W r W W Q 0 0 0 C L 5 L L F L L 0 L L * * F * g L L L L 5 F 0 L F \ \ F F F 5 . 5 N " ; f u n c t i o n K _ ( r ) { v a r t = { } ; i f ( t y p e o f J S O N > " u " ) r e t u r n t ; f o r ( v a r e = 0 ; e < r . l e n g t h ; e + + ) { v a r i = S t r i n g . f r o m C h a r C o d e ( e + 3 2 ) , n = ( r . c h a r C o d e A t ( e ) - Z _ ) / X _ ; t [ i ] = n } r e t u r n t } v a r Q _ = K _ ( q _ ) , g i = { c r e a t e C a n v a s : f u n c t i o n ( ) { r e t u r n t y p e o f d o c u m e n t < " u " & & d o c u m e n t . c r e a t e E l e m e n t ( " c a n v a s " ) } , m e a s u r e T e x t : f u n c t i o n ( ) { v a r r , t ; r e t u r n f u n c t i o n ( e , i ) { i f ( ! r ) { v a r n = g i . c r e a t e C a n v a s ( ) ; r = n & & n . g e t C o n t e x t ( " 2 d " ) } i f ( r ) r e t u r n t ! = = i & & ( t = r . f o n t = i | | s i ) , r . m e a s u r e T e x t ( e ) ; e = e | | " " , i = i | | s i ; v a r a = / ( \ d + ) p x / . e x e c ( i ) , o = a & & + a [ 1 ] | | z f , s = 0 ; i f ( i . i n d e x O f ( " m o n o " ) > = 0 ) s = o * e . l e n g t h ; e l s e f o r ( v a r l = 0 ; l < e . l e n g t h ; l + + ) { v a r u = Q _ [ e [ l ] ] ; s + = u = = n u l l ? o : u * o } r e t u r n { w i d t h : s } } } ( ) , l o a d I m a g e : f u n c t i o n ( r , t , e ) { v a r i = n e w I m a g e ; r e t u r n i . o n l o a d = t , i . o n e r r o r = e , i . s r c = r , i } } , n g = j e ( [ " F u n c t i o n " , " R e g E x p " , " D a t e " , " E r r o r " , " C a n v a s G r a d i e n t " , " C a n v a s P a t t e r n " , " I m a g e " , " C a n v a s " ] , f u n c t i o n ( r , t ) { r e t u r n r [ " [ o b j e c t " + t + " ] " ] = ! 0 , r } , { } ) , a g = j e ( [ " I n t 8 " , " U i n t 8 " , " U i n t 8 C l a m p e d " , " I n t 1 6 " , " U i n t 1 6 " , " I n t 3 2 " , " U i n t 3 2 " , " F l o a t 3 2 " , " F l o a t 6 4 " ] , f u n c t i o n ( r , t ) { r e t u r n r [ " [ o b j e c t " + t + " A r r a y ] " ] = ! 0 , r } , { } ) , w a = O b j e c t . p r o t o t y p e . t o S t r i n g , S s = A r r a y . p r o t o t y p e , J _ = S s . f o r E a c h , j _ = S s . f i l t e r , F f = S s . s l i c e , t 1 = S s . m a p , j h = f u n c t i o n ( ) { } . c o n s t r u c t o r , R a = j h ? j h . p r o t o t y p e : n u l l , V f = " _ _ p r o t o _ _ " , e 1 = 2 3 1 1 ; f u n c t i o n o g ( ) { r e t u r n e 1 + + } f u n c t i o n G f ( ) { f o r ( v a r r = [ ] , t = 0 ; t < a r g u m e n t s . l e n g t h ; t + + ) r [ t ] = a r g u m e n t s [ t ] ; t y p e o f c o n s o l e < " u " & & c o n s o l e . e r r o r . a p p l y ( c o n s o l e , r ) } f u n c t i o n r t ( r ) { i f ( r = = n u l l | | t y p e o f r ! = " o b j e c t " ) r e t u r n r ; v a r t = r , e = w a . c a l l ( r ) ; i f ( e = = = " [ o b j e c t A r r a y ] " ) { i f ( ! Z n ( r ) ) { t = [ ] ; f o r ( v a r i = 0 , n = r . l e n g t h ; i < n ; i + + ) t [ i ] = r t ( r [ i ] ) } } e l s e i f ( a g [ e ] ) { i f ( ! Z n ( r ) ) { v a r a = r . c o n s t r u c t o r ; i f ( a . f r o m ) t = a . f r o m ( r ) ; e l s e { t = n e w a ( r . l e n g t h ) ; f o r ( v a r i = 0 , n = r . l e n g t h ; i < n ; i + + ) t [ i ] = r [ i ] } } } e l s e i f ( ! n g [ e ] & & ! Z n ( r ) & & ! G o ( r ) ) { t = { } ; f o r ( v a r o i n r ) r . h a s O w n P r o p e r t y ( o ) & & o ! = = V f & & ( t [ o ] = r t ( r [ o ] ) ) } r e t u r n t } f u n c t i o n i t ( r , t , e ) { i f ( ! W ( t ) | | ! W ( r ) ) r e t u r n e ? r t ( t ) : r ; f o r ( v a r i i n t ) i f ( t . h a s O w n P r o p e r t y ( i ) & & i ! = = V f ) { v a r n = r [ i ] , a = t [ i ] ; W ( a ) & & W ( n ) & & ! z ( a ) & & ! z ( n ) & & ! G o ( a ) & & ! G o ( n ) & & ! t v ( a ) & & ! t v ( n ) & & ! Z n ( a ) & & ! Z n ( n ) ? i t ( n , a , e ) : ( e | | ! ( i i n r ) ) & & ( r [ i ] = r t ( t [ i ] ) ) } r e t u
` ),a=n.length;if(a===1)return Av(n[0],t,e,i);for(var o=new st(0,0,0,0),s=0;s<n.length;s++){var l=Av(n[s],t,e,i);s===0?o.copy(l):o.union(l)}return o}function Fn(r,t,e){return e==="right"?r-=t:e==="center"&&(r-=t/2),r}function Gi(r,t,e){return e==="middle"?r-=t/2:e==="bottom"&&(r-=t),r}function Kf(r){return re(" \u 56FD",r)}function Ar(r,t){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*t:parseFloat(r):r}function qo(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+=Ar(i[0],e.width),u+=Ar(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 ml="__zr_normal__",_l=Ve.concat(["ignore"]),TS=je(Ve,function(r,t){return r[t]=!0,r},{ignore:!1}),Di={},CS=new st(0,0,0,0),Qf=function(){function r(t){this.id=og(),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=CS;i.layoutRect?f.copy(i.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Di,i,f):qo(Di,i,f),a.x=Di.x,a.y=Di.y,o=Di.align,s=Di.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=Ar(h[0],f.width),v=Ar(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 g=i.inside==null?typeof i.position=="string"&&i.position.indexOf("inside")>=0:i.inside,p=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;g&&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!==p.fill||m!==p.stroke||_!==p.autoStroke||o!==p.align||s!==p.verticalAlign)&&(l=!0,p.fill=y,p.stroke=m,p.autoStroke=_,p.align=o,p.verticalAlign=s,e.setDefaultTextStyle(p)),e.__dirty|=ee,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()?Xu:Zu},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),i=typeof e=="string"&&Qe(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,bs(i,"rgba")},r.prototype.traverse=f
* ZRender , a high performance 2 d drawing library .
*
* Copyright ( c ) 2013 , Baidu Inc .
* All rights reserved .
*
* LICENSE
* https : //github.com/ecomfe/zrender/blob/master/LICENSE.txt
* /var Io={},Pg={};function IS(r){delete Pg[r]}function PS(r){if(!r)return!1;if(typeof r=="string")return Zo(r,1)<$u;if(r.colorStops){for(var t=r.colorStops,e=0,i=t.length,n=0;n<i;n++)e+=Zo(t[n].color,1);return e/ = i , e < $u } return ! 1 } var RS = 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 Z1 , o = i . renderer || "canvas" ; Io [ o ] || ( o = ft ( Io ) [ 0 ] ) , i . useDirtyRect = i . useDirtyRect == null ? ! 1 : i . useDirtyRect ; var s = new Io [ o ] ( e , a , i , t ) , l = i . ssr || s . ssrOnly ; this . storage = a , this . painter = s ; var u = ! j . node && ! j . worker && ! l ? new xS ( s . getViewportRoot ( ) , s . root ) : null , f = i . useCoarsePointer , h = f == null || f === "auto" ? j . touchEventsSupported : ! ! f , c = 44 , v ; h && ( v = at ( i . pointerSize , c ) ) , this . handler = new H1 ( a , s , u , s . root , v ) , this . animation = new cS ( { stage : { update : l ? null : function ( ) { return n . _flush ( ! 0 ) } } } ) , l || this . animation . start ( ) } return r . prototype . add = function ( t ) { ! t || ( this . storage . addRoot ( t ) , t . addSelfToZr ( this ) , this . refresh ( ) ) } , r . prototype . remove = function ( t ) { ! t || ( this . storage . delRoot ( t ) , t . removeSelfFromZr ( this ) , this . refresh ( ) ) } , r . prototype . configLayer = function ( t , e ) { this . painter . configLayer && this . painter . configLayer ( t , e ) , this . refresh ( ) } , r . prototype . setBackgroundColor = function ( t ) { this . painter . setBackgroundColor && this . painter . setBackgroundColor ( t ) , this . refresh ( ) , this . _backgroundColor = t , this . _darkMode = PS ( 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 ) { t || this . animation . update ( ! 0 ) , this . _needsRefresh = ! 1 , this . painter . refresh ( ) , this . _needsRefresh = ! 1 } , r . prototype . refresh = function ( ) { this . _needsRefresh = ! 0 , this . animation . start ( ) } , r . prototype . flush = function ( ) { this . _flush ( ! 1 ) } , r . prototype . _flush = function ( t ) { var e , i = Yi ( ) ; this . _needsRefresh && ( e = ! 0 , this . refreshImmediately ( t ) ) , this . _needsRefreshHover && ( e = ! 0 , this . refreshHoverImmediately ( ) ) ; var n = Yi ( ) ; 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 . animation . start ( ) , this . _stillFrameAccum = 0 } , r . prototype . refreshHover = function ( ) { this . _needsRefreshHover = ! 0 } , r . prototype . refreshHoverImmediately = function ( ) { this . _needsRefreshHover = ! 1 , this . painter . refreshHover && this . painter . getType ( ) === "canvas" && this . painter . refreshHover ( ) } , r . prototype . resize = function ( t ) { t = t || { } , this . painter . resize ( t . width , t . height ) , this . handler . resize ( ) } , r . prototype . clearAnimation = function ( ) { this . animation . clear ( ) } , r . prototype . getWidth = function ( ) { return this . painter . getWidth ( ) } , r . prototype . getHeight = function ( ) { return this . painter . getHeight ( ) } , r . prototype . setCursorStyle = function ( t ) { this . handler . setCursorStyle ( t ) } , r . prototype . findHover = function ( t , e ) { return this . handler . findHover ( t , e ) } , r . prototype . on = function ( t , e , i ) { return this . handler . on ( t , e , i ) , this } , r . prototype . off = function ( t , e ) { this . handler . off ( t , e ) } , r . prototype . trigger = function ( t , e ) { this . handler . trigger ( t , e ) } , r . prototype . clear = function ( ) { for ( var t = this . storage . getRoots ( ) , e = 0 ; e < t . length ; e ++ ) t [ e ] instanceof wt && t [ e ] . removeSelfFromZr ( this ) ; this . storage . delAllRoots ( ) , this . painter . clear ( ) } , r . prototype . dispose = function ( ) { this . animation . stop ( ) , this . clear ( ) , this . storage . dispose ( ) , this . painter . dispose ( ) , this . handler . dispose ( ) , this . animation = this . storage = this . painter = this . handler = null , IS ( this . id ) } , r } ( ) ; function Dv ( r , t ) { var e = new RS ( og ( ) , r , t ) ; return Pg [ e . id ] = e , e } function ES ( r , t ) { Io [ r ] = t } var Lv = 1e-4 , Rg = 20 ; function kS ( r ) { return r . replace ( /^\s+|\s+$/g , "" ) } function Rt ( r , t , e , i ) { var n = t [ 0 ] , a = t [ 1 ] , o = e [ 0 ] , s = e [ 1 ] , l = a - n , u = s - o ; if ( l === 0 ) return u === 0 ? o : ( o + s ) / 2 ; if ( i ) if ( l > 0 ) { if ( r <= n ) return o ; if ( r >= a ) return s } else { if ( r >= n ) return o ; if ( r <= a ) return s } else { if ( r === n ) return o ; if ( r === a ) return s } return ( r - n ) / l * u + o } function ot ( r , t ) { switch ( r ) { case "center" : case "middle" : r = "50%" ; break ; case "left" : case "top" : r = "0%" ; break ; case " r
` );n=Yg(t,e,i,n);for(var o=0,s=a.length;o<s;o++)a[o]= $ g(a[o],n);return a.join( `
` )}function Yg(r,t,e,i){i=i||{};var n=O({},i);n.font=t,e=at(e,"..."),n.maxIterations=at(i.maxIterations,2);var a=n.minChar=at(i.minChar,0);n.cnCharWidth=re(" \u 56FD",t);var o=n.ascCharWidth=re("a",t);n.placeholder=at(i.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=re(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 $ g(r,t){var e=t.containerWidth,i=t.font,n=t.contentWidth;if(!e)return"";var a=re(r,i);if(a<=e)return r;for(var o=0;;o++){if(a<=n||o>=t.maxIterations){r+=t.ellipsis;break}var s=o===0?px(r,n,t.ascCharWidth,t.cnCharWidth):a>0?Math.floor(r.length*n/a):0;r=r.substr(0,s),a=re(r,i)}return r===""&&(r=t.placeholder),r}function px(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 gx(r,t){r!=null&&(r+="");var e=t.overflow,i=t.padding,n=t.font,a=e==="truncate",o=Kf(n),s=at(t.lineHeight,o),l=!!t.backgroundColor,u=t.lineOverflow==="truncate",f=t.width,h;f!=null&&(e==="break"||e==="breakAll")?h=r?Zg(r,t.font,f,e==="breakAll",0).lines:[]:h=r?r.split( `
` ):[];var c=h.length*s,v=at(t.height,c);if(c>v&&u){var d=Math.floor(v/s);h=h.slice(0,d)}if(r&&a&&f!=null)for(var g=Yg(f,n,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),p=0;p<h.length;p++)h[p]= $ g(h[p],g);for(var y=v,m=0,p=0;p<h.length;p++)m=Math.max(re(h[p],n),m);f==null&&(f=m);var _=m;return i&&(y+=i[0]+i[2],_+=i[1]+i[3],f+=i[1]+i[3]),l&&(_=f),{lines:h,height:v,outerWidth:_,outerHeight:y,lineHeight:s,calculatedLineHeight:o,contentWidth:m,contentHeight:c,width:f}}var yx=function(){function r(){}return r}(),kv=function(){function r(t){this.tokens=[],t&&(this.tokens=t)}return r}(),mx=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[]}return r}();function _x(r,t){var e=new mx;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=bl.lastIndex=0,l;(l=bl.exec(r))!=null;){var u=l.index;u>s&&Tl(e,r.substring(s,u),t,o),Tl(e,l[2],t,o,l[1]),s=bl.lastIndex}s<r.length&&Tl(e,r.substring(s,r.length),t,o);var f=[],h=0,c=0,v=t.padding,d=a==="truncate",g=t.lineOverflow==="truncate";function p(k,N,H){k.width=N,k.lineHeight=H,h+=H,c=Math.max(c,N)}t:for(var y=0;y<e.lines.length;y++){for(var m=e.lines[y],_=0,S=0,w=0;w<m.tokens.length;w++){var x=m.tokens[w],b=x.styleName&&t.rich[x.styleName]||{},T=x.textPadding=b.padding,M=T?T[1]+T[3]:0,D=x.font=b.font||t.font;x.contentHeight=Kf(D);var C=at(b.height,x.contentHeight);if(x.innerHeight=C,T&&(C+=T[0]+T[2]),x.height=C,x.lineHeight= $ n(b.lineHeight,t.lineHeight,C),x.align=b&&b.align||t.align,x.verticalAlign=b&&b.verticalAlign||"middle",g&&n!=null&&h+x.lineHeight>n){w>0?(m.tokens=m.tokens.slice(0,w),p(m,S,_),e.lines=e.lines.slice(0,y+1)):e.lines=e.lines.slice(0,y);break t}var L=b.width,I=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")x.percentWidth=L,f.push(x),x.contentWidth=re(x.text,D);else{if(I){var P=b.backgroundColor,R=P&&P.image;R&&(R=cx(R),Cs(R)&&(x.width=Math.max(x.width,R.width*C/R.height)))}var E=d&&i!=null?i-S:null;E!=null&&E<x.width?!I||E<M?(x.text="",x.width=x.contentWidth=0):(x.text=dx(x.text,E-M,D,t.ellipsis,{minChar:t.truncateMinChar}),x.width=x.contentWidth=re(x.text,D)):x.contentWidth=re(x.text,D)}x.width+=M,S+=x.width,b&&(_=Math.max(_,x.lineHeight))}p(m,S,_)}e.outerWidth=e.width=at(i,c),e.outerHeight=e.height=at(n,h),e.contentHeight=h,e.contentWidth=c,v&&(e.outerWidth+=v[1]+v[3],e.outerHeight+=v[0]+v[2]);for(var y=0;y<f.length;y++){var x=f[y],G=x.percentWidth;x.width=parseInt(G,10)/100*e.width}return e}function Tl(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=Ar(o.width,i.width)+v;s.length>0&&d+i.accumWidth>i.width&&(f=t.split( `
` ),u=!0),i.accumWidth=d}else{var g=Zg(t,l,i.width,i.breakAll,i.accumWidth);i.accumWidth=g.accumWidth+v,h=g.linesWidths,f=g.lines}}else f=t.split( `
` );for(var p=0;p<f.length;p++){var y=f[p],m=new yx;if(m.styleName=n,m.text=y,m.isLineHolder=!y&&!a,typeof o.width=="number"?m.width=o.width:m.width=h?h[p]:re(y,l),!p&&!u){var _=(s[s.length-1]||(s[0]=new kv)).tokens,S=_.length;S===1&&_[0].isLineHolder?_[0]=m:(y||!S||a)&&_.push(m)}else s.push(new kv([m]))}}function Sx(r){var t=r.charCodeAt(0);return t>=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var xx=je(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function bx(r){return Sx(r)?!!xx[r]:!0}function Zg(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=re(c,t),d=i?!1:!bx(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 Qu="__zr_style_"+Math.round(Math.random()*10),ri={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},Ms={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ri[Qu]=!0;var Ov=["z","z2","invisible"],Tx=["invisible"],Cx=function(r){B(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var i=ft(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&&Mx(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 st(0,0,0,0)),i?st.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 st(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:O(this.style,e),this.dirtyStyle(),this},t.prototype.dirtyStyle=function(e){e||this.markRedraw(),this.__dirty|=Nn,this._rect&&(this._rect=null)},t.prototype.dirty=function(){this.dirtyStyle()},t.prototype.styleChanged=function(){return!!(this.__dirty&Nn)},t.prototype.styleUpdated=function(){this.__dirty&=~Nn},t.prototype.createStyle=function(e){return ws(ri,e)},t.prototype.useStyle=function(e){e[Qu]||(e=this.createStyle(e)),this.__inHover?this.__hoverStyle=e:this.style=e,this.dirtyStyle()},t.prototype.isStyleObject=function(e){return e[Qu]},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,Ov)},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 di(r,t){return t.type=r,t}function hf(r){return r.type==="section"}function Tm(r){return hf(r)?ZT:XT}function Cm(r){if(hf(r)){var t=0,e=r.blocks.length,i=e>1||e>0&&!r.noHeader;return A(r.blocks,function(n){var a=Cm(n);a>=t&&(t=a+ +(i&&(!a||hf(n)&&!n.noHeader)))}),t}return 0}function ZT(r,t,e,i){var n=t.noHeader,a=qT(Cm(t)),o=[],s=t.blocks||[];tr(!s||z(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Q(u,l)){var f=new PT(u[l],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(d,g){var p=t.valueFormatter,y=Tm(d)(p?O(O({},r),{valueFormatter:p}):r,d,g>0?a.html:0,i);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(a.richText):vf(o.join(""),n?e:a.html);if(n)return h;var c=lf(t.header,"ordinal",r.useUTC),v=bm(i,r.renderMode).nameStyle;return r.renderMode==="richText"?Mm(r,c,v)+a.richText+h:vf('<div style="'+v+";"+wm+';">'+he(c)+"</div>"+h,e)}function XT(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=z(S)?S:[S],F(S,function(w,x){return lf(w,z(v)?v[x]:v,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||"#333",n),c=a?"":lf(l,"ordinal",u),v=t.valueType,d=o?[]:f(t.value),g=!s||!a,p=!s&&a,y=bm(i,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":h)+(a?"":Mm(r,c,m))+(o?"":JT(r,d,g,p,_)):vf((s?"":h)+(a?"":KT(c,!s,m))+(o?"":QT(d,g,p,_)),e)}}function Zc(r,t,e,i,n,a){if(!!r){var o=Tm(r),s={useUTC:n,renderMode:e,orderMode:i,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function qT(r){return{html:YT[r],richText: $ T[r]}}function vf(r,t){var e='<div style="clear:both"></div>',i="margin: "+t+"px 0 0";return'<div style="'+i+";"+wm+';">'+r+e+"</div>"}function KT(r,t,e){var i=t?"margin-left:2px":"";return'<span style="'+e+";"+i+'">'+he(r)+"</span>"}function QT(r,t,e,i){var n=e?"10px":"20px",a=t?"float:right;margin-left:"+n:"";return r=z(r)?r:[r],'<span style="'+a+";"+i+'">'+F(r,function(o){return he(o)}).join(" ")+"</span>"}function Mm(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function JT(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(z(t)?t.join(" "):t,a)}function Am(r,t){var e=r.getData().getItemVisual(t,"style"),i=e[r.visualDrawType];return hi(i)}function Dm(r,t){var e=r.get("padding");return e!=null?e:t==="richText"?[8,10]:10}var Xl=function(){function r(){this.richTextStyles={},this._nextStyleNameId=Bg()}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=Vb({color:e,type:t,renderMode:i,markerId:n});return V(a)?a:(this.richTextStyles[n]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(t,e){var i={};z(e)?A(e,function(a){return O(i,a)}):O(i,e);var n=this._generateStyleName();return this.richTextStyles[n]=i,"{"+n+"|"+t+"}"},r}();function jT(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=z(s),u=Am(t,e),f,h,c,v;if(o>1||l&&!o){var d=tC(s,t,e,a,u);f=d.inlineValues,h=d.inlineValueTypes,c=d.blocks,v=d.inlineValues[0]}else if(o){var g=n.getDimensionInfo(a[0]);v=f=en(n,e,a[0]),h=g.type}else v=f=l?s[0]:s;var p=jf(t),y=p&&t.name||"",m=n.getName(e),_=i?y:m;return di("section",{header:y,noHeader:i||!p,sortParam:v,blocks:[di("nameValue",{markerType:"item",markerColor:u,name:_,noName:!ze(_),value:f,valueType:h})].concat(c||[])})}function tC(r,t,e,i,n){var a=t.getData(),o=je(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?A(i,function(h){f(en(a,e,h),h)}):A(r,f);function f(h,c){var v=a.getDimensionInfo(c);!v||v.otherDims.tooltip===!1||(o?u.push(di("nameValue",{markerType:"subItem",markerColor:n,name:v.displayName,value:h,v
` :"<br/>",y=h.join(p);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=vt(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,g=Pn([c.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),p=g.get("trigger");if(!(p!=null&&p!=="item")){var y=u.getDataParams(f,h),m=new Xl;y.marker=m.makeTooltipMarker("item",hi(y.color),v);var _=Hc(u.formatTooltip(f,!1,h)),S=g.get("order"),w=g.get("valueFormatter"),x=_.frag,b=x?Zc(w?O({valueFormatter:w},x):x,m,v,S,a.get("useUTC"),g.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(g,function(){this._showTooltipContent(g,b,y,T,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=vt(i),o=a.tooltipConfig,s=o.option||{};if(V(s)){var l=s;s={content:l,formatter:l}}var u=[s],f=this._ecModel.getComponent(a.componentMainType,a.componentIndex);f&&u.push(f),u.push({formatter:s.content});var h=e.positionDefault,c=Pn(u,this._tooltipModel,h?{position:h}:null),v=c.get("content"),d=Math.random()+"",g=new Xl;this._showOrMove(c,function(){var p=rt(c.get("formatterParams")||{});this._showTooltipContent(c,v,p,d,e.offsetX,e.offsetY,e.position,i,g)}),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")),g=d.color;if(c)if(V(c)){var p=e.ecModel.get("useUTC"),y=z(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;v=c,m&&(v=Ns(y.axisValue,v,p)),v=jy(v,n,!0)}else if(K(c)){var _=U(function(S,w){S===this._ticket&&(h.setContent(w,f,e,g,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,g,l),h.show(e,g),this._updatePosition(e,l,o,s,h,n,u)}},t.prototype._getNearestPoint=function(e,i,n,a){if(n==="axis"||z(i))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!z(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),K(i)&&(i=i([n,a],s,o.el,d,{viewSize:[u,f],contentSize:h.slice()})),z(i))n=ot(i[0],u),a=ot(i[1],f);else if(W(i)){var g=i;g.width=h[0],g.height=h[1];var p=vi(g,{width:u,height:f});n=p.x,a=p.y,c=null,v=null}else if(V(i)&&l){var y=Y2(i,d,h,e.get("borderWidth"));n=y[0],a=y[1]}else{var y=W2(n,a,o,u,f,c?null:20,v?null:20);n=y[0],a=y[1]}if(c&&(n-=qp(c)?h[0]/2:c==="right"?h[0]:0),v&&(a-=qp(v)?h[1]/2:v==="bottom"?h[1]:0),T_(e)){var y=U2(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&&A(n,function(s,l){var u=s.dataByAxis||[],f=e[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&A(u,function(c,v){var d=h[v]||{},g=c.seriesDataIndices||[],p=d.seriesDataIndices||[];o=o&&c.value===d.value&&c.axisType===d.axisType&&c.axisId===d.axisId&&g.length===p.length,o&&A(g,function(y,m){var _=p[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),a&&A(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.uid})},t.prototype.dispose=function(e,i){j.node||!i.getDom()||(us(this,"_updatePosition"),this._tooltip
` )){var p=new wo;p.newline=!0,u.add(p);return}var y=n.getSeriesByName(g)[0];if(!f.get(g))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),w=m.getVisual("style"),x=this._createItem(y,g,d,v,i,e,_,w,S,h,a);x.on("click",Fi(Kp,g,null,a,c)).on("mouseover",Fi(kf,y.name,null,a,c)).on("mouseout",Fi(Of,y.name,null,a,c)),f.set(g,!0)}else n.eachRawSeries(function(b){if(!f.get(g)&&b.legendVisualProvider){var T=b.legendVisualProvider;if(!T.containName(g))return;var M=T.indexOfName(g),D=T.getItemVisual(M,"style"),C=T.getItemVisual(M,"legendIcon"),L=Qe(D.fill);L&&L[3]===0&&(L[3]=.2,D=O(O({},D),{fill:bs(L,"rgba")}));var I=this._createItem(b,g,d,v,i,e,{},D,C,h,a);I.on("click",Fi(Kp,null,g,a,c)).on("mouseover",Fi(kf,null,g,a,c)).on("mouseout",Fi(Of,null,g,a,c)),f.set(g,!0)}},this)},this),o&&this._createSelector(o,i,a,s,l)},t.prototype._createSelector=function(e,i,n,a,o){var s=this.getSelectorGroup();Ef(e,function(u){var f=u.type,h=new Dt({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var c=i.getModel("selectorLabel"),v=i.getModel(["emphasis","selectorLabel"]);on(h,{normal:c,emphasis:v},{defaultText:u.title}),es(h)})},t.prototype._createItem=function(e,i,n,a,o,s,l,u,f,h,c){var v=e.visualDrawType,d=o.get("itemWidth"),g=o.get("itemHeight"),p=o.isSelected(i),y=a.get("symbolRotate"),m=a.get("symbolKeepAspect"),_=a.get("icon");f=_||f||"roundRect";var S=Q2(f,a,l,u,v,p,c),w=new wo,x=a.getModel("textStyle");if(K(e.getLegendIcon)&&(!_||_==="inherit"))w.add(e.getLegendIcon({itemWidth:d,itemHeight:g,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;w.add(J2({itemWidth:d,itemHeight:g,icon:f,iconRotate:b,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,M=s,D=o.get("formatter"),C=i;V(D)&&D?C=D.replace("{name}",i!=null?i:""):K(D)&&(C=D(i));var L=p?x.getTextColor():a.get("inactiveColor");w.add(new Dt({style:fi(x,{text:C,x:T,y:g/2,fill:L,align:M,verticalAlign:"middle"},{inheritColor:L})}));var I=new _t({shape:w.getBoundingRect(),invisible:!0}),P=a.getModel("tooltip");return P.get("show")&&Ps({el:I,componentModel:o,itemName:i,itemTooltipOption:P.option}),w.add(I),w.eachChild(function(R){R.silent=!0}),I.silent=!h,this.getContentGroup().add(w),es(w),w.__legendDataIndex=n,w},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ra(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){ra("horizontal",u,e.get("selectorItemGap",!0));var c=u.getBoundingRect(),v=[-c.x,-c.y],d=e.get("selectorButtonGap",!0),g=e.getOrient().index,p=g===0?"width":"height",y=g===0?"height":"width",m=g===0?"y":"x";s==="end"?v[g]+=f[p]+d:h[g]+=c[p]+d,v[1-g]+=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 _[p]=f[p]+d+c[p],_[y]=Math.max(f[y],c[y]),_[m]=Math.min(0,c[m]+v[1-g]),_}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}(Ce);function Q2(r,t,e,i,n,a,o){function s(p,y){p.lineWidth==="auto"&&(p.lineWidth=y.lineWidth>0?2:0),Ef(p,function(m,_){p[_]==="inherit"&&(p[_]=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:yf(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"&&(u.stroke=i.fill),v.stroke==="auto"&&(v.stroke=i.fill),!a){var d=t.get("inactiveBorderWidth"),g=u[f];u.lineWidth=d==="auto"?i.lineWidth>0&&g?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inacti
` ||u==="")){var f=o.isSelected(u);i.hasOwnProperty(u)?i[u]=i[u]&&f:i[u]=f}})}),r==="allSelect"||r==="inverseSelect"?{selected:i}:{name:t.name,selected:i}}function tP(r){r.registerAction("legendToggleSelect","legendselectchanged",yt(Rn,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",yt(Rn,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",yt(Rn,"inverseSelect")),r.registerAction("legendSelect","legendselected",yt(Rn,"select")),r.registerAction("legendUnSelect","legendunselected",yt(Rn,"unSelect"))}function I_(r){r.registerComponentModel(Rf),r.registerComponentView(L_),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,j2),r.registerSubTypeDefaulter("legend",function(){return"plain"}),tP(r)}var eP=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),Qp(this,e,a)},t.prototype.mergeOption=function(e,i){r.prototype.mergeOption.call(this,e,i),Qp(this,this.option,e)},t.type="legend.scroll",t.defaultOption=Bs(Rf.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}(Rf);function Qp(r,t,e){var i=r.getOrient(),n=[1,1];n[i.index]=0,ci(t,e,{type:"box",ignoreSize:!!n})}const rP=eP;var Jp=wt,wu=["width","height"],bu=["x","y"],iP=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 Jp),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new Jp)},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=z(h)?h:[h,h];d("pagePrev",0);var v=i.getModel("pageTextStyle");f.add(new Dt({name:"pageText",style:{text:"xx/xx",fill:v.getTextColor(),font:v.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),d("pageNext",1);function d(g,p){var y=g+"DataIndex",m=hh(i.get("pageIcons",!0)[i.getOrient().name][p],{onclick:U(u._pageGo,u,y,i,a)},{x:-c[0]/2,y:-c[1]/2,width:c[0],height:c[1]});m.name=g,f.add(m)}},t.prototype.layoutInner=function(e,i,n,a,o,s){var l=this.getSelectorGroup(),u=e.getOrient().index,f=wu[u],h=bu[u],c=wu[1-u],v=bu[1-u];o&&ra("horizontal",l,e.get("selectorItemGap",!0));var d=e.get("selectorButtonGap",!0),g=l.getBoundingRect(),p=[-g.x,-g.y],y=rt(n);o&&(y[f]=n[f]-g[f]-d);var m=this._layoutContentAndController(e,a,y,u,f,c,v,h);if(o){if(s==="end")p[u]+=m[f]+d;else{var _=g[f]+d;p[u]-=_,m[h]-=_}m[f]+=g[f]+d,p[1-u]+=m[v]+m[c]/2-g[c]/2,m[c]=Math.max(m[c],g[c]),m[v]=Math.min(m[v],g[v]+p[1-u]),l.x=p[0],l.y=p[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;ra(e.get("orient"),f,e.get("itemGap"),a?n.width:null,a?null:n.height),ra("horizontal",c,e.get("pageButtonItemGap",!0));var v=f.getBoundingRect(),d=c.getBoundingRect(),g=this._showController=v[o]>n[o],p=[-v.x,-v.y];i||(p[a]=f[u]);var y=[0,0],m=[-d.x,-d.y],_=at(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(g){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(p),h.setPosition(y),c.setPosition(m);var w={x:0,y:0};if(w[o]=g?n[o]:v[o],w[s]=Math.max(v[s],d[s]),w[l]=Math.min(0,d[l]+m[1-a]),h.__rectSize=n[o],g){var x={x:0,y:0};x[o]=Math
` ,{});var $ P=function(){if(On!=null)return On;if(typeof HTMLElement>"u"||typeof customElements>"u")return On=!1;try{new Function("tag", ` class EChartsElement extends HTMLElement {
_ _dispose = null ;
disconnectedCallback ( ) {
if ( this . _ _dispose ) {
this . _ _dispose ( ) ;
this . _ _dispose = null ;
}
}
}
if ( customElements . get ( tag ) == null ) {
customElements . define ( tag , EChartsElement ) ;
}
` )(E_)}catch{return On=!1}return On=!0}(),ZP="ecTheme",XP="ecInitOptions",qP="ecUpdateOptions",sR=B_({name:"echarts",props:Ze(Ze({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},GP),YP),emits:{},inheritAttrs:!1,setup:function(r,t){var e=t.attrs,i=La(),n=La(),a=La(),o=La(),s=Ia(ZP,null),l=Ia(XP,null),u=Ia(qP,null),f=N_(r),h=f.autoresize,c=f.manualUpdate,v=f.loading,d=f.loadingOptions,g=Ti(function(){return o.value||r.option||null}),p=Ti(function(){return r.theme||To(s,{})}),y=Ti(function(){return r.initOptions||To(l,{})}),m=Ti(function(){return r.updateOptions||To(u,{})}),_=Ti(function(){return function(M){var D={};for(var C in M)WP(C)||(D[C]=M[C]);return D}(e)}),S=z_().proxy. $ listeners;function w(M){if(n.value){var D=a.value=DM(n.value,p.value,y.value);r.group&&(D.group=r.group);var C=S;C||(C={},Object.keys(e).filter(function(I){return I.indexOf("on")===0&&I.length>2}).forEach(function(I){var P=I.charAt(2).toLowerCase()+I.slice(3);P.substring(P.length-4)==="Once"&&(P="~".concat(P.substring(0,P.length-4))),C[P]=e[I]})),Object.keys(C).forEach(function(I){var P=C[I];if(P){var R=I.toLowerCase();R.charAt(0)==="~"&&(R=R.substring(1),P.__once__=!0);var E=D;if(R.indexOf("zr:")===0&&(E=D.getZr(),R=R.substring(3)),P.__once__){delete P.__once__;var G=P;P=function(){for(var k=[],N=0;N<arguments.length;N++)k[N]=arguments[N];G.apply(void 0,k),E.off(R,P)}}E.on(R,P)}}),h.value?G_(function(){D&&!D.isDisposed()&&D.resize(),L()}):L()}function L(){var I=M||g.value;I&&D.setOption(I,m.value)}}function x(){a.value&&(a.value.dispose(),a.value=void 0)}var b=null;Pa(c,function(M){typeof b=="function"&&(b(),b=null),M||(b=Pa(function(){return r.option},function(D,C){D&&(a.value?a.value.setOption(D,Ze({notMerge:D!==C},m.value)):w())},{deep:!0}))},{immediate:!0}),Pa([p,y],function(){x(),w()},{deep:!0}),Qh(function(){r.group&&a.value&&(a.value.group=r.group)});var T=VP(a);return function(M,D,C){var L=Ia(UP,{}),I=Ti(function(){return Ze(Ze({},To(L,{})),C==null?void 0:C.value)});Qh(function(){var P=M.value;P&&(D.value?P.showLoading(I.value):P.hideLoading())})}(a,v,d),function(M,D,C){var L=null;Pa([C,M,D],function(I,P,R){var E=I[0],G=I[1],k=I[2];if(E&&G&&k){var N=k===!0?{}:k,H=N.throttle,q=H===void 0?100:H,Y=N.onResize,J=function(){G.resize(),Y==null||Y()};L=q? $ s(J,q):J,kP(E,L)}R(function(){E&&L&&OP(E,L)})})}(a,h,n),F_(function(){w()}),V_(function(){ $ P&&i.value?i.value.__dispose=x:x()}),Ze({chart:a,root:i,inner:n,setOption:function(M,D){r.manualUpdate&&(o.value=M),a.value?a.value.setOption(M,D||{}):w(M)},nonEventAttrs:_},T)},render:function(){var r=Ze({},this.nonEventAttrs);return r.ref="root",r.class=r.class?["echarts"].concat(r.class):"echarts",Jh(E_,r,[Jh("div",{ref:"inner",class:"echarts-inner"})])}});export{sR as B,jP as a,JP as b,tR as c,eR as d,rR as e,nR as f,aR as g,oR as h,QP as i,iR as j,Ge as u};